/* ==========================================================================
   Design tokens
   --------------------------------------------------------------------------
   Motiv vychází přímo z tématu appky: CS2 float hodnoty (0.00-1.00) mají
   pevně daná barevná pásma podle wear conditionu (Factory New -> Battle-
   -Scarred). Tahle pětice barev je použitá jak ve status odznacích, tak
   v "float gauge" - malém pruhu na kartě buyorderu, který je vizuální
   podpisovou komponentou celého UI (viz .float-gauge níže).
   ========================================================================== */

:root {
  /* Povrchy */
  --bg: #0a0d13;
  --bg-elevated: #0f1420;
  --surface: #141a28;
  --surface-2: #1a2233;
  --surface-hover: #202a3f;
  --border: #232c40;
  --border-strong: #303c56;

  /* Text */
  --text: #edf0f7;
  --text-muted: #97a3bd;
  --text-faint: #5e6a85;

  /* Značkové akcenty */
  --accent: #5b8cff;
  --accent-strong: #4a78e6;
  --accent-soft: rgba(91, 140, 255, 0.14);
  --violet: #a88cff;
  --violet-soft: rgba(168, 140, 255, 0.14);

  /* Wear-zone paleta (float gauge + status odznaky) */
  --wear-fn: #35d68e;
  --wear-mw: #8bd648;
  --wear-ft: #ffc24b;
  --wear-ww: #ff9142;
  --wear-bs: #ff5c5c;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.65);

  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", ui-monospace, Consolas, monospace;

  --sidebar-w: 236px;
  --topbar-h: 68px;
  --transition: 160ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
  :root { --transition: 0ms; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 620px at 88% -8%, rgba(91, 140, 255, 0.14), transparent 60%),
    radial-gradient(900px 520px at -6% 8%, rgba(168, 140, 255, 0.10), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--accent); }
button { font-family: inherit; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ==========================================================================
   Login page
   ========================================================================== */

.login-page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 28px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: linear-gradient(180deg, var(--surface), var(--bg-elevated));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.login-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  box-shadow: 0 10px 24px -8px rgba(91, 140, 255, 0.55);
}

.login-card h1 { font-size: 22px; margin-bottom: 6px; }
.login-card .lede { color: var(--text-muted); font-size: 13.5px; margin-bottom: 26px; }

.steam-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
}
.steam-btn:hover { background: var(--surface-hover); border-color: var(--accent); transform: translateY(-1px); }
.steam-btn svg { flex-shrink: 0; }

.login-fineprint {
  max-width: 440px;
  text-align: center;
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.6;
}
.login-fineprint strong { color: var(--text-muted); }

/* ==========================================================================
   App shell
   ========================================================================== */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: rgba(15, 20, 32, 0.72);
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 22px;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  flex-shrink: 0;
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 14.5px; line-height: 1.2; }
.brand-name span { display: block; font-family: var(--font-body); font-weight: 500; font-size: 10.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 1px; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.nav-item svg { opacity: 0.85; flex-shrink: 0; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.nav-item.active svg { opacity: 1; }
.nav-badge {
  margin-left: auto;
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--text-faint);
}

.sidebar-footer { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.plan-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
}
.plan-pill.plan-FREE { color: var(--text-muted); }
.plan-pill.plan-TRADER { color: var(--accent); border-color: rgba(91,140,255,0.4); background: var(--accent-soft); }
.plan-pill.plan-TRADER_PRO { color: var(--violet); border-color: rgba(168,140,255,0.4); background: var(--violet-soft); }

.ghost-btn {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.ghost-btn:hover { background: var(--surface); color: var(--text); }

/* ==========================================================================
   Main column
   ========================================================================== */

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 13, 19, 0.6);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar-left h1 { font-size: 18px; }
.topbar-left p { font-size: 12px; margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 18px; }

.master-toggle { display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.master-toggle span:first-child { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.master-toggle input { display: none; }
.switch {
  width: 40px; height: 23px; border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  position: relative;
  transition: background var(--transition), border-color var(--transition);
}
.switch::before {
  content: "";
  position: absolute; top: 2px; left: 2px;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--text-muted);
  transition: transform var(--transition), background var(--transition);
}
.master-toggle input:checked + .switch { background: var(--wear-fn); border-color: var(--wear-fn); }
.master-toggle input:checked + .switch::before { transform: translateX(17px); background: #06331f; }

.user-chip { display: flex; align-items: center; gap: 9px; }
.user-chip img { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-2); object-fit: cover; }
.user-chip span { font-size: 12.5px; font-weight: 600; }

.content { flex: 1; padding: 26px 28px 8px; max-width: 1180px; width: 100%; margin: 0 auto; }

.view { display: none; }
.view.active { display: block; animation: fade-in 220ms ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Stat strip
   ========================================================================== */

.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.stat-card .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); font-weight: 600; }
.stat-card .value { font-family: var(--font-display); font-size: 24px; font-weight: 700; margin-top: 6px; }
.stat-card .value small { font-family: var(--font-body); font-size: 13px; color: var(--text-faint); font-weight: 500; }

/* ==========================================================================
   Cards / sections
   ========================================================================== */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 20px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.panel-head h2 { font-size: 15px; }
.panel-head .muted { font-size: 12.5px; }

.section-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); font-weight: 700; margin-bottom: 10px; }

