/* SmartGST -- theme on top of Bootstrap 5.3 */
:root {
  --sg-primary: #2754c5;
  --sg-primary-rgb: 39, 84, 197;
  --sg-ink: #172033;
  --sg-muted: #667085;
  --sg-bg: #f3f5f9;
  --sg-card: #ffffff;
  --sg-line: #e3e7ef;
  --sg-side: #0f1b33;
  --sg-side-ink: #b7c1d6;
  --sg-side-active: #ffffff;
  --sg-success: #0f9d58;
  --sg-danger: #d93025;
  --sg-warn: #f29900;
  --sg-primary-hover: #1f45a6;
  --sg-surface: #ffffff;       /* cards, grids, top bar */
  --sg-surface-2: #f8f9fc;     /* table heads, totals rows */
  --sg-hover: #f6f8fd;
  --sg-soft: #eaf0ff;          /* picked / active highlight */
  --sg-top-bg: rgba(255,255,255,.92);
  --sg-input-line: #d5dbe6;
  --sg-label: #475467;
  --sg-radius: .85rem;
  --sg-side-sec: #7382a3;
  --sg-kbd-bg: #e9edf5; --sg-kbd-ink: #34405a; --sg-kbd-line: #d3d9e6;
  --sg-shadow: 0 1px 2px rgba(16,24,40,.04);
  --sg-brand-logo: linear-gradient(135deg, #4f7cff, #22c1a4);
  --bs-primary: var(--sg-primary);
  --bs-primary-rgb: var(--sg-primary-rgb);
  --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-body-font-size: .875rem;
  --bs-body-color: var(--sg-ink);
  --bs-border-color: var(--sg-line);
  --bs-link-color: var(--sg-primary); --bs-link-color-rgb: var(--sg-primary-rgb);
  --bs-link-hover-color: var(--sg-primary-hover); --bs-link-hover-color-rgb: var(--sg-primary-rgb);
}

body { background: var(--sg-bg); }
a { text-decoration: none; }
.btn-primary { --bs-btn-bg: var(--sg-primary); --bs-btn-border-color: var(--sg-primary); --bs-btn-hover-bg: var(--sg-primary-hover); --bs-btn-hover-border-color: var(--sg-primary-hover); --bs-btn-active-bg: var(--sg-primary-hover); --bs-btn-active-border-color: var(--sg-primary-hover); }
.text-primary { color: var(--sg-primary) !important; }
.bg-primary { background: var(--sg-primary) !important; }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fw-600 { font-weight: 600; }
.small-muted { color: var(--sg-muted); font-size: .78rem; }
kbd { background: var(--sg-kbd-bg); color: var(--sg-kbd-ink); border: 1px solid var(--sg-kbd-line); box-shadow: none; font-size: .7rem; padding: .05rem .3rem; }

/* ---- Shell */
.sg-shell { display: flex; min-height: 100vh; }
.sg-side {
  width: 236px; flex: 0 0 236px; background: var(--sg-side); color: var(--sg-side-ink);
  position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin;
  transition: margin-left .2s ease;
}
.sg-brand { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.1rem .8rem; color: #fff; font-weight: 800; font-size: 1.1rem; letter-spacing: -.02em; }
.sg-brand .logo { width: 32px; height: 32px; border-radius: 9px; background: var(--sg-brand-logo); display: grid; place-items: center; font-size: 1rem; }
.sg-company { margin: 0 .8rem .6rem; padding: .5rem .7rem; border-radius: .6rem; background: rgba(255,255,255,.06); font-size: .78rem; line-height: 1.3; }
.sg-company b { color: #fff; display: block; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-nav { list-style: none; margin: 0; padding: 0 .6rem 1.5rem; }
.sg-nav .sec { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--sg-side-sec); padding: .9rem .6rem .35rem; }
.sg-nav a { display: flex; align-items: center; gap: .6rem; padding: .42rem .6rem; border-radius: .5rem; color: var(--sg-side-ink); font-size: .83rem; }
.sg-nav a i { font-size: 1rem; opacity: .85; width: 1.1rem; text-align: center; }
.sg-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sg-nav a.active { background: var(--sg-primary); color: var(--sg-side-active); }
.sg-nav a kbd { margin-left: auto; background: rgba(255,255,255,.08); color: #9aa7c2; border: 0; }
.sg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sg-top {
  position: sticky; top: 0; z-index: 1020; background: var(--sg-top-bg); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--sg-line); display: flex; align-items: center; gap: .75rem; padding: .55rem 1.25rem; min-height: 56px;
}
.sg-top h1 { font-size: 1.05rem; font-weight: 700; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-content { padding: 1.25rem; flex: 1; }
.sg-foot { padding: .6rem 1.25rem; color: var(--sg-muted); font-size: .75rem; border-top: 1px solid var(--sg-line); background: var(--sg-surface); }
body.side-collapsed .sg-side { margin-left: -236px; }

@media (max-width: 991.98px) {
  .sg-side { position: fixed; z-index: 1040; margin-left: -236px; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  body.side-open .sg-side { margin-left: 0; }
  .sg-content { padding: .85rem; }
  .sg-top { padding: .5rem .85rem; }
}

/* ---- Cards */
.card { --bs-card-bg: var(--sg-surface); border: 1px solid var(--sg-line); border-radius: var(--sg-radius); box-shadow: var(--sg-shadow); }
.card-header { background: transparent; border-bottom: 1px solid var(--sg-line); font-weight: 600; padding: .75rem 1rem; }
.stat { padding: 1rem 1.1rem; display: flex; gap: .9rem; align-items: center; }
.stat .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; flex: 0 0 44px; }
.stat .v { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.stat .l { color: var(--sg-muted); font-size: .78rem; }
.ic-blue { background: #e8efff; color: #2754c5; } .ic-green { background: #e3f6ec; color: #0f9d58; }
.ic-amber { background: #fff3dc; color: #c77700; } .ic-red { background: #fde7e5; color: #c5221f; }
.ic-violet { background: #efe9ff; color: #6d28d9; } .ic-teal { background: #dff7f3; color: #0f766e; }
.quick-tile { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .9rem .5rem; border-radius: .75rem; border: 1px solid var(--sg-line); background: var(--sg-surface); color: var(--sg-ink); font-weight: 600; font-size: .8rem; transition: .15s; }
.quick-tile i { font-size: 1.35rem; color: var(--sg-primary); }
.quick-tile:hover { border-color: var(--sg-primary); box-shadow: 0 4px 14px rgba(var(--sg-primary-rgb), .12); transform: translateY(-1px); }

/* ---- Tables */
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .5rem .65rem; }
.table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--sg-muted); font-weight: 600; background: var(--sg-surface-2); border-bottom: 1px solid var(--sg-line); white-space: nowrap; }
.table-hover tbody tr:hover { background: var(--sg-hover); }
.table tr.grp td { background: var(--sg-surface-2); font-weight: 700; }
.table tr.tot td { font-weight: 700; border-top: 2px solid var(--sg-input-line); background: var(--sg-surface-2); }
.table-report td { font-size: .82rem; }
tr[data-href] { cursor: pointer; }

/* ---- Forms */
.form-control, .form-select { border-color: var(--sg-input-line); border-radius: .5rem; font-size: .86rem; }
.form-control:focus, .form-select:focus, .btn:focus-visible { border-color: var(--sg-primary); box-shadow: 0 0 0 .2rem rgba(var(--sg-primary-rgb), .18); }
.form-label { font-weight: 600; font-size: .76rem; color: var(--sg-label); margin-bottom: .25rem; }
.form-control-sm, .form-select-sm { font-size: .82rem; }
input.is-picked { background: var(--sg-soft); }
.req::after { content: ' *'; color: var(--sg-danger); }
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; }
.filter-bar .form-control, .filter-bar .form-select { width: auto; min-width: 130px; }

/* ---- Autocomplete */
.ac-wrap { position: relative; }
.ac-list {
  position: fixed; z-index: 1080; width: max-content; max-width: min(560px, 92vw);
  max-height: 320px; overflow-y: auto; background: var(--sg-surface); border: 1px solid var(--sg-input-line); border-radius: .6rem;
  box-shadow: 0 12px 32px rgba(16,24,40,.16); padding: .25rem;
}
.ac-item { padding: .42rem .6rem; border-radius: .4rem; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; font-size: .84rem; }
.ac-item .sub { color: var(--sg-muted); font-size: .74rem; white-space: nowrap; }
.ac-item.active, .ac-item:hover { background: var(--sg-soft); }
.ac-item.create { color: var(--sg-primary); font-weight: 600; border-top: 1px dashed var(--sg-line); margin-top: .2rem; }
.ac-empty { padding: .5rem .6rem; color: var(--sg-muted); font-size: .8rem; }

/* ---- Voucher entry */
.voucher-head { background: var(--sg-surface); border: 1px solid var(--sg-line); border-radius: var(--sg-radius); padding: 1rem; }
.grid-wrap { background: var(--sg-surface); border: 1px solid var(--sg-line); border-radius: var(--sg-radius); overflow: auto; }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 900px; table-layout: auto; }
table.grid th[data-col], table.grid td[data-col] { min-width: 76px; }
table.grid th[data-col=item], table.grid td[data-col=item] { min-width: 240px; }
table.grid th[data-col=description], table.grid td[data-col=description] { min-width: 160px; }
table.grid td[data-col=unit] select, table.grid td[data-col=gst_rate] select { min-width: 72px; }
table.grid th { position: sticky; top: 0; background: var(--sg-surface-2); font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--sg-muted); padding: .5rem .4rem; border-bottom: 1px solid var(--sg-line); white-space: nowrap; font-weight: 600; z-index: 2; }
table.grid td { padding: .2rem .25rem; border-bottom: 1px solid var(--sg-line); vertical-align: top; }
table.grid td.sno { width: 34px; text-align: center; color: var(--sg-muted); padding-top: .55rem; font-size: .78rem; }
table.grid input, table.grid select { border: 1px solid transparent; background: transparent; border-radius: .35rem; width: 100%; padding: .32rem .4rem; font-size: .84rem; color: inherit; }
table.grid input:hover { border-color: var(--sg-line); }
table.grid input:focus, table.grid select:focus { outline: none; border-color: var(--sg-primary); background: var(--sg-surface); box-shadow: 0 0 0 .15rem rgba(var(--sg-primary-rgb), .15); }
table.grid input.n { text-align: right; font-variant-numeric: tabular-nums; }
table.grid td.amt { text-align: right; padding: .5rem .6rem; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.grid .del { color: #b0b7c3; border: 0; background: none; padding: .35rem; }
table.grid .del:hover { color: var(--sg-danger); }
table.grid tr.row-active td { background: var(--sg-hover); }
/* Rate update: changed rows amber, just-saved rows green */
.rate-grid .rate-in { width: 110px; margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; }
.rate-grid .rate-in.changed { border-color: var(--sg-warn); }
.rate-grid .rate-in.over { color: var(--sg-danger); }
.rate-grid .incl { font-size: .66rem; color: var(--sg-muted); text-align: right; }
.rate-grid tr.is-dirty > td { background: rgba(242, 153, 0, .08); }
.rate-grid tr.is-dirty > td:first-child { box-shadow: inset 3px 0 0 var(--sg-warn); }
.rate-grid tr.is-saved > td { background: rgba(15, 157, 88, .12); }
.item-meta { font-size: .7rem; color: var(--sg-muted); padding: 0 .45rem; min-height: .9rem; }
.item-meta .low { color: var(--sg-danger); font-weight: 600; }
.totals-card { background: var(--sg-surface); border: 1px solid var(--sg-line); border-radius: var(--sg-radius); padding: .9rem 1rem; }
.totals-card .r { display: flex; justify-content: space-between; padding: .18rem 0; font-size: .86rem; }
.totals-card .r span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
.totals-card .grand { border-top: 2px dashed var(--sg-line); margin-top: .4rem; padding-top: .55rem; font-size: 1.25rem; font-weight: 800; color: var(--sg-primary); }
.save-bar { position: sticky; bottom: 0; z-index: 1010; background: var(--sg-top-bg); backdrop-filter: blur(6px); border-top: 1px solid var(--sg-line); margin: 1rem -1.25rem -1.25rem; padding: .7rem 1.25rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
/* on small screens the content padding is .85rem, so the bar spans that */
@media (max-width: 991.98px) { .save-bar { margin: 1rem -.85rem -.85rem; padding: .6rem .85rem; } }
/* Phones: the page title keeps its own line; the action buttons go on the next one(s), unbroken. */
@media (max-width: 767.98px) {
  .sg-top { flex-wrap: wrap; row-gap: .45rem; }
  .sg-top h1 { flex: 1 1 auto; min-width: 55%; }
  .sg-top > .ms-auto { flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; row-gap: .4rem; }
  .sg-top .btn { white-space: nowrap; }
  .sg-top .btn kbd { display: none; }
  .preview-frame { height: 70vh; min-height: 360px; }
}
.shortcut-hint { color: var(--sg-muted); font-size: .74rem; }
.party-card { background: var(--sg-surface-2); border: 1px dashed var(--sg-input-line); border-radius: .6rem; padding: .5rem .7rem; font-size: .8rem; line-height: 1.45; }
.badge-soft { background: var(--sg-soft); color: var(--sg-ink); font-weight: 600; }
.badge-igst { background: #fff1e0; color: #b25e00; }
.badge-local { background: #e3f6ec; color: #0b7a44; }

/* ---- Bill designer */
.designer-list { list-style: none; margin: 0; padding: 0; }
.designer-list li { display: flex; align-items: center; gap: .5rem; background: var(--sg-surface); border: 1px solid var(--sg-line); border-radius: .55rem; padding: .4rem .55rem; margin-bottom: .35rem; font-size: .83rem; }
.designer-list li .handle { cursor: grab; color: #98a2b3; font-size: 1.1rem; }
.designer-list li.sortable-ghost { opacity: .4; background: #eaf0ff; }
.designer-list li.off { opacity: .55; background: #f7f8fa; }
.designer-list li input[type=text] { border: 1px solid #e3e7ef; border-radius: .35rem; padding: .15rem .35rem; font-size: .8rem; }
.designer-list li input.w { width: 56px; text-align: right; }
.designer-list li input.lbl { min-width: 0; } /* may shrink on a phone instead of pushing the row wider */
.preview-frame { width: 100%; height: calc(100vh - 170px); min-height: 520px; border: 1px solid var(--sg-line); border-radius: .85rem; background: #525659; }
.paper-pick .btn { font-size: .78rem; }

/* ---- Misc */
.toast-container { z-index: 1090; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--sg-muted); }
.empty-state i { font-size: 2.4rem; color: #c3cad8; display: block; margin-bottom: .5rem; }
.auth-bg { min-height: 100vh; background: radial-gradient(1000px 500px at 10% -10%, #cfdcff 0, transparent 60%), radial-gradient(800px 500px at 110% 110%, #c9f3ea 0, transparent 60%), #f3f6fb; }
.auth-card { max-width: 440px; border-radius: 1.2rem; box-shadow: 0 20px 60px rgba(16,24,40,.12); border: 0; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.bal-dr { color: #0b6b3a; } .bal-cr { color: #b3261e; }
@media print {
  .sg-side, .sg-top, .sg-foot, .no-print, .save-bar { display: none !important; }
  .sg-content { padding: 0; }
  .card { border: 0; box-shadow: none; }
  body { background: #fff; }
}

/* Keyboard row navigation (↑ / ↓ / Enter) */
tr[data-item] { cursor: pointer; }
.table tr.row-focus > td { background: var(--sg-soft) !important; }
.table tr.row-focus > td:first-child { box-shadow: inset 3px 0 0 var(--sg-primary); }

/* =====================================================================
   Themes: <html data-theme="..."> set from Settings -> Appearance.
   "modern" is the :root default above.
   ===================================================================== */

/* Classic: Tally-style teal, cream paper, square corners, yellow row highlight */
html[data-theme=classic] {
  --sg-primary: #1a6e75; --sg-primary-rgb: 26, 110, 117; --sg-primary-hover: #135459;
  --sg-ink: #1f2a2e; --sg-muted: #6b6a5f; --sg-label: #4b4a40;
  --sg-bg: #f4f1e8; --sg-surface: #fffdf7; --sg-surface-2: #efe9d8; --sg-hover: #f7f1de; --sg-soft: #fde9a4;
  --sg-line: #ddd5bf; --sg-input-line: #cbbf9f; --sg-top-bg: rgba(255,253,247,.96);
  --sg-side: #16474d; --sg-side-ink: #cfe3e2; --sg-side-sec: #8fb3b1;
  --sg-radius: .3rem; --sg-shadow: none;
  --sg-kbd-bg: #f1ead3; --sg-kbd-ink: #4b4a40; --sg-kbd-line: #d8cca8;
  --sg-brand-logo: linear-gradient(135deg, #f5b700, #1a6e75);
}
html[data-theme=classic] .form-control, html[data-theme=classic] .form-select, html[data-theme=classic] .btn { border-radius: .2rem; }
html[data-theme=classic] .sg-top h1 { color: var(--sg-primary); }

/* Stunning: violet-pink gradients, soft glow, extra-round */
html[data-theme=stunning] {
  --sg-primary: #6d28d9; --sg-primary-rgb: 109, 40, 217; --sg-primary-hover: #5b21b6;
  --sg-ink: #1e1537; --sg-muted: #6f6790; --sg-label: #4c4470;
  --sg-bg: #f6f4fe; --sg-surface: #ffffff; --sg-surface-2: #f7f5ff; --sg-hover: #f8f5ff; --sg-soft: #efe9ff;
  --sg-line: #e7e3f8; --sg-input-line: #d8d1f3; --sg-top-bg: rgba(255,255,255,.8);
  --sg-side: linear-gradient(180deg, #1e1b4b 0%, #3b0764 65%, #581c87 100%); --sg-side-ink: #d7cffc; --sg-side-sec: #a597e0;
  --sg-radius: 1.1rem; --sg-shadow: 0 8px 24px rgba(109,40,217,.07);
  --sg-kbd-bg: #efe9ff; --sg-kbd-ink: #4c1d95; --sg-kbd-line: #ddd0fb;
  --sg-brand-logo: linear-gradient(135deg, #f472b6, #8b5cf6);
}
html[data-theme=stunning] body { background: radial-gradient(900px 420px at 100% -10%, #f3e8ff 0, transparent 60%), radial-gradient(700px 400px at -10% 110%, #fce7f3 0, transparent 60%), var(--sg-bg) fixed; }
html[data-theme=stunning] .btn-primary { background-image: linear-gradient(135deg, #7c3aed, #db2777); border-color: transparent; box-shadow: 0 6px 16px rgba(124,58,237,.25); }
html[data-theme=stunning] .sg-nav a.active { background: linear-gradient(135deg, #7c3aed, #db2777); box-shadow: 0 6px 16px rgba(219,39,119,.25); }
html[data-theme=stunning] .totals-card .grand { background: linear-gradient(135deg, #7c3aed, #db2777); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-theme=stunning] .card:hover { box-shadow: 0 12px 32px rgba(109,40,217,.1); }

/* Emerald: calm green */
html[data-theme=emerald] {
  --sg-primary: #0f8a5f; --sg-primary-rgb: 15, 138, 95; --sg-primary-hover: #0b6e4b;
  --sg-bg: #f1f7f4; --sg-surface-2: #f5faf7; --sg-hover: #f3faf6; --sg-soft: #dff5ea;
  --sg-line: #dde9e3; --sg-input-line: #cbdcd3;
  --sg-side: #0b2e24; --sg-side-ink: #b9d8cc; --sg-side-sec: #6f9f8e;
  --sg-kbd-bg: #e3f1ea; --sg-kbd-ink: #24473a; --sg-kbd-line: #c9dfd4;
  --sg-brand-logo: linear-gradient(135deg, #34d399, #0ea5e9);
}

/* Dark: true black (Bootstrap dark mode is switched on alongside) */
html[data-theme=dark] {
  color-scheme: dark;
  --sg-primary: #4f7cff; --sg-primary-rgb: 79, 124, 255; --sg-primary-hover: #3d68e6;
  --sg-ink: #e6e9ef; --sg-muted: #8b93a4; --sg-label: #aab2c2;
  --sg-bg: #050506; --sg-surface: #121317; --sg-surface-2: #191b21; --sg-hover: #1a1c23; --sg-soft: #1b2849;
  --sg-line: #24272f; --sg-input-line: #333845; --sg-top-bg: rgba(10,10,12,.88);
  --sg-side: #000000; --sg-side-ink: #a3abbb; --sg-side-sec: #5d6576;
  --sg-success: #34c77b; --sg-danger: #f26b61; --sg-warn: #f5b340;
  --sg-shadow: none;
  --sg-kbd-bg: #22252d; --sg-kbd-ink: #c8cfdb; --sg-kbd-line: #333845;
  --bs-body-bg: var(--sg-surface); --bs-secondary-bg: #1b1d22; --bs-tertiary-bg: #16181d; --bs-emphasis-color: #f4f6fa;
  --bs-secondary-color: var(--sg-muted);
}
html[data-theme=dark] .btn-light { --bs-btn-bg: #1b1d23; --bs-btn-color: var(--sg-ink); --bs-btn-border-color: var(--sg-input-line); --bs-btn-hover-bg: #23262e; --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: #3a3f4c; --bs-btn-active-bg: #2a2e38; --bs-btn-active-color: #fff; --bs-btn-active-border-color: var(--sg-primary); }
html[data-theme=dark] .ic-blue { background: rgba(79,124,255,.16); color: #8aa6ff; } html[data-theme=dark] .ic-green { background: rgba(52,199,123,.15); color: #5fd699; }
html[data-theme=dark] .ic-amber { background: rgba(245,179,64,.15); color: #f5b340; } html[data-theme=dark] .ic-red { background: rgba(242,107,97,.15); color: #f58a82; }
html[data-theme=dark] .ic-violet { background: rgba(167,139,250,.15); color: #b9a4fb; } html[data-theme=dark] .ic-teal { background: rgba(45,212,191,.14); color: #5eead4; }
html[data-theme=dark] .badge-igst { background: rgba(245,179,64,.15); color: #f5b340; }
html[data-theme=dark] .badge-local { background: rgba(52,199,123,.15); color: #5fd699; }
html[data-theme=dark] .bal-dr { color: #5fd699; } html[data-theme=dark] .bal-cr { color: #f58a82; }
html[data-theme=dark] .empty-state i, html[data-theme=dark] table.grid .del { color: #4a505e; }
html[data-theme=dark] .designer-list li.off { background: #0e0f12; }
html[data-theme=dark] .designer-list li input[type=text] { background: transparent; color: inherit; border-color: var(--sg-input-line); }
html[data-theme=dark] .sg-company { background: rgba(255,255,255,.05); }
html[data-theme=dark] .form-control::placeholder { color: #5d6576; }

/* Theme picker cards (Settings -> Appearance) */
.theme-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .9rem; }
.theme-pick label { cursor: pointer; border: 2px solid var(--sg-line); border-radius: .8rem; padding: .5rem; background: var(--sg-surface); transition: .15s; }
.theme-pick input { position: absolute; opacity: 0; }
.theme-pick input:checked + label { border-color: var(--sg-primary); box-shadow: 0 0 0 .2rem rgba(var(--sg-primary-rgb), .18); }
.theme-pick input:focus-visible + label { outline: 2px solid var(--sg-primary); outline-offset: 2px; }
.theme-pick .sw { display: flex; height: 92px; border-radius: .5rem; overflow: hidden; border: 1px solid rgba(0,0,0,.08); }
.theme-pick .sw .s { width: 30%; }
.theme-pick .sw .m { flex: 1; padding: .45rem; display: flex; flex-direction: column; gap: .3rem; }
.theme-pick .sw .m i { display: block; height: 10px; border-radius: 3px; }
.theme-pick .sw .m b { display: block; height: 22px; border-radius: 4px; }
.theme-pick .nm { font-weight: 700; margin-top: .45rem; font-size: .88rem; }
.theme-pick .ds { color: var(--sg-muted); font-size: .74rem; }
