/* VERA Admin — shell + base classes. Tokens live in tokens.css; new components in components.css. */

* { box-sizing: border-box; }
/* Honor the hidden attribute even when a class sets display (Tailwind's preflight used to do this). */
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.5;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(30, 90, 255, 0.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(30, 90, 255, 0.35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
.ico { flex: none; display: inline-block; vertical-align: middle; }

/* ── shell ─────────────────────────────────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #06122a 0%, var(--surface) 100%);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
}
.sidebar-brand {
  display: flex; gap: var(--s3); align-items: center;
  padding: 18px var(--s4); border-bottom: 1px solid var(--border);
  min-height: var(--top-h);
}
.brand-mark {
  width: 38px; height: 38px; border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 6px 18px rgba(30, 90, 255, 0.35);
  display: grid; place-items: center; font-weight: 800; font-size: 18px;
}
.brand-name { font-weight: 800; letter-spacing: 0.06em; }
.brand-sub { font-size: 11px; color: var(--text-2); }
.sidebar-nav { flex: 1; overflow: auto; padding: var(--s3) 10px var(--s5); }
.nav-group { margin-bottom: var(--s3); }
.nav-group-label {
  width: 100%; display: flex; align-items: center; gap: 6px;
  background: none; border: 0; cursor: pointer; text-align: inherit;
  font-size: 11px; color: var(--text-muted); padding: 6px 12px; font-weight: 700;
  letter-spacing: 0.04em; border-radius: var(--r-sm);
}
.nav-group-label:hover { color: var(--text-2); }
.nav-group-label .ico { margin-inline-start: auto; transition: transform var(--ease); }
.nav-group.closed .nav-group-label .ico { transform: rotate(90deg); }
.nav-group.closed .nav-group-items { display: none; }
.nav-group-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-full);
  background: var(--warning-soft); color: var(--warning); font-size: 10px; font-weight: 800;
  display: none; place-items: center;
}
.nav-group.closed .nav-group-count:not(:empty) { display: inline-grid; }
.nav-link {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--r-md); color: var(--text-2);
  margin-bottom: 2px; transition: var(--ease); font-size: var(--fs-sm); font-weight: 500;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.nav-link.active {
  background: var(--primary-soft); color: #fff; font-weight: 700;
}
.nav-link.active::before {
  content: ""; position: absolute; inset-inline-start: -10px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--primary-light);
}
.nav-link.active .nav-ico { color: var(--primary-light); }
.nav-ico { width: 18px; display: inline-grid; place-items: center; opacity: 0.9; }
.nav-count {
  margin-inline-start: auto; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--r-full); background: var(--warning); color: #1a1000;
  font-size: 11px; font-weight: 800; display: inline-grid; place-items: center;
}
.sidebar-foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  padding: var(--s3); border-top: 1px solid var(--border);
}
.sidebar-scrim { display: none; }

/* mini sidebar (icons only, desktop) */
@media (min-width: 961px) {
.app-shell.mini { --sidebar-w: 76px; }
.app-shell.mini .brand-text, .app-shell.mini .nav-label, .app-shell.mini .nav-group-label { display: none; }
.app-shell.mini .sidebar-brand { justify-content: center; padding-inline: 0; }
.app-shell.mini .nav-link { justify-content: center; padding: 11px 0; }
.app-shell.mini .nav-group { margin-bottom: var(--s2); padding-bottom: var(--s2); border-bottom: 1px solid var(--border); }
.app-shell.mini .nav-group.closed .nav-group-items { display: block; }
.app-shell.mini .nav-count {
  position: absolute; top: 4px; inset-inline-end: 8px; min-width: 16px; height: 16px; font-size: 9px; padding: 0 4px;
}
.app-shell.mini .sidebar-foot { flex-direction: column; }
.app-shell.mini .realtime-pill { padding: 8px; }
.app-shell.mini #sidebar-mini .ico { transform: scaleX(-1); }
}
.realtime-pill, .status-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-xs); color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-full); padding: 6px 12px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #64748b; }
.dot.live { background: var(--success); box-shadow: 0 0 0 3px rgba(0, 232, 92, 0.18); }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topnav {
  height: var(--top-h); display: flex; align-items: center; gap: var(--s3);
  padding: 0 var(--s5); border-bottom: 1px solid var(--border);
  background: rgba(0, 8, 20, 0.78); backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 20;
}
.top-search { flex: 1; max-width: 480px; position: relative; }
.top-search .input { width: 100%; padding-inline-start: 40px; }
.top-search .ico { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.top-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.admin-chip {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: none; border: 1px solid transparent; border-radius: var(--r-md); padding: 4px 8px 4px 4px;
  color: var(--text-2); text-align: start;
}
.admin-chip:hover { border-color: var(--border); background: rgba(255, 255, 255, 0.03); }
.admin-meta { display: grid; line-height: 1.3; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); white-space: nowrap; }
.crumbs .ico { color: var(--text-muted); }
.menu-anchor { position: relative; }
.menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 60; min-width: 260px;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--r-md);
  box-shadow: var(--shadow-2); padding: 6px; animation: pop-in 0.14s ease;
}
.menu-head { display: grid; gap: 4px; padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu-head .badge { justify-self: start; }
.menu-item {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm);
  background: none; border: 0; cursor: pointer; color: var(--text); font-size: var(--fs-sm); text-align: start;
}
.menu-item:hover { background: rgba(255, 255, 255, 0.05); }
.menu-item.danger { color: #fca5a5; }
.menu-item .nav-count { margin-inline-start: auto; }
.menu-empty { display: flex; align-items: center; gap: 8px; padding: 14px 12px; color: var(--text-2); font-size: var(--fs-sm); }
.menu-empty .ico { color: var(--success); }
.bell-dot {
  position: absolute; top: -4px; inset-inline-end: -4px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: var(--r-full); background: var(--warning); color: #1a1000; font-size: 10px; font-weight: 800;
  display: grid; place-items: center; border: 2px solid var(--bg);
}
#notif-bell { position: relative; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: grid; place-items: center; font-weight: 800;
}
.admin-name { font-size: var(--fs-sm); font-weight: 700; }
.admin-role { font-size: 11px; color: var(--text-2); }

