/* ====================================================
   RHQ NETWORK IPAM — Design System & Styles
   ==================================================== */

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

/* ---------- CSS Variables ---------- */
:root {
  /* Colors - Sleek Black & Neon Blue theme */
  --bg-primary: #050505;
  --bg-secondary: #0a0a0a;
  --bg-card: #0d0d0d;
  --bg-card-hover: #121212;
  --bg-input: #0a0a0a;
  --bg-sidebar: #050505;

  --border: #1a1a1a;
  --border-light: #2a2a2a;

  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a0;
  --text-muted: #555555;
  --text-inverse: #000000;

  --accent: #00f0ff;
  --accent-hover: #00c3ff;
  --accent-soft: rgba(0, 240, 255, 0.1);

  --success: #00ff88;
  --success-soft: rgba(0, 255, 136, 0.1);
  --warning: #ffcc00;
  --warning-soft: rgba(255, 204, 0, 0.1);
  --danger: #ff003c;
  --danger-soft: rgba(255, 0, 60, 0.1);
  --info: #00f0ff;
  --info-soft: rgba(0, 240, 255, 0.1);

  /* Status colors */
  --status-free: #00ff88;
  --status-inuse: #00f0ff;
  --status-reserved: #ffcc00;

  /* OS colors */
  --os-windows: #00aaff;
  --os-linux: #ffcc00;
  --os-other: #b82bf2;
  --os-unknown: #555555;

  /* Spacing */
  --sidebar-width: 240px;

  /* Radii - Sharper, tech feel */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --radius-xl: 8px;

  /* Shadows - Subtle neon glows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);

  /* Transitions */
  --transition: 0.2s ease;
}

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

html,
body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--accent-hover);
}

/* ---------- Layout ---------- */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

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

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  box-shadow: 0 0 8px var(--accent-soft);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
}

.sidebar-logo-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.sidebar-logo-sub {
  font-size: 10px;
  font-weight: 600;
  color: #00ff88;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13.5px;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: rgba(0, 240, 255, 0.05);
  color: var(--text-primary);
  border-left-color: var(--border-light);
}

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-item .nav-icon {
  font-size: 18px;
  width: 22px;
  text-align: center;
}

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

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 2px;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  color: var(--accent);
  box-shadow: 0 0 5px var(--accent-soft);
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.sidebar-user-role {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: capitalize;
}

.btn-logout {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.btn-logout:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

/* ---------- Main Content ---------- */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  background: var(--bg-primary);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb .sep {
  color: var(--text-muted);
}

/* ---------- Cards ---------- */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--transition);
}

.stat-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-soft);
}

.stat-card-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-card-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-card-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
}

.stat-card-icon.blue {
  background: var(--info-soft);
  color: var(--info);
}

.stat-card-icon.green {
  background: var(--success-soft);
  color: var(--success);
}

.stat-card-icon.yellow {
  background: var(--warning-soft);
  color: var(--warning);
}

.stat-card-icon.red {
  background: var(--danger-soft);
  color: var(--danger);
}

