/* ═══════════════════════════════════════════════════════════════
   Pentest AI — Unified stylesheet (dark/light, responsive, premium)
   ═══════════════════════════════════════════════════════════════ */

:root, [data-theme="light"] {
  --vt-primary: #2563eb;
  --vt-primary-2: #4f46e5;
  --vt-primary-soft: rgba(37, 99, 235, 0.12);
  --vt-accent: #f59e0b;
  --vt-success: #10b981;
  --vt-danger: #ef4444;
  --vt-warning: #f59e0b;
  --vt-info: #0ea5e9;

  --vt-bg: #f6f8fc;
  --vt-surface: #ffffff;
  --vt-surface-2: #f1f5f9;
  --vt-border: #e4e9f2;
  --vt-text: #0f172a;
  --vt-muted: #64748b;
  --vt-focus: rgba(37, 99, 235, 0.18);

  --vt-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --vt-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --vt-shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.14);

  --vt-radius: 16px;
  --vt-radius-sm: 10px;
  --vt-radius-pill: 999px;

  --vt-sidebar-w: 252px;
  --vt-header-h: 64px;

  --vt-hero-grad: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #0ea5e9 100%);
  --vt-glass: rgba(255, 255, 255, 0.72);
}

[data-theme="dark"] {
  --vt-primary: #60a5fa;
  --vt-primary-2: #818cf8;
  --vt-primary-soft: rgba(96, 165, 250, 0.14);
  --vt-success: #34d399;
  --vt-danger: #f87171;
  --vt-warning: #fbbf24;

  --vt-bg: #0a0f1e;
  --vt-surface: #111a2e;
  --vt-surface-2: #1b2742;
  --vt-border: #26324b;
  --vt-text: #e6edf7;
  --vt-muted: #93a2bd;
  --vt-focus: rgba(96, 165, 250, 0.25);

  --vt-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --vt-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --vt-shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);

  --vt-hero-grad: linear-gradient(135deg, #0b1226 0%, #1e3a8a 55%, #0e7490 100%);
  --vt-glass: rgba(17, 26, 46, 0.72);
}

/* ── Base ─────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--vt-bg);
  color: var(--vt-text);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.25; color: var(--vt-text); letter-spacing: -0.01em; }
a { color: var(--vt-primary); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--vt-primary); text-decoration: none; }
.muted { color: var(--vt-muted); }
.theme-logo-light { display: none; }
[data-theme="dark"] .theme-logo-light { display: inline-block; }
[data-theme="dark"] .theme-logo-dark { display: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--vt-border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--vt-muted); }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn { border-radius: var(--vt-radius-sm); font-weight: 600; transition: all 0.2s ease; }
.btn-primary {
  background: linear-gradient(135deg, var(--vt-primary), var(--vt-primary-2));
  border: none; color: #fff; box-shadow: 0 4px 14px var(--vt-primary-soft);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px var(--vt-primary-soft); color: #fff; }
.btn-outline-primary { color: var(--vt-primary); border-color: var(--vt-primary); }
.btn-outline-primary:hover { background: var(--vt-primary); color: #fff; }
.btn-outline-secondary { color: var(--vt-text); border-color: var(--vt-border); }
.btn-outline-secondary:hover { background: var(--vt-surface-2); color: var(--vt-text); }
.btn-danger { background: var(--vt-danger); border: none; }
.btn-ghost { background: transparent; border: 1px solid transparent; color: var(--vt-muted); }
.btn-ghost:hover { background: var(--vt-surface-2); color: var(--vt-text); }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: var(--vt-radius-pill); border: 1px solid transparent; background: transparent;
  color: var(--vt-muted); cursor: pointer; transition: all 0.2s ease;
}
.btn-icon:hover { background: var(--vt-surface-2); color: var(--vt-text); }
.btn-lg { padding: 0.75rem 1.5rem; border-radius: 12px; }
.btn:disabled { opacity: 0.6; }

/* ── Cards & glassmorphism ────────────────────────────────────── */
.card {
  background: var(--vt-surface);
  border: 1px solid var(--vt-border);
  border-radius: var(--vt-radius);
  box-shadow: var(--vt-shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { box-shadow: var(--vt-shadow); }
.card-hover:hover { transform: translateY(-3px); border-color: var(--vt-primary-soft); }
.card-body { padding: 22px 26px; }
.card-title { font-weight: 700; margin-bottom: 4px; }
.card-subtitle { color: var(--vt-muted); font-size: 0.85rem; }

.glass {
  background: var(--vt-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--vt-radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.stat-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.stat-card .icon-box {
  display: inline-flex; align-items: center; justify-content: center;
  width: 50px; height: 50px; border-radius: 14px; font-size: 1.4rem;
  color: var(--vt-primary); background: var(--vt-primary-soft);
}
.stat-card .stat-value { font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.stat-card .stat-label { font-size: 0.78rem; color: var(--vt-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Navbar ───────────────────────────────────────────────────── */
.navbar-theme { background: var(--vt-glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--vt-border); position: sticky; top: 0; z-index: 1030; }
.navbar-theme .nav-link { color: var(--vt-text); font-weight: 500; }
.navbar-theme .nav-link:hover { color: var(--vt-primary); }
.navbar-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--vt-text); }
.navbar-brand img { height: 30px; }

/* ── Sidebar + app layout ─────────────────────────────────────── */
#app-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--vt-sidebar-w); flex-shrink: 0; position: fixed; top: 0; bottom: 0; left: 0;
  background: var(--vt-surface); border-right: 1px solid var(--vt-border);
  padding: 18px 14px 24px; overflow-y: auto; z-index: 1040;
  display: flex; flex-direction: column; transition: transform 0.25s ease;
}
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 20px; font-weight: 800; font-size: 1.1rem; }
.sidebar .brand img { height: 30px; }
.sidebar .nav-link { color: var(--vt-muted); border-radius: 10px; padding: 10px 14px; font-weight: 500; display: flex; align-items: center; gap: 12px; }
.sidebar .nav-link i { font-size: 1.05rem; width: 20px; text-align: center; }
.sidebar .nav-link:hover { color: var(--vt-text); background: var(--vt-surface-2); }
.sidebar .nav-link.active { color: var(--vt-primary); background: var(--vt-primary-soft); }
.sidebar .nav-section { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--vt-muted); padding: 18px 14px 6px; font-weight: 700; }

.app-main { flex: 1; margin-left: var(--vt-sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.app-header {
  height: var(--vt-header-h); background: var(--vt-glass); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--vt-border); display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: sticky; top: 0; z-index: 1030; gap: 12px;
}
.app-header .page-title { font-weight: 700; font-size: 1.05rem; margin: 0; }
.app-header .hdr-actions { display: flex; align-items: center; gap: 8px; }
.app-page { padding: 26px; flex: 1; animation: fadeUp 0.3s ease; }

.sidebar-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1035; display: none; }
.sidebar-backdrop.show { display: block; }

.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--vt-primary-soft); color: var(--vt-primary); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }

