/* Kanpuriya Chatkara — shared theme (palette from the dashboard design reference) */
:root {
  --kc-navy: #0B1F3A;
  --kc-navy-2: #12305a;
  --kc-blue: #1565C0;
  --kc-gold: #D4AF37;
  --kc-gold-2: #f0c94a;
  --kc-white: #FFFFFF;
  --kc-light: #F5F7FA;
  --kc-green: #16A344;
  --kc-red: #DC2626;
  --kc-orange: #F59E0B;
  --kc-purple: #7C3AED;
  --kc-pink: #BE185D;
  --kc-brown: #7C4A1E;
  --kc-teal: #0F766E;
  --kc-azure: #1D4ED8; /* true blue, not re-themed per panel */
  --kc-text: #1f2937;
  --kc-muted: #6b7280;
  --kc-border: #e5e7eb;
  --kc-radius: 14px;
  --kc-shadow: 0 4px 18px rgba(11, 31, 58, .07);
  --kc-sidebar-w: 250px;
  /* Theme hooks — overridden per panel in theme-admin.css / theme-shoppe.css */
  --kc-navy-3: #173d6e;
  --kc-blue-dark: #0f4f99;
  --kc-blue-rgb: 21, 101, 192;
  --kc-focus: rgba(21, 101, 192, .15);
  --kc-side-text: #dbe4ef;
  --kc-side-muted: #7f93ad;
}

