/* ══════════════════════════════════════════════════════════════════════════
   Camson Scanner — Design System v4
   Sidebar · Modern SaaS · Professional Dark
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:        #080d18;
  --bg2:       #0d1424;
  --bg3:       #121b2e;
  --bg4:       #182338;

  /* Sidebar */
  --sidebar-w: 220px;
  --sidebar-bg:#0b1221;

  /* Topbar */
  --topbar-h:  58px;

  /* Cards */
  --card:        rgba(255,255,255,0.030);
  --card-hover:  rgba(255,255,255,0.052);
  --card-border: rgba(255,255,255,0.072);
  --border:      rgba(255,255,255,0.072);
  --border2:     rgba(255,255,255,0.130);

  /* Text */
  --text:  #e2e8f0;
  --text2: #64748b;
  --text3: #374151;

  /* Brand — Camson Pink */
  --accent:      #e4007c;
  --accent-dim:  rgba(228,0,124,0.10);
  --accent-glow: rgba(228,0,124,0.25);

  /* Semantic aliases (legacy compat) */
  --blue:        #e4007c;
  --blue-dim:    rgba(228,0,124,0.10);
  --blue-glow:   rgba(228,0,124,0.25);

  /* Status colors */
  --info:        #3b82f6;
  --info-dim:    rgba(59,130,246,0.10);
  --green:       #10b981;
  --green-dim:   rgba(16,185,129,0.10);
  --orange:      #f59e0b;
  --orange-dim:  rgba(245,158,11,0.10);
  --red:         #ef4444;
  --red-dim:     rgba(239,68,68,0.10);
  --purple:      #8b5cf6;
  --purple-dim:  rgba(139,92,246,0.10);
  --cyan:        #06b6d4;
  --cyan-dim:    rgba(6,182,212,0.10);
  --yellow:      #eab308;
  --yellow-dim:  rgba(234,179,8,0.10);

  /* Radius */
  --radius:    10px;
  --radius-sm: 7px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Shadows */
  --shadow:    0 4px 20px rgba(0,0,0,0.45);
  --shadow-lg: 0 12px 44px rgba(0,0,0,0.65);
  --glow-blue: 0 0 24px rgba(228,0,124,0.20);

  /* Typography */
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font-family: var(--font); cursor: pointer; }

/* ── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ══════════════════════════════════════════════════════════════════════════
   LAYOUT — Sidebar + Main area
   ══════════════════════════════════════════════════════════════════════════ */
.layout { display: flex; min-height: 100vh; }

/* ── Sidebar ────────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 100; overflow-y: auto; overflow-x: hidden;
}

.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0; text-decoration: none;
}
.brand-icon {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, #9d0055 0%, #e4007c 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: #fff;
  box-shadow: 0 0 16px rgba(228,0,124,0.40);
}
.brand-icon-logo {
  background: #fff; padding: 4px;
  box-shadow: 0 0 14px rgba(228,0,124,0.35);
}
.brand-logo-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-text  { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.brand-accent { color: var(--accent); }

/* ── Sidebar nav ──────────────────────────────────────────────────────── */
.sidebar-nav {
  flex: 1; padding: 10px 10px;
  display: flex; flex-direction: column; gap: 1px;
  overflow-y: auto;
}

.sidebar-section-label {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text3);
  padding: 10px 10px 4px;
}

.sidebar-link {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: 0.835rem; font-weight: 500; color: var(--text2);
  transition: background 0.14s, color 0.14s;
  border-left: 2px solid transparent;
  text-decoration: none;
}
.sidebar-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.sidebar-link.active {
  color: var(--accent); background: var(--accent-dim);
  border-left-color: var(--accent); font-weight: 600;
}
.sidebar-badge {
  margin-left: auto; font-size: 0.55rem; font-weight: 700;
  background: var(--accent-dim); color: var(--accent);
  border: 1px solid var(--accent-glow); border-radius: 4px;
  padding: 1px 5px; letter-spacing: 0.5px;
}
.sidebar-link i { width: 15px; text-align: center; font-size: 0.78rem; flex-shrink: 0; }

.sidebar-sep { height: 1px; background: var(--border); margin: 6px 10px; }

/* ── Sidebar footer ───────────────────────────────────────────────────── */
.sidebar-footer {
  padding: 10px 10px 14px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-user {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background 0.14s; position: relative;
}
.sidebar-user:hover { background: rgba(255,255,255,0.04); }
.sidebar-user-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #9d0055, #e4007c);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; color: #fff;
}
.sidebar-user-avatar.admin { background: linear-gradient(135deg, #6d28d9, #8b5cf6); }
.sidebar-user-info { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 0.78rem; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-role { font-size: 0.62rem; color: var(--text3); text-transform: capitalize; }
.sidebar-user-chevron { font-size: 0.6rem; color: var(--text3); transition: transform 0.2s; margin-left: auto; }

/* Dropdown positioned above the user footer in sidebar */
#userNavDropdown { position: static; }
#userNavDropdown .dropdown-menu {
  bottom: calc(100% + 6px); top: auto; right: 0; left: 0; min-width: 100%;
}

/* ── Main area ─────────────────────────────────────────────────────────── */
.main-area {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column; flex: 1;
}

/* ── Topbar ────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--topbar-h);
  background: rgba(8,13,24,0.88);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 28px; gap: 12px;
}
/* accent line */
.topbar::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(228,0,124,0.4) 40%, rgba(180,0,100,0.25) 70%, transparent 100%);
}
.topbar-left  { display: flex; align-items: center; gap: 8px; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ── Main wrapper ─────────────────────────────────────────────────────── */
.main-wrapper {
  padding: 34px 40px 80px;
  max-width: 1360px;
  width: 100%;
}

/* ── Page header ──────────────────────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 32px; gap: 16px; flex-wrap: wrap;
}
.page-header-content { display: flex; flex-direction: column; gap: 3px; }
.page-title {
  font-size: 1.6rem; font-weight: 800; letter-spacing: -0.5px; color: var(--text);
}
.page-subtitle { color: var(--text2); font-size: 0.845rem; }

/* ══════════════════════════════════════════════════════════════════════════
   SEARCH (topbar)
   ══════════════════════════════════════════════════════════════════════════ */
.nav-search-wrap { position: relative; flex: 1; max-width: 340px; }
.nav-search-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 13px; border-radius: var(--radius-sm);
  background: var(--bg2); border: 1px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s; cursor: text;
}
.nav-search-bar:focus-within {
  border-color: rgba(228,0,124,0.4);
  box-shadow: 0 0 0 3px rgba(228,0,124,0.07);
}
.nav-search-bar i { color: var(--text3); font-size: 0.78rem; flex-shrink: 0; }
.nav-search-bar input {
  background: none; border: none; outline: none;
  color: var(--text); font-family: var(--font);
  font-size: 0.845rem; flex: 1; min-width: 0;
}
.nav-search-bar input::placeholder { color: var(--text3); }
.nav-search-bar kbd {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 4px; padding: 1px 5px;
  font-size: 0.62rem; color: var(--text3); font-family: var(--font);
  flex-shrink: 0;
}
.nav-search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  z-index: 200; overflow: hidden;
}
.nav-search-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; font-size: 0.82rem;
  color: var(--text2); transition: background 0.14s;
  border-bottom: 1px solid var(--border); text-decoration: none;
}
.nav-search-item:last-child { border-bottom: none; }
.nav-search-item:hover { background: var(--card-hover); color: var(--text); }
.nav-search-name  { font-weight: 600; font-size: 0.845rem; color: var(--text); }
.nav-search-sub   { font-size: 0.74rem; color: var(--text3); margin-top: 1px; }
.nav-search-empty { padding: 14px; font-size: 0.82rem; color: var(--text3); display: flex; align-items: center; gap: 8px; }

/* ── Camera button ────────────────────────────────────────────────────── */
.nav-camera-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: var(--radius-sm);
  background: var(--accent-dim); border: 1px solid var(--accent-glow);
  color: var(--accent); font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: all 0.17s; white-space: nowrap;
  font-family: var(--font);
}
.nav-camera-btn:hover {
  background: rgba(228,0,124,0.18); border-color: rgba(228,0,124,0.5);
  box-shadow: var(--glow-blue); transform: translateY(-1px);
}
.nav-camera-btn i { font-size: 0.82rem; }

/* ══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 0.835rem; font-weight: 600; border: none;
  cursor: pointer; transition: all 0.18s; white-space: nowrap;
  font-family: var(--font); text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, #b5005f 0%, #e4007c 100%);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.10) inset, 0 4px 14px rgba(228,0,124,0.35);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.13) inset, 0 6px 22px rgba(228,0,124,0.50);
}
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: transparent; color: var(--text2);
  border: 1px solid var(--border2);
}
.btn-ghost:hover { color: var(--text); background: var(--card); }
.btn-danger {
  background: var(--red-dim); color: var(--red);
  border: 1px solid rgba(239,68,68,0.25);
}
.btn-danger:hover { background: rgba(239,68,68,0.18); border-color: rgba(239,68,68,0.4); }
.btn-lg  { padding: 10px 20px; font-size: 0.9rem; }
.btn-xl  { padding: 12px 28px; font-size: 0.95rem; border-radius: var(--radius); }
.btn-sm  { padding: 5px 11px; font-size: 0.775rem; }
.btn:disabled { opacity: 0.42; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── Icon buttons ─────────────────────────────────────────────────────── */
.icon-btn {
  width: 30px; height: 30px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--border);
  color: var(--text2); font-size: 0.76rem; cursor: pointer;
  transition: all 0.16s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent-glow); background: var(--accent-dim); }
.icon-btn-danger:hover { color: var(--red); border-color: rgba(239,68,68,0.3); background: var(--red-dim); }

/* ══════════════════════════════════════════════════════════════════════════
   CARDS (generic)
   ══════════════════════════════════════════════════════════════════════════ */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border2); }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.card-title { font-size: 0.88rem; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.card-title i { color: var(--accent); font-size: 0.82rem; }
.card-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 0.88rem;
}
.card-icon-blue   { background: var(--blue-dim);   color: var(--blue); }
.card-icon-orange { background: var(--orange-dim); color: var(--orange); }
.card-icon-purple { background: var(--purple-dim); color: var(--purple); }
.card-icon-green  { background: var(--green-dim);  color: var(--green); }
.card-icon-red    { background: var(--red-dim);    color: var(--red); }
.card-icon-cyan   { background: var(--cyan-dim);   color: var(--cyan); }
.card-icon-yellow { background: var(--yellow-dim); color: var(--yellow); }

/* ══════════════════════════════════════════════════════════════════════════
   STATS GRID
   ══════════════════════════════════════════════════════════════════════════ */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 36px;
}
.stat-card {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 22px; border-radius: var(--radius);
  background: var(--bg2); border: 1px solid var(--border);
  transition: all 0.2s;
}
.stat-card:hover {
  border-color: var(--border2); transform: translateY(-2px); box-shadow: var(--shadow);
}
.stat-icon {
  width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.stat-icon-blue   { background: var(--info-dim);   color: var(--info); }
.stat-icon-green  { background: var(--green-dim);  color: var(--green); }
.stat-icon-purple { background: var(--purple-dim); color: var(--purple); }
.stat-icon-orange { background: var(--orange-dim); color: var(--orange); }
.stat-body { display: flex; flex-direction: column; gap: 2px; }
.stat-value { font-size: 1.7rem; font-weight: 800; letter-spacing: -1.5px; line-height: 1; color: var(--text); }
.stat-label { font-size: 0.73rem; color: var(--text2); font-weight: 500; }

/* ══════════════════════════════════════════════════════════════════════════
   SECTION
   ══════════════════════════════════════════════════════════════════════════ */
.section { margin-bottom: 40px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; gap: 12px;
}
.section-title {
  font-size: 0.9rem; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 9px;
}
.section-title i { color: var(--accent); font-size: 0.8rem; }

/* ══════════════════════════════════════════════════════════════════════════
   PC CARDS GRID
   ══════════════════════════════════════════════════════════════════════════ */
.computers-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.pc-card {
  border-radius: var(--radius); background: var(--bg2);
  border: 1px solid var(--border); overflow: hidden;
  transition: all 0.2s;
}
.pc-card:hover {
  border-color: rgba(228,0,124,0.22);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0,0,0,0.35), var(--glow-blue);
}
.pc-card-header {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 14px 10px;
}
.pc-icon {
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
  background: var(--accent-dim); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
}
.pc-title-block { flex: 1; min-width: 0; }
.pc-hostname { font-weight: 700; font-size: 0.9rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pc-os { font-size: 0.72rem; color: var(--text2); margin-top: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pc-card-actions { display: flex; gap: 4px; flex-shrink: 0; align-items: center; }

.pc-card-body { padding: 0 14px 10px; display: flex; flex-direction: column; gap: 5px; }
.pc-spec { display: flex; align-items: center; gap: 7px; font-size: 0.77rem; color: var(--text2); }
.pc-spec i { color: var(--text3); width: 13px; flex-shrink: 0; font-size: 0.7rem; }
.pc-spec span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pc-card-footer {
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.15);
}
.scan-date { font-size: 0.7rem; color: var(--text3); display: flex; align-items: center; gap: 5px; }

/* ══════════════════════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center; padding: 72px 32px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.empty-icon {
  width: 64px; height: 64px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--text3);
}
.empty-state h3 { font-size: 1rem; font-weight: 700; color: var(--text); }
.empty-state p  { color: var(--text2); max-width: 340px; font-size: 0.845rem; }

/* ══════════════════════════════════════════════════════════════════════════
   SCAN HERO
   ══════════════════════════════════════════════════════════════════════════ */
.scan-hero {
  display: flex; flex-direction: column; align-items: center;
  gap: 20px; padding: 56px 32px; text-align: center;
}
.scan-hero h2 { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.4px; }
.scan-hero p  { color: var(--text2); max-width: 460px; font-size: 0.875rem; }

/* Radar animation */
.scan-radar {
  position: relative; width: 150px; height: 150px;
  display: flex; align-items: center; justify-content: center;
}
.radar-ring {
  position: absolute; border-radius: 50%;
  border: 1.5px solid var(--accent); opacity: 0;
}
.r1 { width: 150px; height: 150px; }
.r2 { width: 100px; height: 100px; }
.r3 { width:  58px; height:  58px; }
.scan-radar.scanning .r1 { animation: radar-pulse 2s ease-out infinite 0s; }
.scan-radar.scanning .r2 { animation: radar-pulse 2s ease-out infinite 0.4s; }
.scan-radar.scanning .r3 { animation: radar-pulse 2s ease-out infinite 0.8s; }
@keyframes radar-pulse {
  0%   { opacity: 0.85; transform: scale(0.5); }
  100% { opacity: 0;    transform: scale(1); }
}
.radar-center {
  width: 60px; height: 60px; border-radius: 50%; z-index: 1;
  background: linear-gradient(135deg, #9d0055, #e4007c);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: #fff;
  box-shadow: 0 0 28px rgba(228,0,124,0.45);
}

/* ══════════════════════════════════════════════════════════════════════════
   SAVE BAR
   ══════════════════════════════════════════════════════════════════════════ */
.save-bar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  padding: 12px 18px; border-radius: var(--radius);
  background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.20);
  margin-bottom: 24px;
}
.save-bar-info    { display: flex; align-items: center; gap: 9px; font-weight: 500; }
.save-bar-actions { display: flex; gap: 8px; }

