/* =========================================================
   TRANSPORT AI-CORPU — Design Tokens
   Palette: Navy (trust/transportation) + Cyan (signal/AI)
   Amber = prioritas, Green = selesai/sukses
   Type: Poppins (display) + Inter (body)
   ========================================================= */
:root{
  --navy: #0B3D66;
  --navy-deep: #081C33;
  --navy-darker: #06121F;
  --cyan: #3FA9F5;
  --cyan-soft: #E4F2FE;
  --green: #2ECC71;
  --green-soft: #E7F9EF;
  --amber: #F5A623;
  --amber-soft: #FEF3E0;
  --paper: #F7F8FA;
  --surface: #FFFFFF;
  --ink: #101828;
  --ink-soft: #4B5563;
  --ink-faint: #94A3B8;
  --border: #E5E9F0;
  --danger: #E4572E;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --shadow-soft: 0 10px 30px rgba(11,61,102,.08);
  --shadow-lift: 0 16px 40px rgba(11,61,102,.14);

  --font-display: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

*{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; }
body{
  margin:0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  line-height: 1.5;
}
h1,h2,h3{
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0 0 8px;
  line-height: 1.25;
}
p{ margin: 0 0 12px; }
.muted{ color: var(--ink-soft); font-size: 14px; }
.accent{ color: var(--cyan); }
button{ font-family: inherit; }
:focus-visible{ outline: 3px solid var(--cyan); outline-offset: 2px; }

/* ---------- Layout Screens ---------- */
#app{ position:relative; width:100%; min-height:100vh; }
.screen{
  display:none;
  min-height:100vh;
  width:100%;
  animation: fadeIn .35s ease;
}
.screen.active{ display:block; }
@keyframes fadeIn{ from{ opacity:0; transform: translateY(8px);} to{opacity:1; transform:translateY(0);} }
@media (prefers-reduced-motion: reduce){
  .screen{ animation:none; }
}

.app-shell-narrow{
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 20px 100px;
}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:none;
  cursor:pointer;
  font-weight:600;
  font-size:15px;
  border-radius: var(--radius-md);
  padding: 14px 22px;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  text-decoration:none;
}
.btn:active{ transform: scale(.97); }
.btn-primary{
  background: linear-gradient(135deg, var(--navy), #123f6e 60%, var(--cyan));
  color:#fff;
  box-shadow: var(--shadow-soft);
}
.btn-primary:disabled{ opacity:.45; cursor:not-allowed; box-shadow:none; }
.btn-block{ width:100%; }
.btn-lg{ padding:16px 28px; font-size:16px; }
.btn-sm{ padding:9px 16px; font-size:13px; }
.btn-whatsapp{
  background: #22C55E;
  color:#fff;
  box-shadow: var(--shadow-soft);
}
.btn-back{
  background:none;
  border:none;
  font-size:22px;
  color: var(--navy);
  cursor:pointer;
  padding:4px 8px;
  margin-left:-8px;
}
.btn-text{
  display:block;
  width:100%;
  text-align:center;
  background:none;
  border:none;
  color: var(--navy);
  font-weight:600;
  font-size:13.5px;
  padding:12px;
  cursor:pointer;
  margin-top:6px;
}
.btn-delete-user{ color: var(--danger); margin-top:2px; }
.link-btn{
  background:none;
  border:none;
  color: var(--ink-faint);
  font-size:12.5px;
  font-weight:600;
  text-decoration:underline;
  cursor:pointer;
  padding:0;
}

/* ---------- Hero ---------- */
#screen-hero{
  background: radial-gradient(circle at 50% -10%, var(--navy) 0%, var(--navy-deep) 55%, var(--navy-darker) 100%);
  color:#fff;
  text-align:center;
  padding: 40px 20px 60px;
  position:relative;
}
.hero-radar{ display:flex; justify-content:center; margin-bottom: 8px; }
.radar-decor{ width: 180px; height:180px; }
.radar-ring{ fill:none; stroke: rgba(63,169,245,.25); stroke-width:1; }
.radar-cross{ stroke: rgba(63,169,245,.18); stroke-width:1; }
.radar-sweep{
  fill: rgba(63,169,245,.35);
  stroke: var(--cyan);
  stroke-width:1;
  transform-origin: 100px 100px;
  animation: sweep 4s linear infinite;
}
.radar-core{ fill: var(--cyan); filter: drop-shadow(0 0 6px var(--cyan)); }
@keyframes sweep{
  from{ transform: rotate(0deg); }
  to{ transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce){
  .radar-sweep{ animation:none; }
}

.hero-content{ max-width: 480px; margin:0 auto; }
.eyebrow{
  display:inline-block;
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color: var(--cyan);
  background: rgba(63,169,245,.12);
  border:1px solid rgba(63,169,245,.35);
  padding:6px 14px;
  border-radius:999px;
  margin-bottom:18px;
}
#screen-hero h1{
  color:#fff;
  font-size: 28px;
  font-weight:700;
  margin-bottom:14px;
}
.hero-sub{
  color: rgba(255,255,255,.78);
  font-size:15px;
  margin-bottom:26px;
}
.hero-content .btn-primary{
  background: linear-gradient(135deg, var(--cyan), #62c1ff);
  color: var(--navy-darker);
  font-weight:700;
}

.benefit-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:14px;
  margin-top: 36px;
  text-align:left;
}
.benefit-card{
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-md);
  padding: 18px;
  backdrop-filter: blur(6px);
}
.benefit-icon{
  width:40px; height:40px;
  border-radius:12px;
  background: rgba(63,169,245,.18);
  color: var(--cyan);
  display:flex; align-items:center; justify-content:center;
  font-size:18px;
  margin-bottom:10px;
}
.benefit-card h3{ color:#fff; font-size:15px; margin-bottom:4px; }
.benefit-card p{ color: rgba(255,255,255,.65); font-size:13px; margin:0; }

@media (min-width:640px){
  .benefit-grid{ grid-template-columns: repeat(3,1fr); }
  #screen-hero h1{ font-size:34px; }
}

/* ---------- Step tag / titles ---------- */
.step-tag{
  display:inline-block;
  font-size:12px;
  font-weight:600;
  color: var(--navy);
  background: var(--cyan-soft);
  padding:5px 12px;
  border-radius:999px;
  margin: 10px 0 14px;
}
.step-tag-admin{ color:#A9660B; background: var(--amber-soft); }
.section-title{ margin-top:28px; font-size:17px; }
.login-help{ text-align:center; margin-top:18px; }

/* ---------- Form ---------- */
.field{ margin-bottom:16px; }
.field label{
  display:block;
  font-size:13px;
  font-weight:600;
  color: var(--ink);
  margin-bottom:6px;
}
.field input, .field textarea{
  width:100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-size:15px;
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus{
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(63,169,245,.15);
  outline:none;
}
.field input.invalid{ border-color: var(--danger); }
.field-error{
  display:block;
  color: var(--danger);
  font-size:12.5px;
  margin-top:5px;
  min-height:16px;
}
.field-success{
  display:block;
  color: #1A8A4C;
  font-size:12.5px;
  margin-top:-10px;
  margin-bottom:14px;
  min-height:16px;
}

/* ---------- Assessment ---------- */
.progress-track{
  height:8px;
  background: var(--border);
  border-radius:999px;
  overflow:hidden;
  margin-top:10px;
}
.progress-fill{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, var(--cyan), var(--navy));
  transition: width .3s ease;
}
.progress-label{ font-size:12.5px; color: var(--ink-faint); margin: 6px 0 20px; }

.assess-item{
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius-md);
  padding:18px;
  margin-bottom:14px;
  box-shadow: var(--shadow-soft);
}
.assess-item p.q-text{ font-weight:600; font-size:14.5px; margin-bottom:14px; color: var(--ink); }
.scale-row{
  display:flex;
  gap:8px;
  justify-content:space-between;
}
.scale-btn{
  flex:1;
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--paper);
  font-weight:700;
  font-size:15px;
  color: var(--ink-soft);
  cursor:pointer;
  transition: all .15s ease;
}
.scale-btn.selected{
  background: var(--navy);
  border-color: var(--navy);
  color:#fff;
  transform: scale(1.05);
}
.scale-caption{
  display:flex; justify-content:space-between;
  font-size:11px; color: var(--ink-faint); margin-top:8px;
}

