:root {
  --bg-primary: #0f1419;
  --bg-secondary: #1a2332;
  --bg-tertiary: #243044;
  --bg-card: #1e2a3a;
  --border: rgba(6, 182, 212, 0.2);
  --accent: #06b6d4;
  --accent-dim: #0891b2;
  --accent-glow: rgba(6, 182, 212, 0.3);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --transition: 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 400px;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(6, 182, 212, 0.15), transparent);
  pointer-events: none;
  z-index: 0;
}

.app {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.menu-toggle {
  display: none;
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
  z-index: 1001;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px;
  transition: var(--transition);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.logo svg {
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}

.nav-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(8, 145, 178, 0.1));
  color: var(--accent);
  border: 1px solid var(--border);
  animation: liveGlow 3s ease-in-out infinite;
}

.nav-item svg {
  flex-shrink: 0;
  opacity: 0.9;
}

.nav-badge {
  margin-left: auto;
  font-size: 0.7rem;
  padding: 2px 8px;
  background: var(--success);
  color: white;
  border-radius: 20px;
  font-weight: 600;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
  box-shadow: 0 0 8px var(--success);
}

.developer-credit {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes liveGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.3); }
  50% { box-shadow: 0 0 20px 2px rgba(6, 182, 212, 0.2); }
}

@keyframes countUp {
  from { opacity: 0.5; transform: scale(1.05); }
  to { opacity: 1; transform: scale(1); }
}

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

.btn-refresh {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-refresh:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border-color: var(--danger);
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 20, 25, 0.8);
  backdrop-filter: blur(12px);
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.last-update {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 280px;
}

.search-box svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-box input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  width: 100%;
  outline: none;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

/* View Container */
.view-container {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
  box-shadow: var(--shadow);
  animation: fadeInUp 0.4s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(6, 182, 212, 0.15);
}

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

.stat-icon.users { background: rgba(6, 182, 212, 0.2); color: var(--accent); }
.stat-icon.registrations { background: rgba(34, 197, 94, 0.2); color: var(--success); }
.stat-icon.broadcast { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.stat-icon.logs { background: rgba(139, 92, 246, 0.2); color: #8b5cf6; }

.stat-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.stat-value.updated {
  animation: countUp 0.5s ease;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Charts */
.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 1024px) {
  .charts-row {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  animation: fadeInUp 0.5s ease forwards;
}

.chart-card:first-child {
  max-height: 280px;
}

.chart-card:first-child canvas {
  max-height: 220px !important;
}

.chart-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.progress-ring-container {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto;
}

.progress-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: var(--bg-tertiary);
  stroke-width: 10;
}

.progress-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 339.292;
  transition: stroke-dashoffset 0.5s ease;
}

.progress-ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.progress-ring-text span {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

.progress-ring-text small {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Info Cards */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  animation: fadeInUp 0.5s ease forwards;
}

.info-card:nth-child(1) { animation-delay: 0.2s; }
.info-card:nth-child(2) { animation-delay: 0.3s; }

.info-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.info-content {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.8;
}

.info-content .row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--bg-tertiary);
}

.info-content .row:last-child {
  border-bottom: none;
}

/* Table */
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.table-count {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.filter-input, .table-toolbar select {
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.filter-input {
  min-width: 240px;
}

.filter-input:focus, .table-toolbar select:focus {
  border-color: var(--accent);
}

.btn-action {
  padding: 8px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-action:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.btn-action.btn-danger:hover {
  background: var(--danger);
  border-color: var(--danger);
}

.btn-edit-sm {
  padding: 4px 10px;
  font-size: 0.8rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--accent);
  cursor: pointer;
}

.btn-edit-sm:hover {
  background: var(--accent);
  color: white;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  min-width: 360px;
  max-width: 90vw;
}

.modal h3 {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.modal form label {
  display: block;
  margin-top: 12px;
  margin-bottom: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.modal form input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  justify-content: flex-end;
}

.table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  overflow-y: hidden;
  box-shadow: var(--shadow);
}

.table-wrapper.log-table {
  max-height: 600px;
  overflow-x: auto;
  overflow-y: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th {
  text-align: left;
  padding: 16px 20px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  border-bottom: 2px solid rgba(6, 182, 212, 0.4);
}

.data-table td {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  color: var(--text-primary);
}

.data-table tbody tr:hover {
  background: rgba(6, 182, 212, 0.05);
}

.animate-row {
  animation: rowAppear 0.3s ease forwards;
}

.data-table tbody tr.animate-row:nth-child(1) { animation-delay: 0.02s; }
.data-table tbody tr.animate-row:nth-child(2) { animation-delay: 0.04s; }
.data-table tbody tr.animate-row:nth-child(3) { animation-delay: 0.06s; }
.data-table tbody tr.animate-row:nth-child(4) { animation-delay: 0.08s; }
.data-table tbody tr.animate-row:nth-child(5) { animation-delay: 0.1s; }
.data-table tbody tr.animate-row:nth-child(6) { animation-delay: 0.12s; }
.data-table tbody tr.animate-row:nth-child(7) { animation-delay: 0.14s; }
.data-table tbody tr.animate-row:nth-child(8) { animation-delay: 0.16s; }
.data-table tbody tr.animate-row:nth-child(9) { animation-delay: 0.18s; }
.data-table tbody tr.animate-row:nth-child(10) { animation-delay: 0.2s; }

.data-table .mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
}

.data-table a {
  color: var(--accent);
  text-decoration: none;
}

.data-table a:hover {
  text-decoration: underline;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-data { background: rgba(6, 182, 212, 0.2); color: var(--accent); }
.badge-lokasi { background: rgba(34, 197, 94, 0.2); color: var(--success); }

/* Broadcast Panel */
.broadcast-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 1024px) {
  .broadcast-panel {
    grid-template-columns: 1fr;
  }
}

.broadcast-status-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.broadcast-status-card h3,
.broadcast-queue-preview h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.status-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg-tertiary);
}

