/* StickHive — base.css
   Design system: "Inverse Effort" (dari konsep Stitch) — Warm Parchment +
   Honeycomb Amber + Deep Ink + Sage (Materi) + Cranberry (Pengingat).
   Font: Space Grotesk (judul) / IBM Plex Sans (isi) / IBM Plex Mono (meta).
   Font dimuat via <link rel="stylesheet" href="fonts/fonts.css"> di tiap halaman. */

:root {
  --parchment: #f6f2e7;
  --parchment-bright: #fdf9ee;
  --surface: #fffcf4;
  --ink: #2a2417;
  --ink-soft: #514536;
  --ash: #ded5c2;
  --ash-deep: #c9beab;
  --amber: #e8a23a;
  --amber-deep: #835400;
  --amber-tint: #f7dfb0;
  --sage: #4b7a6c;
  --sage-tint: #e2ece6;
  --cranberry: #b23a48;
  --cranberry-tint: #f9e7e9;
  --olive: #6e6a4f;
  --radius: 14px;
  --shadow-soft: 0 1px 3px rgba(42, 36, 23, 0.08);
  --shadow-hard: 2px 2px 0 var(--ink);
  --shadow-hard-lg: 4px 4px 0 var(--ink);
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  background: var(--parchment);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

a {
  color: var(--amber-deep);
}

button {
  font-family: inherit;
  cursor: pointer;
}

input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
}

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

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

/* Hormati preferensi reduced-motion (audit R4-F20 / WCAG 2.3.3). */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 9px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--amber);
  color: var(--ink);
  box-shadow: var(--shadow-hard);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.15s;
}

.btn:hover {
  filter: brightness(1.05);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}


.btn-success {
  background: var(--sage);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ash-deep);
  box-shadow: none;
}

.btn-ghost:hover {
  background: var(--parchment-bright);
}

.btn-danger {
  background: var(--cranberry);
  color: #fff;
}

.btn-block {
  width: 100%;
}

/* ---------- Field ---------- */
.field {
  margin-bottom: 14px;
}

/* .field-label: pengganti <label> untuk kontrol berkelompok (swatch warna),
   agar tidak ada label yatim (audit R4-F25). */
.field label,
.field .field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 5px;
}

/* Teks pendamping label — kontras AA (pengganti #8a94a6, audit R4-F19). */
.label-hint {
  font-weight: 400;
  color: var(--ink-soft);
  text-transform: none;
  letter-spacing: normal;
}

/* Utilitas screen-reader-only (h1 dashboard, audit R4-F18). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--ash-deep);
  border-radius: 10px;
  background: var(--parchment-bright);
  color: var(--ink);
  box-shadow: inset 0 1px 2px rgba(42, 36, 23, 0.05);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--amber);
  outline: none;
  box-shadow: 0 2px 0 var(--amber);
}

.field textarea {
  min-height: 90px;
  resize: vertical;
}

.field .hint {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 4px;
}

.field-error {
  font-size: 0.8rem;
  color: var(--cranberry);
  margin-top: 4px;
  font-weight: 600;
}

/* ---------- Kartu ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--ash);
  box-shadow: var(--shadow-soft);
}

/* ---------- Badge & chip kuota ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px; /* target sentuh minimum (audit R4-F22) */
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: var(--parchment-bright);
  border: 1px solid var(--ash-deep);
  color: var(--ink);
}

.chip-warn {
  background: var(--amber);
  border-color: var(--amber-deep);
  color: var(--ink);
}


