/* ═══════════════════════════════════════════════════
   Uomo a Terra — Design System
   Industrial Command Center Aesthetic
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow+Semi+Condensed:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Variables ───────────────────────────────────── */
:root {
  --bg-0:       #060608;
  --bg-1:       #0e0f13;
  --bg-2:       #14151b;
  --bg-3:       #1b1d26;
  --bg-4:       #22242f;
  --bg-hover:   #282b38;

  --border-sub: rgba(255,255,255,0.04);
  --border-def: rgba(255,255,255,0.07);
  --border-str: rgba(255,255,255,0.13);

  --red-600:    #a00d25;
  --red-500:    #C8102E;
  --red-400:    #e8132f;
  --red-300:    #ff4d68;
  --red-glow:   rgba(200,16,46,0.22);
  --red-subtle: rgba(200,16,46,0.08);

  --green:      #10b981;
  --green-sub:  rgba(16,185,129,0.12);
  --amber:      #f59e0b;
  --amber-sub:  rgba(245,158,11,0.12);
  --blue:       #3b82f6;
  --blue-sub:   rgba(59,130,246,0.12);

  --text-1:     #f0f2f5;
  --text-2:     #9ba3af;
  --text-3:     #555e6c;
  --text-4:     #3a424f;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Barlow Semi Condensed', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --sidebar-w:  248px;
  --topbar-h:   52px;
  --radius-sm:  4px;
  --radius:     6px;
  --radius-lg:  10px;

  --transition: 150ms cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset & Base ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout Shell ────────────────────────────────── */
.shell { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-3);
  border-right: 1px solid var(--border-def);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: transform var(--transition);
}

.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-def);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-brand-icon {
  width: 36px; height: 36px;
  background: var(--red-500);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.sidebar-brand-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  color: var(--text-1);
  line-height: 1.1;
}
.sidebar-brand-sub {
  font-size: 0.68rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
}
.nav-section {
  margin-bottom: 4px;
}
.nav-section-label {
  font-size: 0.62rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-4);
  padding: 8px 12px 4px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background var(--transition), color var(--transition);
  position: relative;
}
.nav-link:hover {
  background: var(--bg-hover);
  color: var(--text-1);
}
.nav-link.active {
  background: var(--red-subtle);
  color: var(--red-400);
}
.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 2px;
  background: var(--red-500);
  border-radius: 0 2px 2px 0;
}
.nav-link .bi { font-size: 1rem; flex-shrink: 0; }

.nav-badge {
  margin-left: auto;
  background: var(--red-500);
  color: #fff;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: 20px;
  font-weight: 500;
}
.nav-badge.pulse { animation: badge-pulse 2s ease-in-out infinite; }

@keyframes badge-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--red-glow); }
  50% { opacity: 0.85; box-shadow: 0 0 0 6px transparent; }
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-def);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-avatar {
  width: 32px; height: 32px;
  background: var(--bg-4);
  border: 1px solid var(--border-str);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-weight: 500;
  flex-shrink: 0;
}
.sidebar-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.sidebar-user-role {
  font-size: 0.65rem;
  color: var(--text-3);
  font-family: var(--font-mono);
  text-transform: uppercase;
}
.btn-logout {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
  flex-shrink: 0;
}
.btn-logout:hover { color: var(--red-400); }

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

.topbar {
  height: var(--topbar-h);
  background: var(--bg-1);
  border-bottom: 1px solid var(--border-def);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-breadcrumb {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-3);
}
.topbar-breadcrumb .crumb-current {
  color: var(--text-1);
  font-weight: 600;
}
.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px 8px;
}

.page-content {
  flex: 1;
  padding: 24px;
}

/* ── Page Header ─────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}
.page-title {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.04em;
  color: var(--text-1);
  line-height: 1;
}
.page-subtitle {
  font-size: 0.82rem;
  color: var(--text-3);
  font-family: var(--font-mono);
  margin-top: 2px;
}

/* ── Cards ───────────────────────────────────────── */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border-def);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-def);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--text-1);
}
.card-body { padding: 18px; }

/* ── Stat Cards ──────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border-def);
  border-radius: var(--radius);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}
.stat-card.red::after   { background: var(--red-500); }
.stat-card.green::after { background: var(--green); }
.stat-card.amber::after { background: var(--amber); }
.stat-card.blue::after  { background: var(--blue); }

.stat-label {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: 8px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--text-1);
}
.stat-sub {
  font-size: 0.75rem;
  color: var(--text-3);
  margin-top: 4px;
}

/* ── Tables ──────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.data-table th {
  background: var(--bg-3);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-def);
  white-space: nowrap;
  font-weight: 500;
}
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-sub);
  color: var(--text-2);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-hover); }

.data-table .mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.data-table .name {
  color: var(--text-1);
  font-weight: 600;
}

/* Pulsing row per allarmi OPEN */
.alarm-row-open {
  animation: row-pulse 3s ease-in-out infinite;
}
@keyframes row-pulse {
  0%, 100% { background: transparent; }
  50% { background: rgba(200,16,46,0.05); }
}

