/* =========================================================================
   Samo ERP v2 — component styles
   Requires tokens/tokens.css. No framework dependency; safe next to
   Bootstrap/AdminLTE because every class is prefixed with "s-".
   Markup examples: templates/*.html. Exact visual reference: screenshots/ + mockups/.
   ========================================================================= */

/* ---------- Base --------------------------------------------------------- */
.s-app, .s-app * { box-sizing: border-box; }
.s-app {
  min-height: 100vh; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0;
  background: var(--s-bg); color: var(--s-ink);
  font-family: var(--s-font); font-size: var(--s-fs-base); line-height: var(--s-lh);
  transition: background-color .3s, color .3s;
}
.s-app a { color: var(--s-accent-ink); text-decoration: none; }
.s-app input::placeholder, .s-app textarea::placeholder { color: var(--s-text-3); }
[data-theme="dark"] .s-app select, [data-theme="dark"] .s-app input, [data-theme="dark"] .s-app textarea { color-scheme: dark; }
.s-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: var(--s-gap); position: relative; overflow-x: clip; /* bootstrap .row (-15px margins) stuck ~7px past the viewport on create/report pages; clip = no scroll container */ }
.s-num { font-variant-numeric: tabular-nums; }
.s-app [hidden] { display: none !important; }
.s-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Glass card ---------------------------------------------------- */
.s-card {
  border-radius: var(--s-r-2xl); background: var(--s-panel);
  border: 1px solid var(--s-panel-line); box-shadow: var(--s-shadow);
  backdrop-filter: blur(var(--s-blur));
}
.s-card--pad { padding: 20px 22px; }
.s-card__title { margin: 0; font-size: var(--s-fs-h2); font-weight: 800; }
.s-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--s-line); }

