/* ─────────────────────────────────────────────────────────────
   OB-W4tch3r — Minimalist Dark Design System (Pure Black & Zinc)
   ───────────────────────────────────────────────────────────── */

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

:root {
  --bg:          #000000;       /* Negro puro OLED */
  --bg-sidebar:  #000000;       /* Barra lateral negra pura */
  --bg-card:     #000000;       /* Tarjetas negras puras */
  --bg-card-solid: #000000;
  --bg-raised:   #080808;       /* Superficie oscura elevada */
  --bg-hover:    #121212;       /* Hover sutil */
  --border:      rgba(255, 255, 255, 0.12); /* Borde sutil y limpio */
  --border-h:    rgba(255, 255, 255, 0.25); /* Borde al pasar cursor */

  --accent:      #f4f4f5;       /* Primary contrast text/accent */
  --accent-cyan: #38bdf8;       /* Subtle status cyan */
  --green:       #22c55e;       /* Emerald approved */
  --red:         #ef4444;       /* Rose rejected */
  --yellow:      #eab308;       /* Amber pending */

  --text:        #f4f4f5;       /* Main text */
  --text-sub:    #a1a1aa;       /* Secondary text */
  --muted:       #71717a;       /* Muted helper text */

  --radius:      10px;
  --radius-sm:   6px;
  --shadow:      0 1px 3px 0 rgba(0, 0, 0, 0.4);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Sidebar ── */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 8px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.logo-text {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-text span {
  color: var(--muted);
  font-weight: 500;
}

.logo-sub {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 3px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sidebar-nav {
  padding: 16px 10px;
  flex: 1;
}

.nav-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 10px 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  transition: all 0.12s ease;
  margin-bottom: 2px;
  border-left: 2px solid transparent;
}

.nav-link:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.nav-link.active {
  background: var(--bg-raised);
  color: #fff;
  border-left-color: var(--text);
  font-weight: 600;
}

.nav-icon {
  font-size: 0.95rem;
  width: 18px;
  text-align: center;
  opacity: 0.85;
}

.sidebar-devices {
  padding: 12px;
  border-top: 1px solid var(--border);
}

.device-pill {
  display: block;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-sub);
  text-decoration: none;
  transition: all 0.12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.device-pill:hover, .device-pill.active {
  background: var(--bg-hover);
  color: var(--text);
}

.device-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 8px;
}

/* ── Main ── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background-color: #000000;
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.98)),
    url("/static/bg.webp");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.topbar-sub {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 1px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-live {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--green);
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  padding: 3px 10px;
  border-radius: 20px;
}

.badge-live::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

.btn-logout {
  font-size: 0.76rem;
  color: var(--muted);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all 0.12s;
}

.btn-logout:hover {
  border-color: var(--border-h);
  color: var(--text);
}

/* ── Content ── */
.content {
  padding: 24px 28px;
  flex: 1;
  overflow-y: auto;
}

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  position: relative;
  transition: border-color 0.15s;
}

.stat-card:hover {
  border-color: var(--border-h);
}

.stat-icon {
  font-size: 1.1rem;
  margin-bottom: 8px;
  display: inline-block;
  opacity: 0.8;
}

.stat-value {
  font-size: 1.7rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Grid 2 col ── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #000000;
}

.card-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.card-body {
  padding: 18px;
}

/* ── Tablas ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}

.data-table th {
  padding: 10px 14px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: #000000;
  white-space: nowrap;
}

.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
  color: var(--text);
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.event-badge {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-block;
}

.badge-open     { background: rgba(34, 197, 94, 0.1); color: var(--green); border: 1px solid rgba(34, 197, 94, 0.2); }
.badge-focus    { background: rgba(244, 244, 245, 0.08); color: #fff; border: 1px solid rgba(255, 255, 255, 0.15); }
.badge-close    { background: rgba(239, 68, 68, 0.1); color: var(--red); border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-suspend  { background: rgba(234, 179, 8, 0.12); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.25); }
.badge-resume   { background: rgba(59, 130, 246, 0.12); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.25); }
.badge-shutdown { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

.event-device {
  font-size: 0.7rem;
  color: var(--text-sub);
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── Top Apps & Durations ── */
.app-bar-item {
  margin-bottom: 12px;
}

.app-bar-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 0.8rem;
}