/* ══════════════════════════════════════════════════════════════════════════
   RESULTS GRID (scan page)
   ══════════════════════════════════════════════════════════════════════════ */
.results-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.result-card {
  border-radius: var(--radius); background: var(--bg2);
  border: 1px solid var(--border); padding: 20px; overflow: hidden;
  transition: border-color 0.2s;
}
.result-card:hover { border-color: var(--border2); }
.result-card.full-width { grid-column: 1 / -1; }

/* ── Info grid ────────────────────────────────────────────────────────── */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.info-item { display: flex; flex-direction: column; gap: 3px; }
.info-item.full { grid-column: 1 / -1; }
.info-label { font-size: 0.67rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.7px; font-weight: 600; }
.info-value { font-size: 0.845rem; font-weight: 500; word-break: break-word; color: var(--text); }

/* ── Drive / Stick / GPU / Net ────────────────────────────────────────── */
.drive-row    { margin-bottom: 16px; }
.drive-header { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; flex-wrap: wrap; }
.drive-letter { font-weight: 600; font-size: 0.875rem; }
.drive-stats-static {
  display: flex; gap: 20px; flex-wrap: wrap;
  font-size: 0.8rem; color: var(--text2); margin-top: 5px; padding: 7px 0;
}
.drive-stats-static strong { color: var(--text); font-weight: 600; }

.sticks-title {
  font-size: 0.67rem; text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--text3); font-weight: 600; margin: 10px 0 7px;
}
.stick-row {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.8rem;
}
.stick-row:last-child { border-bottom: none; }

.ram-stick-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
  margin-bottom: 8px;
}
.ram-stick-card:last-child { margin-bottom: 0; }
.ram-stick-header {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 0; font-size: 0.82rem;
}
.stick-badge {
  background: var(--accent-dim); color: var(--accent);
  padding: 2px 8px; border-radius: 99px; font-size: 0.7rem; font-weight: 600;
}

.gpu-block { padding: 12px 0; border-bottom: 1px solid var(--border); }
.gpu-block:last-child { border-bottom: none; }
.gpu-name { font-weight: 700; font-size: 0.875rem; margin-bottom: 9px; display: flex; align-items: center; gap: 7px; }
.gpu-name i { color: var(--red); }
.gpu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.gpu-item { display: flex; flex-direction: column; gap: 3px; }
.gpu-item .info-label { font-size: 0.65rem; }
.gpu-item span:last-child { font-size: 0.8rem; font-weight: 500; }

.net-card {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px; margin-bottom: 9px; background: rgba(255,255,255,0.015);
  transition: border-color 0.2s;
}
.net-card:last-child { margin-bottom: 0; }
.net-card:hover { border-color: var(--border2); }
.net-card-header { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 10px; }
.net-status-dot     { font-size: 0.48rem; }
.net-status-dot.up  { color: var(--green); }
.net-status-dot.down{ color: var(--text3); }
.net-iface-name     { font-weight: 700; font-size: 0.875rem; flex: 1; }
.net-card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.net-item { display: flex; flex-direction: column; gap: 3px; }
.net-item.full { grid-column: 1 / -1; }
.net-item .view-info-label { font-size: 0.65rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; }
.net-item span:last-child  { font-size: 0.8rem; font-weight: 500; word-break: break-all; }

