/* ============================================================
   FTTH Management System — Main Stylesheet
   Design: Dark mode, glassmorphism, vibrant accents
   ============================================================ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --bg-base:      #0b0f1a;
  --bg-surface:   #111827;
  --bg-elevated:  #1a2236;
  --bg-card:      #161d2e;
  --bg-hover:     #1e2840;

  --accent:       #6366f1;
  --accent-cyan:  #06b6d4;
  --accent-green: #10b981;
  --accent-red:   #ef4444;
  --accent-amber: #f59e0b;
  --accent-pink:  #ec4899;
  --accent-violet:#8b5cf6;
  --accent-orange:#f97316;

  --text-primary:   #f0f4ff;
  --text-secondary: #94a3b8;
  --text-muted:     #4b5e7a;

  --border:       rgba(255,255,255,.07);
  --border-hover: rgba(255,255,255,.14);
  --glass:        rgba(255,255,255,.04);
  --shadow:       0 4px 24px rgba(0,0,0,.4);
  --shadow-lg:    0 8px 48px rgba(0,0,0,.6);

  --sidebar-w:    260px;
  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    16px;

  --font:         'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --trans:        all .2s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg-base); color: var(--text-primary);
       line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, select, textarea { font: inherit; }
img, svg { display: block; }
ul { list-style: none; }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 9px; }

/* ============================================================
   LAYOUT
   ============================================================ */
.app-body { display: flex; min-height: 100vh; overflow: hidden; }

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

.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-icon svg { width: 18px; height: 18px; color: #fff; }
.brand-name { font-size: .9rem; font-weight: 700; letter-spacing: -.01em; }

.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: .875rem;
  font-weight: 500;
  transition: var(--trans);
  position: relative;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(99,102,241,.2), rgba(6,182,212,.1));
  color: var(--text-primary);
  border: 1px solid rgba(99,102,241,.3);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 60%;
  background: linear-gradient(to bottom, var(--accent), var(--accent-cyan));
  border-radius: 0 4px 4px 0;
}
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }

.badge {
  margin-left: auto;
  background: var(--accent-red);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 9px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.user-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.user-avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; flex-shrink: 0;
}
.user-details { min-width: 0; }
.user-name { display: block; font-size: .8rem; font-weight: 600; truncate: ellipsis; white-space: nowrap; overflow: hidden; }
.user-role { display: block; font-size: .7rem; color: var(--text-secondary); text-transform: capitalize; }
.btn-logout { color: var(--text-muted); transition: var(--trans); padding: 4px; border-radius: 6px; }
.btn-logout:hover { color: var(--accent-red); background: rgba(239,68,68,.1); }
.btn-logout svg { width: 16px; height: 16px; }

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

/* ── Top Bar ────────────────────────────────────────────── */
.top-bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  padding: 14px 24px;
  background: rgba(11,15,26,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.sidebar-toggle { color: var(--text-secondary); padding: 6px; border-radius: 6px; display: none; }
.sidebar-toggle svg { width: 20px; height: 20px; }
.page-title { font-size: 1.1rem; font-weight: 600; }
.top-bar-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.connection-status { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--text-secondary); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.online  { background: var(--accent-green); box-shadow: 0 0 6px var(--accent-green); animation: pulse 2s infinite; }
.status-dot.offline { background: var(--accent-red); }
.last-updated { font-size: .75rem; color: var(--text-muted); }

/* ── Tab Panels ──────────────────────────────────────────── */
.tab-panel { display: none; padding: 24px; }
.tab-panel.active { display: block; }

/* ============================================================
   DASHBOARD GRID
   ============================================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Cards row */
.cards-row { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; align-items: flex-start; gap: 16px;
  position: relative; overflow: hidden;
  transition: var(--trans);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-hover); }

.stat-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; }

.stat-card.waiting .stat-icon { background: rgba(245,158,11,.15); color: var(--accent-amber); }
.stat-card.online  .stat-icon { background: rgba(16,185,129,.15); color: var(--accent-green); }
.stat-card.offline .stat-icon { background: rgba(239,68,68,.15);  color: var(--accent-red); }
.stat-card.signal  .stat-icon { background: rgba(236,72,153,.15); color: var(--accent-pink); }

.stat-body { flex: 1; }
.stat-value { font-size: 2rem; font-weight: 700; line-height: 1; font-family: var(--font-mono); }
.stat-label { font-size: .75rem; color: var(--text-secondary); margin-top: 4px; }

.stat-pulse {
  position: absolute; top: 14px; right: 14px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-amber); opacity: .7;
  animation: pulse 2s infinite;
}

/* ── Charts ──────────────────────────────────────────────── */
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--trans);
}
.chart-card:hover { border-color: var(--border-hover); }
.span-2 { grid-column: span 2; }