.app-bar-name {
  color: var(--text);
  font-weight: 500;
}

.app-bar-count {
  color: var(--text-sub);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
}

.app-bar-track {
  height: 4px;
  background: var(--bg-raised);
  border-radius: 2px;
  overflow: hidden;
}

.app-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: #f4f4f5;
  transition: width 0.4s ease;
}

/* ── Filters ── */
.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.filter-select:focus {
  border-color: var(--border-h);
}

/* ── Pagination ── */
.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
}

.page-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-sub);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  text-decoration: none;
  transition: all 0.12s;
}

.page-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--border-h);
}

/* ── Empty State ── */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.empty-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  opacity: 0.6;
}

.empty-text {
  font-size: 0.84rem;
}

/* ── Botón "Ver" en tablas ── */
.btn-ver-img {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}

.btn-ver-img:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

/* ══════════════════════════════════════════════════════════
   REPORTE DEL DÍA (Minimalist Black)
   ══════════════════════════════════════════════════════════ */

.report-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.report-stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.report-stat-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.report-stat-val {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: #fff;
}

.report-stat-val.ok   { color: var(--green); }
.report-stat-val.no   { color: var(--red); }
.report-stat-val.cyan { color: var(--accent-cyan); }

.report-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
}

.report-counts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.count-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--text-sub);
}

.count-ok   { border-color: rgba(34, 197, 94, 0.3); color: var(--green); background: rgba(34, 197, 94, 0.06); }
.count-no   { border-color: rgba(239, 68, 68, 0.3); color: var(--red); background: rgba(239, 68, 68, 0.06); }
.count-pend { border-color: var(--border); color: var(--muted); }

.report-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-bulk {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--text-sub);
  transition: all 0.12s;
  font-family: inherit;
}

.btn-bulk:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--border-h);
}

.btn-bulk-ok:hover  { border-color: var(--green); color: var(--green); }
.btn-bulk-no:hover  { border-color: var(--red); color: var(--red); }

.btn-bulk-pdf {
  background: #f4f4f5;
  color: #000000;
  border-color: #f4f4f5;
  font-weight: 700;
}

.btn-bulk-pdf:hover {
  background: #ffffff;
  color: #000;
  transform: translateY(-1px);
}

/* Filas del reporte */
.report-row {
  transition: background 0.1s;
}

.report-row.row-ok {
  background: rgba(34, 197, 94, 0.04) !important;
}

.report-row.row-no {
  background: rgba(239, 68, 68, 0.04) !important;
}

.report-row.row-ok td:first-child {
  border-left: 2px solid var(--green);
}

.report-row.row-no td:first-child {
  border-left: 2px solid var(--red);
}

/* Botones de estado ✅ / ❌ */
.status-cell {
  padding: 6px 10px !important;
}

.status-btns {
  display: flex;
  gap: 4px;
}

.status-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  font-size: 0.82rem;
  width: 28px;
  height: 26px;
  cursor: pointer;
  transition: all 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.35;
}

.status-btn:hover {
  opacity: 0.9;
  border-color: var(--border-h);
}

.s-ok.active {
  opacity: 1;
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.15);
}

.s-no.active {
  opacity: 1;
  border-color: var(--red);
  background: rgba(239, 68, 68, 0.15);
}

/* Botón cargar reporte */
.btn-report-load {
  padding: 7px 16px;
  background: #f4f4f5;
  border: 1px solid #f4f4f5;
  border-radius: var(--radius-sm);
  color: #000000;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}

.btn-report-load:hover {
  background: #ffffff;
}

/* Modal de imagen */
.img-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.img-modal-overlay.open {
  display: flex;
}

.img-modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 950px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
}

.img-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text-sub);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 0.9rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}

.img-modal-close:hover {
  color: #fff;
  border-color: var(--border-h);
}

.img-modal-body {
  display: flex;
  flex-direction: row;
  max-height: 90vh;
}

.img-modal-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #000;
}

.img-modal-img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
}

.btn-modal-ext {
  display: block;
  text-align: center;
  padding: 8px;
  font-size: 0.74rem;
  color: var(--text-sub);
  text-decoration: none;
  border-top: 1px solid var(--border);
}

.btn-modal-ext:hover {
  color: #fff;
}

.img-modal-info {
  width: 260px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.img-modal-app-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.imd-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
}

