/* ═══════════════════════════════════════════════════════════════════════
   lexend-legacy.css — the site's own component vocabulary (cp-*, mk-*,
   ad-*), restyled in the Lexend idiom.

   Request Demo, the Account pages and the whole Admin console are built
   from these classes rather than Tailwind utilities, and they carry the
   form wiring (@bind-Value, ValidationMessage, EditForm). Rewriting that
   markup buys nothing visually and risks the bindings, so the classes are
   redefined here instead: same HTML, Lexend look.

   Loaded after lexend.css and after Tailwind's site.css, and it replaces
   Styles/legacy.css — remove that file's rules for these classes once this
   is in.
   ═══════════════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════════════
   Legacy palette variables, repointed at the Lexend theme.

   Every rule in Styles/legacy.css reads its colours from these (--ap-orange
   was #864ffe — a purple, which is why the notice and reseller buttons came
   out violet). Redefining the variables fixes buttons, panels, borders and
   muted text everywhere at once, so individual rules do not have to be
   chased with !important.
   ═══════════════════════════════════════════════════════════════════════ */
:root {
    --ap-orange:       #e07a3a;
    --ap-orange-soft:  #fdf2ec;
    --ap-orange-text:  #c96728;
    --ap-on-accent:    #ffffff;

    --ap-bg:      #ffffff;
    --ap-bg2:     #fdf2ec;
    --ap-panel:   #ffffff;
    --ap-panel2:  #fdf2ec;

    --ap-text:    #2b2118;
    --ap-muted:   rgba(43, 33, 24, .65);
    --ap-dim:     rgba(43, 33, 24, .50);

    --ap-border:  rgba(43, 33, 24, .10);
    --ap-border2: rgba(43, 33, 24, .18);

    --ap-ink:        #2b2118;
    --ap-ink2:       #221a13;
    --ap-ink3:       #2f251b;
    --ap-ink-text:   #fdf2ec;
    --ap-ink-muted:  rgba(253, 242, 236, .70);
    --ap-ink-dim:    rgba(253, 242, 236, .55);
    --ap-ink-border: rgba(253, 242, 236, .18);

    --ap-sans: 'PolySans', 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --ap-r:    12px;
    --ap-r-sm: 10px;
    --ap-r-lg: 16px;
}


:root {
    --cp-radius: 12px;
    --cp-border: rgba(43, 33, 24, .12);
    --cp-border-soft: rgba(43, 33, 24, .07);
    --cp-ink: #2b2118;
    --cp-ink-soft: rgba(43, 33, 24, .65);
    --cp-surface: #fff;
    --cp-surface-2: #fdf2ec;
    /* Inputs and plain buttons paint from these, so the dark block below can
       repoint them. They were a hard-coded #fff, which left light text on a
       white field in dark mode. */
    --cp-field-bg: #fff;
    --cp-btn-bg: #fff;
    --cp-btn-hover-bg: #fff;
}

/* ── Page shells ─────────────────────────────────────────────────────── */
/* padding-top clears the floating header; legacy.css sets 36px, which puts
   the page title behind it. */
.cp-page,
.mk-admin-page { max-width: 1290px; margin: 0 auto; padding: 120px 24px 64px !important; }
.mk-admin-page > h1, .cp-page > h1 { color: var(--cp-ink); font-size: 1.75rem; margin: 0 0 8px; }
.mk-admin-wide { max-width: 1600px; }
/* !important: legacy.css sets 56px here and its media query sets 40px, which
   puts the page title behind the floating header. */
