/* =============================================
   MyLegalSahayak — Sage & Gold Design System
   ============================================= */

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

:root {
  /* Sage & Gold Palette */
  --cream:         #F5EDD8;
  --cream-light:   #FDFAF3;
  --cream-dark:    #EDE3CC;
  --hero-illustration-bg: #FEF9F2;
  --gold:          #B8940A;
  --gold-light:    #D4AF37;
  --gold-dark:     #8B6F00;
  --sage:          #4E6B52;
  --sage-light:    #6B8F6F;
  --navy:          #1C2B3A;
  --navy-light:    #2E4057;
  --text:          #1C2014;
  --text-muted:    #6B6455;
  --border:        #DDD3BB;
  --white:         #FFFFFF;

  /* Legacy vars mapped for script.js compatibility */
  --accent:        var(--gold-light);
  --accent-gold:   var(--gold-light);
  --accent-gold-light: #F3E5AB;
  --accent-emerald: #4E6B52;
  --accent-rose:   #C0392B;
  --bg-dark:       var(--cream-light);
  --glass-bg:      rgba(255, 255, 255, 0.92);
  --glass-border:  var(--border);
  --glass-shadow:  0 4px 24px rgba(60, 40, 0, 0.08);
  --text-primary:  var(--text);
  --font-heading:  'Playfair Display', serif;
  --font-body:     'Inter', sans-serif;
  --transition:    all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  --green:         #27AE60;
  --orange:        #E67E22;
  --red:           #C0392B;
}

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

body {
  font-family: var(--font-body);
  background: var(--cream-light);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* =========================================
   DASHBOARD LAYOUT (structure only)
   ========================================= */
.app-layout {
  --sidebar-left-w: 248px;
  --sidebar-right-w: 300px;
  display: grid;
  grid-template-columns: var(--sidebar-left-w) minmax(0, 1fr) var(--sidebar-right-w);
  gap: 1.25rem 1.5rem;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 0;
  flex: 1;
  align-items: start;
}

.layout-sidebar-left {
  grid-column: 1;
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 78px;
  align-self: start;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}

.layout-sidebar-right {
  grid-column: 3;
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 78px;
  align-self: start;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}

.layout-center {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.result-area {
  width: 100%;
}

.results-panel-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

.result-col-center {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.result-col-right {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: static;
  align-self: auto;
  max-height: none;
  overflow-y: visible;
}

.layout-center .chat-sidebar {
  margin-top: 0.25rem;
}

.result-center-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

.result-center-grid .result-card {
  margin-bottom: 0;
}

.result-col-center > .result-card {
  margin-bottom: 0;
}

.result-col-right .result-card {
  margin-bottom: 0;
}

.result-col-right .insight-grid {
  grid-template-columns: 1fr 1fr;
}

/* Single-column result layout for no overlap with right sidebar */
.result-area .results-panel-grid .result-col-right {
  position: static;
  max-height: none;
  overflow-y: visible;
}

#resultArea > #searchResults {
  width: 100%;
  margin-right: 0;
  margin-bottom: 1.25rem;
  min-width: 0;
}

.layout-center .hero-section {
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--border) 55%, var(--hero-illustration-bg));
  margin: 0;
  overflow: hidden;
}

.layout-center .container {
  max-width: none;
  margin: 0;
  padding: 0 0 1rem;
}

.quick-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.25rem 0;
}

.quick-action-item {
  flex: 1;
  min-width: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.35rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  transition: var(--transition);
  border-radius: 10px;
}

.quick-action-item:hover {
  background: var(--cream);
}

.quick-action-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.quick-action-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
}

.sidebar-nav.tab-container {
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 0.35rem;
  align-items: stretch;
  justify-content: flex-start;
}

.sidebar-nav .tab-btn {
  width: 100%;
  justify-content: flex-start;
  white-space: normal;
  text-align: left;
  padding: 0.7rem 0.85rem;
}

