/* Shcrab Пульт — component styles. Every value comes from tokens.css. */

.sc-stack { display: flex; flex-direction: column; gap: var(--space-2); }
.sc-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
:where(button, input, select, a, [tabindex]):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sc-num { font-variant-numeric: tabular-nums; }

/* AppHeader */
.sc-header { position: relative; padding: var(--space-8) var(--space-4) var(--space-4); overflow: hidden; }
.sc-header--glow::before { content: ""; position: absolute; width: 280px; height: 280px; right: -90px; top: -150px; background: radial-gradient(closest-side, var(--accent-glow), transparent); pointer-events: none; }
.sc-eyebrow { position: relative; font-family: var(--font-text); font-size: 11px; line-height: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 var(--space-2); }
.sc-title { position: relative; font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 30px; letter-spacing: 0.01em; text-transform: uppercase; margin: 0; text-wrap: balance; }
.sc-subtitle { position: relative; font-size: 13px; line-height: 21px; color: var(--muted); margin: var(--space-2) 0 0; }

/* Section label + section title */
.sc-label { font-size: 11px; line-height: 14px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 var(--space-2); padding: 0 var(--space-4); }
.sc-section-title { font-family: var(--font-display); font-size: 18px; line-height: 20px; letter-spacing: 0.02em; text-transform: uppercase; margin: 0 0 var(--space-3); }

/* ListGroup + ListRow */
.sc-list { background: var(--surface); border-radius: var(--radius-md); margin: 0 var(--space-4); overflow: hidden; }
.sc-list-row { display: flex; align-items: center; gap: var(--space-3); min-height: var(--tap-min); padding: 14px var(--space-4); color: inherit; text-decoration: none; background: none; border: 0; width: 100%; text-align: left; font: inherit; cursor: pointer; box-sizing: border-box; }
.sc-list-row + .sc-list-row { box-shadow: inset 0 1px 0 var(--line); }
.sc-list-row:active { background: var(--surface-2); }
.sc-list-row__main { flex: 1; min-width: 0; }
.sc-list-row__title { font-size: 15px; line-height: 23px; font-weight: 400; margin: 0; overflow-wrap: anywhere; }
.sc-list-row__sub { font-size: 13px; line-height: 20px; color: var(--muted); margin: 4px 0 0; }
.sc-list-row__value { font-size: 15px; line-height: 20px; font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sc-list-row__lead { width: 36px; height: 36px; flex: none; border-radius: var(--radius-pill); background: var(--surface-2); color: var(--ink); display: grid; place-items: center; font-size: 12px; font-weight: 500; }
.sc-chevron { width: 8px; height: 8px; flex: none; border-right: 1.5px solid var(--muted); border-top: 1.5px solid var(--muted); transform: rotate(45deg); margin-left: var(--space-1); }

/* StatusBadge */
.sc-badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 10px; border-radius: var(--radius-pill); font-size: 11px; line-height: 14px; font-weight: 500; letter-spacing: 0.02em; white-space: nowrap; }
.sc-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sc-badge--success { background: var(--accent-tint); color: var(--accent-ink); }
.sc-badge--warning { background: var(--warning-tint); color: var(--warning); }
.sc-badge--danger { background: var(--danger-tint); color: var(--danger); }
.sc-badge--neutral { background: var(--neutral-tint); color: var(--muted); }

/* Button */
.sc-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--tap-min); padding: 0 var(--space-6); border-radius: var(--radius-pill); border: 1px solid transparent; font: 400 15px/20px var(--font-text); cursor: pointer; text-decoration: none; box-sizing: border-box; }
.sc-btn--primary { background: var(--accent); color: var(--on-accent); }
.sc-btn--secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.sc-btn--ghost { background: transparent; color: var(--accent-ink); padding: 0 var(--space-3); }
.sc-btn--danger { background: var(--danger); color: var(--on-danger); }
.sc-btn--block { display: flex; width: 100%; }
.sc-btn--sm { min-height: 36px; padding: 0 var(--space-4); font-size: 13px; }
.sc-btn:disabled { opacity: 0.4; cursor: default; }
.sc-btn:active:not(:disabled) { transform: scale(0.98); }

