/* Overrides and portal components on top of the Tailwind 2.2.19 build loaded in Head.php.
   That build is static: no JIT, no arbitrary values, no peer/before/after variants, so anything
   beyond its utilities lives here. */

:root {
    --iih-blue: #145ae2;
    --iih-blue-hover: #124cbf;
    --iih-blue-50: #eef4fe;
    --iih-blue-100: #dbe7fd;
    --iih-blue-800: #0f3d99;

    /* Chart ramp, one hue light to dark in pipeline order (validated, ordinal, light surface). */
    --viz-pending: #86b6ef;
    --viz-approved: #3987e5;
    --viz-settled: #1c5cab;
    --viz-paid: #0d366b;
    --viz-surface: #ffffff;
    --viz-grid: #e5e7eb;
}

body {
    -webkit-font-smoothing: antialiased;
}

.tabular-nums { font-variant-numeric: tabular-nums; }

/* A little denser than the browser default: the rem scale is 15px instead of 16px, so text and
   spacing shrink by about 6%, while the page keeps its 1280px width. */
html { font-size: 15px; }
.max-w-7xl { max-width: 1280px; }

/* ============================================================
   Brand: Internet in Hungary blue. Tailwind's blue utilities used for primary actions, links
   and active states are retinted, so every screen (including the ones carried over from ed-ssp)
   follows the brand without per-view changes.
   ============================================================ */
