/* Ziwake v0.22 — shell, navigation, smart search, create menu, category tints (D-150, D-152).
 * Loaded after app.css. "Ivory & ink" stays: the sidebar becomes deep ink (like a private-bank app) so the work area
 * stays calm ivory; each area of the books gets a quiet tint (sale teal, purchase amber, money indigo, party violet). */

:root {
  /* Category tints — muted, used on icons and small surfaces only (text pairs pass 4.5:1). */
  --t-sale: #0F766E;     --t-sale-soft: #E3F3F0;
  --t-purchase: #A1580B; --t-purchase-soft: #FBEFDF;
  --t-money: #3B4FA8;    --t-money-soft: #E8EBFA;
  --t-party: #7A3E9D;    --t-party-soft: #F3E9F8;
  --t-item: #0E6E92;     --t-item-soft: #E2F1F7;
  --t-report: #8A5A13;   --t-report-soft: #F6EEDF;
  --t-in: #1B7950;       --t-in-soft: #E6F4EC;
  --t-out: #B2453B;      --t-out-soft: #FBEAE8;
  --t-ai: #6D4BD8;       --t-ai-soft: #EFEAFD;
  /* Sidebar (deep ink) */
  --sb-bg: #12141B;
  --sb-bg-2: #1A1D27;
  --sb-text: #C9C5BB;
  --sb-text-strong: #F6F1E7;
  --sb-muted: #8C8A84;
  --sb-hover: rgba(246, 241, 231, .06);
  --sb-active: rgba(217, 186, 124, .14);
  --sb-line: rgba(246, 241, 231, .08);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --t-sale: #4FC7B5; --t-sale-soft: #12302C; --t-purchase: #E3A35A; --t-purchase-soft: #33240F; --t-money: #8EA2F2; --t-money-soft: #1B2142;
    --t-party: #C79BE3; --t-party-soft: #2C1D37; --t-item: #6CC3E3; --t-item-soft: #10293A; --t-report: #D9BA7C; --t-report-soft: #2D271A;
    --t-in: #4CC38A; --t-in-soft: #173326; --t-out: #F07167; --t-out-soft: #3B1C1A; --t-ai: #B19CFF; --t-ai-soft: #251E44;
    --sb-bg: #0B0C10; --sb-bg-2: #12131A;
  }
}
:root[data-theme="dark"] {
  --t-sale: #4FC7B5; --t-sale-soft: #12302C; --t-purchase: #E3A35A; --t-purchase-soft: #33240F; --t-money: #8EA2F2; --t-money-soft: #1B2142;
  --t-party: #C79BE3; --t-party-soft: #2C1D37; --t-item: #6CC3E3; --t-item-soft: #10293A; --t-report: #D9BA7C; --t-report-soft: #2D271A;
  --t-in: #4CC38A; --t-in-soft: #173326; --t-out: #F07167; --t-out-soft: #3B1C1A; --t-ai: #B19CFF; --t-ai-soft: #251E44;
  --sb-bg: #0B0C10; --sb-bg-2: #12131A;
}

/* Tint helpers (icons in lists, search, quick actions) */
.tint-sale, .tint-sales { color: var(--t-sale); background: var(--t-sale-soft); }
.tint-purchase { color: var(--t-purchase); background: var(--t-purchase-soft); }
.tint-cash_bank, .tint-money { color: var(--t-money); background: var(--t-money-soft); }
.tint-party, .tint-parties { color: var(--t-party); background: var(--t-party-soft); }
.tint-item, .tint-items, .tint-stock_group { color: var(--t-item); background: var(--t-item-soft); }
.tint-reports, .tint-gst, .tint-accounting { color: var(--t-report); background: var(--t-report-soft); }
.tint-in { color: var(--t-in); background: var(--t-in-soft); }
.tint-out { color: var(--t-out); background: var(--t-out-soft); }
.tint-ai { color: var(--t-ai); background: var(--t-ai-soft); }
.tint-others, .tint-settings, .tint-utilities, .tint-home, .tint-none, .tint-projects, .tint-amc { color: var(--c-text-2); background: var(--c-surface-2); }

