:root,
:root[data-theme="terang"] {
  --teal: #00a884;
  --teal-dark: #008069;
  --band: #008069;
  --ink: #111b21;
  --muted: #667781;
  --line: #e2e6e9;
  --panel: #ffffff;
  --page: #dfe2e6;
  --field: #f0f2f5;
  --danger: #b4232c;
  --danger-bg: #fdecec;
  --dash: #c5ccd1;
  color-scheme: light;
}

:root[data-theme="gelap"] {
  --teal: #00a884;
  --teal-dark: #06cf9c;
  --band: #0c1f1a;
  --ink: #e9edef;
  --muted: #8696a0;
  --line: #2a3942;
  --panel: #111b21;
  --page: #0b141a;
  --field: #202c33;
  --danger: #f15c6d;
  --danger-bg: #2a1c1f;
  --dash: #3b4a54;
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* Atribut hidden harus selalu menang atas display dari kelas.
   Tanpa baris ini, .sheet/.room/.blank yang diberi hidden tetap tampil. */
[hidden] { display: none !important; }


html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 230px;
  background: var(--band);
  z-index: -1;
}

.shell { max-width: 460px; margin: 0 auto; padding: 24px 16px 48px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #eaf5f1;
  font-size: 15px;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.brand > svg { width: 22px; height: 22px; fill: currentColor; }
.brand span { flex: 1; }

.theme-btn {
  border: 0;
  background: rgba(255,255,255,.14);
  color: #eaf5f1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
}
.theme-btn:hover { background: rgba(255,255,255,.24); }
.theme-btn svg { width: 19px; height: 19px; }
.ico-moon { display: none; }
:root[data-theme="gelap"] .ico-sun { display: none; }
:root[data-theme="gelap"] .ico-moon { display: block; }

.card {
  background: var(--panel);
  border-radius: 8px;
  padding: 30px 28px 26px;
  box-shadow: 0 1px 4px rgba(0,0,0,.22);
}

h1 { margin: 0 0 4px; font-size: 24px; font-weight: 500; }
.lede { margin: 0 0 22px; color: var(--muted); font-size: 14px; }

.alert {
  background: var(--danger-bg);
  border-left: 3px solid var(--danger);
  border-radius: 3px;
  padding: 10px 12px;
  margin-bottom: 18px;
}
.alert p { margin: 0 0 4px; color: var(--danger); font-size: 13.5px; line-height: 1.45; }
.alert p:last-child { margin-bottom: 0; }

.field { display: block; margin-bottom: 18px; }
.field > span { display: block; font-size: 13px; color: var(--teal); margin-bottom: 6px; }
.field input {
  width: 100%;
  border: 0;
  border-bottom: 2px solid var(--line);
  padding: 8px 2px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: transparent;
  outline: none;
  transition: border-color .15s;
}
.field input:focus { border-bottom-color: var(--teal); }
.field small { display: block; margin-top: 6px; color: var(--muted); font-size: 12.5px; }

.avatar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.avatar-pick {
  width: 78px;
  height: 78px;
  flex: none;
  border-radius: 50%;
  background: var(--field);
  display: grid;
  place-items: center;
  cursor: pointer;
  overflow: hidden;
  border: 2px dashed var(--dash);
}
.avatar-pick:hover { border-color: var(--teal); }
.avatar-pick:focus-within { outline: 2px solid var(--teal); outline-offset: 2px; }
.avatar-pick img { width: 100%; height: 100%; object-fit: cover; }
.avatar-pick svg { width: 34px; height: 34px; fill: var(--muted); }

.avatar-label { display: block; font-size: 14px; margin-bottom: 4px; }
.hint { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.45; max-width: 26ch; }

.primary {
  width: 100%;
  border: 0;
  border-radius: 24px;
  background: var(--teal);
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  padding: 12px;
  cursor: pointer;
  margin-top: 6px;
}
.primary:hover { filter: brightness(.93); }
.primary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.switch { margin: 20px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.switch a { color: var(--teal); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
