/* PhoneBiz app styles. Uses tokens.css variables only (no hard-coded brand colours). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: var(--text-base)/var(--leading-normal) var(--font-sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-muted); }
.pad { padding: var(--space-4); }
.mb-3 { margin-bottom: var(--space-3); } .mb-4 { margin-bottom: var(--space-4); }
.noscroll { overflow: hidden; }
.noscript { padding: var(--space-6); text-align: center; }
[hidden] { display: none !important; }
.icon { flex: none; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: var(--radius-sm); z-index: 100; }
.skip:focus { left: 8px; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot__spin { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--border-strong); border-top-color: var(--brand-primary); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-width) 1fr; min-height: 100vh; }
.shell__col { min-width: 0; display: flex; flex-direction: column; }
.sidebar { background: var(--sidebar-bg); color: var(--sidebar-text); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: var(--space-4) var(--space-3); gap: var(--space-4); z-index: var(--z-sidebar); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: var(--space-3); color: var(--sidebar-text-active); padding: var(--space-1) var(--space-2); }
.brand:hover { text-decoration: none; }
.brand__mark { width: 38px; height: 38px; border-radius: 11px; background: var(--brand-primary); color: var(--on-primary); display: grid; place-items: center; font-weight: var(--weight-semibold); font-size: 14px; flex: none; letter-spacing: 0.02em; }
.brand__mark--lg { width: 56px; height: 56px; font-size: 20px; border-radius: 16px; }
.brand__img { height: 38px; width: auto; max-width: 150px; object-fit: contain; }
.brand__t { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand__t b { font-size: var(--text-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand__t small { color: var(--sidebar-text); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav__i { display: flex; align-items: center; gap: var(--space-3); padding: 10px var(--space-3); border-radius: var(--radius-sm); color: var(--sidebar-text); background: none; border: 0; text-align: left; width: 100%; min-height: 42px; position: relative; }
.nav__i:hover { background: rgba(255,255,255,0.06); text-decoration: none; color: var(--sidebar-text-active); }
.nav__i.is-on { background: var(--sidebar-item-active); color: var(--sidebar-text-active); font-weight: var(--weight-medium); }
.nav__i.is-on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand-accent); }
.nav__n { margin-left: auto; background: var(--warning); color: var(--on-warning); font-size: 11px; font-weight: var(--weight-semibold); border-radius: var(--radius-pill); min-width: 20px; padding: 1px 6px; text-align: center; }
.side__foot { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: var(--space-3); }
.topbar { position: sticky; top: 0; z-index: var(--z-sticky); background: var(--surface); border-bottom: 1px solid var(--border); height: var(--topbar-height); display: flex; align-items: center; gap: var(--space-3); padding: 0 var(--space-6); }
.topbar__brand { display: none; align-items: center; gap: 8px; color: var(--text); }
.topbar__brand .brand__mark { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
.topbar__sp { flex: 1; }
.searchbtn { display: flex; align-items: center; gap: var(--space-2); background: var(--surface-muted); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 8px 14px; color: var(--text-muted); min-width: 280px; max-width: 420px; flex: 1; text-align: left; min-height: 40px; }
.searchbtn span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.searchbtn kbd { font: 12px var(--font-sans); border: 1px solid var(--border-strong); border-radius: 6px; padding: 0 6px; background: var(--surface); }
.icon-btn { width: 40px; height: 40px; border-radius: var(--radius-pill); border: 0; background: none; display: inline-grid; place-items: center; color: var(--text-secondary); position: relative; flex: none; }
.icon-btn:hover { background: var(--surface-muted); }
.dot { position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; background: var(--danger); border-radius: 50%; border: 2px solid var(--surface); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-primary-soft); color: var(--link); display: grid; place-items: center; font-weight: var(--weight-semibold); font-size: 13px; overflow: hidden; flex: none; }
.avatar:hover { text-decoration: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.scopechip { width: auto; min-width: 140px; padding-block: 8px; border-radius: var(--radius-pill); }
.offline { background: var(--warning-soft); color: var(--warning-text); padding: 10px var(--space-6); display: flex; gap: 8px; align-items: center; border-bottom: 1px solid var(--border); }
.main { padding: var(--space-6); max-width: var(--content-max); width: 100%; margin: 0 auto; flex: 1; outline: none; }
.bnav { display: none; }

@media (max-width: 1023px) {
  .shell { grid-template-columns: var(--sidebar-rail-width) 1fr; }
  .sidebar { padding-inline: 10px; }
  .brand__t, .nav__i span, .nav__n { display: none; }
  .nav__i { justify-content: center; padding-inline: 0; }
  .nav__i.is-on::before { left: -10px; }
  .searchbtn { min-width: 0; } .searchbtn kbd { display: none; }
}
@media (max-width: 767px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 0 var(--space-3); height: 56px; gap: 4px; }
  .topbar__brand { display: flex; }
  .searchbtn { flex: none; min-width: 0; width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 50%; border: 0; background: none; }
  .searchbtn span { display: none; }
  .topbar__sp { flex: 1; }
  .scopechip { min-width: 0; max-width: 140px; font-size: 13px; }
  .main { padding: var(--space-4) var(--space-4) calc(var(--bottomnav-height) + 28px + env(safe-area-inset-bottom)); }
  .bnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sidebar); background: var(--surface); border-top: 1px solid var(--border); height: calc(var(--bottomnav-height) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); align-items: center; }
  .bnav__i { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--text-muted); background: none; border: 0; min-height: 56px; }
  .bnav__i:hover { text-decoration: none; }
  .bnav__i.is-on { color: var(--link); font-weight: var(--weight-medium); }
  .bnav__fab { width: 54px; height: 54px; border-radius: 50%; background: var(--brand-primary); color: var(--on-primary); display: grid; place-items: center; margin: -22px auto 0; box-shadow: var(--shadow-popover); }
  .bnav__fab:hover { text-decoration: none; background: var(--brand-primary-hover); }
}
.moregrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.moregrid__i { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--space-3) 4px; border-radius: var(--radius-md); background: var(--surface-muted); border: 0; color: var(--text); font-size: 12px; text-align: center; min-height: 76px; justify-content: center; }
.moregrid__i:hover { text-decoration: none; background: var(--brand-primary-soft); }

/* ---------- page header, cards, grid ---------- */
.pagehead { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); flex-wrap: wrap; }
.pagehead__t { font-size: var(--text-xl); line-height: var(--leading-tight); font-weight: var(--weight-semibold); }
.pagehead__s { color: var(--text-muted); margin-top: 2px; }
.pagehead__a { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-card); min-width: 0; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-5) 0; flex-wrap: wrap; }
.card__title { font-size: var(--text-md); font-weight: var(--weight-semibold); }
.card__body { padding: var(--space-4) var(--space-5) var(--space-5); }
.card__body--flush { padding: 0; }
.card__head + .card__body--flush { margin-top: var(--space-3); }
.grid { display: grid; gap: var(--space-4); }
.grid--kpi { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.row { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
@media (max-width: 900px) { .grid--2, .grid--3, .grid--main { grid-template-columns: 1fr; } }
@media (max-width: 767px) { .card__head { padding: var(--space-3) var(--space-4) 0; } .card__body { padding: var(--space-3) var(--space-4) var(--space-4); } .pagehead__t { font-size: 20px; } .grid--kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); } }

