/* ================================================================
   SDPDR PSIKOMETRI — Main Stylesheet
   Design: AII-inspired institutional (navy blue, professional)
   ================================================================ */

:root {
  --primary:       #1C3557;
  --primary-light: #2E75B6;
  --accent:        #E05C2A;
  --accent-light:  #F47C50;
  --good:          #2E7D32;
  --warn:          #F57C00;
  --bad:           #C62828;
  --bg:            #F5F7FA;
  --surface:       #FFFFFF;
  --border:        #D5DCE6;
  --text:          #1A1A1A;
  --muted:         #6B7280;
  --nav-h:         68px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ── Typography ──────────────────────────────────── */
h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
p  { color: var(--muted); }

/* ── Container ───────────────────────────────────── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: 10px; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-light); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(224,92,42,0.35); }
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.7);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-white {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}
.btn-white:hover { background: #f0f4fa; transform: translateY(-2px); }

/* ════════════════════════════════════════
   NAVBAR
   ════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--primary);
  z-index: 900;
  transition: box-shadow 0.2s;
}
.navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.25); }

.nav-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-icon {
  width: 40px; height: 40px;
  background: var(--accent);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  color: #fff;
  font-weight: 800;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { color: #fff; font-weight: 800; font-size: 1rem; }
.brand-sub  { color: rgba(255,255,255,0.6); font-size: 0.72rem; }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
}
.nav-links a:hover { background: rgba(255,255,255,0.12); color: #fff; }
.nav-links a.nav-cta {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.nav-links a.nav-cta:hover { background: var(--accent-light); }
.nav-links a.nav-login {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.2);
}
.nav-links a.nav-login:hover { background: rgba(255,255,255,0.18); color: #fff; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span { width: 24px; height: 2px; background: #fff; border-radius: 2px; display: block; transition: all 0.2s; }

/* ════════════════════════════════════════
   HERO
   ════════════════════════════════════════ */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 80px) 0 0;
  background: linear-gradient(135deg, var(--primary) 0%, #0F2239 50%, #1A3A6B 100%);
  overflow: hidden;
  min-height: 85vh;
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 40%, rgba(46,117,182,0.25) 0%, transparent 60%),
              radial-gradient(ellipse at 10% 80%, rgba(224,92,42,0.12) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 60px;
  align-items: center;
  padding-bottom: 80px;
}

.hero-badge {
  display: inline-block;
  background: rgba(224,92,42,0.2);
  border: 1px solid rgba(224,92,42,0.5);
  color: #F4956E;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.hero-title { color: #fff; margin-bottom: 18px; }
.text-accent { color: var(--accent-light); }

.hero-desc {
  color: rgba(255,255,255,0.75);
  font-size: 1.05rem;
  max-width: 560px;
  margin-bottom: 30px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}
.hero-meta span::before { content: ''; }

/* Hero Visual Cards */
.hero-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  position: relative;
}

