/* Kite Bill — Pro theme (23 Nov 2026, the owner: "a new professional theme, better text and colours, easy to work in";
 * benchmark: Zoho Books, QuickBooks, Linear). One colour system for Light, Medium and Dark; every text meets AA (4.5:1)
 * on its surface; calm cards, one accent (the shop's chosen accent, --k-a), soft status badges with dark text.
 * Loaded last; active while <html> has the class "kp" (localStorage kb_pro = "0" turns it off). */

/* ------------------------------------------------------------------ tokens */
html.kp.light {
  --p-bg:#F5F6F8; --p-surface:#FFFFFF; --p-surface-2:#F9FAFB; --p-border:#E4E7EC; --p-border-2:#D0D5DD;
  --p-text:#101828; --p-text-2:#344054; --p-muted:#5D6B82; --p-faint:#98A2B3;
  --p-ok-bg:#ECFDF3; --p-ok:#067647; --p-warn-bg:#FFFAEB; --p-warn:#B54708; --p-bad-bg:#FEF3F2; --p-bad:#B42318; --p-info-bg:#EFF8FF; --p-info:#175CD3; --p-neutral-bg:#F2F4F7; --p-neutral:#344054;
  --p-shadow:0 1px 2px rgba(16,24,40,.05); --p-shadow-2:0 12px 28px -8px rgba(16,24,40,.18); --p-accent-bg:color-mix(in srgb,var(--k-a,#4F46E5) 9%,#fff); --p-accent-text:var(--k-a-dark,#3730A3);
}
html.kp.medium {
  --p-bg:#1F2530; --p-surface:#272F3C; --p-surface-2:#2D3644; --p-border:#3A4456; --p-border-2:#4A5568;
  --p-text:#F1F4F9; --p-text-2:#D3D9E3; --p-muted:#A9B3C3; --p-faint:#8592A6;
  --p-ok-bg:rgba(34,197,94,.16); --p-ok:#86EFAC; --p-warn-bg:rgba(245,158,11,.16); --p-warn:#FCD34D; --p-bad-bg:rgba(239,68,68,.16); --p-bad:#FCA5A5; --p-info-bg:rgba(59,130,246,.18); --p-info:#93C5FD; --p-neutral-bg:rgba(148,163,184,.16); --p-neutral:#E2E8F0;
  --p-shadow:0 1px 2px rgba(0,0,0,.25); --p-shadow-2:0 16px 36px -10px rgba(0,0,0,.55); --p-accent-bg:color-mix(in srgb,var(--k-a-soft,#A5B4FC) 18%,transparent); --p-accent-text:#E0E7FF;
}
html.kp.dark {
  --p-bg:#0C111D; --p-surface:#151B27; --p-surface-2:#1B2230; --p-border:#263042; --p-border-2:#334055;
  --p-text:#F5F5F6; --p-text-2:#D0D3D9; --p-muted:#9EA3AD; --p-faint:#7A8190;
  --p-ok-bg:rgba(34,197,94,.14); --p-ok:#75E0A7; --p-warn-bg:rgba(245,158,11,.14); --p-warn:#FDB022; --p-bad-bg:rgba(239,68,68,.14); --p-bad:#FDA29B; --p-info-bg:rgba(59,130,246,.16); --p-info:#84CAFF; --p-neutral-bg:rgba(148,163,184,.14); --p-neutral:#D0D5DD;
  --p-shadow:0 1px 2px rgba(0,0,0,.4); --p-shadow-2:0 16px 40px -10px rgba(0,0,0,.7); --p-accent-bg:color-mix(in srgb,var(--k-a-soft,#A5B4FC) 14%,transparent); --p-accent-text:#C7D2FE;
}
/* the app's own variables follow, so every older screen takes the same colours */
html.kp { --bg:var(--p-bg); --bg-secondary:var(--p-surface-2); --card-bg:var(--p-surface); --card-inner:var(--p-surface-2); --card-border:var(--p-border); --inner-border:var(--p-border);
  --text:var(--p-text); --text-soft:var(--p-text-2); --text-muted:var(--p-muted); --input-text:var(--p-text); --input-bg:var(--p-surface); --input-border:var(--p-border-2);
  --table-th-bg:var(--p-surface-2); --table-row-hover:var(--p-surface-2); --modal-bg:var(--p-surface); --modal-border:var(--p-border);
  --mbb-sidebar-bg:var(--p-surface); --mbb-sidebar-border:var(--p-border); --mbb-sidebar-text:var(--p-text-2); --mbb-sidebar-active-bg:var(--p-accent-bg); --mbb-sidebar-active-text:var(--p-accent-text); }

/* ------------------------------------------------------------------ page, type */
html.kp body { background:var(--p-bg) !important; color:var(--p-text) !important; font-family:Inter,"Segoe UI",system-ui,-apple-system,sans-serif !important; font-size:14px; -webkit-font-smoothing:antialiased; letter-spacing:-.003em; }
html.kp body h1, html.kp body h2, html.kp body h3 { color:var(--p-text) !important; letter-spacing:-.015em; }
html.kp body .page-top h2, html.kp body .content-head h2 { font-size:1.35rem !important; font-weight:700 !important; }
html.kp body .page-top p, html.kp body .content-head p { color:var(--p-muted) !important; }

/* ------------------------------------------------------------------ top bar */
html.kp body .mbb-header.kb-top { background:var(--p-surface) !important; border-bottom:1px solid var(--p-border) !important; box-shadow:none !important; }
html.kp body .kb-top .kb-ic, html.kp body .kb-top button.kb-ic { color:var(--p-text-2) !important; border-radius:8px !important; }
html.kp body .kb-top .kb-ic:hover { background:var(--p-surface-2) !important; color:var(--p-text) !important; }
html.kp body .kb-top .kb-cmd { background:var(--p-surface-2) !important; border:1px solid var(--p-border) !important; border-radius:10px !important; }
html.kp body .kb-top .kb-cmd input { color:var(--p-text) !important; }
html.kp body .kb-top .kb-cmd-name { color:var(--p-text) !important; font-weight:700 !important; }

/* ------------------------------------------------------------------ sidebar */
html.kp body .mbb-sidebar { background:var(--p-surface) !important; border-right:1px solid var(--p-border) !important; }
html.kp body .mbb-section-label { color:var(--p-faint) !important; font-size:.68rem !important; font-weight:700 !important; letter-spacing:.07em !important; margin:14px 12px 4px !important; }
html.kp body .mbb-nav-item, html.kp body .mbb-sub-item { color:var(--p-text-2) !important; border-radius:8px !important; min-height:34px; font-weight:500 !important; }
html.kp body .mbb-nav-item:hover, html.kp body .mbb-sub-item:hover { background:var(--p-surface-2) !important; color:var(--p-text) !important; }
html.kp body .mbb-nav-item.active { background:var(--p-accent-bg) !important; color:var(--p-accent-text) !important; font-weight:700 !important; }
html.kp body .sidebar-badge { background:var(--p-neutral-bg) !important; color:var(--p-neutral) !important; font-weight:700 !important; }

/* ------------------------------------------------------------------ cards, metrics */
html.kp body .card, html.kp body .metric-card, html.kp body .data-table-card, html.kp body .party-studio-card { background:var(--p-surface) !important; border:1px solid var(--p-border) !important; border-radius:12px !important; box-shadow:var(--p-shadow) !important; }
html.kp body .metric-label { color:var(--p-muted) !important; font-size:.72rem !important; font-weight:600 !important; letter-spacing:.04em !important; }
html.kp body .metric-val { color:var(--p-text) !important; font-weight:700 !important; letter-spacing:-.02em; }
html.kp body .metric-footer { color:var(--p-muted) !important; }

/* ------------------------------------------------------------------ buttons */
html.kp body .btn { border-radius:9px !important; font-weight:600 !important; letter-spacing:0 !important; transition:background .12s,border-color .12s,box-shadow .12s; }
html.kp body .btn-primary { background:var(--k-a,#4F46E5) !important; border:1px solid var(--k-a,#4F46E5) !important; color:#fff !important; box-shadow:0 1px 2px rgba(16,24,40,.08) !important; background-image:none !important; }
html.kp body .btn-primary:hover { background:var(--k-a-dark,#3730A3) !important; border-color:var(--k-a-dark,#3730A3) !important; }
html.kp body .btn-secondary { background:var(--p-surface) !important; border:1px solid var(--p-border-2) !important; color:var(--p-text-2) !important; }
html.kp body .btn-secondary:hover { background:var(--p-surface-2) !important; color:var(--p-text) !important; }
html.kp body .table-btn { background:var(--p-surface) !important; border:1px solid var(--p-border) !important; color:var(--p-text-2) !important; border-radius:7px !important; font-weight:600 !important; }
html.kp body .table-btn:hover { border-color:var(--p-border-2) !important; color:var(--p-text) !important; background:var(--p-surface-2) !important; }
html.kp body .btn:focus-visible, html.kp body .table-btn:focus-visible, html.kp body .kq-btn:focus-visible, html.kp body .form-input:focus, html.kp body .form-select:focus { outline:none !important; box-shadow:0 0 0 3px color-mix(in srgb,var(--k-a,#4F46E5) 28%,transparent) !important; border-color:var(--k-a,#4F46E5) !important; }
html.kp body .sidebar-create-bill-btn { background:var(--k-a,#4F46E5) !important; background-image:none !important; color:#fff !important; border-radius:10px !important; box-shadow:0 1px 2px rgba(16,24,40,.12) !important; }

/* ------------------------------------------------------------------ badges: soft background, dark readable text */
html.kp body .badge { border-radius:999px !important; font-weight:700 !important; font-size:.7rem !important; letter-spacing:.02em !important; padding:2px 9px !important; border:0 !important; }
html.kp body .badge-completed, html.kp body .badge-success, html.kp body .badge-paid { background:var(--p-ok-bg) !important; color:var(--p-ok) !important; }
html.kp body .badge-info, html.kp body .badge-transit { background:var(--p-info-bg) !important; color:var(--p-info) !important; }
html.kp body .badge-warning, html.kp body .badge-pending, html.kp body .badge-partial { background:var(--p-warn-bg) !important; color:var(--p-warn) !important; }
html.kp body .badge-danger, html.kp body .badge-unpaid, html.kp body .badge-overdue { background:var(--p-bad-bg) !important; color:var(--p-bad) !important; }
/* what customers owe you (you'll get) green, what you owe (you'll give) red — the way myBillBook and Vyapar show it */
html.kp body .num-dr { color:var(--p-ok) !important; } html.kp body .num-cr { color:var(--p-bad) !important; }

/* ------------------------------------------------------------------ tables */
html.kp body .data-table th, html.kp body table.data-table thead th { background:var(--p-surface-2) !important; color:var(--p-muted) !important; font-size:.72rem !important; font-weight:600 !important; letter-spacing:.04em !important; border-bottom:1px solid var(--p-border) !important; }
html.kp body .data-table td { border-bottom:1px solid var(--p-border) !important; color:var(--p-text) !important; }
html.kp body .data-table tbody tr:hover td { background:var(--p-surface-2) !important; }

/* ------------------------------------------------------------------ forms */
html.kp body .form-label { color:var(--p-text-2) !important; font-weight:600 !important; font-size:.78rem !important; }
html.kp body .form-input, html.kp body .form-select, html.kp body .form-textarea { background:var(--p-surface) !important; border:1px solid var(--p-border-2) !important; color:var(--p-text) !important; border-radius:9px !important; }
html.kp body .form-input::placeholder, html.kp body .form-textarea::placeholder { color:var(--p-faint) !important; }

/* ------------------------------------------------------------------ windows */
html.kp body .modal-box { background:var(--p-surface) !important; border:1px solid var(--p-border) !important; border-radius:14px !important; box-shadow:var(--p-shadow-2) !important; }
html.kp body .modal-box-header { border-bottom:1px solid var(--p-border) !important; } html.kp body .modal-box-footer { border-top:1px solid var(--p-border) !important; background:var(--p-surface-2) !important; }
html.kp body .modal-box-header h3 { font-weight:700 !important; }
html.kp body .modal-close-btn, html.kp body .modal-box-header button[onclick*="closeModal"] { color:var(--p-muted) !important; }

/* ------------------------------------------------------------------ tabs */
html.kp body .mbb-tab-link { color:var(--p-muted) !important; font-weight:600 !important; }
html.kp body .mbb-tab-link.active { color:var(--p-accent-text) !important; background:var(--p-accent-bg) !important; }

/* ------------------------------------------------------------------ fixes from the audit (23 Nov): text that was hard to read */
html.kp body kbd { background:var(--p-neutral-bg) !important; color:var(--p-neutral) !important; border:1px solid var(--p-border-2) !important; border-radius:5px !important; font-weight:600 !important; }
html.kp body #dashQuickHeldCount { color:var(--p-warn) !important; font-weight:800 !important; }
html.kp body #pane-daybook button[aria-label="Close"], html.kp body #pane-daybook .modal-close-btn { color:var(--p-muted) !important; }
html.kp body [class*="out-of-stock"], html.kp body .pos-oos { color:var(--p-bad) !important; }

/* the many tags and figures coloured inline for the dark look (pale green #34d399, sky #38bdf8, light amber…) wash out on
   white: in Light they take the readable colour of the same meaning (23 Nov audit: "SALE" 1.9:1, "500 Pcs" 2.1:1) */
html.kp.light body [style*="color: #10b981"],
html.kp.light body [style*="color:#10b981"],
html.kp.light body [style*="color: #10B981"],
html.kp.light body [style*="color:#10B981"],
html.kp.light body [style*="color: #34d399"],
html.kp.light body [style*="color:#34d399"],
html.kp.light body [style*="color: #34D399"],
html.kp.light body [style*="color:#34D399"],
html.kp.light body [style*="color: #4ade80"],
html.kp.light body [style*="color:#4ade80"],
html.kp.light body [style*="color: #4ADE80"],
html.kp.light body [style*="color:#4ADE80"],
html.kp.light body [style*="color: #22c55e"],
html.kp.light body [style*="color:#22c55e"],
html.kp.light body [style*="color: #22C55E"],
html.kp.light body [style*="color:#22C55E"] { color:var(--p-ok) !important; }
html.kp.light body [style*="color: #38bdf8"],
html.kp.light body [style*="color:#38bdf8"],
html.kp.light body [style*="color: #38BDF8"],
html.kp.light body [style*="color:#38BDF8"],
html.kp.light body [style*="color: #0ea5e9"],
html.kp.light body [style*="color:#0ea5e9"],
html.kp.light body [style*="color: #0EA5E9"],
html.kp.light body [style*="color:#0EA5E9"],
html.kp.light body [style*="color: #60a5fa"],
html.kp.light body [style*="color:#60a5fa"],
html.kp.light body [style*="color: #60A5FA"],
html.kp.light body [style*="color:#60A5FA"],
html.kp.light body [style*="color: #3b82f6"],
html.kp.light body [style*="color:#3b82f6"],
html.kp.light body [style*="color: #3B82F6"],
html.kp.light body [style*="color:#3B82F6"] { color:var(--p-info) !important; }
html.kp.light body [style*="color: #818cf8"],
html.kp.light body [style*="color:#818cf8"],
html.kp.light body [style*="color: #818CF8"],
html.kp.light body [style*="color:#818CF8"],
html.kp.light body [style*="color: #a5b4fc"],
html.kp.light body [style*="color:#a5b4fc"],
html.kp.light body [style*="color: #A5B4FC"],
html.kp.light body [style*="color:#A5B4FC"],
html.kp.light body [style*="color: #6366f1"],
html.kp.light body [style*="color:#6366f1"],
html.kp.light body [style*="color: #6366F1"],
html.kp.light body [style*="color:#6366F1"],
html.kp.light body [style*="color: #c084fc"],
html.kp.light body [style*="color:#c084fc"],
html.kp.light body [style*="color: #C084FC"],
html.kp.light body [style*="color:#C084FC"],
html.kp.light body [style*="color: #a78bfa"],
html.kp.light body [style*="color:#a78bfa"],
html.kp.light body [style*="color: #A78BFA"],
html.kp.light body [style*="color:#A78BFA"] { color:var(--p-accent-text) !important; }
html.kp.light body [style*="color: #f59e0b"],
html.kp.light body [style*="color:#f59e0b"],
html.kp.light body [style*="color: #F59E0B"],
html.kp.light body [style*="color:#F59E0B"],
html.kp.light body [style*="color: #fbbf24"],
html.kp.light body [style*="color:#fbbf24"],
html.kp.light body [style*="color: #FBBF24"],
html.kp.light body [style*="color:#FBBF24"],
html.kp.light body [style*="color: #facc15"],
html.kp.light body [style*="color:#facc15"],
html.kp.light body [style*="color: #FACC15"],
html.kp.light body [style*="color:#FACC15"],
html.kp.light body [style*="color: #eab308"],
html.kp.light body [style*="color:#eab308"],
html.kp.light body [style*="color: #EAB308"],
html.kp.light body [style*="color:#EAB308"] { color:var(--p-warn) !important; }
html.kp.light body [style*="color: #f87171"],
html.kp.light body [style*="color:#f87171"],
html.kp.light body [style*="color: #F87171"],
html.kp.light body [style*="color:#F87171"],
html.kp.light body [style*="color: #ef4444"],
html.kp.light body [style*="color:#ef4444"],
html.kp.light body [style*="color: #EF4444"],
html.kp.light body [style*="color:#EF4444"],
html.kp.light body [style*="color: #fb7185"],
html.kp.light body [style*="color:#fb7185"],
html.kp.light body [style*="color: #FB7185"],
html.kp.light body [style*="color:#FB7185"] { color:var(--p-bad) !important; }
html.kp.light body [style*="color: #94a3b8"],
html.kp.light body [style*="color:#94a3b8"],
html.kp.light body [style*="color: #94A3B8"],
html.kp.light body [style*="color:#94A3B8"],
html.kp.light body [style*="color: #cbd5e1"],
html.kp.light body [style*="color:#cbd5e1"],
html.kp.light body [style*="color: #CBD5E1"],
html.kp.light body [style*="color:#CBD5E1"] { color:var(--p-muted) !important; }
html.kp.light body [style*="background: rgba(16, 185, 129"], html.kp.light body [style*="background:rgba(16,185,129"] { background:var(--p-ok-bg) !important; border-color:transparent !important; }
html.kp.light body [style*="background: rgba(56, 189, 248"], html.kp.light body [style*="background: rgba(14, 165, 233"] { background:var(--p-info-bg) !important; border-color:transparent !important; }
html.kp body #kspHeldCount, html.kp body #dashQuickHeldCount { color:var(--p-warn) !important; font-weight:800 !important; }
/* keyboard hints sit on light buttons in Medium too: a solid chip */
html.kp body kbd { background:var(--p-surface-2) !important; }
html.kp.medium body .sidebar-create-bill-btn ~ * kbd, html.kp.medium body kbd { color:var(--p-text) !important; background:var(--p-surface-2) !important; }

/* the same colours as the browser writes them back (a font script rewrites inline styles: #34d399 becomes rgb(52, 211, 153)) */
html.kp.light body [style*="color: rgb(16, 185, 129)"],
html.kp.light body [style*="color: rgb(52, 211, 153)"],
html.kp.light body [style*="color: rgb(74, 222, 128)"],
html.kp.light body [style*="color: rgb(34, 197, 94)"] { color:var(--p-ok) !important; }
html.kp.light body [style*="color: rgb(56, 189, 248)"],
html.kp.light body [style*="color: rgb(14, 165, 233)"],
html.kp.light body [style*="color: rgb(96, 165, 250)"],
html.kp.light body [style*="color: rgb(59, 130, 246)"] { color:var(--p-info) !important; }
html.kp.light body [style*="color: rgb(129, 140, 248)"],
html.kp.light body [style*="color: rgb(165, 180, 252)"],
html.kp.light body [style*="color: rgb(99, 102, 241)"],
html.kp.light body [style*="color: rgb(192, 132, 252)"],
html.kp.light body [style*="color: rgb(167, 139, 250)"] { color:var(--p-accent-text) !important; }
html.kp.light body [style*="color: rgb(245, 158, 11)"],
html.kp.light body [style*="color: rgb(251, 191, 36)"],
html.kp.light body [style*="color: rgb(250, 204, 21)"],
html.kp.light body [style*="color: rgb(234, 179, 8)"] { color:var(--p-warn) !important; }
html.kp.light body [style*="color: rgb(248, 113, 113)"],
html.kp.light body [style*="color: rgb(239, 68, 68)"],
html.kp.light body [style*="color: rgb(251, 113, 133)"] { color:var(--p-bad) !important; }
html.kp.light body [style*="color: rgb(148, 163, 184)"],
html.kp.light body [style*="color: rgb(203, 213, 225)"] { color:var(--p-muted) !important; }
html.kp.light body [style*="background: rgba(56, 189, 248"] { background:var(--p-info-bg) !important; }
/* Medium: the stock group and "Out of Stock" readable */
html.kp.medium body .kq-stock { background:var(--p-surface-2) !important; } html.kp.medium body .kq-stock button { color:var(--p-text) !important; }
html.kp.medium body .kq-stock .kq-add { color:var(--p-ok) !important; } html.kp.medium body .kq-stock .kq-ded { color:var(--p-warn) !important; }
html.kp.medium body [style*="color: rgb(239, 68, 68)"], html.kp.medium body [style*="color: #ef4444"] { color:var(--p-bad) !important; }

/* more status badges the screens use (purchase Paid / Part paid / Unpaid, open / converted / cancelled documents) */
html.kp body .badge-converted { background:var(--p-ok-bg) !important; color:var(--p-ok) !important; }
html.kp body .badge-open { background:var(--p-warn-bg) !important; color:var(--p-warn) !important; }
html.kp body .badge-cancelled { background:var(--p-bad-bg) !important; color:var(--p-bad) !important; }
/* POS tiles: stock out / low */
html.kp body .ksp-tile-stock.out, html.kp body .stock-out { color:var(--p-bad) !important; }
html.kp body .ksp-tile-stock.low, html.kp body .stock-low { color:var(--p-warn) !important; }

/* the dashboard's quick buttons in one line on a laptop (1366): tighter, the same height */
html.kp body .kb-dash-quick { gap:.45rem !important; }
html.kp body .kb-dash-quick > button { padding:.45rem .7rem !important; height:36px; font-size:.8rem !important; white-space:nowrap; }
@media (max-width:1440px) { html.kp body .kb-dash-quick > button { padding:.42rem .58rem !important; font-size:.78rem !important; } }