/* Legacy */
.net-row   { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.net-row:last-child { border-bottom: none; }
.net-status      { margin-top: 2px; font-size: 0.48rem; }
.net-status.up   { color: var(--green); }
.net-status.down { color: var(--text3); }
.net-name        { font-weight: 600; font-size: 0.875rem; margin-bottom: 4px; }
.net-details     { display: flex; gap: 7px; flex-wrap: wrap; }

/* ── Tags ─────────────────────────────────────────────────────────────── */
.tag {
  display: inline-block; padding: 2px 7px;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 5px; font-size: 0.68rem; font-weight: 500; color: var(--text2);
}
.tag-green { background: var(--green-dim); color: var(--green); border-color: rgba(16,185,129,0.28); }
.tag-red   { background: var(--red-dim);   color: var(--red);   border-color: rgba(239,68,68,0.28); }

.mono        { font-family: var(--mono); font-size: 0.8rem; }
.small       { font-size: 0.775rem; }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-muted  { color: var(--text2); }

/* ══════════════════════════════════════════════════════════════════════════
   SEARCH BAR & TABLE
   ══════════════════════════════════════════════════════════════════════════ */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-radius: var(--radius-sm);
  background: var(--bg2); border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.search-bar:focus-within { border-color: rgba(228,0,124,0.38); box-shadow: 0 0 0 3px rgba(228,0,124,0.07); }
.search-bar i { color: var(--text3); font-size: 0.8rem; }
.search-bar input {
  background: none; border: none; outline: none; color: var(--text);
  font-family: var(--font); font-size: 0.845rem; flex: 1;
}
.search-bar input::placeholder { color: var(--text3); }

.table-container {
  border-radius: var(--radius); border: 1px solid var(--border);
  overflow: hidden; background: var(--bg2);
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead { background: rgba(0,0,0,0.22); }
.data-table th {
  padding: 10px 14px; text-align: left;
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.8px;
  font-weight: 700; color: var(--text3);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.data-table td {
  padding: 12px 14px; font-size: 0.835rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle; color: var(--text);
}
.data-table tbody tr { background: transparent; transition: background 0.13s; }
.data-table tbody tr:hover { background: rgba(228,0,124,0.032); }
.data-table tbody tr:last-child td { border-bottom: none; }

.table-pc-name { display: flex; align-items: center; gap: 9px; }
.table-pc-icon {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  background: var(--accent-dim); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 0.82rem;
}
.table-hostname  { font-weight: 700; font-size: 0.875rem; }
.table-id        { font-family: var(--mono); font-size: 0.7rem; color: var(--text3); }
.table-cpu       { font-size: 0.8rem; }
.table-actions   { display: flex; gap: 4px; }

/* ── Responsive column hiding (computers & activity tables) ── */
@media (max-width: 900px) { .col-hide-md { display: none !important; } }
@media (max-width: 640px) { .col-hide-sm { display: none !important; } }

/* ── Sortable column headers ── */
.sortable-th { cursor: pointer; user-select: none; white-space: nowrap; }
.sortable-th:hover { color: var(--accent); }
.sortable-th:hover .sort-icon { opacity: 1; color: var(--accent); }
.sort-icon { margin-left: 4px; opacity: 0.35; font-size: 0.68rem; transition: opacity .15s; }
.sortable-th.sorted .sort-icon { opacity: 1; color: var(--accent); }

/* ── View page — services / software / drive-type rows ── */
.svc-row:hover,
.sw-row:hover { background: var(--card-hover); }
.svc-row td,
.sw-row  td { font-size: 0.82rem; padding: 7px 12px; }
.drive-type { font-size: 0.67rem; font-weight: 600; text-transform: uppercase;
              letter-spacing: 0.4px; }

/* ══════════════════════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius-lg); width: 100%; max-width: 450px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.96) translateY(8px);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal-sm { max-width: 360px; }
.modal-xl { max-width: 680px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 14px; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 0.9rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.modal-close {
  width: 26px; height: 26px; border-radius: 6px;
  background: var(--card); border: 1px solid var(--border);
  color: var(--text2); display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; cursor: pointer; transition: all 0.14s;
}
.modal-close:hover { color: var(--text); background: var(--card-hover); }
.modal-body    { padding: 18px 22px; }
.modal-hint    { color: var(--text2); font-size: 0.835rem; margin-bottom: 16px; }
.modal-footer  {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 14px 22px 18px; border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════════════════════════════════════════
   QR LABEL
   ══════════════════════════════════════════════════════════════════════════ */
.qr-label {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  background: #fff; border-radius: var(--radius); padding: 18px; color: #0d1626;
}
.qr-label-brand { font-family: var(--font); font-weight: 800; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 2px; color: #e4007c; }
.qr-img { width: 190px; height: 190px; image-rendering: pixelated; }
.qr-label-hostname { font-weight: 800; font-size: 0.95rem; color: #0d1626; }
.qr-label-date { font-size: 0.68rem; color: #666; }

.label-format-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 700; color: var(--accent);
  background: var(--accent-dim); border: 1px solid rgba(228,0,124,0.20);
  padding: 4px 11px; border-radius: 99px; margin-bottom: 12px;
}
.label-preview-area { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.label-actual-size-wrap { position: relative; }
.label-actual-size-wrap::before {
  content: '18mm'; position: absolute; top: -16px; left: 50%;
  transform: translateX(-50%); font-size: 0.6rem; color: var(--text3); white-space: nowrap;
}
.label-actual-size-wrap::after {
  content: '18mm'; position: absolute; right: -24px; top: 50%;
  transform: translateY(-50%) rotate(90deg); font-size: 0.6rem; color: var(--text3);
}
.label-ruler-frame { width: 18mm; height: 18mm; border: 1.5px dashed rgba(228,0,124,0.35); border-radius: 1px; overflow: hidden; }
.qr-label-screen {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; background: #fff; border-radius: 9px;
  padding: 14px 18px; color: #0d1626;
  box-shadow: 0 0 0 1px #e0e0e0;
}
.qr-label-screen .qr-label-brand  { font-size: 0.6rem; font-weight: 800; }
.qr-label-screen .qr-img          { width: 150px; height: 150px; }
.qr-label-screen .qr-label-hostname { font-weight: 800; font-size: 0.875rem; }
.qr-label-screen .qr-label-date    { font-size: 0.63rem; color: #666; }
.label-preview-caption { font-size: 0.7rem; color: var(--text3); display: flex; align-items: center; gap: 4px; }

/* ══════════════════════════════════════════════════════════════════════════
   VIEW PAGE
   ══════════════════════════════════════════════════════════════════════════ */

/* ── View page header ───────────────────────────────────────────────────── */
.view-ph-left {
  display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1;
}
.view-ph-back { padding: 6px 10px; flex-shrink: 0; }
.view-ph-titles { min-width: 0; }
.view-ph-titles .page-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.view-ph-actions {
  display: flex; gap: 8px; align-items: center; flex-shrink: 0; flex-wrap: wrap;
}

/* ── Hero card ──────────────────────────────────────────────────────────── */
.view-hero {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px 24px;
  margin-bottom: 16px; position: relative; overflow: hidden;
}
.view-hero::before {
  content: ''; position: absolute; top: -50px; right: -50px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
}
.view-hero-left { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; position: relative; }
.view-hero-icon {
  width: 54px; height: 54px; border-radius: 14px; flex-shrink: 0;
  background: var(--accent-dim); border: 1px solid var(--accent-glow);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--accent);
}
.view-hero-name { min-width: 0; }
.view-hero-hostname {
  font-size: 1.25rem; font-weight: 800; letter-spacing: -0.3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.view-hero-os { font-size: 0.82rem; color: var(--text2); margin-top: 3px; }
.view-hero-meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px;
}
.view-hero-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.72rem; color: var(--text2);
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 99px; padding: 3px 10px;
}
.view-hero-chip i { color: var(--accent); font-size: 0.6rem; }

/* Stats strip (right side) */
.view-hero-stats {
  display: flex; align-items: stretch; gap: 0;
  border-left: 1px solid var(--border); padding-left: 24px;
  flex-shrink: 0; position: relative;
}
.view-hero-stat {
  text-align: center; padding: 4px 18px;
  border-right: 1px solid var(--border);
}
.view-hero-stat:last-child { border-right: none; }
.view-hero-stat-val {
  font-size: 1.35rem; font-weight: 800; color: var(--text); line-height: 1;
}
.view-hero-stat-val.small { font-size: 0.95rem; }
.view-hero-stat-lbl {
  font-size: 0.6rem; color: var(--text3); text-transform: uppercase;
  letter-spacing: 0.7px; font-weight: 600; margin-top: 5px; white-space: nowrap;
}

/* Notes bar */
.view-notes {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(245,158,11,0.07); border: 1px solid rgba(245,158,11,0.20);
  border-radius: var(--radius-sm); padding: 11px 16px;
  margin-bottom: 14px; font-size: 0.83rem; color: var(--text2);
}
.view-notes i { color: var(--orange); margin-top: 2px; flex-shrink: 0; }
.view-notes strong { color: var(--text); }

/* Scan timestamp strip */
.view-scan-bar {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.73rem; color: var(--text3);
  margin-bottom: 16px;
}
.view-scan-bar strong { color: var(--text2); }

.view-section {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-bottom: 10px;
  transition: border-color 0.2s;
}
.view-section:hover { border-color: var(--border2); }
.view-section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.view-section-header h2 { font-size: 0.875rem; font-weight: 700; }
.view-section-icon {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 0.82rem;
}
.view-section-icon.blue   { background: var(--blue-dim);   color: var(--blue); }
.view-section-icon.orange { background: var(--orange-dim); color: var(--orange); }
.view-section-icon.purple { background: var(--purple-dim); color: var(--purple); }
.view-section-icon.green  { background: var(--green-dim);  color: var(--green); }
.view-section-icon.red    { background: var(--red-dim);    color: var(--red); }
.view-section-icon.cyan   { background: var(--cyan-dim);   color: var(--cyan); }
.view-section-icon.yellow { background: var(--yellow-dim); color: var(--yellow); }

.view-info-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.view-info-item  { display: flex; flex-direction: column; gap: 3px; }
.view-info-item.full { grid-column: 1 / -1; }
.view-info-label { font-size: 0.65rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.7px; font-weight: 600; }
.view-info-value { font-size: 0.845rem; font-weight: 500; word-break: break-word; color: var(--text); }
.view-info-value.mono { font-family: var(--mono); font-size: 0.76rem; color: var(--cyan); }

.view-footer {
  display: flex; justify-content: space-between;
  padding: 18px 0 0; font-size: 0.7rem; color: var(--text3);
  border-top: 1px solid var(--border); margin-top: 20px;
}
.view-pc-title { margin-top: 5px; }

/* ══════════════════════════════════════════════════════════════════════════
   IDENTITY TABLE
   ══════════════════════════════════════════════════════════════════════════ */
.identity-table { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.idt-row {
  display: grid; grid-template-columns: 230px 1fr;
  align-items: center; gap: 10px; padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.14s; position: relative;
}
.idt-row:last-child { border-bottom: none; }
.idt-row:hover { background: rgba(228,0,124,0.035); }
.idt-label { font-size: 0.75rem; color: var(--text2); font-weight: 500; display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.idt-label i { color: var(--yellow); width: 13px; text-align: center; }
.idt-value { font-size: 0.82rem; color: var(--text); font-weight: 500; word-break: break-all; }
.idt-value.mono { font-family: var(--mono); font-size: 0.76rem; color: var(--cyan); }
.idt-copy {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: var(--bg3); border: 1px solid var(--border2);
  color: var(--text2); border-radius: 4px; padding: 2px 7px;
  font-size: 0.65rem; cursor: pointer; opacity: 0; transition: opacity 0.14s;
  display: flex; align-items: center; gap: 3px;
}
.idt-row:hover .idt-copy { opacity: 1; }
.idt-copy:hover { color: var(--accent); border-color: var(--accent-glow); }

/* ══════════════════════════════════════════════════════════════════════════
   SHEET PICKER
   ══════════════════════════════════════════════════════════════════════════ */
.sheet-config {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--bg3); border-radius: var(--radius-sm);
  padding: 9px 12px; margin-bottom: 12px;
}
.sheet-config label { font-size: 0.77rem; color: var(--text2); font-weight: 600; }
.sheet-config input[type=number] {
  width: 54px; padding: 4px 7px; border-radius: 5px;
  background: var(--bg2); border: 1px solid var(--border2);
  color: var(--text); font-size: 0.845rem; text-align: center;
  -moz-appearance: textfield;
}
.sheet-config input[type=number]::-webkit-outer-spin-button,
.sheet-config input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sheet-config-sep   { color: var(--text3); font-weight: 700; }
.sheet-config-total { font-size: 0.7rem; color: var(--text3); margin-left: 3px; }

.picker-mode-btns  { display: flex; gap: 7px; margin-bottom: 10px; }
.mode-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius-sm); font-size: 0.78rem; font-weight: 600;
  border: 1px solid var(--border2); background: var(--card); color: var(--text2); cursor: pointer; transition: all 0.14s;
}
.mode-btn.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent-glow); }
.mode-btn:hover:not(.active) { background: var(--card-hover); color: var(--text); }

.picker-legend {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 0.7rem; color: var(--text2); margin-bottom: 9px;
}
.legend-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }

.sheet-grid-scroll { max-height: 300px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px; background: var(--bg3); }
.picker-grid { display: grid; gap: 3px; }
.picker-cell {
  aspect-ratio: 1; min-width: 0; min-height: 0;
  border: 1px solid var(--border2); border-radius: 3px;
  background: rgba(255,255,255,0.025); cursor: pointer; transition: all 0.1s;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.52rem; color: transparent;
}
.picker-cell:hover:not(.used) { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
.picker-cell.target { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); font-size: 0.62rem; }
.picker-cell.used   { background: rgba(255,255,255,0.012); border-color: rgba(255,255,255,0.05); color: var(--text3); font-size: 0.48rem; cursor: default; }
.picker-cell.used:hover { background: var(--red-dim); border-color: var(--red); color: var(--red); }
.picker-status {
  margin-top: 9px; padding: 8px 12px; font-size: 0.8rem; color: var(--text2);
  background: var(--bg3); border-radius: var(--radius-sm);
  border: 1px solid var(--border); display: flex; align-items: center; gap: 7px;
}
.picker-status i { color: var(--accent); }
.picker-status strong { color: var(--text); }
#sheetPrintLayout { display: none; }

/* ══════════════════════════════════════════════════════════════════════════
   CAMERA MODAL
   ══════════════════════════════════════════════════════════════════════════ */
.modal-camera { max-width: 460px; padding: 0; overflow: hidden; }
.modal-camera .modal-header { padding: 14px 18px; }
.camera-viewport { position: relative; width: 100%; background: #000; min-height: 260px; overflow: hidden; }
#cameraVideo { width: 100%; display: block; max-height: 360px; object-fit: cover; }
.camera-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.camera-frame {
  width: 190px; height: 190px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.48); border-radius: 8px;
  position: relative; overflow: hidden;
}
.camera-corner { position: absolute; width: 20px; height: 20px; border-color: var(--accent); border-style: solid; border-width: 0; }
.camera-corner.tl { top:0;    left:0;  border-top-width:3px;    border-left-width:3px;  border-radius: 4px 0 0 0; }
.camera-corner.tr { top:0;    right:0; border-top-width:3px;    border-right-width:3px; border-radius: 0 4px 0 0; }
.camera-corner.bl { bottom:0; left:0;  border-bottom-width:3px; border-left-width:3px;  border-radius: 0 0 0 4px; }
.camera-corner.br { bottom:0; right:0; border-bottom-width:3px; border-right-width:3px; border-radius: 0 0 4px 0; }
.camera-scan-line {
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 8px var(--accent);
  animation: camScan 2s ease-in-out infinite;
}
@keyframes camScan {
  0%   { top: 0%;   opacity: 1; }
  90%  { top: 100%; opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
.camera-status {
  padding: 12px 18px; font-size: 0.8rem;
  color: var(--text2); display: flex; align-items: center; gap: 7px;
  border-top: 1px solid var(--border); background: var(--bg2);
}
.camera-status.success { color: var(--green); }
.camera-status.error   { color: var(--red); }

/* QR Result modal */
.modal-qr-result { max-width: 460px; }
.qr-result-body  { padding: 0 !important; }
.qr-result-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--bg2);
}
.qr-result-icon {
  width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
  background: var(--accent-dim); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.qr-result-hostname { font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.qr-result-os       { font-size: 0.74rem; color: var(--text2); margin-top: 2px; }
.qr-result-date     { margin-left: auto; font-size: 0.7rem; color: var(--text3); white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.qr-result-specs    { display: flex; flex-direction: column; border-bottom: 1px solid var(--border); }
.qr-result-spec {
  display: flex; align-items: center; gap: 12px; padding: 10px 18px;
  border-bottom: 1px solid var(--border); transition: background 0.13s;
}
.qr-result-spec:last-child { border-bottom: none; }
.qr-result-spec:hover { background: var(--card-hover); }
.qr-result-spec > i {
  width: 30px; height: 30px; border-radius: 7px; flex-shrink: 0;
  background: var(--bg3); color: var(--text2);
  display: flex; align-items: center; justify-content: center; font-size: 0.82rem;
}
.qr-result-spec-label { font-size: 0.7rem; color: var(--text2); }
.qr-result-spec-value { font-size: 0.835rem; color: var(--text); font-weight: 500; margin-top: 1px; }
.qr-result-identity {
  padding: 10px 18px; display: flex; flex-direction: column; gap: 7px;
  border-bottom: 1px solid var(--border);
}
.qr-result-id-row   { display: flex; align-items: center; gap: 9px; font-size: 0.76rem; }
.qr-result-id-label { color: var(--text2); width: 76px; flex-shrink: 0; display: flex; align-items: center; gap: 4px; }
.qr-result-id-label i { color: var(--yellow); }
.qr-result-id-value { color: var(--cyan); word-break: break-all; }

/* ══════════════════════════════════════════════════════════════════════════
   PRINT STYLES
   ══════════════════════════════════════════════════════════════════════════ */
@media print {
  @page { size: 18mm 18mm; margin: 0mm; }
  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  body * { visibility: hidden !important; }
  #printLabel, #printLabel * { visibility: visible !important; }
  #printLabel {
    position: fixed !important; top: 0 !important; left: 0 !important;
    width: 18mm !important; height: 18mm !important;
    margin: 0 !important; padding: 0.4mm 0.3mm !important;
    background: #ffffff !important;
    display: flex !important; flex-direction: column !important;
    align-items: center !important; justify-content: center !important;
    gap: 0.35mm !important; border: none !important; border-radius: 0 !important;
    box-shadow: none !important; overflow: hidden !important; z-index: 99999 !important;
  }
  #printLabel .qr-label-brand   { font-size: 3pt !important; font-weight: 800 !important; color: #2255bb !important; letter-spacing: 0.2px !important; line-height: 1 !important; text-align: center !important; font-family: 'Inter', Arial, sans-serif !important; width: 100% !important; }
  #printLabel .qr-img            { width: 12.8mm !important; height: 12.8mm !important; display: block !important; image-rendering: pixelated !important; flex-shrink: 0 !important; }
  #printLabel .qr-label-hostname { font-size: 4pt !important; font-weight: 700 !important; color: #000000 !important; line-height: 1 !important; text-align: center !important; width: 17.4mm !important; overflow: hidden !important; white-space: nowrap !important; text-overflow: ellipsis !important; font-family: 'Inter', Arial, sans-serif !important; }
  #printLabel .qr-label-date     { display: none !important; }
  html.sheet-print body * { visibility: hidden !important; }
  html.sheet-print #sheetPrintLayout, html.sheet-print #sheetPrintLayout * { visibility: visible !important; }
  html.sheet-print #sheetPrintLayout { display: block !important; position: fixed !important; top: 0 !important; left: 0 !important; width: 210mm !important; background: white !important; }
  html.sheet-print #printLabel, html.sheet-print #printLabel * { display: none !important; visibility: hidden !important; }
  .spl-grid { display: grid !important; grid-template-columns: repeat(var(--spl-cols), 18mm) !important; column-gap: 2mm !important; row-gap: 0mm !important; padding: 10mm 9mm !important; background: white !important; }
  .spc { width: 18mm !important; height: 18mm !important; overflow: hidden !important; background: white !important; }
  .spc-qr { display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important; gap: 0.35mm !important; padding: 0.4mm 0.3mm !important; }
  .spc-brand  { font-size: 3pt !important; font-weight: 800 !important; color: #2255bb !important; line-height: 1 !important; font-family: Arial, sans-serif !important; display: block !important; text-align: center !important; width: 100% !important; }
  .spc-img    { width: 12.8mm !important; height: 12.8mm !important; image-rendering: pixelated !important; display: block !important; flex-shrink: 0 !important; }
  .spc-host   { font-size: 4pt !important; font-weight: 700 !important; color: #000 !important; text-align: center !important; width: 17.4mm !important; overflow: hidden !important; white-space: nowrap !important; text-overflow: ellipsis !important; font-family: Arial, sans-serif !important; line-height: 1 !important; display: block !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   LOGIN
   ══════════════════════════════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(228,0,124,0.055) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(139,92,246,0.04) 0%, transparent 50%);
}
.login-card {
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius-xl); padding: 40px 36px;
  width: 100%; max-width: 390px;
  box-shadow: var(--shadow-lg);
}
.login-brand    { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; font-weight: 800; margin-bottom: 6px; }
.login-subtitle { font-size: 0.835rem; color: var(--text2); margin-bottom: 28px; }
.login-error {
  display: flex; align-items: center; gap: 8px;
  background: var(--red-dim); border: 1px solid rgba(239,68,68,0.25);
  color: var(--red); border-radius: var(--radius-sm);
  padding: 9px 13px; font-size: 0.8rem; margin-bottom: 14px;
}
.login-form   { display: flex; flex-direction: column; gap: 16px; }
.login-footer {
  margin-top: 24px; font-size: 0.7rem; color: var(--text3);
  display: flex; align-items: center; gap: 5px; justify-content: center;
}
.login-footer i { color: var(--accent); }

/* ══════════════════════════════════════════════════════════════════════════
   FORM CONTROLS
   ══════════════════════════════════════════════════════════════════════════ */
.form-group  { display: flex; flex-direction: column; gap: 6px; }
.form-label  { font-size: 0.76rem; font-weight: 600; color: var(--text2); display: flex; align-items: center; gap: 5px; }
.form-label i { color: var(--accent); }
.form-input {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); padding: 9px 13px;
  color: var(--text); font-family: var(--font); font-size: 0.845rem;
  transition: border-color 0.2s, box-shadow 0.2s; width: 100%;
}
.form-input:focus {
  outline: none; border-color: rgba(228,0,124,0.5);
  box-shadow: 0 0 0 3px rgba(228,0,124,0.10);
}
.form-input::placeholder { color: var(--text3); }
.form-select   { cursor: pointer; }
.form-select option { background: var(--bg2); }
.form-textarea { resize: vertical; min-height: 78px; line-height: 1.5; }

/* ══════════════════════════════════════════════════════════════════════════
   STATUS BADGES
   ══════════════════════════════════════════════════════════════════════════ */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 99px;
  font-size: 0.7rem; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
}
.status-badge.green  { background: var(--green-dim);  color: var(--green);  border-color: rgba(16,185,129,0.25); }
.status-badge.orange { background: var(--orange-dim); color: var(--orange); border-color: rgba(245,158,11,0.25); }
.status-badge.red    { background: var(--red-dim);    color: var(--red);    border-color: rgba(239,68,68,0.25); }
.status-badge.blue   { background: var(--info-dim);   color: var(--info);   border-color: rgba(59,130,246,0.25); }
.status-badge i { font-size: 0.58rem; }
.status-badge-lg { padding: 6px 14px; font-size: 0.82rem; border-radius: var(--radius-sm); }

/* Map pin (status dot for search) */
.map-pin {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
  display: inline-block;
}
.map-pin.green  { background: var(--green); box-shadow: 0 0 5px rgba(16,185,129,0.5); }
.map-pin.orange { background: var(--orange); }
.map-pin.red    { background: var(--red); }
.map-pin.blue   { background: var(--info); }

/* ══════════════════════════════════════════════════════════════════════════
   FILTER BAR
   ══════════════════════════════════════════════════════════════════════════ */
.filter-bar { display: flex; align-items: center; gap: 7px; margin-bottom: 14px; flex-wrap: wrap; }
.filter-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 99px;
  border: 1px solid var(--border2); background: var(--bg2);
  color: var(--text2); font-size: 0.77rem; font-weight: 600;
  cursor: pointer; transition: all 0.16s; font-family: var(--font);
}
.filter-btn:hover { border-color: var(--accent-glow); color: var(--accent); background: var(--accent-dim); }
.filter-btn.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent-glow); }
.filter-count { background: var(--bg); border-radius: 99px; padding: 1px 6px; font-size: 0.63rem; font-weight: 700; }

