/*!
 * SezCam core UI. Prefix rule: core = .sc-*, modules = .sc_mod_{slug}_*
 * Compact, native-app feel, dark by default, light theme via [data-theme="light"].
 * System fonts only (no external fonts).
 */

/* ---------- Tokens ---------- */
:root {
  --sc-bg: #0d0e12;
  --sc-bg-2: #121319;
  --sc-surface: #171920;
  --sc-surface-2: #1e2029;
  --sc-surface-3: #262935;
  --sc-border: #272a35;
  --sc-border-strong: #343846;
  --sc-text: #e9ebf1;
  --sc-text-2: #b3b8c6;
  --sc-muted: #7d8394;
  --sc-accent: #ff3d6e;
  --sc-accent-2: #ff6a8e;
  --sc-accent-ink: #ffffff;
  --sc-accent-soft: rgba(255, 61, 110, .14);
  --sc-ok: #2fcf8f;
  --sc-ok-soft: rgba(47, 207, 143, .14);
  --sc-warn: #f2a93b;
  --sc-warn-soft: rgba(242, 169, 59, .14);
  --sc-err: #ff5a5a;
  --sc-err-soft: rgba(255, 90, 90, .14);
  --sc-info: #5aa8ff;
  --sc-gold: #f7c544;
  --sc-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --sc-shadow-sm: 0 2px 8px rgba(0, 0, 0, .25);
  --sc-radius: 12px;
  --sc-radius-sm: 8px;
  --sc-radius-lg: 16px;
  --sc-topbar-h: 52px;
  --sc-tabbar-h: 56px;
  --sc-sidebar-w: 216px;
  --sc-sidebar-w-collapsed: 64px;
  --sc-safe-top: env(safe-area-inset-top, 0px);
  --sc-safe-bottom: env(safe-area-inset-bottom, 0px);
  --sc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --sc-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sc-ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --sc-bg: #f4f5f8;
  --sc-bg-2: #eceef3;
  --sc-surface: #ffffff;
  --sc-surface-2: #f5f6f9;
  --sc-surface-3: #eceef3;
  --sc-border: #e3e5eb;
  --sc-border-strong: #d2d5de;
  --sc-text: #161821;
  --sc-text-2: #424756;
  --sc-muted: #7a8090;
  --sc-accent-soft: rgba(255, 61, 110, .1);
  --sc-shadow: 0 10px 30px rgba(20, 22, 30, .12);
  --sc-shadow-sm: 0 2px 8px rgba(20, 22, 30, .08);
  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body.sc-body {
  font-family: var(--sc-font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--sc-text);
  background: var(--sc-bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img, svg, video { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--sc-accent-soft); }

.sc-ico { width: 20px; height: 20px; flex: none; }
.sc-ico-wrap { display: inline-flex; align-items: center; justify-content: center; }

/* ---------- App grid ---------- */
.sc-app {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: var(--sc-sidebar-w) 1fr;
  grid-template-rows: calc(var(--sc-topbar-h) + var(--sc-safe-top)) 1fr;
  grid-template-areas: "top top" "side main";
  background: var(--sc-bg);
}
.sc-app.is-collapsed { grid-template-columns: var(--sc-sidebar-w-collapsed) 1fr; }

/* Topbar */
.sc-topbar {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--sc-safe-top) 12px 0;
  background: var(--sc-bg-2);
  border-bottom: 1px solid var(--sc-border);
  z-index: 30;
  min-width: 0;
}
.sc-brand { display: flex; align-items: center; gap: 8px; font-weight: 750; font-size: 16px; letter-spacing: -.02em; white-space: nowrap; }
.sc-brand .sc-ico { width: 24px; height: 24px; color: var(--sc-accent); }
.sc-brand b { color: var(--sc-accent); font-weight: 750; }
.sc-search {
  flex: 1;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: 999px;
  color: var(--sc-muted);
  transition: border-color .15s;
}
.sc-search:focus-within { border-color: var(--sc-border-strong); }
.sc-search .sc-ico { width: 16px; height: 16px; }
.sc-search input { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; outline: 0; color: var(--sc-text); font-size: 13px; }
.sc-topbar-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.sc-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 34px;
  height: 34px;
  padding: 0 7px;
  border-radius: 10px;
  color: var(--sc-text-2);
  transition: background .15s, color .15s;
}
.sc-iconbtn:hover { background: var(--sc-surface-2); color: var(--sc-text); }
.sc-lang-code { font-size: 11px; font-weight: 700; letter-spacing: .04em; }

