/* ==========================================================
   DESIGN TOKENS
   Palet: biru laut tua + kuning madu sebagai aksen "progress"
   ========================================================== */
:root {
  --ink: #12213a;          /* teks utama */
  --ink-soft: #4a5875;     /* teks sekunder */
  --paper: #f6f7fb;        /* background halaman */
  --surface: #ffffff;      /* kartu/panel */
  --line: #e2e6f0;         /* border halus */
  --brand: #1f3a63;        /* biru laut tua - identitas */
  --brand-deep: #142744;
  --accent: #e8a33d;       /* kuning madu - progress/CTA */
  --accent-soft: #fbe8c8;
  --success: #2f9e6a;
  --danger: #d1553f;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;

  --radius: 14px;
  --shadow: 0 8px 24px rgba(18, 33, 58, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}

/* ---------- Layout kartu tengah (login/reset) ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 10%, rgba(232, 163, 61, 0.12), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(31, 58, 99, 0.10), transparent 45%),
    var(--paper);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 36px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.brand-mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  display: flex; align-items: center; justify-content: center;
  color: white; font-family: var(--font-display); font-weight: 700;
  font-size: 16px;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  color: var(--brand);
}

h1.auth-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink);
}

.auth-sub {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin: 0 0 28px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
  margin-top: 16px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14.5px;
  font-family: var(--font-body);
  background: var(--paper);
  transition: border-color .15s, box-shadow .15s;
}

input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 58, 99, 0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 18px;
  margin-top: 22px;
  border: none;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: transform .1s, opacity .15s;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: var(--brand-deep);
}
.btn-primary:hover { opacity: 0.92; }

.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--paper); }

.auth-links {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  font-size: 13px;
}
.auth-links a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}
.auth-links a:hover { text-decoration: underline; }

.form-msg {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  display: none;
}
.form-msg.show { display: block; }
.form-msg.success { background: #e8f6ef; color: var(--success); }
.form-msg.error { background: #fdecea; color: var(--danger); }

.hidden { display: none !important; }

/* ---------- Layout dashboard ---------- */
.app-shell { min-height: 100vh; display: flex; }

.sidebar {
  width: 240px;
  background: var(--brand-deep);
  color: #fff;
  padding: 24px 18px;
  flex-shrink: 0;
}

.sidebar .brand-lockup .brand-name { color: #fff; }

.nav-item {
  display: block;
  padding: 10px 14px;
  margin: 4px 0;
  border-radius: 8px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active { background: var(--accent); color: var(--brand-deep); font-weight: 700; }

.main-content { flex: 1; padding: 32px 40px; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.topbar h1 {
  font-family: var(--font-display);
  font-size: 24px;
  margin: 0;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.logout-btn {
  background: none;
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--danger);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.module-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.module-card .num {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.module-card h3 {
  margin: 6px 0 8px;
  font-size: 16.5px;
}

.module-card p {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 0 0 14px;
}

.progress-bar {
  height: 6px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
  margin-bottom: 10px;
}
.progress-bar-fill {
  height: 100%;
  background: var(--accent);
}

.wa-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: var(--success);
  color: white;
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  text-decoration: none;
  font-size: 22px;
}

@media (max-width: 720px) {
  .sidebar { display: none; }
  .main-content { padding: 20px; }
}