.content { padding: var(--s5); flex: 1; width: 100%; max-width: 1480px; margin: 0 auto; }
.page-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: var(--s4); margin-bottom: var(--s5); flex-wrap: wrap;
}
.page-title { margin: 0; font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.01em; }
.page-subtitle { margin: 6px 0 0; color: var(--text-2); font-size: var(--fs-sm); }
.page-actions { display: flex; gap: var(--s2); flex-wrap: wrap; }

/* ── stat cards ───────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--s3); margin-bottom: var(--s5);
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s4); box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; gap: 6px; transition: var(--ease);
}
a.stat-card:hover, .stat-card[data-href]:hover { border-color: var(--border-strong); transform: translateY(-1px); cursor: pointer; }
.stat-card-top { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); }
.stat-label { color: var(--text-2); font-size: var(--fs-sm); font-weight: 500; }
.stat-icon {
  width: 36px; height: 36px; border-radius: var(--r-md); display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-light); font-size: 16px;
}
.stat-value { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.stat-hint { font-size: var(--fs-xs); color: var(--text-muted); }
.tone-blue .stat-icon, .tone-purple .stat-icon { background: var(--primary-soft); color: var(--primary-light); }
.tone-green .stat-icon { background: var(--success-soft); color: var(--success); }
.tone-orange .stat-icon { background: var(--warning-soft); color: var(--warning); }
.tone-red .stat-icon { background: var(--danger-soft); color: var(--danger); }
.tone-orange { border-color: rgba(245, 158, 11, 0.35); }

.charts-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s4); margin-bottom: var(--s5); }

/* ── panels (cards) ───────────────────────────────────────────────── */
.panel, .card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s4); box-shadow: var(--shadow-1);
}
.panel-head {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s3);
  margin: calc(var(--s4) * -1) calc(var(--s4) * -1) var(--s4);
  padding: 14px var(--s4); border-bottom: 1px solid var(--border);
}
.panel-head h3 { margin: 0; font-size: var(--fs-md); font-weight: 800; display: flex; align-items: center; gap: 8px; }