/* ---------- Sidebar (open 292px / collapsed 76px) -------------------------- */
.s-sidebar {
  position: sticky; top: var(--s-gap); align-self: flex-start; z-index: 10;
  width: var(--s-sidebar-w); max-height: calc(100vh - 2 * var(--s-gap));
  display: flex; flex-direction: column;
  border-radius: var(--s-r-3xl); background: var(--s-sidebar-bg); border: 1px solid var(--s-sidebar-line);
  box-shadow: var(--s-shadow); backdrop-filter: blur(var(--s-blur));
  transition: width .28s var(--s-ease);
}
.s-sb-top { display: flex; align-items: center; gap: 10px; padding: clamp(6px, 1.2vh, 12px) 12px; }
.s-sb-burger { flex: none; width: clamp(38px, 5vh, 50px); height: clamp(38px, 5vh, 50px); border: 0; border-radius: 14px; background: var(--s-soft); color: var(--s-ink); display: grid; place-items: center; cursor: pointer; }
.s-sb-brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--s-ink) !important; }
.s-sb-logo { flex: none; width: clamp(32px, 4.4vh, 40px); height: clamp(32px, 4.4vh, 40px); border-radius: 13px; background: var(--s-logo); display: grid; place-items: center; color: #fff; }
.s-sb-name { font-weight: 800; font-size: calc(18px * var(--s-fz, 1)); letter-spacing: .06em; }
.s-sb-tag { height: 22px; padding: 0 8px; border-radius: 11px; background: var(--s-soft); color: var(--s-text-2); font-size: calc(11px * var(--s-fz, 1)); font-weight: 800; line-height: 22px; }
.s-sb-search { margin: 0 12px clamp(4px, 1vh, 10px); display: flex; align-items: center; gap: 8px; height: clamp(34px, 4.4vh, 42px); padding: 0 12px; border-radius: 13px; background: var(--s-field); border: 1px solid var(--s-line); }
.s-sb-search { color: var(--s-text-3); cursor: text; transition: border-color .15s, box-shadow .15s, background .15s; }
.s-sb-search:hover { border-color: var(--s-text-3); }
.s-sb-search:focus-within { color: var(--s-accent-ink); border-color: var(--s-accent-ink); background: var(--s-soft); box-shadow: 0 0 0 3px var(--s-accent-soft); }
.s-sb-search svg { flex: none; }
.s-sb-search input::placeholder { color: var(--s-text-3); font-weight: 600; opacity: 1; }
.s-sb-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; height: 14px; width: 14px; cursor: pointer; background: currentColor; opacity: .55; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat; }
.s-sb-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: calc(13.5px * var(--s-fz, 1)); font-weight: 600; color: var(--s-ink); }
.s-sb-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 0 6px 10px 10px; display: flex; flex-direction: column; gap: 1px; scrollbar-width: thin; scrollbar-color: var(--s-sb-rule) transparent; }
.s-sb-scroll::-webkit-scrollbar { width: 5px; }
.s-sb-scroll::-webkit-scrollbar-thumb { background: var(--s-sb-rule); border-radius: 3px; }
.s-sb-group { padding: clamp(8px, 1.6vh, 14px) 10px 4px; color: var(--s-text-3); font-size: calc(11px * var(--s-fz, 1)); font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
@media (min-width: 720px) { .s-sidebar { height: calc(100vh - 2 * var(--s-gap)); } } /* full-height rail */
.s-sb-item { /* top-level module row and "Bosh sahifa" */
  flex: none; display: flex; align-items: center; gap: 11px; width: 100%; min-height: clamp(32px, 4.6vh, 42px); padding: 0 10px;
  border: 0; border-radius: var(--s-r-lg); background: transparent; color: var(--s-ink) !important;
  font: inherit; font-weight: 700; text-align: left; cursor: pointer;
}
.s-sb-item > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-sb-item.is-active { background: var(--s-primary); color: var(--s-primary-ink) !important; }
.s-sb-item[aria-expanded="true"]:not(.is-active) { background: var(--s-soft); }
.s-sb-count { flex: none !important; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--s-sb-count-bg); color: var(--s-text-2); font-size: calc(11px * var(--s-fz, 1)); font-weight: 800; line-height: 20px; text-align: center; }
.s-sb-item.is-active .s-sb-count { background: rgba(255,255,255,.16); color: inherit; }
.s-sb-chev { flex: none; transition: transform .2s; }
[aria-expanded="true"] > .s-sb-chev { transform: rotate(90deg); }
.s-sb-sub { list-style: none; margin: 0 0 4px 22px; padding: 0; border-left: 1px solid var(--s-sb-rule); }
.s-sb-sub .s-sb-sub { margin-left: 14px; }
.s-sb-sub[hidden] { display: none; }
.s-sb-row { position: relative; display: flex; align-items: center; animation: s-sb-in .22s ease-out both; }
.s-sb-node, .s-sb-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: clamp(28px, 3.9vh, 34px); margin-left: 6px; padding: 5px 36px 5px 10px; border: 0; border-radius: 11px; background: transparent; color: var(--s-text-2) !important; font: inherit; font-size: calc(13.5px * var(--s-fz, 1)); font-weight: 600; text-align: left; cursor: pointer; }
.s-sb-node { font-weight: 700; padding-right: 10px; }
.s-sb-link.is-current { background: var(--s-accent-soft); color: var(--s-accent-ink) !important; font-weight: 800; }
.s-sb-star { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; border-radius: 9px; background: transparent; color: var(--s-text-3); opacity: 0; display: grid; place-items: center; cursor: pointer; }
.s-sb-row:hover .s-sb-star, .s-sb-star:focus-visible, .s-sb-star[aria-pressed="true"] { opacity: 1; }
.s-sb-star[aria-pressed="true"] { color: var(--s-star); }
.s-sb-pin { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 36px 6px 10px; border-radius: 12px; color: var(--s-ink) !important; }
.s-sb-pin__icon { flex: none; width: 26px; height: 26px; border-radius: 9px; background: var(--s-accent-soft); color: var(--s-accent-ink); display: grid; place-items: center; }
.s-sb-pin__sub { display: block; color: var(--s-text-3); font-size: calc(11.5px * var(--s-fz, 1)); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-avatar { position: relative; flex: none; width: 40px; height: 40px; border-radius: 13px; background: var(--s-primary); color: var(--s-primary-ink); display: grid; place-items: center; font-size: calc(13px * var(--s-fz, 1)); font-weight: 800; }
.s-avatar__dot { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 5px; background: var(--s-emp-active); border: 2px solid var(--s-solid); }
/* collapsed rail: only icons; module click opens .s-sb-flyout */
.s-sidebar.is-collapsed { width: var(--s-sidebar-w-collapsed); }
.s-sidebar.is-collapsed .s-sb-top { flex-direction: column; }
.s-sidebar.is-collapsed .s-sb-scroll { align-items: center; }
.s-sidebar.is-collapsed .s-sb-item { width: 50px; padding: 0 15px; }
.s-sidebar.is-collapsed :is(.s-sb-name, .s-sb-tag, .s-sb-search, .s-sb-group, .s-sb-item > span, .s-sb-count, .s-sb-chev, .s-sb-sub, .s-sb-pin) { display: none; }
.s-sb-flyout { position: fixed; z-index: 60; color: var(--s-ink); width: 300px; max-height: 64vh; overflow-y: auto; padding: 10px; border-radius: 20px; background: var(--s-solid); border: 1px solid var(--s-panel-line); box-shadow: var(--s-shadow-pop); animation: s-sb-fly .2s var(--s-ease) both; }
.s-sb-flyout__title { padding: 6px 10px 8px; font-weight: 800; font-size: calc(15px * var(--s-fz, 1)); }
.s-sb-item:hover, .s-sb-node:hover, .s-sb-link:hover, .s-sb-pin:hover, .s-sb-burger:hover { box-shadow: inset 0 0 0 999px rgba(150,110,70,.14); }

/* ---------- Top bar + quick menu ------------------------------------------ */
.s-topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 10px 10px 20px; border-radius: var(--s-r-xl); background: var(--s-panel); border: 1px solid var(--s-panel-line); box-shadow: var(--s-shadow); }
.s-crumbs { flex: 1 1 260px; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; color: var(--s-text-2); font-size: calc(13px * var(--s-fz, 1)); font-weight: 600; }
.s-crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--s-text-3); }
.s-crumbs [aria-current="page"] { color: var(--s-ink); font-weight: 800; }
.s-search-btn { display: flex; align-items: center; gap: 10px; height: var(--s-h-input); min-width: 220px; padding: 0 8px 0 14px; border-radius: var(--s-r-lg); border: 1px solid var(--s-line); background: var(--s-soft); color: var(--s-text-2); font: inherit; font-weight: 600; cursor: pointer; }
.s-kbd { height: 26px; padding: 0 8px; border-radius: 8px; background: var(--s-solid); color: var(--s-text-2); font-size: calc(12px * var(--s-fz, 1)); font-weight: 700; line-height: 26px; }
.s-icon-btn { position: relative; width: var(--s-h-input); height: var(--s-h-input); border-radius: var(--s-r-lg); border: 1px solid var(--s-line); background: var(--s-soft); color: var(--s-ink); display: grid; place-items: center; cursor: pointer; font: inherit; font-weight: 800; }
.s-icon-btn__badge { position: absolute; top: 10px; right: 11px; width: 8px; height: 8px; border-radius: 4px; background: var(--s-viz-bad); }
.s-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 4px; }
.s-quick__label { display: flex; align-items: center; gap: 6px; margin-right: 4px; color: var(--s-text-3); font-size: calc(12px * var(--s-fz, 1)); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.s-quick__chip { display: flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 17px; background: var(--s-panel); border: 1px solid var(--s-panel-line); color: var(--s-ink) !important; font-size: calc(13px * var(--s-fz, 1)); font-weight: 700; }
.s-quick__chip.is-current { background: var(--s-primary); color: var(--s-primary-ink) !important; }

/* ---------- Page head ---------------------------------------------------- */
.s-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 4px 4px 0; animation: s-rise .45s both; }
.s-page-head__text { flex: 1 1 300px; }
.s-h1 { margin: 0; font-size: var(--s-fs-h1); font-weight: 800; letter-spacing: -.03em; }
.s-sub { margin-top: 2px; color: var(--s-text-2); font-size: calc(13px * var(--s-fz, 1)); font-weight: 600; }

