:root { --accent:#236b58; --accent-soft:#e3f1eb; --ink:#19241f; --muted:#6c7873; --paper:#fff; --cream:#f6f3eb; --line:#e2e7e3; --nav:#142a24; --danger:#bd4f49; --shadow:0 18px 50px rgba(20,42,36,.09); }
* { box-sizing:border-box; }
[hidden] { display:none!important; }
body { margin:0; color:var(--ink); background:var(--cream); font:14px/1.5 "DM Sans",sans-serif; }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
h1,h2,h3,.brand,.workspace-brand { font-family:"Manrope",sans-serif; }
.workspace-shell { min-height:100vh; display:grid; grid-template-columns:245px 1fr; }
.workspace-sidebar { position:sticky; top:0; height:100vh; padding:24px 17px; color:white; background:var(--nav); display:flex; flex-direction:column; }
.brand,.workspace-brand { color:white; text-decoration:none; display:flex; align-items:center; gap:10px; padding:0 9px; font-size:19px; font-weight:800; }
.brand img,.workspace-brand img { width:36px; height:36px; }
.brand small,.workspace-brand small { display:block; color:#9eb1aa; font:600 9px "DM Sans",sans-serif; text-transform:uppercase; letter-spacing:.12em; }
.module-badge { margin:28px 9px 14px; color:#9eb1aa; font-size:10px; text-transform:uppercase; letter-spacing:.13em; font-weight:700; }
.workspace-nav { display:grid; gap:4px; margin-top:28px; }
.workspace-nav button,.portal-link { width:100%; border:0; border-radius:10px; padding:11px 12px; color:#c6d3ce; background:transparent; text-align:left; text-decoration:none; font-weight:600; }
.workspace-nav button { display:flex; align-items:center; gap:9px; }
.nav-icon { font-size:15px; opacity:.8; flex-shrink:0; width:18px; text-align:center; }
.workspace-nav button:hover,.workspace-nav button.active,.portal-link:hover { color:white; background:rgba(255,255,255,.1); }
.portal-link { margin-top:auto; display:block; }
.workspace-main { min-width:0; }
.workspace-header { position:sticky; top:0; z-index:4; display:flex; justify-content:space-between; align-items:center; gap:16px; padding:24px 32px 18px; background:rgba(246,243,235,.92); backdrop-filter:blur(12px); }
.workspace-header h1 { margin:3px 0 0; font-size:25px; }
.eyebrow { color:var(--accent); font-size:10px; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }
.header-actions { display:flex; gap:9px; }
.workspace-account { display:grid; gap:1px; padding:7px 11px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.72); }
.workspace-account strong { font-size:12px; }
.workspace-account span { color:var(--muted); font-size:10px; }
.button { border:0; border-radius:10px; padding:10px 14px; font-weight:700; }
.button.primary { color:white; background:var(--accent); box-shadow:0 6px 18px color-mix(in srgb,var(--accent) 24%,transparent); }
.button.secondary { color:var(--accent); background:var(--accent-soft); }
.button.ghost { color:var(--accent); background:transparent; }
.button.danger { color:var(--danger); }
.workspace-content { max-width:1500px; margin:auto; padding:4px 32px 50px; }
.metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.metric,.panel { background:var(--paper); border:1px solid rgba(20,42,36,.06); border-radius:17px; box-shadow:0 2px 9px rgba(20,42,36,.025); }
.metric { min-height:120px; padding:18px; }
.metric span { color:var(--muted); font-size:11px; font-weight:700; }
.metric strong { display:block; margin-top:16px; font:800 26px "Manrope",sans-serif; }
.metric small { color:var(--accent); }
.dashboard-grid { display:grid; grid-template-columns:1.4fr .8fr; gap:15px; margin-top:15px; }
.reports-panel { grid-column:1/-1; }
.insight-list { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:0; padding:0; list-style:none; }
.insight-list li { padding:13px; border:1px solid var(--line); border-radius:13px; color:var(--muted); background:color-mix(in srgb,var(--accent-soft) 45%,white); }
.panel { padding:20px; }
.panel-header,.section-header { display:flex; justify-content:space-between; align-items:end; gap:12px; margin-bottom:16px; }
.panel-header h2,.section-header h2 { margin:0; font-size:18px; }
.panel-header p,.section-header p { margin:2px 0 0; color:var(--muted); font-size:11px; }
.record-list { display:grid; }
.record-row { display:grid; grid-template-columns:1fr auto; align-items:center; gap:12px; padding:13px 0; border-top:1px solid var(--line); }
.module-row { border-left:0; border-right:0; border-bottom:0; background:transparent; text-align:left; }
.record-row:first-child { border-top:0; }
.record-row strong,.record-row span { display:block; }
.record-row span { color:var(--muted); font-size:11px; }
.status { display:inline-flex!important; padding:4px 8px; border-radius:99px; color:var(--accent)!important; background:var(--accent-soft); font-size:10px!important; font-weight:700; }
.section-header { margin-top:4px; }
.toolbar { display:flex; gap:8px; }
.search { min-width:230px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:white; outline:none; }
.search:focus { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.table-panel { overflow:hidden; padding:0; }
table { width:100%; border-collapse:collapse; }
th { padding:12px 15px; color:var(--muted); background:#fafbf9; text-align:left; font-size:10px; letter-spacing:.07em; text-transform:uppercase; }
td { padding:14px 15px; border-top:1px solid var(--line); }
.row-actions { display:flex; gap:5px; white-space:nowrap; }
.empty { padding:40px!important; color:var(--muted); text-align:center; }
.modal-backdrop { position:fixed; inset:0; z-index:20; display:grid; place-items:center; padding:18px; background:rgba(10,25,20,.6); backdrop-filter:blur(4px); }
.modal,.record-modal { width:min(570px,100%); max-height:90vh; overflow:auto; border-radius:20px; background:white; box-shadow:var(--shadow); }
.modal header,.modal-header { display:flex; justify-content:space-between; align-items:center; padding:20px 22px 8px; }
.modal h2,.record-modal h2 { margin:0; }
.modal-close,.icon-button { border:0; color:var(--muted); background:transparent; }
.modal form,.record-modal form { padding:12px 22px 22px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:13px; }
.field { display:grid; gap:5px; }
.field.full { grid-column:1/-1; }
.field label { color:var(--muted); font-size:11px; font-weight:700; }
.field input,.field select,.field textarea { width:100%; padding:10px 11px; border:1px solid var(--line); border-radius:10px; outline:none; }
.field textarea { min-height:78px; resize:vertical; }
.form-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:18px; }
.toast { position:fixed; right:20px; bottom:20px; z-index:30; padding:11px 15px; color:white; background:var(--nav); border-radius:10px; opacity:0; transform:translateY(80px); transition:.2s; }
.toast.show { opacity:1; transform:none; }
.mobile-menu { display:none; }
.sidebar-close { display:none; }
.empty-state { margin:15px 0; padding:24px; border:1px dashed color-mix(in srgb,var(--accent) 40%,var(--line)); border-radius:18px; background:color-mix(in srgb,var(--accent-soft) 58%,white); }
.empty-state h2 { margin:0 0 5px; }
.empty-state p { margin:0 0 14px; color:var(--muted); }
.payment-banner { display:flex; justify-content:space-between; align-items:center; gap:14px; margin:0 0 15px; padding:16px 18px; border:1px solid color-mix(in srgb,var(--accent) 38%,var(--line)); border-radius:17px; background:color-mix(in srgb,var(--accent-soft) 68%,white); }
.payment-banner strong,.payment-banner span { display:block; }
.payment-banner span { margin-top:3px; color:var(--muted); font-size:12px; }
.payment-gate-body { padding:0 22px 22px; }
.payment-gate-body p { color:var(--muted); }
.payment-gate-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:18px; }
.taksh-auth-screen { min-height:100vh; display:grid; place-items:center; padding:24px; background:radial-gradient(circle at 80% 5%, var(--accent-soft), transparent 30%), var(--cream); }
.taksh-auth-card { width:min(460px,100%); padding:28px; border:1px solid rgba(20,42,36,.08); border-radius:24px; background:white; box-shadow:var(--shadow); }
.taksh-auth-brand { display:flex; align-items:center; gap:10px; color:var(--ink); text-decoration:none; font:800 20px "Manrope",sans-serif; }
.taksh-auth-brand img { width:38px; height:38px; }
.taksh-auth-brand small { display:block; color:var(--muted); font:700 9px "DM Sans",sans-serif; letter-spacing:.14em; text-transform:uppercase; }
.taksh-auth-card h1 { margin:10px 0; font-size:32px; line-height:1.05; }
.muted,.auth-footnote { color:var(--muted); }
.auth-switch { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:20px 0; padding:5px; background:#edf3ef; border-radius:14px; }
.auth-switch a { padding:10px; border-radius:10px; text-align:center; text-decoration:none; color:var(--muted); font-weight:800; }
.auth-switch a.active { color:white; background:var(--nav); }
.taksh-auth-form { display:grid; gap:12px; }
.form-error { min-height:18px; margin:0; color:#ba403b; font-size:12px; font-weight:700; }
.auth-footnote { margin-bottom:0; font-size:11px; }
@media(max-width:900px){ .metrics{grid-template-columns:1fr 1fr}.dashboard-grid,.insight-list{grid-template-columns:1fr} }
.sidebar-backdrop{display:none;position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:9;}
@media(max-width:700px){
  .workspace-shell{display:block}.workspace-sidebar{display:none;position:fixed;inset:0 auto 0 0;z-index:10;width:270px;box-shadow:4px 0 24px rgba(0,0,0,.18)}.workspace-sidebar.open{display:flex}
  .sidebar-backdrop.open{display:block}
  .sidebar-close{display:flex;align-self:flex-end;margin-bottom:8px;width:32px;height:32px;align-items:center;justify-content:center;border:0;border-radius:8px;background:rgba(255,255,255,.12);color:#fff;font-size:16px;cursor:pointer;flex-shrink:0}
  .mobile-menu{display:inline-block;border:0;background:transparent;font-size:22px}.workspace-header{padding:17px 15px 13px}.workspace-header h1{font-size:20px}
  .workspace-content{padding:4px 14px 35px}.metrics{display:flex;overflow-x:auto}.metric{min-width:190px}.section-header{align-items:stretch;flex-direction:column}.toolbar{flex-direction:column}.search{width:100%;min-width:0}
  .table-panel{overflow-x:auto}table{min-width:700px}.form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.header-actions .secondary{display:none}
  .workspace-account{display:none}.payment-banner,.payment-gate-actions{align-items:stretch;flex-direction:column}
}

/* Settings */
.settings-grid { display:grid; grid-template-columns:1fr; gap:16px; max-width:720px; }
.settings-panel .panel-header { margin-bottom:18px; }
.settings-form .form-grid { margin-bottom:0; }
.settings-actions { display:flex; flex-direction:column; gap:10px; align-items:flex-start; }
.settings-actions .button { min-width:200px; text-align:center; }
.settings-hint { margin:12px 0 0; color:var(--muted); font-size:12px; }
.settings-kv { display:grid; gap:1px; border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.kv-row { display:flex; justify-content:space-between; align-items:center; padding:11px 14px; background:white; font-size:13px; }
.kv-row:not(:last-child) { border-bottom:1px solid var(--line); }
.kv-row span { color:var(--muted); }


/* Workspace logo */
.workspace-logo { width:36px; height:36px; border-radius:8px; object-fit:cover; flex-shrink:0; }
.logo-upload-area { display:flex; align-items:flex-start; gap:20px; flex-wrap:wrap; }
.logo-preview { width:80px; height:80px; border-radius:12px; object-fit:cover; border:2px solid var(--line); flex-shrink:0; }
.logo-placeholder { width:80px; height:80px; border-radius:12px; background:var(--soft); border:2px dashed var(--line); display:flex; align-items:center; justify-content:center; font-size:2rem; flex-shrink:0; }
.logo-upload-actions { display:flex; flex-direction:column; align-items:flex-start; gap:8px; }

.file-input-hidden { position:absolute; width:0.1px; height:0.1px; opacity:0; overflow:hidden; pointer-events:none; }
.otp-overlay { position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:9999; display:flex; align-items:center; justify-content:center; padding:20px; }
.otp-card { background:#fff; border-radius:16px; padding:32px; max-width:340px; width:100%; text-align:center; box-shadow:0 20px 60px rgba(0,0,0,.3); }
.otp-icon { font-size:2rem; margin-bottom:8px; }
.otp-title { font-weight:700; font-size:1.1rem; margin-bottom:6px; }
.otp-phone { font-size:.9rem; color:var(--muted); margin-bottom:20px; }
.otp-code { font-size:2.8rem; font-weight:900; letter-spacing:8px; color:var(--accent); background:var(--accent-soft); border-radius:12px; padding:16px; margin-bottom:16px; }
.otp-hint { font-size:.8rem; color:var(--muted); margin-bottom:20px; }
.otp-close-btn { width:100%; }

/* Spinner / loader */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { display:inline-block; width:18px; height:18px; border:2.5px solid var(--line); border-top-color:var(--accent); border-radius:50%; animation:spin .7s linear infinite; vertical-align:middle; }
.panel-loader { display:flex; align-items:center; justify-content:center; gap:10px; padding:40px; color:var(--muted); font-size:.9rem; }

/* Toolbar wraps gracefully on narrow screens */
.toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.section-header { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; flex-wrap:wrap; }

/* Status pills used across orders/customers tables */
.pill { display:inline-block; padding:3px 10px; border-radius:20px; font-size:.72rem; font-weight:700; }

/* Smooth panel appearance */
.panel { animation: panel-in .18s ease-out; }
@keyframes panel-in { from { opacity:.55; transform: translateY(3px); } to { opacity:1; transform:none; } }

/* Inline advisory note under section header */
.inline-note { background:var(--accent-soft); color:var(--ink); border-radius:10px; padding:10px 14px; font-size:.82rem; margin-bottom:14px; line-height:1.4; }

/* ── Products: category filter, multi-select, pagination, image uploader ── */
.cat-filter-row { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:14px; }
.cat-filter { border:1.5px solid var(--line); background:var(--paper); color:var(--ink); border-radius:20px; padding:5px 13px; font-size:.8rem; font-weight:600; cursor:pointer; transition:all .12s; white-space:nowrap; }
.cat-filter:hover { border-color:var(--accent); }
.cat-filter.active { background:var(--accent); color:#fff; border-color:var(--accent); }

.bulk-bar { display:flex; align-items:center; gap:12px; background:var(--accent-soft); border-radius:10px; padding:10px 14px; margin-bottom:12px; font-size:.85rem; }
.bulk-bar strong { color:var(--accent); }

.chk-cell { width:36px; text-align:center; }
.prod-chk, #select-all-page { width:16px; height:16px; cursor:pointer; accent-color:var(--accent); }
.prod-thumb { width:36px; height:36px; object-fit:cover; border-radius:6px; display:block; }
tr.row-selected { background:var(--accent-soft); }
.pill-warn { display:inline-block; padding:2px 9px; border-radius:20px; font-size:.7rem; font-weight:700; background:#fef9c3; color:#b45309; border:1px solid #fde047; }

.pager { display:flex; align-items:center; justify-content:center; gap:16px; padding:16px; font-size:.85rem; color:var(--muted); }
.pager button[disabled] { opacity:.45; cursor:not-allowed; }

.product-image-field .pi-uploader { display:flex; gap:16px; align-items:center; }
.pi-preview { width:80px; height:80px; border-radius:12px; object-fit:cover; border:2px solid var(--line); flex-shrink:0; background:var(--cream); }
.pi-actions { display:flex; flex-direction:column; align-items:flex-start; gap:8px; }

/* ── Owner-designed categories ─────────────────────────────────────────── */
.cat-chip-thumb { width:16px; height:16px; border-radius:4px; object-fit:cover; vertical-align:middle; margin-right:2px; }
.cat-manager { display:flex; flex-direction:column; gap:12px; }
.cat-manage-row { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid var(--line); }
.cat-manage-thumb { width:44px; height:44px; border-radius:8px; object-fit:cover; flex-shrink:0; background:var(--cream); }
.cat-name-input { flex:1; padding:8px 10px; border:1.5px solid var(--line); border-radius:8px; font:inherit; }
.cat-add-row { display:flex; align-items:center; gap:10px; padding-top:6px; }
.cat-add-row input[type="text"] { flex:1; padding:9px 12px; border:1.5px solid var(--line); border-radius:8px; font:inherit; }

/* Custom confirm dialog (replaces native confirm()) */
.confirm-dialog { max-width: 420px; padding: 28px; }
.confirm-message { font-size: .95rem; line-height: 1.5; color: var(--ink); margin-bottom: 22px; }

/* Splash screen — shared across all business workspaces */
.splash-screen { position: fixed; inset: 0; background: #132a23; display: flex; align-items: center; justify-content: center; z-index: 9999; transition: opacity .4s ease; }
.splash-screen.hidden { opacity: 0; pointer-events: none; }
.splash-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; color: #fff; }
.splash-mark { width: 56px; height: 56px; border-radius: 18px; display: block; }
.splash-label { font-weight: 700; font-size: 18px; letter-spacing: -.02em; color: rgba(255,255,255,.85); }
.splash-sub { font-size: 13px; color: rgba(255,255,255,.45); margin-top: -8px; }
.splash-spinner { width: 28px; height: 28px; border: 3px solid rgba(255,255,255,.2); border-top-color: #fff; border-radius: 50%; animation: splash-spin .7s linear infinite; }
@keyframes splash-spin { to { transform: rotate(360deg); } }

/* Settings sections */
.settings-section-title { font-size:13px; font-weight:800; color:var(--muted); text-transform:uppercase; letter-spacing:.08em; margin:22px 0 10px; padding-bottom:8px; border-bottom:1px solid var(--line); }
.settings-hint-inline { font-size:11px; color:var(--muted); font-weight:400; }

/* Store hours grid */
.hours-row { display:flex; align-items:center; gap:12px; padding:7px 0; border-bottom:1px solid var(--line); }
.hours-row:last-child { border-bottom:0; }
.hours-day-toggle { display:flex; align-items:center; gap:8px; min-width:110px; font-weight:600; font-size:.88rem; cursor:pointer; }
.hours-day-toggle input[type=checkbox] { width:16px; height:16px; accent-color:var(--accent); }
.hours-times { display:flex; align-items:center; gap:8px; }
.hours-times input[type=time] { padding:5px 8px; border:1.5px solid var(--line); border-radius:8px; font:inherit; font-size:.85rem; color:var(--ink); background:var(--cream); }
.hours-times input[type=time]:focus { border-color:var(--accent); outline:none; }
.hours-disabled input[type=time] { opacity:.35; }
.hours-sep { color:var(--muted); font-size:.85rem; }

/* Checkbox group (payment methods) */
.checkbox-group { display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; }
.checkbox-label { display:flex; align-items:center; gap:5px; padding:6px 12px; border:1.5px solid var(--line); border-radius:8px; font-size:.85rem; font-weight:600; cursor:pointer; }
.checkbox-label input { accent-color:var(--accent); }
.checkbox-label:has(input:checked) { border-color:var(--accent); background:var(--accent-soft); }
