/* VOX DIVINA - THEME: MODERN & MINIMALIST (Option B)
   Contemporary, clean and intuitive design with glassmorphism elements
   Perfect for tech-forward religious/spiritual products
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&family=Montserrat:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&display=swap');

:root {
  /* Color Palette - Modern & Minimalist */
  --gold: #d4af55;
  --gold-dim: rgba(212,175,85,0.7);
  --gold-faint: rgba(212,175,85,0.08);
  --gold-ghost: rgba(212,175,85,0.04);
  --bg-deep: #0f0f0f;
  --bg-mid: #1a1a1a;
  --bg-card: rgba(255,255,255,0.05);
  --text-light: #ffffff;
  --text-dim: rgba(255,255,255,0.9);
  --text-hint: rgba(255,255,255,0.6);
  --green-soft: rgba(100,180,100,0.4);
  --green-bg: rgba(100,180,100,0.04);
  --red-soft: rgba(220,80,80,0.8);
  
  /* Typography - Modern Sans-Serif */
  --font-display: 'Montserrat', 'Inter', sans-serif;
  --font-body: 'Inter', 'Helvetica', sans-serif;
  
  /* Spacing & Radius - Clean & Minimal */
  --radius: 12px;
  --radius-lg: 16px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 40px;
}

*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

html, body {
  min-height: 100vh;
  background: var(--bg-deep);
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { 
  color: inherit; 
  text-decoration: none; 
}

button { 
  font: inherit; 
  cursor: pointer; 
}

input, textarea { 
  font: inherit; 
}

/* Scrollbar - Minimal */
::-webkit-scrollbar { 
  width: 6px; 
}

::-webkit-scrollbar-track { 
  background: transparent; 
}

::-webkit-scrollbar-thumb { 
  background: rgba(212,175,85,0.3); 
  border-radius: 3px; 
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(212,175,85,0.5);
}

/* Layout */
.container {
  width: 100%;
  padding: 0 clamp(16px, 3vw, 48px);
  position: relative;
  z-index: 1;
}

.app-content {
  padding: 60px clamp(16px, 3vw, 48px) 0;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

/* Carousels */
.plan-carousel { scroll-snap-type: x mandatory; }
.plan-carousel::-webkit-scrollbar { display: none; }
.plan-card-link { flex: 0 0 180px; }

/* Ambient Glow - Minimal */
.ambient {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(212,175,85,0.02) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Header - Clean, fixed with fade */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 48px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-deep);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo svg { 
  color: var(--gold); 
  opacity: 0.9; 
}

.header-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}

.header-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.nav-link {
  background: none;
  border: none;
  padding: 8px 4px;
  color: var(--text-light);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--gold);
}

/* Cards - Clean */
.card {
  background: rgba(255,255,255,0.05);
  border: none;
  border-radius: var(--radius-lg);
  padding: 24px;
}

.card-glow {
  /* disabled */
}

/* Glow on clickable cards */
.plan-card-link,
.explore-card,
.card-clickable {
  transition: box-shadow 0.25s ease-out;
  border-radius: var(--radius-lg);
}
.plan-card-link:hover,
.explore-card:hover,
.card-clickable:hover {
  box-shadow: 0 0 0 1px rgba(212,175,85,0.35), 0 0 30px rgba(212,175,85,0.15), 0 8px 24px rgba(0,0,0,0.3);
}

/* Share button hover */
.share-btn:hover {
  border-color: rgba(212,175,85,0.4) !important;
  color: var(--gold) !important;
  box-shadow: 0 0 15px rgba(212,175,85,0.1);
}

.plan-card-link {
  flex: 0 0 180px;
  display: block;
  border-radius: 12px;
}

/* Ambient disabled */
.ambient {
  display: none;
}

/* Verse Card - Prominent */
.verse-label {
  color: var(--gold-dim);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 600;
}

.verse-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.6;
  color: var(--text-light);
  margin-bottom: 12px;
}

.verse-ref {
  color: var(--gold);
  font-size: 14px;
  font-weight: 500;
}

/* Theme Grid */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.theme-btn {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(212,175,85,0.1);
  border-radius: var(--radius);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  color: var(--text-dim);
  font-size: 14px;
}

.theme-btn:hover {
  background: rgba(212,175,85,0.08);
  border-color: rgba(212,175,85,0.2);
  transform: translateY(-2px);
}

.theme-btn .icon { 
  font-size: 26px; 
}