/* ---------- Buttons ------------------------------------------------------- */
.s-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--s-h-btn); padding: 0 16px; border-radius: var(--s-r-lg); border: 1px solid transparent; font: inherit; font-weight: 800; cursor: pointer; white-space: nowrap; transition: transform var(--s-dur-fast), box-shadow var(--s-dur-fast); }
.s-btn--primary { background: var(--s-primary); color: var(--s-primary-ink) !important; }
.s-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 10px 20px -12px rgba(14,23,38,.5); }
.s-btn--secondary { background: var(--s-panel); border-color: var(--s-panel-line); color: var(--s-ink) !important; font-weight: 700; }
.s-btn--field { background: var(--s-field); border-color: var(--s-field-line); color: var(--s-ink) !important; }
.s-btn--ghost { background: transparent; color: var(--s-accent-ink) !important; }
.s-btn--danger { background: transparent; color: var(--s-error) !important; }
.s-btn--accent { background: var(--s-accent); color: #fff !important; }
.s-btn--sm { height: 36px; padding: 0 14px; border-radius: var(--s-r-sm); }
.s-btn--md { height: var(--s-h-input); border-radius: 13px; }
.s-btn--icon { width: var(--s-h-btn); padding: 0; }
.s-btn--secondary:hover, .s-btn--field:hover, .s-btn--ghost:hover { box-shadow: inset 0 0 0 999px rgba(150,110,70,.14); }
.s-row-act { width: 34px; height: 34px; border: 0; border-radius: var(--s-r-sm); background: transparent; color: var(--s-ink) !important; display: inline-grid; place-items: center; cursor: pointer; opacity: .55; transition: opacity var(--s-dur-fast); }
.s-row-act--danger { color: var(--s-error) !important; }
tr:hover .s-row-act, .s-row-act:focus-visible { opacity: 1; }

/* ---------- Segmented control -------------------------------------------- */
.s-seg { display: flex; gap: 2px; padding: 4px; border-radius: var(--s-r-lg); background: var(--s-panel); border: 1px solid var(--s-panel-line); }
.s-seg--field { height: var(--s-h-input); border-radius: var(--s-r-md); background: var(--s-field); border-color: var(--s-field-line); }
.s-seg__btn { flex: 1; min-height: 34px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; color: var(--s-text-2); font: inherit; font-size: calc(13.5px * var(--s-fz, 1)); font-weight: 800; cursor: pointer; transition: background var(--s-dur), color var(--s-dur); }
.s-seg__btn[aria-pressed="true"] { background: var(--s-primary); color: var(--s-primary-ink); }

/* ---------- Forms --------------------------------------------------------- */
.s-form-section { padding: 22px 24px; display: flex; flex-direction: column; gap: 18px; scroll-margin-top: 16px; animation: s-rise var(--s-dur-enter) both; }
.s-section-title { margin: 0; display: flex; align-items: center; gap: 10px; font-size: var(--s-fs-h3); font-weight: 800; }
.s-section-num { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--s-accent-soft); color: var(--s-accent-ink); display: grid; place-items: center; font-size: calc(13px * var(--s-fz, 1)); }
.s-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 16px 18px; }
.s-field { display: flex; flex-direction: column; gap: 7px; }
.s-field--full { grid-column: 1 / -1; }
.s-label { font-size: calc(13px * var(--s-fz, 1)); font-weight: 700; color: var(--s-text-2); }
.s-req { color: var(--s-error); }
.s-input, .s-select, .s-textarea {
  width: 100%; height: var(--s-h-input); padding: 0 12px; border-radius: var(--s-r-md);
  border: 1px solid var(--s-field-line); background: var(--s-field); color: var(--s-ink);
  font: inherit; font-size: calc(14px * var(--s-fz, 1)); font-weight: 600; outline: 0;
  transition: border-color .2s, box-shadow .2s;
}
.s-select { padding: 0 10px; }
.s-textarea { height: auto; min-height: 66px; padding: 10px 12px; font-weight: 500; resize: vertical; }
.s-input:focus, .s-select:focus, .s-textarea:focus, .s-input-group:focus-within { border-color: var(--s-accent); box-shadow: var(--s-focus-ring); }
.s-input[readonly], .s-input-group.is-readonly { background: var(--s-soft); border-color: var(--s-line); font-weight: 800; }
.s-input-group { display: flex; align-items: center; gap: 8px; height: var(--s-h-input); padding: 0 12px; border-radius: var(--s-r-md); border: 1px solid var(--s-field-line); background: var(--s-field); }
.s-input-group input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: calc(14px * var(--s-fz, 1)); font-weight: 600; color: var(--s-ink); }
.is-invalid, .has-error .s-input, .has-error .s-select { border-color: var(--s-error) !important; }
.s-error-text { color: var(--s-error); font-size: calc(12px * var(--s-fz, 1)); font-weight: 700; }
.s-help { color: var(--s-text-3); font-size: calc(11.5px * var(--s-fz, 1)); font-weight: 600; }
.s-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; cursor: pointer; }
.s-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--s-accent); }
.s-diff { margin-top: 3px; text-align: right; color: var(--s-warn); font-size: calc(11.5px * var(--s-fz, 1)); font-weight: 800; }
.s-input--warn { border-color: var(--s-viz-warn) !important; }
/* two-column form with section navigation (HRM xodim) */
.s-form-layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s-gap); }
.s-form-nav { position: sticky; top: var(--s-gap); flex: 1 0 230px; max-width: 100%; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.s-form-nav a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: 13px; color: var(--s-ink) !important; font-weight: 700; }
.s-form-nav__mark { flex: none; width: 24px; height: 24px; border-radius: 12px; display: grid; place-items: center; font-size: calc(11.5px * var(--s-fz, 1)); font-weight: 800; background: var(--s-neu-bg); color: var(--s-neu); }
.s-form-nav__mark.is-done { background: var(--s-ok-bg); color: var(--s-ok); }
.s-form-nav__mark.is-missing { background: var(--s-bad-bg); color: var(--s-bad); }
.s-form-body { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: var(--s-gap); }
/* sticky save bar */
.s-actionbar { position: sticky; bottom: var(--s-gap); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 14px; border-radius: var(--s-r-xl); background: var(--s-solid); border: 1px solid var(--s-line); box-shadow: var(--s-shadow-bar); }
.s-actionbar__info { flex: 1 1 200px; color: var(--s-text-2); font-size: calc(13px * var(--s-fz, 1)); font-weight: 700; }