.sidebar-ai-card {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.sidebar-ai-icon {
  font-size: 1.25rem;
}

.sidebar-ai-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

.sidebar-ai-link {
  align-self: flex-start;
  border: none;
  background: none;
  padding: 0;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-dark);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sidebar-ai-link:hover {
  color: var(--navy);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(253, 250, 243, 0.97);
  margin-top: 2rem;
  padding: 1.5rem 2rem;
}

.footer-inner {
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.footer-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.footer-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.footer-item strong {
  display: block;
  font-size: 0.92rem;
  color: var(--navy);
  margin-bottom: 0.15rem;
}

.footer-item p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* =========================================
   TOP NAVIGATION BAR
   ========================================= */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(253, 250, 243, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(60, 40, 0, 0.06);
  padding: 0 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  height: 66px;
  width: 100%;
  flex-shrink: 0;
}

.site-nav .nav-logo {
  justify-self: start;
}

.site-nav .nav-links {
  justify-self: center;
}

.site-nav .nav-cta {
  justify-self: end;
  gap: 0.35rem;
  flex-wrap: wrap;
  min-width: 0;
}

.site-nav .nav-links li button.nav-link-active {
  color: var(--navy);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--gold);
  border-radius: 0;
}

.site-nav .nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.site-logo-img {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.site-nav .nav-logo span {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.3px;
}

.site-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.site-nav .nav-links li a,
.site-nav .nav-links li button {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
}

.site-nav .nav-links li a:hover,
.site-nav .nav-links li button:hover { color: var(--navy); background: var(--cream); }

.site-nav .nav-cta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Auth nav group — hidden by default, shown via JS .active */
.nav-auth-group {
  display: none;
  flex: 0 0 auto;
}
.nav-auth-group.active {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}
.nav-auth-group.active + .btn-outline-nav,
.nav-auth-group.active ~ .btn-outline-nav {
  margin-left: 0.35rem;
}

.btn-outline-nav {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-dark);
  background: transparent;
  border: 1.5px solid var(--gold);
  border-radius: 8px;
  padding: 0.38rem 0.75rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: var(--transition);
}

.btn-outline-nav:hover { background: var(--gold); color: #fff; }

.btn-login-nav {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: var(--navy);
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1.3rem;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.btn-login-nav:hover { background: var(--navy-light); }

/* =========================================
   HERO SECTION
   ========================================= */
.hero-section {
  background: var(--hero-illustration-bg);
  padding: 2rem 1.75rem 1.75rem;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: none;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr minmax(180px, 42%);
  align-items: center;
  gap: 1.5rem 2rem;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  min-height: 0;
  background: var(--hero-illustration-bg);
  border-radius: 8px;
}

.hero-illustration-img {
  width: 100%;
  max-width: 380px;
  height: auto;
  object-fit: contain;
  display: block;
  background: var(--hero-illustration-bg);
  vertical-align: middle;
}

.hero-text h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
}

.hero-text h1 em {
  color: var(--gold);
  font-style: normal;
}

.hero-text .hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 480px;
  margin-bottom: 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gold);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(184, 148, 10, 0.3);
  border: none;
  cursor: pointer;
}

.hero-badge:hover { background: var(--gold-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(184, 148, 10, 0.4); }

/* =========================================
   BACKGROUND (no animated blobs — clean)
   ========================================= */
.background-blobs { display: none; }

/* =========================================
   MAIN CONTAINER
   ========================================= */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
}

/* Legacy header hidden — replaced by site-nav + hero */
.glassHeader { display: none; }
.subtitle { display: none; }

/* =========================================
   TAB NAVIGATION (icon feature cards style)
   ========================================= */
.tab-container {
  display: flex;
  gap: 0.5rem;
  padding: 0.4rem;
  margin-bottom: 0;
  border-radius: 14px;
  justify-content: center;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(60, 40, 0, 0.06);
  backdrop-filter: none;
}

.tab-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.tab-btn:hover { color: var(--navy); background: var(--cream); }

.tab-btn.active {
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(28, 43, 58, 0.2);
}

.tab-btn.locked,
.quick-action-item.locked {
  opacity: 0.55;
  cursor: not-allowed;
  position: relative;
}

.tab-btn.locked::after,
.quick-action-item.locked::after {
  content: '🔒';
  font-size: 0.7rem;
  margin-left: 0.35rem;
}

.tab-btn.locked:hover,
.quick-action-item.locked:hover {
  background: transparent;
  color: var(--text-muted);
}

.feature-locked-banner {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 2rem;
  background: var(--cream-light);
  border: 1px dashed var(--border);
  border-radius: 16px;
  color: var(--text-muted);
}

.feature-locked-banner h3 {
  font-family: var(--font-heading);
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.feature-hidden {
  display: none !important;
}

/* =========================================
   CONTENT SECTIONS
   ========================================= */
.tab-content { display: none; animation: fadeInTab 0.4s ease; }
.tab-content.active { display: block; }

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

/* =========================================
   CARD / GLASS (light version)
   ========================================= */
.glass {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 2px 16px rgba(60, 40, 0, 0.07);
  transition: var(--transition);
  backdrop-filter: none;
}

.glass:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 24px rgba(184, 148, 10, 0.1);
}

/* =========================================
   SCORING / INPUT SECTION
   ========================================= */
.scoring-section h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.scoring-section textarea {
  width: 100%;
  min-height: 180px;
  background: var(--cream-light);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  resize: vertical;
  transition: var(--transition);
  line-height: 1.6;
}

.scoring-section textarea::placeholder { color: var(--text-muted); }

.scoring-section textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(184, 148, 10, 0.1);
}

/* Location row inputs */
.location-row input {
  background: var(--cream-light) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 12px !important;
  color: var(--text) !important;
  font-family: var(--font-body) !important;
  font-size: 0.95rem !important;
  padding: 0.85rem 1rem !important;
  transition: var(--transition) !important;
}