.mk-demo { max-width: 1290px; margin: 0 auto; padding: 140px 24px 64px !important;
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 992px) { .mk-demo { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }

.mk-demo-head { margin-bottom: 24px; }
/* These inherit a near-white colour from the old sheets. */
.mk-demo-head h1 { font-size: 2.5rem; line-height: 1.1; margin: 8px 0 12px; color: var(--cp-ink) !important; }
.mk-demo-head p, .mk-aside p, .mk-aside li { color: var(--cp-ink-soft) !important; }
.mk-aside h2, .mk-aside h3, .mk-aside strong, .cp-card h2, .cp-card h3 { color: var(--cp-ink) !important; }
.mk-demo-head p { color: var(--cp-ink-soft); font-size: 1.0625rem; margin: 0; }
.mk-eyebrow { color: var(--color-primary); font-weight: 700; font-size: .875rem; }

/* ── Cards ───────────────────────────────────────────────────────────── */
.cp-card,
.ad-card,
.ad-pane {
    background: var(--cp-surface);
    border: 1px solid var(--cp-border-soft);
    border-radius: var(--cp-radius);
    padding: 24px;
}
.ad-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.ad-card-body { display: flex; flex-direction: column; gap: 6px; }
.ad-card-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--cp-surface-2);
    color: var(--color-primary); display: inline-flex; align-items: center; justify-content: center; }
.ad-card-icon svg { width: 20px; height: 20px; }
.ad-card-go { color: var(--color-primary); font-weight: 500; font-size: .875rem; }

.cp-hr { border: 0; border-top: 1px solid var(--cp-border-soft); margin: 20px 0; }