/* ---------- Filter bar ---------------------------------------------------- */
.s-filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--s-line); }
.s-filterbar .s-input-group { flex: 1 1 220px; height: var(--s-h-filter); }
.s-filter { display: flex; align-items: center; gap: 6px; height: var(--s-h-filter); padding: 0 4px 0 12px; border-radius: var(--s-r-md); border: 1px solid var(--s-field-line); background: var(--s-field); color: var(--s-text-2); font-size: calc(12.5px * var(--s-fz, 1)); font-weight: 700; }
.s-filter select { height: 34px; max-width: 190px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: calc(13px * var(--s-fz, 1)); font-weight: 700; color: var(--s-ink); outline: 0; }
.s-collapse-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 16px 22px; border: 0; background: transparent; color: var(--s-ink); font: inherit; text-align: left; cursor: pointer; }
.s-collapse-head__title { flex: 1; font-weight: 800; font-size: calc(15px * var(--s-fz, 1)); }

/* ---------- Tables (GridView) -------------------------------------------- */
.s-table-wrap { overflow-x: auto; }
.s-table { width: 100%; border-collapse: collapse; font-size: calc(13.5px * var(--s-fz, 1)); }
.s-table thead tr { background: var(--s-th); color: var(--s-text-2); text-align: left; }
.s-table th { padding: 12px 10px; border-bottom: 1px solid var(--s-line); font-size: var(--s-fs-xs); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.s-table td { padding: 0 10px; height: var(--s-h-row); border-bottom: 1px solid var(--s-line); }
.s-table th:first-child, .s-table td:first-child { padding-left: 16px; }
.s-table th:last-child, .s-table td:last-child { padding-right: 16px; }
.s-table tbody tr { transition: background-color var(--s-dur-fast); }
.s-table tbody tr:hover { background: var(--s-hover); }
.s-table tbody tr.is-selected { background: var(--s-accent-soft); }
.s-table .is-num { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.s-table .is-muted { color: var(--s-text-2); }
.s-table .is-strong { font-weight: 700; }
.s-table__main { display: block; font-weight: 800; color: var(--s-ink) !important; }
.s-table__meta { display: block; color: var(--s-text-3); font-size: calc(12px * var(--s-fz, 1)); font-weight: 600; }
.s-table tfoot tr { background: var(--s-th); font-weight: 800; font-variant-numeric: tabular-nums; }
.s-table tfoot td { height: auto; padding-top: 12px; padding-bottom: 12px; }
.s-table tfoot.is-strong tr { background: var(--s-primary); color: var(--s-primary-ink); }
.s-table tr.s-tr-group { background: var(--s-accent-soft); color: var(--s-accent-ink); font-weight: 800; }
.s-table tr.s-tr-group td { height: auto; padding-top: 10px; padding-bottom: 10px; }
.s-table input[type="checkbox"] { width: 17px; height: 17px; margin: 0; accent-color: var(--s-accent); }
.s-table--edit td { height: auto; padding: 8px 6px; }
.s-table--edit .s-input, .s-table--edit .s-select { height: 38px; border-radius: var(--s-r-sm); padding: 0 8px; font-weight: 600; }
.s-table--edit .s-input.is-num { text-align: right; }
.s-row-actions { display: flex; justify-content: flex-end; gap: 2px; }
.s-empty { padding: 48px 16px !important; text-align: center; color: var(--s-text-2); font-weight: 600; }
.s-bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 16px; background: var(--s-primary); color: var(--s-primary-ink); font-weight: 700; animation: s-pop .2s both; }
.s-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; color: var(--s-text-2); font-size: calc(13px * var(--s-fz, 1)); font-weight: 600; }
.s-pager__info { flex: 1 1 200px; font-variant-numeric: tabular-nums; }
.s-pager__btn { min-width: 36px; height: 36px; padding: 0 8px; border-radius: var(--s-r-sm); border: 1px solid var(--s-field-line); background: var(--s-field); color: var(--s-ink); font: inherit; font-weight: 800; cursor: pointer; }
.s-pager__btn[aria-current="page"] { background: var(--s-primary); border-color: var(--s-primary); color: var(--s-primary-ink) !important; }