.location-row input::placeholder { color: var(--text-muted); }
.location-row input:focus {
  outline: none !important;
  border-color: var(--gold) !important;
  background: var(--white) !important;
  box-shadow: 0 0 0 3px rgba(184, 148, 10, 0.1) !important;
}

/* =========================================
   BUTTONS
   ========================================= */
.primary-btn {
  background: var(--gold);
  color: #fff;
  padding: 0.9rem 2.5rem;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(184, 148, 10, 0.28);
}

.primary-btn:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(184, 148, 10, 0.35);
}

.primary-btn:active { transform: translateY(0); }

#btnGetScore {
  display: block;
  width: 100%;
  margin-top: 1.25rem;
  padding: 1rem;
  font-size: 1rem;
  letter-spacing: 0.3px;
  border-radius: 12px;
}

/* =========================================
   LOADER
   ========================================= */
.loader-container { text-align: center; margin: 3rem 0; }

.loader-container p {
  margin-top: 1.5rem;
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: 1.05rem;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--cream-dark);
  border-top: 3px solid var(--gold);
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  animation: spin 0.9s linear infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* =========================================
   RESULT AREA & CARDS
   ========================================= */
.result-area.hidden { display: none !important; }

.result-card {
  margin-bottom: 1.5rem;
}

.result-card h3 {
  font-family: var(--font-heading);
  color: var(--navy);
  margin-bottom: 1.25rem;
  font-size: 1.2rem;
  font-weight: 700;
}

/* Summary */
.summary-card {
  border-left: 4px solid var(--gold);
  background: linear-gradient(135deg, var(--white) 0%, #FFFDF5 100%);
}

.jurist-summary-text {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  white-space: pre-wrap;
}

/* Law Pills */
.law-pills { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.law-pill {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: rgba(78, 107, 82, 0.1);
  border: 1.5px solid rgba(78, 107, 82, 0.35);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--sage);
  font-weight: 700;
}

/* Next Steps */
.next-steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.next-steps-list li {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  background: var(--cream-light);
  border-radius: 10px;
  border-left: 3px solid var(--gold);
  line-height: 1.55;
  color: var(--text);
  font-size: 0.95rem;
}

.next-steps-list .step-num {
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Evidence Section */
.evidence-card { border-left: 4px solid var(--sage); }

.evidence-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.evidence-header h3 { margin-bottom: 0; }

#winAbilityValue {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--sage);
  font-family: var(--font-heading);
}

.checklist-scroll {
  max-height: 280px;
  overflow-y: auto;
  padding-right: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) var(--cream);
}

.checklist-item {
  background: var(--cream-light);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
  position: relative;
}

.checklist-item strong {
  display: block;
  font-size: 0.95rem;
  color: var(--navy);
  margin-bottom: 0.3rem;
}

.checklist-item p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; margin: 0; }

.importance-tag {
  font-size: 0.78rem;
  color: var(--gold-dark);
  font-weight: 700;
  opacity: 1;
}

.provability-mini-meter { margin-top: 1.5rem; }

.meter-bar-bg {
  height: 8px;
  background: var(--cream-dark);
  border-radius: 10px;
  overflow: hidden;
}

.meter-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--sage));
  border-radius: 10px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.meter-status-text {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-muted);
}

/* Insight Grid (Time & Probability) */
.insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.insight-item {
  background: var(--cream-light);
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 90px;
}

.insight-item p {
  color: var(--text);
  font-size: 0.93rem;
  line-height: 1.5;
  margin: 0;
}

.insight-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 700;
}

.insight-value {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--navy);
  font-family: var(--font-heading);
}

