/* ============================================================
   SOC Report AI — main.css
   Covers: base, landing, dashboard, detail, create,
           profile, edit_profile, login, register,
           pricing, contact, terms, privacy, report (PDF)
   ============================================================ */

/* ------------------------------------------------------------
   1. CSS Variables
   ------------------------------------------------------------ */
:root {
  --soc-accent:   #3b82f6;
  --soc-dark:     #0f172a;
  --soc-card:     #1e293b;
  --soc-border:   #334155;
  --soc-navy:     #0a1628;
  --soc-blue-row: #1e3a5f;

  /* Landing-specific */
  --land-bg:      #0d1117;
  --land-card:    #161b22;
  --land-border:  #21262d;
  --land-text:    #e6edf3;
  --land-muted:   #8b949e;
}

/* ------------------------------------------------------------
   2. Base / Body
   ------------------------------------------------------------ */
body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: var(--soc-dark);
  color: #e2e8f0;
  min-height: 100vh;
}

/* Landing overrides body */
body.landing {
  background: var(--land-bg);
  color: var(--land-text);
}

/* ------------------------------------------------------------
   3. Sidebar (app layout)
   ------------------------------------------------------------ */
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: var(--soc-navy);
  border-right: 1px solid var(--soc-border);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--soc-border);
  margin-bottom: 1rem;
}

.sidebar .nav-link {
  color: #94a3b8;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  margin: 2px 0.75rem;
  font-size: 0.875rem;
  transition: color 0.15s, background 0.15s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  color: #e2e8f0;
  background: var(--soc-blue-row);
}

.sidebar .nav-link i {
  width: 20px;
  margin-right: 8px;
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--soc-border);
  margin-top: auto;
}

.main-content {
  margin-left: 260px;
  padding: 2rem;
  min-height: 100vh;
}

/* ------------------------------------------------------------
   4. Cards
   ------------------------------------------------------------ */
.card {
  background: var(--soc-card);
  border: 1px solid var(--soc-border);
  border-radius: 12px;
}

.card-header-navy {
  background: var(--soc-blue-row);
  border-color: var(--soc-border);
}

/* Stat card */
.stat-card {
  background: var(--soc-navy);
  border: 1px solid var(--soc-border);
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
}

.stat-card .stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--soc-accent);
}