/* ---------- Status chips -------------------------------------------------- */
.s-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: calc(12px * var(--s-fz, 1)); font-weight: 800; white-space: nowrap; }
.s-chip::before { content: ""; width: 6px; height: 6px; border-radius: 3px; background: currentColor; }
.s-chip--plain::before { display: none; }
.s-chip--ok { background: var(--s-ok-bg); color: var(--s-ok); }
.s-chip--warn { background: var(--s-warn-bg); color: var(--s-warn); }
.s-chip--bad { background: var(--s-bad-bg); color: var(--s-bad); }
.s-chip--neu { background: var(--s-neu-bg); color: var(--s-neu); }
.s-tag { display: inline-block; height: 18px; padding: 0 6px; border-radius: 6px; background: var(--s-neu-bg); color: var(--s-neu); font-size: calc(11px * var(--s-fz, 1)); font-weight: 800; line-height: 18px; }
.s-filter-chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 19px; border: 1px solid var(--s-panel-line); background: var(--s-panel); color: var(--s-ink); font: inherit; font-size: calc(13px * var(--s-fz, 1)); font-weight: 800; cursor: pointer; }
.s-filter-chip[aria-pressed="true"] { background: var(--s-primary); border-color: var(--s-primary); color: var(--s-primary-ink); }
.s-dot { display: inline-block; width: 8px; height: 8px; border-radius: 4px; }