.chart-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.chart-title { font-size: .9rem; font-weight: 600; flex: 1; }
.chart-wrapper { position: relative; height: 220px; }
.chart-wrapper canvas { width: 100% !important; height: 100% !important; }

.chart-tabs { display: flex; gap: 4px; background: var(--bg-elevated); padding: 3px; border-radius: var(--radius-sm); }
.chart-tab {
  padding: 4px 10px; border-radius: 6px;
  font-size: .75rem; font-weight: 500; color: var(--text-secondary);
  transition: var(--trans);
}
.chart-tab.active { background: var(--accent); color: #fff; }
.chart-tab:hover:not(.active) { color: var(--text-primary); }

/* ── OLT List ─────────────────────────────────────────────── */
.olts-card {
  grid-column: span 2;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.olt-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.olt-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--trans);
}
.olt-item:hover { background: var(--bg-hover); border-color: var(--accent); }
.olt-status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.olt-status-dot.online  { background: var(--accent-green); box-shadow: 0 0 6px var(--accent-green); }
.olt-status-dot.offline { background: var(--accent-red); }
.olt-status-dot.unknown { background: var(--text-muted); }
.olt-name { font-size: .875rem; font-weight: 500; flex: 1; }
.olt-ip   { font-size: .75rem; color: var(--text-secondary); font-family: var(--font-mono); }
.olt-badge { font-size: .7rem; padding: 2px 8px; border-radius: 9px; font-weight: 600; }
.olt-badge.online  { background: rgba(16,185,129,.15); color: var(--accent-green); }
.olt-badge.offline { background: rgba(239,68,68,.15);  color: var(--accent-red); }
.olt-badge.unknown { background: rgba(75,94,122,.2);   color: var(--text-muted); }

/* ============================================================
   TABLE
   ============================================================ */
.tab-content-wrapper { max-width: 100%; }
.section-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.section-title { font-size: 1.1rem; font-weight: 600; flex: 1; }
.section-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 12px 16px;
  font-size: .75rem; font-weight: 600;
  color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  text-align: left; white-space: nowrap;
}
.data-table td {
  padding: 12px 16px;
  font-size: .85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg-hover); }
.loading-cell { text-align: center; padding: 32px; color: var(--text-secondary); }

/* Status badges */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 9px;
  font-size: .72rem; font-weight: 600;
}
.status-badge.online  { background: rgba(16,185,129,.15); color: var(--accent-green); }
.status-badge.offline { background: rgba(239,68,68,.15);  color: var(--accent-red); }
.status-badge.unconfigured { background: rgba(245,158,11,.15); color: var(--accent-amber); }
.status-badge::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 50%; background: currentColor;
}

.signal-val { font-family: var(--font-mono); font-size: .8rem; }
.signal-val.good { color: var(--accent-green); }
.signal-val.warn { color: var(--accent-amber); }
.signal-val.bad  { color: var(--accent-red); }

/* ── Pagination ──────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 16px; flex-wrap: wrap;
}
.page-btn {
  padding: 6px 12px; border-radius: var(--radius-sm);
  font-size: .8rem; font-weight: 500;
  background: var(--bg-elevated); color: var(--text-secondary);
  border: 1px solid var(--border); transition: var(--trans);
}
.page-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-btn:disabled { opacity: .4; cursor: default; }

/* ── Unconfigured groups ─────────────────────────────────── */
.olt-group { margin-bottom: 24px; }
.olt-group-title {
  display: flex; align-items: center; gap: 10px;
  font-size: .875rem; font-weight: 600;
  padding: 10px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  color: var(--accent-cyan);
}
.olt-group .table-wrapper { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }

/* ============================================================
   GRAPHS GRID
   ============================================================ */
.graphs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.graphs-grid .chart-card:last-child:nth-child(odd) { grid-column: span 2; }

/* ============================================================
   CONFIGURATION TABS
   ============================================================ */
.config-tabs { display: flex; gap: 4px; margin-bottom: 20px; background: var(--bg-elevated); padding: 4px; border-radius: var(--radius-sm); width: fit-content; }
.config-tab {
  padding: 7px 18px; border-radius: 7px;
  font-size: .85rem; font-weight: 500; color: var(--text-secondary);
  transition: var(--trans);
}
.config-tab.active { background: var(--accent); color: #fff; }
.config-tab:hover:not(.active) { color: var(--text-primary); }

.config-panel { display: none; }
.config-panel.active { display: block; }

.panel-toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: .85rem; font-weight: 600;
  transition: var(--trans);
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-cyan)); color: #fff; }
.btn-primary:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(99,102,241,.4); }
.btn-ghost { background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-danger { background: rgba(239,68,68,.15); color: var(--accent-red); border: 1px solid rgba(239,68,68,.3); }
.btn-danger:hover { background: rgba(239,68,68,.25); }
.btn-sm { padding: 6px 12px; font-size: .78rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { padding: 7px; border-radius: 7px; }

/* ============================================================
   FORMS / INPUTS
   ============================================================ */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: .8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-input, .form-select {
  width: 100%; padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: .875rem;
  transition: var(--trans);
}
.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

.input-wrapper { position: relative; }
.input-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-muted);
}
.input-wrapper .form-input { padding-left: 38px; }

