/* ============================================================
   OTP HUB — Premium Cyberpunk CSS
   ============================================================ */

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

:root {
  --accent: #00ff88;
  --accent-dim: rgba(0, 255, 136, 0.15);
  --accent-glow: rgba(0, 255, 136, 0.4);
  --red: #ff4757;
  --red-dim: rgba(255, 71, 87, 0.15);
  --blue: #3d9eff;
  --blue-dim: rgba(61, 158, 255, 0.15);
  --bg: #080c10;
  --bg2: #0d1117;
  --bg3: #121820;
  --surface: rgba(255,255,255,0.03);
  --surface2: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.07);
  --border-accent: rgba(0, 255, 136, 0.25);
  --text: #e8edf3;
  --text2: #7f8b99;
  --text3: #4a5568;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.5);
  --shadow-accent: 0 0 30px rgba(0, 255, 136, 0.12);
  --font-main: 'Inter', sans-serif;
  --font-title: 'Orbitron', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── Animated Background ── */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: 
    linear-gradient(rgba(0,255,136,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,136,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.bg-glow {
  position: fixed; border-radius: 50%; pointer-events: none; z-index: 0;
  filter: blur(120px); opacity: 0.12; animation: glowPulse 8s ease-in-out infinite alternate;
}
.bg-glow-1 { width: 600px; height: 600px; background: #00ff88; top: -200px; left: -150px; }
.bg-glow-2 { width: 500px; height: 500px; background: #3d9eff; top: 40%; right: -150px; animation-delay: -3s; }
.bg-glow-3 { width: 400px; height: 400px; background: #9b59b6; bottom: -100px; left: 30%; animation-delay: -6s; }

@keyframes glowPulse { from { opacity: 0.08; } to { opacity: 0.18; } }

/* ── Header ── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8, 12, 16, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.header-inner {
  display: flex; align-items: center; gap: 20px;
  height: 60px; max-width: 1600px; margin: 0 auto;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 36px; height: 36px; background: var(--accent-dim);
  border: 1px solid var(--border-accent); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-accent);
}
.logo-text {
  font-family: var(--font-title); font-size: 1.2rem; font-weight: 700;
  color: var(--text); letter-spacing: 2px;
}
.logo-text .accent { color: var(--accent); }
.logo-badge {
  font-size: 0.65rem; background: var(--accent-dim); color: var(--accent);
  border: 1px solid var(--border-accent); border-radius: 4px;
  padding: 1px 6px; font-family: var(--font-mono); letter-spacing: 1px;
}

.header-stats { display: flex; gap: 10px; margin-left: 20px; }
.stat-pill {
  display: flex; align-items: center; gap: 7px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 12px;
  font-size: 0.78rem; color: var(--text2); font-family: var(--font-mono);
}
.stat-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--text3);
}
.stat-dot.pulse {
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: dotPulse 1.5s ease-in-out infinite;
}
@keyframes dotPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.status-bar {
  margin-left: auto; font-size: 0.75rem; color: var(--text2);
  font-family: var(--font-mono); max-width: 350px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Tab Nav ── */
.tab-nav {
  display: flex; gap: 4px; padding: 12px 24px 0;
  background: var(--bg2); border-bottom: 1px solid var(--border);
  position: sticky; top: 60px; z-index: 90;
  max-width: 100%;
}
.tab-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 22px; border: none; cursor: pointer;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.5px;
  font-family: var(--font-main); border-radius: var(--radius) var(--radius) 0 0;
  background: transparent; color: var(--text2);
  transition: all 0.2s; position: relative;
  text-transform: uppercase;
}
.tab-btn:hover { color: var(--text); background: var(--surface); }
.tab-btn.active {
  color: var(--accent); background: var(--accent-dim);
  border: 1px solid var(--border-accent); border-bottom: none;
}
.tab-btn.active::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 2px; background: var(--accent);
}

/* ── Main Layout ── */
.main {
  position: relative; z-index: 1;
  max-width: 1600px; margin: 0 auto;
  padding: 24px; min-height: calc(100vh - 120px);
}

.tab-panel { display: none; animation: fadeIn 0.3s ease; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Panel Grid ── */
.panel-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
}

/* ── Panel Card ── */
.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  transition: border-color 0.3s;
}
.panel-card:hover { border-color: var(--border-accent); }
.panel-card.full-panel { width: 100%; }

.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.panel-title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-title); font-size: 0.85rem;
  font-weight: 600; letter-spacing: 1px; color: var(--text);
}
.panel-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer;
  font-size: 0.78rem; font-weight: 600; font-family: var(--font-main);
  background: var(--surface2); color: var(--text);
  transition: all 0.2s; text-transform: uppercase; letter-spacing: 0.5px;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.btn:active { transform: translateY(0); }

