/* Apple-inspired system surface layer for the web console. */
:root {
  --bg: #f2f2f7;
  --surface: #ffffff;
  --surface-muted: #f8f8fa;
  --text: #1c1c1e;
  --text-soft: #3a3a3c;
  --muted: #6d6d72;
  --line: #d1d1d6;
  --line-strong: #aeaeb2;
  --primary: #0066dd;
  --primary-hover: #0057be;
  --primary-soft: #e5f0ff;
  --success: #248a3d;
  --success-bg: #e4f8e9;
  --warning: #a86100;
  --warning-bg: #fff3d6;
  --danger: #d70015;
  --danger-bg: #ffe5e3;
  --radius-sm: 10px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(28, 28, 30, .04);
  --shadow-md: 0 12px 30px rgba(28, 28, 30, .08);
}
html, body { background: var(--bg); }
button { min-height: 40px; border-radius: 12px; box-shadow: none; }
button:active { transform: scale(.985); }
.primary { background: var(--primary); box-shadow: none; }
.secondary { border-color: #b9d6ff; background: var(--primary-soft); }
.ghost { background: rgba(255,255,255,.72); border-color: var(--line); }
input, select, textarea { min-height: 42px; border-radius: 12px; background: rgba(255,255,255,.9); border-color: var(--line); }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 4px rgba(0,122,255,.14); }
.card, .login-card, .dashboard-panel, .modal-card, .staff-shell .card { border-radius: 16px; box-shadow: var(--shadow-sm); }
.login-shell { background: var(--bg); }
.brand-mark { border-radius: 14px; background: var(--primary); }
.staff-shell .sidebar { background: rgba(248,248,250,.92); border-right-color: var(--line); }
.staff-shell .workspace > header { background: rgba(242,242,247,.86); border-bottom-color: var(--line); backdrop-filter: blur(20px); }
.staff-shell .card { background: rgba(255,255,255,.94); border-color: var(--line); }
.badge { border-radius: 999px !important; }
.product-image-preview { border-radius: 14px; border-color: var(--line); background: var(--surface-muted); }

/* macOS-style sidebar + spacious grouped inspector, keeping existing actions and data. */
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif; -webkit-font-smoothing: antialiased; }
.staff-shell .app { grid-template-columns: 224px minmax(0, 1fr); background: var(--bg); }
.staff-shell .sidebar { background: #ededf2; padding: 0 12px 20px; border-right: 1px solid #d9d9df; }
.staff-shell .logo { padding: 22px 12px; margin-bottom: 4px; }
.staff-shell .logo strong { font-size: 19px; letter-spacing: -.4px; }
.staff-shell .logo img, .brand-panel .brand-mark { border-radius: 50%; background: transparent; object-fit: contain; }
.staff-shell .nav-group { color: #6d6d72; padding-top: 24px; font-size: 11px; font-weight: 600; }
.staff-shell .nav-button { min-height: 42px; border-radius: 9px; color: #3a3a3c; font-weight: 500; }
.staff-shell .nav-button .admin-icon { color: #0066dd; width: 18px; height: 18px; }
.staff-shell .nav-button.active { background: #d9e7fb; color: #004da8; font-weight: 600; }
.staff-shell .workspace > header { height: 64px; min-height: 64px; background: rgba(242,242,247,.92); }
.staff-shell .workspace main { padding: 32px 36px 48px; max-width: 1560px; }
.staff-shell h1 { color: #1c1c1e; letter-spacing: -.8px; font-size: 30px; line-height: 1.25; }
.staff-shell .dashboard-metrics { gap: 18px; margin: 24px 0; }
.staff-shell .dashboard-metric { min-height: 142px; border: none; border-radius: 18px; padding: 22px; background: white; }
.staff-shell .dashboard-metric > span { color: #6d6d72; font-size: 13px; }
.staff-shell .dashboard-metric > strong { color: #1c1c1e; font-size: 32px; letter-spacing: -.8px; }
.staff-shell .dashboard-metric > small { color: #6d6d72; }
.staff-shell .dashboard-panel { border: none; border-radius: 18px; padding: 22px; box-shadow: 0 1px 2px #1c1c1e06; }
.staff-shell .policy-strip { border: 0; background: #e5eefb; border-radius: 12px; color: #244c7b; }
.staff-shell th { background: #f7f7fa; color: #6d6d72; font-size: 12px; padding: 13px 14px; }
.staff-shell td { border-bottom: .5px solid #e5e5ea; padding: 15px 14px; font-size: 13px; }
.staff-shell tr:last-child td { border-bottom: 0; }
.staff-shell .queue-tabs { background: #efeff4; border-radius: 10px; padding: 3px; gap: 3px; width: fit-content; }
.staff-shell .queue-tab { border: none; border-radius: 8px; background: transparent; color: #6d6d72; min-height: 36px; }
.staff-shell .queue-tab[aria-pressed=true] { color: #1c1c1e; background: white; box-shadow: 0 1px 3px #00000014; }
.staff-shell input:not([type=checkbox]):not([type=radio]), .staff-shell textarea, .staff-shell select { background: #f2f2f7; border: 1px solid transparent; padding: 12px; }
.staff-shell input:focus, .staff-shell select:focus, .staff-shell textarea:focus { border-color: #0066dd; outline: 0; }
.modal { backdrop-filter: blur(5px); background: #1c1c1e55; }
.modal-card { border-radius: 22px; border: 1px solid #ffffff99; background: #fafafc; box-shadow: 0 24px 90px #00000028; }
.modal-close { min-width: 36px; min-height: 36px; border-radius: 50%; background: #e5e5ea; color: #6d6d72; }
:focus-visible { outline: 3px solid #0066dd; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media (max-width: 900px) {
  .staff-shell .app { grid-template-columns: minmax(0, 1fr); }
  .staff-shell .workspace main { padding: 20px 16px 32px; }
  .staff-shell .dashboard-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  .staff-shell .dashboard-grid { grid-template-columns: minmax(0,1fr); }
  .staff-shell .sidebar { background: #ededf2; }
}
@media (max-width: 480px) {
  .staff-shell .dashboard-metric { padding: 16px; min-height: 126px; }
  .modal { align-items: flex-end; padding: 0; }
  .modal-card { border-radius: 22px 22px 0 0; max-height: 92dvh; margin: 0; }
}