/* ---------- Radar chart (results) ---------- */
.radar-result-wrap{ display:flex; justify-content:center; margin: 18px 0 6px; }
.radar-chart{ width:100%; max-width:280px; height:auto; }
.radar-grid{ fill:none; stroke: var(--border); stroke-width:1; }
.radar-axis{ stroke: var(--border); stroke-width:1; }
.radar-shape{ fill: rgba(63,169,245,.28); stroke: var(--cyan); stroke-width:2; }
.radar-label{ font-size:9.5px; fill: var(--ink-soft); font-family: var(--font-body); }

.result-summary-card{
  background: var(--amber-soft);
  border:1px solid #F6D9A6;
  border-radius: var(--radius-md);
  padding:16px 18px;
  margin: 14px 0 6px;
}
.result-summary-card h3{ color:#A9660B; font-size:16px; margin-top:2px;}

/* ---------- Learning path list ---------- */
.path-item{
  display:flex;
  gap:14px;
  align-items:flex-start;
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius-md);
  padding:16px;
  margin-bottom:12px;
  box-shadow: var(--shadow-soft);
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.path-item:active{ transform: scale(.98); }
.path-item.done{ opacity:.6; }
.path-rank{
  width:34px; height:34px; border-radius:10px;
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:14px; flex-shrink:0;
  color:#fff;
}
.path-rank.prio-tinggi{ background: var(--danger); }
.path-rank.prio-sedang{ background: var(--amber); }
.path-rank.prio-rendah{ background: var(--green); }
.path-body{ flex:1; min-width:0; }
.path-body h4{ margin:0 0 4px; font-size:14.5px; font-family: var(--font-display); color: var(--ink); }
.path-meta{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.path-tag{
  font-size:11px; font-weight:600; padding:3px 9px; border-radius:999px;
}
.path-tag.prio-tinggi{ background:#FDE7E1; color: var(--danger); }
.path-tag.prio-sedang{ background: var(--amber-soft); color:#A9660B; }
.path-tag.prio-rendah{ background: var(--green-soft); color:#1A8A4C; }
.path-duration{ font-size:12px; color: var(--ink-faint); }
.path-check{ font-size:18px; color: var(--green); flex-shrink:0; }

/* ---------- App shell (tabs) ---------- */
#screen-app, #screen-admin{ padding-bottom: 40px; background: var(--paper); min-height:100vh; }
.app-header{
  display:flex; align-items:center; justify-content:space-between;
  padding: 22px 20px 16px;
  background: var(--surface);
  border-bottom:1px solid var(--border);
  position: sticky; top:0; z-index:5;
}
.app-header-eyebrow{ font-size:11px; letter-spacing:.06em; text-transform:uppercase; color: var(--cyan); font-weight:700; margin:0; }
.app-header h2{ margin:2px 0 0; font-size:19px; }
.header-right{ display:flex; align-items:center; gap:10px; }
.avatar-badge{
  width:40px; height:40px; border-radius:50%;
  background: var(--navy); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-display); font-weight:700;
}
.logout-btn{ color: var(--danger); }

.tab-panel{ display:none; padding: 18px 20px 100px; max-width:560px; margin:0 auto; }
.tab-panel.active{ display:block; }

.bottom-nav{
  position: fixed; bottom:0; left:0; right:0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display:flex;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 20px rgba(11,61,102,.06);
  z-index: 20;
}
.nav-btn{
  flex:1;
  background:none; border:none;
  display:flex; flex-direction:column; align-items:center; gap:3px;
  padding:8px 4px;
  border-radius:12px;
  color: var(--ink-faint);
  font-size:11px;
  cursor:pointer;
}
.nav-btn.active{ color: var(--navy); background: var(--cyan-soft); }
.nav-icon{ font-size:18px; }

/* ---------- Progress ring ---------- */
.progress-hero-card{
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align:center;
  box-shadow: var(--shadow-soft);
}
.progress-ring-wrap{ position:relative; width:120px; height:120px; margin: 10px auto 6px; }
.progress-ring{ width:120px; height:120px; transform: rotate(-90deg); }
.ring-bg{ fill:none; stroke: var(--border); stroke-width:10; }
.ring-fill{
  fill:none; stroke: var(--cyan); stroke-width:10; stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  transition: stroke-dashoffset .5s ease;
}
.progress-ring-text{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-display); font-weight:700; font-size:22px; color: var(--navy);
}
.progress-caption{ font-size:13.5px; color: var(--ink-soft); margin-top:6px; }

.progress-item{
  display:flex; align-items:center; gap:12px;
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius-sm);
  padding:13px 15px;
  margin-bottom:10px;
}
.progress-item .dot{ width:10px; height:10px; border-radius:50%; background: var(--border); flex-shrink:0; }
.progress-item.done .dot{ background: var(--green); }
.progress-item span.title{ font-size:14px; flex:1; }
.progress-item.done span.title{ color: var(--ink-faint); text-decoration: line-through; }

/* ---------- Knowledge bank ---------- */
.bank-item{
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius-sm);
  padding:14px 16px;
  margin-bottom:10px;
}
.bank-item h4{ margin:0 0 4px; font-size:14.5px; font-family: var(--font-display); color: var(--ink); }
.bank-item p{ margin:0; font-size:13px; color: var(--ink-soft); }
.bank-tag{
  display:inline-block; font-size:10.5px; font-weight:600;
  color: var(--navy); background: var(--cyan-soft);
  padding:2px 8px; border-radius:999px; margin-top:8px;
}
.empty-state{
  text-align:center; padding: 40px 20px; color: var(--ink-faint);
}
.empty-state .empty-icon{ font-size:32px; margin-bottom:10px; }

/* ---------- Contact ---------- */
.contact-card{
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius-lg);
  padding:22px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 20px;
}
.contact-summary{
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding:14px;
  font-size:13px;
  color: var(--ink-soft);
  margin: 14px 0 18px;
  white-space: pre-line;
}
.wa-icon{ color:#fff; }

/* ---------- Admin Panel ---------- */
.admin-body{ max-width:560px; margin:0 auto; padding: 20px 20px 60px; }
.admin-section-head{
  display:flex; align-items:center; justify-content:space-between;
  margin-top:24px;
}
.admin-section-head .section-title{ margin-top:0; }
.admin-user-card{
  display:flex; align-items:center; gap:12px;
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius-sm);
  padding:14px 16px;
  margin-bottom:10px;
  cursor:pointer;
  transition: transform .15s ease;
}
.admin-user-card:active{ transform: scale(.98); }
.admin-user-avatar{
  width:38px; height:38px; border-radius:50%;
  background: var(--cyan-soft); color: var(--navy);
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-display); font-weight:700; flex-shrink:0;
}
.admin-user-info{ flex:1; min-width:0; }
.admin-user-info h4{ margin:0 0 2px; font-size:14.5px; font-family: var(--font-display); color: var(--ink); }
.admin-user-info p{ margin:0; font-size:12.5px; color: var(--ink-soft); }
.admin-user-chevron{ color: var(--ink-faint); font-size:16px; flex-shrink:0; }

