/* Komponen kecil di atas utility Tailwind (tanpa build step). */

:root {
  --brand: #0b7d55;
  --brand-soft: #edf9f3;
  --ink: #0b1220;
}

body {
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Navigasi ---------- */
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.75rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.nav-link:hover { background: #f1f5f9; color: #0f172a; }
.nav-active { background: var(--brand-soft); color: #096346; }
.nav-active .nav-icon { background: #d3f0e2; color: #096346; }
.nav-icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  background: #f8fafc;
  color: #64748b;
}
.nav-icon svg { width: 1.15rem; height: 1.15rem; }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 0.7rem;
  padding: 0.55rem 0.95rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  transition: transform 0.12s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 18px -10px rgba(11, 125, 85, 0.8); }
.btn-primary:hover { background: #096346; }
.btn-ghost { background: #fff; color: #334155; border-color: #e2e8f0; }
.btn-ghost:hover { background: #f8fafc; }
.btn-soft { background: var(--brand-soft); color: #096346; }
.btn-soft:hover { background: #d3f0e2; }
.btn-danger { background: #e11d48; color: #fff; }
.btn-danger:hover { background: #be123c; }
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.75rem; border-radius: 0.55rem; }

/* ---------- Form ---------- */
.label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
}
.input {
  width: 100%;
  border-radius: 0.7rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus { border-color: #3fb184; box-shadow: 0 0 0 3px rgba(63, 177, 132, 0.18); }
.input::placeholder { color: #94a3b8; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.6rem center; background-size: 1.1rem; padding-right: 2rem; }

/* ---------- Kartu & tabel ---------- */
.card {
  background: #fff;
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 1px 2px rgba(11, 18, 32, 0.04), 0 10px 30px -22px rgba(11, 18, 32, 0.35);
}
.card-pad { padding: 1.1rem 1.15rem; }
@media (min-width: 640px) { .card-pad { padding: 1.35rem 1.4rem; } }

.tabel { width: 100%; border-collapse: collapse; }
.tabel th {
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid #f1f5f9;
}
.tabel td { padding: 0.7rem 0.85rem; border-bottom: 1px solid #f8fafc; font-size: 0.875rem; vertical-align: middle; }
.tabel tbody tr:hover { background: #fafcfb; }
.tabel tbody tr:last-child td { border-bottom: 0; }

/* ---------- Badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.badge-green { background: #ecfdf5; color: #047857; }
.badge-red { background: #fff1f2; color: #be123c; }
.badge-amber { background: #fffbeb; color: #b45309; }
.badge-slate { background: #f1f5f9; color: #475569; }
.badge-indigo { background: #eef2ff; color: #4338ca; }

/* ---------- Progress ---------- */
.progress { height: 0.5rem; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; transition: width 0.4s ease; }

/* ---------- Dialog ---------- */
dialog.ff-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  width: 100%;
  max-width: 32rem;
  margin: auto;
}
dialog.ff-dialog::backdrop { background: rgba(8, 15, 26, 0.55); backdrop-filter: blur(3px); }
dialog.ff-dialog[open] { animation: pop 0.18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.985); } to { opacity: 1; transform: none; } }

/* ---------- Lainnya ---------- */
.divider { height: 1px; background: #f1f5f9; }
.skeleton { position: relative; overflow: hidden; background: #f1f5f9; border-radius: 0.5rem; color: transparent !important; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent);
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.angka { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.muted { color: #64748b; }
.link { color: #0b7d55; font-weight: 600; }
.link:hover { text-decoration: underline; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