/* ==========================================================================
   Forms
   ========================================================================== */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.field .hint { font-size: 11.5px; color: var(--text-faint); }
.field-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

input[type="text"],
input[type="password"],
input[type="number"] {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: var(--font-body);
  width: 100%;
  transition: border-color var(--transition), background var(--transition);
}
input:focus { border-color: var(--accent); background: var(--surface-2); }
input::placeholder { color: var(--text-faint); }

/* Odstranění šipek (spinner arrows) u number inputů (cena, množství, float) -
   hodnota se má měnit jen ručním přepsáním, ne klikáním na šipky nebo
   scrollováním kolečkem myši (blokace scroll wheel je v app.js). */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

.segmented { display: inline-flex; background: var(--bg-elevated); border: 1px solid var(--border-strong); border-radius: var(--radius-md); padding: 3px; gap: 3px; }
.segmented input { display: none; }
.segmented label {
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.segmented input:checked + label { background: var(--accent); color: #06122b; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), opacity var(--transition);
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-strong)); color: #06122b; box-shadow: 0 8px 20px -8px rgba(91,140,255,0.6); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong); }
.btn-secondary:hover { background: var(--surface-hover); }
.btn-danger { background: rgba(255, 92, 92, 0.12); color: var(--wear-bs); border: 1px solid rgba(255, 92, 92, 0.35); }
.btn-danger:hover { background: rgba(255, 92, 92, 0.2); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 7px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.form-msg { font-size: 12.5px; margin-top: 10px; }
.form-msg.error { color: var(--wear-bs); }
.form-msg.success { color: var(--wear-fn); }

/* ==========================================================================
   API key missing banner (viditelný na kterékoliv záložce, viz index.html)
   ========================================================================== */

.api-key-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(255, 194, 75, 0.1);
  border: 1px solid rgba(255, 194, 75, 0.32);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 12.5px;
  color: #ffd68a;
}
.api-key-banner span { flex: 1; min-width: 200px; }

/* ==========================================================================
   Buyorder cards
   ========================================================================== */

.items-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.items-toolbar-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.items-search-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12.5px;
  width: 200px;
  max-width: 100%;
}
.items-search-input::placeholder { color: var(--text-faint); }
.items-status-filter {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 12.5px;
}

.bulk-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--accent-soft);
  border: 1px solid rgba(91, 140, 255, 0.35);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 14px;
}
.bulk-select-all { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text); cursor: pointer; }
.bulk-select-all input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
.bulk-actions-buttons { display: flex; gap: 8px; flex-wrap: wrap; }

.items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }

.item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: border-color var(--transition), transform var(--transition);
}
.item-card:hover { border-color: var(--border-strong); }