.btn--icon { padding: 0; width: 44px; min-height: 44px; justify-content: center; }
.btn--round { border-radius: 50%; }
.relative { position: relative; }
kbd { font-family: var(--font-sans); font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: var(--c-surface-2); color: var(--c-text-2);
  box-shadow: inset 0 -1px 0 var(--c-border); white-space: nowrap; }

/* ------------------------------------------------------------------ sidebar */
@media (min-width: 900px) {
  .sidebar {
    width: 264px; padding: var(--s-4) var(--s-3) var(--s-3); gap: 0; border-right: 0; color: var(--sb-text);
    background: linear-gradient(180deg, var(--sb-bg) 0%, var(--sb-bg-2) 100%);
    scrollbar-width: thin; scrollbar-color: rgba(246, 241, 231, .16) transparent;
  }
  .sidebar__top { padding: 0 var(--s-1) var(--s-3); border-bottom: 1px solid var(--sb-line); margin-bottom: var(--s-3); }
  .sidebar .brandmark { color: var(--sb-text-strong); text-decoration: none; padding: var(--s-1) var(--s-2) var(--s-4); display: flex; }
  .sidebar .brandmark__dot { box-shadow: 0 0 0 1px rgba(217, 186, 124, .28), 0 6px 16px rgba(0, 0, 0, .35); }
  .org-switch { display: flex; align-items: center; gap: var(--s-3); padding: 8px 10px 8px 8px; border-radius: var(--r-md); text-decoration: none;
    color: var(--sb-text-strong); background: rgba(246, 241, 231, .05); box-shadow: inset 0 0 0 1px var(--sb-line); transition: background var(--t-fast) var(--ease-out); }
  .org-switch:hover { background: rgba(246, 241, 231, .09); }
  .org-switch .avatar { background: linear-gradient(135deg, #D9BA7C, #A57C3A); color: #14151A; border-radius: 10px; }
  .org-switch__text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
  .org-switch__name { font-weight: 700; font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .org-switch__hint { font-size: 11.5px; color: var(--sb-muted); }
  .org-switch .icon { color: var(--sb-muted); }

  .side-nav { display: flex; flex-direction: column; gap: 2px; }
  .sidebar .nav-item, .sidebar a.nav-item {
    display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 40px; padding: 0 var(--s-3); border: 0; background: none;
    border-radius: var(--r-sm); color: var(--sb-text); text-decoration: none; font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; text-align: left;
    transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
  }
  .sidebar .nav-item .icon { width: 20px; height: 20px; color: var(--sb-muted); transition: color var(--t-fast) var(--ease-out); }
  .sidebar .nav-item:hover, .sidebar a.nav-item:hover { background: var(--sb-hover); color: var(--sb-text-strong); }
  .sidebar .nav-item:hover .icon { color: var(--sb-text-strong); }
  .nav-item__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar a.nav-item[aria-current="page"], .nav-row.is-active > .nav-item { background: var(--sb-active); color: var(--sb-text-strong); box-shadow: inset 3px 0 0 var(--c-gold); }
  .sidebar a.nav-item[aria-current="page"] .icon { color: #D9BA7C; }
  .nav-row, .nav-sub { position: relative; display: flex; align-items: center; }
  .nav-row > .nav-item { flex: 1; }
  .nav-sub__add { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 8px; color: var(--sb-muted); opacity: 0; transition: opacity var(--t-fast), background var(--t-fast), color var(--t-fast); }
  .nav-row:hover .nav-sub__add, .nav-sub:hover .nav-sub__add, .nav-sub__add:focus-visible { opacity: 1; }
  .nav-sub__add:hover { background: rgba(217, 186, 124, .18); color: #E6CB94; }
  .nav-group__chev { margin-left: auto; width: 16px !important; height: 16px !important; transition: transform var(--t-med) var(--ease-out); }
  .nav-group.is-open .nav-group__chev { transform: rotate(180deg); }
  .nav-group.is-open > .nav-group__toggle { color: var(--sb-text-strong); }
  .nav-group.is-open > .nav-group__toggle .icon:first-child { color: #D9BA7C; }
  .nav-group__items { overflow: hidden; max-height: 0; transition: max-height 260ms var(--ease-out); }
  .nav-group.is-open .nav-group__items { max-height: 640px; }
  .nav-sub__link { flex: 1; display: block; min-height: 34px; line-height: 34px; padding: 0 36px 0 44px; border-radius: var(--r-sm); color: var(--sb-text); text-decoration: none;
    font-size: 13.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
  .nav-sub__link::before { content: ""; position: absolute; left: 22px; top: 0; bottom: 0; width: 1px; background: var(--sb-line); }
  .nav-sub__link:hover { background: var(--sb-hover); color: var(--sb-text-strong); }
  .nav-sub.is-active .nav-sub__link { background: var(--sb-active); color: var(--sb-text-strong); font-weight: 650; }
  .nav-sub.is-active .nav-sub__link::before { background: #D9BA7C; width: 2px; left: 21px; }
  .sidebar__foot { margin-top: auto; padding-top: var(--s-3); border-top: 1px solid var(--sb-line); }
  .sidebar :focus-visible { outline-color: #D9BA7C; }
  .sidebar__section { display: none; }
}

/* ------------------------------------------------------------------ top bar */
.topbar { gap: var(--s-2); }
.omni-trigger { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--r-pill); cursor: pointer;
  background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-border); color: var(--c-text-2); font: inherit; font-size: var(--fs-sm); flex: 0 1 auto; min-width: 44px; }
.omni-trigger:hover { box-shadow: inset 0 0 0 1px var(--c-text-3); color: var(--c-text); }
.omni-trigger .icon { width: 18px; height: 18px; }
.omni-trigger__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 900px) {
  .omni-trigger { width: min(460px, 38vw); justify-content: flex-start; padding: 0 8px 0 16px; }
  .omni-trigger__kbd { margin-left: auto; }
  .topbar { padding: var(--s-3) var(--s-8); border-bottom: 1px solid var(--c-hairline); }
}
.btn--sale, .btn--purchase { min-height: 40px; padding: 0 16px; font-size: var(--fs-sm); gap: 6px; }
.btn--sale { background: var(--t-sale); color: #fff; box-shadow: 0 1px 2px rgba(15, 118, 110, .25); }
.btn--sale:hover { background: color-mix(in srgb, var(--t-sale) 88%, #000); }
.btn--purchase { background: var(--t-money); color: #fff; box-shadow: 0 1px 2px rgba(59, 79, 168, .25); }
.btn--purchase:hover { background: color-mix(in srgb, var(--t-money) 88%, #000); }
:root[data-theme="dark"] .btn--sale, :root[data-theme="dark"] .btn--purchase { color: #0E0F12; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn--sale, :root:not([data-theme="light"]) .btn--purchase { color: #0E0F12; } }

.create-menu { display: grid; grid-template-columns: repeat(3, minmax(200px, 1fr)); gap: var(--s-2) var(--s-4); width: max-content; max-width: 92vw; padding: var(--s-4); right: 0; }
.create-menu__title { font-size: var(--fs-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--c-text-3); padding: 0 var(--s-3) var(--s-2); }
.create-menu a { min-height: 40px; font-size: var(--fs-sm); font-weight: 600; }
.create-menu a .icon { color: var(--c-text-3); }
.create-menu a:hover .icon { color: var(--c-accent); }
.create-menu__kbd { margin-left: auto; opacity: .75; }

/* ------------------------------------------------------------------ dialogs (search, shortcuts, create sheet) */
dialog { color: var(--c-text); }
dialog::backdrop { background: rgba(14, 15, 20, .42); backdrop-filter: blur(2px); }
.omni { padding: 0; border: 0; background: transparent; width: min(680px, calc(100vw - 24px)); max-width: none; margin: 8vh auto auto; overflow: visible; }
.omni__box { background: var(--c-surface); border-radius: var(--r-lg); box-shadow: 0 0 0 1px var(--c-hairline), 0 24px 64px rgba(14, 15, 20, .28); overflow: hidden;
  animation: pop-in var(--t-med) var(--ease-out); display: flex; flex-direction: column; max-height: min(640px, 80vh); }
.omni__bar { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--c-border); }
.omni__bar > .icon { color: var(--c-text-3); }
.omni__input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: var(--fs-lg); color: var(--c-text); min-height: 44px; outline: none; }
.omni__input::-webkit-search-cancel-button { display: none; }
.omni__results { overflow-y: auto; padding: var(--s-2); flex: 1; min-height: 120px; }
.omni__results[aria-busy="true"] { opacity: .7; }
.omni__group + .omni__group { margin-top: var(--s-2); }
.omni__gtitle { font-size: var(--fs-xs); font-weight: 800; color: var(--c-text-3); text-transform: uppercase; letter-spacing: .07em; padding: var(--s-2) var(--s-3) var(--s-1); }
.omni__item { display: flex; align-items: center; gap: var(--s-3); padding: 8px var(--s-3); border-radius: var(--r-md); color: var(--c-text); text-decoration: none; min-height: 52px; }
.omni__item.is-sel { background: var(--c-surface-2); box-shadow: inset 2px 0 0 var(--c-gold); }
.omni__icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; flex: none; }
.omni__icon .icon { width: 19px; height: 19px; }
.omni__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.omni__title { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.omni__sub { font-size: var(--fs-xs); color: var(--c-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.omni__amt { font-weight: 700; font-size: var(--fs-sm); }
.omni__item mark { background: color-mix(in srgb, var(--c-gold) 28%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.omni__item--ai .omni__title { color: var(--t-ai); }
.omni__empty { text-align: center; padding: var(--s-8) var(--s-4) var(--s-4); color: var(--c-text-2); }
.omni__empty .icon { color: var(--c-text-3); margin-bottom: var(--s-2); }
.omni__foot { padding: var(--s-2) var(--s-4); border-top: 1px solid var(--c-border); background: var(--c-surface-2); }
.omni__esc { cursor: default; }
@media (max-width: 640px) {
  .omni { margin: 0; width: 100vw; height: 100dvh; max-height: none; }
  .omni__box { border-radius: 0; height: 100dvh; max-height: none; }
  .omni__foot { display: none; }
}

.shortcuts { border: 0; padding: 0; background: transparent; width: min(460px, calc(100vw - 24px)); }
.shortcuts__box { background: var(--c-surface); border-radius: var(--r-lg); padding: var(--s-5); box-shadow: var(--shadow-2); }
.shortcuts__list { margin: var(--s-4) 0 0; display: grid; gap: var(--s-2); }
.shortcuts__list div { display: flex; align-items: center; gap: var(--s-3); }
.shortcuts__list dt { width: 84px; }
.shortcuts__list dd { margin: 0; color: var(--c-text-2); font-size: var(--fs-sm); }

.create-sheet { border: 0; padding: 0; background: transparent; width: 100vw; max-width: none; margin: auto 0 0; }
.create-sheet__box { background: var(--c-surface); border-radius: 22px 22px 0 0; padding: var(--s-3) var(--s-4) calc(var(--s-6) + env(safe-area-inset-bottom)); animation: sheet-up var(--t-med) var(--ease-out);
  max-height: 86dvh; overflow-y: auto; }
.create-sheet__grab { width: 40px; height: 4px; border-radius: 4px; background: var(--c-border); margin: 0 auto var(--s-3); }
.create-sheet__title { font-size: var(--fs-xs); font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--c-text-3); margin: var(--s-4) 0 var(--s-2); }
.create-sheet__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); }
.create-sheet__tile { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12px; font-weight: 650; color: var(--c-text); text-decoration: none;
  padding: var(--s-2) 2px; border-radius: var(--r-md); background: transparent !important; line-height: 1.25; }
.create-sheet__icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 16px; background: var(--c-surface-2); }
.create-sheet__tile.tint-sale .create-sheet__icon { background: var(--t-sale-soft); color: var(--t-sale); }
.create-sheet__tile.tint-purchase .create-sheet__icon { background: var(--t-purchase-soft); color: var(--t-purchase); }
.create-sheet__tile.tint-others .create-sheet__icon { background: var(--t-money-soft); color: var(--t-money); }
@media (min-width: 900px) { .create-sheet { width: 520px; margin: auto; } .create-sheet__box { border-radius: var(--r-lg); } }

/* ------------------------------------------------------------------ bottom bar with a centre "+" */
.bottomnav { align-items: center; }
.bottomnav__fab { flex: none; width: 54px; height: 54px; margin: -22px 6px 0; border: 0; border-radius: 18px; cursor: pointer; color: #F6F1E7;
  background: linear-gradient(145deg, #1F2B4D 0%, #12141B 100%); box-shadow: 0 8px 20px rgba(18, 20, 27, .28), inset 0 1px 0 rgba(255, 255, 255, .08);
  display: inline-flex; align-items: center; justify-content: center; transition: transform var(--t-fast) var(--ease-out); }
.bottomnav__fab:active { transform: scale(.94); }
.bottomnav__fab .icon { width: 26px; height: 26px; stroke-width: 2.2; }
:root[data-theme="dark"] .bottomnav__fab { background: linear-gradient(145deg, #E6CB94, #A57C3A); color: #14151A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bottomnav__fab { background: linear-gradient(145deg, #E6CB94, #A57C3A); color: #14151A; } }

@media (prefers-reduced-motion: reduce) {
  .nav-group__items, .nav-group__chev, .omni__box, .create-sheet__box { transition: none !important; animation: none !important; }
}

/* .hide-mobile sets display:initial on desktop; keep buttons flex. */
@media (min-width: 900px) {
  .btn.hide-mobile { display: inline-flex; }
  .relative.hide-mobile { display: inline-block; }
}

/* ------------------------------------------------------------------ searchable dropdown (combobox) */
.combo { position: relative; display: block; min-width: 0; }
.combo__native { position: absolute !important; opacity: 0 !important; pointer-events: none !important; width: 1px !important; height: 1px !important; min-width: 0 !important; left: 0; bottom: 0; }
.combo__input { width: 100%; padding-right: 40px !important; text-overflow: ellipsis; cursor: text; }
.combo__input:not(:focus) { cursor: pointer; }
.combo__chev { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: transparent; color: var(--c-text-3);
  display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); cursor: pointer; }
.combo.is-open .combo__chev .icon { transform: rotate(180deg); }
.combo__list { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px); min-width: 240px; max-height: 300px; overflow-y: auto; background: var(--c-surface);
  border-radius: var(--r-md); box-shadow: 0 0 0 1px var(--c-hairline), 0 16px 40px rgba(14, 15, 20, .16); padding: 6px; animation: pop-in var(--t-fast) var(--ease-out); }
.combo--up .combo__list { top: auto; bottom: calc(100% + 6px); }
.combo__opt { padding: 9px 12px; border-radius: var(--r-sm); cursor: pointer; font-size: var(--fs-sm); font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo__opt.is-active { background: var(--c-surface-2); }
.combo__opt[aria-selected="true"] { font-weight: 750; color: var(--c-accent); }
.combo__opt--none { color: var(--c-text-3); }
.combo__opt mark { background: color-mix(in srgb, var(--c-gold) 30%, transparent); color: inherit; border-radius: 3px; }
.combo__group { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--c-text-3); padding: 10px 12px 4px; }
.combo__empty, .combo__more { padding: 10px 12px; color: var(--c-text-2); font-size: var(--fs-sm); }
.combo__add { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 4px; padding: 10px 12px; border: 0; border-top: 1px solid var(--c-border); background: none; color: var(--c-accent);
  font: inherit; font-size: var(--fs-sm); font-weight: 700; cursor: pointer; border-radius: 0 0 var(--r-sm) var(--r-sm); text-align: left; position: sticky; bottom: -6px; background: var(--c-surface); }
.combo__add:hover { background: var(--c-surface-2); }
form.is-live [type="submit"].btn--ghost:has(.icon) { }
form[aria-busy="true"] .input[name="q"] { background-image: linear-gradient(90deg, transparent, color-mix(in srgb, var(--c-gold) 18%, transparent), transparent); background-size: 200% 100%; animation: shimmer 1s linear infinite; }

/* Quick add window (party / item from inside a form) */
.quickadd { border: 0; padding: 0; background: transparent; width: min(760px, calc(100vw - 16px)); max-width: none; height: min(86vh, 900px); }
.quickadd__box { background: var(--c-bg); border-radius: var(--r-lg); box-shadow: var(--shadow-2); height: 100%; display: flex; flex-direction: column; overflow: hidden; animation: pop-in var(--t-med) var(--ease-out); }
.quickadd__bar { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-2) var(--s-2) var(--s-5); background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
.quickadd__frame { flex: 1; width: 100%; border: 0; background: var(--c-bg); }
@media (max-width: 640px) { .quickadd { width: 100vw; height: 100dvh; margin: 0; } .quickadd__box { border-radius: 0; } }

/* Embedded form (inside the quick-add window) */
body.is-embed .content { padding: var(--s-4) var(--s-5) var(--s-8); max-width: none; }
body.is-embed .page-head .back { display: none; }

/* ------------------------------------------------------------------ forms: compact grid, disclosures, party form (D-155) */
.grid-3 { display: grid; gap: var(--s-3) var(--s-4); }
.grid-addr { display: grid; gap: var(--s-3) var(--s-4); }
@media (min-width: 720px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-addr { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 0.7fr); } }
.grid-3 .field, .grid-addr .field, .grid-2 .field { margin-bottom: 0; }
@media (min-width: 900px) {
  .form-compact .input { min-height: 44px; padding-top: 8px; padding-bottom: 8px; font-size: 15px; }
  .form-compact .input--big { min-height: 52px; font-size: var(--fs-lg); }
  .form-compact .card { padding: var(--s-5) var(--s-6); }
  .form-compact .field__label { font-size: var(--fs-sm); margin-bottom: 4px; }
}
.req { color: var(--c-danger); font-weight: 700; }
summary.disclosure { display: flex; align-items: center; gap: var(--s-2); font-weight: 700; cursor: pointer; list-style: none; flex-wrap: wrap; }
summary.disclosure::-webkit-details-marker { display: none; }
summary.disclosure::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--c-text-3); border-bottom: 2px solid var(--c-text-3); transform: rotate(45deg); margin-left: auto; transition: transform var(--t-fast); }
details[open] > summary.disclosure::after { transform: rotate(-135deg); }
summary.disclosure .icon { color: var(--c-gold); }
summary.disclosure .muted { font-weight: 500; width: 100%; padding-left: 26px; }
@media (min-width: 720px) { summary.disclosure .muted { width: auto; padding-left: var(--s-2); } }
.input.is-filled { animation: filled 1.2s var(--ease-out); }
@keyframes filled { 0% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-gold) 35%, transparent); } 100% { box-shadow: none; } }

.role-pick { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--c-gold-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-gold) 35%, transparent); }
.role-pick__head { display: flex; align-items: baseline; gap: var(--s-3); flex-wrap: wrap; }
.role-pick__label { font-weight: 750; }
.role-pick__hint { color: var(--c-text-2); }
.role-pick__seg { background: var(--c-surface); align-self: flex-start; }
.role-pick__seg label { gap: 6px; }
.role-pick--attn { animation: attn 1.8s var(--ease-out) 2; }
@keyframes attn { 0%, 100% { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-gold) 35%, transparent); } 50% { box-shadow: inset 0 0 0 2px var(--c-gold), 0 0 0 6px color-mix(in srgb, var(--c-gold) 18%, transparent); } }
.gstin-box { padding: var(--s-4); border-radius: var(--r-md); background: var(--c-surface-2); }
.gstin-box__row { display: flex; gap: var(--s-2); align-items: stretch; }
.gstin-box__input { flex: 1; min-width: 0; font-family: var(--font-num); letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.gstin-box__status { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: var(--s-2); color: var(--c-text-2); }
.gstin-box__status.is-ok .icon { color: var(--c-ok); }
.gstin-box__status.is-warn, .gstin-box__status .is-warn { color: var(--c-warn); }
.gstin-box__status.is-busy { opacity: .75; }
@media (prefers-reduced-motion: reduce) { .role-pick--attn, .input.is-filled { animation: none; } }

.embed-done { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-3); font-weight: 650; }
.embed-done .tick svg { fill: none; }

/* Party page: reach them */
.contact-bar { display: flex; gap: var(--s-2); flex-wrap: wrap; margin: 0 0 var(--s-4); }
.contact-bar__btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); background: var(--c-surface);
  box-shadow: inset 0 0 0 1px var(--c-border); color: var(--c-text); text-decoration: none; font-weight: 650; font-size: var(--fs-sm); }