/* TextField */
.sc-field { display: flex; flex-direction: column; gap: 6px; }
.sc-field__label { font-size: 11px; line-height: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.sc-input { min-height: var(--tap-min); padding: 0 var(--space-4); border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); font: 300 15px/24px var(--font-text); box-sizing: border-box; width: 100%; }
.sc-input::placeholder { color: var(--muted); }
.sc-input--search { padding-left: 42px; background-image: radial-gradient(circle at 21px 23px, transparent 5px, var(--muted) 5.5px, var(--muted) 6.5px, transparent 7px); }
.sc-field__hint { font-size: 13px; line-height: 20px; color: var(--muted); }
.sc-field--error .sc-input { border-color: var(--danger); }
.sc-field--error .sc-field__hint { color: var(--danger); }

/* SegmentedControl */
.sc-segmented { display: flex; padding: 3px; gap: 3px; border-radius: var(--radius-sm); background: var(--surface-2); }
.sc-segmented button { flex: 1; min-height: 34px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: 400 13px/18px var(--font-text); cursor: pointer; }
.sc-segmented button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

/* CheckRow */
.sc-check { width: 22px; height: 22px; flex: none; border-radius: 6px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; box-sizing: border-box; }
.sc-check::after { content: ""; width: 10px; height: 5px; border-left: 2px solid var(--on-accent); border-bottom: 2px solid var(--on-accent); transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
[aria-checked="true"] > .sc-check { background: var(--accent); border-color: var(--accent); }
[aria-checked="true"] > .sc-check::after { opacity: 1; }
.sc-list-row[aria-checked="true"] { background: var(--accent-tint); }

/* StatTile */
.sc-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); padding: 0 var(--space-4); }
.sc-stat { background: var(--surface); border-radius: var(--radius-md); padding: var(--space-4); min-width: 0; }
.sc-stat__value { font-family: var(--font-display); font-size: 40px; line-height: 40px; font-variant-numeric: tabular-nums; margin: 0; white-space: nowrap; }
.sc-stat__unit { font-family: var(--font-text); font-size: 13px; color: var(--muted); margin-left: 4px; }
.sc-stat__label { font-size: 13px; line-height: 20px; color: var(--muted); margin: var(--space-2) 0 0; }
.sc-stat--danger .sc-stat__value { color: var(--danger); }
.sc-stat--wide { grid-column: 1 / -1; }

/* ConfirmSheet */
.sc-scrim { position: absolute; inset: 0; background: var(--scrim); display: flex; align-items: flex-end; }
.sc-sheet { width: 100%; background: var(--surface); border-radius: var(--radius-md) var(--radius-md) 0 0; padding: var(--space-3) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom, 0px)); box-sizing: border-box; display: flex; flex-direction: column; gap: var(--space-3); }
.sc-sheet__grip { width: 36px; height: 4px; border-radius: 2px; background: var(--line-strong); align-self: center; }
.sc-sheet__title { font-family: var(--font-display); font-size: 18px; line-height: 20px; text-transform: uppercase; margin: var(--space-2) 0 0; }
.sc-sheet__text { margin: 0; }

/* Toast */
.sc-toast { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-pill); background: var(--ink); color: var(--bg); font-size: 13px; line-height: 20px; font-weight: 400; max-width: 360px; box-sizing: border-box; }
.sc-toast__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

/* Skeleton + EmptyState */
.sc-skel { background: var(--surface-2); border-radius: var(--radius-sm); height: 12px; animation: sc-pulse 1.4s ease-in-out infinite; }
@keyframes sc-pulse { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .sc-skel { animation: none; } .sc-btn:active:not(:disabled) { transform: none; } }
.sc-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-3); padding: var(--space-8) var(--space-6); }
.sc-empty__mark { width: 44px; height: 44px; opacity: 0.35; }
.sc-empty__title { font-family: var(--font-display); font-size: 18px; line-height: 20px; text-transform: uppercase; margin: 0; }
.sc-empty__text { color: var(--muted); font-size: 13px; line-height: 21px; margin: 0; max-width: 260px; }

/* TabBar */
.sc-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); height: var(--tabbar-height); padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--surface); box-shadow: inset 0 1px 0 var(--line); }
.sc-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; background: none; color: var(--muted); font: 400 10px/12px var(--font-text); letter-spacing: 0.02em; cursor: pointer; position: relative; }
.sc-tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sc-tab[aria-current="page"] { color: var(--ink); }
.sc-tab[aria-current="page"] svg { stroke: var(--accent-ink); }
.sc-tab[aria-current="page"]::after { content: ""; position: absolute; bottom: calc(4px + env(safe-area-inset-bottom, 0px)); width: 16px; height: 3px; border-radius: 2px; background: var(--accent); }
.sc-tab__count { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--radius-pill); background: var(--danger); color: var(--on-danger); font-size: 10px; line-height: 16px; font-weight: 500; box-sizing: border-box; }
