/* ══════════════════════════════════════════
   WBS System - Main Stylesheet
   ══════════════════════════════════════════ */

:root {
  --primary: #1a3a5c;
  --primary-light: #2557a7;
  --primary-dark: #0f2540;
  --accent: #e8aa14;
  --accent-hover: #d09a0a;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0ea5e9;
  --bg: #f0f4f8;
  --surface: #ffffff;
  --surface2: #f8fafc;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

/* ── Utility ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.hidden { display: none !important; }
.flex { display: flex; } .flex-col { flex-direction: column; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 8px; font-weight: 600;
  font-size: 15px; cursor: pointer; border: none; transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-light); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26,58,92,0.3); }
.btn-accent { background: var(--accent); color: var(--primary-dark); }
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 17px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* ── Navbar ── */
.navbar {
  background: var(--primary);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 68px; max-width: 1200px; margin: 0 auto;
}
.navbar-brand {
  display: flex; align-items: center; gap: 12px; color: white;
  font-size: 20px; font-weight: 700;
}
.navbar-brand .logo-icon {
  width: 40px; height: 40px; background: var(--accent);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.navbar-nav { display: flex; align-items: center; gap: 8px; }
.nav-link {
  color: rgba(255,255,255,0.8); padding: 8px 16px;
  border-radius: 6px; font-size: 14px; font-weight: 500; transition: all 0.2s;
}
.nav-link:hover, .nav-link.active { color: white; background: rgba(255,255,255,0.12); }
.navbar-cta { margin-left: 8px; }

/* ── Hero Section ── */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  padding: 80px 0 100px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(232,170,20,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-text { color: white; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(232,170,20,0.2); border: 1px solid rgba(232,170,20,0.4);
  color: var(--accent); padding: 6px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 600; margin-bottom: 20px;
}
.hero h1 { font-size: 48px; font-weight: 800; line-height: 1.15; margin-bottom: 20px; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 18px; color: rgba(255,255,255,0.8); margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-card {
  background: rgba(255,255,255,0.08); backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.2); border-radius: 16px;
  padding: 32px; color: white;
}
.hero-card h3 { font-size: 18px; margin-bottom: 16px; color: var(--accent); }
.hero-card-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.hero-card-item:last-child { border-bottom: none; }
.hero-card-item .icon { font-size: 20px; margin-top: 2px; }
.hero-card-item p { font-size: 14px; color: rgba(255,255,255,0.8); margin: 2px 0 0; }

/* ── Section ── */
.section { padding: 80px 0; }
.section-alt { background: var(--surface); }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 36px; font-weight: 800; color: var(--primary-dark); margin-bottom: 12px; }
.section-header p { font-size: 17px; color: var(--text-muted); max-width: 600px; margin: 0 auto; }

/* ── Feature Cards ── */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow-sm); transition: all 0.3s;
  border: 1px solid var(--border);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon {
  width: 56px; height: 56px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: 16px;
}
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--primary-dark); }
.feature-card p { color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* ── Process Steps ── */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; }
.steps-grid::before {
  content: ''; position: absolute; top: 36px; left: 10%; right: 10%;
  height: 2px; background: linear-gradient(to right, var(--primary), var(--accent));
  z-index: 0;
}
.step-card { text-align: center; position: relative; z-index: 1; }
.step-number {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--primary); color: white;
  font-size: 24px; font-weight: 800; display: flex; align-items: center;
  justify-content: center; margin: 0 auto 16px;
  border: 4px solid var(--surface); box-shadow: var(--shadow-sm);
}
.step-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--primary-dark); }
.step-card p { font-size: 13px; color: var(--text-muted); }

/* ── Cards (CTA) ── */
.cta-section {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 80px 0; text-align: center; color: white;
}
.cta-section h2 { font-size: 36px; font-weight: 800; margin-bottom: 16px; }
.cta-section p { font-size: 17px; color: rgba(255,255,255,0.8); margin-bottom: 32px; }
.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── Form Styles ── */
.form-card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; max-width: 800px; margin: 0 auto;
}
.form-header {
  background: var(--primary); padding: 32px; color: white;
}
.form-header h2 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.form-header p { color: rgba(255,255,255,0.75); font-size: 14px; }
.form-body { padding: 32px; }
.form-section { margin-bottom: 32px; }
.form-section-title {
  font-size: 15px; font-weight: 700; color: var(--primary);
  margin-bottom: 16px; padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text); margin-bottom: 6px;
}
.form-group label .required { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; color: var(--text);
  background: var(--surface); transition: border-color 0.2s, box-shadow 0.2s;
  font-family: var(--font);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,58,92,0.12); }
.form-control.error { border-color: var(--danger); }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.field-error { font-size: 12px; color: var(--danger); margin-top: 4px; display: flex; align-items: center; gap: 4px; }