.contact-bar__btn:hover { background: var(--c-surface-2); }
.contact-bar__btn .icon { width: 18px; height: 18px; color: var(--c-text-2); }
.contact-bar__btn--wa .icon, .btn--wa .icon { color: #1DA851; }
.btn--wa { background: #E8F7EE; color: #0E6B33; }
.btn--wa:hover { background: #D6F1E1; }
.saved-banner { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-4); box-shadow: var(--shadow-1), inset 3px 0 0 var(--c-ok); }
.saved-banner__tick .icon { width: 32px; height: 32px; color: var(--c-ok); }
.saved-banner__body { display: flex; flex-direction: column; flex: 1; min-width: 200px; }
.roundoff { display: flex; align-items: flex-end; gap: var(--s-4); flex-wrap: wrap; }
.roundoff__box { font-weight: 650; }
.roundoff__typed { max-width: 240px; margin: 0; }
[data-ro-row][hidden] { display: none !important; }

/* Items (D-156): what-is-it picker, type tabs, common-items list */
.type-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
@media (min-width: 900px) { .type-pick { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.type-pick input { position: absolute; opacity: 0; pointer-events: none; }
.type-pick__opt { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3); border-radius: var(--r-md); background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-border);
  cursor: pointer; transition: box-shadow var(--t-fast), background var(--t-fast); min-height: 64px; }
.type-pick__opt:hover { background: var(--c-surface-2); }
.type-pick input:checked + .type-pick__opt { box-shadow: inset 0 0 0 2px var(--c-gold); background: var(--c-gold-soft); }
.type-pick input:focus-visible + .type-pick__opt { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.type-pick input:disabled + .type-pick__opt { opacity: .45; cursor: not-allowed; }
.type-pick__icon { display: inline-flex; width: 36px; height: 36px; border-radius: 10px; align-items: center; justify-content: center; background: var(--t-item-soft); color: var(--t-item); flex: none; }
.type-pick__text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.type-pick__text strong { font-size: var(--fs-sm); }
.type-pick__text .small { font-size: 12px; }
.tabs-chips { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.tabs-chips input { position: absolute; opacity: 0; pointer-events: none; }
.tabs-chips input:checked + .chip { background: var(--c-accent); color: var(--c-on-accent); border-color: var(--c-accent); }
.tabs-chips input:focus-visible + .chip { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.pick-list { display: flex; flex-direction: column; gap: var(--s-2); }
.pick-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--c-surface); box-shadow: var(--shadow-1); cursor: pointer; flex-wrap: wrap; }
.pick-row.is-on { box-shadow: var(--shadow-1), inset 3px 0 0 var(--c-ok); }
.pick-row.is-have { opacity: .6; cursor: default; }
.pick-row > input[type=checkbox] { width: 20px; height: 20px; flex: none; accent-color: var(--c-accent); }
.pick-row__main { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.pick-row__name { font-weight: 700; }
.pick-row__prices { display: flex; gap: var(--s-2); }
.pick-row__prices .prefix-field { width: 120px; }
.pick-row[hidden] { display: none; }
body.is-embed .page-head { display: none; }
body.is-embed .form-actions { bottom: 0 !important; background: var(--c-bg); padding: var(--s-3) 0; }

/* 2-step (D-159) */
.twostep-badge { width: 64px; height: 64px; border-radius: 20px; display: flex; align-items: center; justify-content: center; background: var(--t-ok-soft, var(--c-ok-soft)); color: var(--c-ok); margin-bottom: var(--s-4); }
.prompt-card { max-width: 560px; margin: var(--s-8) auto; text-align: left; display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-8); }
.prompt-card__art { width: 72px; height: 72px; border-radius: 22px; display: flex; align-items: center; justify-content: center; color: #14151A;
  background: linear-gradient(135deg, #E6CB94, #A57C3A); box-shadow: 0 10px 30px rgba(165, 124, 58, .25); }
.prompt-card__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.9rem, 3vw, 2.4rem); margin: 0; }
.prompt-card__list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-2); }
.prompt-card__list li { display: flex; gap: var(--s-2); align-items: flex-start; }
.prompt-card__list .icon { color: var(--c-ok); margin-top: 2px; }
.prompt-card__actions { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; margin-top: var(--s-2); }
.btn--link { background: none; color: var(--c-text-2); text-decoration: underline; padding: 0 var(--s-3); }
.eyebrow { font-size: var(--fs-xs); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--c-gold); }
.terms-note { text-align: center; margin: var(--s-2) 0 0; }