.item-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.item-select { display: flex; align-items: center; flex-shrink: 0; padding-top: 1px; }
.item-select input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
.item-card-head .item-name { flex: 1; }
.item-name { font-weight: 700; font-size: 13.5px; line-height: 1.35; word-break: break-word; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: var(--radius-pill);
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  white-space: nowrap; flex-shrink: 0;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-active { background: rgba(53, 214, 142, 0.14); color: var(--wear-fn); }
.badge-idle { background: rgba(148, 163, 184, 0.14); color: var(--text-muted); }
.badge-error { background: rgba(255, 92, 92, 0.14); color: var(--wear-bs); }
.badge-at-cap { background: rgba(255, 194, 75, 0.14); color: var(--wear-ft); }
.badge-paused-exceeded-max { background: rgba(255, 145, 66, 0.14); color: var(--wear-ww); }
.badge-won { background: var(--violet-soft); color: var(--violet); }

/* --- Float gauge: podpisová komponenta -------------------------------- */
.float-gauge-wrap { margin: 12px 0 10px; }
.float-gauge-label { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-faint); margin-bottom: 5px; font-family: var(--font-mono); }
.float-gauge {
  position: relative;
  height: 8px;
  border-radius: 5px;
  background: linear-gradient(
    to right,
    var(--wear-fn) 0%, var(--wear-fn) 7%,
    var(--wear-mw) 7%, var(--wear-mw) 15%,
    var(--wear-ft) 15%, var(--wear-ft) 38%,
    var(--wear-ww) 38%, var(--wear-ww) 45%,
    var(--wear-bs) 45%, var(--wear-bs) 100%
  );
  opacity: 0.32;
}
.float-gauge.is-restricted { opacity: 1; }
.float-gauge-band {
  position: absolute; top: -3px; bottom: -3px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.45), 0 0 14px rgba(255,255,255,0.35);
  min-width: 3px;
}
.float-gauge-note { font-size: 10.5px; color: var(--text-faint); margin-top: 5px; font-family: var(--font-mono); }

.item-meta { font-size: 12px; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px; margin-bottom: 4px; }
.item-meta .price-row { display: flex; justify-content: space-between; align-items: baseline; }
.item-meta .price-row .price-now { font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: var(--text); }
.item-meta .price-row .price-cap { font-family: var(--font-mono); color: var(--text-faint); font-size: 11.5px; }
.item-meta .error-line { color: var(--wear-bs); }

.competitors-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 11.5px; }
.competitors-table th { text-align: left; color: var(--text-faint); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--border); font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.competitors-table td { padding: 5px 6px; border-bottom: 1px solid var(--border); color: var(--text-muted); font-family: var(--font-mono); }
.competitors-table tr:last-child td { border-bottom: none; }
.competitors-more { font-size: 11px; color: var(--text-faint); margin-top: 5px; }

.item-actions { display: flex; gap: 7px; margin-top: 14px; flex-wrap: wrap; }

.empty-state {
  text-align: center;
  padding: 54px 20px;
  color: var(--text-faint);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}
.empty-state h3 { color: var(--text-muted); font-size: 15px; margin-bottom: 6px; }
.empty-state p { font-size: 12.5px; }
.empty-state .btn { margin-top: 16px; }

/* ==========================================================================
   Activity log
   ========================================================================== */