/* ── toolbar + inputs ─────────────────────────────────────────────── */
.toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: var(--s4); align-items: center;
}
.input, .select, textarea.input {
  background: var(--field); border: 1px solid var(--border-strong); color: var(--text);
  border-radius: var(--r-md); padding: 0 14px; height: var(--field-h);
  outline: none; min-width: 160px; transition: border-color var(--ease), box-shadow var(--ease);
}
.input::placeholder, textarea.input::placeholder { color: #5f6f8c; }
.input:hover, .select:hover { border-color: #2c4372; }
.input:focus, .select:focus, textarea.input:focus { border-color: var(--primary); box-shadow: var(--ring); }
.input:disabled { opacity: 0.55; cursor: not-allowed; }
select.input, .select {
  appearance: none; -webkit-appearance: none; padding-inline-end: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa6bc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 12px center;
}
textarea.input { width: 100%; height: auto; min-height: 100px; padding: 12px 14px; resize: vertical; line-height: 1.6; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); width: 16px; height: 16px; }
input[type="date"].input, input[type="datetime-local"].input, input[type="time"].input { color-scheme: dark; }

/* ── buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: var(--r-md); height: 40px; padding: 0 16px;
  cursor: pointer; font-weight: 700; font-size: var(--fs-sm); white-space: nowrap;
  transition: var(--ease);
}
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, #3f78ff, var(--primary) 45%, var(--primary-dark));
  color: #fff; box-shadow: 0 6px 18px rgba(30, 90, 255, 0.3);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-3); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--border-strong); }
.btn-ghost:hover:not(:disabled) { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.btn-danger { background: var(--danger-soft); color: #fca5a5; border-color: rgba(239, 68, 68, 0.35); }
.btn-danger:hover:not(:disabled) { background: rgba(239, 68, 68, 0.24); }
.btn-success { background: var(--success-soft); color: #6ff0a4; border-color: rgba(0, 232, 92, 0.35); }
.btn-success:hover:not(:disabled) { background: rgba(0, 232, 92, 0.2); }
.btn-sm { height: 32px; padding: 0 12px; font-size: var(--fs-xs); border-radius: var(--r-sm); }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
  width: 38px; height: 38px; border-radius: var(--r-md); cursor: pointer; transition: var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }

/* ── tables ───────────────────────────────────────────────────────── */
.table-wrap {
  overflow: auto; border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface);
}
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.data-table th, .data-table td {
  padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: right; vertical-align: middle;
}
.data-table th {
  background: #091a36; color: var(--text-2); font-weight: 700; font-size: var(--fs-xs);
  position: sticky; top: 0; z-index: 1; white-space: nowrap;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background var(--ease); }
.data-table tbody tr:hover td { background: rgba(75, 139, 255, 0.04); }

/* ── badges ───────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-full);
  padding: 3px 10px; font-size: 11px; font-weight: 700; white-space: nowrap;
  border: 1px solid transparent;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.9; }
.badge-neutral { background: rgba(148, 163, 184, 0.12); color: #cbd5e1; }
.badge-green { background: var(--success-soft); color: #6ff0a4; border-color: rgba(0, 232, 92, 0.25); }
.badge-red { background: var(--danger-soft); color: #fca5a5; border-color: rgba(239, 68, 68, 0.25); }
.badge-orange { background: var(--warning-soft); color: #fcd34d; border-color: rgba(245, 158, 11, 0.25); }
.badge-blue { background: var(--primary-soft); color: #9cc0ff; border-color: rgba(75, 139, 255, 0.25); }

/* ── empty / loading ──────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 16px; color: var(--text-2);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.empty-icon {
  width: 56px; height: 56px; border-radius: var(--r-lg); display: grid; place-items: center;
  background: var(--surface-2); color: var(--text-muted); margin-bottom: 4px;
}
.empty-title { color: var(--text); font-weight: 700; }
.empty-body { font-size: var(--fs-sm); max-width: 420px; }
.loading-block {
  display: flex; gap: 12px; align-items: center; justify-content: center;
  padding: 60px; color: var(--text-2);
}
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border-strong); border-top-color: var(--primary-light);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── modal ────────────────────────────────────────────────────────── */
.modal-root { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 12px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 4, 12, 0.7); backdrop-filter: blur(4px); animation: fade-in 0.15s ease; }
.modal-panel {
  position: relative; width: min(640px, calc(100vw - 24px));
  max-height: min(88vh, 860px); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 20px; box-shadow: var(--shadow-2); animation: pop-in 0.18s ease;
}
.modal-head, .modal-foot {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s2);
  padding: var(--s4) var(--s5); border-bottom: 1px solid var(--border);
}
.modal-body { padding: var(--s5); overflow: auto; }
.modal-foot { border-bottom: 0; border-top: 1px solid var(--border); justify-content: flex-start; background: rgba(0, 0, 0, 0.12); border-radius: 0 0 20px 20px; }
.modal-head h3 { margin: 0; font-size: var(--fs-lg); font-weight: 800; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }

/* ── toast ────────────────────────────────────────────────────────── */
.toast-host {
  position: fixed; bottom: 20px; left: 20px; z-index: 200;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text);
  padding: 12px 16px; border-radius: var(--r-md); opacity: 0; transform: translateY(8px);
  transition: 0.2s ease; min-width: 260px; max-width: 380px; box-shadow: var(--shadow-2);
  font-size: var(--fs-sm); font-weight: 500;
}
.toast.show { opacity: 1; transform: none; }
.toast-info .ico { color: var(--primary-light); }
.toast-error { border-color: rgba(239, 68, 68, 0.5); }
.toast-error .ico { color: var(--danger); }
.toast-success { border-color: rgba(0, 232, 92, 0.45); }
.toast-success .ico { color: var(--success); }