.sc-wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px 0 8px;
  border-radius: 999px;
  background: var(--sc-surface-2);
  border: 1px solid var(--sc-border);
  font-weight: 650;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.sc-wallet-chip .sc-ico { width: 17px; height: 17px; color: var(--sc-gold); }

/* Sidebar */
.sc-sidebar {
  grid-area: side;
  display: flex;
  flex-direction: column;
  background: var(--sc-bg-2);
  border-right: 1px solid var(--sc-border);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 8px;
  scrollbar-width: thin;
}
.sc-nav { display: flex; flex-direction: column; gap: 2px; }
.sc-nav-group { padding: 14px 10px 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--sc-muted); white-space: nowrap; }
.sc-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 38px;
  padding: 0 11px;
  border-radius: 10px;
  color: var(--sc-text-2);
  font-weight: 550;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.sc-nav-item:hover { background: var(--sc-surface); color: var(--sc-text); }
.sc-nav-item.is-active { background: var(--sc-accent-soft); color: var(--sc-accent); }
.sc-sidebar-foot { margin-top: auto; padding: 12px 10px 4px; font-size: 11px; color: var(--sc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-app.is-collapsed .sc-nav-label,
.sc-app.is-collapsed .sc-nav-group,
.sc-app.is-collapsed .sc-sidebar-foot { display: none; }
.sc-app.is-collapsed .sc-nav-item { justify-content: center; padding: 0; }

/* Main */
.sc-main {
  grid-area: main;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  min-width: 0;
}
.sc-view { max-width: 1280px; margin: 0 auto; padding: 18px 20px 28px; opacity: 0; transform: translateY(4px); transition: opacity .18s var(--sc-ease), transform .18s var(--sc-ease); }
.sc-view.is-in { opacity: 1; transform: none; }

/* Mobile tab bar */
.sc-tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--sc-tabbar-h) + var(--sc-safe-bottom));
  padding-bottom: var(--sc-safe-bottom);
  background: var(--sc-bg-2);
  background: color-mix(in srgb, var(--sc-bg-2) 92%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--sc-border);
  z-index: 40;
}
.sc-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--sc-muted);
  min-width: 0;
}
.sc-tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.sc-tab .sc-ico { width: 22px; height: 22px; }
.sc-tab.is-active { color: var(--sc-accent); }

/* Auth layout: no chrome navigation */
.sc-app[data-layout="auth"] { grid-template-columns: 1fr; grid-template-areas: "top" "main"; }
.sc-app[data-layout="auth"] .sc-sidebar,
.sc-app[data-layout="auth"] .sc-search,
.sc-app[data-layout="auth"] #sc_core_sidebar_toggle { display: none; }
.sc-app[data-layout="auth"] ~ .sc-tabbar,
.sc-app[data-layout="auth"] .sc-tabbar { display: none !important; }
.sc-app[data-layout="full"] .sc-view { max-width: none; padding: 0; }

/* ---------- Buttons / fields / cards ---------- */
.sc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  font-weight: 650;
  font-size: 14px;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, opacity .15s, transform .1s;
  user-select: none;
}
.sc-btn:active { transform: scale(.98); }
.sc-btn--primary { background: var(--sc-accent); color: var(--sc-accent-ink); }
.sc-btn--primary:hover { background: var(--sc-accent-2); }
.sc-btn--ghost { background: var(--sc-surface-2); border-color: var(--sc-border); color: var(--sc-text); }
.sc-btn--ghost:hover { border-color: var(--sc-border-strong); }
.sc-btn--danger { background: var(--sc-err-soft); color: var(--sc-err); }
.sc-btn--sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.sc-btn--block { width: 100%; }
.sc-btn[disabled] { opacity: .55; pointer-events: none; }
.sc-btn.is-busy { position: relative; color: transparent !important; }
.sc-btn.is-busy::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  animation: sc-spin .7s linear infinite;
}
@keyframes sc-spin { to { transform: rotate(360deg); } }

