/* ═══════════════════════════════════════════════════════════════════
   Device Admin Panel — Design System
   Dark glassmorphism theme with vibrant accent colors
═══════════════════════════════════════════════════════════════════ */

/* ─── CSS Variables ─────────────────────────────────────────────── */
:root {
  --bg-base:       #0a0e1a;
  --bg-surface:    #111827;
  --bg-card:       rgba(255,255,255,0.04);
  --glass-border:  rgba(255,255,255,0.08);
  --glass-blur:    20px;

  --accent-blue:   #3b82f6;
  --accent-green:  #10b981;
  --accent-red:    #ef4444;
  --accent-purple: #8b5cf6;
  --accent-orange: #f59e0b;

  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #475569;

  --sidebar-w: 240px;
  --topbar-h:  60px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-md: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.6);

  --transition: 0.2s ease;
}

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

html { font-size: 16px; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 99px; }

/* ═══════════════════════════════════════════════════════════════════
   UTILITIES
═══════════════════════════════════════════════════════════════════ */
.hidden { display: none !important; }

.glass {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
}

/* ─── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), #6366f1);
  color: #fff;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(59,130,246,0.4); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--glass-border); }
.btn-ghost:hover { background: var(--bg-card); color: var(--text-primary); }
.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-danger { background: var(--accent-red); color: #fff; }
.btn-danger:hover { opacity: 0.85; }

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.btn-icon:hover { background: var(--bg-card); color: var(--text-primary); }
.btn-icon svg { width: 18px; height: 18px; }

/* ─── Alerts ────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.alert-error   { background: rgba(239,68,68,0.15);  border: 1px solid rgba(239,68,68,0.3);  color: #fca5a5; }
.alert-success { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }
.alert-info    { background: rgba(59,130,246,0.15); border: 1px solid rgba(59,130,246,0.3); color: #93c5fd; }

/* ─── Cards ─────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* ─── Forms ─────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 1rem; }
.form-group label { font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

input[type="text"],
input[type="password"],
input[type="date"],
input[type="email"],
textarea,
select {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 10px 14px;
  transition: border-color var(--transition);
  outline: none;
  width: 100%;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent-blue); }
input::placeholder { color: var(--text-muted); }

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrapper input { padding-left: 40px; }
.input-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.pw-toggle {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-muted);
}
.pw-toggle:hover { color: var(--text-primary); }
.pw-toggle svg { width: 16px; height: 16px; }

/* ─── Spinner ───────────────────────────────────────────────────── */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Badge ─────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
}

/* ─── Status Dots ───────────────────────────────────────────────── */
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.dot.online  { background: var(--accent-green); box-shadow: 0 0 6px var(--accent-green); }
.dot.offline { background: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════════════════════════ */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
  background: radial-gradient(ellipse at 30% 20%, rgba(59,130,246,0.12) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 80%, rgba(139,92,246,0.10) 0%, transparent 50%),
              var(--bg-base);
}

/* Animated particles */
.bg-particles {
  position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
}
.bg-particles span {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  animation: float 8s infinite ease-in-out;
}
.bg-particles span:nth-child(1)  { width: 300px; height: 300px; background: var(--accent-blue);   top: 10%;  left: 5%;  animation-delay: 0s;   animation-duration: 10s; }
.bg-particles span:nth-child(2)  { width: 200px; height: 200px; background: var(--accent-purple); top: 70%;  left: 80%; animation-delay: 2s;   animation-duration: 12s; }
.bg-particles span:nth-child(3)  { width: 150px; height: 150px; background: var(--accent-green);  top: 40%;  left: 60%; animation-delay: 4s;   animation-duration: 8s;  }
.bg-particles span:nth-child(4)  { width: 100px; height: 100px; background: var(--accent-blue);   top: 85%;  left: 10%; animation-delay: 1s;   animation-duration: 14s; }
.bg-particles span:nth-child(5)  { width: 80px;  height: 80px;  background: var(--accent-orange); top: 20%;  left: 75%; animation-delay: 3s;   animation-duration: 9s;  }
.bg-particles span:nth-child(6)  { width: 60px;  height: 60px;  background: var(--accent-purple); top: 60%;  left: 30%; animation-delay: 5s;   animation-duration: 11s; }
.bg-particles span:nth-child(7)  { width: 120px; height: 120px; background: var(--accent-blue);   top: 5%;   left: 50%; animation-delay: 6s;   animation-duration: 13s; }
.bg-particles span:nth-child(8)  { width: 90px;  height: 90px;  background: var(--accent-green);  top: 50%;  left: 90%; animation-delay: 0.5s; animation-duration: 7s;  }

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-30px) scale(1.05); }
}

.login-wrapper {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  width: 100%; max-width: 420px;
}