/* Stage Badges */
.stage-badge {
  display: inline-block;
  padding: 0.3rem 1rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.phase-1 {
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.phase-2 {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

/* Jurisdiction & Court */
.location-detected-label {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.jurisdiction-highlight {
  font-weight: 800;
  color: #1d4ed8;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.filing-guidance-text {
  font-size: 0.93rem;
  line-height: 1.65;
  color: var(--text);
  margin: 0.75rem 0 1.25rem;
}

.court-highlight {
  font-family: var(--font-heading);
  color: #7c3aed;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.court-explanation {
  font-size: 0.93rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.map-btn {
  display: inline-block;
  margin-top: 0.5rem;
  text-decoration: none;
  font-size: 0.88rem !important;
  padding: 0.7rem 1.8rem !important;
}

.map-btn.secondary {
  background: rgba(124, 58, 237, 0.1) !important;
  color: #7c3aed !important;
  border: 1.5px solid rgba(124, 58, 237, 0.3) !important;
  box-shadow: none !important;
}

.map-btn.secondary:hover {
  background: rgba(124, 58, 237, 0.18) !important;
  transform: translateY(-1px) !important;
}

/* Insight Card Header */
.insight-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.insight-card-header h3,
.evidence-header.insight-card-header h3 {
  margin-bottom: 0;
  flex: 1;
}

/* Reasoning / Strategic Analysis */
#reasoningSection .insight-item:nth-child(1) { border-left: 3px solid #ef4444; }
#reasoningSection .insight-item:nth-child(2) { border-left: 3px solid var(--gold); }
#reasoningSection .insight-item:nth-child(3) { border-left: 3px solid var(--sage); }

/* =========================================
   HIDDEN UTILITY
   ========================================= */
.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* =========================================
   SEARCH & CASE SEARCH
   ========================================= */
.search-bar-container { display: flex; gap: 1rem; margin-bottom: 2rem; }

.search-bar-container input {
  flex: 1;
  background: var(--cream-light);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: var(--transition);
}

.search-bar-container input::placeholder { color: var(--text-muted); }
.search-bar-container input:focus { outline: none; border-color: var(--gold); background: var(--white); box-shadow: 0 0 0 3px rgba(184,148,10,0.1); }

.case-card {
  border-left: 4px solid var(--gold);
  margin-bottom: 1.25rem;
  cursor: pointer;
  background: var(--white);
}

.case-card:hover { border-left-color: var(--sage); transform: translateX(3px); }

.case-card h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.case-meta { margin-bottom: 1rem; }

.match-score {
  background: rgba(184, 148, 10, 0.1);
  color: var(--gold-dark);
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.card-type-badge {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold-dark);
  opacity: 0.8;
  margin-bottom: 0.4rem;
  display: block;
}

/* =========================================
   STATUTE LIBRARY
   ========================================= */
.statute-library-section { padding: 2rem; }

.library-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
}

.header-text h3 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.header-text p { color: var(--text-muted); }

.library-search-container { margin: 2rem 0; }

.premium-search-box {
  position: relative;
  max-width: 580px;
  margin: 0 auto;
}

.premium-search-box i {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 1.1rem;
}

.premium-search-box input {
  width: 100%;
  padding: 1.1rem 1.5rem 1.1rem 3.5rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: var(--transition);
}

.premium-search-box input::placeholder { color: var(--text-muted); }
.premium-search-box input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184,148,10,0.1);
}

.category-tabs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

.cat-pill {
  background: var(--white);
  border: 1.5px solid var(--border);
  padding: 0.5rem 1.3rem;
  border-radius: 50px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.cat-pill:hover { color: var(--navy); border-color: var(--navy); }
.cat-pill.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Statute Grid */
.statute-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.back-btn {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.back-btn:hover {
    opacity: 0.9;
}

.statute-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.statute-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold);
  box-shadow: 0 8px 30px rgba(184, 148, 10, 0.12);
}

.statute-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gold);
  opacity: 0.6;
}

.statute-card .law-num {
  font-family: var(--font-body);
  color: var(--gold-dark);
  font-size: 0.75rem;
  letter-spacing: 2px;
  font-weight: 800;
  text-transform: uppercase;
}

.statute-card .law-title {
  font-size: 1.15rem;
  color: var(--navy);
  font-family: var(--font-heading);
  line-height: 1.25;
  font-weight: 700;
}

.statute-card .law-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.statute-card .law-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.statute-card .law-cat {
  font-size: 0.68rem;
  background: rgba(184, 148, 10, 0.1);
  color: var(--gold-dark);
  padding: 0.25rem 0.7rem;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.statute-card .read-btn {
  background: transparent;
  border: none;
  color: var(--gold-dark);
  font-weight: 700;
  font-size: 0.83rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.statute-card .read-btn:hover { text-decoration: underline; color: var(--navy); }

.statute-card-discovered {
  border: 1px solid rgba(184, 148, 10, 0.35);
  background: linear-gradient(135deg, rgba(184, 148, 10, 0.04), var(--white));
}

.statute-card-discovered .law-num {
  color: var(--gold-dark);
}

.discover-loader p {
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.statute-search-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
  text-align: center;
  line-height: 1.45;
}

.law-summary-saved-badge {
  font-size: 0.78rem;
  color: var(--green);
  font-weight: 600;
}

.library-loader { grid-column: 1 / -1; text-align: center; padding: 4rem; }

/* Pagination */
.pagination-controls {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding: 0 1rem;
}

.pagination-controls .page-btn {
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 0.7rem 1.1rem;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 700;
  font-size: 0.88rem;
}

.pagination-controls .page-btn:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold-dark);
  transform: translateY(-1px);
}

.pagination-controls .page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.pagination-controls .page-info,
.pagination-controls .page-summary { color: var(--text-muted); font-size: 0.9rem; }

/* =========================================
   DOCUMENT UPLOAD
   ========================================= */
.upload-section {
  background: var(--white) !important;
  text-align: center;
}

.upload-section h3 { font-family: var(--font-heading); color: var(--navy) !important; }
.upload-section p { color: var(--text-muted) !important; }

.drop-zone {
  border: 2px dashed var(--border) !important;
  border-radius: 20px !important;
  background: var(--cream-light) !important;
  transition: var(--transition) !important;
  cursor: pointer;
}