/* ---------- Modal ---------- */
.modal{
  position:fixed; inset:0; z-index:50;
  display:none;
}
.modal.open{ display:block; }
.modal-backdrop{
  position:absolute; inset:0;
  background: rgba(6,18,31,.5);
  animation: fadeIn .2s ease;
}
.modal-sheet{
  position:absolute; left:0; right:0; bottom:0;
  max-width:560px; margin:0 auto;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  padding: 14px 22px 26px;
  max-height: 85vh;
  overflow-y:auto;
  box-shadow: var(--shadow-lift);
  animation: slideUp .25s ease;
}
@keyframes slideUp{ from{ transform: translateY(40px); opacity:0;} to{ transform:translateY(0); opacity:1; } }
.modal-handle{
  width:40px; height:5px; border-radius:999px;
  background: var(--border);
  margin: 0 auto 14px;
}
.modal-close{
  position:absolute; top:14px; right:18px;
  background:none; border:none; font-size:16px; color: var(--ink-faint); cursor:pointer;
}
.modal-duration{
  display:inline-block; font-size:11px; font-weight:700;
  color: var(--navy); background: var(--cyan-soft);
  padding:4px 10px; border-radius:999px; margin-bottom:10px;
}
.modal-body{ font-size:14.5px; color: var(--ink-soft); margin-bottom:18px; }

/* ---------- Footer ---------- */
.footer-watermark{
  text-align:center;
  font-size:12px;
  color: var(--ink-faint);
  padding: 20px 20px 40px;
  background: var(--paper);
}
.footer-watermark p{ margin: 0 0 6px; }
.footer-watermark a{ color: var(--navy); font-weight:600; text-decoration:none; }
.footer-watermark a:hover{ text-decoration:underline; }
.footer-cta a{ color:#1A8A4C; }