.sc-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.sc-field label { font-size: 12.5px; font-weight: 600; color: var(--sc-text-2); }
.sc-input-wrap { position: relative; display: flex; align-items: center; }
.sc-input-wrap > .sc-ico-wrap { position: absolute; left: 11px; color: var(--sc-muted); pointer-events: none; }
.sc-input-wrap > .sc-ico-wrap .sc-ico { width: 17px; height: 17px; }
.sc-input, .sc-select, .sc-textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  background: var(--sc-surface-2);
  border: 1px solid var(--sc-border);
  border-radius: 10px;
  color: var(--sc-text);
  outline: none;
  transition: border-color .15s, background .15s;
  font-size: 14px;
}
.sc-textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.sc-input-wrap > .sc-ico-wrap + .sc-input { padding-left: 36px; }
.sc-input:focus, .sc-select:focus, .sc-textarea:focus { border-color: var(--sc-accent); background: var(--sc-surface); }
.sc-input-action { position: absolute; right: 4px; height: 32px; width: 32px; display: inline-flex; align-items: center; justify-content: center; color: var(--sc-muted); border-radius: 8px; }
.sc-input-action:hover { color: var(--sc-text); }
.sc-input-action .sc-ico { width: 18px; height: 18px; }
.sc-field.has-error .sc-input { border-color: var(--sc-err); }
.sc-field-error { font-size: 12px; color: var(--sc-err); min-height: 0; }
.sc-field-hint { font-size: 12px; color: var(--sc-muted); }
.sc-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--sc-text-2); cursor: pointer; user-select: none; }
.sc-check input { width: 16px; height: 16px; accent-color: var(--sc-accent); }

.sc-switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; }
.sc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.sc-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--sc-surface-3); border: 1px solid var(--sc-border-strong); transition: background .15s; }
.sc-switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .18s var(--sc-ease); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.sc-switch input:checked + span { background: var(--sc-accent); border-color: var(--sc-accent); }
.sc-switch input:checked + span::after { transform: translateX(16px); }
.sc-switch input:disabled + span { opacity: .45; }

.sc-card { background: var(--sc-surface); border: 1px solid var(--sc-border); border-radius: var(--sc-radius); }
.sc-card-pad { padding: 16px; }
.sc-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--sc-border); }
.sc-card-head h3 { font-size: 14px; }

.sc-page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.sc-page-head h1 { font-size: 20px; }
.sc-page-head p { color: var(--sc-muted); font-size: 13px; margin-top: 2px; }

.sc-badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 700; background: var(--sc-surface-3); color: var(--sc-text-2); white-space: nowrap; }
.sc-badge--accent { background: var(--sc-accent-soft); color: var(--sc-accent); }
.sc-badge--ok { background: var(--sc-ok-soft); color: var(--sc-ok); }
.sc-badge--warn { background: var(--sc-warn-soft); color: var(--sc-warn); }
.sc-badge--err { background: var(--sc-err-soft); color: var(--sc-err); }
.sc-chip { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--sc-surface-2); border: 1px solid var(--sc-border); font-size: 13px; font-weight: 600; }
.sc-chip.is-active { border-color: var(--sc-accent); color: var(--sc-accent); background: var(--sc-accent-soft); }
.sc-phone { font-family: var(--sc-mono); font-size: 12.5px; color: var(--sc-text-2); letter-spacing: .02em; }
.sc-muted { color: var(--sc-muted); }

.sc-avatar {
  --sc-av-h: 340;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: hsl(var(--sc-av-h) 55% 42%);
  color: #fff;
  font-weight: 700;
  overflow: hidden;
  flex: none;
}
.sc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sc-avatar--sm { width: 30px; height: 30px; font-size: 13px; }
.sc-avatar--md { width: 42px; height: 42px; font-size: 16px; }
.sc-avatar--lg { width: 64px; height: 64px; font-size: 24px; }
.sc-avatar-btn { border-radius: 50%; padding: 2px; border: 1px solid var(--sc-border); }

/* ---------- Menus / sheet ---------- */
.sc-menu-wrap { position: relative; }
.sc-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  padding: 6px;
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-radius);
  box-shadow: var(--sc-shadow);
  opacity: 0;
  transform: translateY(-4px) scale(.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity .14s, transform .14s var(--sc-ease);
  z-index: 60;
}
.sc-menu.is-open { opacity: 1; transform: none; pointer-events: auto; }
.sc-menu--wide { min-width: 260px; }
.sc-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--sc-text-2); font-weight: 550; font-size: 13.5px; text-align: left; }
.sc-menu-item:hover { background: var(--sc-surface-2); color: var(--sc-text); }
.sc-menu-item small { margin-left: auto; color: var(--sc-muted); font-size: 11px; font-weight: 700; }
.sc-menu-item.is-active { color: var(--sc-accent); }
.sc-menu-item--danger { color: var(--sc-err); }
.sc-menu-item .sc-ico { width: 18px; height: 18px; }
.sc-menu-sep { height: 1px; background: var(--sc-border); margin: 6px 2px; }
.sc-menu-head { display: flex; align-items: center; gap: 10px; padding: 8px; }
.sc-menu-head-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sc-menu-head-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-menu-head-text .sc-badge { align-self: flex-start; }
.sc-menu-wallets { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 2px; }
.sc-menu-wallets > div { background: var(--sc-surface-2); border-radius: 9px; padding: 8px 10px; display: flex; flex-direction: column; }
.sc-menu-wallets small { color: var(--sc-muted); font-size: 11px; }
.sc-menu-wallets strong { font-variant-numeric: tabular-nums; }