.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-4); box-shadow: var(--shadow-card); position: relative; overflow: hidden; display: block; color: var(--text); min-width: 0; }
a.kpi:hover { text-decoration: none; border-color: var(--border-strong); }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--brand-primary); }
.kpi--ok::before { background: var(--success); } .kpi--warn::before { background: var(--warning); } .kpi--bad::before { background: var(--danger); } .kpi--mute::before { background: var(--border-strong); }
.kpi__label { color: var(--text-secondary); font-size: var(--text-sm); display: flex; align-items: center; gap: 4px; }
.kpi__info { color: var(--text-muted); display: inline-grid; }
.kpi__value { font-size: var(--text-kpi); font-weight: var(--weight-semibold); font-feature-settings: var(--font-feature-numeric); line-height: 1.2; margin-top: 4px; overflow-wrap: anywhere; }
.kpi__sub { color: var(--text-muted); font-size: var(--text-sm); margin-top: 2px; }
@media (max-width: 767px) { .kpi__value { font-size: 20px; } .kpi { padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4); } }
.delta { font-size: 12px; } .delta--up { color: var(--success-text); } .delta--down { color: var(--danger-text); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: var(--radius-sm); border: 1px solid transparent; font-weight: var(--weight-medium); background: var(--surface); color: var(--text); white-space: nowrap; text-decoration: none; transition: background var(--duration-fast), border-color var(--duration-fast); }
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--brand-primary); color: var(--on-primary); }
.btn--primary:hover { background: var(--brand-primary-hover); }
.btn--secondary { background: var(--surface); border-color: var(--border-strong); }
.btn--secondary:hover { background: var(--surface-muted); }
.btn--ghost { background: none; color: var(--link); }
.btn--ghost:hover { background: var(--brand-primary-soft); }
.btn--danger { background: var(--danger-text); color: #fff; }
.btn--danger:hover { filter: brightness(0.92); }
.btn--success { background: var(--success-text); color: #fff; }
.btn--success:hover { filter: brightness(0.92); }
.btn--sm { min-height: 34px; padding: 4px 12px; font-size: var(--text-sm); }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--on-primary); border-top-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
.btn--secondary.is-busy::after { border-color: var(--text-muted); border-top-color: transparent; }
@media (max-width: 767px) { .btn { min-height: var(--touch-target); } .btn--sm { min-height: 38px; } }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: var(--space-4); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text-secondary); }
.req { color: var(--danger-text); } .opt { color: var(--text-muted); font-weight: 400; }
.field__hint { color: var(--text-muted); font-size: var(--text-sm); }
.field__err { color: var(--danger-text); font-size: var(--text-sm); }
.field__err:empty { display: none; }
.field--bad .input { border-color: var(--danger); }
.formerr { color: var(--danger-text); background: var(--danger-soft); border-radius: var(--radius-sm); padding: 10px 12px; font-size: var(--text-sm); }
.formerr:empty { display: none; }
.input { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.input::placeholder { color: var(--text-muted); }
.input:hover { border-color: var(--text-muted); }
.input:focus { outline: none; border-color: var(--brand-primary); box-shadow: var(--focus-ring); }
.input:disabled { background: var(--surface-muted); color: var(--text-muted); }
textarea.input { resize: vertical; min-height: 84px; }
.select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.moneybox { display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.moneybox:focus-within { border-color: var(--brand-primary); box-shadow: var(--focus-ring); }
.moneybox__sym { padding: 0 0 0 12px; color: var(--text-muted); }
.moneybox .input { border: 0; box-shadow: none; font-feature-settings: var(--font-feature-numeric); font-size: var(--text-md); }
.pwbox { position: relative; } .pwbox .input { padding-right: 46px; } .pwtoggle { position: absolute; right: 2px; top: 1px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.formbar { display: flex; gap: var(--space-3); justify-content: flex-end; flex-wrap: wrap; margin-top: var(--space-2); }
.formbar--sticky { position: sticky; bottom: 0; background: var(--surface); padding: var(--space-3) 0; border-top: 1px solid var(--border); margin-top: var(--space-4); z-index: 5; }
@media (max-width: 767px) { .formbar--sticky { bottom: calc(var(--bottomnav-height) + env(safe-area-inset-bottom)); margin-inline: calc(-1 * var(--space-4)); padding-inline: var(--space-4); } .formbar .btn { flex: 1; } }
.seg { display: inline-flex; background: var(--surface-muted); border-radius: var(--radius-sm); padding: 3px; gap: 2px; max-width: 100%; flex-wrap: wrap; }
.seg__item { border: 0; background: none; padding: 7px 14px; border-radius: 6px; color: var(--text-secondary); min-height: 36px; }
.seg__item.is-on { background: var(--surface); color: var(--text); font-weight: var(--weight-medium); box-shadow: var(--shadow-card); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--brand-primary); flex: none; }
.switch { appearance: none; width: 42px; height: 24px; border-radius: 12px; background: var(--border-strong); position: relative; cursor: pointer; transition: background var(--duration-fast); flex: none; border: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform var(--duration-fast); }
.switch:checked { background: var(--brand-primary); } .switch:checked::after { transform: translateX(18px); }
.switch:focus-visible { box-shadow: var(--focus-ring); }
.setting { display: flex; gap: var(--space-4); justify-content: space-between; align-items: center; padding: var(--space-3) 0; border-bottom: 1px solid var(--border); }
.setting:last-child { border-bottom: 0; }
.setting__t { display: flex; flex-direction: column; } .setting__t small { color: var(--text-muted); }

/* date picker */
.dtwrap { position: relative; }
.dt { display: flex; align-items: center; gap: 8px; text-align: left; }
.dt__text { flex: 1; }
.cal__nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal__title { font-weight: var(--weight-semibold); }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal__dow { text-align: center; font-size: 12px; color: var(--text-muted); padding: 4px 0; }
.cal__day { aspect-ratio: 1; min-height: 38px; border: 0; background: none; border-radius: 50%; color: var(--text); }
.cal__day:hover:not(:disabled) { background: var(--brand-primary-soft); }
.cal__day:disabled { color: var(--text-muted); opacity: 0.4; cursor: not-allowed; }
.cal__day.is-today { box-shadow: inset 0 0 0 1px var(--brand-primary); }
.cal__day.is-sel { background: var(--brand-primary); color: var(--on-primary); }
.cal__time { display: flex; gap: 8px; align-items: center; margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.cal__time .input { width: auto; flex: 1; }

/* uploads */
.upload { display: flex; flex-direction: column; gap: var(--space-2); }
.ups { display: flex; gap: var(--space-2); flex-wrap: wrap; } .ups:empty { display: none; }
.up { position: relative; width: 96px; aspect-ratio: var(--media-ratio); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-muted); border: 1px solid var(--border); }
.up__img { width: 100%; height: 100%; object-fit: cover; }
.up__doc { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 4px; font-size: 11px; padding: 4px; text-align: center; overflow: hidden; color: var(--text-secondary); }
.up__doc span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up__x { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(15,23,42,0.75); color: #fff; display: grid; place-items: center; }
.up__prog { position: absolute; inset: auto 0 0 0; background: rgba(15,23,42,0.7); color: #fff; font-size: 11px; text-align: center; padding: 2px; }
.up__prog--err { background: var(--danger-text); }
.upload__row { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.upadd { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-muted); color: var(--text-secondary); min-height: 44px; }
.upadd:hover:not(:disabled) { border-color: var(--brand-primary); color: var(--link); }
.upadd:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- tables ---------- */
.tblwrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text-secondary); background: var(--surface-muted); padding: 10px var(--space-4); white-space: nowrap; border-bottom: 1px solid var(--border); position: sticky; top: 0; }
.tbl td { padding: 14px var(--space-4); border-bottom: 1px solid var(--border); vertical-align: middle; }
[data-density="compact"] .tbl td { padding-block: 8px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; }
.tbl tr.is-click { cursor: pointer; } .tbl tr.is-click:hover td { background: var(--surface-muted); }
.tbl .is-primary { font-weight: var(--weight-medium); }
.sub { color: var(--text-muted); font-size: var(--text-sm); display: block; }
.money { font-feature-settings: var(--font-feature-numeric); white-space: nowrap; }
.num .money { display: inline-block; }
.money--strong { font-weight: var(--weight-semibold); }
@media (max-width: 767px) {
  .tblwrap { overflow: visible; }
  .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl, .tbl tbody { display: block; }
  .tbl tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); }
  .tbl tr:last-child { border-bottom: 0; }
  .tbl td { display: flex; flex-direction: column; border: 0; padding: 0; text-align: left !important; min-width: 0; }
  .tbl td::before { content: attr(data-label); font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
  .tbl td.is-primary { grid-column: 1 / -1; font-size: var(--text-md); }
  .tbl td.is-primary::before { display: none; }
  .tbl td.col-act { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
  .tbl td.col-act::before { display: none; }
}

/* ---------- badges, chips, tabs ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: var(--weight-medium); white-space: nowrap; }
.badge__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--ok { background: var(--success-soft); color: var(--success-text); }
.badge--warn { background: var(--warning-soft); color: var(--warning-text); }
.badge--bad { background: var(--danger-soft); color: var(--danger-text); }
.badge--info { background: var(--brand-primary-soft); color: var(--link); }
.badge--mute { background: var(--surface-muted); color: var(--text-secondary); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; background: var(--surface-muted); color: var(--text-secondary); }
.tag--ok { background: var(--success-soft); color: var(--success-text); } .tag--warn { background: var(--warning-soft); color: var(--warning-text); } .tag--bad { background: var(--danger-soft); color: var(--danger-text); } .tag--info { background: var(--brand-primary-soft); color: var(--link); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: var(--weight-medium); }
.chip--ok { background: var(--success-soft); color: var(--success-text); } .chip--bad { background: var(--danger-soft); color: var(--danger-text); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; margin-bottom: var(--space-4); scrollbar-width: none; }
.tab { border: 0; background: none; padding: 10px 14px; color: var(--text-secondary); border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; min-height: 44px; }
.tab.is-on { color: var(--link); border-bottom-color: var(--brand-primary); font-weight: var(--weight-medium); }
.tab__n { background: var(--surface-muted); border-radius: var(--radius-pill); padding: 0 7px; font-size: 12px; }
.filters { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: flex-end; margin-bottom: var(--space-4); }
.filters .field { min-width: 150px; flex: 0 1 190px; }
.filters .field--grow { flex: 1 1 260px; }
.pager { display: flex; justify-content: center; align-items: center; gap: var(--space-4); padding: var(--space-4); }
.pager__t { color: var(--text-muted); font-size: var(--text-sm); }

/* ---------- empty, skeleton, banner, toast ---------- */
.empty { text-align: center; padding: var(--space-10) var(--space-4); display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.empty__ic { width: 64px; height: 64px; border-radius: 50%; background: var(--brand-primary-soft); color: var(--link); display: grid; place-items: center; margin-bottom: var(--space-2); }
.empty p { max-width: 380px; margin-bottom: var(--space-3); }
.skel__row { height: 56px; border-radius: var(--radius-md); margin-bottom: 12px; background: linear-gradient(90deg, var(--surface-muted) 25%, var(--border) 50%, var(--surface-muted) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); }
.banner__t { flex: 1; }
.banner--ok { background: var(--success-soft); color: var(--success-text); } .banner--warn { background: var(--warning-soft); color: var(--warning-text); } .banner--bad { background: var(--danger-soft); color: var(--danger-text); } .banner--info { background: var(--brand-primary-soft); color: var(--link); }
.toasts { position: fixed; z-index: var(--z-toast); right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; background: var(--text); color: var(--bg); border-radius: var(--radius-sm); padding: 12px 14px; box-shadow: var(--shadow-popover); animation: rise var(--duration-base) var(--ease-out); }
.toast--err { background: var(--danger-text); color: #fff; } .toast--warn { background: var(--warning); color: var(--on-warning); }
.toast--out { opacity: 0; transition: opacity 0.2s; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
@media (max-width: 767px) { .toasts { left: 16px; right: 16px; bottom: calc(var(--bottomnav-height) + 12px); max-width: none; } }

/* ---------- modal / sheet / drawer ---------- */
.backdrop { position: fixed; inset: 0; z-index: var(--z-modal); background: rgba(15,23,42,0.5); display: flex; align-items: center; justify-content: center; padding: var(--space-4); opacity: 0; transition: opacity 0.16s; }
.backdrop--in { opacity: 1; } .backdrop--out { opacity: 0; }
.modal { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-modal); width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; outline: none; }
.modal--sm { width: min(440px, 100%); } .modal--lg { width: min(760px, 100%); } .modal--xl { width: min(980px, 100%); }
.modal--search { width: min(620px, 100%); align-self: flex-start; margin-top: 8vh; }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border); }
.modal__title { font-size: var(--text-lg); }
.modal__body { padding: var(--space-5); overflow-y: auto; }
.modal__foot { display: flex; justify-content: flex-end; gap: var(--space-2); padding: var(--space-3) var(--space-5); border-top: 1px solid var(--border); flex-wrap: wrap; }
.modal--danger .modal__title { color: var(--danger-text); }
.modal--drawer { margin-left: auto; height: calc(100vh - 32px); max-height: none; width: min(460px, 100%); }
.modal--picker { width: min(360px, 100%); }
@media (max-width: 767px) {
  .backdrop { align-items: flex-end; padding: 0; }
  .modal, .modal--sm, .modal--lg, .modal--xl, .modal--picker { width: 100%; max-height: 92vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; animation: sheet var(--duration-sheet) var(--ease-out); }
  .modal--drawer { height: 92vh; margin-left: 0; }
  .modal--search { margin-top: 0; height: 92vh; }
  .modal__foot { padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom)); } .modal__foot .btn { flex: 1; }
}
@keyframes sheet { from { transform: translateY(40px); opacity: 0.6; } }
.sres { margin-top: var(--space-3); }
.sgroup h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); padding: 8px 4px 4px; }
.sitem { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 10px; border-radius: var(--radius-sm); color: var(--text); }
.sitem:hover { background: var(--surface-muted); text-decoration: none; }
.sitem span { color: var(--text-muted); font-size: var(--text-sm); grid-column: 1; } .sitem i { grid-row: 1 / 3; grid-column: 2; font-style: normal; align-self: center; }
.note { display: flex; flex-direction: column; padding: 12px; border-radius: var(--radius-sm); color: var(--text); border-left: 3px solid transparent; }
.note:hover { background: var(--surface-muted); text-decoration: none; } .note.is-new { border-left-color: var(--brand-primary); background: var(--brand-primary-soft); }
.note span { color: var(--text-secondary); } .note small { color: var(--text-muted); }