.stat-card-icon.purple {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- Charts ---------- */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.chart-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.chart-container {
  position: relative;
  height: 220px;
}

/* ---------- Tables ---------- */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.table-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.table-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 10px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

tbody tr {
  transition: background var(--transition);
}

tbody tr:hover {
  background: rgba(108, 99, 255, 0.04);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-free {
  background: var(--success-soft);
  color: var(--success);
}

.badge-in_use {
  background: var(--info-soft);
  color: var(--info);
}

.badge-reserved {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge-windows {
  background: rgba(0, 120, 212, 0.15);
  color: var(--os-windows);
}

.badge-linux {
  background: rgba(252, 198, 36, 0.15);
  color: var(--os-linux);
}

.badge-other {
  background: rgba(168, 85, 247, 0.15);
  color: var(--os-other);
}

.badge-unknown {
  background: rgba(99, 107, 130, 0.15);
  color: var(--os-unknown);
}

.badge-running {
  background: var(--info-soft);
  color: var(--info);
}

.badge-completed {
  background: var(--success-soft);
  color: var(--success);
}

.badge-failed {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge-pending {
  background: var(--warning-soft);
  color: var(--warning);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: rgba(0, 240, 255, 0.1);
  color: var(--accent);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-soft);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.btn-danger {
  background: rgba(255, 0, 60, 0.1);
  color: var(--danger);
  border-color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 0 12px var(--danger-soft);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 6px 10px;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

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

/* ---------- Inputs ---------- */
.input,
.select,
textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  transition: border-color var(--transition);
  outline: none;
  width: 100%;
}

.input:focus,
.select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

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

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.input-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-sm {
  padding: 6px 10px;
  font-size: 12px;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  cursor: pointer;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px 20px;
}

/* ---------- Progress Bar ---------- */
.progress-bar {
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-soft);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.pagination-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.pagination-btn:hover:not(.active):not(:disabled) {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.pagination-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 8px;
}

/* ---------- Login ---------- */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-primary);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo-icon {
  width: 56px;
  height: 56px;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  box-shadow: 0 0 15px var(--accent-soft);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 12px;
}

.login-logo h1 {
  font-size: 20px;
  font-weight: 700;
}

.login-logo p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.login-error {
  background: var(--danger-soft);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  margin-bottom: 16px;
  display: none;
}

/* ---------- Detail Card ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.detail-card-full {
  grid-column: 1 / -1;
}

.detail-row {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

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

.detail-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 120px;
  flex-shrink: 0;
}

.detail-value {
  font-size: 13px;
  color: var(--text-primary);
  flex: 1;
}

/* ---------- Ports List ---------- */
.ports-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.port-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

.port-tag .port-num {
  font-weight: 700;
  color: var(--accent);
}

/* ---------- Checkbox ---------- */
.checkbox-wrap {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.checkbox-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

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

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state-text {
  font-size: 13px;
  max-width: 300px;
  margin: 0 auto;
}

/* ---------- Toast ---------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
  max-width: 360px;
}

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

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

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

/* ---------- Loading Spinner ---------- */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

/* ---------- Scan Form ---------- */
.scan-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.scan-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 16px;
  align-items: end;
}

.radio-group {
  display: flex;
  gap: 16px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.radio-label input[type="radio"] {
  accent-color: var(--accent);
}

/* ---------- Bulk Actions Bar ---------- */
.bulk-bar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--border);
  animation: fadeIn 0.2s ease;
}

.bulk-bar.visible {
  display: flex;
}

.bulk-bar-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- Settings Form ---------- */
.settings-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 600px;
}

.settings-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ---------- Search ---------- */
.search-input {
  position: relative;
}

.search-input .input {
  padding-left: 34px;
}

.search-input::before {
  content: '🔍';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  z-index: 1;
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* Clickable row */
.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  color: var(--text-primary);
}

/* IP cell monospace */
.ip-cell {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Usage bar mini */
.usage-bar-mini {
  width: 80px;
  height: 4px;
  background: var(--bg-input);
  border-radius: 2px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
}

.usage-bar-mini-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ---------- Mobile Toggle ---------- */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: var(--radius-md);
  z-index: 1001;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
  z-index: 99;
}

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

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .scan-form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
  }

  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    bottom: 0;
    width: 280px;
    transition: left 0.3s ease;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
  }

  .sidebar-open .sidebar {
    left: 0;
  }

  .sidebar-open .sidebar-overlay {
    display: block;
  }

  .main-content {
    padding: 20px 16px 60px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

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

  .scan-form-grid {
    grid-template-columns: 1fr;
  }

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

  table {
    min-width: 600px;
  }

  .modal {
    width: 95%;
    margin: 10px;
  }

  .chart-container {
    height: 240px;
  }
}

/* Large Displays - polish */
@media (min-width: 1600px) {
  .stat-cards {
    grid-template-columns: repeat(5, 1fr);
  }

  .main-content {
    max-width: 1600px;
    margin: 0 auto;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
}