.bell-btn { position: relative; }
.bell-btn .badge-count { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; border-radius: var(--vt-radius-pill); background: var(--vt-danger); color: #fff; font-size: 0.65rem; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

.dropdown-menu { background: var(--vt-surface); border: 1px solid var(--vt-border); box-shadow: var(--vt-shadow); border-radius: var(--vt-radius); }
.dropdown-item { color: var(--vt-text); }
.dropdown-item:hover { background: var(--vt-surface-2); color: var(--vt-text); }
.dropdown-item i { width: 18px; margin-right: 8px; color: var(--vt-muted); }

/* ── Landing hero ─────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 110px 0 96px;
  text-align: center;
  color: #fff;
  background: var(--vt-hero-grad);
  overflow: hidden;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.5;
}
.hero::before { width: 460px; height: 460px; background: #60a5fa; top: -180px; left: -120px; }
.hero::after { width: 520px; height: 520px; background: #f59e0b; bottom: -240px; right: -140px; opacity: 0.35; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.4rem, 5.5vw, 3.8rem); font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.hero .lead { font-size: 1.18rem; color: rgba(255,255,255,0.85); max-width: 640px; margin: 0 auto; }
.hero .btn-primary { background: #fff; color: #1e3a8a; border: none; }
.hero .btn-primary:hover { background: #e6edf7; }
.hero .btn-outline-light { border-color: rgba(255,255,255,0.5); color: #fff; }
.hero .btn-outline-light:hover { background: rgba(255,255,255,0.15); color: #fff; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: var(--vt-radius-pill);
  background: rgba(255,255,255,0.15); color: #fff; font-size: 0.85rem; font-weight: 600; margin-bottom: 20px;
  backdrop-filter: blur(6px);
}

.section { padding: 76px 0; scroll-margin-top: 90px; }
.section-title { font-size: 2rem; font-weight: 800; letter-spacing: -0.01em; }
.section-sub { color: var(--vt-muted); max-width: 560px; margin: 0 auto 42px; }
.feature-card { height: 100%; padding: 28px; }
.feature-card .icon-box { font-size: 1.6rem; color: var(--vt-primary); background: var(--vt-primary-soft); width: 54px; height: 54px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; }
.step-card { text-align: center; padding: 26px; }
.step-num { font-size: 2.2rem; font-weight: 800; color: var(--vt-primary); opacity: 0.35; }
.contact-card .icon-box { font-size: 1.5rem; color: var(--vt-primary); background: var(--vt-primary-soft); width: 54px; height: 54px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; }
.contact-link { font-size: 1.1rem; font-weight: 600; color: var(--vt-text); }
.contact-link:hover { color: var(--vt-primary); }
.pricing-card { height: 100%; position: relative; }
.pricing-card.featured { border: 2px solid var(--vt-primary); }
.pricing-card .plan-name { font-size: 1.05rem; font-weight: 700; }
.pricing-card .plan-price { font-size: 2.3rem; font-weight: 800; }
.pricing-card ul { list-style: none; padding: 0; margin: 0; }
.pricing-card ul li { padding: 6px 0; color: var(--vt-text); }
.pricing-card ul li i { color: var(--vt-success); margin-right: 6px; }
.pricing-table { border-collapse: separate; border-spacing: 0; overflow: hidden; border-radius: 12px; border: 1px solid var(--vt-border); box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.pricing-table thead th { background: var(--vt-surface-2); font-weight: 700; padding: 14px 16px; }
.pricing-table thead th:first-child { border-top-left-radius: 12px; }
.pricing-table thead th:last-child { border-top-right-radius: 12px; }
.pricing-table tbody th, .pricing-table tbody td { padding: 12px 16px; border-top: 1px solid var(--vt-border); }
.pricing-table tbody tr:nth-child(even) { background: var(--vt-surface); }
.pricing-table tbody tr:hover { background: var(--vt-surface-2); }
.pricing-table .featured-col { background: rgba(29, 78, 216, 0.06); }
.pricing-table .featured-col th, .pricing-table .featured-col td { border-top-color: rgba(29, 78, 216, 0.15); }

.site-footer { background: var(--vt-surface); border-top: 1px solid var(--vt-border); padding: 48px 0 24px; margin-top: 48px; }
.footer-link { color: var(--vt-muted); }
.footer-link:hover { color: var(--vt-primary); }

.accordion-button { background: var(--vt-surface); color: var(--vt-text); }
.accordion-button:not(.collapsed) { background: var(--vt-surface); color: var(--vt-primary); }
.accordion-item { background: var(--vt-surface); border: 1px solid var(--vt-border); }

/* ── Auth ─────────────────────────────────────────────────────── */
.auth-shell { min-height: 82vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; background: radial-gradient(800px 400px at 50% -10%, var(--vt-primary-soft), transparent 70%); }
.auth-card { width: 100%; max-width: 430px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 20px; font-weight: 800; }
.auth-brand img { height: 28px; }

/* ── Forms ────────────────────────────────────────────────────── */
.form-control, .form-select {
  background: var(--vt-surface); border: 1px solid var(--vt-border); color: var(--vt-text);
  border-radius: 10px; padding: 0.6rem 0.85rem;
}
.form-control:focus, .form-select:focus {
  background: var(--vt-surface); color: var(--vt-text); border-color: var(--vt-primary);
  box-shadow: 0 0 0 3px var(--vt-focus);
}
.form-label { font-weight: 600; font-size: 0.85rem; }
.form-text { color: var(--vt-muted); }
.input-group-text { background: var(--vt-surface-2); border: 1px solid var(--vt-border); color: var(--vt-muted); }

.otp-inputs { display: flex; gap: 10px; justify-content: center; }
.otp-input {
  width: 54px; height: 62px; text-align: center; font-size: 1.5rem; font-weight: 700;
  border: 1px solid var(--vt-border); border-radius: 12px; background: var(--vt-surface); color: var(--vt-text);
  transition: all 0.15s ease;
}
.otp-input:focus { border-color: var(--vt-primary); box-shadow: 0 0 0 3px var(--vt-focus); outline: none; }

/* ── Badges ───────────────────────────────────────────────────── */
.badge { font-weight: 600; border-radius: var(--vt-radius-pill); padding: 0.35em 0.75em; }
.badge-sev-critical { background: rgba(239,68,68,0.15); color: #ef4444; }
.badge-sev-high { background: rgba(245,158,11,0.15); color: #f59e0b; }
.badge-sev-medium { background: rgba(234,179,8,0.15); color: #ca8a04; }
.badge-sev-low { background: rgba(59,130,246,0.15); color: #3b82f6; }
.badge-sev-info { background: rgba(100,116,139,0.15); color: #64748b; }
.badge-sev-unknown { background: rgba(100,116,139,0.15); color: #64748b; }
.badge-status-active, .badge-status-online, .badge-status-idle, .badge-status-generated, .badge-status-completed { background: rgba(16,185,129,0.15); color: #10b981; }
.badge-status-disabled, .badge-status-failed, .badge-status-unavailable, .badge-status-offline { background: rgba(239,68,68,0.15); color: #ef4444; }
.badge-status-queued, .badge-status-pending, .badge-status-scanning, .badge-status-running { background: rgba(245,158,11,0.15); color: #f59e0b; }

/* ── Tables ───────────────────────────────────────────────────── */
.table { color: var(--vt-text); --bs-table-bg: transparent; --bs-table-hover-bg: var(--vt-surface-2); }
.table thead th { background: var(--vt-surface-2); border-bottom: 1px solid var(--vt-border); color: var(--vt-muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.table td, .table th { border-color: var(--vt-border); vertical-align: middle; padding: 0.75rem 0.95rem; }
.table-hover tbody tr:hover { background: var(--vt-surface-2); }
.sortable { cursor: pointer; user-select: none; }
.sortable:hover { color: var(--vt-text); }

/* ── Progress / stepper ───────────────────────────────────────── */
.progress { background: var(--vt-surface-2); border-radius: var(--vt-radius-pill); height: 12px; }
.progress-bar { background: linear-gradient(90deg, var(--vt-primary), var(--vt-success)); border-radius: var(--vt-radius-pill); transition: width 0.6s ease; }

.steps { list-style: none; margin: 0; padding: 0; }
.steps li { position: relative; padding: 0 0 18px 40px; }
.steps li:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 30px; bottom: 0; width: 2px; background: var(--vt-border); }
.steps .step-dot { position: absolute; left: 8px; top: 2px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--vt-border); background: var(--vt-surface); }
.steps li.active .step-dot { border-color: var(--vt-primary); background: var(--vt-primary); box-shadow: 0 0 0 4px var(--vt-focus); }
.steps li.done .step-dot { border-color: var(--vt-success); background: var(--vt-success); }
.steps li.active .step-label { font-weight: 700; color: var(--vt-primary); }
.steps li.done .step-label { color: var(--vt-success); }
.step-label { font-weight: 500; }
.step-desc { font-size: 0.8rem; color: var(--vt-muted); }

/* ── Modals / toasts ──────────────────────────────────────────── */
.modal-content { background: var(--vt-surface); color: var(--vt-text); border: 1px solid var(--vt-border); border-radius: var(--vt-radius); }
.modal-header { border-bottom: 1px solid var(--vt-border); }
.modal-footer { border-top: 1px solid var(--vt-border); }
.toast { background: var(--vt-surface); border: 1px solid var(--vt-border); border-radius: 12px; box-shadow: var(--vt-shadow); color: var(--vt-text); }
.toast-success { border-left: 4px solid var(--vt-success); }
.toast-error { border-left: 4px solid var(--vt-danger); }
.toast-info { border-left: 4px solid var(--vt-primary); }

/* ── Score gauge / findings / misc ────────────────────────────── */
.score-gauge { position: relative; width: 190px; height: 190px; margin: 0 auto; }
.score-gauge .score-value { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-gauge .score-value .n { font-size: 2.6rem; font-weight: 800; }
.score-gauge .score-value .g { font-size: 1rem; color: var(--vt-muted); }

.finding-row { border-left: 4px solid var(--vt-muted); border-radius: 8px; }
.finding-row.sev-critical { border-left-color: #ef4444; }
.finding-row.sev-high { border-left-color: #f59e0b; }
.finding-row.sev-medium { border-left-color: #ca8a04; }
.finding-row.sev-low { border-left-color: #3b82f6; }

pre { background: var(--vt-surface-2); padding: 12px; border-radius: 10px; border: 1px solid var(--vt-border); white-space: pre-wrap; word-break: break-word; font-size: 0.8rem; }

.sticky-bottom-bar { position: sticky; bottom: 0; background: var(--vt-surface); border-top: 1px solid var(--vt-border); padding: 14px 20px; box-shadow: 0 -4px 16px rgba(0,0,0,0.06); z-index: 5; }

/* ── Layout helpers ───────────────────────────────────────────── */
.widget-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 18px; }
.page-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }

/* ── Skeleton ─────────────────────────────────────────────────── */
.skeleton { position: relative; overflow: hidden; background: var(--vt-surface-2); border-radius: 10px; color: transparent !important; user-select: none; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* ── Animations ───────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeUp 0.4s ease; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.floaty { animation: floaty 5s ease-in-out infinite; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .app-page { padding: 16px; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
  .hero { padding: 70px 0 56px; }
  .section { padding: 48px 0; }
  .stat-card .stat-value { font-size: 1.4rem; }
  .app-header { padding: 0 14px; }
  .app-page { padding: 12px; }
  .widget-grid { grid-template-columns: 1fr; }
  .otp-input { width: 46px; height: 54px; font-size: 1.25rem; }
  .table-wrap { overflow-x: auto; }
  .page-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 767.98px) {
  .table-responsive-sm { overflow-x: auto; }
}