/* ── Forms ───────────────────────────────────────────────────────────── */
.cp-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.cp-field > label { font-size: .875rem; font-weight: 500; color: var(--cp-ink); }
.mk-form-row { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .mk-form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.cp-input,
.cp-textarea,
.ad-form input,
.ad-form select,
.ad-form textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    font: inherit;
    font-size: .9375rem;
    color: var(--cp-ink);
    background: var(--cp-field-bg);
    border: 1px solid var(--cp-border);
    border-radius: 10px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.cp-textarea, .ad-form textarea { min-height: 110px; resize: vertical; }
/* The .ad-form rule above is meant for text-like fields. A checkbox or radio
   caught by it stretched to the full row and 44px tall. */
.ad-form input[type="checkbox"],
.ad-form input[type="radio"] {
    width: 18px; height: 18px; min-height: 0; padding: 0; flex: none;
    accent-color: var(--color-primary);
}
/* Fields inside a table row: a little shorter, so a grid of them stays readable. */
.ad-compact input, .ad-compact select { min-height: 38px; padding: 7px 10px; }
.cp-input:focus,
.cp-textarea:focus,
.ad-form input:focus,
.ad-form select:focus,
.ad-form textarea:focus {
    outline: 0;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(224, 122, 58, .15);
}
.cp-input[disabled], .cp-input[readonly],
.ad-form input[disabled], .ad-form select[disabled], .ad-form textarea[disabled] { background: var(--cp-surface-2); color: var(--cp-ink-soft); }
select.cp-input { appearance: auto; }

.cp-check { display: inline-flex; align-items: flex-start; gap: 8px; font-size: .9375rem; color: var(--cp-ink); }
.cp-check input[type="checkbox"], .mk-check input[type="checkbox"] { margin-top: 3px; accent-color: var(--color-primary); }
.mk-check { display: flex; align-items: flex-start; gap: 8px; }

.mk-hint, .ad-kpi-sub { font-size: .8125rem; color: var(--cp-ink-soft); margin: 0; }
.cp-muted { color: var(--cp-ink-soft); }
.cp-mono, .ad-num { font-variant-numeric: tabular-nums; }
.cp-validation { color: #c0392b; font-size: .8125rem; }
.mk-privacy-note { font-size: .875rem; color: var(--cp-ink-soft); margin: 0 0 16px; }

/* The verification note: legacy.css gives it a lilac tint and a #dcd4ff border. */
.mk-form-note {
    background: var(--cp-surface-2) !important;
    border: 1px solid rgba(224, 122, 58, .30) !important;
    border-radius: var(--cp-radius) !important;
    color: var(--cp-ink) !important;
    padding: 12px 16px !important;
    font-size: .875rem;
    margin: 0 0 20px;
}
.mk-optional-section { border-top: 1px solid var(--cp-border-soft); margin-top: 20px; padding-top: 20px; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.cp-btn,
.cp-primary,
.ad-editor-actions button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 10px 20px;
    font: inherit; font-size: .9375rem; font-weight: 700;
    border-radius: 10px; border: 1px solid var(--cp-border);
    background: var(--cp-btn-bg); color: var(--cp-ink);
    cursor: pointer; text-decoration: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.cp-btn:hover { border-color: var(--cp-ink-soft); background: var(--cp-btn-hover-bg); }
.cp-primary { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.cp-primary:hover { background: #c96728; border-color: #c96728; color: #fff; }
.cp-btn-active, .cp-btn-active:hover { background: var(--cp-surface-2); border-color: var(--color-primary); color: var(--color-primary); }
.cp-btn-danger { background: #c0392b; border-color: #c0392b; color: #fff; }
.cp-btn-danger:hover { background: #a93226; border-color: #a93226; }
.cp-btn[disabled], .cp-primary[disabled] { opacity: .55; cursor: not-allowed; }

.cp-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }

/* ── Badges and alerts ───────────────────────────────────────────────── */
.cp-badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
    font-size: .75rem; font-weight: 500; background: var(--cp-surface-2); color: var(--cp-ink); }
.cp-badge-ok { background: rgba(46, 158, 91, .15); color: #23764a; }
.cp-badge-danger { background: rgba(192, 57, 43, .12); color: #a93226; }
.cp-badge-warn { background: rgba(224, 122, 58, .16); color: #a9531e; }

.mk-alert-ok, .mk-alert-err, .mk-alert-warn { padding: 14px 18px; border-radius: var(--cp-radius); margin-bottom: 20px; font-size: .9375rem; }
.mk-alert-ok { background: rgba(46, 158, 91, .12); color: #23764a; }
.mk-alert-err { background: rgba(192, 57, 43, .10); color: #a93226; }
.mk-alert-warn { background: rgba(224, 122, 58, .14); color: #8a4317; border-inline-start: 4px solid #e07a3a; }

/* ── Tables ──────────────────────────────────────────────────────────── */
.cp-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.cp-table th { text-align: start; font-weight: 700; color: var(--cp-ink);
    padding: 10px 12px; border-bottom: 2px solid var(--cp-border); white-space: nowrap; }
.cp-table td { padding: 10px 12px; border-bottom: 1px solid var(--cp-border-soft); color: var(--cp-ink); }
.cp-table tbody tr:hover td { background: rgba(224, 122, 58, .04); }
.cp-pager { display: flex; align-items: center; gap: 8px; margin-top: 16px; }

/* ── Overlays ────────────────────────────────────────────────────────── */
.cp-overlay-backdrop { position: fixed; inset: 0; background: rgba(43, 33, 24, .45); z-index: 2000; }
.cp-overlay { position: fixed; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
    width: min(680px, calc(100vw - 32px)); max-height: 86vh; overflow: auto;
    background: #fff; border-radius: 16px; padding: 24px; z-index: 1050;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
.cp-overlay { z-index: 2001; }

/* A fixed child cannot escape an ancestor that makes a stacking context. */
.uc-main { isolation: auto; }

/* ── Admin dashboard bits ────────────────────────────────────────────── */
.ad-kpis { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.ad-kpi { background: var(--cp-surface); border: 1px solid var(--cp-border-soft);
    border-radius: var(--cp-radius); padding: 18px 20px; }
.ad-kpi-label { font-size: .8125rem; color: var(--cp-ink-soft); }
.ad-kpi-money, .ad-kpi strong { font-size: 1.5rem; font-weight: 700; color: var(--cp-ink); }
.ad-section { margin-top: 32px; }
.ad-split { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 992px) { .ad-split { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ad-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ad-editor-head h1 { font-size: 1.6rem; margin: 0; }
.ad-editor-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* Title on the left, its action on the right. Without the flex the action
   button dropped under the title. */
.ad-pane-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    font-weight: 700; margin-bottom: 12px; }
.ad-pane-head h2, .ad-pane-head h3 { margin: 0; }
.ad-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--cp-border-soft); margin-bottom: 20px; }
.ad-tab { padding: 10px 16px; border: 0; background: none; cursor: pointer; font: inherit; font-weight: 500;
    color: var(--cp-ink-soft); border-bottom: 2px solid transparent; }
/* .on is what the merchant and store editors put on the open tab. */
.ad-tab[aria-selected="true"], .ad-tab.active, .ad-tab.on { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.ad-bar { background: var(--color-primary); border-radius: 4px; }
.ad-axis { font-size: .75rem; color: var(--cp-ink-soft); }
.ad-facts { display: grid; gap: 8px; }
.ad-rows { display: grid; gap: 6px; }
/* On a table that grid collapses the columns (the merchant list's header sat
   apart from its rows), so a table keeps table layout. Its rows are pickable;
   .ad-sel is the picked one. */
table.ad-rows { display: table; }
table.ad-rows tbody tr { cursor: pointer; }
.cp-table tr.ad-sel td, .cp-table tbody tr.ad-sel:hover td { background: rgba(224, 122, 58, .10); }
/* Cards one under another (the store editor's Subscription tab). */
.ad-stack { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.ad-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* ── Request Demo: reseller notice ───────────────────────────────────── */
/* Above the floating header (.uc-header is z-999 and paints over the panel
   otherwise — the language and account menus showed through it). */
.mk-notice-backdrop { position: fixed; inset: 0; background: rgba(43, 33, 24, .45); z-index: 2000 !important; }
.mk-notice { position: fixed; top: 0; inset-inline-end: 0; height: 100%; width: min(420px, 100vw);
    background: #fff; z-index: 2001 !important; padding: 32px 28px; overflow: auto;
    box-shadow: -12px 0 40px rgba(0, 0, 0, .18); display: flex; flex-direction: column; gap: 12px; }
.mk-notice h2 { font-size: 1.5rem; margin: 4px 0 0; }
.mk-notice p { color: var(--cp-ink-soft); margin: 0; }
.mk-notice-date { font-size: .8125rem; }
.mk-notice-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mk-notice-close { position: absolute; top: 14px; inset-inline-end: 16px; border: 0; background: none;
    font-size: 1.6rem; line-height: 1; color: var(--cp-ink-soft); cursor: pointer; }
.mk-notice-dismissed .mk-notice,
.mk-notice-dismissed .mk-notice-backdrop { display: none; }
[dir="rtl"] .mk-notice { box-shadow: 12px 0 40px rgba(0, 0, 0, .18); }

/* ── Request Demo: side panel ────────────────────────────────────────── */
.mk-aside .cp-card { position: sticky; top: 112px; }
.mk-checks { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.mk-checks li { display: flex; align-items: flex-start; gap: 8px; font-size: .9375rem; color: var(--cp-ink-soft); }
.mk-checks li::before { content: "✓"; color: var(--color-primary); font-weight: 700; }
.mk-aside-note { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--cp-border-soft);
    font-size: .875rem; color: var(--cp-ink-soft); }

/* ── Buttons carried over from the old marketing CSS ─────────────────── */
.ap-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 10px 20px; border-radius: 10px; font-weight: 700; font-size: .9375rem;
    text-decoration: none; border: 1px solid var(--cp-border); background: var(--cp-btn-bg); color: var(--cp-ink); cursor: pointer; }
.ap-btn-primary { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.ap-btn-primary:hover { background: #c96728; border-color: #c96728; color: #fff; }
.ap-btn-ghost { background: transparent; }

/* Backup upload: /backup-upload is on the template markup now; its bk-*
   hooks are styled in backup-upload.css. */

/* Any remaining indigo from the old sheets. */
.ap-btn-primary, .cp-primary, .btn-primary { background-color: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.ap-btn-primary:hover, .cp-primary:hover { background-color: #c96728; border-color: #c96728; }

/* Labels and hints must stay readable: the old sheets set them near-white. */
.cp-field > label, .ad-form label { color: var(--cp-ink) !important; opacity: 1 !important; }
.mk-hint, .cp-muted, .mk-form-note, .mk-privacy-note { color: var(--cp-ink-soft) !important; opacity: 1 !important; }

/* RTL: keep the wordmark reading "amigoPOS cloud". */
[dir="rtl"] .uc-logo a { direction: ltr; }

/* ── Belt and braces for the legacy purple ────────────────────────────
   The :root block above repoints --ap-orange, which covers every rule that
   reads the variable. legacy.css also hard-codes #864ffe / #7c31f6 / #6d1fe2
   in a few places (button hover, active, borders, the eyebrow), so those are
   named here explicitly. */
.ap-btn-primary,
.ap-btn-primary:hover,
.ap-btn-primary:active,
.cp-primary,
.cp-primary:hover {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #fff !important;
}
.ap-btn-primary:hover, .cp-primary:hover { background-color: #c96728 !important; border-color: #c96728 !important; }
.mk-eyebrow { color: var(--color-primary) !important; font-family: inherit !important; }

/* The notice heading inherits a near-white colour from the old sheet. */
.mk-notice h2, .mk-notice h3 { color: var(--cp-ink) !important; }
.mk-notice p, .mk-notice-date { color: var(--cp-ink-soft) !important; }

/* ═══════════════════════════════════════════════════════════════════════
   Tailwind theme variables — the same names, different meanings.

   site.css sets --color-secondary: #1a1a1c (its dark ink) and Lexend sets
   --color-secondary: #fdf2ec (the cream tint). Every Tailwind base rule that
   colours text through that variable therefore resolved to cream, which is
   why headings and values on the profile, account and admin pages were
   almost invisible. The purples are the same story: --color-primary-400..700
   are still the old violet ramp.

   Both are repointed here rather than in the theme, so Lexend's own use of
   --color-secondary (the cream bands) is untouched.
   ═══════════════════════════════════════════════════════════════════════ */
:root {
    --color-primary-50:  #fdf2ec;
    --color-primary-100: #fae0d0;
    --color-primary-200: #f4c3a3;
    --color-primary-300: #eda474;
    --color-primary-400: #e78c50;
    --color-primary-500: #e07a3a;
    --color-primary-600: #c96728;
    --color-primary-700: #a9531e;
    --color-primary-800: #874117;
    --color-primary-900: #6b3412;
}

/* The legacy page shells and everything in them take the ink colour: their
   markup relies on inheritance, and the inherited value is now cream. */
.mk-auth, .mk-admin-page, .cp-page, .mk-demo, .mk-profile,
.cp-card, .cp-overlay, .ad-pane, .ad-card, .ad-kpi { color: var(--cp-ink); }

.mk-auth h1, .mk-auth h2, .mk-auth h3,
.mk-admin-page h1, .mk-admin-page h2, .mk-admin-page h3, .mk-admin-page h4,
.cp-page h1, .cp-page h2, .cp-page h3,
.cp-card h1, .cp-card h2, .cp-card h3, .cp-card h4, .cp-card h5, .cp-card h6,
.ad-pane h2, .ad-pane h3, .ad-editor-head h1 { color: var(--cp-ink) !important; }

.cp-detail-list dd, .cp-card p, .cp-card li, .cp-card dd, .cp-card span,
.ad-pane p, .ad-pane li, .ad-facts div, .ad-rows div { color: inherit; }
.cp-detail-list dt { color: var(--cp-ink-soft); }

/* ── Shells, defined in full ──────────────────────────────────────────
   These carried their layout (display/flex/grid) in Styles/legacy.css. With
   that file out of the Tailwind build the layout has to live here, or the
   pages fall back to plain block flow and hug the left edge. */
.mk-auth {
    display: flex; flex-direction: column; align-items: center;
    padding: 140px 20px 64px;
    width: 100%;
}
.mk-auth > h1 { font-size: 1.75rem; margin: 0 0 22px; color: var(--cp-ink); }
.mk-auth .cp-card { width: 100%; }
.mk-profile { display: flex; flex-direction: column; gap: 24px; width: 100%; max-width: 640px; }

/* Remaining legacy bits. */
.cp-plan code { background: var(--cp-surface-2) !important; border: 1px solid var(--cp-border) !important; color: var(--cp-ink) !important; }
.cp-plan-keep { color: #23764a !important; }
.cp-plan-warn { color: #a9531e !important; font-weight: 600; }
.cp-color { border: 1px solid var(--cp-border) !important; border-radius: 10px; }
.ad-chart { width: 100%; height: 170px; display: block; margin-top: 8px; }
.ad-chan { white-space: nowrap; }
.cp-detail-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }

/* Browser autofill paints inputs pale blue; keep the field looking like a
   field. The huge inset shadow is the standard way to beat it. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-text-fill-color: var(--cp-ink);
    -webkit-box-shadow: 0 0 0 1000px var(--cp-surface, #fff) inset;
    box-shadow: 0 0 0 1000px var(--cp-surface, #fff) inset;
    caret-color: var(--cp-ink);
    caret-color: var(--cp-ink);
    transition: background-color 9999s ease-in-out 0s;
}

/* Password-rule list: no marker, aligned with the fields above it. */
.cp-card ul.cp-muted, .mk-auth ul { list-style: none; padding-inline-start: 0; margin: 8px 0 16px; }

/* ── Dark theme: the variables the admin pages and the reseller notice read.
   Scoped to html.uc-dark (see lexend-site.css for the mechanism). ──────── */
.uc-dark {
    --ap-orange-soft:  rgba(224, 122, 58, .16);
    --ap-on-accent:    #ffffff;
    --ap-bg:      #151312;
    --ap-bg2:     #241f1c;
    --ap-panel:   #1f1c1a;
    --ap-panel2:  #241f1c;
    --ap-text:    #ece6e0;
    --ap-muted:   rgba(236, 230, 224, .65);
    --ap-dim:     rgba(236, 230, 224, .50);
    --ap-border:  rgba(236, 230, 224, .12);
    --ap-border2: rgba(236, 230, 224, .20);
    --cp-border:      rgba(236, 230, 224, .14);
    --cp-border-soft: rgba(236, 230, 224, .08);
    --cp-ink:         #ece6e0;
    --cp-ink-soft:    rgba(236, 230, 224, .65);
    --cp-surface:     #1f1c1a;
    --cp-surface-2:   #241f1c;
    /* Same values the template's own dark fields (.form-control) and light
       buttons (.btn-light) use, so admin and public pages match. */
    --cp-field-bg:     #1a1716;
    --cp-btn-bg:       #2a2521;
    --cp-btn-hover-bg: #332d28;
}
/* A plain badge painted in --cp-surface-2, one step off the card it sits on,
   so it read as loose text. Declared before the coloured ones below so they
   still win. */
.uc-dark .cp-badge { background: rgba(236, 230, 224, .10); }
/* Status colours: the light-theme greens, reds and ambers are too dark to read
   on a dark surface. Same tints as .site-note-ok / .site-note-err. */
.uc-dark .cp-badge-ok, .uc-dark .mk-alert-ok { background: rgba(23, 162, 97, .16); color: #5fd39a; }
.uc-dark .cp-badge-danger, .uc-dark .mk-alert-err { background: rgba(228, 75, 75, .16); color: #ff8a8a; }
.uc-dark .cp-badge-warn { background: rgba(224, 122, 58, .18); color: #f0a273; }
.uc-dark .mk-alert-warn { background: rgba(224, 122, 58, .16); color: #f0a273; border-inline-start-color: #f0a273; }
.uc-dark .cp-validation { color: #ff8a8a; }
/* Autofilled sign-in / password fields: Chrome paints them with its own light
   colour unless the inset shadow says otherwise — this is why those two
   inputs stayed white in dark mode while the untouched ones went dark. */
.uc-dark input:-webkit-autofill,
.uc-dark input:-webkit-autofill:hover,
.uc-dark input:-webkit-autofill:focus,
.uc-dark textarea:-webkit-autofill,
.uc-dark select:-webkit-autofill {
    -webkit-text-fill-color: #ece6e0;
    -webkit-box-shadow: 0 0 0 1000px #1a1716 inset;
    box-shadow: 0 0 0 1000px #1a1716 inset;
    caret-color: #ece6e0;
}
.uc-dark .cp-overlay, .uc-dark .mk-notice { background: #1f1c1a; }