/* ── Status Badges ───────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.badge-open {
  background: var(--red-subtle);
  color: var(--red-400);
  border: 1px solid rgba(200,16,46,0.2);
}
.badge-open .badge-dot {
  background: var(--red-500);
  animation: dot-pulse 1.5s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--red-glow); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px transparent; }
}
.badge-acknowledged {
  background: var(--blue-sub);
  color: var(--blue);
  border: 1px solid rgba(59,130,246,0.2);
}
.badge-acknowledged .badge-dot { background: var(--blue); }
.badge-closed {
  background: var(--green-sub);
  color: var(--green);
  border: 1px solid rgba(16,185,129,0.2);
}
.badge-closed .badge-dot { background: var(--green); }

/* Trigger type pills */
.trigger-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 500;
  background: var(--bg-4);
  color: var(--text-2);
  border: 1px solid var(--border-def);
}
.trigger-pill.fall         { color: var(--red-400); border-color: rgba(200,16,46,0.2); }
.trigger-pill.stationary   { color: var(--amber);   border-color: rgba(245,158,11,0.2); }
.trigger-pill.manual       { color: var(--blue);    border-color: rgba(59,130,246,0.2); }

/* Device status */
.device-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
}
.device-dot.online  { background: var(--green); box-shadow: 0 0 6px var(--green); }
.device-dot.warning { background: var(--amber); }
.device-dot.offline { background: var(--text-4); }

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--red-500);
  color: #fff;
  border-color: var(--red-500);
}
.btn-primary:hover { background: var(--red-400); border-color: var(--red-400); }

.btn-outline {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border-str);
}
.btn-outline:hover { background: var(--bg-hover); color: var(--text-1); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-1); }

.btn-danger {
  background: transparent;
  color: var(--red-400);
  border-color: rgba(200,16,46,0.3);
}
.btn-danger:hover { background: var(--red-subtle); }

.btn-success {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.btn-sm { padding: 5px 10px; font-size: 0.8rem; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }
.btn-icon { padding: 7px 9px; }

/* ── Forms ───────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border-str);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--red-500);
  box-shadow: 0 0 0 3px var(--red-glow);
}
.form-control::placeholder { color: var(--text-4); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

.form-hint {
  font-size: 0.75rem;
  color: var(--text-3);
  margin-top: 4px;
  font-family: var(--font-mono);
}
.form-error {
  font-size: 0.75rem;
  color: var(--red-400);
  margin-top: 4px;
  font-family: var(--font-mono);
}

.form-section {
  background: var(--bg-3);
  border: 1px solid var(--border-def);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.form-section-title {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--text-2);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-def);
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

.toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-sub);
}
.toggle-wrap:last-child { border-bottom: none; }
.toggle-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-1);
}
.toggle-sub {
  font-size: 0.75rem;
  color: var(--text-3);
  font-family: var(--font-mono);
}

/* ── Alerts / Flash ──────────────────────────────── */
.alert {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  border: 1px solid;
}
.alert-success { background: var(--green-sub); color: var(--green); border-color: rgba(16,185,129,0.2); }
.alert-danger   { background: var(--red-subtle); color: var(--red-300); border-color: rgba(200,16,46,0.2); }
.alert-warning  { background: var(--amber-sub); color: var(--amber); border-color: rgba(245,158,11,0.2); }
.alert-info     { background: var(--blue-sub); color: var(--blue); border-color: rgba(59,130,246,0.2); }

/* ── Timeline (alarm detail) ─────────────────────── */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 0; bottom: 0;
  width: 1px;
  background: var(--border-str);
}
.timeline-item {
  position: relative;
  padding-bottom: 20px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -24px;
  top: 3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg-4);
  border: 2px solid var(--border-str);
  display: flex; align-items: center; justify-content: center;
}
.timeline-dot.created      { border-color: var(--blue);  background: var(--blue-sub); }
.timeline-dot.notified     { border-color: var(--amber); background: var(--amber-sub); }
.timeline-dot.clicked      { border-color: var(--text-3); }
.timeline-dot.acknowledged { border-color: var(--green); background: var(--green-sub); }
.timeline-dot.escalated    { border-color: var(--red-500); background: var(--red-subtle); }
.timeline-dot.closed       { border-color: var(--text-4); }