/* ══════════════════════════════════════════════════════════════════════════
   ACTION BAR
   ══════════════════════════════════════════════════════════════════════════ */
.action-bar { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; flex-wrap: wrap; }
.action-bar .search-bar { flex: 1; min-width: 200px; margin-bottom: 0; }

/* ══════════════════════════════════════════════════════════════════════════
   DROPDOWN
   ══════════════════════════════════════════════════════════════════════════ */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 5px); right: 0;
  min-width: 170px; background: var(--bg2);
  border: 1px solid var(--border2); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); z-index: 150;
  overflow: hidden; opacity: 0; pointer-events: none;
  transform: translateY(-5px); transition: all 0.16s;
}
.dropdown.open .dropdown-menu { opacity: 1; pointer-events: all; transform: translateY(0); }
.dropdown-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 14px; font-size: 0.8rem; color: var(--text2);
  cursor: pointer; transition: background 0.13s; text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background: var(--card-hover); color: var(--text); }
.dropdown-item i { width: 13px; text-align: center; color: var(--text3); }
.dropdown-item:hover i { color: var(--accent); }
.dropdown-divider { height: 1px; background: var(--border); margin: 3px 0; }
.dropdown-item-danger { color: var(--red) !important; }
.dropdown-item-danger i { color: var(--red) !important; }
.dropdown-item-danger:hover { background: var(--red-dim) !important; }

/* ══════════════════════════════════════════════════════════════════════════
   CHARTS GRID
   ══════════════════════════════════════════════════════════════════════════ */
.charts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 36px; }
.chart-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; transition: border-color 0.2s;
}
.chart-card:hover { border-color: var(--border2); }
.chart-title { font-size: 0.845rem; font-weight: 700; display: flex; align-items: center; gap: 7px; margin-bottom: 16px; }
.chart-title i { color: var(--accent); }
.chart-canvas-wrap { position: relative; height: 165px; display: flex; align-items: center; justify-content: center; }
.chart-legend { margin-top: 12px; display: flex; flex-direction: column; gap: 5px; }
.chart-legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.73rem; color: var(--text2); }
.chart-legend-dot  { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.chart-legend-label { flex: 1; }
.chart-legend-val  { font-weight: 700; color: var(--text); }

/* ══════════════════════════════════════════════════════════════════════════
   ALERTS
   ══════════════════════════════════════════════════════════════════════════ */
.alerts-section { margin-bottom: 36px; }
.alerts-header  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.alerts-title   { font-size: 0.9rem; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.alerts-title i { color: var(--orange); }
.alert-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 16px;
  border-radius: var(--radius-sm);
  background: rgba(245,158,11,0.04); border: 1px solid rgba(245,158,11,0.16);
  margin-bottom: 5px; transition: all 0.16s;
}
.alert-item:hover { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.28); }
.alert-icon {
  width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
  background: var(--orange-dim); color: var(--orange);
  display: flex; align-items: center; justify-content: center; font-size: 0.82rem;
}
.alert-info     { flex: 1; min-width: 0; }
.alert-hostname { font-weight: 700; font-size: 0.845rem; }
.alert-date     { font-size: 0.72rem; color: var(--text2); margin-top: 1px; }

/* ══════════════════════════════════════════════════════════════════════════
   USERS
   ══════════════════════════════════════════════════════════════════════════ */
.user-row    { display: flex; align-items: center; gap: 9px; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #9d0055, #e4007c);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.82rem; color: #fff;
}
.user-avatar-sm { width: 25px; height: 25px; font-size: 0.7rem; }
.user-name      { font-weight: 600; font-size: 0.875rem; }

/* ══════════════════════════════════════════════════════════════════════════
   ACTIVITY LOG
   ══════════════════════════════════════════════════════════════════════════ */
.activity-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 6px; font-size: 0.7rem; font-weight: 600;
  background: var(--bg3); border: 1px solid var(--border2); color: var(--text2);
}
.activity-badge.green  { background: var(--green-dim);  color: var(--green);  border-color: rgba(16,185,129,0.25); }
.activity-badge.blue   { background: var(--info-dim);   color: var(--info);   border-color: rgba(59,130,246,0.25); }
.activity-badge.orange { background: var(--orange-dim); color: var(--orange); border-color: rgba(245,158,11,0.25); }
.activity-badge.red    { background: var(--red-dim);    color: var(--red);    border-color: rgba(239,68,68,0.25); }

/* Deploy page activity feed */
.activity-list { display: flex; flex-direction: column; }
.activity-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px; border-bottom: 1px solid var(--border);
  transition: background 0.13s;
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--card-hover); }
.activity-icon { width: 30px; text-align: center; font-size: 0.82rem; flex-shrink: 0; }
.activity-body { flex: 1; min-width: 0; }
.activity-main { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.activity-action { font-weight: 600; font-size: 0.82rem; color: var(--text); }
.activity-target {
  font-size: 0.76rem; color: var(--text2);
  background: var(--bg3); border: 1px solid var(--border);
  padding: 1px 7px; border-radius: 5px;
}
.activity-meta { font-size: 0.7rem; color: var(--text3); display: flex; gap: 10px; margin-top: 2px; }
.activity-meta i { margin-right: 3px; }

/* ══════════════════════════════════════════════════════════════════════════
   TAGS INPUT
   ══════════════════════════════════════════════════════════════════════════ */
.tags-chips {
  display: flex; flex-wrap: wrap; gap: 5px;
  min-height: 38px; padding: 5px 9px;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); cursor: text; align-items: center;
}
.tags-chips:focus-within { border-color: rgba(228,0,124,0.45); box-shadow: 0 0 0 3px rgba(228,0,124,0.10); }
.tag-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; background: var(--accent-dim);
  border: 1px solid rgba(228,0,124,0.25);
  border-radius: 5px; font-size: 0.7rem; font-weight: 600; color: var(--accent);
}
.tag-chip-x {
  cursor: pointer; color: var(--accent); opacity: 0.7;
  background: none; border: none; padding: 0; font-size: 0.65rem;
  line-height: 1; transition: color 0.13s, opacity 0.13s;
}
.tag-chip-x:hover { opacity: 1; color: var(--red); }

/* ══════════════════════════════════════════════════════════════════════════
   HISTORY TIMELINE
   ══════════════════════════════════════════════════════════════════════════ */
.history-list { display: flex; flex-direction: column; }
.history-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
  font-size: 0.8rem; transition: background 0.13s;
}
.history-item:last-child { border-bottom: none; }
.history-dot  { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; box-shadow: 0 0 5px rgba(228,0,124,0.4); }
.history-time { color: var(--text3); font-family: var(--mono); font-size: 0.7rem; flex-shrink: 0; }
.history-by   { color: var(--text2); }
.history-by strong { color: var(--accent); font-weight: 600; }

/* ══════════════════════════════════════════════════════════════════════════
   BULK BAR
   ══════════════════════════════════════════════════════════════════════════ */
.bulk-bar {
  position: fixed; bottom: 26px; left: calc(var(--sidebar-w) + 50%);
  transform: translateX(-50%) translateY(18px);
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px; border-radius: 99px;
  background: var(--bg2); border: 1px solid var(--border2);
  box-shadow: var(--shadow-lg); z-index: 90; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bulk-bar.visible { opacity: 1; pointer-events: all; transform: translateX(-50%) translateY(0); }
.bulk-bar-count { font-size: 0.8rem; font-weight: 600; color: var(--text2); display: flex; align-items: center; gap: 6px; }
.bulk-bar-count strong { color: var(--accent); }

/* ══════════════════════════════════════════════════════════════════════════
   ALERT BANNER
   ══════════════════════════════════════════════════════════════════════════ */
.alert-banner {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: rgba(245,158,11,0.07); border: 1px solid rgba(245,158,11,0.22);
  color: var(--orange); font-size: 0.82rem; margin-bottom: 20px;
}
.alert-banner code { background: rgba(245,158,11,0.12); padding: 1px 5px; border-radius: 4px; font-family: var(--mono); font-size: 0.78rem; }

/* ══════════════════════════════════════════════════════════════════════════
   DEPLOY PAGE
   ══════════════════════════════════════════════════════════════════════════ */
.deploy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.deploy-main-card {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 36px 28px;
}
.deploy-main-icon {
  width: 60px; height: 60px; border-radius: 16px; margin-bottom: 16px;
  background: var(--accent-dim); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; box-shadow: 0 0 20px rgba(228,0,124,0.15);
}
.deploy-main-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 8px; }
.deploy-main-desc  { font-size: 0.845rem; color: var(--text2); margin-bottom: 22px; max-width: 340px; line-height: 1.7; }
.deploy-dl-btn { width: 100%; max-width: 300px; justify-content: center; margin-bottom: 20px; }
.deploy-size { font-size: 0.72rem; opacity: 0.75; font-weight: 500; margin-left: 2px; }