/* Business delete (D-154) */
.org-row { gap: var(--s-3); }
.org-row.is-current { box-shadow: inset 3px 0 0 var(--c-gold); }
.menu a.menu__danger { color: var(--c-danger); }
.btn--danger { background: var(--c-danger); color: #fff; }
.btn--danger:hover { background: color-mix(in srgb, var(--c-danger) 88%, #000); }
.danger-card { box-shadow: var(--shadow-1), inset 3px 0 0 var(--c-danger); max-width: 640px; }
.danger-card__icon { display: inline-flex; width: 44px; height: 44px; border-radius: 14px; align-items: center; justify-content: center; background: var(--c-danger-soft); color: var(--c-danger); }
.danger-card__list { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; color: var(--c-text-2); }
ol.steps { margin: 0; padding-left: 1.3em; display: grid; gap: var(--s-2); }
ol.steps li { padding-left: 4px; }
code.copyable { cursor: copy; background: var(--c-surface-2); padding: 2px 6px; border-radius: 6px; word-break: break-all; }

/* Lists (v0.22): document tabs, period bar, Paid + Unpaid = Total */
.doc-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--c-border); margin: 0 0 var(--s-4); overflow-x: auto; scrollbar-width: none; }
.doc-tab { padding: 10px 14px; color: var(--c-text-2); text-decoration: none; font-weight: 650; font-size: var(--fs-sm); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.doc-tab:hover { color: var(--c-text); }
.doc-tab.is-on { color: var(--c-text); border-bottom-color: var(--c-gold); }
.list-filters { margin-bottom: var(--s-4); }
.list-filters > * + * { margin-top: var(--s-3); }
.period-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.period-bar input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.period-bar .chip { min-height: 32px; font-size: 13px; }
.period-bar input:checked + .chip { background: var(--c-accent); color: var(--c-on-accent); border-color: var(--c-accent); }
.period-bar input:focus-visible + .chip { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.period-bar__dates { display: inline-flex; align-items: center; gap: 6px; }
.period-bar__dates .input { min-height: 36px; width: auto; padding: 4px 10px; }
.period-bar__dates[hidden] { display: none; }
.sum-cards { display: flex; align-items: stretch; gap: var(--s-2); margin-bottom: var(--s-4); flex-wrap: wrap; }
.sum-card { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 2px; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); text-decoration: none; color: var(--c-text); }
.sum-card__label { font-size: var(--fs-xs); font-weight: 700; color: var(--c-text-2); }
.sum-card__value { font-size: var(--fs-xl); font-weight: 780; letter-spacing: -.01em; }
.sum-card--paid { background: var(--t-in-soft); } .sum-card--paid .sum-card__value { color: var(--t-in); }
.sum-card--due { background: var(--t-purchase-soft); } .sum-card--due .sum-card__value { color: var(--t-purchase); }
.sum-card--total { background: var(--t-money-soft); } .sum-card--total .sum-card__value { color: var(--t-money); }
a.sum-card--due:hover { box-shadow: inset 0 0 0 1px var(--t-purchase); }
.sum-cards__op { align-self: center; font-weight: 800; color: var(--c-text-3); font-size: var(--fs-lg); }
@media (max-width: 640px) { .sum-cards__op { display: none; } .sum-card { min-width: calc(50% - 8px); } .sum-card--total { min-width: 100%; } }
.list-count { margin: 0 0 var(--s-3); }

/* ---- Inside the Android app (v0.23): feel like an app, not a web page ------------------------------------------------- */
.is-app { -webkit-tap-highlight-color: transparent; }
.is-app body { overscroll-behavior-y: none; }
.is-app .btn, .is-app .quick__tile, .is-app .list__item, .is-app .tile, .is-app nav, .is-app .chip, .is-app .badge, .is-app summary { -webkit-user-select: none; user-select: none; }
.is-app .btn:active, .is-app .quick__tile:active, .is-app .list__item:active, .is-app .tile:active, .is-app .feed__row:active { transform: scale(.985); transition: transform 80ms; }
.is-app .dash-search kbd, .is-app .dash-ai__ask kbd, .is-app .asst-fab__kbd { display: none !important; }