.drop-zone:hover { border-color: var(--gold) !important; background: #FFFDF5 !important; }

.upload-icon-container { background: rgba(184, 148, 10, 0.1) !important; }

.analysis-features span { color: var(--text-muted) !important; }

/* =========================================
   FIND LAWYER SECTION
   ========================================= */
#lawyerResults .result-card,
#lawyerResults .glass {
  background: var(--white);
}

/* =========================================
   LAWYER WIDGET (bottom-right)
   ========================================= */
.lawyer-widget {
  position: static;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 5px solid var(--gold);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  width: 100%;
  z-index: 1;
  box-shadow: 0 2px 16px rgba(60, 40, 0, 0.07);
  transition: var(--transition);
  font-size: 0.88rem;
  backdrop-filter: none;
}

.lawyer-widget:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(184,148,10,0.18); }

.lawyer-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.lawyer-icon { font-size: 1.25rem; }

.lawyer-widget .lawyer-header h4 {
  font-family: var(--font-heading);
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 0;
}

.lawyer-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
  margin-bottom: 0.2rem;
}

.lawyer-court { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.85rem; }

.lawyer-phone {
  display: block;
  background: var(--gold);
  color: #fff;
  text-align: center;
  padding: 0.55rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.82rem;
  transition: var(--transition);
}

.lawyer-phone:hover { background: var(--gold-dark); }

/* =========================================
   MODAL
   ========================================= */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(28, 43, 58, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  width: 90%;
  max-width: 860px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--white) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  padding: 3rem !important;
  position: relative;
  box-shadow: 0 20px 60px rgba(28, 43, 58, 0.2) !important;
}

.close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--cream-light);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.close-btn:hover { background: var(--gold); color: #fff; border-color: var(--gold); }

.modal-loader { text-align: center; padding: 2rem; }

.summary-section h2 { font-family: var(--font-heading); color: var(--navy); margin-bottom: 2rem; font-size: 2rem; }

.lang-block {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--cream-light);
  border-left: 4px solid var(--gold);
  border-radius: 0 10px 10px 0;
}

.lang-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold-dark);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.hinglish-text { font-family: var(--font-heading); font-size: 1.3rem; font-style: italic; color: var(--navy); line-height: 1.6; }
.english-text { font-size: 1rem; line-height: 1.7; color: var(--text-muted); }

/* =========================================
   CHAT SIDEBAR
   ========================================= */
.chat-sidebar {
  position: static;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(60,40,0,0.08);
  backdrop-filter: none;
}

.chat-sidebar.hidden { display: none !important; }

.chat-sidebar .chat-header {
  padding: 1.25rem 1.5rem;
  background: var(--cream-light);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.chat-sidebar .chat-header h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--navy);
  font-family: var(--font-heading);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) var(--cream);
}

.message {
  max-width: 80%;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.55;
  position: relative;
  animation: messageIn 0.3s ease-out;
}

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

.message.assistant {
  align-self: flex-start;
  background: var(--cream-light);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  color: var(--text);
}

.message.user {
  align-self: flex-end;
  background: var(--navy);
  color: #fff;
  font-weight: 500;
}

.chat-sidebar .chat-input-area {
  padding: 1.25rem 1.5rem;
  background: var(--cream-light);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

#chatInput {
  flex: 1;
  min-height: 42px;
  max-height: 100px;
  background: var(--white) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 10px !important;
  color: var(--text) !important;
  padding: 0.75rem 1rem !important;
  font-family: var(--font-body) !important;
  resize: none;
  transition: var(--transition) !important;
}

#chatInput:focus {
  outline: none !important;
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(184,148,10,0.1) !important;
}

.send-btn {
  background: var(--navy);
  border: none;
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.send-btn:hover { background: var(--gold); transform: scale(1.05); }

/* =========================================
   LANGUAGE SELECT
   ========================================= */
.jurist-lang-row { margin-bottom: 1rem; }

.jurist-field-label {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.jurist-select {
  width: 100%;
  max-width: 380px;
  padding: 0.7rem 2.25rem 0.7rem 1rem;
  border-radius: 10px;
  background-color: var(--cream-light);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.93rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23B8940A' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  transition: var(--transition);
}

.jurist-select option { background-color: var(--white); color: var(--text); }

.jurist-select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184,148,10,0.1);
}

.situation-input-wrap { width: 100%; margin: 1.25rem 0 0.5rem; }
.scoring-section .situation-input-wrap textarea { display: block; width: 100%; min-height: 200px; margin: 0; padding: 1.1rem 1.25rem; box-sizing: border-box; }

/* Location status */
#locationStatus { font-size: 0.84rem; color: var(--text-muted); margin-top: 0.5rem; min-height: 1.2em; }

/* =========================================
   LAW TAG (inline in chat)
   ========================================= */
.law-tag {
  display: inline-block;
  background: rgba(184, 148, 10, 0.1);
  border: 1px solid var(--gold);
  color: var(--gold-dark);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
  margin: 0 0.15rem;
  font-size: 0.88em;
  transition: var(--transition);
}