.deploy-steps-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  justify-content: center; margin-bottom: 18px;
}
.deploy-step-mini { display: flex; align-items: center; gap: 5px; font-size: 0.73rem; color: var(--text2); }
.deploy-step-num {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-dim); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; border: 1px solid var(--accent-glow);
}

.deploy-zip-contents {
  width: 100%; max-width: 320px;
  background: var(--bg3); border-radius: var(--radius-sm);
  border: 1px solid var(--border); overflow: hidden; text-align: left;
}
.deploy-zip-title {
  padding: 9px 14px; font-size: 0.73rem; font-weight: 700;
  color: var(--text2); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 7px;
}
.deploy-zip-title i { color: var(--accent); }
.deploy-zip-file {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
}
.deploy-zip-file:last-child { border-bottom: none; }
.deploy-zip-file span:nth-child(2) { flex: 1; font-weight: 600; color: var(--text); font-size: 0.8rem; }
.deploy-zip-desc { color: var(--text3); font-size: 0.7rem; }

/* ══════════════════════════════════════════════════════════════════════════
   LIGHT THEME
   ══════════════════════════════════════════════════════════════════════════ */
[data-theme="light"] {
  --bg:        #f1f5f9;
  --bg2:       #ffffff;
  --bg3:       #f8fafc;
  --bg4:       #f1f5f9;
  --sidebar-bg:#ffffff;
  --card:        rgba(0,0,0,0.028);
  --card-hover:  rgba(0,0,0,0.048);
  --card-border: rgba(0,0,0,0.090);
  --border:      rgba(0,0,0,0.090);
  --border2:     rgba(0,0,0,0.150);
  --text:  #0f172a;
  --text2: #475569;
  --text3: #94a3b8;
  --shadow:    0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg: 0 12px 44px rgba(0,0,0,0.18);
}
[data-theme="light"] .topbar { background: rgba(241,245,249,0.92); }
[data-theme="light"] .sidebar { background: var(--sidebar-bg); }
[data-theme="light"] .nav-search-bar { background: var(--bg3); }
[data-theme="light"] .form-input,
[data-theme="light"] .form-textarea { background: var(--bg3); }
[data-theme="light"] .data-table thead { background: rgba(0,0,0,0.04); }
[data-theme="light"] .data-table tbody tr:hover { background: rgba(228,0,124,0.04); }

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  :root { --sidebar-w: 200px; }
  .main-wrapper    { padding: 28px 28px 72px; }
  .stats-grid      { grid-template-columns: repeat(2, 1fr); }
  .charts-grid     { grid-template-columns: repeat(2, 1fr); }
  .computers-grid  { grid-template-columns: repeat(2, 1fr); }
  .deploy-grid     { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(.4,0,.2,1);
    width: 240px; z-index: 1001;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 32px rgba(0,0,0,0.45); }
  .sidebar-overlay { display: block; }
  .main-area { margin-left: 0; }
  .topbar { padding: 0 14px; }
  .hamburger-btn { display: flex; }
  .main-wrapper { padding: 20px 16px 72px; }
  .stats-grid { gap: 10px; }
  .computers-grid { grid-template-columns: repeat(2, 1fr); }
  .results-grid { grid-template-columns: 1fr; }
  .result-card.full-width { grid-column: 1; }
  .cam-btn-label { display: none; }
  .nav-camera-btn { padding: 7px 10px; }
}

@media (max-width: 640px) {
  /* ── Global ── */
  body, .main-area { overflow-x: hidden; }
  .main-wrapper { padding: 14px 12px 88px; overflow-x: hidden; }

  /* ── Page header ── */
  .page-header { flex-direction: column; align-items: stretch; gap: 10px; padding: 0 0 12px; }
  .page-title  { font-size: 1.18rem; }
  .page-subtitle { font-size: 0.73rem; }
  .view-ph-left { flex: 1; min-width: 0; }
  .view-ph-titles .page-title { font-size: 1.1rem; }
  .view-ph-actions { gap: 6px; flex-wrap: wrap; }
  .view-ph-btn-text { display: none; }

  /* ── Stats grid ── */
  .stats-grid   { grid-template-columns: repeat(2, 1fr); gap: 9px; margin-bottom: 18px; }
  .stat-card    { padding: 13px 14px; gap: 9px; }
  .stat-value   { font-size: 1.45rem; }
  .stat-icon    { width: 36px; height: 36px; font-size: 0.85rem; }
  .charts-grid  { grid-template-columns: 1fr; gap: 12px; }
  .computers-grid { grid-template-columns: 1fr; }

  /* ── Topbar ── */
  .topbar { padding: 0 12px; gap: 6px; }
  .nav-search-wrap { display: none; }
  .nav-camera-btn { padding: 7px 10px; min-width: 36px; justify-content: center; }
  .icon-btn { width: 36px; height: 36px; }

  /* ── Cards ── */
  .card { padding: 14px 12px; border-radius: var(--radius-sm); }
  .section-title { font-size: 0.78rem; }

  /* ── View hero ── */
  .view-hero {
    flex-direction: column; align-items: flex-start;
    padding: 14px 12px; gap: 12px;
  }
  .view-hero-left { gap: 12px; }
  .view-hero-icon { width: 42px; height: 42px; font-size: 1.05rem; flex-shrink: 0; }
  .view-hero-hostname { font-size: 1.05rem; white-space: normal; word-break: break-word; }
  .view-hero-os   { font-size: 0.72rem; }
  .view-hero-meta { gap: 4px; flex-wrap: wrap; }
  .view-hero-chip { font-size: 0.6rem; padding: 2px 7px; }
  .view-hero-stats {
    border-left: none; padding-left: 0;
    border-top: 1px solid var(--border); padding-top: 12px;
    width: 100%; justify-content: space-around;
  }
  .view-hero-stat     { padding: 0 6px; border-right: 1px solid var(--border); }
  .view-hero-stat:last-child { border-right: none; }
  .view-hero-stat-val { font-size: 0.95rem; }
  .view-hero-stat-lbl { font-size: 0.55rem; }

  /* ── Info grid ── */
  .view-info-grid { grid-template-columns: 1fr; gap: 9px; }
  .view-info-label { font-size: 0.59rem; }
  .view-info-value { font-size: 0.79rem; word-break: break-all; }
  .view-info-value.mono { font-size: 0.68rem; }

  /* ── Identity rows ── */
  .idt-row { grid-template-columns: 1fr; gap: 2px; padding: 8px 12px; }
  .idt-label { font-size: 0.67rem; }
  .idt-value { font-size: 0.79rem; word-break: break-all; }
  .idt-value.mono { font-size: 0.67rem; letter-spacing: 0; }
  .idt-copy { display: none; }

  /* ── Network ── */
  .net-card-grid { grid-template-columns: 1fr; }
  .net-card { padding: 12px; }

  /* ── GPU ── */
  .gpu-grid { grid-template-columns: 1fr; }

  /* ── Tables ── */
  .software-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table th, .data-table td { padding: 8px 10px; font-size: 0.75rem; }
  th, td { padding: 7px 9px; font-size: 0.75rem; }

  /* ── Notes ── */
  .view-notes { font-size: 0.74rem; padding: 10px 12px; }

  /* ── Scan diff ── */
  .scan-diff-selects { grid-template-columns: 1fr; gap: 8px; }
  .scan-diff-vs { display: none; }

  /* ── Modals → bottom sheet ── */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    border-radius: 18px 18px 0 0;
    max-height: 92vh; overflow-y: auto;
    width: 100%; max-width: 100%;
    animation: slideUpSheet 0.3s cubic-bezier(.4,0,.2,1);
  }
  .modal-camera { border-radius: 18px 18px 0 0; }
  .modal-qr-result { border-radius: 18px 18px 0 0; }

  /* Bottom sheet drag handle */
  .modal::before {
    content: '';
    display: block;
    width: 36px; height: 4px;
    background: var(--border2);
    border-radius: 2px;
    margin: 10px auto 0;
  }

  /* ── Forms ── */
  .form-group { margin-bottom: 14px; }
  .form-input, .form-select, .form-textarea {
    font-size: 16px; /* prevent iOS zoom */
    padding: 10px 12px;
  }

  /* ── Buttons ── */
  .btn { min-height: 40px; }
  .btn-sm { min-height: 34px; }

  /* ── PC cards in list ── */
  .pc-card { padding: 14px 12px; }
  .pc-card-header { gap: 10px; }
  .pc-card-hostname { font-size: 0.88rem; }

  /* ── Deploy page ── */
  .deploy-grid { grid-template-columns: 1fr; }
  .deploy-step { padding: 14px 12px; }
  .deploy-step-num { width: 28px; height: 28px; font-size: 0.8rem; }

  /* ── Users page ── */
  .users-table th:nth-child(3),
  .users-table td:nth-child(3),
  .users-table th:nth-child(4),
  .users-table td:nth-child(4) { display: none; }

  /* ── Activity log ── */
  .activity-table th:nth-child(4),
  .activity-table td:nth-child(4) { display: none; }
  .activity-badge { font-size: 0.6rem; padding: 2px 6px; }

  /* ── QR modal ── */
  .qr-modal-img { width: 150px; height: 150px; }
  .qr-modal-footer { flex-wrap: wrap; justify-content: stretch; }
  .qr-modal-footer .btn-sm { flex: 1; justify-content: center; }
}

/* ══════════════════════════════════════════════════════════════════════════
   QR MODAL — Design épuré
   ══════════════════════════════════════════════════════════════════════════ */
.qr-modal-clean { max-width: 400px; overflow: hidden; }

.qr-modal-clean .modal-header {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.qr-modal-header-left {
  display: flex; align-items: center; gap: 12px;
}
.qr-modal-icon {
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
  background: var(--accent-dim); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
}
.qr-modal-title { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.qr-modal-sub   { font-size: 0.75rem; color: var(--text2); margin-top: 1px; font-family: var(--mono); }

.qr-modal-body {
  padding: 24px 20px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}

.qr-modal-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: #fff; border-radius: 14px;
  padding: 18px 22px 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.06);
  width: 100%;
}
.qr-modal-brand {
  font-size: 0.6rem; font-weight: 800; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--accent);
}
.qr-modal-img {
  width: 180px; height: 180px;
  image-rendering: pixelated; display: block;
  border-radius: 4px;
}
.qr-modal-hostname {
  font-size: 0.82rem; font-weight: 800; color: #0d1626;
  letter-spacing: 0.3px; text-align: center;
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.qr-modal-format {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.7rem; color: var(--text3);
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 99px; padding: 4px 12px;
}
.qr-modal-format i { color: var(--accent); font-size: 0.65rem; }

.qr-modal-footer {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 6px; flex-wrap: wrap;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--border);
}
.qr-modal-footer .btn-sm {
  padding: 5px 10px;
  font-size: 0.72rem;
  white-space: nowrap;
}
.qr-modal-footer .btn-sm i { margin-right: 3px; }

[data-theme="light"] .qr-modal-card {
  box-shadow: 0 4px 24px rgba(0,0,0,0.10), 0 0 0 1px rgba(0,0,0,0.08);
}

/* ══════════════════════════════════════════════════════════════════════════
   SHEET PICKER — Redesign
   ══════════════════════════════════════════════════════════════════════════ */

/* Config bar */
.sp-config {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--bg3); border: 1px solid var(--border);
  margin-bottom: 12px;
}
.sp-config-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sp-config-label { font-size: 0.72rem; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; }
.sp-config-group input[type=number] {
  width: 52px; padding: 4px 6px; border-radius: 6px;
  background: var(--bg2); border: 1px solid var(--border2);
  color: var(--text); font-size: 0.845rem; text-align: center;
  -moz-appearance: textfield; font-family: var(--font);
}
.sp-config-group input[type=number]::-webkit-outer-spin-button,
.sp-config-group input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
.sp-config-group input[type=number]:focus { outline: none; border-color: var(--accent-glow); }
.sp-config-sep   { color: var(--text3); font-weight: 700; font-size: 0.9rem; }
.sp-config-total { font-size: 0.72rem; color: var(--text3); padding-left: 4px; }

/* Toolbar: legend + modes */
.sp-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 10px;
}
.sp-legend { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sp-legend-item { display: flex; align-items: center; gap: 5px; font-size: 0.72rem; color: var(--text2); }

.sp-dot {
  width: 12px; height: 12px; border-radius: 3px;
  display: inline-block; flex-shrink: 0;
}
.sp-dot-free   { background: var(--bg3); border: 1.5px solid var(--border2); }
.sp-dot-target { background: var(--accent-dim); border: 1.5px solid var(--accent); }
.sp-dot-used   { background: rgba(239,68,68,0.12); border: 1.5px solid rgba(239,68,68,0.35); }

/* Mode buttons */
.sp-modes { display: flex; gap: 6px; }
.sp-mode-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius-sm);
  font-size: 0.775rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border2); background: var(--bg2);
  color: var(--text2); transition: all 0.15s; font-family: var(--font);
}
.sp-mode-btn:hover:not(.active) { background: var(--card); color: var(--text); }
.sp-mode-btn.active {
  background: var(--accent-dim); color: var(--accent);
  border-color: var(--accent-glow);
}
.sp-mode-btn i { font-size: 0.72rem; }