/* ---------- KPI tile + progress ------------------------------------------ */
.s-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: var(--s-gap); }
.s-kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; animation: s-rise var(--s-dur-enter) both; }
.s-kpi__label { color: var(--s-text-2); font-weight: 700; font-size: calc(13px * var(--s-fz, 1)); }
.s-kpi__value { font-size: var(--s-fs-kpi); font-weight: 800; line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.s-kpi__unit { margin-left: 4px; font-size: calc(14px * var(--s-fz, 1)); color: var(--s-text-2); }
.s-kpi__note { color: var(--s-text-2); font-size: calc(12.5px * var(--s-fz, 1)); font-weight: 600; }
.s-bar { height: 8px; border-radius: 4px; background: var(--s-track); overflow: hidden; }
.s-bar__fill { height: 100%; border-radius: 4px; background: var(--s-viz-good); animation: s-grow-x .9s ease-out both; }
.s-bar__fill--warn { background: var(--s-viz-warn); }
.s-bar__fill--bad { background: var(--s-viz-bad); }

/* ---------- Feedback: toast, skeleton, loaders ---------------------------- */
.s-toast { position: fixed; right: 28px; bottom: 96px; z-index: 1000; display: flex; align-items: center; gap: 12px; max-width: 420px; padding: 14px 16px; border-radius: 16px; background: #0E7C7B; color: #fff; box-shadow: 0 24px 48px -20px rgba(14,23,38,.6); font-weight: 700; animation: s-toast-in .25s var(--s-ease) both; }
.s-toast--error { background: #B42318; }
.s-skel { border-radius: 10px; background: linear-gradient(90deg, var(--s-track) 0%, var(--s-soft) 40%, var(--s-track) 80%); background-size: 200% 100%; animation: s-shimmer 1.3s linear infinite; }
.s-progress-top { position: absolute; left: 20px; right: 20px; top: -9px; height: 3px; border-radius: 2px; overflow: hidden; background: var(--s-accent-soft); }
.s-progress-top::after { content: ""; display: block; height: 100%; background: var(--s-accent); animation: s-indeterminate 1s ease-in-out infinite; }
/* "thread" loader used inside the login button (3 woven lines) */
.s-thread-loader path { stroke-dasharray: 6 6; animation: s-flow .9s linear infinite; }
.s-thread-loader path:nth-child(2) { animation-delay: -.3s; }
.s-thread-loader path:nth-child(3) { animation-delay: -.6s; }

/* ---------- Attendance grid (HRM davomat) -------------------------------- */
.s-att-table { border-collapse: separate; border-spacing: 0; font-size: calc(12.5px * var(--s-fz, 1)); font-variant-numeric: tabular-nums; }
.s-att-table th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--s-solid); text-align: left; white-space: nowrap; }
.s-att { display: block; width: 26px; height: 28px; margin: 0 auto; border: 0; border-radius: var(--s-r-xs); font: inherit; font-size: calc(11px * var(--s-fz, 1)); font-weight: 800; }
.s-att--K { background: var(--s-ok-bg); color: var(--s-ok); }       /* Keldi */
.s-att--L { background: var(--s-warn-bg); color: var(--s-warn); }   /* Kechikdi */
.s-att--X { background: var(--s-bad-bg); color: var(--s-bad); }     /* Kelmadi */
.s-att--T { background: var(--s-neu-bg); color: var(--s-neu); }     /* Ta'til */
.s-att--S { background: var(--s-accent-soft); color: var(--s-accent-ink); } /* Sababli */
.s-att--D { background: transparent; border: 1px dashed var(--s-field-line); color: var(--s-text-3); } /* Dam olish */
.s-att--future { background: transparent; border: 1px dashed var(--s-line); }
.s-att-today { background: var(--s-accent-soft); }

/* ---------- Motion -------------------------------------------------------- */
@keyframes s-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes s-pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@keyframes s-sb-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
@keyframes s-sb-fly { from { opacity: 0; transform: translateX(-8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes s-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes s-indeterminate { 0% { transform: translateX(-100%) scaleX(.3); } 50% { transform: translateX(40%) scaleX(.6); } 100% { transform: translateX(100%) scaleX(.3); } }
@keyframes s-grow-x { from { width: 0; } }
@keyframes s-toast-in { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes s-flow { to { stroke-dashoffset: -24; } }
@keyframes s-shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); } }
@keyframes s-leave { to { opacity: 0; transform: scale(1.04) translateY(-6px); filter: blur(4px); } }

/* ---------- Responsive + accessibility ------------------------------------ */
@media (max-width: 720px) {
  .s-sidebar, .s-form-nav { position: static; width: 100%; max-height: none; }
  .s-search-btn { min-width: 0; flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .s-app *, .s-app *::before, .s-app *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Theme toggle icons ------------------------------------------- */
.s-ico-sun { display: none; }
[data-theme="dark"] .s-ico-sun { display: inline; }
[data-theme="dark"] .s-ico-moon { display: none; }

/* ---------- Compatibility: kartik Select2 / DatePicker inside v2 pages ------
   Most samo_demo forms use kartik\select2\Select2 and kartik date pickers.
   These rules make them match .s-select / .s-input without touching vendor CSS. */
.s-app .select2-container .select2-selection--single,
.s-app .select2-container .select2-selection--multiple {
  min-height: var(--s-h-input); border-radius: var(--s-r-md) !important;
  border: 1px solid var(--s-field-line) !important; background: var(--s-field) !important;
  display: flex; align-items: center; font-weight: 600;
}
.s-app .select2-container .select2-selection__rendered { color: var(--s-ink) !important; line-height: 1.3 !important; padding-left: 12px !important; }
.s-app .select2-container .select2-selection__placeholder { color: var(--s-text-3) !important; }
.s-app .select2-container .select2-selection__arrow { height: 100% !important; }
.s-app .select2-container--focus .select2-selection, .s-app .select2-container--open .select2-selection { border-color: var(--s-accent) !important; box-shadow: var(--s-focus-ring); }
.select2-dropdown { border-color: var(--s-field-line) !important; border-radius: var(--s-r-md) !important; background: var(--s-solid) !important; color: var(--s-ink); overflow: hidden; box-shadow: var(--s-shadow-pop); }
.select2-results__option--highlighted[aria-selected], .select2-results__option--highlighted { background: var(--s-accent-soft) !important; color: var(--s-accent-ink) !important; }
.s-app .krajee-datepicker, .s-app .kv-date-picker + input, .s-app .input-group.date .form-control { height: var(--s-h-input); border-radius: var(--s-r-md); border-color: var(--s-field-line); background: var(--s-field); color: var(--s-ink); }
.s-app .has-error .select2-selection { border-color: var(--s-error) !important; }
.s-app .help-block-error, .s-app .has-error .help-block { color: var(--s-error); font-size: calc(12px * var(--s-fz, 1)); font-weight: 700; margin: 0; }

/* ---------- samo_demo additions (Lead) ------------------------------------ */
/* ActiveForm always prints the error/hint span: no gap when it is empty */
.s-error-text:empty, .s-help:empty { display: none; }
/* V2::seg with links marks the current item with aria-current */
.s-seg__btn[aria-current="page"], .s-seg__btn[aria-current="true"] { background: var(--s-primary); color: var(--s-primary-ink); }
/* quick menu: no "click the star" hint line, the group title stays and pins appear when added */
[data-s-pins] > .s-help { display: none; }
[data-s-pins-title]:has(+ [data-s-pins]:not(:has(> :not(.s-help)))) { display: none; }

/* ---- flush shell: sidebar and top bar sit on the window edges (no outer padding, no rounded outer corners) ---- */
.s-app { padding: 0; gap: 0; }
.s-sidebar { top: 0; max-height: 100vh; border-radius: 0; border-width: 0 1px 0 0; border-color: var(--s-line); box-shadow: none; background: var(--s-solid); }
@media (min-width: 720px) { .s-sidebar { height: 100vh; } }
.s-main { gap: 8px; }
.s-main > .s-topbar { position: sticky; top: 0; z-index: 9; border-radius: 0; border-width: 0 0 1px 0; border-color: var(--s-line); box-shadow: none; background: var(--s-solid); padding: 8px 12px 8px 16px; }
.s-main > :not(.s-topbar):not(#loading):not(.s-modal):not(script) { margin-inline: 8px; }
.s-main > #s-content { margin-bottom: 8px; }
@media (max-width: 720px) { .s-sidebar { height: auto; border-width: 0 0 1px 0; } }

/* ---- the Samo logo: real artwork (mark = yellow, wordmark = mask so it follows the theme text colour) ---- */
.s-sb-brand { gap: 12px; }
.s-sb-logo { width: clamp(38px, 5vh, 46px); height: auto; border-radius: 0; background: none; display: block; flex: none; }
.s-sb-logo img { width: 100%; height: auto; display: block; }
.s-sb-word { display: block; flex: none; height: 15px; width: calc(15px * 254 / 55); background: var(--s-ink); font-size: 0;
  -webkit-mask: url(../../img/v2/samo-word.png) center / contain no-repeat; mask: url(../../img/v2/samo-word.png) center / contain no-repeat; }
.s-quick:not(:has(.s-quick__chip)) { display: none; }

/* ---- shell polish: calm scrolling, roomy logo, one-line top bar ---- */
html { scroll-padding-top: 72px; }
@media (min-width: 720px) { .s-sidebar { height: 100vh; height: 100dvh; max-height: 100dvh; overflow: hidden; } }
/* phone: the sidebar is only its top row (burger + logo) until the burger opens it; the content follows right under it */
@media (max-width: 719px) { .s-sidebar { height: auto; } }
.s-sb-scroll { overscroll-behavior: contain; scrollbar-gutter: stable; }
.s-sb-top { padding: 14px 14px 10px; gap: 12px; min-height: 68px; }
.s-sb-brand { flex: 1 1 auto; justify-content: flex-start; gap: 12px; }
.s-sb-logo { width: 42px; }
.s-sb-word { height: 14px; width: calc(14px * 254 / 55); }
.s-sb-tag { margin-left: auto; }
.s-sidebar.is-collapsed .s-sb-top { padding: 14px 8px 8px; gap: 14px; }
.s-sidebar.is-collapsed .s-sb-brand { justify-content: center; flex: none; }
.s-sidebar.is-collapsed .s-sb-logo { width: 38px; }

.s-main > .s-topbar { flex-wrap: nowrap; gap: 8px; min-height: 60px; padding: 8px 12px 8px 18px; transition: box-shadow .2s; }
.s-main > .s-topbar.is-stuck { box-shadow: 0 10px 24px -18px rgba(39, 48, 74, .45); }
.s-topbar .s-crumbs { flex: 1 1 80px; flex-wrap: nowrap; overflow: hidden; white-space: nowrap; min-width: 0; }
.s-topbar .s-crumbs li { min-width: 0; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; }
.s-topbar .s-crumbs li:last-child { flex: 0 1 auto; }
.s-topbar .s-search-btn { flex: 0 1 230px; min-width: 0; height: 40px; }
.s-topbar .s-icon-btn { width: 40px; height: 40px; flex: none; }
.s-topbar .s-chip, .s-topbar .s-lang, .s-topbar .notifications-menu { flex: none; }
@media (max-width: 1320px) {
  .s-topbar .s-search-btn { flex: none; width: 40px; padding: 0; justify-content: center; }
  .s-topbar .s-search-btn > span { display: none; }
}
@media (max-width: 1120px) {
  .s-topbar .dollar { display: none; }
  .s-main > .s-topbar { padding-left: 12px; }
}
@media (max-width: 720px) {
  .s-main > .s-topbar { flex-wrap: wrap; }
}

/* ---- fit, no scrolls: tables use the width they have; one scroll container at most; no sideways page scroll ---- */
html { overflow-x: clip; }
.s-table th { padding: 10px 8px; white-space: normal; line-height: 1.25; letter-spacing: .04em; vertical-align: bottom; }
.s-table td { padding: 4px 8px; }
.s-table th:first-child, .s-table td:first-child { padding-left: 12px; }
.s-table th:last-child, .s-table td:last-child { padding-right: 12px; }
.s-app table td, .s-app table th { overflow-wrap: break-word; word-break: normal; hyphens: none; }
.s-table-wrap .table-responsive, .s-table-wrap .kv-grid-container { overflow: visible; max-width: none; }
.s-app .kv-grid-table > thead > tr.filters > td { padding: 4px 6px; }
.s-app .kv-grid-table .filters input, .s-app .kv-grid-table .filters select, .s-app .kv-grid-table .filters .select2-container { min-width: 0; width: 100% !important; max-width: 100%; }
.s-app .kv-grid-table td img { max-width: 44px; height: auto; }

/* ---------- Colour layer ("Obsidian Kinetic"): flat canvas, amber only on actions ---- */
/* dark canvas: faint warm glow from the top-left corner, as in the reference */
[data-theme="dark"] .s-app { background: radial-gradient(760px 460px at 0 0, rgba(255, 94, 0, .10), transparent 66%), var(--s-bg); background-attachment: fixed; }
/* main actions carry the amber gradient */
.s-btn--primary, .s-app .btn-primary, #s-content .btn-primary, #s-content .btn-success,
.s-filter-chip[aria-pressed="true"], .s-pager__btn[aria-current="page"], .s-quick__chip.is-current,
.s-seg__btn[aria-pressed="true"], .s-seg__btn[aria-current="page"], .s-seg__btn[aria-current="true"] { background-image: var(--s-primary-grad); border-color: transparent; }
/* active module in the (always dark) side bar: quiet highlight with an amber bar, not a solid block */
.s-sb-item.is-active { background: var(--s-soft); color: #FFFFFF !important; box-shadow: inset 3px 0 0 var(--s-accent); }
.s-sb-item.is-active .s-sb-count { background: rgba(255, 255, 255, .12); color: inherit; }
/* KPI tiles: each one its own soft colour */
.s-kpis > .s-kpi:nth-child(4n+1) { background: linear-gradient(155deg, var(--s-accent-soft), var(--s-panel) 70%); }
.s-kpis > .s-kpi:nth-child(4n+2) { background: linear-gradient(155deg, var(--s-ok-bg), var(--s-panel) 70%); }
.s-kpis > .s-kpi:nth-child(4n+3) { background: linear-gradient(155deg, var(--s-warn-bg), var(--s-panel) 70%); }
.s-kpis > .s-kpi:nth-child(4n+4) { background: linear-gradient(155deg, var(--s-neu-bg), var(--s-panel) 70%); }
/* long tables: faint zebra, clear hover */
.s-table tbody tr:nth-child(even) > td { background-color: color-mix(in srgb, var(--s-th) 70%, transparent); }
.s-table tbody tr:hover > td { background-color: var(--s-hover); }

/* ---------- Forms: the grid must fill the form (it was shrinking to one narrow column) ---------- */
.s-form:not(.s-form--filter) { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
.s-form > .s-form-grid { width: 100%; min-width: 0; }
.s-form-grid > .s-field { min-width: 0; }
/* old markup wraps Yii's own .s-field inside our .s-field: the inner one must not add a second gap */
.s-form-grid > .s-field > .s-field { gap: 7px; }

/* ---- Rang mavzusi panel (palette picker, opened from the user menu; palettes live in palettes.css) ---- */
.s-pal, .s-pal button { font-family: var(--s-font); }
.s-pal { position: fixed; inset: 0; z-index: 1200; display: flex; justify-content: flex-end; align-items: flex-start; padding: 64px 16px 16px; }
.s-pal__box { width: 360px; max-width: 100%; max-height: calc(100vh - 80px); overflow-y: auto; padding: 14px; border-radius: var(--s-r-xl); background: var(--s-solid); color: var(--s-ink); border: 1px solid var(--s-panel-line); box-shadow: var(--s-shadow-pop); animation: s-pop .18s var(--s-ease) both; }
.s-pal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: var(--s-fs-h3); }
.s-pal__x { width: 32px; height: 32px; border-radius: var(--s-r-sm); border: 1px solid var(--s-line); background: var(--s-soft); color: var(--s-ink); font-size: calc(20px * var(--s-fz, 1)); line-height: 1; cursor: pointer; }
.s-pal__mode { display: flex; gap: 4px; padding: 3px; margin-bottom: 12px; border-radius: var(--s-r-md); background: var(--s-soft); border: 1px solid var(--s-line); }
.s-pal__mode button { flex: 1; height: 34px; border: 0; border-radius: var(--s-r-sm); background: transparent; color: var(--s-text-2); font: inherit; font-weight: 700; cursor: pointer; }
.s-pal__mode button[aria-pressed="true"] { background: var(--s-primary); color: var(--s-primary-ink); }
.s-pal__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.s-pal__card { position: relative; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-height: 74px; padding: 10px 12px; border-radius: var(--s-r-md); border: 2px solid var(--s-line); background: var(--s-panel); color: var(--s-ink); font: inherit; text-align: left; cursor: pointer; }
.s-pal__card:hover { border-color: var(--s-field-line); }
.s-pal__card[aria-checked="true"] { border-color: var(--s-accent); background: var(--s-accent-soft); }
.s-pal__dots { display: flex; }
.s-pal__dots i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--s-panel); box-shadow: 0 0 0 1px var(--s-line); margin-right: -6px; }
.s-pal__name { font-size: var(--s-fs-sm); font-weight: 800; line-height: 1.2; }
.s-pal__check { position: absolute; top: 8px; right: 8px; color: var(--s-accent-ink); opacity: 0; }
.s-pal__card[aria-checked="true"] .s-pal__check { opacity: 1; }
.s-pal__card:focus-visible, .s-pal__mode button:focus-visible, .s-pal__x:focus-visible { outline: none; box-shadow: var(--s-focus-ring); }
@media (max-width: 520px) { .s-pal { padding: 56px 10px 10px; justify-content: center; } .s-pal__box { width: 100%; } }

/* ui-sweep: bootstrap .row (-15px side margins) directly in the page wrapper (no padded parent) pushed the document 7px sideways
   (scrollWidth 1447 > 1440) on create forms / grids. Rows get zero side margins; a row nested in a .col-* keeps the gutter compensation. */
.s-main .row { margin-left: 0; margin-right: 0; }
.s-main [class*="col-"] .row { margin-left: -15px; margin-right: -15px; }
.s-pal__sec { margin: 14px 0 8px; font-size: var(--s-fs-sm); font-weight: 800; color: var(--s-text-2); }
.s-pal__fonts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.s-pal__font { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; border-radius: var(--s-r-md); border: 2px solid var(--s-line); background: var(--s-panel); color: var(--s-ink); font: inherit; text-align: left; cursor: pointer; }
.s-pal__font:hover { border-color: var(--s-field-line); }
.s-pal__font[aria-checked="true"] { border-color: var(--s-accent); background: var(--s-accent-soft); }
.s-pal__fsample { font-size: calc(20px * var(--s-fz, 1)); font-weight: 700; line-height: 1; }
.s-pal__font:focus-visible { outline: none; box-shadow: var(--s-focus-ring); }

/* Per-user text size: scales text only (layout stays put). Hard-coded font sizes use var(--s-fz) too. */
html[data-fsize="s"] { --s-fz: .92; }
html[data-fsize="l"] { --s-fz: 1.1; }
html[data-fsize="xl"] { --s-fz: 1.22; }
html[data-fsize] {
  --s-fs-xs: calc(11.5px * var(--s-fz)); --s-fs-sm: calc(12.5px * var(--s-fz)); --s-fs-base: calc(14px * var(--s-fz));
  --s-fs-md: calc(15px * var(--s-fz)); --s-fs-h3: calc(16px * var(--s-fz)); --s-fs-h2: calc(17px * var(--s-fz));
  --s-fs-h1: calc(28px * var(--s-fz)); --s-fs-kpi: calc(30px * var(--s-fz));
}
/* weight (body text only; headings keep their weight) */
html[data-fweight="light"] .s-app, html[data-fweight="light"] .s-app :where(td, p, li, label, .form-control, .s-sb-link, .s-sb-node) { font-weight: 400 !important; }
html[data-fweight="bold"] .s-app, html[data-fweight="bold"] .s-app :where(td, p, li, label, .form-control, .s-sb-link, .s-sb-node) { font-weight: 700 !important; }
.s-pal__seg { margin-bottom: 0; }
.s-pal__seg + .s-pal__sec { margin-top: 14px; }