.brand { text-align: center; }
.brand-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-blue), #6366f1);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  box-shadow: 0 8px 24px rgba(59,130,246,0.4);
}
.brand-icon svg { width: 26px; height: 26px; color: #fff; }
.brand-icon.small { width: 36px; height: 36px; border-radius: 10px; margin: 0; }
.brand-icon.small svg { width: 18px; height: 18px; }
.brand h1 { font-size: 1.4rem; font-weight: 700; color: var(--text-primary); }
.brand p  { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

.login-card {
  width: 100%;
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
}
.login-card h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.login-card .subtitle { color: var(--text-secondary); font-size: 0.875rem; margin-bottom: 28px; }
.login-footer { margin-top: 20px; text-align: center; }

/* ═══════════════════════════════════════════════════════════════════
   DASHBOARD LAYOUT
═══════════════════════════════════════════════════════════════════ */
.dashboard-page {
  display: flex;
  min-height: 100vh;
  background: radial-gradient(ellipse at 10% 10%, rgba(59,130,246,0.07) 0%, transparent 40%),
              var(--bg-base);
}

/* ─── Sidebar ───────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: rgba(17,24,39,0.8);
  border-right: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}
.sidebar.collapsed { transform: translateX(calc(-1 * var(--sidebar-w))); }

.sidebar-header {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--glass-border);
}
.brand-name { font-size: 1rem; font-weight: 700; color: var(--text-primary); }

.sidebar-nav { flex: 1; padding: 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: var(--bg-card); color: var(--text-primary); }
.nav-item.active { background: rgba(59,130,246,0.15); color: var(--accent-blue); }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--glass-border);
  display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem; font-weight: 600; flex-shrink: 0;
}
.admin-name { font-size: 0.85rem; font-weight: 600; }
.admin-role { font-size: 0.72rem; color: var(--text-muted); }
.logout-btn { margin-left: auto; }

/* ─── Main Content ──────────────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}
.main-content.full { margin-left: 0; }

/* ─── Topbar ────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: rgba(17,24,39,0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-size: 1rem; font-weight: 600; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.ws-status { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--text-muted); }
.time-display { font-size: 0.8rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ─── Sections ──────────────────────────────────────────────────── */
.section { display: none; padding: 28px 28px; animation: fadeIn 0.3s ease; }
.section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.section-heading {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.section-heading.no-margin { margin-bottom: 0; }

.section-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}

/* ─── Stats Grid ────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.blue   { background: rgba(59,130,246,0.15); color: var(--accent-blue); }
.stat-icon.green  { background: rgba(16,185,129,0.15); color: var(--accent-green); }
.stat-icon.red    { background: rgba(239,68,68,0.15);  color: var(--accent-red); }
.stat-icon.purple { background: rgba(139,92,246,0.15); color: var(--accent-purple); }
.stat-value { font-size: 1.8rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

/* ─── Device List ───────────────────────────────────────────────── */
.device-list { display: flex; flex-direction: column; }

.device-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--transition);
}
.device-row:last-child { border-bottom: none; }
.device-row:hover { background: rgba(255,255,255,0.02); }

.device-avatar {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(59,130,246,0.3), rgba(139,92,246,0.3));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.device-meta { flex: 1; min-width: 0; }
.device-name { font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.device-sub  { font-size: 0.77rem; color: var(--text-muted); margin-top: 2px; }
.device-tags { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.tag {
  font-size: 0.7rem; font-weight: 500; padding: 3px 8px; border-radius: 99px;
}
.tag-online  { background: rgba(16,185,129,0.15); color: var(--accent-green); }
.tag-offline { background: rgba(100,116,139,0.15); color: var(--text-muted); }
.tag-expired { background: rgba(239,68,68,0.15);  color: var(--accent-red); }

.device-actions { display: flex; gap: 4px; }

.empty-state {
  text-align: center; padding: 48px 24px; color: var(--text-muted);
}
.empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.3; }
.empty-state p { font-size: 0.875rem; }

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

.config-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
}
.config-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.config-user-id { font-size: 1rem; font-weight: 700; }
.config-status { font-size: 0.72rem; padding: 3px 10px; border-radius: 99px; font-weight: 500; }
.config-status.active   { background: rgba(16,185,129,0.15); color: var(--accent-green); }
.config-status.expired  { background: rgba(239,68,68,0.15);  color: var(--accent-red); }
.config-field { display: flex; justify-content: space-between; font-size: 0.8rem; padding: 5px 0; border-bottom: 1px solid var(--glass-border); }
.config-field:last-of-type { border-bottom: none; }
.config-field-label { color: var(--text-muted); }
.config-field-value { color: var(--text-primary); font-weight: 500; text-align: right; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.config-card-actions { display: flex; gap: 8px; margin-top: 14px; }

/* ─── Feature Toggles ───────────────────────────────────────────── */
.toggle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 1rem; }
.toggle-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; color: var(--text-secondary); cursor: pointer;
  padding: 8px 10px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.toggle-label:hover { background: var(--bg-card); }