.imd-val {
  font-size: 0.78rem;
  color: var(--text);
  word-break: break-word;
  font-family: 'JetBrains Mono', monospace;
}

/* ── Keystrokes ── */
.keystroke-item {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
}

.ks-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.74rem;
}

.ks-proc {
  color: #fff;
  font-weight: 600;
}

.ks-device {
  color: var(--text-sub);
  background: var(--bg-raised);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
}

.ks-time {
  color: var(--muted);
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
}

.ks-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text);
  word-break: break-all;
  line-height: 1.5;
  background: #000;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid #1c1c20;
}

/* ── Device cards (Dashboard) ── */
.devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.device-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: all 0.15s ease;
  color: inherit;
}

.device-card:hover {
  border-color: var(--border-h);
  background: var(--bg-hover);
  transform: translateY(-2px);
}

.device-card.active {
  border-color: #f4f4f5;
  background: var(--bg-raised);
}

.device-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.device-last {
  font-size: 0.72rem;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 14px;
}

.device-stats {
  display: flex;
  gap: 16px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #1c1c20;
}

.dstat {
  text-align: left;
}

.dstat-num {
  font-size: 1.05rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: #fff;
  line-height: 1.1;
}

.dstat-label {
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* ── Chart wrap ── */
.chart-wrap {
  position: relative;
  height: 200px;
  width: 100%;
}

/* ── Dashboard Event List ── */
.event-list {
  display: flex;
  flex-direction: column;
}

.event-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  transition: background 0.1s;
}

.event-item:last-child {
  border-bottom: none;
}

.event-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.event-proc {
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  min-width: 130px;
  display: flex;
  align-items: center;
}

.event-title {
  flex: 1;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.event-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: auto;
  white-space: nowrap;
}

/* ── Screenshots Grid ── */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.shot-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
}

.shot-card:hover {
  border-color: var(--border-h);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.shot-img, .shot-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: #000;
  border-bottom: 1px solid var(--border);
}

.shot-info {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.shot-proc, .shot-app {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shot-device {
  font-size: 0.7rem;
  color: var(--text-sub);
  font-family: 'JetBrains Mono', monospace;
}

.shot-title {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shot-time {
  font-size: 0.7rem;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 4px;
}

/* ── Lightbox (Screenshots Module) ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  background: #000;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 24px;
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  opacity: 0.75;
  transition: all 0.15s;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  z-index: 1001;
}

.lightbox-close:hover {
  opacity: 1;
  border-color: var(--border-h);
  background: var(--bg-hover);
}

.lightbox-footer {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.lightbox-link {
  font-size: 0.75rem;
  color: var(--text-sub);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all 0.12s;
}

.lightbox-link:hover {
  color: #fff;
  border-color: var(--border-h);
  background: var(--bg-hover);
}

/* ── Login Page ── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000000;
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.98)),
    url("/static/bg.webp");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
  padding: 20px;
}

.login-card {
  background: #000000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 38px 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.95);
}

.login-logo {
  text-align: center;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-brand-logo {
  width: 68px;
  height: 68px;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.6));
}

.login-logo-text {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.login-logo-sub {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 9px 12px;
  font-size: 0.86rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus {
  border-color: var(--border-h);
}

.btn-primary {
  width: 100%;
  padding: 10px;
  background: #f4f4f5;
  color: #000000;
  border: 1px solid #f4f4f5;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
  margin-top: 6px;
}

.btn-primary:hover {
  background: #ffffff;
}

.login-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--red);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.78rem;
  margin-bottom: 16px;
  text-align: center;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .report-summary-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 10px;
  }
  .sidebar-devices {
    display: none;
  }
  .topbar {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .content {
    padding: 16px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .devices-grid {
    grid-template-columns: 1fr;
  }
  .report-summary-cards {
    grid-template-columns: 1fr;
  }
  .img-modal-body {
    flex-direction: column;
  }
  .img-modal-info {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: 200px;
  }
}

/* ─────────────────────────────────────────────────────────────
   SHADCN / RADIX STYLE TEAM SWITCHER & DEVICE NAVIGATION
   ───────────────────────────────────────────────────────────── */

.team-switcher-wrapper {
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--border);
}

.team-switcher {
  position: relative;
  width: 100%;
}

.team-switcher-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  font-family: inherit;
}

.team-switcher-trigger:hover,
.team-switcher-trigger[aria-expanded="true"] {
  background: var(--bg-hover);
  border-color: var(--border-h);
}

.team-switcher-avatar {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #000;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.team-switcher-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.team-switcher-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-switcher-sub {
  font-size: 0.65rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
}

.team-switcher-arrows {
  color: var(--muted);
  flex-shrink: 0;
  opacity: 0.7;
}

.team-switcher-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 250px;
  background: #000000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-h);
  border-radius: var(--radius);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
  z-index: 100;
  padding: 6px;
  display: none;
  animation: popoverFade 0.15s ease-out;
}

