/* ============================================================
   BASE.CSS — Navy + White Theme with Dark/Light Mode
   Font: DM Sans (body) + Fraunces (display)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Fraunces:ital,wght@0,700;0,900;1,700&display=swap');

/* ── LIGHT MODE (default) ── */
:root {
  --bg:           #f8f9fc;
  --bg-card:      #ffffff;
  --bg-soft:      #eef1f8;
  --primary:      #0f2557;
  --primary-mid:  #1a3a8c;
  --primary-light:#2952cc;
  --accent:       #c8922a;
  --accent-light: #e8b86d;
  --teks:         #0d1b3e;
  --teks-soft:    #5a6a85;
  --teks-muted:   #99a4b8;
  --border:       #dde3f0;
  --shadow:       rgba(15,37,87,.1);
  --navbar-bg:    rgba(15,37,87,.96);
}

/* ── DARK MODE ── */
[data-theme="dark"] {
  --bg:           #0b1120;
  --bg-card:      #111c33;
  --bg-soft:      #172040;
  --primary:      #2952cc;
  --primary-mid:  #3a6aee;
  --primary-light:#5c8aff;
  --accent:       #e8b86d;
  --accent-light: #f5d49a;
  --teks:         #e8edf8;
  --teks-soft:    #8899bb;
  --teks-muted:   #556080;
  --border:       #1e2d50;
  --shadow:       rgba(0,0,0,.4);
  --navbar-bg:    rgba(11,17,32,.97);
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  color: var(--teks);
  background: var(--bg);
  line-height: 1.65;
  transition: background .3s, color .3s;
}
a { color: inherit; }
img { max-width: 100%; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ── DARK MODE TOGGLE ── */
.theme-toggle {
  background: none;
  border: 1.5px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.8);
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  transition: .2s;
  flex-shrink: 0;
}
.theme-toggle:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.5); }

/* ── BUTTONS ── */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  padding: 12px 28px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  display: inline-block;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: .25s;
  box-shadow: 0 4px 16px rgba(200,146,42,.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200,146,42,.4); color: #fff; }

.btn-green {
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  color: #fff;
  padding: 11px 24px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  display: inline-block;
  border: none;
  cursor: pointer;
  font-size: .95rem;
  transition: .25s;
  box-shadow: 0 4px 16px var(--shadow);
}
.btn-green:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--shadow); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--border);
  padding: 10px 22px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  cursor: pointer;
  font-size: .92rem;
  transition: .2s;
}
.btn-outline:hover { border-color: var(--primary); background: var(--bg-soft); }

/* ── ALERTS ── */
.alert { padding: 13px 16px; border-radius: 10px; margin-bottom: 16px; background: var(--bg-soft); color: var(--teks); border: 1px solid var(--border); font-size: .92rem; }
.alert-success { background: #e8f5e9; color: #1b5e20; border-color: #a5d6a7; }
.alert-error   { background: #fce4ec; color: #880e4f; border-color: #f48fb1; }
.alert-warning { background: #fff8e1; color: #e65100; border-color: #ffe082; }

/* ── BADGE ── */
.badge { padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-green  { background: #e8f5e9; color: #1b5e20; }
.badge-yellow { background: #fff8e1; color: #e65100; }
.badge-red    { background: #fce4ec; color: #880e4f; }

/* ── FORM ── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; margin-bottom: 6px; color: var(--teks-soft); font-size: .88rem; font-weight: 600; letter-spacing: .02em; }
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: .95rem;
  font-family: 'DM Sans', sans-serif;
  transition: border-color .2s, box-shadow .2s;
  background: var(--bg-card);
  color: var(--teks);
}
.form-control:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(41,82,204,.12); }
.form-hint { font-size: .8rem; color: var(--teks-muted); margin-top: 5px; }

/* ── PAGE HEADER ── */
.page-header {
  background: linear-gradient(135deg, var(--navy-900, #0a1628) 0%, var(--navy-700, #162d5e) 100%);
  color: #fff;
  padding: 64px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 75% 50%, rgba(200,146,42,.15) 0%, transparent 60%);
}
.page-header h1 { color: #fff; margin-bottom: 8px; font-size: 2rem; font-family: 'Fraunces', serif; position: relative; }
.page-header p  { opacity: .75; font-size: 1rem; position: relative; font-weight: 300; }

/* ── SECTION ── */
.section { padding: 52px 0; }
.section-title { font-size: 1.5rem; color: var(--primary); margin-bottom: 24px; font-weight: 700; font-family: 'Fraunces', serif; }

/* ── GRID ── */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── CARD BASE ── */
.card-base {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 2px 12px var(--shadow);
  transition: .25s;
}
.card-base:hover { transform: translateY(-3px); box-shadow: 0 8px 28px var(--shadow); }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--teks-muted); }
.empty-state i { font-size: 3rem; margin-bottom: 14px; display: block; opacity: .4; }

/* ── FOOTER ── */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,.6);
  text-align: center;
  padding: 28px 20px;
  margin-top: 60px;
  font-size: .86rem;
}
.footer a { color: var(--accent-light); text-decoration: none; }

/* ── INPUT PASSWORD ── */
.input-password-wrap { position: relative; }
.input-password-wrap input { padding-right: 44px; }
.btn-lihat-pass {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--teks-muted);
  padding: 0; line-height: 1; font-size: 1rem; transition: .2s;
}
.btn-lihat-pass:hover { color: var(--primary); }

/* ── DARK MODE CARD/FORM FIX ── */
[data-theme="dark"] .form-control { background: var(--bg-soft); border-color: var(--border); color: var(--teks); }
[data-theme="dark"] .card-base { background: var(--bg-card); border-color: var(--border); }
[data-theme="dark"] select option { background: var(--bg-card); }

@media (max-width:768px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .page-header { padding: 44px 16px; }
  .page-header h1 { font-size: 1.6rem; }
}