.sc-sheet { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 90; opacity: 0; transition: opacity .2s; }
.sc-sheet.is-open { opacity: 1; }
.sc-sheet-inner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px calc(14px + var(--sc-safe-bottom));
  background: var(--sc-surface);
  border-radius: 18px 18px 0 0;
  transform: translateY(100%);
  transition: transform .22s var(--sc-ease);
  max-height: 85vh;
  overflow-y: auto;
}
.sc-sheet-inner::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 4px; background: var(--sc-border-strong); margin: 0 auto 8px; }
.sc-sheet.is-open .sc-sheet-inner { transform: none; }
.sc-sheet-lang { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 2px; }

/* ---------- Modal ---------- */
.sc-modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .5); z-index: 100; opacity: 0; transition: opacity .18s; }
.sc-modal.is-open { opacity: 1; }
.sc-modal-box { width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow: auto; background: var(--sc-surface); border: 1px solid var(--sc-border); border-radius: var(--sc-radius-lg); box-shadow: var(--sc-shadow); transform: scale(.97); transition: transform .18s var(--sc-ease); }
.sc-modal.is-open .sc-modal-box { transform: none; }
.sc-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--sc-border); }
.sc-modal-head h3 { font-size: 15px; }
.sc-modal-body { padding: 16px; color: var(--sc-text-2); }
.sc-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--sc-border); }

/* ---------- Toasts / progress ---------- */
.sc-toasts { position: fixed; top: calc(var(--sc-topbar-h) + var(--sc-safe-top) + 10px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 120; pointer-events: none; width: min(92vw, 380px); }
.sc-toast { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--sc-surface); border: 1px solid var(--sc-border); box-shadow: var(--sc-shadow); font-size: 13.5px; font-weight: 550; opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s var(--sc-ease); pointer-events: auto; }
.sc-toast.is-in { opacity: 1; transform: none; }
.sc-toast .sc-ico { width: 18px; height: 18px; }
.sc-toast--success .sc-ico { color: var(--sc-ok); }
.sc-toast--error .sc-ico { color: var(--sc-err); }
.sc-toast--info .sc-ico { color: var(--sc-info); }
.sc-progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--sc-accent); z-index: 130; opacity: 0; }
.sc-progress.is-active { opacity: 1; width: 70%; transition: width 2.5s cubic-bezier(.1, .6, .2, 1); }
.sc-progress.is-done { opacity: 0; width: 100%; transition: width .2s, opacity .3s .15s; }