/* ── Toggle ── */
.toggle-group {
  display: flex; gap: 8px;
}
.toggle-btn {
  flex: 1; padding: 10px; border-radius: 8px; border: 2px solid var(--border);
  background: var(--surface2); cursor: pointer; text-align: center;
  font-size: 14px; font-weight: 500; transition: all 0.2s; color: var(--text-muted);
}
.toggle-btn.active {
  border-color: var(--primary); background: rgba(26,58,92,0.06); color: var(--primary); font-weight: 600;
}

/* ── Alert / Toast ── */
.alert {
  padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 12px;
}
.alert-success { background: #dcfce7; border: 1px solid #86efac; color: #15803d; }
.alert-error { background: #fee2e2; border: 1px solid #fca5a5; color: #b91c1c; }
.alert-warning { background: #fef9c3; border: 1px solid #fde047; color: #a16207; }
.alert-info { background: #e0f2fe; border: 1px solid #7dd3fc; color: #0369a1; }

/* ── Status Badge ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.badge-new { background: #dbeafe; color: #1d4ed8; }
.badge-acknowledged { background: #fef9c3; color: #854d0e; }
.badge-under_review { background: #fef3c7; color: #b45309; }
.badge-investigating { background: #fde68a; color: #92400e; }
.badge-resolved { background: #dcfce7; color: #166534; }
.badge-closed { background: #f1f5f9; color: #475569; }
.badge-invalid { background: #fee2e2; color: #991b1b; }
.badge-low { background: #dcfce7; color: #166534; }
.badge-medium { background: #fef9c3; color: #854d0e; }
.badge-high { background: #fee2e2; color: #991b1b; }
.badge-critical { background: #7f1d1d; color: #fecaca; }

/* ── Card ── */
.card {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--border); }
.card-body { padding: 24px; }

/* ── Dropzone ── */
.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius-sm);
  padding: 32px; text-align: center; cursor: pointer; transition: all 0.2s;
  background: var(--surface2);
}
.dropzone:hover, .dropzone.drag-over { border-color: var(--primary); background: rgba(26,58,92,0.04); }
.dropzone .icon { font-size: 40px; margin-bottom: 8px; }
.dropzone p { color: var(--text-muted); font-size: 14px; }
.dropzone strong { color: var(--primary); }
.file-list { margin-top: 12px; }
.file-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: var(--surface2); border-radius: 6px;
  margin-bottom: 6px; font-size: 13px;
}
.file-item .remove-file { cursor: pointer; color: var(--danger); font-size: 16px; }

/* ── Success Screen ── */
.success-screen { text-align: center; padding: 60px 40px; }
.success-icon {
  width: 80px; height: 80px; background: #dcfce7;
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 40px; margin: 0 auto 24px;
}
.credential-box {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin: 24px auto;
  max-width: 400px; text-align: left;
}
.credential-item { margin-bottom: 16px; }
.credential-item label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.credential-item .value {
  font-size: 22px; font-weight: 800; letter-spacing: 2px; color: var(--primary-dark);
  font-family: monospace; margin-top: 4px;
}
.credential-item:last-child { margin-bottom: 0; }
.copy-btn { font-size: 12px; background: var(--primary); color: white; border: none; padding: 2px 8px; border-radius: 4px; cursor: pointer; margin-left: 8px; }

/* ── Progress Steps ── */
.form-steps { display: flex; justify-content: center; margin-bottom: 32px; gap: 0; }
.form-step {
  display: flex; align-items: center; color: var(--text-muted); font-size: 13px;
}
.form-step .step-dot {
  width: 32px; height: 32px; border-radius: 50%; background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; margin-right: 8px; transition: all 0.3s;
}
.form-step.active .step-dot { background: var(--primary); color: white; }
.form-step.done .step-dot { background: var(--success); color: white; }
.form-step.active { color: var(--primary); font-weight: 600; }
.step-connector { width: 48px; height: 2px; background: var(--border); margin: 0 4px; }
.step-connector.done { background: var(--success); }

/* ── Footer ── */
.footer { background: var(--primary-dark); color: rgba(255,255,255,0.7); padding: 40px 0; margin-top: auto; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.footer-brand h3 { color: white; font-size: 18px; margin-bottom: 8px; }
.footer-brand p { font-size: 13px; line-height: 1.7; }
.footer h4 { color: white; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 6px; }
.footer ul li a { font-size: 13px; color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer ul li a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); margin-top: 32px; padding-top: 24px;
  text-align: center; font-size: 13px;
}

/* ── Loading Spinner ── */
.spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: white;
  border-radius: 50%; animation: spin 0.6s linear infinite;
}
.spinner-dark { border-color: rgba(0,0,0,0.15); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Fade In ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.5s ease; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; }
  .hero-card { display: none; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .steps-grid::before { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 32px; }
  .features-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .navbar-nav .nav-link { display: none; }
}