.visual-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  padding: 20px;
  color: #fff;
}
.vc-1 { grid-column: 1 / -1; }
.vc-label { font-size: 0.72rem; color: rgba(255,255,255,0.55); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.8px; }
.vc-value { font-size: 2.4rem; font-weight: 800; line-height: 1; margin-bottom: 12px; }
.vc-bar { background: rgba(255,255,255,0.15); height: 6px; border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
.vc-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #F4A87E); border-radius: 3px; }
.vc-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}
.vc-tag.valid { background: rgba(46,125,50,0.3); color: #86E08C; border: 1px solid rgba(46,125,50,0.4); }
.vc-dim { font-size: 0.9rem; line-height: 1.4; margin-top: 4px; }

.hero-wave {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  line-height: 0;
}
.hero-wave svg { width: 100%; height: auto; display: block; }

/* ════════════════════════════════════════
   STATS BAR
   ════════════════════════════════════════ */
.stats-bar {
  background: var(--surface);
  padding: 40px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.stats-grid {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
.stat-item { text-align: center; }
.stat-num {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 500;
}
.stat-num-divider { width: 1px; height: 50px; background: var(--border); }

/* ════════════════════════════════════════
   SECTIONS
   ════════════════════════════════════════ */
.section { padding: 90px 0; }
.section-alt { background: var(--bg); }
.section:not(.section-alt) { background: var(--surface); }

.section-header { text-align: center; margin-bottom: 56px; }
.section-tag {
  display: inline-block;
  background: #EBF3FB;
  color: var(--primary-light);
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.section-title { color: var(--primary); margin-bottom: 14px; }
.section-desc { max-width: 580px; margin: 0 auto; font-size: 1rem; }

/* ── Features Grid ───────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  transition: all 0.2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
  border-color: var(--primary-light);
}
.feature-icon { font-size: 2rem; margin-bottom: 14px; }
.feature-card h3 { color: var(--primary); margin-bottom: 8px; }

/* ── Steps ───────────────────────────────────────── */
.steps-container {
  display: flex;
  align-items: flex-start;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
}
.step {
  flex: 1;
  text-align: center;
  padding: 0 20px;
}
.step-num {
  width: 60px; height: 60px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 1.3rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}
.step h3 { color: var(--primary); margin-bottom: 8px; }
.step-connector {
  flex: 0 0 60px;
  height: 2px;
  background: var(--border);
  margin-top: 30px;
  position: relative;
}
.step-connector::after {
  content: '→';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── Dimensions Grid ─────────────────────────────── */
.dims-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.dim-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--dim-color);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.2s;
}
.dim-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,0.08); }
.dim-code {
  display: inline-block;
  background: var(--dim-color);
  color: #fff;
  padding: 3px 12px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.dim-card h3 { color: var(--primary); font-size: 1rem; margin-bottom: 12px; }
.dim-card ul { padding-left: 16px; }
.dim-card ul li { font-size: 0.85rem; color: var(--muted); margin-bottom: 4px; }

/* ── CTA Banner ──────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  padding: 80px 0;
  text-align: center;
  color: #fff;
}
.cta-banner h2 { color: #fff; margin-bottom: 14px; }
.cta-banner p { color: rgba(255,255,255,0.75); max-width: 500px; margin: 0 auto 30px; }

/* ── Footer ──────────────────────────────────────── */
.footer {
  background: #0F2239;
  color: rgba(255,255,255,0.6);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .brand-name { color: #fff; font-weight: 700; }
.footer-sub { font-size: 0.75rem; color: rgba(255,255,255,0.45); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: rgba(255,255,255,0.55); text-decoration: none; font-size: 0.9rem; transition: color 0.15s; }
.footer-links a:hover { color: #fff; }
.footer-note { font-size: 0.78rem; line-height: 1.6; max-width: 380px; }

/* ════════════════════════════════════════
   DASHBOARD STYLES
   ════════════════════════════════════════ */
.dash-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  padding-top: var(--nav-h);
}

.dash-sidebar {
  background: var(--primary);
  padding: 24px 0;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  width: 260px;
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  z-index: 100;
}
.sidebar-section { padding: 6px 16px; margin-bottom: 4px; }
.sidebar-label {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 16px 4px;
  font-weight: 700;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.sidebar-link:hover { background: rgba(255,255,255,0.1); color: #fff; }
.sidebar-link.active { background: var(--accent); color: #fff; }
.sidebar-icon { width: 18px; text-align: center; }

.dash-main {
  margin-left: 260px;
  padding: 32px;
  min-height: calc(100vh - var(--nav-h));
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}
.dash-title { font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.dash-subtitle { color: var(--muted); font-size: 0.875rem; }

/* Stat Cards */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
}
.stat-card-label { font-size: 0.78rem; color: var(--muted); margin-bottom: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card-value { font-size: 2rem; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-card-sub { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }

/* Tables */
.table-card {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
  overflow: hidden;
}
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.table-title { font-weight: 700; color: var(--primary); }
.search-box {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  width: 220px;
  outline: none;
  font-family: inherit;
}
.search-box:focus { border-color: var(--primary-light); }
.btn-sm {
  padding: 7px 14px;
  font-size: 0.8rem;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.15s;
}
.btn-sm-primary { background: var(--primary); color: #fff; }
.btn-sm-primary:hover { background: var(--primary-light); }
.btn-sm-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-sm-outline:hover { background: var(--bg); }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th {
  background: var(--bg);
  padding: 10px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--primary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #FAFBFD; }
.data-table tbody tr { cursor: pointer; }

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-valid   { background: #E8F5E9; color: #2E7D32; }
.badge-suspect { background: #FFF3E0; color: #E65100; }
.badge-invalid { background: #FFEBEE; color: #C62828; }
.badge-high    { background: #E8F0FB; color: #1F3864; }
.badge-medium  { background: #EDF6FF; color: #2E75B6; }
.badge-low     { background: #FFEBEE; color: #C62828; }

/* Login Screen */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), #0F2239);
}
.login-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo .brand-icon {
  width: 56px; height: 56px;
  font-size: 1.8rem;
  margin: 0 auto 12px;
}
.login-logo h2 { color: var(--primary); margin-bottom: 4px; }
.login-logo p { font-size: 0.85rem; }
.login-field {
  margin-bottom: 16px;
}
.login-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.login-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.login-field input:focus { border-color: var(--primary-light); }
.login-error {
  background: #FFEBEE;
  color: var(--bad);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}
.btn-full { width: 100%; justify-content: center; padding: 13px; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface);
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(0.96);
  transition: transform 0.2s;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.modal-close {
  background: var(--bg);
  border: none;
  width: 32px; height: 32px;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.modal-close:hover { background: var(--border); }

/* Charts */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.chart-card {
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.chart-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}
canvas { max-height: 200px; }

/* Panel visibility */
.dash-panel { display: none; }
.dash-panel.active { display: block; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .steps-container { flex-direction: column; align-items: center; }
  .step-connector { width: 2px; height: 40px; }
  .step-connector::after { content: '↓'; left: 50%; top: 50%; transform: translate(-50%,-50%); }
  .dash-sidebar { display: none; }
  .dash-main { margin-left: 0; padding: 20px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
}

@media (max-width: 600px) {
  .stats-grid { gap: 12px; }
  .stat-num { font-size: 1.8rem; }
  .stat-num-divider { display: none; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
}
