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

html { -webkit-text-size-adjust: 100%; }

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background: var(--ground);
  font-family: var(--font);
  font-size: .9375rem;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  caret-color: var(--accent);
}

/* Layar terkunci memakai warna pita, jadi dialog masuk berdiri di atas hijau. */
body.auth-locked { background: var(--band); }
.auth-locked .app { visibility: hidden; }

::selection {
  color: var(--ink);
  background: var(--sheet-3);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1,
h2,
p,
dl,
dd,
ol,
ul {
  margin: 0;
  padding: 0;
}

ol,
ul { list-style: none; }

button,
input { font: inherit; color: inherit; }

.shell {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

.icon {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}

.button:hover { border-color: var(--ink); }
.button:disabled { cursor: progress; opacity: .6; }

.button-primary {
  width: 100%;
  min-height: 44px;
  border-color: var(--band);
  color: var(--band-ink);
  background: var(--band);
}

.button-primary:hover {
  border-color: var(--band-raised);
  background: var(--band-raised);
}

.button-danger {
  border-color: var(--bad);
  color: #fff;
  background: var(--bad);
}

.button-danger:hover {
  border-color: #8a2011;
  background: #8a2011;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  padding: 20px 0 40px;
  color: var(--muted);
  font-size: .8125rem;
}

.toast {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 10;
  width: fit-content;
  max-width: min(480px, 100% - 32px);
  margin-inline: auto;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--bad);
  box-shadow: 0 8px 24px rgb(0 0 0 / .2);
  font-weight: 600;
  animation: toast-in .35s var(--ease-out);
}

@keyframes toast-in {
  from { transform: translateY(12px); opacity: 0; }
}

@media (max-width: 520px) {
  .shell { width: min(1120px, 100% - 28px); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