.log-list { display: flex; flex-direction: column; gap: 2px; max-height: 560px; overflow-y: auto; }
.log-line { display: flex; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.log-line .log-time { font-family: var(--font-mono); color: var(--text-faint); flex-shrink: 0; font-size: 11px; padding-top: 1px; }
.log-line .log-dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.log-line.info .log-dot { background: var(--accent); }
.log-line.warn .log-dot { background: var(--wear-ft); }
.log-line.error .log-dot { background: var(--wear-bs); }
.log-line .log-msg { color: var(--text-muted); word-break: break-word; }
.log-line .log-msg strong { color: var(--text); }
.log-line.error .log-msg { color: #ff9d9d; }
.log-line.warn .log-msg { color: #ffd68a; }

/* ==========================================================================
   Settings - plans
   ========================================================================== */

.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plan-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: var(--bg-elevated);
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
  position: relative;
}
.plan-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.plan-card.selected { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--bg-elevated) 60%); }
.plan-card.selected::after {
  content: "Current plan";
  position: absolute; top: 14px; right: 14px;
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--accent); background: rgba(91,140,255,0.16);
  padding: 3px 8px; border-radius: var(--radius-pill);
}
.plan-card h3 { font-size: 15px; margin-bottom: 3px; }
.plan-card .plan-tagline { font-size: 11.5px; color: var(--text-faint); margin-bottom: 14px; }
.plan-card .plan-price { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.plan-card .plan-price small { font-family: var(--font-body); font-size: 11.5px; color: var(--text-faint); font-weight: 500; }
.plan-card ul { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.plan-card li { font-size: 12px; color: var(--text-muted); display: flex; gap: 7px; align-items: flex-start; }
.plan-card li svg { flex-shrink: 0; margin-top: 2px; color: var(--accent); }
.plan-badge-soon { display: inline-block; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; color: var(--violet); background: var(--violet-soft); padding: 2px 7px; border-radius: var(--radius-pill); margin-left: 6px; }

.account-row { display: flex; align-items: center; gap: 14px; }
.account-row img { width: 52px; height: 52px; border-radius: 14px; background: var(--surface-2); }
.account-row .steamid { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); }

/* ==========================================================================
   Footer: disclaimer + FAQ
   ========================================================================== */

.site-footer {
  max-width: 1180px;
  width: 100%;
  margin: 12px auto 40px;
  padding: 26px 28px 0;
  border-top: 1px solid var(--border);
}
.disclaimer-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 22px;
}
.disclaimer-box strong { color: var(--text); }

.faq { display: flex; flex-direction: column; gap: 8px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px 0;
}
.faq summary {
  cursor: pointer;
  padding: 13px 18px;
  font-weight: 600;
  font-size: 13px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-faint); font-size: 16px; font-weight: 400; transition: transform var(--transition); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-body { padding: 0 18px 16px; color: var(--text-muted); font-size: 12.5px; line-height: 1.65; }
.footer-legal { text-align: center; font-size: 11px; color: var(--text-faint); margin-top: 22px; }

/* ==========================================================================
   Modal (potvrzení smazání)
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.72);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal-dialog {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 380px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: fade-in 160ms ease;
}
.modal-dialog h3 { font-size: 16px; margin-bottom: 8px; }
.modal-dialog p { font-size: 13px; margin-bottom: 18px; }
.modal-checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 20px;
  user-select: none;
}
.modal-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ==========================================================================
   Toast
   ========================================================================== */

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 12px);
  background: var(--surface-2); border: 1px solid var(--border-strong);
  color: var(--text); padding: 12px 18px; border-radius: var(--radius-md);
  font-size: 13px; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity var(--transition), transform var(--transition);
  z-index: 50; max-width: 420px;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: rgba(255,92,92,0.5); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
  .plans-grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .app-shell { flex-direction: column; }
  .sidebar {
    position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto;
    width: 100%; flex-direction: row; align-items: center; padding: 8px 10px;
    border-right: none; border-top: 1px solid var(--border); z-index: 20;
  }
  .brand, .sidebar-footer { display: none; }
  .nav { flex-direction: row; justify-content: space-around; flex: 1; }
  .nav-item { flex-direction: column; gap: 3px; font-size: 10px; padding: 7px 6px; }
  .nav-badge { display: none; }
  .main { padding-bottom: 70px; }
  .content { padding: 18px 16px 8px; }
  .topbar { padding: 0 16px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .items-grid { grid-template-columns: 1fr; }
  .items-toolbar-controls { width: 100%; }
  .items-search-input { flex: 1; width: auto; }
  .bulk-actions-bar { flex-direction: column; align-items: stretch; }
  .bulk-actions-buttons { justify-content: stretch; }
  .bulk-actions-buttons .btn { flex: 1; }
}
