/* nikola.dsgn — gaya dasar bersama (biru muda & putih) */
:root {
  --blue-25: #f7fbff;
  --blue-50: #eef7ff;
  --blue-100: #dcefff;
  --blue-200: #bde0ff;
  --blue-300: #8fcaff;
  --blue-400: #56aef8;
  --blue-500: #2b93ee;
  --blue-600: #1677d2;
  --blue-700: #135fa8;
  --ink: #0e2740;
  --ink-2: #33506e;
  --muted: #6b8199;
  --line: #e2ecf6;
  --line-2: #cddcec;
  --white: #ffffff;
  --bg: #f4f9fe;
  --green: #16a34a;
  --green-bg: #e8f8ee;
  --amber: #c2410c;
  --amber-bg: #fff3e6;
  --red: #dc2626;
  --red-bg: #fdecec;
  --violet: #7c3aed;
  --violet-bg: #f1ebff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(14, 39, 64, .05), 0 8px 24px rgba(22, 119, 210, .07);
  --shadow-lg: 0 20px 50px rgba(14, 39, 64, .16);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }

/* Logo teks */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 19px; color: var(--ink); letter-spacing: -.02em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--blue-400), var(--blue-600));
  color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px;
  box-shadow: 0 6px 14px rgba(43, 147, 238, .35);
}
.brand b { color: var(--blue-500); }

/* Tombol */
.btn {
  appearance: none; border: 1px solid transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 14px;
  padding: 11px 18px; border-radius: 12px; line-height: 1.2;
  background: var(--blue-500); color: #fff;
  transition: background .15s, transform .05s, box-shadow .15s;
  text-decoration: none !important; white-space: nowrap;
}
.btn:hover { background: var(--blue-600); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-lg { padding: 15px 24px; font-size: 16px; border-radius: 14px; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn-ghost { background: var(--white); color: var(--blue-700); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--blue-50); }
.btn-soft { background: var(--blue-50); color: var(--blue-700); }
.btn-soft:hover { background: var(--blue-100); }
.btn-wa { background: #1faa53; }
.btn-wa:hover { background: #178c44; }
.btn-danger { background: var(--white); color: var(--red); border-color: #f3c7c7; }
.btn-danger:hover { background: var(--red-bg); }
.btn-block { width: 100%; }

/* Kartu */
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad { padding: 22px; }

/* Form */
label { font-weight: 600; font-size: 14px; color: var(--ink-2); display: block; margin-bottom: 6px; }
.req { color: var(--red); }
.input, select.input, textarea.input {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--white); border: 1.5px solid var(--line-2); border-radius: 12px;
  padding: 11px 13px; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { border-color: var(--blue-400); box-shadow: 0 0 0 4px rgba(86, 174, 248, .18); }
.input::placeholder { color: #9bb0c5; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.field { margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Pilihan berbentuk chip */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line-2);
  background: var(--white); font-size: 14px; font-weight: 600; color: var(--ink-2);
  cursor: pointer; user-select: none; transition: all .12s;
}
.chip input:checked + span { background: var(--blue-50); border-color: var(--blue-400); color: var(--blue-700); }
.chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(86, 174, 248, .25); }
.chip span:hover { border-color: var(--blue-300); }

/* Pilihan berbentuk kartu (radio) */
.options { display: grid; gap: 10px; }
.opt { position: relative; display: block; margin: 0; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .opt-box {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1.5px solid var(--line-2); border-radius: 14px; padding: 13px 15px;
  background: var(--white); cursor: pointer; transition: all .12s; font-weight: 500;
}
.opt .opt-box::before {
  content: ''; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%;
  border: 2px solid var(--line-2); background: #fff; transition: all .12s;
}
.opt input[type=checkbox] + .opt-box::before { border-radius: 6px; }
.opt input:checked + .opt-box { border-color: var(--blue-400); background: var(--blue-25); }
.opt input:checked + .opt-box::before { border-color: var(--blue-500); background: var(--blue-500); box-shadow: inset 0 0 0 3px #fff; }
.opt input[type=checkbox]:checked + .opt-box::before { box-shadow: none; background: var(--blue-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='2.4' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center/12px no-repeat; }
.opt input:focus-visible + .opt-box { box-shadow: 0 0 0 4px rgba(86, 174, 248, .25); }
.opt-title { font-weight: 700; color: var(--ink); display: block; font-size: 14.5px; }
.opt-desc { font-size: 13px; color: var(--muted); display: block; }
.opt-price { margin-left: auto; font-weight: 700; color: var(--blue-700); font-size: 14px; white-space: nowrap; }

/* Badge */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: var(--blue-50); color: var(--blue-700); white-space: nowrap;
}
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.violet { background: var(--violet-bg); color: var(--violet); }
.badge.gray { background: #eef2f6; color: #56687c; }

/* Status order */
.st-baru { background: #eef2f6; color: #44586d; }
.st-dp { background: var(--blue-50); color: var(--blue-700); }
.st-dikerjakan { background: var(--violet-bg); color: var(--violet); }
.st-preview { background: #e6f7f8; color: #0e7490; }
.st-revisi { background: var(--amber-bg); color: var(--amber); }
.st-pelunasan { background: #fff7d6; color: #a16207; }
.st-selesai { background: var(--green-bg); color: var(--green); }
.st-batal { background: var(--red-bg); color: var(--red); }

/* Notifikasi kecil */
.toast-wrap { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 999; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast {
  background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px;
  box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 600; animation: toastIn .2s ease;
}
.toast.err { background: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* Modal */
.modal-bg {
  position: fixed; inset: 0; background: rgba(14, 39, 64, .45); z-index: 500;
  display: flex; align-items: flex-start; justify-content: center; padding: 30px 14px; overflow-y: auto;
  backdrop-filter: blur(2px);
}
.modal {
  background: #fff; border-radius: 20px; width: min(100%, 560px); box-shadow: var(--shadow-lg);
  animation: modalIn .18s ease; margin: auto 0;
}
.modal.wide { width: min(100%, 860px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-body { padding: 20px 22px; }
.modal-foot { padding: 14px 22px 20px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.x-btn { border: 0; background: var(--blue-50); color: var(--ink-2); width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 20px; line-height: 1; }
.x-btn:hover { background: var(--blue-100); }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .7s linear infinite;
}
.spinner.dark { border-color: var(--blue-100); border-top-color: var(--blue-500); }
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