/* ── misc used by pages ───────────────────────────────────────────── */
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.quick-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 12px; border-radius: var(--r-md); background: var(--surface-2);
  border: 1px solid var(--border); text-align: center; font-weight: 700; transition: var(--ease);
}
.quick-item .ico { color: var(--primary-light); }
.quick-item:hover { border-color: var(--primary); }
.form-grid { display: grid; gap: var(--s4); }
.form-row { display: grid; gap: 6px; }
.form-row label, .form-row > .label { font-size: var(--fs-xs); color: var(--text-2); font-weight: 700; }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.perm-item {
  display: flex; gap: 8px; align-items: center; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); cursor: pointer;
}
.perm-item:has(input:checked) { border-color: rgba(75, 139, 255, 0.5); background: var(--primary-soft); }
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s3);
}
.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s3); display: flex; flex-direction: column; gap: 8px; transition: var(--ease);
}
.product-card:hover { border-color: var(--border-strong); }
.product-card h4 { margin: 0; font-size: var(--fs-md); }
.mobile-only { display: none; }
.text-secondary { color: var(--text-2); }

/* ── login ────────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh; display: grid; place-items: center; padding: var(--s4);
  background:
    radial-gradient(ellipse at 20% 10%, rgba(30, 90, 255, 0.24), transparent 45%),
    radial-gradient(ellipse at 80% 90%, rgba(0, 232, 92, 0.07), transparent 40%),
    var(--bg);
}
.login-card {
  width: min(420px, 100%);
  background: rgba(7, 21, 40, 0.92); border: 1px solid var(--border-strong);
  border-radius: 22px; padding: 32px; box-shadow: var(--shadow-2);
}
.login-card h1 { margin: 0 0 6px; font-size: var(--fs-2xl); font-weight: 800; }
.login-card p { margin: 0 0 var(--s5); color: var(--text-2); font-size: var(--fs-sm); }
.login-card .form-grid { margin-bottom: var(--s5); }
.login-card .input { width: 100%; }
.login-card .btn { width: 100%; height: 48px; font-size: var(--fs-md); }
.login-card .sidebar-brand { min-height: 0; }
.pw-toggle {
  position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: var(--r-sm);
  background: none; color: var(--text-muted); cursor: pointer;
}
.pw-toggle:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.login-error {
  display: flex; align-items: center; gap: 8px; margin: 0 0 var(--s4); padding: 10px 12px;
  border-radius: var(--r-md); background: var(--danger-soft); border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5; font-size: var(--fs-sm);
}
.login-error[hidden] { display: none; }
.login-foot { margin: var(--s4) 0 0 !important; text-align: center; font-size: var(--fs-xs) !important; color: var(--text-muted) !important; }

/* ── responsive ───────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .charts-grid { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset-inline-start: 0; transform: translateX(110%);
    transition: transform 0.2s ease; box-shadow: var(--shadow-2);
  }
  [dir="rtl"] .sidebar { transform: translateX(110%); }
  .sidebar.open { transform: none; }
  .sidebar-scrim.show { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0, 4, 12, 0.6); }
  #sidebar-mini { display: none; }
  .crumbs { display: none; }
  .mobile-only { display: inline-grid; }
  .admin-meta { display: none; }
  .perm-grid { grid-template-columns: 1fr; }
  .content { padding: var(--s4); }
  .topnav { padding: 0 var(--s4); }
  .status-chip { display: none; }
}
@media (max-width: 600px) {
  .page-title { font-size: var(--fs-xl); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .top-search { display: none; }
  .modal-panel { border-radius: 20px 20px 0 0; align-self: end; width: 100vw; max-height: 92vh; }
  .modal-root { padding: 0; }
  .toolbar > .input, .toolbar > select, .toolbar > .select { flex: 1 1 100%; min-width: 0; }
}

/* ── قسم البطولات (vt-tournaments) — legacy tabs, replaced by .tabs in stage 4 ── */
.vt-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: var(--s4) 0 var(--s3); }
.vt-tab {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  border-radius: var(--r-full); padding: 7px 16px; font: inherit; font-size: var(--fs-sm); cursor: pointer;
  transition: var(--ease);
}
.vt-tab:hover { color: var(--text); border-color: var(--border-strong); }
.vt-tab.on { background: var(--primary); border-color: transparent; color: #fff; font-weight: 700; }
.vt-ps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .vt-ps-grid { grid-template-columns: 1fr; } }
.menu-head .ltr { justify-self: start; }
