@import url(https://fonts.googleapis.com/css2?family=Source+Serif+4:wght@400;600;700&family=Inter:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap);
/*
! tailwindcss v3.4.4 | MIT License | https://tailwindcss.com
*/

/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box; /* 1 */
  border-width: 0; /* 2 */
  border-style: solid; /* 2 */
  border-color: #e5e7eb; /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  -moz-tab-size: 4; /* 3 */
  -o-tab-size: 4;
     tab-size: 4; /* 3 */
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */
  font-feature-settings: normal; /* 5 */
  font-variation-settings: normal; /* 6 */
  -webkit-tap-highlight-color: transparent; /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0; /* 1 */
  line-height: inherit; /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0; /* 1 */
  color: inherit; /* 2 */
  border-top-width: 1px; /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

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

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
  font-feature-settings: normal; /* 2 */
  font-variation-settings: normal; /* 3 */
  font-size: 1em; /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0; /* 1 */
  border-color: inherit; /* 2 */
  border-collapse: collapse; /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-feature-settings: inherit; /* 1 */
  font-variation-settings: inherit; /* 1 */
  font-size: 100%; /* 1 */
  font-weight: inherit; /* 1 */
  line-height: inherit; /* 1 */
  letter-spacing: inherit; /* 1 */
  color: inherit; /* 1 */
  margin: 0; /* 2 */
  padding: 0; /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button; /* 1 */
  background-color: transparent; /* 2 */
  background-image: none; /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/

dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/

:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block; /* 1 */
  vertical-align: middle; /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */

[hidden] {
  display: none;
}

*, ::before, ::after{
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop{
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}
.\!container{
  width: 100% !important;
}
.container{
  width: 100%;
}
@media (min-width: 640px){

  .\!container{
    max-width: 640px !important;
  }

  .container{
    max-width: 640px;
  }
}
@media (min-width: 768px){

  .\!container{
    max-width: 768px !important;
  }

  .container{
    max-width: 768px;
  }
}
@media (min-width: 1024px){

  .\!container{
    max-width: 1024px !important;
  }

  .container{
    max-width: 1024px;
  }
}
@media (min-width: 1280px){

  .\!container{
    max-width: 1280px !important;
  }

  .container{
    max-width: 1280px;
  }
}
@media (min-width: 1536px){

  .\!container{
    max-width: 1536px !important;
  }

  .container{
    max-width: 1536px;
  }
}
.\!visible{
  visibility: visible !important;
}
.visible{
  visibility: visible;
}
.collapse{
  visibility: collapse;
}
.fixed{
  position: fixed;
}
.absolute{
  position: absolute;
}
.relative{
  position: relative;
}
.sticky{
  position: sticky;
}
.block{
  display: block;
}
.inline-block{
  display: inline-block;
}
.flex{
  display: flex;
}
.inline-flex{
  display: inline-flex;
}
.\!table{
  display: table !important;
}
.table{
  display: table;
}
.grid{
  display: grid;
}
.hidden{
  display: none;
}
.transform{
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.resize{
  resize: both;
}
.border{
  border-width: 1px;
}
.uppercase{
  text-transform: uppercase;
}
.capitalize{
  text-transform: capitalize;
}
.italic{
  font-style: italic;
}
.tabular-nums{
  --tw-numeric-spacing: tabular-nums;
  font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}
.underline{
  text-decoration-line: underline;
}
.outline{
  outline-style: solid;
}
.blur{
  --tw-blur: blur(8px);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.filter{
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.transition{
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* ─── Design tokens ───────────────────────────────────────────────────────── */

:root {
  /* Logo stripe palette — matches reference image exactly */
  --stripe-red:    #E74C3C;
  --stripe-orange: #F39C12;
  --stripe-yellow: #F1C40F;
  --stripe-green:  #2ECC71;
  --stripe-blue:   #3498DB;
  --stripe-navy:   #2C3E50;

  /* Accent alias (used throughout UI) */
  --accent-blue:        #3498DB;
  --accent-blue-bright: #5DADE2;
  --accent-green:       #2ECC71;
  --accent-amber:       #F39C12;
  --accent-red:         #E74C3C;
  --accent-teal:        #1ABC9C;

  /* Light mode backgrounds — #F5F5F5 page bg */
  --bg-primary:    #F5F5F5;
  --bg-secondary:  #EFEFEF;
  --bg-card:       #FFFFFF;
  --bg-card-hover: #F0F6FF;
  --bg-elevated:   #EBEBEB;

  --border:        #DEDEDE;
  --border-subtle: #E8E8E8;
  --border-accent: #3498DB;

  /* Light mode text */
  --text-primary:  #2B2B2B;
  --text-secondary:#555555;
  --text-muted:    #8A8A8A;
  --text-accent:   #3498DB;

  /* Topbar — white surface in light mode */
  --topbar-bg:     #FFFFFF;
  --topbar-text:   #2B2B2B;
  --topbar-muted:  rgba(43,43,43,0.45);
  --topbar-active: #3498DB;
  --topbar-border: rgba(0,0,0,0.07);

  --sidebar-bg:    #F8F8F8;
  --sidebar-border:#E4E4E4;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.09);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Legacy aliases */
  --lk-navy:       #2C3E50;
  --lk-navy-mid:   #34495E;
  --lk-navy-light: #EBF5FB;
  --lk-gold:       #F39C12;
  --lk-gold-light: #FEF9E7;
  --lk-gold-bright:#F1C40F;
}

/* ─── Dark mode ───────────────────────────────────────────────────────────── */
[data-theme="dark"] {
  /* Stripe colors stay vivid — slightly brighter for dark bg */
  --stripe-red:    #FF5F52;
  --stripe-orange: #FFAD33;
  --stripe-yellow: #FFD93D;
  --stripe-green:  #4EE88A;
  --stripe-blue:   #5DADE2;
  --stripe-navy:   #85929E;

  --accent-blue:        #5DADE2;
  --accent-blue-bright: #7EC8E3;
  --accent-green:       #4EE88A;
  --accent-amber:       #FFAD33;
  --accent-red:         #FF5F52;
  --accent-teal:        #48C9B0;

  /* Dark backgrounds — layered depth, NOT pure black */
  --bg-primary:    #1A1D23;
  --bg-secondary:  #20242C;
  --bg-card:       #252A33;
  --bg-card-hover: #2C3140;
  --bg-elevated:   #2A2F3A;

  --border:        #373D4A;
  --border-subtle: #2F3441;
  --border-accent: #5DADE2;

  /* High-contrast text on dark */
  --text-primary:  #ECF0F1;
  --text-secondary:#B2BEC3;
  --text-muted:    #6C7A89;
  --text-accent:   #7EC8E3;

  /* Topbar — darkest surface */
  --topbar-bg:     #14171E;
  --topbar-text:   #ECF0F1;
  --topbar-muted:  rgba(236,240,241,0.45);
  --topbar-active: #5DADE2;
  --topbar-border: rgba(255,255,255,0.08);

  --sidebar-bg:    #1A1D23;
  --sidebar-border:#2F3441;

  --shadow-sm: 0 1px 6px rgba(0,0,0,0.45);
  --shadow-md: 0 4px 18px rgba(0,0,0,0.55);
  --shadow-lg: 0 8px 36px rgba(0,0,0,0.65);

  --lk-navy-light: #1A2840;
  --lk-gold-light: #2A1E00;
}

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

html, body, #root {
  height: 100%;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-blue); }

h1, h2, h3 { font-family: 'Source Serif 4', Georgia, serif; font-weight: 600; }

/* ─── Top bar ─────────────────────────────────────────────────────────────── */
.topbar {
  height: 56px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  display: flex; align-items: center;
  padding: 0 16px; gap: 0;
  flex-shrink: 0; position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-sm);
}

/* ─── Logo mark: 6 stacked bars ───────────────────────────────────────────── */
.topbar-stripe-logo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 44px;
  flex-shrink: 0;
}
.topbar-stripe-logo span {
  display: block;
  height: 5px;
  border-radius: 3px;
  transition: transform 0.18s ease;
}
.topbar-stripe-logo span:nth-child(1) { background: #E74C3C; width: 100%; }
.topbar-stripe-logo span:nth-child(2) { background: #F39C12; width: 100%; }
.topbar-stripe-logo span:nth-child(3) { background: #F1C40F; width: 100%; }
.topbar-stripe-logo span:nth-child(4) { background: #2ECC71; width: 100%; }
.topbar-stripe-logo span:nth-child(5) { background: #3498DB; width: 100%; }
.topbar-logo-btn:hover .topbar-stripe-logo span { transform: scaleX(1.05); }

/* ─── Logo wordmark ───────────────────────────────────────────────────────── */
.topbar-logo-text {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: #2B2B2B;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
}
[data-theme="dark"] .topbar-logo-text { color: #ECF0F1; }

/* "PILOT" — same color, lighter weight */
.topbar-logo-accent {
  font-weight: 400;
  color: #2B2B2B;
  letter-spacing: 0.04em;
}
[data-theme="dark"] .topbar-logo-accent { color: #ECF0F1; }

.topbar-logo-subtitle {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 500;
  color: #8A8A8A;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 4px;
  line-height: 1;
}
[data-theme="dark"] .topbar-logo-subtitle { color: #6C7A89; }

/* ─── Logo button (sidebar toggle) ───────────────────────────────────────── */
.topbar-logo-btn {
  display: flex; align-items: center; gap: 13px;
  margin-right: 18px; flex-shrink: 0;
  background: none; border: none; cursor: pointer;
  padding: 4px 0;
  transition: opacity 0.15s;
  text-align: left;
}
.topbar-logo-btn:hover { opacity: 0.8; }

.topbar-divider { width: 1px; height: 22px; background: var(--topbar-border); margin: 0 14px; flex-shrink: 0; }

/* ─── Nav buttons with stripe-colored underlines ─────────────────────────── */
/* Each nav item cycles through the stripe palette on hover/active */
.nav-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: none; border: none; cursor: pointer;
  color: var(--topbar-muted);
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.nav-btn:hover { color: var(--topbar-text); }
.nav-btn.active { color: var(--topbar-text); font-weight: 600; }

/* Stripe colors per nav position — 8 items cycling through 6 colors */
.nav-btn:nth-child(1):hover, .nav-btn:nth-child(1).active { border-bottom-color: #E74C3C; color: var(--topbar-text); }
.nav-btn:nth-child(2):hover, .nav-btn:nth-child(2).active { border-bottom-color: #F39C12; color: var(--topbar-text); }
.nav-btn:nth-child(3):hover, .nav-btn:nth-child(3).active { border-bottom-color: #F1C40F; color: var(--topbar-text); }
.nav-btn:nth-child(4):hover, .nav-btn:nth-child(4).active { border-bottom-color: #2ECC71; color: var(--topbar-text); }
.nav-btn:nth-child(5):hover, .nav-btn:nth-child(5).active { border-bottom-color: #3498DB; color: var(--topbar-text); }
.nav-btn:nth-child(6):hover, .nav-btn:nth-child(6).active { border-bottom-color: #E74C3C; color: var(--topbar-text); }
.nav-btn:nth-child(7):hover, .nav-btn:nth-child(7).active { border-bottom-color: #F39C12; color: var(--topbar-text); }
.nav-btn:nth-child(8):hover, .nav-btn:nth-child(8).active { border-bottom-color: #2ECC71; color: var(--topbar-text); }

/* ─── Panels ──────────────────────────────────────────────────────────────── */
.panel-left, .panel-right {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex; flex-direction: column;
  flex-shrink: 0; overflow: hidden;
  transition: width 0.2s ease;
}
.panel-right { border-right: none; border-left: 1px solid var(--sidebar-border); }
.panel-header {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.panel-header-label { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; color: var(--text-muted); text-transform: uppercase; }

/* ─── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.card:hover { border-color: var(--accent-blue); box-shadow: var(--shadow-md); }

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--accent-blue); color: #FFFFFF;
  border: none; border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background 0.15s, transform 0.1s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary:hover { background: var(--accent-blue-bright); }
.btn-primary:active { transform: scale(0.98); }
[data-theme="dark"] .btn-primary { background: #3498DB; color: #fff; }
[data-theme="dark"] .btn-primary:hover { background: #5DADE2; }

.btn-secondary {
  background: var(--bg-card); color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 7px 16px;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-secondary:hover { border-color: var(--accent-blue); color: var(--text-primary); background: var(--bg-card-hover); }
[data-theme="dark"] .btn-secondary { color: var(--text-secondary); border-color: var(--border); background: var(--bg-card); }
[data-theme="dark"] .btn-secondary:hover { color: var(--text-primary); border-color: var(--accent-blue); background: var(--bg-card-hover); }

.btn-ghost {
  background: var(--bg-card); color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 7px 16px;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-ghost:hover { border-color: var(--accent-blue); color: var(--text-primary); }

.btn-icon {
  background: transparent; border: none;
  color: var(--text-muted); cursor: pointer;
  padding: 5px; border-radius: var(--radius-sm);
  transition: all 0.12s;
  display: flex; align-items: center; justify-content: center;
}
.btn-icon:hover { background: var(--bg-elevated); color: var(--text-primary); }
[data-theme="dark"] .btn-icon:hover { background: var(--bg-elevated); color: var(--text-primary); }

/* ─── Inputs ──────────────────────────────────────────────────────────────── */
input, textarea, select {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-family: 'Inter', sans-serif; font-size: 13px;
  padding: 8px 11px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s; width: 100%;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(52,152,219,0.12);
}
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text-primary);
}
[data-theme="dark"] input::-moz-placeholder, [data-theme="dark"] textarea::-moz-placeholder { color: var(--text-muted); }
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder { color: var(--text-muted); }
[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(93,173,226,0.15);
}

/* ─── TGD Slots ───────────────────────────────────────────────────────────── */
.tgd-slot {
  border-radius: var(--radius-md); border: 1px solid var(--border);
  padding: 9px 10px; cursor: pointer; transition: all 0.15s;
  position: relative; overflow: hidden; background: var(--bg-card);
}
.tgd-slot::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.tgd-slot:hover { border-color: var(--accent-blue); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.tgd-slot.missing { opacity: 0.6; }
[data-theme="dark"] .tgd-slot { background: var(--bg-card); border-color: var(--border); }
[data-theme="dark"] .tgd-slot:hover { border-color: var(--accent-blue); box-shadow: 0 4px 16px rgba(0,0,0,0.5); }

/* ─── Result cards ────────────────────────────────────────────────────────── */
.result-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 10px;
  box-shadow: var(--shadow-sm); transition: border-color 0.15s, box-shadow 0.15s;
  animation: fadeIn 0.2s ease forwards;
}
.result-card:hover { border-color: var(--accent-blue); box-shadow: var(--shadow-md); }
[data-theme="dark"] .result-card { background: var(--bg-card); border-color: var(--border); color: var(--text-primary); }

/* ─── Tool panels ─────────────────────────────────────────────────────────── */
.tool-panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px; margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.tool-result {
  background: var(--bg-elevated); border-radius: var(--radius-sm);
  padding: 13px; margin-top: 12px;
}
.result-ok   { border-left: 3px solid var(--accent-green); }
.result-fail { border-left: 3px solid var(--accent-red); }
.result-info { border-left: 3px solid var(--accent-blue); }
.result-warn { border-left: 3px solid var(--accent-amber); }
[data-theme="dark"] .tool-result { background: var(--bg-elevated); color: var(--text-primary); }
[data-theme="dark"] .tool-panel  { background: var(--bg-card); border-color: var(--border); color: var(--text-primary); }

/* ─── Status ──────────────────────────────────────────────────────────────── */
.status-indexed    { color: var(--accent-green); }
.status-processing { color: var(--accent-amber); }
.status-missing    { color: var(--text-muted); }
.status-outdated   { color: var(--accent-red); }

/* ─── Banners ─────────────────────────────────────────────────────────────── */
.banner-info, .info-banner {
  background: rgba(52,152,219,0.08); border: 1px solid rgba(52,152,219,0.25);
  border-radius: var(--radius-sm); padding: 8px 12px; font-size: 12px; color: #2980B9;
}
.banner-warn, .warning-banner {
  background: rgba(243,156,18,0.08); border: 1px solid rgba(243,156,18,0.25);
  border-radius: var(--radius-sm); padding: 8px 12px; font-size: 12px; color: #D68910;
}
[data-theme="dark"] .banner-info,
[data-theme="dark"] .info-banner  { background: rgba(93,173,226,0.12); border-color: rgba(93,173,226,0.3); color: #7EC8E3; }
[data-theme="dark"] .banner-warn,
[data-theme="dark"] .warning-banner { background: rgba(255,173,51,0.12); border-color: rgba(255,173,51,0.3); color: #FFAD33; }

/* ─── Upload zone ─────────────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius-md);
  padding: 20px; text-align: center; transition: all 0.2s;
  cursor: pointer; background: var(--bg-elevated);
}
.upload-zone:hover, .upload-zone.active { border-color: var(--accent-blue); background: rgba(52,152,219,0.05); }
[data-theme="dark"] .upload-zone { background: var(--bg-elevated); border-color: var(--border); }
[data-theme="dark"] .upload-zone:hover,
[data-theme="dark"] .upload-zone.active { border-color: var(--accent-blue); background: rgba(93,173,226,0.08); }

/* ─── Helpers ─────────────────────────────────────────────────────────────── */
.section-label { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; display: block; }
[data-theme="dark"] .section-label { color: var(--text-muted); }
.divider { border: none; border-top: 1px solid var(--border-subtle); margin: 12px 0; }
[data-theme="dark"] .divider { border-color: var(--border-subtle); }
.gold-stripe { border-left: 3px solid var(--accent-amber); padding-left: 10px; }
[data-theme="dark"] .gold-stripe { border-left-color: var(--accent-amber); }
.scroll-y { overflow-y: auto; scrollbar-width: thin; }

/* ─── Stat boxes ──────────────────────────────────────────────────────────── */
.stat-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; text-align: center; }
.stat-box-value { font-size: 22px; font-weight: 700; color: var(--text-primary); font-family: 'Source Serif 4', Georgia, serif; }
.stat-box-label { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
[data-theme="dark"] .stat-box { background: var(--bg-card); border-color: var(--border); }
[data-theme="dark"] .stat-box-value { color: #7EC8E3; }
[data-theme="dark"] .stat-box-label { color: var(--text-muted); }

/* ─── Chips ───────────────────────────────────────────────────────────────── */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.chip-ok   { background: rgba(46,204,113,0.12); color: #27AE60; border: 1px solid rgba(46,204,113,0.3); }
.chip-fail { background: rgba(231,76,60,0.12);  color: #C0392B; border: 1px solid rgba(231,76,60,0.3); }
.chip-warn { background: rgba(243,156,18,0.12); color: #D68910; border: 1px solid rgba(243,156,18,0.3); }
.chip-info { background: rgba(52,152,219,0.12); color: #2980B9; border: 1px solid rgba(52,152,219,0.3); }

[data-theme="dark"] .chip-ok   { background: rgba(78,232,138,0.12); color: #4EE88A; border-color: rgba(78,232,138,0.3); }
[data-theme="dark"] .chip-fail { background: rgba(255,95,82,0.12);  color: #FF5F52; border-color: rgba(255,95,82,0.3); }
[data-theme="dark"] .chip-warn { background: rgba(255,173,51,0.12); color: #FFAD33; border-color: rgba(255,173,51,0.3); }
[data-theme="dark"] .chip-info { background: rgba(93,173,226,0.12); color: #7EC8E3; border-color: rgba(93,173,226,0.3); }

/* ─── Theme toggle ────────────────────────────────────────────────────────── */
.theme-toggle {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 5px 12px; cursor: pointer;
  color: var(--text-secondary); font-size: 12px; font-weight: 500;
  display: flex; align-items: center; gap: 6px; transition: all 0.15s;
}
.theme-toggle:hover { color: var(--text-primary); border-color: var(--accent-blue); }
[data-theme="dark"] .theme-toggle { background: var(--bg-elevated); border-color: var(--border); color: var(--text-secondary); }
[data-theme="dark"] .theme-toggle:hover { border-color: var(--accent-blue); color: var(--text-primary); }

/* ─── Animations ──────────────────────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideRight { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.animate-fade { animation: fadeIn 0.25s ease forwards; }

.scrollbar-hidden {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.scrollbar-hidden::-webkit-scrollbar {
  display: none;
}

/* ─── Tab bar ─────────────────────────────────────────────────────────────── */
.tab-bar { display: flex; gap: 2px; background: var(--bg-elevated); border-radius: var(--radius-md); padding: 3px; }
.tab-item {
  flex: 1; padding: 6px 12px; border-radius: var(--radius-sm); text-align: center;
  font-size: 12px; font-weight: 500; cursor: pointer; color: var(--text-muted);
  transition: all 0.15s; border: none; background: transparent;
}
.tab-item.active { background: var(--bg-card); color: var(--accent-blue); box-shadow: var(--shadow-sm); }
.tab-item:hover:not(.active) { color: var(--text-primary); }
[data-theme="dark"] .tab-item.active { background: var(--bg-card); color: #7EC8E3; }
[data-theme="dark"] .tab-item:hover:not(.active) { color: var(--text-primary); }

/* ─── XP bar ──────────────────────────────────────────────────────────────── */

/* ─── Panel dark mode ─────────────────────────────────────────────────────── */
[data-theme="dark"] .panel-left,
[data-theme="dark"] .panel-right { background: var(--sidebar-bg); border-color: var(--sidebar-border); }
[data-theme="dark"] .panel-header { border-color: var(--border-subtle); }
[data-theme="dark"] .panel-header-label { color: var(--text-muted); }

/* ─── Bulk upload ─────────────────────────────────────────────────────────── */
.bulk-upload-btn { transition: all 0.15s; }
[data-theme="dark"] .bulk-upload-btn {
  background: rgba(93,173,226,0.08) !important;
  border-color: rgba(93,173,226,0.3) !important;
  color: #7EC8E3 !important;
}
[data-theme="dark"] .bulk-upload-btn:hover {
  background: rgba(93,173,226,0.14) !important;
  border-color: #5DADE2 !important;
  color: #A8D8EA !important;
}

/* ─── Tables & search results ─────────────────────────────────────────────── */
.result-table table { border-collapse: collapse; width: 100%; }
[data-theme="dark"] .result-table thead th { background: var(--bg-elevated) !important; color: var(--text-primary) !important; }
[data-theme="dark"] .result-table tbody tr:nth-child(even) { background: var(--bg-elevated) !important; }
[data-theme="dark"] .result-table tbody tr:nth-child(odd)  { background: var(--bg-card) !important; }
[data-theme="dark"] .pdf-figure-bg { background: #f0f0f0 !important; }
[data-theme="dark"] article { background: var(--bg-card); color: var(--text-primary); }
[data-theme="dark"] thead th { color: var(--text-primary); }
[data-theme="dark"] td, [data-theme="dark"] p { color: var(--text-primary); }
[data-theme="dark"] mark { background: rgba(241,196,15,0.25); color: var(--text-primary); }

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .panel-left { width: 200px !important; }
  .nav-btn .nav-label { display: none; }
  .nav-btn { padding: 6px 8px !important; gap: 0 !important; }
}

@media (max-width: 640px) {
  .panel-left { display: none !important; }
  .topbar {
    padding: 0 10px !important;
    gap: 4px !important;
  }
  .topbar-nav {
    gap: 0 !important;
    overflow-x: auto;
    flex: 1 1 auto !important;
    min-width: 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .topbar-nav::-webkit-scrollbar { display: none; }
  .topbar-actions {
    gap: 4px !important;
    flex-shrink: 0;
  }
  .nav-btn {
    padding: 6px 10px !important;
    font-size: 11px !important;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .topbar-divider { display: none; }
  .tool-panel { padding: 12px !important; }
  .stat-box { padding: 8px !important; }
  .stat-box-value { font-size: 18px !important; }
  .stat-grid { grid-template-columns: 1fr 1fr !important; }

  /* Toast — prevent overflow on small screens */
  .toast { max-width: calc(100vw - 32px) !important; }

  /* Modal — fluid width on mobile */
  .modal-box { max-width: calc(100vw - 24px) !important; margin: 8px; width: 100% !important; }
  .modal-backdrop { padding: 12px !important; align-items: flex-start !important; padding-top: 5vh !important; }

  /* Empty state — tighter padding on mobile */
  .empty-state { padding: 32px 16px !important; }

  /* Logo — slightly smaller on mobile */
  .topbar-logo-text { font-size: 17px !important; }
  .topbar-stripe-logo { width: 34px !important; gap: 3px !important; }
  .topbar-logo-btn { gap: 8px !important; margin-right: 8px !important; }

  /* Theme toggle — compact on mobile */
  .theme-toggle { padding: 4px 8px !important; font-size: 11px !important; gap: 4px !important; }

  /* Tables — allow horizontal scroll on mobile */
  .result-table { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
  .result-table table { font-size: 12px !important; }

  /* Cards — tighter on mobile */
  .card { border-radius: var(--radius-sm) !important; }
  .result-card { padding: 10px 12px !important; margin-bottom: 8px !important; }

  /* Tab bar — scrollable on mobile */
  .tab-bar { overflow-x: auto !important; scrollbar-width: none !important; flex-wrap: nowrap !important; }
  .tab-bar::-webkit-scrollbar { display: none; }
  .tab-item { flex-shrink: 0 !important; white-space: nowrap !important; padding: 6px 10px !important; font-size: 11px !important; }

  /* Upload zone compact */
  .upload-zone { padding: 14px !important; }

  /* Sections */
  .section-label { font-size: 9px !important; }
}

/* ─── Small phones (≤ 480px) ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .topbar { height: 48px !important; padding: 0 6px !important; }
  .topbar-logo-subtitle { display: none; }
  .topbar-stripe-logo { width: 28px !important; }
  .topbar-stripe-logo span { height: 4px !important; }

  .nav-btn { padding: 5px 7px !important; font-size: 10px !important; }

  .tool-panel { padding: 8px !important; }
  .stat-grid { grid-template-columns: 1fr !important; }
  .stat-box-value { font-size: 16px !important; }
  .result-card { padding: 8px 10px !important; }
  .upload-zone { padding: 10px !important; }

  .btn-primary, .btn-secondary, .btn-ghost, .btn-danger {
    padding: 7px 14px !important;
    font-size: 12px !important;
  }

  /* Modal — almost full-width on small phones */
  .modal-box { max-width: calc(100vw - 16px) !important; margin: 4px !important; border-radius: var(--radius-md) !important; }
  .modal-backdrop { padding: 8px !important; padding-top: 2vh !important; }

  /* Inputs — larger touch targets */
  input, textarea, select { padding: 10px 11px !important; font-size: 14px !important; }
}

/* ─── Tiny phones (≤ 375px) ──────────────────────────────────────────────── */
@media (max-width: 375px) {
  .topbar { padding: 0 4px !important; }
  .topbar-logo-text { font-size: 15px !important; }
  .topbar-stripe-logo { width: 24px !important; }
  .topbar-logo-btn { gap: 4px !important; margin-right: 4px !important; }

  .nav-btn { padding: 4px 5px !important; }
  .toast { font-size: 12px !important; }
}

@media print {
  .topbar, .panel-left, .btn-primary, .btn-secondary { display: none !important; }
  .scroll-y { overflow: visible !important; height: auto !important; }
  .tool-result { -moz-column-break-inside: avoid; break-inside: avoid; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Phase 1 — Standardization
   ═══════════════════════════════════════════════════════════════════════════ */

/* Transition duration tokens */
:root {
  --t-fast: 0.1s ease;
  --t-base: 0.15s ease;
  --t-slow: 0.25s ease;
}

/* Danger button */
.btn-danger {
  background: var(--accent-red); color: #FFFFFF;
  border: none; border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background 0.15s, transform 0.1s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-danger:hover  { background: #C0392B; }
.btn-danger:active { transform: scale(0.98); }
[data-theme="dark"] .btn-danger       { background: var(--accent-red); color: #fff; }
[data-theme="dark"] .btn-danger:hover { background: #FF7B72; }

/* Badge */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; padding: 1px 6px;
  border-radius: 10px;
  font-size: 10px; font-weight: 700; line-height: 1.4;
  background: var(--accent-blue); color: #fff;
}
.badge-green { background: var(--accent-green); color: #fff; }
.badge-red   { background: var(--accent-red);   color: #fff; }
.badge-amber { background: var(--accent-amber); color: #fff; }
.badge-muted { background: var(--bg-elevated);  color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════════════════
   Phase 2 — Micro-interactions
   ═══════════════════════════════════════════════════════════════════════════ */

/* Focus ring — keyboard navigation only, no mouse flicker */
:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }
/* Inputs already use box-shadow ring — suppress double outline */
input:focus-visible,
textarea:focus-visible,
select:focus-visible { outline: none; }

/* Loading spinner */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0; vertical-align: middle;
}
.spinner-sm { width: 12px; height: 12px; border-width: 1.5px; }
.spinner-lg { width: 24px; height: 24px; border-width: 3px; }

/* Skeleton loader */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 25%,
    var(--bg-secondary) 50%,
    var(--bg-elevated) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
  color: transparent !important;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none; pointer-events: none;
}

/* Toast classes — dark mode aware */
.toast {
  border-radius: var(--radius-md);
  padding: 10px 16px;
  box-shadow: var(--shadow-lg);
  font-size: 13px; max-width: 340px; line-height: 1.5;
  cursor: pointer; pointer-events: auto;
  animation: slideInRight 0.2s ease forwards;
  border-left: 3px solid transparent;
  color: #fff;
}
.toast-info    { background: var(--lk-navy);  border-left-color: var(--lk-gold); }
.toast-success { background: var(--lk-navy);  border-left-color: var(--accent-green); }
.toast-error   { background: #8B1A1A;          border-left-color: #FF8080; }
.toast-warn    { background: #7A4000;          border-left-color: #FFE082; }
[data-theme="dark"] .toast-info    { background: #16213E; border-left-color: var(--lk-gold); }
[data-theme="dark"] .toast-success { background: #16213E; border-left-color: var(--accent-green); }
[data-theme="dark"] .toast-error   { background: #3D0C0C; border-left-color: var(--accent-red); }
[data-theme="dark"] .toast-warn    { background: #2D1A00; border-left-color: var(--accent-amber); }

/* ═══════════════════════════════════════════════════════════════════════════
   Phase 3 — Transitions
   ═══════════════════════════════════════════════════════════════════════════ */

/* View / page enter */
.view-enter { animation: fadeIn 0.2s ease forwards; }

/* Stagger list children */
.stagger > *                  { animation: fadeIn 0.2s ease both; }
.stagger > *:nth-child(1)     { animation-delay:   0ms; }
.stagger > *:nth-child(2)     { animation-delay:  30ms; }
.stagger > *:nth-child(3)     { animation-delay:  60ms; }
.stagger > *:nth-child(4)     { animation-delay:  90ms; }
.stagger > *:nth-child(5)     { animation-delay: 120ms; }
.stagger > *:nth-child(6)     { animation-delay: 150ms; }
.stagger > *:nth-child(n+7)   { animation-delay: 180ms; }

/* Slide up keyframe for modals / panels */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Modal backdrop + box */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(0, 0, 0, 0.45);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.15s ease forwards;
}
[data-theme="dark"] .modal-backdrop { background: rgba(0, 0, 0, 0.65); }

.modal-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease forwards;
  max-height: 90vh; overflow-y: auto;
}
[data-theme="dark"] .modal-box { background: var(--bg-card); border-color: var(--border); }

/* ═══════════════════════════════════════════════════════════════════════════
   Phase 4 — Accessibility & dark mode refinements
   ═══════════════════════════════════════════════════════════════════════════ */

/* Screen-reader only */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Empty state */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 24px; text-align: center; gap: 10px;
  animation: fadeIn 0.25s ease forwards;
}
.empty-state-icon  { opacity: 0.3; margin-bottom: 4px; color: var(--text-muted); }
.empty-state-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.empty-state-body  { font-size: 12px; color: var(--text-muted); max-width: 260px; line-height: 1.6; }

/* CSS tooltip via data-tooltip attribute */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%) scale(0.95);
  background: #1A1D23; color: #ECF0F1;
  font-size: 11px; font-weight: 500; white-space: nowrap;
  padding: 4px 8px; border-radius: var(--radius-sm);
  pointer-events: none; opacity: 0;
  transition: opacity 0.12s, transform 0.12s;
  z-index: 9999; box-shadow: var(--shadow-md);
}
[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
[data-theme="dark"] [data-tooltip]::after {
  background: #ECF0F1; color: #1A1D23;
}