/* Grid */
.sp-grid-wrap {
  max-height: 340px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px; background: var(--bg3); margin-bottom: 10px;
}

/* Override picker cells for new design */
.picker-cell {
  aspect-ratio: 1; border-radius: 4px;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,0.025);
  cursor: pointer; transition: all 0.1s;
  display: flex; align-items: center; justify-content: center;
  font-size: 0; /* hide text by default */
}
.picker-cell:hover:not(.used):not(.target) {
  border-color: var(--accent); background: var(--accent-dim);
}
.picker-cell.target {
  background: var(--accent-dim); border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
  font-size: 0.6rem; color: var(--accent);
}
.picker-cell.used {
  background: rgba(239,68,68,0.07); border-color: rgba(239,68,68,0.25);
  font-size: 0.5rem; color: var(--red); cursor: default;
}
.picker-cell.used:hover {
  background: rgba(239,68,68,0.14); border-color: rgba(239,68,68,0.45); cursor: pointer;
}

/* Status bar */
.sp-status {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 13px; border-radius: var(--radius-sm);
  background: var(--bg3); border: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text2);
}
.sp-status i { color: var(--accent); flex-shrink: 0; }
.sp-status strong { color: var(--text); }

/* ══════════════════════════════════════════════════════════════════════════
   DEVICE MANAGER — View page
   ══════════════════════════════════════════════════════════════════════════ */
.devmgr-group { margin-bottom: 4px; }
.devmgr-group-header {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--bg3); border: 1px solid var(--border);
  cursor: pointer; user-select: none; font-size: 0.82rem;
  transition: background 0.15s;
}
.devmgr-group-header:hover { background: var(--card); }
.devmgr-chevron { color: var(--text3); font-size: 0.7rem; transition: transform 0.18s; flex-shrink: 0; }
.devmgr-class-name { font-weight: 600; flex: 1; }
.devmgr-count {
  font-size: 0.68rem; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 99px; padding: 1px 7px; color: var(--text3);
}
.devmgr-group-body { border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius-sm) var(--radius-sm); overflow: hidden; }
.devmgr-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-bottom: 1px solid var(--border);
  font-size: 0.78rem; transition: background 0.14s;
}
.devmgr-row:last-child { border-bottom: none; }
.devmgr-row:hover { background: var(--card); }
.devmgr-error { background: rgba(245,158,11,0.04); }
.devmgr-device-icon { width: 20px; text-align: center; flex-shrink: 0; font-size: 0.78rem; }
.devmgr-device-info { flex: 1; min-width: 0; }
.devmgr-device-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.devmgr-device-sub  { font-size: 0.7rem; color: var(--text3); margin-top: 1px; }
.devmgr-device-err  { font-size: 0.7rem; color: var(--orange); margin-top: 2px; }
.devmgr-device-status { flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════════════════════
   SCAN DIFF MODAL
   ══════════════════════════════════════════════════════════════════════════ */
.scan-diff-selects {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px;
  align-items: end; margin-bottom: 16px;
}
.scan-diff-vs {
  font-weight: 800; font-size: 0.78rem; color: var(--text3);
  text-align: center; padding-bottom: 8px;
}
.scan-diff-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 28px; color: var(--text3); font-size: 0.85rem; text-align: center;
}
.scan-diff-placeholder i { font-size: 1.5rem; opacity: 0.4; }
.scan-diff-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.scan-diff-table th { padding: 7px 10px; text-align: left; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.7px; color: var(--text3); border-bottom: 1px solid var(--border); }
.scan-diff-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.scan-diff-table tr:last-child td { border-bottom: none; }
.diff-changed { font-weight: 600; color: var(--orange); display: block; }
.diff-old     { font-size: 0.72rem; color: var(--text3); text-decoration: line-through; display: block; margin-top: 2px; }
.diff-same    { color: var(--text2); }

/* Software table wrap */
.software-table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }

/* ══════════════════════════════════════════════════════════════════════════
   KEYFRAMES
   ══════════════════════════════════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideUpSheet {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@keyframes scanLine {
  0%, 100% { top: 12%; }
  50%       { top: 82%; }
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 var(--accent-glow); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ── Card entrance animations ── */
.stat-card {
  animation: fadeUp 0.36s cubic-bezier(.4,0,.2,1) both;
}
.stat-card:nth-child(1) { animation-delay: 0.04s; }
.stat-card:nth-child(2) { animation-delay: 0.08s; }
.stat-card:nth-child(3) { animation-delay: 0.12s; }
.stat-card:nth-child(4) { animation-delay: 0.16s; }
.stat-card:nth-child(5) { animation-delay: 0.20s; }
.stat-card:nth-child(6) { animation-delay: 0.24s; }

.chart-card, .pc-card, .view-section {
  animation: fadeUp 0.4s cubic-bezier(.4,0,.2,1) both;
  animation-delay: 0.05s;
}

.modal { animation: scaleIn 0.22s cubic-bezier(.4,0,.2,1); }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   HAMBURGER BUTTON
   ══════════════════════════════════════════════════════════════════════════ */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 6px;
  flex-shrink: 0;
  transition: background 0.15s;
}
.hamburger-btn:hover { background: var(--bg3); }
.hamburger-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1), opacity 0.2s, width 0.2s;
  transform-origin: center;
}
.hamburger-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; width: 0; }
.hamburger-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════════════════════════════════════════════════════════════════════
   SIDEBAR OVERLAY (mobile backdrop)
   ══════════════════════════════════════════════════════════════════════════ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.28s;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sidebar-overlay.active { opacity: 1; }

/* ══════════════════════════════════════════════════════════════════════════
   FOCUS RINGS
   ══════════════════════════════════════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* ══════════════════════════════════════════════════════════════════════════
   CUSTOM SCROLLBAR
   ══════════════════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-glow); }

/* ══════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATION UTILITY
   ══════════════════════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 500;
  background: var(--card);
  border: 1px solid var(--border2);
  color: var(--text);
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  animation: fadeUp 0.28s cubic-bezier(.4,0,.2,1);
  pointer-events: auto;
  white-space: nowrap;
}
.toast-success { border-color: rgba(34,197,94,0.4); color: var(--green); }
.toast-error   { border-color: rgba(239,68,68,0.4);  color: var(--red);   }
.toast-warning { border-color: rgba(245,158,11,0.4); color: var(--orange); }

/* ══════════════════════════════════════════════════════════════════════════
   EXTRA SMALL SCREENS (< 380px)
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 380px) {
  .main-wrapper { padding: 12px 10px 80px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .stat-card { padding: 11px 10px; }
  .stat-value { font-size: 1.3rem; }
  .page-title { font-size: 1rem; }
  .view-hero-hostname { font-size: 0.95rem; }
  .topbar { padding: 0 10px; gap: 4px; }
  .icon-btn { width: 32px; height: 32px; }
  .nav-camera-btn { padding: 5px 8px; }
  .card { padding: 12px 10px; }
  .btn { padding: 8px 12px; font-size: 0.78rem; }
  .view-ph-actions .btn-sm { padding: 6px 8px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   TOUCH DEVICE OPTIMIZATIONS
   ══════════════════════════════════════════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {
  /* Minimum 44px tap targets */
  .btn               { min-height: 44px; }
  .btn-sm            { min-height: 38px; }
  .icon-btn          { min-width: 44px; min-height: 44px; }
  .hamburger-btn     { min-width: 44px; min-height: 44px; }
  .nav-camera-btn    { min-height: 40px; }
  .sidebar-link      { min-height: 44px; padding: 10px 16px; }
  .data-table td, .data-table th { padding: 11px 12px; }
  .dropdown-item     { padding: 11px 14px; }
  .pc-card           { padding: 16px 14px; }
  .tab-btn           { min-height: 40px; padding: 9px 16px; }

  /* Remove hover-only states that can get stuck on touch */
  .sidebar-link:hover   { background: transparent; }
  .btn-ghost:hover      { background: transparent; }
  .dropdown-item:hover  { background: transparent; }
  .data-table tbody tr:hover { background: transparent; }

  /* Active states instead */
  .sidebar-link:active   { background: var(--bg3); }
  .btn-ghost:active      { background: var(--bg3); }
  .dropdown-item:active  { background: var(--bg3); }

  /* Larger form inputs */
  .form-input, .form-select, .form-textarea {
    font-size: 16px;
    min-height: 44px;
    padding: 11px 14px;
  }

  /* Better checkbox/radio */
  input[type="checkbox"], input[type="radio"] {
    width: 20px; height: 20px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   GRADE SYSTEM — A / B / C / D
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Couleurs grade ── */
.grade-a { --gc: #22c55e; --gc-dim: rgba(34,197,94,0.12);  --gc-glow: rgba(34,197,94,0.35); }
.grade-b { --gc: #3b82f6; --gc-dim: rgba(59,130,246,0.12); --gc-glow: rgba(59,130,246,0.35); }
.grade-c { --gc: #f59e0b; --gc-dim: rgba(245,158,11,0.12); --gc-glow: rgba(245,158,11,0.35); }
.grade-d { --gc: #ef4444; --gc-dim: rgba(239,68,68,0.12);  --gc-glow: rgba(239,68,68,0.35); }

/* ── Badge compact (dans la liste) ── */
.grade-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0;
  background: var(--gc-dim); color: var(--gc);
  border: 1px solid var(--gc-glow);
  flex-shrink: 0;
}

/* ── Filtre grade dans la barre ── */
.grade-filter-bar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 10px 0 4px;
}
.grade-filter-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 99px;
  font-size: 0.75rem; font-weight: 700; cursor: pointer;
  border: 1px solid var(--border2); background: var(--bg3);
  color: var(--text2); transition: all 0.15s; font-family: var(--font);
}
.grade-filter-btn:hover { background: var(--card); color: var(--text); }
.grade-filter-btn.active {
  background: var(--gc-dim); color: var(--gc);
  border-color: var(--gc-glow);
}
.grade-filter-btn .grade-dot {
  width: 8px; height: 8px; border-radius: 2px;
  background: var(--gc);
}

/* ── Sort button ── */
.grade-sort-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 99px;
  font-size: 0.75rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border2); background: var(--bg3);
  color: var(--text2); transition: all 0.15s; font-family: var(--font);
  margin-left: auto;
}
.grade-sort-btn:hover { background: var(--card); color: var(--text); }
.grade-sort-btn.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent-glow); }

/* ── Panneau grade dans view.html ── */
.grade-panel {
  display: flex; align-items: center; gap: 20px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  margin-bottom: 18px;
  animation: fadeUp 0.35s both;
}
.grade-circle {
  width: 64px; height: 64px; border-radius: 16px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 900; letter-spacing: -1px;
  background: var(--gc-dim); color: var(--gc);
  border: 2px solid var(--gc-glow);
  box-shadow: 0 0 24px var(--gc-glow);
}
.grade-panel-info { flex: 1; min-width: 0; }
.grade-panel-top {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
}
.grade-panel-label {
  font-size: 1.05rem; font-weight: 800; color: var(--gc);
}
.grade-panel-score {
  font-size: 0.75rem; color: var(--text3); font-family: var(--mono);
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 99px; padding: 2px 10px;
}
.grade-panel-ssd {
  font-size: 0.68rem; font-weight: 700;
  background: rgba(34,197,94,0.10); color: var(--green);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: 99px; padding: 2px 8px;
}
.grade-bar-wrap { margin-bottom: 8px; }
.grade-bar {
  height: 6px; background: var(--bg3); border-radius: 99px;
  overflow: hidden; border: 1px solid var(--border);
}
.grade-bar-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--gc-glow), var(--gc));
  transition: width 0.8s cubic-bezier(.4,0,.2,1);
}
.grade-estimation {
  font-size: 0.78rem; color: var(--text2); line-height: 1.5;
  margin-top: 6px;
}
.grade-criteria {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px;
}
.grade-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.68rem; font-weight: 600;
  padding: 3px 9px; border-radius: 99px;
  border: 1px solid var(--border2); background: var(--bg3);
  color: var(--text2);
}
.grade-chip.good  { background: rgba(34,197,94,0.08);  color: var(--green);  border-color: rgba(34,197,94,0.2); }
.grade-chip.ok    { background: rgba(245,158,11,0.08); color: var(--orange); border-color: rgba(245,158,11,0.2); }
.grade-chip.bad   { background: rgba(239,68,68,0.08);  color: var(--red);    border-color: rgba(239,68,68,0.2); }

/* ── Grille résumé dans le panneau ── */
.grade-specs {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-top: 14px;
}
.grade-spec-item {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
}
.grade-spec-label { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text3); font-weight: 600; }
.grade-spec-val   { font-size: 0.88rem; font-weight: 700; color: var(--text); }

