/* ═══════════════════════════════════════════════════════════════════════
   Sızma Testi Otomasyon Aracı — Stil Dosyası
   Tema: Modern koyu, gradient vurgular, geniş kartlar
═══════════════════════════════════════════════════════════════════════ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #131825;
  --bg-tertiary: #1a2236;
  --bg-card: #1a2236;
  --bg-hover: #232b42;
  --border: #2a3349;
  --border-light: #3a4560;
  --text-primary: #f1f5f9;
  --text-secondary: #b4c0d3;
  --text-muted: #6b7891;
  --accent: #38bdf8;
  --accent-hover: #0ea5e9;
  --accent-glow: rgba(56, 189, 248, 0.4);
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.1);
  --success-border: rgba(34, 197, 94, 0.4);
  --warning: #f59e0b;
  --danger: #ef4444;
  --critical: #dc2626;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
               'Noto Sans', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  font-feature-settings: "case", "kern", "liga";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═══ SIDEBAR ═══════════════════════════════════════════════════════════ */

.sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px 28px;
  border-bottom: 1px solid var(--border);
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  width: 100%;
  transition: all 0.15s ease;
  position: relative;
}

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

.nav-item.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%,
                              rgba(14, 165, 233, 0.05) 100%);
  color: var(--accent);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-badge {
  background: var(--accent);
  color: var(--bg-primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.footer-text {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ═══ MAIN ═════════════════════════════════════════════════════════════ */

.main {
  flex: 1;
  padding: 32px 48px;
  overflow-y: auto;
  max-width: 100%;
}

.page {
  animation: fadeIn 0.25s ease-out;
}

.page.hidden { display: none; }

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

.page-header { margin-bottom: 28px; }

h1 {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}

.page-sub {
  color: var(--text-muted);
  font-size: 14px;
}

/* ═══ CARD ═════════════════════════════════════════════════════════════ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
}

/* ═══ STAT CARDS ═══════════════════════════════════════════════════════ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s;
}

.stat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg { width: 24px; height: 24px; }

.icon-blue   { background: rgba(56, 189, 248, 0.15);  color: #38bdf8; }
.icon-orange { background: rgba(251, 146, 60, 0.15);  color: #fb923c; }
.icon-red    { background: rgba(239, 68, 68, 0.15);   color: #ef4444; }
.icon-amber  { background: rgba(245, 158, 11, 0.15);  color: #f59e0b; }
.icon-green  { background: rgba(34, 197, 94, 0.15);   color: #22c55e; }
.icon-purple { background: rgba(168, 85, 247, 0.15);  color: #a855f7; }

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

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ═══ FORM ════════════════════════════════════════════════════════════ */

.form-group { margin-bottom: 24px; }

.form-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  letter-spacing: 0.2px;
}

.quick-actions { display: flex; gap: 6px; }

input[type="text"] {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  transition: all 0.15s;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ═══ MODULES GRID (Yeni tasarım — geniş kartlar) ═══════════════════════ */

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}

.module-card {
  position: relative;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 20px 20px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 140px;
}

.module-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.module-card.selected {
  border-color: var(--success);
  background: linear-gradient(135deg,
              rgba(34, 197, 94, 0.08) 0%,
              rgba(34, 197, 94, 0.02) 100%);
}

.module-card.selected::after {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  background: var(--success);
  border-radius: 50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px;
}

.module-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 36px;
}

.module-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.module-card.selected .module-card-icon {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.module-card-icon svg { width: 22px; height: 22px; }

.module-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.module-owasp-badge {
  display: inline-block;
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.module-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

/* Info ikonu — sağ üst köşe (selected işaretinin altında, hover'da yan yana) */
.module-info-btn {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 26px;
  height: 26px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  font-size: 13px;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, 'Times New Roman', serif;
  transition: all 0.15s;
  z-index: 2;
}

.module-info-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: scale(1.1);
}

/* Tooltip — büyük, ferah */
.module-tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  right: -8px;
  background: var(--bg-secondary);
  border: 1px solid var(--accent);
  color: var(--text-primary);
  padding: 16px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  width: 360px;
  max-width: 360px;
  text-align: left;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  pointer-events: none;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transform: translateY(4px);
}

.module-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 16px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--accent);
}