/* ---------- details ---------- */
.dl { display: grid; grid-template-columns: minmax(110px, 190px) 1fr; gap: 10px var(--space-4); margin: 0; }
.dl dt { color: var(--text-muted); } .dl dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .dl { grid-template-columns: 1fr; gap: 0; } .dl dd { margin-bottom: 10px; } }
.ref { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; background: var(--surface-muted); border-radius: 6px; padding: 1px 6px; }
.list { list-style: none; padding: 0; margin: 0; }
.list__i { display: flex; gap: var(--space-3); align-items: center; padding: 12px var(--space-5); border-bottom: 1px solid var(--border); color: var(--text); }
.list__i:last-child { border-bottom: 0; }
a.list__i:hover { background: var(--surface-muted); text-decoration: none; }
.list__main { flex: 1; min-width: 0; display: flex; flex-direction: column; } .list__main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list__main small { color: var(--text-muted); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 0 0 var(--space-4) var(--space-4); }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand-primary); }
.timeline small { color: var(--text-muted); display: block; }
.sticky-actions { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); padding: var(--space-3) var(--space-5); display: flex; gap: var(--space-2); justify-content: flex-end; flex-wrap: wrap; margin: var(--space-4) calc(-1 * var(--space-5)) calc(-1 * var(--space-5)); border-radius: 0 0 var(--radius-md) var(--radius-md); }
@media (max-width: 767px) { .sticky-actions { position: fixed; left: 0; right: 0; bottom: calc(var(--bottomnav-height) + env(safe-area-inset-bottom)); margin: 0; z-index: 8; padding: var(--space-3) var(--space-4); } .sticky-actions .btn { flex: 1; } }

