/* PPTM — shared styles (public site + admin) */
:root {
  --g950: #082D1B;
  --g900: #0B3B24;
  --g800: #0E4D2F;
  --g700: #13603B;
  --g600: #1A7A4B;
  --g100: #E4F1E8;
  --g50: #F1F8F3;
  --cream: #FBFAF6;
  --ink: #14231B;
  --text: #33443A;
  --muted: #5E6E65;
  --line: #E3E8E3;
  --field: #D5DDD7;
  --coral: #E8574A;
  --coral-bg: #FDECEA;
  --amber: #E89B2A;
  --amber-bg: #FDF3E2;
  --leaf: #49B26B;
  --sky: #3B8FD9;
  --wa: #1FA855;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 40, 28, .05), 0 10px 30px -12px rgba(16, 40, 28, .14);
  --font: "Plus Jakarta Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--cream); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; color: var(--g900); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(73, 178, 107, .5); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }

.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i-sm { width: 16px; height: 16px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer; transition: background .2s, border-color .2s, transform .2s, box-shadow .2s; white-space: nowrap; background: none; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: var(--g800); color: #fff; box-shadow: 0 8px 18px -8px rgba(14, 77, 47, .55); }
.btn-primary:hover:not(:disabled) { background: var(--g700); transform: translateY(-1px); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--g800); }
.btn-ghost:hover { border-color: var(--g600); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #18934A; }
.btn-light { background: #fff; color: var(--g900); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-xs { height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; line-height: 1.4; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.active { background: var(--g100); color: var(--g700); }
.pill.expiring { background: var(--amber-bg); color: #A86506; }
.pill.expired { background: var(--coral-bg); color: #B8382C; }
.pill.pending { background: #EEF1F4; color: #4B5866; }
.pill.rejected { background: #F1EFEF; color: #7A6F6F; }

/* ---------- form fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > label, .field > .label { font-size: 14px; font-weight: 600; color: #2A3A31; }
.field .req { color: var(--coral); margin-left: 2px; }
.field small { color: var(--muted); font-size: 12.5px; }
.input { height: 48px; width: 100%; border: 1px solid var(--field); border-radius: 12px; background: #fff; padding: 0 14px; font-size: 15px; transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input::placeholder { color: #9AA59F; }
.input:focus { outline: none; border-color: var(--g600); box-shadow: 0 0 0 4px rgba(26, 122, 75, .12); }
select.input { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235E6E65' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.field.invalid .input { border-color: var(--coral); box-shadow: 0 0 0 4px rgba(232, 87, 74, .1); }
.field.invalid .chips span { border-color: var(--coral); }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--g950); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 200; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #8A2A21; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
