/* ============================================================
   NessTech POS - Alternate color themes (v1.3.7).
   The active theme is set on <body data-theme="..."> (see
   Admin > Settings > Appearance). Only structural colors are
   overridden; layout and sizing stay identical.
   ============================================================ */

/* ---------- Emerald ---------- */
[data-theme="emerald"]{
    --navy:#0e3b2e; --navy-deep:#082820; --navy-soft:#155843;
    --blue:#0e9f6e; --blue-dark:#0b7a55; --blue-soft:#e8f6ef;
    --pos-navy:#082820; --pos-navy2:#0e3b2e;
    --pos-blue:#0e9f6e; --pos-blue-d:#0b7a55;
}
[data-theme="emerald"] ::selection{background:#cdeeda}

/* ---------- Maroon ---------- */
[data-theme="maroon"]{
    --navy:#4a1420; --navy-deep:#330d16; --navy-soft:#5e1b2a;
    --blue:#b03a5b; --blue-dark:#8f2c47; --blue-soft:#faeef2;
    --pos-navy:#330d16; --pos-navy2:#4a1420;
    --pos-blue:#b03a5b; --pos-blue-d:#8f2c47;
}
[data-theme="maroon"] ::selection{background:#f3d3de}

/* ---------- Dark (v1.3.8) ---------- */
[data-theme="dark"]{
    --navy:#0b1220; --navy-deep:#070d18; --navy-soft:#16233c;
    --blue:#5b8def; --blue-dark:#3f6fd1; --blue-soft:#1a2740;
    --bg:#0e1526; --card:#162032; --border:#263349; --border-soft:#1d2940;
    --text:#e6ecf5; --muted:#9fb0cc; --faint:#6b7d99;
    --green:#4ade80; --green-soft:#12351f;
    --red:#f87171; --red-soft:#3d1518;
    --amber:#fbbf24; --amber-soft:#3a2a10;
    --shadow:0 1px 2px rgba(0,0,0,.4);
    --shadow-lg:0 4px 14px rgba(0,0,0,.45);
    --pos-navy:#070d18; --pos-navy2:#0b1220;
    --pos-blue:#5b8def; --pos-blue-d:#3f6fd1;
    --pos-green:#4ade80; --pos-red:#f87171; --pos-amber:#fbbf24;
    --pos-border:#263349; --pos-bg:#0e1526; --pos-card:#162032;
    --pos-text:#e6ecf5; --pos-muted:#9fb0cc;
}
/* hard-coded light surfaces that variables don't reach */
[data-theme="dark"] .form-control,
[data-theme="dark"] .t-input,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] select,
[data-theme="dark"] textarea{background:#0e1526;border-color:#263349;color:#e6ecf5}
[data-theme="dark"] .form-control::placeholder{color:#6b7d99}
[data-theme="dark"] .pos-modal-box,
[data-theme="dark"] .split-editor,
[data-theme="dark"] .pc-price,
[data-theme="dark"] .fast-sell-strip{background:#162032}
[data-theme="dark"] .pos-modal-head{background:#101a2e}
[data-theme="dark"] .pm-btn,
[data-theme="dark"] .fs-btn,
[data-theme="dark"] .split-rm{background:#101a2e;border-color:#263349;color:#e6ecf5}
[data-theme="dark"] .tbl thead th{background:#101a2e;color:#9fb0cc}
[data-theme="dark"] .tbl td{border-color:#1d2940}
[data-theme="dark"] .p-card{background:#162032;border-color:#263349}
[data-theme="dark"] .pos-cart thead th{background:#101a2e}
[data-theme="dark"] .pos-cart td{border-color:#1d2940}
[data-theme="dark"] .login-form-side{background:#0e1526}
[data-theme="dark"] .skel-card{background:linear-gradient(90deg,#162032 25%,#1d2940 50%,#162032 75%);background-size:800px 100%}
[data-theme="dark"] ::selection{background:#27406b}

/* ---------- Royal Purple (v1.4.3) ---------- */
[data-theme="purple"]{
    --navy:#2e1065; --navy-deep:#1e0a45; --navy-soft:#3f1d8f;
    --blue:#7c3aed; --blue-dark:#6d28d9; --blue-soft:#f0e9fd;
    --pos-navy:#1e0a45; --pos-navy2:#2e1065;
    --pos-blue:#7c3aed; --pos-blue-d:#6d28d9;
}
[data-theme="purple"] ::selection{background:#e2d4fb}

/* ---------- Teal (v1.4.3) ---------- */
[data-theme="teal"]{
    --navy:#0c3a3a; --navy-deep:#072727; --navy-soft:#115050;
    --blue:#0d9488; --blue-dark:#0b7a70; --blue-soft:#e6f6f4;
    --pos-navy:#072727; --pos-navy2:#0c3a3a;
    --pos-blue:#0d9488; --pos-blue-d:#0b7a70;
}
[data-theme="teal"] ::selection{background:#c9ece9}

/* ---------- Coffee (v1.4.3) ---------- */
[data-theme="coffee"]{
    --navy:#3a2415; --navy-deep:#28180d; --navy-soft:#4d3019;
    --blue:#a16207; --blue-dark:#854d0e; --blue-soft:#faf3e8;
    --pos-navy:#28180d; --pos-navy2:#3a2415;
    --pos-blue:#a16207; --pos-blue-d:#854d0e;
}
[data-theme="coffee"] ::selection{background:#efe0c8}

/* ============================================================
   Display options (v1.4.5): font size + density.
   Set on <html data-fontsize="..."> and <body data-density="...">
   (Admin > Settings > Appearance).
   ============================================================ */
html[data-fontsize="small"]{font-size:14px}
html[data-fontsize="large"]{font-size:18px}

[data-density="compact"] .card-body{padding:12px}
[data-density="compact"] .tbl thead th{padding:8px 10px}
[data-density="compact"] .tbl tbody td{padding:7px 10px}
[data-density="compact"] .stat{padding:10px 12px;gap:9px}
[data-density="compact"] .p-card{min-height:84px;padding:8px;gap:3px}
[data-density="compact"] .pos-modal-body{padding:10px 14px}
[data-density="compact"] .form-group{margin-bottom:10px}

/* ---------- v1.5.0: Dark-mode toggle + polish ---------- */
.theme-toggle{background:transparent;border:1px solid var(--border);border-radius:8px;
    width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;
    cursor:pointer;color:var(--text);font-size:16px;line-height:1}
.theme-toggle:hover{background:var(--blue-soft)}
.theme-toggle .tt-sun{display:none}
.theme-toggle.is-dark .tt-sun{display:inline}
.theme-toggle.is-dark .tt-moon{display:none}
/* dark polish: inputs, dropdowns, modals */
[data-theme="dark"] .form-control,[data-theme="dark"] select.form-control,
[data-theme="dark"] textarea.form-control,[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="number"],[data-theme="dark"] input[type="date"]{
    background:#0e1526;color:#e6ecf5;border-color:#263349}
[data-theme="dark"] .tbl th{background:#0b1220;color:#c7d3e8}
[data-theme="dark"] .tbl td{border-color:#1d2940}
[data-theme="dark"] .dropdown-menu,[data-theme="dark"] .user-menu,[data-theme="dark"] .notif-dropdown{
    background:#162032;border-color:#263349}
[data-theme="dark"] .modal-box{background:#162032;color:#e6ecf5}
[data-theme="dark"] ::-webkit-scrollbar-track{background:#0e1526}

/* ---------- Crimson (v1.8.0 — Tericsa-style red accent) ---------- */
[data-theme="crimson"]{
    --navy:#6d0f1d; --navy-deep:#45060f; --navy-soft:#8a1626;
    --blue:#c8102e; --blue-dark:#a30d25; --blue-soft:#fdeef0;
    --pos-navy:#45060f; --pos-navy2:#6d0f1d;
    --pos-blue:#c8102e; --pos-blue-d:#a30d25;
}
[data-theme="crimson"] ::selection{background:#f6ccd3}

/* ---------- Royal Gold (v2.1.0 - NessTech flyer colours) ---------- */
[data-theme="gold"]{
    --navy:#1c2a4a; --navy-deep:#0f1930; --navy-soft:#2a3c63;
    --blue:#b8912a; --blue-dark:#96761f; --blue-soft:#faf3dd;
    --pos-navy:#0f1930; --pos-navy2:#1c2a4a;
    --pos-blue:#b8912a; --pos-blue-d:#96761f;
}
[data-theme="gold"] ::selection{background:#f0e2b6}