body { background: var(--kc-light); color: var(--kc-text); font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans Devanagari", sans-serif; }
a { color: var(--kc-blue); }
.text-gold { color: var(--kc-gold) !important; }
.text-navy { color: var(--kc-navy) !important; }
.bg-navy { background: var(--kc-navy) !important; color: #fff; }
.bg-gold { background: var(--kc-gold) !important; color: var(--kc-navy); }
.btn-kc { background: var(--kc-blue); color: #fff; border: 0; border-radius: 10px; font-weight: 600; }
.btn-kc:hover { background: var(--kc-blue-dark); color: #fff; }
.btn-gold { background: var(--kc-gold); color: var(--kc-navy); border: 0; border-radius: 10px; font-weight: 700; }
.btn-gold:hover { background: var(--kc-gold-2); color: var(--kc-navy); }
.btn-navy { background: var(--kc-navy); color: var(--kc-gold); border: 0; border-radius: 10px; font-weight: 700; }
.btn-navy:hover { background: var(--kc-navy-2); color: var(--kc-gold-2); }

/* ---------- Panel layout ---------- */
.kc-sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--kc-sidebar-w); background: var(--kc-side-bg, var(--kc-navy));
  color: #cfd8e3; overflow-y: auto; z-index: 1040; transition: transform .25s ease;
  display: flex; flex-direction: column;
}
.kc-brand { text-align: center; padding: 18px 12px 10px; border-bottom: 1px solid rgba(255,255,255,.08); }
.kc-brand img { width: 72px; height: 72px; object-fit: contain; background: #fff; border-radius: 50%; padding: 6px; }
.kc-brand .name { color: var(--kc-gold); font-weight: 800; font-size: 1.1rem; margin-top: 6px; }
.kc-brand .tag { color: #f5e6b8; font-size: .72rem; }
.kc-panel-badge { display: flex; align-items: center; gap: 10px; padding: 12px 18px; color: #fff; font-size: .85rem; }
.kc-panel-badge img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #fff; }
.kc-panel-badge small { color: #9fb0c6; display: block; }
.kc-nav { list-style: none; margin: 8px 0; padding: 0 10px; flex: 1; }
.kc-nav .nav-section { color: var(--kc-side-muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; padding: 12px 12px 4px; }
.kc-nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin: 2px 0; color: var(--kc-side-text);
  text-decoration: none; border-radius: 8px; font-size: .9rem;
}
.kc-nav a i { font-size: 1.05rem; width: 20px; text-align: center; }
.kc-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.kc-nav a.active { background: var(--kc-nav-active, var(--kc-blue)); color: #fff; font-weight: 600; }
.kc-nav .badge-count { margin-left: auto; background: var(--kc-red); color: #fff; border-radius: 20px; font-size: .7rem; padding: 1px 7px; }
.kc-sidebar .logout-form { padding: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.kc-sidebar .logout-form button { width: 100%; background: transparent; border: 0; color: var(--kc-side-text); text-align: left; padding: 9px 12px; border-radius: 8px; }
.kc-sidebar .logout-form button:hover { background: rgba(255,255,255,.07); }

.kc-main { margin-left: var(--kc-sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.kc-topbar {
  background: #fff; height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 22px;
  border-bottom: 1px solid var(--kc-border); position: sticky; top: 0; z-index: 1030;
}
.kc-topbar .toggle { border: 0; background: none; font-size: 1.5rem; color: var(--kc-navy); }
.kc-topbar .user { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.kc-topbar .user img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--kc-gold); }
.kc-topbar .user .n { font-weight: 700; font-size: .9rem; line-height: 1.1; }
.kc-topbar .user small { color: var(--kc-muted); font-size: .72rem; }
.kc-content { padding: 22px; flex: 1; }
.kc-footer { padding: 14px 22px; color: var(--kc-muted); font-size: .8rem; }

@media (max-width: 991.98px) {
  .kc-sidebar { transform: translateX(-100%); }
  body.kc-sidebar-open .kc-sidebar { transform: translateX(0); }
  body.kc-sidebar-open .kc-backdrop { display: block; }
  .kc-main { margin-left: 0; }
  .kc-content { padding: 14px; }
}
.kc-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1035; }

/* ---------- Page header ---------- */
.kc-page-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.kc-page-head h1 { font-size: 1.35rem; font-weight: 800; color: var(--kc-navy); margin: 0; }
.kc-page-head .sub { color: var(--kc-muted); font-size: .85rem; }
.kc-date-chip { background: #fff; border: 1px solid var(--kc-border); border-radius: 10px; padding: 6px 12px; font-size: .8rem; }

/* ---------- Cards ---------- */
.kc-card { background: #fff; border: 1px solid var(--kc-border); border-radius: var(--kc-radius); box-shadow: var(--kc-shadow); }
.kc-card .kc-card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--kc-border); }
.kc-card .kc-card-head h5, .kc-card .kc-card-head h6 { margin: 0; font-weight: 700; color: var(--kc-navy); }
.kc-card .kc-card-body { padding: 18px; }

/* Stat card (white, icon circle) — member/admin dashboards */
.kc-stat { background: #fff; border: 1px solid var(--kc-border); border-radius: var(--kc-radius); box-shadow: var(--kc-shadow); padding: 16px; display: flex; gap: 14px; align-items: center; height: 100%; }
.kc-stat .icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; color: #fff; flex-shrink: 0; }
.kc-stat .label { color: var(--kc-muted); font-size: .82rem; }
.kc-stat .value { font-size: 1.35rem; font-weight: 800; color: var(--kc-navy); }
.kc-stat .trend { font-size: .75rem; color: var(--kc-green); }
.icon-blue { background: var(--kc-blue); } .icon-gold { background: var(--kc-gold); } .icon-green { background: var(--kc-green); }
.icon-red { background: var(--kc-red); } .icon-navy { background: var(--kc-navy); } .icon-purple { background: var(--kc-purple); } .icon-orange { background: var(--kc-orange); }
.icon-pink { background: var(--kc-pink); } .icon-brown { background: var(--kc-brown); } .icon-teal { background: var(--kc-teal); } .icon-azure { background: var(--kc-azure); }
/* Stat box text column may shrink (so long labels/footers truncate instead of spilling out of the card). */
.kc-stat { overflow: hidden; min-width: 0; }
.kc-stat > div:not(.icon) { min-width: 0; flex: 1 1 auto; }
.kc-stat .label { line-height: 1.25; }
.kc-stat .value { line-height: 1.2; overflow-wrap: anywhere; }
/* A linked stat box must fill its column so every box in a row is the same height. */
[class*="col"] > a:has(> .kc-stat) { display: block; height: 100%; }
@media (max-width: 767.98px) {
  /* Phone: two boxes per row — stack icon above text and shrink everything so nothing overflows. */
  .col-6 .kc-stat { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .col-6 .kc-stat .icon, .kc-stat.vertical .icon { width: 40px; height: 40px; font-size: 1.05rem; }
  .col-6 .kc-stat .label { font-size: .76rem; }
  .col-6 .kc-stat .value { font-size: 1.1rem; }
  .col-6 .kc-stat .value.fs-5, .col-6 .kc-stat .value.fs-6 { font-size: 1rem !important; }
  .col-6 .kc-stat .stat-foot, .col-6 .kc-stat .trend { font-size: .68rem; line-height: 1.25; }
  .col-6 .kc-stat .stat-foot span { white-space: normal; }
  .kc-stat.vertical { padding: 12px; gap: 6px; }
}

/* ---------- Phone polish (2026-10-15): tighter spacing, wrapping heads, scrollable pill tabs ---------- */
@media (max-width: 767.98px) {
  .kc-page-head { margin-bottom: 14px; gap: 8px; }
  .kc-page-head h1 { font-size: 1.15rem; }
  .kc-page-head .sub { font-size: .8rem; }
  .kc-card .kc-card-head { flex-wrap: wrap; gap: 6px 10px; padding: 12px 14px; }
  .kc-card .kc-card-head h5, .kc-card .kc-card-head h6, .kc-card .kc-card-head h2 { font-size: .95rem; }
  .kc-card .kc-card-body { padding: 14px; }
  .kc-table { font-size: .8rem; }
  .kc-table th, .kc-table td { padding: .45rem .5rem; }
  .kc-table td:first-child, .kc-table td.text-end, .kc-table .kc-date { white-space: nowrap; }
  .kc-content .nav-pills { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; scrollbar-width: none; }
  .kc-content .nav-pills::-webkit-scrollbar { display: none; }
  .kc-content .nav-pills .nav-link { white-space: nowrap; font-size: .82rem; padding: 6px 12px; }
  .kc-promo { padding: 16px; }
  .kc-promo h3 { font-size: 1.2rem; }
  .kc-tile { padding: 12px; } .kc-tile .value { font-size: 1.2rem; } .kc-tile i { font-size: 1.4rem; }
  .kc-invoice { padding: 14px !important; }
  .kc-tree li { min-width: 96px; padding: 18px 4px 0; }
  .kc-node .avatar { width: 58px; height: 58px; }
  .kc-node .nm { font-size: .82rem; } .kc-node .id { font-size: .75rem; }
  .kc-group-btn { padding: 8px 14px; font-size: .85rem; }
  .alert { font-size: .85rem; }
  .pagination { flex-wrap: wrap; }
}
@media (max-width: 575.98px) {
  .kc-content { padding: 12px; }
  .row.g-3 { --bs-gutter-x: .75rem; --bs-gutter-y: .75rem; }
  .btn { white-space: normal; }
}
/* Dark theme: bootstrap .border utility and light surfaces inside cards */
html[data-theme="dark"] .border { border-color: #334155 !important; }
html[data-theme="dark"] .kc-date-chip, html[data-theme="dark"] .kc-doc-link, html[data-theme="dark"] .kc-pick, html[data-theme="dark"] .kc-choice label { background: #1e293b; color: #e5e7eb; border-color: #334155; }

/* Tile (solid colour) — shoppe dashboard */
.kc-tile { border-radius: var(--kc-radius); color: #fff; padding: 16px; text-align: center; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; box-shadow: var(--kc-shadow); }
.kc-tile i { font-size: 1.7rem; } .kc-tile .label { font-size: .85rem; opacity: .95; } .kc-tile .value { font-size: 1.4rem; font-weight: 800; }
.kc-tile:hover { color: #fff; filter: brightness(1.07); }
.tile-blue { background: var(--kc-blue); } .tile-gold { background: var(--kc-gold); } .tile-green { background: var(--kc-green); }
.tile-red { background: var(--kc-red); } .tile-navy { background: var(--kc-navy); } .tile-orange { background: var(--kc-orange); }
.tile-purple { background: var(--kc-purple); } .tile-pink { background: var(--kc-pink); } .tile-brown { background: var(--kc-brown); } .tile-teal { background: var(--kc-teal); } .tile-azure { background: var(--kc-azure); }

/* Promo / wallet banners */
.kc-promo { background: linear-gradient(120deg, var(--kc-navy), var(--kc-navy-3)); color: #fff; border-radius: var(--kc-radius); padding: 22px; position: relative; overflow: hidden; }
.kc-promo h3 { font-weight: 800; } .kc-promo h3 span { color: var(--kc-gold); }

/* Tables */
.kc-table { margin: 0; font-size: .87rem; }
.kc-table thead th { background: var(--kc-light); color: var(--kc-navy); font-weight: 700; border-bottom: 1px solid var(--kc-border); white-space: nowrap; }
.kc-table td { vertical-align: middle; }

/* Status pills */
.pill { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: .72rem; font-weight: 600; border: 1px solid; white-space: nowrap; }
.pill-success, .pill-delivered, .pill-approved, .pill-paid, .pill-active, .pill-resolved { color: var(--kc-green); border-color: var(--kc-green); background: #ecfdf3; }
.pill-danger, .pill-cancelled, .pill-rejected, .pill-failed, .pill-blocked, .pill-closed { color: var(--kc-red); border-color: var(--kc-red); background: #fef2f2; }
.pill-warning, .pill-pending, .pill-processing, .pill-open, .pill-in_progress { color: #b45309; border-color: var(--kc-orange); background: #fffbeb; }
.pill-info, .pill-confirmed, .pill-out_for_delivery { color: var(--kc-blue); border-color: var(--kc-blue); background: #eff6ff; }

/* Forms */
.form-control, .form-select { border-radius: 10px; }
.form-control:focus, .form-select:focus { border-color: var(--kc-blue); box-shadow: 0 0 0 .2rem var(--kc-focus); }
.form-label { font-weight: 600; font-size: .85rem; color: var(--kc-navy); }

/* Auth pages */
.kc-auth { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, var(--kc-navy), var(--kc-navy-3)); padding: 20px; }
.kc-auth .box { background: #fff; border-radius: 18px; width: 100%; max-width: 440px; padding: 30px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.kc-auth .box img.logo { width: 84px; height: 84px; object-fit: contain; display: block; margin: 0 auto 8px; }

/* ---------- Genealogy tree (reference: geneaology reference tree.jpeg) ---------- */
.kc-tree { overflow-x: auto; padding: 10px 0 20px; }
.kc-tree ul { padding-top: 22px; position: relative; display: flex; justify-content: center; margin: 0; padding-left: 0; }
.kc-tree li { list-style: none; text-align: center; position: relative; padding: 22px 6px 0; flex: 1 1 0; min-width: 120px; }
.kc-tree li::before, .kc-tree li::after { content: ''; position: absolute; top: 0; right: 50%; border-top: 1.5px solid #444; width: 50%; height: 22px; }
.kc-tree li::after { right: auto; left: 50%; border-left: 1.5px solid #444; }
.kc-tree li:only-child::after, .kc-tree li:only-child::before { display: none; }
.kc-tree li:only-child { padding-top: 0; }
.kc-tree li:first-child::before, .kc-tree li:last-child::after { border: 0 none; }
.kc-tree li:last-child::before { border-right: 1.5px solid #444; }
.kc-tree ul ul::before { content: ''; position: absolute; top: 0; left: 50%; border-left: 1.5px solid #444; height: 22px; }
.kc-tree > ul { padding-top: 0; }
.kc-node { display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--kc-navy); }
.kc-node .avatar { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #fff7d6, #f6c343); border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.18); overflow: hidden; }
.kc-node .avatar img { width: 70%; height: 70%; object-fit: contain; }
.kc-node.inactive .avatar { background: radial-gradient(circle at 35% 30%, #fff, #f9a8a8); }
.kc-node .nm { font-weight: 800; margin-top: 6px; font-size: .95rem; }
.kc-node .id { color: #5b6b80; font-weight: 700; font-size: .85rem; }
.kc-node.open .avatar { width: 30px; height: 30px; background: radial-gradient(circle at 35% 30%, #fff, #f5b5a0); border-width: 2px; }
.kc-node.open .nm { font-size: .85rem; }
.kc-group-btn { background: var(--kc-navy); color: var(--kc-gold); border-radius: 30px; padding: 10px 20px; font-weight: 800; border: 0; text-decoration: none; }
.kc-group-btn:hover { color: var(--kc-gold-2); }

/* ---------- Public website ---------- */
.site-nav { background: var(--kc-navy); }
.site-nav .nav-link { color: #e5edf7; font-weight: 600; }
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: var(--kc-gold); }
.site-hero { background: linear-gradient(120deg, var(--kc-navy), var(--kc-navy-3)); color: #fff; padding: 70px 0; }
.site-hero h1 span { color: var(--kc-gold); }
.food-card { background: #fff; border-radius: var(--kc-radius); overflow: hidden; box-shadow: var(--kc-shadow); border: 1px solid var(--kc-border); height: 100%; display: flex; flex-direction: column; transition: transform .15s; }
.food-card:hover { transform: translateY(-3px); }
.food-card .img { aspect-ratio: 4/3; background: #fff7e6; display: grid; place-items: center; overflow: hidden; }
.food-card .img img { width: 100%; height: 100%; object-fit: cover; }
.food-card .body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.food-card .price { font-weight: 800; color: var(--kc-navy); }
.food-card .mrp { text-decoration: line-through; color: var(--kc-muted); font-size: .85rem; }
.veg-mark { width: 16px; height: 16px; border: 2px solid var(--kc-green); display: inline-grid; place-items: center; border-radius: 3px; }
.veg-mark::after { content: ''; width: 7px; height: 7px; background: var(--kc-green); border-radius: 50%; }
.veg-mark.nonveg { border-color: var(--kc-red); } .veg-mark.nonveg::after { background: var(--kc-red); }
.site-footer { background: var(--kc-navy); color: #c9d4e3; padding: 40px 0 20px; }
.site-footer a { color: #e5edf7; text-decoration: none; } .site-footer a:hover { color: var(--kc-gold); }

@media print {
  .kc-sidebar, .kc-topbar, .kc-footer, .no-print { display: none !important; }
  .kc-main { margin: 0 !important; } .kc-content { padding: 0 !important; }
  body { background: #fff; }
}

/* ---------- Bootstrap "primary" follows the active panel theme ---------- */
body {
  --bs-primary: var(--kc-blue); --bs-primary-rgb: var(--kc-blue-rgb);
  --bs-link-color: var(--kc-blue); --bs-link-color-rgb: var(--kc-blue-rgb); --bs-link-hover-color: var(--kc-blue-dark);
}
.btn-primary { --bs-btn-bg: var(--kc-blue); --bs-btn-border-color: var(--kc-blue); --bs-btn-hover-bg: var(--kc-blue-dark); --bs-btn-hover-border-color: var(--kc-blue-dark); --bs-btn-active-bg: var(--kc-blue-dark); --bs-btn-active-border-color: var(--kc-blue-dark); --bs-btn-disabled-bg: var(--kc-blue); --bs-btn-disabled-border-color: var(--kc-blue); }
.btn-outline-primary { --bs-btn-color: var(--kc-blue); --bs-btn-border-color: var(--kc-blue); --bs-btn-hover-bg: var(--kc-blue); --bs-btn-hover-border-color: var(--kc-blue); --bs-btn-active-bg: var(--kc-blue-dark); --bs-btn-active-border-color: var(--kc-blue-dark); }
.form-check-input:checked { background-color: var(--kc-blue); border-color: var(--kc-blue); }
.form-check-input:focus { border-color: var(--kc-blue); box-shadow: 0 0 0 .2rem var(--kc-focus); }
.pagination { --bs-pagination-color: var(--kc-blue); --bs-pagination-active-bg: var(--kc-blue); --bs-pagination-active-border-color: var(--kc-blue); --bs-pagination-focus-box-shadow: 0 0 0 .2rem var(--kc-focus); }

/* Panel role chip under the sidebar brand (admin / franchise) */
.kc-role-chip { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 3px 10px; border-radius: 20px; font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; background: rgba(255,255,255,.1); color: var(--kc-gold); border: 1px solid rgba(255,255,255,.14); }

/* ---------- Portal login (admin / franchise): split screen, colours from the theme file ---------- */
.kc-portal { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); background: var(--kc-light); }
.kc-portal-side { position: relative; overflow: hidden; color: #fff; padding: 44px 52px; display: flex; flex-direction: column; gap: 26px; background: var(--kc-portal-bg, linear-gradient(150deg, var(--kc-navy), var(--kc-navy-3))); }
.kc-portal-side::before, .kc-portal-side::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, var(--kc-portal-glow, rgba(255,255,255,.15)), transparent 70%); }
.kc-portal-side::before { width: 420px; height: 420px; right: -140px; top: -120px; }
.kc-portal-side::after { width: 360px; height: 360px; left: -150px; bottom: -150px; }
.kc-portal-side > * { position: relative; z-index: 1; }
.kc-portal-brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.kc-portal-brand:hover { color: #fff; }
.kc-portal-brand img { width: 54px; height: 54px; border-radius: 50%; background: #fff; padding: 5px; object-fit: contain; }
.kc-portal-brand .name { font-weight: 800; color: var(--kc-gold); font-size: 1.1rem; line-height: 1.15; }
.kc-portal-brand .tag { font-size: .74rem; opacity: .8; }
.kc-portal-badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 30px; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: var(--kc-portal-accent, var(--kc-gold)); }
.kc-portal-side h2 { font-size: 2.1rem; font-weight: 800; line-height: 1.2; margin: 0; max-width: 460px; }
.kc-portal-side h2 span { color: var(--kc-portal-accent, var(--kc-gold)); }
.kc-portal-side .lead { font-size: .98rem; opacity: .85; max-width: 440px; margin: 0; }
.kc-portal-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.kc-portal-points li { display: flex; align-items: center; gap: 14px; font-size: .92rem; }
.kc-portal-points i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.1rem; flex-shrink: 0; background: rgba(255,255,255,.1); color: var(--kc-portal-accent, var(--kc-gold)); }
.kc-portal-points small { display: block; opacity: .7; font-size: .76rem; }
.kc-portal-foot { margin-top: auto; font-size: .75rem; opacity: .65; }
.kc-portal-main { display: grid; place-items: center; padding: 32px 20px; }
.kc-portal-card { width: 100%; max-width: 420px; background: #fff; border-radius: 18px; padding: 34px 32px; box-shadow: 0 18px 50px rgba(0,0,0,.08); border: 1px solid var(--kc-border); border-top: 4px solid var(--kc-portal-accent, var(--kc-gold)); }
.kc-portal-card .card-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem; color: #fff; background: linear-gradient(135deg, var(--kc-navy), var(--kc-blue)); margin-bottom: 14px; }
.kc-portal-card h1 { font-size: 1.45rem; font-weight: 800; color: var(--kc-navy); margin: 0 0 4px; }
.kc-portal-card .sub { color: var(--kc-muted); font-size: .86rem; margin-bottom: 20px; }
.kc-portal-note { display: flex; gap: 8px; align-items: flex-start; font-size: .76rem; color: var(--kc-muted); background: var(--kc-light); border-radius: 10px; padding: 10px 12px; margin-top: 18px; }
.kc-portal-note i { color: var(--kc-blue); }
.kc-portal-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 16px; font-size: .82rem; }
.kc-portal-links a { text-decoration: none; }
.kc-portal-mobile-brand { display: none; }
@media (max-width: 991.98px) {
  .kc-portal { grid-template-columns: 1fr; }
  .kc-portal-side { display: none; }
  .kc-portal-main { min-height: 100vh; padding: 24px 16px; background: var(--kc-portal-bg, linear-gradient(150deg, var(--kc-navy), var(--kc-navy-3))); }
  .kc-portal-card { padding: 26px 20px; }
  .kc-portal-mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px dashed var(--kc-border); text-decoration: none; }
  .kc-portal-mobile-brand img { width: 42px; height: 42px; border-radius: 50%; object-fit: contain; }
  .kc-portal-mobile-brand .name { font-weight: 800; color: var(--kc-navy); line-height: 1.1; }
  .kc-portal-mobile-brand small { color: var(--kc-muted); font-size: .72rem; display: block; }
}

/* ---- 2026-10-13: topbar actions (bell, dark mode, profile menu), impersonation bar, bottom nav, dark theme ---- */
.kc-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.kc-icon-btn { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--kc-border); background: #fff; color: var(--kc-navy); display: grid; place-items: center; font-size: 1.05rem; }
.kc-icon-btn:hover { background: var(--kc-light); }
.kc-dot { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--kc-red); color: #fff; font-size: .66rem; font-weight: 700; display: grid; place-items: center; }
.kc-user-btn { border: 0; background: transparent; padding: 2px 6px; border-radius: 10px; text-align: left; }
.kc-user-btn:hover { background: var(--kc-light); }
.kc-news-menu { width: min(340px, 92vw); padding: 0; }
.kc-news-menu .dropdown-header { padding: 10px 14px; border-bottom: 1px solid var(--kc-border); }
.kc-news-item { padding: 10px 14px; border-bottom: 1px solid var(--kc-border); }
.kc-news-item:last-child { border-bottom: 0; }
.kc-news-date { font-size: .7rem; color: var(--kc-muted); margin-top: 2px; }
.kc-impersonate-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 24px; background: #fff7cc; border-bottom: 1px solid #f0d78a; color: #7a5a00; font-size: .9rem; }
.kc-bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: flex; justify-content: space-around; background: var(--kc-navy); border-top: 1px solid rgba(255,255,255,.08); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.kc-bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--kc-side-text); text-decoration: none; font-size: .66rem; padding: 4px 2px; border-radius: 10px; }
.kc-bottomnav a i { font-size: 1.25rem; line-height: 1; }
.kc-bottomnav a.active { color: var(--kc-gold); }
@media (max-width: 991.98px) { .kc-content { padding-bottom: 84px; } .kc-footer { padding-bottom: 84px; } }
@media (min-width: 992px) { .kc-bottomnav { display: none; } }
.kc-popup .modal-header { background: var(--kc-navy); color: #fff; }
.kc-popup .modal-header .btn-close { filter: invert(1); }

/* Dark theme (toggle in the topbar, stored in localStorage) — best-effort override of the main surfaces */
html[data-theme="dark"] { --kc-light: #0f172a; --kc-text: #e5e7eb; --kc-muted: #9ca3af; --kc-border: #334155; --kc-shadow: 0 4px 18px rgba(0,0,0,.4); }
html[data-theme="dark"] body { background: #0f172a; color: #e5e7eb; }
html[data-theme="dark"] .kc-topbar, html[data-theme="dark"] .kc-card, html[data-theme="dark"] .kc-stat, html[data-theme="dark"] .card,
html[data-theme="dark"] .dropdown-menu, html[data-theme="dark"] .modal-content, html[data-theme="dark"] .kc-icon-btn, html[data-theme="dark"] .list-group-item,
html[data-theme="dark"] .accordion-item, html[data-theme="dark"] .offcanvas { background: #1e293b; color: #e5e7eb; border-color: #334155; }
html[data-theme="dark"] .kc-card-head, html[data-theme="dark"] .table > :not(caption) > * > *, html[data-theme="dark"] .kc-table th, html[data-theme="dark"] .kc-table td { background: transparent; color: #e5e7eb; border-color: #334155; }
html[data-theme="dark"] .kc-table thead th, html[data-theme="dark"] .table-light, html[data-theme="dark"] .bg-light, html[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * { background: #243247 !important; color: #e5e7eb; }
html[data-theme="dark"] .text-navy, html[data-theme="dark"] .kc-page-head h1, html[data-theme="dark"] .kc-stat .value, html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3, html[data-theme="dark"] h4, html[data-theme="dark"] h5, html[data-theme="dark"] h6 { color: #f1f5f9 !important; }
html[data-theme="dark"] .text-muted, html[data-theme="dark"] .kc-stat .label, html[data-theme="dark"] .kc-page-head .sub, html[data-theme="dark"] .form-text { color: #9ca3af !important; }
html[data-theme="dark"] .form-control, html[data-theme="dark"] .form-select, html[data-theme="dark"] .input-group-text { background: #0f172a; color: #e5e7eb; border-color: #475569; }
html[data-theme="dark"] .form-control::placeholder { color: #64748b; }
html[data-theme="dark"] .dropdown-item { color: #e5e7eb; } html[data-theme="dark"] .dropdown-item:hover { background: #334155; color: #fff; }
html[data-theme="dark"] .btn-light { background: #334155; color: #e5e7eb; border-color: #475569; }
html[data-theme="dark"] .alert-success { background: #0f3d2a; color: #bbf7d0; border-color: #166534; } html[data-theme="dark"] .alert-danger { background: #3f1212; color: #fecaca; border-color: #991b1b; }
html[data-theme="dark"] .kc-icon-btn:hover, html[data-theme="dark"] .kc-user-btn:hover { background: #334155; }
html[data-theme="dark"] .kc-impersonate-bar { background: #3b2f00; color: #fde68a; border-color: #705a00; }
html[data-theme="dark"] .pagination .page-link { background: #1e293b; color: #e5e7eb; border-color: #334155; }

/* Daily business report (client 2026-10-17): admin / shoppe dashboards */
.kc-today-card .kc-card-head { background: linear-gradient(90deg, #fff8e1, #fff); }
.kc-today-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--kc-border, #e5e7eb); border-radius: 12px; background: #fff; height: 100%; }
.kc-today-item > i { font-size: 1.5rem; flex: 0 0 auto; }
.kc-today-item .label { font-size: .74rem; color: var(--kc-muted); line-height: 1.2; }
.kc-today-item .value { font-weight: 800; color: var(--kc-navy); font-size: 1.05rem; line-height: 1.2; overflow-wrap: anywhere; }
html[data-theme=dark] .kc-today-card .kc-card-head { background: none; }
html[data-theme=dark] .kc-today-item { background: transparent; }
html[data-theme=dark] .kc-today-item .value { color: inherit; }
@media (max-width: 767.98px) { .kc-today-item { padding: 8px 10px; } .kc-today-item > i { font-size: 1.2rem; } .kc-today-item .value { font-size: .95rem; } }