/* Input Bar - Clean */
.input-bar {
  display: flex;
  gap: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(212,175,85,0.1);
  border-radius: 14px;
  padding: 6px 6px 6px 16px;
  align-items: center;
}

.input-bar input,
.input-bar textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-light);
  font-size: 14px;
  padding: 10px 0;
  resize: none;
}

.input-bar input::placeholder,
.input-bar textarea::placeholder { 
  color: var(--text-hint); 
}

.send-btn {
  background: linear-gradient(135deg, var(--gold) 0%, #c9a961 100%);
  border: none;
  border-radius: 10px;
  padding: 0 18px;
  height: 40px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-deep);
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.send-btn:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.send-btn:disabled { 
  opacity: 0.4; 
  cursor: default; 
}

/* Chat Messages */
.msg-user {
  background: rgba(212,175,85,0.15);
  border: 1px solid rgba(212,175,85,0.2);
  border-radius: 16px 16px 4px 16px;
  padding: 12px 16px;
  max-width: 80%;
  align-self: flex-end;
}

.msg-assistant {
  max-width: 90%;
  align-self: flex-start;
}

.msg-avatar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.msg-avatar-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(212,175,85,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: rgba(212,175,85,0.05);
}

.msg-avatar-name {
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-display);
}

.msg-bubble {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(212,175,85,0.08);
  border-radius: 4px 16px 16px 16px;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: 10px;
}

/* Citation Card */
.citation-card {
  background: rgba(212,175,85,0.05);
  border: 1px solid rgba(212,175,85,0.1);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.citation-label {
  color: var(--gold-dim);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 600;
}

.citation-text {
  color: var(--text-light);
  font-size: 14px;
  font-style: italic;
  line-height: 1.5;
}

.citation-ref {
  color: var(--gold);
  font-size: 13px;
  margin-top: 6px;
  font-weight: 500;
}

/* Practice Card */
.practice-card {
  background: rgba(100,180,100,0.05);
  border: 1px solid rgba(100,180,100,0.1);
  border-left: 3px solid var(--green-soft);
  border-radius: 10px;
  padding: 14px 16px;
}

.practice-label {
  color: rgba(100,180,100,0.5);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 600;
}

.practice-text {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 18px;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
}

.badge-high { 
  background: rgba(100,180,100,0.1); 
  color: rgba(100,180,100,0.7); 
}

.badge-medium { 
  background: rgba(212,175,85,0.1); 
  color: var(--gold-dim); 
}

.badge-low { 
  background: rgba(220,80,80,0.1); 
  color: rgba(220,80,80,0.6); 
}

/* Crisis Banner */
.crisis-banner {
  background: rgba(220,80,80,0.08);
  border: 1px solid rgba(220,80,80,0.15);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.crisis-banner strong { 
  color: var(--red-soft); 
}

.crisis-banner p { 
  color: var(--text-dim); 
  font-size: 14px; 
  margin-top: 8px; 
}

/* Disclaimer */
.disclaimer {
  color: var(--text-hint);
  font-size: 11px;
  text-align: center;
  padding: 12px 0;
}

/* Tags Row */
.tags {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tag {
  background: rgba(212,175,85,0.08);
  border: 1px solid rgba(212,175,85,0.1);
  border-radius: 18px;
  padding: 5px 12px;
  color: var(--gold-dim);
  font-size: 11px;
  font-weight: 500;
}

/* Live Indicator */
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 10px rgba(74,222,128,0.5);
  animation: pulse 2s ease-in-out infinite;
}

/* Typing Animation */
.typing-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  animation: breathe 1s ease-in-out infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

/* CTA Button */
.cta-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--gold) 0%, #c9a961 100%);
  border: none;
  border-radius: 10px;
  color: var(--bg-deep);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-align: center;
  transition: all 0.2s ease;
}

.cta-btn:hover { 
  opacity: 0.9;
  transform: scale(1.01);
}

.cta-btn:disabled { 
  opacity: 0.5; 
  cursor: default; 
}

/* Utility Classes */
.stack { 
  display: grid; 
  gap: 12px; 
}

.gap-lg { 
  gap: 24px; 
}

.gap-xl { 
  gap: 40px; 
}

.text-center { 
  text-align: center; 
}

.mt-sm { 
  margin-top: 8px; 
}

.mt-md { 
  margin-top: 16px; 
}

.mt-lg { 
  margin-top: 32px; 
}

.mb-lg { 
  margin-bottom: 32px; 
}