.bg-blue-600 { background-color: var(--iih-blue) !important; }
.hover\:bg-blue-700:hover { background-color: var(--iih-blue-hover) !important; }
.bg-blue-50 { background-color: var(--iih-blue-50) !important; }
.bg-blue-100 { background-color: var(--iih-blue-100) !important; }
.text-blue-600 { color: var(--iih-blue) !important; }
.text-blue-700, .hover\:text-blue-800:hover, .text-blue-800 { color: var(--iih-blue-hover) !important; }
.border-blue-100 { border-color: var(--iih-blue-100) !important; }
.hover\:border-blue-200:hover, .hover\:border-blue-300:hover { border-color: #a9c6f8 !important; }
.focus\:ring-blue-500:focus { --tw-ring-color: rgba(20, 90, 226, 0.5) !important; }
.focus\:border-blue-500:focus { border-color: var(--iih-blue) !important; }
.text-blue-600 svg, a.text-blue-600 { color: var(--iih-blue); }

.skip-link {
    position: absolute; left: -9999px; top: 0.5rem; z-index: 100;
    background: #fff; color: var(--iih-blue); padding: 0.5rem 1rem; border-radius: 0.375rem;
}
.skip-link:focus { left: 0.5rem; }

/* Theme switch: a moon in the light theme, a sun in the dark theme. */
.theme-toggle .theme-icon-sun { display: none; }
html.dark .theme-toggle .theme-icon-sun { display: block; }
html.dark .theme-toggle .theme-icon-moon { display: none; }

/* Built-in logo: the app icon with the brand name as text, so the name follows the language. */
.brand-lockup { display: inline-flex; align-items: center; gap: 0.625rem; text-align: left; }
.brand-icon { width: 2.25rem; height: 2.25rem; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-size: 0.9375rem; line-height: 1.15; font-weight: 700; color: #0f2b5b; white-space: nowrap; }
.brand-sub { font-size: 0.6875rem; line-height: 1.2; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--iih-blue); white-space: nowrap; }
.brand-lockup-lg { gap: 0.75rem; }
.brand-lockup-lg .brand-icon { width: 3rem; height: 3rem; }
.brand-lockup-lg .brand-name { font-size: 1.25rem; }
.brand-lockup-lg .brand-sub { font-size: 0.75rem; }
html.dark .brand-name { color: #f3f4f6; }
html.dark .brand-sub { color: #7aa9f7; }
/* Narrow phones: the icon alone, so the top bar keeps room for its buttons. */
@media (max-width: 400px) { header .brand-text { display: none; } }

/* Logos are images with dark text; on the dark theme they sit on a light pill so they stay readable. */
html.dark .brand-logo { background: #fff; border-radius: 0.375rem; padding: 0.25rem 0.5rem; box-sizing: content-box; }

/* Login and registration: brand panel next to the form. */
.public-panel {
    background-color: var(--iih-blue);
    background-image: radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.16), transparent 45%),
                      linear-gradient(160deg, #1d6af0 0%, #0f3d99 100%);
    background-size: cover;
    background-position: center;
}

/* ============================================================
   Status badges: a dot plus the text label. Pipeline stages share one blue ramp.
   ============================================================ */
.badge {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.125rem 0.625rem; border-radius: 9999px;
    font-size: 0.75rem; line-height: 1.25rem; font-weight: 600; white-space: nowrap;
}
.badge::before {
    content: ''; display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 9999px;
    background-color: var(--badge-dot, currentColor); flex-shrink: 0;
}
.badge-neutral { background: #f3f4f6; color: #374151; --badge-dot: #9ca3af; }
.badge-muted   { background: #f3f4f6; color: #4b5563; --badge-dot: #9ca3af; }
.badge-stage-1 { background: #f1f5fb; color: #334766; --badge-dot: #86b6ef; }
.badge-stage-2 { background: #e8f1fd; color: #1c4f95; --badge-dot: #5598e7; }
.badge-stage-3 { background: #e0ebfc; color: #184f95; --badge-dot: #3987e5; }
.badge-stage-4 { background: #d6e5fb; color: #123f78; --badge-dot: #1c5cab; }
.badge-stage-5 { background: #cbdcf7; color: #0d366b; --badge-dot: #0d366b; }
.badge-done    { background: #dcfce7; color: #166534; --badge-dot: #16a34a; }
.badge-waiting { background: #fef3c7; color: #92400e; --badge-dot: #d97706; }
.badge-stopped { background: #fee2e2; color: #991b1b; --badge-dot: #dc2626; }

/* Filter chips above lists. */
.chip {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.375rem 0.75rem; border-radius: 9999px; border: 1px solid #d1d5db;
    background: #fff; color: #374151; font-size: 0.875rem; font-weight: 500;
}
.chip:hover { border-color: #9ca3af; }
.chip-count { color: #6b7280; font-weight: 400; font-variant-numeric: tabular-nums; }
.chip-active { background: var(--iih-blue); border-color: var(--iih-blue); color: #fff; }
.chip-active .chip-count { color: rgba(255, 255, 255, 0.85); }

/* Commission status tiles that double as filters. */
.status-tile {
    display: block; background: #fff; border-radius: 0.5rem; padding: 1.25rem;
    border: 1px solid #f3f4f6; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.status-tile:hover { border-color: #a9c6f8; }
.status-tile-active { border-color: var(--iih-blue); box-shadow: 0 0 0 1px var(--iih-blue); }

.step-number {
    flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    width: 1.5rem; height: 1.5rem; border-radius: 9999px;
    background: var(--iih-blue-50); color: var(--iih-blue); font-size: 0.75rem; font-weight: 600;
}

/* ============================================================
   Onboarding stepper: vertical on phones, horizontal from 640px.
   ============================================================ */
.stepper { display: flex; flex-direction: column; gap: 0.75rem; }
.stepper-step { display: flex; align-items: center; gap: 0.75rem; flex: 1; min-width: 0; }
.stepper-marker {
    flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; border-radius: 9999px; font-size: 0.875rem; font-weight: 600;
    border: 2px solid #d1d5db; color: #6b7280; background: #fff;
}
.stepper-text { display: flex; flex-direction: column; min-width: 0; }
.stepper-label { font-size: 0.875rem; font-weight: 500; color: #111827; }
.stepper-state { font-size: 0.75rem; color: #6b7280; }
.stepper-done .stepper-marker { background: var(--iih-blue); border-color: var(--iih-blue); color: #fff; }
.stepper-current .stepper-marker { border-color: var(--iih-blue); color: var(--iih-blue); box-shadow: 0 0 0 4px var(--iih-blue-50); }
.stepper-waiting .stepper-marker { border-color: #d97706; color: #d97706; background: #fffbeb; }
.stepper-stopped .stepper-marker { border-color: #dc2626; color: #dc2626; background: #fef2f2; }
.stepper-upcoming .stepper-label { color: #6b7280; }
@media (min-width: 640px) {
    .stepper { flex-direction: row; gap: 0; }
    .stepper-step { flex-direction: column; text-align: center; position: relative; gap: 0.5rem; }
    .stepper-step:not(:last-child)::after {
        content: ''; position: absolute; top: 1rem; left: calc(50% + 1.25rem); right: calc(-50% + 1.25rem);
        height: 2px; background: #e5e7eb;
    }
    .stepper-done:not(:last-child)::after { background: var(--iih-blue); }
}
/* Compact (registration, three steps): as wide as the form, the first step at its left edge, the
   second in the middle, the third at its right edge; the current step filled like the buttons. */
.stepper-compact { flex-direction: row; gap: 0; }
.stepper-compact .stepper-step { flex: 1 1 0; flex-direction: column; position: relative; gap: 0.375rem; }
.stepper-compact .stepper-step:first-child { align-items: flex-start; text-align: left; }
.stepper-compact .stepper-step:nth-child(2) { align-items: center; text-align: center; }
.stepper-compact .stepper-step:last-child { align-items: flex-end; text-align: right; }
.stepper-compact .stepper-marker { width: 1.75rem; height: 1.75rem; font-size: 0.75rem; }
.stepper-compact .stepper-label { font-size: 0.75rem; }
.stepper-compact .stepper-current .stepper-marker { background: var(--iih-blue); border-color: var(--iih-blue); color: #fff; box-shadow: 0 0 0 3px rgba(20, 90, 226, 0.15); }
.stepper-compact .stepper-current .stepper-label { font-weight: 600; }
/* The lines run from marker to marker, with the same gap on both sides of each marker. */
.stepper-compact .stepper-step:first-child::after,
.stepper-compact .stepper-step:nth-child(2)::after {
    content: ''; position: absolute; top: 0.875rem; height: 2px; background: #e5e7eb;
}
.stepper-compact .stepper-step:first-child::after { left: 2.25rem; right: calc(-50% + 1.375rem); }
.stepper-compact .stepper-step:nth-child(2)::after { left: calc(50% + 1.375rem); right: calc(-100% + 2.25rem); }
.stepper-compact .stepper-step:last-child::after { content: none; }
.stepper-compact .stepper-done::after { background: var(--iih-blue); }

/* Referral pipeline on the referral detail page. */
.pipeline { display: flex; flex-direction: column; gap: 0.75rem; }
.pipeline-step { display: grid; grid-template-columns: 1.5rem 1fr auto; align-items: center; gap: 0.75rem; }
.pipeline-marker {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.5rem; height: 1.5rem; border-radius: 9999px; border: 2px solid #d1d5db; background: #fff; color: #fff;
}
.pipeline-label { font-size: 0.875rem; font-weight: 500; color: #6b7280; }
.pipeline-date { font-size: 0.75rem; color: #6b7280; font-variant-numeric: tabular-nums; }
.pipeline-done .pipeline-marker { background: var(--iih-blue); border-color: var(--iih-blue); }
.pipeline-done .pipeline-label { color: #111827; }
.pipeline-current .pipeline-marker { background: var(--iih-blue); border-color: var(--iih-blue); box-shadow: 0 0 0 4px var(--iih-blue-100); }
.pipeline-current .pipeline-label { color: var(--iih-blue); font-weight: 600; }
.pipeline-stopped .pipeline-marker { background: #dc2626; border-color: #dc2626; }
.pipeline-stopped .pipeline-label { color: #991b1b; font-weight: 600; }
@media (min-width: 768px) {
    .pipeline { flex-direction: row; gap: 0; }
    .pipeline-step { flex: 1; grid-template-columns: 1fr; justify-items: center; text-align: center; position: relative; gap: 0.375rem; }
    .pipeline-step:not(:last-child)::after {
        content: ''; position: absolute; top: 0.75rem; left: calc(50% + 1rem); right: calc(-50% + 1rem);
        height: 2px; background: #e5e7eb;
    }
    .pipeline-done:not(:last-child)::after { background: var(--iih-blue); }
}

/* Dashboard funnel: one tile per pipeline stage. */
.funnel-stage {
    display: flex; flex-direction: column; gap: 0.125rem; padding: 0.875rem 1rem; border-radius: 0.5rem;
    border: 1px solid #e5e7eb; background: #fff; height: 100%;
    border-top: 4px solid var(--funnel-accent, #d1d5db);
}
.funnel-stage:hover { border-color: #a9c6f8; border-top-color: var(--funnel-accent, #d1d5db); }
.funnel-count { font-size: 1.5rem; line-height: 2rem; font-weight: 600; color: #111827; }
.funnel-label { font-size: 0.875rem; color: #4b5563; }
.funnel-stage-1 { --funnel-accent: #86b6ef; }
.funnel-stage-2 { --funnel-accent: #5598e7; }
.funnel-stage-3 { --funnel-accent: #3987e5; }
.funnel-stage-4 { --funnel-accent: #1c5cab; }
.funnel-stage-5 { --funnel-accent: #0d366b; }
.funnel-done { --funnel-accent: #16a34a; }

/* ============================================================
   Commission chart (partials/commission_chart.php). Columns of at most 24px, 2px surface gap
   between stacked segments, 4px rounded top, recessive hairline grid.
   ============================================================ */
.viz { position: relative; }
/* The portal's loading state (CLAUDE.md rule 18): portal.js sets html.is-loading when a page
   takes longer than half a second. A bar runs along the top and the page dims a little. */
.page-loader { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity 0.2s; }
.page-loader::before { content: ''; position: absolute; top: 0; bottom: 0; left: -35%; width: 35%; background: var(--iih-blue); border-radius: 0 2px 2px 0; animation: page-loader 1.1s ease-in-out infinite; }
html.is-loading .page-loader { opacity: 1; }
html.is-loading main { opacity: 0.6; transition: opacity 0.2s; }
html.is-loading body { cursor: progress; }
@keyframes page-loader { from { left: -35%; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .page-loader::before { animation-duration: 3s; } }

/* A small turning circle for something on its way to Odoo (order_pending.php, order_detail.php). */
.order-spinner { flex-shrink: 0; width: 1rem; height: 1rem; border-radius: 9999px; border: 2px solid var(--iih-blue-100); border-top-color: var(--iih-blue); animation: order-spin 0.8s linear infinite; }
@keyframes order-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .order-spinner { animation-duration: 2.5s; } }

/* Ordering, the packages side by side (order_new.php): one price list, a term per row, a click on
   a price chooses package and term. The chosen cell is blue. */
.plan-compare { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 40rem; }
.plan-compare th, .plan-compare td { vertical-align: top; text-align: left; }
.plan-compare-corner, .plan-compare-term { width: 11rem; padding: 1rem 1.25rem; border-bottom: 1px solid #f3f4f6; }
.plan-compare-head { position: relative; padding: 1.25rem; border-bottom: 1px solid #e5e7eb; border-left: 1px solid #f3f4f6; font-weight: normal; }
.plan-compare-head.is-recommended { box-shadow: inset 0 3px 0 var(--iih-blue); background: var(--iih-blue-50); }
.plan-compare-flag { display: inline-block; margin-bottom: 0.375rem; font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--iih-blue); }
.plan-compare-cell { padding: 0.75rem; border-bottom: 1px solid #f3f4f6; border-left: 1px solid #f3f4f6; }
.plan-compare tr:last-child > * { border-bottom: 0; }
.plan-option { display: flex; align-items: flex-start; gap: 0.625rem; padding: 0.625rem 0.75rem; border: 1px solid #e5e7eb; border-radius: 0.375rem; cursor: pointer; transition: border-color 0.15s, background-color 0.15s; }
.plan-option input { margin-top: 0.15rem; flex-shrink: 0; }
.plan-option:hover { border-color: #a9c6f8; }
.plan-option:has(input:checked) { border-color: var(--iih-blue); background: var(--iih-blue-50); box-shadow: 0 0 0 1px var(--iih-blue); }
html.dark .plan-compare-head, html.dark .plan-compare-cell, html.dark .plan-compare-term, html.dark .plan-compare-corner { border-color: #374151; }
html.dark .plan-compare-head.is-recommended { background: #1e3a6e; }
html.dark .plan-option { border-color: #4b5563; }
html.dark .plan-option:has(input:checked) { background: #1e3a6e; }
.plan-option:has(input:focus-visible) { border-color: var(--iih-blue); box-shadow: 0 0 0 3px rgba(20, 90, 226, 0.3); }

/* Ordering, the address step (order_new.php): one search field, the address found as a card, the
   building's apartments as dropdowns side by side. The button looks off until the check can go. */
.address-search { position: relative; }
.address-search-icon { position: absolute; left: 0.875rem; top: 50%; width: 1.25rem; height: 1.25rem; margin-top: -0.625rem; color: var(--iih-blue); pointer-events: none; }
.address-search-input {
    display: block; width: 100%; height: 3rem; padding: 0 1rem 0 2.75rem; font-size: 1rem; color: #111827;
    background: #fff; border: 1px solid #d1d5db; border-radius: 0.5rem; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.address-search-input::placeholder { color: #9ca3af; }
.address-search-input:focus { outline: none; border-color: var(--iih-blue); box-shadow: 0 0 0 3px rgba(20, 90, 226, 0.18); }
.address-search-input[aria-invalid="true"] { border-color: #ef4444; }
/* :not(.hidden): a display set here would otherwise beat Tailwind's .hidden, and show the empty card while searching. */
.address-found:not(.hidden) { display: flex; }
.address-found { align-items: center; gap: 0.875rem; padding: 0.875rem 1rem; border: 1px solid #bbf7d0; background: #f0fdf4; border-radius: 0.5rem; }
.address-found-icon { color: #16a34a; }
button[data-address-submit][aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.order-spinner-light { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }
html.dark .address-found { background: #052e16; border-color: #166534; }
html.dark .address-found-icon { color: #4ade80; }

/* Google's address suggestions (added to the page's body by Google), in the portal's look. */
.pac-container { margin-top: 4px; border: 1px solid #e5e7eb; border-radius: 0.5rem; box-shadow: 0 12px 32px rgba(17, 24, 39, 0.12); font-family: inherit; overflow: hidden; }
.pac-item { padding: 0.5rem 0.875rem; font-size: 0.875rem; line-height: 1.5rem; color: #6b7280; border-top-color: #f3f4f6; cursor: pointer; }
.pac-item:first-child { border-top: 0; }
.pac-item:hover, .pac-item-selected, .pac-item-selected:hover { background-color: var(--iih-blue-50); }
.pac-item-query { font-size: 0.875rem; color: #111827; padding-right: 0.25rem; }
.pac-matched { font-weight: 600; }
html.dark .pac-container { background: #1f2937; border-color: #374151; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); }
html.dark .pac-item { color: #9ca3af; border-top-color: #374151; }
html.dark .pac-item-query { color: #f3f4f6; }
html.dark .pac-item:hover, html.dark .pac-item-selected { background-color: #172554; }

/* Keyboard focus is always visible (CLAUDE.md rule 20): links, buttons and whatever is made
   focusable get a ring; the fields and our own dropdowns have theirs. */
a:focus-visible, button:focus-visible, summary:focus-visible, [role="button"]:focus-visible,
[tabindex]:not([tabindex="-1"]):not(.cfield-control):not(.viz-column):not(.terms-scroll):focus-visible {
    outline: 2px solid var(--iih-blue); outline-offset: 2px;
}
html.dark a:focus-visible, html.dark button:focus-visible, html.dark summary:focus-visible, html.dark [role="button"]:focus-visible { outline-color: #7aa9f7; }
.skip-link:focus { outline: 2px solid var(--iih-blue); outline-offset: 2px; }

/* The Business Partner Program Terms (partials/terms_body.php): lists, the annex tables and the
   [S] of a clause accepted expressly. */
.terms-s { font-weight: 700; color: var(--iih-blue); white-space: nowrap; }
.terms-list { list-style: none; padding-left: 1rem; }
.terms-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.terms-table th, .terms-table td { border: 1px solid #e5e7eb; padding: 0.5rem 0.75rem; text-align: left; vertical-align: top; color: #374151; }
.terms-table th { background: #f9fafb; font-weight: 600; color: #111827; }
html.dark .terms-table th, html.dark .terms-table td { border-color: #374151; color: #d1d5db; }
html.dark .terms-table th { background: #111827; color: #f3f4f6; }

/* Status legends (uiStatusLegend): badges in one column, centred on their sentence. */
.status-legend { display: grid; grid-template-columns: max-content 1fr; gap: 0.75rem 1rem; align-items: center; }
.status-legend dd { font-size: 0.875rem; line-height: 1.25rem; color: #4b5563; }
@media (min-width: 768px) {
    .status-legend { grid-template-columns: max-content 1fr max-content 1fr; }
    .status-legend dt:nth-of-type(even) { padding-left: 2rem; }
}
html.dark .status-legend dd { color: #9ca3af; }

/* The guide (help.php): contents beside the text on wide screens, sections divided by a line, steps
   numbered in the margin, the partner's plan as three facts. */
@media (min-width: 1024px) { .help-toc { position: sticky; top: 1.5rem; } }
.help-section { scroll-margin-top: 1.5rem; }
.help-section + .help-section { margin-top: 2.5rem; padding-top: 2.5rem; border-top: 1px solid #f3f4f6; }
.help-steps { counter-reset: help-step; list-style: none; padding: 0; }
.help-steps > li { counter-increment: help-step; position: relative; padding-left: 2rem; }
.help-steps > li + li { margin-top: 0.625rem; }
.help-steps > li::before { content: counter(help-step); position: absolute; left: 0; top: 0.0625rem; width: 1.375rem; height: 1.375rem;
    border-radius: 9999px; border: 1px solid #d1d5db; font-size: 0.75rem; font-weight: 600; line-height: 1.25rem; text-align: center; color: #4b5563; }
.help-facts { display: grid; gap: 1rem; padding: 1rem 1.25rem; border-radius: 0.5rem; background: #f9fafb; }
@media (min-width: 640px) { .help-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.help-facts dt { font-size: 0.75rem; color: #6b7280; }
.help-facts dd { margin-top: 0.25rem; font-size: 0.875rem; color: #111827; }
.help-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8125rem; padding: 0.0625rem 0.375rem;
    border-radius: 0.25rem; background: #f3f4f6; color: #111827; word-break: break-all; }
html.dark .help-section + .help-section { border-top-color: #374151; }
html.dark .help-steps > li::before { border-color: #4b5563; color: #d1d5db; }
html.dark .help-facts { background: #111827; }
html.dark .help-facts dt { color: #9ca3af; }
html.dark .help-facts dd { color: #f3f4f6; }
html.dark .help-code { background: #111827; color: #e5e7eb; }

/* The getting started list on the dashboard (GettingStarted): an open ring per step, green with a
   check once it is done. */
.getting-started-step { display: flex; align-items: flex-start; gap: 0.75rem; }
.getting-started-marker { flex-shrink: 0; margin-top: 0.125rem; width: 1.25rem; height: 1.25rem; border-radius: 9999px; border: 2px solid #d1d5db;
    display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.getting-started-step.is-done .getting-started-marker { background: #16a34a; border-color: #16a34a; }
html.dark .getting-started-marker { border-color: #4b5563; }
html.dark .getting-started-step.is-done .getting-started-marker { background: #15803d; border-color: #15803d; }

/* The help button, always bottom right on partner pages (uiHelpDock()), its menu above it; the footer
   keeps room under it so the button never covers it. */
.help-dock { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40; }
.help-dock-button { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.625rem 1.125rem 0.625rem 0.875rem;
    border-radius: 9999px; background: var(--iih-blue); color: #fff; font-size: 0.875rem; font-weight: 600;
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.25); transition: background-color 150ms ease; }
.help-dock-button:hover { background: #0f48b8; }
.help-dock-button:focus-visible { outline: 2px solid var(--iih-blue); outline-offset: 3px; }
.help-dock-panel { position: absolute; right: 0; bottom: calc(100% + 0.5rem); width: 16rem; }
body:has(.help-dock) .site-footer { padding-bottom: 5.5rem; }
/* Send feedback (uiFeedbackDialog()) */
.feedback-dialog { width: min(32rem, calc(100vw - 2rem)); max-width: none; padding: 1.5rem; border: 0; border-radius: 0.75rem; background: #fff; color: #111827; box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35); }
.feedback-dialog::backdrop { background: rgba(17, 24, 39, 0.65); }
.feedback-dialog[open] { animation: asset-dialog-in 0.18s ease-out; }
.feedback-dialog textarea { resize: vertical; min-height: 8rem; }
.feedback-dialog [tabindex="-1"]:focus { outline: none; }
@media (prefers-reduced-motion: reduce) { .feedback-dialog[open] { animation: none; } }
html.dark .feedback-dialog { background: #1f2937; color: #f3f4f6; }
html.dark .feedback-dialog .bg-green-100 { background-color: rgba(22, 163, 74, 0.2); }
@media print { .help-dock { display: none; } }

/* The portal tour (portal.js): the page held still, the menu item of the step lit up, the card beside it. */
.tour-blocker { position: fixed; inset: 0; z-index: 60; }
.tour-blocker.tour-dim { background: rgba(17, 24, 39, 0.55); }
.tour-spot { position: fixed; z-index: 61; border-radius: 0.5rem; box-shadow: 0 0 0 9999px rgba(17, 24, 39, 0.55);
    outline: 2px solid #fff; pointer-events: none; transition: left 200ms ease, top 200ms ease, width 200ms ease, height 200ms ease; }
.tour-card { position: fixed; z-index: 62; width: min(22rem, calc(100vw - 2rem)); padding: 1.25rem; border-radius: 0.5rem;
    background: #fff; box-shadow: 0 20px 40px rgba(17, 24, 39, 0.3); }
.tour-count { font-size: 0.75rem; color: #6b7280; }
.tour-title { margin-top: 0.25rem; font-size: 1rem; font-weight: 600; color: #111827; }
.tour-text { margin-top: 0.375rem; font-size: 0.875rem; line-height: 1.5; color: #374151; }
.tour-actions { margin-top: 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.tour-nav { display: flex; gap: 0.5rem; }
.tour-skip { font-size: 0.875rem; color: #6b7280; }
.tour-skip:hover { color: #111827; text-decoration: underline; }
.tour-back, .tour-next { padding: 0.5rem 0.875rem; border-radius: 0.375rem; font-size: 0.875rem; font-weight: 500; }
.tour-back { border: 1px solid #d1d5db; background: #fff; color: #374151; }
.tour-back:hover { background: #f9fafb; }
.tour-next { background: var(--iih-blue); color: #fff; }
.tour-next:hover { background: #0f48b8; }
.tour-back.hidden { display: none; }
html.dark .tour-card { background: #1f2937; }
html.dark .tour-title { color: #f3f4f6; }
html.dark .tour-text { color: #d1d5db; }
html.dark .tour-count, html.dark .tour-skip { color: #9ca3af; }
html.dark .tour-back { background: #1f2937; border-color: #4b5563; color: #e5e7eb; }

.viz-legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; font-size: 0.75rem; color: #4b5563; margin-bottom: 0.75rem; }
.viz-legend-item { display: inline-flex; align-items: center; gap: 0.375rem; }
.viz-swatch { width: 0.75rem; height: 0.75rem; border-radius: 0.1875rem; display: inline-block; }
.viz-pending { background: var(--viz-pending); }
.viz-approved { background: var(--viz-approved); }
.viz-settled { background: var(--viz-settled); }
.viz-paid { background: var(--viz-paid); }
.viz-plot { display: flex; height: 13rem; }
.viz-axis {
    display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end;
    padding-right: 0.5rem; padding-bottom: 1.5rem; font-size: 0.6875rem; color: #6b7280; white-space: nowrap;
    font-variant-numeric: tabular-nums; transform: translateY(-0.4rem);
}
.viz-area { position: relative; flex: 1; min-width: 0; }
.viz-gridlines { position: absolute; inset: 0 0 1.5rem 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.viz-gridlines span { display: block; height: 1px; background: var(--viz-grid); }
.viz-columns { position: absolute; inset: 0 0 1.5rem 0; display: flex; align-items: stretch; gap: 2px; }
.viz-column {
    position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: flex-end; outline: none; cursor: default;
}
.viz-column:focus-visible .viz-stack, .viz-column:hover .viz-stack { filter: brightness(1.08); }
.viz-column:focus-visible { box-shadow: inset 0 0 0 2px var(--iih-blue); border-radius: 0.25rem; }
.viz-stack { width: 100%; max-width: 24px; display: flex; flex-direction: column; gap: 2px; min-height: 0; }
.viz-segment { display: block; min-height: 2px; flex-basis: 0; }
.viz-stack .viz-segment:first-child { border-top-left-radius: 4px; border-top-right-radius: 4px; }
.viz-label {
    position: absolute; bottom: -1.5rem; left: 50%; transform: translateX(-50%);
    height: 1.5rem; line-height: 1.5rem; font-size: 0.6875rem; color: #6b7280; white-space: nowrap;
}
.viz-tooltip {
    position: absolute; z-index: 20; pointer-events: none; white-space: pre-line;
    background: #111827; color: #f9fafb; font-size: 0.75rem; line-height: 1.25rem;
    padding: 0.5rem 0.75rem; border-radius: 0.375rem; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
@media (max-width: 639px) {
    .viz-column:nth-child(even) .viz-label { visibility: hidden; }
}

/* Partner Terms reading area during onboarding. */
.terms-scroll { max-height: 32rem; overflow-y: auto; }
.terms-scroll:focus { outline: 2px solid var(--iih-blue); outline-offset: -2px; }
.qr-frame svg, .qr-frame canvas { width: 100%; height: 100%; }
.plan-option:has(input:checked) { border-color: var(--iih-blue); box-shadow: 0 0 0 1px var(--iih-blue); background: var(--iih-blue-50); }

.alert { transition: opacity 0.5s ease; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
    .no-print, header, footer, .skip-link { display: none !important; }
    body { background: #fff !important; }
    .shadow, .shadow-sm { box-shadow: none !important; }
    main { max-width: none !important; padding: 0 !important; }
    section, .bg-white { break-inside: avoid; border: 1px solid #e5e7eb; }
}

/* ============================================================
   Dark mode, toggled via html.dark (Menu.php #darkModeToggle, flash prevention in Head.php).
   Explicit overrides on the utilities the views use, as in ed-ssp.
   ============================================================ */
html.dark body { background-color: #111827; color: #e5e7eb; }
html.dark .bg-white { background-color: #1f2937 !important; }
html.dark .bg-gray-50 { background-color: #111827 !important; }
html.dark .bg-gray-100 { background-color: #1f2937 !important; }
html.dark .bg-gray-900 { background-color: #030712 !important; }

html.dark .text-gray-900 { color: #f3f4f6 !important; }
html.dark .text-gray-800 { color: #e5e7eb !important; }
html.dark .text-gray-700 { color: #d1d5db !important; }
html.dark .text-gray-600 { color: #9ca3af !important; }
html.dark .text-gray-500 { color: #9ca3af !important; }
html.dark .text-gray-400 { color: #6b7280 !important; }

html.dark .border-gray-100 { border-color: #1f2937 !important; }
html.dark .border-gray-200 { border-color: #374151 !important; }
html.dark .border-gray-300 { border-color: #4b5563 !important; }
html.dark .divide-gray-100 > :not([hidden]) ~ :not([hidden]),
html.dark .divide-gray-200 > :not([hidden]) ~ :not([hidden]) { border-color: #374151 !important; }

html.dark .shadow,
html.dark .shadow-sm { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important; }

html.dark input:not([type="checkbox"]):not([type="radio"]),
html.dark select,
html.dark textarea {
    background-color: #111827 !important;
    color: #e5e7eb !important;
    border-color: #4b5563 !important;
}
html.dark input::placeholder,
html.dark textarea::placeholder { color: #6b7280 !important; }

html.dark .hover\:bg-gray-50:hover,
html.dark .hover\:bg-gray-100:hover { background-color: #374151 !important; }

html.dark .bg-blue-50 { background-color: #172554 !important; }
html.dark .bg-blue-100 { background-color: #1e3a8a !important; }
html.dark .text-blue-600, html.dark a.text-blue-600 { color: #7aa9f7 !important; }
html.dark .text-blue-700, html.dark .text-blue-800, html.dark .hover\:text-blue-800:hover { color: #a9c6f8 !important; }
html.dark .border-blue-100 { border-color: #1e3a8a !important; }

html.dark .badge-neutral, html.dark .badge-muted { background: #374151; color: #e5e7eb; }
html.dark .badge-stage-1 { background: #1e2a3d; color: #c7dbf7; }
html.dark .badge-stage-2 { background: #1b2b47; color: #bcd5f7; }
html.dark .badge-stage-3 { background: #1a2d52; color: #b2cff6; }
html.dark .badge-stage-4 { background: #182f5c; color: #a9c9f6; }
html.dark .badge-stage-5 { background: #173066; color: #a0c4f5; --badge-dot: #6da7ec; }
html.dark .badge-done { background: #14532d; color: #bbf7d0; }
html.dark .badge-waiting { background: #78350f; color: #fde68a; }
html.dark .badge-stopped { background: #7f1d1d; color: #fecaca; }

html.dark .chip, html.dark .status-tile, html.dark .funnel-stage { background: #1f2937; border-color: #374151; color: #e5e7eb; }
html.dark .chip-active { background: var(--iih-blue); border-color: var(--iih-blue); color: #fff; }
html.dark .funnel-stage { border-top-color: var(--funnel-accent, #4b5563); }
html.dark .pipeline-current .pipeline-marker { background: var(--iih-blue); border-color: var(--iih-blue); box-shadow: 0 0 0 4px #172554; }
html.dark .funnel-count { color: #f3f4f6; }
html.dark .funnel-label { color: #d1d5db; }
html.dark .step-number { background: #172554; color: #a9c6f8; }
html.dark .stepper-marker, html.dark .pipeline-marker { background: #1f2937; border-color: #4b5563; }
html.dark .stepper-label { color: #f3f4f6; }
html.dark .stepper-done .stepper-marker, html.dark .pipeline-done .pipeline-marker { background: var(--iih-blue); border-color: var(--iih-blue); color: #fff; }
html.dark .stepper-step:not(:last-child)::after, html.dark .pipeline-step:not(:last-child)::after { background: #374151; }
html.dark .stepper-done:not(:last-child)::after, html.dark .pipeline-done:not(:last-child)::after { background: var(--iih-blue); }
html.dark .pipeline-done .pipeline-label { color: #f3f4f6; }

/* Chart ramp for the dark surface: same hue, stepped for dark (validated separately). */
html.dark {
    --viz-pending: #184f95;
    --viz-approved: #2a78d6;
    --viz-settled: #6da7ec;
    --viz-paid: #b7d3f6;
    --viz-surface: #1f2937;
    --viz-grid: #374151;
}
html.dark .viz-legend, html.dark .viz-axis, html.dark .viz-label { color: #9ca3af; }
html.dark .plan-option:has(input:checked) { background: #172554; }
html.dark .public-panel { background-image: linear-gradient(160deg, #123d92 0%, #0b2a6b 100%); }

/* ============================================================
   Form controls: our own look instead of the browser's, everywhere. portal.js turns every
   select into a dropdown and every date field into a date picker; the original field stays in
   the form, hidden. Checkboxes, radio buttons and search fields are styled here.
   ============================================================ */
input[type="checkbox"], input[type="radio"] {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    display: inline-block; flex-shrink: 0; vertical-align: middle;
    width: 1rem; height: 1rem;
    border: 1.5px solid #9ca3af; background-color: #fff;
    background-position: center; background-repeat: no-repeat; background-size: 100% 100%;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="checkbox"] { border-radius: 0.3rem; }
input[type="radio"] { border-radius: 9999px; }
input[type="checkbox"]:hover:not(:disabled), input[type="radio"]:hover:not(:disabled) { border-color: var(--iih-blue); }
input[type="checkbox"]:checked {
    background-color: var(--iih-blue); border-color: var(--iih-blue);
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
}
input[type="checkbox"]:indeterminate {
    background-color: var(--iih-blue); border-color: var(--iih-blue);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");
}
input[type="radio"]:checked { background-color: var(--iih-blue); border-color: var(--iih-blue); box-shadow: inset 0 0 0 3px #fff; }
input[type="checkbox"]:focus, input[type="radio"]:focus { outline: none; }
input[type="checkbox"]:focus-visible { box-shadow: 0 0 0 3px rgba(20, 90, 226, 0.3); }
input[type="radio"]:focus-visible { box-shadow: 0 0 0 3px rgba(20, 90, 226, 0.3); }
input[type="radio"]:checked:focus-visible { box-shadow: inset 0 0 0 3px #fff, 0 0 0 3px rgba(20, 90, 226, 0.3); }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: 0.5; cursor: not-allowed; }
/* The label of a checkbox that cannot be ticked now (data-enabled-by in portal.js). */
label.is-disabled { opacity: 0.55; cursor: not-allowed; }
input[type="checkbox"][aria-invalid="true"], input[type="radio"][aria-invalid="true"] { border-color: #ef4444; }

input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none; appearance: none; width: 1rem; height: 1rem; cursor: pointer;
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%239ca3af'%3e%3cpath fill-rule='evenodd' d='M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z' clip-rule='evenodd'/%3e%3c/svg%3e") center / contain no-repeat;
}

/* Dropdowns and date pickers (portal.js). */
.cfield { position: relative; display: block; }
.cfield-auto { display: inline-block; vertical-align: middle; }
.cfield-native {
    position: absolute !important; width: 1px !important; height: 1px !important; min-width: 0 !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important;
    opacity: 0; pointer-events: none; overflow: hidden;
}
.cfield-control {
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
    width: 100%; min-height: 2.375rem; padding: 0.5rem 0.75rem;
    background-color: #fff; border: 1px solid #d1d5db; border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    font-size: 0.875rem; line-height: 1.25rem; color: #111827; text-align: left;
    cursor: pointer; user-select: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cfield-control:hover { border-color: #9ca3af; }
.cfield-control:focus, .cfield-control.is-focused, .cfield.is-open .cfield-control {
    outline: none; border-color: var(--iih-blue); box-shadow: 0 0 0 3px rgba(20, 90, 226, 0.18);
}
.cfield-control.is-invalid { border-color: #ef4444; }
.cfield-control.is-invalid:focus, .cfield.is-open .cfield-control.is-invalid { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18); }
.cfield-control.is-placeholder .cfield-value { color: #6b7280; }
.cfield-control.is-disabled, .cfield-control:disabled { background-color: #f3f4f6; color: #6b7280; cursor: not-allowed; }
.cfield-value { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfield-icon { flex-shrink: 0; width: 1.125rem; height: 1.125rem; color: #6b7280; transition: transform 0.15s ease; }
.cselect.is-open .cfield-icon { transform: rotate(180deg); }
.cdate.has-clear .cfield-value { padding-right: 1.5rem; }
.cdate-clear {
    position: absolute; top: 50%; right: 2.25rem; transform: translateY(-50%);
    width: 1.375rem; height: 1.375rem; padding: 0.1875rem; border-radius: 9999px; color: #9ca3af;
}
.cdate-clear:hover { color: #374151; background-color: #f3f4f6; }
.cdate-clear svg { width: 100%; height: 100%; }

.cpopup {
    position: fixed; z-index: 70; max-width: calc(100vw - 16px);
    background-color: #fff; border: 1px solid #e5e7eb; border-radius: 0.625rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.08);
    padding: 0.25rem; font-size: 0.875rem; line-height: 1.25rem; color: #111827;
}
.cselect-list { max-height: 16rem; overflow-y: auto; overscroll-behavior: contain; }
.cselect-search {
    display: block; width: 100%; margin-bottom: 0.25rem; padding: 0.5rem 0.625rem;
    border: 1px solid #e5e7eb; border-radius: 0.375rem; background-color: #f9fafb; font-size: 0.875rem;
}
.cselect-search:focus { outline: none; border-color: var(--iih-blue); background-color: #fff; }
.cselect-option {
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
    padding: 0.5rem 0.625rem; border-radius: 0.375rem; cursor: pointer;
}
.cselect-option.is-active { background-color: var(--iih-blue-50); }
.cselect-option.is-placeholder { color: #6b7280; }
.cselect-option[aria-selected="true"] { color: var(--iih-blue); font-weight: 600; }
.cselect-option[aria-disabled="true"] { color: #9ca3af; cursor: not-allowed; }
.cselect-check { flex-shrink: 0; width: 1rem; height: 1rem; visibility: hidden; }
.cselect-option[aria-selected="true"] .cselect-check { visibility: visible; }
.cselect-empty { padding: 0.5rem 0.625rem; color: #6b7280; }

.cdate-popup { width: 18.5rem; padding: 0.75rem; }
.cdate-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.cdate-title { font-weight: 600; }
.cdate-title::first-letter { text-transform: uppercase; }
.cdate-nav {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; border-radius: 0.375rem; color: #4b5563;
}
.cdate-nav:hover:not(:disabled) { background-color: #f3f4f6; color: #111827; }
.cdate-nav:disabled { opacity: 0.35; cursor: not-allowed; }
.cdate-nav svg { width: 1.25rem; height: 1.25rem; }
.cdate-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.125rem; }
.cdate-weekday { padding: 0.25rem 0; text-align: center; font-size: 0.75rem; font-weight: 600; color: #6b7280; }
.cdate-day { height: 2.25rem; border-radius: 0.375rem; color: #111827; font-variant-numeric: tabular-nums; }
.cdate-day:hover:not(:disabled) { background-color: var(--iih-blue-50); }
.cdate-day.is-outside { color: #9ca3af; }
.cdate-day.is-today { color: var(--iih-blue); font-weight: 700; box-shadow: inset 0 0 0 1px var(--iih-blue-100); }
.cdate-day.is-selected { background-color: var(--iih-blue); color: #fff; font-weight: 600; box-shadow: none; }
.cdate-day:disabled { color: #d1d5db; cursor: not-allowed; }
.cdate-day:focus, .cdate-nav:focus, .cdate-link:focus { outline: none; }
.cdate-day:focus-visible, .cdate-nav:focus-visible, .cdate-link:focus-visible { outline: 2px solid var(--iih-blue); outline-offset: 1px; }
.cdate-foot { display: flex; justify-content: space-between; margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid #f3f4f6; }
.cdate-link { padding: 0.25rem 0.5rem; border-radius: 0.375rem; font-weight: 500; color: var(--iih-blue); }
.cdate-link:hover:not(:disabled) { background-color: var(--iih-blue-50); }
.cdate-link:disabled { color: #9ca3af; cursor: not-allowed; }

html.dark input[type="checkbox"], html.dark input[type="radio"] { background-color: #111827; border-color: #6b7280; }
html.dark input[type="checkbox"]:checked, html.dark input[type="checkbox"]:indeterminate { background-color: var(--iih-blue); border-color: var(--iih-blue); }
html.dark input[type="radio"]:checked { background-color: var(--iih-blue); border-color: var(--iih-blue); box-shadow: inset 0 0 0 3px #111827; }
html.dark input[type="radio"]:checked:focus-visible { box-shadow: inset 0 0 0 3px #111827, 0 0 0 3px rgba(122, 169, 247, 0.4); }
html.dark .cfield-control { background-color: #111827; border-color: #4b5563; color: #e5e7eb; box-shadow: none; }
html.dark .cfield-control:hover { border-color: #6b7280; }
html.dark .cfield-control:focus, html.dark .cfield-control.is-focused, html.dark .cfield.is-open .cfield-control { border-color: #7aa9f7; box-shadow: 0 0 0 3px rgba(122, 169, 247, 0.25); }
html.dark .cfield-control.is-invalid { border-color: #f87171; }
html.dark .cfield-control.is-placeholder .cfield-value, html.dark .cfield-icon { color: #9ca3af; }
html.dark .cfield-control.is-disabled, html.dark .cfield-control:disabled { background-color: #1f2937; color: #6b7280; }
html.dark .cdate-clear:hover { color: #e5e7eb; background-color: #374151; }
html.dark .cpopup { background-color: #1f2937; border-color: #374151; color: #e5e7eb; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); }
html.dark .cselect-search { background-color: #111827 !important; border-color: #374151 !important; color: #e5e7eb !important; }
html.dark .cselect-option.is-active, html.dark .cdate-day:hover:not(:disabled), html.dark .cdate-link:hover:not(:disabled) { background-color: #172554; }
html.dark .cselect-option[aria-selected="true"], html.dark .cdate-link, html.dark .cdate-day.is-today { color: #a9c6f8; }
html.dark .cselect-option.is-placeholder, html.dark .cselect-empty, html.dark .cdate-weekday, html.dark .cdate-day.is-outside { color: #9ca3af; }
html.dark .cdate-day { color: #e5e7eb; }
html.dark .cdate-day.is-today { box-shadow: inset 0 0 0 1px #1e3a8a; }
html.dark .cdate-day.is-selected { background-color: var(--iih-blue); color: #fff; box-shadow: none; }
html.dark .cdate-day:disabled { color: #4b5563; }
html.dark .cdate-nav { color: #9ca3af; }
html.dark .cdate-nav:hover:not(:disabled) { background-color: #374151; color: #f3f4f6; }
html.dark .cdate-foot { border-top-color: #374151; }
html.dark .cdate-link:disabled { color: #4b5563; }
html.dark .stepper-current .stepper-marker { box-shadow: 0 0 0 4px #172554; }
html.dark .stepper-upcoming .stepper-label { color: #9ca3af; }
html.dark .stepper-compact .stepper-current .stepper-marker { background: var(--iih-blue); border-color: var(--iih-blue); color: #fff; box-shadow: 0 0 0 3px #172554; }

/* Password rules under a new-password field (uiPasswordRules), green once met. */
.pw-rules { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.5rem; }
.pw-rules li {
    display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.125rem 0.5rem;
    border-radius: 9999px; background: #f3f4f6; color: #6b7280; font-size: 0.75rem; line-height: 1.25rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.pw-rule-icon { width: 0.875rem; height: 0.875rem; opacity: 0.35; }
.pw-rules li.is-met { background: #dcfce7; color: #166534; }
.pw-rules li.is-met .pw-rule-icon { opacity: 1; }
html.dark .pw-rules li { background: #1f2937; color: #9ca3af; }
html.dark .pw-rules li.is-met { background: #14532d; color: #bbf7d0; }

/* Two-factor sign-in: the code field, the QR code (always on white, so phones can read it) and the
   recovery codes. */
.code-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.15em; }
.two-factor-qr { width: 10rem; height: 10rem; flex-shrink: 0; padding: 0.5rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 0.5rem; }
html.dark .two-factor-qr { background: #fff; border-color: #374151; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; max-width: 24rem; }
.recovery-codes li {
    padding: 0.5rem 0.75rem; border-radius: 0.375rem; background: #f3f4f6; color: #111827; text-align: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.875rem; letter-spacing: 0.05em;
}
html.dark .recovery-codes li { background: #1f2937; color: #e5e7eb; }

/* A payout that waits for the partner's invoice (uiInvoicesAwaited()). */
.invoice-awaited { display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 1rem; border: 1px solid #fde68a; border-radius: 0.5rem; background: #fffbeb; color: #92400e; font-size: 0.875rem; transition: border-color 0.15s; }
.invoice-awaited:hover { border-color: #f59e0b; }
.invoice-awaited-cta { display: inline-flex; align-items: center; gap: 0.25rem; flex-shrink: 0; font-weight: 600; }
html.dark .invoice-awaited { background: #422006; border-color: #92400e; color: #fde68a; }

/* Extras on an order for a customer (order_new.php): a card per extra, a stepper for the number.
   :not(.hidden), so Tailwind's .hidden still hides an extra's stepper while it is not ticked. */
.addon-option { display: flex; flex-direction: column; gap: 0.625rem; padding: 0.625rem 0.75rem; border: 1px solid #e5e7eb; border-radius: 0.375rem; transition: border-color 0.15s, background-color 0.15s; }
.addon-option:hover { background: #f9fafb; }
.addon-option.is-on { border-color: var(--iih-blue); background: var(--iih-blue-50); }
.qty-stepper:not(.hidden) { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding-left: 1.75rem; }
.qty-button { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 9999px; border: 1px solid #d1d5db; background: #fff; color: #374151; font-size: 1.125rem; line-height: 1; }
.qty-button:hover { border-color: var(--iih-blue); color: var(--iih-blue); }
.qty-button[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }
.qty-value { width: 3rem; height: 2rem; padding: 0; text-align: center; border: 1px solid #d1d5db; border-radius: 0.375rem; background: #fff; color: #111827; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.qty-value::-webkit-outer-spin-button, .qty-value::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-value:focus { outline: none; border-color: var(--iih-blue); box-shadow: 0 0 0 3px rgba(20, 90, 226, 0.18); }
html.dark .addon-option { border-color: #374151; }
html.dark .addon-option:hover { background: #111827; }
html.dark .addon-option.is-on { border-color: #7aa9f7; background: #172554; }
html.dark .qty-button, html.dark .qty-value { background: #111827; border-color: #4b5563; color: #e5e7eb; }

/* ============================================================
   Marketing library: marketing.php (partners), marketing_manage.php and marketing_edit.php (staff).
   Cards with a preview per kind, a dialog for the large view, the upload and text editor.
   ============================================================ */
.library-toolbar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0 1rem; }
.library-toolbar-side { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.library-languages { display: inline-flex; flex-wrap: wrap; padding: 0.1875rem; border-radius: 9999px; background: #fff; border: 1px solid #d1d5db; }
.library-languages a { padding: 0.25rem 0.625rem; border-radius: 9999px; font-size: 0.8125rem; font-weight: 500; color: #4b5563; }
.library-languages a:hover { color: #111827; }
.library-languages a[aria-current="page"] { background: var(--iih-blue-50); color: var(--iih-blue); }
.library-search { position: relative; }
.library-search-icon { position: absolute; left: 0.75rem; top: 50%; width: 1rem; height: 1rem; margin-top: -0.5rem; color: #9ca3af; pointer-events: none; }
.library-search input { width: 14rem; max-width: 100%; height: 2.25rem; padding: 0 0.875rem 0 2.25rem; border: 1px solid #d1d5db; border-radius: 9999px; background: #fff; font-size: 0.875rem; color: #111827; }
.library-search input:focus { outline: none; border-color: var(--iih-blue); box-shadow: 0 0 0 3px rgba(20, 90, 226, 0.18); }

.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 1.25rem; }
.asset-card {
    display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid #e5e7eb; border-radius: 0.75rem;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04); transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.asset-card:hover { border-color: #c7d7f8; box-shadow: 0 12px 28px rgba(17, 24, 39, 0.1); transform: translateY(-2px); }
.asset-card.is-draft { border-style: dashed; border-color: #9ca3af; }
.asset-card.is-draft .asset-preview > img, .asset-card.is-draft .asset-preview > video, .asset-card.is-draft .asset-text-preview { opacity: 0.6; }
.asset-preview { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; overflow: hidden; background: #f3f4f6; }
.asset-preview.is-openable { cursor: zoom-in; }
/* Never crop: the whole image or video frame is shown, a blurred copy of the image fills the rest. */
.asset-preview > img, .asset-preview > video { position: relative; width: 100%; height: 100%; object-fit: contain; }
.asset-preview > img.asset-backdrop { position: absolute; inset: 0; object-fit: cover; filter: blur(18px) saturate(1.1); transform: scale(1.2); opacity: 0.85; transition: transform 0.4s ease; }
.asset-card:hover .asset-preview > img.asset-backdrop { transform: scale(1.28); }
.asset-card.is-draft .asset-preview > img.asset-backdrop { opacity: 0.4; }
.asset-preview.is-contain, .asset-dialog-media.is-contain {
    background-color: #fff;
    background-image: linear-gradient(45deg, #eef0f3 25%, transparent 25%), linear-gradient(-45deg, #eef0f3 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #eef0f3 75%), linear-gradient(-45deg, transparent 75%, #eef0f3 75%);
    background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.asset-preview.is-contain > img { object-fit: contain; padding: 1.25rem; }
.asset-tile { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; color: #fff; }
.asset-tile-ext { padding: 0.125rem 0.5rem; border-radius: 9999px; background: rgba(255, 255, 255, 0.22); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; }
.asset-kind-pdf { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.asset-kind-archive { background: linear-gradient(135deg, #64748b, #334155); }
.asset-kind-design { background: linear-gradient(135deg, #a855f7, #6d28d9); }
.asset-kind-document { background: linear-gradient(135deg, #f59e0b, #c2410c); }
.asset-kind-video { background: #0f172a; }
.asset-kind-text { align-items: flex-start; padding: 1rem; background: linear-gradient(160deg, var(--iih-blue-50), #fff); }
.asset-text-preview {
    width: 100%; max-height: 100%; overflow: hidden; padding: 0.875rem 1rem; border-radius: 0.875rem 0.875rem 0.875rem 0.25rem;
    background: #fff; border: 1px solid var(--iih-blue-100); box-shadow: 0 4px 12px rgba(20, 90, 226, 0.08);
    font-size: 0.8125rem; line-height: 1.35rem; color: #374151; overflow-wrap: anywhere;
    -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent); mask-image: linear-gradient(180deg, #000 72%, transparent);
}
.asset-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, 0.92); pointer-events: none; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35)); transition: transform 0.2s ease; }
.asset-card:hover .asset-play { transform: scale(1.08); }
.asset-flags { position: absolute; top: 0.625rem; left: 0.625rem; display: flex; flex-wrap: wrap; gap: 0.375rem; pointer-events: none; }
.asset-flag { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.125rem 0.5rem; border-radius: 9999px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.02em; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
.asset-flag-new { background: #16a34a; color: #fff; }
.asset-flag-featured { background: #fbbf24; color: #78350f; }
.asset-flag-draft { background: #111827; color: #fff; }
.asset-body { display: flex; flex: 1; flex-direction: column; padding: 1rem 1.125rem 1.125rem; }
.asset-category { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; font-weight: 500; color: var(--iih-blue); }
.asset-title { margin-top: 0.375rem; font-size: 0.9375rem; line-height: 1.35; font-weight: 600; color: #111827; overflow-wrap: anywhere; }
.asset-description { margin-top: 0.25rem; font-size: 0.8125rem; color: #6b7280; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.asset-meta { margin-top: 0.625rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.625rem; font-size: 0.75rem; color: #6b7280; }
.asset-lang { padding: 0 0.5rem; border-radius: 9999px; background: #f3f4f6; color: #4b5563; line-height: 1.25rem; }
.asset-usage { margin-top: 0.5rem; display: flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; color: #4b5563; }
.asset-actions { margin-top: auto; padding-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.asset-actions form { display: contents; }
.asset-button {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; padding: 0.4375rem 0.75rem; border-radius: 0.5rem;
    border: 1px solid #d1d5db; background: #fff; color: #374151; font-size: 0.8125rem; font-weight: 500; transition: background-color 0.15s, border-color 0.15s;
}
.asset-button:hover { background: #f9fafb; border-color: #9ca3af; }
.asset-button-primary { flex: 1; background: var(--iih-blue); border-color: var(--iih-blue); color: #fff; }
.asset-button-primary:hover { background: var(--iih-blue-hover); border-color: var(--iih-blue-hover); }
.asset-button-icon { flex: 0 0 auto; padding-left: 0.625rem; padding-right: 0.625rem; }
/* A partner's card: the main action and an icon on one row. Staff cards wrap (Edit, Publish, View). */
.asset-actions.is-compact { flex-wrap: nowrap; }
.asset-placeholder-chip { display: inline-block; padding: 0 0.375rem; border-radius: 0.25rem; background: var(--iih-blue-100); color: var(--iih-blue-800); font-size: 0.75em; font-weight: 600; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
    .asset-card, .asset-card:hover, .asset-card:hover .asset-play { transform: none; transition: none; }
    .asset-card:hover .asset-preview > img.asset-backdrop { transform: scale(1.2); transition: none; }
}

.asset-dialog { width: min(64rem, calc(100vw - 2rem)); max-width: none; max-height: calc(100vh - 2rem); padding: 0; border: 0; border-radius: 1rem; background: #fff; color: #111827; box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35); overflow: hidden; }
.asset-dialog::backdrop { background: rgba(17, 24, 39, 0.65); }
.asset-dialog[open] { animation: asset-dialog-in 0.18s ease-out; }
@keyframes asset-dialog-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .asset-dialog[open] { animation: none; } }
.asset-dialog-close { position: absolute; top: 0.75rem; right: 0.75rem; z-index: 2; display: flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 9999px; background: rgba(255, 255, 255, 0.92); color: #374151; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18); }
.asset-dialog-close:hover { background: #fff; color: #111827; }
.asset-dialog-body { display: grid; grid-template-columns: minmax(0, 1fr); max-height: calc(100vh - 2rem); overflow: auto; }
@media (min-width: 768px) { .asset-dialog-body { grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 1fr); } }
.asset-dialog-media { display: flex; align-items: center; justify-content: center; min-height: 16rem; max-height: calc(100vh - 2rem); background: #0f172a; }
.asset-dialog-media img { max-width: 100%; max-height: calc(100vh - 2rem); object-fit: contain; }
.asset-dialog-media.is-contain img { padding: 2rem; }
.asset-dialog-media video { width: 100%; max-height: calc(100vh - 2rem); background: #000; }
.asset-dialog-media.asset-kind-text { align-items: flex-start; padding: 2rem 1.5rem; overflow: auto; background: linear-gradient(160deg, var(--iih-blue-50), #fff); }
.asset-dialog-text { width: 100%; padding: 1.25rem 1.375rem; border-radius: 1rem 1rem 1rem 0.25rem; background: #fff; border: 1px solid var(--iih-blue-100); box-shadow: 0 6px 18px rgba(20, 90, 226, 0.1); font-size: 0.9375rem; line-height: 1.6; color: #1f2937; overflow-wrap: anywhere; }
.asset-dialog-side { display: flex; flex-direction: column; padding: 3rem 1.5rem 1.75rem; }
.asset-dialog-title { margin-top: 0.5rem; font-size: 1.25rem; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.asset-dialog-description { margin-top: 0.5rem; font-size: 0.875rem; color: #4b5563; }
.asset-dialog-side .asset-actions { margin-top: 1.5rem; padding-top: 0; }
/* A PDF: its first page on the card (over the tile), every page in the large view. */
.asset-preview > canvas.asset-pdf-thumb { position: absolute; top: 0; left: 0; width: 100% !important; height: auto; background: #fff; }
.asset-dialog-media.asset-kind-pdf { display: block; background: #525659; overflow: auto; }
.asset-dialog-pdf { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; min-height: 16rem; padding: 1rem; }
.asset-dialog-pdf > canvas { max-width: 100%; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
/* A payout's invoice, the chosen PDF before it is sent: its pages in a box that scrolls. */
.invoice-preview { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; max-height: 32rem; overflow: auto; padding: 1rem; border-radius: 0.5rem; background: #525659; }
.invoice-preview.hidden { display: none; }
.invoice-preview > canvas { max-width: 100%; height: auto; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
.asset-dialog-pdf > .order-spinner { margin-top: 7rem; }
.asset-dialog-pdf > iframe { width: 100%; height: calc(100vh - 6rem); border: 0; background: #fff; }

.kind-switch { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.75rem; }
.kind-option { cursor: pointer; }
.kind-option-box { display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 1rem; border: 1px solid #d1d5db; border-radius: 0.625rem; transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s; }
.kind-option:hover .kind-option-box { border-color: #9ca3af; }
.kind-option input:checked + .kind-option-box { border-color: var(--iih-blue); background: var(--iih-blue-50); box-shadow: 0 0 0 1px var(--iih-blue); }
.kind-option input:focus-visible + .kind-option-box { outline: 2px solid var(--iih-blue); outline-offset: 2px; }
.kind-option-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 2.25rem; height: 2.25rem; border-radius: 0.5rem; background: #f3f4f6; color: #4b5563; }
.kind-option input:checked + .kind-option-box .kind-option-icon { background: var(--iih-blue); color: #fff; }
.dropzone { position: relative; display: flex; align-items: center; gap: 1rem; padding: 1.25rem; border: 2px dashed #cbd5e1; border-radius: 0.75rem; background: #f8fafc; cursor: pointer; transition: border-color 0.15s, background-color 0.15s; }
.dropzone:hover, .dropzone.is-dragging { border-color: var(--iih-blue); background: var(--iih-blue-50); }
.dropzone.has-file { border-style: solid; border-color: #86efac; background: #f0fdf4; }
.dropzone.is-invalid { border-color: #ef4444; }
.dropzone:focus-within { outline: 2px solid var(--iih-blue); outline-offset: 2px; }
.dropzone-small { padding: 0.875rem 1rem; }
.dropzone-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 3rem; height: 3rem; border-radius: 9999px; background: #fff; color: var(--iih-blue); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.dropzone-small .dropzone-icon { width: 2.25rem; height: 2.25rem; }
.dropzone-text { min-width: 0; overflow-wrap: anywhere; }
.placeholder-button { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.3125rem 0.625rem; border-radius: 9999px; border: 1px solid var(--iih-blue-100); background: var(--iih-blue-50); color: var(--iih-blue); font-size: 0.8125rem; font-weight: 500; }
.placeholder-button:hover { border-color: var(--iih-blue); }
.text-preview { min-height: 4rem; padding: 1rem 1.125rem; border-radius: 0.875rem 0.875rem 0.875rem 0.25rem; background: linear-gradient(160deg, var(--iih-blue-50), #fff); border: 1px solid var(--iih-blue-100); font-size: 0.875rem; line-height: 1.55; color: #1f2937; white-space: pre-wrap; overflow-wrap: anywhere; }
.text-preview mark { padding: 0 0.125rem; border-radius: 0.125rem; background: #fef08a; color: inherit; }

html.dark .library-languages, html.dark .library-search input { background: #1f2937; border-color: #374151; color: #e5e7eb; }
html.dark .library-languages a { color: #9ca3af; }
html.dark .library-languages a:hover { color: #f3f4f6; }
html.dark .library-languages a[aria-current="page"] { background: #172554; color: #a9c6f8; }
html.dark .asset-card { background: #1f2937; border-color: #374151; }
html.dark .asset-card:hover { border-color: #4b6aa8; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45); }
html.dark .asset-card.is-draft { border-color: #6b7280; }
html.dark .asset-preview { background-color: #111827; }
html.dark .asset-preview.is-contain, html.dark .asset-dialog-media.is-contain { background-color: #f9fafb; }
html.dark .asset-title { color: #f3f4f6; }
html.dark .asset-description, html.dark .asset-meta, html.dark .asset-usage, html.dark .asset-dialog-description { color: #9ca3af; }
html.dark .asset-lang { background: #374151; color: #d1d5db; }
html.dark .asset-category { color: #7aa9f7; }
html.dark .asset-button { background: #111827; border-color: #4b5563; color: #e5e7eb; }
html.dark .asset-button:hover { background: #374151; }
html.dark .asset-button-primary, html.dark .asset-button-primary:hover { background: var(--iih-blue); border-color: var(--iih-blue); color: #fff; }
html.dark .asset-kind-text, html.dark .asset-dialog-media.asset-kind-text { background: linear-gradient(160deg, #172554, #1f2937); }
html.dark .asset-text-preview, html.dark .asset-dialog-text { background: #111827; border-color: #1e3a8a; color: #e5e7eb; }
html.dark .asset-placeholder-chip { background: #1e3a8a; color: #dbeafe; }
html.dark .asset-dialog { background: #1f2937; color: #f3f4f6; }
html.dark .asset-dialog-close { background: rgba(31, 41, 55, 0.92); color: #e5e7eb; }
html.dark .kind-option-box { border-color: #4b5563; }
html.dark .kind-option input:checked + .kind-option-box { background: #172554; }
html.dark .kind-option-icon { background: #374151; color: #d1d5db; }
html.dark .dropzone { background: #111827; border-color: #4b5563; }
html.dark .dropzone:hover, html.dark .dropzone.is-dragging { background: #172554; border-color: #7aa9f7; }
html.dark .dropzone.has-file { background: #052e16; border-color: #166534; }
html.dark .dropzone-icon { background: #1f2937; color: #7aa9f7; }
html.dark .placeholder-button { background: #172554; border-color: #1e3a8a; color: #a9c6f8; }
html.dark .text-preview { background: linear-gradient(160deg, #172554, #111827); border-color: #1e3a8a; color: #e5e7eb; }
html.dark .text-preview mark { background: #854d0e; color: #fef9c3; }
