/* Google Font is loaded via <link> in index.html for better performance */

/* base styles */
* {
  font-family: "Quicksand";
  color: #333;
}

body {
  margin: 0;
  font-family: "Quicksand", -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

#root {
  display: flex;
  flex-direction: column;
}

/* Allow scrolling on payment pages */
.complete-page-container, 
.checkout-container {
  overflow-y: auto;
  height: 100vh;
}

/* =============================================================================
   ExamPedite theme tokens
   -----------------------------------------------------------------------------
   The app ships two palettes — the signature dark dashboard look (default) and a
   light ("white") counterpart. Components reference these semantic variables via
   `var(--ep-*)`; the active palette is selected by the `data-theme` attribute on
   <html>, toggled at runtime by the ThemeProvider (src/Theme/ThemeContext.tsx)
   and persisted to localStorage.

   Dark is the default (`:root`) so any element that has NOT yet been migrated to
   a token keeps its original dark appearance — migration is therefore safe and
   incremental. Switching to light only affects elements that already read a
   token, so dark mode stays byte-identical to the pre-theme design.
   ============================================================================= */

:root,
html[data-theme='dark'] {
  /* Surfaces (near-black -> raised greys) */
  --ep-bg: #191919;
  --ep-elevated: #212121;
  --ep-surface: #262626;
  --ep-surface-2: #2e2e2e;
  --ep-surface-3: #404040;
  --ep-slate: #2d3748;

  /* Borders */
  --ep-border: #383838;
  --ep-border-strong: #4a4a4a;

  /* Text */
  --ep-text: #e0e0e0;
  --ep-text-2: #a0a0a0;
  --ep-text-3: #888888;
  --ep-text-on-accent: #ffffff;

  /* Brand / accent */
  --ep-accent: #5bbadc;
  --ep-accent-2: #4a94b0;
  --ep-accent-soft: #7acbea;

  /* Neon "tech glow" accent used across the dashboard */
  --ep-glow: #00f7ff;
  /* Glow tints (borders / fills / rings / glows). Kept as the neon cyan in dark;
     flipped to a readable deep teal on white (below) so tabs, borders and text
     stay legible instead of washing out. */
  --ep-glow-a05: rgba(0, 247, 255, 0.05);
  --ep-glow-a10: rgba(0, 247, 255, 0.1);
  --ep-glow-a20: rgba(0, 247, 255, 0.2);
  --ep-glow-a30: rgba(0, 247, 255, 0.3);
  --ep-glow-a40: rgba(0, 247, 255, 0.4);
  --ep-glow-a50: rgba(0, 247, 255, 0.5);
  --ep-glow-a70: rgba(0, 247, 255, 0.7);

  /* Translucent helpers (kept theme-agnostic by default) */
  --ep-overlay: rgba(0, 0, 0, 0.6);
  --ep-accent-fade: rgba(91, 186, 220, 0.14);

  /* Layer overlays — how panels build "virtual layers" on top of a surface.
     In DARK these are white-over-dark lifts (a slightly lighter layer); they keep
     their original look. In LIGHT (below) they flip to a subtle dark-over-light
     tint so the same stacking still reads as distinct layers instead of vanishing
     into white. Four steps of increasing lift. */
  --ep-raise-1: rgba(255, 255, 255, 0.04);
  --ep-raise-2: rgba(255, 255, 255, 0.07);
  --ep-raise-3: rgba(255, 255, 255, 0.11);
  --ep-raise-4: rgba(255, 255, 255, 0.16);

  /* Near-opaque dark panels (dropdowns, popovers, modals rendered over content). */
  --ep-panel-strong: rgba(25, 25, 32, 0.95);
  --ep-panel-strong-2: rgba(40, 40, 40, 0.95);

  /* Elevation shadows. Dark relies on colour for depth, so shadows are subtle. */
  --ep-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --ep-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --ep-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
  --ep-ring: 0 0 0 3px rgba(91, 186, 220, 0.35);

  /* Semantic status colours (success / warning / danger). Brightened for dark so
     they read on near-black surfaces; the light block below deepens them for
     contrast on white. Each pairs with a faint *-fade tint for soft fills. */
  --ep-success: #46b97f;
  --ep-success-fade: rgba(70, 185, 127, 0.13);
  --ep-warn: #e0a23c;
  --ep-warn-fade: rgba(224, 162, 60, 0.13);
  --ep-danger: #e06a60;
  --ep-danger-fade: rgba(224, 106, 96, 0.13);
  --ep-muted: #6b7280;
}

html[data-theme='light'] {
  /* Surfaces — a layered light scale that mirrors the dark stack's depth.
     Dark goes #191919 -> #212121 -> #262626 -> #2e2e2e -> #404040 (back -> front).
     Light mirrors that hierarchy with a soft-grey backdrop, crisp-white primary
     panels, and progressively tinted greys for nested / raised elements so the
     "virtual layers" stay readable instead of collapsing into one flat white. */
  --ep-bg: #e4e7ec;          /* deepest backdrop (was #191919)  — clear cool grey   */
  --ep-elevated: #eef0f4;    /* secondary surfaces: tool panels, tab bars, sidebars */
  --ep-surface: #ffffff;     /* primary panels / cards (was #262626) — crisp white  */
  --ep-surface-2: #e9ecf1;   /* inputs / nested fields / resizer (was #2e2e2e)      */
  --ep-surface-3: #dadfe7;   /* raised / hover / active state    (was #404040)      */
  --ep-slate: #e8ecf3;       /* blue-grey accent panels (was #2d3748)               */

  /* Borders (light layers lean on borders + shadow for separation, not lightness) */
  --ep-border: #d4d9e1;
  --ep-border-strong: #bcc3ce;

  /* Text */
  --ep-text: #1f2329;
  --ep-text-2: #586069;
  --ep-text-3: #8a929c;
  --ep-text-on-accent: #ffffff;

  /* Brand / accent (slightly deepened for contrast on white) */
  --ep-accent: #2f9ec2;
  --ep-accent-2: #247c9a;
  --ep-accent-soft: #5bb6d6;

  /* Neon glow -> readable deep teal on white (used for tabs / borders / text) */
  --ep-glow: #0a6675;
  --ep-glow-a05: rgba(11, 122, 143, 0.06);
  --ep-glow-a10: rgba(11, 122, 143, 0.1);
  --ep-glow-a20: rgba(11, 122, 143, 0.16);
  --ep-glow-a30: rgba(11, 122, 143, 0.28);
  --ep-glow-a40: rgba(11, 122, 143, 0.4);
  --ep-glow-a50: rgba(11, 122, 143, 0.52);
  --ep-glow-a70: rgba(11, 122, 143, 0.68);

  --ep-overlay: rgba(15, 23, 32, 0.35);
  --ep-accent-fade: rgba(47, 158, 194, 0.12);

  /* Layer overlays flipped: subtle dark-over-light tints so stacked layers stay
     visible on white surfaces, plus near-white replacements for the dark panels. */
  --ep-raise-1: rgba(15, 23, 42, 0.04);
  --ep-raise-2: rgba(15, 23, 42, 0.06);
  --ep-raise-3: rgba(15, 23, 42, 0.085);
  --ep-raise-4: rgba(15, 23, 42, 0.12);

  --ep-panel-strong: rgba(255, 255, 255, 0.98);
  --ep-panel-strong-2: rgba(237, 240, 245, 0.98);

  /* Light: soft, modern, slightly cool shadows (the primary depth cue). */
  --ep-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.05);
  --ep-shadow-md: 0 2px 8px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --ep-shadow-lg: 0 12px 28px rgba(16, 24, 40, 0.12), 0 4px 8px rgba(16, 24, 40, 0.06);
  --ep-ring: 0 0 0 3px rgba(47, 158, 194, 0.25);

  /* Status colours deepened for contrast on white surfaces. */
  --ep-success: #2f855a;
  --ep-success-fade: rgba(47, 133, 90, 0.10);
  --ep-warn: #b7791f;
  --ep-warn-fade: rgba(183, 121, 31, 0.10);
  --ep-danger: #c0524a;
  --ep-danger-fade: rgba(192, 82, 74, 0.08);
  --ep-muted: #8a929c;
}

/* =============================================================================
   Global skeleton / shimmer loading pattern
   Usage: <span className="ep-skel ep-skel--line" style={{width:'60%'}} />
   Automatically adapts to light and dark theme via --ep-surface-* tokens.
   ============================================================================= */
.ep-skel {
  background: linear-gradient(
    100deg,
    var(--ep-surface-2) 30%,
    var(--ep-surface-3) 50%,
    var(--ep-surface-2) 70%
  );
  background-size: 200% 100%;
  animation: ep-shimmer 1.3s ease-in-out infinite;
  border-radius: 6px;
}
/* size variants */
.ep-skel--title  { display: block; height: 1.5rem; width: 55%; }
.ep-skel--line   { display: block; height: 0.85rem; }
.ep-skel--sm     { height: 0.7rem !important; }
.ep-skel--pill   { display: inline-block; width: 70px; height: 1.4rem; border-radius: 999px; }
.ep-skel--block  { display: block; width: 100%; height: 5.5rem; border-radius: 10px; }
.ep-skel--card   { display: block; width: 100%; height: 7.5rem; border-radius: 12px; }
.ep-skel--input  { display: block; width: 100%; height: 2.2rem; border-radius: 9px; }
.ep-skel--circle { border-radius: 50%; }

/* layout helpers */
.ep-skel-wrap  { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.25rem; }
.ep-skel-row   { display: flex; align-items: center; gap: 0.75rem; }
.ep-skel-grid  { display: grid; gap: 0.75rem; }
.ep-skel-grid--2 { grid-template-columns: 1fr 1fr; }
.ep-skel-grid--4 { grid-template-columns: repeat(4, 1fr); }
.ep-skel-trow  {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--ep-border);
}
.ep-skel-trow:last-child { border-bottom: none; }
.ep-skel-box   {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--ep-shadow-sm);
}

@keyframes ep-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* =============================================================================
   Light-mode refinements — Examer panel
   -----------------------------------------------------------------------------
   The dark theme builds depth from many near-blacks + translucent lifts. On a
   light surface that reads flat, and a few elements hardcode dark greys (#333,
   #444) that look wrong on white. This layer gives the Examer panel a clean,
   modern light treatment (grey backdrop, white cards, soft shadows, distinct
   tabs / inputs / buttons) WITHOUT touching dark mode — every rule is gated on
   html[data-theme='light']. Loaded after theme.css so it wins the cascade.
   ============================================================================= */

/* ---- Layout: white "document" panels floating on the grey backdrop ---------- */
html[data-theme='light'] .examer-dashboard-outside-container {
  background-color: var(--ep-bg);
}

html[data-theme='light'] .examer-dashboard-container-header,
html[data-theme='light'] .examer-dashboard-footer {
  background-color: var(--ep-surface);
  border-color: var(--ep-border);
  box-shadow: var(--ep-shadow-sm);
}

html[data-theme='light'] .examer-dashboard-answer-panel,
html[data-theme='light'] .examer-dashboard-materials-panel {
  background-color: var(--ep-surface);
}

html[data-theme='light'] .examer-dashboard-tools-panel {
  background-color: var(--ep-elevated);
  border-left: 1px solid var(--ep-border);
}

html[data-theme='light'] .examer-dashboard-resizer {
  background-color: var(--ep-surface-2);
}

/* ---- Tabs: modern segmented control (grey track, white active pill) --------- */
html[data-theme='light'] .examer-dashboard-functional-tools-tabs {
  background-color: var(--ep-surface-2);
  box-shadow: none;
  border: 1px solid var(--ep-border);
  padding: 3px;
  gap: 2px;
}

html[data-theme='light'] .examer-dashboard-functional-tools-tab {
  color: var(--ep-text-2);
  border-bottom: none;
  border-radius: 6px;
}

html[data-theme='light'] .examer-dashboard-functional-tools-tab:hover {
  /* gentle lift toward the white active pill (was --ep-surface-3, too sharp) */
  background-color: rgba(255, 255, 255, 0.55);
  color: var(--ep-text);
}

html[data-theme='light'] .examer-dashboard-functional-tools-tab.active {
  background-color: var(--ep-surface);
  color: var(--ep-accent-2);
  border-bottom: none;
  box-shadow: var(--ep-shadow-sm);
}

/* ---- Mode select dropdown ---------------------------------------------------- */
html[data-theme='light'] .examer-dashboard-functional-tools-mode-select {
  background-color: var(--ep-surface);
  border: 1px solid var(--ep-border);
  color: var(--ep-text);
}

/* ---- Chat input: clean white field with focus ring (was dark #333/#444) ----- */
html[data-theme='light'] .examer-dashboard-functional-tools-input-area {
  background-color: var(--ep-elevated);
  border-top: 1px solid var(--ep-border);
}

html[data-theme='light'] .examer-dashboard-functional-tools-input {
  background-color: var(--ep-surface);
  border: 1px solid var(--ep-border);
  color: var(--ep-text);
}

html[data-theme='light'] .examer-dashboard-functional-tools-input:focus {
  border-color: var(--ep-accent);
  background-color: var(--ep-surface);
  box-shadow: var(--ep-ring);
}

/* ---- Message bubbles --------------------------------------------------------- */
html[data-theme='light'] .examer-dashboard-functional-tools-message.user {
  /* keep the blue bubble, but text must stay white on the saturated fill */
  color: #ffffff;
  box-shadow: var(--ep-shadow-sm);
}

html[data-theme='light'] .examer-dashboard-functional-tools-message.ai {
  background-color: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-left: 3px solid var(--ep-accent);
  box-shadow: var(--ep-shadow-sm);
}

html[data-theme='light'] .examer-dashboard-functional-tools-message.ai h2 {
  border-bottom-color: var(--ep-border);
}

/* ---- Generic form fields inside the dashboard (answer inputs, title, etc.) --- */
html[data-theme='light'] .examer-dashboard-outside-container input[type='text'],
html[data-theme='light'] .examer-dashboard-outside-container input[type='number'],
html[data-theme='light'] .examer-dashboard-outside-container textarea,
html[data-theme='light'] .examer-dashboard-outside-container select {
  background-color: var(--ep-surface);
  border-color: var(--ep-border);
  color: var(--ep-text);
}

/* ---- Footer action buttons: solid, modern, clearly coloured on white --------- */
html[data-theme='light'] .examer-dashboard-submit-button {
  background: linear-gradient(45deg, var(--ep-accent), var(--ep-accent-2));
  border: none;
  color: #ffffff;
  box-shadow: var(--ep-shadow-sm);
}
html[data-theme='light'] .examer-dashboard-submit-button:hover {
  background: linear-gradient(45deg, var(--ep-accent-2), #1d6a85);
  box-shadow: var(--ep-shadow-md);
}

html[data-theme='light'] .examer-dashboard-save-button {
  background: linear-gradient(45deg, #22a06b, #16855a);
  border: none;
  color: #ffffff;
  box-shadow: var(--ep-shadow-sm);
}
html[data-theme='light'] .examer-dashboard-save-button:hover {
  background: linear-gradient(45deg, #1c8d5d, #12724c);
  box-shadow: var(--ep-shadow-md);
}

html[data-theme='light'] .examer-dashboard-download-button {
  background: linear-gradient(45deg, #7c5cf0, #6747d6);
  border: none;
  color: #ffffff;
  box-shadow: var(--ep-shadow-sm);
}
html[data-theme='light'] .examer-dashboard-download-button:hover {
  background: linear-gradient(45deg, #6b4ce0, #5739c2);
  box-shadow: var(--ep-shadow-md);
}

html[data-theme='light'] .examer-dashboard-upload-button {
  background: linear-gradient(45deg, #e8943a, #d97a1a);
  border: none;
  color: #ffffff;
  box-shadow: var(--ep-shadow-sm);
}
html[data-theme='light'] .examer-dashboard-upload-button:hover {
  background: linear-gradient(45deg, #d9822a, #c06a12);
  box-shadow: var(--ep-shadow-md);
}

/* Small accent chips (time, back button, title meta) read better solid-tinted */
html[data-theme='light'] .examer-dashboard-back-button,
html[data-theme='light'] .examer-dashboard-time {
  background-color: var(--ep-accent-fade);
  border-color: var(--ep-border);
  color: var(--ep-accent-2);
}

/* =============================================================================
   Light-mode refinements — sidebar glow lines
   -----------------------------------------------------------------------------
   The sidebar draws thin neon-cyan rgba(0,253,255,a) lines for its borders,
   scrollbar and chip fills. On white those wash out to almost nothing, so under
   light we swap the cyan for the darker green var(--ep-glow) (#0a6675). Dark
   mode keeps the original neon glow — every rule below is light-only.
   ============================================================================= */

/* ---- Sidebar scrollbar: green thumb on a light track ------------------------ */
html[data-theme='light'] .sidebar-button-wrapper {
  scrollbar-color: var(--ep-glow) var(--ep-surface-2);
}
html[data-theme='light'] .sidebar-button-wrapper::-webkit-scrollbar-track {
  background: var(--ep-surface-2);
}
html[data-theme='light'] .sidebar-button-wrapper::-webkit-scrollbar-thumb,
html[data-theme='light'] .collapsed .sidebar-button-wrapper::-webkit-scrollbar-thumb {
  background: var(--ep-glow);
}
html[data-theme='light'] .sidebar-button-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--ep-accent-2);
}

/* ---- Sidebar dividers / chip borders: solid green (were faint cyan) --------- */
html[data-theme='light'] .category-header {
  border-bottom: 2px solid var(--ep-glow);
}

html[data-theme='light'] .zoom-controls-container,
html[data-theme='light'] .zoom-percentage-only {
  background: var(--ep-surface);
  border: 1px solid var(--ep-glow);
}

html[data-theme='light'] .zoom-level-display {
  background: var(--ep-surface);
  border: 1px solid var(--ep-glow);
}

/* =============================================================================
   Light-mode refinements — Examer dashboard interior
   -----------------------------------------------------------------------------
   The answer book / materials / functional-tools interiors hardcode dark-blue
   panels and dark editor chrome. With the text now readable (tokenized), these
   surfaces still need to flip to light so the stacking + editors read on white.
   ============================================================================= */

/* ---- Nested question containers: light layer scale (lvl1 = --ep-slate) ------ */
html[data-theme='light'] .examer-dashboard-question-container
  .examer-dashboard-question-container {
  background-color: var(--ep-surface-2);   /* was #3a4a63 */
}
html[data-theme='light'] .examer-dashboard-question-container
  .examer-dashboard-question-container
  .examer-dashboard-question-container {
  background-color: var(--ep-surface-3);   /* was #4a5a73 */
  border-left-color: var(--ep-accent-2);
}

/* ---- Question header pill: dark gradient -> soft accent chip ----------------- */
html[data-theme='light'] .examer-dashboard-functional-tools-question {
  background: var(--ep-accent-fade);
  color: var(--ep-accent-2);
  border: 1px solid var(--ep-border);
}

/* ---- Notes quill editor (ql-snow): white field, not grey -------------------- */
html[data-theme='light'] .examer-dashboard-functional-tools-quill-wrapper {
  border-color: var(--ep-border);
}
html[data-theme='light'] .examer-dashboard-functional-tools-quill-wrapper .ql-container,
html[data-theme='light'] .examer-dashboard-functional-tools-quill-wrapper .ql-editor {
  background-color: var(--ep-surface);
}
html[data-theme='light'] .examer-dashboard-functional-tools-quill-wrapper .ql-toolbar {
  border-bottom-color: var(--ep-border);   /* was #444 */
}

/* ---- Resizer: a clear grey handle that turns accent on hover/drag ----------- */
html[data-theme='light'] .examer-dashboard-resizer {
  background-color: var(--ep-border-strong);
}
html[data-theme='light'] .examer-dashboard-resizer:hover,
html[data-theme='light'] .examer-dashboard-resizer:active {
  background-color: var(--ep-accent);
}

/* ---- Toggle bars / nested-question toggle: light, not dark-blue ------------- */
html[data-theme='light'] .examer-dashboard-nested-question-toggle {
  background-color: var(--ep-surface-2);   /* was #374151 */
  border-color: var(--ep-border);          /* was #4a5568 */
}
html[data-theme='light'] .examer-dashboard-nested-question-toggle:hover {
  background-color: var(--ep-surface-3);   /* was #4a5568 */
  border-color: var(--ep-accent);
}
html[data-theme='light'] .examer-dashboard-toggle-bar:hover {
  background-color: var(--ep-surface-3);   /* was #3a4a63, too dark */
}

/* ---- Answer-type section: light card, not a dark-blue translucent block ----- */
html[data-theme='light'] .examer-dashboard-answer-type-section {
  background-color: var(--ep-surface-2);   /* was rgba(45,55,72,0.5) */
}
html[data-theme='light'] .examer-dashboard-answer-type-section:hover {
  background-color: var(--ep-surface-3);   /* was rgba(45,55,72,0.7) */
}

/* ---- Answer Book header <select>: was hardcoded #333 -> dark-on-dark in light */
html[data-theme='light'] .examer-dashboard-answer-book-header-fixed select,
html[data-theme='light'] .examer-dashboard-answer-book-header-fixed select option {
  background-color: var(--ep-surface);
  color: var(--ep-text);
  border-color: var(--ep-border);
}

/* ---- Question/answer table headers: darker so they don't wash out ----------- */
html[data-theme='light'] .examer-dashboard-question-table th,
html[data-theme='light'] .examer-dashboard-user-answer-table th {
  color: var(--ep-accent-2);
}

/* =============================================================================
   Light-mode refinements — result-page container borders
   -----------------------------------------------------------------------------
   On light, the search bar / result panel / summary card build depth only from a
   faint translucent fill, so their edges disappear into the page. Re-introduce a
   slightly-dark outline (--ep-border-strong) so each container reads as a panel.
   Applies to Peditor / Examer / Assessor / Marketplace + Group Management.
   ============================================================================= */

/* Result panel wrappers (box-sizing so the +border keeps the 100vh height) */
html[data-theme='light'] .examer-panel-result-container,
html[data-theme='light'] .peditor-panel-result-container,
html[data-theme='light'] .assess-paper-record-result-container,
html[data-theme='light'] .paper-market-content-container {
  border: 1px solid var(--ep-border-strong);
  border-radius: 12px;
  box-sizing: border-box;
}

/* Search bars + summary cards */
html[data-theme='light'] .examer-panel-result-search-form,
html[data-theme='light'] .peditor-panel-result-search-form,
html[data-theme='light'] .assess-paper-record-result-search-form,
html[data-theme='light'] .paper-market-search-form,
html[data-theme='light'] .examer-panel-summary-container,
html[data-theme='light'] .peditor-panel-summary-container,
html[data-theme='light'] .assess-paper-record-summary-container,
html[data-theme='light'] .paper-market-summary-container {
  border: 1px solid var(--ep-border-strong);
}

/* Results table panels (the 60% list section beside the summary) */
html[data-theme='light'] .peditor-panel-table-section,
html[data-theme='light'] .examer-panel-table-section,
html[data-theme='light'] .assess-paper-record-table-section,
html[data-theme='light'] .paper-market-table-section,
html[data-theme='light'] .paper-market-table-section-full {
  border: 1px solid var(--ep-border-strong);
}

/* Keep the Examer mobile summary modal borderless (it renders flush) */
html[data-theme='light'] .examer-panel-mobile-summary-modal .examer-panel-summary-container {
  border: none;
}

/* Group Management: outline the two side-by-side panels */
html[data-theme='light'] .users-in-group-container,
html[data-theme='light'] .user-group-list-container {
  border: 1px solid var(--ep-border-strong);
  border-radius: 12px;
}

/* =============================================================================
   Copilot panel / Profile panel / Subscription — light-theme text + surfaces.
   Bootstrap .text-white / .text-light are `!important`, so the overrides below
   must be `!important` too. Buttons (.btn) keep their white labels on coloured
   backgrounds, hence the :not(.btn) guards.
   ============================================================================= */

/* 1. Copilot empty-state prompt ("Select your tailor-made AI chat" / "OR" /
      "Create a new AI chat") — white on the light chat surface. */
html[data-theme='light'] .report-form-container .text-white:not(.btn),
html[data-theme='light'] .report-form-container .text-light:not(.btn) {
  color: var(--ep-text) !important;
}

/* 2. Subscription badge text — premium badges set light text (var(--ep-bg))
      which washes out on their bright gold/cyan fills under the white theme. */
html[data-theme='light'] .subscription-badge.educator-premium,
html[data-theme='light'] .subscription-badge.student-premium {
  color: #10242a;
}

/* 3 + 5. Setting page + Subscription page text inside the profile modals. */
html[data-theme='light'] .user-setting-container .text-white:not(.btn),
html[data-theme='light'] .user-setting-content .text-white:not(.btn),
html[data-theme='light'] .user-setting-header .text-white:not(.btn),
html[data-theme='light'] .subscription-details-container .text-white:not(.btn),
html[data-theme='light'] .subscription-details-content .text-white:not(.btn),
html[data-theme='light'] .feedback-container .text-white:not(.btn),
html[data-theme='light'] .mobile-modal-content .text-white:not(.btn) {
  color: var(--ep-text) !important;
}

html[data-theme='light'] .user-setting-container .text-light:not(.btn),
html[data-theme='light'] .user-setting-content .text-light:not(.btn),
html[data-theme='light'] .subscription-details-container .text-light:not(.btn),
html[data-theme='light'] .subscription-details-content .text-light:not(.btn),
html[data-theme='light'] .feedback-container .text-light:not(.btn),
html[data-theme='light'] .mobile-modal-content .text-light:not(.btn) {
  color: var(--ep-text-2) !important;
}

/* The <hr className="text-white"> dividers in the settings form. */
html[data-theme='light'] .user-setting-container hr.text-white,
html[data-theme='light'] .subscription-details-container hr.text-white {
  border-color: var(--ep-border-strong) !important;
  color: var(--ep-border-strong) !important;
}

/* 4. Profile dropdown menu — PaperSideBar.css hard-codes a dark #343a40 fill;
      repaint it as a light, white-themed surface. */
html[data-theme='light'] .profile-dropdown-menu {
  background-color: var(--ep-surface) !important;
  border: 1px solid var(--ep-border-strong) !important;
  box-shadow: var(--ep-shadow-lg);
}

html[data-theme='light'] .profile-dropdown-menu .dropdown-item {
  color: var(--ep-text) !important;
}

html[data-theme='light'] .profile-dropdown-menu .dropdown-item:hover {
  background-color: var(--ep-surface-2) !important;
}

/* Mobile profile dropdown (dark rgba fill). */
html[data-theme='light'] .mobile-profile-dropdown {
  background-color: var(--ep-surface) !important;
  border-color: var(--ep-border-strong) !important;
}

html[data-theme='light'] .mobile-dropdown-item {
  color: var(--ep-text) !important;
}

/* 5. Subscription plan cards — dark translucent fills go light-themed. */
html[data-theme='light'] .premium-plan-card {
  background-color: var(--ep-surface) !important;
  border-color: var(--ep-border-strong);
}

html[data-theme='light'] .premium-plan-card-featured {
  background-color: var(--ep-accent-fade) !important;
  border-color: var(--ep-accent-soft);
}

html[data-theme='light'] .subscription-transaction-card .card {
  background-color: var(--ep-surface) !important;
  border-color: var(--ep-border-strong);
}

/* 5b. AI Quota Pricing cards inside the Subscription modal reuse LandingPage.css
      class names (.quota-card-header, .price-tag, .mode-price, .mode-label)
      that were styled for the Landing page's dark glass modal — unreadable on
      this panel's near-white surface. The h2 title also needs a direct reset:
      it's gradient-clipped text (-webkit-text-fill-color: transparent), which
      the .text-white override above can't fix since `color` is ignored once
      -webkit-text-fill-color is set. */
html[data-theme='light'] .subscription-details-container .pricing-modal-header h2 {
  background: none !important;
  -webkit-text-fill-color: initial !important;
  color: var(--ep-text) !important;
}

html[data-theme='light'] .subscription-details-container .quota-card-header {
  background: linear-gradient(135deg, var(--ep-accent) 0%, var(--ep-accent-2) 100%) !important;
  border-bottom: none !important;
}

html[data-theme='light'] .subscription-details-container .quota-card-header h3 {
  color: var(--ep-text-on-accent) !important;
}

html[data-theme='light'] .subscription-details-container .price-tag,
html[data-theme='light'] .subscription-details-container .mode-price {
  color: var(--ep-glow) !important;
}

html[data-theme='light'] .subscription-details-container .mode-label {
  color: var(--ep-text-2) !important;
}

/* 6. Result-area surfaces — unify Peditor with Examer. Examer uses the soft
      gray tint (--ep-raise-3) for its table section / summary / search form,
      while Peditor used a near-invisible white wash (rgba(255,255,255,0.1)).
      Repaint the Peditor surfaces to the same gray so both panels match. */
html[data-theme='light'] .peditor-panel-table-section,
html[data-theme='light'] .peditor-panel-summary-container,
html[data-theme='light'] .peditor-panel-result-search-form {
  background: var(--ep-raise-3);
}

/* =============================================================================
   Profile / Subscription / Settings / Feedback modals — chrome polish for the
   white theme: dark close (X) icon, light scrollbars, light headers, and the
   feedback form body text.
   ============================================================================= */

/* X icon — Bootstrap .btn-close-white forces a white glyph (invert filter);
   drop the filter inside these light modals so the X reads dark. */
html[data-theme='light'] .user-setting-header .btn-close-white,
html[data-theme='light'] .user-setting-container .btn-close-white,
html[data-theme='light'] .subscription-details-container .btn-close-white,
html[data-theme='light'] .feedback-container .btn-close-white,
html[data-theme='light'] .consent-modal-header .btn-close-white,
html[data-theme='light'] .mobile-modal-content .btn-close-white {
  filter: none;
}

/* Dark modal header strips repainted for the white theme. */
html[data-theme='light'] .subscription-history-modal-header {
  background: var(--ep-surface-2);
}

html[data-theme='light'] .subscription-history-modal {
  border-color: var(--ep-border-strong);
}

/* Feedback form body — labels/textarea inherit white; pin to readable text. */
html[data-theme='light'] .feedback-container {
  color: var(--ep-text);
}

/* Scrollbars — the dark rgba(0,0,0,…) tracks + neon thumbs go light/teal. */
html[data-theme='light'] .user-setting-container::-webkit-scrollbar-track,
html[data-theme='light'] .user-setting-content::-webkit-scrollbar-track,
html[data-theme='light'] .subscription-details-container::-webkit-scrollbar-track,
html[data-theme='light'] .subscription-details-content::-webkit-scrollbar-track,
html[data-theme='light'] .subscription-history-table-container::-webkit-scrollbar-track,
html[data-theme='light'] .subscription-transactions-list::-webkit-scrollbar-track,
html[data-theme='light'] .mobile-modal-content::-webkit-scrollbar-track {
  background: var(--ep-raise-1);
}

html[data-theme='light'] .user-setting-container::-webkit-scrollbar-thumb,
html[data-theme='light'] .user-setting-content::-webkit-scrollbar-thumb,
html[data-theme='light'] .subscription-details-container::-webkit-scrollbar-thumb,
html[data-theme='light'] .subscription-details-content::-webkit-scrollbar-thumb,
html[data-theme='light'] .subscription-history-table-container::-webkit-scrollbar-thumb,
html[data-theme='light'] .subscription-transactions-list::-webkit-scrollbar-thumb,
html[data-theme='light'] .mobile-modal-content::-webkit-scrollbar-thumb {
  background: var(--ep-glow-a30);
}

html[data-theme='light'] .user-setting-container::-webkit-scrollbar-thumb:hover,
html[data-theme='light'] .user-setting-content::-webkit-scrollbar-thumb:hover,
html[data-theme='light'] .subscription-details-container::-webkit-scrollbar-thumb:hover,
html[data-theme='light'] .subscription-details-content::-webkit-scrollbar-thumb:hover,
html[data-theme='light'] .subscription-history-table-container::-webkit-scrollbar-thumb:hover,
html[data-theme='light'] .subscription-transactions-list::-webkit-scrollbar-thumb:hover,
html[data-theme='light'] .mobile-modal-content::-webkit-scrollbar-thumb:hover {
  background: var(--ep-glow-a50);
}

/* =============================================================================
   Peditor dashboard — white-theme alignment, mirroring the Examer dashboard's
   token usage (inputs, scrollbars, text, resizer). Dark mode keeps its
   hard-coded #333 / neon look; these rules only apply under the white theme.
   ============================================================================= */

/* Inputs / selects / textareas — clean white field + soft border (the Examer
   `.examer-dashboard-outside-container input/textarea/select` pattern). The
   .peditor-dashboard-form-control source rule uses !important, so match it. */
html[data-theme='light'] .peditor-dashboard-form-control,
html[data-theme='light'] .peditor-dashboard-input,
html[data-theme='light'] .peditor-dashboard-textarea,
html[data-theme='light'] .peditor-dashboard-select,
html[data-theme='light'] .peditor-dashboard-form-group input,
html[data-theme='light'] .peditor-dashboard-form-group textarea,
html[data-theme='light'] .peditor-dashboard-outside-container input:not([type='checkbox']):not([type='radio']),
html[data-theme='light'] .peditor-dashboard-outside-container textarea,
html[data-theme='light'] .peditor-dashboard-outside-container select {
  background-color: var(--ep-surface) !important;
  border-color: var(--ep-border) !important;
  color: var(--ep-text) !important;
}

/* Native <select> option lists (were dark-on-dark). */
html[data-theme='light'] .peditor-dashboard-outside-container select option {
  background-color: var(--ep-surface);
  color: var(--ep-text);
}

/* Toggle bars + floating add-menu (were hard #333). */
html[data-theme='light'] .peditor-dashboard-toggle-bar {
  background-color: var(--ep-surface-2);
}
html[data-theme='light'] .peditor-dashboard-add-menu {
  background-color: var(--ep-surface);
  border: 1px solid var(--ep-border);
  box-shadow: var(--ep-shadow-md);
}

/* Panel dividers / header rule (were #333 and #5f5e5e). */
html[data-theme='light'] .peditor-dashboard-overview {
  border-right-color: var(--ep-border);
}
html[data-theme='light'] .peditor-dashboard-container-header {
  border-bottom-color: var(--ep-border);
}

/* Peditor completion is now a semantic status button rather than a switch.
   Preserve its component-level complete/in-progress fills. */
html[data-theme='light'] .peditor-dashboard-done-button {
  color: inherit;
}

/* Resizer stays quiet until interaction. */
html[data-theme='light'] .peditor-dashboard-resizer {
  background-color: var(--ep-surface-2);
}
html[data-theme='light'] .peditor-dashboard-resizer:hover,
html[data-theme='light'] .peditor-dashboard-resizer:active {
  background-color: var(--ep-accent-fade);
  box-shadow: none;
}

/* Scrollbars across the whole dashboard → light track + teal thumb (matches the
   examer/result-page treatment). Scoped descendant selector covers the overview,
   settings, property-settings and nested scroll areas in one pass. */
html[data-theme='light'] .peditor-dashboard-outside-container ::-webkit-scrollbar-track {
  background: var(--ep-raise-1);
}
html[data-theme='light'] .peditor-dashboard-outside-container ::-webkit-scrollbar-thumb {
  background: var(--ep-glow-a30);
  border-radius: 4px;
}
html[data-theme='light'] .peditor-dashboard-outside-container ::-webkit-scrollbar-thumb:hover {
  background: var(--ep-glow-a50);
}

/* Preserve a clear text hierarchy in light mode. Earlier styling promoted all
   secondary copy to primary black, making dense panels feel visually flat. */
html[data-theme='light'] .peditor-dashboard-outside-container {
  --ep-text-2: #586069;
  --ep-text-3: #7a838e;
}

/* Start generation now uses a solid brand fill with a high-contrast label. */
html[data-theme='light'] .peditor-dashboard-generatiopn-btn-start {
  color: var(--ep-text-on-accent);
}

/* Buttons with saturated colour fills hard-code `color: var(--ep-text)` for the
   label, which flips to near-black under the white theme — i.e. dark/grey text on
   a deep blue/green/purple button. Force white labels on the saturated buttons
   (mirrors how Examer keeps white text on its coloured footer buttons). */
html[data-theme='light'] .question-template-browse-btn,
html[data-theme='light'] .question-template-confirm-btn,
html[data-theme='light'] .question-template-insert-btn,
html[data-theme='light'] .generating-btn {
  color: var(--ep-text-on-accent);   /* #ffffff */
}

/* The yellow "change template" button is the inverse — its light label washes
   out on the amber fill, so pin it dark. */
html[data-theme='light'] .question-template-change-btn {
  color: #1f2329;
}

/* Model-answers header buttons sit on a pale purple tint with near-white text
   (#e9d5ff) + inverted-to-white icons — both vanish on white. Darken to a
   readable purple and drop the icon inversion. */
html[data-theme='light'] .peditor-model-answers-header .btn,
html[data-theme='light'] .peditor-model-answers-title i {
  color: #7e22ce;
}
html[data-theme='light'] .peditor-model-answers-header .btn i,
html[data-theme='light'] .peditor-model-answers-header .btn img {
  filter: none;
}

/* =============================================================================
   Property-settings labels & section titles — bold black on the white theme.
   -----------------------------------------------------------------------------
   Several labels/titles in the settings panel hard-code Bootstrap .text-white or
   a light-purple (#e9d5ff), which disappear on white. The earlier .text-white
   overrides were scoped to the profile/copilot modals, so they don't reach the
   Peditor settings panel. Pin them all to bold black here — e.g. "Reference
   Answer (Text-based) N", "Explanation", "Step N Outline" — plus their
   same-level labels and the soft-grey "Add … Answer" secondary buttons.
   ============================================================================= */

/* .text-white / .text-light labels inside the dashboard (Step Outline,
   Explanation, AI hints, etc.). Bootstrap's utilities are !important. */
html[data-theme='light'] .peditor-dashboard-outside-container .text-white:not(.btn),
html[data-theme='light'] .peditor-dashboard-outside-container .text-light:not(.btn) {
  color: var(--ep-text) !important;
}

/* Section/field labels — bold black so they read as headings. */
html[data-theme='light'] .peditor-dashboard-outside-container .property-setting-form-label {
  color: var(--ep-text);
  font-weight: 700;
}

/* "Reference Answer (Text-based) N" title + its leading type icon (was the
   light-purple #e9d5ff that washed out). */
html[data-theme='light'] .peditor-model-answers-title,
html[data-theme='light'] .peditor-model-answers-title i {
  color: var(--ep-text);
  font-weight: 700;
}

/* The "Add <type> Answer" / edit / configure secondary buttons read as soft grey
   (dark text on a light-grey fill); give them a bolder, fully-black label. */
html[data-theme='light'] .peditor-dashboard-outside-container .peditor-dashboard-btn-secondary {
  color: var(--ep-text);
  font-weight: 600;
}

/* =============================================================================
   Dashboard panels — landing-page-grade glass + gradient atmosphere (LIGHT only)
   -----------------------------------------------------------------------------
   The Marketplace / Examer / Peditor / Assessor / Group-Management panels were
   already readable under the white theme, but they leaned on flat grey fills
   (var(--ep-raise-*) over a cool-grey shell) so every container read as "grey
   card on grey page" — functional, but missing the fancy, frosted, colour-lit
   feel the Landing + SignUpIn pages now have.

   This layer carries that same atmosphere into the dashboard:
     • the content shell gets a soft teal/violet gradient *mesh* (like the
       landing canvas) instead of the flat #e4e7ec → #eef0f4 wash;
     • the primary containers (search forms, list/table sections, summary
       panels, group panels) become frosted-glass cards with a bright top edge
       and a teal glow — floating on the mesh;
     • the outer page wrappers go transparent (pure layout) so we never stack a
       card inside a card (the landing-page "box-in-box" lesson);
     • page titles pick up the teal→violet gradient-text treatment;
     • the inner "grey boxes" (summary items / stats / preview / comments /
       inputs / table headers / row + hover states) are repainted as light
       frosted tints with teal accents instead of rgba(0,0,0,.2) washes.

   Every rule is gated on html[data-theme='light'] and scoped to a panel root, so
   the signature dark look is byte-for-byte untouched. Imported after
   theme-light.css (see index.tsx) so it wins the cascade for the few container
   rules that file already styles (result-page borders, Peditor surfaces).
   ============================================================================= */

/* -----------------------------------------------------------------------------
   0. Light-only glass tokens (available everywhere under the white theme).
   --------------------------------------------------------------------------- */
html[data-theme='light'] {
  /* Frosted card surfaces — bright white front, fading to a faint violet edge
     so the mesh behind tints the lower-right corner (the landing recipe). */
  --ep-panel-glass: linear-gradient(150deg,
      rgba(255, 255, 255, 0.82) 0%,
      rgba(255, 255, 255, 0.56) 58%,
      rgba(124, 92, 240, 0.06) 130%);
  --ep-panel-glass-soft: linear-gradient(150deg,
      rgba(255, 255, 255, 0.62) 0%,
      rgba(247, 250, 253, 0.42) 100%);
  --ep-panel-glass-border: rgba(255, 255, 255, 0.9);
  --ep-panel-glass-glow:
      0 16px 44px rgba(47, 158, 194, 0.13),
      inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --ep-panel-glass-glow-strong:
      0 22px 60px rgba(47, 158, 194, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.95);

  /* Nested cards (items / stats / preview / comments) — subtle white lift. */
  --ep-panel-card: rgba(255, 255, 255, 0.6);
  --ep-panel-card-strong: rgba(255, 255, 255, 0.8);
  --ep-panel-card-border: rgba(255, 255, 255, 0.85);

  /* Frosted sticky table header (slightly more opaque to mask scrolling rows). */
  --ep-panel-header: linear-gradient(180deg,
      rgba(255, 255, 255, 0.94) 0%,
      rgba(248, 250, 253, 0.86) 100%);

  /* Accent tints replacing the raw cyan rgba(0,247,255,...) washes. */
  --ep-panel-teal-05: rgba(47, 158, 194, 0.07);
  --ep-panel-teal-10: rgba(47, 158, 194, 0.11);
  --ep-panel-teal-16: rgba(47, 158, 194, 0.16);
  --ep-panel-violet: #7c5cf0;

  /* Teal→violet heading gradient (the light counterpart of the dark
     white→cyan headings — same hues as the landing titles). */
  --ep-panel-title-grad: linear-gradient(120deg,
      #103a52 0%, var(--ep-accent-2) 44%, var(--ep-panel-violet) 100%);
}

/* -----------------------------------------------------------------------------
   1. Content shell — a soft colour mesh instead of the flat grey gradient.
      Four faint radial blobs (teal / violet / cyan / indigo) echo the landing
      canvas; the frosted cards above pick the colour up through their blur.
   --------------------------------------------------------------------------- */
html[data-theme='light'] .paper-main {
  background:
    radial-gradient(ellipse 70% 55% at 12% 8%, rgba(47, 158, 194, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 64% 58% at 90% 16%, rgba(124, 92, 240, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse 60% 64% at 82% 90%, rgba(0, 180, 220, 0.09) 0%, transparent 55%),
    radial-gradient(ellipse 68% 56% at 16% 94%, rgba(99, 102, 241, 0.08) 0%, transparent 55%),
    linear-gradient(160deg, #eef2fb 0%, #e8edf7 50%, #eaf1f6 100%);
}

/* -----------------------------------------------------------------------------
   2. Outer page wrappers → transparent layout only (no card-in-card).
      theme-light.css earlier gave these a strong border to read as a panel;
      now the inner cards carry the surface, so the wrapper just frames space.
   --------------------------------------------------------------------------- */
html[data-theme='light'] .paper-market-container,
html[data-theme='light'] .paper-market-content-container,
html[data-theme='light'] .examer-panel-result-container,
html[data-theme='light'] .peditor-panel-result-container,
html[data-theme='light'] .assess-paper-record-result-container,
html[data-theme='light'] .user-group-panel-container,
html[data-theme='light'] .user-group-panel-content {
  background: transparent;
  border: none;
  box-shadow: none;
}

/* -----------------------------------------------------------------------------
   3. Primary frosted-glass cards — the floating panels of every view.
   --------------------------------------------------------------------------- */
html[data-theme='light'] .paper-market-search-form,
html[data-theme='light'] .paper-market-table-section,
html[data-theme='light'] .paper-market-summary-container,
html[data-theme='light'] .examer-panel-result-search-form,
html[data-theme='light'] .examer-panel-result-table-container,
html[data-theme='light'] .examer-panel-table-section,
html[data-theme='light'] .examer-panel-summary-container,
html[data-theme='light'] .peditor-panel-result-search-form,
html[data-theme='light'] .peditor-panel-table-section,
html[data-theme='light'] .peditor-panel-summary-container,
html[data-theme='light'] .assess-paper-record-result-search-form,
html[data-theme='light'] .assess-paper-record-table-section,
html[data-theme='light'] .assess-paper-record-summary-container,
html[data-theme='light'] .user-group-list-container,
html[data-theme='light'] .users-in-group-container {
  background: var(--ep-panel-glass);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--ep-panel-glass-border);
  box-shadow: var(--ep-panel-glass-glow);
}

/* Summary panels sit on the right and benefit from a touch more presence. */
html[data-theme='light'] .paper-market-summary-container,
html[data-theme='light'] .examer-panel-summary-container,
html[data-theme='light'] .peditor-panel-summary-container,
html[data-theme='light'] .assess-paper-record-summary-container {
  box-shadow: var(--ep-panel-glass-glow-strong);
}

/* Placeholder / loading panels → same frosted surface (were flat raise tints). */
html[data-theme='light'] .paper-market-table-placeholder,
html[data-theme='light'] .paper-market-summary-placeholder,
html[data-theme='light'] .paper-market-summary-loading {
  background: var(--ep-panel-glass-soft);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--ep-panel-glass-border);
  box-shadow: var(--ep-panel-glass-glow);
}

/* -----------------------------------------------------------------------------
   4. Frosted sticky table headers (were --ep-elevated + a heavy black shadow).
   --------------------------------------------------------------------------- */
html[data-theme='light'] .paper-market-table-header,
html[data-theme='light'] .examer-panel-result-table-header,
html[data-theme='light'] .peditor-panel-result-table-header,
html[data-theme='light'] .assess-paper-record-result-table-header,
html[data-theme='light'] .user-group-panel-table-header,
html[data-theme='light'] .user-paper-status-table-header {
  background: var(--ep-panel-header);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  box-shadow: 0 2px 14px rgba(47, 158, 194, 0.09);
}

html[data-theme='light'] .paper-market-table-header th:hover,
html[data-theme='light'] .examer-panel-result-table-header th:hover,
html[data-theme='light'] .peditor-panel-result-table-header th:hover,
html[data-theme='light'] .assess-paper-record-result-table-header th:hover {
  background: var(--ep-panel-teal-10);
}

/* Row hover + selected — teal tint instead of raw cyan / black. */
html[data-theme='light'] .paper-market-table-body tr:hover,
html[data-theme='light'] .examer-panel-result-table-body tr:hover,
html[data-theme='light'] .peditor-panel-result-table-body tr:hover,
html[data-theme='light'] .assess-paper-record-result-table-body tr:hover {
  background: var(--ep-panel-teal-05);
}

html[data-theme='light'] .paper-market-selected-row,
html[data-theme='light'] .examer-panel-selected-row,
html[data-theme='light'] .peditor-panel-selected-row,
html[data-theme='light'] .assess-paper-record-selected-row {
  background: var(--ep-panel-teal-16) !important;
  border-left: 3px solid var(--ep-accent);
}

/* -----------------------------------------------------------------------------
   4b. Records "form" table + its tab bar (ExamerRecordResultPage). These use a
       -form-table / -tab-link naming that the -result-table block above did not
       cover, so they kept their dark rgba(0,0,0,.2–.6) fills (dark chips/rows on
       white). Give them the same frosted header, light rows and teal tabs.
   --------------------------------------------------------------------------- */
html[data-theme='light'] .examer-panel-form-table-header {
  background: var(--ep-panel-header);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  box-shadow: 0 2px 14px rgba(47, 158, 194, 0.09);
}
html[data-theme='light'] .examer-panel-form-table-header th:hover {
  background: var(--ep-panel-teal-10);
}
html[data-theme='light'] .examer-panel-form-table-body tr {
  background: var(--ep-panel-card);
}
html[data-theme='light'] .examer-panel-form-table-body tr:hover {
  background: var(--ep-panel-teal-05);
}

/* Tab bar — inactive tabs were rgba(0,0,0,.2). The .active tab already reads via
   the glow tokens (teal on white), so guard with :not(.active) to leave it be. */
html[data-theme='light'] .examer-panel-tab-link:not(.active) {
  background: var(--ep-panel-card);
  border-color: var(--ep-panel-card-border);
}
html[data-theme='light'] .examer-panel-tab-link:not(.active):hover {
  background: var(--ep-panel-teal-05);
}

/* -----------------------------------------------------------------------------
   5. Page titles — teal→violet gradient text (the landing-heading treatment).
   --------------------------------------------------------------------------- */
html[data-theme='light'] .paper-market-title,
html[data-theme='light'] .examer-panel-result-title,
html[data-theme='light'] .peditor-panel-result-title,
html[data-theme='light'] .assess-paper-record-result-title,
html[data-theme='light'] .user-group-panel-title {
  background: var(--ep-panel-title-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  width: -moz-fit-content;
  width: fit-content;
}

/* -----------------------------------------------------------------------------
   6. Nested "grey boxes" → light frosted cards.
      summary items / stats / section containers / preview / comments across the
      four result panels (these hard-code rgba(0,0,0,.2) → mid-grey on white).
   --------------------------------------------------------------------------- */
html[data-theme='light'] .paper-market-summary-item,
html[data-theme='light'] .paper-market-summary-stat,
html[data-theme='light'] .paper-market-preview-item,
html[data-theme='light'] .paper-market-comment-item,
html[data-theme='light'] .paper-market-summary-description,
html[data-theme='light'] .paper-market-summary-instruction,
html[data-theme='light'] .paper-market-summary-download-settings,
html[data-theme='light'] .paper-market-preview-questions,
html[data-theme='light'] .examer-panel-summary-item,
html[data-theme='light'] .examer-panel-summary-stat,
html[data-theme='light'] .peditor-panel-summary-item,
html[data-theme='light'] .peditor-panel-summary-stat,
html[data-theme='light'] .peditor-panel-preview-item,
html[data-theme='light'] .peditor-panel-summary-description,
html[data-theme='light'] .peditor-panel-summary-download-settings,
html[data-theme='light'] .peditor-panel-preview-questions,
html[data-theme='light'] .assess-paper-record-summary-item,
html[data-theme='light'] .assess-paper-record-summary-stat {
  background: var(--ep-panel-card);
  border: 1px solid var(--ep-panel-card-border);
  box-shadow: var(--ep-shadow-sm);
}

/* Section containers — a hair softer so they group items without competing. */
html[data-theme='light'] .paper-market-summary-section-container,
html[data-theme='light'] .peditor-panel-summary-section-container {
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid var(--ep-panel-card-border);
}

/* Their hover states — gentle teal lift instead of a darker black wash. */
html[data-theme='light'] .paper-market-summary-stat:hover,
html[data-theme='light'] .paper-market-comment-item:hover,
html[data-theme='light'] .paper-market-preview-item:hover,
html[data-theme='light'] .paper-market-summary-section-container:hover,
html[data-theme='light'] .examer-panel-summary-stat:hover,
html[data-theme='light'] .peditor-panel-summary-stat:hover,
html[data-theme='light'] .peditor-panel-preview-item:hover,
html[data-theme='light'] .peditor-panel-summary-section-container:hover,
html[data-theme='light'] .assess-paper-record-summary-stat:hover {
  background: var(--ep-panel-card-strong);
  border-color: rgba(47, 158, 194, 0.3);
}

/* Progress circle inner disc (rgba(0,0,0,.4)) → light, so the % reads. */
html[data-theme='light'] .examer-panel-progress-inner,
html[data-theme='light'] .peditor-panel-progress-inner,
html[data-theme='light'] .assess-paper-record-progress-inner {
  background: rgba(255, 255, 255, 0.85);
}

/* Section / summary titles keep the deep-teal accent for hierarchy, but the
   left-border accent bars switch from raw cyan to the token teal. */
html[data-theme='light'] .paper-market-preview-item,
html[data-theme='light'] .paper-market-summary-description,
html[data-theme='light'] .paper-market-summary-instruction,
html[data-theme='light'] .paper-market-summary-download-settings,
html[data-theme='light'] .peditor-panel-preview-item,
html[data-theme='light'] .peditor-panel-summary-description {
  border-left: 3px solid rgba(47, 158, 194, 0.4);
}

/* -----------------------------------------------------------------------------
   7. Inputs / selects / textareas → white-glass fields with a teal border.
      Scoped to each panel root so it beats the per-panel single-class rules
      (which hard-code rgba(0,0,0,.2) fills + washed cyan borders) on
      specificity, no !important needed.
   --------------------------------------------------------------------------- */
html[data-theme='light'] .paper-market-container input:not([type='checkbox']):not([type='radio']),
html[data-theme='light'] .paper-market-container select,
html[data-theme='light'] .paper-market-container textarea,
html[data-theme='light'] .examer-panel-result-container input:not([type='checkbox']):not([type='radio']),
html[data-theme='light'] .examer-panel-result-container select,
html[data-theme='light'] .examer-panel-result-container textarea,
html[data-theme='light'] .peditor-panel-result-container input:not([type='checkbox']):not([type='radio']),
html[data-theme='light'] .peditor-panel-result-container select,
html[data-theme='light'] .peditor-panel-result-container textarea,
html[data-theme='light'] .assess-paper-record-result-container input:not([type='checkbox']):not([type='radio']),
html[data-theme='light'] .assess-paper-record-result-container select,
html[data-theme='light'] .assess-paper-record-result-container textarea,
html[data-theme='light'] .user-group-panel-container input:not([type='checkbox']):not([type='radio']),
html[data-theme='light'] .user-group-panel-container select,
html[data-theme='light'] .user-group-panel-container textarea {
  /* background-color (not the `background` shorthand) so the custom <select>
     dropdown-arrow background-image set by the base rules survives. */
  background-color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(47, 158, 194, 0.32);
  color: var(--ep-text);
}

html[data-theme='light'] .paper-market-container input:not([type='checkbox']):not([type='radio']):focus,
html[data-theme='light'] .paper-market-container select:focus,
html[data-theme='light'] .paper-market-container textarea:focus,
html[data-theme='light'] .examer-panel-result-container input:not([type='checkbox']):not([type='radio']):focus,
html[data-theme='light'] .examer-panel-result-container select:focus,
html[data-theme='light'] .examer-panel-result-container textarea:focus,
html[data-theme='light'] .peditor-panel-result-container input:not([type='checkbox']):not([type='radio']):focus,
html[data-theme='light'] .peditor-panel-result-container select:focus,
html[data-theme='light'] .peditor-panel-result-container textarea:focus,
html[data-theme='light'] .assess-paper-record-result-container input:not([type='checkbox']):not([type='radio']):focus,
html[data-theme='light'] .assess-paper-record-result-container select:focus,
html[data-theme='light'] .assess-paper-record-result-container textarea:focus,
html[data-theme='light'] .user-group-panel-container input:not([type='checkbox']):not([type='radio']):focus,
html[data-theme='light'] .user-group-panel-container select:focus,
html[data-theme='light'] .user-group-panel-container textarea:focus {
  background-color: #ffffff;
  border-color: var(--ep-accent);
  box-shadow: var(--ep-ring);
  outline: none;
}

/* Native <option> lists (were the dark rgb(63,58,58)). */
html[data-theme='light'] .paper-market-container option,
html[data-theme='light'] .examer-panel-result-container option,
html[data-theme='light'] .peditor-panel-result-container option,
html[data-theme='light'] .assess-paper-record-result-container option,
html[data-theme='light'] .user-group-panel-container option {
  background-color: #ffffff;
  color: var(--ep-text);
}

/* -----------------------------------------------------------------------------
   8. Group Management interior — form, table header, metric chips, descriptions
      (this panel is largely un-tokenised, so it carries the most raw darks).
   --------------------------------------------------------------------------- */
html[data-theme='light'] .user-group-panel-form,
html[data-theme='light'] .user-group-description,
html[data-theme='light'] .user-paper-status-table-container {
  background: var(--ep-panel-card);
  border: 1px solid var(--ep-panel-card-border);
}

html[data-theme='light'] .user-paper-header-metric-item {
  background: var(--ep-panel-card);
  border: 1px solid var(--ep-panel-card-border);
  box-shadow: var(--ep-shadow-sm);
}
html[data-theme='light'] .user-paper-header-metric-item:hover {
  background: var(--ep-panel-card-strong);
  border-color: rgba(47, 158, 194, 0.3);
}

/* -----------------------------------------------------------------------------
   9. Comment composer + market comment textarea → white field, teal border.
   --------------------------------------------------------------------------- */
html[data-theme='light'] .paper-market-comment-textarea {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(47, 158, 194, 0.32);
  color: var(--ep-text);
}
html[data-theme='light'] .paper-market-comment-textarea:focus {
  background: #ffffff;
  border-color: var(--ep-accent);
  box-shadow: var(--ep-ring);
}

/* Comments-locked / no-comments notes — soft tint, not a grey slab. */
html[data-theme='light'] .paper-market-comments-locked {
  background: var(--ep-panel-card);
  border: 1px dashed rgba(47, 158, 194, 0.35);
}

/* -----------------------------------------------------------------------------
   10. Market type tabs → frosted pills with a teal active state (were raw cyan
       over rgba(0,0,0,.2)).
   --------------------------------------------------------------------------- */
html[data-theme='light'] .paper-market-tab-link {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid transparent;
}
html[data-theme='light'] .paper-market-tab-link:hover {
  background: var(--ep-panel-teal-10);
}
html[data-theme='light'] .paper-market-tab-link.active {
  background: var(--ep-panel-teal-16);
  color: var(--ep-accent-2);
  border-color: rgba(47, 158, 194, 0.3);
}

/* Summary tab strip (Marketplace details) — teal active underline + tint. */
html[data-theme='light'] .paper-market-summary-tab-link:hover {
  background: var(--ep-panel-teal-05);
  color: var(--ep-accent-2);
}
html[data-theme='light'] .paper-market-summary-tab-link.active {
  background: var(--ep-panel-teal-10);
  color: var(--ep-accent-2);
}

/* -----------------------------------------------------------------------------
   11. Round/outline action buttons — keep them readable on the frosted cards.
       The base buttons outline in raw cyan/glow; on white the teal token reads
       crisper and the hover tint replaces the cyan wash.
   --------------------------------------------------------------------------- */
html[data-theme='light'] .paper-market-summary-action-btn,
html[data-theme='light'] .paper-market-result-btn,
html[data-theme='light'] .examer-panel-summary-action-btn,
html[data-theme='light'] .peditor-panel-summary-action-btn,
html[data-theme='light'] .assess-paper-record-summary-action-btn {
  border-color: rgba(47, 158, 194, 0.4);
}
html[data-theme='light'] .paper-market-summary-action-btn:hover,
html[data-theme='light'] .paper-market-result-btn:hover,
html[data-theme='light'] .examer-panel-summary-action-btn:hover,
html[data-theme='light'] .peditor-panel-summary-action-btn:hover,
html[data-theme='light'] .assess-paper-record-summary-action-btn:hover {
  background: var(--ep-panel-teal-16);
}

/* =============================================================================
   12. SECONDARY MODALS & DIALOGS — extend the glass treatment into the deep
       overlays (author profile, Peditor share, transaction history, paper-status).
   -----------------------------------------------------------------------------
   Most of these are portalled to <body>, so they're targeted by their unique
   class names rather than a panel-root scope. Several hard-code a full dark
   surface (rgba(20,20,20,.95) / #1a1d23 / rgba(0,0,0,.7)) that never flips —
   repaint those as frosted-light panels, then de-grey their internals.
   ============================================================================= */

/* --- Hard-coded DARK modal containers → frosted light glass ---------------- */
html[data-theme='light'] .author-profile-modal,
html[data-theme='light'] .peditor-share-modal,
html[data-theme='light'] .peditor-panel-transaction-history-modal,
html[data-theme='light'] .examer-panel-transaction-history-modal,
html[data-theme='light'] .inst-billing-history-modal {
  background: linear-gradient(150deg,
      rgba(255, 255, 255, 0.96) 0%,
      rgba(245, 248, 252, 0.94) 100%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--ep-panel-glass-border);
  box-shadow:
      0 24px 60px rgba(47, 158, 194, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.95);
  color: var(--ep-text);
}

/* --- Modal header strips → frosted near-white (were rgba(0,0,0,.2)) -------- */
html[data-theme='light'] .paper-market-modal-header,
html[data-theme='light'] .paper-payment-modal-header,
html[data-theme='light'] .peditor-panel-transaction-history-modal-header,
html[data-theme='light'] .examer-panel-transaction-history-modal-header,
html[data-theme='light'] .inst-billing-history-modal-header {
  background: var(--ep-panel-header);
  border-bottom: 1px solid var(--ep-border);
}

/* --- Floating close button (group paper-status) → light disc -------------- */
html[data-theme='light'] .user-paper-status-modal-close-overlay {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--ep-border-strong);
  color: var(--ep-text-2);
}

/* --- Peditor share modal internals ---------------------------------------- */
html[data-theme='light'] .peditor-dashboard-share-mode-btn,
html[data-theme='light'] .peditor-dashboard-share-list,
html[data-theme='light'] .peditor-dashboard-share-group-selector,
html[data-theme='light'] .peditor-dashboard-share-group-btn {
  background: var(--ep-panel-card);
  border-color: rgba(47, 158, 194, 0.3);
}
html[data-theme='light'] .peditor-dashboard-share-mode-btn:hover,
html[data-theme='light'] .peditor-dashboard-share-group-btn:hover {
  background: var(--ep-panel-teal-10);
}
html[data-theme='light'] .peditor-dashboard-share-mode-btn.active {
  background: var(--ep-panel-teal-16);
  border-color: var(--ep-accent);
}
html[data-theme='light'] .peditor-dashboard-share-input {
  background-color: rgba(255, 255, 255, 0.85);
  border-color: rgba(47, 158, 194, 0.3);
  color: var(--ep-text);
}
html[data-theme='light'] .peditor-dashboard-share-input:focus {
  border-color: var(--ep-accent);
  box-shadow: var(--ep-ring);
}
html[data-theme='light'] .peditor-dashboard-share-suggestions {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.97), rgba(245, 248, 252, 0.95));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-color: rgba(47, 158, 194, 0.3);
}
html[data-theme='light'] .peditor-dashboard-share-suggestion-item:hover {
  background: var(--ep-panel-teal-10);
}
html[data-theme='light'] .peditor-dashboard-share-user-item {
  background: var(--ep-panel-card);
  border: 1px solid var(--ep-panel-card-border);
}
html[data-theme='light'] .peditor-dashboard-share-user-item:hover {
  background: var(--ep-panel-card-strong);
}
html[data-theme='light'] .peditor-dashboard-share-group-item {
  background: var(--ep-panel-teal-05);
  border-color: rgba(47, 158, 194, 0.2);
}
html[data-theme='light'] .peditor-dashboard-share-group-badge {
  background-color: var(--ep-panel-teal-16);
  color: var(--ep-accent-2);
}

/* --- Marketplace modal internals ------------------------------------------ */
html[data-theme='light'] .paper-market-author-suggestion {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.97), rgba(245, 248, 252, 0.95));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-color: rgba(47, 158, 194, 0.3);
}
html[data-theme='light'] .paper-market-author-suggestion-item:hover {
  background: var(--ep-panel-teal-16);
}
html[data-theme='light'] .paper-payment-order-summary {
  background: var(--ep-panel-card);
  border-color: rgba(47, 158, 194, 0.15);
}

/* --- Group paper-status modal internals (portalled → target directly) ------ */
html[data-theme='light'] .user-paper-status-tab-link {
  background: rgba(255, 255, 255, 0.55);
}
html[data-theme='light'] .user-paper-status-tab-link:hover {
  background: var(--ep-panel-teal-10);
}
html[data-theme='light'] .user-paper-status-tab-link.active {
  background: var(--ep-panel-teal-16);
  color: var(--ep-accent-2);
  border-color: rgba(47, 158, 194, 0.3);
}
html[data-theme='light'] .user-paper-status-filters {
  background: var(--ep-panel-card);
  border-color: rgba(47, 158, 194, 0.15);
}
html[data-theme='light'] .user-paper-status-filter-toggle {
  background: var(--ep-panel-teal-10);
  border-color: rgba(47, 158, 194, 0.3);
}
html[data-theme='light'] .user-paper-status-filter-toggle:hover,
html[data-theme='light'] .user-paper-status-filter-toggle.active {
  background: var(--ep-panel-teal-16);
  border-color: var(--ep-accent);
  color: var(--ep-accent-2);
}
html[data-theme='light'] .user-paper-status-filter-input,
html[data-theme='light'] .user-paper-status-filter-select {
  background-color: rgba(255, 255, 255, 0.7);
  border-color: rgba(47, 158, 194, 0.3);
  color: var(--ep-text);
}
html[data-theme='light'] .user-paper-status-filter-input:focus,
html[data-theme='light'] .user-paper-status-filter-select:focus {
  border-color: var(--ep-accent);
  box-shadow: var(--ep-ring);
}
html[data-theme='light'] .user-paper-status-filter-select option {
  background-color: #ffffff;
  color: var(--ep-text);
}
html[data-theme='light'] .user-paper-status-table-body tr {
  background: transparent;
}
html[data-theme='light'] .user-paper-status-table-body tr:hover {
  background: var(--ep-panel-teal-05);
}

/* --- Transaction history internals (Peditor + Examer + Institution) ------- */
html[data-theme='light'] .peditor-panel-transaction-history-search-form,
html[data-theme='light'] .examer-panel-transaction-history-search-form,
html[data-theme='light'] .inst-billing-history-search-form {
  background: var(--ep-panel-glass-soft);
  border: 1px solid var(--ep-panel-glass-border);
}
html[data-theme='light'] .peditor-panel-transaction-history-input,
html[data-theme='light'] .examer-panel-transaction-history-input,
html[data-theme='light'] .inst-billing-history-input {
  background-color: rgba(255, 255, 255, 0.7);
  border-color: rgba(47, 158, 194, 0.3);
  color: var(--ep-text);
}
html[data-theme='light'] .peditor-panel-transaction-history-input:focus,
html[data-theme='light'] .examer-panel-transaction-history-input:focus,
html[data-theme='light'] .inst-billing-history-input:focus {
  border-color: var(--ep-accent);
  box-shadow: var(--ep-ring);
}
html[data-theme='light'] .peditor-panel-transaction-history-table-header,
html[data-theme='light'] .examer-panel-transaction-history-table-header,
html[data-theme='light'] .inst-billing-history-table-header {
  background: var(--ep-panel-header);
  box-shadow: 0 2px 14px rgba(47, 158, 194, 0.09);
}
html[data-theme='light'] .peditor-panel-transaction-history-table-header th:hover,
html[data-theme='light'] .examer-panel-transaction-history-table-header th:hover,
html[data-theme='light'] .inst-billing-history-table-header th:hover {
  background: var(--ep-panel-teal-10);
}
html[data-theme='light'] .peditor-panel-transaction-history-table-body tr:hover,
html[data-theme='light'] .examer-panel-transaction-history-table-body tr:hover,
html[data-theme='light'] .inst-billing-history-table-body tr:hover {
  background: var(--ep-panel-teal-05);
}

/* =============================================================================
   Paper Dashboard unified interface system
   Applies to operational Paper Dashboard panels only. Landing and SignUpIn
   pages do not use these roots and remain untouched.
   ============================================================================= */

/* ---------------------------------------------------------------------------
   Shared scale and interaction rhythm — both themes.
   These rules deliberately use stable sizes so the 80% dashboard zoom and the
   unscaled portalled profile modals still feel like one product.
   ------------------------------------------------------------------------- */
html[data-theme] {
  --pd-control-height: 2.2rem;
  --pd-control-radius: 0.6rem;
  --pd-card-radius: 0.82rem;
  --pd-panel-font-size: 0.84rem;
  --pd-label-font-size: 0.76rem;
  --pd-title-size: 1.35rem;
  --pd-transition: 160ms ease;
}

html[data-theme] .paper-main-content {
  font-size: var(--pd-panel-font-size);
  line-height: 1.45;
}

html[data-theme] :is(
  .paper-market-container,
  .examer-panel-result-container,
  .peditor-panel-result-container,
  .assess-paper-record-result-container,
  .user-group-panel-container,
  .approval-panel,
  .approval-queue,
  .approvals-page,
  .quota-page-container,
  .inst-plan,
  .inst-admin
) {
  font-size: var(--pd-panel-font-size);
  line-height: 1.45;
}

html[data-theme] :is(
  .paper-market-title,
  .examer-panel-result-title,
  .peditor-panel-result-title,
  .assess-paper-record-result-title,
  .user-group-panel-title,
  .approval-panel__title,
  .approval-queue__title,
  .approvals-page__title,
  .quota-page-title,
  .inst-plan__title,
  .inst-admin__title
) {
  margin-top: 0;
  font-size: var(--pd-title-size);
  font-weight: 720;
  line-height: 1.25;
  letter-spacing: -0.018em;
}

html[data-theme] :is(
  .paper-market-label,
  .examer-panel-result-label,
  .peditor-panel-result-label,
  .assess-paper-record-result-label,
  .user-group-panel-label,
  .approval-field-label,
  .quota-page-input-label,
  .quota-transaction-history-label,
  .inst-field-label,
  .inst-admin__section-title,
  .inst-billing-history-label
) {
  font-size: var(--pd-label-font-size);
  font-weight: 680;
  letter-spacing: 0.015em;
}

html[data-theme] :is(
  .paper-market-input,
  .paper-market-select,
  .paper-market-comment-textarea,
  .paper-market-comments-sort-select,
  .examer-panel-result-input,
  .examer-panel-result-select,
  .examer-panel-form-input,
  .examer-panel-form-select,
  .peditor-panel-result-input,
  .peditor-panel-result-select,
  .assess-paper-record-result-input,
  .assess-paper-record-result-select,
  .user-group-panel-input,
  .user-group-panel-select,
  .user-group-panel-textarea,
  .approval-input,
  .approval-textarea,
  .quota-page-input,
  .quota-transaction-history-input,
  .quota-transaction-history-select,
  .inst-input,
  .inst-textarea,
  .inst-admin__input,
  .inst-admin__select,
  .inst-billing-history-input
) {
  min-height: var(--pd-control-height);
  padding: 0.48rem 0.68rem;
  border-radius: var(--pd-control-radius);
  font-family: inherit;
  font-size: 0.82rem;
  line-height: 1.3;
}

html[data-theme] :is(
  .paper-market-action-button,
  .paper-market-summary-action-btn,
  .paper-market-comment-submit,
  .examer-panel-result-btn,
  .examer-panel-result-action-btn,
  .examer-panel-summary-action-btn,
  .examer-panel-form-button,
  .peditor-panel-result-btn,
  .peditor-panel-result-action-btn,
  .peditor-panel-summary-action-btn,
  .assess-paper-record-result-btn,
  .assess-paper-record-result-action-btn,
  .assess-paper-record-summary-action-btn,
  .user-group-panel-button,
  .user-group-panel-action-btn,
  .user-group-panel-add-button,
  .approval-btn,
  .approvals-table__btn,
  .quota-page-button,
  .quota-transaction-history-clear-filters-btn,
  .ai-usage-export-btn,
  .inst-btn,
  .inst-admin__btn,
  .inst-billing-history-clear-filters-btn
) {
  min-height: var(--pd-control-height);
  padding: 0.48rem 0.78rem;
  border-radius: var(--pd-control-radius);
  font-size: 0.79rem;
  font-weight: 680;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: none;
}

html[data-theme] :is(
  .paper-market-search-form,
  .examer-panel-result-search-form,
  .peditor-panel-result-search-form,
  .assess-paper-record-result-search-form,
  .user-group-panel-form,
  .quota-page-form-container,
  .quota-transaction-history-search-form,
  .inst-billing-history-search-form
) {
  padding: 0.9rem 1rem;
  border-radius: var(--pd-card-radius);
}

html[data-theme] :is(
  .paper-market-form-row,
  .examer-panel-result-form-row,
  .peditor-panel-result-form-row,
  .assess-paper-record-result-form-row,
  .quota-page-inputs-grid,
  .quota-transaction-history-form-row
) {
  gap: 0.7rem;
}

/* Search/result pages: compact Peditor-aligned rhythm. */
html[data-theme] :is(
  .paper-market-container,
  .examer-panel-result-container,
  .peditor-panel-result-container,
  .assess-paper-record-result-container,
  .user-group-panel-container
) {
  padding: 1rem 1.15rem;
}

html[data-theme] :is(
  .paper-market-content-container,
  .examer-panel-content-container,
  .peditor-panel-content-container,
  .assess-paper-record-content-container,
  .user-group-panel-content
) {
  gap: 0.85rem;
}

html[data-theme] :is(
  .paper-market-table-section,
  .paper-market-summary-container,
  .examer-panel-table-section,
  .examer-panel-summary-container,
  .peditor-panel-table-section,
  .peditor-panel-summary-container,
  .assess-paper-record-table-section,
  .assess-paper-record-summary-container,
  .user-group-list-container,
  .users-in-group-container
) {
  border-radius: var(--pd-card-radius);
}

html[data-theme] :is(
  .paper-market-table-header th,
  .paper-market-table-body td,
  .examer-panel-result-table-header th,
  .examer-panel-result-table-body td,
  .examer-panel-form-table-header th,
  .examer-panel-form-table-body td,
  .peditor-panel-result-table-header th,
  .peditor-panel-result-table-body td,
  .assess-paper-record-result-table-header th,
  .assess-paper-record-result-table-body td,
  .user-group-panel-table-header th,
  .user-group-panel-table-body td,
  .approvals-table thead th,
  .approvals-table tbody td,
  .quota-transaction-history-table-header th,
  .quota-transaction-history-table-body td
) {
  padding: 0.58rem 0.7rem;
  font-size: 0.78rem;
  line-height: 1.35;
}

html[data-theme] :is(
  .paper-market-summary-header,
  .examer-panel-summary-header,
  .peditor-panel-summary-header,
  .assess-paper-record-summary-header
) {
  padding: 0.8rem 0.9rem;
}

html[data-theme] :is(
  .paper-market-summary-details,
  .examer-panel-summary-details,
  .peditor-panel-summary-details,
  .assess-paper-record-summary-details
) {
  padding: 0.8rem;
}

html[data-theme] :is(
  .paper-market-summary-item,
  .paper-market-summary-stat,
  .examer-panel-summary-item,
  .examer-panel-summary-stat,
  .peditor-panel-summary-item,
  .peditor-panel-summary-stat,
  .assess-paper-record-summary-item,
  .assess-paper-record-summary-stat
) {
  padding: 0.62rem 0.72rem;
  border-radius: 0.62rem;
}

/* Examer paper-selection form requested explicitly by the user. */
html[data-theme] .examer-panel-form-container-peditor-paper {
  width: min(98vw, 96rem);
  max-width: 98vw;
  box-sizing: border-box;
  height: min(84vh, 50rem);
  margin-left: 0;
  padding: 3rem 1rem 1rem;
  border-radius: 0.9rem;
  font-size: 0.82rem;
}

html[data-theme] .examer-panel-form-container-peditor-paper .examer-panel-form-filters {
  padding: 0.7rem;
}

html[data-theme] .examer-panel-form-container-peditor-paper .examer-panel-form-row {
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

html[data-theme] .examer-panel-form-container-peditor-paper .examer-panel-form-group {
  margin-bottom: 0.7rem;
}

html[data-theme] .examer-panel-form-container-peditor-paper .examer-panel-form-label {
  margin-bottom: 0.3rem;
  font-size: 0.74rem;
}

html[data-theme] .examer-panel-form-container-peditor-paper .examer-panel-form-button-container {
  gap: 0.55rem;
  padding: 0.75rem;
}

html[data-theme] .examer-panel-form-close-btn {
  width: 2rem;
  height: 2rem;
  top: 0.65rem;
  right: 0.75rem;
  font-size: 1.15rem;
}

/* Institution pages: remove the 720px aside and oversized whitespace. */
html[data-theme] .inst-plan {
  padding: 1.35rem 1.6rem 1.8rem;
}

html[data-theme] .inst-plan__layout {
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 27rem);
  gap: 1rem;
}

html[data-theme] .inst-plan__header,
html[data-theme] .inst-admin__header {
  margin-bottom: 1rem;
}

html[data-theme] .inst-plan__subtitle,
html[data-theme] .inst-admin__subtitle,
html[data-theme] .approvals-page__subtitle,
html[data-theme] .approval-queue__subtitle {
  margin-top: 0.3rem;
  font-size: 0.84rem;
  line-height: 1.5;
}

html[data-theme] :is(
  .inst-hero,
  .inst-summary-card,
  .inst-config,
  .inst-quote,
  .inst-invoice,
  .inst-sub-section,
  .inst-admin__summary,
  .inst-admin__invite
) {
  padding: 0.9rem 1rem;
  border-radius: var(--pd-card-radius);
}

html[data-theme] .inst-plan__main {
  gap: 0.8rem;
}

html[data-theme] .inst-hero__price {
  margin-top: 0.45rem;
  font-size: 1.65rem;
}

html[data-theme] .inst-hero__features {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  gap: 0.4rem;
}

html[data-theme] .inst-hero__feature,
html[data-theme] .inst-summary-row,
html[data-theme] .inst-config__description,
html[data-theme] .inst-summary-card__note {
  font-size: 0.8rem;
}

html[data-theme] .inst-summary-row {
  padding: 0.35rem 0;
}

html[data-theme] .inst-admin {
  padding: 1.25rem 1.35rem 1rem;
}

html[data-theme] .inst-admin__toolbar {
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

html[data-theme] .inst-admin__summary {
  margin-bottom: 0;
}

html[data-theme] .inst-admin__section-title {
  margin: 1rem 0 0.45rem;
}

html[data-theme] .inst-admin__table th,
html[data-theme] .inst-admin__table td {
  padding: 0.55rem 0.65rem;
  font-size: 0.78rem;
}

/* Quota, approval, and group panels. */
html[data-theme] .quota-page-container {
  padding: 1rem 1.15rem;
}

html[data-theme] .quota-page-pricing-container,
html[data-theme] .quota-page-display-container {
  gap: 0.8rem;
}

html[data-theme] :is(
  .quota-page-pricing-card,
  .quota-page-form-container,
  .quota-page-price-breakdown-container,
  .quota-page-display-card,
  .quota-page-order-summary,
  .ai-usage-totals
) {
  border-radius: var(--pd-card-radius);
}

html[data-theme] .quota-page-card-body,
html[data-theme] .quota-page-display-body,
html[data-theme] .quota-page-price-breakdown-container {
  padding: 0.85rem;
}

html[data-theme] .quota-page-card-header,
html[data-theme] .quota-page-display-header {
  padding: 0.72rem 0.85rem;
}

html[data-theme] .quota-page-card-header h3,
html[data-theme] .quota-page-display-header h4 {
  font-size: 1rem;
}

html[data-theme] .quota-page-price,
html[data-theme] .quota-page-value {
  font-size: 1.45rem;
}

html[data-theme] .approvals-page,
html[data-theme] .approval-queue {
  padding: 1.25rem 1.4rem;
}

html[data-theme] .approvals-page__header,
html[data-theme] .approval-queue__header {
  margin-bottom: 1rem;
}

html[data-theme] .approval-queue__layout {
  gap: 0.85rem;
}

html[data-theme] :is(
  .approval-panel,
  .approval-queue__list,
  .approval-queue__detail,
  .approvals-section,
  .approval-chain__step,
  .approval-selected__chip,
  .approval-history__item
) {
  border-radius: var(--pd-card-radius);
}

html[data-theme] .approval-queue__row {
  padding: 0.7rem 0.8rem;
}

html[data-theme] .user-group-panel-content {
  gap: 0.8rem;
}

html[data-theme] .user-group-list-container,
html[data-theme] .users-in-group-container {
  padding: 0.85rem;
}

html[data-theme] .user-group-panel-tabs {
  gap: 0.25rem;
  padding: 0.25rem;
}

html[data-theme] .user-group-panel-tab {
  padding: 0.45rem 0.7rem;
  font-size: 0.78rem;
}

/* Profile / Settings / Subscription: portalled outside Paper Main scaling. */
html[data-theme] :is(
  .user-setting-container,
  .subscription-details-container,
  .feedback-container,
  .assistant-form-container,
  .add-conv-container,
  .subscription-history-modal,
  .transactions-center-modal,
  .consent-modal-container
) {
  font-size: 0.8rem;
  line-height: 1.45;
}

html[data-theme] .user-setting-container,
html[data-theme] .subscription-details-container {
  width: min(86vw, 50rem);
  max-height: 86vh;
  border-radius: 0.9rem;
}

html[data-theme] .subscription-details-container {
  padding: 1rem;
}

html[data-theme] .user-setting-header {
  padding: 0.7rem 1rem;
}

html[data-theme] .user-setting-content {
  padding: 0.85rem 1rem;
}

html[data-theme] #settings-form {
  padding: 0.75rem;
}

html[data-theme] :is(
  .user-setting-container,
  .subscription-details-container,
  .assistant-form-container,
  .add-conv-container,
  .feedback-container
) :is(input:not([type='checkbox']):not([type='radio']), select, textarea, .form-control, .form-select) {
  min-height: var(--pd-control-height);
  margin-bottom: 0.65rem;
  padding: 0.48rem 0.68rem;
  border-radius: var(--pd-control-radius);
  font-size: 0.8rem;
  line-height: 1.3;
}

html[data-theme] :is(
  .user-setting-container,
  .subscription-details-container,
  .assistant-form-container,
  .add-conv-container,
  .feedback-container,
  .consent-modal-container
) :is(.btn, button:not(.btn-close)) {
  min-height: var(--pd-control-height);
  margin: 0.2rem;
  padding: 0.48rem 0.78rem;
  border-radius: var(--pd-control-radius);
  font-size: 0.78rem;
  font-weight: 680;
  line-height: 1.1;
}

html[data-theme] :is(.profile-panel-container, .paper-main) .comparison-table {
  font-size: 0.75rem;
}

html[data-theme] :is(.profile-panel-container, .paper-main) .comparison-table th,
html[data-theme] :is(.profile-panel-container, .paper-main) .comparison-table td {
  padding: 0.4rem 0.52rem;
}

html[data-theme] :is(.profile-panel-container, .paper-main) .comparison-table .category-header {
  padding: 0.42rem 0.55rem;
  font-size: 0.72rem;
}

html[data-theme] :is(.profile-panel-container, .paper-main) .premium-plans-container {
  margin-top: 0.75rem;
}

html[data-theme] :is(.profile-panel-container, .paper-main) .premium-plan-row {
  gap: 0.7rem;
}

html[data-theme] :is(.profile-panel-container, .paper-main) .premium-plan-column {
  min-width: 13rem;
}

html[data-theme] :is(.profile-panel-container, .paper-main) .premium-plan-card {
  padding: 0.85rem;
  border-radius: var(--pd-card-radius);
}

html[data-theme] :is(.profile-panel-container, .paper-main) .premium-plan-title {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

html[data-theme] :is(.profile-panel-container, .paper-main) .premium-plan-price {
  margin-bottom: 0.7rem;
  font-size: 1.4rem;
}

html[data-theme] :is(.profile-panel-container, .paper-main) .premium-plan-button {
  width: auto;
  margin: 0.45rem auto;
  padding: 0.48rem 0.9rem;
  border-radius: var(--pd-control-radius);
  font-size: 0.78rem;
}

html[data-theme] :is(.profile-panel-container, .paper-main) .payment-method-icon-button {
  padding: 0.45rem;
  font-size: 0.7rem;
}

html[data-theme] :is(
  .subscription-history-modal,
  .transactions-center-modal,
  .inst-billing-history-modal,
  .quota-transaction-history-modal
) {
  min-width: min(46rem, 92vw);
  min-height: 68vh;
  max-height: 86vh;
  border-radius: 0.9rem;
  font-size: 0.78rem;
}

html[data-theme] :is(
  .subscription-history-modal-header,
  .transactions-center-modal-header,
  .inst-billing-history-modal-header,
  .quota-transaction-history-modal-header
) {
  padding: 0.75rem 1rem;
}

html[data-theme] :is(
  .subscription-history-modal-header h3,
  .transactions-center-modal-header h3,
  .inst-billing-history-modal-header h3,
  .quota-transaction-history-modal-header h3
) {
  font-size: 1.05rem;
}

html[data-theme] .transactions-center-tabs {
  gap: 0.35rem;
  padding: 0.65rem 1rem 0;
}

html[data-theme] .transactions-center-tab {
  padding: 0.38rem 0.7rem;
  font-size: 0.75rem;
}

html[data-theme] .consent-modal-container {
  width: min(90vw, 42rem);
  max-height: 84vh;
  border-radius: 0.9rem;
}

html[data-theme] .consent-modal-header,
html[data-theme] .consent-modal-footer {
  padding: 0.75rem 1rem;
}

html[data-theme] .consent-modal-content {
  padding: 0.85rem 1rem;
}

html[data-theme] .consent-modal-title {
  font-size: 1rem;
}

html[data-theme] .consent-section-title {
  font-size: 0.83rem;
}

html[data-theme] .consent-text,
html[data-theme] .consent-list,
html[data-theme] .consent-checkbox-label {
  font-size: 0.77rem;
}

/* Copilot and shared sidebar surfaces. */
html[data-theme] .chat-sidebar,
html[data-theme] .chat-main {
  font-size: 0.82rem;
}

html[data-theme] .chat-message-input-form {
  border-radius: 0.75rem;
}

html[data-theme] .message-card {
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.82rem;
}

html[data-theme] .msg-tools-dropdown-menu,
html[data-theme] .search-results {
  border-radius: 0.68rem;
}

html[data-theme] .msg-tools-dropdown-item,
html[data-theme] .search-result-item {
  padding: 0.5rem 0.65rem;
  font-size: 0.78rem;
}

html[data-theme] .resize-handle {
  width: 0.6rem;
}

/* Responsive floor: compact desktop, touch-friendly mobile. */
@media (max-width: 768px) {
  html[data-theme] {
    --pd-control-height: 2.45rem;
    --pd-panel-font-size: 0.88rem;
    --pd-title-size: 1.2rem;
  }

  html[data-theme] :is(
    .paper-market-container,
    .examer-panel-result-container,
    .peditor-panel-result-container,
    .assess-paper-record-result-container,
    .user-group-panel-container,
    .quota-page-container,
    .approvals-page,
    .approval-queue,
    .inst-plan,
    .inst-admin
  ) {
    padding: 0.7rem;
  }

  html[data-theme] .inst-plan__layout {
    grid-template-columns: 1fr;
  }

  html[data-theme] :is(
    .user-setting-container,
    .subscription-details-container,
    .feedback-container,
    .assistant-form-container,
    .add-conv-container
  ) {
    width: 94vw;
    max-height: 88vh;
  }

  html[data-theme] :is(
    .subscription-history-modal,
    .transactions-center-modal,
    .inst-billing-history-modal,
    .quota-transaction-history-modal
  ) {
    min-width: 94vw;
    width: 94vw;
    min-height: auto;
    max-height: 84vh;
  }
}

/* ---------------------------------------------------------------------------
   Editorial white palette and complete component-state harmonisation.
   ------------------------------------------------------------------------- */
html[data-theme='light'] {
  --pd-canvas: #edf6f8;
  --pd-canvas-soft: #f5fafb;
  --pd-surface: #ffffff;
  --pd-surface-soft: #f6fafb;
  --pd-surface-tint: #eaf4f6;
  --pd-surface-tint-strong: #dcecef;
  --pd-border: #d3e2e6;
  --pd-border-strong: #b7cdd4;
  --pd-text: #17313a;
  --pd-text-muted: #58717a;
  --pd-text-subtle: #789099;
  --pd-primary: #216f87;
  --pd-primary-hover: #195b70;
  --pd-primary-soft: #e4f1f4;
  --pd-success: #237653;
  --pd-success-soft: #e7f4ee;
  --pd-warning: #9a6615;
  --pd-warning-soft: #fff4dc;
  --pd-danger: #b34242;
  --pd-danger-hover: #943535;
  --pd-danger-soft: #faecec;
  --pd-shadow-sm: 0 1px 2px rgba(29, 69, 82, 0.07);
  --pd-shadow-md: 0 8px 24px rgba(29, 69, 82, 0.10);
  --pd-shadow-lg: 0 20px 54px rgba(29, 69, 82, 0.16);
  --pd-focus: 0 0 0 3px rgba(33, 111, 135, 0.18);

  /* Replace the legacy violet-glass tokens for all remaining dashboard panels. */
  --ep-panel-glass: var(--pd-surface);
  --ep-panel-glass-soft: var(--pd-surface-soft);
  --ep-panel-glass-border: var(--pd-border);
  --ep-panel-glass-glow: var(--pd-shadow-md);
  --ep-panel-glass-glow-strong: var(--pd-shadow-lg);
  --ep-panel-card: var(--pd-surface-soft);
  --ep-panel-card-strong: var(--pd-surface);
  --ep-panel-card-border: var(--pd-border);
  --ep-panel-header: linear-gradient(180deg, #ffffff, #f6fafb);
  --ep-panel-teal-05: var(--pd-surface-soft);
  --ep-panel-teal-10: var(--pd-primary-soft);
  --ep-panel-teal-16: var(--pd-surface-tint-strong);
  --ep-panel-title-grad: none;
}

html[data-theme='light'] .paper-main {
  color: var(--pd-text);
  background:
    radial-gradient(circle at 10% 0%, rgba(66, 139, 157, 0.10), transparent 32rem),
    linear-gradient(145deg, var(--pd-canvas-soft), var(--pd-canvas));
}

html[data-theme='light'] :is(
  .paper-market-title,
  .examer-panel-result-title,
  .peditor-panel-result-title,
  .assess-paper-record-result-title,
  .user-group-panel-title
) {
  width: auto;
  color: var(--pd-text);
  background: none;
  -webkit-text-fill-color: currentColor;
}

/* Major pages, cards, sections, and modal shells. */
html[data-theme='light'] :is(
  .paper-market-search-form,
  .paper-market-table-section,
  .paper-market-summary-container,
  .examer-panel-result-search-form,
  .examer-panel-result-table-container,
  .examer-panel-table-section,
  .examer-panel-summary-container,
  .peditor-panel-result-search-form,
  .peditor-panel-table-section,
  .peditor-panel-summary-container,
  .assess-paper-record-result-search-form,
  .assess-paper-record-table-section,
  .assess-paper-record-summary-container,
  .user-group-list-container,
  .users-in-group-container,
  .approval-panel,
  .approval-queue__list,
  .approval-queue__detail,
  .approvals-section,
  .quota-page-pricing-card,
  .quota-page-form-container,
  .quota-page-price-breakdown-container,
  .quota-page-display-card,
  .inst-hero,
  .inst-summary-card,
  .inst-config,
  .inst-quote,
  .inst-invoice,
  .inst-sub-section,
  .inst-admin__summary,
  .inst-admin__invite,
  .chat-sidebar,
  .chat-main
) {
  color: var(--pd-text);
  background: var(--pd-surface);
  border: 1px solid var(--pd-border);
  box-shadow: var(--pd-shadow-md);
}

html[data-theme='light'] :is(
  .paper-market-summary-item,
  .paper-market-summary-stat,
  .paper-market-preview-item,
  .paper-market-comment-item,
  .examer-panel-summary-item,
  .examer-panel-summary-stat,
  .peditor-panel-summary-item,
  .peditor-panel-summary-stat,
  .peditor-panel-preview-item,
  .assess-paper-record-summary-item,
  .assess-paper-record-summary-stat,
  .approval-chain__step,
  .approval-selected__chip,
  .approval-history__item,
  .approval-queue__row,
  .quota-page-breakdown-item,
  .quota-page-item,
  .inst-admin__notice,
  .user-paper-metric-item,
  .message-card,
  .file-bar
) {
  color: var(--pd-text);
  background: var(--pd-surface-soft);
  border-color: var(--pd-border);
  box-shadow: var(--pd-shadow-sm);
}

html[data-theme='light'] :is(
  .paper-market-summary-section-container,
  .peditor-panel-summary-section-container,
  .paper-market-summary-description,
  .paper-market-summary-instruction,
  .paper-market-summary-download-settings,
  .peditor-panel-summary-description,
  .peditor-panel-summary-download-settings,
  .user-group-description,
  .approval-notice,
  .quota-page-collective-note,
  .ai-usage-totals
) {
  color: var(--pd-text-muted);
  background: var(--pd-surface-tint);
  border: 1px solid var(--pd-border);
}

/* Form controls and dropdowns. */
html[data-theme='light'] :is(
  .paper-main,
  .profile-panel-container,
  .user-setting-container,
  .subscription-details-container,
  .feedback-container,
  .consent-modal-container,
  .subscription-history-modal,
  .transactions-center-modal,
  .inst-billing-history-modal,
  .quota-transaction-history-modal
) :is(input:not([type='checkbox']):not([type='radio']), select, textarea:not(.chat-form-control), .form-control, .form-select) {
  color: var(--pd-text) !important;
  caret-color: var(--pd-primary);
  background-color: var(--pd-surface) !important;
  border: 1px solid var(--pd-border-strong) !important;
  box-shadow: var(--pd-shadow-sm);
}

html[data-theme='light'] :is(
  .paper-main,
  .profile-panel-container,
  .user-setting-container,
  .subscription-details-container,
  .feedback-container,
  .consent-modal-container,
  .subscription-history-modal,
  .transactions-center-modal,
  .inst-billing-history-modal,
  .quota-transaction-history-modal
) :is(input:not([type='checkbox']):not([type='radio']), select, textarea:not(.chat-form-control), .form-control, .form-select):hover {
  border-color: #8fb5c0 !important;
}

html[data-theme='light'] :is(
  .paper-main,
  .profile-panel-container,
  .user-setting-container,
  .subscription-details-container,
  .feedback-container,
  .consent-modal-container,
  .subscription-history-modal,
  .transactions-center-modal,
  .inst-billing-history-modal,
  .quota-transaction-history-modal
) :is(input:not([type='checkbox']):not([type='radio']), select, textarea:not(.chat-form-control), .form-control, .form-select):focus {
  outline: none;
  border-color: var(--pd-primary) !important;
  box-shadow: var(--pd-focus) !important;
}

html[data-theme='light'] :is(
  .paper-main,
  .profile-panel-container,
  .user-setting-container,
  .subscription-details-container
) :is(input, textarea)::placeholder {
  color: var(--pd-text-subtle) !important;
}

html[data-theme='light'] :is(
  .paper-main,
  .profile-panel-container,
  .user-setting-container,
  .subscription-details-container
) select option,
html[data-theme='light'] :is(
  .approval-picker__dropdown,
  .user-group-panel-suggestions,
  .paper-market-author-suggestion,
  .msg-tools-dropdown-menu,
  .search-results
) {
  color: var(--pd-text);
  background: var(--pd-surface);
  border-color: var(--pd-border);
  box-shadow: var(--pd-shadow-md);
}

html[data-theme='light'] :is(
  .approval-picker__item,
  .user-group-panel-suggestion-item,
  .paper-market-author-suggestion-item,
  .msg-tools-dropdown-item,
  .search-result-item
):hover {
  color: var(--pd-primary-hover);
  background: var(--pd-primary-soft);
}

/* Professional button hierarchy. */
html[data-theme='light'] :is(
  .paper-market-comment-submit,
  .paper-payment-confirm-btn,
  .examer-panel-form-button:not(.cancel),
  .user-group-panel-button,
  .user-group-panel-add-button,
  .approval-btn--primary,
  .approval-btn--approve,
  .quota-page-checkout-button,
  .ai-usage-export-btn,
  .inst-btn--primary,
  .inst-admin__btn--primary,
  .premium-plan-button,
  .assistant-form-button:not(.btn-secondary),
  #settings-form .btn-info,
  .feedback-container .btn-info,
  .consent-btn.btn-success
) {
  color: #ffffff !important;
  background: var(--pd-primary) !important;
  border: 1px solid var(--pd-primary) !important;
  box-shadow: 0 3px 10px rgba(33, 111, 135, 0.20);
}

html[data-theme='light'] :is(
  .paper-market-comment-submit,
  .paper-payment-confirm-btn,
  .examer-panel-form-button:not(.cancel),
  .user-group-panel-button,
  .user-group-panel-add-button,
  .approval-btn--primary,
  .approval-btn--approve,
  .quota-page-checkout-button,
  .ai-usage-export-btn,
  .inst-btn--primary,
  .inst-admin__btn--primary,
  .premium-plan-button,
  .assistant-form-button:not(.btn-secondary),
  #settings-form .btn-info,
  .feedback-container .btn-info,
  .consent-btn.btn-success
):hover:not(:disabled) {
  color: #ffffff !important;
  background: var(--pd-primary-hover) !important;
  border-color: var(--pd-primary-hover) !important;
  box-shadow: 0 5px 14px rgba(33, 111, 135, 0.25);
  transform: translateY(-1px);
}

html[data-theme='light'] :is(
  .paper-market-action-button,
  .paper-market-summary-action-btn,
  .examer-panel-result-action-btn,
  .examer-panel-summary-action-btn,
  .peditor-panel-result-action-btn,
  .peditor-panel-summary-action-btn,
  .assess-paper-record-result-action-btn,
  .assess-paper-record-summary-action-btn,
  .user-group-panel-action-btn,
  .approval-btn:not(.approval-btn--primary):not(.approval-btn--approve):not(.approval-btn--danger),
  .approvals-table__btn,
  .quota-page-reset-button,
  .quota-transaction-history-clear-filters-btn,
  .inst-btn:not(.inst-btn--primary):not(.inst-btn--danger),
  .inst-admin__btn:not(.inst-admin__btn--primary),
  .inst-billing-history-clear-filters-btn,
  .transactions-center-tab,
  .payment-method-icon-button,
  .assistant-form-button.btn-secondary,
  #settings-form .btn-secondary,
  .feedback-container .btn-secondary,
  .consent-btn.btn-secondary,
  .consent-btn.btn-outline-secondary
) {
  color: var(--pd-primary-hover) !important;
  background: var(--pd-surface) !important;
  border: 1px solid var(--pd-border-strong) !important;
  box-shadow: var(--pd-shadow-sm);
}

html[data-theme='light'] :is(
  .paper-market-action-button,
  .paper-market-summary-action-btn,
  .examer-panel-result-action-btn,
  .examer-panel-summary-action-btn,
  .peditor-panel-result-action-btn,
  .peditor-panel-summary-action-btn,
  .assess-paper-record-result-action-btn,
  .assess-paper-record-summary-action-btn,
  .user-group-panel-action-btn,
  .approval-btn:not(.approval-btn--primary):not(.approval-btn--approve):not(.approval-btn--danger),
  .approvals-table__btn,
  .quota-page-reset-button,
  .quota-transaction-history-clear-filters-btn,
  .inst-btn:not(.inst-btn--primary):not(.inst-btn--danger),
  .inst-admin__btn:not(.inst-admin__btn--primary),
  .inst-billing-history-clear-filters-btn,
  .transactions-center-tab,
  .payment-method-icon-button,
  .assistant-form-button.btn-secondary,
  #settings-form .btn-secondary,
  .feedback-container .btn-secondary,
  .consent-btn.btn-secondary,
  .consent-btn.btn-outline-secondary
):hover:not(:disabled) {
  color: var(--pd-primary-hover) !important;
  background: var(--pd-primary-soft) !important;
  border-color: var(--pd-primary) !important;
  box-shadow: 0 4px 12px rgba(33, 111, 135, 0.14);
  transform: translateY(-1px);
}

html[data-theme='light'] :is(
  .paper-market-delete-comment-btn,
  .approval-btn--danger,
  .approval-selected__remove,
  .inst-btn--danger,
  .inst-btn--danger-ghost,
  .user-setting-container .btn-danger,
  .user-setting-container .btn-outline-danger,
  .consent-modal-container .btn-danger,
  .consent-modal-container .btn-outline-danger
) {
  color: var(--pd-danger) !important;
  background: var(--pd-danger-soft) !important;
  border: 1px solid #e3b1b1 !important;
}

html[data-theme='light'] :is(
  .paper-market-delete-comment-btn,
  .approval-btn--danger,
  .approval-selected__remove,
  .inst-btn--danger,
  .inst-btn--danger-ghost,
  .user-setting-container .btn-danger,
  .user-setting-container .btn-outline-danger,
  .consent-modal-container .btn-danger,
  .consent-modal-container .btn-outline-danger
):hover:not(:disabled) {
  color: #ffffff !important;
  background: var(--pd-danger) !important;
  border-color: var(--pd-danger) !important;
}

html[data-theme='light'] :is(
  .paper-main,
  .profile-panel-container,
  .user-setting-container,
  .subscription-details-container,
  .feedback-container,
  .consent-modal-container
) button:disabled {
  color: var(--pd-text-subtle) !important;
  background: var(--pd-surface-tint) !important;
  border-color: var(--pd-border) !important;
  box-shadow: none !important;
  opacity: 0.68;
  transform: none !important;
  cursor: not-allowed;
}

html[data-theme='light'] :is(
  .paper-main,
  .profile-panel-container,
  .user-setting-container,
  .subscription-details-container,
  .feedback-container,
  .consent-modal-container
) :is(button, input, select, textarea):focus-visible {
  outline: 2px solid var(--pd-primary);
  outline-offset: 2px;
}

/* Tabs, active rows, and status indicators. */
html[data-theme='light'] :is(
  .examer-panel-tabs,
  .peditor-panel-summary-tabs,
  .user-group-panel-tabs,
  .user-paper-status-tabs,
  .transactions-center-tabs,
  .ai-usage-toggle-group,
  .inst-admin__switcher
) {
  background: var(--pd-surface-tint);
  border-color: var(--pd-border);
}

html[data-theme='light'] :is(
  .examer-panel-tab-link,
  .peditor-panel-summary-tab-link,
  .user-group-panel-tab,
  .user-paper-status-tab-link,
  .transactions-center-tab,
  .ai-usage-toggle-btn,
  .inst-admin__switch
) {
  color: var(--pd-text-muted);
  background: transparent;
  border-color: transparent;
}

html[data-theme='light'] :is(
  .examer-panel-tab-link,
  .peditor-panel-summary-tab-link,
  .user-group-panel-tab,
  .user-paper-status-tab-link,
  .transactions-center-tab,
  .ai-usage-toggle-btn,
  .inst-admin__switch
):hover {
  color: var(--pd-primary-hover);
  background: rgba(255, 255, 255, 0.72);
}

html[data-theme='light'] :is(
  .examer-panel-tab-link.active,
  .peditor-panel-summary-tab-link.active,
  .user-group-panel-tab.active,
  .user-paper-status-tab-link.active,
  .transactions-center-tab.active,
  .ai-usage-toggle-btn.active,
  .inst-admin__switch.is-active
) {
  color: var(--pd-primary-hover) !important;
  background: var(--pd-surface) !important;
  border-color: var(--pd-border) !important;
  box-shadow: var(--pd-shadow-sm);
}

html[data-theme='light'] :is(
  .paper-market-selected-row,
  .examer-panel-selected-row,
  .peditor-panel-selected-row,
  .assess-paper-record-selected-row,
  .user-group-panel-table-body tr.selected,
  .approval-queue__row.is-selected,
  .approvals-table tbody tr.is-expanded
) {
  color: var(--pd-text);
  background: var(--pd-primary-soft) !important;
  border-left-color: var(--pd-primary);
}

html[data-theme='light'] :is(
  .approval-status-badge[data-status='approved'],
  .user-paper-status-pill.completed,
  .user-paper-status-pill.assessed,
  .quota-transaction-history-status-succeeded
) {
  color: var(--pd-success);
  background: var(--pd-success-soft);
  border-color: #a7d2c0;
}

html[data-theme='light'] :is(
  .approval-status-badge[data-status='in_review'],
  .user-paper-status-pill.incomplete,
  .quota-transaction-history-status-pending
) {
  color: var(--pd-warning);
  background: var(--pd-warning-soft);
  border-color: #e5c889;
}

html[data-theme='light'] :is(
  .approval-status-badge[data-status='changes_requested'],
  .user-paper-status-pill.not-submitted,
  .user-paper-status-pill.not-assessed,
  .quota-transaction-history-status-failed
) {
  color: var(--pd-danger);
  background: var(--pd-danger-soft);
  border-color: #e3b1b1;
}

/* Tables and muted hierarchy. */
html[data-theme='light'] :is(
  .paper-market-table-header,
  .examer-panel-result-table-header,
  .examer-panel-form-table-header,
  .peditor-panel-result-table-header,
  .assess-paper-record-result-table-header,
  .user-group-panel-table-header,
  .user-paper-status-table-header,
  .approvals-table thead,
  .quota-transaction-history-table-header,
  .subscription-history-table-header,
  .inst-billing-history-table-header
) {
  color: var(--pd-primary-hover);
  background: linear-gradient(180deg, var(--pd-surface), var(--pd-surface-soft));
  border-color: var(--pd-border);
  box-shadow: 0 2px 8px rgba(29, 69, 82, 0.06);
}

html[data-theme='light'] :is(
  .paper-market-table-body tr,
  .examer-panel-result-table-body tr,
  .examer-panel-form-table-body tr,
  .peditor-panel-result-table-body tr,
  .assess-paper-record-result-table-body tr,
  .user-group-panel-table-body tr,
  .user-paper-status-table-body tr,
  .approvals-table tbody tr,
  .quota-transaction-history-table-body tr,
  .subscription-history-table-body tr,
  .inst-billing-history-table-body tr
) {
  color: var(--pd-text);
  background: var(--pd-surface);
  border-color: var(--pd-border);
}

html[data-theme='light'] :is(
  .paper-market-table-body tr,
  .examer-panel-result-table-body tr,
  .examer-panel-form-table-body tr,
  .peditor-panel-result-table-body tr,
  .assess-paper-record-result-table-body tr,
  .user-group-panel-table-body tr,
  .user-paper-status-table-body tr,
  .approvals-table tbody tr,
  .quota-transaction-history-table-body tr,
  .subscription-history-table-body tr,
  .inst-billing-history-table-body tr
):hover {
  background: var(--pd-primary-soft);
}

html[data-theme='light'] :is(
  .paper-market-summary-label,
  .paper-market-comment-date,
  .paper-market-preview-note,
  .examer-panel-summary-label,
  .peditor-panel-summary-label,
  .assess-paper-record-summary-label,
  .approval-panel__hint,
  .approval-queue__row-meta,
  .approval-queue__detail-meta,
  .approvals-table__muted,
  .approvals-table__sub,
  .quota-page-description,
  .quota-transaction-history-note,
  .inst-plan__subtitle,
  .inst-summary-card__note,
  .inst-admin__subtitle,
  .inst-admin__hint,
  .inst-admin__org-meta,
  .user-group-description-text,
  .user-paper-metric-label,
  .subscription-history-note
) {
  color: var(--pd-text-muted);
}

/* Profile, subscription, and transaction modal palette. */
html[data-theme='light'] :is(
  .user-setting-modal,
  .subscription-details-modal,
  .subscription-history-modal-backdrop,
  .transactions-center-modal-backdrop,
  .consent-modal-overlay,
  .inst-billing-history-modal-backdrop,
  .quota-transaction-history-modal-backdrop,
  .examer-panel-form-modal-overlay
) {
  background: rgba(20, 45, 54, 0.48);
  backdrop-filter: blur(7px);
}

html[data-theme='light'] :is(
  .user-setting-container,
  .subscription-details-container,
  .feedback-container,
  .assistant-form-container,
  .add-conv-container,
  .subscription-history-modal,
  .transactions-center-modal,
  .consent-modal-container,
  .inst-billing-history-modal,
  .quota-transaction-history-modal,
  .examer-panel-form-container,
  .examer-panel-form-container-peditor-paper
) {
  color: var(--pd-text);
  background: var(--pd-surface);
  border: 1px solid var(--pd-border);
  box-shadow: var(--pd-shadow-lg);
}

html[data-theme='light'] :is(
  .user-setting-header,
  .subscription-history-modal-header,
  .transactions-center-modal-header,
  .consent-modal-header,
  .consent-modal-footer,
  .inst-billing-history-modal-header,
  .quota-transaction-history-modal-header,
  .examer-panel-form-button-container
) {
  color: var(--pd-text);
  background: var(--pd-surface-tint);
  border-color: var(--pd-border);
}

html[data-theme='light'] :is(.profile-panel-container, .paper-main) .comparison-table {
  color: var(--pd-text);
  background: var(--pd-surface);
  border: 1px solid var(--pd-border);
  box-shadow: var(--pd-shadow-sm);
}

html[data-theme='light'] :is(.profile-panel-container, .paper-main) .comparison-table th {
  color: var(--pd-primary-hover);
  background: var(--pd-surface-tint-strong);
  border-color: var(--pd-border-strong);
}

html[data-theme='light'] :is(.profile-panel-container, .paper-main) .comparison-table td {
  color: var(--pd-text);
  background: var(--pd-surface);
  border-color: var(--pd-border);
}

html[data-theme='light'] :is(.profile-panel-container, .paper-main) .comparison-table .category-header {
  color: var(--pd-primary-hover) !important;
  background: var(--pd-primary-soft);
}

html[data-theme='light'] :is(
  .profile-panel-container .premium-plan-card,
  .paper-main .premium-plan-card,
  .subscription-transaction-card .card,
  .profile-panel-container .payment-method-icon-button,
  .paper-main .payment-method-icon-button
) {
  color: var(--pd-text);
  background: var(--pd-surface-soft) !important;
  border-color: var(--pd-border);
  box-shadow: var(--pd-shadow-sm);
}

html[data-theme='light'] :is(.profile-panel-container, .paper-main) .premium-plan-card-featured {
  background: var(--pd-primary-soft) !important;
  border-color: var(--pd-primary);
}

html[data-theme='light'] :is(.profile-panel-container, .paper-main) .premium-plan-badge {
  color: #ffffff;
  background: var(--pd-primary);
}

/* Copilot, sidebar, mobile navigation, and resizer polish. */
html[data-theme='light'] :is(
  .chat-message-input-form,
  .message-main-paper-form-container,
  .assistant-form-container,
  .add-conv-container,
  .faq-container
) {
  color: var(--pd-text);
  background: var(--pd-surface);
  border-color: var(--pd-border);
  box-shadow: var(--pd-shadow-md);
}

html[data-theme='light'] .left-side-card {
  color: var(--pd-text);
  background: var(--pd-surface-soft);
  border-color: var(--pd-border);
}

html[data-theme='light'] .right-side-card {
  color: #ffffff;
  background: var(--pd-primary);
  border-color: var(--pd-primary);
}

html[data-theme='light'] :is(
  .resize-handle,
  .peditor-dashboard-resizer,
  .examer-dashboard-resizer
) {
  background: transparent;
}

html[data-theme='light'] .resize-handle::after {
  background: var(--pd-border-strong);
}

html[data-theme='light'] .resize-handle:hover::after,
html[data-theme='light'] .resize-handle:active::after {
  background: var(--pd-primary);
}

html[data-theme='light'] :is(
  .mobile-footer-navigation,
  .mobile-profile-dropdown,
  .mobile-functionality-dropdown,
  .profile-dropdown-menu
) {
  color: var(--pd-text) !important;
  background: var(--pd-surface) !important;
  border: 1px solid var(--pd-border) !important;
  box-shadow: var(--pd-shadow-lg);
}

html[data-theme='light'] :is(
  .mobile-dropdown-item,
  .mobile-functionality-dropdown-item,
  .profile-dropdown-menu .dropdown-item
) {
  color: var(--pd-text);
  background: transparent;
}

html[data-theme='light'] :is(
  .mobile-dropdown-item,
  .mobile-functionality-dropdown-item,
  .profile-dropdown-menu .dropdown-item
):hover {
  color: var(--pd-primary-hover);
  background: var(--pd-primary-soft);
}

/* Unified scrollbars for all operational dashboard panels and portalled modals. */
html[data-theme='light'] :is(
  .paper-main,
  .profile-panel-container,
  .user-setting-container,
  .subscription-details-container,
  .subscription-history-modal,
  .transactions-center-modal,
  .consent-modal-container,
  .inst-billing-history-modal,
  .quota-transaction-history-modal
) * {
  scrollbar-color: #9bbbc4 var(--pd-surface-tint);
}

html[data-theme='light'] :is(
  .paper-main,
  .profile-panel-container,
  .user-setting-container,
  .subscription-details-container,
  .subscription-history-modal,
  .transactions-center-modal
) *::-webkit-scrollbar-track {
  background: var(--pd-surface-tint);
}

html[data-theme='light'] :is(
  .paper-main,
  .profile-panel-container,
  .user-setting-container,
  .subscription-details-container,
  .subscription-history-modal,
  .transactions-center-modal
) *::-webkit-scrollbar-thumb {
  background: #9bbbc4;
  border: 2px solid var(--pd-surface-tint);
  border-radius: 999px;
}

/* =============================================================================
   Peditor EDITOR dashboard — landing-page glass + gradient atmosphere (LIGHT)
   -----------------------------------------------------------------------------
   This is the deep paper-editor (PeditorPanel/Dashboard/**): the split
   Overview (left, the element tree) + Property-Settings (right, the form) view,
   plus its sub-components (BasicInfo / QuestionSetUp / ContextMaterials /
   GeneralSettings tabs). theme-light.css already made it *readable* (white
   inputs, dark text, light scrollbars) but it still wears the old grey tone:
   #333 toggle bars, grey `--ep-surface` panels, near-invisible
   rgba(255,255,255,.05) section cards, dark-blue (#2a3f54) hierarchical selects
   and a dark template modal.

   This layer carries the same frosted-glass + teal/violet treatment used for the
   list panels (theme-light-panels.css) into the editor: a colour-mesh shell, a
   single glass editor card holding two transparent panes, frosted element-tree
   bars, real white section cards, teal collapsible headers, themed tabs, and
   light-glass dialogs. Reuses the --ep-panel-* tokens defined (light-only) in
   theme-light-panels.css. Every rule is gated html[data-theme='light']; dark
   mode is untouched. Imported after theme-light-panels.css (see index.tsx).
   ============================================================================= */

/* -----------------------------------------------------------------------------
   1. Shell — colour mesh + frosted header + one glass editor card.
   --------------------------------------------------------------------------- */
html[data-theme='light'] .peditor-dashboard-outside-container {
  background:
    radial-gradient(ellipse 70% 55% at 12% 8%, rgba(47, 158, 194, 0.13) 0%, transparent 55%),
    radial-gradient(ellipse 64% 58% at 90% 16%, rgba(124, 92, 240, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse 60% 64% at 82% 92%, rgba(0, 180, 220, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 68% 56% at 16% 94%, rgba(99, 102, 241, 0.07) 0%, transparent 55%),
    linear-gradient(160deg, #eef2fb 0%, #e8edf7 50%, #eaf1f6 100%);
}

/* Top header bar → frosted near-white (was --ep-surface + a #5f5e5e rule). */
html[data-theme='light'] .peditor-dashboard-container-header {
  background: var(--ep-panel-header);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--ep-border);
  box-shadow: 0 2px 14px rgba(47, 158, 194, 0.08);
}

/* The big editor surface → one glass card holding both panes (the live layout
   is `.peditor-dashboard-container` > overview-panel + settings-panel;
   `.peditor-dashboard-form` is legacy but covered for safety). A subtle teal
   glow + bright top edge replaces the flat grey fill / 2px neon border.

   NOTE: deliberately NO backdrop-filter here — the element-tree add-menu is
   `position: fixed` (positioned by JS viewport coords) and a backdrop-filter
   ancestor would become its containing block and mis-place it. A slightly more
   opaque translucent fill keeps the card look while the mesh shows through. */
html[data-theme='light'] .peditor-dashboard-form,
html[data-theme='light'] .peditor-dashboard-container {
  background: linear-gradient(150deg,
      rgba(255, 255, 255, 0.9) 0%,
      rgba(255, 255, 255, 0.72) 58%,
      rgba(124, 92, 240, 0.07) 130%);
  border: 1px solid var(--ep-panel-glass-border);
  box-shadow: var(--ep-panel-glass-glow-strong);
}
/* Round the live container's corners (no margin — it's a width:100% flex item,
   so margins would overflow the column; the radius alone gives the card feel). */
html[data-theme='light'] .peditor-dashboard-container {
  border-radius: 14px;
}

/* The two panes inside the glass card → transparent (no card-in-card); the
   resizer + a faint divider separate them. (overview/settings/paper-overview
   classes all set their own grey surface — null them out here.) */
html[data-theme='light'] .peditor-dashboard-overview,
html[data-theme='light'] .peditor-dashboard-overview-panel,
html[data-theme='light'] .peditor-dashboard-settings,
html[data-theme='light'] .peditor-dashboard-settings-panel,
html[data-theme='light'] .property-settings,
html[data-theme='light'] .paper-overview {
  background-color: transparent;
}
html[data-theme='light'] .peditor-dashboard-overview,
html[data-theme='light'] .peditor-dashboard-overview-panel {
  border-right: 1px solid rgba(47, 158, 194, 0.18);
}
html[data-theme='light'] .peditor-dashboard-settings-panel {
  border-right: none;
}

/* Sticky in-pane headers → frosted near-white so list/form scroll cleanly
   beneath them (were opaque grey --ep-surface bars). */
html[data-theme='light'] .peditor-dashboard-overview-header,
html[data-theme='light'] .peditor-dashboard-property-settings-header,
html[data-theme='light'] .peditor-dashboard-filters-container {
  background: var(--ep-panel-header);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--ep-border);
}

/* Wallet chip + back button → glass pills with a teal tint. */
html[data-theme='light'] .peditor-dashboard-wallet-balance {
  background: var(--ep-panel-teal-10);
  border: 1px solid rgba(47, 158, 194, 0.3);
}
html[data-theme='light'] .peditor-dashboard-back-button {
  background-color: var(--ep-panel-teal-10);
}
html[data-theme='light'] .peditor-dashboard-back-button:hover {
  background-color: var(--ep-panel-teal-16);
}

/* Loading overlay card → frosted light (was rgba(30,30,30,.7)). */
html[data-theme='light'] .peditor-dashboard-loading-content {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(245, 248, 252, 0.88));
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--ep-panel-glass-border);
  box-shadow: 0 24px 60px rgba(47, 158, 194, 0.18);
}

/* -----------------------------------------------------------------------------
   2. Overview — the element tree (collapsible toggle bars).
   --------------------------------------------------------------------------- */
/* Level-1 bars → frosted white cards with a soft shadow + teal hover accent
   (base = #333 / rgba(47,47,47,.95); theme-light had flattened them to grey). */
html[data-theme='light'] .peditor-dashboard-toggle-bar,
html[data-theme='light'] .toggle-bar {
  background: var(--ep-panel-card-strong);
  border: 1px solid var(--ep-panel-card-border);
  box-shadow: var(--ep-shadow-sm);
}
html[data-theme='light'] .peditor-dashboard-toggle-bar:hover,
html[data-theme='light'] .toggle-bar:hover {
  background: #ffffff;
  border-color: rgba(47, 158, 194, 0.35);
}
html[data-theme='light'] .peditor-dashboard-toggle-bar.expanded,
html[data-theme='light'] .peditor-dashboard-toggle-bar.active.expanded {
  background: var(--ep-panel-teal-05);
}

/* Nested levels → progressively lighter tints (were 47/73/96 greys). */
html[data-theme='light'] .peditor-dashboard-nested-elements >
  .peditor-dashboard-element-container > .peditor-dashboard-toggle-bar {
  background: rgba(255, 255, 255, 0.7);
}
html[data-theme='light'] .peditor-dashboard-nested-elements >
  .peditor-dashboard-element-container >
  .peditor-dashboard-nested-elements >
  .peditor-dashboard-element-container > .peditor-dashboard-toggle-bar {
  background: rgba(255, 255, 255, 0.55);
}
html[data-theme='light'] .peditor-dashboard-nested-elements {
  border-left: 2px solid rgba(47, 158, 194, 0.2);
}

/* Selected bar → vivid teal→violet gradient + white label (was flat glow). */
html[data-theme='light'] .peditor-dashboard-toggle-bar.selected,
html[data-theme='light'] .toggle-bar.selected {
  background: linear-gradient(135deg, var(--ep-accent-2) 0%, #1f7fb0 55%, var(--ep-panel-violet) 130%);
  color: #ffffff;
  border-color: transparent;
}
html[data-theme='light'] .peditor-dashboard-toggle-bar.selected *,
html[data-theme='light'] .toggle-bar.selected * {
  color: #ffffff;
}
/* Active (not selected) keeps a teal left rail. */
html[data-theme='light'] .peditor-dashboard-toggle-bar.active {
  border-left: 5px solid var(--ep-accent);
}

/* Add-menu popover + its little arrow → frosted light + teal border. */
html[data-theme='light'] .peditor-dashboard-add-menu,
html[data-theme='light'] .add-menu {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.97), rgba(245, 248, 252, 0.95));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(47, 158, 194, 0.3);
  box-shadow: var(--ep-shadow-lg);
}
html[data-theme='light'] .peditor-dashboard-add-menu:before {
  border-right-color: rgba(255, 255, 255, 0.97);
}
html[data-theme='light'] .peditor-dashboard-add-menu button:hover,
html[data-theme='light'] .add-menu button:hover {
  background: var(--ep-panel-teal-10);
  color: var(--ep-accent-2);
}

/* Filter select + options → white field, white list (was #333). */
html[data-theme='light'] .peditor-dashboard-filter-select {
  background-color: rgba(255, 255, 255, 0.8);
  border-color: rgba(47, 158, 194, 0.3);
  color: var(--ep-text);
}
html[data-theme='light'] .peditor-dashboard-filter-select:hover {
  background-color: #ffffff;
}
html[data-theme='light'] .peditor-dashboard-filter-select option {
  background-color: #ffffff;
  color: var(--ep-text);
}

/* -----------------------------------------------------------------------------
   3. Property-Settings — section cards, tabs, collapsible headers.
   --------------------------------------------------------------------------- */
/* Section card (was rgba(255,255,255,.05) → invisible on white). */
html[data-theme='light'] .peditor-dashboard-form-section {
  background: var(--ep-panel-card);
  border-left: 3px solid var(--ep-accent);
  border-top: 1px solid var(--ep-panel-card-border);
  border-right: 1px solid var(--ep-panel-card-border);
  border-bottom: 1px solid var(--ep-panel-card-border);
  box-shadow: var(--ep-shadow-sm);
}

/* Tabs strip — already light, but retint the green active state to the theme's
   teal→violet so it matches the rest of the white theme. */
html[data-theme='light'] .property-settings-tabs {
  border-bottom-color: var(--ep-border);
}
html[data-theme='light'] .property-settings-tab-link.active {
  color: var(--ep-accent-2);
  border-bottom-color: var(--ep-accent-2);
}
html[data-theme='light'] .property-settings-tab-link.active::after {
  background: linear-gradient(90deg, var(--ep-accent-2), var(--ep-panel-violet));
}

/* Collapsible section header (was a flat cyan 0.3 band). */
html[data-theme='light'] .property-settings-section-header {
  background: linear-gradient(135deg, rgba(47, 158, 194, 0.16), rgba(124, 92, 240, 0.10));
  border-bottom-color: rgba(47, 158, 194, 0.18);
}
html[data-theme='light'] .property-settings-section-header:hover {
  background: linear-gradient(135deg, rgba(47, 158, 194, 0.24), rgba(124, 92, 240, 0.15));
  border-bottom-color: rgba(47, 158, 194, 0.3);
}
html[data-theme='light'] .property-settings-section-divider {
  background-color: var(--ep-border);
}

/* Misc settings cards / table preview / file chips / dashed add button
   (all hard-code rgba(0,0,0,.2) → grey on white). */
html[data-theme='light'] .peditor-dashboard-table-container,
html[data-theme='light'] .peditor-dashboard-table-preview,
html[data-theme='light'] .peditor-dashboard-question-structure,
html[data-theme='light'] .peditor-dashboard-file-item {
  background: var(--ep-panel-card);
  border: 1px solid var(--ep-panel-card-border);
}
html[data-theme='light'] .peditor-dashboard-table-preview td {
  background-color: rgba(255, 255, 255, 0.5);
}
html[data-theme='light'] .peditor-dashboard-table-preview th:hover,
html[data-theme='light'] .peditor-dashboard-table-preview td:hover {
  background-color: var(--ep-panel-teal-10);
}
html[data-theme='light'] .peditor-dashboard-btn.w-100 {
  background-color: var(--ep-panel-card);
  border: 1px dashed rgba(47, 158, 194, 0.4);
}
html[data-theme='light'] .peditor-dashboard-btn.w-100:hover {
  background-color: var(--ep-panel-teal-10);
  border-color: var(--ep-accent);
}
html[data-theme='light'] .peditor-dashboard-input-sm:hover {
  background-color: var(--ep-panel-teal-05);
}
html[data-theme='light'] .peditor-dashboard-input-sm:focus {
  background-color: #ffffff;
  border-color: var(--ep-accent);
}

/* -----------------------------------------------------------------------------
   4. QuestionSetUp tab internals.
   --------------------------------------------------------------------------- */
/* Grouped inner cards (all rgba(0,0,0,.15–.2) → light frosted). */
html[data-theme='light'] .peditor-dashboard-generation-approach,
html[data-theme='light'] .generation-props-section,
html[data-theme='light'] .formulas-section,
html[data-theme='light'] .formula-item,
html[data-theme='light'] .analysis-generation-form,
html[data-theme='light'] .peditor-dashboard-option-item,
html[data-theme='light'] .peditor-dashboard-answer-item,
html[data-theme='light'] .peditor-dashboard-choice-item,
html[data-theme='light'] .peditor-model-answers-form-group,
html[data-theme='light'] .peditor-model-answers-dropdown,
html[data-theme='light'] .peditor-dashboard-no-preview-questions,
html[data-theme='light'] .peditor-structure-container,
html[data-theme='light'] .peditor-selected-path {
  background: var(--ep-panel-card);
  border: 1px solid var(--ep-panel-card-border);
}

/* Preview-question item rows (rgba(255,255,255,.02) → faint white). */
html[data-theme='light'] .peditor-dashboard-preview-question-item {
  background-color: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--ep-panel-card-border);
}
html[data-theme='light'] .peditor-dashboard-preview-questions-list {
  background-color: var(--ep-panel-teal-05);
  border-color: rgba(47, 158, 194, 0.2);
}

/* Hierarchical question <select> options (the dark-blue #2a3f54 family). The
   select face itself is already whitened by theme-light's input rule. */
html[data-theme='light'] .hierarchical-question-select option {
  background-color: #ffffff;
  color: var(--ep-text);
}
html[data-theme='light'] .hierarchical-question-select option:disabled {
  background-color: #eef2f6;
  color: var(--ep-accent-2);
}
html[data-theme='light'] .hierarchical-question-select option:hover {
  background-color: var(--ep-panel-teal-10);
}

/* Preview-question control bars (#4a90a4 solid → teal tint). */
html[data-theme='light'] .preview-question-controls,
html[data-theme='light'] .preview-question-controls-buttons {
  background-color: var(--ep-panel-teal-10);
}

/* Structure tree items + selected path → light card hovers. */
html[data-theme='light'] .peditor-structure-item:hover {
  background-color: var(--ep-panel-teal-05);
}

/* Question-template MODAL → frosted light (was dark #2c3e50 header + ep-bg body). */
html[data-theme='light'] .question-template-modal-content {
  background-color: #ffffff;
  box-shadow: 0 24px 60px rgba(47, 158, 194, 0.2);
}
html[data-theme='light'] .question-template-modal-header {
  background: linear-gradient(135deg, var(--ep-accent-2) 0%, #1f7fb0 55%, var(--ep-panel-violet) 130%);
  border-bottom: none;
}
html[data-theme='light'] .question-template-modal-header .modal-title,
html[data-theme='light'] .question-template-modal-header .modal-close-btn {
  color: #ffffff;
}
html[data-theme='light'] .question-template-modal-body {
  background: linear-gradient(160deg, #f4f7fb 0%, #eef2f8 100%);
}
html[data-theme='light'] .question-template-modal-footer {
  background-color: #ffffff;
  border-top: 1px solid var(--ep-border);
}

/* -----------------------------------------------------------------------------
   5. ContextMaterials tab internals — image/diagram card rows.
      Card containers (rgba(0,0,0,.2–.3) → light); the darker .5–.7 scrims that
      overlay actual images are left alone (they're functional dark masks).
   --------------------------------------------------------------------------- */
html[data-theme='light'] .table-dimensions-control,
html[data-theme='light'] .contextual-images-container,
html[data-theme='light'] .contextual-image-row,
html[data-theme='light'] .contextual-image-form,
html[data-theme='light'] .answer-image-row,
html[data-theme='light'] .answer-image-form,
html[data-theme='light'] .peditor-dashboard-answer-image-section,
html[data-theme='light'] .peditor-dashboard-answer-image-item,
html[data-theme='light'] .image-generation-form-container,
html[data-theme='light'] .peditor-dashboard-context-materials-drawn-diagram-row,
html[data-theme='light'] .peditor-dashboard-drawn-diagram-notes-wrapper,
html[data-theme='light'] .formatted-article {
  background-color: var(--ep-panel-card);
  border: 1px solid var(--ep-panel-card-border);
}

/* -----------------------------------------------------------------------------
   6. GeneralSettings tab — article card + input-group affix.
   --------------------------------------------------------------------------- */
html[data-theme='light'] .peditor-dashboard-input-group-text {
  background-color: var(--ep-panel-teal-10);
  color: var(--ep-accent-2);
  border-color: rgba(47, 158, 194, 0.25);
}

/* =============================================================================
   7. Editorial-white refinement
   -----------------------------------------------------------------------------
   The original glass layer mixed neutral greys, violet light and teal washes.
   This final light-only layer uses one coherent family: paper white, cool
   blue-white support surfaces and a restrained deep teal accent.
   ============================================================================= */

html[data-theme='light'] .peditor-dashboard-outside-container {
  --pl-canvas: #edf6f8;
  --pl-canvas-soft: #f5fafb;
  --pl-surface: #ffffff;
  --pl-surface-soft: #f6fafb;
  --pl-surface-tint: #eaf4f6;
  --pl-surface-strong: #dcecef;
  --pl-border: #d3e2e6;
  --pl-border-strong: #b7cdd4;
  --pl-primary: #216f87;
  --pl-primary-hover: #195b70;
  --pl-primary-soft: #e4f1f4;
  --pl-primary-softer: #f0f7f8;
  --pl-shadow-sm: 0 1px 2px rgba(29, 72, 87, 0.06), 0 3px 10px rgba(29, 72, 87, 0.045);
  --pl-shadow-md: 0 10px 28px rgba(29, 72, 87, 0.10);
  --pl-shadow-lg: 0 22px 58px rgba(29, 72, 87, 0.16);

  /* Re-map legacy component tokens inside the Peditor so old dark translucent
     layers resolve to blue-white surfaces instead of neutral grey. */
  --ep-bg: var(--pl-canvas);
  --ep-elevated: var(--pl-canvas-soft);
  --ep-surface: var(--pl-surface);
  --ep-surface-2: var(--pl-surface-soft);
  --ep-surface-3: var(--pl-surface-tint);
  --ep-border: var(--pl-border);
  --ep-border-strong: var(--pl-border-strong);
  --ep-raise-1: rgba(33, 111, 135, 0.035);
  --ep-raise-2: rgba(33, 111, 135, 0.065);
  --ep-raise-3: rgba(33, 111, 135, 0.10);
  --ep-raise-4: rgba(33, 111, 135, 0.14);
  --ep-text: #18333d;
  --ep-text-2: #526c76;
  --ep-text-3: #748b94;
  --ep-accent: #2d8aa5;
  --ep-accent-2: var(--pl-primary);
  --ep-glow: var(--pl-primary);
  --ep-accent-fade: rgba(33, 111, 135, 0.10);
  --ep-glow-a05: rgba(33, 111, 135, 0.05);
  --ep-glow-a10: rgba(33, 111, 135, 0.09);
  --ep-glow-a20: rgba(33, 111, 135, 0.15);
  --ep-glow-a30: rgba(33, 111, 135, 0.24);
  --ep-ring: 0 0 0 3px rgba(33, 111, 135, 0.18);
  --ep-shadow-sm: var(--pl-shadow-sm);
  --ep-shadow-md: var(--pl-shadow-md);
  --ep-shadow-lg: var(--pl-shadow-lg);
  --ep-panel-card: rgba(255, 255, 255, 0.94);
  --ep-panel-card-strong: #ffffff;
  --ep-panel-card-border: var(--pl-border);
  --ep-panel-header: rgba(255, 255, 255, 0.96);
  --ep-panel-teal-05: var(--pl-primary-softer);
  --ep-panel-teal-10: var(--pl-primary-soft);
  --ep-panel-teal-16: #d7ebef;
  --pd-primary: var(--pl-primary);
  --pd-primary-hover: var(--pl-primary-hover);
  --pd-primary-soft: var(--pl-primary-soft);
  --pd-control-bg: var(--pl-surface);
  --pd-control-hover: var(--pl-primary-softer);
  --pd-border: var(--pl-border);
  --pd-border-strong: var(--pl-border-strong);
  --pd-focus-ring: var(--ep-ring);

  background:
    radial-gradient(circle at 8% 0%, rgba(45, 138, 165, 0.09), transparent 34%),
    radial-gradient(circle at 96% 100%, rgba(78, 158, 171, 0.07), transparent 36%),
    linear-gradient(145deg, #f7fbfc 0%, var(--pl-canvas) 100%);
}

html[data-theme='light'] .peditor-dashboard-container-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: var(--pl-border);
  box-shadow: var(--pl-shadow-sm);
  backdrop-filter: blur(14px) saturate(115%);
}

html[data-theme='light'] .peditor-dashboard-form,
html[data-theme='light'] .peditor-dashboard-container {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(183, 205, 212, 0.76);
  box-shadow: var(--pl-shadow-md);
}

html[data-theme='light'] .peditor-dashboard-overview,
html[data-theme='light'] .peditor-dashboard-overview-panel {
  background: rgba(248, 252, 252, 0.92);
  border-right-color: var(--pl-border);
}

html[data-theme='light'] .peditor-dashboard-settings,
html[data-theme='light'] .peditor-dashboard-settings-panel,
html[data-theme='light'] .property-settings {
  background: rgba(255, 255, 255, 0.94);
}

html[data-theme='light'] .peditor-dashboard-overview-header,
html[data-theme='light'] .peditor-dashboard-property-settings-header,
html[data-theme='light'] .peditor-dashboard-filters-container {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: var(--pl-border);
  backdrop-filter: blur(12px) saturate(110%);
}

html[data-theme='light'] .peditor-dashboard-resizer {
  background: var(--pl-surface-strong);
  border-color: var(--pl-border);
}

html[data-theme='light'] .peditor-dashboard-resizer:hover,
html[data-theme='light'] .peditor-dashboard-resizer:active {
  background: var(--pl-primary-soft);
}

/* Header controls */
html[data-theme='light'] .peditor-dashboard-back-button,
html[data-theme='light'] .peditor-dashboard-header-icon-button,
html[data-theme='light'] .peditor-dashboard-action-button,
html[data-theme='light'] .peditor-dashboard-done-button.incomplete,
html[data-theme='light'] .collaboration-status {
  border-color: var(--pl-border);
  background: var(--pl-surface);
  color: var(--ep-text);
  box-shadow: none;
}

html[data-theme='light'] .peditor-dashboard-back-button:hover,
html[data-theme='light'] .peditor-dashboard-header-icon-button:hover,
html[data-theme='light'] .peditor-dashboard-action-button:hover,
html[data-theme='light'] .peditor-dashboard-done-button.incomplete:hover {
  border-color: var(--pl-border-strong);
  background: var(--pl-primary-softer);
}

html[data-theme='light'] .peditor-dashboard-preview-button,
html[data-theme='light'] .peditor-dashboard-generatiopn-btn-start,
html[data-theme='light'] .peditor-dashboard-settings .peditor-dashboard-btn-primary,
html[data-theme='light'] .peditor-dashboard-settings .peditor-publish-button {
  border-color: var(--pl-primary);
  background: var(--pl-primary);
  color: #ffffff;
  box-shadow: var(--pl-shadow-sm);
}

html[data-theme='light'] .peditor-dashboard-preview-button:hover,
html[data-theme='light'] .peditor-dashboard-generatiopn-btn-start:hover:not(:disabled),
html[data-theme='light'] .peditor-dashboard-settings .peditor-dashboard-btn-primary:hover:not(:disabled),
html[data-theme='light'] .peditor-dashboard-settings .peditor-publish-button:hover:not(:disabled) {
  border-color: var(--pl-primary-hover);
  background: var(--pl-primary-hover);
  color: #ffffff;
}

html[data-theme='light'] .peditor-dashboard-wallet-balance {
  border-color: #c6dde2;
  background: var(--pl-primary-soft);
}

/* Overview tree */
html[data-theme='light'] .peditor-dashboard-toggle-bar,
html[data-theme='light'] .toggle-bar,
html[data-theme='light'] .peditor-dashboard-nested-elements >
  .peditor-dashboard-element-container > .peditor-dashboard-toggle-bar,
html[data-theme='light'] .peditor-dashboard-nested-elements >
  .peditor-dashboard-element-container >
  .peditor-dashboard-nested-elements >
  .peditor-dashboard-element-container > .peditor-dashboard-toggle-bar {
  border-color: var(--pl-border);
  background: var(--pl-surface);
  box-shadow: var(--pl-shadow-sm);
}

html[data-theme='light'] .peditor-dashboard-toggle-bar:hover,
html[data-theme='light'] .toggle-bar:hover {
  border-color: var(--pl-border-strong);
  background: var(--pl-primary-softer);
}

html[data-theme='light'] .peditor-dashboard-toggle-bar.expanded,
html[data-theme='light'] .peditor-dashboard-toggle-bar.active.expanded,
html[data-theme='light'] .peditor-dashboard-toggle-bar.active {
  background: var(--pl-primary-soft);
}

html[data-theme='light'] .peditor-dashboard-toggle-bar.selected,
html[data-theme='light'] .toggle-bar.selected {
  border-color: var(--pl-primary);
  background: var(--pl-primary);
  color: #ffffff;
}

html[data-theme='light'] .peditor-dashboard-nested-elements {
  border-left-color: #c8dfe4;
}

html[data-theme='light'] .peditor-dashboard-filter-select,
html[data-theme='light'] .peditor-dashboard-add-menu,
html[data-theme='light'] .add-menu {
  border-color: var(--pl-border);
  background: var(--pl-surface);
  box-shadow: var(--pl-shadow-md);
}

html[data-theme='light'] .peditor-dashboard-filter-select:hover,
html[data-theme='light'] .peditor-dashboard-add-menu button:hover,
html[data-theme='light'] .add-menu button:hover {
  background: var(--pl-primary-softer);
}

/* Property tabs, fields and cards */
html[data-theme='light'] .peditor-dashboard-settings .property-settings-tabs {
  border-color: var(--pl-border);
  background: var(--pl-surface-tint);
}

html[data-theme='light'] .peditor-dashboard-settings .property-settings-tab-link {
  color: var(--ep-text-2);
}

html[data-theme='light'] .peditor-dashboard-settings .property-settings-tab-link:hover {
  background: rgba(255, 255, 255, 0.62);
  color: var(--ep-text);
}

html[data-theme='light'] .peditor-dashboard-settings .property-settings-tab-link.active {
  border-color: #c8dce1;
  background: var(--pl-surface);
  color: var(--pl-primary);
  box-shadow: var(--pl-shadow-sm);
}

html[data-theme='light'] .peditor-dashboard-settings input:not([type='checkbox']):not([type='radio']),
html[data-theme='light'] .peditor-dashboard-settings select,
html[data-theme='light'] .peditor-dashboard-settings textarea,
html[data-theme='light'] .peditor-dashboard-settings .peditor-dashboard-form-control {
  border-color: var(--pl-border) !important;
  background: var(--pl-surface) !important;
  color: var(--ep-text) !important;
}

html[data-theme='light'] .peditor-dashboard-settings input:not([type='checkbox']):not([type='radio']):hover,
html[data-theme='light'] .peditor-dashboard-settings select:hover,
html[data-theme='light'] .peditor-dashboard-settings textarea:hover {
  border-color: var(--pl-border-strong) !important;
}

html[data-theme='light'] .peditor-dashboard-settings input:not([type='checkbox']):not([type='radio']):focus,
html[data-theme='light'] .peditor-dashboard-settings select:focus,
html[data-theme='light'] .peditor-dashboard-settings textarea:focus {
  border-color: var(--pl-primary) !important;
  box-shadow: var(--ep-ring) !important;
}

html[data-theme='light'] .peditor-dashboard-form-section,
html[data-theme='light'] .basic-info-content .property-setting-form-group,
html[data-theme='light'] .question-setup-content .property-setting-form-group,
html[data-theme='light'] .question-setup-content .generation-props-section,
html[data-theme='light'] .question-setup-content .analysis-generation-form,
html[data-theme='light'] .question-setup-content .analysis-step-item,
html[data-theme='light'] .question-setup-content .model-answers-section,
html[data-theme='light'] .context-materials-content .property-setting-form-group,
html[data-theme='light'] .context-materials-content .section-global-context-materials-container,
html[data-theme='light'] .pc-card,
html[data-theme='light'] .competency-tax-heading-row,
html[data-theme='light'] .competency-tax-hint,
html[data-theme='light'] .competency-tax-scope-badges,
html[data-theme='light'] .competency-tax-topic-group,
html[data-theme='light'] .competency-tax-applied-summary,
html[data-theme='light'] .competency-tax-form,
html[data-theme='light'] .competency-tax-toolbar {
  border-color: var(--pl-border);
  background: var(--pl-surface);
  box-shadow: var(--pl-shadow-sm);
}

html[data-theme='light'] .peditor-dashboard-table-container,
html[data-theme='light'] .peditor-dashboard-table-preview,
html[data-theme='light'] .peditor-dashboard-question-structure,
html[data-theme='light'] .peditor-dashboard-file-item,
html[data-theme='light'] .context-materials-content .contextual-image-row,
html[data-theme='light'] .context-materials-content .answer-image-row,
html[data-theme='light'] .context-materials-content .peditor-dashboard-context-materials-drawn-diagram-row,
html[data-theme='light'] .context-materials-content .section-global-context-item,
html[data-theme='light'] .context-materials-content .table-dimensions-control,
html[data-theme='light'] .pc-field,
html[data-theme='light'] .pc-card .peditor-publish-section,
html[data-theme='light'] .competency-tax-node,
html[data-theme='light'] .competency-link-prompt {
  border-color: var(--pl-border);
  background: var(--pl-surface-soft);
  box-shadow: none;
}

html[data-theme='light'] .pc-card-head,
html[data-theme='light'] .context-materials-content .section-global-context-collapse-header,
html[data-theme='light'] .property-settings-section-header {
  border-color: var(--pl-border);
  background: var(--pl-primary-soft);
}

/* General-information content that still carries Bootstrap-era neutral greys. */
html[data-theme='light'] .article-editor,
html[data-theme='light'] .essay-reference-content,
html[data-theme='light'] .essay-task,
html[data-theme='light'] .writing-tips {
  border-color: var(--pl-border);
  background: var(--pl-surface-soft);
  color: var(--ep-text) !important;
}

html[data-theme='light'] .essay-task p,
html[data-theme='light'] .essay-task strong,
html[data-theme='light'] .essay-structure h4,
html[data-theme='light'] .marking-scheme h4,
html[data-theme='light'] .writing-tips h4,
html[data-theme='light'] .essay-structure h5,
html[data-theme='light'] .marking-category h5,
html[data-theme='light'] .essay-example-title,
html[data-theme='light'] .sample-title,
html[data-theme='light'] .sample-paragraph {
  color: var(--ep-text);
}

html[data-theme='light'] .peditor-dashboard-toggle-slider {
  border: 1px solid var(--pl-border-strong);
  background: var(--pl-surface-strong);
}

html[data-theme='light'] input:checked + .peditor-dashboard-toggle-slider {
  border-color: var(--pl-primary);
  background: var(--pl-primary);
}

/* Portalled panels and modals do not inherit the scoped dashboard variables. */
html[data-theme='light'] .question-template-modal-content,
html[data-theme='light'] .section-schema-modal,
html[data-theme='light'] .peditor-material-selection-panel,
html[data-theme='light'] .competency-tax-manage-panel,
html[data-theme='light'] .peditor-documentation-container,
html[data-theme='light'] .peditor-help-bot-chat,
html[data-theme='light'] .collaboration-lock-modal-content {
  --ep-bg: #edf6f8;
  --ep-elevated: #f5fafb;
  --ep-surface: #ffffff;
  --ep-surface-2: #f6fafb;
  --ep-surface-3: #eaf4f6;
  --ep-border: #d3e2e6;
  --ep-border-strong: #b7cdd4;
  --ep-text: #18333d;
  --ep-text-2: #526c76;
  --ep-text-3: #748b94;
  --ep-glow: #216f87;
  --ep-glow-a10: rgba(33, 111, 135, 0.09);
  --ep-glow-a20: rgba(33, 111, 135, 0.15);
  border-color: #c7dbe0;
  background: #ffffff;
  color: #18333d;
  box-shadow: 0 22px 58px rgba(29, 72, 87, 0.17);
}

html[data-theme='light'] .question-template-modal-header,
html[data-theme='light'] .section-schema-modal-header,
html[data-theme='light'] .peditor-material-panel-header,
html[data-theme='light'] .competency-tax-manage-header,
html[data-theme='light'] .peditor-documentation-header,
html[data-theme='light'] .peditor-help-bot-header {
  border-color: #d3e2e6;
  background: linear-gradient(135deg, #e8f3f5 0%, #f8fbfc 100%);
}

html[data-theme='light'] .question-template-modal-header .modal-title,
html[data-theme='light'] .question-template-modal-header .modal-close-btn,
html[data-theme='light'] .section-schema-modal-header h3,
html[data-theme='light'] .peditor-material-panel-title,
html[data-theme='light'] .competency-tax-manage-title,
html[data-theme='light'] .peditor-documentation-title h2,
html[data-theme='light'] .peditor-help-bot-title {
  color: #18333d;
  text-shadow: none;
}

html[data-theme='light'] .section-schema-modal-body,
html[data-theme='light'] .question-template-modal-body,
html[data-theme='light'] .peditor-material-panel-content,
html[data-theme='light'] .peditor-documentation-content,
html[data-theme='light'] .peditor-help-bot-messages {
  background: #f6fafb;
}

html[data-theme='light'] .section-schema-node-main,
html[data-theme='light'] .peditor-material-item,
html[data-theme='light'] .peditor-documentation-category,
html[data-theme='light'] .peditor-message.bot .peditor-message-bubble {
  border-color: #d3e2e6;
  background: #ffffff;
  color: #18333d;
  box-shadow: none;
}

html[data-theme='light'] .peditor-documentation-category-header,
html[data-theme='light'] .peditor-documentation-category-header:hover,
html[data-theme='light'] .peditor-documentation-category-content,
html[data-theme='light'] .peditor-documentation-footer,
html[data-theme='light'] .section-schema-modal-footer {
  border-color: #d3e2e6;
  background: #edf6f8;
}

html[data-theme='light'] .peditor-documentation-category-title,
html[data-theme='light'] .peditor-documentation-item-title,
html[data-theme='light'] .section-schema-modal-eyebrow {
  color: #216f87;
  text-shadow: none;
}

html[data-theme='light'] .collaboration-lock-modal-overlay,
html[data-theme='light'] .peditor-documentation-modal,
html[data-theme='light'] .section-schema-modal-backdrop,
html[data-theme='light'] .peditor-material-panel-overlay,
html[data-theme='light'] .competency-tax-panel-overlay {
  background: rgba(24, 51, 61, 0.34);
}

html[data-theme='light'] .collaboration-lock-back-button,
html[data-theme='light'] .peditor-send-button,
html[data-theme='light'] .peditor-help-bot-toggle {
  border-color: #216f87;
  background: #216f87;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(33, 111, 135, 0.18);
}

html[data-theme='light'] .collaboration-lock-back-button:hover,
html[data-theme='light'] .peditor-send-button:hover:not(:disabled),
html[data-theme='light'] .peditor-help-bot-toggle:hover {
  border-color: #195b70;
  background: #195b70;
  color: #ffffff;
}

html[data-theme='light'] .peditor-dashboard-outside-container ::-webkit-scrollbar-track,
html[data-theme='light'] .peditor-documentation-content::-webkit-scrollbar-track,
html[data-theme='light'] .essay-reference-content::-webkit-scrollbar-track {
  background: #eef6f8;
}

html[data-theme='light'] .peditor-dashboard-outside-container ::-webkit-scrollbar-thumb,
html[data-theme='light'] .peditor-documentation-content::-webkit-scrollbar-thumb,
html[data-theme='light'] .essay-reference-content::-webkit-scrollbar-thumb {
  background: #b8d2d9;
  border-radius: 999px;
}

html[data-theme='light'] .peditor-dashboard-outside-container ::-webkit-scrollbar-thumb:hover,
html[data-theme='light'] .peditor-documentation-content::-webkit-scrollbar-thumb:hover,
html[data-theme='light'] .essay-reference-content::-webkit-scrollbar-thumb:hover {
  background: #8db7c2;
}

/* Help and documentation details */
html[data-theme='light'] .peditor-help-bot-input {
  border-top-color: #d3e2e6;
  background: #f6fafb;
}

html[data-theme='light'] .peditor-input-container {
  border-color: #d3e2e6;
  background: #ffffff;
}

html[data-theme='light'] .peditor-input-container:focus-within {
  border-color: #216f87;
  box-shadow: 0 0 0 3px rgba(33, 111, 135, 0.16);
}

html[data-theme='light'] .peditor-message-avatar,
html[data-theme='light'] .peditor-user-avatar,
html[data-theme='light'] .peditor-message.user .peditor-message-bubble {
  background: #216f87;
  color: #ffffff;
}

html[data-theme='light'] .peditor-help-bot-toggle.expanded {
  border-color: var(--ep-danger);
  background: var(--ep-danger);
  color: #ffffff;
}

html[data-theme='light'] .peditor-documentation-close-button {
  border-color: #216f87;
  background: #216f87;
  color: #ffffff;
  box-shadow: none;
}

html[data-theme='light'] .peditor-documentation-close-button:hover {
  border-color: #195b70;
  background: #195b70;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(33, 111, 135, 0.18);
}

html[data-theme='light'] .description-panel-item,
html[data-theme='light'] .documentation-icon-item {
  border-color: #b7cdd4;
  background: #edf6f8;
}

html[data-theme='light'] .documentation-image-container,
html[data-theme='light'] .documentation-video-container,
html[data-theme='light'] .documentation-item-media-container {
  border-color: #d3e2e6;
  background: #f6fafb;
  box-shadow: none;
}

html[data-theme='light'] .documentation-caption {
  background: #eaf4f6;
  color: #526c76;
}

html[data-theme='light'] .documentation-caption strong,
html[data-theme='light'] .documentation-caption em {
  color: #18333d;
}

/* High-specificity final pass for component stylesheets loaded with individual
   tabs after the global theme files. */
html[data-theme='light'] .peditor-dashboard-outside-container .basic-info-content .property-setting-form-group,
html[data-theme='light'] .peditor-dashboard-outside-container .question-setup-content .property-setting-form-group,
html[data-theme='light'] .peditor-dashboard-outside-container .question-setup-content .generation-props-section,
html[data-theme='light'] .peditor-dashboard-outside-container .question-setup-content .analysis-generation-form,
html[data-theme='light'] .peditor-dashboard-outside-container .question-setup-content .analysis-step-item,
html[data-theme='light'] .peditor-dashboard-outside-container .question-setup-content .model-answers-section,
html[data-theme='light'] .peditor-dashboard-outside-container .context-materials-content .property-setting-form-group,
html[data-theme='light'] .peditor-dashboard-outside-container .context-materials-content .section-global-context-materials-container,
html[data-theme='light'] .peditor-dashboard-outside-container .pc-card,
html[data-theme='light'] .peditor-dashboard-outside-container .competency-tax-heading-row,
html[data-theme='light'] .peditor-dashboard-outside-container .competency-tax-hint,
html[data-theme='light'] .peditor-dashboard-outside-container .competency-tax-scope-badges,
html[data-theme='light'] .peditor-dashboard-outside-container .competency-tax-topic-group,
html[data-theme='light'] .peditor-dashboard-outside-container .competency-tax-applied-summary,
html[data-theme='light'] .peditor-dashboard-outside-container .competency-tax-form,
html[data-theme='light'] .peditor-dashboard-outside-container .competency-tax-toolbar {
  border-color: #d3e2e6;
  background: #ffffff;
  box-shadow: var(--pl-shadow-sm);
}

html[data-theme='light'] .peditor-dashboard-outside-container .context-materials-content .contextual-image-row,
html[data-theme='light'] .peditor-dashboard-outside-container .context-materials-content .answer-image-row,
html[data-theme='light'] .peditor-dashboard-outside-container .context-materials-content .peditor-dashboard-context-materials-drawn-diagram-row,
html[data-theme='light'] .peditor-dashboard-outside-container .context-materials-content .section-global-context-item,
html[data-theme='light'] .peditor-dashboard-outside-container .context-materials-content .table-dimensions-control,
html[data-theme='light'] .peditor-dashboard-outside-container .pc-field,
html[data-theme='light'] .peditor-dashboard-outside-container .pc-card .peditor-publish-section,
html[data-theme='light'] .peditor-dashboard-outside-container .competency-tax-node,
html[data-theme='light'] .peditor-dashboard-outside-container .competency-link-prompt {
  border-color: #d3e2e6;
  background: #f6fafb;
  box-shadow: none;
}

html[data-theme='light'] .peditor-dashboard-outside-container .pc-card-head,
html[data-theme='light'] .peditor-dashboard-outside-container .context-materials-content .section-global-context-collapse-header,
html[data-theme='light'] .peditor-dashboard-outside-container .property-settings-section-header {
  border-color: #d3e2e6;
  background: #e4f1f4;
}

html[data-theme='light'] .peditor-dashboard-outside-container .peditor-model-answers-title,
html[data-theme='light'] .peditor-dashboard-outside-container .peditor-model-answers-title i,
html[data-theme='light'] .peditor-dashboard-outside-container .peditor-model-answers-header .btn {
  color: #216f87;
}

html[data-theme='light'] .section-schema-knowledge-labels span {
  border-color: #c9dce4;
  background: #edf5f8;
  color: #426b7a;
}

/* =============================================================================
   Examer EDITOR dashboard — landing-page glass + gradient atmosphere (LIGHT)
   -----------------------------------------------------------------------------
   The exam/answer-book editor (ExamerPanel/Dashboard/**): a 3-pane layout —
   Materials (left, the paper/question materials = the "overview"), Answer Book
   (middle, where answers are written/graded = the "setting"), and Functional
   Tools (right, chat/notes). theme-light.css already made it readable (white
   inputs, segmented tabs, chat field, message bubbles, footer buttons), but the
   pane/content surfaces still wear the old tone: #333 panels, dark-blue
   (#3a4a63 / #4a5a73 / #374151 / #273c4f) question containers, and rgba(0,0,0,.2)
   inner cards.

   This layer carries the same frosted-glass + teal/violet treatment used in the
   Peditor editor (theme-light-peditor.css): a colour-mesh shell, frosted header,
   each pane's content rendered as a translucent glass card floating on the mesh,
   light question-tree bars, and de-greyed inner cards. Reuses the --ep-panel-*
   tokens from theme-light-panels.css. Gated html[data-theme='light']; dark mode
   untouched. Imported after theme-light-peditor.css (see index.tsx).

   NOTE: like the Peditor layer, the big surfaces use a translucent gradient
   (NOT backdrop-filter) so the materials image-modal / grading / action-loading
   overlays — which are `position: fixed` inside the tree — keep the viewport as
   their containing block instead of being trapped/clipped by a filtered card.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   1. Shell — colour mesh, frosted header, transparent layout + panes.
   --------------------------------------------------------------------------- */
html[data-theme='light'] .examer-dashboard-outside-container {
  background:
    radial-gradient(ellipse 70% 55% at 12% 8%, rgba(47, 158, 194, 0.13) 0%, transparent 55%),
    radial-gradient(ellipse 64% 58% at 90% 16%, rgba(124, 92, 240, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse 60% 64% at 82% 92%, rgba(0, 180, 220, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 68% 56% at 16% 94%, rgba(99, 102, 241, 0.07) 0%, transparent 55%),
    linear-gradient(160deg, #eef2fb 0%, #e8edf7 50%, #eaf1f6 100%);
}

/* Header + footer → frosted near-white bars (were grey surface + dark shadow). */
html[data-theme='light'] .examer-dashboard-container-header {
  background: var(--ep-panel-header);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--ep-border);
  box-shadow: 0 2px 14px rgba(47, 158, 194, 0.08);
}
html[data-theme='light'] .examer-dashboard-footer {
  background: var(--ep-panel-header);
  border-top: 1px solid var(--ep-border);
}

/* Container + panes → transparent so the panes' glass cards float on the mesh
   (theme-light gave the panels a white/elevated fill — null it out here). */
html[data-theme='light'] .examer-dashboard-container,
html[data-theme='light'] .examer-dashboard-materials-panel,
html[data-theme='light'] .examer-dashboard-answer-panel,
html[data-theme='light'] .examer-dashboard-tools-panel {
  background-color: transparent;
}

/* Wallet chip + header info pill → teal-tinted glass pills. */
html[data-theme='light'] .examer-dashboard-wallet-balance,
html[data-theme='light'] .examer-dashboard-time,
html[data-theme='light'] .examer-dashboard-title .d-flex p {
  background-color: var(--ep-panel-teal-10);
  border: 1px solid rgba(47, 158, 194, 0.3);
}

/* -----------------------------------------------------------------------------
   2. Each pane's content → one translucent glass card (was a flat #333 slab).
   --------------------------------------------------------------------------- */
html[data-theme='light'] .examer-dashboard-answer-book,
html[data-theme='light'] .examer-dashboard-paper-materials-section,
html[data-theme='light'] .examer-dashboard-materials-section,
html[data-theme='light'] .examer-dashboard-functional-tools {
  background: linear-gradient(150deg,
      rgba(255, 255, 255, 0.88) 0%,
      rgba(255, 255, 255, 0.66) 60%,
      rgba(124, 92, 240, 0.06) 130%) !important;
  border: 1px solid var(--ep-panel-glass-border);
  box-shadow: var(--ep-panel-glass-glow);
  border-radius: 14px;
}

/* Inner content wrappers that filled the card with their own #333 → transparent
   so the single glass card shows through (no dark slab inside the card). */
html[data-theme='light'] .examer-dashboard-answer-book-content,
html[data-theme='light'] .examer-dashboard-materials-content,
html[data-theme='light'] .examer-dashboard-materials-scrollable-content,
html[data-theme='light'] .examer-dashboard-section-content {
  background-color: transparent !important;
}

/* Sticky in-card sub-headers → frosted near-white (mask scrolling content). */
html[data-theme='light'] .examer-dashboard-answer-book-header,
html[data-theme='light'] .examer-dashboard-answer-book-header-fixed,
html[data-theme='light'] .examer-dashboard-materials-header,
html[data-theme='light'] .examer-dashboard-materials-header-fixed,
html[data-theme='light'] .examer-dashboard-materials-select-sticky {
  background: var(--ep-panel-header) !important;
  border-bottom: 1px solid var(--ep-border);
}

/* -----------------------------------------------------------------------------
   3. Question tree / materials toggle bars + question containers.
   --------------------------------------------------------------------------- */
/* Materials collapsible bars (base #333; nested #3a4a63) → frosted white. */
html[data-theme='light'] .examer-dashboard-toggle-bar {
  background-color: var(--ep-panel-card-strong);
  border: 1px solid var(--ep-panel-card-border);
  box-shadow: var(--ep-shadow-sm);
}
html[data-theme='light'] .examer-dashboard-toggle-bar:hover {
  background-color: #ffffff;
  border-color: rgba(47, 158, 194, 0.35);
}

/* Top-level question container (#3a4a63) → light card; nested levels → lighter
   white tints (theme-light had mapped these to grey surface-2/3 — upgrade). */
/* No !important here: the top-level rule would otherwise beat the deeper
   (non-important) ones and flatten the nesting. Specificity (0,2,1)+ handles it
   — each deeper selector outranks the shallower one. */
html[data-theme='light'] .examer-dashboard-question-container {
  background-color: var(--ep-panel-card);
  border: 1px solid var(--ep-panel-card-border);
}
html[data-theme='light'] .examer-dashboard-question-container
  .examer-dashboard-question-container {
  background-color: rgba(255, 255, 255, 0.62);
}
html[data-theme='light'] .examer-dashboard-question-container
  .examer-dashboard-question-container
  .examer-dashboard-question-container {
  background-color: rgba(255, 255, 255, 0.48);
}

/* Materials question buttons (#3a4a63) + marks badge (#333). */
html[data-theme='light'] .examer-dashboard-question-button {
  background-color: var(--ep-panel-card-strong);
  border: 1px solid var(--ep-panel-card-border);
}
html[data-theme='light'] .examer-dashboard-question-button:hover {
  background-color: var(--ep-panel-teal-10);
  border-color: rgba(47, 158, 194, 0.35);
}
html[data-theme='light'] .examer-dashboard-question-marks-badge {
  background-color: var(--ep-panel-teal-16);
  color: var(--ep-accent-2);
}

/* -----------------------------------------------------------------------------
   4. Functional Tools pane — quota chip + the question pill (the chat field,
      message bubbles, tabs, model/subquestion selects are already handled by
      theme-light.css's examer rules + its generic input/select whitening).
   --------------------------------------------------------------------------- */
html[data-theme='light'] .examer-dashboard-functional-tools-quota-display,
html[data-theme='light'] .examer-dashboard-remaining-quota {
  background-color: var(--ep-panel-teal-05);
  border: 1px solid rgba(47, 158, 194, 0.2);
}

/* Empty-chat prompt ("Ask a question about this problem") — the markup hard-codes
   Bootstrap's .text-white (white !important), invisible on the light card. Re-tint
   to the muted body colour. !important needed to beat .text-white's !important. */
html[data-theme='light'] .examer-dashboard-functional-tools-empty-chat p,
html[data-theme='light'] .examer-dashboard-functional-tools-empty-chat .text-white {
  color: var(--ep-text-2) !important;
}

/* Sub-question dropdown — was dark #273c4f. Frosted-white field + teal arrow.
   background-color (longhand) preserves the arrow background-image; we still
   restate the arrow so it reads as accent teal rather than the pale #5bbadc. */
html[data-theme='light'] .examer-dashboard-functional-tools-subquestion-select {
  background-color: var(--ep-panel-card-strong);
  color: var(--ep-text);
  border: 1px solid var(--ep-panel-card-border);
  box-shadow: var(--ep-shadow-sm);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23247c9a%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3e%3cpolyline points=%276 9 12 15 18 9%27%3e%3c/polyline%3e%3c/svg%3e");
}
html[data-theme='light'] .examer-dashboard-functional-tools-subquestion-select option {
  background-color: #ffffff;
  color: var(--ep-text);
}

/* Functional-tools tab bar — upgrade theme-light's plain grey segmented control
   to the fancy panel look: glass track, white active pill with a teal-violet
   gradient label + soft teal glow (matches the marketplace/peditor panel tabs). */
html[data-theme='light'] .examer-dashboard-functional-tools-tabs {
  background: var(--ep-panel-glass-soft);
  border: 1px solid var(--ep-panel-glass-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
html[data-theme='light'] .examer-dashboard-functional-tools-tab:hover {
  background-color: rgba(255, 255, 255, 0.6);
}
html[data-theme='light'] .examer-dashboard-functional-tools-tab.active {
  background: linear-gradient(150deg,
      rgba(255, 255, 255, 0.96) 0%,
      rgba(47, 158, 194, 0.10) 100%);
  color: var(--ep-accent-2);
  box-shadow: 0 2px 10px rgba(47, 158, 194, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

/* Nested-question toggle bar (Answer Book) — was slate #374151. Make it a frosted
   teal-tinted card matching the fancy panel toggle bars. */
html[data-theme='light'] .examer-dashboard-nested-question-toggle {
  /* solid (not translucent) — it is sticky and content scrolls beneath it. */
  background-color: #ffffff;
  border: 1px solid var(--ep-panel-card-border);
  box-shadow: var(--ep-shadow-sm);
}
html[data-theme='light'] .examer-dashboard-nested-question-toggle:hover {
  background-color: var(--ep-panel-teal-10);
  border-color: rgba(47, 158, 194, 0.4);
}

/* User message bubble — was a dark navy gradient (#1e5f8c→#2a6d9e) that clashed
   with the light card. Re-tint to a softer teal-violet gradient, white text. */
html[data-theme='light'] .examer-dashboard-functional-tools-message.user {
  background: linear-gradient(135deg, #3aa6c8 0%, #2f8fc0 55%, #7c5cf0 140%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(47, 158, 194, 0.22);
}

/* Send + Generate buttons — the base teal gradient inherits color: var(--ep-text),
   which in light theme is DARK, so the icon/label went dark. Lighten the fill a
   touch and force the icon/text white for contrast. */
html[data-theme='light'] .examer-dashboard-functional-tools-send,
html[data-theme='light'] .examer-dashboard-functional-tools-generate {
  background: linear-gradient(135deg, #4fb3d4 0%, #3a9ec2 100%);
  color: #ffffff;
}
html[data-theme='light'] .examer-dashboard-functional-tools-send svg,
html[data-theme='light'] .examer-dashboard-functional-tools-generate svg {
  color: #ffffff;
  fill: currentColor;
}
html[data-theme='light'] .examer-dashboard-functional-tools-generate:hover {
  background: linear-gradient(135deg, #5fc0df 0%, #46abce 100%);
}

/* Action button row — horizontally centre the buttons (was right-aligned). */
html[data-theme='light'] .examer-dashboard-functional-tools-actions {
  justify-content: center;
}

/* -----------------------------------------------------------------------------
   5. Inner display cards (QuestionDisplay + StudentAnswer + Materials) —
      de-grey the rgba(0,0,0,.1–.2) card fills to light frosted tints.
   --------------------------------------------------------------------------- */
html[data-theme='light'] .examer-dashboard-image-item,
html[data-theme='light'] .examer-dashboard-image-notes,
html[data-theme='light'] .examer-dashboard-comments-content,
html[data-theme='light'] .examer-dashboard-comments-content.rich-content,
html[data-theme='light'] .examer-dashboard-comments-empty,
html[data-theme='light'] .examer-dashboard-analysis-item,
html[data-theme='light'] .examer-dashboard-image-answer-display,
html[data-theme='light'] .examer-dashboard-diagram-answer-display,
html[data-theme='light'] .examer-dashboard-drawn-diagram-answer-display,
html[data-theme='light'] .examer-dashboard-student-answers-drawn-diagram-answer-display,
html[data-theme='light'] .examer-dashboard-student-answers-image-answer-display {
  background-color: var(--ep-panel-card);
  border: 1px solid var(--ep-panel-card-border);
}

/* Question table → light surface + teal-tinted header row. */
html[data-theme='light'] .examer-dashboard-question-table table {
  background-color: rgba(255, 255, 255, 0.55);
}

/* -----------------------------------------------------------------------------
   Loading overlay card → frosted light (was rgba(30,30,30,.7), dark-only).
   Mirrors the Peditor treatment (theme-light-peditor.css .peditor-dashboard-
   loading-content) so the "Initializing … Tool" splash reads on white too.
   --------------------------------------------------------------------------- */
html[data-theme='light'] .examer-dashboard-loading-content {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(245, 248, 252, 0.88));
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--ep-panel-glass-border);
  box-shadow: 0 24px 60px rgba(47, 158, 194, 0.18);
}

/* -----------------------------------------------------------------------------
   6. Materials text blocks — paper header / instruction read as soft cards.
   --------------------------------------------------------------------------- */
html[data-theme='light'] .examer-dashboard-paper-instruction,
html[data-theme='light'] .examer-dashboard-instruction {
  background-color: var(--ep-panel-card);
  border: 1px solid var(--ep-panel-card-border);
}

/* =============================================================================
   2026 editorial-white refinement
   A complete Examer-specific system for the header, paper materials, answer
   book, functional tools, overlays, documentation, and help surfaces.
   ============================================================================= */
html[data-theme='light'] {
  --examer-canvas: #edf6f8;
  --examer-canvas-soft: #f5fafb;
  --examer-surface: #ffffff;
  --examer-surface-soft: #f6fafb;
  --examer-surface-tint: #eaf4f6;
  --examer-surface-tint-strong: #dcecef;
  --examer-border: #d3e2e6;
  --examer-border-strong: #b7cdd4;
  --examer-text: #17313a;
  --examer-text-muted: #58717a;
  --examer-text-subtle: #789099;
  --examer-primary: #216f87;
  --examer-primary-hover: #195b70;
  --examer-primary-soft: #e4f1f4;
  --examer-success: #237653;
  --examer-success-soft: #e7f4ee;
  --examer-warning: #9a6615;
  --examer-warning-soft: #fff4dc;
  --examer-danger: #b34242;
  --examer-danger-hover: #943535;
  --examer-danger-soft: #faecec;
  --examer-shadow-sm: 0 1px 2px rgba(29, 69, 82, 0.07);
  --examer-shadow-md: 0 8px 24px rgba(29, 69, 82, 0.10);
  --examer-shadow-lg: 0 20px 54px rgba(29, 69, 82, 0.16);
  --examer-focus: 0 0 0 3px rgba(33, 111, 135, 0.18);
}

html[data-theme='light'] .examer-dashboard-outside-container {
  --ep-bg: var(--examer-canvas);
  --ep-surface: var(--examer-surface);
  --ep-surface-2: var(--examer-surface-soft);
  --ep-elevated: var(--examer-surface);
  --ep-slate: var(--examer-surface-soft);
  --ep-raise-1: var(--examer-surface);
  --ep-raise-2: var(--examer-surface-soft);
  --ep-raise-3: var(--examer-surface-tint);
  --ep-raise-4: var(--examer-border);
  --ep-panel: var(--examer-surface);
  --ep-panel-strong: var(--examer-surface);
  --ep-panel-strong-2: var(--examer-surface-tint);
  --ep-text: var(--examer-text);
  --ep-text-2: var(--examer-text-muted);
  --ep-text-3: var(--examer-text-subtle);
  --ep-accent: var(--examer-primary);
  --ep-accent-2: var(--examer-primary-hover);
  --ep-accent-soft: var(--examer-primary);
  --ep-accent-fade: var(--examer-primary-soft);
  --ep-border: var(--examer-border);
  --ep-glow: var(--examer-primary);
  --ep-glow-a50: rgba(33, 111, 135, 0.28);
  color: var(--examer-text);
  background:
    radial-gradient(circle at 10% 0%, rgba(66, 139, 157, 0.10), transparent 32rem),
    linear-gradient(145deg, var(--examer-canvas-soft), var(--examer-canvas));
}

/* Shell, header, status, and actions. */
html[data-theme='light'] .examer-dashboard-container-header {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--examer-border);
  box-shadow: 0 2px 12px rgba(29, 69, 82, 0.08);
}

html[data-theme='light'] .examer-dashboard-top-title {
  color: var(--examer-text);
  font-weight: 720;
}

html[data-theme='light'] .examer-dashboard-top-title:hover {
  background: var(--examer-primary-soft);
  color: var(--examer-primary-hover);
}

html[data-theme='light'] .examer-dashboard-preview-top-title {
  color: var(--examer-primary);
  background: var(--examer-primary-soft);
  border: 1px solid var(--examer-border);
}

html[data-theme='light'] .examer-dashboard-title-input,
html[data-theme='light'] .examer-dashboard-assessor-model-select,
html[data-theme='light'] .examer-dashboard-functional-tools-model-select,
html[data-theme='light'] .examer-dashboard-functional-tools-mode-select,
html[data-theme='light'] .examer-dashboard-functional-tools-subquestion-select,
html[data-theme='light'] .examer-dashboard-materials-select-sticky select,
html[data-theme='light'] .examer-dashboard-materials-header-fixed select,
html[data-theme='light'] .examer-dashboard-answer-book-header-fixed select {
  color: var(--examer-text);
  background-color: var(--examer-surface);
  border: 1px solid var(--examer-border-strong);
  box-shadow: var(--examer-shadow-sm);
}

html[data-theme='light'] .examer-dashboard-title-input:hover,
html[data-theme='light'] .examer-dashboard-assessor-model-select:hover,
html[data-theme='light'] .examer-dashboard-functional-tools-model-select:hover,
html[data-theme='light'] .examer-dashboard-functional-tools-mode-select:hover,
html[data-theme='light'] .examer-dashboard-functional-tools-subquestion-select:hover,
html[data-theme='light'] .examer-dashboard-materials-select-sticky select:hover,
html[data-theme='light'] .examer-dashboard-materials-header-fixed select:hover,
html[data-theme='light'] .examer-dashboard-answer-book-header-fixed select:hover {
  border-color: var(--examer-primary);
  background-color: var(--examer-surface);
}

html[data-theme='light'] .examer-dashboard-title-input:focus,
html[data-theme='light'] .examer-dashboard-assessor-model-select:focus,
html[data-theme='light'] .examer-dashboard-functional-tools-model-select:focus,
html[data-theme='light'] .examer-dashboard-functional-tools-mode-select:focus,
html[data-theme='light'] .examer-dashboard-functional-tools-subquestion-select:focus,
html[data-theme='light'] .examer-dashboard-materials-select-sticky select:focus,
html[data-theme='light'] .examer-dashboard-materials-header-fixed select:focus,
html[data-theme='light'] .examer-dashboard-answer-book-header-fixed select:focus {
  border-color: var(--examer-primary);
  background-color: var(--examer-surface);
  box-shadow: var(--examer-focus);
}

html[data-theme='light'] .examer-dashboard-assessor-model-select option,
html[data-theme='light'] .examer-dashboard-assessor-model-select optgroup,
html[data-theme='light'] .examer-dashboard-functional-tools-model-select option,
html[data-theme='light'] .examer-dashboard-functional-tools-model-select optgroup,
html[data-theme='light'] .examer-dashboard-functional-tools-mode-select option,
html[data-theme='light'] .examer-dashboard-functional-tools-subquestion-select option,
html[data-theme='light'] .examer-dashboard-materials-select-sticky select option,
html[data-theme='light'] .examer-dashboard-materials-header-fixed select option,
html[data-theme='light'] .examer-dashboard-answer-book-header-fixed select option {
  background: var(--examer-surface);
  color: var(--examer-text);
}

html[data-theme='light'] .examer-dashboard-back-button,
html[data-theme='light'] .examer-dashboard-documentation-button {
  color: var(--examer-primary);
  background: var(--examer-surface);
  border-color: var(--examer-border);
  box-shadow: var(--examer-shadow-sm);
}

html[data-theme='light'] .examer-dashboard-back-button:hover,
html[data-theme='light'] .examer-dashboard-documentation-button:hover {
  color: var(--examer-primary-hover);
  background: var(--examer-primary-soft);
  border-color: var(--examer-primary);
  box-shadow: 0 4px 12px rgba(33, 111, 135, 0.14);
}

html[data-theme='light'] .examer-dashboard-header-marks p,
html[data-theme='light'] .examer-dashboard-wallet-balance,
html[data-theme='light'] .examer-dashboard-time {
  color: var(--examer-text-muted);
  background: var(--examer-surface-tint);
  border-color: var(--examer-border-strong);
}

html[data-theme='light'] .examer-dashboard-wallet-amount {
  color: var(--examer-primary-hover);
}

html[data-theme='light'] .examer-dashboard-submit-button,
html[data-theme='light'] .examer-dashboard-save-button,
html[data-theme='light'] .examer-dashboard-assessor-batch-assess-button,
html[data-theme='light'] .examer-dashboard-functional-tools-send,
html[data-theme='light'] .examer-dashboard-functional-tools-generate,
html[data-theme='light'] .examer-dashboard-help-bot .examer-dashboard-send-button {
  color: #ffffff;
  background: var(--examer-primary);
  border: 1px solid var(--examer-primary);
  box-shadow: 0 3px 10px rgba(33, 111, 135, 0.20);
}

html[data-theme='light'] .examer-dashboard-submit-button:hover,
html[data-theme='light'] .examer-dashboard-save-button:hover,
html[data-theme='light'] .examer-dashboard-assessor-batch-assess-button:hover,
html[data-theme='light'] .examer-dashboard-functional-tools-send:hover:not(:disabled),
html[data-theme='light'] .examer-dashboard-functional-tools-generate:hover:not(:disabled),
html[data-theme='light'] .examer-dashboard-help-bot .examer-dashboard-send-button:hover:not(:disabled) {
  color: #ffffff;
  background: var(--examer-primary-hover);
  border-color: var(--examer-primary-hover);
  box-shadow: 0 5px 14px rgba(33, 111, 135, 0.25);
  transform: translateY(-1px);
}

html[data-theme='light'] .examer-dashboard-download-button,
html[data-theme='light'] .examer-dashboard-release-button,
html[data-theme='light'] .examer-dashboard-upload-button {
  color: var(--examer-primary-hover);
  background: var(--examer-surface);
  border: 1px solid var(--examer-border-strong);
  box-shadow: var(--examer-shadow-sm);
}

html[data-theme='light'] .examer-dashboard-download-button:hover,
html[data-theme='light'] .examer-dashboard-release-button:hover,
html[data-theme='light'] .examer-dashboard-upload-button:hover {
  color: var(--examer-primary-hover);
  background: var(--examer-primary-soft);
  border-color: var(--examer-primary);
  box-shadow: 0 4px 12px rgba(33, 111, 135, 0.14);
  transform: translateY(-1px);
}

html[data-theme='light'] .examer-dashboard-outside-container button:disabled {
  color: var(--examer-text-subtle);
  background: var(--examer-surface-tint);
  border-color: var(--examer-border);
  box-shadow: none;
  opacity: 0.68;
  transform: none;
}

html[data-theme='light'] .examer-dashboard-done-button {
  color: var(--examer-text-muted);
  background: var(--examer-surface-tint-strong);
  border: 1px solid var(--examer-border-strong);
  box-shadow: inset 0 1px 2px rgba(29, 69, 82, 0.08);
}

html[data-theme='light'] .examer-dashboard-done-button.complete,
html[data-theme='light'] .examer-dashboard-done-button.assessed {
  background: var(--examer-success-soft);
  border-color: #9bcbb7;
}

html[data-theme='light'] .examer-dashboard-done-button.incomplete,
html[data-theme='light'] .examer-dashboard-done-button.unassessed {
  background: var(--examer-danger-soft);
  border-color: #e6b5b5;
}

html[data-theme='light'] .examer-dashboard-done-button .examer-dashboard-status-text-complete,
html[data-theme='light'] .examer-dashboard-done-button .examer-dashboard-status-text-incomplete {
  color: var(--examer-text);
}

/* Three-pane workspace and resizers. */
html[data-theme='light'] .examer-dashboard-container {
  gap: 0;
  padding: 0.7rem;
}

html[data-theme='light'] .examer-dashboard-materials-panel,
html[data-theme='light'] .examer-dashboard-answer-panel,
html[data-theme='light'] .examer-dashboard-tools-panel {
  background: transparent;
}

html[data-theme='light'] .examer-dashboard-answer-book,
html[data-theme='light'] .examer-dashboard-paper-materials-section,
html[data-theme='light'] .examer-dashboard-materials-section,
html[data-theme='light'] .examer-dashboard-functional-tools {
  background: var(--examer-surface) !important;
  border: 1px solid var(--examer-border);
  border-radius: 0.9rem;
  box-shadow: var(--examer-shadow-md);
}

html[data-theme='light'] .examer-dashboard-resizer {
  width: 0.65rem;
  background: transparent;
}

html[data-theme='light'] .examer-dashboard-resizer::before {
  content: '';
  position: absolute;
  inset: 0 0.22rem;
  border-radius: 999px;
  background: var(--examer-border);
  transition: background-color 160ms ease;
}

html[data-theme='light'] .examer-dashboard-resizer:hover,
html[data-theme='light'] .examer-dashboard-resizer:active {
  width: 0.65rem;
  background: transparent;
  box-shadow: none;
}

html[data-theme='light'] .examer-dashboard-resizer:hover::before,
html[data-theme='light'] .examer-dashboard-resizer:active::before {
  background: var(--examer-primary);
}

html[data-theme='light'] .examer-dashboard-resizer::after {
  background: #ffffff;
}

html[data-theme='light'] .examer-dashboard-answer-book-header-fixed,
html[data-theme='light'] .examer-dashboard-materials-header-fixed,
html[data-theme='light'] .examer-dashboard-materials-select-sticky {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: var(--examer-border);
  box-shadow: 0 3px 9px rgba(29, 69, 82, 0.05);
}

html[data-theme='light'] .examer-dashboard-answer-book-header-fixed h3,
html[data-theme='light'] .examer-dashboard-materials-header-fixed h3,
html[data-theme='light'] .examer-dashboard-paper-header h2,
html[data-theme='light'] .examer-dashboard-header h2,
html[data-theme='light'] .examer-dashboard-materials-section h3 {
  color: var(--examer-text);
  font-weight: 720;
  letter-spacing: -0.015em;
}

/* Paper material hierarchy. */
html[data-theme='light'] .examer-dashboard-toggle-bar,
html[data-theme='light'] .examer-dashboard-question-button {
  color: var(--examer-text);
  background: var(--examer-surface-soft);
  border: 1px solid var(--examer-border);
  box-shadow: var(--examer-shadow-sm);
}

html[data-theme='light'] .examer-dashboard-toggle-bar:hover,
html[data-theme='light'] .examer-dashboard-question-button:hover {
  color: var(--examer-primary-hover);
  background: var(--examer-primary-soft);
  border-color: var(--examer-border-strong);
  transform: translateY(-1px);
}

html[data-theme='light'] .examer-dashboard-question-button.active {
  color: #ffffff;
  background: var(--examer-primary);
  border-color: var(--examer-primary);
  box-shadow: 0 4px 12px rgba(33, 111, 135, 0.20);
}

html[data-theme='light'] .examer-dashboard-question-button.active .examer-dashboard-question-marks-badge {
  color: var(--examer-primary-hover);
  background: #ffffff;
}

html[data-theme='light'] .examer-dashboard-question-marks-badge {
  color: var(--examer-primary-hover);
  background: var(--examer-surface-tint-strong);
  border: 1px solid var(--examer-border);
  font-weight: 700;
}

html[data-theme='light'] .examer-dashboard-paper-instruction,
html[data-theme='light'] .examer-dashboard-instruction,
html[data-theme='light'] .examer-dashboard-annotations,
html[data-theme='light'] .examer-dashboard-image-item,
html[data-theme='light'] .examer-dashboard-diagram-container,
html[data-theme='light'] .examer-dashboard-drawn-diagram-container {
  color: var(--examer-text);
  background: var(--examer-surface-soft);
  border: 1px solid var(--examer-border);
  box-shadow: var(--examer-shadow-sm);
}

html[data-theme='light'] .examer-dashboard-paper-instruction h4,
html[data-theme='light'] .examer-dashboard-instruction h4,
html[data-theme='light'] .examer-dashboard-annotations-title,
html[data-theme='light'] .examer-dashboard-image-title,
html[data-theme='light'] .examer-dashboard-table-title {
  color: var(--examer-primary-hover);
  font-weight: 700;
}

html[data-theme='light'] .examer-dashboard-image-notes,
html[data-theme='light'] .examer-dashboard-image-caption,
html[data-theme='light'] .examer-dashboard-table-notes,
html[data-theme='light'] .examer-dashboard-annotation-content,
html[data-theme='light'] .examer-dashboard-video-url-display {
  color: var(--examer-text-muted);
  background: var(--examer-surface-tint);
  border-color: var(--examer-border);
}

html[data-theme='light'] .examer-dashboard-annotation-item {
  background: var(--examer-surface);
  border: 1px solid var(--examer-border);
}

/* Answer book, questions, choices, assessment, and rich content. */
html[data-theme='light'] .examer-dashboard-question-container {
  color: var(--examer-text);
  background: var(--examer-surface) !important;
  border: 1px solid var(--examer-border);
  border-left: 4px solid var(--examer-primary);
  box-shadow: var(--examer-shadow-sm);
}

html[data-theme='light'] .examer-dashboard-question-container:hover {
  border-color: var(--examer-border-strong);
  box-shadow: var(--examer-shadow-md);
}

html[data-theme='light'] .examer-dashboard-question-container .examer-dashboard-question-container {
  background: var(--examer-surface-soft) !important;
  border-left-color: #4f91a4;
}

html[data-theme='light'] .examer-dashboard-question-container
  .examer-dashboard-question-container
  .examer-dashboard-question-container {
  background: var(--examer-surface-tint) !important;
  border-left-color: #78a9b6;
}

html[data-theme='light'] .examer-dashboard-question-name,
html[data-theme='light'] .examer-dashboard-question-label,
html[data-theme='light'] .examer-dashboard-section-heading,
html[data-theme='light'] .examer-dashboard-answer-label,
html[data-theme='light'] .examer-dashboard-analysis-outline {
  color: var(--examer-text);
  font-weight: 700;
}

html[data-theme='light'] .examer-dashboard-question-instruction {
  color: var(--examer-text-muted);
  background: var(--examer-surface-tint);
  border-left-color: var(--examer-primary);
}

html[data-theme='light'] .examer-dashboard-question-marks {
  color: var(--examer-primary-hover);
  background: var(--examer-primary-soft);
  border: 1px solid var(--examer-border);
}

html[data-theme='light'] .examer-dashboard-question-option,
html[data-theme='light'] .examer-dashboard-radio-option,
html[data-theme='light'] .examer-dashboard-checkbox-option,
html[data-theme='light'] .examer-dashboard-answer-type-section,
html[data-theme='light'] .examer-dashboard-user-answer-material-item {
  color: var(--examer-text);
  background: var(--examer-surface-soft);
  border: 1px solid var(--examer-border);
}

html[data-theme='light'] .examer-dashboard-question-option:hover,
html[data-theme='light'] .examer-dashboard-radio-option:hover,
html[data-theme='light'] .examer-dashboard-checkbox-option:hover,
html[data-theme='light'] .examer-dashboard-answer-type-section:hover {
  background: var(--examer-primary-soft);
  border-color: var(--examer-primary);
}

html[data-theme='light'] .examer-dashboard-radio-option.correct-answer,
html[data-theme='light'] .examer-dashboard-checkbox-option.correct-answer {
  background: var(--examer-success-soft);
  border-color: #86bea5;
}

html[data-theme='light'] .examer-dashboard-radio-option.incorrect-answer,
html[data-theme='light'] .examer-dashboard-checkbox-option.incorrect-answer {
  background: var(--examer-danger-soft);
  border-color: #dda1a1;
}

html[data-theme='light'] .examer-dashboard-correct-answer,
html[data-theme='light'] .examer-dashboard-comments,
html[data-theme='light'] .examer-dashboard-analysis,
html[data-theme='light'] .examer-dashboard-feedback-section {
  background: var(--examer-surface-soft);
  border: 1px solid var(--examer-border);
  box-shadow: var(--examer-shadow-sm);
}

html[data-theme='light'] .examer-dashboard-analysis-item,
html[data-theme='light'] .examer-dashboard-comments-content,
html[data-theme='light'] .examer-dashboard-comments-empty,
html[data-theme='light'] .examer-dashboard-image-answer-display,
html[data-theme='light'] .examer-dashboard-diagram-answer-display,
html[data-theme='light'] .examer-dashboard-drawn-diagram-answer-display,
html[data-theme='light'] .examer-dashboard-student-answers-drawn-diagram-answer-display,
html[data-theme='light'] .examer-dashboard-student-answers-image-answer-display {
  color: var(--examer-text);
  background: var(--examer-surface);
  border: 1px solid var(--examer-border);
}

html[data-theme='light'] .examer-dashboard-analysis-explanation,
html[data-theme='light'] .examer-dashboard-comments-empty,
html[data-theme='light'] .examer-dashboard-user-answer-notes {
  color: var(--examer-text-muted);
}

html[data-theme='light'] .examer-dashboard-question-table,
html[data-theme='light'] .examer-dashboard-student-answer-table-wrapper,
html[data-theme='light'] .examer-dashboard-user-answer-table {
  border: 1px solid var(--examer-border);
  border-radius: 0.7rem;
  overflow: hidden;
  background: var(--examer-surface);
}

html[data-theme='light'] .examer-dashboard-question-table table,
html[data-theme='light'] .examer-dashboard-student-answer-table,
html[data-theme='light'] .examer-dashboard-user-answer-table table {
  color: var(--examer-text);
  background: var(--examer-surface);
}

html[data-theme='light'] .examer-dashboard-question-table th,
html[data-theme='light'] .examer-dashboard-student-answer-table th,
html[data-theme='light'] .examer-dashboard-user-answer-table th {
  color: var(--examer-primary-hover);
  background: var(--examer-surface-tint-strong);
  border-color: var(--examer-border-strong);
}

html[data-theme='light'] .examer-dashboard-question-table td,
html[data-theme='light'] .examer-dashboard-student-answer-table td,
html[data-theme='light'] .examer-dashboard-user-answer-table td {
  color: var(--examer-text);
  border-color: var(--examer-border);
}

html[data-theme='light'] .examer-dashboard-student-answer-table tbody tr:hover {
  background: var(--examer-primary-soft);
}

/* Inputs, editors, toolbars, and answer actions. */
html[data-theme='light'] .examer-dashboard-outside-container input:not([type='radio']):not([type='checkbox']),
html[data-theme='light'] .examer-dashboard-outside-container textarea,
html[data-theme='light'] .examer-dashboard-comments-textarea,
html[data-theme='light'] .examer-dashboard-student-answer-table-name-input,
html[data-theme='light'] .examer-dashboard-student-answer-table-dim-input,
html[data-theme='light'] .examer-dashboard-student-answer-table-input-header,
html[data-theme='light'] .examer-dashboard-student-answer-table-input-cell,
html[data-theme='light'] .examer-dashboard-student-answers-drawn-diagram-input,
html[data-theme='light'] .examer-dashboard-student-answers-drawn-diagram-textarea,
html[data-theme='light'] .examer-dashboard-student-answers-image-input,
html[data-theme='light'] .examer-dashboard-student-answers-image-textarea {
  color: var(--examer-text);
  caret-color: var(--examer-primary);
  background: var(--examer-surface);
  border: 1px solid var(--examer-border-strong);
  border-radius: 0.55rem;
}

html[data-theme='light'] .examer-dashboard-outside-container input:not([type='radio']):not([type='checkbox']):hover,
html[data-theme='light'] .examer-dashboard-outside-container textarea:hover {
  border-color: #8fb5c0;
}

html[data-theme='light'] .examer-dashboard-outside-container input:not([type='radio']):not([type='checkbox']):focus,
html[data-theme='light'] .examer-dashboard-outside-container textarea:focus {
  border-color: var(--examer-primary);
  box-shadow: var(--examer-focus);
}

html[data-theme='light'] .examer-dashboard-outside-container input::placeholder,
html[data-theme='light'] .examer-dashboard-outside-container textarea::placeholder {
  color: var(--examer-text-subtle);
}

html[data-theme='light'] .examer-dashboard-student-answer-toolbar,
html[data-theme='light'] .examer-dashboard-rich-comments-editor,
html[data-theme='light'] .examer-dashboard-rich-comments-editor-wrapper,
html[data-theme='light'] .examer-dashboard-functional-tools-quill-wrapper,
html[data-theme='light'] .examer-dashboard-question-container .slate-editor-container {
  color: var(--examer-text);
  background: var(--examer-surface);
  border: 1px solid var(--examer-border);
  border-radius: 0.7rem;
}

html[data-theme='light'] .examer-dashboard-rich-comments-editor .ql-toolbar,
html[data-theme='light'] .examer-dashboard-rich-comments-editor-wrapper .ql-toolbar,
html[data-theme='light'] .examer-dashboard-functional-tools-quill-wrapper .ql-toolbar,
html[data-theme='light'] .examer-dashboard-question-container .slate-toolbar {
  background: var(--examer-surface-tint);
  border-color: var(--examer-border);
}

html[data-theme='light'] .examer-dashboard-rich-comments-editor .ql-container,
html[data-theme='light'] .examer-dashboard-rich-comments-editor-wrapper .ql-container,
html[data-theme='light'] .examer-dashboard-functional-tools-quill-wrapper .ql-container,
html[data-theme='light'] .examer-dashboard-rich-comments-editor .ql-editor,
html[data-theme='light'] .examer-dashboard-rich-comments-editor-wrapper .ql-editor,
html[data-theme='light'] .examer-dashboard-functional-tools-quill-wrapper .ql-editor {
  color: var(--examer-text);
  background: var(--examer-surface);
  border-color: var(--examer-border);
}

html[data-theme='light'] .examer-dashboard-rich-comments-editor .ql-stroke,
html[data-theme='light'] .examer-dashboard-rich-comments-editor-wrapper .ql-stroke,
html[data-theme='light'] .examer-dashboard-functional-tools-quill-wrapper .ql-stroke {
  stroke: var(--examer-text-muted);
}

html[data-theme='light'] .examer-dashboard-rich-comments-editor .ql-fill,
html[data-theme='light'] .examer-dashboard-rich-comments-editor-wrapper .ql-fill,
html[data-theme='light'] .examer-dashboard-functional-tools-quill-wrapper .ql-fill {
  fill: var(--examer-text-muted);
}

html[data-theme='light'] .examer-dashboard-student-answer-toolbar .btn,
html[data-theme='light'] .examer-dashboard-answer-type-section .btn,
html[data-theme='light'] .examer-dashboard-user-answer-reorder-controls .btn,
html[data-theme='light'] .examer-dashboard-question-header .btn {
  color: var(--examer-primary-hover);
  background: var(--examer-surface);
  border: 1px solid var(--examer-border-strong) !important;
  border-radius: 0.5rem;
  box-shadow: var(--examer-shadow-sm);
}

html[data-theme='light'] .examer-dashboard-student-answer-toolbar .btn:hover,
html[data-theme='light'] .examer-dashboard-answer-type-section .btn:hover:not(:disabled),
html[data-theme='light'] .examer-dashboard-user-answer-reorder-controls .btn:hover:not(:disabled),
html[data-theme='light'] .examer-dashboard-question-header .btn:hover:not(:disabled) {
  color: var(--examer-primary-hover);
  background: var(--examer-primary-soft);
  border-color: var(--examer-primary) !important;
}

html[data-theme='light'] .examer-dashboard-answer-type-section .btn-outline-danger:hover,
html[data-theme='light'] .examer-dashboard-question-header .btn-outline-danger:hover {
  color: #ffffff;
  background: var(--examer-danger);
  border-color: var(--examer-danger) !important;
}

html[data-theme='light'] .examer-dashboard-assess-question-toggle-slider {
  background: var(--examer-surface-tint-strong);
  border: 1px solid var(--examer-border-strong);
}

html[data-theme='light'] input:checked + .examer-dashboard-assess-question-toggle-slider {
  background: var(--examer-primary);
  border-color: var(--examer-primary);
}

/* Functional tools: navigation, chat, notes, and learning modes. */
html[data-theme='light'] .examer-dashboard-functional-tools {
  border-left-color: var(--examer-border);
  box-shadow: var(--examer-shadow-md);
}

html[data-theme='light'] .examer-dashboard-functional-tools-question {
  color: var(--examer-text);
  background: var(--examer-surface-tint);
  border: 1px solid var(--examer-border);
  box-shadow: var(--examer-shadow-sm);
}

html[data-theme='light'] .examer-dashboard-functional-tools-question-path {
  color: var(--examer-text-muted);
  background: var(--examer-surface-soft);
  border-left-color: var(--examer-primary);
}

html[data-theme='light'] .examer-dashboard-functional-tools-tabs {
  padding: 0.25rem;
  background: var(--examer-surface-tint);
  border: 1px solid var(--examer-border);
  box-shadow: inset 0 1px 2px rgba(29, 69, 82, 0.05);
}

html[data-theme='light'] .examer-dashboard-functional-tools-tab {
  color: var(--examer-text-muted);
  border-radius: 0.5rem;
}

html[data-theme='light'] .examer-dashboard-functional-tools-tab:hover {
  color: var(--examer-text);
  background: rgba(255, 255, 255, 0.72);
}

html[data-theme='light'] .examer-dashboard-functional-tools-tab.active {
  color: var(--examer-primary-hover);
  background: var(--examer-surface);
  box-shadow: var(--examer-shadow-sm);
}

html[data-theme='light'] .examer-dashboard-functional-tools-conversation,
html[data-theme='light'] .examer-dashboard-functional-tools-chat,
html[data-theme='light'] .examer-dashboard-functional-tools-notes {
  background: transparent;
}

html[data-theme='light'] .examer-dashboard-functional-tools-empty-chat p {
  color: var(--examer-text-muted) !important;
}

html[data-theme='light'] .examer-dashboard-functional-tools-message {
  border: 1px solid var(--examer-border);
  box-shadow: var(--examer-shadow-sm);
}

html[data-theme='light'] .examer-dashboard-functional-tools-message.user {
  color: #ffffff;
  background: var(--examer-primary);
  border-color: var(--examer-primary);
}

html[data-theme='light'] .examer-dashboard-functional-tools-message.ai {
  color: var(--examer-text);
  background: var(--examer-surface-soft);
}

html[data-theme='light'] .examer-dashboard-functional-tools-message.ai h2,
html[data-theme='light'] .examer-dashboard-functional-tools-message.ai h3,
html[data-theme='light'] .examer-dashboard-functional-tools-message.ai strong,
html[data-theme='light'] .examer-dashboard-functional-tools-message.ai b,
html[data-theme='light'] .examer-dashboard-functional-tools-message.ai a {
  color: var(--examer-primary-hover);
}

html[data-theme='light'] .examer-dashboard-functional-tools-input-area {
  background: var(--examer-surface);
  border-top: 1px solid var(--examer-border);
}

html[data-theme='light'] .examer-dashboard-functional-tools-input {
  color: var(--examer-text);
  background: var(--examer-surface-soft);
  border: 1px solid var(--examer-border-strong);
}

html[data-theme='light'] .examer-dashboard-functional-tools-input:focus {
  background: var(--examer-surface);
  border-color: var(--examer-primary);
  box-shadow: var(--examer-focus);
}

html[data-theme='light'] .examer-dashboard-functional-tools-close {
  color: var(--examer-danger);
  background: var(--examer-danger-soft);
  border: 1px solid #e7bcbc;
}

html[data-theme='light'] .examer-dashboard-functional-tools-close:hover {
  color: #ffffff;
  background: var(--examer-danger);
  border-color: var(--examer-danger);
}

html[data-theme='light'] .examer-dashboard-functional-tools-mode-info,
html[data-theme='light'] .examer-dashboard-metacognitive-question,
html[data-theme='light'] .examer-dashboard-scaffolding-question,
html[data-theme='light'] .examer-dashboard-followup-question,
html[data-theme='light'] .examer-dashboard-metacognitive-option-button,
html[data-theme='light'] .examer-dashboard-scaffolding-option-button,
html[data-theme='light'] .examer-dashboard-followup-option-button {
  color: var(--examer-text);
  background: var(--examer-surface-soft);
  border: 1px solid var(--examer-border);
  box-shadow: var(--examer-shadow-sm);
}

html[data-theme='light'] .examer-dashboard-metacognitive-option-button:hover,
html[data-theme='light'] .examer-dashboard-scaffolding-option-button:hover,
html[data-theme='light'] .examer-dashboard-followup-option-button:hover {
  background: var(--examer-primary-soft);
  border-color: var(--examer-primary);
}

html[data-theme='light'] .examer-dashboard-functional-tools-mode-button {
  color: var(--examer-primary-hover);
  background: var(--examer-surface);
  border: 1px solid var(--examer-border-strong);
}

html[data-theme='light'] .examer-dashboard-functional-tools-mode-button:hover:not(:disabled) {
  color: #ffffff;
  background: var(--examer-primary);
  border-color: var(--examer-primary);
}

/* Portalled modals, documentation, image viewers, and help bot. */
html[data-theme='light'] .examer-dashboard-mock-share-modal-overlay,
html[data-theme='light'] .examer-dashboard-grading-overlay,
html[data-theme='light'] .examer-dashboard-action-loading-overlay,
html[data-theme='light'] .examer-dashboard-image-modal-overlay,
html[data-theme='light'] .examer-dashboard-documentation-modal {
  background: rgba(20, 45, 54, 0.48);
  backdrop-filter: blur(7px);
}

html[data-theme='light'] .examer-dashboard-mock-share-modal,
html[data-theme='light'] .examer-dashboard-action-loading-content,
html[data-theme='light'] .examer-dashboard-image-modal,
html[data-theme='light'] .examer-dashboard-documentation-container,
html[data-theme='light'] .examer-dashboard-help-bot .examer-dashboard-help-bot-chat {
  color: var(--examer-text);
  background: var(--examer-surface);
  border: 1px solid var(--examer-border);
  box-shadow: var(--examer-shadow-lg);
}

html[data-theme='light'] .examer-dashboard-mock-share-modal-header,
html[data-theme='light'] .examer-dashboard-documentation-header,
html[data-theme='light'] .examer-dashboard-help-bot-header {
  color: var(--examer-text);
  background: var(--examer-surface-tint);
  border-color: var(--examer-border);
}

html[data-theme='light'] .examer-dashboard-mock-share-modal-header h4,
html[data-theme='light'] .examer-dashboard-documentation-title h2,
html[data-theme='light'] .examer-dashboard-help-bot .examer-dashboard-help-bot-title,
html[data-theme='light'] .examer-dashboard-action-loading-title {
  color: var(--examer-text);
  text-shadow: none;
}

html[data-theme='light'] .examer-dashboard-mock-share-list,
html[data-theme='light'] .examer-dashboard-documentation-intro,
html[data-theme='light'] .examer-dashboard-documentation-category,
html[data-theme='light'] .examer-dashboard-documentation-item,
html[data-theme='light'] .examer-dashboard-documentation-icon-item,
html[data-theme='light'] .examer-dashboard-description-panel-item,
html[data-theme='light'] .examer-dashboard-documentation-image-figure,
html[data-theme='light'] .examer-dashboard-documentation-video-figure {
  color: var(--examer-text);
  background: var(--examer-surface-soft);
  border-color: var(--examer-border);
}

html[data-theme='light'] .examer-dashboard-documentation-category:hover,
html[data-theme='light'] .examer-dashboard-documentation-category-header:hover {
  background: var(--examer-primary-soft);
  border-color: var(--examer-border-strong);
}

html[data-theme='light'] .examer-dashboard-documentation-category-title,
html[data-theme='light'] .examer-dashboard-documentation-item-title,
html[data-theme='light'] .examer-dashboard-panel-title {
  color: var(--examer-text);
  font-weight: 700;
}

html[data-theme='light'] .examer-dashboard-documentation-item-description,
html[data-theme='light'] .examer-dashboard-panel-description,
html[data-theme='light'] .examer-dashboard-documentation-intro p,
html[data-theme='light'] .examer-dashboard-documentation-image-figure figcaption,
html[data-theme='light'] .examer-dashboard-documentation-video-figure figcaption {
  color: var(--examer-text-muted);
}

html[data-theme='light'] .examer-dashboard-mock-share-user-row,
html[data-theme='light'] .examer-dashboard-mock-share-user-item {
  color: var(--examer-text);
  background: var(--examer-surface);
  border-color: var(--examer-border);
}

html[data-theme='light'] .examer-dashboard-mock-share-user-row:hover {
  background: var(--examer-primary-soft);
  border-color: var(--examer-primary);
}

html[data-theme='light'] .examer-dashboard-documentation-close-btn,
html[data-theme='light'] .examer-dashboard-mock-share-close-btn,
html[data-theme='light'] .examer-dashboard-image-modal-close {
  color: var(--examer-text-muted);
  background: var(--examer-surface);
  border: 1px solid var(--examer-border);
}

html[data-theme='light'] .examer-dashboard-documentation-close-btn:hover,
html[data-theme='light'] .examer-dashboard-mock-share-close-btn:hover,
html[data-theme='light'] .examer-dashboard-image-modal-close:hover {
  color: #ffffff;
  background: var(--examer-danger);
  border-color: var(--examer-danger);
}

html[data-theme='light'] .examer-dashboard-help-bot .examer-dashboard-help-bot-toggle {
  color: #ffffff;
  background: var(--examer-primary);
  border: 1px solid var(--examer-primary);
  box-shadow: 0 8px 24px rgba(33, 111, 135, 0.28);
}

html[data-theme='light'] .examer-dashboard-help-bot .examer-dashboard-help-bot-toggle:hover {
  background: var(--examer-primary-hover);
}

html[data-theme='light'] .examer-dashboard-help-bot .examer-dashboard-help-bot-messages,
html[data-theme='light'] .examer-dashboard-help-bot .examer-dashboard-help-bot-input {
  background: var(--examer-surface-soft);
}

html[data-theme='light'] .examer-dashboard-help-bot .examer-dashboard-message.user .examer-dashboard-message-bubble {
  color: #ffffff;
  background: var(--examer-primary);
  border-color: var(--examer-primary);
}

html[data-theme='light'] .examer-dashboard-help-bot .examer-dashboard-message.bot .examer-dashboard-message-bubble {
  color: var(--examer-text);
  background: var(--examer-surface);
  border: 1px solid var(--examer-border);
}

html[data-theme='light'] .examer-dashboard-help-bot .examer-dashboard-input-container {
  color: var(--examer-text);
  background: var(--examer-surface);
  border: 1px solid var(--examer-border-strong);
}

html[data-theme='light'] .examer-dashboard-help-bot .examer-dashboard-input-container:focus-within {
  border-color: var(--examer-primary);
  box-shadow: var(--examer-focus);
}

html[data-theme='light'] .examer-dashboard-help-bot .examer-dashboard-input-container textarea {
  color: var(--examer-text);
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* Scrollbars and mobile navigation. */
html[data-theme='light'] .examer-dashboard-outside-container * {
  scrollbar-color: #9bbbc4 var(--examer-surface-tint);
}

html[data-theme='light'] .examer-dashboard-outside-container *::-webkit-scrollbar-track,
html[data-theme='light'] .examer-dashboard-documentation-content::-webkit-scrollbar-track,
html[data-theme='light'] .examer-dashboard-help-bot .examer-dashboard-help-bot-messages::-webkit-scrollbar-track {
  background: var(--examer-surface-tint);
}

html[data-theme='light'] .examer-dashboard-outside-container *::-webkit-scrollbar-thumb,
html[data-theme='light'] .examer-dashboard-documentation-content::-webkit-scrollbar-thumb,
html[data-theme='light'] .examer-dashboard-help-bot .examer-dashboard-help-bot-messages::-webkit-scrollbar-thumb {
  background: #9bbbc4;
  border: 2px solid var(--examer-surface-tint);
  border-radius: 999px;
}

html[data-theme='light'] .examer-dashboard-mobile-nav-bar {
  background: var(--examer-surface);
  border-color: var(--examer-border);
  box-shadow: var(--examer-shadow-md);
}

html[data-theme='light'] .examer-dashboard-mobile-nav-tab {
  color: var(--examer-text-muted);
  background: transparent;
}

html[data-theme='light'] .examer-dashboard-mobile-nav-tab:hover {
  color: var(--examer-primary-hover);
  background: var(--examer-primary-soft);
}

html[data-theme='light'] .examer-dashboard-mobile-nav-tab.active {
  color: #ffffff;
  background: var(--examer-primary);
}

@media (max-width: 767px) {
  html[data-theme='light'] .examer-dashboard-container {
    padding: 0.35rem;
  }

  html[data-theme='light'] .examer-dashboard-answer-book,
  html[data-theme='light'] .examer-dashboard-paper-materials-section,
  html[data-theme='light'] .examer-dashboard-materials-section,
  html[data-theme='light'] .examer-dashboard-functional-tools {
    border-radius: 0.7rem;
  }

  html[data-theme='light'] .examer-dashboard-question-container {
    padding: 0.85rem;
  }
}

/* =============================================================================
   Copilot panel — white-theme alignment
   -----------------------------------------------------------------------------
   The Copilot chat (CopilotPanel.css, ChatMain.css, ChatSideBar.css) predates the
   token system and hard-codes a lot of dark greys: dark translucent input/file
   fills, neon scrollbars, `var(--ep-elevated)` / `var(--ep-surface-2)` used as a
   *text* colour (which flip to near-white in light and vanish), and Bootstrap
   `.text-white` labels/options inside the create/edit/report forms and the tool
   dropdowns.

   TSX changes (ChatSideBar.tsx, ChatMain.tsx, MessageCard.tsx): `text-white` has
   been removed from all form controls, options, and dropdown items — those
   elements now inherit from the container-scoped CSS token rules below. `text-white`
   is kept only on coloured action buttons (btn-info, btn-secondary, btn-danger)
   where white labels are correct in both themes.

   Every rule here is gated `html[data-theme='light']`, so DARK MODE IS UNTOUCHED.
   Loaded last (after the other light layers) so it can reuse every token.

   Gotchas honoured (see theme.md):
   - inputs/selects use `background-color` longhand, never `background`, so a
     custom <select> arrow image is never wiped.
   - `!important` is used only where Bootstrap utilities or the source CSS also
     use it, with higher specificity (adding `html[data-theme='light']`) to win.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   1. Chat surface text & scrollbars
   --------------------------------------------------------------------------- */

/* Empty-state prompt ("Select your tailor-made AI chat" / "Create a new AI
   chat") is on the light `--ep-elevated` chat surface. With text-white removed
   from the TSX the hint text inherits correctly, but pin it explicitly. */
html[data-theme='light'] .chat-main .text-white:not(.btn) {
  color: var(--ep-text) !important;
}

/* Message-list scrollbar — dark track + neon thumb → light track + teal thumb. */
html[data-theme='light'] .chat-message-list::-webkit-scrollbar-track {
  background: var(--ep-raise-1);
  border-radius: 10px;
}
html[data-theme='light'] .chat-message-list::-webkit-scrollbar-thumb {
  background: var(--ep-glow-a30);
}
html[data-theme='light'] .chat-message-list::-webkit-scrollbar-thumb:hover {
  background: var(--ep-glow-a50);
}

/* Loading spinner ring (was a hard #333 track). */
html[data-theme='light'] .loading-spinner {
  border-color: var(--ep-border);
  border-top-color: var(--ep-accent);
}

/* -----------------------------------------------------------------------------
   2. Message input bar + attachment chips
   --------------------------------------------------------------------------- */

/* The composer pill and file chips hard-code a dark rgba(60,60,66,.7) fill. */
html[data-theme='light'] .chat-message-input-form,
html[data-theme='light'] .file-bar {
  background-color: var(--ep-surface);
  border: 1px solid var(--ep-border);
  box-shadow: var(--ep-shadow-sm);
}
html[data-theme='light'] .chat-message-input-form:focus-within {
  border-color: var(--ep-accent);
  box-shadow: var(--ep-ring);
}

/* Send / attach icon buttons — neon hover wash → soft teal tint. */
html[data-theme='light'] .message-input-btn:hover {
  background-color: var(--ep-panel-teal-10) !important;
}

/* -----------------------------------------------------------------------------
   3. Parsed-message content (tables, code, math) — token misuse fixes
   -----------------------------------------------------------------------------
   These selectors colour text with surface tokens (`--ep-elevated`,
   `--ep-surface-2`) that are *dark* in the default palette (readable on the
   light/grey blocks they sit on) but flip to near-white in light → invisible.
   The blocks themselves (math-block #f9f9f9, pre grey, parsed svg white) stay
   light in BOTH palettes, so the text must always be dark — pin it. */
html[data-theme='light'] th strong,
html[data-theme='light'] td strong,
html[data-theme='light'] td span,
html[data-theme='light'] .math-block p,
html[data-theme='light'] .math-block span {
  color: var(--ep-text);
}

html[data-theme='light'] tbody p,
html[data-theme='light'] .plain-text-code p,
html[data-theme='light'] .table li,
html[data-theme='light'] .language-,
html[data-theme='light'] .language- p,
html[data-theme='light'] .language- li,
html[data-theme='light'] .language-text,
html[data-theme='light'] .language-text p,
html[data-theme='light'] .language-plaintext,
html[data-theme='light'] .language-plaintext p,
html[data-theme='light'] .language-plaintext li,
html[data-theme='light'] .language-sql,
html[data-theme='light'] .language-sql p {
  color: #1f2329 !important;
}

/* -----------------------------------------------------------------------------
   4. Create / edit / report / question forms (modals)
   -----------------------------------------------------------------------------
   text-white has been removed from TSX form controls; these rules handle both the
   base text colour for the whole container (so labels and non-classed elements
   inherit correctly) and the individual field styling. */

/* Base text for the whole modal shell — every descendant without its own colour
   rule inherits this, so labels, hints and field text all read dark. */
html[data-theme='light'] .assistant-form-container,
html[data-theme='light'] .add-conv-container,
html[data-theme='light'] .message-main-paper-form-container {
  color: var(--ep-text);
}

/* Explicit label colour — Bootstrap's cascade sometimes delivers #212529 from
   body; pin it to the theme token so it always tracks the correct dark value. */
html[data-theme='light'] .assistant-form-container label,
html[data-theme='light'] .add-conv-container label,
html[data-theme='light'] .message-main-paper-form-container label {
  color: var(--ep-text);
}

/* Container hover — source has a hardcoded neon glow (rgba(0,247,255,.2)).
   Replace with a calm, teal-tinted drop shadow on the light theme. */
html[data-theme='light'] .assistant-form-container:hover,
html[data-theme='light'] .add-conv-container:hover,
html[data-theme='light'] .message-main-paper-form-container:hover {
  box-shadow: var(--ep-shadow-lg);
}

/* Form fields — white fill, neutral border, dark text.
   background-color longhand (not background) preserves any custom arrow image. */
html[data-theme='light'] .message-main-paper-form-container .form-control,
html[data-theme='light'] .message-main-paper-form-container select,
html[data-theme='light'] .assistant-form-container .form-control,
html[data-theme='light'] .assistant-form-container select,
html[data-theme='light'] .assistant-form-container input,
html[data-theme='light'] .add-conv-container .form-control,
html[data-theme='light'] .add-conv-container select,
html[data-theme='light'] .add-conv-container input,
html[data-theme='light'] .search-bar {
  background-color: var(--ep-surface);
  border: 1px solid var(--ep-border);
  color: var(--ep-text) !important;
}

/* Hover state — strengthen the border and pin white bg (base CSS now sets a
   solid dark bg for dark mode; we must override it explicitly here). */
html[data-theme='light'] .message-main-paper-form-container .form-control:hover,
html[data-theme='light'] .message-main-paper-form-container select:hover,
html[data-theme='light'] .assistant-form-container .form-control:hover,
html[data-theme='light'] .assistant-form-container select:hover,
html[data-theme='light'] .assistant-form-container input:hover,
html[data-theme='light'] .add-conv-container .form-control:hover,
html[data-theme='light'] .add-conv-container select:hover,
html[data-theme='light'] .add-conv-container input:hover {
  background-color: var(--ep-surface);
  border-color: var(--ep-border-strong);
}

/* Focus state — teal accent border + soft teal ring; overrides the source's
   hardcoded neon box-shadow rgba(0,247,255,.2). */
html[data-theme='light'] .message-main-paper-form-container .form-control:focus,
html[data-theme='light'] .message-main-paper-form-container select:focus,
html[data-theme='light'] .assistant-form-container .form-control:focus,
html[data-theme='light'] .assistant-form-container select:focus,
html[data-theme='light'] .assistant-form-container input:focus,
html[data-theme='light'] .add-conv-container .form-control:focus,
html[data-theme='light'] .add-conv-container select:focus,
html[data-theme='light'] .add-conv-container input:focus {
  background-color: var(--ep-surface);
  border-color: var(--ep-accent);
  box-shadow: var(--ep-ring);
}

/* Native <option> popups — white sheet + dark text (some browsers respect this
   in the open dropdown; all respect it for the closed selected-value display). */
html[data-theme='light'] .message-main-paper-form-container select option,
html[data-theme='light'] .assistant-form-container select option,
html[data-theme='light'] .add-conv-container select option {
  background-color: var(--ep-surface);
  color: var(--ep-text);
}

/* Report-modal textarea (was text-white, now text-free — still pin it). */
html[data-theme='light'] .report-form-container .form-control,
html[data-theme='light'] .report-form-textarea {
  background-color: var(--ep-surface);
  border: 1px solid var(--ep-border);
  color: var(--ep-text) !important;
}

/* Primary glow button — bakes in #111 text, which is low-contrast on the
   deepened light-teal gradient; flip the label to white. */
html[data-theme='light'] .message-main-paper-form-container .btn:not(.btn-secondary),
html[data-theme='light'] .assistant-form-button:not(.btn-secondary):not(.btn-info),
html[data-theme='light'] #settings-form .btn:not(.btn-secondary) {
  color: var(--ep-text-on-accent);
}

/* Secondary buttons: dark translucent fill → light surface, dark label. */
html[data-theme='light'] .message-main-paper-form-container .btn-secondary,
html[data-theme='light'] .assistant-form-button.btn-secondary,
html[data-theme='light'] #settings-form .btn-secondary {
  background-color: var(--ep-surface-3);
  border: 1px solid var(--ep-border);
  color: var(--ep-text);
}

/* -----------------------------------------------------------------------------
   5. Tool dropdowns (message tools, conversation tools, extra tools)
   -----------------------------------------------------------------------------
   text-white removed from TSX dropdown item buttons — but keep the CSS override
   as a defensive fallback and to ensure the hover style is correct. */
html[data-theme='light'] .msg-tools-dropdown-item,
html[data-theme='light'] .conv-tools-dropdown-item,
html[data-theme='light'] .extra-tools-dropdown-item,
html[data-theme='light'] .dropdown-item {
  color: var(--ep-text) !important;
}
html[data-theme='light'] .msg-tools-dropdown-item:hover,
html[data-theme='light'] .conv-tools-dropdown-item:hover,
html[data-theme='light'] .extra-tools-dropdown-item:hover,
html[data-theme='light'] .dropdown-item:hover {
  background-color: var(--ep-panel-teal-10);
}

/* Icons inside the message-tools menu drop a neon glow filter — remove it. */
html[data-theme='light'] .msg-tools-dropdown-item img,
html[data-theme='light'] .msg-tools-dropdown-item svg {
  filter: none;
}

/* -----------------------------------------------------------------------------
   6. Conversation list & FAQ
   --------------------------------------------------------------------------- */

/* Delete-badge glyph (red disc) — force white glyph so it reads on the red. */
html[data-theme='light'] .deleteicon {
  color: #ffffff !important;
}

/* FAQ accordion header hover hard-codes a dark #565656 → soft teal tint. */
html[data-theme='light'] .faq-category-header:hover {
  background-color: var(--ep-panel-teal-10) !important;
}

/* Account avatar disc — softer light-theme border instead of pure black. */
html[data-theme='light'] .account-icon {
  border-color: var(--ep-border-strong);
}

/* =============================================================================
   Paper Dashboard density
   -----------------------------------------------------------------------------
   The Peditor workspace establishes the dashboard's visual scale. This final
   cascade layer applies that same type, control, spacing, and corner rhythm to
   Copilot, profile overlays, search/result pages, the Peditor-paper picker,
   and institution surfaces in both themes.
   ============================================================================= */

html[data-theme] {
  --pd-overlay-font-size: 0.72rem;
  --pd-compact-font-size: 0.78rem;
  --pd-compact-title-size: 1.05rem;
  --pd-compact-gap: 0.7rem;
  --pd-compact-padding: 0.85rem;
}

/* ---------------------------------------------------------------------------
   Paper navigation sidebar.
   The rail is scaled independently from Paper Main, so reduce its internal
   density while retaining the 80px collapsed width used by the canvas offset.
   ------------------------------------------------------------------------- */
html[data-theme] .sidebar-content {
  padding: 0.65rem;
}

html[data-theme] .sidebar-zoom-controls-fixed {
  padding-bottom: 0.3rem;
}

html[data-theme] :is(.zoom-controls-container, .zoom-percentage-only) {
  min-height: 2rem;
  gap: 0.3rem;
  margin-bottom: 0.35rem;
  padding: 0.3rem;
  border-radius: var(--pd-control-radius);
}

html[data-theme] .zoom-control-button {
  min-width: 1.8rem;
  min-height: 1.8rem;
  padding: 0.28rem;
  border-radius: 0.45rem;
}

html[data-theme] .zoom-control-button img {
  width: 1rem;
  height: 1rem;
}

html[data-theme] :is(.zoom-level-display, .zoom-level-only) {
  min-width: 2rem;
  padding: 0.2rem 0.3rem;
  font-size: 0.7rem;
}

html[data-theme] .sidebar-category {
  margin-bottom: 0.75rem;
}

html[data-theme] .sidebar-category.mt-3 {
  margin-top: 0.45rem !important;
}

html[data-theme] .sidebar-category .category-header {
  margin-bottom: 0.45rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.035em;
}

html[data-theme] .sidebar-category .category-label {
  font-size: 0.76rem;
}

html[data-theme] .sidebar-action-button {
  min-height: 2.55rem;
  gap: 0.6rem;
  margin-bottom: 0.4rem !important;
  padding: 0.48rem 0.55rem;
  border-radius: var(--pd-control-radius);
  transform: translateX(-0.2rem);
}

html[data-theme] .sidebar-action-button:hover {
  transform: translateX(-0.2rem) translateY(-1px);
}

html[data-theme] .sidebar-action-button.active,
html[data-theme] .sidebar-action-button.active:hover {
  transform: translateX(-0.2rem);
}

html[data-theme] .sidebar-action-button img,
html[data-theme] .sidebar-action-button svg {
  width: 1.55rem !important;
  height: 1.55rem !important;
  min-width: 1.55rem;
  font-size: 1.15rem;
}

html[data-theme] .sidebar-action-button .button-label {
  font-size: 0.76rem;
  line-height: 1.2;
}

html[data-theme] .sidebar-nav .subscription-badge {
  margin-top: 0.1rem;
  padding: 0.18rem 0.42rem;
  border-radius: 999px;
  font-size: 0.62rem;
  letter-spacing: 0.025em;
}

/* ---------------------------------------------------------------------------
   Copilot: shell, sidebar, conversation controls, messages, and composer.
   Copilot lives inside the scaled Paper Main canvas, so it uses the Peditor
   dashboard tokens directly.
   ------------------------------------------------------------------------- */
html[data-theme] .message-container {
  font-size: var(--pd-panel-font-size);
  line-height: 1.45;
}

html[data-theme] .chat-sidebar {
  padding: 0.9rem;
}

html[data-theme] .chat-sidebar .account-icon {
  width: 3rem;
  height: 3rem;
  margin: 0.4rem;
  padding: 0.25rem;
  border-width: 1px;
  font-size: 1.35rem;
}

html[data-theme] .chat-sidebar .username {
  font-size: 0.95rem;
  line-height: 1.25;
}

html[data-theme] .chat-sidebar :is(.tool-button, .confirm-button) {
  min-height: var(--pd-control-height);
  padding: 0.4rem 0.55rem;
  border-radius: var(--pd-control-radius);
  font-size: 0.9rem;
}

html[data-theme] .chat-sidebar :is(
  .dropdown-menu,
  .conv-tools-dropdown-menu,
  .extra-tools-dropdown-menu
),
html[data-theme] .msg-tools-dropdown-menu {
  border-radius: var(--pd-control-radius);
}

html[data-theme] .chat-sidebar :is(
  .dropdown-item,
  .conv-tools-dropdown-item,
  .extra-tools-dropdown-item,
  .search-result-item,
  .conversation-item .list-group-item,
  .conversation-item .btn
),
html[data-theme] .msg-tools-dropdown-item {
  min-height: 2rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0.5rem;
  font-size: var(--pd-compact-font-size);
  line-height: 1.25;
}

html[data-theme] .conversation-list-container {
  margin-top: 0.55rem;
}

html[data-theme] .chat-sidebar .list-group-item {
  padding: 0.45rem 0.6rem;
  font-size: var(--pd-compact-font-size);
  line-height: 1.3;
}

html[data-theme] .chat-message-input-form {
  width: calc(100% - 1.5rem);
  min-height: 4.1rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--pd-card-radius);
}

html[data-theme] .chat-form-control {
  margin: 0 0.45rem;
  font-size: 0.82rem;
  line-height: 1.4;
}

html[data-theme] .message-input-btn {
  width: var(--pd-control-height);
  height: var(--pd-control-height);
  min-width: var(--pd-control-height);
  padding: 0.35rem;
}

html[data-theme] .report-btn {
  min-width: var(--pd-control-height);
}

html[data-theme] .message-list {
  padding: 0.7rem 1rem;
}

html[data-theme] .message-card {
  margin: 0.25rem 0;
  padding: 0.65rem 0.75rem;
  border-radius: var(--pd-card-radius);
  font-size: 0.82rem;
  line-height: 1.5;
}

html[data-theme] .message-card :is(ul, ol) {
  margin-bottom: 0.55rem;
  padding-left: 1.15rem;
}

html[data-theme] .message-card li {
  margin-bottom: 0.2rem;
}

html[data-theme] .parsed-html :is(h2, h3) {
  margin: 0.8rem 0 0.4rem;
  font-size: 1.02rem;
  line-height: 1.3;
}

html[data-theme] .parsed-html :is(h4, h5, h6) {
  margin: 0.65rem 0 0.3rem;
  font-size: 0.9rem;
  line-height: 1.35;
}

html[data-theme] :is(.file-bar, .math-block, .plain-text-code) {
  padding: 0.55rem 0.7rem;
  border-radius: var(--pd-control-radius);
  font-size: var(--pd-compact-font-size);
}

html[data-theme] .faq-category-header {
  padding: 0.55rem 0.7rem;
  font-size: 0.84rem;
}

html[data-theme] .faq-category-content,
html[data-theme] .faq-item p {
  font-size: var(--pd-compact-font-size);
  line-height: 1.45;
}

/* Copilot create/edit/search/report forms share Peditor's card and controls. */
html[data-theme] :is(
  .search-bar-container,
  .assistant-form-container,
  .add-conv-container,
  .message-main-paper-form-container
) {
  width: min(90vw, 38rem);
  padding: 1rem;
  border-radius: var(--pd-card-radius);
  font-size: var(--pd-compact-font-size);
  line-height: 1.45;
}

html[data-theme] :is(
  .search-bar-container,
  .assistant-form-container,
  .add-conv-container,
  .message-main-paper-form-container
) :is(label, .form-label) {
  margin-bottom: 0.3rem;
  font-size: var(--pd-label-font-size);
  font-weight: 680;
}

html[data-theme] :is(
  .search-bar,
  .assistant-form-container input,
  .assistant-form-container select,
  .assistant-form-container textarea,
  .add-conv-container input,
  .add-conv-container select,
  .add-conv-container textarea,
  .message-main-paper-form-container input,
  .message-main-paper-form-container select,
  .message-main-paper-form-container textarea
) {
  min-height: var(--pd-control-height);
  margin-bottom: 0.65rem;
  padding: 0.48rem 0.68rem;
  border-radius: var(--pd-control-radius);
  font-size: 0.8rem;
  line-height: 1.3;
}

html[data-theme] :is(
  .assistant-form-button,
  .assistant-form-container .btn,
  .add-conv-container .btn,
  .message-main-paper-form-container .btn
) {
  min-height: var(--pd-control-height);
  margin: 0.2rem;
  padding: 0.48rem 0.78rem;
  border-radius: var(--pd-control-radius);
  font-size: var(--pd-compact-font-size);
  line-height: 1.1;
}

/* ---------------------------------------------------------------------------
   Profile, settings, subscriptions, feedback, and transaction overlays.
   These are fixed outside the zoomed canvas, so their desktop scale is reduced
   to match the apparent size of Peditor at the 80% dashboard zoom.
   ------------------------------------------------------------------------- */
@media (min-width: 769px) {
  html[data-theme] .profile-panel-container {
    font-size: var(--pd-overlay-font-size);
    line-height: 1.4;
  }

  html[data-theme] .profile-dropdown-menu {
    min-width: 13.5rem !important;
    border-radius: var(--pd-control-radius) !important;
    font-size: 0.75rem !important;
  }

  html[data-theme] .profile-dropdown-menu .dropdown-item {
    min-height: 2rem;
    padding: 0.45rem 0.65rem;
    border-radius: 0.45rem;
    font-size: 0.75rem;
    line-height: 1.2;
  }

  html[data-theme] .profile-dropdown-menu .dropdown-item img {
    width: 1.1rem !important;
    height: 1.1rem !important;
  }

  html[data-theme] :is(
    .user-setting-container,
    .subscription-details-container,
    .feedback-container,
    .subscription-history-modal,
    .transactions-center-modal,
    .consent-modal-container
  ) {
    font-size: var(--pd-overlay-font-size);
    line-height: 1.4;
  }

  html[data-theme] :is(
    .user-setting-header,
    .subscription-history-modal-header,
    .transactions-center-modal-header,
    .consent-modal-header
  ) {
    padding: 0.65rem 0.85rem;
  }

  html[data-theme] :is(
    .user-setting-header,
    .subscription-history-modal-header,
    .transactions-center-modal-header,
    .consent-modal-header
  ) :is(h2, h3, h4) {
    margin: 0;
    font-size: var(--pd-compact-title-size);
    line-height: 1.25;
  }

  html[data-theme] :is(
    .user-setting-content,
    .subscription-details-content,
    .subscription-history-modal-content,
    .transactions-center-modal-content,
    .consent-modal-content
  ) {
    padding: var(--pd-compact-padding);
  }

  html[data-theme] #settings-form {
    padding: 0.65rem;
  }

  html[data-theme] :is(
    .user-setting-container,
    .subscription-details-container,
    .feedback-container
  ) :is(label, .form-label, .country-selector-label) {
    margin-bottom: 0.25rem;
    font-size: 0.7rem;
    line-height: 1.3;
  }

  html[data-theme] :is(
    .user-setting-container,
    .subscription-details-container,
    .feedback-container
  ) :is(input:not([type='checkbox']):not([type='radio']), select, textarea, .form-control, .form-select) {
    min-height: 2rem;
    margin-bottom: 0.55rem;
    padding: 0.42rem 0.58rem;
    border-radius: 0.52rem;
    font-size: 0.72rem;
    line-height: 1.3;
  }

  html[data-theme] :is(
    .user-setting-container,
    .subscription-details-container,
    .feedback-container,
    .subscription-history-modal,
    .transactions-center-modal,
    .consent-modal-container
  ) :is(.btn, button:not(.btn-close)) {
    min-height: 2rem;
    margin: 0.15rem;
    padding: 0.42rem 0.68rem;
    border-radius: 0.52rem;
    font-size: 0.72rem;
    line-height: 1.1;
  }

  html[data-theme] :is(.user-setting-container, .subscription-details-container) textarea {
    min-height: 4.5rem;
  }

  html[data-theme] :is(.profile-panel-container, .paper-main) .comparison-table {
    font-size: 0.7rem;
  }

  html[data-theme] :is(.profile-panel-container, .paper-main) .comparison-table :is(th, td) {
    padding: 0.34rem 0.45rem;
  }

  html[data-theme] :is(.profile-panel-container, .paper-main) .premium-plan-card {
    padding: 0.7rem;
  }

  html[data-theme] :is(.profile-panel-container, .paper-main) .premium-plan-title {
    font-size: 0.85rem;
  }

  html[data-theme] :is(.profile-panel-container, .paper-main) .premium-plan-price {
    margin-bottom: 0.55rem;
    font-size: 1.2rem;
  }

  /* Settings tabs sit outside the scrollable form content. */
  html[data-theme] .user-setting-tabs {
    display: flex;
    flex-shrink: 0;
    gap: 0.3rem;
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid var(--ep-raise-3);
  }

  html[data-theme] .user-setting-tab {
    min-height: 2rem;
    padding: 0.42rem 0.7rem;
    border: 1px solid var(--ep-raise-3);
    border-radius: var(--pd-control-radius);
    color: var(--ep-text-2);
    background: var(--ep-raise-1);
    font-size: 0.72rem;
    font-weight: 680;
    line-height: 1.15;
    cursor: pointer;
  }

  html[data-theme] .user-setting-tab:hover {
    color: var(--ep-text);
    border-color: var(--ep-border-strong);
  }

  html[data-theme] .user-setting-tab.active {
    color: var(--ep-glow);
    border-color: var(--ep-glow-a50);
    background: var(--ep-glow-a10);
  }

  html[data-theme] .user-setting-title {
    margin: 0;
    color: var(--ep-text);
    font-size: 0.95rem;
    font-weight: 700;
  }

  html[data-theme] .user-setting-tab-panel > :first-child {
    margin-top: 0;
  }

  html[data-theme] .user-setting-tab-panel--empty {
    display: grid;
    min-height: 12rem;
    place-items: center;
    color: var(--ep-text-2);
    text-align: center;
  }

  html[data-theme] .user-setting-tab-panel :is(h5, h6) {
    font-size: 0.82rem;
  }

  html[data-theme] .user-setting-container .fs-6 {
    font-size: 0.72rem !important;
  }

  html[data-theme] .user-setting-tab-panel :is(code, small) {
    font-size: 0.68rem !important;
    line-height: 1.4;
  }

  html[data-theme] .user-setting-tab-panel img {
    max-width: 1.35rem;
    max-height: 1.35rem;
  }

  /* Pricing content is also portalled and must match the compact overlay scale. */
  html[data-theme] .subscription-details-container .pricing-modal-header {
    margin-bottom: 0.7rem;
  }

  html[data-theme] .subscription-details-container .pricing-modal-header h2 {
    margin-bottom: 0.2rem;
    font-size: 1.02rem;
    line-height: 1.25;
  }

  html[data-theme] .subscription-details-container .pricing-modal-header p {
    margin-bottom: 0;
    font-size: 0.72rem;
    line-height: 1.4;
  }

  html[data-theme] .subscription-details-container .quota-pricing-container {
    gap: 0.65rem;
    margin-bottom: 0.7rem;
  }

  html[data-theme] .subscription-details-container .quota-pricing-card {
    border-radius: var(--pd-card-radius);
  }

  html[data-theme] .subscription-details-container .quota-card-header {
    gap: 0.5rem;
    padding: 0.55rem 0.65rem;
  }

  html[data-theme] .subscription-details-container .quota-card-header img {
    width: 1.55rem;
    height: 1.55rem;
    padding: 0.18rem;
  }

  html[data-theme] .subscription-details-container .quota-card-header h3 {
    font-size: 0.82rem;
  }

  html[data-theme] .subscription-details-container .quota-card-body {
    padding: 0.65rem;
    font-size: 0.72rem;
  }

  html[data-theme] .subscription-details-container :is(.price-tag, .mode-price) {
    font-size: 0.82rem;
  }

  html[data-theme] .subscription-details-container .quota-mode {
    margin-bottom: 0.35rem;
    padding: 0.4rem 0.5rem;
  }

  /* Transaction Center and every embedded history view use one compact rhythm. */
  html[data-theme] .transactions-center-modal {
    width: min(92vw, 58rem);
    min-width: min(46rem, 92vw);
    min-height: 68vh;
    max-height: 86vh;
    border-radius: 0.9rem;
    font-size: 0.72rem;
    line-height: 1.4;
  }

  html[data-theme] .transactions-center-modal-header {
    padding: 0.65rem 0.85rem;
  }

  html[data-theme] .transactions-center-modal-header h3 {
    font-size: 0.95rem;
  }

  html[data-theme] .transactions-center-modal-close-btn {
    width: 1.85rem;
    height: 1.85rem;
    padding: 0.25rem;
  }

  html[data-theme] .transactions-center-tabs {
    gap: 0.3rem;
    padding: 0.55rem 0.85rem 0;
  }

  html[data-theme] .transactions-center-tab {
    min-height: 1.9rem;
    padding: 0.35rem 0.62rem;
    font-size: 0.7rem;
  }

  html[data-theme] .transactions-center-modal :is(
    .peditor-panel-transaction-history-modal-content,
    .examer-panel-transaction-history-modal-content,
    .subscription-history-modal-content,
    .quota-transaction-history-modal-content,
    .inst-billing-history-modal-content
  ) {
    padding: 0.7rem 0.85rem;
    font-size: 0.72rem;
  }

  html[data-theme] .transactions-center-modal :is(
    .peditor-panel-transaction-history-search-form,
    .examer-panel-transaction-history-search-form,
    .subscription-history-search-form,
    .quota-transaction-history-search-form,
    .inst-billing-history-search-form
  ) {
    padding: 0.65rem 0.75rem;
    border-radius: var(--pd-card-radius);
  }

  html[data-theme] .transactions-center-modal :is(input, select, button) {
    font-size: 0.72rem;
  }
}

/* ---------------------------------------------------------------------------
   Search/results, Peditor-paper selection, and institution surfaces.
   ------------------------------------------------------------------------- */
html[data-theme] :is(
  .paper-market-container,
  .examer-panel-result-container,
  .peditor-panel-result-container,
  .assess-paper-record-result-container,
  .inst-plan,
  .inst-admin
) {
  font-size: var(--pd-panel-font-size);
  line-height: 1.45;
}

/* Harmonized result action clusters across Peditor, Examer, Assessor and Market. */
html[data-theme] :is(
  .peditor-panel-result-btn-container,
  .examer-panel-result-btn-container,
  .assess-paper-record-result-btn-container
) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.25rem;
  border: 1px solid var(--ep-border);
  border-radius: 999px;
  background: transparent;
}

html[data-theme] .peditor-panel-result-btn-container {
  border: none !important;
  background: transparent !important;
}

html[data-theme] .paper-market-result-btn-container,
html[data-theme='light'] .paper-market-result-btn-container {
  border: none !important;
  background: transparent !important;
}

html[data-theme] :is(
  .examer-panel-result-btn-container,
  .assess-paper-record-result-btn-container
) {
  border: none !important;
}

html[data-theme] .peditor-panel-result-container {
  background: transparent !important;
}

html[data-theme='light'] .peditor-panel-summary-tabs {
  background: transparent !important;
}

html[data-theme] :is(
  .peditor-panel-summary-section-container,
  .examer-panel-summary-details,
  .assess-paper-record-result-container,
  .assess-paper-record-summary-section-container
),
html[data-theme] :is(
  .peditor-panel-summary-section-container,
  .examer-panel-summary-details,
  .assess-paper-record-result-container,
  .assess-paper-record-summary-section-container
):hover {
  background: transparent !important;
  background-color: transparent !important;
}

html[data-theme] :is(
  .examer-panel-summary-section-container,
  .examer-panel-summary-details,
  .assess-paper-record-summary-section-container
),
html[data-theme] :is(
  .examer-panel-summary-section-container,
  .examer-panel-summary-details,
  .assess-paper-record-summary-section-container
):hover {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
}

html[data-theme] :is(
  .peditor-panel-result-btn,
  .examer-panel-result-btn,
  .assess-paper-record-result-btn,
  .paper-market-result-btn
) {
  box-sizing: border-box;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0.38rem;
  border-width: 1px;
  background: transparent;
  box-shadow: none;
}

html[data-theme] :is(
  .peditor-panel-result-btn,
  .examer-panel-result-btn,
  .assess-paper-record-result-btn,
  .paper-market-result-btn
) img {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
}

html[data-theme] .peditor-panel-result-btn .peditor-create-loading-spinner {
  box-sizing: border-box;
  width: 1.25rem;
  height: 1.25rem;
  border-width: 2px;
  border-color: rgba(79, 156, 249, 0.25);
  border-top-color: #4f9cf9;
}

html[data-theme] .peditor-panel-result-btn.creating {
  background: transparent !important;
  opacity: 0.78;
}

html[data-theme] :is(
  .examer-panel-status-pill,
  .peditor-panel-status-pill,
  .assess-paper-record-status-pill
) {
  box-sizing: border-box;
  width: 1.3rem;
  height: 1.3rem;
  padding: 0.12rem;
}

html[data-theme] :is(
  .examer-panel-status-pill,
  .peditor-panel-status-pill,
  .assess-paper-record-status-pill
) img {
  display: block;
  width: 1rem;
  height: 1rem;
  object-fit: contain;
}

@media (min-width: 769px) {
  html[data-theme] .examer-panel-status-container {
    gap: 0.2rem;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
  }
}

html[data-theme='light'] :is(
  .peditor-panel-result-btn-container,
  .examer-panel-result-btn-container,
  .assess-paper-record-result-btn-container
) {
  border-color: rgba(47, 158, 194, 0.18);
  background: transparent !important;
}

html[data-theme='light'] :is(
  .peditor-panel-result-btn,
  .examer-panel-result-btn,
  .assess-paper-record-result-btn,
  .paper-market-result-btn
) {
  color: var(--pd-primary) !important;
  border-color: rgba(47, 158, 194, 0.2) !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-theme='light'] :is(
  .peditor-panel-result-btn,
  .examer-panel-result-btn,
  .assess-paper-record-result-btn,
  .paper-market-result-btn
):hover:not(:disabled) {
  border-color: rgba(47, 158, 194, 0.34) !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Transaction Center needs to remain visually lighter than full-page tables. */
html[data-theme] .transactions-center-modal {
  font-size: 0.66rem;
  line-height: 1.35;
}

html[data-theme] .transactions-center-modal * {
  font-size: inherit;
}

html[data-theme] .transactions-center-modal :is(
  p,
  span,
  label,
  strong,
  small,
  th,
  td,
  a,
  li
) {
  font-size: 0.66rem;
}

html[data-theme] .transactions-center-modal :is(h4, h5, h6) {
  font-size: 0.76rem;
}

html[data-theme] .transactions-center-modal-header h3 {
  font-size: 0.9rem;
}

html[data-theme] .transactions-center-modal-close-btn {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.15rem;
  border: 1px solid var(--ep-border);
}

html[data-theme] .transactions-center-modal-close-btn svg {
  width: 1.85rem;
  height: 1.85rem;
  stroke-width: 0.6;
}

html[data-theme] .transactions-center-modal :is(
  .peditor-panel-transaction-history-search-form,
  .examer-panel-transaction-history-search-form,
  .subscription-history-search-form,
  .quota-transaction-history-search-form,
  .inst-billing-history-search-form
) {
  padding: 0.45rem 0.55rem;
  border-radius: 0.55rem;
}

html[data-theme] .transactions-center-modal :is(
  .peditor-panel-transaction-history-form-row,
  .examer-panel-transaction-history-form-row,
  .subscription-history-form-row,
  .quota-transaction-history-form-row,
  .inst-billing-history-form-row
) {
  gap: 0.35rem;
}

html[data-theme] .transactions-center-modal :is(input, select, button) {
  min-height: 1.8rem;
  padding: 0.28rem 0.45rem;
  font-size: 0.66rem;
}

html[data-theme] .transactions-center-modal .transactions-center-modal-close-btn {
  width: 2.25rem;
  height: 2.25rem;
  min-height: 2.25rem;
  padding: 0.15rem;
}

/* Bank verification controls intentionally avoid Bootstrap's white form skin. */
html[data-theme] .bank-info-country-selector {
  margin-bottom: 0.7rem;
  padding: 0.55rem;
  border: 1px solid var(--ep-border);
  border-radius: 0.55rem;
  background: rgba(127, 127, 127, 0.06);
}

html[data-theme] .bank-info-country-selector .country-selector-label {
  margin-bottom: 0.3rem;
  font-size: 0.7rem;
}

html[data-theme] .bank-info-country-selector .country-selector-select {
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  border-color: var(--ep-border) !important;
  border-radius: 0.5rem;
  background: var(--ep-panel-strong) !important;
  color: var(--ep-text) !important;
  box-shadow: none !important;
  font-size: 0.7rem;
}

html[data-theme] .bank-info-country-selector .country-selector-select:focus {
  border-color: var(--ep-glow) !important;
  background: var(--ep-panel-strong) !important;
  color: var(--ep-text) !important;
  box-shadow: 0 0 0 2px var(--ep-glow-a20) !important;
}

html[data-theme] .bank-info-country-selector .country-selector-select option {
  background: var(--ep-panel-strong) !important;
  color: var(--ep-text) !important;
}

html[data-theme] .bank-info-country-selector .country-selector-help-text {
  margin-top: 0.3rem;
  font-size: 0.63rem;
}

html[data-theme] :is(
  .paper-market-search-form,
  .examer-panel-result-search-form,
  .peditor-panel-result-search-form,
  .assess-paper-record-result-search-form,
  .subscription-history-search-form,
  .transactions-center-search-form,
  .inst-billing-history-search-form
) {
  padding: 0.85rem;
  border-radius: var(--pd-card-radius);
}

html[data-theme] :is(
  .paper-market-table-header th,
  .paper-market-table-body td,
  .examer-panel-result-table-header th,
  .examer-panel-result-table-body td,
  .peditor-panel-result-table-header th,
  .peditor-panel-result-table-body td,
  .assess-paper-record-result-table-header th,
  .assess-paper-record-result-table-body td,
  .subscription-history-table-header th,
  .subscription-history-table-body td,
  .transactions-center-table th,
  .transactions-center-table td,
  .inst-billing-history-table-header th,
  .inst-billing-history-table-body td,
  .inst-admin__table th,
  .inst-admin__table td
) {
  padding: 0.52rem 0.62rem;
  font-size: var(--pd-compact-font-size);
  line-height: 1.35;
}

html[data-theme] :is(
  .paper-market-status-pill,
  .examer-panel-status-pill,
  .peditor-panel-status-pill,
  .assess-paper-record-status-pill,
  .inst-admin__tag,
  .inst-admin__pill,
  .inst-billing-history-type-badge
) {
  padding: 0.25rem 0.48rem;
  border-radius: 999px;
  font-size: 0.7rem;
  line-height: 1.2;
}

html[data-theme] :is(
  .examer-panel-status-pill,
  .peditor-panel-status-pill,
  .assess-paper-record-status-pill
) {
  padding: 0.12rem;
  border-radius: 50%;
}

@media (min-width: 769px) {
  html[data-theme] .examer-panel-result-table {
    table-layout: fixed;
  }

  html[data-theme] .examer-panel-result-table :is(
    .examer-panel-result-col-name,
    .examer-panel-result-col-examtype,
    .examer-panel-result-col-subject,
    .examer-panel-result-col-date,
    .examer-panel-result-col-expiration,
    .examer-panel-result-col-combined-status,
    .examer-panel-result-col-assessor
  ) {
    min-width: 0;
  }

  html[data-theme] .examer-panel-result-table.with-assessor .examer-panel-result-col-name {
    width: 18%;
  }

  html[data-theme] .examer-panel-result-table.with-assessor .examer-panel-result-col-examtype {
    width: 12%;
  }

  html[data-theme] .examer-panel-result-table.with-assessor .examer-panel-result-col-subject {
    width: 10%;
  }

  html[data-theme] .examer-panel-result-table.with-assessor .examer-panel-result-col-date {
    width: 16%;
  }

  html[data-theme] .examer-panel-result-table.with-assessor .examer-panel-result-col-expiration {
    width: 20%;
  }

  html[data-theme] .examer-panel-result-table.with-assessor .examer-panel-result-col-combined-status {
    width: 6%;
  }

  html[data-theme] .examer-panel-result-table.with-assessor .examer-panel-result-col-assessor {
    width: 18%;
  }

  html[data-theme] .examer-panel-result-table.without-assessor .examer-panel-result-col-name {
    width: 22%;
  }

  html[data-theme] .examer-panel-result-table.without-assessor .examer-panel-result-col-examtype {
    width: 16%;
  }

  html[data-theme] .examer-panel-result-table.without-assessor .examer-panel-result-col-subject {
    width: 14%;
  }

  html[data-theme] .examer-panel-result-table.without-assessor .examer-panel-result-col-date {
    width: 20%;
  }

  html[data-theme] .examer-panel-result-table.without-assessor .examer-panel-result-col-expiration {
    width: 21%;
  }

  html[data-theme] .examer-panel-result-table.without-assessor .examer-panel-result-col-combined-status {
    width: 7%;
  }

  html[data-theme] .examer-panel-result-table-header .examer-panel-result-col-combined-status,
  html[data-theme] .examer-panel-result-table-body .examer-panel-result-status-cell {
    min-width: 0;
    max-width: none;
    padding-inline: 0.2rem;
    white-space: nowrap;
  }
}

html[data-theme] .examer-panel-form-container-peditor-paper {
  padding: 2.6rem 0.9rem 0.9rem;
  font-size: var(--pd-compact-font-size);
  line-height: 1.45;
}

html[data-theme] .examer-panel-form-container-peditor-paper .examer-panel-form-title {
  margin: 0 2.25rem 0.7rem 0;
  font-size: var(--pd-compact-title-size);
  line-height: 1.25;
}

html[data-theme] .examer-panel-form-container-peditor-paper :is(
  .examer-panel-tabs,
  .examer-panel-form-filters
) {
  padding: 0.6rem;
  border-radius: var(--pd-card-radius);
}

html[data-theme] .examer-panel-form-container-peditor-paper :is(
  .examer-panel-tab-link,
  .examer-panel-form-button
) {
  min-height: var(--pd-control-height);
  padding: 0.45rem 0.68rem;
  border-radius: var(--pd-control-radius);
  font-size: var(--pd-compact-font-size);
}

html[data-theme] .examer-panel-form-container-peditor-paper :is(
  .examer-panel-form-table-header th,
  .examer-panel-form-table-body td
) {
  padding: 0.52rem 0.62rem;
  font-size: var(--pd-compact-font-size);
  line-height: 1.35;
}

html[data-theme] .inst-plan :is(
  .inst-field,
  .inst-config,
  .inst-quote,
  .inst-invoice,
  .inst-summary-card
),
html[data-theme] .inst-admin :is(
  .inst-admin__summary,
  .inst-admin__invite,
  .inst-admin__roster
) {
  border-radius: var(--pd-card-radius);
}

html[data-theme] .inst-admin :is(
  .inst-admin__switch,
  .inst-admin__check,
  .inst-admin__hint,
  .inst-admin__invite-msg,
  .inst-admin__member-email,
  .inst-admin__seat-on,
  .inst-admin__seat-off
),
html[data-theme] .inst-plan :is(
  .inst-summary-row,
  .inst-config__description,
  .inst-summary-card__note,
  .inst-hero__feature
) {
  font-size: var(--pd-compact-font-size);
}

/* Preserve accessible touch targets on phones while retaining the shared look. */
@media (max-width: 768px) {
  html[data-theme] .chat-sidebar {
    padding: 0.75rem !important;
  }

  html[data-theme] .chat-message-input-form {
    width: calc(100% - 1rem);
    min-height: 4.5rem;
  }

  html[data-theme] :is(
    .search-bar-container,
    .assistant-form-container,
    .add-conv-container,
    .message-main-paper-form-container
  ) {
    width: 92vw;
    padding: 0.85rem;
  }

  html[data-theme] :is(
    .search-bar-container,
    .assistant-form-container,
    .add-conv-container,
    .message-main-paper-form-container
  ) :is(input, select, textarea, button, .btn) {
    min-height: 2.75rem;
    font-size: 1rem;
  }

  html[data-theme] .user-setting-tabs {
    display: flex;
    flex-shrink: 0;
    gap: 0.35rem;
    padding: 0.65rem;
    overflow-x: auto;
    border-bottom: 1px solid var(--ep-raise-3);
  }

  html[data-theme] .user-setting-title {
    margin: 0;
    color: var(--ep-text);
    font-size: 0.95rem;
    font-weight: 700;
  }

  html[data-theme] .user-setting-tab {
    min-height: 2.75rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--ep-raise-3);
    border-radius: var(--pd-control-radius);
    color: var(--ep-text-2);
    background: var(--ep-raise-1);
    font-size: 0.85rem;
    font-weight: 680;
    white-space: nowrap;
  }

  html[data-theme] .user-setting-tab.active {
    color: var(--ep-glow);
    border-color: var(--ep-glow-a50);
    background: var(--ep-glow-a10);
  }
}

/* =============================================================================
   Copilot panel — harmonized dashboard layout
   -----------------------------------------------------------------------------
   This layer is intentionally loaded after the legacy Copilot and theme files.
   It scopes every visual override to `.copilot-panel`, keeps the existing React
   behavior intact, and aligns density, surfaces and controls with Peditor.
   ============================================================================= */

.copilot-panel {
  --copilot-sidebar-min: 13.5rem;
  --copilot-sidebar-max: 22rem;
  --copilot-content-max: 72rem;
  position: absolute;
  inset: 0;
  display: flex;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  color: var(--pd-text, var(--ep-text));
  background: var(--pd-surface, var(--ep-elevated));
  font-size: var(--pd-panel-font-size, 0.82rem);
  line-height: 1.45;
}

.copilot-panel *,
.copilot-panel *::before,
.copilot-panel *::after {
  box-sizing: border-box;
}

/* Conversation rail -------------------------------------------------------- */

.copilot-panel .chat-sidebar {
  position: relative;
  inset: auto;
  width: clamp(
    var(--copilot-sidebar-min),
    var(--sidebar-width, 25%),
    var(--copilot-sidebar-max)
  );
  min-width: var(--copilot-sidebar-min);
  height: 100%;
  padding: 0.75rem;
  overflow: hidden;
  color: var(--pd-text, var(--ep-text));
  background: var(--pd-surface-soft, var(--ep-bg));
  border-right: 1px solid var(--pd-border, var(--ep-border));
  isolation: isolate;
}

.copilot-panel .chat-sidebar > .d-flex {
  height: 100%;
  min-height: 0;
}

.copilot-panel .tool-button-bar {
  flex: 0 0 auto;
  width: 100%;
  justify-content: center !important;
  gap: 0.65rem;
  margin: 0 0 0.65rem !important;
  padding: 0.3rem 0.15rem;
}

.copilot-panel .chat-sidebar :is(.tool-button, .confirm-button) {
  width: 2.75rem;
  min-width: 2.75rem;
  height: 2.75rem;
  min-height: 2.75rem;
  margin: 0 !important;
  padding: 0.48rem;
  color: var(--pd-primary, var(--ep-glow));
  background: transparent !important;
  border: 1px solid var(--pd-border, var(--ep-border)) !important;
  border-radius: var(--pd-control-radius, 0.55rem);
  box-shadow: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.copilot-panel .chat-sidebar :is(.tool-button, .confirm-button):hover {
  background: var(--pd-primary-soft, var(--ep-glow-a10)) !important;
  border-color: var(--pd-primary, var(--ep-glow)) !important;
  transform: none;
}

.copilot-panel .chat-sidebar :is(.tool-button, .confirm-button) img {
  width: 1.55rem;
  height: 1.55rem;
  object-fit: contain;
}

.copilot-panel .chat-sidebar .form-control {
  width: 100% !important;
  min-height: var(--pd-control-height, 2.2rem);
  margin: 0 0 0.6rem !important;
  padding: 0.45rem 0.65rem;
  color: var(--pd-text, var(--ep-text));
  background-color: var(--pd-surface, var(--ep-surface-2));
  border: 1px solid var(--pd-border, var(--ep-border));
  border-radius: var(--pd-control-radius, 0.55rem);
  font-size: var(--pd-compact-font-size, 0.78rem);
  box-shadow: none;
}

.copilot-panel .chat-sidebar .form-control:focus {
  border-color: var(--pd-primary, var(--ep-glow));
  box-shadow: var(--pd-focus-ring, 0 0 0 3px rgba(47, 158, 194, 0.16));
}

.copilot-panel .conversation-list-container {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0.1rem 0.2rem 0.8rem 0;
  overflow: hidden auto;
  scrollbar-width: thin;
  scrollbar-color: var(--pd-border-strong, var(--ep-border)) transparent;
}

.copilot-panel .conversation-list-container::-webkit-scrollbar {
  width: 0.3rem;
}

.copilot-panel .conversation-list-container::-webkit-scrollbar-thumb {
  background: var(--pd-border-strong, var(--ep-border));
  border-radius: 999px;
}

.copilot-panel .conversation-item {
  width: 100%;
  justify-content: stretch !important;
  gap: 0.3rem;
  margin-bottom: 0.38rem;
}

.copilot-panel .conversation-item .conversation-name {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 2.15rem;
  margin: 0 !important;
  padding: 0.46rem 0.68rem;
  justify-content: center;
  overflow: hidden;
  color: var(--pd-text, var(--ep-text)) !important;
  background-color: var(
    --conversation-label,
    var(--pd-surface, var(--ep-surface-2))
  ) !important;
  border: 1px solid transparent;
  border-radius: var(--pd-control-radius, 0.55rem) !important;
  font-size: var(--pd-compact-font-size, 0.78rem);
  font-weight: 650 !important;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-shadow: none;
  opacity: 1;
}

.copilot-panel .conversation-item .conversation-name > span {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copilot-panel .conversation-item .conversation-name:hover {
  width: 100%;
  background-color: var(--pd-surface-hover, var(--ep-surface-3)) !important;
  border-color: var(--pd-border, var(--ep-border));
}

.copilot-panel .conversation-item .conversation-name.active {
  width: 100%;
  color: var(--pd-text, var(--ep-text)) !important;
  background-color: var(
    --conversation-label,
    var(--pd-surface, var(--ep-surface-2))
  ) !important;
  border: 2px solid var(--pd-primary, var(--ep-glow));
  box-shadow: none;
}

.copilot-panel .conversation-item .deleteicon,
.copilot-panel .conversation-item .ordericon {
  position: static !important;
  flex: 0 0 1.75rem;
  width: 1.75rem;
  height: 1.75rem;
  min-height: 1.75rem;
  margin: 0 !important;
  padding: 0.25rem;
  border-radius: 50%;
  transform: none !important;
}

.copilot-panel .resize-handle {
  right: -0.28rem;
  width: 0.55rem;
  background: transparent;
}

.copilot-panel .resize-handle::after {
  inset: 20% auto 20% 50%;
  width: 1px;
  height: 60%;
  background: var(--pd-border-strong, var(--ep-border));
  opacity: 0.7;
}

.copilot-panel .resize-handle:hover,
.copilot-panel .resize-handle:active {
  width: 0.55rem;
  background: transparent;
  box-shadow: none;
}

/* Menus -------------------------------------------------------------------- */

.copilot-panel :is(
  .conv-tools-dropdown-menu,
  .extra-tools-dropdown-menu,
  .msg-tools-dropdown-menu,
  .dropdown-menu
) {
  min-width: 11.5rem;
  padding: 0.3rem;
  color: var(--pd-text, var(--ep-text));
  background: var(--pd-surface, var(--ep-surface-3));
  border: 1px solid var(--pd-border, var(--ep-border));
  border-radius: var(--pd-control-radius, 0.55rem);
  box-shadow: var(--pd-shadow-md, 0 8px 24px rgba(0, 0, 0, 0.16));
  backdrop-filter: none;
}

.copilot-panel .tool-button-bar > :is(
  .conv-tools-dropdown-menu,
  .extra-tools-dropdown-menu
) {
  top: calc(100% + 0.35rem);
  right: auto;
  left: 50%;
  width: min(14rem, calc(100% - 0.5rem));
  min-width: 0;
  max-width: calc(100% - 0.5rem);
  margin: 0;
  transform: translateX(-50%) !important;
}

.copilot-panel :is(
  .conv-tools-dropdown-item,
  .extra-tools-dropdown-item,
  .msg-tools-dropdown-item,
  .dropdown-item
) {
  min-height: 2rem;
  padding: 0.42rem 0.55rem;
  gap: 0.4rem;
  color: var(--pd-text, var(--ep-text)) !important;
  background: transparent;
  border: 0;
  border-radius: 0.42rem;
  font-size: var(--pd-compact-font-size, 0.78rem) !important;
  font-weight: 620 !important;
  line-height: 1.25;
  transform: none;
}

.copilot-panel :is(
  .conv-tools-dropdown-item,
  .extra-tools-dropdown-item,
  .msg-tools-dropdown-item,
  .dropdown-item
):hover {
  color: var(--pd-primary-hover, var(--ep-glow)) !important;
  background: var(--pd-primary-soft, var(--ep-glow-a10)) !important;
  transform: none;
}

.copilot-panel :is(
  .conv-tools-dropdown-item,
  .extra-tools-dropdown-item,
  .msg-tools-dropdown-item
) img,
.copilot-panel .msg-tools-dropdown-item svg {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0 !important;
  filter: none;
}

/* Main conversation canvas ------------------------------------------------- */

.copilot-panel .chat-main {
  position: relative;
  min-width: 0;
  height: 100%;
  color: var(--pd-text, var(--ep-text));
  background: var(--pd-surface, var(--ep-elevated));
}

.copilot-panel .wallet-balance-display {
  flex: 0 0 auto;
  align-self: center;
  margin: 0.55rem 0.75rem 0;
  padding: 0.28rem 0.68rem;
  color: var(--pd-primary-hover, var(--ep-text));
  background: var(--pd-primary-soft, var(--ep-glow-a10));
  border: 1px solid var(--pd-border, var(--ep-border));
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 680;
  line-height: 1.2;
  text-align: center;
}

.copilot-panel .wallet-balance-display.is-negative {
  color: var(--pd-danger, #b42318);
  background: rgba(220, 53, 69, 0.08);
  border-color: rgba(220, 53, 69, 0.22);
}

.copilot-panel .chat-message-list {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.4rem max(0.75rem, calc((100% - var(--copilot-content-max)) / 2));
  overflow: hidden auto;
  background: transparent;
  border: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--pd-border-strong, var(--ep-border)) transparent;
}

.copilot-panel .message-list {
  width: 100%;
  max-width: var(--copilot-content-max);
  margin: 0 auto;
  padding: 0.5rem 0.75rem 1rem;
  gap: 0.55rem;
}

.copilot-panel .message-card {
  margin: 0;
  padding: 0.58rem 0.72rem;
  border: 1px solid transparent;
  border-radius: var(--pd-card-radius, 0.7rem);
  font-size: 0.8rem;
  line-height: 1.52;
  box-shadow: none;
}

.copilot-panel .left-side-card {
  width: min(100%, 64rem);
  min-width: 0;
  max-width: 100%;
  color: var(--pd-text, var(--ep-text));
  background: transparent;
  border-color: transparent;
}

.copilot-panel .left-side-card > div:first-child {
  flex: 0 0 1.8rem;
  margin: 0 0.4rem 0 0 !important;
}

.copilot-panel .left-side-card > div:first-child img {
  width: 1.35rem;
  height: 1.35rem;
  margin: 0 !important;
}

.copilot-panel .right-side-card {
  min-width: 3rem;
  max-width: min(72%, 42rem);
  padding: 0.58rem 0.75rem;
  color: var(--pd-text, var(--ep-text));
  background: var(--pd-primary-soft, var(--ep-surface-3));
  border-color: var(--pd-border, var(--ep-border));
}

.copilot-panel .right-side-card *,
.copilot-panel .right-side-card .parsed-html {
  color: inherit;
}

.copilot-panel .parsed-html {
  min-width: 0;
  width: 100%;
  color: inherit;
}

.copilot-panel .parsed-html :is(p, ul, ol, table, pre, blockquote) {
  margin-top: 0;
  margin-bottom: 0.55rem;
}

.copilot-panel .parsed-html :is(h2, h3, h4, h5, h6) {
  margin-top: 0.85rem !important;
  margin-bottom: 0.38rem !important;
  color: inherit;
  line-height: 1.3;
}

.copilot-panel .parsed-html h2 {
  font-size: 1.02rem;
}

.copilot-panel .parsed-html h3 {
  font-size: 0.94rem;
}

.copilot-panel .parsed-html :is(h4, h5, h6) {
  font-size: 0.86rem;
}

.copilot-panel .parsed-html li {
  margin: 0.15rem 0 0.15rem 0.85rem;
}

.copilot-panel .parsed-html table {
  width: 100%;
  min-width: 28rem;
  font-size: 0.76rem;
}

.copilot-panel .parsed-html :is(th, td) {
  padding: 0.42rem 0.52rem;
  border-color: var(--pd-border, var(--ep-border));
}

.copilot-panel :is(.math-block, .plain-text-code, .plain-text-pre) {
  max-width: 100%;
  padding: 0.58rem 0.68rem;
  overflow: auto;
  color: #1f2937;
  background: #f6f8fa;
  border: 1px solid #d8dee4;
  border-radius: var(--pd-control-radius, 0.55rem);
  font-size: 0.76rem;
}

/* Attachments and composer ------------------------------------------------- */

.copilot-panel .copilot-attachment-list {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  width: min(calc(100% - 1.5rem), var(--copilot-content-max));
  margin: 0.4rem auto 0;
  gap: 0.4rem;
}

.copilot-panel .copilot-attachment-chip {
  display: flex;
  align-items: center;
  max-width: min(100%, 28rem);
  min-height: 2rem;
  padding: 0.34rem 0.45rem 0.34rem 0.62rem !important;
  gap: 0.4rem;
  color: var(--pd-text, var(--ep-text));
  background: var(--pd-surface-soft, var(--ep-surface-2));
  border: 1px solid var(--pd-border, var(--ep-border));
  border-radius: var(--pd-control-radius, 0.55rem) !important;
  box-shadow: none;
}

.copilot-panel .copilot-attachment-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.35rem;
  overflow: hidden;
  font-size: 0.74rem;
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.copilot-panel .copilot-attachment-name svg {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
}

.copilot-panel .copilot-attachment-chip .btn {
  width: 1.55rem;
  min-width: 1.55rem;
  height: 1.55rem;
  min-height: 1.55rem;
  margin: 0 !important;
  padding: 0.15rem;
  border-radius: 50%;
}

.copilot-panel .copilot-composer {
  flex: 0 0 auto;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0 0.75rem 0.65rem;
}

.copilot-panel .copilot-composer > small {
  display: block;
  max-width: var(--copilot-content-max);
  margin: 0 auto 0.35rem !important;
  color: var(--pd-text-muted, var(--ep-text-2)) !important;
  font-size: 0.66rem;
  line-height: 1.35;
}

.copilot-panel .chat-message-input-form {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 58rem);
  min-height: 5.25rem;
  margin: 0 auto !important;
  padding: 0;
  gap: 0;
  color: var(--pd-text, var(--ep-text));
  background: var(--pd-surface, var(--ep-surface-2));
  border: 1px solid var(--pd-border, var(--ep-border));
  border-radius: 0.9rem;
  box-shadow:
    0 0.45rem 1.35rem rgba(21, 63, 76, 0.08),
    0 1px 2px rgba(21, 63, 76, 0.05);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.copilot-panel .chat-message-input-form:focus-within {
  border-color: var(--pd-primary, var(--ep-glow));
  box-shadow:
    0 0 0 2px rgba(47, 158, 194, 0.1),
    0 0.55rem 1.55rem rgba(21, 63, 76, 0.1);
}

.copilot-panel .composer-input-row {
  display: flex;
  width: 100%;
  min-height: 2.9rem;
  padding: 0.2rem 0.25rem 0;
}

.copilot-panel .composer-tool-anchor {
  position: relative;
  display: flex;
  flex: 0 0 auto;
}

.copilot-panel .composer-toolbar {
  display: flex;
  width: 100%;
  min-height: 2.45rem;
  padding: 0.25rem 0.4rem 0.4rem;
  align-items: center;
  justify-content: space-between;
}

.copilot-panel .composer-toolbar-left {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.22rem;
}

.copilot-panel .chat-form-control {
  display: block;
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 2.7rem;
  max-height: 9rem;
  margin: 0 !important;
  padding: 0.65rem 0.7rem 0.3rem;
  overflow-x: hidden;
  overflow-y: hidden;
  color: var(--pd-text, var(--ep-text)) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  font-size: 0.82rem;
  line-height: 1.45;
  resize: none;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none !important;
  scrollbar-width: thin;
}

.copilot-panel .chat-form-control:focus,
.copilot-panel .chat-form-control:focus-visible {
  background: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.copilot-panel .chat-form-control::placeholder {
  color: var(--pd-text-muted, var(--ep-text-2));
  opacity: 0.75;
}

.copilot-panel .message-input-btn {
  flex: 0 0 2rem;
  width: 2rem;
  min-width: 2rem;
  height: 2rem;
  min-height: 2rem;
  margin: 0 !important;
  padding: 0.38rem;
  align-self: center;
  color: var(--pd-primary, var(--ep-glow));
  background: transparent;
  border: 1px solid transparent !important;
  border-radius: 50%;
  box-shadow: none;
}

.copilot-panel .message-input-btn:hover {
  background: var(--pd-primary-soft, var(--ep-glow-a10)) !important;
  transform: none;
}

.copilot-panel .composer-add-btn {
  color: var(--pd-text-muted, var(--ep-text-2));
  background: transparent;
}

.copilot-panel .composer-send-btn {
  width: 2.15rem;
  min-width: 2.15rem;
  height: 2.15rem;
  min-height: 2.15rem;
  padding: 0.42rem;
  background: transparent !important;
  border: 0 !important;
  box-shadow: 0 0.2rem 0.5rem rgba(33, 111, 135, 0.18);
}

.copilot-panel .composer-send-btn:hover,
.copilot-panel .composer-send-btn:focus,
.copilot-panel .composer-send-btn:focus-visible,
.copilot-panel .composer-send-btn:active,
.copilot-panel .composer-send-btn:disabled {
  background: transparent !important;
  border: 0 !important;
}

.copilot-panel .composer-clear-btn {
  opacity: 0.5;
  filter: grayscale(0.55) saturate(0.55);
}

.copilot-panel .composer-clear-btn:hover {
  background: rgba(220, 53, 69, 0.09) !important;
  opacity: 1;
  filter: none;
}

.copilot-panel .composer-action-btn:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  box-shadow: none;
}

.copilot-panel .message-input-btn :is(img, svg) {
  width: 1.1rem;
  height: 1.1rem;
  max-width: 1.1rem;
  max-height: 1.1rem;
  object-fit: contain;
}

.copilot-panel .composer-tool-anchor .msg-tools-dropdown-menu {
  right: auto;
  bottom: calc(100% + 0.45rem);
  left: 0;
  margin: 0;
  transform: none !important;
}

/* Empty state -------------------------------------------------------------- */

.copilot-panel .copilot-empty-state {
  display: grid;
  flex: 1;
  min-height: 0;
  padding: 1rem;
  place-items: center;
}

.copilot-panel .copilot-empty-state-content {
  width: min(100%, 30rem);
  padding: 1.35rem;
  color: var(--pd-text, var(--ep-text));
  background: var(--pd-surface-soft, var(--ep-surface-2));
  border: 1px solid var(--pd-border, var(--ep-border));
  border-radius: var(--pd-card-radius, 0.7rem);
  text-align: center;
  box-shadow: var(--pd-shadow-sm, 0 2px 8px rgba(0, 0, 0, 0.08));
}

.copilot-panel .copilot-empty-state-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 720;
}

.copilot-panel .copilot-empty-state-divider {
  display: flex;
  margin: 0.8rem 0;
  align-items: center;
  gap: 0.7rem;
  color: var(--pd-text-muted, var(--ep-text-2));
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.copilot-panel .copilot-empty-state-divider::before,
.copilot-panel .copilot-empty-state-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--pd-border, var(--ep-border));
}

.copilot-panel .copilot-empty-state-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.copilot-panel .copilot-empty-state-action p {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 650;
}

.copilot-panel .copilot-empty-state-add-btn {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.4rem;
  place-items: center;
  background: transparent;
  border: 1px solid var(--pd-border, var(--ep-border));
  border-radius: var(--pd-control-radius, 0.55rem);
  cursor: pointer;
}

.copilot-panel .copilot-empty-state-add-btn:hover {
  background: var(--pd-primary-soft, var(--ep-glow-a10));
  border-color: var(--pd-primary, var(--ep-glow));
}

.copilot-panel .copilot-empty-state-add-btn img {
  width: 1.25rem;
  height: 1.25rem;
}

/* Forms and loading states ------------------------------------------------- */

.copilot-panel :is(.assistant-form-modal, .add-conv-modal, .paper-form-modal) {
  padding: 1rem;
  background: rgba(8, 18, 24, 0.48);
  backdrop-filter: blur(3px);
}

.copilot-panel :is(
  .assistant-form-container,
  .add-conv-container,
  .message-main-paper-form-container,
  .search-bar-container
) {
  width: min(92vw, 38rem);
  max-height: min(88vh, 46rem);
  padding: 1rem !important;
  overflow: auto;
  color: var(--pd-text, var(--ep-text));
  background: var(--pd-surface, var(--ep-surface-2));
  border: 1px solid var(--pd-border, var(--ep-border));
  border-radius: var(--pd-card-radius, 0.7rem);
  box-shadow: var(--pd-shadow-lg, 0 16px 40px rgba(0, 0, 0, 0.2));
  backdrop-filter: none;
}

.copilot-panel :is(
  .assistant-form-container,
  .add-conv-container,
  .message-main-paper-form-container
):hover {
  box-shadow: var(--pd-shadow-lg, 0 16px 40px rgba(0, 0, 0, 0.2));
}

.copilot-panel :is(
  .assistant-form-container,
  .add-conv-container,
  .message-main-paper-form-container
) :is(label, .form-label) {
  margin-bottom: 0.25rem;
  color: var(--pd-text, var(--ep-text));
  font-size: var(--pd-label-font-size, 0.72rem);
  font-weight: 680 !important;
}

.copilot-panel :is(
  .assistant-form-container,
  .add-conv-container,
  .message-main-paper-form-container
) :is(input, select, textarea, .form-control) {
  width: 100%;
  min-height: var(--pd-control-height, 2.2rem);
  margin-bottom: 0.55rem;
  padding: 0.46rem 0.62rem;
  color: var(--pd-text, var(--ep-text)) !important;
  background-color: var(--pd-surface-soft, var(--ep-surface-2));
  border: 1px solid var(--pd-border, var(--ep-border));
  border-radius: var(--pd-control-radius, 0.55rem);
  font-size: 0.78rem;
  line-height: 1.35;
}

.copilot-panel :is(
  .assistant-form-container,
  .add-conv-container,
  .message-main-paper-form-container
) :is(input, select, textarea, .form-control):focus {
  outline: 0;
  background-color: var(--pd-surface, var(--ep-surface-3));
  border-color: var(--pd-primary, var(--ep-glow));
  box-shadow: var(--pd-focus-ring, 0 0 0 3px rgba(47, 158, 194, 0.16));
}

/* Keep the Copilot message textarea borderless in every interaction state. */
.copilot-panel #message.chat-form-control,
.copilot-panel #message.chat-form-control:hover,
.copilot-panel #message.chat-form-control:active,
.copilot-panel #message.chat-form-control:focus,
.copilot-panel #message.chat-form-control:focus-visible,
.copilot-panel #message.chat-form-control:focus-within {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.copilot-panel :is(
  .assistant-form-button,
  .assistant-form-container .btn,
  .add-conv-container .btn,
  .message-main-paper-form-container .btn
) {
  min-height: var(--pd-control-height, 2.2rem);
  margin: 0.2rem !important;
  padding: 0.45rem 0.75rem;
  border-radius: var(--pd-control-radius, 0.55rem);
  font-size: var(--pd-compact-font-size, 0.78rem);
  line-height: 1.15;
  transform: none;
}

.copilot-panel :is(
  .assistant-form-button,
  .assistant-form-container .btn,
  .add-conv-container .btn,
  .message-main-paper-form-container .btn
):hover {
  transform: none;
}

.copilot-panel .loading-overlay {
  color: var(--pd-text, var(--ep-text));
  background: color-mix(in srgb, var(--pd-surface, var(--ep-elevated)) 86%, transparent);
  backdrop-filter: blur(3px);
}

.copilot-panel .loading-overlay p {
  font-size: 0.86rem !important;
}

.copilot-panel :is(.main-loading-bubbles, .sidebar-loading-bubbles) {
  width: 3.5rem;
  height: 3.5rem;
}

/* Responsive behavior ----------------------------------------------------- */

@media (max-width: 768px) {
  .copilot-panel {
    --copilot-content-max: 100%;
  }

  .copilot-panel .chat-sidebar {
    position: absolute;
    inset: 0;
    z-index: 20;
    width: min(88vw, 19rem) !important;
    min-width: 0;
    padding: 0.7rem;
    border-right: 1px solid var(--pd-border, var(--ep-border));
    box-shadow: var(--pd-shadow-lg, 0 16px 40px rgba(0, 0, 0, 0.2));
  }

  .copilot-panel .chat-sidebar-md-hidden {
    width: 0 !important;
    padding: 0 !important;
    border: 0;
    box-shadow: none;
  }

  .copilot-panel .chat-sidebar-md-shown {
    height: 100%;
  }

  .copilot-panel .sidebar-close-btn,
  .copilot-panel .sidebar-toggle-btn {
    width: 2rem;
    height: 2rem;
    min-height: 2rem;
    padding: 0.25rem;
    background: var(--pd-surface, var(--ep-surface-2));
    border: 1px solid var(--pd-border, var(--ep-border));
    border-radius: var(--pd-control-radius, 0.55rem);
  }

  .copilot-panel .sidebar-close-btn img,
  .copilot-panel .sidebar-toggle-btn img {
    width: 1.2rem;
    height: 1.2rem;
  }

  .copilot-panel .message-list {
    padding-inline: 0.4rem;
  }

  .copilot-panel .right-side-card {
    max-width: 88%;
  }

  .copilot-panel .copilot-composer {
    padding-inline: 0.45rem;
  }

  .copilot-panel .chat-message-input-form {
    min-height: 3rem;
  }

  .copilot-panel :is(
    .assistant-form-container,
    .add-conv-container,
    .message-main-paper-form-container,
    .search-bar-container
  ) {
    width: min(94vw, 38rem);
    max-height: 86vh;
  }
}

@media (max-width: 480px) {
  .copilot-panel .message-card {
    font-size: 0.77rem;
  }

  .copilot-panel .left-side-card {
    padding-inline: 0.4rem;
  }

  .copilot-panel .left-side-card > div:first-child {
    display: none;
  }

  .copilot-panel .right-side-card {
    max-width: 92%;
  }

  .copilot-panel .chat-form-control {
    margin-inline: 0.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .copilot-panel *,
  .copilot-panel *::before,
  .copilot-panel *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

* {
  color: white;
}

html,
body {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  /* This accounts for fixed header */
}

/* Starfield Animation */
.stars {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 2px;
  z-index: 1;
  animation: fly 3s linear infinite;
  transform-style: preserve-3d;
}

.stars:before,
.stars:after {
  content: "";
  position: absolute;
  width: inherit;
  height: inherit;
  box-shadow: inherit;
}

.stars:before {
  transform: translateZ(-300px);
  animation: fade1 3s linear infinite;
}

.stars:after {
  transform: translateZ(-600px);
  animation: fade2 3s linear infinite;
}

@keyframes fly {
  from {
    transform: translateZ(0px);
  }

  to {
    transform: translateZ(300px);
  }
}

@keyframes fade1 {
  from {
    opacity: .5;
  }

  to {
    opacity: 1;
  }
}

@keyframes fade2 {
  from {
    opacity: 0;
  }

  to {
    opacity: .5;
  }
}

/* Landing Page Styles */
.landing-page {
  min-height: 100vh;
  color: #fff;
  position: relative;
  z-index: 2;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

header {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 10;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  padding: 20px 40px;
}

.header-nav-wrapper {
  display: flex;
  align-items: center;
  justify-items: center;
  gap: 20px;
  margin-left: auto;
}

.header-nav-wrapper nav,
.header-nav-wrapper .header-login-btn {
  display: flex;
  align-items: center;
}

.header-nav-wrapper .links {
  display: flex;
  align-items: center;
  margin-bottom: 0;
}

.header-nav-wrapper .language-toggle {
  display: flex;
  align-items: center;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1000;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #fff;
  margin: 5px 0;
  transition: all 0.3s ease;
}

.logo {
  color: #fff;
  text-decoration: none;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.links {
  display: flex;
  gap: 34px;
  list-style: none;
}

.links a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}

.links a:hover {
  color: #00f7ff;
}

.nav-item {
  align-self: center;
}

/* Scoped to `.landing-page`. As a bare element selector this styled every <section>
   in the app — CSS imports are global — so any panel that used the tag rendered at
   `opacity: 0` and 100vh tall: present in the DOM, painting nothing. */
.landing-page section {
  padding: 80px 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  scroll-margin-top: 50px;
  /* Keep this for smooth scrolling offset */
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.landing-page section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Language Toggle Styles */
.language-toggle {
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px;
  border-radius: 20px;
  margin-left: 10px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: #fff;
  padding: 5px 10px;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lang-btn:active {
  background: #00f7ff;
  color: #000;
}

.lang-btn.active {
  background: #00f7ff;
  color: #000;
}

.lang-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.2);
}

/* Header Login Button */
.header-login-btn {
  background: linear-gradient(135deg, #00f7ff 0%, #00c8dd 100%);
  color: white;
  padding: 10px 24px;
  border-radius: 980px;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 28px rgba(0, 247, 255, 0.28);
  margin-left: 20px;
}

.header-login-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 40px rgba(0, 247, 255, 0.38);
}

.header-login-btn:active {
  transform: translateY(0) scale(0.98);
}

@media screen and (max-width: 768px) {
  .landing-page section {
    padding: 80px 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    scroll-margin-top: 118px;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }

}

/* ============================================
   MODERN HERO SECTION
   ============================================ */

.hero-modern {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 140px 0 100px;
  overflow: hidden;
}

.hero-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 30% 20%, rgba(0, 247, 255, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(0, 247, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-modern .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 32px;
}

.hero-content {
  flex: none;
  width: 100%;
  max-width: 1050px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 247, 255, 0.08);
  border: 1px solid rgba(0, 247, 255, 0.22);
  padding: 7px 16px;
  border-radius: 30px;
  margin-bottom: 30px;
  font-size: 0.82rem;
  color: rgba(0, 247, 255, 0.9);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-icon {
  font-size: 1.2rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1.3px;
  margin-bottom: 28px;
  background: linear-gradient(135deg, #ffffff 0%, #e0f9ff 40%, #00f7ff 70%, #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 5s ease infinite;
}

/* Split-flap departure board (cycling verb) on its own row, static object below it */
.hero-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.18em 0.28em;
}

.hero-object {
  line-height: 1.3em;
  white-space: nowrap;
  text-align: center;
}

.flap-board-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.22em;
}

/* Bookend glyph (Icons8 hotlink) that swaps with the cycling verb
   (pencil/send/checked/money) so the flap board reads as an action, not just
   a word. Icon color is baked into the CDN URL per theme, so both the dark
   and light variant are rendered and CSS just toggles which one is shown. */
.flap-icon-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  width: 0.62em;
  height: 0.62em;
}

.flap-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(0, 247, 255, 0.5));
}

.flap-icon-light {
  display: none;
}

/* Airport departure-board headline: a fixed row of letter tiles spells out
   each verb in turn (Design/Distribute/Grade/Sell). Every tile is a true
   two-sided card — old letter on the front face, new letter pre-rotated
   onto the back face — that flips a full 180° on its horizontal axis in a
   left-to-right cascade, the same mechanical "clack" a flip-clock or
   split-flap board makes. backface-visibility keeps exactly one face
   showing at any moment, so there's no ghosting between old/new letters. */
.flap-board {
  display: inline-flex;
}

.flap-cell {
  position: relative;
  display: inline-block;
  width: 0.78em;
  height: 1.08em;
  margin-right: 0.1em;
  font-family: 'Courier New', ui-monospace, monospace;
  font-weight: 800;
  overflow: hidden;
  /* Perspective must live on the flap's direct parent, not a grandparent,
     or rotateX below has no 3D context and just flattens instead of turning. */
  perspective: 160px;
}

.flap-cell:last-child {
  margin-right: 0;
}

/* CJK glyphs (Design/Distribute/Grade/Sell → 設計/發佈/批改/變現) are full-width
   squares, not narrow Latin letters — the Courier-tuned 0.78em tile clips them.
   Widen the tile and drop the Latin-only monospace font so the browser picks
   a proper CJK face for the glyph. */
.flap-board-cjk .flap-cell {
  width: 1.15em;
  font-family: inherit;
}

.flap-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  /* Promote to its own compositing layer up front so the very first flip
     after load doesn't paint both faces for a frame before the 3D layer
     is established. */
  will-change: transform;
  animation: flapFlip 0.55s cubic-bezier(0.45, 0, 0.2, 1) both;
}

.flap-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* Give the tile real thickness: front face nudged toward the viewer, back
     face (below) nudged the other way once flipped. Without this the two
     glyphs share one Z-plane and z-fight, letting the far letter bleed through
     the near one mid-flip (the "S over D" ghost on the Sell→Design wrap). */
  transform: translateZ(0.6px);
  border-radius: 0.12em;
  border: 1px solid rgba(0, 247, 255, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 55%, rgba(0, 0, 0, 0.18) 100%),
              #0b1424;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.4);
  color: #e3fdff;
  /* .hero-title clips its own gradient via -webkit-text-fill-color:
     transparent, which inherits all the way down here. This tile has an
     opaque background of its own (not a clipped gradient), so without
     resetting the fill the letter glyph paints with nothing — invisible. */
  -webkit-text-fill-color: #e3fdff;
}

/* The physical seam where a real split-flap tile's two leaves meet. */
.flap-face::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.flap-face-back {
  transform: rotateX(-180deg) translateZ(0.6px);
}

/* First paint has no previous word to flip from, so it uses one ordinary
   face with no 3D wrapper or hidden back face. Promoted 3D layers nested in
   the hero's opacity transition can otherwise composite at the title's left
   edge during cold layout, stacking the letters into a stray white glyph. */
.flap-face-settled {
  transform: none;
  backface-visibility: visible;
  -webkit-backface-visibility: visible;
}

@keyframes flapFlip {
  0%   { transform: rotateX(0deg); }
  100% { transform: rotateX(-180deg); }
}

@media (prefers-reduced-motion: reduce) {
  .flap-inner {
    animation: none;
    /* Land straight on the "current word" back face — the JS-side interval
       is also disabled under reduced motion, so this is the only frame. */
    transform: rotateX(-180deg);
  }
}

.hero-subtitle {
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.75;
  margin: 0 auto;
  max-width: 720px;
  font-weight: 400;
  letter-spacing: 0.1px;
}

.hero-cta-group {
  display: flex;
  gap: 20px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.hero-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #00f7ff 0%, #00c8dd 100%);
  color: #000;
  padding: 17px 36px;
  border-radius: 980px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  border: none;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 28px rgba(0, 247, 255, 0.28);
}

.hero-cta-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 40px rgba(0, 247, 255, 0.38);
}

.hero-cta-primary svg {
  transition: transform 0.3s ease;
}

.hero-cta-primary:hover svg {
  transform: translateX(5px);
}

.hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 15px 30px;
  border-radius: 980px;
  font-size: 1.05rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(6px);
}

.hero-cta-secondary:hover {
  border-color: rgba(0, 247, 255, 0.45);
  background: rgba(0, 247, 255, 0.08);
  color: #00f7ff;
  transform: translateY(-2px);
}

.hero-cta-secondary .play-btn {
  width: 30px;
  height: 30px;
  background: rgba(0, 247, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 25px 30px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: #00f7ff;
}

.stat-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   HERO VISUAL — AUTOMATED WORKFLOW ORCHESTRATOR
   A central AI "engine" drives a closed-loop pipeline: the four lifecycle
   stages (Design → Distribute → Grade → Sell) sit on an animated conveyor
   ring, light packets travel the loop, and each stage lights up in sequence
   as the automation reaches it.
   ============================================ */
.hero-visual {
  flex: none;
  position: relative;
  width: 560px;
  height: 560px;
  margin: 0 auto;
}

.workflow-orchestrator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* --- SVG layer: spokes + conveyor ring --- */
.wf-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: visible;
}

.wf-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 1.5;
}

.wf-flow {
  fill: none;
  stroke: url(#wfFlowGradient);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 13 13;
  opacity: 0.9;
  filter: drop-shadow(0 0 6px rgba(0, 247, 255, 0.45));
  animation: wfDash 1.4s linear infinite;
}

@keyframes wfDash {
  to { stroke-dashoffset: -26; }
}

.wf-spoke {
  stroke: rgba(0, 247, 255, 0.16);
  stroke-width: 1.5;
  stroke-dasharray: 3 7;
  animation: wfSpokeDash 22s linear infinite;
}

@keyframes wfSpokeDash {
  to { stroke-dashoffset: -200; }
}

/* --- Orbiting data packets --- */
.wf-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 65.2%;
  height: 65.2%;
  z-index: 2;
  pointer-events: none;
  animation: wfOrbit 8s linear infinite;
}

.wf-orbit-2 { animation-delay: -2.66s; }
.wf-orbit-3 { animation-delay: -5.33s; }

@keyframes wfOrbit {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

.wf-packet {
  position: absolute;
  top: 0;
  left: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: #00f7ff;
  box-shadow: 0 0 12px 2px rgba(0, 247, 255, 0.85);
}

/* --- Central AI engine --- */
.wf-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 33%;
  height: 33%;
  transform: translate(-50%, -50%);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wf-core::before {
  content: '';
  position: absolute;
  inset: -22%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 247, 255, 0.28) 0%, transparent 65%);
  animation: wfGlow 3s ease-in-out infinite;
  z-index: 0;
}

@keyframes wfGlow {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50%      { opacity: 1;   transform: scale(1.08); }
}

.wf-core-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px dashed rgba(0, 247, 255, 0.35);
  animation: wfSpin 12s linear infinite;
}

.wf-core-ring-2 {
  inset: 11%;
  border-color: rgba(124, 92, 240, 0.4);
  animation: wfSpin 9s linear infinite reverse;
}

@keyframes wfSpin {
  to { transform: rotate(360deg); }
}

.wf-core-face {
  position: relative;
  z-index: 2;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  text-align: center;
  background: radial-gradient(circle at 50% 32%, rgba(0, 247, 255, 0.22) 0%, rgba(10, 14, 26, 0.92) 70%);
  border: 1px solid rgba(0, 247, 255, 0.35);
  box-shadow: inset 0 0 28px rgba(0, 247, 255, 0.25), 0 0 38px rgba(0, 247, 255, 0.22);
  backdrop-filter: blur(6px);
}

.wf-core-spark {
  font-size: clamp(16px, 3.6vw, 24px);
  line-height: 1;
  color: #00f7ff;
  filter: drop-shadow(0 0 8px rgba(0, 247, 255, 0.8));
  animation: wfSparkPulse 2.4s ease-in-out infinite;
}

@keyframes wfSparkPulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.85; }
  50%      { transform: scale(1.25) rotate(15deg); opacity: 1; }
}

.wf-core-title {
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #ffffff;
}

.wf-core-sub {
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: rgba(0, 247, 255, 0.85);
}

/* --- Lifecycle stage nodes --- */
.wf-node {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 104px;
  padding: 14px 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transform: translate(-50%, -50%);
  animation: wfNodePulse 8s ease-in-out infinite;
}

.wf-node-step {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
  color: #001016;
  background: linear-gradient(135deg, #00f7ff 0%, #00c8dd 100%);
  box-shadow: 0 4px 12px rgba(0, 247, 255, 0.4);
}

.wf-node-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wf-node-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.92);
}

.wf-node-1 { top: 17.4%; left: 50%;   animation-delay: 0s; }
.wf-node-2 { top: 50%;   left: 82.6%; animation-delay: 2s; }
.wf-node-3 { top: 82.6%; left: 50%;   animation-delay: 4s; }
.wf-node-4 { top: 50%;   left: 17.4%; animation-delay: 6s; }

/* Each node lights up as the automation reaches it (staggered via delay). */
@keyframes wfNodePulse {
  0%, 30%, 100% {
    transform: translate(-50%, -50%) scale(1);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  }
  8%, 20% {
    transform: translate(-50%, -50%) scale(1.07);
    background: rgba(0, 247, 255, 0.14);
    border-color: rgba(0, 247, 255, 0.5);
    box-shadow: 0 16px 44px rgba(0, 247, 255, 0.3);
  }
}

/* Honour reduced-motion preferences — show the scene, hold it still. */
@media (prefers-reduced-motion: reduce) {
  .wf-flow,
  .wf-spoke,
  .wf-orbit,
  .wf-core::before,
  .wf-core-ring,
  .wf-core-spark,
  .wf-node {
    animation: none;
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

/* ============================================
   MODERN PRICING SECTION
   ============================================ */

.pricing-modern {
  padding: 72px 0;
  position: relative;
  overflow: hidden;
}

.pricing-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(0, 247, 255, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(0, 247, 255, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.pricing-header {
  text-align: center;
  margin-bottom: 70px;
}

.pricing-main-title {
  font-size: 4.2rem;
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #e0f9ff 40%, #00f7ff 70%, #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 5s ease infinite;
}

.pricing-tagline {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.2px;
  font-weight: 400;
}

.pricing-plans {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.pricing-plan {
  position: relative;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 28px;
  padding: 36px 30px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
}

.pricing-plan:hover {
  transform: translateY(-10px);
  border-color: rgba(0, 247, 255, 0.3);
  box-shadow: 0 25px 60px rgba(0, 247, 255, 0.15);
}

.pricing-plan.featured {
  border: 1px solid rgba(0, 247, 255, 0.25);
  background: linear-gradient(180deg, rgba(0, 247, 255, 0.055) 0%, rgba(0, 247, 255, 0.015) 100%);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #00f7ff 0%, #00b8d4 100%);
  color: #000;
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.plan-badge.pro {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
  color: #fff;
}

.plan-header {
  text-align: center;
  margin-bottom: 18px;
}

.plan-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 247, 255, 0.1);
  border-radius: 16px;
  border: 1px solid rgba(0, 247, 255, 0.2);
}

.plan-name {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
  margin-bottom: 15px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
}

.price-amount {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -2px;
  color: #00f7ff;
}

.price-period {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.5);
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  flex-grow: 1;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  flex-wrap: wrap;
}

.plan-features li:last-child {
  border-bottom: none;
}

.feature-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.feature-included .feature-icon {
  background: rgba(0, 247, 255, 0.2);
  color: #00f7ff;
}

.feature-excluded .feature-icon {
  background: rgba(255, 100, 100, 0.2);
  color: #ff6464;
}

.feature-excluded {
  color: rgba(255, 255, 255, 0.5);
}

.feature-badge {
  font-size: 0.75rem;
  background: rgba(0, 247, 255, 0.15);
  color: #00f7ff;
  padding: 3px 10px;
  border-radius: 10px;
  margin-left: auto;
}

.plan-cta {
  width: 100%;
  padding: 13px;
  border-radius: 980px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  letter-spacing: 0.1px;
}

.plan-cta:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.plan-cta.primary {
  background: linear-gradient(135deg, #00f7ff 0%, #00c8dd 100%);
  border: none;
  color: #000;
  font-weight: 700;
}

.plan-cta.primary:hover {
  box-shadow: 0 10px 30px rgba(0, 247, 255, 0.3);
}

.pricing-note-modern {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 24px;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.pricing-note-modern .note-icon {
  font-size: 1.5rem;
}

.pricing-note-modern p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

/* ============================================
   MODERN CONTACT SECTION
   ============================================ */

.contact-modern {
  padding: 120px 0;
  position: relative;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}

.contact-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 50% 0%, rgba(0, 247, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.contact-header {
  text-align: center;
  margin-bottom: 70px;
}

.contact-main-title {
  font-size: 4.2rem;
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #e0f9ff 40%, #00f7ff 70%, #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 5s ease infinite;
}

.contact-tagline {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.2px;
  font-weight: 400;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  max-width: 800px;
  margin: 0 auto;
}

.contact-card-modern {
  position: relative;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 28px;
  padding: 56px 48px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.contact-card-modern:hover {
  transform: translateY(-10px);
  border-color: rgba(0, 247, 255, 0.3);
}

.contact-card-modern .card-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 150px;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.contact-card-modern.whatsapp .card-glow {
  background: radial-gradient(circle, rgba(37, 211, 102, 0.3) 0%, transparent 70%);
}

.contact-card-modern.instagram .card-glow {
  background: radial-gradient(circle, rgba(225, 48, 108, 0.3) 0%, transparent 70%);
}

.contact-card-modern:hover .card-glow {
  opacity: 1;
}

.contact-card-modern .card-icon {
  width: 90px;
  height: 90px;
  margin: 0 auto 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 25px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.contact-card-modern:hover .card-icon {
  transform: scale(1.1);
  border-color: rgba(0, 247, 255, 0.3);
}

.contact-card-modern h3 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
  margin-bottom: 10px;
}

.contact-card-modern p {
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 28px;
  font-size: 1rem;
  line-height: 1.6;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 32px;
  border-radius: 980px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  letter-spacing: 0.1px;
}

.contact-btn svg {
  transition: transform 0.3s ease;
}

.contact-btn:hover svg {
  transform: translateX(5px);
}

.whatsapp-btn {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #fff;
}

.whatsapp-btn:hover {
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
  transform: translateY(-2px);
}

.instagram-btn {
  background: linear-gradient(135deg, #e1306c 0%, #c13584 50%, #833ab4 100%);
  color: #fff;
}

.instagram-btn:hover {
  box-shadow: 0 10px 30px rgba(225, 48, 108, 0.4);
  transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE STYLES FOR NEW SECTIONS
   ============================================ */

@media (max-width: 1024px) {
  .hero-modern .container {
    flex-direction: column;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-title {
    font-size: 2rem;
    letter-spacing: -0.85px;
  }

  .hero-action {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    width: 320px;
    height: 320px;
    margin: 0 auto;
  }

  /* Scale the workflow orchestrator down for the smaller hero box */
  .wf-node {
    width: 84px;
    padding: 11px 8px 10px;
    gap: 5px;
    border-radius: 15px;
  }

  .wf-node-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .wf-node-icon img {
    width: 22px;
    height: 22px;
  }

  .wf-node-label {
    font-size: 0.74rem;
  }

  .wf-node-step {
    width: 21px;
    height: 21px;
    font-size: 0.56rem;
  }

  .wf-core-title {
    font-size: 0.68rem;
  }

  .wf-core-sub {
    font-size: 0.5rem;
    letter-spacing: 1.2px;
  }

  .pricing-plans {
    grid-template-columns: 1fr;
    max-width: 460px;
  }

  .pricing-plan.featured {
    order: -1;
  }
}

@media (max-width: 768px) {
  .hero-modern {
    padding: 110px 0 70px;
  }

  .hero-title {
    font-size: 1.7rem;
    letter-spacing: -0.65px;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: center;
  }

  .hero-cta-primary,
  .hero-cta-secondary {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
  }

  .stat-divider {
    display: none;
  }

  .hero-visual {
    display: none;
  }

  .pricing-modern,
  .contact-modern {
    padding: 80px 0;
  }

  .pricing-main-title,
  .contact-main-title {
    font-size: 2.8rem;
    letter-spacing: -1px;
  }

  .pricing-tagline,
  .contact-tagline {
    font-size: 1rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .contact-card-modern {
    padding: 40px 32px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.3rem;
    letter-spacing: -0.3px;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 6px 14px;
  }

  .pricing-plan {
    padding: 36px 24px;
  }

  .price-amount {
    font-size: 2.8rem;
    letter-spacing: -1px;
  }

  .pricing-main-title,
  .contact-main-title {
    font-size: 2.2rem;
    letter-spacing: -0.5px;
  }
}

.hero {
  text-align: center;
}

.hero .info {
  opacity: 0;
  animation: scaleIn 0.8s ease-out forwards;
  animation-delay: 0.3s;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
  opacity: 0;
  animation: slideInFromLeft 0.8s ease-out forwards, glowPulse 2s infinite;
  animation-delay: 0.5s;
}

.hero p {
  opacity: 0;
  animation: slideInFromRight 0.8s ease-out forwards;
  animation-delay: 0.7s;
}

.cta-button {
  background: #00f7ff;
  color: #000;
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
  animation-delay: 0.9s;
}

.cta-button:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 247, 255, 0.4);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  /* margin-top: 50px; */
}

.feature {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

/* Enhanced Plan Styles */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 20px;
}

.plan {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  text-align: center;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.plan.featured {
  border: 2px solid #00f7ff;
  background: rgba(0, 247, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.plan.featured::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  animation: shimmer 7s infinite linear;
  pointer-events: none;
}

.plan h3 {
  font-size: 1.6rem;
  margin-bottom: 10px;
  color: #fff;
  font-weight: 600;
}

.price {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 20px 0;
  color: #00f7ff;
}

.plan ul {
  margin: 20px 0;
  text-align: left;
  flex-grow: 1;
}

.plan ul li {
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
}

.plan ul li i {
  margin-top: 3px;
}

.plan .cta-button {
  width: 100%;
  margin-top: auto;
}

.plan:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 247, 255, 0.15);
}

.pricing-note {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px;
  max-width: 700px;
  margin: 0 auto;
}

.pricing-modal-header {
  text-align: center;
  margin-bottom: 25px;
}

.pricing-modal-header h2 {
  color: #333;
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.pricing-modal-header p {
  color: #666;
  font-size: 1rem;
}

/* Enhanced Comparison Table Styles */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}

.comparison-table th,
.comparison-table td {
  padding: 12px 15px;
  text-align: center;
  color: #333;
  border: 1px solid #dee2e6;
}

.comparison-table th {
  background-color: #f0f0f0;
  color: #333;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
}

.comparison-table td:first-child {
  text-align: left;
  font-weight: 500;
}

.comparison-table tr:nth-child(even):not(.table-light) {
  background-color: #f9f9f9;
}

.comparison-table tr:hover:not(.table-light) {
  background-color: rgba(0, 247, 255, 0.05);
}

.comparison-table .category-header {
  background-color: #e9ecef;
  font-size: 1.1rem;
  padding: 10px 15px;
}

.comparison-table .text-warning {
  color: #ff9800 !important;
}

.comparison-table .text-success {
  color: #28a745 !important;
}

.comparison-table .text-danger {
  color: #dc3545 !important;
}

.modal-inner {
  max-height: 85vh;
}

/* Responsive adjustments for the comparison table */
@media (max-width: 992px) {
  .comparison-table {
    font-size: 0.9rem;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 8px 10px;
  }
  
  .comparison-table small {
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  .comparison-table {
    font-size: 0.8rem;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 6px 8px;
  }
  
  .comparison-table .d-none {
    display: none !important;
  }
  
  .comparison-table .category-header {
    font-size: 0.95rem;
  }
}

/* AI Quota Pricing Section */
.quota-pricing-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0 0 20px;
}

.quota-pricing-card {
  background: #f8f9fa;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #e9ecef;
}

.quota-pricing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.quota-card-header {
  background: linear-gradient(135deg, #00f7ff 0%, #00b8d4 100%);
  color: white;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.quota-card-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: white;
}

.quota-card-header img {
  background: white;
  padding: 5px;
  border-radius: 50%;
}

.quota-card-body {
  padding: 20px;
  color: #333;
}

.quota-description {
  margin-bottom: 15px;
  color: #666;
  font-size: 0.95rem;
}

.quota-price {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-top: 15px;
}

.price-tag {
  font-size: 1.8rem;
  font-weight: 700;
  color: #00b8d4;
}

.price-unit {
  color: #666;
  font-size: 0.9rem;
}

.quota-mode {
  margin-bottom: 10px;
  padding: 8px 12px;
  background: rgba(0, 247, 255, 0.05);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mode-label {
  font-weight: 500;
  color: #444;
}

.mode-price {
  color: #00b8d4;
  font-weight: 600;
}

/* Responsive adjustments for pricing */
@media (max-width: 992px) {
  .quota-pricing-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .plans {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin: 0 auto;
  }
  
  .quota-pricing-container {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
  
  .pricing-modal-wrapper .modal-inner {
    padding: 20px;
    width: 95%;
  }
  
  .comparison-table {
    font-size: 0.9rem;
  }
  
  .quota-card-header h3 {
    font-size: 1.1rem;
  }
  
  .price-tag {
    font-size: 1.5rem;
  }
}

.contact-form {
  display: flex;
  gap: 20px;
  justify-content: center;
  /* margin-top: 50px; */
}

.contact-form input {
  padding: 15px;
  border-radius: 25px;
  border: none;
  width: 300px;
}

/* Demo Section Styles */
.demo {
  background: rgba(0, 0, 0, 0.3);
}

.demo-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #00f7ff rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  /* margin-top: 30px; */
}

.demo-scroll::-webkit-scrollbar {
  height: 8px;
}

.demo-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.demo-scroll::-webkit-scrollbar-thumb {
  background: #00f7ff;
  border-radius: 4px;
}

.demo-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  padding: 20px 10px;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  background-color: rgba(255, 255, 255, 0.1);
  width: 450px;
  /* Increased width for 2 per row */
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0px 13px 10px -7px rgba(0, 247, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all .4s cubic-bezier(0.175, 0.885, 0, 1);
  margin-bottom: 30px;
  min-height: 400px;
}

.card:hover {
  box-shadow: 0px 30px 18px -8px rgba(0, 247, 255, 0.2);
  transform: scale(1.05, 1.05);
}

.card__info-hover {
  position: absolute;
  padding: 16px;
  width: 100%;
  opacity: 0;
  top: 0;
  z-index: 3;
}

.card__clock-info {
  float: right;
  color: #00f7ff;
}

.card__time {
  font-size: 12px;
  vertical-align: middle;
  margin-left: 5px;
}

.card__clock {
  width: 15px;
  vertical-align: middle;
  fill: #00f7ff;
}

.card__img,
.card__img--hover {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  height: 250px;
  /* Increased height for better visual */
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.card__img {
  visibility: hidden;
}

.card__img--hover {
  position: absolute;
  top: 0;
  height: 250px;
  /* Match the height above */
  transition: 0.2s all ease-out;
}

.card__info {
  /* background-color: rgba(0, 0, 0, 0.7); */
  padding: 16px 24px 24px 24px;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
}

.card__category {
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 2px;
  font-weight: 500;
  color: #00f7ff;
  margin-bottom: 5px;
}

.card__title {
  margin-top: 5px;
  margin-bottom: 10px;
  color: white;
}

.card__description {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  flex-grow: 1;
  margin-bottom: 15px;
}

.card__description ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.card__description li {
  padding: 6px 0;
  position: relative;
  padding-left: 20px;
}

.card__description li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #00f7ff;
  font-weight: bold;
}

.card__cta {
  background: #00f7ff;
  color: #000;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  position: relative;
  z-index: 10;
  width: 100%;
  transition: all 0.3s ease;
  margin-top: auto;
  align-self: flex-end;
}

.card__cta:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 247, 255, 0.4);
}

.card__cta:active {
  transform: scale(0.95);
}

.card:hover .card__img--hover {
  height: 100%;
  opacity: 0.3;
}

.card:hover .card__info {
  background-color: transparent;
}

.card:hover .card__info-hover {
  opacity: 1;
}

/* Adjust responsive breakpoints for two cards per row */
@media (max-width: 1200px) {
  .video-container {
    width: 85%;
    padding-bottom: 47.8125%;
    /* 56.25% of 85% */
  }

  .card {
    width: 420px;
  }
}

@media (max-width: 992px) {
  .card {
    width: 380px;
  }
}

@media (max-width: 850px) {
  .card {
    width: 90%;
    max-width: 450px;
  }

  .demo-cards {
    flex-direction: column;
    align-items: center;
    max-width: 100%;
  }
}

@media (max-width: 768px) {

  .features,
  .plans {
    grid-template-columns: 1fr;
  }

  .links {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .header-nav-wrapper {
    gap: 0;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    transition: right 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateX(100%);
  }

  nav.active {
    right: 0;
    transform: translateX(0);
  }

  .links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .links li {
    opacity: 0;
    transform: translateX(50px);
  }

  nav.active .links li {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.3s ease;
  }

  nav.active .links li:nth-child(1) {
    transition-delay: 0.1s;
  }

  nav.active .links li:nth-child(2) {
    transition-delay: 0.2s;
  }

  nav.active .links li:nth-child(3) {
    transition-delay: 0.3s;
  }

  nav.active .links li:nth-child(4) {
    transition-delay: 0.4s;
  }

  nav.active .links li:nth-child(5) {
    transition-delay: 0.5s;
  }

  .links a {
    font-size: 1.5rem;
  }

  .get-started {
    margin-top: 1rem;
  }

  .header-login-btn {
    display: none;
  }

  .features,
  .plans {
    grid-template-columns: 1fr;
    padding: 0 20px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .contact-form {
    flex-direction: column;
    padding: 0 20px;
  }

  .contact-form input {
    width: 100%;
  }

  .landing-page section {
    padding: 10px 20px;
  }

  .demo-card {
    min-width: 260px;
  }

  .card-image {
    height: 160px;
  }

  .modal-content {
    width: 95%;
    max-height: 80vh;
  }

  .video-modal {
    padding: 10px;
  }

  .language-toggle {
    margin: 20px 0;
  }

  .lang-btn {
    font-size: 16px;
    padding: 8px 15px;
  }

  .demo-card:hover,
  .plan:hover {
    transform: translateY(-5px) scale(1.01);
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 28px;
  }

  .feature,
  .plan {
    padding: 20px;
  }

  .price {
    font-size: 28px;
  }
}

/* Pricing Modal Styles */
.pricing-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.pricing-modal.visible {
  opacity: 1;
}

.pricing-modal-content {
  position: relative;
  background: white;
  padding: 20px;
  border-radius: 10px;
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
}

.pricing-modal-content.visible {
  transform: scale(1);
  opacity: 1;
}

.pricing-modal .close-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  color: #000;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: background 0.3s ease;
}

.pricing-modal .close-modal:hover {
  background: rgba(0, 0, 0, 0.2);
}

.comparison-table {
  width: 100%;
  background: white;
  margin-top: 10px;
}

/* Enhanced Animation Keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes glowPulse {
  0% {
    text-shadow: 0 0 10px rgba(0, 247, 255, 0.5);
  }

  50% {
    text-shadow: 0 0 20px rgba(0, 247, 255, 0.8), 0 0 30px rgba(0, 247, 255, 0.6);
  }

  100% {
    text-shadow: 0 0 10px rgba(0, 247, 255, 0.5);
  }
}

/* Enhanced Component Animations */
.links a {
  position: relative;
  transition: color 0.3s ease;
}

.links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #00f7ff;
  transition: width 0.3s ease;
}

.links a:hover::after {
  width: 100%;
}

/* Reduce motion if user prefers */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Demo Modal Styles */
.demo-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

.demo-modal-header {
  margin-bottom: 20px;
}

.demo-modal-header h2 {
  margin-bottom: 10px;
}

.demo-modal-header .category {
  color: #666;
  font-size: 0.9em;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 aspect ratio */
  height: 0;
  margin-bottom: 20px;
}

.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 4px;
}

.demo-description {
  padding: 20px 0;
}

.feature-section {
  margin: 20px 0;
}

.feature-section h3 {
  color: #333;
  margin-bottom: 10px;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
}

/* Demo Modal Enhanced Styles */
.demo-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 40px;
  backdrop-filter: blur(5px);
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}

.demo-modal-content {
  background-color: rgba(255, 255, 255, 0.95);
  max-width: 1400px;
  width: 85%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 15px;
  padding: 30px 40px;
  margin: 20px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 247, 255, 0.2);
  transform: translateY(20px);
  opacity: 0;
  animation: slideUpFade 0.4s ease forwards;
}

.demo-modal-header {
  margin-bottom: 25px;
  border-bottom: 2px solid rgba(0, 247, 255, 0.2);
  padding-bottom: 15px;
}

.demo-modal-header h2 {
  margin-bottom: 8px;
  color: #333;
  font-size: 1.8rem;
  font-weight: 600;
}

.demo-modal-header .category {
  color: #333;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

/* Video Container Updates */
.video-container {
  position: relative;
  width: 70%;
  /* Control width on larger screens */
  margin: 0 auto 25px;
  /* Center the video container */
  padding-bottom: 39.375%;
  /* 56.25% of 70% to maintain aspect ratio */
  height: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.video-container video,
.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: contain;
  /* Changed from cover to contain */
  background: #000;
  /* Add black background for letterboxing */
}

.video-container video {
    object-fit: contain; /* Specific to the <video> element */
    background: #000;    /* Background for letterboxing if video aspect ratio differs */
}

.video-container iframe {
    border: 0; /* Explicitly remove any default iframe border */
}

.demo-description {
  padding: 0;
  /* Remove default padding */
  max-width: 85%;
  /* Limit text width for readability */
  margin: 0 auto;
  /* Center content */
  color: #444;
}

.demo-description p {
  line-height: 1.6;
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.feature-section {
  background: rgba(0, 247, 255, 0.05);
  padding: 20px;
  border-radius: 10px;
  margin: 15px auto;
  /* Center align */
  max-width: 85%;
  /* Match description width */
  border-left: 4px solid #00f7ff;
}

.feature-section h3 {
  color: #333;
  margin-bottom: 10px;
  font-size: 1.2rem;
  font-weight: 600;
}

.feature-section p {
  color: #666;
  line-height: 1.5;
  margin: 0;
}

.demo-modal .close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  color: #333;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.demo-modal .close-modal:hover {
  background: rgba(0, 0, 0, 0.2);
  transform: rotate(90deg);
}

/* Add new animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Responsive Adjustments */
@media (max-width: 1200px) {
  .video-container {
    width: 85%;
    padding-bottom: 47.8125%;
    /* 56.25% of 85% */
  }
}

@media (max-width: 768px) {
  .demo-modal {
    padding: 15px;
  }

  .demo-modal-content {
    width: 95%;
    padding: 20px;
    margin: 10px;
    max-height: 85vh;
  }

  .video-container {
    width: 100%;
    padding-bottom: 56.25%;
  }

  .demo-description {
    max-width: 100%;
  }

  .demo-modal-header h2 {
    font-size: 1.5rem;
    padding-right: 40px;
  }

  .demo-description p {
    font-size: 1rem;
  }

  .feature-section {
    padding: 15px;
  }

  .feature-section h3 {
    font-size: 1.1rem;
  }

  .demo-modal .close-modal {
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    font-size: 18px;
  }
}

/* Custom Scrollbar for Modal */
.demo-modal-content::-webkit-scrollbar {
  width: 8px;
}

.demo-modal-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.demo-modal-content::-webkit-scrollbar-thumb {
  background: rgba(0, 247, 255, 0.5);
  border-radius: 4px;
}

.demo-modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 247, 255, 0.7);
}

/* Updated Demo Modal Styles */
.main-description {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 30px;
  text-align: start;
  padding: 0 15px;
}

.feature-section {
  background: rgba(0, 247, 255, 0.05);
  padding: 25px;
  border-radius: 12px;
  margin: 25px auto;
  max-width: 90%;
  border-left: 4px solid #00f7ff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.feature-section h3 {
  color: #333;
  font-size: 1.4rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.feature-content {
  margin-top: 20px;
}

.feature-text {
  color: #444;
  line-height: 1.6;
  margin-bottom: 15px;
}

.additional-notes {
  background: rgba(0, 247, 255, 0.08);
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
  font-style: italic;
  color: #666;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .feature-section {
    padding: 20px;
    max-width: 95%;
  }

  .feature-section h3 {
    font-size: 1.2rem;
  }

  .main-description {
    font-size: 1.1rem;
    padding: 0 10px;
  }
}

/* New Pricing Modal Specific Styles */
.pricing-modal-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(5px);
}

.pricing-modal-wrapper .modal-inner {
  max-width: 1080px;
  width: 92%;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 24px;
  padding: 42px 38px;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 247, 255, 0.45) rgba(255, 255, 255, 0.04);
}
.pricing-modal-wrapper .modal-inner::-webkit-scrollbar { width: 5px; }
.pricing-modal-wrapper .modal-inner::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}
.pricing-modal-wrapper .modal-inner::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0, 247, 255, 0.55), rgba(106, 92, 255, 0.55));
  border-radius: 4px;
}
.pricing-modal-wrapper .modal-inner::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(0, 247, 255, 0.8), rgba(106, 92, 255, 0.8));
}

.pricing-modal-wrapper .modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  color: #333;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.pricing-modal-wrapper .modal-close-btn:hover {
  background: rgba(0, 0, 0, 0.2);
  transform: rotate(90deg);
}

/* Contact Section Styles */
.contact-section {
  padding: 80px 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.9) 100%);
  position: relative;
  overflow: hidden;
  min-height: auto !important;
}

.contact-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.contact-cards-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-card {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  width: 300px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.contact-card-content {
  text-align: center;
}

.icon-wrapper {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  transition: transform 0.3s ease;
}

.contact-card:hover .icon-wrapper {
  transform: scale(1.1);
}

.icon-wrapper img {
  width: 40px;
  height: 40px;
}

.contact-card h3 {
  color: #fff;
  font-size: 24px;
  margin-bottom: 15px;
}

.contact-card p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 25px;
  font-size: 16px;
  line-height: 1.5;
}

.contact-button {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.whatsapp .contact-button {
  background: #128C7E;
  color: white;
}

.instagram .contact-button {
  background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
  color: white;
}

.contact-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  opacity: 0.9;
}

.contact-button:focus {
  outline: 3px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .contact-section {
    padding: 40px 0;
  }

  .contact-cards-container {
    padding: 0 20px;
  }

  .contact-card {
    width: 100%;
    max-width: 320px;
    margin: 0 auto 20px;
  }

  .contact-card:last-child {
    margin-bottom: 0;
  }
}

@media (max-width: 768px) {
  .contact-cards-container {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .contact-card {
    width: 90%;
    max-width: 300px;
  }
}

.contact-title {
  position: relative;
  background: linear-gradient(120deg, #fff, #00f7ff, #fff);
  background-size: 200% auto;
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  animation: shine 3s linear infinite, float 4s ease-in-out infinite;
  text-shadow: 0 0 10px rgba(0, 247, 255, 0.3);
}

.title-underline {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #00f7ff, transparent);
  animation: underlineExpand 1.5s ease-out forwards;
}

@keyframes shine {
  0% {
    background-position: 200% center;
  }

  100% {
    background-position: -200% center;
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes underlineExpand {
  0% {
    width: 0;
    opacity: 0;
  }

  100% {
    width: 100px;
    opacity: 1;
  }
}

/* ============================================
   MODERN ABOUT SECTION - Scroll Animations
   ============================================ */

.about-modern {
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}

.about-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 30%, rgba(0, 247, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(0, 247, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

/* About Header */
.about-header {
  text-align: center;
  margin-bottom: 90px;
}

.about-main-title {
  font-size: 4.2rem;
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #e0f9ff 40%, #00f7ff 70%, #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.about-tagline {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.2px;
  font-weight: 400;
}

/* About Block Base Styles */
.about-block {
  display: flex;
  align-items: center;
  gap: 70px;
  margin-bottom: 80px;
  position: relative;
}

.about-block:last-child {
  margin-bottom: 0;
}

/* Scroll Reveal Animation States */
.scroll-reveal {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
}

/* Center Block */
.about-block-center {
  justify-content: center;
  text-align: center;
}

.about-block-center .about-block-content {
  max-width: 700px;
}

.about-block-center.scroll-reveal {
  transform: translateY(60px);
}

.about-block-center.scroll-reveal.revealed {
  transform: translateY(0);
}

/* Left Block - Slides from Left */
.about-block-left {
  flex-direction: row;
}

.about-block-left.scroll-reveal {
  transform: translateX(-100px);
}

.about-block-left.scroll-reveal.revealed {
  transform: translateX(0);
}

/* Right Block - Slides from Right */
.about-block-right {
  flex-direction: row;
}

.about-block-right.scroll-reveal {
  transform: translateX(100px);
}

.about-block-right.scroll-reveal.revealed {
  transform: translateX(0);
}

/* Block Visual */
.about-block-visual {
  flex: 0 0 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 280px;
}

.feature-icon-large {
  font-size: 6rem;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 247, 255, 0.15) 0%, rgba(0, 247, 255, 0.05) 100%);
  border-radius: 30px;
  border: 2px solid rgba(0, 247, 255, 0.3);
  box-shadow: 
    0 20px 60px rgba(0, 247, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s ease;
}

.about-block:hover .feature-icon-large {
  transform: scale(1.05) rotate(3deg);
  border-color: rgba(0, 247, 255, 0.6);
  box-shadow: 
    0 25px 80px rgba(0, 247, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Block Content */
.about-block-content {
  flex: 1;
  padding: 48px 52px;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  transition: all 0.45s ease;
}

.about-block:hover .about-block-content {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(0, 247, 255, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.about-block-wide {
  max-width: 800px;
}

.about-block-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #00f7ff;
  background: rgba(0, 247, 255, 0.1);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 15px;
}

.about-block-title {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -1px;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.15;
}

.about-block-subtitle {
  font-size: 1rem;
  color: rgba(0, 247, 255, 0.8);
  margin-bottom: 20px;
  font-weight: 500;
}

.about-block-text {
  font-size: 1.1rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.68);
  margin: 0;
  font-weight: 400;
}

/* Icon Wrapper for Center Blocks */
.about-icon-wrapper {
  width: 100px;
  height: 100px;
  margin: 0 auto 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 247, 255, 0.2) 0%, rgba(0, 247, 255, 0.05) 100%);
  border-radius: 50%;
  border: 2px solid rgba(0, 247, 255, 0.3);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 247, 255, 0.3); }
  50% { box-shadow: 0 0 0 20px rgba(0, 247, 255, 0); }
}

.about-icon-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 25px;
}

.about-icon-row img {
  transition: transform 0.3s ease;
}

.about-icon-row img:hover {
  transform: scale(1.2) rotate(10deg);
}

/* Demo Preview Image Styles */
.demo-preview-image {
  width: 400px;
  height: 300px;
  border-radius: 22px;
  background-size: cover;
  background-position: center;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 247, 255, 0.07);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.demo-preview-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.5) 100%);
  transition: all 0.3s ease;
}

.demo-preview-image:hover {
  transform: scale(1.03) translateY(-4px);
  border-color: rgba(0, 247, 255, 0.25);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 247, 255, 0.14);
}

.demo-preview-image:hover::before {
  background: linear-gradient(135deg, rgba(0, 247, 255, 0.1) 0%, rgba(0, 0, 0, 0.7) 100%);
}

.demo-preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.demo-preview-image:hover .demo-preview-overlay {
  opacity: 1;
}

.play-icon {
  width: 60px;
  height: 60px;
  background: rgba(0, 247, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #000;
  margin-bottom: 10px;
  box-shadow: 0 5px 20px rgba(0, 247, 255, 0.4);
  transition: all 0.3s ease;
}

.demo-preview-image:hover .play-icon {
  transform: scale(1.1);
}

.demo-preview-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* About Feature List */
.about-feature-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.about-feature-list li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
}

.about-feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #00f7ff;
  font-weight: bold;
}

/* About Demo Button */
.about-demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 2px solid rgba(0, 247, 255, 0.5);
  color: #00f7ff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.about-demo-btn:hover {
  background: rgba(0, 247, 255, 0.1);
  border-color: #00f7ff;
  transform: translateX(5px);
}

.about-demo-btn svg {
  transition: transform 0.3s ease;
}

.about-demo-btn:hover svg {
  transform: translateX(5px);
}

/* Decorative Lines */
.about-block-left::before,
.about-block-right::before {
  content: '';
  position: absolute;
  width: 3px;
  height: 60%;
  background: linear-gradient(to bottom, transparent, rgba(0, 247, 255, 0.3), transparent);
}

.about-block-left::before {
  left: 135px;
}

.about-block-right::before {
  right: 135px;
}

/* ============================================
   RESPONSIVE STYLES FOR ABOUT SECTION
   ============================================ */

@media (max-width: 1024px) {
  .about-block {
    gap: 50px;
    margin-bottom: 70px;
  }

  .about-block-visual {
    flex: 0 0 260px;
    min-width: 240px;
  }

  .demo-preview-image {
    width: 300px;
    height: 230px;
  }

  .feature-icon-large {
    width: 140px;
    height: 140px;
    font-size: 4.5rem;
  }

  .about-main-title {
    font-size: 3.2rem;
    letter-spacing: -1.5px;
  }

  .about-block-title {
    font-size: 1.9rem;
  }

  .about-block-left::before {
    left: 125px;
  }

  .about-block-right::before {
    right: 125px;
  }
}

@media (max-width: 768px) {
  .about-modern {
    padding: 80px 0;
  }

  .about-header {
    margin-bottom: 56px;
  }

  .about-main-title {
    font-size: 2.5rem;
    letter-spacing: -1px;
  }

  .about-tagline {
    font-size: 1rem;
    letter-spacing: 0.1px;
  }
  
  .about-block {
    flex-direction: column !important;
    gap: 25px;
    margin-bottom: 50px;
  }
  
  .about-block-left.scroll-reveal,
  .about-block-right.scroll-reveal {
    transform: translateY(50px);
  }
  
  .about-block-left.scroll-reveal.revealed,
  .about-block-right.scroll-reveal.revealed {
    transform: translateY(0);
  }
  
  .about-block-visual {
    flex: 0 0 auto;
    order: -1;
    width: 100%;
    display: flex;
    justify-content: center;
  }
  
  .demo-preview-image {
    width: 100%;
    max-width: 380px;
    min-width: unset;
    height: 240px;
    margin: 0 auto;
    border-radius: 18px;
  }

  .demo-preview-overlay {
    opacity: 1;
  }
  
  .play-icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .feature-icon-large {
    width: 120px;
    height: 120px;
    font-size: 4rem;
    border-radius: 25px;
  }
  
  .about-block-content {
    padding: 30px 28px;
    text-align: center;
    width: 100%;
  }

  .about-feature-list {
    text-align: left;
    max-width: 320px;
    margin: 20px auto;
  }

  .about-demo-btn {
    width: 100%;
    justify-content: center;
  }

  .about-block-title {
    font-size: 1.7rem;
    letter-spacing: -0.5px;
  }

  .about-block-text {
    font-size: 1rem;
  }
  
  .about-block-left::before,
  .about-block-right::before {
    display: none;
  }
}

@media (max-width: 480px) {
  .about-main-title {
    font-size: 2rem;
    letter-spacing: -0.5px;
  }

  .about-tagline {
    font-size: 0.95rem;
  }

  .demo-preview-image {
    max-width: 100%;
    min-width: unset;
    height: 200px;
  }
  
  .feature-icon-large {
    width: 100px;
    height: 100px;
    font-size: 3rem;
  }
  
  .about-block-content {
    padding: 20px;
  }
  
  .about-block-title {
    font-size: 1.4rem;
  }
  
  .about-icon-wrapper {
    width: 80px;
    height: 80px;
  }
  
  .about-icon-wrapper img {
    width: 45px !important;
    height: 45px !important;
  }
}

/* Legacy About Section Styles (keeping for backwards compatibility) */
.about-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   DEMO SECTION - Product Showcases
   ============================================ */

.demo-section {
  padding: 120px 0;
  position: relative;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}

.demo-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 80% 20%, rgba(0, 247, 255, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(0, 247, 255, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

/* Demo Header */
.demo-header {
  text-align: center;
  margin-bottom: 90px;
}

.demo-main-title {
  font-size: 4.2rem;
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #e0f9ff 40%, #00f7ff 70%, #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 5s ease infinite;
}

.demo-tagline {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.2px;
  font-weight: 400;
}

/* Demo Block Base Styles */
.demo-block {
  display: flex;
  align-items: center;
  gap: 70px;
  margin-bottom: 110px;
  position: relative;
}

.demo-block:last-child {
  margin-bottom: 0;
}

/* Left Block - Slides from Left */
.demo-block-left {
  flex-direction: row;
}

.demo-block-left.scroll-reveal {
  transform: translateX(-100px);
}

.demo-block-left.scroll-reveal.revealed {
  transform: translateX(0);
}

/* Right Block - Slides from Right */
.demo-block-right {
  flex-direction: row;
}

.demo-block-right.scroll-reveal {
  transform: translateX(100px);
}

.demo-block-right.scroll-reveal.revealed {
  transform: translateX(0);
}

/* Demo Block Visual */
.demo-block-visual {
  flex: 0 0 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 380px;
}

/* Demo Block Content */
.demo-block-content {
  flex: 1;
  padding: 48px 52px;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  transition: all 0.45s ease;
}

.demo-block:hover .demo-block-content {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 247, 255, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.demo-block-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(0, 247, 255, 0.85);
  background: rgba(0, 247, 255, 0.08);
  padding: 5px 14px;
  border-radius: 980px;
  margin-bottom: 16px;
  border: 1px solid rgba(0, 247, 255, 0.15);
}

.demo-block-title {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.1;
}

.demo-block-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 18px;
  font-weight: 400;
  letter-spacing: 0.2px;
}

.demo-block-text {
  font-size: 1.05rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.68);
  margin: 0;
  font-weight: 400;
}

/* Demo Feature List */
.demo-feature-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.demo-feature-list li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
}

.demo-feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #00f7ff;
  font-weight: bold;
}

/* Demo Explore Button */
.demo-explore-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 247, 255, 0.06);
  border: 1px solid rgba(0, 247, 255, 0.3);
  color: #00f7ff;
  padding: 13px 26px;
  border-radius: 980px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 16px;
  letter-spacing: 0.1px;
}

.demo-explore-btn:hover {
  background: rgba(0, 247, 255, 0.12);
  border-color: rgba(0, 247, 255, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 247, 255, 0.12);
}

.demo-explore-btn svg {
  transition: transform 0.3s ease;
}

.demo-explore-btn:hover svg {
  transform: translateX(5px);
}

/* Decorative Lines for Demo Blocks */
.demo-block-left::before,
.demo-block-right::before {
  content: '';
  position: absolute;
  width: 3px;
  height: 60%;
  background: linear-gradient(to bottom, transparent, rgba(0, 247, 255, 0.3), transparent);
}

.demo-block-left::before {
  left: 135px;
}

.demo-block-right::before {
  right: 135px;
}

/* ============================================
   RESPONSIVE STYLES FOR DEMO SECTION
   ============================================ */

@media (max-width: 1024px) {
  .demo-section {
    padding: 90px 0;
  }

  .demo-header {
    margin-bottom: 70px;
  }

  .demo-main-title {
    font-size: 3.2rem;
    letter-spacing: -1.5px;
  }

  .demo-block {
    gap: 50px;
    margin-bottom: 80px;
  }

  .demo-block-visual {
    flex: 0 0 300px;
    min-width: 280px;
  }

  .demo-block-title {
    font-size: 2.2rem;
  }

  .demo-block-left::before {
    left: 140px;
  }

  .demo-block-right::before {
    right: 140px;
  }
}

@media (max-width: 768px) {
  .demo-section {
    padding: 80px 0;
  }

  .demo-header {
    margin-bottom: 56px;
  }

  .demo-main-title {
    font-size: 2.5rem;
    letter-spacing: -1px;
  }

  .demo-tagline {
    font-size: 1rem;
    letter-spacing: 0.1px;
  }
  
  .demo-block {
    flex-direction: column !important;
    gap: 25px;
    margin-bottom: 50px;
  }
  
  .demo-block-left.scroll-reveal,
  .demo-block-right.scroll-reveal {
    transform: translateY(50px);
  }
  
  .demo-block-left.scroll-reveal.revealed,
  .demo-block-right.scroll-reveal.revealed {
    transform: translateY(0);
  }
  
  .demo-block-visual {
    flex: 0 0 auto;
    order: -1;
    width: 100%;
    display: flex;
    justify-content: center;
    min-width: unset;
  }
  
  .demo-block-content {
    padding: 30px 28px;
    text-align: center;
    width: 100%;
  }

  .demo-feature-list {
    text-align: left;
    max-width: 320px;
    margin: 20px auto;
  }

  .demo-explore-btn {
    width: 100%;
    justify-content: center;
  }

  .demo-block-title {
    font-size: 2rem;
    letter-spacing: -0.5px;
  }

  .demo-block-text {
    font-size: 1rem;
  }
  
  .demo-block-left::before,
  .demo-block-right::before {
    display: none;
  }
}

@media (max-width: 480px) {
  .demo-main-title {
    font-size: 2rem;
    letter-spacing: -0.5px;
  }

  .demo-tagline {
    font-size: 0.95rem;
  }

  .demo-block-content {
    padding: 24px 20px;
  }

  .demo-block-title {
    font-size: 1.7rem;
    letter-spacing: -0.5px;
  }
}

.section-title {
  color: #00f7ff;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(0, 247, 255, 0.5);
  border-radius: 3px;
}

.story-text,
.vision-text,
.mission-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
}

.story-section,
.vision-section,
.mission-section {
  position: relative;
  padding: 0 15px 15px 15px;
  border-left: 3px solid rgba(0, 247, 255, 0.3);
  margin-left: 15px;
  transition: all 0.3s ease;
}

.story-section:hover,
.vision-section:hover,
.mission-section:hover {
  border-left-color: #00f7ff;
  transform: translateX(5px);
}

.highlight-text {
  font-size: 1.2rem;
  color: #00f7ff;
  font-weight: 500;
  padding: 1rem;
  background: rgba(0, 247, 255, 0.1);
  border-radius: 8px;
  border-left: 4px solid #00f7ff;
  position: relative;
  overflow: hidden;
}

.highlight-text::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(to right,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.1) 50%,
      rgba(255, 255, 255, 0) 100%);
  transform: rotate(30deg);
  animation: shimmer 5s infinite linear;
  pointer-events: none;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) rotate(30deg);
  }

  100% {
    transform: translateX(100%) rotate(30deg);
  }
}

.story-text img,
.vision-text img,
.mission-text img {
  vertical-align: middle;
  margin: 0 5px;
  transition: transform 0.3s ease;
}

.story-text img:hover,
.vision-text img:hover,
.mission-text img:hover {
  transform: scale(1.2) rotate(10deg);
}

.lead {
  font-size: 1.25rem;
  font-weight: 300;
}

/* Responsive Adjustments for About Section */
@media (max-width: 768px) {
  .about {
    opacity: 1 !important;
  }

  .about-content {
    padding: 15px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .story-text,
  .vision-text,
  .mission-text {
    font-size: 1rem;
  }

  .highlight-text {
    font-size: 1.1rem;
    padding: 0.8rem;
  }

  .lead {
    font-size: 1.15rem;
  }
}

/* ============================================
   ENHANCED UI/UX UPGRADES 2026
   Premium polish, depth, micro-interactions
   ============================================ */

/* ---------- Animated Gradient Mesh Background ---------- */
.landing-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(0, 247, 255, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse 60% 80% at 80% 60%, rgba(100, 0, 255, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 50% 90%, rgba(0, 180, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

/* Subtle noise texture overlay for depth */
.landing-page::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox=%270 0 256 256%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cfilter id=%27noise%27%3E%3CfeTurbulence type=%27fractalNoise%27 baseFrequency=%270.65%27 numOctaves=%273%27 stitchTiles=%27stitch%27/%3E%3C/filter%3E%3Crect width=%27100%25%27 height=%27100%25%27 filter=%27url%28%23noise%29%27/%3E%3C/svg%3E");
  pointer-events: none;
}

/* ---------- Enhanced Header ---------- */
header {
  background: rgba(5, 5, 20, 0.65);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0, 247, 255, 0.06);
}

header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 247, 255, 0.3), rgba(100, 0, 255, 0.15), transparent);
  pointer-events: none;
}

/* Enhanced Logo */
.logo {
  font-size: 22px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 30%, #00f7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo b {
  background: linear-gradient(135deg, #00f7ff 0%, #00b8d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Enhanced Nav links */
.links a {
  font-weight: 500;
  letter-spacing: 0.3px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.82);
}

/* ---------- Hero Enhancements ---------- */

/* Animated badge pulse ring */
.hero-badge {
  animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 247, 255, 0.15); }
  50% { box-shadow: 0 0 0 10px rgba(0, 247, 255, 0); }
}

/* CTA shimmer sweep */
.hero-cta-primary {
  position: relative;
  overflow: hidden;
}

.hero-cta-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  animation: ctaShimmer 3s ease-in-out infinite;
}

@keyframes ctaShimmer {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

/* Floating decorative orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.hero-orb-1 {
  width: 280px;
  height: 280px;
  background: rgba(0, 247, 255, 0.12);
  top: 8%;
  right: 8%;
  animation: orbFloat1 16s ease-in-out infinite;
}

.hero-orb-2 {
  width: 200px;
  height: 200px;
  background: rgba(100, 0, 255, 0.08);
  bottom: 15%;
  left: 3%;
  animation: orbFloat2 20s ease-in-out infinite;
}

.hero-orb-3 {
  width: 130px;
  height: 130px;
  background: rgba(0, 200, 255, 0.10);
  top: 55%;
  right: 35%;
  animation: orbFloat3 13s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(30px, -25px); }
  66% { transform: translate(-20px, 15px); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-25px, 20px); }
  66% { transform: translate(15px, -30px); }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(22px, -18px); }
}

/* ---------- Trust Strip ---------- */
.trust-strip {
  position: relative;
  z-index: 2;
  padding: 40px 0;
  background: rgba(255, 255, 255, 0.015);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.trust-strip-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
}

.trust-strip-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 600;
  white-space: nowrap;
}

.trust-stats {
  display: flex;
  gap: 45px;
  align-items: center;
}

.trust-stat {
  text-align: center;
  position: relative;
}

.trust-stat::after {
  content: '';
  position: absolute;
  right: -22px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.08);
}

.trust-stat:last-child::after {
  display: none;
}

.trust-stat-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #00f7ff 0%, #00b8d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.3;
}

.trust-stat-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
  display: block;
}

/* ---------- Section Header Accents ---------- */
.about-header::after,
.demo-header::after,
.pricing-header::after,
.contact-header::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00f7ff, rgba(100, 0, 255, 0.5), transparent);
  border-radius: 2px;
  margin: 14px auto 0;
  opacity: 0.7;
}

/* Dot-grid pattern behind sections */
.pricing-modern::after,
.about-modern::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* ---------- Enhanced Card Interactions ---------- */

/* About & Demo block hover glow */
.about-block:hover .about-block-content {
  box-shadow: 0 20px 60px rgba(0, 247, 255, 0.06), 0 0 0 1px rgba(0, 247, 255, 0.08);
}

.demo-block:hover .demo-block-content {
  box-shadow: 0 20px 60px rgba(0, 247, 255, 0.06), 0 0 0 1px rgba(0, 247, 255, 0.08);
}

/* Pricing card glow */
.pricing-plan:hover {
  box-shadow: 0 25px 60px rgba(0, 247, 255, 0.10), 0 0 0 1px rgba(0, 247, 255, 0.12);
}

.pricing-plan.featured {
  box-shadow: 0 0 0 1px rgba(0, 247, 255, 0.15), 0 10px 40px rgba(0, 247, 255, 0.06);
}

/* Pricing plan icon hover */
.pricing-plan:hover .plan-icon {
  transform: scale(1.08);
  box-shadow: 0 8px 25px rgba(0, 247, 255, 0.15);
  transition: all 0.4s ease;
}

/* Contact card hover glow */
.contact-card-modern.whatsapp:hover {
  box-shadow: 0 20px 60px rgba(37, 211, 102, 0.12), 0 0 0 1px rgba(37, 211, 102, 0.15);
}

.contact-card-modern.instagram:hover {
  box-shadow: 0 20px 60px rgba(225, 48, 108, 0.12), 0 0 0 1px rgba(225, 48, 108, 0.15);
}

/* Enhanced feature list markers */
.demo-feature-list li::before,
.about-feature-list li::before {
  text-shadow: 0 0 8px rgba(0, 247, 255, 0.4);
}

.feature-included .feature-icon {
  box-shadow: 0 0 10px rgba(0, 247, 255, 0.12);
}

/* Enhanced demo preview image */
.demo-preview-image {
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.demo-preview-image:hover {
  box-shadow:
    0 20px 60px rgba(0, 247, 255, 0.12),
    0 0 0 1px rgba(0, 247, 255, 0.08);
}

/* Smoother section reveal transitions */
.landing-page section {
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Custom Scrollbar ---------- */
html::-webkit-scrollbar {
  width: 8px;
}

html::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.5);
}

html::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00f7ff, #00b8d4);
  border-radius: 4px;
}

html::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #33f9ff, #7b00ff);
}

/* ---------- Footer ---------- */
.landing-footer {
  position: relative;
  z-index: 2;
  padding: 60px 0 30px;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  flex-wrap: wrap;
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #fff 30%, #00f7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-logo b {
  background: linear-gradient(135deg, #00f7ff 0%, #00b8d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer-links-group {
  display: flex;
  gap: 52px;
}

/* Inline verb tag next to each platform link */
.footer-tag {
  display: inline-block;
  margin-left: 7px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(0, 247, 255, 0.7);
  background: rgba(0, 247, 255, 0.08);
  border: 1px solid rgba(0, 247, 255, 0.18);
  padding: 1px 6px;
  border-radius: 4px;
  vertical-align: middle;
  transition: color 0.3s ease, background 0.3s ease;
}
.footer-col ul li a:hover .footer-tag {
  color: #00f7ff;
  background: rgba(0, 247, 255, 0.14);
}

/* Social icons sitting inside the brand column */
.footer-social-brand {
  margin-top: 20px;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-col ul li a:hover {
  color: #00f7ff;
  transform: translateX(4px);
}

.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding: 20px 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
  margin: 0;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background: rgba(0, 247, 255, 0.1);
  border-color: rgba(0, 247, 255, 0.3);
  transform: translateY(-3px);
}

/* ---------- Scroll-to-Top Button ---------- */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: rgba(5, 5, 20, 0.7);
  border: 1px solid rgba(0, 247, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: rgba(0, 247, 255, 0.15);
  border-color: rgba(0, 247, 255, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 247, 255, 0.2);
}

.scroll-to-top svg {
  transition: transform 0.3s ease;
}

.scroll-to-top:hover svg {
  transform: translateY(-2px);
}

/* ---------- Responsive for New Elements ---------- */
@media (max-width: 768px) {
  .trust-strip {
    padding: 30px 0;
  }

  .trust-strip-content {
    flex-direction: column;
    gap: 20px;
  }

  .trust-stats {
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .trust-stat::after {
    display: none;
  }

  .trust-stat-number {
    font-size: 1.5rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .footer-brand {
    max-width: 100%;
  }

  .footer-links-group {
    width: 100%;
    justify-content: center;
    gap: 40px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }

  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }

  .hero-orb {
    display: none;
  }
}

@media (max-width: 480px) {
  .trust-stats {
    gap: 20px;
  }

  .footer-links-group {
    gap: 30px;
  }
}

/* ============================================
   APPLE-INSPIRED GLOBAL POLISH
   ============================================ */

/* Responsive container padding */
@media (max-width: 768px) {
  .container {
    padding: 0 24px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 18px;
  }
}

/* Smoother, more refined scroll-reveal */
.scroll-reveal {
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

/* About/Demo block label unified style */
.about-block-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(0, 247, 255, 0.85);
  background: rgba(0, 247, 255, 0.08);
  padding: 5px 14px;
  border-radius: 980px;
  margin-bottom: 16px;
  border: 1px solid rgba(0, 247, 255, 0.15);
}

/* Premium feature list styling */
.demo-feature-list li,
.about-feature-list li {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
}

/* Refined plan badge */
.plan-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 5px 18px;
}

/* Premium footer logo */
.footer-logo {
  font-size: 24px;
  letter-spacing: -0.5px;
}

/* Subtle section dividers */
.about-modern,
.pricing-modern {
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

/* Enhanced plan price period */
.price-period {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
}

/* Refined demo modal */
.demo-modal-header h2 {
  letter-spacing: -0.5px;
  font-weight: 700;
}

/* Refined hero badge icon */
.badge-icon {
  font-size: 1rem;
}

/* =============================================================================
   PREMIUM REDESIGN (Phase 1) — shared section primitives
   Reusable eyebrow kicker / gradient title / intro line, used by About and
   reused by later sections.
   ============================================================================= */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #00f7ff;
  margin-bottom: 18px;
}
.section-eyebrow::before {
  content: '';
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #00f7ff);
}
.section-title {
  font-size: 3.9rem;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.06;
  margin: 0 0 16px;
  background: linear-gradient(135deg, #ffffff 0%, #e0f9ff 40%, #00f7ff 70%, #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 6s ease infinite;
}
.section-intro {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.2px;
  font-weight: 400;
  margin: 0;
}

/* =============================================================================
   PREMIUM REDESIGN (Phase 1) — About "Why ExamPedite" animated feature grid
   ============================================================================= */
.about-header {
  margin-bottom: 60px;
}
.about-header .scroll-reveal {
  transform: translateY(22px);
}
.about-header .scroll-reveal.revealed {
  transform: translateY(0);
}
.about-header .section-title.scroll-reveal { transition-delay: 0.08s; }
.about-header .section-intro.scroll-reveal { transition-delay: 0.16s; }

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  max-width: 1120px;
  margin: 0 auto;
}

.about-card {
  position: relative;
  padding: 42px 32px 38px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  overflow: hidden;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.45s ease, box-shadow 0.45s ease;
}
/* Rotating conic light-sweep behind the content, clipped by the card */
.about-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(0, 247, 255, 0.10) 16%, rgba(106, 92, 255, 0.10) 30%, transparent 46%, transparent 100%);
  opacity: 0;
  transition: opacity 0.6s ease;
  animation: borderSpin 9s linear infinite;
  pointer-events: none;
  z-index: 0;
}
.about-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 247, 255, 0.28);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35), 0 0 44px rgba(0, 247, 255, 0.08);
}
.about-card:hover::after { opacity: 1; }

.about-card-icon,
.about-card-title,
.about-card-text {
  position: relative;
  z-index: 1;
}
.about-card-icon {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  margin-bottom: 22px;
  background: linear-gradient(135deg, rgba(0, 247, 255, 0.16) 0%, rgba(106, 92, 255, 0.10) 100%);
  border: 1px solid rgba(0, 247, 255, 0.22);
  animation: floatY 5s ease-in-out infinite;
}
.about-card:nth-child(2) .about-card-icon { animation-delay: -1.6s; }
.about-card:nth-child(3) .about-card-icon { animation-delay: -3.2s; }
.about-card-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: #fff;
  margin: 0 0 10px;
}
.about-card-text {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.62);
  margin: 0;
}

.about-grid .scroll-reveal { transform: translateY(42px); }
.about-grid .scroll-reveal.revealed { transform: translateY(0); }
.about-grid .about-card:nth-child(2).scroll-reveal { transition-delay: 0.12s; }
.about-grid .about-card:nth-child(3).scroll-reveal { transition-delay: 0.24s; }

@keyframes borderSpin {
  to { transform: rotate(360deg); }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@media (max-width: 1024px) {
  .section-title { font-size: 3.2rem; }
}
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    gap: 18px;
  }
}
@media (max-width: 768px) {
  .about-header { margin-bottom: 44px; }
  .section-title { font-size: 2.5rem; letter-spacing: -1px; }
  .section-intro { font-size: 1rem; }
}
@media (max-width: 480px) {
  .section-title { font-size: 2.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  .section-title,
  .about-card-icon,
  .about-card::after { animation: none; }
  .about-card:hover { transform: none; }
}

/* =============================================================================
   PREMIUM REDESIGN (Phase 2) — Products numbered label + feature chips
   ============================================================================= */
.demo-block-number {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 3px;
  color: #00f7ff;
  opacity: 0.65;
  margin-bottom: 4px;
}

.demo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 24px;
}
.demo-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  background: linear-gradient(135deg, rgba(0, 247, 255, 0.10) 0%, rgba(106, 92, 255, 0.08) 100%);
  border: 1px solid rgba(0, 247, 255, 0.22);
  color: rgba(255, 255, 255, 0.82);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.25s ease;
}
.demo-chip:hover {
  background: linear-gradient(135deg, rgba(0, 247, 255, 0.18) 0%, rgba(106, 92, 255, 0.14) 100%);
  border-color: rgba(0, 247, 255, 0.45);
  transform: translateY(-1px);
}

/* =============================================================================
   PREMIUM REDESIGN (Phase 3) — Glass modals (demo + pricing)
   ============================================================================= */
.demo-modal {
  background: rgba(0, 0, 0, 0.65);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.pricing-modal-wrapper {
  background: rgba(0, 0, 0, 0.65);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.modal-glass {
  background: linear-gradient(160deg, rgba(10, 15, 30, 0.94) 0%, rgba(6, 10, 24, 0.98) 100%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow:
    0 48px 130px rgba(0, 0, 0, 0.75),
    0 0 80px rgba(0, 247, 255, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Premium close / dismiss buttons */
.demo-modal-content .close-modal,
.modal-inner .modal-close-btn {
  background: linear-gradient(135deg, rgba(0, 247, 255, 0.10) 0%, rgba(106, 92, 255, 0.08) 100%);
  border: 1px solid rgba(0, 247, 255, 0.18);
  color: rgba(255, 255, 255, 0.70);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.demo-modal-content .close-modal:hover,
.modal-inner .modal-close-btn:hover {
  background: linear-gradient(135deg, rgba(0, 247, 255, 0.22) 0%, rgba(106, 92, 255, 0.18) 100%);
  border-color: rgba(0, 247, 255, 0.45);
  color: #ffffff;
}

/* Demo modal header gradient title */
.demo-modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding-bottom: 18px;
  margin-bottom: 22px;
}
.demo-modal-header h2 {
  background: linear-gradient(120deg, #ffffff 0%, #e0f9ff 45%, #00f7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Demo modal body typography */
.demo-modal-body .main-description {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.97rem;
  line-height: 1.72;
  margin-bottom: 28px;
}
.demo-modal-body .feature-section h3 {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
}
.demo-modal-body .feature-text {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.93rem;
  line-height: 1.72;
}
.demo-modal-body .additional-notes {
  background: linear-gradient(135deg, rgba(0, 247, 255, 0.07) 0%, rgba(106, 92, 255, 0.05) 100%);
  border: 1px solid rgba(0, 247, 255, 0.16);
  border-radius: 12px;
  padding: 14px 18px;
}
.demo-modal-body .additional-notes p {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.9rem;
}

/* =============================================================================
   PRICING MODAL — redesigned comparison table (dark)
   ============================================================================= */
.pricing-modal-header { margin-bottom: 28px; }
.pricing-modal-header h2 {
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(120deg, #ffffff 0%, #e0f9ff 45%, #00f7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pricing-modal-header p { color: rgba(255, 255, 255, 0.55) !important; }

/* Table shell — rounded glass panel with soft elevation */
.modal-inner .comparison-table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  background: rgba(255, 255, 255, 0.015);
}

/* Clean horizontal rules instead of Bootstrap's full grid */
.modal-inner .comparison-table td,
.modal-inner .comparison-table th {
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.72) !important;
  padding: 15px 18px;
  vertical-align: middle;
}
.modal-inner .comparison-table tbody tr:last-child td { border-bottom: none !important; }
.modal-inner .comparison-table td:first-child,
.modal-inner .comparison-table th:first-child {
  text-align: left;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Header row */
.modal-inner .comparison-table thead th {
  background: linear-gradient(160deg, rgba(26, 34, 58, 0.96) 0%, rgba(14, 20, 40, 0.96) 100%) !important;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.3px;
  border-bottom: 1px solid rgba(0, 247, 255, 0.18) !important;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Premium (last) column — spotlighted as the recommended plan */
.modal-inner .comparison-table thead th:last-child {
  background: linear-gradient(160deg, rgba(0, 247, 255, 0.2) 0%, rgba(106, 92, 255, 0.2) 100%) !important;
  color: #ffffff !important;
}
.modal-inner .comparison-table tbody tr:not(.table-light) td:last-child {
  background: linear-gradient(180deg, rgba(0, 247, 255, 0.05), rgba(106, 92, 255, 0.04)) !important;
  border-left: 1px solid rgba(0, 247, 255, 0.12) !important;
  border-right: 1px solid rgba(0, 247, 255, 0.12) !important;
}

/* Feature name + helper text */
.modal-inner .comparison-table .text-black {
  color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 600;
}
.modal-inner .comparison-table .text-muted {
  color: rgba(255, 255, 255, 0.42) !important;
  font-size: 0.8rem;
}

/* Category section label */
.modal-inner .comparison-table .category-header {
  background: linear-gradient(90deg, rgba(0, 247, 255, 0.1), rgba(106, 92, 255, 0.04)) !important;
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  border-top: 1px solid rgba(0, 247, 255, 0.12) !important;
  border-bottom: 1px solid rgba(0, 247, 255, 0.12) !important;
}

/* Remove Bootstrap zebra striping; use a clean hover glow instead */
.modal-inner .comparison-table tbody tr:nth-child(even):not(.table-light) { background: transparent !important; }
.modal-inner .comparison-table tbody tr:not(.table-light):hover td { background: rgba(0, 247, 255, 0.06) !important; }
.modal-inner .comparison-table tbody tr:not(.table-light):hover td:last-child {
  background: linear-gradient(180deg, rgba(0, 247, 255, 0.12), rgba(106, 92, 255, 0.1)) !important;
}
.modal-inner .table-light { --bs-table-bg: transparent; }

/* Check / cross marks */
.modal-inner .comparison-table .fa-check,
.modal-inner .comparison-table .text-success {
  color: #2fe5a0 !important;
  font-size: 1.05rem;
  filter: drop-shadow(0 0 7px rgba(47, 229, 160, 0.45));
}
.modal-inner .comparison-table .fa-times,
.modal-inner .comparison-table .text-danger {
  color: rgba(255, 255, 255, 0.22) !important;
  font-size: 1rem;
}

/* Quota pricing cards */
.quota-pricing-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(0, 247, 255, 0.14);
  border-radius: 16px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.quota-pricing-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 247, 255, 0.4);
  box-shadow: 0 16px 40px rgba(0, 247, 255, 0.12);
}
.quota-card-header {
  background: linear-gradient(135deg, rgba(0, 247, 255, 0.16) 0%, rgba(106, 92, 255, 0.14) 100%);
  border-bottom: 1px solid rgba(0, 247, 255, 0.16);
}
.quota-card-header h3 { color: #fff; }
.quota-card-header img { background: rgba(255, 255, 255, 0.92); }
.quota-mode {
  background: rgba(0, 247, 255, 0.06);
  border: 1px solid rgba(0, 247, 255, 0.1);
}
.price-tag,
.mode-price { color: #00f7ff !important; }
.mode-label { color: rgba(255, 255, 255, 0.55) !important; }

/* Footer gradient top hairline */
.landing-footer {
  position: relative;
}
.landing-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 247, 255, 0.38), rgba(106, 92, 255, 0.28), transparent);
}

@media (prefers-reduced-motion: reduce) {
  .demo-chip:hover { transform: none; }
}

/* =============================================================================
   PRODUCT SHOWCASE REDESIGN — icon-driven card grid + minimal modal
   ============================================================================= */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 38px 38px 30px;
  border-radius: 24px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.015) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.45s ease, box-shadow 0.45s ease, background 0.45s ease;
}

/* Conic gradient border sweep on hover */
.product-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 24px;
  padding: 1px;
  background: conic-gradient(from 180deg, transparent 0deg, rgba(0, 247, 255, 0.5) 90deg, rgba(106, 92, 255, 0.5) 180deg, transparent 300deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.product-card:hover {
  transform: translateY(-8px);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.025) 100%);
  border-color: rgba(0, 247, 255, 0.18);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 60px rgba(0, 247, 255, 0.05);
}
.product-card:hover::before { opacity: 1; }

.product-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}
.product-number {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 3px;
  color: #00f7ff;
  opacity: 0.6;
}
.product-role {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(0, 247, 255, 0.85);
  background: rgba(0, 247, 255, 0.07);
  border: 1px solid rgba(0, 247, 255, 0.16);
  padding: 5px 13px;
  border-radius: 980px;
}

.product-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: #00f7ff;
  background: linear-gradient(135deg, rgba(0, 247, 255, 0.12) 0%, rgba(106, 92, 255, 0.10) 100%);
  border: 1px solid rgba(0, 247, 255, 0.18);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s ease;
}
.product-icon svg { width: 30px; height: 30px; }
.product-card:hover .product-icon {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 10px 30px rgba(0, 247, 255, 0.18);
}

.product-name {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.1;
  margin: 0 0 4px;
  background: linear-gradient(120deg, #ffffff 0%, #e0f9ff 50%, #00f7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.product-subtitle {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 16px;
  letter-spacing: 0.2px;
}
.product-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.66);
  margin: 0;
}

.product-card .demo-chips { margin: 18px 0 22px; }

.product-explore {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 600;
  color: #00f7ff;
  letter-spacing: 0.2px;
}
.product-explore svg { transition: transform 0.3s ease; }
.product-card:hover .product-explore svg { transform: translateX(5px); }

/* ---- Minimal product modal ---- */
.product-modal {
  max-width: 640px;
  width: 100%;
  padding: 40px 44px 36px;
}
.product-modal-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.product-modal-icon {
  flex: 0 0 auto;
  width: 70px;
  height: 70px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00f7ff;
  background: linear-gradient(135deg, rgba(0, 247, 255, 0.14) 0%, rgba(106, 92, 255, 0.10) 100%);
  border: 1px solid rgba(0, 247, 255, 0.2);
  box-shadow: 0 10px 30px rgba(0, 247, 255, 0.12);
}
.product-modal-icon svg { width: 36px; height: 36px; }
.product-modal-heading { display: flex; flex-direction: column; }
.product-modal-role {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(0, 247, 255, 0.85);
  margin-bottom: 6px;
}
.product-modal-heading h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 0;
  line-height: 1.05;
  background: linear-gradient(120deg, #ffffff 0%, #e0f9ff 45%, #00f7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.product-modal-subtitle {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.42);
  margin-top: 4px;
}
.product-modal-summary {
  font-size: 1.02rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 30px;
}
.product-modal-section { margin-bottom: 26px; }
.product-modal-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 14px;
}
.product-feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.product-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.96rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
}
.product-feature-list li svg {
  flex: 0 0 auto;
  margin-top: 2px;
  color: #00f7ff;
}
.product-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.product-highlight {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 247, 255, 0.08) 0%, rgba(106, 92, 255, 0.06) 100%);
  border: 1px solid rgba(0, 247, 255, 0.16);
}
.product-modal-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.product-modal-cta {
  flex: 1;
  padding: 14px 28px;
  border: none;
  border-radius: 980px;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  color: #04121a;
  background: linear-gradient(120deg, #00f7ff 0%, #6a5cff 100%);
  box-shadow: 0 10px 30px rgba(0, 247, 255, 0.22);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-modal-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(0, 247, 255, 0.32);
}
.product-modal-dismiss {
  padding: 14px 28px;
  border-radius: 980px;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.product-modal-dismiss:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

@media (max-width: 768px) {
  .product-grid { grid-template-columns: 1fr; gap: 20px; }
  .product-card { padding: 30px 26px 26px; }
  .product-name { font-size: 1.6rem; }
  .product-modal { padding: 32px 24px 28px; }
  .product-modal-header { gap: 16px; }
  .product-modal-icon { width: 58px; height: 58px; }
  .product-modal-icon svg { width: 30px; height: 30px; }
  .product-modal-heading h2 { font-size: 1.6rem; }
  .product-modal-actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .product-card, .product-icon, .product-explore svg, .product-modal-cta { transition: none; }
  .product-card:hover { transform: none; }
  .product-card:hover .product-icon { transform: none; }
}

/* =============================================================================
   AUTO-WORKFLOW SHOWCASE — one feature on stage at a time, animated mocks
   ============================================================================= */
.showcase {
  position: relative;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 240px;
  gap: 24px;
  align-items: stretch;
}

/* ---- Side rails (the stepping workflow) ---- */
.showcase-rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: space-between;
  padding: 10px 0;
}
.showcase-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 20px 22px;
  border-radius: 18px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.6);
  overflow: hidden;
  transition: background 0.4s ease, border-color 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}
.showcase-tab:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(0, 247, 255, 0.18);
}
.showcase-tab.active {
  background: linear-gradient(135deg, rgba(0, 247, 255, 0.1) 0%, rgba(106, 92, 255, 0.08) 100%);
  border-color: rgba(0, 247, 255, 0.32);
  color: #fff;
  transform: translateX(6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}
.showcase-tab-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  color: rgba(0, 247, 255, 0.65);
  background: rgba(0, 247, 255, 0.05);
  border: 1px solid rgba(0, 247, 255, 0.12);
  transition: color 0.4s ease, background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.showcase-tab-icon svg { width: 23px; height: 23px; }
.showcase-tab:hover .showcase-tab-icon { color: #00f7ff; border-color: rgba(0, 247, 255, 0.25); }
.showcase-tab.active .showcase-tab-icon {
  color: #00f7ff;
  background: linear-gradient(135deg, rgba(0, 247, 255, 0.18) 0%, rgba(106, 92, 255, 0.12) 100%);
  border-color: rgba(0, 247, 255, 0.35);
  box-shadow: 0 8px 24px rgba(0, 247, 255, 0.16);
  transform: scale(1.04);
}
.showcase-tab-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.showcase-tab-name { font-size: 1.06rem; font-weight: 700; letter-spacing: -0.2px; white-space: nowrap; }
.showcase-tab-role { font-size: 0.75rem; color: rgba(255, 255, 255, 0.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.showcase-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
}
.showcase-progress-fill {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, #00f7ff, #6a5cff);
  animation: showcaseProgress linear forwards;
}
@keyframes showcaseProgress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ---- Centre stage ---- */
.showcase-stage {
  position: relative;
  min-height: 510px;
}
.showcase-panel {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 34px;
  align-items: center;
  height: 100%;
  padding: 40px 44px;
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.012) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
  animation: showcasePanelIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes showcasePanelIn {
  from { opacity: 0; transform: translateY(24px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.showcase-desc {
  font-size: 1.18rem;
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.showcase-info .demo-chips { margin: 22px 0 22px; }
.showcase-cta { margin-top: 4px; }

/* Staggered entrance of the info column */
.showcase-desc             { animation: showcaseItemIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both 0.08s; }
.showcase-info .demo-chips { animation: showcaseItemIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both 0.22s; }
.showcase-cta              { animation: showcaseItemIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both 0.36s; }
@keyframes showcaseItemIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---- Professional polish: depth, glow, focus ---- */
/* Ambient light behind the stage for depth (softened by the panel blur) */
.showcase-stage::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 8%;
  width: 60%;
  height: 70%;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(0, 247, 255, 0.16) 0%, rgba(106, 92, 255, 0.08) 45%, transparent 70%);
  filter: blur(36px);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}
.showcase-panel { position: relative; z-index: 1; }

/* Progress bar glow + a leading spark */
.showcase-progress-fill { box-shadow: 0 0 10px rgba(0, 247, 255, 0.55); }

/* Keyboard focus rings (accessibility + polish) */
.showcase-tab:focus-visible,
.showcase-cta:focus-visible,
.product-modal-cta:focus-visible,
.product-modal-dismiss:focus-visible {
  outline: 2px solid rgba(0, 247, 255, 0.65);
  outline-offset: 3px;
}
.showcase-tab:focus:not(:focus-visible) { outline: none; }

.showcase-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 320px;
  animation: showcaseItemIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both 0.2s;
}

/* ---- Shared mock chrome ---- */
.mock {
  width: 100%;
  max-width: 430px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(8, 14, 28, 0.9) 0%, rgba(4, 8, 20, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.mock-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mock-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.mock-dot:nth-child(1) { background: rgba(255, 95, 109, 0.6); }
.mock-dot:nth-child(2) { background: rgba(255, 200, 80, 0.6); }
.mock-dot:nth-child(3) { background: rgba(80, 220, 140, 0.6); }
.mock-bar-title { margin-left: 8px; font-size: 0.78rem; color: rgba(255, 255, 255, 0.5); }
.mock-pill {
  margin-left: auto;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 100px;
  color: #00f7ff;
  background: rgba(0, 247, 255, 0.1);
  border: 1px solid rgba(0, 247, 255, 0.25);
}
.mock-pill-grade { color: #50dc8c; background: rgba(80, 220, 140, 0.12); border-color: rgba(80, 220, 140, 0.3); }
.mock-lines { display: flex; flex-direction: column; gap: 7px; }
.mock-lines i { display: block; height: 7px; width: 100%; border-radius: 4px; background: rgba(255, 255, 255, 0.1); }
.mock-q { font-size: 0.72rem; font-weight: 700; color: rgba(255, 255, 255, 0.6); }

/* Peditor mock */
.mock-canvas { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 20px 18px; }
.mock-layer {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  opacity: 0;
  animation: mockLayerIn 0.6s ease forwards;
  animation-delay: var(--d, 0s);
}
@keyframes mockLayerIn {
  from { opacity: 0; transform: translateX(-14px); }
  to { opacity: 1; transform: none; }
}
.mock-tag { flex: 0 0 auto; font-size: 0.66rem; font-weight: 800; color: #00f7ff; background: rgba(0, 247, 255, 0.1); border-radius: 6px; padding: 3px 8px; }
.mock-layer .mock-lines { flex: 1; padding-top: 3px; }
.mock-layer-gen { background: rgba(0, 247, 255, 0.05); border-color: rgba(0, 247, 255, 0.25); }
.mock-gen { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; color: rgba(0, 247, 255, 0.85); overflow: hidden; padding-top: 2px; }
.mock-gen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0, 247, 255, 0.25), transparent);
  transform: translateX(-100%);
  animation: mockShimmer 1.8s ease-in-out infinite;
}
@keyframes mockShimmer { to { transform: translateX(220%); } }
.mock-spark { flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle, #00f7ff 0%, rgba(0, 247, 255, 0) 70%); animation: mockPulse 1.4s ease-in-out infinite; }
@keyframes mockPulse { 0%, 100% { transform: scale(0.7); opacity: 0.6; } 50% { transform: scale(1.15); opacity: 1; } }
.mock-cursor { position: absolute; font-size: 0.6rem; font-weight: 700; color: #fff; padding: 2px 7px; border-radius: 0 10px 10px 10px; white-space: nowrap; }
.mock-cursor-a { top: 24%; right: 12%; background: #6a5cff; animation: mockFloatA 4s ease-in-out infinite; }
.mock-cursor-b { bottom: 20%; left: 14%; background: #00b3c4; animation: mockFloatB 5s ease-in-out infinite; }
@keyframes mockFloatA { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-10px, 8px); } }
@keyframes mockFloatB { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(8px, -8px); } }

/* Examer mock */
.mock-split { display: grid; grid-template-columns: 1fr 0.92fr; gap: 12px; padding: 16px; }
.mock-paper { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.025); border: 1px solid rgba(255, 255, 255, 0.05); }
.mock-field { position: relative; margin-top: 4px; height: 42px; border-radius: 8px; background: rgba(0, 247, 255, 0.03); border: 1px dashed rgba(0, 247, 255, 0.3); }
.mock-caret { position: absolute; top: 12px; left: 12px; width: 2px; height: 16px; background: #00f7ff; animation: mockBlink 1s steps(1) infinite; }
@keyframes mockBlink { 50% { opacity: 0; } }
.mock-tutor { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; background: rgba(0, 247, 255, 0.04); border: 1px solid rgba(0, 247, 255, 0.14); }
.mock-mode { align-self: flex-start; font-size: 0.64rem; font-weight: 700; color: #00f7ff; background: rgba(0, 247, 255, 0.12); border-radius: 100px; padding: 3px 10px; }
.mock-bubble { max-width: 88%; padding: 10px 12px; border-radius: 12px; font-size: 0.74rem; color: rgba(255, 255, 255, 0.82); }
.mock-ai { align-self: flex-start; background: rgba(255, 255, 255, 0.06); border-bottom-left-radius: 4px; }
.mock-user { align-self: flex-end; background: linear-gradient(135deg, rgba(0, 247, 255, 0.18), rgba(106, 92, 255, 0.14)); border-bottom-right-radius: 4px; }
.mock-examer .mock-user { min-width: 58%; height: 28px; padding: 0; }
.mock-ai-2 { width: 72%; height: 24px; opacity: 0; animation: mockBubbleIn 0.5s ease forwards 1.5s; }
.mock-typing { display: inline-flex; gap: 4px; }
.mock-typing i { width: 6px; height: 6px; border-radius: 50%; background: rgba(0, 247, 255, 0.7); animation: mockTyping 1.2s ease-in-out infinite; }
.mock-typing i:nth-child(2) { animation-delay: 0.2s; }
.mock-typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes mockTyping { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-5px); opacity: 1; } }
@keyframes mockBubbleIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Assessor mock */
.mock-grade { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; padding: 22px 18px; }
.mock-hl { background: rgba(0, 247, 255, 0.2) !important; }
.mock-hl-2 { background: rgba(106, 92, 255, 0.24) !important; }
.mock-ring { position: relative; flex: 0 0 auto; width: 100px; height: 100px; }
.mock-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.mock-ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 7; }
.mock-ring-fill {
  fill: none;
  stroke: #00f7ff;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 201;
  stroke-dashoffset: 201;
  filter: drop-shadow(0 0 5px rgba(0, 247, 255, 0.5));
  animation: mockRing 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.35s;
}
@keyframes mockRing { to { stroke-dashoffset: 20; } }
.mock-ring-score { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800; color: #fff; }
.mock-ring-score small { margin-left: 1px; font-size: 0.7rem; font-weight: 600; color: rgba(255, 255, 255, 0.45); }

/* Copilot mock */
.mock-chat { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.mock-right { align-self: flex-end; }
.mock-answer { align-self: flex-start; display: flex; gap: 10px; align-items: flex-start; width: 90%; max-width: none; }
.mock-stream { display: flex; flex-direction: column; gap: 7px; flex: 1; }
.mock-stream i { display: block; height: 7px; width: 100%; border-radius: 4px; background: rgba(255, 255, 255, 0.14); transform-origin: left; opacity: 0; animation: mockStream 0.5s ease forwards; }
.mock-stream i:nth-child(1) { animation-delay: 0.3s; }
.mock-stream i:nth-child(2) { animation-delay: 0.6s; }
.mock-stream i:nth-child(3) { animation-delay: 0.9s; }
@keyframes mockStream { from { opacity: 0; transform: scaleX(0.2); } to { opacity: 1; transform: scaleX(1); } }
.mock-followups { display: flex; gap: 8px; margin-top: 4px; opacity: 0; animation: mockBubbleIn 0.5s ease forwards 1.3s; }
.mock-followups span { font-size: 0.68rem; color: #00f7ff; padding: 5px 12px; border-radius: 100px; background: rgba(0, 247, 255, 0.08); border: 1px solid rgba(0, 247, 255, 0.22); }

/* ---- Showcase responsive ---- */
@media (max-width: 992px) {
  .showcase { grid-template-columns: 1fr; gap: 24px; }
  .showcase-rail { flex-direction: row; flex-wrap: wrap; }
  .showcase-tab { flex: 1 1 200px; }
  .showcase-tab.active,
  .showcase-rail-right .showcase-tab.active { transform: none; }
  .showcase-panel { grid-template-columns: 1fr; gap: 28px; }
  .showcase-stage { min-height: 0; }
}
@media (max-width: 768px) {
  .showcase-rail { flex-direction: column; }
  .showcase-panel { padding: 28px 22px; }
  .showcase-desc { font-size: 1.05rem; }
  .mock { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .showcase-panel,
  .showcase-desc, .showcase-info .demo-chips, .showcase-cta, .showcase-visual,
  .mock-layer, .mock-ai-2, .mock-followups, .mock-stream i {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .showcase-progress-fill { animation: none; transform: scaleX(1); }
  .mock-spark, .mock-typing i, .mock-caret, .mock-cursor-a, .mock-cursor-b, .mock-gen::after { animation: none !important; }
  .mock-ring-fill { animation: none !important; stroke-dashoffset: 20; }
}

/* =============================================================================
   FINAL POLISH — reading-progress bar, pricing premium unification, micro-shine
   ============================================================================= */

/* Top reading-progress indicator */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 3000;
  background: transparent;
  pointer-events: none;
}
.scroll-progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #00f7ff 0%, #6a5cff 100%);
  box-shadow: 0 0 12px rgba(0, 247, 255, 0.55);
  transition: transform 0.12s ease-out;
  will-change: transform;
}

.plan-badge { z-index: 3; }
.plan-header, .plan-features, .plan-cta { position: relative; z-index: 2; }

/* Gradient price figure */
.price-amount {
  background: linear-gradient(120deg, #ffffff 0%, #e0f9ff 45%, #00f7ff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 6s ease infinite;
}

/* "Popular" badge — slow shine sweep */
.plan-badge {
  position: absolute;
  overflow: hidden;
}
.plan-badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  animation: badgeShine 4.5s ease-in-out infinite;
}
@keyframes badgeShine {
  0%, 100% { left: -120%; }
  55%, 70% { left: 130%; }
}

/* Primary CTA — brand gradient + hover light-sweep */
.plan-cta {
  position: relative;
  overflow: hidden;
}
.plan-cta.primary {
  background: linear-gradient(120deg, #00f7ff 0%, #6a5cff 100%);
}
.plan-cta.primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -130%;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}
.plan-cta.primary:hover::after { left: 130%; }
.plan-cta.primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(0, 247, 255, 0.3); }

/* Nav underline — brand gradient instead of flat */
.links a::after {
  background: linear-gradient(90deg, #00f7ff, #6a5cff);
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress-bar { transition: none; }
  .price-amount { animation: none; }
  .plan-badge::after { animation: none; }
}

/* =============================================================================
   SHOWCASE POLISH — stepper rail + new feature mocks (Group Manager, MCP Server)
   ============================================================================= */
.showcase-rail { position: relative; }
.showcase-tab { z-index: 1; }

/* ---- Auto-workflow orchestration: live energy wires from the AI panel to each feature ---- */
.showcase-flow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
}
/* Faint always-on connections to every feature */
.flow-wire {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 1.4;
  stroke-dasharray: 2 8;
  stroke-linecap: round;
  animation: flowDrift 3.2s linear infinite;
}
@keyframes flowDrift { to { stroke-dashoffset: -40; } }
/* The active wire lights up and streams energy outward to the live feature */
.flow-active {
  fill: none;
  stroke: url(#flowGrad);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 16 12;
  filter: url(#flowGlow);
  opacity: 0.95;
  animation: flowRun 0.9s linear infinite, flowFadeIn 0.5s ease both;
}
@keyframes flowRun { to { stroke-dashoffset: -56; } }
@keyframes flowFadeIn { from { opacity: 0; } to { opacity: 0.95; } }
/* A bright energy pulse travelling centre → feature */
.flow-pulse {
  fill: #ffffff;
  filter: url(#flowGlow);
}

/* Active tab radiates an expanding ring to confirm "this step is running" */
.showcase-tab-icon { position: relative; }
.showcase-tab.active .showcase-tab-icon::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 1.5px solid rgba(0, 247, 255, 0.55);
  animation: tabPulseRing 1.8s ease-out infinite;
}
@keyframes tabPulseRing {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* Right rail leans its active tab toward the centre stage */
.showcase-rail-right .showcase-tab.active { transform: translateX(-6px); }
.showcase-tab-num {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(8, 12, 24, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: color 0.4s ease, background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.showcase-tab.active .showcase-tab-num {
  color: #04121a;
  background: linear-gradient(135deg, #00f7ff, #6a5cff);
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(0, 247, 255, 0.4);
}

/* Group Manager mock — member list with role-based permissions */
.mock-members { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.mock-member {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  opacity: 0;
  animation: mockLayerIn 0.6s ease forwards;
  animation-delay: var(--d, 0s);
}
.mock-avatar {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: #04121a;
  background: linear-gradient(135deg, #00f7ff, #6a5cff);
}
.mock-avatar-2 { background: linear-gradient(135deg, #6a5cff, #b06cff); color: #fff; }
.mock-avatar-3 { background: linear-gradient(135deg, #00b3c4, #00f7ff); }
.mock-member-info { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.mock-member-info i { display: block; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); }
.mock-role {
  flex: 0 0 auto;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 100px;
}
.mock-role-admin {
  color: #00f7ff;
  background: rgba(0, 247, 255, 0.12);
  border: 1px solid rgba(0, 247, 255, 0.3);
  animation: mockBadgePulse 2.4s ease-in-out infinite;
}
@keyframes mockBadgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 247, 255, 0); }
  50% { box-shadow: 0 0 0 4px rgba(0, 247, 255, 0.12); }
}
.mock-role-editor { color: #b08cff; background: rgba(106, 92, 255, 0.14); border: 1px solid rgba(106, 92, 255, 0.32); }
.mock-role-viewer { color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); }

/* MCP Server mock — connected AI clients with flowing data */
.mock-pill { display: inline-flex; align-items: center; }
.mock-live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: #50dc8c;
  animation: mockPulse 1.4s ease-in-out infinite;
}
.mock-mcp-stage { position: relative; height: 230px; padding: 10px; }
.mock-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mock-wire { fill: none; stroke: rgba(0, 247, 255, 0.5); stroke-width: 0.8; stroke-dasharray: 4 4; animation: mockFlow 1.2s linear infinite; }
.mock-wire-2 { stroke: rgba(106, 92, 255, 0.5); animation-duration: 1.5s; }
.mock-wire-3 { stroke: rgba(0, 247, 255, 0.4); animation-duration: 1.8s; }
@keyframes mockFlow { to { stroke-dashoffset: -16; } }
.mock-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.mock-node-hub {
  top: 50%;
  left: 50%;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 800;
  color: #04121a;
  background: linear-gradient(135deg, #00f7ff, #6a5cff);
  border: none;
  animation: mockHubPulse 2.2s ease-in-out infinite;
}
@keyframes mockHubPulse {
  0%, 100% { box-shadow: 0 0 18px rgba(0, 247, 255, 0.3); }
  50% { box-shadow: 0 0 34px rgba(0, 247, 255, 0.55); }
}
.mock-node-a { top: 22%; left: 20%; }
.mock-node-b { top: 22%; left: 80%; }
.mock-node-c { top: 84%; left: 50%; }
.mock-node-a, .mock-node-b, .mock-node-c { opacity: 0; animation: mockNodeIn 0.5s ease forwards; }
.mock-node-a { animation-delay: 0.25s; }
.mock-node-b { animation-delay: 0.4s; }
.mock-node-c { animation-delay: 0.55s; }
@keyframes mockNodeIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Monetization mock — secure Stripe checkout + 14-day settlement */
.mock-pay { display: flex; flex-direction: column; gap: 16px; padding: 18px; }
.mock-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 12px;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #635bff 0%, #3a32c9 60%, #1f1a8a 100%);
  box-shadow: 0 16px 38px rgba(60, 50, 200, 0.4);
  overflow: hidden;
  opacity: 0;
  animation: mockLayerIn 0.6s ease forwards 0.1s;
}
.mock-card::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -30%;
  width: 60%;
  height: 220%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: rotate(8deg);
  animation: mockCardSheen 3.4s ease-in-out infinite;
}
@keyframes mockCardSheen {
  0%, 100% { transform: translateX(-30%) rotate(8deg); opacity: 0; }
  45%, 55% { opacity: 1; }
  60% { transform: translateX(320%) rotate(8deg); opacity: 0; }
}
.mock-card-brand {
  grid-column: 1;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #fff;
}
.mock-card-chip {
  grid-column: 2;
  width: 30px;
  height: 22px;
  border-radius: 5px;
  background: linear-gradient(135deg, #ffe08a, #d9a82e);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  animation: mockChipShimmer 2.4s ease-in-out infinite;
}
@keyframes mockChipShimmer {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4); }
  50% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4), 0 0 12px rgba(255, 224, 138, 0.7); }
}
.mock-card-number { grid-column: 1 / -1; display: flex; gap: 12px; margin-top: 4px; }
.mock-card-number i { display: flex; gap: 3px; }
.mock-card-number i::before,
.mock-card-number i::after {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
}
.mock-card-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.mock-card-name i { display: block; height: 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.45); }
.mock-card-amount { font-size: 1.05rem; font-weight: 800; color: #fff; letter-spacing: 0.3px; }
.mock-settle {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  opacity: 0;
  animation: mockLayerIn 0.6s ease forwards 0.3s;
}
.mock-settle-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.78rem; }
.mock-settle-label { color: rgba(255, 255, 255, 0.7); font-weight: 600; }
.mock-settle-check {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 0.7rem;
  color: #04121a;
  background: linear-gradient(135deg, #2fe5a0, #00f7ff);
  box-shadow: 0 0 12px rgba(47, 229, 160, 0.5);
}
.mock-settle-days {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #00f7ff;
  padding: 3px 9px;
  border-radius: 100px;
  background: rgba(0, 247, 255, 0.1);
  border: 1px solid rgba(0, 247, 255, 0.28);
}
.mock-settle-track { height: 6px; border-radius: 100px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.mock-settle-fill {
  display: block;
  height: 100%;
  width: 35%;
  border-radius: 100px;
  background: linear-gradient(90deg, #00f7ff, #6a5cff);
  box-shadow: 0 0 10px rgba(0, 247, 255, 0.5);
  animation: mockSettleFill 3.6s ease-in-out infinite;
}
@keyframes mockSettleFill {
  0% { width: 12%; }
  60%, 100% { width: 78%; }
}

@media (max-width: 992px) {
  .showcase-flow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mock-member, .mock-node-a, .mock-node-b, .mock-node-c {
    animation: none !important;
    opacity: 1 !important;
    transform: translate(-50%, -50%) !important;
  }
  .mock-member { transform: none !important; }
  .mock-role-admin, .mock-live-dot, .mock-hub, .mock-node-hub, .mock-wire, .mock-wire-2, .mock-wire-3 { animation: none !important; }
  .flow-wire, .flow-active { animation: none !important; }
  .flow-pulse { display: none; }
  .showcase-tab.active .showcase-tab-icon::after { animation: none !important; opacity: 0 !important; }
  .mock-settle-fill, .mock-card-chip, .mock-card::after { animation: none !important; }
}

/* =============================================================================
   Landing page — white-theme layer (PREMIUM / glass + gradient translation).
   -----------------------------------------------------------------------------
   LandingPage.css is a ~4500-line bespoke *dark* page: a global
   `* { color: white }` default, neon-cyan (#00f7ff) accents, an animated
   gradient mesh, a starfield, and translucent "glass" cards with cyan glow.

   The goal here is NOT a flat white page — it's to carry the dark theme's
   *atmosphere* to the light side: a soft colored gradient-mesh canvas, frosted
   glassmorphism cards, teal/violet glows, gradient headings & CTAs. Everything
   is gated on html[data-theme='light'] and scoped to .landing-page, so dark
   mode is 100% untouched. Imported after LandingPage.css so it wins.
   ============================================================================= */

html[data-theme='light'] .landing-page {
  /* page-local palette */
  --lp-accent: #0c7a8f;          /* readable deep teal (neon-cyan replacement) */
  --lp-accent-2: #2f9ec2;
  --lp-violet: #7c5cf0;
  --lp-text: #1b2530;
  --lp-text-2: #51606e;
  --lp-text-3: #7c8794;
  --lp-border: rgba(255, 255, 255, 0.85);   /* bright glass edge */
  --lp-glass: linear-gradient(150deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.5) 100%);
  --lp-glow: 0 18px 50px rgba(47, 158, 194, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --lp-glow-hover: 0 24px 70px rgba(47, 158, 194, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.95);

  /* cool, faintly tinted base so the mesh + glass have something to sit on */
  background: linear-gradient(180deg, #eef2fb 0%, #e8edf7 45%, #eaf1f6 100%);
  color: var(--lp-text);
}

/* ---- Ambient: a vivid-but-soft colored gradient mesh (mirrors the dark mesh,
        light-side) + keep the noise texture for depth. The white starfield is
        invisible on a light canvas, so damp it. ------------------------------ */
html[data-theme='light'] .landing-page::before {
  background:
    radial-gradient(ellipse 80% 55% at 15% 18%, rgba(47, 158, 194, 0.20) 0%, transparent 55%),
    radial-gradient(ellipse 70% 60% at 85% 22%, rgba(124, 92, 240, 0.15) 0%, transparent 55%),
    radial-gradient(ellipse 65% 70% at 78% 82%, rgba(0, 180, 220, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 70% 55% at 22% 88%, rgba(99, 102, 241, 0.12) 0%, transparent 55%);
}
html[data-theme='light'] .landing-page::after {
  opacity: 0.03;   /* a touch more visible noise grain on the lighter canvas */
}
html[data-theme='light'] .stars,
html[data-theme='light'] .stars::before,
html[data-theme='light'] .stars::after {
  opacity: 0.06;
}

/* ---- Counter `* { color: white }` with a scoped dark default; re-assertions
        below (later in source order, equal specificity) win the ties. ------- */
html[data-theme='light'] .landing-page,
html[data-theme='light'] .landing-page * {
  color: var(--lp-text);
}

html[data-theme='light'] .landing-page .ep-theme-toggle {
  color: var(--ep-accent);
}
html[data-theme='light'] .landing-page .ep-theme-toggle-label {
  color: var(--ep-text);
}

/* Secondary / muted copy — preserve the hierarchy. */
html[data-theme='light'] .landing-page .hero-subtitle,
html[data-theme='light'] .landing-page .pricing-tagline,
html[data-theme='light'] .landing-page .contact-tagline,
html[data-theme='light'] .landing-page .stat-label,
html[data-theme='light'] .landing-page .plan-features li,
html[data-theme='light'] .landing-page .pricing-note-modern p,
html[data-theme='light'] .landing-page .about-block-content p,
html[data-theme='light'] .landing-page .demo-block-content p,
html[data-theme='light'] .landing-page .about-feature-list li,
html[data-theme='light'] .landing-page .demo-feature-list li,
html[data-theme='light'] .landing-page .footer-brand p,
html[data-theme='light'] .landing-page .footer-col ul li a,
html[data-theme='light'] .landing-page .footer-bottom p {
  color: var(--lp-text-2);
}
html[data-theme='light'] .landing-page .footer-tag {
  color: var(--lp-accent);
  background: rgba(47, 158, 194, 0.08);
  border-color: rgba(47, 158, 194, 0.2);
}
html[data-theme='light'] .landing-page .footer-col ul li a:hover .footer-tag {
  color: var(--lp-accent);
  background: rgba(47, 158, 194, 0.14);
}

/* ---- Accent text → deep teal. -------------------------------------------- */
html[data-theme='light'] .landing-page .links a:hover,
html[data-theme='light'] .landing-page .hero-cta-secondary:hover,
html[data-theme='light'] .landing-page .feature-included .feature-icon,
html[data-theme='light'] .landing-page .feature-badge,
html[data-theme='light'] .landing-page .contact-card-modern:hover h3,
html[data-theme='light'] .landing-page .about-block-label,
html[data-theme='light'] .landing-page .about-block-subtitle,
html[data-theme='light'] .landing-page .demo-block-label,
html[data-theme='light'] .landing-page .section-title,
html[data-theme='light'] .landing-page .highlight-text,
html[data-theme='light'] .landing-page .about-feature-list li::before,
html[data-theme='light'] .landing-page .demo-feature-list li::before,
html[data-theme='light'] .landing-page .footer-col ul li a:hover {
  color: var(--lp-accent);
}

/* ---- Gradient text: headings, hero badge, big stat numbers (rich teal→violet,
        the light-side echo of the dark white→cyan gradients). --------------- */
html[data-theme='light'] .landing-page .hero-title,
html[data-theme='light'] .landing-page .pricing-main-title,
html[data-theme='light'] .landing-page .contact-main-title,
html[data-theme='light'] .landing-page .about-main-title,
html[data-theme='light'] .landing-page .demo-main-title,
html[data-theme='light'] .landing-page .section-title,
html[data-theme='light'] .landing-page .logo,
html[data-theme='light'] .landing-page .logo b,
html[data-theme='light'] .landing-page .footer-logo,
html[data-theme='light'] .landing-page .footer-logo b,
html[data-theme='light'] .landing-page .stat-number,
html[data-theme='light'] .landing-page .price-amount {
  background: linear-gradient(120deg, #103a52 0%, var(--lp-accent) 42%, var(--lp-violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* The hero badge becomes a frosted accent chip with a soft ring. */
html[data-theme='light'] .landing-page .hero-badge {
  background: linear-gradient(135deg, rgba(47, 158, 194, 0.16) 0%, rgba(124, 92, 240, 0.12) 100%);
  border: 1px solid rgba(47, 158, 194, 0.30);
  color: var(--lp-accent);
  box-shadow: 0 6px 20px rgba(47, 158, 194, 0.16);
}

/* Split-flap board tiles → frosted light panel with deep-teal lettering. */
html[data-theme='light'] .landing-page .flap-face {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.65) 55%, rgba(16, 58, 82, 0.06) 100%),
              #f4f9fb;
  border-color: rgba(47, 158, 194, 0.35);
  box-shadow: inset 0 0 8px rgba(16, 58, 82, 0.1);
  color: var(--lp-accent);
  -webkit-text-fill-color: var(--lp-accent);
}
html[data-theme='light'] .landing-page .flap-face::after {
  background: rgba(16, 58, 82, 0.22);
}
html[data-theme='light'] .landing-page .flap-icon-dark {
  display: none;
}
html[data-theme='light'] .landing-page .flap-icon-light {
  display: inline-block;
  filter: drop-shadow(0 0 4px rgba(47, 158, 194, 0.35));
}

/* =============================================================================
   Premium redesign — shared section primitives + About "Why ExamPedite" grid.
   ============================================================================= */
html[data-theme='light'] .landing-page .section-eyebrow {
  color: var(--lp-accent);
}
html[data-theme='light'] .landing-page .section-eyebrow::before {
  background: linear-gradient(90deg, transparent, var(--lp-accent-2));
}
html[data-theme='light'] .landing-page .section-intro {
  color: var(--lp-text-2);
}

html[data-theme='light'] .landing-page .about-card {
  background: var(--lp-glass);
  border: 1px solid var(--lp-border);
  box-shadow: var(--lp-glow);
}
html[data-theme='light'] .landing-page .about-card:hover {
  border-color: rgba(47, 158, 194, 0.45);
  box-shadow: var(--lp-glow-hover);
}
html[data-theme='light'] .landing-page .about-card::after {
  background: conic-gradient(from 0deg, transparent 0%, rgba(47, 158, 194, 0.16) 16%, rgba(124, 92, 240, 0.14) 30%, transparent 46%, transparent 100%);
}
html[data-theme='light'] .landing-page .about-card-icon {
  background: linear-gradient(135deg, rgba(47, 158, 194, 0.16) 0%, rgba(124, 92, 240, 0.12) 100%);
  border: 1px solid rgba(47, 158, 194, 0.28);
}
html[data-theme='light'] .landing-page .about-card-title {
  color: var(--lp-text);
}
html[data-theme='light'] .landing-page .about-card-text {
  color: var(--lp-text-2);
}

/* =============================================================================
   Header — frosted glass bar
   ============================================================================= */
html[data-theme='light'] .landing-page header,
html[data-theme='light'] header {
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 30px rgba(47, 158, 194, 0.07);
}
html[data-theme='light'] header::after {
  background: linear-gradient(90deg, transparent, rgba(47, 158, 194, 0.4), rgba(124, 92, 240, 0.25), transparent);
}
html[data-theme='light'] .landing-page .links a {
  color: var(--lp-text-2);
}
html[data-theme='light'] .landing-page .lang-btn {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--lp-border);
}
html[data-theme='light'] .landing-page .lang-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.9);
}
html[data-theme='light'] .landing-page .lang-btn.active {
  background: linear-gradient(135deg, var(--lp-accent-2) 0%, var(--lp-accent) 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(47, 158, 194, 0.35);
}

/* =============================================================================
   GLASS CARD RECIPE — frosted, gradient-filled, teal-glow. Applied across the
   page's translucent-white cards so they read as glass on the colored mesh
   (instead of the flat white boxes from the first pass).
   ============================================================================= */
html[data-theme='light'] .landing-page .wf-node,
html[data-theme='light'] .landing-page .hero-stats,
html[data-theme='light'] .landing-page .hero-cta-secondary,
html[data-theme='light'] .landing-page .pricing-plan,
html[data-theme='light'] .landing-page .pricing-note-modern,
html[data-theme='light'] .landing-page .contact-card-modern,
html[data-theme='light'] .landing-page .plan-cta,
html[data-theme='light'] .landing-page .footer-social a,
html[data-theme='light'] .landing-page .scroll-to-top {
  background: var(--lp-glass);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--lp-border);
  box-shadow: var(--lp-glow);
  color: var(--lp-text);
}

/* Card hover — lift the teal glow (mirrors the dark cyan-glow hovers). */
html[data-theme='light'] .landing-page .pricing-plan:hover,
html[data-theme='light'] .landing-page .contact-card-modern:hover,
html[data-theme='light'] .landing-page .footer-social a:hover,
html[data-theme='light'] .landing-page .scroll-to-top:hover {
  box-shadow: var(--lp-glow-hover);
  border-color: rgba(47, 158, 194, 0.45);
}

/* Featured pricing plan — a violet-tinted glass + stronger glow. */
html[data-theme='light'] .landing-page .pricing-plan.featured {
  background: linear-gradient(160deg, rgba(124, 92, 240, 0.10) 0%, rgba(47, 158, 194, 0.08) 100%);
  border: 1px solid rgba(124, 92, 240, 0.40);
  box-shadow: 0 24px 70px rgba(124, 92, 240, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
html[data-theme='light'] .landing-page .plan-name,
html[data-theme='light'] .landing-page .contact-card-modern h3 {
  color: var(--lp-text);
}
html[data-theme='light'] .landing-page .feature-included .feature-icon {
  background: rgba(47, 158, 194, 0.18);
}
html[data-theme='light'] .landing-page .stat-divider {
  background: linear-gradient(180deg, transparent, rgba(47, 158, 194, 0.35), transparent);
}

/* Contact section backdrop → transparent so the mesh shows through. */
html[data-theme='light'] .landing-page .contact-modern {
  background: transparent;
}

/* Demo section band — the base hard-codes a dark rgba(0,0,0,0.2) overlay (used
   in dark mode to alternate the demo band against about/pricing). On the light
   canvas that just reads as a flat gray. Swap it for a faint frosted-white wash
   so the section still gently "lifts" from its neighbours without graying out,
   and retint its glow radials to the teal/violet palette. */
html[data-theme='light'] .landing-page .demo-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(234, 240, 251, 0.38) 100%);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
html[data-theme='light'] .landing-page .demo-section::before {
  background:
    radial-gradient(ellipse at 80% 20%, rgba(47, 158, 194, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(124, 92, 240, 0.08) 0%, transparent 50%);
}

/* ---- About / Demo blocks --------------------------------------------------
   The OUTER .about-block / .demo-block is only a layout wrapper — keep it
   transparent (as in dark mode). The INNER *-content is the single glass card,
   so we don't get the "gray box inside a gray box" double-container look. The
   card gets a faint teal→violet sheen + a soft glow to feel premium. */
html[data-theme='light'] .landing-page .about-block,
html[data-theme='light'] .landing-page .demo-block {
  background: transparent;
  border: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html[data-theme='light'] .landing-page .about-block-content,
html[data-theme='light'] .landing-page .demo-block-content {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.86) 0%, rgba(243, 247, 253, 0.62) 55%, rgba(124, 92, 240, 0.07) 130%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 20px 55px rgba(47, 158, 194, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

html[data-theme='light'] .landing-page .about-block:hover .about-block-content,
html[data-theme='light'] .landing-page .demo-block:hover .demo-block-content {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.93) 0%, rgba(239, 244, 252, 0.72) 55%, rgba(124, 92, 240, 0.10) 130%);
  border-color: rgba(47, 158, 194, 0.40);
  box-shadow:
    0 28px 75px rgba(47, 158, 194, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

/* Center-block icon halo + large side-visual tile → teal/violet gradient. */
html[data-theme='light'] .landing-page .about-icon-wrapper {
  background: linear-gradient(135deg, rgba(47, 158, 194, 0.22) 0%, rgba(124, 92, 240, 0.10) 100%);
  border: 2px solid rgba(47, 158, 194, 0.35);
}
html[data-theme='light'] .landing-page .feature-icon-large {
  background: linear-gradient(135deg, rgba(47, 158, 194, 0.16) 0%, rgba(124, 92, 240, 0.06) 100%);
  border: 2px solid rgba(47, 158, 194, 0.30);
  box-shadow:
    0 20px 60px rgba(47, 158, 194, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
html[data-theme='light'] .landing-page .about-block:hover .feature-icon-large {
  border-color: rgba(47, 158, 194, 0.55);
  box-shadow:
    0 25px 80px rgba(47, 158, 194, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

/* Preview image frame. */
html[data-theme='light'] .landing-page .demo-preview-image {
  border: 1px solid var(--lp-border);
  box-shadow: 0 28px 70px rgba(47, 158, 194, 0.16);
}

/* Outline action buttons (about/demo) — gradient tint + glow on hover. */
html[data-theme='light'] .landing-page .about-demo-btn,
html[data-theme='light'] .landing-page .demo-explore-btn {
  background: linear-gradient(135deg, rgba(47, 158, 194, 0.10) 0%, rgba(124, 92, 240, 0.06) 100%);
  border: 1px solid rgba(47, 158, 194, 0.35);
  color: var(--lp-accent);
}
html[data-theme='light'] .landing-page .about-demo-btn:hover,
html[data-theme='light'] .landing-page .demo-explore-btn:hover {
  background: linear-gradient(135deg, rgba(47, 158, 194, 0.18) 0%, rgba(124, 92, 240, 0.12) 100%);
  box-shadow: 0 10px 28px rgba(47, 158, 194, 0.22);
}

/* =============================================================================
   Gradient CTAs — solid, vivid, glowing (the dark theme's cyan-gradient buttons,
   light-side). White label on a teal→blue (or violet for primary) fill.
   ============================================================================= */
html[data-theme='light'] .landing-page .hero-cta-primary,
html[data-theme='light'] .landing-page .plan-cta.primary,
html[data-theme='light'] .landing-page .header-login-btn {
  background: linear-gradient(135deg, var(--lp-accent-2) 0%, #1f7fb0 55%, var(--lp-violet) 130%);
  color: #ffffff;
  border: none;
  box-shadow: 0 10px 30px rgba(47, 158, 194, 0.35);
}
html[data-theme='light'] .landing-page .hero-cta-primary:hover,
html[data-theme='light'] .landing-page .plan-cta.primary:hover,
html[data-theme='light'] .landing-page .header-login-btn:hover {
  box-shadow: 0 14px 40px rgba(47, 158, 194, 0.45), 0 6px 20px rgba(124, 92, 240, 0.25);
}

/* =============================================================================
   Trust strip / footer — frosted bands
   ============================================================================= */
html[data-theme='light'] .landing-page .trust-strip {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.25) 100%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--lp-border);
  border-bottom: 1px solid var(--lp-border);
}
html[data-theme='light'] .landing-page .landing-footer {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(232, 237, 247, 0.85) 100%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--lp-border);
}
html[data-theme='light'] .landing-page .footer-col h4 {
  color: var(--lp-text);
}
html[data-theme='light'] .landing-page .footer-bottom {
  border-top: 1px solid var(--lp-border);
}

/* Scroll-to-top glyph stays accent. */
html[data-theme='light'] .scroll-to-top svg,
html[data-theme='light'] .landing-page .scroll-to-top {
  color: var(--lp-accent);
}
html[data-theme='light'] .landing-page .scroll-to-top {
  border: 1px solid rgba(47, 158, 194, 0.40);
}

/* Page scrollbar — keep the teal→violet gradient thumb, lighten the track. */
html[data-theme='light'] html::-webkit-scrollbar-track {
  background: #e3e8f1;
}
html[data-theme='light'] html::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #2f9ec2, #7c5cf0);
}

/* =============================================================================
   White-on-coloured-fill labels that MUST stay white (saturated brand fills).
   ============================================================================= */
html[data-theme='light'] .landing-page .plan-badge,
html[data-theme='light'] .landing-page .whatsapp-btn,
html[data-theme='light'] .landing-page .instagram-btn {
  color: #ffffff;
}

/* Toggle layout in the header. */
.landing-page .landing-theme-toggle {
  flex-shrink: 0;
}

/* =============================================================================
   Hero workflow orchestrator — light-side palette. The dark version leans on
   neon cyan over a near-black core; here we retint the pipeline, packets, core
   and node highlights to the teal/violet glass language used across the page.
   ============================================================================= */

/* Conveyor ring + spokes → teal so they read on the light mesh. */
html[data-theme='light'] .landing-page .wf-track {
  stroke: rgba(47, 158, 194, 0.18);
}
html[data-theme='light'] .landing-page .wf-flow {
  stroke: var(--lp-accent-2);
  filter: drop-shadow(0 0 5px rgba(47, 158, 194, 0.4));
}
html[data-theme='light'] .landing-page .wf-spoke {
  stroke: rgba(47, 158, 194, 0.28);
}

/* Travelling data packets. */
html[data-theme='light'] .landing-page .wf-packet {
  background: var(--lp-accent-2);
  box-shadow: 0 0 10px 2px rgba(47, 158, 194, 0.55);
}

/* Central AI engine — frosted white core with a teal glow halo. */
html[data-theme='light'] .landing-page .wf-core::before {
  background: radial-gradient(circle, rgba(47, 158, 194, 0.22) 0%, transparent 65%);
}
html[data-theme='light'] .landing-page .wf-core-ring {
  border-color: rgba(47, 158, 194, 0.4);
}
html[data-theme='light'] .landing-page .wf-core-ring-2 {
  border-color: rgba(124, 92, 240, 0.4);
}
html[data-theme='light'] .landing-page .wf-core-face {
  background: radial-gradient(circle at 50% 32%, rgba(47, 158, 194, 0.18) 0%, rgba(255, 255, 255, 0.92) 72%);
  border: 1px solid rgba(47, 158, 194, 0.4);
  box-shadow: inset 0 0 26px rgba(47, 158, 194, 0.16), 0 0 34px rgba(47, 158, 194, 0.18);
}
html[data-theme='light'] .landing-page .wf-core-spark {
  color: var(--lp-accent);
  filter: drop-shadow(0 0 8px rgba(47, 158, 194, 0.55));
}
html[data-theme='light'] .landing-page .wf-core-title {
  color: var(--lp-text);
}
html[data-theme='light'] .landing-page .wf-core-sub {
  color: var(--lp-accent);
}

/* Stage node chrome. */
html[data-theme='light'] .landing-page .wf-node-icon {
  background: rgba(47, 158, 194, 0.1);
  border: 1px solid rgba(47, 158, 194, 0.18);
}
html[data-theme='light'] .landing-page .wf-node-label {
  color: var(--lp-text);
}
html[data-theme='light'] .landing-page .wf-node-step {
  color: #ffffff;
  background: linear-gradient(135deg, var(--lp-accent-2) 0%, var(--lp-accent) 100%);
  box-shadow: 0 4px 12px rgba(47, 158, 194, 0.4);
}

/* Re-point the node's sequential highlight to a light-glass keyframe (delays
   and timing stay inherited from the base .wf-node rule). */
html[data-theme='light'] .landing-page .wf-node {
  animation-name: wfNodePulseLight;
}

@keyframes wfNodePulseLight {
  0%, 30%, 100% {
    transform: translate(-50%, -50%) scale(1);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.5) 100%);
    border-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 18px 50px rgba(47, 158, 194, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  }
  8%, 20% {
    transform: translate(-50%, -50%) scale(1.07);
    background: linear-gradient(150deg, rgba(47, 158, 194, 0.22) 0%, rgba(124, 92, 240, 0.16) 100%);
    border-color: rgba(47, 158, 194, 0.55);
    box-shadow: 0 22px 60px rgba(47, 158, 194, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  }
}

/* =============================================================================
   Phase 2 light overrides — numbered label, feature chips, section headers
   ============================================================================= */
html[data-theme='light'] .landing-page .demo-block-number {
  color: var(--lp-accent);
  opacity: 0.75;
}

html[data-theme='light'] .landing-page .demo-chip {
  background: linear-gradient(135deg, rgba(47, 158, 194, 0.10) 0%, rgba(124, 92, 240, 0.07) 100%);
  border: 1px solid rgba(47, 158, 194, 0.28);
  color: var(--lp-accent);
}
html[data-theme='light'] .landing-page .demo-chip:hover {
  background: linear-gradient(135deg, rgba(47, 158, 194, 0.18) 0%, rgba(124, 92, 240, 0.12) 100%);
  border-color: rgba(47, 158, 194, 0.48);
  color: var(--lp-accent);
}

/* Demo + Pricing + Contact section headers reuse .about-header — already
   handled by the existing .section-eyebrow / .section-title / .section-intro
   light overrides above. No additional rules needed here. */

/* Footer hairline in light theme */
html[data-theme='light'] .landing-page .landing-footer::before {
  background: linear-gradient(90deg, transparent, rgba(47, 158, 194, 0.35), rgba(124, 92, 240, 0.22), transparent);
}

/* =============================================================================
   Phase 3 light overrides — glass modals
   ============================================================================= */
html[data-theme='light'] .landing-page .demo-modal,
html[data-theme='light'] .landing-page .pricing-modal-wrapper {
  background: rgba(180, 195, 220, 0.45);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

html[data-theme='light'] .landing-page .modal-glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95) 0%, rgba(241, 246, 253, 0.92) 100%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 40px 110px rgba(47, 158, 194, 0.18),
    0 0 60px rgba(124, 92, 240, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  color: var(--lp-text);
}

/* Demo modal header in light */
html[data-theme='light'] .landing-page .demo-modal-header {
  border-bottom: 1px solid rgba(47, 158, 194, 0.15);
}
html[data-theme='light'] .landing-page .demo-modal-header h2 {
  background: linear-gradient(120deg, #103a52 0%, var(--lp-accent) 42%, var(--lp-violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Close / dismiss buttons */
html[data-theme='light'] .landing-page .demo-modal-content .close-modal,
html[data-theme='light'] .landing-page .modal-inner .modal-close-btn {
  background: linear-gradient(135deg, rgba(47, 158, 194, 0.10) 0%, rgba(124, 92, 240, 0.07) 100%);
  border: 1px solid rgba(47, 158, 194, 0.28);
  color: var(--lp-text-2);
}
html[data-theme='light'] .landing-page .demo-modal-content .close-modal:hover,
html[data-theme='light'] .landing-page .modal-inner .modal-close-btn:hover {
  background: linear-gradient(135deg, rgba(47, 158, 194, 0.18) 0%, rgba(124, 92, 240, 0.12) 100%);
  border-color: rgba(47, 158, 194, 0.48);
  color: var(--lp-text);
}

/* Modal body text */
html[data-theme='light'] .landing-page .demo-modal-body .main-description,
html[data-theme='light'] .landing-page .demo-modal-body .feature-text {
  color: var(--lp-text-2);
}
html[data-theme='light'] .landing-page .demo-modal-body .feature-section h3 {
  color: var(--lp-text);
}
html[data-theme='light'] .landing-page .demo-modal-body .additional-notes {
  background: linear-gradient(135deg, rgba(47, 158, 194, 0.08) 0%, rgba(124, 92, 240, 0.05) 100%);
  border: 1px solid rgba(47, 158, 194, 0.22);
}
html[data-theme='light'] .landing-page .demo-modal-body .additional-notes p {
  color: var(--lp-text-2);
}

/* Pricing comparison table in light modal — redesigned */
html[data-theme='light'] .landing-page .modal-inner .comparison-table {
  border: 1px solid rgba(47, 158, 194, 0.16);
  box-shadow: 0 24px 70px rgba(47, 158, 194, 0.12);
  background: rgba(255, 255, 255, 0.6);
}
html[data-theme='light'] .landing-page .modal-inner .comparison-table td,
html[data-theme='light'] .landing-page .modal-inner .comparison-table th {
  border-bottom: 1px solid rgba(16, 58, 82, 0.08) !important;
  color: var(--lp-text-2) !important;
}
html[data-theme='light'] .landing-page .modal-inner .comparison-table td:first-child,
html[data-theme='light'] .landing-page .modal-inner .comparison-table th:first-child {
  border-right: 1px solid rgba(16, 58, 82, 0.1) !important;
}
html[data-theme='light'] .landing-page .modal-inner .comparison-table tbody tr:last-child td { border-bottom: none !important; }

/* Pricing modal scrollbar — light theme */
html[data-theme='light'] .landing-page .pricing-modal-wrapper .modal-inner {
  scrollbar-color: rgba(47, 158, 194, 0.45) rgba(16, 58, 82, 0.05);
}
html[data-theme='light'] .landing-page .pricing-modal-wrapper .modal-inner::-webkit-scrollbar-track {
  background: rgba(16, 58, 82, 0.04);
}
html[data-theme='light'] .landing-page .pricing-modal-wrapper .modal-inner::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(47, 158, 194, 0.55), rgba(124, 92, 240, 0.55));
}
html[data-theme='light'] .landing-page .pricing-modal-wrapper .modal-inner::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(47, 158, 194, 0.8), rgba(124, 92, 240, 0.8));
}
html[data-theme='light'] .landing-page .modal-inner .comparison-table thead th {
  background: linear-gradient(160deg, #ffffff 0%, #eef5fb 100%) !important;
  color: var(--lp-text) !important;
  border-bottom: 1px solid rgba(47, 158, 194, 0.25) !important;
}
html[data-theme='light'] .landing-page .modal-inner .comparison-table thead th:last-child {
  background: linear-gradient(160deg, rgba(47, 158, 194, 0.16) 0%, rgba(124, 92, 240, 0.14) 100%) !important;
  color: var(--lp-text) !important;
}
html[data-theme='light'] .landing-page .modal-inner .comparison-table tbody tr:not(.table-light) td:last-child {
  background: linear-gradient(180deg, rgba(47, 158, 194, 0.06), rgba(124, 92, 240, 0.05)) !important;
  border-left: 1px solid rgba(47, 158, 194, 0.16) !important;
  border-right: 1px solid rgba(47, 158, 194, 0.16) !important;
}
html[data-theme='light'] .landing-page .modal-inner .comparison-table .text-black {
  color: var(--lp-text) !important;
}
html[data-theme='light'] .landing-page .modal-inner .comparison-table .text-muted {
  color: var(--lp-text-3) !important;
}
html[data-theme='light'] .landing-page .modal-inner .comparison-table .category-header {
  background: linear-gradient(90deg, rgba(47, 158, 194, 0.12), rgba(124, 92, 240, 0.05)) !important;
  color: var(--lp-text) !important;
  border-top: 1px solid rgba(47, 158, 194, 0.2) !important;
  border-bottom: 1px solid rgba(47, 158, 194, 0.2) !important;
}
html[data-theme='light'] .landing-page .modal-inner .comparison-table tbody tr:nth-child(even):not(.table-light) { background: transparent !important; }
html[data-theme='light'] .landing-page .modal-inner .comparison-table tbody tr:not(.table-light):hover td { background: rgba(47, 158, 194, 0.06) !important; }
html[data-theme='light'] .landing-page .modal-inner .comparison-table tbody tr:not(.table-light):hover td:last-child {
  background: linear-gradient(180deg, rgba(47, 158, 194, 0.13), rgba(124, 92, 240, 0.1)) !important;
}
html[data-theme='light'] .landing-page .modal-inner .table-light { --bs-table-bg: transparent; }
html[data-theme='light'] .landing-page .modal-inner .comparison-table .fa-check,
html[data-theme='light'] .landing-page .modal-inner .comparison-table .text-success {
  color: #1f9d5b !important;
  filter: drop-shadow(0 0 5px rgba(31, 157, 91, 0.3));
}
html[data-theme='light'] .landing-page .modal-inner .comparison-table .fa-times,
html[data-theme='light'] .landing-page .modal-inner .comparison-table .text-danger {
  color: rgba(16, 58, 82, 0.25) !important;
}

/* Quota pricing cards in light modal */
html[data-theme='light'] .landing-page .quota-pricing-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.80) 0%, rgba(234, 241, 252, 0.70) 100%);
  border: 1px solid rgba(47, 158, 194, 0.22);
}
html[data-theme='light'] .landing-page .quota-pricing-card:hover {
  border-color: rgba(47, 158, 194, 0.42);
  box-shadow: 0 8px 28px rgba(47, 158, 194, 0.14);
}
html[data-theme='light'] .landing-page .quota-card-header h3 { color: var(--lp-text); }
html[data-theme='light'] .landing-page .price-tag,
html[data-theme='light'] .landing-page .mode-price { color: var(--lp-accent) !important; }
html[data-theme='light'] .landing-page .mode-label { color: var(--lp-text-3) !important; }
html[data-theme='light'] .landing-page .pricing-modal-header h2 {
  background: linear-gradient(120deg, #103a52 0%, var(--lp-accent) 50%, var(--lp-violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--lp-text);
}
html[data-theme='light'] .landing-page .pricing-modal-header p { color: var(--lp-text-2) !important; }

/* =============================================================================
   PRODUCT SHOWCASE REDESIGN — light theme
   ============================================================================= */
html[data-theme='light'] .landing-page .product-card {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.92) 0%, rgba(240, 247, 252, 0.86) 100%);
  border: 1px solid var(--lp-border);
  box-shadow: 0 10px 40px rgba(47, 158, 194, 0.07);
}
html[data-theme='light'] .landing-page .product-card::before {
  background: conic-gradient(from 180deg, transparent 0deg, rgba(47, 158, 194, 0.55) 90deg, rgba(124, 92, 240, 0.5) 180deg, transparent 300deg);
}
html[data-theme='light'] .landing-page .product-card:hover {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.97) 0%, rgba(236, 245, 251, 0.92) 100%);
  border-color: rgba(47, 158, 194, 0.4);
  box-shadow: 0 28px 70px rgba(47, 158, 194, 0.16);
}
html[data-theme='light'] .landing-page .product-number { color: var(--lp-accent); opacity: 0.75; }
html[data-theme='light'] .landing-page .product-role {
  color: var(--lp-accent);
  background: rgba(47, 158, 194, 0.1);
  border: 1px solid rgba(47, 158, 194, 0.28);
}
html[data-theme='light'] .landing-page .product-icon {
  color: var(--lp-accent);
  background: linear-gradient(135deg, rgba(47, 158, 194, 0.14) 0%, rgba(124, 92, 240, 0.1) 100%);
  border: 1px solid rgba(47, 158, 194, 0.3);
}
html[data-theme='light'] .landing-page .product-card:hover .product-icon {
  box-shadow: 0 10px 30px rgba(47, 158, 194, 0.2);
}
html[data-theme='light'] .landing-page .product-name {
  background: linear-gradient(120deg, #103a52 0%, var(--lp-accent) 45%, var(--lp-violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
html[data-theme='light'] .landing-page .product-subtitle { color: var(--lp-text-3); }
html[data-theme='light'] .landing-page .product-desc { color: var(--lp-text-2); }
html[data-theme='light'] .landing-page .product-explore { color: var(--lp-accent); }

/* Light product modal */
html[data-theme='light'] .landing-page .product-modal-icon {
  color: var(--lp-accent);
  background: linear-gradient(135deg, rgba(47, 158, 194, 0.16) 0%, rgba(124, 92, 240, 0.1) 100%);
  border: 1px solid rgba(47, 158, 194, 0.32);
  box-shadow: 0 10px 30px rgba(47, 158, 194, 0.15);
}
html[data-theme='light'] .landing-page .product-modal-role { color: var(--lp-accent); }
html[data-theme='light'] .landing-page .product-modal-heading h2 {
  background: linear-gradient(120deg, #103a52 0%, var(--lp-accent) 45%, var(--lp-violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
html[data-theme='light'] .landing-page .product-modal-subtitle { color: var(--lp-text-3); }
html[data-theme='light'] .landing-page .product-modal-summary { color: var(--lp-text-2); }
html[data-theme='light'] .landing-page .product-modal-label { color: var(--lp-text-3); }
html[data-theme='light'] .landing-page .product-feature-list li { color: var(--lp-text); }
html[data-theme='light'] .landing-page .product-feature-list li svg { color: var(--lp-accent); }
html[data-theme='light'] .landing-page .product-highlight {
  color: var(--lp-text);
  background: linear-gradient(135deg, rgba(47, 158, 194, 0.1) 0%, rgba(124, 92, 240, 0.07) 100%);
  border: 1px solid rgba(47, 158, 194, 0.26);
}
html[data-theme='light'] .landing-page .product-modal-actions {
  border-top: 1px solid rgba(47, 158, 194, 0.16);
}
html[data-theme='light'] .landing-page .product-modal-cta {
  color: #ffffff;
  background: linear-gradient(120deg, var(--lp-accent) 0%, #1f7fb0 45%, var(--lp-violet) 100%);
  box-shadow: 0 10px 30px rgba(47, 158, 194, 0.25);
}
html[data-theme='light'] .landing-page .product-modal-cta:hover {
  box-shadow: 0 14px 40px rgba(47, 158, 194, 0.35);
}
html[data-theme='light'] .landing-page .product-modal-dismiss {
  color: var(--lp-text-2);
  background: rgba(47, 158, 194, 0.06);
  border: 1px solid rgba(47, 158, 194, 0.22);
}
html[data-theme='light'] .landing-page .product-modal-dismiss:hover {
  background: rgba(47, 158, 194, 0.12);
  border-color: rgba(47, 158, 194, 0.4);
  color: var(--lp-text);
}

/* =============================================================================
   AUTO-WORKFLOW SHOWCASE — light theme
   ============================================================================= */
html[data-theme='light'] .landing-page .showcase-tab {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--lp-border);
  color: var(--lp-text-2);
}
html[data-theme='light'] .landing-page .showcase-tab:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(47, 158, 194, 0.3);
}
html[data-theme='light'] .landing-page .showcase-tab.active {
  background: linear-gradient(135deg, rgba(47, 158, 194, 0.12) 0%, rgba(124, 92, 240, 0.08) 100%);
  border-color: rgba(47, 158, 194, 0.38);
  color: var(--lp-text);
  box-shadow: 0 16px 40px rgba(47, 158, 194, 0.12);
}
html[data-theme='light'] .landing-page .showcase-tab-icon {
  color: rgba(12, 122, 143, 0.7);
  background: rgba(47, 158, 194, 0.07);
  border: 1px solid rgba(47, 158, 194, 0.16);
}
html[data-theme='light'] .landing-page .showcase-tab:hover .showcase-tab-icon { color: var(--lp-accent); border-color: rgba(47, 158, 194, 0.3); }
html[data-theme='light'] .landing-page .showcase-tab.active .showcase-tab-icon {
  color: var(--lp-accent);
  background: linear-gradient(135deg, rgba(47, 158, 194, 0.18) 0%, rgba(124, 92, 240, 0.12) 100%);
  border-color: rgba(47, 158, 194, 0.36);
  box-shadow: 0 8px 24px rgba(47, 158, 194, 0.18);
}
html[data-theme='light'] .landing-page .showcase-tab-role { color: var(--lp-text-3); }
html[data-theme='light'] .landing-page .showcase-progress { background: rgba(47, 158, 194, 0.12); }
html[data-theme='light'] .landing-page .showcase-progress-fill { background: linear-gradient(90deg, var(--lp-accent), var(--lp-violet)); }

html[data-theme='light'] .landing-page .showcase-panel {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 247, 252, 0.82) 100%);
  border: 1px solid var(--lp-border);
  box-shadow: 0 28px 70px rgba(47, 158, 194, 0.12);
}
html[data-theme='light'] .landing-page .showcase-stage::before {
  background: radial-gradient(circle, rgba(47, 158, 194, 0.18) 0%, rgba(124, 92, 240, 0.1) 45%, transparent 70%);
  opacity: 0.6;
}
html[data-theme='light'] .landing-page .showcase-progress-fill { box-shadow: 0 0 10px rgba(47, 158, 194, 0.4); }
html[data-theme='light'] .landing-page .showcase-desc { color: var(--lp-text); }

/* Auto-workflow orchestration wires — light theme (higher-contrast) */
html[data-theme='light'] .landing-page .flow-wire { stroke: rgba(16, 58, 82, 0.12); }
html[data-theme='light'] .landing-page .flow-pulse { fill: var(--lp-accent); }
html[data-theme='light'] .landing-page .showcase-tab.active .showcase-tab-icon::after { border-color: rgba(47, 158, 194, 0.55); }

/* Monetization mock — light theme */
html[data-theme='light'] .landing-page .mock-settle {
  background: rgba(47, 158, 194, 0.05);
  border: 1px solid rgba(16, 58, 82, 0.1);
}
html[data-theme='light'] .landing-page .mock-settle-label { color: var(--lp-text-2); }
html[data-theme='light'] .landing-page .mock-settle-track { background: rgba(16, 58, 82, 0.1); }
html[data-theme='light'] .landing-page .mock-settle-days {
  color: var(--lp-accent);
  background: rgba(47, 158, 194, 0.1);
  border: 1px solid rgba(47, 158, 194, 0.3);
}
html[data-theme='light'] .landing-page .mock-card-name i { background: rgba(255, 255, 255, 0.55); }

/* Light mocks — bright app surfaces */
html[data-theme='light'] .landing-page .mock {
  background: linear-gradient(160deg, #ffffff 0%, #f3f8fc 100%);
  border: 1px solid rgba(16, 58, 82, 0.1);
  box-shadow: 0 20px 50px rgba(47, 158, 194, 0.15);
}
html[data-theme='light'] .landing-page .mock-bar {
  background: rgba(47, 158, 194, 0.04);
  border-bottom: 1px solid rgba(16, 58, 82, 0.08);
}
html[data-theme='light'] .landing-page .mock-bar-title { color: var(--lp-text-2); }
html[data-theme='light'] .landing-page .mock-q { color: var(--lp-text-2); }
html[data-theme='light'] .landing-page .mock-pill { color: var(--lp-accent); background: rgba(47, 158, 194, 0.1); border-color: rgba(47, 158, 194, 0.28); }
html[data-theme='light'] .landing-page .mock-pill-grade { color: #1f9d5b; background: rgba(31, 157, 91, 0.12); border-color: rgba(31, 157, 91, 0.3); }
html[data-theme='light'] .landing-page .mock-lines i { background: rgba(16, 58, 82, 0.1); }
html[data-theme='light'] .landing-page .mock-layer { background: rgba(16, 58, 82, 0.03); border-color: rgba(16, 58, 82, 0.07); }
html[data-theme='light'] .landing-page .mock-layer-gen { background: rgba(47, 158, 194, 0.07); border-color: rgba(47, 158, 194, 0.28); }
html[data-theme='light'] .landing-page .mock-tag { color: var(--lp-accent); background: rgba(47, 158, 194, 0.12); }
html[data-theme='light'] .landing-page .mock-gen { color: var(--lp-accent); }
html[data-theme='light'] .landing-page .mock-gen::after { background: linear-gradient(90deg, transparent, rgba(47, 158, 194, 0.25), transparent); }
html[data-theme='light'] .landing-page .mock-spark { background: radial-gradient(circle, var(--lp-accent) 0%, rgba(47, 158, 194, 0) 70%); }
html[data-theme='light'] .landing-page .mock-paper { background: rgba(16, 58, 82, 0.03); border-color: rgba(16, 58, 82, 0.07); }
html[data-theme='light'] .landing-page .mock-field { background: rgba(47, 158, 194, 0.05); border-color: rgba(47, 158, 194, 0.35); }
html[data-theme='light'] .landing-page .mock-caret { background: var(--lp-accent); }
html[data-theme='light'] .landing-page .mock-tutor { background: rgba(47, 158, 194, 0.06); border-color: rgba(47, 158, 194, 0.2); }
html[data-theme='light'] .landing-page .mock-mode { color: var(--lp-accent); background: rgba(47, 158, 194, 0.12); }
html[data-theme='light'] .landing-page .mock-bubble { color: var(--lp-text); }
html[data-theme='light'] .landing-page .mock-ai { background: rgba(16, 58, 82, 0.06); }
html[data-theme='light'] .landing-page .mock-user { background: linear-gradient(135deg, rgba(47, 158, 194, 0.2), rgba(124, 92, 240, 0.14)); }
html[data-theme='light'] .landing-page .mock-typing i { background: var(--lp-accent); }
html[data-theme='light'] .landing-page .mock-hl { background: rgba(47, 158, 194, 0.22) !important; }
html[data-theme='light'] .landing-page .mock-hl-2 { background: rgba(124, 92, 240, 0.22) !important; }
html[data-theme='light'] .landing-page .mock-ring-bg { stroke: rgba(16, 58, 82, 0.1); }
html[data-theme='light'] .landing-page .mock-ring-fill { stroke: var(--lp-accent); filter: drop-shadow(0 0 4px rgba(47, 158, 194, 0.4)); }
html[data-theme='light'] .landing-page .mock-ring-score { color: var(--lp-text); }
html[data-theme='light'] .landing-page .mock-ring-score small { color: var(--lp-text-3); }
html[data-theme='light'] .landing-page .mock-stream i { background: rgba(16, 58, 82, 0.12); }
html[data-theme='light'] .landing-page .mock-followups span { color: var(--lp-accent); background: rgba(47, 158, 194, 0.08); border-color: rgba(47, 158, 194, 0.24); }

/* Group Manager mock — light */
html[data-theme='light'] .landing-page .mock-member { background: rgba(16, 58, 82, 0.03); border-color: rgba(16, 58, 82, 0.07); }
html[data-theme='light'] .landing-page .mock-avatar { color: #fff; background: linear-gradient(135deg, var(--lp-accent-2), var(--lp-accent)); }
html[data-theme='light'] .landing-page .mock-avatar-2 { background: linear-gradient(135deg, var(--lp-violet), #a07cf5); color: #fff; }
html[data-theme='light'] .landing-page .mock-avatar-3 { background: linear-gradient(135deg, var(--lp-accent), var(--lp-accent-2)); color: #fff; }
html[data-theme='light'] .landing-page .mock-member-info i { background: rgba(16, 58, 82, 0.1); }
html[data-theme='light'] .landing-page .mock-role-admin { color: var(--lp-accent); background: rgba(47, 158, 194, 0.12); border: 1px solid rgba(47, 158, 194, 0.3); }
html[data-theme='light'] .landing-page .mock-role-editor { color: var(--lp-violet); background: rgba(124, 92, 240, 0.12); border: 1px solid rgba(124, 92, 240, 0.3); }
html[data-theme='light'] .landing-page .mock-role-viewer { color: var(--lp-text-3); background: rgba(16, 58, 82, 0.05); border: 1px solid rgba(16, 58, 82, 0.12); }
html[data-theme='light'] .landing-page .mock-role-admin { animation: mockBadgePulseLight 2.4s ease-in-out infinite; }
@keyframes mockBadgePulseLight {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47, 158, 194, 0); }
  50% { box-shadow: 0 0 0 4px rgba(47, 158, 194, 0.14); }
}

/* MCP Server mock — light */
html[data-theme='light'] .landing-page .mock-live-dot { background: #1f9d5b; }
html[data-theme='light'] .landing-page .mock-wire { stroke: rgba(47, 158, 194, 0.55); }
html[data-theme='light'] .landing-page .mock-wire-2 { stroke: rgba(124, 92, 240, 0.55); }
html[data-theme='light'] .landing-page .mock-wire-3 { stroke: rgba(47, 158, 194, 0.4); }
html[data-theme='light'] .landing-page .mock-node { color: var(--lp-text); background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(16, 58, 82, 0.12); }
html[data-theme='light'] .landing-page .mock-node-hub { color: #fff; background: linear-gradient(135deg, var(--lp-accent-2), var(--lp-violet)); border: none; animation: mockHubPulseLight 2.2s ease-in-out infinite; }
@keyframes mockHubPulseLight {
  0%, 100% { box-shadow: 0 0 18px rgba(47, 158, 194, 0.3); }
  50% { box-shadow: 0 0 34px rgba(124, 92, 240, 0.5); }
}

/* =============================================================================
   FINAL POLISH — light theme
   ============================================================================= */
html[data-theme='light'] .landing-page .scroll-progress-bar {
  background: linear-gradient(90deg, var(--lp-accent) 0%, var(--lp-violet) 100%);
  box-shadow: 0 0 10px rgba(47, 158, 194, 0.4);
}

.ep-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--ep-border);
  background: var(--ep-surface-2);
  color: var(--ep-accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.ep-theme-toggle:hover {
  background: var(--ep-surface-3);
  border-color: var(--ep-accent);
}

.ep-theme-toggle:active {
  transform: scale(0.97);
}

.ep-theme-toggle svg {
  flex-shrink: 0;
}

.ep-theme-toggle-label {
  color: var(--ep-text);
}

/* Compact icon-only variant (e.g. fixed corner button) */
.ep-theme-toggle.icon-only {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}

/* Floating placement used on marketing / auth pages that have no chrome. */
.ep-theme-toggle.floating {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  z-index: 1100;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

html[data-theme='light'] .ep-theme-toggle.floating { color: #000 !important; }
html[data-theme='light'] .ep-theme-toggle.floating svg,
html[data-theme='light'] .ep-theme-toggle.floating svg path,
html[data-theme='light'] .ep-theme-toggle.floating svg circle,
html[data-theme='light'] .ep-theme-toggle.floating svg polyline {
  stroke: #1a1a1a !important;
}

html,
body {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background: #000 repeat top center;
}

/* ============================================
   MODERN SIGNIN PAGE - MATCHING LANDING STYLE
   ============================================ */

/* Animated Background Gradients */
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(0, 247, 255, 0.3); }
  50% { box-shadow: 0 0 50px rgba(0, 247, 255, 0.5), 0 0 80px rgba(0, 247, 255, 0.2); }
}

@keyframes borderGlow {
  0%, 100% { border-color: rgba(0, 247, 255, 0.3); }
  50% { border-color: rgba(0, 247, 255, 0.6); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes move-twink-back {
  from {
    background-position: 0 0;
  }

  to {
    background-position: -10000px 5000px;
  }
}

/* Main Container Styling */
.signin-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* Background Glow Effects */
.signin-container::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(ellipse at 20% 30%, rgba(0, 247, 255, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(0, 247, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(100, 100, 255, 0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  animation: pulse 8s ease-in-out infinite;
}

/* Floating Orbs */
.signin-container::after {
  content: '';
  position: fixed;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 247, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  top: 10%;
  right: -10%;
  animation: float 10s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

/* Form Styling */
#sign-form {
  padding: clamp(10px, 1.8vh, 22px) clamp(16px, 3vw, 30px);
  border-radius: clamp(16px, 2vh, 24px);
  width: 100%;
  max-width: min(450px, 90vw);
  max-height: 95vh;
  overflow-y: auto;
  z-index: 2;
  background: linear-gradient(145deg, rgba(15, 15, 25, 0.9) 0%, rgba(5, 5, 15, 0.95) 100%);
  backdrop-filter: blur(20px);
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 247, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(0, 247, 255, 0.2);
  animation: scaleIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  position: relative;
  overflow: hidden;
}

#sign-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 247, 255, 0.05), transparent);
  animation: shimmer 3s ease-in-out infinite;
  pointer-events: none;
}

#sign-form:hover {
  box-shadow: 
    0 30px 70px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(0, 247, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border-color: rgba(0, 247, 255, 0.35);
}

/* Form Toggle Styling */
.form-toggle-container {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(8px, 1.2vh, 14px);
  background: linear-gradient(145deg, rgba(30, 30, 45, 0.6) 0%, rgba(15, 15, 25, 0.8) 100%);
  border-radius: 50px;
  overflow: hidden;
  border: 1px solid rgba(0, 247, 255, 0.15);
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 4px;
}

.form-toggle {
  padding: clamp(6px, 1vh, 10px) clamp(20px, 3vw, 30px);
  cursor: pointer;
  color: rgba(255, 255, 255, 0.6);
  flex: 1;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-weight: 600;
  font-size: clamp(0.9rem, 1.8vh, 1rem);
  border-radius: 45px;
  position: relative;
  overflow: hidden;
}

.form-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 247, 255, 0.2) 0%, rgba(0, 180, 220, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.form-toggle.active {
  background: linear-gradient(135deg, var(--ep-glow) 0%, var(--ep-glow) 100%);
  box-shadow: 
    0 8px 25px rgba(0, 247, 255, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #000;
  transform: scale(1.02);
}

.form-toggle.active::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.form-toggle:not(.active):hover {
  background: rgba(0, 247, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.form-toggle:not(.active):hover::before {
  opacity: 1;
}

/* Form Fields Styling */
.form-group {
  margin-bottom: clamp(8px, 1.2vh, 12px);
  position: relative;
}

.form-group label {
  margin-bottom: clamp(3px, 0.5vh, 6px);
  display: block;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.85rem, 1.6vh, 0.95rem);
  letter-spacing: 0.3px;
}

.form-control {
  width: 100%;
  padding: clamp(7px, 1vh, 10px) clamp(14px, 2vw, 18px);
  border-radius: clamp(10px, 1.5vh, 12px);
  border: 2px solid #ccc;
  background: white;
  color: var(--ep-elevated) !important;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: clamp(14px, 1.8vh, 16px);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.05),
    0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-control::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.form-control:focus {
  outline: none;
  border-color: var(--ep-glow);
  box-shadow:
    0 0 0 4px rgba(0, 247, 255, 0.15),
    0 0 20px rgba(0, 247, 255, 0.2);
  background: white;
  transform: translateY(-2px);
}

.form-control:hover:not(:focus) {
  border-color: rgba(0, 247, 255, 0.4);
}

/* Google Sign In Button */
.google-signin-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(6px, 1vh, 10px) clamp(16px, 2.5vw, 20px);
  border-radius: 50px;
  background: linear-gradient(145deg, #ffffff 0%, #f0f0f0 100%);
  border: none;
  width: 100%;
  max-width: 420px;
  font-size: clamp(14px, 1.8vh, 16px);
  font-weight: 600;
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  color: #4a5568;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin: 0 auto clamp(8px, 1.2vh, 12px);
  position: relative;
  overflow: hidden;
}

.google-signin-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 247, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.google-signin-button:hover::before {
  left: 100%;
}

.google-signin-button:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 
    0 12px 35px rgba(0, 0, 0, 0.25),
    0 0 20px rgba(0, 247, 255, 0.15);
  background: linear-gradient(145deg, #ffffff 0%, #f8f8f8 100%);
}

.google-signin-button:active {
  transform: translateY(1px) scale(0.98);
}

.google-signin-button svg {
  font-size: 22px;
  margin-right: 10px;
}

/* Or Separator */
.or-separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: clamp(8px, 1.2vh, 12px) 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: clamp(12px, 1.6vh, 14px);
  font-weight: 500;
}

.or-separator::before,
.or-separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 247, 255, 0.3), transparent);
  margin: 0 20px;
}

/* Submit Button Animation */
#submit {
  width: 100%;
  padding: clamp(8px, 1.2vh, 12px);
  border: none;
  background: transparent;
  position: relative;
  cursor: pointer;
  height: clamp(42px, 5.5vh, 54px);
  margin-top: clamp(6px, 1vh, 10px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: clamp(12px, 1.8vh, 16px);
  color: var(--ep-glow); /* drives currentColor for the trophy SVG in dark mode */
}

#submit:hover {
  transform: translateY(-3px);
}

#submit:active {
  transform: translateY(1px);
}

#rectwrap {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  border-radius: 16px;
  overflow: hidden;
}

#rectwrap rect {
  rx: 16;
  ry: 16;
}

.siz {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.siz svg {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 0 10px rgba(0, 247, 255, 0.6));
  transition: filter 0.3s ease;
}

.siz:hover svg {
  filter: drop-shadow(0 0 20px rgba(0, 247, 255, 0.9));
}

/* Loading Animation */
#load {
  position: relative;
  width: 100%;
  height: clamp(42px, 5.5vh, 54px);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: clamp(6px, 1vh, 10px) 0;
  background: linear-gradient(145deg, rgba(0, 247, 255, 0.05) 0%, rgba(0, 180, 220, 0.02) 100%);
  border-radius: clamp(12px, 1.8vh, 16px);
  border: 1px solid rgba(0, 247, 255, 0.2);
}

#load div {
  position: absolute;
  width: 20px;
  height: 36px;
  opacity: 0;
  font-family: Helvetica, Arial, sans-serif;
  animation: move 2s linear infinite;
  transform: rotate(180deg);
  color: var(--ep-glow);
  text-shadow: 0 0 15px rgba(0, 247, 255, 0.9), 0 0 30px rgba(0, 247, 255, 0.5);
}

#load div:nth-child(2) {
  animation-delay: 0.2s;
}

#load div:nth-child(3) {
  animation-delay: 0.4s;
}

#load div:nth-child(4) {
  animation-delay: 0.6s;
}

#load div:nth-child(5) {
  animation-delay: 0.8s;
}

#load div:nth-child(6) {
  animation-delay: 1s;
}

#load div:nth-child(7) {
  animation-delay: 1.2s;
}

@keyframes move {
  0% {
    left: 0;
    opacity: 0;
  }

  35% {
    left: 41%;
    transform: rotate(0deg);
    opacity: 1;
  }

  65% {
    left: 59%;
    transform: rotate(0deg);
    opacity: 1;
  }

  100% {
    left: 100%;
    transform: rotate(-180deg);
    opacity: 0;
  }
}

/* Signup Wheel Animation */
.signup-wheel {
  width: 26px;
  height: 26px;
  color: var(--ep-glow);
  animation: spin 2s linear infinite;
  filter: drop-shadow(0 0 10px rgba(0, 247, 255, 0.7));
}

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

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

/* Social Icons */
.social-icon {
  margin-top: clamp(15px, 2.5vh, 22px);
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: clamp(12px, 2vw, 18px);
}

.social-icon a {
  color: var(--ep-text);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(40px, 5vh, 48px);
  height: clamp(40px, 5vh, 48px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon a:hover {
  transform: translateY(-5px) scale(1.1);
  opacity: 1;
  color: var(--ep-glow);
  background: rgba(0, 247, 255, 0.1);
  border-color: rgba(0, 247, 255, 0.3);
  box-shadow: 0 10px 25px rgba(0, 247, 255, 0.3);
}

.social-icon .fs-1 {
  font-size: 28px !important;
  filter: drop-shadow(0 0 8px rgba(0, 247, 255, 0.5));
}

/* Error and Verification Messages */
.alert {
  border-radius: clamp(10px, 1.5vh, 12px);
  padding: clamp(10px, 1.5vh, 14px) clamp(14px, 2vw, 18px);
  font-weight: 500;
  font-size: clamp(0.85rem, 1.6vh, 0.95rem);
  margin-top: clamp(10px, 1.5vh, 15px);
  animation: slideInUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(10px);
}

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

@media (max-width: 768px) {
  .alert {
    border-radius: 12px;
    padding: 12px 15px;
    font-weight: 500;
    margin: 0 !important;
  }
}

.alert-danger {
  background: linear-gradient(145deg, rgba(220, 53, 69, 0.2) 0%, rgba(180, 30, 50, 0.15) 100%);
  border: 1px solid rgba(220, 53, 69, 0.4);
  color: #ff6b6b;
  box-shadow: 0 8px 25px rgba(220, 53, 69, 0.2);
}

.alert-success {
  background: linear-gradient(145deg, rgba(40, 167, 69, 0.2) 0%, rgba(30, 140, 50, 0.15) 100%);
  border: 1px solid rgba(40, 167, 69, 0.4);
  color: #75e900;
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.2);
}

/* Password Requirements Tooltip */
.alert-link.alert-danger {
  position: absolute;
  z-index: 5;
  width: 290px;
  background: linear-gradient(145deg, rgba(33, 33, 45, 0.98) 0%, rgba(20, 20, 30, 0.98) 100%);
  border: 1px solid rgba(220, 53, 69, 0.4);
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(220, 53, 69, 0.15);
  font-size: 0.85rem !important;
  max-width: 300px;
  border-radius: 12px;
  backdrop-filter: blur(15px);
}

.alert-link.alert-danger ul {
  padding-left: 20px;
  margin-bottom: 0;
}

.alert-link.alert-danger ul li {
  margin: 8px 0;
  transition: color 0.3s ease;
}

.alert-link.alert-danger ul li:hover {
  color: #ff8a8a;
}

/* Consent Form Styling */
.signupin-consent-form {
  background: linear-gradient(145deg, rgba(15, 15, 25, 0.95) 0%, rgba(5, 5, 15, 0.98) 100%);
  backdrop-filter: blur(25px);
  border-radius: clamp(16px, 2vh, 24px);
  padding: clamp(15px, 2.5vh, 28px) clamp(18px, 3vw, 32px);
  width: min(92%, 750px);
  max-height: 95vh;
  overflow-y: auto;
  box-shadow: 
    0 30px 70px rgba(0, 0, 0, 0.5),
    0 0 50px rgba(0, 247, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(0, 247, 255, 0.2);
  animation: scaleIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 2;
  position: relative;
}

.signupin-consent-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--ep-glow), transparent);
  border-radius: 24px 24px 0 0;
}

.signupin-consent-form:hover {
  box-shadow: 
    0 35px 80px rgba(0, 0, 0, 0.6),
    0 0 70px rgba(0, 247, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border-color: rgba(0, 247, 255, 0.35);
}

.signupin-consent-form .alert {
  background-color: transparent;
  border: none;
  padding: 0;
}

.signupin-consent-form ul {
  padding-left: 0;
  list-style-type: none;
}

.signupin-consent-li {
  position: relative;
  padding: clamp(10px, 1.5vh, 16px) clamp(10px, 2vw, 18px) clamp(10px, 1.5vh, 16px) clamp(25px, 4vw, 38px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-left: 3px solid var(--ep-glow);
  background: linear-gradient(145deg, rgba(0, 247, 255, 0.05) 0%, rgba(0, 180, 220, 0.02) 100%);
  border-radius: clamp(10px, 1.5vh, 12px);
  font-size: clamp(0.85rem, 1.7vh, 1.05rem) !important;
  margin: clamp(10px, 1.5vh, 14px) 0;
  box-shadow: 
    0 5px 20px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.signupin-consent-li:hover {
  background: linear-gradient(145deg, rgba(0, 247, 255, 0.1) 0%, rgba(0, 180, 220, 0.05) 100%);
  transform: translateX(5px);
  border-left-color: var(--ep-glow);
  box-shadow:
    0 8px 30px rgba(0, 247, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Premium staggered entrance for the consent points (backwards fill keeps the
   hover translateX intact once the intro finishes). */
.signupin-consent-li {
  animation: consentItemIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.signupin-consent-li:nth-child(1) { animation-delay: 0.16s; }
.signupin-consent-li:nth-child(2) { animation-delay: 0.29s; }
.signupin-consent-li:nth-child(3) { animation-delay: 0.42s; }

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

@media (prefers-reduced-motion: reduce) {
  .signupin-consent-li { animation: none; }
}

/* Modern Consent Button */
.consent-btn {
  background: linear-gradient(135deg, var(--ep-glow) 0%, var(--ep-glow) 100%) !important;
  color: #000 !important;
  padding: clamp(12px, 1.8vh, 16px) clamp(35px, 5vw, 50px) !important;
  border-radius: 50px !important;
  font-size: clamp(1rem, 2vh, 1.2rem) !important;
  font-weight: 700 !important;
  border: none !important;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  box-shadow: 
    0 10px 35px rgba(0, 247, 255, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  position: relative;
  overflow: hidden;
}

.consent-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
}

.consent-btn:hover::before {
  width: 300px;
  height: 300px;
}

.consent-btn:hover {
  transform: translateY(-4px) scale(1.03) !important;
  box-shadow: 
    0 15px 45px rgba(0, 247, 255, 0.5),
    0 0 30px rgba(0, 247, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

.consent-btn:active {
  transform: translateY(1px) scale(0.98) !important;
}

/* Announcement Modal Styling */
.announcement-modal-content {
  background: linear-gradient(145deg, rgba(15, 15, 25, 0.98) 0%, rgba(5, 5, 15, 0.99) 100%) !important;
  backdrop-filter: blur(25px);
  border-radius: 24px;
  border: 1px solid rgba(0, 247, 255, 0.2);
  box-shadow: 
    0 30px 70px rgba(0, 0, 0, 0.5),
    0 0 50px rgba(0, 247, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  max-height: 75vh;
  width: min(95%, 600px);
  overflow-y: auto;
}

.announcement-item {
  margin-bottom: 18px;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(0, 247, 255, 0.15);
  background: linear-gradient(145deg, rgba(30, 30, 45, 0.5) 0%, rgba(15, 15, 25, 0.6) 100%);
}

.announcement-item:hover {
  border-color: rgba(0, 247, 255, 0.3);
  box-shadow: 0 10px 30px rgba(0, 247, 255, 0.1);
  transform: translateY(-2px);
}

.announcement-header {
  padding: 18px;
  background: linear-gradient(145deg, rgba(40, 40, 60, 0.6) 0%, rgba(25, 25, 40, 0.7) 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.4s ease;
}

.announcement-header:hover {
  background: linear-gradient(145deg, rgba(50, 50, 75, 0.7) 0%, rgba(35, 35, 55, 0.8) 100%) !important;
}

.announcement-content {
  padding: 18px;
  background: linear-gradient(145deg, rgba(25, 25, 40, 0.6) 0%, rgba(15, 15, 25, 0.7) 100%);
  border-top: 1px solid rgba(0, 247, 255, 0.1);
}

.announcement-modal-content::-webkit-scrollbar {
  width: 8px;
}

.announcement-modal-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.announcement-modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--ep-glow) 0%, var(--ep-glow) 100%);
  border-radius: 4px;
}

.announcement-modal-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--ep-glow) 0%, #00d4e6 100%);
}

.announcement-modal-content .btn {
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.announcement-modal-content .btn-info {
  background: linear-gradient(135deg, var(--ep-glow) 0%, var(--ep-glow) 100%);
  border: none;
  color: #000;
  font-weight: 700;
  box-shadow: 0 8px 25px rgba(0, 247, 255, 0.3);
}

.announcement-modal-content .btn-info:hover {
  box-shadow: 0 12px 35px rgba(0, 247, 255, 0.4);
}

.announcement-modal-content .btn-secondary {
  background: linear-gradient(145deg, rgba(80, 80, 100, 0.3) 0%, rgba(50, 50, 70, 0.4) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.announcement-modal-content .btn-secondary:hover {
  background: linear-gradient(145deg, rgba(100, 100, 120, 0.4) 0%, rgba(70, 70, 90, 0.5) 100%);
  border-color: rgba(255, 255, 255, 0.25);
}

.announcement-modal-content .btn:hover {
  transform: translateY(-3px);
}

/* Navigation and Language Toggle */
.home-btn,
.language-btn-div button {
  background: linear-gradient(145deg, rgba(30, 30, 50, 0.6) 0%, rgba(15, 15, 30, 0.7) 100%);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid rgba(0, 247, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin: 5px;
  z-index: 1;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.home-btn:hover,
.language-btn-div button:hover {
  background: linear-gradient(145deg, rgba(0, 247, 255, 0.15) 0%, rgba(0, 180, 220, 0.1) 100%);
  transform: translateY(-3px) scale(1.05);
  border-color: rgba(0, 247, 255, 0.4);
  box-shadow: 
    0 10px 30px rgba(0, 247, 255, 0.2),
    0 0 15px rgba(0, 247, 255, 0.1);
}

.home-btn:active,
.language-btn-div button:active {
  transform: translateY(1px) scale(0.98);
}

.language-btn-div {
  display: flex;
  z-index: 1;
  gap: 8px;
}

.language-btn-div button span {
  font-weight: 600;
  font-size: 0.9rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Responsive Design Adjustments */
@media (max-width: 768px) {
  #sign-form {
    max-height: 98vh;
  }

  .signupin-consent-form {
    width: 95%;
    max-height: 98vh;
  }

  .social-icon {
    margin-bottom: clamp(15px, 3vh, 25px);
  }

  .alert-link.alert-danger {
    width: 95%;
    left: 2.5%;
  }
}

/* Adjust button sizes */
.language-btn-div button {
  width: clamp(38px, 5vh, 44px);
  height: clamp(38px, 5vh, 44px);
  min-width: 38px;
  min-height: 38px;
}

/* Floating home button — sits to the left of the theme toggle */
.floating-home-btn {
  position: fixed;
  top: 16px;
  right: 66px;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  z-index: 1100;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

html[data-theme='light'] .floating-home-btn { color: #000 !important; }
html[data-theme='light'] .floating-home-btn svg,
html[data-theme='light'] .floating-home-btn svg path,
html[data-theme='light'] .floating-home-btn svg polyline {
  stroke: #1a1a1a !important;
}

/* Additional Fancy Effects */

/* Glow effect on form focus */
#sign-form:focus-within {
  animation: glowPulse 2s ease-in-out infinite;
}

/* Consent form scrollbar */
.signupin-consent-form::-webkit-scrollbar {
  width: 6px;
}

.signupin-consent-form::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.signupin-consent-form::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--ep-glow) 0%, var(--ep-glow) 100%);
  border-radius: 3px;
}

/* Verification message floating style */
.verification-floating {
  animation: slideInUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(15px);
  border-radius: 16px;
}

/* Focus ring enhancement */
*:focus-visible {
  outline: 2px solid rgba(0, 247, 255, 0.5);
  outline-offset: 3px;
}

/* =============================================================================
   Phase 3 — Premium glass announcement modal (replaces Bootstrap bg-dark)
   ============================================================================= */
.announcement-modal-glass {
  background: linear-gradient(160deg, rgba(10, 15, 30, 0.94) 0%, rgba(6, 10, 24, 0.97) 100%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 48px 120px rgba(0, 0, 0, 0.75),
    0 0 60px rgba(0, 247, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #fff;
  animation: announcementIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes announcementIn {
  from { opacity: 0; transform: scale(0.94) translateY(18px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.announcement-modal-glass h3,
.announcement-modal-glass h2 {
  background: linear-gradient(120deg, #ffffff 0%, #e0f9ff 45%, #00f7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.announcement-modal-glass .display-6 {
  font-size: clamp(1.2rem, 3.5vw, 1.6rem);
}
.announcement-modal-glass small {
  color: rgba(255, 255, 255, 0.45);
}
.announcement-modal-glass p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.96rem;
  line-height: 1.72;
}

.announcement-header {
  background: linear-gradient(135deg, rgba(0, 247, 255, 0.08) 0%, rgba(106, 92, 255, 0.06) 100%) !important;
  border: 1px solid rgba(0, 247, 255, 0.14) !important;
  color: rgba(255, 255, 255, 0.88) !important;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.announcement-header:hover {
  background: linear-gradient(135deg, rgba(0, 247, 255, 0.14) 0%, rgba(106, 92, 255, 0.10) 100%) !important;
  border-color: rgba(0, 247, 255, 0.28) !important;
}

.announcement-content-glass {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.93rem;
  line-height: 1.7;
}
.announcement-content-glass .text-muted {
  color: rgba(255, 255, 255, 0.38) !important;
}

/* Premium info + close buttons inside the modal */
.announcement-modal-glass .btn-info {
  background: linear-gradient(135deg, #00c8d4 0%, #6a5cff 100%);
  border: none;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 247, 255, 0.22);
}
.announcement-modal-glass .btn-info:hover {
  box-shadow: 0 10px 28px rgba(0, 247, 255, 0.35);
  filter: brightness(1.08);
}
.announcement-modal-glass .btn-secondary {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.06) 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.72);
}
.announcement-modal-glass .btn-secondary:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.12) 100%);
  color: #fff;
}
.announcement-modal-glass .btn-link {
  color: rgba(255, 255, 255, 0.65);
}
.announcement-modal-glass .btn-link:hover { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .announcement-modal-glass { animation: none; }
}
/* =============================================================================
   Sign-up / Sign-in page — white-theme layer (PREMIUM / glass + gradient).
   -----------------------------------------------------------------------------
   SignUpIn.css is a bespoke *dark* page: `body { background: #000 }`, animated
   cyan glow orbs, a dark-glass `#sign-form` with a cyan border + glow, and a
   gradient segmented toggle. This layer carries that atmosphere to the light
   side — a soft colored gradient-mesh canvas, a frosted glass form card with a
   teal glow, gradient accents — rather than a flat white panel. Gated on
   html[data-theme='light'] + scoped to .signin-container; dark mode untouched.
   Imported after SignUpIn.css (see SignUpIn.tsx).
   ============================================================================= */

html[data-theme='light'] .signin-container {
  --su-accent: #0c7a8f;
  --su-accent-2: #2f9ec2;
  --su-violet: #7c5cf0;
  --su-text: #1b2530;
  --su-text-2: #51606e;
  --su-glass: linear-gradient(150deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.58) 100%);
  --su-border: rgba(255, 255, 255, 0.85);

  /* tinted light canvas covering the global black body */
  background: linear-gradient(180deg, #eef2fb 0%, #e8edf7 50%, #eaf1f6 100%);
}

/* Ambient mesh / orbs — colored but soft (light-side echo of the cyan glows). */
html[data-theme='light'] .signin-container::before {
  background:
    radial-gradient(ellipse at 18% 28%, rgba(47, 158, 194, 0.20) 0%, transparent 52%),
    radial-gradient(ellipse at 82% 72%, rgba(124, 92, 240, 0.15) 0%, transparent 52%),
    radial-gradient(ellipse at 50% 50%, rgba(0, 180, 220, 0.10) 0%, transparent 60%);
}
html[data-theme='light'] .signin-container::after {
  background: radial-gradient(circle, rgba(124, 92, 240, 0.10) 0%, transparent 70%);
}

/* ---- Form card — frosted glass, teal glow, bright edge ---------------------- */
html[data-theme='light'] .signin-container #sign-form {
  background: var(--su-glass);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--su-border);
  box-shadow:
    0 30px 70px rgba(47, 158, 194, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
html[data-theme='light'] .signin-container #sign-form:hover {
  border-color: rgba(47, 158, 194, 0.45);
  box-shadow:
    0 36px 90px rgba(47, 158, 194, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

/* ---- Segmented Sign-in / Sign-up toggle ------------------------------------ */
html[data-theme='light'] .signin-container .form-toggle-container {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--su-border);
}
html[data-theme='light'] .signin-container .form-toggle {
  color: var(--su-text-2);
}
html[data-theme='light'] .signin-container .form-toggle:not(.active):hover {
  background: rgba(47, 158, 194, 0.10);
  color: var(--su-text);
}
/* Active pill → vivid gradient + glow (was a faint cyan tint). */
html[data-theme='light'] .signin-container .form-toggle.active::before {
  background: linear-gradient(135deg, var(--su-accent-2) 0%, #1f7fb0 60%, var(--su-violet) 130%);
  box-shadow: 0 6px 18px rgba(47, 158, 194, 0.35);
}
html[data-theme='light'] .signin-container .form-toggle.active {
  color: #ffffff;
}

/* ---- Labels / separators (hard-coded white) -------------------------------- */
html[data-theme='light'] .signin-container .form-group label {
  color: var(--su-text);
}
html[data-theme='light'] .signin-container .or-separator {
  color: var(--su-text-2);
}
html[data-theme='light'] .signin-container .text-white:not(.btn) {
  color: var(--su-text) !important;
}

/* ---- Social sign-in chips — frosted glass + teal glow on hover ------------- */
html[data-theme='light'] .signin-container .social-icon a {
  background: var(--su-glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--su-border);
  box-shadow: 0 8px 22px rgba(47, 158, 194, 0.10);
}
html[data-theme='light'] .signin-container .social-icon a:hover {
  background: rgba(47, 158, 194, 0.10);
  border-color: rgba(47, 158, 194, 0.40);
  box-shadow: 0 12px 30px rgba(47, 158, 194, 0.22);
}

/* ---- Alerts ---------------------------------------------------------------- */
html[data-theme='light'] .signin-container .alert-danger {
  background: linear-gradient(145deg, rgba(220, 53, 69, 0.10) 0%, rgba(220, 53, 69, 0.05) 100%);
  border: 1px solid rgba(220, 53, 69, 0.35);
  color: #b22230;
  box-shadow: 0 8px 25px rgba(220, 53, 69, 0.12);
}
html[data-theme='light'] .signin-container .alert-success {
  background: linear-gradient(145deg, rgba(40, 167, 69, 0.10) 0%, rgba(40, 167, 69, 0.05) 100%);
  border: 1px solid rgba(40, 167, 69, 0.35);
  color: #1d7a32;
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.12);
}

/* ---- Consent form — glass card --------------------------------------------- */
html[data-theme='light'] .signin-container .signupin-consent-form,
html[data-theme='light'] .signupin-consent-form {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.6) 100%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 30px 70px rgba(47, 158, 194, 0.16);
}
html[data-theme='light'] .signupin-consent-form:hover {
  border-color: rgba(47, 158, 194, 0.45);
  /* drop the dark base glow so the card stays airy on the light canvas */
  box-shadow:
    0 36px 90px rgba(47, 158, 194, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
/* Top accent hairline — teal→violet instead of the dark-mode cyan */
html[data-theme='light'] .signupin-consent-form::before {
  background: linear-gradient(90deg, transparent, var(--su-accent-2), var(--su-violet), transparent);
}
html[data-theme='light'] .signupin-consent-li {
  background: linear-gradient(145deg, rgba(47, 158, 194, 0.07) 0%, rgba(124, 92, 240, 0.04) 100%);
  border-left-color: var(--su-accent-2);
  /* replace the heavy black drop-shadow with a soft teal lift */
  box-shadow: 0 4px 16px rgba(47, 158, 194, 0.08);
}
html[data-theme='light'] .signupin-consent-li:hover {
  background: linear-gradient(145deg, rgba(47, 158, 194, 0.13) 0%, rgba(124, 92, 240, 0.08) 100%);
  border-left-color: var(--su-violet);
  box-shadow: 0 8px 26px rgba(47, 158, 194, 0.16);
}

/* ---- Language buttons ------------------------------------------------------ */
html[data-theme='light'] .language-btn-div button {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.6) 100%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 22px rgba(47, 158, 194, 0.10);
}
html[data-theme='light'] .language-btn-div button:hover {
  background: linear-gradient(145deg, rgba(47, 158, 194, 0.15) 0%, rgba(124, 92, 240, 0.10) 100%);
  border-color: rgba(47, 158, 194, 0.40);
}

/* =============================================================================
   Announcement modal (Bootstrap .bg-dark .text-white + forced dark glass).
   Repaint as a light frosted surface.
   ============================================================================= */
html[data-theme='light'] .announcement-modal-content {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 247, 251, 0.96) 100%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  color: #1b2530;
}
html[data-theme='light'] .announcement-modal-content.bg-dark {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 247, 251, 0.96) 100%) !important;
}
html[data-theme='light'] .announcement-modal-content .text-white:not(.btn) {
  color: #1b2530 !important;
}
html[data-theme='light'] .announcement-item {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.8) 0%, rgba(243, 245, 248, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.85);
}
html[data-theme='light'] .announcement-item:hover {
  border-color: rgba(47, 158, 194, 0.30);
  box-shadow: 0 10px 30px rgba(47, 158, 194, 0.12);
}
html[data-theme='light'] .announcement-header {
  background: linear-gradient(145deg, #eef1f6 0%, #e6e9ef 100%);
}
html[data-theme='light'] .announcement-header:hover {
  background: linear-gradient(145deg, #e6e9ef 0%, #dde1e9 100%) !important;
}
html[data-theme='light'] .announcement-content {
  background: rgba(246, 248, 251, 0.9);
}

/* =============================================================================
   Input fields — the base sets `color: var(--ep-elevated)`, which is a near-white
   (#eef0f4) in light mode, leaving typed text invisible on the white field.
   Repaint with readable ink + a calmer teal focus ring.
   ============================================================================= */
html[data-theme='light'] .signin-container .form-control {
  color: var(--su-text) !important;
  background: #ffffff;
  border: 2px solid var(--ep-border);
  box-shadow: inset 0 1px 3px rgba(20, 40, 60, 0.05);
}
html[data-theme='light'] .signin-container .form-control::placeholder {
  color: rgba(27, 37, 48, 0.42);
}
html[data-theme='light'] .signin-container .form-control:hover:not(:focus) {
  border-color: rgba(47, 158, 194, 0.45);
  background: #ffffff;
}
html[data-theme='light'] .signin-container .form-control:focus {
  border-color: var(--su-accent-2);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(47, 158, 194, 0.16);
}

/* =============================================================================
   Inline gradient headings + muted sub-lines.
   The TSX hard-codes a white→cyan→white text gradient and low-opacity white
   captions (great on black, near-invisible on the light glass). Repaint to a
   teal→violet ink gradient and a readable muted slate.
   ============================================================================= */
html[data-theme='light'] .signin-container #sign-form h2,
html[data-theme='light'] .signin-container .signupin-consent-form h2 {
  background: linear-gradient(135deg, var(--su-accent) 0%, #1f7fb0 52%, var(--su-violet) 110%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}
html[data-theme='light'] .signin-container #sign-form p,
html[data-theme='light'] .signin-container .signupin-consent-form .text-center p {
  color: var(--su-text-2) !important;
}

/* =============================================================================
   Consent "Agree & Continue" button — base is a flat deep-teal slab with black
   text. Lift it into the same teal→violet gradient used by the active toggle.
   ============================================================================= */
html[data-theme='light'] .signin-container .consent-btn {
  background: linear-gradient(135deg, var(--su-accent-2) 0%, #1f7fb0 55%, var(--su-violet) 130%) !important;
  color: #ffffff !important;
  box-shadow:
    0 10px 30px rgba(47, 158, 194, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.30) !important;
}
html[data-theme='light'] .signin-container .consent-btn:hover {
  box-shadow:
    0 16px 42px rgba(47, 158, 194, 0.45),
    0 0 26px rgba(124, 92, 240, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.40) !important;
}

/* =============================================================================
   Phase 3 light overrides — announcement modal glass
   ============================================================================= */
html[data-theme='light'] .announcement-modal-glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95) 0%, rgba(241, 246, 253, 0.92) 100%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 40px 100px rgba(47, 158, 194, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  color: var(--su-text, #1b2530);
}
html[data-theme='light'] .announcement-modal-glass h3,
html[data-theme='light'] .announcement-modal-glass h2 {
  background: linear-gradient(120deg, #103a52 0%, var(--su-accent, #0c7a8f) 42%, var(--su-violet, #7c5cf0) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
html[data-theme='light'] .announcement-modal-glass small {
  color: var(--su-text-3, #7c8794);
}
html[data-theme='light'] .announcement-modal-glass p {
  color: var(--su-text-2, #51606e);
}
html[data-theme='light'] .announcement-header {
  background: linear-gradient(135deg, rgba(47, 158, 194, 0.08) 0%, rgba(124, 92, 240, 0.06) 100%) !important;
  border: 1px solid rgba(47, 158, 194, 0.18) !important;
  color: var(--su-text, #1b2530) !important;
}
html[data-theme='light'] .announcement-header:hover {
  background: linear-gradient(135deg, rgba(47, 158, 194, 0.14) 0%, rgba(124, 92, 240, 0.10) 100%) !important;
  border-color: rgba(47, 158, 194, 0.35) !important;
}
html[data-theme='light'] .announcement-content-glass {
  background: rgba(255, 255, 255, 0.60);
  border: 1px solid rgba(47, 158, 194, 0.14);
  color: var(--su-text-2, #51606e);
}
html[data-theme='light'] .announcement-content-glass .text-muted {
  color: var(--su-text-3, #7c8794) !important;
}
html[data-theme='light'] .announcement-modal-glass .btn-secondary {
  background: linear-gradient(135deg, rgba(47, 158, 194, 0.10) 0%, rgba(124, 92, 240, 0.07) 100%);
  border: 1px solid rgba(47, 158, 194, 0.28);
  color: var(--su-accent, #0c7a8f);
}
html[data-theme='light'] .announcement-modal-glass .btn-secondary:hover {
  background: linear-gradient(135deg, rgba(47, 158, 194, 0.18) 0%, rgba(124, 92, 240, 0.12) 100%);
  color: var(--su-text, #1b2530);
}
html[data-theme='light'] .announcement-modal-glass .btn-link {
  color: var(--su-accent, #0c7a8f);
}
html[data-theme='light'] .announcement-modal-glass .btn-link:hover {
  color: var(--su-text, #1b2530);
}

html[data-theme='light'] .signin-container #submit {
  color: var(--su-text, #1b2530);
}
html[data-theme='light'] .signin-container .siz svg,
html[data-theme='light'] .signin-container .signup-wheel {
  fill: var(--ep-glow) !important;
  stroke: var(--ep-glow) !important;
  filter: drop-shadow(0 2px 6px rgba(12, 122, 143, 0.30));
}
html[data-theme='light'] .signin-container .siz:hover svg {
  filter: drop-shadow(0 4px 12px rgba(12, 122, 143, 0.50));
}

/* =============================================================================
   Sign-in form link buttons (Forgot Password?, Back to Sign In).
   Hard-coded inline cyan/white colours become invisible on the light glass card.
   Override with !important so we beat the inline style attribute.
   ============================================================================= */
html[data-theme='light'] .signin-container #sign-form .btn-link {
  color: var(--su-accent, #0c7a8f) !important;
}
html[data-theme='light'] .signin-container #sign-form .btn-link:hover {
  color: var(--su-text, #1b2530) !important;
  text-decoration: underline !important;
}

.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100%;
}

.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(0, 123, 255, 0.2);
  border-radius: 50%;
  border-top-color: var(--ep-glow);
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 10px;
}

.loading-text {
  color: var(--ep-glow);
  font-size: 18px;
  font-weight: 500;
  animation: dots 1.5s infinite;
}

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

@keyframes dots {
  0%, 20% {
    content: "Loading";
  }
  40% {
    content: "Loading.";
  }
  60% {
    content: "Loading..";
  }
  80%, 100% {
    content: "Loading...";
  }
}

/* Modern Subscription Transaction Styles matching Paper/Quota Transaction styles */

/* Base container styles */
.subscription-transaction-container {
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  color: #333;
  background-color: #f8f9fa;
}

/* Form styles — right column of the side-by-side checkout. */
.subscription-transaction-stripe-payment-form {
  width: 100%;
  max-width: 460px;
  flex: 0 1 460px;
  min-width: 0;
  align-self: flex-start;
  box-shadow: 0 12px 34px rgba(20, 30, 60, 0.07);
  border-radius: 18px;
  padding: 30px;
  background-color: white;
  border: 1px solid #eef1f6;
  box-sizing: border-box;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.subscription-transaction-stripe-payment-form:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
}

/* Email input styles */
.subscription-transaction-stripe-payment-email {
  color: black !important;
  border-radius: 8px;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid rgba(50, 50, 93, 0.1);
  font-size: 16px;
  width: 100%;
  background: white;
  box-sizing: border-box;
  font-family: 'Quicksand', sans-serif;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.subscription-transaction-stripe-payment-email:focus {
  border-color: #0055DE;
  box-shadow: 0 0 0 1px rgba(0, 85, 222, 0.2);
  outline: none;
}

.subscription-transaction-stripe-payment-message {
  color: #6D6E78;
  font-size: 16px;
  line-height: 1.5;
  padding-top: 15px;
  text-align: center;
  font-weight: 500;
}

.subscription-transaction-stripe-payment-element {
  margin-bottom: 28px;
}

/* Button styles */
.subscription-transaction-stripe-payment-button {
  background: #0055DE !important;
  font-family: 'Quicksand', sans-serif;
  color: #ffffff;
  border-radius: 8px;
  border: 0;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: block;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 85, 222, 0.2);
  width: 100%;
  letter-spacing: 0.5px;
}

.subscription-transaction-stripe-payment-button:hover {
  filter: brightness(110%);
  box-shadow: 0 6px 12px rgba(0, 85, 222, 0.3);
  transform: translateY(-1px);
}

.subscription-transaction-stripe-payment-button:active {
  transform: translateY(1px);
}

.subscription-transaction-stripe-payment-button:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* Spinner styles */
.subscription-transaction-stripe-payment-spinner,
.subscription-transaction-stripe-payment-spinner:before,
.subscription-transaction-stripe-payment-spinner:after {
  border-radius: 50%;
}

.subscription-transaction-stripe-payment-spinner {
  color: #ffffff;
  font-size: 22px;
  text-indent: -99999px;
  margin: 0px auto;
  position: relative;
  width: 20px;
  height: 20px;
  box-shadow: inset 0 0 0 2px;
  -webkit-transform: translateZ(0);
  -ms-transform: translateZ(0);
  transform: translateZ(0);
}

.subscription-transaction-stripe-payment-spinner:before,
.subscription-transaction-stripe-payment-spinner:after {
  position: absolute;
  content: '';
}

.subscription-transaction-stripe-payment-spinner:before {
  width: 10.4px;
  height: 20.4px;
  background: #0055DE;
  border-radius: 20.4px 0 0 20.4px;
  top: -0.2px;
  left: -0.2px;
  -webkit-transform-origin: 10.4px 10.2px;
  transform-origin: 10.4px 10.2px;
  -webkit-animation: subscription-transaction-stripe-payment-loading 1.5s infinite ease 1s;
  animation: subscription-transaction-stripe-payment-loading 1.5s infinite ease 1s;
}

.subscription-transaction-stripe-payment-spinner:after {
  width: 10.4px;
  height: 10.2px;
  background: #0055DE;
  border-radius: 0 10.2px 10.2px 0;
  top: -0.1px;
  left: 10.2px;
  -webkit-transform-origin: 0px 10.2px;
  transform-origin: 0px 10.2px;
  -webkit-animation: subscription-transaction-stripe-payment-loading 1.5s infinite ease;
  animation: subscription-transaction-stripe-payment-loading 1.5s infinite ease;
}

/* Add a spinner container for the loading state */
.subscription-transaction-stripe-payment-spinner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80px;
  width: 80px;
  margin-bottom: 20px;
}

/* Make the spinner more visible during loading state */
.subscription-transaction-stripe-payment-spinner-container .subscription-transaction-stripe-payment-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 85, 222, 0.2);
  border-radius: 50%;
  border-top-color: #0055DE;
  animation: subscription-transaction-stripe-payment-spinner-rotate 1s linear infinite;
}

@keyframes subscription-transaction-stripe-payment-spinner-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Payment status page */
.subscription-transaction-payment-status {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  row-gap: 30px;
  width: 30vw;
  min-width: 500px;
  min-height: 380px;
  align-self: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 40px;
  background-color: white;
  opacity: 0;
  animation: subscription-transaction-stripe-payment-fadeIn 0.8s ease-out forwards;
  margin-top: auto;
  margin-bottom: auto;
  transition: transform 0.3s ease;
}

.subscription-transaction-payment-status:hover {
  transform: translateY(-2px);
}

.subscription-transaction-stripe-payment-status-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 56px;
  width: 56px;
  border-radius: 50%;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.subscription-transaction-stripe-payment-heading {
  margin: 10px 0 0 0;
  color: #30313D;
  text-align: center;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 24px;
}

.subscription-transaction-payment-message {
  margin: 10px 0;
  color: #6D6E78;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
  font-weight: 500;
}

.subscription-transaction-stripe-payment-details-table {
  overflow-x: auto;
  width: 100%;
  margin: 10px 0;
  border-radius: 8px;
  background-color: #f8f9fa;
  padding: 15px;
}

.subscription-transaction-stripe-payment-table {
  width: 100%;
  font-size: 14px;
  border-collapse: collapse;
  font-family: 'Quicksand', sans-serif;
}

.subscription-transaction-stripe-payment-table tbody tr:first-child td {
  border-top: 1px solid #E6E6E6;
  padding-top: 12px;
}

.subscription-transaction-stripe-payment-table tbody tr:last-child td {
  border-bottom: 1px solid #E6E6E6;
}

.subscription-transaction-stripe-payment-table td {
  padding: 12px 4px;
}

.subscription-transaction-stripe-payment-table-content {
  text-align: right;
  color: #6D6E78;
  font-weight: 500;
}

.subscription-transaction-stripe-payment-table-label {
  font-weight: 600;
  color: #30313D;
}

.subscription-transaction-stripe-payment-return-button {
  background: #0055DE;
  font-family: 'Quicksand', sans-serif;
  color: #ffffff;
  border-radius: 8px;
  border: 0;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: block;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 85, 222, 0.2);
  width: 100%;
  max-width: 300px;
  margin-top: 20px;
  letter-spacing: 0.5px;
}

.subscription-transaction-stripe-payment-return-button:hover {
  filter: brightness(110%);
  box-shadow: 0 6px 12px rgba(0, 85, 222, 0.3);
  transform: translateY(-1px);
}

.subscription-transaction-stripe-payment-return-button:active {
  transform: translateY(1px);
}

/* Subscription Checkout container styles — order details (left) + payment form
   (right) side by side so the whole checkout fits one screen without scrolling. */
.subscription-transaction-checkout-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 28px;
  min-height: 100vh;
  padding: clamp(32px, 6vh, 72px) 30px 48px;
  background: linear-gradient(180deg, #f7f9fc 0%, #eceff5 100%);
  font-family: 'Quicksand', sans-serif;
  box-sizing: border-box;
}

/* Loading / error states are single centred cards, not the 2-column layout. */
.subscription-transaction-checkout-container.subscription-transaction-loading,
.subscription-transaction-checkout-container.subscription-transaction-error {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.subscription-transaction-checkout-container h2 {
  color: #30313D;
  margin-bottom: 30px;
  font-weight: 700;
  font-size: 26px;
  text-align: center;
}

.subscription-transaction-checkout-container.subscription-transaction-loading, 
.subscription-transaction-checkout-container.subscription-transaction-error {
  text-align: center;
}

.subscription-transaction-checkout-container .spinner-border {
  width: 3rem;
  height: 3rem;
  color: #0055DE !important;
  margin-bottom: 20px;
}

.subscription-transaction-checkout-container .alert {
  border-radius: 10px;
  padding: 16px;
  width: 100%;
  max-width: 500px;
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Subscription details styling — left column of the side-by-side checkout. */
.subscription-transaction-details {
  margin-bottom: 0;
  text-align: left;
  width: 100%;
  max-width: 460px;
  flex: 0 1 460px;
  background-color: white;
  border-radius: 18px;
  padding: 30px;
  box-shadow: 0 12px 34px rgba(20, 30, 60, 0.07);
  border: 1px solid #eef1f6;
  box-sizing: border-box;
}

.subscription-transaction-details h3 {
  color: #1a1f36;
  margin: 0 0 18px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}
/* Accent rule under the order-details heading. */
.subscription-transaction-details h3::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  margin-top: 12px;
  border-radius: 3px;
  background: linear-gradient(90deg, #0055DE, #4d8bff);
}

.subscription-transaction-details p {
  color: #6D6E78;
  font-size: 18px;
  margin: 0;
}

.subscription-transaction-summary {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.subscription-transaction-details-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid #f0f2f5;
  font-size: 15px;
}
.subscription-transaction-details-row:not(.subscription-transaction-total) span:first-child {
  color: #6b7280;
  font-weight: 500;
}
.subscription-transaction-details-row:not(.subscription-transaction-total) span:last-child {
  color: #1a1f36;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.subscription-transaction-details-row.subscription-transaction-total {
  border-top: 1px solid #e7eaf0;
  border-bottom: none;
  margin-top: 6px;
  padding-top: 16px;
  font-weight: 700;
  font-size: 1.15rem;
}
.subscription-transaction-details-row.subscription-transaction-total span {
  color: #0055DE;
  font-variant-numeric: tabular-nums;
}

/* WeChat Pay QR code container */
.subscription-transaction-wechat-pay-qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
  padding: 20px;
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  max-width: 500px;
  width: 100%;
}

.subscription-transaction-wechat-pay-qr-container h3 {
  color: #30313D;
  margin-bottom: 15px;
  font-weight: 600;
}

.subscription-transaction-wechat-qr-code {
  max-width: 220px;
  height: auto;
  margin: 15px 0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.subscription-transaction-wechat-pay-qr-container p {
  color: #6D6E78;
  margin-top: 15px;
  text-align: center;
  font-size: 14px;
}

/* Alipay redirect message */
.subscription-transaction-alipay-redirect-message {
  text-align: center;
  margin: 20px 0;
  padding: 25px;
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  max-width: 500px;
  width: 100%;
}

.subscription-transaction-alipay-redirect-message p {
  color: #30313D;
  margin-bottom: 15px;
  font-size: 16px;
}

/* Animations */
@keyframes subscription-transaction-stripe-payment-loading {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes subscription-transaction-stripe-payment-fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .subscription-transaction-checkout-container {
    padding: 15px;
  }
  
  .subscription-transaction-details {
    padding: 15px;
  }
  
  .subscription-transaction-stripe-payment-form {
    min-width: unset;
    width: 90%;
    padding: 20px;
  }
  
  .subscription-transaction-checkout-container h2 {
    font-size: 22px;
  }
  
  .subscription-transaction-payment-status {
    width: 90vw;
    min-width: initial;
    padding: 30px;
  }
  
  .subscription-transaction-stripe-payment-heading {
    font-size: 22px;
  }
}

/* Modern Paper Transaction Styles matching Subscription styles */

/* Base container styles */
.paper-transaction-container {
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  color: #333;
  background-color: #f8f9fa;
}

/* Form styles — right column of the side-by-side checkout. */
.paper-transaction-stripe-payment-form {
  width: 100%;
  max-width: 460px;
  flex: 0 1 460px;
  min-width: 0;
  align-self: flex-start;
  box-shadow: 0 12px 34px rgba(20, 30, 60, 0.07);
  border-radius: 18px;
  padding: 30px;
  background-color: white;
  border: 1px solid #eef1f6;
  box-sizing: border-box;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.paper-transaction-stripe-payment-form:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
}

/* Email input styles */
.paper-transaction-stripe-payment-email {
  color: black !important;
  border-radius: 8px;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid rgba(50, 50, 93, 0.1);
  font-size: 16px;
  width: 100%;
  background: white;
  box-sizing: border-box;
  font-family: 'Quicksand', sans-serif;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.paper-transaction-stripe-payment-email:focus {
  border-color: #0055DE;
  box-shadow: 0 0 0 1px rgba(0, 85, 222, 0.2);
  outline: none;
}

.paper-transaction-stripe-payment-message {
  color: #6D6E78;
  font-size: 16px;
  line-height: 1.5;
  padding-top: 15px;
  text-align: center;
  font-weight: 500;
}

.paper-transaction-stripe-payment-element {
  margin-bottom: 28px;
}

/* Button styles */
.paper-transaction-stripe-payment-button {
  background: #0055DE !important;
  font-family: 'Quicksand', sans-serif;
  color: #ffffff;
  border-radius: 8px;
  border: 0;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: block;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 85, 222, 0.2);
  width: 100%;
  letter-spacing: 0.5px;
}

.paper-transaction-stripe-payment-button:hover {
  filter: brightness(110%);
  box-shadow: 0 6px 12px rgba(0, 85, 222, 0.3);
  transform: translateY(-1px);
}

.paper-transaction-stripe-payment-button:active {
  transform: translateY(1px);
}

.paper-transaction-stripe-payment-button:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* Spinner styles */
.paper-transaction-stripe-payment-spinner,
.paper-transaction-stripe-payment-spinner:before,
.paper-transaction-stripe-payment-spinner:after {
  border-radius: 50%;
}

.paper-transaction-stripe-payment-spinner {
  color: #ffffff;
  font-size: 22px;
  text-indent: -99999px;
  margin: 0px auto;
  position: relative;
  width: 20px;
  height: 20px;
  box-shadow: inset 0 0 0 2px;
  -webkit-transform: translateZ(0);
  -ms-transform: translateZ(0);
  transform: translateZ(0);
}

.paper-transaction-stripe-payment-spinner:before,
.paper-transaction-stripe-payment-spinner:after {
  position: absolute;
  content: '';
}

.paper-transaction-stripe-payment-spinner:before {
  width: 10.4px;
  height: 20.4px;
  background: #0055DE;
  border-radius: 20.4px 0 0 20.4px;
  top: -0.2px;
  left: -0.2px;
  -webkit-transform-origin: 10.4px 10.2px;
  transform-origin: 10.4px 10.2px;
  -webkit-animation: paper-transaction-stripe-payment-loading 1.5s infinite ease 1s;
  animation: paper-transaction-stripe-payment-loading 1.5s infinite ease 1s;
}

.paper-transaction-stripe-payment-spinner:after {
  width: 10.4px;
  height: 10.2px;
  background: #0055DE;
  border-radius: 0 10.2px 10.2px 0;
  top: -0.1px;
  left: 10.2px;
  -webkit-transform-origin: 0px 10.2px;
  transform-origin: 0px 10.2px;
  -webkit-animation: paper-transaction-stripe-payment-loading 1.5s infinite ease;
  animation: paper-transaction-stripe-payment-loading 1.5s infinite ease;
}

/* Add a spinner container for the loading state */
.paper-transaction-stripe-payment-spinner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80px;
  width: 80px;
  margin-bottom: 20px;
}

/* Make the spinner more visible during loading state */
.paper-transaction-stripe-payment-spinner-container .paper-transaction-stripe-payment-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 85, 222, 0.2);
  border-radius: 50%;
  border-top-color: #0055DE;
  animation: paper-transaction-stripe-payment-spinner-rotate 1s linear infinite;
}

@keyframes paper-transaction-stripe-payment-spinner-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Payment status page */
.paper-transaction-payment-status {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  row-gap: 30px;
  width: 30vw;
  min-width: 500px;
  min-height: 380px;
  align-self: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 40px;
  background-color: white;
  opacity: 0;
  animation: paper-transaction-stripe-payment-fadeIn 0.8s ease-out forwards;
  margin-top: auto;
  margin-bottom: auto;
  transition: transform 0.3s ease;
}

.paper-transaction-payment-status:hover {
  transform: translateY(-2px);
}

.paper-transaction-stripe-payment-status-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 56px;
  width: 56px;
  border-radius: 50%;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.paper-transaction-stripe-payment-heading {
  margin: 10px 0 0 0;
  color: #30313D;
  text-align: center;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 24px;
}

.paper-transaction-payment-message {
  margin: 10px 0;
  color: #6D6E78;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
  font-weight: 500;
}

.paper-transaction-stripe-payment-details-table {
  overflow-x: auto;
  width: 100%;
  margin: 10px 0;
  border-radius: 8px;
  background-color: #f8f9fa;
  padding: 15px;
}

.paper-transaction-stripe-payment-table {
  width: 100%;
  font-size: 14px;
  border-collapse: collapse;
  font-family: 'Quicksand', sans-serif;
}

.paper-transaction-stripe-payment-table tbody tr:first-child td {
  border-top: 1px solid #E6E6E6;
  padding-top: 12px;
}

.paper-transaction-stripe-payment-table tbody tr:last-child td {
  border-bottom: 1px solid #E6E6E6;
}

.paper-transaction-stripe-payment-table td {
  padding: 12px 4px;
}

.paper-transaction-stripe-payment-table-content {
  text-align: right;
  color: #6D6E78;
  font-weight: 500;
}

.paper-transaction-stripe-payment-table-label {
  font-weight: 600;
  color: #30313D;
}

.paper-transaction-stripe-payment-return-button {
  background: #0055DE;
  font-family: 'Quicksand', sans-serif;
  color: #ffffff;
  border-radius: 8px;
  border: 0;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: block;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 85, 222, 0.2);
  width: 100%;
  max-width: 300px;
  margin-top: 20px;
  letter-spacing: 0.5px;
}

.paper-transaction-stripe-payment-return-button:hover {
  filter: brightness(110%);
  box-shadow: 0 6px 12px rgba(0, 85, 222, 0.3);
  transform: translateY(-1px);
}

.paper-transaction-stripe-payment-return-button:active {
  transform: translateY(1px);
}

/* Paper Checkout container styles — order details (left) + payment form (right)
   side by side so the whole checkout fits one screen without scrolling. */
.paper-transaction-checkout-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 28px;
  min-height: 100vh;
  padding: clamp(32px, 6vh, 72px) 30px 48px;
  background: linear-gradient(180deg, #f7f9fc 0%, #eceff5 100%);
  font-family: 'Quicksand', sans-serif;
  box-sizing: border-box;
}

/* Loading / error states are single centred cards, not the 2-column layout. */
.paper-transaction-checkout-container.paper-transaction-loading,
.paper-transaction-checkout-container.paper-transaction-error {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.paper-transaction-checkout-container h2 {
  color: #30313D;
  margin-bottom: 30px;
  font-weight: 700;
  font-size: 26px;
  text-align: center;
}

.paper-transaction-checkout-container.paper-transaction-loading, 
.paper-transaction-checkout-container.paper-transaction-error {
  text-align: center;
}

.paper-transaction-checkout-container .spinner-border {
  width: 3rem;
  height: 3rem;
  color: #0055DE !important;
  margin-bottom: 20px;
}

.paper-transaction-checkout-container .alert {
  border-radius: 10px;
  padding: 16px;
  width: 100%;
  max-width: 500px;
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Paper details styling — left column of the side-by-side checkout. */
.paper-transaction-details {
  margin-bottom: 0;
  text-align: left;
  width: 100%;
  max-width: 460px;
  flex: 0 1 460px;
  background-color: white;
  border-radius: 18px;
  padding: 30px;
  box-shadow: 0 12px 34px rgba(20, 30, 60, 0.07);
  border: 1px solid #eef1f6;
  box-sizing: border-box;
}

.paper-transaction-details-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid #f0f2f5;
  font-size: 15px;
}

.paper-transaction-details-row:last-child {
  border-bottom: none;
}
/* Muted labels, dark semibold values (overrides the global .text-black). */
.paper-transaction-details-row:not(.paper-transaction-total) span:first-child {
  color: #6b7280 !important;
  font-weight: 500;
}
.paper-transaction-details-row:not(.paper-transaction-total) span:last-child {
  color: #1a1f36 !important;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.paper-transaction-details-divider {
  border-top: 1px solid #e7eaf0;
  margin: 6px 0 0;
}

.paper-transaction-details-row.paper-transaction-total {
  font-weight: 700;
  font-size: 1.15rem;
  border-bottom: none;
  padding-top: 16px;
}
.paper-transaction-details-row.paper-transaction-total span {
  color: #0055DE !important;
  font-variant-numeric: tabular-nums;
}

.paper-transaction-fee-note {
  margin-top: 15px;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #0055DE;
}

.paper-transaction-fee-note small {
  color: #6c757d;
  font-size: 12px;
  line-height: 1.4;
}

.paper-transaction-details h3 {
  color: #1a1f36;
  margin: 0 0 18px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}
/* Accent rule under the order-details heading. */
.paper-transaction-details h3::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  margin-top: 12px;
  border-radius: 3px;
  background: linear-gradient(90deg, #0055DE, #4d8bff);
}

.paper-transaction-payment-details {
  margin-bottom: 25px;
  text-align: center;
}

.paper-transaction-payment-details h3 {
  color: #30313D;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 20px;
}

.paper-transaction-payment-details p {
  color: #6D6E78;
  font-size: 18px;
  margin: 5px 0;
}

/* WeChat Pay QR code container */
.paper-transaction-wechat-pay-qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
  padding: 20px;
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  max-width: 500px;
  width: 100%;
}

.paper-transaction-wechat-pay-qr-container h3 {
  color: #30313D;
  margin-bottom: 15px;
  font-weight: 600;
}

.paper-transaction-wechat-qr-code {
  max-width: 220px;
  height: auto;
  margin: 15px 0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.paper-transaction-wechat-pay-qr-container p {
  color: #6D6E78;
  margin-top: 15px;
  text-align: center;
  font-size: 14px;
}

/* Alipay redirect message */
.paper-transaction-alipay-redirect-message {
  text-align: center;
  margin: 20px 0;
  padding: 25px;
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  max-width: 500px;
  width: 100%;
}

.paper-transaction-alipay-redirect-message p {
  color: #30313D;
  margin-bottom: 15px;
  font-size: 16px;
}

/* Paper market modal styling */
.paper-transaction-payment-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.paper-transaction-payment-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 500px;
  background-color: white;
  border-radius: 16px;
  padding: 30px;
  z-index: 1001;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.paper-transaction-payment-modal h3 {
  color: #30313D;
  margin-bottom: 15px;
  font-weight: 700;
  text-align: center;
}

.paper-transaction-payment-modal p {
  color: #6D6E78;
  margin-bottom: 25px;
  text-align: center;
  font-size: 16px;
}

.paper-transaction-payment-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-bottom: 30px;
}

.paper-transaction-payment-method-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 120px;
}

.paper-transaction-payment-method-option:hover {
  background-color: #f8f9fa;
}

.paper-transaction-payment-method-option.selected {
  border-color: #0055DE;
  background-color: rgba(0, 85, 222, 0.05);
}

.paper-transaction-payment-method-option img {
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
}

.paper-transaction-payment-method-option span {
  font-size: 14px;
  color: #30313D;
  text-align: center;
}

.paper-transaction-payment-actions {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 20px;
}

.paper-transaction-payment-actions button {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.paper-transaction-cancel-btn {
  background-color: #f2f2f2;
  border: none;
  color: #666;
}

.paper-transaction-cancel-btn:hover {
  background-color: #e5e5e5;
}

.paper-transaction-proceed-btn {
  background-color: #0055DE;
  border: none;
  color: white;
  box-shadow: 0 4px 10px rgba(0, 85, 222, 0.2);
}

.paper-transaction-proceed-btn:hover {
  filter: brightness(110%);
  box-shadow: 0 6px 12px rgba(0, 85, 222, 0.3);
}

.paper-transaction-proceed-btn:disabled {
  opacity: 0.6;
  cursor: default;
  filter: none;
  box-shadow: none;
}

/* Animations */
@keyframes paper-transaction-stripe-payment-loading {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes paper-transaction-stripe-payment-fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* Modern Quota Transaction Styles matching Paper Transaction styles */

/* Base container styles */
.quota-transaction-container {
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  color: #333;
  background-color: #f8f9fa;
}

/* Form styles — right column of the side-by-side checkout. */
.quota-transaction-stripe-payment-form {
  width: 100%;
  max-width: 460px;
  flex: 0 1 460px;
  min-width: 0;
  align-self: flex-start;
  box-shadow: 0 12px 34px rgba(20, 30, 60, 0.07);
  border-radius: 18px;
  padding: 30px;
  background-color: white;
  border: 1px solid #eef1f6;
  box-sizing: border-box;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.quota-transaction-stripe-payment-form:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
}

/* Email input styles */
.quota-transaction-stripe-payment-email {
  color: black !important;
  border-radius: 8px;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid rgba(50, 50, 93, 0.1);
  font-size: 16px;
  width: 100%;
  background: white;
  box-sizing: border-box;
  font-family: 'Quicksand', sans-serif;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.quota-transaction-stripe-payment-email:focus {
  border-color: #0055DE;
  box-shadow: 0 0 0 1px rgba(0, 85, 222, 0.2);
  outline: none;
}

.quota-transaction-stripe-payment-message {
  color: #6D6E78;
  font-size: 16px;
  line-height: 1.5;
  padding-top: 15px;
  text-align: center;
  font-weight: 500;
}

.quota-transaction-stripe-payment-element {
  margin-bottom: 28px;
}

/* Button styles */
.quota-transaction-stripe-payment-button {
  background: #0055DE !important;
  font-family: 'Quicksand', sans-serif;
  color: #ffffff;
  border-radius: 8px;
  border: 0;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: block;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 85, 222, 0.2);
  width: 100%;
  letter-spacing: 0.5px;
}

.quota-transaction-stripe-payment-button:hover {
  filter: brightness(110%);
  box-shadow: 0 6px 12px rgba(0, 85, 222, 0.3);
  transform: translateY(-1px);
}

.quota-transaction-stripe-payment-button:active {
  transform: translateY(1px);
}

.quota-transaction-stripe-payment-button:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* Spinner styles */
.quota-transaction-stripe-payment-spinner,
.quota-transaction-stripe-payment-spinner:before,
.quota-transaction-stripe-payment-spinner:after {
  border-radius: 50%;
}

.quota-transaction-stripe-payment-spinner {
  color: #ffffff;
  font-size: 22px;
  text-indent: -99999px;
  margin: 0px auto;
  position: relative;
  width: 20px;
  height: 20px;
  box-shadow: inset 0 0 0 2px;
  -webkit-transform: translateZ(0);
  -ms-transform: translateZ(0);
  transform: translateZ(0);
}

.quota-transaction-stripe-payment-spinner:before,
.quota-transaction-stripe-payment-spinner:after {
  position: absolute;
  content: '';
}

.quota-transaction-stripe-payment-spinner:before {
  width: 10.4px;
  height: 20.4px;
  background: #0055DE;
  border-radius: 20.4px 0 0 20.4px;
  top: -0.2px;
  left: -0.2px;
  -webkit-transform-origin: 10.4px 10.2px;
  transform-origin: 10.4px 10.2px;
  -webkit-animation: quota-transaction-stripe-payment-loading 1.5s infinite ease 1s;
  animation: quota-transaction-stripe-payment-loading 1.5s infinite ease 1s;
}

.quota-transaction-stripe-payment-spinner:after {
  width: 10.4px;
  height: 10.2px;
  background: #0055DE;
  border-radius: 0 10.2px 10.2px 0;
  top: -0.1px;
  left: 10.2px;
  -webkit-transform-origin: 0px 10.2px;
  transform-origin: 0px 10.2px;
  -webkit-animation: quota-transaction-stripe-payment-loading 1.5s infinite ease;
  animation: quota-transaction-stripe-payment-loading 1.5s infinite ease;
}

/* Add a spinner container for the loading state */
.quota-transaction-stripe-payment-spinner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80px;
  width: 80px;
  margin-bottom: 20px;
}

/* Make the spinner more visible during loading state */
.quota-transaction-stripe-payment-spinner-container .quota-transaction-stripe-payment-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 85, 222, 0.2);
  border-radius: 50%;
  border-top-color: #0055DE;
  animation: quota-transaction-stripe-payment-spinner-rotate 1s linear infinite;
}

@keyframes quota-transaction-stripe-payment-spinner-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Payment status page */
.quota-transaction-payment-status {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  row-gap: 30px;
  width: 30vw;
  min-width: 500px;
  min-height: 380px;
  align-self: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 40px;
  background-color: white;
  opacity: 0;
  animation: quota-transaction-stripe-payment-fadeIn 0.8s ease-out forwards;
  margin-top: auto;
  margin-bottom: auto;
  transition: transform 0.3s ease;
}

.quota-transaction-payment-status:hover {
  transform: translateY(-2px);
}

.quota-transaction-stripe-payment-status-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 56px;
  width: 56px;
  border-radius: 50%;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.quota-transaction-stripe-payment-heading {
  margin: 10px 0 0 0;
  color: #30313D;
  text-align: center;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 24px;
}

.quota-transaction-payment-message {
  margin: 10px 0;
  color: #6D6E78;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
  font-weight: 500;
}

.quota-transaction-stripe-payment-details-table {
  overflow-x: auto;
  width: 100%;
  margin: 10px 0;
  border-radius: 8px;
  background-color: #f8f9fa;
  padding: 15px;
}

.quota-transaction-stripe-payment-table {
  width: 100%;
  font-size: 14px;
  border-collapse: collapse;
  font-family: 'Quicksand', sans-serif;
}

.quota-transaction-stripe-payment-table tbody tr:first-child td {
  border-top: 1px solid #E6E6E6;
  padding-top: 12px;
}

.quota-transaction-stripe-payment-table tbody tr:last-child td {
  border-bottom: 1px solid #E6E6E6;
}

.quota-transaction-stripe-payment-table td {
  padding: 12px 4px;
}

.quota-transaction-stripe-payment-table-content {
  text-align: right;
  color: #6D6E78;
  font-weight: 500;
}

.quota-transaction-stripe-payment-table-label {
  font-weight: 600;
  color: #30313D;
}

.quota-transaction-stripe-payment-return-button {
  background: #0055DE;
  font-family: 'Quicksand', sans-serif;
  color: #ffffff;
  border-radius: 8px;
  border: 0;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: block;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 85, 222, 0.2);
  width: 100%;
  max-width: 300px;
  margin-top: 20px;
  letter-spacing: 0.5px;
}

.quota-transaction-stripe-payment-return-button:hover {
  filter: brightness(110%);
  box-shadow: 0 6px 12px rgba(0, 85, 222, 0.3);
  transform: translateY(-1px);
}

.quota-transaction-stripe-payment-return-button:active {
  transform: translateY(1px);
}

/* Quota Checkout container styles — order details (left) + payment form (right)
   side by side so the whole checkout fits one screen without scrolling. */
.quota-transaction-checkout-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 28px;
  min-height: 100vh;
  padding: clamp(32px, 6vh, 72px) 30px 48px;
  background: linear-gradient(180deg, #f7f9fc 0%, #eceff5 100%);
  font-family: 'Quicksand', sans-serif;
  box-sizing: border-box;
}

/* Loading / error states are single centred cards, not the 2-column layout. */
.quota-transaction-checkout-container.quota-transaction-loading,
.quota-transaction-checkout-container.quota-transaction-error {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.quota-transaction-checkout-container h2 {
  color: #30313D;
  margin-bottom: 30px;
  font-weight: 700;
  font-size: 26px;
  text-align: center;
}

.quota-transaction-checkout-container.quota-transaction-loading, 
.quota-transaction-checkout-container.quota-transaction-error {
  text-align: center;
}

.quota-transaction-checkout-container .spinner-border {
  width: 3rem;
  height: 3rem;
  color: #0055DE !important;
  margin-bottom: 20px;
}

.quota-transaction-checkout-container .alert {
  border-radius: 10px;
  padding: 16px;
  width: 100%;
  max-width: 500px;
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Quota details styling — left column of the side-by-side checkout. */
.quota-transaction-details {
  margin-bottom: 0;
  text-align: left;
  width: 100%;
  max-width: 460px;
  flex: 0 1 460px;
  background-color: white;
  border-radius: 18px;
  padding: 30px;
  box-shadow: 0 12px 34px rgba(20, 30, 60, 0.07);
  border: 1px solid #eef1f6;
  box-sizing: border-box;
}

.quota-transaction-details h3 {
  color: #1a1f36;
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}
/* Accent rule under the order-details heading. */
.quota-transaction-details h3::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  margin-top: 12px;
  border-radius: 3px;
  background: linear-gradient(90deg, #0055DE, #4d8bff);
}

.quota-transaction-summary {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 18px;
}

.quota-transaction-details-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid #f0f2f5;
  font-size: 15px;
}

.quota-transaction-details-row:last-child {
  border-bottom: none;
}
/* Muted labels, dark semibold values (overrides the global .text-black). */
.quota-transaction-details-row:not(.quota-transaction-total) span:first-child {
  color: #6b7280 !important;
  font-weight: 500;
}
.quota-transaction-details-row:not(.quota-transaction-total) span:last-child {
  color: #1a1f36 !important;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.quota-transaction-details-row.quota-transaction-total {
  border-top: 1px solid #e7eaf0;
  margin-top: 6px;
  padding-top: 16px;
  font-weight: 700;
  font-size: 1.15rem;
  border-bottom: none;
}
.quota-transaction-details-row.quota-transaction-total span {
  color: #0055DE !important;
  font-variant-numeric: tabular-nums;
}

.quota-transaction-payment-details {
  margin-bottom: 25px;
  text-align: center;
}

.quota-transaction-payment-details h3 {
  color: #30313D;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 20px;
}

.quota-transaction-payment-details p {
  color: #6D6E78;
  font-size: 18px;
  margin: 5px 0;
}

/* WeChat Pay QR code container */
.quota-transaction-wechat-pay-qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
  padding: 20px;
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  max-width: 500px;
  width: 100%;
}

.quota-transaction-wechat-pay-qr-container h3 {
  color: #30313D;
  margin-bottom: 15px;
  font-weight: 600;
}

.quota-transaction-wechat-qr-code {
  max-width: 220px;
  height: auto;
  margin: 15px 0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quota-transaction-wechat-pay-qr-container p {
  color: #6D6E78;
  margin-top: 15px;
  text-align: center;
  font-size: 14px;
}

/* Alipay redirect message */
.quota-transaction-alipay-redirect-message {
  text-align: center;
  margin: 20px 0;
  padding: 25px;
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  max-width: 500px;
  width: 100%;
}

.quota-transaction-alipay-redirect-message p {
  color: #30313D;
  margin-bottom: 15px;
  font-size: 16px;
}

/* Animations */
@keyframes quota-transaction-stripe-payment-loading {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes quota-transaction-stripe-payment-fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Error page styles */
.quota-transaction-checkout-container.quota-transaction-error {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.quota-transaction-error-card {
  background: white;
  border-radius: 20px;
  padding: 50px 40px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  animation: errorCardSlideIn 0.6s ease-out;
  border-left: 5px solid #dc3545;
  position: relative;
  overflow: hidden;
}

.quota-transaction-error-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #dc3545, #ff6b6b);
}

.quota-transaction-error-icon {
  font-size: 64px;
  text-align: center;
  margin-bottom: 20px;
  animation: errorIconBounce 0.8s ease-out;
}

.quota-transaction-error-title {
  font-size: 28px;
  font-weight: 700;
  color: #dc3545;
  text-align: center;
  margin-bottom: 20px;
  font-family: 'Quicksand', sans-serif;
}

.quota-transaction-error-message {
  background-color: #fff5f5;
  border: 1px solid #ffe0e0;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 30px;
  color: #721c24;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
  font-family: 'Quicksand', sans-serif;
  word-break: break-word;
}

.quota-transaction-error-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 25px;
  flex-direction: column;
}

.quota-transaction-error-btn-primary,
.quota-transaction-error-btn-secondary {
  padding: 12px 24px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Quicksand', sans-serif;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quota-transaction-error-btn-primary {
  background: linear-gradient(135deg, #0055DE, #003aa3);
  color: white;
  box-shadow: 0 8px 16px rgba(0, 85, 222, 0.25);
}

.quota-transaction-error-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 85, 222, 0.35);
  filter: brightness(1.05);
}

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

.quota-transaction-error-btn-secondary {
  background: #f8f9fa;
  color: #333;
  border: 2px solid #dee2e6;
}

.quota-transaction-error-btn-secondary:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  transform: translateY(-2px);
}

.quota-transaction-error-btn-secondary:active {
  transform: translateY(0);
}

/* Countdown timer */
.quota-transaction-error-countdown {
  padding-top: 25px;
  border-top: 1px solid #e9ecef;
  text-align: center;
}

.quota-transaction-error-countdown-text {
  font-size: 14px;
  color: #6c757d;
  margin: 0 0 12px 0;
  font-family: 'Quicksand', sans-serif;
}

.countdown-number {
  font-weight: 700;
  color: #dc3545;
  font-size: 18px;
  display: inline-block;
  min-width: 24px;
}

.countdown-bar {
  height: 3px;
  background: linear-gradient(90deg, #dc3545, #ff6b6b);
  border-radius: 2px;
  transition: width 1s linear;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

/* Animations */
@keyframes errorCardSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes errorIconBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .quota-transaction-checkout-container {
    padding: 15px;
  }

  .quota-transaction-details {
    padding: 15px;
  }

  .quota-transaction-stripe-payment-form {
    min-width: unset;
    width: 90%;
    padding: 20px;
  }

  .quota-transaction-checkout-container h2 {
    font-size: 22px;
  }

  .quota-transaction-error-card {
    padding: 30px 20px;
    border-radius: 16px;
  }

  .quota-transaction-error-title {
    font-size: 22px;
  }

  .quota-transaction-error-message {
    font-size: 14px;
    padding: 14px 16px;
  }

  .quota-transaction-error-btn-primary,
  .quota-transaction-error-btn-secondary {
    font-size: 14px;
    padding: 11px 18px;
  }

  .quota-transaction-error-actions {
    gap: 10px;
  }
}

/* Stripe Connect Onboard Success Page Styles */

.stripe-connect-success-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.stripe-connect-success-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  width: 100%;
  overflow: hidden;
  animation: slideInUp 0.6s ease-out;
}

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

.stripe-connect-success-content {
  padding: 40px 30px;
  text-align: center;
}

/* Spinner Styles */
.success-spinner {
  margin-bottom: 30px;
}

.success-spinner .spinner-border {
  width: 4rem;
  height: 4rem;
  border-width: 0.3em;
}

/* Icon Styles */
.success-icon {
  margin-bottom: 30px;
  animation: bounceIn 0.8s ease-out 0.2s both;
}

.error-icon {
  margin-bottom: 30px;
  animation: shake 0.6s ease-out;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

/* Title Styles */
.success-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.success-title.processing {
  color: #6c757d;
  animation: pulse 2s infinite;
}

.success-title.completed {
  color: #28a745;
}

.success-title.error {
  color: #dc3545;
}

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

/* Message Styles */
.success-message {
  font-size: 16px;
  color: #6c757d;
  margin-bottom: 30px;
  line-height: 1.5;
}

.error-message {
  font-size: 16px;
  color: #dc3545;
  margin-bottom: 30px;
  line-height: 1.5;
  font-weight: 500;
}

/* Success Details */
.success-details {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #495057;
  animation: fadeInLeft 0.5s ease-out;
}

.detail-item:nth-child(1) {
  animation-delay: 0.3s;
}

.detail-item:nth-child(2) {
  animation-delay: 0.5s;
}

.detail-item:nth-child(3) {
  animation-delay: 0.7s;
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Button Styles */
.retry-button {
  background: #6c757d;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.retry-button:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

.retry-button:active {
  transform: translateY(0);
}

/* Stripe Branding */
.stripe-branding {
  background: #f8f9fa;
  padding: 20px;
  border-top: 1px solid #e9ecef;
  text-align: center;
}

.stripe-branding small {
  font-size: 12px;
  color: #6c757d;
}

/* Responsive Design */
@media (max-width: 576px) {
  .stripe-connect-success-container {
    padding: 15px;
  }
  
  .stripe-connect-success-content {
    padding: 30px 20px;
  }
  
  .success-title {
    font-size: 24px;
  }
  
  .success-message,
  .error-message {
    font-size: 14px;
  }
  
  .detail-item {
    padding: 10px 15px;
    font-size: 13px;
  }
}

/* Loading animation for processing state */
.processing-dots {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}

.processing-dots div {
  position: absolute;
  top: 33px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #6c757d;
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.processing-dots div:nth-child(1) {
  left: 8px;
  animation: processing1 0.6s infinite;
}

.processing-dots div:nth-child(2) {
  left: 8px;
  animation: processing2 0.6s infinite;
}

.processing-dots div:nth-child(3) {
  left: 32px;
  animation: processing2 0.6s infinite;
}

.processing-dots div:nth-child(4) {
  left: 56px;
  animation: processing3 0.6s infinite;
}

@keyframes processing1 {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes processing3 {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(0);
  }
}

@keyframes processing2 {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(24px, 0);
  }
}