/* Animations */
@keyframes fadeIn { 
  from { opacity: 0; transform: translateY(16px) } 
  to { opacity: 1; transform: translateY(0) } 
}

@keyframes slideUp { 
  from { opacity: 0; transform: translateY(30px) } 
  to { opacity: 1; transform: translateY(0) } 
}

@keyframes glow { 
  0%, 100% { box-shadow: 0 0 15px rgba(212,175,85,0.08) } 
  50% { box-shadow: 0 0 30px rgba(212,175,85,0.15) } 
}

@keyframes breathe { 
  0%, 100% { opacity: 0.4; transform: scale(1) } 
  50% { opacity: 1; transform: scale(1.1) } 
}

@keyframes pulse {
  0%, 100% { opacity: 1 }
  50% { opacity: 0.6 }
}

@keyframes blink { 
  0%, 50% { opacity: 1 } 
  51%, 100% { opacity: 0 } 
}

.animate-in { 
  animation: fadeIn 0.6s ease-out; 
}

/* Admin Styles — see shell block below */

.admin-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(212,175,85,0.1);
}

.admin-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

.admin-table-wrap thead tr {
  border-bottom: 1px solid rgba(212,175,85,0.1);
  background: rgba(212,175,85,0.03);
}

.admin-table-wrap tbody tr {
  border-bottom: 1px solid rgba(212,175,85,0.05);
  transition: background 0.2s ease;
}

.admin-table-wrap tbody tr:hover {
  background: rgba(212,175,85,0.05);
}

.admin-table-wrap th,
.admin-table-wrap td {
  padding: 12px 14px;
  text-align: left;
}

.admin-table-wrap th {
  color: var(--gold-dim);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.admin-table-wrap td {
  color: var(--text-dim);
  font-size: 13px;
}

/* ── Admin shell: sidebar + content ── */

.app-content:has(.admin-shell) {
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin: 0 !important;
}

/* Hide app header inside admin (sidebar has its own nav) */
.app-content:has(.admin-shell) .header { display: none; }

.admin-shell { display: flex; min-height: 100dvh; width: 100%; }

.admin-sidebar {
  display: flex; flex-direction: column;
  background: rgba(0,0,0,0.4);
  border-right: 1px solid var(--gold-faint);
  width: 155px; flex-shrink: 0;
  position: fixed; top: 0; left: 0;
  height: 100dvh; overflow-y: auto; z-index: 100;
}

.admin-sidebar-desktop { display: flex; }
.admin-sidebar-mobile  { display: none; }
.admin-mobile-header   { display: none; }

.admin-main {
  flex: 1; min-width: 0;
  margin-left: 155px;
  padding: 28px 32px 48px; overflow-x: hidden;
}

@media (max-width: 900px) {
  .admin-sidebar-desktop { display: none; }
  .admin-sidebar {
    position: fixed; top: 0; left: -175px;
    width: 175px; transition: left 0.25s ease; z-index: 200;
  }
  .admin-sidebar-mobile {
    display: flex; position: fixed; inset: 0; z-index: 199; pointer-events: none;
  }
  .admin-sidebar-mobile.admin-sidebar-open { pointer-events: auto; }
  .admin-sidebar-mobile.admin-sidebar-open .admin-sidebar { left: 0; }
  .admin-mobile-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid var(--gold-faint);
    margin: -28px -32px 24px;
  }
  .admin-main { margin-left: 0; padding: 16px 16px 48px; }
}

.admin-page { width: 100%; }
.admin-grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.admin-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.admin-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }

/* Responsive */
@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .container {
    padding: 0 16px;
  }

  .header {
    padding: 10px 16px;
  }

  .app-content {
    padding: 56px 16px 0;
  }

  .plan-carousel { scroll-snap-type: none; }
  .plan-card-link { flex: 0 0 150px; }
  
  .header-title { 
    font-size: 16px; 
  }
  
  .nav-link { 
    font-size: 12px; 
    padding: 6px 10px; 
  }
  
  .verse-text { 
    font-size: 18px; 
    line-height: 1.5; 
  }
  
  .theme-grid { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px; 
  }
  
  .theme-btn { 
    padding: 16px 12px; 
    font-size: 13px; 
  }
  
  .msg-bubble { 
    font-size: 14px; 
    line-height: 1.6; 
  }
  
  .card { 
    padding: 18px; 
  }
  
  h1 { 
    font-size: 22px !important; 
  }
}