/* ---------- Mini player (in-app PiP) ---------- */
.sc-mini {
  position: fixed;
  width: 300px;
  aspect-ratio: 16 / 10;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 255, 255, .08);
  z-index: 80;
  touch-action: none;
  opacity: 0;
  transition: opacity .2s, transform .2s var(--sc-ease), top .25s var(--sc-ease), left .25s var(--sc-ease), right .25s var(--sc-ease), bottom .25s var(--sc-ease);
  cursor: grab;
}
.sc-mini.is-open { opacity: 1; }
.sc-mini.is-dragging { transition: none; cursor: grabbing; }
.sc-mini[data-corner="br"] { right: 16px; bottom: 16px; }
.sc-mini[data-corner="bl"] { left: calc(var(--sc-sidebar-w) + 16px); bottom: 16px; }
.sc-mini[data-corner="tr"] { right: 16px; top: calc(var(--sc-topbar-h) + var(--sc-safe-top) + 16px); }
.sc-mini[data-corner="tl"] { left: calc(var(--sc-sidebar-w) + 16px); top: calc(var(--sc-topbar-h) + var(--sc-safe-top) + 16px); }
.sc-app.is-collapsed ~ .sc-mini[data-corner="bl"], .sc-app.is-collapsed ~ .sc-mini[data-corner="tl"] { left: calc(var(--sc-sidebar-w-collapsed) + 16px); }
.sc-mini-body { position: absolute; inset: 0; }
.sc-mini-body > * { width: 100%; height: 100%; }
.sc-mini-body video, .sc-mini-body canvas { width: 100%; height: 100%; object-fit: cover; }
.sc-mini-bar { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 4px; padding: 6px 6px 18px 10px; background: linear-gradient(rgba(0, 0, 0, .65), transparent); color: #fff; opacity: 0; transition: opacity .15s; z-index: 2; }
.sc-mini:hover .sc-mini-bar, .sc-mini:focus-within .sc-mini-bar { opacity: 1; }
.sc-mini-title { flex: 1; font-size: 12px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-mini-bar .sc-iconbtn { color: #fff; min-width: 28px; height: 28px; padding: 0; border-radius: 8px; }
.sc-mini-bar .sc-iconbtn:hover { background: rgba(255, 255, 255, .15); }
.sc-mini-bar .sc-ico { width: 16px; height: 16px; }
.sc-mini-live { position: absolute; left: 8px; bottom: 8px; z-index: 2; }

/* ---------- Empty / message states ---------- */
.sc-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; min-height: 50vh; padding: 30px 16px; }
.sc-empty-ico { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--sc-surface-2); color: var(--sc-muted); margin-bottom: 4px; }
.sc-empty-ico .sc-ico { width: 28px; height: 28px; }
.sc-empty h2 { font-size: 18px; }
.sc-empty p { color: var(--sc-muted); max-width: 360px; margin-bottom: 6px; }

/* ---------- Spinner ---------- */
.sc-spinner { width: 26px; height: 26px; margin: 40px auto; border-radius: 50%; border: 2.5px solid var(--sc-border-strong); border-top-color: var(--sc-accent); animation: sc-spin .7s linear infinite; }

/* ---------- Tables ---------- */
.sc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sc-table th { text-align: left; font-weight: 650; font-size: 11.5px; color: var(--sc-muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--sc-border); white-space: nowrap; background: var(--sc-surface); position: sticky; top: 0; }
.sc-table td { padding: 10px 12px; border-bottom: 1px solid var(--sc-border); vertical-align: middle; }
.sc-table tr:last-child td { border-bottom: 0; }
.sc-table tbody tr:hover td { background: var(--sc-surface-2); }
.sc-num { font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- Utilities ---------- */
.sc-grid { display: grid; gap: 12px; }
.sc-row { display: flex; align-items: center; gap: 10px; }
.sc-spacer { flex: 1; }
.sc-hide-desktop { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .sc-app { grid-template-columns: var(--sc-sidebar-w-collapsed) 1fr; }
  .sc-app .sc-nav-label, .sc-app .sc-nav-group, .sc-app .sc-sidebar-foot { display: none; }
  .sc-app .sc-nav-item { justify-content: center; padding: 0; }
  .sc-mini[data-corner="bl"], .sc-mini[data-corner="tl"] { left: calc(var(--sc-sidebar-w-collapsed) + 16px); }
}
@media (max-width: 760px) {
  .sc-app, .sc-app.is-collapsed { grid-template-columns: 1fr; grid-template-areas: "top" "main"; }
  .sc-sidebar, #sc_core_sidebar_toggle { display: none; }
  .sc-tabbar { display: flex; }
  .sc-app[data-layout="auth"] + .sc-tabbar { display: none; }
  .sc-main { padding-bottom: calc(var(--sc-tabbar-h) + var(--sc-safe-bottom)); }
  .sc-app[data-layout="auth"] .sc-main { padding-bottom: 0; }
  .sc-view { padding: 14px 12px 20px; }
  .sc-search { display: none; }
  .sc-hide-mobile { display: none !important; }
  .sc-hide-desktop { display: initial; }
  .sc-topbar { padding-left: 14px; padding-right: 8px; }
  .sc-mini { width: 190px; }
  .sc-mini-bar { opacity: 1; }
  .sc-mini[data-corner="br"], .sc-mini[data-corner="bl"] { bottom: calc(var(--sc-tabbar-h) + var(--sc-safe-bottom) + 10px); }
  .sc-mini[data-corner="bl"], .sc-mini[data-corner="tl"] { left: 10px; }
  .sc-mini[data-corner="br"], .sc-mini[data-corner="tr"] { right: 10px; }
  .sc-modal { align-items: flex-end; padding: 0; }
  .sc-modal-box { max-width: none; border-radius: 18px 18px 0 0; padding-bottom: var(--sc-safe-bottom); }
}
@media (max-width: 420px) {
  .sc-hide-xs { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