.toggle-label input[type="checkbox"] { accent-color: var(--accent-blue); width: 14px; height: 14px; }

/* ─── Modal ─────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal {
  width: 100%; max-width: 620px;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-header h3 { font-size: 1.1rem; font-weight: 700; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ─── Real-time Log ─────────────────────────────────────────────── */
.realtime-log {
  padding: 16px 20px;
  min-height: 300px;
  max-height: 500px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.log-placeholder { color: var(--text-muted); font-size: 0.875rem; }
.log-entry {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.82rem;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  border-left: 3px solid var(--glass-border);
  animation: slideIn 0.2s ease;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
.log-entry.online  { border-left-color: var(--accent-green); }
.log-entry.offline { border-left-color: var(--text-muted); }
.log-entry.config  { border-left-color: var(--accent-purple); }
.log-time { color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.log-msg  { color: var(--text-secondary); flex: 1; }

/* ─── WebSocket Status ──────────────────────────────────────────── */
.ws-status .dot.online  { animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ═══════════════════════════════════════════════════════════════════
   DEVICE DETAIL DRAWER
═══════════════════════════════════════════════════════════════════ */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(700px, 100vw);
  background: var(--bg-surface);
  border-left: 1px solid var(--glass-border);
  z-index: 301;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -8px 0 40px rgba(0,0,0,0.5);
}
.drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.drawer-title { display: flex; align-items: center; gap: 14px; }
.drawer-device-name { font-size: 1.05rem; font-weight: 700; }
.drawer-device-sub  { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

/* ─── Action Bar ────────────────────────────────────────────────── */
.action-bar {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 14px 24px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
  background: rgba(255,255,255,0.02);
}
.action-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
  font-size: 0.8rem; font-weight: 500; cursor: pointer;
  transition: all var(--transition);
}
.action-btn:hover { background: rgba(59,130,246,0.15); border-color: var(--accent-blue); color: var(--accent-blue); }
.action-btn.danger:hover { background: rgba(239,68,68,0.15); border-color: var(--accent-red); color: var(--accent-red); }

/* ─── Tab Bar ───────────────────────────────────────────────────── */
.drawer-tabs {
  display: flex; gap: 2px;
  padding: 10px 16px 0;
  border-bottom: 1px solid var(--glass-border);
  overflow-x: auto; flex-shrink: 0;
}
.dtab {
  padding: 8px 14px;
  border: none; background: none; cursor: pointer;
  color: var(--text-muted); font-size: 0.82rem; font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all var(--transition); white-space: nowrap;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.dtab:hover  { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.dtab.active { color: var(--accent-blue); border-bottom-color: var(--accent-blue); }

/* ─── Drawer Body ───────────────────────────────────────────────── */
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 24px; }

.loading-spinner-wrap {
  display: flex; align-items: center; justify-content: center;
  height: 120px;
}

/* ─── Data Tables (SMS, Calls, Contacts, Notifications) ───────────  */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.data-table th {
  text-align: left; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted); font-weight: 600;
  padding: 8px 12px; border-bottom: 1px solid var(--glass-border);
}
.data-table td {
  padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-secondary); vertical-align: top;
}
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.data-table td:first-child { color: var(--text-primary); }
.data-count { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 10px; }

.sms-body { max-width: 300px; white-space: pre-wrap; word-break: break-word; font-size: 0.8rem; line-height: 1.4; }
.direction-in  { color: var(--accent-green); font-size: 0.72rem; }
.direction-out { color: var(--accent-blue);  font-size: 0.72rem; }

/* ─── Info Grid (Device / SIM) ──────────────────────────────────── */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.info-card {
  background: var(--bg-card); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); padding: 14px;
}
.info-card-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.info-card-value { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); word-break: break-all; }

/* ─── Command Results ───────────────────────────────────────────── */
.cmd-result-item {
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid var(--glass-border);
  margin-bottom: 8px; font-size: 0.82rem;
}
.cmd-result-type { font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.cmd-result-body { color: var(--text-secondary); white-space: pre-wrap; }
.cmd-result-time { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }
.cmd-result-item.success { border-left: 3px solid var(--accent-green); }
.cmd-result-item.error   { border-left: 3px solid var(--accent-red); }

/* ─── Command Prompt Modal ──────────────────────────────────────── */
.cmd-modal-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.cmd-modal {
  width: 100%; max-width: 400px;
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-lg);
}
.cmd-modal h4 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; }

/* \u2500\u2500\u2500 Trash Bin \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
.trash-badge {
  margin-left: auto;
  background: var(--accent-red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 99px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s infinite;
}
.trash-row { opacity: 0.85; }
.trash-row:hover { opacity: 1; }