.btn-ghost { background: transparent; border-color: var(--border); color: var(--text2); }
.btn-ghost:hover { color: var(--accent); border-color: var(--border-accent); background: var(--accent-dim); }

.btn-danger { background: var(--red-dim); border-color: rgba(255,71,87,0.3); color: var(--red); }
.btn-danger:hover { background: rgba(255,71,87,0.25); box-shadow: 0 4px 16px rgba(255,71,87,0.2); }

.btn-success { background: var(--accent-dim); border-color: var(--border-accent); color: var(--accent); }
.btn-success:hover { background: rgba(0,255,136,0.25); box-shadow: 0 4px 16px var(--accent-glow); }

.btn-sm { padding: 6px 12px; font-size: 0.72rem; }

.btn-launch {
  width: 100%; padding: 16px; margin-top: 20px;
  background: linear-gradient(135deg, #00ff88, #00c96a);
  color: #000; border: none; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 700; font-family: var(--font-title);
  letter-spacing: 2px; cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(0,255,136,0.3);
  position: relative; overflow: hidden;
}
.btn-launch::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.btn-launch:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,255,136,0.5); }
.btn-launch:hover::before { opacity: 1; }
.btn-launch:disabled { background: #333; color: #666; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-launch.compact-send { width: auto; padding: 10px 20px; margin-top: 0; font-size: 0.8rem; letter-spacing: 1px; }

.btn-row { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* ── Search ── */
.search-box {
  position: relative; margin-bottom: 12px;
  display: flex; align-items: center;
}
.search-icon { position: absolute; left: 12px; color: var(--text2); pointer-events: none; }
.search-input {
  width: 100%; padding: 10px 12px 10px 36px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-size: 0.82rem; font-family: var(--font-main);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.search-input:focus { border-color: var(--border-accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.search-input::placeholder { color: var(--text3); }

/* ── Filter Pills ── */
.filter-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.filter-pill {
  padding: 4px 14px; border: 1px solid var(--border);
  border-radius: 20px; background: transparent;
  color: var(--text2); cursor: pointer; font-size: 0.75rem;
  font-weight: 500; transition: all 0.2s;
}
.filter-pill:hover { border-color: var(--border-accent); color: var(--accent); }
.filter-pill.active { background: var(--accent-dim); border-color: var(--border-accent); color: var(--accent); }
.filter-counts { margin-left: auto; display: flex; gap: 8px; }

.count-badge {
  font-size: 0.72rem; font-family: var(--font-mono);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 20px; padding: 3px 10px; color: var(--text2);
}
.count-badge.online { color: var(--accent); border-color: var(--border-accent); background: var(--accent-dim); }

/* ── Tables ── */
.table-wrap {
  overflow: auto; border-radius: var(--radius);
  border: 1px solid var(--border);
  max-height: 320px;
}
.logs-table-wrap { max-height: 380px; }
.modal-table-wrap { max-height: 280px; }

.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.78rem; min-width: 500px;
}
.data-table thead { position: sticky; top: 0; z-index: 2; }
.data-table th {
  background: var(--bg3); color: var(--text2);
  padding: 10px 14px; text-align: left;
  font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; font-size: 0.7rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  color: var(--text); font-family: var(--font-mono);
  font-size: 0.75rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 240px;
}
.data-table tbody tr { cursor: pointer; transition: background 0.15s; }
.data-table tbody tr:hover { background: var(--surface2); }
.data-table tbody tr.selected { background: var(--accent-dim) !important; }
.data-table tbody tr.muted td { color: var(--text3); }
.data-table tbody tr.muted td:nth-child(5) { color: var(--red); }
.empty-row td {
  text-align: center; color: var(--text3); padding: 40px;
  font-family: var(--font-main); font-size: 0.8rem;
}

.status-online { color: var(--accent); font-weight: 600; }
.status-offline { color: var(--text3); }

/* Checkbox */
.checkbox {
  width: 15px; height: 15px; cursor: pointer;
  accent-color: var(--accent);
}

/* ── Form ── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; margin-bottom: 7px;
  font-size: 0.75rem; font-weight: 600; color: var(--text2);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.form-input, .form-textarea {
  width: 100%; padding: 10px 14px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-size: 0.83rem; font-family: var(--font-main);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none; resize: vertical;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--border-accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text3); }
.char-count { text-align: right; font-size: 0.7rem; color: var(--text3); margin-top: 4px; font-family: var(--font-mono); }

/* ── SIM Selector ── */
.sim-selector { display: flex; gap: 10px; }
.sim-option { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.sim-radio { display: none; }
.sim-label {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 18px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface2);
  color: var(--text2); font-size: 0.8rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.sim-radio:checked + .sim-label {
  border-color: var(--border-accent); background: var(--accent-dim); color: var(--accent);
  box-shadow: 0 0 10px var(--accent-dim);
}
.sim-selector.compact .sim-label { padding: 7px 12px; font-size: 0.75rem; }

/* ── Progress ── */
.progress-section { margin-top: 18px; }
.progress-info {
  display: flex; justify-content: space-between;
  font-size: 0.75rem; color: var(--text2); margin-bottom: 8px;
  font-family: var(--font-mono);
}
.progress-track {
  height: 6px; background: var(--surface2);
  border-radius: 3px; overflow: hidden;
  border: 1px solid var(--border); position: relative;
}
.progress-fill {
  height: 100%; background: linear-gradient(90deg, #00ff88, #00c96a);
  border-radius: 3px; transition: width 0.3s ease;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ── Detail Panel ── */
.detail-panel {
  margin-top: 14px; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.detail-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: var(--bg3);
  font-size: 0.75rem; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
.detail-body {
  padding: 14px; font-size: 0.82rem; color: var(--text);
  font-family: var(--font-mono); min-height: 80px;
  line-height: 1.7; white-space: pre-wrap; word-break: break-all;
  background: var(--bg2);
}

/* ── Toggle ── */
.toggle-wrap {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: 0.75rem; color: var(--text2);
}
.toggle-wrap input { display: none; }
.toggle-slider {
  width: 36px; height: 20px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 10px;
  position: relative; transition: all 0.2s;
}
.toggle-slider::after {
  content: ''; position: absolute; width: 14px; height: 14px;
  background: var(--text3); border-radius: 50%; top: 2px; left: 2px;
  transition: all 0.2s;
}
.toggle-wrap input:checked + .toggle-slider { background: var(--accent-dim); border-color: var(--border-accent); }
.toggle-wrap input:checked + .toggle-slider::after { background: var(--accent); transform: translateX(16px); }
.toggle-label { white-space: nowrap; }

/* ── Form Row (Modal) ── */
.form-row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.form-row .form-input { flex: 1; min-width: 120px; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }

.modal-box {
  background: var(--bg2); border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg); width: 100%; max-width: 800px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 0 60px rgba(0,255,136,0.15), var(--shadow);
  padding: 24px; display: flex; flex-direction: column; gap: 16px;
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-title); font-size: 0.9rem; color: var(--text);
  letter-spacing: 1px;
}
.modal-close {
  background: var(--red-dim); border: 1px solid rgba(255,71,87,0.3);
  color: var(--red); width: 30px; height: 30px; border-radius: 6px;
  cursor: pointer; font-size: 0.85rem; display: flex;
  align-items: center; justify-content: center; transition: all 0.2s;
}
.modal-close:hover { background: rgba(255,71,87,0.3); }

.modal-info {
  font-size: 0.75rem; color: var(--text2); font-family: var(--font-mono);
}
.info-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px;
  max-height: 400px; overflow-y: auto; padding-right: 8px;
}
.info-item {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface2); padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--border); transition: all 0.2s;
}
.info-item:hover { border-color: var(--border-accent); }
.info-label {
  font-size: 0.65rem; color: var(--text3); text-transform: uppercase; letter-spacing: 1px;
}
.info-value {
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--text); font-weight: 500; word-break: break-all;
}

/* Modal Tabs */
.modal-tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--border);
  margin-bottom: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.modal-tabs::-webkit-scrollbar { display: none; }
.modal-tab-btn {
  padding: 10px 16px; background: transparent; border: none; cursor: pointer;
  color: var(--text3); font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  font-family: var(--font-main); border-bottom: 2px solid transparent; transition: all 0.2s;
  white-space: nowrap;
}
.modal-tab-btn:hover { color: var(--text); }
.modal-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.modal-tab-content { display: none; animation: fadeIn 0.3s ease; }
.modal-tab-content.active { display: block; }

.modal-send-form { 
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
}
.modal-sms-header {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.78rem; font-weight: 600; color: var(--text2);
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* ── Toast ── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  padding: 12px 20px; border-radius: var(--radius);
  font-size: 0.82rem; font-weight: 500; opacity: 0;
  transform: translateY(10px); pointer-events: none;
  transition: all 0.3s ease; max-width: 320px;
  border: 1px solid; backdrop-filter: blur(10px);
}
.toast.success {
  background: rgba(0,255,136,0.12); border-color: rgba(0,255,136,0.3); color: var(--accent);
  box-shadow: 0 4px 20px rgba(0,255,136,0.2);
}
.toast.error {
  background: var(--red-dim); border-color: rgba(255,71,87,0.3); color: var(--red);
  box-shadow: 0 4px 20px rgba(255,71,87,0.2);
}
.toast.info {
  background: var(--blue-dim); border-color: rgba(61,158,255,0.3); color: var(--blue);
}
.toast.show { opacity: 1; transform: translateY(0); }

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

/* ── Loader ── */
.loader {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Device Grid (Cards) ── */
.device-grid-wrap {
  overflow-y: auto; overflow-x: hidden;
  max-height: 480px; padding: 4px; margin-top: 10px;
}
.device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.device-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  position: relative; transition: all 0.2s; cursor: pointer;
  display: flex; flex-direction: column; gap: 12px;
}
.device-card:hover { 
  border-color: var(--border-accent); transform: translateY(-2px); 
  box-shadow: 0 4px 12px rgba(0, 255, 136, 0.1); 
}
.device-card.selected { border-color: var(--accent); background: rgba(0, 255, 136, 0.05); }
.device-card.muted { opacity: 0.6; }
.device-card-header {
  display: flex; align-items: flex-start; gap: 10px; padding-right: 24px;
}
.device-icon {
  width: 36px; height: 36px; background: rgba(0, 255, 136, 0.1);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--accent); flex-shrink: 0; border: 1px solid rgba(0, 255, 136, 0.2);
}
.device-id {
  font-family: var(--font-title); font-size: 0.85rem; font-weight: 600; color: var(--blue);
  word-break: break-all; margin-bottom: 2px;
}
.device-model {
  font-size: 0.7rem; color: var(--text3); font-family: var(--font-mono);
}
.device-card-stats {
  display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--text2);
}
.stat-col { display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text3); }
.stat-value { font-family: var(--font-mono); font-weight: 500; color: var(--text); }
.device-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--border); padding-top: 12px;
  font-size: 0.75rem;
}
.device-checkbox-wrap {
  position: absolute; top: 16px; right: 16px;
}
.device-status { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.device-card.selected .device-icon { background: var(--accent); color: #000; }


/* ── Modal SMS Cards ── */
.modal-sms-list {
  display: flex; flex-direction: column; gap: 12px;
  max-height: 400px; overflow-y: auto; padding-right: 8px; margin-top: 10px;
}
.sms-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px;
  display: flex; flex-direction: column; gap: 8px; transition: all 0.2s;
}
.sms-card:hover { border-color: var(--border-accent); }
.sms-card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
}
.sms-sender {
  font-family: var(--font-title); font-size: 0.85rem; font-weight: 700; color: var(--text);
}
.sms-meta {
  display: flex; align-items: center; gap: 10px;
}
.sms-time {
  font-family: var(--font-mono); font-size: 0.65rem; color: var(--text3);
}
.sms-copy-btn {
  background: rgba(61,158,255,0.1); border: 1px solid rgba(61,158,255,0.2);
  color: var(--blue); width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s;
}
.sms-copy-btn:hover { background: var(--blue); color: #fff; }
.sms-card-body {
  font-size: 0.8rem; color: var(--text2); line-height: 1.5; word-break: break-all;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .panel-grid { grid-template-columns: 1fr; }
  .header-stats { display: none; }
  .status-bar { font-size: 0.68rem; max-width: 150px; }
  .modal-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .header-inner { flex-wrap: wrap; justify-content: space-between; padding: 10px 0; height: auto; }
  .logo-text { font-size: 1rem; }
  .logo-icon { width: 28px; height: 28px; }
  .logo-badge { font-size: 0.55rem; }
  .status-bar { display: none; /* Hide on very small screens to save space */ }
  
  .tab-nav { 
    padding: 8px 12px 0; overflow-x: auto; flex-wrap: nowrap; 
    -webkit-overflow-scrolling: touch; scrollbar-width: none; 
  }
  .tab-nav::-webkit-scrollbar { display: none; }
  .tab-btn { padding: 8px 16px; font-size: 0.72rem; white-space: nowrap; }

  .main { padding: 12px; }
  .panel-card { padding: 14px; border-radius: var(--radius); }
  .panel-title { font-size: 0.9rem; }
  
  /* Filter & Search */
  .filter-row { flex-wrap: wrap; gap: 8px; }
  .filter-pill { padding: 4px 10px; font-size: 0.65rem; }
  .filter-counts { width: 100%; justify-content: space-between; margin-top: 4px; }
  
  /* Device Grid */
  .device-grid { grid-template-columns: 1fr; gap: 12px; }
  .device-card { padding: 12px; }
  .device-card-header { padding-right: 32px; }
  .device-icon { width: 32px; height: 32px; }
  .device-id { font-size: 0.75rem; }
  
  /* Buttons */
  .btn-row { flex-direction: column; width: 100%; }
  .btn-row .btn { width: 100%; justify-content: center; }
  
  /* Tables */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
  .data-table th, .data-table td { padding: 10px 8px; font-size: 0.7rem; white-space: nowrap; }
  
  /* Modal */
  .modal-content { width: 95%; max-width: none; max-height: 90vh; }
  .modal-header { padding: 12px 16px; }
  .modal-title { font-size: 0.95rem; }
  .modal-body { padding: 16px; }
  .modal-info-bar { font-size: 0.7rem; }
  
  /* Toast */
  .toast { left: 16px; right: 16px; bottom: 16px; max-width: none; width: auto; font-size: 0.75rem; text-align: center; }
}
