/* LootBeez — shared tokens & components */
:root {
  --forest: #0F3D2E;
  --green: #0F5132;
  --green-ink: #0A3A24;
  --green-soft: #F2F7F4;
  --green-line: #CFE3D7;
  --mint: #9CC5AE;
  --gold: #F4B942;
  --gold-soft: #FFF7E6;
  --rec: #D9480F;
  --rec-soft: #FBE3D8;
  --ink: #1B1F1D;
  --body: #3A423E;
  --muted: #5B6560;
  --line: #E6E8E4;
  --line-strong: #CFD6D2;
  --panel: #F6F8F7;
  --white: #FFFFFF;
  --ok: #1E7B46;
  --ok-soft: #E3F3E9;
  --warn: #8A5A00;
  --warn-soft: #FFF3D6;
  --bad: #B42318;
  --bad-soft: #FDECEA;
  --radius: 16px;
  --shadow: 0 24px 60px rgba(15, 61, 46, 0.14);
  --shadow-sm: 0 4px 16px rgba(15, 61, 46, 0.08);
  --font: 'Mukta', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Baloo 2', 'Mukta', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--white); line-height: 1.5; }
img, svg { max-width: 100%; }
a { color: var(--green); }
a:hover { color: var(--green-ink); }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.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; }
.hidden { display: none !important; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 14px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 17px; text-decoration: none; cursor: pointer; transition: background .15s, transform .05s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-ink); color: var(--white); }
.btn-outline { background: var(--white); color: var(--forest); border-color: var(--forest); }
.btn-outline:hover { background: var(--green-soft); color: var(--forest); }
.btn-ghost { background: transparent; color: var(--body); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--panel); }
.btn-gold { background: var(--gold); color: var(--forest); }
.btn-gold:hover { background: #E9AC2F; color: var(--forest); }
.btn-danger { background: var(--bad); color: var(--white); }
.btn-ok { background: var(--ok); color: var(--white); }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 15px; border-radius: 10px; }
.btn-block { width: 100%; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .label { font-size: 15px; font-weight: 600; color: var(--body); }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line-strong);
  border-radius: 12px; background: var(--white); font-size: 17px;
}
textarea.input { min-height: 110px; resize: vertical; }
.input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(15, 81, 50, .15); }
.hint { font-size: 14px; color: var(--muted); }
.error-text { color: var(--bad); font-size: 15px; font-weight: 600; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: var(--white); font-size: 16px; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--green); color: var(--white); border-color: var(--green); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-muted { background: var(--panel); color: var(--muted); }
.badge-gold { background: var(--gold-soft); color: var(--warn); }

/* Cards */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card-soft { background: var(--panel); border-radius: var(--radius); padding: 20px; }

/* Toast */
.toast-wrap { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--ink); color: var(--white); padding: 12px 16px; border-radius: 12px; font-size: 16px; box-shadow: var(--shadow-sm); animation: toast-in .2s ease-out; }
.toast.bad { background: var(--bad); }
.toast.ok { background: var(--ok); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--forest); }
.logo b { font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1; }
.logo:hover { color: var(--forest); }

.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(0,0,0,.12); border-top-color: currentColor; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

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