.law-tag:hover { background: var(--gold); color: #fff; }

/* =========================================
   SUGGESTION LIST (modal)
   ========================================= */
.suggestion-list { list-style: none; display: grid; gap: 0.85rem; margin-top: 1rem; }

.suggestion-list li {
  padding: 1rem 1.1rem;
  background: var(--cream-light);
  border-radius: 8px;
  border-left: 3px solid var(--gold);
  font-size: 0.93rem;
  color: var(--text);
  line-height: 1.5;
}

/* =========================================
   VOICE MIC (keep functional, restyle)
   ========================================= */
.situation-voice-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin: 0 0 0.75rem;
}

.voice-mic-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 8rem;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--cream-light);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  visibility: visible;
  opacity: 1;
}

.voice-mic-btn:hover { border-color: var(--gold); color: var(--gold-dark); background: rgba(184,148,10,0.06); }
.voice-mic-btn.listening { background: rgba(192,57,43,0.08); border-color: #C0392B; color: #C0392B; animation: voice-pulse 1.2s ease-in-out infinite; }

@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.3); }
  50%       { box-shadow: 0 0 0 8px rgba(192, 57, 43, 0); }
}

.voice-mic-icon { font-size: 1.25rem; line-height: 1; }
.situation-voice-hint { font-size: 0.8rem; color: var(--text-muted); }

/* Voice modal */
.voice-modal-content { max-width: 540px; width: 92%; }
.voice-modal-content h3 { font-family: var(--font-heading); color: var(--navy); margin-bottom: 0.5rem; }
.voice-modal-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; line-height: 1.5; }
.voice-status { font-size: 0.88rem; color: var(--sage); margin-bottom: 0.75rem; min-height: 1.25em; }
.voice-status.error { color: #C0392B; }
.voice-transcript-edit {
  width: 100%;
  padding: 1rem;
  border-radius: 10px;
  background: var(--cream-light);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
  margin-bottom: 1rem;
  transition: var(--transition);
}
.voice-transcript-edit:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,148,10,0.1); }
.voice-modal-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center; }
.voice-modal-actions .primary-btn { margin-left: auto; }

/* =========================================
   SPEAK BUTTONS (kept hidden — removed)
   ========================================= */
.insight-speak-btn { display: none !important; }
.checklist-item-header { display: block; }
.insight-item-speak-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; }
.insight-item-speak-row .insight-label { flex: 1; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1100px) {
  .app-layout {
    grid-template-columns: 220px minmax(0, 1fr) 260px;
    --sidebar-right-w: 260px;
  }
}