/* ── Hero stat grade ── */
.view-hero-stat-val.grade-a { color: #22c55e; }
.view-hero-stat-val.grade-b { color: #3b82f6; }
.view-hero-stat-val.grade-c { color: #f59e0b; }
.view-hero-stat-val.grade-d { color: #ef4444; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .grade-panel { flex-direction: column; align-items: flex-start; gap: 14px; }
  .grade-circle { width: 52px; height: 52px; font-size: 1.6rem; border-radius: 13px; }
  .grade-specs { grid-template-columns: repeat(2, 1fr); }
  .grade-filter-bar { gap: 5px; }
  .grade-sort-btn { margin-left: 0; }
}

/* ══════════════════════════════════════════════════════════════════════════
   DEPLOY — solo card (sans panneau scans)
   ══════════════════════════════════════════════════════════════════════════ */
.deploy-solo {
  display: flex;
  justify-content: center;
  padding: 8px 0 32px;
}
.deploy-solo .deploy-main-card {
  max-width: 580px;
  width: 100%;
}

/* ══════════════════════════════════════════════════════════════════════════
   USERS — grille de cartes
   ══════════════════════════════════════════════════════════════════════════ */
.user-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  padding: 4px 0 32px;
}

.user-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color .2s, background .2s;
}
.user-card:hover {
  background: var(--card-hover);
  border-color: var(--border2);
}
.user-card-me {
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* Avatar */
.user-card-avatar {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--bg4);
  border: 2px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
  flex-shrink: 0;
}
.user-card-avatar-admin {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}
.user-card-crown {
  position: absolute;
  bottom: -4px; right: -4px;
  background: var(--accent);
  color: #fff;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.55rem;
  border: 2px solid var(--bg);
}

/* Info */
.user-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.user-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
}
.user-card-you {
  font-size: 0.62rem;
  font-weight: 700;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent-glow);
  border-radius: 99px;
  padding: 1px 7px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.user-card-fullname {
  font-size: 0.82rem;
  color: var(--text2);
}
.user-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.user-card-date {
  font-size: 0.72rem;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Actions */
.user-card-actions {
  display: flex;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

@media (max-width: 480px) {
  .user-card-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════════════════
   JOURNAL — toolbar + timeline
   ══════════════════════════════════════════════════════════════════════════ */

/* Toolbar */
.log-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.log-search { flex: 1; }
.log-type-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.log-type-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 0.76rem; font-weight: 600;
  border: 1px solid var(--border2);
  background: var(--card);
  color: var(--text2);
  cursor: pointer;
  transition: all .18s;
}
.log-type-btn:hover { background: var(--card-hover); color: var(--text); }
.log-type-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

/* Timeline */
.log-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 24px;
}
.log-timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 12px; bottom: 12px;
  width: 2px;
  background: var(--border);
  border-radius: 2px;
}

.log-item {
  position: relative;
  padding: 0 0 10px 20px;
}
.log-item-dot {
  position: absolute;
  left: -24px; top: 14px;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  flex-shrink: 0;
}

.log-item-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  transition: background .15s;
}
.log-item-card:hover { background: var(--card-hover); }

.log-item-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.log-item-icon {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.log-item-body { min-width: 0; }
.log-item-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.log-item-target {
  font-size: 0.76rem;
  color: var(--text2);
  margin-top: 2px;
  font-family: var(--mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.log-item-details {
  font-size: 0.72rem;
  color: var(--text3);
  margin-top: 2px;
}

.log-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.log-item-user {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--text2);
}
.log-item-time {
  font-size: 0.68rem;
  color: var(--text3);
  font-family: var(--mono);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .log-item-right { flex-direction: row; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
  .log-item-card { flex-direction: column; gap: 8px; }
  .log-timeline { padding-left: 18px; }
  .log-timeline::before { left: 5px; }
  .log-item-dot { left: -18px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   SETTINGS — layout avec onglets latéraux
   ══════════════════════════════════════════════════════════════════════════ */

/* Layout principal */
.stg-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: start;
  padding-bottom: 40px;
}

/* Nav latérale */
.stg-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: sticky;
  top: calc(var(--topbar-h) + 16px);
}
.stg-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text2);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .18s;
  text-align: left;
}
.stg-nav-btn i { width: 16px; text-align: center; font-size: 0.85rem; }
.stg-nav-btn:hover { background: var(--card); color: var(--text); }
.stg-nav-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent-glow);
  color: var(--accent);
  font-weight: 600;
}

/* Panneaux onglets */
.stg-tab { display: none; flex-direction: column; gap: 16px; }
.stg-tab.active { display: flex; }

/* Sections */
.stg-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stg-section-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.stg-section-header > i {
  font-size: 1rem;
  color: var(--accent);
  margin-top: 3px;
  width: 20px;
  text-align: center;
}
.stg-section-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}
.stg-section-sub {
  font-size: 0.76rem;
  color: var(--text2);
  margin-top: 2px;
}

/* Formulaire dans une section */
.stg-form {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Hint */
.stg-hint {
  margin: 0 20px 16px;
  padding: 10px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  color: var(--text2);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.stg-hint i { margin-top: 2px; color: var(--accent); flex-shrink: 0; }
.stg-hint code {
  background: var(--bg4);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text);
}

/* ── Profil ── */
.stg-profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  flex-wrap: wrap;
}
.stg-profile-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 800;
  color: var(--accent);
  flex-shrink: 0;
}
.stg-profile-info { flex: 1; min-width: 0; }
.stg-profile-name { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.stg-profile-full { font-size: 0.8rem; color: var(--text2); margin-top: 2px; }
.stg-profile-stats {
  display: flex;
  gap: 20px;
}
.stg-profile-stat { text-align: center; }
.stg-profile-stat-val { font-size: 1.4rem; font-weight: 800; color: var(--accent); line-height: 1; }
.stg-profile-stat-lbl { font-size: 0.68rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 3px; }

/* ── Mot de passe ── */
.stg-pwd-wrap {
  position: relative;
}
.stg-pwd-wrap .form-input { padding-right: 44px; }
.stg-eye-btn {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 40px;
  background: transparent;
  border: none;
  color: var(--text3);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  transition: color .15s;
}
.stg-eye-btn:hover { color: var(--text2); }

.stg-pwd-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.stg-pwd-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.stg-pwd-fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  transition: width .3s, background .3s;
}
.stg-pwd-label {
  font-size: 0.72rem;
  font-weight: 600;
  min-width: 72px;
  text-align: right;
}

/* ── Info grid (serveur) ── */
.stg-info-grid {
  display: flex;
  flex-direction: column;
  padding: 4px 0 8px;
}
.stg-info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
}
.stg-info-row:last-child { border-bottom: none; }
.stg-info-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text2);
  width: 110px;
  flex-shrink: 0;
}
.stg-info-val {
  font-size: 0.84rem;
  color: var(--text);
  min-width: 0;
}
.stg-copy-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.stg-copy-text {
  font-size: 0.82rem;
  font-family: var(--mono);
  color: var(--text);
  word-break: break-all;
}
.stg-masked { filter: blur(5px); user-select: none; transition: filter .2s; }
.stg-copy-btn {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--text2);
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .15s;
}
.stg-copy-btn:hover { background: var(--bg4); color: var(--text); }

/* ── Slider alertes ── */
.stg-slider-wrap { display: flex; flex-direction: column; gap: 10px; }
.stg-slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stg-slider-label { font-size: 0.84rem; font-weight: 600; color: var(--text); }
.stg-slider-value-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.stg-slider-number {
  width: 68px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  padding: 4px 6px;
  font-family: var(--mono);
}
.stg-slider-number:focus { outline: none; border-color: var(--accent); }
.stg-slider-unit { font-size: 0.76rem; color: var(--text2); }

.stg-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: var(--border2);
  outline: none;
  cursor: pointer;
}
.stg-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent-glow);
  cursor: pointer;
}
.stg-slider::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  cursor: pointer;
}
.stg-slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text3);
  margin-top: -4px;
}

.stg-alert-preview {
  background: var(--orange-dim);
  border: 1px solid var(--orange);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.stg-alert-preview i { color: var(--orange); }
.stg-alert-preview strong { color: var(--orange); }

/* ── Thème ── */
.stg-theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 16px 20px;
}
.stg-theme-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s, transform .15s;
}
.stg-theme-card:hover { border-color: var(--border2); transform: translateY(-1px); }
.stg-theme-card.stg-theme-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Preview miniature */
.stg-theme-preview {
  width: 100%;
  height: 72px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.stg-theme-preview-dark {
  background: #0d1424;
}
.stg-theme-preview-light {
  background: #f1f5f9;
}
.stg-tp-bar {
  height: 10px;
  background: rgba(228,0,124,0.3);
  flex-shrink: 0;
}
.stg-theme-preview-light .stg-tp-bar { background: rgba(228,0,124,0.2); }
.stg-tp-sidebar {
  width: 28px;
  flex: 1;
  background: rgba(255,255,255,0.04);
  float: left;
  position: absolute;
  bottom: 0;
}
.stg-theme-preview {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: 10px 1fr;
}
.stg-tp-bar   { grid-column: 1 / -1; }
.stg-tp-sidebar { background: rgba(255,255,255,0.04); }
.stg-theme-preview-light .stg-tp-sidebar { background: rgba(0,0,0,0.07); }
.stg-tp-content { padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.stg-tp-row { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.12); }
.stg-tp-row.short { width: 60%; }
.stg-theme-preview-light .stg-tp-row { background: rgba(0,0,0,0.12); }

.stg-theme-label {
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: var(--card);
}
.stg-theme-card.stg-theme-active .stg-theme-label { color: var(--accent); }
.stg-theme-check { color: var(--accent); }

/* ── Exports ── */
.stg-export-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
}
.stg-export-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--card);
  transition: background .15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.stg-export-card:hover { background: var(--card-hover); }