.team-switcher-popover.open {
  display: block;
}

@keyframes popoverFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.popover-header {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 6px 8px 4px;
}

.popover-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-sub);
  transition: all 0.12s ease;
  font-size: 0.78rem;
}

.popover-item:hover {
  background: var(--bg-hover);
  color: #fff;
}

.popover-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.popover-item-icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--muted);
}

.popover-item.active .popover-item-icon {
  color: #fff;
}

.popover-item-info {
  flex: 1;
  min-width: 0;
}

.popover-item-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.popover-item-sub {
  font-size: 0.65rem;
  color: var(--muted);
}

.popover-item-check {
  color: var(--green);
  flex-shrink: 0;
}

.popover-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.dot-online {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

.status-dot-pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
}

.status-dot-pulse.inline {
  display: inline-block;
  margin-right: 4px;
}

/* ── Topbar Quick Selector ── */
.topbar-device-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
  font-size: 0.78rem;
  font-family: inherit;
  transition: all 0.12s ease;
}

.topbar-device-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-h);
}

.topbar-device-name {
  font-weight: 600;
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─────────────────────────────────────────────────────────────
   DASHBOARD DESKTOP REDESIGN (Clean, Balanced & Organized)
   ───────────────────────────────────────────────────────────── */

.dash-hero-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.dash-hero-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}

.dash-hero-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 3px 0 4px;
}

.dash-hero-meta {
  font-size: 0.78rem;
  color: var(--text-sub);
}

.dash-hero-meta b {
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
}

.dash-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.12s ease;
  white-space: nowrap;
}

.dash-btn-primary {
  background: #ffffff;
  color: #000000;
}

.dash-btn-primary:hover {
  background: #e4e4e7;
}

.dash-btn-secondary {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text);
}

.dash-btn-secondary:hover {
  border-color: var(--border-h);
  color: #fff;
}

/* ── 4 Metrics Grid ── */
.dash-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.metric-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease;
}

.metric-card:hover {
  border-color: var(--border-h);
}

.metric-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metric-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.metric-tag {
  font-size: 0.64rem;
  font-family: 'JetBrains Mono', monospace;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-sub);
}

.metric-val {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 6px 0 4px;
}

.metric-sub {
  font-size: 0.7rem;
  color: var(--muted);
}

/* ── Desktop Split Grid ── */
.dash-desktop-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 24px;
}

.dash-col-left,
.dash-col-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card-subtitle {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2px;
}

.card-header-link {
  font-size: 0.75rem;
  color: var(--text-sub);
  text-decoration: none;
  transition: all 0.12s;
}

.card-header-link:hover {
  color: #fff;
}

.chart-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-select-sm {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

.filter-select-sm:focus {
  border-color: var(--border-h);
}

.date-badge-fixed {
  font-size: 0.72rem;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}

.card-table-wrap {
  overflow-x: auto;
}

.cell-truncate {
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty-cell {
  text-align: center;
  padding: 24px !important;
}

/* ── App Ranking ── */
.app-rank-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-rank-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app-rank-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}

.app-rank-name {
  font-weight: 600;
  color: #fff;
}

.app-rank-count {
  font-size: 0.72rem;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}

.app-rank-bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.app-rank-fill {
  height: 100%;
  border-radius: 3px;
  background: #f4f4f5;
  transition: width 0.3s ease;
}

/* ── Shots Thumbnail Grid ── */
.dash-shots-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dash-shot-thumb {
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #000;
}

.dash-shot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.dash-shot-thumb:hover img {
  transform: scale(1.06);
}

.dash-shot-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 6px 8px;
  font-size: 0.68rem;
  color: #fff;
}