.module-info-btn:hover + .module-tooltip,
.module-info-btn:focus + .module-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tooltip-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tooltip-body {
  color: var(--text-secondary);
}

/* ═══ BUTTONS ════════════════════════════════════════════════════════ */

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  color: white;
  transition: all 0.15s;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45);
}

.btn-primary:disabled {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-mini-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-mini-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(56, 189, 248, 0.05);
}

/* ═══ PROGRESS BAR ═════════════════════════════════════════════════════ */

.progress-container {
  margin-top: 24px;
  padding: 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.progress-container.hidden { display: none; }

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

.progress-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--bg-tertiary);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.progress-percent {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.progress-bar {
  height: 10px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38bdf8 0%, #0ea5e9 50%, #38bdf8 100%);
  background-size: 200% 100%;
  border-radius: 6px;
  transition: width 0.4s ease;
  animation: shimmer 2s linear infinite;
  position: relative;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ═══ STATUS BOX ═══════════════════════════════════════════════════════ */

.status-box {
  margin-top: 20px;
  padding: 18px;
  background: var(--bg-primary);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.status-box.success {
  border-color: var(--success);
  background: var(--success-bg);
}

.status-box.error {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.status-box.hidden { display: none; }

/* ═══ SCANS TABLE ══════════════════════════════════════════════════════ */

.scans-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scan-row {
  display: grid;
  grid-template-columns: 50px 1fr 110px 130px 90px 120px;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  align-items: center;
  transition: all 0.15s;
}

.scan-row:hover { border-color: var(--border-light); }

.scan-row.header {
  background: transparent;
  border-color: transparent;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.6px;
  padding: 6px 16px;
}

.scan-target {
  color: var(--text-primary);
  font-family: 'SF Mono', Monaco, 'Roboto Mono', Consolas, monospace;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scan-date {
  color: var(--text-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.status-completed { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.status-running   { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.status-error     { background: rgba(239, 68, 68, 0.15); color: #f87171; }

.vuln-count {
  font-weight: 700;
  color: #fb923c;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.scan-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.btn-icon {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.btn-icon svg { width: 14px; height: 14px; }

.btn-icon.btn-html:hover  { color: var(--accent);  border-color: var(--accent); }
.btn-icon.btn-pdf:hover   { color: #ef4444;        border-color: #ef4444; }
.btn-icon.btn-json:hover  { color: #fb923c;        border-color: #fb923c; }
.btn-icon.btn-danger:hover{ color: #f87171;        border-color: #f87171; background: rgba(239, 68, 68, 0.1); }

/* ═══ LOADING ══════════════════════════════════════════════════════════ */

.loading {
  text-align: center;
  color: var(--text-muted);
  padding: 32px;
  font-size: 14px;
}

/* ═══ SCENARIOS ════════════════════════════════════════════════════════ */

.scenario-item {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 12px;
  transition: border-color 0.15s;
}

.scenario-item:hover { border-color: var(--border-light); }

.scenario-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.scenario-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.scenario-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 10px;
  line-height: 1.5;
}

.severity-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.severity-Critical { background: rgba(220, 38, 38, 0.2); color: #fca5a5; }
.severity-High     { background: rgba(234, 88, 12, 0.2); color: #fdba74; }
.severity-Medium   { background: rgba(202, 138, 4, 0.2); color: #fde68a; }
.severity-Low      { background: rgba(37, 99, 235, 0.2); color: #bfdbfe; }

/* ═══ ABOUT ════════════════════════════════════════════════════════════ */

.about-intro {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.feature-list {
  margin: 0 0 24px 20px;
  color: var(--text-secondary);
  line-height: 2;
  font-size: 14px;
}

.feature-list strong {
  color: var(--text-primary);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.team-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.team-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 14px;
}

.team-role {
  font-size: 12px;
  color: var(--accent);
  margin-top: 2px;
}

.team-task {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.4;
}

code {
  background: var(--bg-tertiary);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
}

/* ═══ RESPONSIVE ═══════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .sidebar { width: 70px; }
  .brand-text, .nav-item span:not(.nav-icon),
  .sidebar-footer .footer-text { display: none; }
  .main { padding: 24px; }
  .scan-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .modules-grid { grid-template-columns: 1fr; }
}