.stat-card .stat-label {
  font-size: 0.78rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Report section (detail view) */
.report-section {
  background: var(--soc-navy);
  border: 1px solid var(--soc-border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.report-section h5 {
  color: var(--soc-accent);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* ------------------------------------------------------------
   5. Tables
   ------------------------------------------------------------ */
.table {
  --bs-table-bg: transparent;
  color: #e2e8f0;
}

.table thead th {
  border-color: var(--soc-border);
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.table td {
  border-color: var(--soc-blue-row);
  vertical-align: middle;
}

.table-hover tbody tr:hover td {
  background: var(--soc-blue-row);
}

/* ------------------------------------------------------------
   6. Forms
   ------------------------------------------------------------ */
.form-control,
.form-select {
  background: var(--soc-dark);
  border-color: var(--soc-border);
  color: #e2e8f0;
}

.form-control:focus,
.form-select:focus {
  background: var(--soc-dark);
  border-color: var(--soc-accent);
  color: #e2e8f0;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-control::placeholder { color: #475569; }

.form-label {
  font-weight: 500;
  font-size: 0.875rem;
  color: #cbd5e1;
}

/* ------------------------------------------------------------
   7. Badges — Severity & Status
   ------------------------------------------------------------ */
.severity-critical    { background: #ef4444 !important; }
.severity-high        { background: #f97316 !important; }
.severity-medium      { background: #eab308 !important; color: #1e293b !important; }
.severity-low         { background: #22c55e !important; color: #1e293b !important; }
.severity-informational { background: #64748b !important; }

.status-completed  { background: #22c55e !important; color: #1e293b !important; }
.status-generating { background: #f59e0b !important; color: #1e293b !important; }
.status-failed     { background: #ef4444 !important; }
.status-pending    { background: #64748b !important; }

.plan-badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ------------------------------------------------------------
   8. IOC Output block
   ------------------------------------------------------------ */
.ioc-output {
  background: #020617;
  border: 1px solid var(--soc-border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-family: 'Source Code Pro', monospace;
  font-size: 0.8rem;
  color: #86efac;
  white-space: pre-wrap;
  max-height: 320px;
  overflow-y: auto;
}

/* ------------------------------------------------------------
   9. Usage bar
   ------------------------------------------------------------ */
.usage-bar-wrap {
  background: #1e293b;
  border-radius: 99px;
  height: 6px;
}

.usage-bar {
  border-radius: 99px;
  height: 6px;
  transition: width 0.4s;
}

/* ------------------------------------------------------------
   10. Landing — Navbar
   ------------------------------------------------------------ */
.navbar-landing {
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--land-border);
}

.navbar-landing .navbar-brand {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--land-text) !important;
}

.navbar-landing .navbar-brand i { color: var(--soc-accent); }

/* ------------------------------------------------------------
   11. Landing — Hero
   ------------------------------------------------------------ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0d1117 0%, #0f2744 60%, #0d1117 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  border-radius: 50%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.hero h1 span { color: var(--soc-accent); }

.hero p.lead {
  font-size: 1.15rem;
  color: var(--land-muted);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

/* Hero stats */
.stat-item { text-align: center; }

.stat-item .number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--soc-accent);
}

.stat-item .label {
  font-size: 0.85rem;
  color: var(--land-muted);
}

/* ------------------------------------------------------------
   12. Landing — Buttons (CTA)
   ------------------------------------------------------------ */
.btn-cta {
  background: var(--soc-accent);
  color: white;
  border: none;
  padding: 16px 40px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.35);
}

.btn-cta:hover {
  background: #2563eb;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 0 45px rgba(59, 130, 246, 0.5);
}

.btn-secondary-cta {
  background: transparent;
  color: var(--land-muted);
  border: 1px solid #30363d;
  padding: 16px 32px;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s, border-color 0.2s;
}

.btn-secondary-cta:hover {
  color: var(--land-text);
  border-color: #58a6ff;
}

/* ------------------------------------------------------------
   13. Landing — Features section
   ------------------------------------------------------------ */
.features {
  background: var(--land-bg);
  padding: 100px 0;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--land-muted);
  font-size: 1.05rem;
  margin-bottom: 4rem;
}

.feature-card {
  background: var(--land-card);
  border: 1px solid var(--land-border);
  border-radius: 16px;
  padding: 2rem;
  height: 100%;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--soc-accent);
  transform: translateY(-4px);
}

.feature-icon {
  width: 52px;
  height: 52px;
  background: rgba(59, 130, 246, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--soc-accent);
  margin-bottom: 1.2rem;
}

.feature-card h5 {
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.feature-card p {
  color: var(--land-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* ------------------------------------------------------------
   14. Landing — Pricing section
   ------------------------------------------------------------ */
.pricing {
  background: var(--land-bg);
  padding: 100px 0;
  border-top: 1px solid var(--land-border);
}

.pricing-card {
  background: var(--land-card);
  border: 1px solid var(--land-border);
  border-radius: 20px;
  padding: 2.5rem;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--soc-accent);
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.15);
}

.badge-popular {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--soc-accent);
  color: white;
  padding: 4px 20px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
}

.price {
  font-size: 3rem;
  font-weight: 800;
}

.price span {
  font-size: 1rem;
  color: var(--land-muted);
  font-weight: 400;
}

.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 2rem;
}

.pricing-card ul li {
  padding: 0.4rem 0;
  color: var(--land-muted);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-card ul li i { color: #22c55e; }

/* ------------------------------------------------------------
   15. Landing — CTA & Footer
   ------------------------------------------------------------ */
.cta-section {
  background: linear-gradient(135deg, #0f2744, #0d1117);
  padding: 100px 0;
  border-top: 1px solid var(--land-border);
  text-align: center;
}

footer {
  background: var(--land-bg);
  border-top: 1px solid var(--land-border);
  padding: 2rem 0;
}

footer p {
  color: var(--land-muted);
  font-size: 0.85rem;
  margin: 0;
}

footer a {
  color: var(--land-muted);
  text-decoration: none;
  transition: color 0.15s;
}

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

/* ------------------------------------------------------------
   16. Responsive
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .main-content {
    margin-left: 0;
    padding: 1rem;
  }
}