.dash-shot-overlay span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Device Technical Specs ── */
.spec-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.spec-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.spec-label {
  color: var(--muted);
}

.spec-value {
  color: #fff;
  font-weight: 500;
}

.spec-value.mono {
  font-family: 'JetBrains Mono', monospace;
}

.status-online-text {
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 6px;
}

.empty-card-body {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 0.78rem;
}

/* ─────────────────────────────────────────────────────────────
   PANTALLA DE SELECCIÓN DE DISPOSITIVO POST-LOGIN (/select-device)
   ───────────────────────────────────────────────────────────── */

.select-device-container {
  width: 100%;
  max-width: 600px;
  background: #000000;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px 24px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.95);
  margin: 20px auto;
}

.select-eye-header {
  text-align: center;
  margin-bottom: 22px;
}

.select-eye-wrap {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  border: 2.5px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.95), 0 0 20px rgba(56, 189, 248, 0.25);
  background: #000;
  margin: 0 auto 16px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.select-eye-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
}

.select-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 5px;
}

.select-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 480px;
  margin: 0 auto;
}

.device-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.device-pick-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  user-select: none;
}

.device-pick-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-h);
  transform: translateY(-2px);
}

.device-pick-card.selected {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.08);
}

.device-radio {
  display: none;
}

.pick-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.pick-card-icon {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: #000;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.15s;
}

.pick-card-icon svg {
  width: 14px;
  height: 14px;
}

.device-pick-card.selected .pick-card-icon {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.pick-card-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all 0.12s;
}

.pick-card-check svg {
  width: 11px;
  height: 11px;
}

.device-pick-card.selected .pick-card-check {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.pick-card-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pick-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.67rem;
}

.pick-badge {
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
}

.pick-last {
  color: var(--text-sub);
  font-size: 0.63rem;
}

.device-pick-actions {
  display: flex;
  justify-content: center;
}

.pick-submit-btn {
  width: 100%;
  max-width: 280px;
  padding: 10px 20px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

/* ── Centinela Dashboard Card ── */
.sentinel-card {
  position: relative;
  overflow: hidden;
}

.sentinel-badge {
  font-size: 0.65rem;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
  color: var(--green);
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  padding: 2px 8px;
  border-radius: 12px;
}

.sentinel-body {
  text-align: center;
  padding: 20px 18px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sentinel-eye-wrap {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.9), 0 0 10px rgba(56, 189, 248, 0.15);
  background: #000;
  margin-bottom: 12px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sentinel-eye-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.18);
}

.sentinel-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.sentinel-desc {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 280px;
}

.sentinel-desc b {
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
}

/* ══════════════════════════════════════════════════════════
   SONNER / TOAST NOTIFICATIONS (shadcn aesthetic)
   ══════════════════════════════════════════════════════════ */
.sonner-toaster {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10000;
  pointer-events: none;
  max-width: 420px;
  width: calc(100vw - 48px);
}

.sonner-toast {
  pointer-events: auto;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.95), 0 0 16px rgba(255, 255, 255, 0.04);
  animation: sonnerSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 0.2s ease, opacity 0.2s ease;
  user-select: none;
}

.sonner-toast.sonner-leave {
  animation: sonnerSlideOut 0.22s ease-in forwards;
}

.sonner-icon-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.sonner-content {
  flex: 1;
  min-width: 0;
}

.sonner-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.35;
  margin-bottom: 2px;
}

.sonner-desc {
  font-size: 0.77rem;
  color: var(--muted);
  line-height: 1.45;
  word-break: break-word;
}

.sonner-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  margin-top: -2px;
  transition: color 0.15s ease;
}

.sonner-close:hover {
  color: #ffffff;
}

.sonner-toast.sonner-warning {
  border-left: 3px solid var(--yellow);
}

.sonner-toast.sonner-error {
  border-left: 3px solid var(--red);
}

.sonner-toast.sonner-success {
  border-left: 3px solid var(--green);
}

.sonner-toast.sonner-info {
  border-left: 3px solid var(--accent-cyan);
}

@keyframes sonnerSlideIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes sonnerSlideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(14px) scale(0.94);
  }
}

@media (max-width: 640px) {
  .sonner-toaster {
    bottom: 16px;
    right: 16px;
    left: 16px;
    width: auto;
    max-width: none;
  }
}