.status-row .label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.status-row .value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
}

.progress-bar-wrap {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--bg-tertiary);
}

.progress-bar-wrap .label {
  display: block;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.progress-bar {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dim));
  border-radius: 4px;
  transition: width 0.5s ease;
}

.progress-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.broadcast-queue-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.queue-list {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.queue-item {
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  opacity: 0;
}

.queue-item.animate-row {
  animation: rowAppear 0.3s ease forwards;
}

.queue-item.animate-row:nth-child(1) { animation-delay: 0.02s; }
.queue-item.animate-row:nth-child(2) { animation-delay: 0.04s; }
.queue-item.animate-row:nth-child(3) { animation-delay: 0.06s; }
.queue-item.animate-row:nth-child(4) { animation-delay: 0.08s; }
.queue-item.animate-row:nth-child(5) { animation-delay: 0.1s; }
.queue-item.animate-row:nth-child(6) { animation-delay: 0.12s; }
.queue-item.animate-row:nth-child(7) { animation-delay: 0.14s; }
.queue-item.animate-row:nth-child(8) { animation-delay: 0.16s; }
.queue-item.animate-row:nth-child(9) { animation-delay: 0.18s; }
.queue-item.animate-row:nth-child(10) { animation-delay: 0.2s; }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.pagination button {
  padding: 8px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.pagination button:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination .page-info {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0 12px;
}

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

/* Scrollbar */
.table-wrapper::-webkit-scrollbar,
.queue-list::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-wrapper::-webkit-scrollbar-track,
.queue-list::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
}

.table-wrapper::-webkit-scrollbar-thumb,
.queue-list::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover,
.queue-list::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

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

.empty-state svg {
  margin-bottom: 16px;
  opacity: 0.5;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 999;
    transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0,0,0,0.3);
    padding-top: env(safe-area-inset-top);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-toggle {
    display: flex;
  }

  .main-content {
    margin-left: 0;
  }

  .topbar {
    padding-left: 72px;
  }

  .view-container {
    padding: 20px 16px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-value {
    font-size: 1.4rem;
  }

  .filter-input {
    min-width: 160px;
  }

  .table-toolbar {
    gap: 12px;
  }

  .btn-action {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    top: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    padding-left: 68px;
  }

  .page-title {
    font-size: 1.25rem;
  }

  .last-update {
    font-size: 0.8rem;
  }

  .view-container {
    padding: 16px 12px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-icon {
    width: 48px;
    height: 48px;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .charts-row {
    gap: 16px;
    margin-bottom: 20px;
  }

  .chart-card:first-child {
    max-height: 240px;
  }

  .chart-card:first-child canvas {
    max-height: 180px !important;
  }

  .info-cards {
    grid-template-columns: 1fr;
  }

  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .table-toolbar .filter-input,
  .table-toolbar select {
    min-width: 100%;
    width: 100%;
  }

  .filter-input {
    min-width: 100%;
  }

  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrapper.log-table {
    max-height: 400px;
  }

  .data-table {
    font-size: 0.8rem;
    min-width: 600px;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
  }

  .data-table th {
    white-space: normal;
    font-size: 0.85rem;
  }

  .data-table td {
    font-size: 0.75rem;
  }

  .broadcast-panel {
    gap: 16px;
  }

  .broadcast-status-card,
  .broadcast-queue-preview {
    padding: 16px;
  }

  .queue-list {
    max-height: 300px;
  }

  .pagination {
    gap: 6px;
    margin: 12px 0;
  }

  .pagination button {
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  .modal {
    min-width: 0;
    width: calc(100vw - 24px);
    max-width: 360px;
    padding: 20px;
    margin: 12px;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions .btn-action {
    width: 100%;
  }

  .logo span {
    font-size: 0.95rem;
  }

  .nav-item {
    padding: 14px 16px;
  }
}

@media (max-width: 480px) {
  .topbar {
    padding-left: 12px;
  }

  .page-title {
    font-size: 1.1rem;
  }

  .stat-value {
    font-size: 1.35rem;
  }

  .data-table {
    min-width: 500px;
  }

  .btn-action {
    font-size: 0.75rem;
    padding: 8px 12px;
  }

  .nav-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
  }

  .status-indicator span:last-child {
    font-size: 0.8rem;
  }
}
