/* =========================================================
   FindIt — Pamantasan ng Cabuyao Lost & Found
   Palette taken from the PnC seal: green ring, gold bell
   ========================================================= */
:root {
  color-scheme: light;
  --green-900: #063b20;
  --green-800: #0a4d2a;
  --green-700: #0d6234;
  --green-600: #11793f;   /* primary – PnC green */
  --green-500: #1b9150;
  --green-100: #dcefe2;
  --green-50:  #eff7f1;
  --gold-500:  #e0a51b;   /* seal bell gold */
  --gold-400:  #f0bb38;
  --gold-100:  #fcf1d4;
  --red-700:   #b42318;
  --red-100:   #fde4e1;
  --blue-700:  #1f5f8b;
  --blue-100:  #e2eef7;

  --ink:       #11241a;
  --ink-2:     #3d5245;
  --muted:     #5f7166;
  --line:      #dde6df;
  --surface:   #ffffff;
  --bg:        #f7f9f6;

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(10, 40, 22, .06);
  --shadow:    0 1px 2px rgba(10, 40, 22, .05), 0 8px 24px -12px rgba(10, 40, 22, .18);
  --focus:     0 0 0 3px #fff, 0 0 0 5px var(--green-600);
  --max:       1180px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--font); font-size: 16px; line-height: 1.55;
  color: var(--ink); background: var(--bg);
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: var(--green-700); text-underline-offset: 3px; }
a:hover { color: var(--green-900); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--green-800); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 12px; color: #fff; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 26px; height: 26px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header::before { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--green-700) 0 78%, var(--gold-500) 78% 100%); }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 44px; height: 44px; }
.brand-name { font-weight: 800; font-size: 1.35rem; letter-spacing: -.03em; line-height: 1; }
.brand-name span { color: var(--green-600); }
.brand-sub { display: block; font-size: .78rem; color: var(--muted); font-weight: 500; margin-top: 3px; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a.nav-link { position: relative; padding: 10px 14px; border-radius: 10px; color: var(--ink-2); font-weight: 600; text-decoration: none; }
.main-nav a.nav-link:hover { background: var(--green-50); color: var(--green-800); }
.main-nav a.nav-link[aria-current="page"] { color: var(--green-700); }
.main-nav a.nav-link[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 3px; border-radius: 3px; background: var(--green-600); }
.nav-auth { display: flex; align-items: center; gap: 10px; margin-left: 12px; }
.user-chip { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-2); font-size: .92rem; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--green-100); color: var(--green-800); font-weight: 800; font-size: .85rem; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.btn.menu-toggle { display: none; }