.search-input, .select-olt {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 7px 12px;
  font-size: .82rem;
  transition: var(--trans);
  height: 36px;
}
.search-input { min-width: 220px; }
.select-lg { height: 40px; font-size: .9rem; min-width: 200px; }
.search-input:focus, .select-olt:focus { outline: none; border-color: var(--accent); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
  padding: 16px;
}
.modal-overlay.open { display: flex; animation: fadeIn .2s ease; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 600px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp .2s ease;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 1rem; font-weight: 600; }
.modal-close {
  width: 30px; height: 30px; border-radius: 7px;
  font-size: 1.2rem; color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  transition: var(--trans);
}
.modal-close:hover { background: var(--bg-elevated); color: var(--text-primary); }
.modal-body { padding: 20px 24px; }
.modal-footer { padding: 14px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ONU Detail Grid */
.onu-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-item { display: flex; flex-direction: column; gap: 3px; }
.detail-label { font-size: .7rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .05em; }
.detail-value { font-size: .875rem; font-weight: 500; font-family: var(--font-mono); }
.detail-item.full-width { grid-column: span 2; }

/* ============================================================
   TOAST
   ============================================================ */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  box-shadow: var(--shadow);
  animation: slideLeft .3s ease;
  min-width: 260px;
}
.toast.success { border-color: var(--accent-green); }
.toast.error   { border-color: var(--accent-red); }
.toast-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.toast.success .toast-dot { background: var(--accent-green); }
.toast.error   .toast-dot { background: var(--accent-red); }

/* ============================================================
   LOADING / SKELETON / EMPTY
   ============================================================ */
.spinner {
  width: 24px; height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  margin: 0 auto;
}
.loading-state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px; color: var(--text-secondary); font-size: .875rem; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 64px; color: var(--text-muted); font-size: .875rem; }
.skeleton { background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-hover) 50%, var(--bg-elevated) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-sm); height: 52px; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-body { display: flex; min-height: 100vh; align-items: center; justify-content: center; background: var(--bg-base); position: relative; overflow: hidden; }
.login-bg { position: fixed; inset: 0; pointer-events: none; }
.login-orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .12;
}
.login-orb-1 { width: 600px; height: 600px; background: var(--accent); top: -200px; right: -200px; }
.login-orb-2 { width: 400px; height: 400px; background: var(--accent-cyan); bottom: -100px; left: -100px; }
.login-orb-3 { width: 300px; height: 300px; background: var(--accent-violet); top: 50%; left: 50%; transform: translate(-50%,-50%); }

.login-container { position: relative; z-index: 1; width: 100%; max-width: 400px; padding: 16px; }
.login-card {
  background: rgba(17,24,39,.8);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
}

.login-logo { width: 56px; height: 56px; margin: 0 auto 20px; }
.login-logo svg { width: 100%; height: 100%; }
.login-title { text-align: center; font-size: 1.4rem; font-weight: 700; margin-bottom: 6px; }
.login-subtitle { text-align: center; font-size: .84rem; color: var(--text-secondary); margin-bottom: 28px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }

.alert { padding: 10px 14px; border-radius: var(--radius-sm); font-size: .84rem; margin-bottom: 4px; }
.alert-error { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); color: #fca5a5; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes pulse { 0%,100%{ opacity:1; box-shadow: 0 0 6px currentColor; } 50%{ opacity:.5; box-shadow: 0 0 12px currentColor; } }
@keyframes spin  { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes slideUp { from { opacity:0; transform: translateY(16px); } to { opacity:1; transform: translateY(0); } }
@keyframes slideLeft { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: translateX(0); } }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .cards-row { grid-template-columns: repeat(2,1fr); }
  .span-2 { grid-column: 1 / -1; }
  .olts-card { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-260px); width: 260px; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: block; }
  .cards-row { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .graphs-grid { grid-template-columns: 1fr; }
  .graphs-grid .chart-card:last-child { grid-column: span 1; }
  .onu-detail-grid { grid-template-columns: 1fr; }
  .detail-item.full-width { grid-column: span 1; }
  .tab-panel { padding: 16px; }
}
@media (max-width: 480px) {
  .cards-row { grid-template-columns: 1fr; }
  .search-input { min-width: 150px; }
}
