/* ── MOBILE.CSS — loaded last, overrides everything ──────────────── */

/* ── HAMBURGER MENU ──────────────────────────────────────────────── */
.mobile-burger { display: none; }
.mobile-drawer { display: none; }
.mobile-overlay { display: none; }

@media (max-width: 768px) {
  /* Show burger, hide nav links */
  .mobile-burger {
    display: flex !important;
    align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border: 1px solid var(--border, #1a2a40);
    border-radius: 6px;
    background: transparent;
    color: var(--blue-bright, #40d0ff);
    cursor: pointer;
    flex-shrink: 0;
    z-index: 60;
    transition: all 0.2s;
  }
  .mobile-burger:hover { border-color: var(--blue, #00b4ff); }

  .nav > a, .navbar > a,
  .nav > .nav-links { display: none !important; }

  .nav, .navbar {
    padding: 8px 12px !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
  }

  .nav-edge, .nav-right {
    position: static !important;
    margin-left: auto !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  /* Drawer */
  .mobile-drawer {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0; left: -280px;
    width: 260px; height: 100vh;
    background: var(--bg2, #0b1018);
    border-right: 1px solid var(--border, #1a2a40);
    z-index: 200;
    padding: 16px;
    gap: 4px;
    transition: left 0.3s ease;
    overflow-y: auto;
  }
  .mobile-drawer.open { left: 0; }

  .mobile-drawer-close {
    align-self: flex-end;
    width: 32px; height: 32px;
    border: 1px solid var(--border, #1a2a40);
    border-radius: 6px;
    background: transparent;
    color: var(--text-dim, #4a6a8a);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
    transition: all 0.2s;
  }
  .mobile-drawer-close:hover { border-color: var(--blue, #00b4ff); color: var(--blue-bright, #40d0ff); }

  .mobile-drawer-link {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 6px;
    color: var(--text-dim, #4a6a8a) !important;
    text-decoration: none;
    font-size: 14px !important;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.2s;
  }
  .mobile-drawer-link:hover,
  .mobile-drawer-link.active {
    color: var(--blue-bright, #40d0ff) !important;
    background: var(--blue-dim, rgba(0,180,255,0.08));
  }
  .mobile-drawer-link svg {
    width: 16px; height: 16px;
    stroke: currentColor; fill: none;
    flex-shrink: 0;
  }

  /* Overlay */
  .mobile-overlay {
    display: none !important;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 190;
  }
  .mobile-overlay.open { display: block !important; }
}

@media (max-width: 1024px) {
  .stats-row, .actions-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .net-row, .bottom-grid, .contact-grid, .features-grid { grid-template-columns: 1fr !important; }
  .panel-grid { grid-template-columns: 1fr !important; }
  .plans-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .config-grid, .form-grid { grid-template-columns: 1fr !important; }
  .ticket-stats { grid-template-columns: repeat(2, 1fr) !important; }
  .stats-bar { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 768px) {
  /* NAV — horizontal scroll, no wrap */
  .nav, .navbar {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    padding: 8px 12px !important;
    justify-content: flex-start !important;
  }
  .nav::-webkit-scrollbar, .navbar::-webkit-scrollbar { display: none; }
  .nav a, .nav-links a, .nav-btn {
    font-size: 10px !important;
    letter-spacing: 0.5px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    gap: 3px !important;
  }
  .nav a svg { width: 11px !important; height: 11px !important; }
  .nav-edge, .nav-right {
    position: static !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
    gap: 4px !important;
  }
  .badge-pro, .user-badge { font-size: 9px !important; padding: 2px 6px !important; }
  .btn-nav, .logout-btn { font-size: 9px !important; padding: 2px 6px !important; }
  .brand { font-size: 14px !important; }
  .nav-links { gap: 4px !important; }

  /* ALL GRIDS → single column */
  .panel-grid,
  .stats-row,
  .actions-grid,
  .plans-grid,
  .net-row,
  .bottom-grid,
  .contact-grid,
  .features-grid,
  .stats-grid { grid-template-columns: 1fr !important; }

  .ticket-stats { grid-template-columns: repeat(2, 1fr) !important; }

  /* CARDS */
  .card { padding: 12px !important; }
  .card-header { flex-direction: column !important; gap: 6px !important; align-items: flex-start !important; }
  .card-title { font-size: 12px !important; }
  .card-sub { font-size: 10px !important; }

  /* INPUTS — stack vertically */
  .input-row { flex-direction: column !important; gap: 8px !important; }
  .input-group.small { flex: 1 !important; }
  .slider-row { flex-direction: column !important; gap: 12px !important; }
  input, select, textarea { font-size: 14px !important; padding: 10px !important; }

  /* LAYER TABS — keep horizontal but smaller */
  .layer-tab { font-size: 12px !important; padding: 8px !important; letter-spacing: 1px !important; }

  /* METHOD TAGS — wrap nicely */
  .method-tags { gap: 4px !important; }
  .method-tag { padding: 5px 8px !important; font-size: 10px !important; }

  /* TOP TABS */
  .top-tabs { gap: 4px !important; }
  .top-tab { padding: 6px 12px !important; font-size: 11px !important; }

  /* SLIDER VALUES */
  .slider-val { font-size: 11px !important; padding: 2px 6px !important; }

  /* TABLES — horizontal scroll */
  table { display: block !important; overflow-x: auto !important; white-space: nowrap !important; }
  th, td { padding: 6px 8px !important; font-size: 11px !important; }

  /* MODALS — full width */
  .modal { width: 95vw !important; padding: 16px !important; max-height: 90vh !important; overflow-y: auto !important; }
  .modal-title { font-size: 14px !important; }

  /* LOG */
  .log { max-height: 100px !important; font-size: 10px !important; }
  .log-card { grid-column: 1 !important; }

  /* STATS BAR */
  .stats-bar { grid-template-columns: repeat(3, 1fr) !important; padding: 8px 10px !important; }
  .stat-val { font-size: 15px !important; }
  .stat-lbl { font-size: 8px !important; }
  .stat-item-value { font-size: 15px !important; }

  /* BUTTONS */
  .btn-execute { font-size: 12px !important; padding: 11px !important; letter-spacing: 2px !important; }
  .btn-stop-all { font-size: 10px !important; padding: 4px 10px !important; }

  /* SECTION TITLES */
  .section-title, .page-title { font-size: 12px !important; }
  .infra-title, .donut-title { font-size: 11px !important; }

  /* MAIN PADDING */
  .main { padding: 12px 10px !important; }

  /* HERO (dashboard) */
  .hero { padding: 16px 14px 12px !important; }
  .hero-name { font-size: 22px !important; }
  .hero-greet { font-size: 10px !important; }

  /* STAT CARDS */
  .stat-card { padding: 14px 12px !important; }
  .stat-card .stat-val { font-size: 22px !important; }

  /* ACTION CARDS */
  .action-card { padding: 16px 14px !important; }
  .action-title { font-size: 12px !important; }
  .action-sub { font-size: 11px !important; }

  /* NET CARDS */
  .net-val { font-size: 24px !important; }

  /* DONUT */
  .donut-wrap { width: 110px !important; height: 110px !important; }
  .donut-pct { font-size: 18px !important; }

  /* TEST ITEMS */
  .test-item { padding: 10px !important; }
  .test-badge { font-size: 9px !important; }
  .test-target { font-size: 10px !important; }
  .test-stats { font-size: 9px !important; gap: 8px !important; }

  /* NO TESTS */
  .no-tests { min-height: 150px !important; }

  /* SPOOF */
  .spoof-section { padding-top: 10px !important; margin-top: 10px !important; }
}

/* Small phones */
@media (max-width: 420px) {
  .hero-title { font-size: 24px !important; }
  .hero-sub { font-size: 12px !important; }
  .hero-section { padding: 28px 12px 20px !important; }
  .hero-buttons { flex-direction: column !important; gap: 8px !important; }
  .btn-hero { text-align: center !important; padding: 11px 16px !important; font-size: 13px !important; }
  .home-nav { padding: 8px 10px !important; }
  .home-links { display: none !important; }
  .home-brand { font-size: 13px !important; }
  .features { padding: 20px 12px !important; }
  .features-title { font-size: 18px !important; }
  .preview { margin: 0 10px 30px !important; }
  .preview-content { font-size: 9px !important; padding: 10px !important; }
  .plan-card { padding: 16px 12px !important; }
  .plan-price { font-size: 24px !important; }
  .plan-name { font-size: 14px !important; }
  .ticket-stats { grid-template-columns: 1fr 1fr !important; }
  .stats-bar { grid-template-columns: repeat(2, 1fr) !important; }
  .hero-badge, .hero-pill { font-size: 10px !important; padding: 4px 12px !important; }
  .footer { padding: 20px !important; font-size: 10px !important; }
}