@media (max-width: 880px) {
  .btn.menu-toggle { display: inline-flex; }
  .main-nav { position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 16px 18px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .18s ease; }
  .main-nav.open { transform: none; opacity: 1; visibility: visible; }
  .main-nav a.nav-link { padding: 13px 14px; }
  .main-nav a.nav-link[aria-current="page"] { background: var(--green-50); }
  .main-nav a.nav-link[aria-current="page"]::after { display: none; }
  .nav-auth { margin: 10px 0 0; padding-top: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
  .nav-auth .btn { flex: 1; }
  .brand-sub { display: none; }
}

/* ---------- Buttons ---------- */
.btn { --bg: var(--surface); --fg: var(--ink); --bd: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: 12px; border: 1.5px solid var(--bd); background: var(--bg); color: var(--fg);
  font: inherit; font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; }
.btn:hover { --bd: #c3d2c7; color: var(--fg); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-busy="true"] { opacity: .65; cursor: not-allowed; }
.btn-primary { --bg: var(--green-600); --fg: #fff; --bd: var(--green-600); }
.btn-primary:hover { --bg: var(--green-700); --bd: var(--green-700); }
.btn-gold { --bg: var(--gold-500); --fg: #2b1d00; --bd: var(--gold-500); }
.btn-gold:hover { --bg: var(--gold-400); --bd: var(--gold-400); }
.btn-ghost { --bg: transparent; --bd: transparent; --fg: var(--ink-2); }
.btn-ghost:hover { --bg: var(--green-50); --bd: transparent; }
.btn-danger { --bg: var(--red-700); --fg: #fff; --bd: var(--red-700); }
.btn-danger:hover { --bg: #912018; --bd: #912018; }
.btn-danger-outline { --fg: var(--red-700); --bd: #f3c3bd; }
.btn-danger-outline:hover { --bg: var(--red-100); --bd: #eaa79f; }
.btn-lg { min-height: 58px; padding: 14px 24px; font-size: 1.05rem; border-radius: 14px; }
.btn-sm { min-height: 38px; padding: 7px 12px; font-size: .86rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; padding: 0; }
.btn .spinner { width: 16px; height: 16px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background:
  radial-gradient(900px 400px at 85% -10%, rgba(224,165,27,.13), transparent 60%),
  linear-gradient(180deg, #fff 0%, var(--green-50) 100%); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding: 56px 20px 64px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .82rem; font-weight: 700; color: var(--green-800); margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.eyebrow img { width: 24px; height: 24px; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.1rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.02; color: var(--green-900); }
.hero h1 .accent { color: var(--green-600); }
.hero .lede { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--ink-2); max-width: 34em; margin: 18px 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-actions .btn-lg { min-width: 230px; justify-content: space-between; }
.hero-actions .btn-lg .lead { display: inline-flex; align-items: center; gap: 12px; }
.hero-art { position: relative; }
.hero-photo { position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 540 / 400; box-shadow: 0 30px 60px -30px rgba(6,59,32,.55); border: 6px solid #fff; background: var(--green-100); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(6,59,32,.75)); }
.hero-photo figcaption { position: absolute; left: 22px; right: 22px; bottom: 18px; z-index: 1; color: #fff; }
.hero-photo figcaption strong { display: block; font-size: 1.15rem; }
.hero-photo figcaption span { font-size: .88rem; opacity: .9; }
.seal-badge { position: absolute; top: -18px; left: -18px; width: 96px; height: 96px; border-radius: 50%; background: #fff; padding: 6px; box-shadow: var(--shadow); }
.floating-note { position: absolute; right: -12px; bottom: -26px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: #fff; box-shadow: var(--shadow); font-size: .85rem; font-weight: 700; color: var(--ink-2); }
.floating-note .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--green-100); color: var(--green-700); }
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; padding: 36px 20px 44px; }
  .hero-art { max-width: 560px; margin-left: 14px; }
}
@media (max-width: 520px) {
  .hero-actions .btn-lg { width: 100%; min-width: 0; }
  .hero-art { margin-left: 10px; }
  .floating-note { position: static; margin-top: 12px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
  .seal-badge { width: 72px; height: 72px; left: -12px; top: -14px; }
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.stats-wrap { margin-top: -34px; position: relative; z-index: 2; }
.stat { display: flex; align-items: center; gap: 16px; padding: 22px 26px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-icon { width: 56px; height: 56px; flex: none; border-radius: 50%; display: grid; place-items: center; }
.stat-icon.open { background: var(--gold-100); color: #8a5a00; }
.stat-icon.resolved { background: var(--green-100); color: var(--green-700); }
.stat-icon.total { background: var(--blue-100); color: var(--blue-700); }
.stat-num { font-size: 2.1rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; min-width: 1.5ch; }
.stat-label { font-weight: 700; font-size: .95rem; }
.stat-hint { display: block; color: var(--muted); font-size: .84rem; }
.stat-text { display: flex; flex-direction: column; }
.stat-row { display: flex; align-items: baseline; gap: 12px; }
@media (max-width: 820px) {
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
  .stat { padding: 16px 20px; }
  .stat-icon { width: 46px; height: 46px; }
  .stat-num { font-size: 1.8rem; }
}

/* ---------- Sections ---------- */
.section { padding-top: 48px; padding-bottom: 64px; }
.pb-section { padding-bottom: 64px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--muted); }
.page-head { padding: 36px 0 8px; }
.page-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); font-weight: 800; color: var(--green-900); }
.page-head p { color: var(--ink-2); margin: 0; }
.breadcrumb { font-size: .88rem; color: var(--muted); margin-bottom: 8px; }
.breadcrumb a { color: var(--muted); }

/* ---------- Filters ---------- */
.filters { display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr)); gap: 12px; }
.field-icon { position: relative; }
.field-icon > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.field-icon input, .field-icon select { padding-left: 44px; }
.input, .select, textarea.input {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); font: inherit; font-size: 1rem; transition: border-color .15s, box-shadow .15s; }
.select { appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%233d5245' stroke-width='2.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 12px center; }
.input:hover, .select:hover { border-color: #c3d2c7; }
.input:focus, .select:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 4px rgba(17,121,63,.16); }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--red-700); }
textarea.input { min-height: 120px; resize: vertical; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 0 16px; }
.segmented { display: inline-flex; padding: 4px; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.segmented button, .segmented label { min-height: 38px; padding: 6px 16px; border: 0; border-radius: 10px; background: transparent; font: inherit; font-weight: 700; font-size: .9rem; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.segmented button[aria-pressed="true"] { background: var(--green-600); color: #fff; }
.segmented button:hover:not([aria-pressed="true"]) { background: var(--green-50); }
.result-count { color: var(--muted); font-size: .92rem; font-weight: 600; }
@media (max-width: 900px) { .filters { grid-template-columns: 1fr 1fr; } .filters .search-field { grid-column: 1 / -1; } }
@media (max-width: 480px) { .filters { grid-template-columns: 1fr; } .segmented { width: 100%; } .segmented button { flex: 1; justify-content: center; } }

/* ---------- Report cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 18px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; transition: box-shadow .18s, transform .18s, border-color .18s; }
.card.is-clickable:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #cddbd1; }
.card-body { display: flex; gap: 16px; padding: 18px; flex: 1; }
.card-thumb { width: 74px; height: 74px; flex: none; border-radius: 16px; display: grid; place-items: center; }
.card-thumb .icon { width: 32px; height: 32px; stroke-width: 1.75; }
.card-thumb.lost { background: var(--red-100); color: var(--red-700); }
.card-thumb.found { background: var(--green-100); color: var(--green-700); }
.card-thumb.resolved { background: #eef1ef; color: #6c7d72; }
.card-main { min-width: 0; flex: 1; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800; letter-spacing: .01em; }
.badge .icon { width: 14px; height: 14px; stroke-width: 2.6; }
.badge-lost { background: var(--red-100); color: var(--red-700); }
.badge-found { background: var(--green-100); color: var(--green-800); }
.badge-resolved { background: var(--blue-100); color: var(--blue-700); }
.badge-open { background: var(--gold-100); color: #7a4f00; }
.badge-mine { background: #fff; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); }
.card-title { font-size: 1.15rem; font-weight: 800; margin: 0 0 6px; overflow-wrap: anywhere; }
.card-title a { color: inherit; text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card-title a:focus-visible { box-shadow: none; }
.card.is-clickable:has(.card-title a:focus-visible) { box-shadow: var(--focus); }
.meta { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; color: var(--ink-2); font-size: .9rem; }
.meta li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.meta li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta .icon { width: 16px; height: 16px; color: var(--muted); }
.card-desc { color: var(--muted); font-size: .92rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line); background: #fbfcfb; font-size: .84rem; color: var(--muted); }
.card-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; }
.card.resolved .card-title { color: var(--ink-2); }

/* skeleton */
.skeleton { pointer-events: none; }
.sk { background: linear-gradient(90deg, #eef2ef 25%, #f6f8f6 50%, #eef2ef 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* empty / error states */
.state { text-align: center; padding: 48px 20px; background: var(--surface); border: 1.5px dashed var(--line); border-radius: var(--radius); grid-column: 1 / -1; }
.state .state-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--green-50); color: var(--green-700); }
.state.error .state-icon { background: var(--red-100); color: var(--red-700); }
.state h3 { font-size: 1.15rem; }
.state p { color: var(--muted); max-width: 36em; margin: 0 auto 16px; }
.load-more { display: flex; justify-content: center; margin-top: 24px; }

/* ---------- Alerts & toasts ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border: 1px solid; font-size: .95rem; margin-bottom: 16px; }
.alert .icon { margin-top: 2px; }
.alert p { margin: 0; }
.alert strong { display: block; }
.alert-error { background: #fff4f2; border-color: #f3c3bd; color: #7a1a12; }
.alert-success { background: var(--green-50); border-color: #b9dcc4; color: var(--green-900); }
.alert-info { background: #f1f7fc; border-color: #c4dbec; color: #133f5e; }
.alert[hidden] { display: none; }
.toasts { position: fixed; z-index: 90; right: 16px; bottom: 16px; left: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; max-width: 420px; padding: 13px 14px 13px 16px; background: var(--green-900); color: #fff; border-radius: 14px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.45); font-size: .94rem; font-weight: 600; animation: toastIn .22s ease; }
.toast.error { background: #7a1a12; }
.toast button { background: transparent; border: 0; color: inherit; opacity: .75; cursor: pointer; padding: 2px; margin-left: 4px; }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } }

/* ---------- Forms / auth ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: clamp(20px, 4vw, 34px); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label, .field legend { font-weight: 700; font-size: .92rem; }
.field .hint { font-size: .84rem; color: var(--muted); }
.field .error-text { font-size: .85rem; color: var(--red-700); font-weight: 600; display: flex; gap: 6px; align-items: center; }
.field .error-text:empty { display: none; }
.req { color: var(--red-700); }
.optional { color: var(--muted); font-weight: 500; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.type-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.type-choice label { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; background: #fff; font-weight: 700; }
.type-choice label small { display: block; font-weight: 500; color: var(--muted); font-size: .82rem; }
.type-choice input { position: absolute; opacity: 0; }
.type-choice .tc-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.type-choice .lost .tc-icon { background: var(--red-100); color: var(--red-700); }
.type-choice .found .tc-icon { background: var(--green-100); color: var(--green-700); }
.type-choice label:has(input:checked) { border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(17,121,63,.14); }
.type-choice label:has(input:focus-visible) { box-shadow: var(--focus); }
@media (max-width: 420px) { .type-choice { grid-template-columns: 1fr; } }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 52px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 42px; border: 0; background: transparent; color: var(--muted); border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
.pw-toggle:hover { color: var(--ink); background: var(--green-50); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--green-600); flex: none; }
.counter { font-size: .8rem; color: var(--muted); text-align: right; }

.auth-layout { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 72px); }
.auth-aside { position: relative; color: #fff; background: var(--green-800); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 48px; }
.auth-aside .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; opacity: .35; mix-blend-mode: luminosity; }
.auth-aside::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,59,32,.25), rgba(6,59,32,.92)); }
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside img.seal { width: 92px; height: 92px; margin-bottom: 20px; background: #fff; border-radius: 50%; padding: 5px; }
.auth-aside h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 800; }
.auth-aside p { opacity: .9; max-width: 30em; }
.auth-aside ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.auth-aside li { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.auth-aside li .icon { color: var(--gold-400); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-box { width: 100%; max-width: 440px; }
.auth-box h1 { font-size: 2rem; font-weight: 800; color: var(--green-900); }
.auth-box > p { color: var(--muted); }
.auth-box form { display: grid; gap: 16px; margin-top: 22px; }
.auth-switch { text-align: center; color: var(--muted); margin-top: 20px; font-size: .95rem; }
@media (max-width: 900px) { .auth-layout { grid-template-columns: 1fr; } .auth-aside { display: none; } .auth-main { padding-top: 28px; align-items: flex-start; } }

/* ---------- Dashboard ---------- */
.welcome { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 28px; border-radius: var(--radius-lg); color: #fff; background:
  radial-gradient(500px 220px at 100% 0%, rgba(240,187,56,.35), transparent 60%), linear-gradient(120deg, var(--green-800), var(--green-600)); box-shadow: var(--shadow); }
.welcome h1 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 800; margin: 0; }
.welcome p { margin: 6px 0 0; opacity: .9; }
.welcome .btn { --bd: rgba(255,255,255,.4); }
.welcome .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.mini-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.mini-stat .n { font-size: 1.9rem; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.mini-stat .l { color: var(--muted); font-weight: 600; font-size: .88rem; }
@media (max-width: 760px) { .mini-stats { grid-template-columns: 1fr 1fr; } }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; } }
.list-cards { display: grid; gap: 14px; }

/* ---------- Dialog ---------- */
dialog { border: 0; padding: 0; border-radius: var(--radius-lg); width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 48px); box-shadow: 0 40px 80px -30px rgba(0,0,0,.5); color: var(--ink); }
dialog::backdrop { background: rgba(6, 30, 18, .55); backdrop-filter: blur(2px); }
.dialog-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 22px 0; }
.dialog-head h2 { font-size: 1.35rem; margin: 2px 0 0; overflow-wrap: anywhere; }
.dialog-close { margin-left: auto; }
.dialog-body { padding: 16px 22px 8px; }
.dialog-body .desc { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }
.dialog-foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 22px 22px; }
.detail-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 16px; font-size: .94rem; }
.detail-list dt { color: var(--muted); font-weight: 600; display: flex; gap: 8px; align-items: center; }
.detail-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.contact-box { padding: 14px 16px; border-radius: 12px; background: var(--green-50); border: 1px solid #c9e3d1; font-size: .94rem; overflow-wrap: anywhere; }
.contact-box.locked { background: #f5f7f5; border-color: var(--line); color: var(--ink-2); }
.contact-box > .icon { display: inline-block; vertical-align: -3px; margin-right: 4px; }

/* ---------- Prose (privacy) ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.35rem; margin-top: 2em; color: var(--green-900); }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: .93rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--green-50); font-weight: 700; }
.table-scroll { overflow-x: auto; }
.toc { position: sticky; top: 96px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font-size: .92rem; }
.toc ol { margin: 8px 0 0; padding-left: 1.2em; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--green-700); text-decoration: underline; }
.privacy-layout { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; padding-bottom: 64px; }
@media (max-width: 880px) { .privacy-layout { grid-template-columns: 1fr; } .toc { position: static; } }

/* ---------- Footer ---------- */
.site-footer { margin-top: 24px; background: var(--green-900); color: #d4e6da; font-size: .92rem; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding: 40px 20px 28px; }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand img { width: 56px; height: 56px; background: #fff; border-radius: 50%; padding: 3px; flex: none; }
.footer-brand strong { color: #fff; font-size: 1.1rem; display: block; }
.motto { font-style: italic; color: var(--gold-400); font-weight: 600; margin-top: 6px; display: block; }
.site-footer h3 { color: #fff; font-size: .95rem; margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: #d4e6da; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 20px 22px; font-size: .84rem; color: #a9c4b2; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; gap: 22px; } }

.header-placeholder { min-height: 73px; }

/* Item photos */
.card-thumb.has-photo { width: 116px; height: 132px; padding: 0; overflow: hidden; background: #eef2ef; box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 400px) { .card-thumb.has-photo { width: 92px; height: 108px; } }
.dialog-head .card-thumb.has-photo { width: 74px; height: 74px; }
.card-thumb.has-photo img { width: 100%; height: 100%; object-fit: cover; }
.card.resolved .card-thumb.has-photo img { filter: grayscale(.6); opacity: .8; }
.detail-photo { margin: 0 0 16px; border-radius: 14px; overflow: hidden; background: #eef2ef; border: 1px solid var(--line); }
.detail-photo img { width: 100%; max-height: 340px; object-fit: contain; }
.photo-field { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 14px; border: 1.5px dashed #c3d2c7; border-radius: 14px; background: #fbfcfb; }
.photo-preview { width: 112px; height: 112px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: var(--green-50); color: var(--green-700); flex: none; border: 1px solid var(--line); }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-controls { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.photo-controls .row { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-controls label.btn { position: relative; }
.photo-controls label.btn input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.photo-controls label.btn:focus-within { box-shadow: var(--focus); }

/* Possible matches */
.match-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.match-group + .match-group { margin-top: 14px; }
.match-group h3 { font-size: 1rem; margin: 0 0 4px; }
.match-group > p { color: var(--muted); font-size: .9rem; margin: 0 0 12px; }
.match-group .list-cards { gap: 10px; }
.match-why { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.auth-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.auth-row a { font-size: .88rem; font-weight: 600; }
.container.narrow { max-width: 880px; padding-bottom: 56px; }
.boot-alert { margin-top: 20px; }
.sk-badge { width: 70px; height: 20px; margin-bottom: 10px; }
.sk-title { width: 60%; height: 20px; margin-bottom: 12px; }
.sk-line { width: 80%; height: 12px; margin-bottom: 8px; }
.sk-line.short { width: 65%; }
.sk-line.long { width: 92%; margin-bottom: 0; }

/* utility */
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.text-muted { color: var(--muted); }
.center { text-align: center; }
.loading-page { display: grid; place-items: center; min-height: 40vh; color: var(--muted); gap: 12px; }
.loading-page .spinner { width: 34px; height: 34px; border: 3.5px solid var(--green-100); border-top-color: var(--green-600); border-radius: 50%; animation: spin .8s linear infinite; }