@media (max-width: 900px) {
  .app-layout {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .layout-sidebar-left,
  .layout-sidebar-right {
    position: static;
    max-height: none;
    grid-column: 1;
    grid-row: auto;
  }

  .layout-center {
    grid-column: 1;
    grid-row: auto;
  }

  .results-panel-grid {
    width: 100%;
  }

  .result-col-center,
  .result-col-right {
    position: static;
    max-height: none;
  }

  .result-center-grid {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    justify-content: center;
    max-width: 320px;
    margin: 0 auto;
  }

  .hero-illustration-img {
    max-width: 100%;
  }
  .insight-grid { grid-template-columns: 1fr; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 700px) {
  .site-nav {
    grid-template-columns: 1fr auto;
    height: auto;
    min-height: 66px;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .site-nav .nav-links { display: none; }
  .site-nav .nav-logo { grid-column: 1; }
  .site-nav .nav-cta { grid-column: 2; justify-self: end; }

  .sidebar-nav.tab-container { flex-direction: row; flex-wrap: wrap; }
  .sidebar-nav .tab-btn { width: auto; flex: 1 1 auto; min-width: 140px; }

  .quick-actions { gap: 0.25rem; }
  .quick-action-label { font-size: 0.65rem; }

  h1 { font-size: 2rem; }
  .glass { padding: 1.5rem; }
}

@media (max-width: 480px) {
  .situation-voice-row { flex-direction: column; align-items: flex-start; }
  .voice-mic-btn { width: 100%; justify-content: center; }
  .voice-modal-actions .primary-btn { margin-left: 0; width: 100%; }
  .chat-sidebar { border-radius: 12px; }
}

/* =========================================
   MISC OVERRIDES
   ========================================= */
.empty-hint { opacity: 0.55; font-style: italic; color: var(--text-muted); }
.loader-container .spinner { border-color: var(--cream-dark); border-top-color: var(--gold); }
.modal-loader .spinner { border-color: var(--cream-dark); border-top-color: var(--gold); }

/* Reasoning section */
#reasoningSection h3 { color: var(--navy); }

/* Input group headings */
.input-group h3 { font-family: var(--font-heading); color: var(--navy); font-size: 1.25rem; font-weight: 700; margin-bottom: 1.25rem; }

/* Upload section */
.drop-content h4 { color: var(--navy) !important; }

/* Urgency badge (compatibility) */
.urgency-badge {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.4rem 1.2rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: rgba(192, 57, 43, 0.08);
  color: #C0392B;
  border: 1px solid rgba(192, 57, 43, 0.2);
}

/* =============================================
   JURIST INPUT LAYOUT — now single column
   ============================================= */
.jurist-split-layout {
  display: block;
}

.jurist-input-col {
  min-width: 0;
}

.jurist-lawyer-col {
  display: none;
}

/* Consult Lawyer Card (right sidebar version) */
.consult-lawyer-card {
  padding: 1.5rem;
  border-radius: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  position: static;
}

.consult-header {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.consult-header h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.consult-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Live Lawyer List */
.live-lawyer-list {
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.live-lawyer-list::-webkit-scrollbar {
  width: 4px;
}

.live-lawyer-list::-webkit-scrollbar-track {
  background: var(--cream-light);
  border-radius: 10px;
}

.live-lawyer-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

.lawyer-list-loader {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.lawyer-list-loader .spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 0.5rem;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Individual Lawyer Item in List */
.lawyer-list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  transition: all 0.2s;
  cursor: pointer;
  margin-bottom: 0.15rem;
}

.lawyer-list-item:hover {
  background: rgba(184, 148, 10, 0.06);
}

.lawyer-list-item.selected {
  background: rgba(184, 148, 10, 0.1);
  border: 1px solid rgba(184, 148, 10, 0.2);
}

.lawyer-item-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--navy);
  flex-shrink: 0;
}

.lawyer-item-info {
  flex: 1;
  min-width: 0;
}

.lawyer-item-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lawyer-item-location {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Status Indicators */
.lawyer-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}

.lawyer-status-dot.online {
  background: var(--green);
  box-shadow: 0 0 6px rgba(39, 174, 96, 0.4);
}

.lawyer-status-dot.away {
  background: var(--orange);
  box-shadow: 0 0 6px rgba(230, 126, 34, 0.3);
}

.lawyer-status-dot.offline {
  background: #bbb;
}

.lawyer-status-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.lawyer-available-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 50px;
}

.lawyer-available-badge.yes {
  background: rgba(39, 174, 96, 0.1);
  color: var(--green);
}

.lawyer-available-badge.no {
  background: rgba(192, 57, 43, 0.08);
  color: var(--red);
}

/* Send Query Area */
.query-send-area {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.send-query-btn {
  width: 100%;
  padding: 0.8rem !important;
  font-size: 0.9rem !important;
}

.send-query-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  text-align: center;
  min-height: 1.2em;
}

.send-query-status.success {
  color: var(--green);
}

.send-query-status.error {
  color: var(--red);
}

.send-query-status.loading {
  color: var(--gold-dark);
}

/* Lawyer Chat (Consult sidebar) */
.lawyer-chat-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.lawyer-chat-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 0.75rem;
}

.lawyer-chat-messages {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.75rem;
  background: var(--cream-light);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 0.75rem;
}

.lawyer-chat-messages .message {
  max-width: 92%;
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
}

.lawyer-chat-messages .message.lawyer {
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  color: var(--text);
}

.lawyer-chat-input-area {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.lawyer-chat-input-area textarea {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem;
  font-size: 0.85rem;
  resize: none;
  font-family: inherit;
}

.lawyer-chat-input-area .primary-btn {
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

.lawyer-chat-messages.hidden,
.lawyer-chat-input-area.hidden {
  display: none;
}

/* Lawyer selector dropdown */
.lawyer-selector-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  text-align: center;
  font-style: italic;
}

/* =============================================
   MULTI-SCENARIO DISPLAY
   ============================================= */
.scenarios-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 0.75rem;
}

.scenarios-info {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.5;
}

.scenario-card {
  background: var(--cream-light);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  transition: var(--transition);
}

.scenario-card:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 16px rgba(184, 148, 10, 0.1);
}

.scenario-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.scenario-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.scenario-title-area {
  flex: 1;
}

.scenario-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.15rem;
}

.scenario-case-type {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--sage);
  background: rgba(78, 107, 82, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
}

.scenario-description {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.scenario-section {
  margin-bottom: 0.85rem;
}

.scenario-section h5 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-dark);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.scenario-law-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.scenario-filing-location {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}

.scenario-filing-guidance {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.5;
}

.scenario-procedure-list,
.scenario-actions-list,
.scenario-docs-list {
  padding-left: 1.25rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text);
}

.scenario-procedure-list li,
.scenario-actions-list li,
.scenario-docs-list li {
  margin-bottom: 0.35rem;
}

.scenario-detail {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.scenario-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
}

.scenario-urgency {
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 4px;
}

.scenario-urgency.urgency-high { background: rgba(192, 57, 43, 0.08); color: var(--red); }
.scenario-urgency.urgency-moderate { background: rgba(230, 126, 34, 0.1); color: var(--orange); }
.scenario-urgency.urgency-low { background: rgba(39, 174, 96, 0.1); color: var(--green); }