/* inventory grid & gallery */
.gridcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--space-4); }
.pcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; color: var(--text); display: flex; flex-direction: column; box-shadow: var(--shadow-card); }
.pcard:hover { text-decoration: none; border-color: var(--border-strong); }
.pcard__img { aspect-ratio: var(--media-ratio); background: var(--surface-muted); display: grid; place-items: center; color: var(--text-muted); position: relative; overflow: hidden; }
.pcard__img img { width: 100%; height: 100%; object-fit: cover; }
.pcard__body { padding: var(--space-3) var(--space-4) var(--space-4); display: flex; flex-direction: column; gap: 2px; }
.pcard__t { font-weight: var(--weight-semibold); } .pcard__s { color: var(--text-muted); font-size: var(--text-sm); }
.pcard__row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; }
.pcard__qty { position: absolute; top: 8px; right: 8px; background: var(--surface); border-radius: var(--radius-pill); padding: 2px 10px; font-size: 12px; font-weight: var(--weight-semibold); box-shadow: var(--shadow-card); }
.pcard__age { position: absolute; top: 8px; left: 8px; }
.gallery { display: grid; gap: var(--space-2); }
.gallery__main { aspect-ratio: var(--media-ratio); border-radius: var(--radius-md); overflow: hidden; background: var(--surface-muted); display: grid; place-items: center; width: 100%; border: 0; padding: 0; cursor: zoom-in; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: var(--space-2); overflow-x: auto; }
.gallery__t { width: 72px; flex: none; aspect-ratio: var(--media-ratio); border-radius: var(--radius-sm); overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--surface-muted); }
.gallery__t.is-on { border-color: var(--brand-primary); } .gallery__t img { width: 100%; height: 100%; object-fit: cover; }
.lightbox { position: fixed; inset: 0; z-index: var(--z-modal); background: rgba(0,0,0,0.92); display: grid; place-items: center; padding: 16px; }
.lightbox img { max-width: 100%; max-height: 88vh; object-fit: contain; border-radius: 6px; }
.lightbox .icon-btn { position: absolute; top: 12px; right: 12px; color: #fff; background: rgba(255,255,255,0.12); }
.lightbox .nav-l, .lightbox .nav-r { position: absolute; top: 50%; color: #fff; background: rgba(255,255,255,0.12); } .lightbox .nav-l { left: 12px; } .lightbox .nav-r { right: 12px; }
.docs { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.doc { display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); background: var(--surface-muted); }

/* steps (on-demand) */
.steps { display: flex; gap: var(--space-2); margin-bottom: var(--space-5); }
.step { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: var(--text-sm); }
.step__n { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-muted); display: grid; place-items: center; font-weight: var(--weight-semibold); flex: none; }
.step.is-on { color: var(--text); font-weight: var(--weight-medium); } .step.is-on .step__n { background: var(--brand-primary); color: var(--on-primary); }
.step.is-done .step__n { background: var(--success-text); color: #fff; }
@media (max-width: 640px) { .step span:last-child { display: none; } .step.is-on span:last-child { display: inline; } }
.summary { background: var(--surface-muted); border-radius: var(--radius-md); padding: var(--space-4); display: grid; gap: 8px; }
.summary__r { display: flex; justify-content: space-between; gap: var(--space-3); }
.summary__r--total { border-top: 1px solid var(--border-strong); padding-top: 8px; font-weight: var(--weight-semibold); font-size: var(--text-md); }
.money--in { color: var(--success-text); } .money--out { color: var(--danger-text); } .money--pending { color: var(--text-muted); text-decoration: underline dashed; text-underline-offset: 3px; }

/* ---------- charts ---------- */
.chartbox, .donutbox { width: 100%; }
.chart { width: 100%; height: auto; display: block; }
.chart--donut { max-width: 190px; margin: 0 auto; }
.ch-grid { stroke: var(--border); stroke-width: 1; }
.ch-t { fill: var(--text-muted); font-size: 11px; }
.ch-big { fill: var(--text); font-size: 15px; font-weight: 600; text-anchor: middle; }
.ch-line { stroke-width: 2.5; stroke-linejoin: round; } .ch-line.c1 { stroke: var(--brand-primary); } .ch-line.c2 { stroke: var(--success); } .ch-line.c3 { stroke: var(--warning); } .ch-line.c4 { stroke: var(--danger); }
.ch-area.c1 { fill: var(--brand-primary); fill-opacity: 0.12; } .ch-area.c2 { fill: var(--success); fill-opacity: 0.12; } .ch-area.c3 { fill: var(--warning); fill-opacity: 0.12; } .ch-area.c4 { fill: var(--danger); fill-opacity: 0.12; }
.ch-dot.c1, .ch-fill.c1, .ch-ring.c1 { fill: var(--brand-primary); } .ch-dot.c2, .ch-fill.c2 { fill: var(--success); } .ch-dot.c3, .ch-fill.c3 { fill: var(--warning); } .ch-dot.c4, .ch-fill.c4 { fill: var(--danger); }
.ch-ring { fill: none; } .ch-ring.c1 { stroke: var(--brand-primary); } .ch-ring.c2 { stroke: var(--success); } .ch-ring.c3 { stroke: var(--warning); } .ch-ring.c4 { stroke: var(--danger); } .ch-ring.c5 { stroke: var(--border-strong); }
.legend { display: flex; gap: var(--space-4); flex-wrap: wrap; justify-content: center; font-size: var(--text-sm); color: var(--text-secondary); margin-top: 8px; }
.legend--col { flex-direction: column; gap: 6px; align-items: stretch; } .legend--col .legend__i { justify-content: space-between; }
.legend__i { display: inline-flex; align-items: center; gap: 6px; } .legend__i b { margin-left: auto; padding-left: 12px; color: var(--text); font-weight: var(--weight-medium); }
.legend__sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; } .legend__sw.c1 { background: var(--brand-primary); } .legend__sw.c2 { background: var(--success); } .legend__sw.c3 { background: var(--warning); } .legend__sw.c4 { background: var(--danger); } .legend__sw.c5 { background: var(--border-strong); }
.chart-empty { color: var(--text-muted); text-align: center; padding: var(--space-8) var(--space-4); background: var(--surface-muted); border-radius: var(--radius-sm); }
.hbars { display: grid; gap: var(--space-3); }
.hbar__top { display: flex; justify-content: space-between; gap: 12px; } .hbar__n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar__track { height: 8px; background: var(--surface-muted); border-radius: 4px; overflow: hidden; margin-top: 4px; }
.hbar__fill { height: 100%; border-radius: 4px; background: var(--brand-primary); } .hbar__fill.c2 { background: var(--success); } .hbar__fill.c3 { background: var(--warning); } .hbar__fill.c4, .hbar__fill.neg { background: var(--danger); }
.hbar__sub { color: var(--text-muted); font-size: 12px; margin-top: 2px; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--bg); position: relative; }
.auth--gradient { background: linear-gradient(135deg, var(--sidebar-bg), var(--brand-primary)); }
.auth__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth__panel { background: var(--sidebar-bg); color: #fff; padding: var(--space-10); display: flex; flex-direction: column; justify-content: center; gap: var(--space-8); position: relative; background-image: radial-gradient(circle at 20% 10%, rgba(255,255,255,0.08), transparent 50%); }
.auth--img .auth__panel { background-color: rgba(11,17,32,0.75); }
.auth__brand h1 { font-size: 32px; margin-top: var(--space-4); } .auth__brand p { color: var(--sidebar-text); margin-top: 4px; }
.auth__logo { height: 56px; width: auto; max-width: 220px; object-fit: contain; }
.auth__points { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; color: var(--sidebar-text); } .auth__points li { display: flex; gap: 10px; align-items: center; } .auth__points .icon { color: var(--brand-accent); }
.auth__card { background: var(--surface); padding: var(--space-10) clamp(24px, 6vw, 72px); display: flex; flex-direction: column; justify-content: center; position: relative; }
.auth__card h2 { font-size: 24px; margin-bottom: 4px; } .auth__card .form { max-width: 400px; }
.auth__mobilebrand { display: none; align-items: center; gap: 10px; margin-bottom: var(--space-6); font-size: var(--text-lg); }
.auth__links { display: flex; justify-content: space-between; gap: var(--space-3); font-size: var(--text-sm); flex-wrap: wrap; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth__panel { display: none; } .auth__card { min-height: 100vh; padding: var(--space-6) var(--space-5); justify-content: flex-start; padding-top: 12vh; } .auth__mobilebrand { display: flex; } .auth__mobilebrand .brand__mark--lg { width: 44px; height: 44px; font-size: 16px; } .auth__logo { height: 44px; } }

/* ---------- misc ---------- */
.shopbar { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-3); }
.quick__i { display: flex; gap: 10px; align-items: center; padding: 14px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: var(--weight-medium); }
.quick__i:hover { text-decoration: none; border-color: var(--brand-primary); background: var(--brand-primary-soft); }
.quick__i .icon { color: var(--link); }
.gs { background: var(--brand-primary-soft); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); display: grid; gap: 8px; }
.gs ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.alertrow { display: flex; gap: 12px; padding: 14px var(--space-5); border-bottom: 1px solid var(--border); align-items: flex-start; }
.alertrow:last-child { border-bottom: 0; }
.alertrow__ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.alertrow__ic--warning { background: var(--warning-soft); color: var(--warning-text); } .alertrow__ic--info { background: var(--brand-primary-soft); color: var(--link); } .alertrow__ic--danger { background: var(--danger-soft); color: var(--danger-text); }
.alertrow__b { flex: 1; min-width: 0; }
.preview-frame { width: 100%; height: 420px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.colorrow { display: flex; gap: 10px; align-items: center; } .colorrow input[type=color] { width: 46px; height: 42px; padding: 2px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.swatch { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border-strong); display: inline-block; }
.perm { display: grid; gap: 8px; }
.qr { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--surface-muted); padding: 10px 12px; border-radius: var(--radius-sm); overflow-wrap: anywhere; user-select: all; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--surface-muted); padding: 12px; border-radius: var(--radius-sm); }
.progressbar { height: 8px; background: var(--surface-muted); border-radius: 4px; overflow: hidden; } .progressbar > div { height: 100%; background: var(--brand-primary); }
.health { display: grid; gap: 0; } .health__r { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); } .health__r:last-child { border: 0; }
.health__r .icon { flex: none; } .health__ok { color: var(--success-text); } .health__warn { color: var(--warning-text); } .health__bad { color: var(--danger-text); }
.health__r span { flex: 1; } .health__r small { color: var(--text-muted); display: block; }
.receipt { max-width: 380px; margin: 0 auto; background: #fff; color: #111; padding: 24px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); font-size: 14px; }
.receipt h2 { text-align: center; font-size: 18px; margin-bottom: 2px; } .receipt .c { text-align: center; color: #555; } .receipt hr { border: 0; border-top: 1px dashed #999; margin: 12px 0; }
.receipt .r { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; } .receipt .tot { font-weight: 700; font-size: 16px; }
@media (prefers-reduced-motion: reduce) { * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
.right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.right small.pos { color: var(--success-text); } .right small.neg { color: var(--danger-text); }
.nowrap { white-space: nowrap; }
.input--static { display: flex; align-items: center; background: var(--surface-muted); color: var(--text-secondary); }
.rangebar { margin-bottom: var(--space-1); }
.narrow { max-width: 860px; }
.pcard { text-align: left; font: inherit; padding: 0; cursor: pointer; }
.pcard__ph { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-muted); }
.up__prog--btn { border: 0; cursor: pointer; }
.stack > h3 { font-size: var(--text-md); margin-top: var(--space-2); }
.form > h3 { font-size: var(--text-md); margin-top: var(--space-2); }
.pickbox { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.pickbox .input { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; }
.pickbox__list { max-height: 300px; overflow-y: auto; }
.pick { display: flex; justify-content: space-between; gap: 12px; width: 100%; text-align: left; padding: 10px 14px; background: var(--surface); border: 0; border-bottom: 1px solid var(--border); min-height: 56px; align-items: center; }
.pick:last-child { border-bottom: 0; } .pick:hover { background: var(--surface-muted); } .pick.is-on { background: var(--brand-primary-soft); }
.pick__t, .pick__r { display: flex; flex-direction: column; min-width: 0; } .pick__r { text-align: right; flex: none; }
.pick small { color: var(--text-muted); }
.chosen { background: var(--brand-primary-soft); border-radius: var(--radius-sm); padding: 12px 14px; }
.more { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; } .more summary { cursor: pointer; font-weight: var(--weight-medium); margin: -2px 0 2px; } .more[open] summary { margin-bottom: 12px; }
.warnbox { background: var(--warning-soft); border-radius: var(--radius-sm); padding: 12px; }
.receipt__logo { height: 44px; margin: 0 auto 8px; }
.bigamount { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 32px; font-weight: var(--weight-semibold); }
.modal--md { width: min(620px, 100%); }
.repcard { align-items: flex-start; } .repcard span { display: flex; flex-direction: column; gap: 2px; } .repcard small { font-weight: 400; }
.tbl tfoot td { font-weight: var(--weight-semibold); background: var(--surface-muted); border-top: 2px solid var(--border-strong); padding: 12px var(--space-4); }
.avatar--lg { width: 64px; height: 64px; font-size: 20px; }
.steps-list { display: grid; gap: 14px; padding-left: 20px; margin: 0; }
@media (max-width: 767px) { .tbl tfoot { display: block; } .scopechip { width: auto; } }
.topbar .scopechip { width: auto; flex: none; max-width: 240px; }
.brandprev { display: flex; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; min-height: 190px; background: var(--bg); }
.brandprev__side { width: 64px; background: var(--sidebar-bg); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0; }
.brandprev__side i { width: 28px; height: 8px; border-radius: 4px; background: rgba(255,255,255,0.25); }
.brandprev__main { flex: 1; padding: 16px; display: grid; gap: 12px; align-content: start; }
.curimg { max-height: 56px; max-width: 160px; object-fit: contain; border: 1px solid var(--border); border-radius: 6px; padding: 4px; background: #fff; }
.emailprev__box { background: var(--surface-muted); border-radius: var(--radius-sm); padding: 12px; max-height: 60vh; overflow: auto; }
.emailprev__box--m { max-width: 360px; margin: 0 auto; }
.emailprev__subj { display: flex; flex-direction: column; margin-bottom: 8px; }
.emailprev { display: block; }
.chipbtn { border: 0; cursor: pointer; }
