/* Kanōn POS page themes: 12 themes, each with a day and a night palette.
   MADE BY tools/make_themes.py FROM themes.py: change the palettes there and run the tool again. */

/* ==========================================================================
   LUGMA POS UI Themes (Order, Checkout, Tables, Customer, Drawer & E.O.D)
   Shared rules; the per-theme colours below them come from themes.py.
   ========================================================================== */

html[class*="ui-"] body:not(.dash) { font-family: var(--ui-font, inherit); }
html[class*="ui-"] body:not(.dash) :is(.brand, .side, .order-side, .order-head, header.top) { background-color: var(--brand-bg); }
html[class*="ui-"] body:not(.dash) :is(button, input, select, .btn, .order-type, .side-btn, .keypad button, .display, .table, .pay-btn) { border-radius: var(--ui-r, 10px); font-family: inherit; }
html[class*="ui-"] body:not(.dash) :is(.btn-primary, .order-type, .contact-btn, .logout-eod, .branch-tag, .pay-btn, .send-btn, .login-btn, .btn-accent) {
  background: var(--accent); color: var(--ui-on, #fff); box-shadow: var(--ui-glow, none); }

/* Base fallback */
html { --u-bg: #FAFAF7; --u-surface: #FFFFFF; --u-soft: #F1F5F9; --u-text: #090D16; --u-muted: #1E293B; --u-line: #CBD5E1; }
html.night, html[data-mode="night"], html.dark { --u-bg: #000000; --u-surface: #151D2F; --u-soft: #1E293B; --u-text: #FFFFFF; --u-muted: #F1F5F9; --u-line: #334155; }

/* 01. Radiant Citrus / Midnight Indigo */
/* Shared page styling rules */
body:is(.form-page, .eod-page), body:has(main.order), body:has(main.order) .menu-grid, body:has(main.order) .order-main { background: var(--u-bg) !important; color: var(--u-text); }
:is(.check, .order-check, .customer-form, .table-card, .pay-box, .eod-bar, .modal-box) { background: var(--u-surface) !important; color: var(--u-text) !important; border-color: var(--u-line) !important; }
:is(.order-info, .order-top, .info-bar) { background: var(--u-surface) !important; border-color: var(--u-line) !important; }
:is(.info, .eod-printer, .field, .pay-label, .line.remark) { color: var(--u-text) !important; font-weight: 600; }
:is(.check-head, .line .qty, .empty-check, .check-address, .crumb-sep, .no-items, .tables-hint, .tables-empty, .table-meta, #viewMeta, #kpLabel) { color: var(--u-muted) !important; font-weight: 600; opacity: 1 !important; }
.check-head, .line, .check-customer { border-color: var(--u-line) !important; }
.check-customer { background: var(--u-soft) !important; color: var(--u-text); font-weight: 600; }
:is(.item-empty, .crumb, .pager button, .home-btn-light, .form-btn-light) { background: var(--u-soft) !important; color: var(--u-text) !important; font-weight: 600; }
.crumb.active { background: var(--accent) !important; color: var(--ui-on, #fff) !important; font-weight: 700; }
.field :is(input, textarea), .pay-box input, .pay-methods button, .pay-quick button { background: var(--u-bg) !important; color: var(--u-text) !important; border-color: var(--u-line) !important; font-weight: 600; }
:is(input, textarea)::placeholder { color: var(--u-muted) !important; opacity: 1 !important; }
.pay-methods button.active { background: var(--accent) !important; color: var(--ui-on, #fff) !important; font-weight: 700; }
.form-bar, body:has(main.order) .order-side { background: var(--brand-bg) !important; }
.bar-btn { background: var(--accent) !important; color: var(--ui-on, #fff) !important; font-weight: 700; }
.line.selected { background: var(--u-soft) !important; }
.table-card .table-no { color: var(--accent); font-weight: 700; }
.check-box { background: var(--u-surface) !important; color: var(--u-text); }
.check-total { border-top-color: var(--u-line) !important; color: var(--u-text); font-weight: 700; }
.menu-panel { background: var(--u-bg) !important; color: var(--u-text); }
.info-bar { background: var(--u-surface) !important; border-color: var(--u-line) !important; }
.check-panel { background: var(--brand-bg) !important; }
.info-bar .home-btn:first-child { background: var(--accent) !important; color: var(--ui-on, #fff) !important; border: 2px solid var(--u-line, #cbd5e1) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.18); font-weight: 700; }
html.night .info-bar .home-btn:first-child, html[data-mode="night"] .info-bar .home-btn:first-child { border-color: rgba(255,255,255,.6) !important; }

/* Nocturnal true black OLED background enforcement */
html.night, html[data-mode="night"],
body.night, body[data-mode="night"] {
  --bg: #000000 !important;
  --u-bg: #000000 !important;
  background-color: #000000 !important;
}


/* 01. Kanōn */
html.ui-kanon {
  --accent: #1465B8;
  --u-bg: #E6EEF8;
  --u-surface: #FFFFFF;
  --u-soft: #E6EEF8;
  --u-text: #051329;
  --u-muted: #40566F;
  --u-line: #D0DDEE;
  --accent2: #1982D8;
  --brand-bg: #FFFFFF;
  --ui-on: #FFFFFF;
}
html.ui-kanon.night, html.ui-kanon[data-mode="night"] {
  --accent: #22BAE0;
  --u-bg: #050D1B;
  --u-surface: #0B1A2E;
  --u-soft: #17304F;
  --u-text: #EAF3FF;
  --u-muted: #9DB4D0;
  --u-line: #1F3D60;
  --accent2: #4CE8FF;
  --brand-bg: #0B1A2E;
  --ui-on: #031521;
}

/* 02. Night Kitchen */
html.ui-nk {
  --accent: #BF4308;
  --u-bg: #F3ECE2;
  --u-surface: #FFFAF3;
  --u-soft: #EADFCE;
  --u-text: #1F1812;
  --u-muted: #5D4F40;
  --u-line: #DCCDB8;
  --accent2: #D9540F;
  --brand-bg: #FFFAF3;
  --ui-on: #FFFFFF;
}
html.ui-nk.night, html.ui-nk[data-mode="night"] {
  --accent: #FF7A2F;
  --u-bg: #0D0B09;
  --u-surface: #16120F;
  --u-soft: #292219;
  --u-text: #F4ECE1;
  --u-muted: #B2A493;
  --u-line: #33291F;
  --accent2: #FF8B47;
  --brand-bg: #16120F;
  --ui-on: #1A0D03;
}

/* 03. Sage & Brass */
html.ui-sage {
  --accent: #1D5C3D;
  --u-bg: #EAF0E4;
  --u-surface: #F9FBF6;
  --u-soft: #D3DEC9;
  --u-text: #16261B;
  --u-muted: #43553F;
  --u-line: #C3D0B8;
  --accent2: #17492F;
  --brand-bg: #F9FBF6;
  --ui-on: #FFFFFF;
}
html.ui-sage.night, html.ui-sage[data-mode="night"] {
  --accent: #7FD6A2;
  --u-bg: #0E1912;
  --u-surface: #15241B;
  --u-soft: #27402F;
  --u-text: #E8F1E3;
  --u-muted: #A8BEA5;
  --u-line: #35503D;
  --accent2: #9AE6B6;
  --brand-bg: #15241B;
  --ui-on: #05200F;
}

/* 04. Graphite & Lime */
html.ui-graphite {
  --accent: #1F2A07;
  --u-bg: #ECEEE6;
  --u-surface: #FAFBF6;
  --u-soft: #E0E5D5;
  --u-text: #11140C;
  --u-muted: #454C38;
  --u-line: #CBD2BD;
  --accent2: #33430F;
  --brand-bg: #FAFBF6;
  --ui-on: #C6F432;
}
html.ui-graphite.night, html.ui-graphite[data-mode="night"] {
  --accent: #C6F432;
  --u-bg: #090A0B;
  --u-surface: #111315;
  --u-soft: #21262A;
  --u-text: #EEF2EA;
  --u-muted: #A9B2A4;
  --u-line: #2A3036;
  --accent2: #D8FF55;
  --brand-bg: #111315;
  --ui-on: #0B1000;
}

/* 05. Bento Pop */
html.ui-bento {
  --accent: #C8381F;
  --u-bg: #FFF7EA;
  --u-surface: #FFFFFF;
  --u-soft: #F2E4C8;
  --u-text: #1D1A16;
  --u-muted: #524A3E;
  --u-line: #DCCFB4;
  --accent2: #A82F19;
  --brand-bg: #FFFFFF;
  --ui-on: #FFFFFF;
}
html.ui-bento.night, html.ui-bento[data-mode="night"] {
  --accent: #FF6A4D;
  --u-bg: #17120D;
  --u-surface: #221A13;
  --u-soft: #3A2D1F;
  --u-text: #FFF3E0;
  --u-muted: #CDBB9E;
  --u-line: #4A3A29;
  --accent2: #FF8468;
  --brand-bg: #221A13;
  --ui-on: #1A0600;
}

/* 06. Rail Layout */
html.ui-rail {
  --accent: #1C1D20;
  --u-bg: #E9E6DF;
  --u-surface: #FBFAF7;
  --u-soft: #E2DED3;
  --u-text: #17181A;
  --u-muted: #4F4C44;
  --u-line: #D3CEBF;
  --accent2: #8A5A00;
  --brand-bg: #FBFAF7;
  --ui-on: #F2B01E;
}
html.ui-rail.night, html.ui-rail[data-mode="night"] {
  --accent: #F2B01E;
  --u-bg: #141517;
  --u-surface: #1E2024;
  --u-soft: #32363C;
  --u-text: #F3F1EC;
  --u-muted: #B9B6AD;
  --u-line: #32363C;
  --accent2: #FFC23D;
  --brand-bg: #1E2024;
  --ui-on: #1A1300;
}

/* 07. Black & Gold */
html.ui-gold {
  --accent: #14213D;
  --u-bg: #E5E5E5;
  --u-surface: #FFFFFF;
  --u-soft: #E5E5E5;
  --u-text: #14213D;
  --u-muted: #3F4D6E;
  --u-line: #CBCFDA;
  --accent2: #9A6200;
  --brand-bg: #FFFFFF;
  --ui-on: #FCA311;
}
html.ui-gold.night, html.ui-gold[data-mode="night"] {
  --accent: #FCA311;
  --u-bg: #05070D;
  --u-surface: #0B1020;
  --u-soft: #1B2D52;
  --u-text: #FFFFFF;
  --u-muted: #B9C0D0;
  --u-line: #28406F;
  --accent2: #FFC857;
  --brand-bg: #0B1020;
  --ui-on: #14213D;
}

/* 08. Sunflower */
html.ui-sunflower {
  --accent: #202020;
  --u-bg: #E9E9E6;
  --u-surface: #FFFFFF;
  --u-soft: #E3E3DF;
  --u-text: #202020;
  --u-muted: #4A4C48;
  --u-line: #D6D6D6;
  --accent2: #8A6D00;
  --brand-bg: #FFFFFF;
  --ui-on: #FFEE32;
}
html.ui-sunflower.night, html.ui-sunflower[data-mode="night"] {
  --accent: #FFD100;
  --u-bg: #202020;
  --u-surface: #2A2B29;
  --u-soft: #3D3F3C;
  --u-text: #F2F2F0;
  --u-muted: #C2C2BE;
  --u-line: #4A4C48;
  --accent2: #FFEE32;
  --brand-bg: #2A2B29;
  --ui-on: #202020;
}

/* 09. Glass Blue */
html.ui-glass {
  --accent: #1951FC;
  --u-bg: #E6EDFA;
  --u-surface: #F8FAFF;
  --u-soft: #DDE7F8;
  --u-text: #03195B;
  --u-muted: #2B4286;
  --u-line: #A9C8F2;
  --accent2: #0B2CB1;
  --brand-bg: #F8FAFF;
  --ui-on: #FFFFFF;
}
html.ui-glass.night, html.ui-glass[data-mode="night"] {
  --accent: #3781FC;
  --u-bg: #050B1F;
  --u-surface: #0A1430;
  --u-soft: #162858;
  --u-text: #FFFFFF;
  --u-muted: #C9D6EE;
  --u-line: #2F4A8F;
  --accent2: #7FB8FF;
  --brand-bg: #0A1430;
  --ui-on: #010A2A;
}