.timeline-time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-3);
  margin-bottom: 2px;
}
.timeline-event {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-1);
}
.timeline-actor {
  font-size: 0.8rem;
  color: var(--text-3);
}

/* ── Pagination ──────────────────────────────────── */
.pagination {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 16px;
}
.page-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-str);
  background: var(--bg-3);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
}
.page-btn:hover { background: var(--bg-hover); color: var(--text-1); }
.page-btn.active { background: var(--red-500); color: #fff; border-color: var(--red-500); }
.page-btn:disabled, .page-btn.disabled { opacity: 0.4; cursor: default; }

/* ── Filters ─────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  background: var(--bg-2);
  border: 1px solid var(--border-def);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.filter-bar .form-group { margin-bottom: 0; min-width: 140px; }
.filter-bar .form-control { font-size: 0.82rem; padding: 7px 10px; }
.filter-bar .form-label { font-size: 0.62rem; }

/* ── Login Page ──────────────────────────────────── */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-0);
  position: relative;
  overflow: hidden;
}
.login-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-sub) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-sub) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-2);
  border: 1px solid var(--border-str);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  position: relative;
  z-index: 1;
  box-shadow: 0 24px 64px rgba(0,0,0,0.7);
}
.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.login-logo-icon {
  width: 44px; height: 44px;
  background: var(--red-500);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.login-logo-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  color: var(--text-1);
  line-height: 1;
}
.login-logo-sub {
  font-size: 0.68rem;
  color: var(--text-3);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.login-heading {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.login-sub {
  font-size: 0.82rem;
  color: var(--text-3);
  margin-bottom: 24px;
  font-family: var(--font-mono);
}

/* ── ACK Page (mobile-first, light theme) ────────── */
.ack-shell {
  min-height: 100vh;
  background: #f8f8f8;
  font-family: var(--font-body);
  color: #1a1a1a;
}
.ack-header {
  background: #C8102E;
  color: #fff;
  padding: 24px 20px 20px;
  text-align: center;
}
.ack-header-icon {
  font-size: 2.5rem;
  margin-bottom: 6px;
  display: block;
  animation: shake 0.6s ease-in-out 0.5s 3;
}
@keyframes shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}
.ack-header-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}
.ack-header-sub {
  font-size: 0.82rem;
  opacity: 0.85;
  font-family: var(--font-mono);
}

.ack-body { padding: 20px; max-width: 480px; margin: 0 auto; }

.ack-info-card {
  background: #fff;
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.ack-info-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
}
.ack-info-row:last-child { border-bottom: none; }
.ack-info-label {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  min-width: 90px;
  flex-shrink: 0;
}
.ack-info-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a1a;
}
.ack-phone-link {
  font-size: 1.15rem;
  font-weight: 700;
  color: #C8102E;
  text-decoration: none;
}
.ack-phone-link:hover { text-decoration: underline; }
.ack-map-link {
  color: #3b82f6;
  font-size: 0.88rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-ack-confirm {
  display: block;
  width: 100%;
  background: #C8102E;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 20px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 150ms;
  text-align: center;
  box-shadow: 0 4px 20px rgba(200,16,46,0.35);
  margin-top: 8px;
}
.btn-ack-confirm:active { background: #a00d25; transform: scale(0.99); }

.ack-done-icon { font-size: 3rem; color: #10b981; display: block; text-align: center; margin-bottom: 12px; }
.ack-invalid-icon { font-size: 3rem; color: #aaa; display: block; text-align: center; margin-bottom: 12px; }

/* ── Misc Utilities ──────────────────────────────── */
.text-mono  { font-family: var(--font-mono); }
.text-muted { color: var(--text-3); }
.text-red   { color: var(--red-400); }
.text-green { color: var(--green); }
.text-amber { color: var(--amber); }
.text-right { text-align: right; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.fw-600 { font-weight: 600; }
.fs-sm { font-size: 0.82rem; }
.w-100 { width: 100%; }
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-3);
}
.empty-state-icon { font-size: 2.5rem; margin-bottom: 8px; display: block; }
.empty-state-text { font-size: 0.9rem; }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 32px rgba(0,0,0,0.6);
  }
  .main-wrap { margin-left: 0; }
  .hamburger { display: block; }
  .topbar { padding: 0 16px; }
  .page-content { padding: 16px; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .filter-bar { flex-direction: column; }
  .filter-bar .form-group { width: 100%; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .login-card { padding: 28px 20px; }
}

/* ── Sidebar overlay (mobile) ────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 199;
}
.sidebar-overlay.open { display: block; }