.stg-export-icon { font-size: 1.6rem; flex-shrink: 0; width: 36px; text-align: center; }
.stg-export-info { flex: 1; min-width: 0; }
.stg-export-title { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.stg-export-desc  { font-size: 0.74rem; color: var(--text2); margin-top: 2px; }
.stg-export-dl    { font-size: 0.8rem; color: var(--text3); }

/* ── Sysinfo ── */
.stg-sysinfo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  margin: 0;
}
.stg-sysinfo-item {
  background: var(--card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.stg-sysinfo-icon { font-size: 1.1rem; color: var(--accent); opacity: 0.8; }
.stg-sysinfo-val  { font-size: 1.3rem; font-weight: 800; color: var(--text); line-height: 1.1; }
.stg-sysinfo-lbl  { font-size: 0.68rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.4px; }

/* ── Toast settings ── */
.stg-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 20px;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 600;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  white-space: nowrap;
}
.stg-toast.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.stg-toast-ok  { background: var(--green-dim); border: 1px solid var(--green); color: var(--green); }
.stg-toast-err { background: var(--red-dim);   border: 1px solid var(--red);   color: var(--red); }

/* ── Responsive ── */
@media (max-width: 860px) {
  .stg-layout { grid-template-columns: 1fr; }
  .stg-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }
  .stg-nav-btn { flex: 1; min-width: 110px; justify-content: center; }
  .stg-sysinfo-grid { grid-template-columns: repeat(2, 1fr); }
  .stg-theme-grid { grid-template-columns: 1fr 1fr; }
  .stg-profile-stats { display: none; }
}
@media (max-width: 480px) {
  .stg-nav-btn span { display: none; }
  .stg-nav-btn { min-width: unset; padding: 10px; }
  .stg-theme-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════════════════
   DASHBOARD REDESIGN — Hero stats · Grade tiles · Panels
   ══════════════════════════════════════════════════════════════════════════ */

/* ── 4 grandes tuiles de stats ────────────────────────────────────────────── */
.dash-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.dash-hero-card {
  position: relative; overflow: hidden;
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  display: flex; align-items: flex-start; gap: 16px;
  transition: transform 0.22s, box-shadow 0.22s;
  cursor: default;
}
.dash-hero-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.dash-hero-icon {
  width: 54px; height: 54px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.dash-hero-body { flex: 1; min-width: 0; }
.dash-hero-value {
  font-size: 3rem; font-weight: 900; line-height: 1;
  letter-spacing: -2px; color: #fff;
}
.dash-hero-label {
  font-size: 0.82rem; font-weight: 500;
  color: rgba(255,255,255,0.78); margin-top: 7px;
}
.dash-hero-bg-icon {
  position: absolute; right: -12px; bottom: -10px;
  font-size: 6rem; color: rgba(255,255,255,0.07);
  pointer-events: none; line-height: 1;
}
/* Color variants */
.dash-hero-blue   { background: linear-gradient(135deg,#1d4ed8,#3b82f6); border-color: rgba(59,130,246,.3); }
.dash-hero-green  { background: linear-gradient(135deg,#047857,#10b981); border-color: rgba(16,185,129,.3); }
.dash-hero-accent { background: linear-gradient(135deg,#9d0055,#e4007c); border-color: rgba(228,0,124,.3); }
.dash-hero-red    { background: linear-gradient(135deg,#b91c1c,#ef4444); border-color: rgba(239,68,68,.3); }

/* ── Grade distribution (4 tuiles A/B/C/D) ───────────────────────────────── */
.dash-grade-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 14px;
}
.dash-grade-tile {
  padding: 22px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg2);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  cursor: pointer; text-decoration: none; display: block; color: inherit;
}
.dash-grade-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.dgt-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.dgt-letter {
  width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 900;
}
.dgt-label { font-size: 0.78rem; font-weight: 600; color: var(--text2); }
.dgt-count { font-size: 2.2rem; font-weight: 900; letter-spacing: -1.5px; line-height: 1; margin-bottom: 14px; }
.dgt-bar { height: 7px; border-radius: 99px; background: var(--bg4); margin-bottom: 9px; overflow: hidden; }
.dgt-fill { height: 100%; border-radius: 99px; transition: width 0.9s cubic-bezier(.4,0,.2,1); }
.dgt-sub { font-size: 0.7rem; color: var(--text3); }

.grade-a-tile .dgt-letter { background: rgba(34,197,94,.13);  color:#22c55e; }
.grade-a-tile .dgt-count  { color:#22c55e; }
.grade-a-tile .dgt-fill   { background:#22c55e; }
.grade-a-tile:hover        { border-color:rgba(34,197,94,.35); box-shadow:0 6px 28px rgba(34,197,94,.1); }

.grade-b-tile .dgt-letter { background: rgba(59,130,246,.13);  color:var(--info); }
.grade-b-tile .dgt-count  { color:var(--info); }
.grade-b-tile .dgt-fill   { background:var(--info); }
.grade-b-tile:hover        { border-color:rgba(59,130,246,.35); box-shadow:0 6px 28px rgba(59,130,246,.1); }

.grade-c-tile .dgt-letter { background: rgba(245,158,11,.13);  color:var(--orange); }
.grade-c-tile .dgt-count  { color:var(--orange); }
.grade-c-tile .dgt-fill   { background:var(--orange); }
.grade-c-tile:hover        { border-color:rgba(245,158,11,.35); box-shadow:0 6px 28px rgba(245,158,11,.1); }

.grade-d-tile .dgt-letter { background: rgba(239,68,68,.13);  color:var(--red); }
.grade-d-tile .dgt-count  { color:var(--red); }
.grade-d-tile .dgt-fill   { background:var(--red); }
.grade-d-tile:hover        { border-color:rgba(239,68,68,.35); box-shadow:0 6px 28px rgba(239,68,68,.1); }

/* ── 3 panels (statut · OS · actions) ────────────────────────────────────── */
.dash-split-row {
  display: grid;
  grid-template-columns: 1.15fr 1fr 0.9fr;
  gap: 14px; margin-bottom: 36px;
}
.dash-panel {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.dash-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  font-size: 0.8rem; font-weight: 700; color: var(--text); gap: 8px;
}
.dash-panel-header > span > i { color: var(--accent); margin-right: 7px; }

/* Statut — barres horizontales */
.dash-status-list { padding: 16px 18px; display: flex; flex-direction: column; gap: 15px; }
.dsl-row { display: grid; grid-template-columns: 112px 1fr 32px; align-items: center; gap: 10px; }
.dsl-badge { font-size: 0.67rem !important; padding: 3px 8px !important; white-space: nowrap; }
.dsl-bar-wrap { height: 7px; border-radius: 99px; background: var(--bg4); overflow: hidden; }
.dsl-bar { height: 100%; border-radius: 99px; transition: width 0.9s cubic-bezier(.4,0,.2,1); min-width: 2px; }
.dsl-count { font-size: 0.82rem; font-weight: 700; color: var(--text); text-align: right; }

/* OS — liste */
.dash-os-list { padding: 14px 18px; display: flex; flex-direction: column; gap: 13px; }
.dol-row { display: flex; flex-direction: column; gap: 5px; }
.dol-label-row { display: flex; justify-content: space-between; align-items: center; }
.dol-name  { font-size: 0.78rem; font-weight: 500; color: var(--text); }
.dol-count { font-size: 0.72rem; font-weight: 700; color: var(--text2); }
.dol-bar-wrap { height: 5px; border-radius: 99px; background: var(--bg4); overflow: hidden; }
.dol-bar { height: 100%; border-radius: 99px; transition: width 0.9s cubic-bezier(.4,0,.2,1); min-width: 2px; }

/* Actions rapides */
.dash-actions-list { padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.dash-action-btn {
  display: flex; align-items: center; gap: 12px; padding: 10px 10px;
  border-radius: var(--radius-sm); text-decoration: none; color: var(--text);
  transition: background 0.15s; cursor: pointer;
}
.dash-action-btn:hover { background: var(--card-hover); }
.dab-icon {
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
}
.dab-text { flex: 1; min-width: 0; }
.dab-title { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.dab-sub   { font-size: 0.68rem; color: var(--text3); }
.dab-arrow { color: var(--text3); font-size: 0.65rem; flex-shrink: 0; }

/* ── Improved PC card footer ─────────────────────────────────────────────── */
.pc-card-footer {
  padding: 9px 14px !important;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.15);
  display: flex !important;
  align-items: center;
  justify-content: space-between;
}

/* ── Responsive dashboard ────────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .dash-hero-grid   { grid-template-columns: repeat(2,1fr); }
  .dash-grade-grid  { grid-template-columns: repeat(2,1fr); }
  .dash-split-row   { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .dash-split-row   { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .dash-hero-grid   { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dash-hero-value  { font-size: 2.2rem; }
  .dash-hero-card   { padding: 20px 16px; }
  .dash-grade-grid  { grid-template-columns: 1fr 1fr; gap: 10px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   ÉTIQUETTES QR PHYSIQUES — page /labels
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Stat cards ─────────────────────────────────────────────────────────── */
.lbl-stats-row {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 14px;
  margin-bottom: 22px;
}
.lbl-stat-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  display: flex; align-items: center; gap: 16px;
}
.lbl-stat-icon {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
}
.lbl-stat-val  { font-size: 2rem; font-weight: 900; letter-spacing: -1px; line-height: 1; color: var(--text); }
.lbl-stat-lbl  { font-size: 0.73rem; color: var(--text3); margin-top: 3px; }

/* ── How-it-works card ──────────────────────────────────────────────────── */
.lbl-how-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 22px;
  margin-bottom: 20px;
}
.lbl-how-title {
  font-size: 0.8rem; font-weight: 700; color: var(--text2);
  margin-bottom: 14px; display: flex; align-items: center; gap: 7px;
}
.lbl-how-title i { color: var(--accent); }
.lbl-how-steps {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.lbl-step {
  display: flex; align-items: flex-start; gap: 10px;
  flex: 1; min-width: 140px;
}
.lbl-step-num {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 800;
}
.lbl-step-text { font-size: 0.77rem; color: var(--text2); line-height: 1.5; padding-top: 2px; }
.lbl-step-text strong { color: var(--text); }
.lbl-step-arrow { color: var(--text3); font-size: 0.75rem; flex-shrink: 0; align-self: center; }

/* ── Generator card ─────────────────────────────────────────────────────── */
.lbl-gen-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  margin-bottom: 20px;
}
.lbl-gen-header {
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  font-size: 0.8rem; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.lbl-gen-header i { color: var(--accent); }
.lbl-gen-body  { padding: 18px 20px; }
.lbl-gen-row   { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.lbl-preview-info {
  margin-top: 12px; padding: 8px 12px;
  background: var(--bg3); border-radius: var(--radius-sm);
  font-size: 0.77rem; color: var(--text2);
  display: flex; align-items: center; gap: 7px;
}
.lbl-preview-info i { color: var(--accent); }

/* ── Preview grid card ──────────────────────────────────────────────────── */
.lbl-preview-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.lbl-preview-header {
  padding: 12px 18px; border-bottom: 1px solid var(--border);
  font-size: 0.8rem; font-weight: 700; color: var(--text);
  display: flex; align-items: center; justify-content: space-between;
}
.lbl-preview-header i { color: var(--accent); margin-right: 7px; }
.lbl-grid {
  padding: 16px; display: flex; flex-wrap: wrap; gap: 10px;
}
.lbl-preview-item {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 8px 6px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); width: 80px;
  transition: border-color 0.15s, box-shadow 0.15s;
  cursor: default;
}
.lbl-preview-item:hover { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(228,0,124,.1); }
.lbl-preview-qr img    { width: 54px; height: 54px; image-rendering: pixelated; display: block; }
.lbl-preview-code      { font-size: 0.6rem; font-family: var(--font-mono); color: var(--text2); text-align: center; word-break: break-all; }
.lbl-preview-footer {
  padding: 10px 18px; border-top: 1px solid var(--border);
  font-size: 0.72rem; color: var(--text3); text-align: right;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .lbl-stats-row  { grid-template-columns: 1fr; }
  .lbl-how-steps  { flex-direction: column; }
  .lbl-step-arrow { transform: rotate(90deg); }
}

/* ── Label chip on view.html ────────────────────────────────────────────── */
.view-label-chip {
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  user-select: none;
}
.view-label-chip:hover {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
}
.view-label-unset {
  opacity: 0.55;
  border-style: dashed !important;
}
.view-label-unset:hover { opacity: 1; }

/* ── Label chip inside label modal ─────────────────────────────────────── */
.label-current-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: var(--bg3); border-radius: var(--radius-sm);
}
.label-current-tag {
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 700;
  color: var(--accent); display: flex; align-items: center; gap: 6px;
}

/* ── Label chips in computers table ────────────────────────────────────── */
.tbl-label-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.66rem; font-family: var(--font-mono); font-weight: 700;
  padding: 2px 7px; border-radius: 5px;
  cursor: pointer; user-select: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.tbl-label-set {
  background: rgba(228,0,124,.10);
  color: var(--accent);
  border: 1px solid rgba(228,0,124,.25);
}
.tbl-label-set:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.tbl-label-unset {
  background: transparent;
  color: var(--text3);
  border: 1px dashed var(--border);
}
.tbl-label-unset:hover {
  background: var(--bg4);
  color: var(--text2);
  border-color: var(--text3);
}

/* ── Quick-assign modal PC header ───────────────────────────────────────── */
.la-pc-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: var(--bg3);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.la-pc-icon {
  width: 38px; height: 38px; border-radius: 9px; flex-shrink: 0;
  background: var(--bg4); display: flex; align-items: center;
  justify-content: center; color: var(--accent); font-size: 1rem;
}
.la-pc-name { font-size: 0.92rem; font-weight: 700; color: var(--text); }
.la-pc-sub  { font-size: 0.72rem; color: var(--text3); margin-top: 2px; }
.la-current-wrap {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; background: var(--bg3);
  border-radius: var(--radius-sm);
}
.la-current-code {
  font-family: var(--font-mono); font-size: 0.82rem;
  font-weight: 700; color: var(--accent);
}

/* ══════════════════════════════════════════════════════════════════════════
   POPUP NOUVEAU PC — toast flottant + modal assignation rapide
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Toast notification ─────────────────────────────────────────────────── */
.nlp-toast {
  pointer-events: all;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
  animation: nlpSlideIn 0.35s cubic-bezier(.4,0,.2,1);
}
@keyframes nlpSlideIn {
  from { opacity:0; transform:translateX(60px); }
  to   { opacity:1; transform:translateX(0); }
}
.nlp-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.62rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .6px; color: var(--accent);
  margin-bottom: 5px;
}
.nlp-hostname {
  font-size: 1rem; font-weight: 800; color: var(--text);
  letter-spacing: -.3px; margin-bottom: 3px;
}
.nlp-sub {
  font-size: 0.72rem; color: var(--text3);
  display: flex; align-items: center; gap: 5px;
  margin-bottom: 12px;
}
.nlp-actions { display: flex; align-items: center; gap: 8px; }
.nlp-btn-assign {
  flex: 1; padding: 7px 12px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 7px;
  font-size: 0.78rem; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 6px; transition: opacity .15s;
}
.nlp-btn-assign:hover { opacity: .85; }
.nlp-btn-dismiss {
  width: 32px; height: 32px; border-radius: 7px;
  background: var(--bg4); border: none; color: var(--text3);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.nlp-btn-dismiss:hover { background: var(--bg3); color: var(--text); }

/* ── Quick-label modal — PC header ─────────────────────────────────────── */
.ql-pc-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: var(--bg3);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.ql-pc-icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  background: rgba(228,0,124,.1); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.ql-pc-name { font-size: 0.95rem; font-weight: 800; color: var(--text); }
.ql-pc-sub  { font-size: 0.71rem; color: var(--text3); margin-top: 2px; }

/* ── Camera zone ────────────────────────────────────────────────────────── */
.ql-camera-zone {
  position: relative; border-radius: var(--radius-sm);
  overflow: hidden; background: var(--bg3);
  border: 1px solid var(--border); min-height: 120px;
}
.ql-camera-wrap { position: relative; }
.ql-camera-placeholder {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 28px 16px;
  min-height: 120px;
}
.ql-scan-status {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 0.82rem; color: var(--text2);
  background: var(--bg3);
}
.ql-scan-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.ql-scan-frame {
  width: 140px; height: 140px;
  border: 2px solid rgba(228,0,124,.7);
  border-radius: 10px; position: relative;
}
.ql-scan-line {
  position: absolute; left: 10%; right: 10%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  top: 50%; animation: qlScanMove 1.6s ease-in-out infinite;
}
@keyframes qlScanMove {
  0%   { top: 15%; }
  50%  { top: 85%; }
  100% { top: 15%; }
}