.scenario-time,
.scenario-fees,
.scenario-recommendation {
  color: var(--text-muted);
}

.scenario-suggested {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(184, 148, 10, 0.06);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* =============================================
   STRUCTURED LAW DEFINITIONS SECTION
   ============================================= */
.law-definitions-section {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--cream-light);
  border-radius: 16px;
  border: 1px solid var(--border);
}

.law-definitions-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.law-def-header-left h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.law-def-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.law-def-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: var(--gold);
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 20px;
  white-space: nowrap;
}

.law-definitions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
}

.law-def-card {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.law-def-card:hover {
  border-color: var(--gold-light);
  box-shadow: 0 4px 16px rgba(184, 148, 10, 0.12);
  transform: translateY(-2px);
}

.law-def-card-header {
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: white;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.law-def-code-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.law-def-section-code {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--gold-light);
}

.law-def-arrow {
  font-size: 1rem;
  color: var(--gold);
  opacity: 0.7;
}

.law-def-new-code {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: #8fbc8f;
  letter-spacing: 0.3px;
}

.law-def-act-name {
  font-size: 0.75rem;
  opacity: 0.75;
  font-weight: 400;
}

.law-def-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: white;
}

.law-def-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
}

.law-def-description {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 0.25rem;
}

.law-def-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(221, 211, 187, 0.4);
}

.law-def-detail-row:last-of-type {
  border-bottom: none;
}

.law-def-detail-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  min-width: 80px;
  flex-shrink: 0;
}

.law-def-detail-value {
  font-size: 0.82rem;
  color: var(--navy);
  text-align: right;
  font-weight: 500;
}

.law-def-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.law-def-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 4px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.law-def-tag-green {
  background: rgba(39, 174, 96, 0.1);
  color: var(--green);
}

.law-def-tag-red {
  background: rgba(192, 57, 43, 0.1);
  color: var(--red);
}

.law-def-tag-orange {
  background: rgba(230, 126, 34, 0.1);
  color: var(--orange);
}

.law-def-tag-blue {
  background: rgba(52, 152, 219, 0.1);
  color: #2980b9;
}

.law-def-tag-gray {
  background: rgba(107, 100, 85, 0.1);
  color: var(--text-muted);
}

/* =============================================
   RESPONSIVE — Collapse to single column on mobile
   ============================================= */
@media (max-width: 900px) {
  .jurist-split-layout {
    display: block;
  }
  
  .consult-lawyer-card {
    position: static;
  }
  
   .live-lawyer-list {
     max-height: 250px;
   }
}

/* ============================================================
   LAW SUMMARY MODAL STYLES
   ============================================================ */

.law-summary-modal {
  padding: 0.5rem;
}

.law-summary-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--gold);
}

.law-summary-badge {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.law-summary-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.law-summary-law-name {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

.law-summary-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.law-summary-section {
  background: var(--cream-light);
  border-radius: 10px;
  padding: 1.25rem;
  border-left: 4px solid var(--gold);
}

.law-summary-section strong {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gold-dark);
  margin-bottom: 0.5rem;
}

.law-summary-section p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
  margin: 0;
}

.law-summary-explanation {
  font-size: 1rem !important;
  line-height: 1.8 !important;
  white-space: pre-wrap;
}

.law-summary-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.law-summary-source {
  font-weight: 600;
}

.law-summary-date {
  opacity: 0.7;
}

/* ============================================================
   AUTH GATE STYLES
   ============================================================ */

.auth-gate {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cream-light) 0%, var(--cream) 50%, var(--cream-dark) 100%);
}

.auth-gate-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 3rem 3.5rem;
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 60px rgba(60, 40, 0, 0.12);
  animation: authFadeIn 0.6s ease-out;
}

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

.auth-gate-logo {
  margin-bottom: 1rem;
}

.auth-gate-logo img {
  border-radius: 12px;
}

.auth-gate-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.auth-gate-subtitle {
  font-size: 1rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.auth-gate-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.auth-gate-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-gate-btn {
  display: block;
  width: 100%;
  padding: 0.9rem 1.5rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.auth-gate-btn.primary {
  background: var(--navy);
  color: #fff;
}

.auth-gate-btn.primary:hover {
  background: var(--gold);
  transform: translateY(-1px);
}

.auth-gate-btn.secondary {
  background: var(--cream-light);
  color: var(--navy);
  border: 1.5px solid var(--border);
}

.auth-gate-btn.secondary:hover {
  background: var(--cream-dark);
  border-color: var(--gold);
  transform: translateY(-1px);
}

.auth-gate-footer-text {
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* App content hidden by default, shown when logged in */
.app-content-hidden {
  display: none;
}

.app-content-visible {
  display: block;
}

/* Hide auth gate when logged in */
.auth-gate-hidden {
  display: none !important;
}
