/* ═══════════════════════════════════════════════════════════
   Scan2Return — THEME V3: "Fresh Found"
   Modern light SaaS — crisp white, emerald → teal.
   Green = found, good fortune. Rounded cards, soft shadows,
   pill buttons, tight sans typography. Zero JavaScript.
   ═══════════════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
    --bg:          #f4faf8;
    --bg-deep:     #e8f3ef;
    --card:        #ffffff;
    --card-2:      #f2faf6;
    --ink:         #0f1f1c;
    --ink-soft:    #4c615b;
    --ink-faint:   #8ba19a;
    --line:        #ddeae6;
    --line-strong: #bfd4cd;
    --emerald:     #0e9f6e;
    --emerald-deep:#0b7f58;
    --teal:        #14b8a6;
    --emerald-soft: rgba(14, 159, 110, 0.10);
    --success:     #0e9f6e;
    --success-bg:  #e6f6f0;
    --error:       #d64545;
    --error-bg:    #fdeeee;
    --grad:        linear-gradient(135deg, #0e9f6e 0%, #14b8a6 100%);
    --radius:      16px;
    --radius-sm:   10px;
    --max-width:   780px;
    --shadow-card: 0 1px 2px rgba(15, 31, 28, 0.04), 0 10px 30px rgba(15, 31, 28, 0.06);
    --shadow-pop:  0 12px 34px rgba(14, 159, 110, 0.22);
    --shadow-btn:  0 4px 14px rgba(14, 159, 110, 0.28);
    --display: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --mono: ui-monospace, 'SF Mono', 'Cascadia Code', 'JetBrains Mono', monospace;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ── */
html { font-size: 17px; scroll-behavior: smooth; }
body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(900px 380px at 50% -8%, rgba(14, 159, 110, 0.10), transparent 65%),
        radial-gradient(700px 500px at 100% 100%, rgba(20, 184, 166, 0.07), transparent 60%),
        var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--emerald); text-decoration: none; }
a:hover { color: var(--emerald-deep); text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 5px; border: 2px solid var(--bg-deep); }
::-webkit-scrollbar-thumb:hover { background: var(--emerald); }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) var(--bg-deep); }

/* ── Masthead ── */
.masthead {
    position: sticky;
    top: 0;
    z-index: 500;
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    padding: 0 1rem;
}
.masthead-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-icon {
    color: #fff;
    flex-shrink: 0;
    background: var(--grad);
    border-radius: 10px;
    padding: 5px;
    width: 32px;
    height: 32px;
    box-shadow: 0 4px 10px rgba(14, 159, 110, 0.3);
}
.brand-name {
    font-family: var(--display);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.brand-chip {
    font-family: var(--mono);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    background: var(--emerald-soft);
    color: var(--emerald-deep);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
    border: 1px solid rgba(14, 159, 110, 0.25);
}
.main-nav {
    display: flex;
    gap: 1.5rem;
}
.main-nav a {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink-soft);
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 20px;
    transition: background 0.15s, color 0.15s;
}
.main-nav a:hover {
    color: var(--emerald);
    background: var(--emerald-soft);
    text-decoration: none;
}
.lang-switch {
    display: inline-flex;
    align-items: center;
    margin-left: 0.35rem;
    padding: 0.25rem 0.65rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.1;
    white-space: nowrap;
    color: var(--emerald-deep);
    background: var(--emerald-soft);
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.lang-switch:hover {
    color: #fff;
    background: var(--emerald);
    border-color: var(--emerald);
    text-decoration: none;
}

/* ── Main Content ── */
main {
    flex: 1;
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 1rem 3.5rem;
}

/* ── Hero ── */
.hero {
    text-align: center;
    padding: 3rem 0 2.25rem;
}
.hero-eyebrow {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--emerald-deep);
    background: var(--emerald-soft);
    border: 1px solid rgba(14, 159, 110, 0.2);
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 1.1rem;
}
.hero h1 {
    font-family: var(--display);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0.9rem;
    letter-spacing: -0.03em;
    text-wrap: balance;
}
.hero h1::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    margin: 1rem auto 0;
    border-radius: 4px;
    background: var(--grad);
}
.lede {
    color: var(--ink-soft);
    font-size: 1.08rem;
    max-width: 580px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}
.hero-cta { margin: 0 auto 2rem; }
.hero-cta .btn { font-size: 1.02rem; padding: 0.9rem 1.9rem; }
.register-card { max-width: 500px; }
.btn-google {
    background: #fff;
    color: #232019;
    border: 1px solid #d0d5dd;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    width: 100%;
}
.btn-google:hover {
    background: #f6f8fa;
    color: #232019;
    box-shadow: none;
    transform: none;
}
.google-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--ink-faint);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0.5rem 0;
}
.google-divider::before,
.google-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* ── Hero slideshow (CSS-only carousel, zero JS) ── */
.slide-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.hero-slideshow {
    position: relative;
    max-width: 340px;
    margin: 0 auto 2rem;
    overflow: hidden;
    border-radius: 20px;
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: 0 20px 50px rgba(15, 31, 28, 0.14), 0 4px 12px rgba(15, 31, 28, 0.06);
}
.slides-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.slide {
    flex: 0 0 100%;
    min-width: 100%;
    position: relative;
    padding: 12px;
    background: #fff;
}
.slide img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    transition: transform 0.4s ease;
    cursor: zoom-in;
}
.slide:hover img { transform: scale(1.08); }
@media (hover: none) {
    .slide img:active { transform: scale(1.12); }
}
.slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.05rem;
    line-height: 1;
    color: var(--ink);
    visibility: hidden;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgba(15, 31, 28, 0.16);
}
.slide-btn:hover {
    background: var(--grad);
    border-color: transparent;
    color: #fff;
}
.slide-prev { left: 20px; }
.slide-next { right: 20px; }
#hs-1:checked ~ .slides-track { transform: translateX(0); }
#hs-2:checked ~ .slides-track { transform: translateX(-100%); }
#hs-3:checked ~ .slides-track { transform: translateX(-200%); }
#hs-4:checked ~ .slides-track { transform: translateX(-300%); }
#hs-5:checked ~ .slides-track { transform: translateX(-400%); }
#hs-6:checked ~ .slides-track { transform: translateX(-500%); }
#hs-7:checked ~ .slides-track { transform: translateX(-600%); }

/* reveal only the active slide's buttons */
#hs-1:checked ~ .slides-track .slide:nth-child(1) .slide-btn,
#hs-2:checked ~ .slides-track .slide:nth-child(2) .slide-btn,
#hs-3:checked ~ .slides-track .slide:nth-child(3) .slide-btn,
#hs-4:checked ~ .slides-track .slide:nth-child(4) .slide-btn,
#hs-5:checked ~ .slides-track .slide:nth-child(5) .slide-btn,
#hs-6:checked ~ .slides-track .slide:nth-child(6) .slide-btn,
#hs-7:checked ~ .slides-track .slide:nth-child(7) .slide-btn {
    visibility: visible;
}
/* first slide has no prev, last slide has no next */
#hs-1:checked ~ .slides-track .slide:nth-child(1) .slide-prev,
#hs-7:checked ~ .slides-track .slide:nth-child(7) .slide-next {
    visibility: hidden;
}
/* swipe/drag enhancement — touch-action lets vertical scroll pass, keeps horizontal for JS */
.hero-slideshow {
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}
.hero-slideshow.is-dragging {
    cursor: grabbing;
}
.hero-slideshow.is-dragging .slide img {
    transform: none !important;
}

/* ── Stats ── */
.stats-row {
    display: flex;
    gap: 0.9rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}
.stat {
    text-align: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.95rem 1.5rem;
    min-width: 130px;
    box-shadow: 0 1px 2px rgba(15, 31, 28, 0.04), 0 6px 18px rgba(15, 31, 28, 0.05);
}
.stat-num {
    display: block;
    font-family: var(--mono);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--emerald);
    line-height: 1.15;
}
.stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ink-faint);
}

/* ── Cards ── */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow-card);
}
.card h2 {
    font-family: var(--display);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.card h2::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--grad);
    flex-shrink: 0;
}

/* ── Found Card (find.php) ── */
.found-card {
    text-align: center;
    max-width: 470px;
    margin: 1rem auto 1.75rem;
    padding: 2.5rem;
}
.found-header { margin-bottom: 1.5rem; }
.found-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 6px 12px rgba(14, 159, 110, 0.25));
}
.found-header h1 {
    font-family: var(--display);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}
.found-header h1::after {
    content: "";
    display: block;
    width: 48px;
    height: 4px;
    margin: 0.7rem auto 0;
    border-radius: 4px;
    background: var(--grad);
}
.found-subtitle {
    color: var(--ink-soft);
    font-size: 0.92rem;
    margin-top: 0.75rem;
}
.owner-info {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--card-2);
    border: 1px solid var(--line);
    border-radius: 14px;
}
.owner-name {
    font-family: var(--display);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 0.25rem;
}
.key-desc {
    font-size: 0.95rem;
    color: var(--ink-soft);
    margin-bottom: 0.6rem;
}
.reward-badge {
    display: inline-block;
    background: var(--grad);
    color: #fff;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: var(--shadow-pop);
}

/* ── Contact action buttons ── */
.contact-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s, color 0.15s;
    line-height: 1.3;
    background: var(--grad);
    color: #fff;
    box-shadow: var(--shadow-btn);
}
.btn:hover {
    background: linear-gradient(135deg, var(--emerald-deep), var(--emerald));
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(14, 159, 110, 0.35);
}
.btn:active { transform: translateY(0); }
.btn-call {
    background: var(--grad);
    color: #fff;
}
.btn-call:hover { background: linear-gradient(135deg, var(--emerald-deep), var(--emerald)); }
.btn-email {
    background: var(--card);
    color: var(--emerald);
    border: 2px solid var(--emerald);
    box-shadow: none;
}
.btn-email:hover {
    background: var(--emerald-soft);
    color: var(--emerald-deep);
    box-shadow: none;
    border-color: var(--emerald-deep);
}
.btn-whatsapp {
    background: #25D366;
    color: #fff;
}
.btn-whatsapp:hover {
    background: #1da851;
    color: #fff;
}
.btn-telegram {
    background: #229ED9;
    color: #fff;
}
.btn-telegram:hover {
    background: #1c8bbd;
    color: #fff;
}
.btn-sm {
    font-size: 0.78rem;
    padding: 0.5rem 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: none;
}
.btn-ghost {
    background: var(--card);
    color: var(--ink-soft);
    border: 1px solid var(--line-strong);
    box-shadow: none;
}
.btn-ghost:hover {
    background: var(--bg-deep);
    color: var(--ink);
    box-shadow: none;
    transform: none;
}
.btn-disabled {
    opacity: 0.4;
    pointer-events: none;
    background: var(--bg-deep);
    color: var(--ink-faint);
    border: 1px solid var(--line);
    box-shadow: none;
}
.alt-phone {
    font-size: 0.9rem;
    color: var(--ink-soft);
    margin-bottom: 1rem;
}
.found-note {
    font-size: 0.8rem;
    color: var(--ink-faint);
    font-family: var(--mono);
}

/* ── Opt-in precise location share ── */
.js-only { display: none; }
html.js .js-only { display: inline-flex; }

/* ── /register: email form disclosed by a button ──
   Progressive enhancement: the email registration form is collapsed behind a
   button when JS is available. The toggle is .js-only, so without JS it stays
   hidden and the form is always visible (unchanged behaviour). A failed POST
   re-renders the form with .is-open so validation errors stay on screen. */
.btn-email-toggle {
    width: 100%;
    background: #fff;
    color: #232019;
    border: 1px solid #d0d5dd;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.btn-email-toggle:hover {
    background: #f6f8fa;
    color: #232019;
    box-shadow: none;
    transform: none;
}
html.js .btn-email-toggle[aria-expanded="true"] { display: none; }
html.js .email-form-wrap:not(.is-open) { display: none; }
.loc-share { margin-top: 0.75rem; }
.btn-share-loc {
    background: var(--card);
    color: var(--ink-soft);
    border: 1px solid var(--line-strong);
    box-shadow: none;
}
.btn-share-loc:hover {
    background: var(--bg-deep);
    color: var(--ink);
    box-shadow: none;
}
.loc-shared {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--success);
}

/* ── Message Cards (error/info) ── */
.message-card {
    max-width: 470px;
    margin: 2.5rem auto;
    text-align: center;
    padding: 2.75rem 2rem;
}
.message-card h2 {
    font-family: var(--display);
    font-weight: 800;
    margin-bottom: 0.75rem;
    justify-content: center;
}
.message-card p { color: var(--ink-soft); margin-bottom: 0.5rem; }
.message-card .btn { margin-top: 0.75rem; }

/* ── How It Works ── */
.how-list {
    list-style: none;
    counter-reset: how;
    display: grid;
    gap: 0.75rem;
}
.how-list li {
    counter-increment: how;
    display: flex;
    gap: 1.1rem;
    padding: 1.05rem 1.1rem;
    background: var(--card-2);
    border: 1px solid var(--line);
    border-radius: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.how-list li:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}
.how-list li::before {
    content: counter(how);
    font-family: var(--display);
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    width: 2.1rem;
    height: 2.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--grad);
    border-radius: 50%;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(14, 159, 110, 0.3);
}
.how-list li strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}
.how-list li span {
    color: var(--ink-soft);
    font-size: 0.87rem;
}

/* ── FAQ ── */
.faq-card dl { margin: 0; }
.faq-card dt {
    font-weight: 700;
    font-size: 0.95rem;
    margin-top: 1.1rem;
    color: var(--ink);
    display: flex;
    gap: 0.6rem;
    align-items: baseline;
}
.faq-card dt::before {
    content: "Q";
    font-family: var(--display);
    font-size: 0.72rem;
    font-weight: 800;
    color: #fff;
    background: var(--grad);
    width: 1.35rem;
    height: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    transform: translateY(0.15rem);
}
.faq-card dd {
    color: var(--ink-soft);
    font-size: 0.87rem;
    margin-left: 1.95rem;
    margin-top: 0.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}
.faq-card dd:last-child { border-bottom: none; padding-bottom: 0; }

/* ── Quick Actions ── */
.action-grid {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.admin-quick { text-align: center; }

/* ── Admin Header ── */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.admin-header h1 {
    font-family: var(--display);
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.admin-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ── Stats Grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem;
    text-align: center;
    box-shadow: var(--shadow-card);
}
.stat-card .stat-num {
    font-size: 2rem;
    display: block;
}
.stat-card .stat-label {
    display: block;
    margin-top: 0.3rem;
}
.stat-detail {
    display: block;
    font-size: 0.75rem;
    color: var(--ink-faint);
    margin-top: 0.25rem;
}

/* ── Tables ── */
.table-wrap {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow-card);
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: var(--card);
}
.data-table th {
    text-align: left;
    padding: 0.7rem 0.85rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
    background: var(--bg-deep);
    border-bottom: 2px solid var(--line-strong);
    white-space: nowrap;
}
.data-table td {
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--card-2); }
.mono {
    font-family: var(--mono);
    font-size: 0.78rem;
}

/* ── Badges ── */
.badge {
    display: inline-block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 700;
}
.badge-active {
    background: var(--success-bg);
    color: var(--success);
}
.badge-inactive {
    background: var(--error-bg);
    color: var(--error);
}

/* ── Flash Messages ── */
.flash {
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border-left: 4px solid;
    box-shadow: var(--shadow-card);
}
.flash-success {
    background: var(--success-bg);
    color: var(--success);
    border-color: var(--success);
}
.flash-error {
    background: var(--error-bg);
    color: var(--error);
    border-color: var(--error);
}
.flash-info {
    background: var(--emerald-soft);
    color: var(--ink-soft);
    border-color: var(--teal);
}

/* ── Forms ── */
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.form-row {
    display: flex;
    gap: 1rem;
}
.form-row .form-field { flex: 1; }
.form-field {
    display: flex;
    flex-direction: column;
}
.field-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
    margin-bottom: 0.35rem;
}
.field-input {
    font-family: inherit;
    font-size: 1rem;
    padding: 0.68rem 0.85rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.field-input:focus {
    outline: none;
    border-color: var(--emerald);
    box-shadow: 0 0 0 3px var(--emerald-soft);
}
select.field-input { cursor: pointer; }
.field-help {
    font-size: 0.75rem;
    color: var(--ink-faint);
    margin-top: 0.25rem;
}
.form-help {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-bottom: 0.25rem;
}
.form-field-checkbox {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0;
}
.form-field-checkbox input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.15rem;
    accent-color: var(--emerald);
    flex-shrink: 0;
}
.form-field-checkbox .field-help {
    display: block;
    margin-top: 0.15rem;
}

/* ── Auth Card ── */
.auth-card {
    max-width: 410px;
    margin: 3rem auto;
    text-align: center;
    padding: 2.75rem 2.25rem;
}
.auth-card h1 {
    font-family: var(--display);
    font-weight: 800;
    margin-bottom: 1.5rem;
    justify-content: center;
}
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}
.auth-form .btn { width: 100%; }

/* ── QR Generated Display ── */
.qr-generated h2 {
    font-family: var(--display);
    font-weight: 800;
    margin-bottom: 1rem;
}
.qr-display {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
}
.qr-display img {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    flex-shrink: 0;
    box-shadow: var(--shadow-card);
    background: #fff;
    padding: 8px;
}
.qr-details {
    flex: 1;
    min-width: 200px;
    font-size: 0.9rem;
    line-height: 1.8;
}
.qr-code-str {
    font-size: 0.7rem !important;
    word-break: break-all;
    color: var(--ink-faint);
    background: var(--card-2);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    margin-top: 0.5rem;
}
.qr-url {
    font-size: 0.75rem;
    word-break: break-all;
    margin-top: 0.25rem;
}
.qr-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* ── Pagination ── */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.pg-note {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--ink-faint);
}
.scan-count {
    font-size: 0.8rem;
    color: var(--ink-faint);
    margin-bottom: 0.75rem;
}

/* ── Empty State ── */
.empty-card {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--ink-faint);
}
.empty-card p {
    font-size: 0.95rem;
}

/* ── Back Link ── */
.back-link {
    margin-top: 1rem;
    font-size: 0.85rem;
}

/* ── Footer ── */
/* ── Footer legal links (privacy / terms / disclaimer) ── */
.footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.4rem 0.7rem;
    margin: 0.35rem 0 0;
    font-family: var(--mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.footer-legal a {
    color: var(--ink-faint);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
}
.footer-legal a:hover {
    color: var(--ink);
    border-bottom-color: var(--line-strong);
}
.footer-legal a[aria-current="page"] { color: var(--ink); }
.footer-legal .sep { color: var(--line-strong); }

/* ── Legal pages ── */
.legal-card { max-width: 760px; }
.legal-updated {
    margin: 0 0 1.6rem;
    font-family: var(--mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
}
.legal-body {
    font-size: 0.95rem;
    line-height: 1.78;
    color: var(--ink-soft);
}
.legal-body h2 {
    margin: 2rem 0 0.65rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--line);
    font-size: 1.02rem;
    color: var(--ink);
}
.legal-body h3 {
    margin: 1.35rem 0 0.45rem;
    font-size: 0.92rem;
    color: var(--ink);
}
.legal-body p { margin: 0 0 0.9rem; }
.legal-body ul { margin: 0 0 0.95rem; padding-left: 1.15rem; }
.legal-body li { margin-bottom: 0.45rem; }
.legal-body strong { color: var(--ink); }
.legal-body a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.legal-body a:hover { color: var(--ink-soft); }

/* ── Contact form ── */
.field-textarea {
    min-height: 9rem;
    resize: vertical;
    font: inherit;
    line-height: 1.6;
}

.site-footer {
    text-align: center;
    padding: 2.25rem 1rem;
    border-top: 1px solid var(--line);
    background: var(--card);
}
.site-footer p {
    color: var(--ink-soft);
    font-size: 0.85rem;
    line-height: 1.6;
}
.footer-meta {
    font-family: var(--mono);
    font-size: 0.7rem !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-faint) !important;
    margin-top: 0.25rem;
}

/* ── Focus ── */
:focus-visible {
    outline: 2px solid var(--emerald);
    outline-offset: 2px;
}

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

/* ── Mobile ── */
@media (max-width: 768px) {
    html { font-size: 16px; }
    .masthead-inner { flex-direction: column; gap: 0.5rem; }
    .main-nav { gap: 1rem; }
    .hero { padding: 2.25rem 0 1.75rem; }
    .hero h1 { font-size: 1.8rem; }
    .card { padding: 1.4rem; }
    .form-row { flex-direction: column; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .admin-header { flex-direction: column; }
    .qr-display { flex-direction: column; align-items: center; }
    .contact-actions .btn { font-size: 1rem; padding: 0.85rem 1rem; }
    .data-table { font-size: 0.75rem; }
    .data-table th, .data-table td { padding: 0.4rem 0.5rem; }
    .stats-row { gap: 0.6rem; }
    .stat { min-width: 100px; padding: 0.8rem 1rem; }

    /* Footer legal nav — quiet single-line treatment. On phones the uppercase
       mono + 0.08em tracking read as oversized/bold next to the tagline, and the
       separate .sep flex item stranded a lone "·" at the end of a wrapped row.
       Mixed case, body font, no separators: one clean row. Desktop untouched. */
    .footer-legal {
        font-family: inherit;
        font-size: 0.78rem;
        text-transform: none;
        letter-spacing: 0;
        gap: 0.35rem 1.1rem;
        margin-top: 0.5rem;
    }
    .footer-legal .sep { display: none; }
}

/* ── Manage Listing (magic token page) — theme-agnostic ── */
.manage-card {
    max-width: 560px;
    margin: 2.5rem auto;
    padding: 2.25rem 2rem;
    text-align: left;
}
.manage-card .found-header { margin-bottom: 1.25rem; }
.manage-section {
    font-weight: 800;
    font-size: 1.02rem;
    margin: 1.75rem 0 0.6rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}
.manage-danger { color: var(--error); }
.status-badge {
    display: inline-block;
    padding: 0.18rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.status-badge.active { background: var(--success-bg); color: var(--success); border: 1px solid var(--success); }
.status-badge.off { background: var(--error-bg); color: var(--error); border: 1px solid var(--error); }
.manage-link {
    font-family: var(--mono);
    font-size: 0.8rem;
    background: var(--card-2, var(--bg-deep, #f2f2f2));
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.9rem;
    word-break: break-all;
    margin: 0.6rem 0 0.9rem;
}
.manage-box {
    margin-top: 1.25rem;
    padding: 1rem 1.1rem;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--card-2, transparent);
    text-align: left;
}
.manage-box h2 { font-size: 0.95rem; margin-bottom: 0.4rem; }
.precise-badge {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.08rem 0.45rem;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 999px;
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success);
    white-space: nowrap;
}
.confirm-line {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-bottom: 0.85rem;
}
.confirm-line input[type="checkbox"] {
    width: 1.05rem;
    height: 1.05rem;
    margin-top: 0.18rem;
    accent-color: var(--success);
    flex-shrink: 0;
}
.btn-danger {
    background: var(--error);
    color: #fff;
}
.btn-danger:hover { background: var(--error); filter: brightness(0.92); }

/* ── Hamburger dropdown nav (pure CSS, zero JS) ── */
/* Wrapper: anchors the dropdown panel to the burger's exact position.
   position:relative makes it the containing block for the absolute
   .main-nav, so the panel's left edge always matches the burger's —
   on every screen size. (Previously the panel was position:fixed;
   left:1rem, glued to the viewport edge — fine on mobile where the
   burger sits at 1rem, but ~230px off on desktop where the centered
   780px masthead pushes the burger inward.) */
.nav-wrap {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}
.nav-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.nav-burger {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    margin-right: 0.5rem;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.nav-burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-burger:hover { background: var(--emerald-soft); border-color: var(--emerald); }
.nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
.nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Backdrop: dims the page, click to close.
   NOTE: use vw/vh units, NOT inset:0 — the .masthead's backdrop-filter
   makes it the containing block for position:fixed children, so inset:0
   would clamp to the masthead's 61px height instead of the viewport. */
.nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(15, 31, 28, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
    z-index: 900;
    cursor: pointer;
}
.nav-toggle:checked ~ .nav-backdrop {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease;
}

/* Dropdown panel: compact, sized to its items, drops below the burger.
   Anchored to .nav-wrap (position:relative), so its left edge always
   lines up with the burger's left edge at every viewport width.
   Animation: slides in from the LEFT edge (translateX -110% → 0) with a
   springy back-out overshoot; closes with a quick ease-out. */
.main-nav {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    width: 250px;
    max-width: calc(100vw - 1rem);
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    background: var(--card, #fff);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(15, 31, 28, 0.18), 0 4px 10px rgba(15, 31, 28, 0.08);
    transform: translateX(-110%) translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.18s ease, visibility 0s linear 0.24s;
    z-index: 910;
    overflow-y: auto;
    max-height: calc(100dvh - 5rem);
}
.nav-toggle:checked ~ .main-nav {
    transform: translateX(0) translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform 0.34s cubic-bezier(0.34, 1.3, 0.64, 1), opacity 0.22s ease;
}
.main-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.72rem 0.85rem;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.main-nav .nav-item + .nav-item {
    margin-top: 2px;
    border-top: 1px solid var(--line);
    padding-top: 0.72rem;
}
.main-nav .nav-item:hover {
    background: var(--emerald-soft);
    color: var(--emerald-deep);
    text-decoration: none;
}
.main-nav .nav-item.active {
    background: var(--emerald-soft);
    color: var(--emerald-deep);
}
.main-nav .nav-ico {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--emerald);
    opacity: 0.85;
}
.main-nav .nav-item:hover .nav-ico,
.main-nav .nav-item.active .nav-ico { opacity: 1; }
.main-nav .nav-logout { color: var(--ink-soft); }
.main-nav .nav-logout .nav-ico { color: var(--error, #c0392b); }
.main-nav .nav-logout:hover { background: var(--error-bg, #fdecea); color: var(--error, #c0392b); }
.main-nav .nav-logout:hover .nav-ico { color: var(--error, #c0392b); }

/* Keep the masthead a single row on mobile (burger | brand | lang) */
.masthead-inner { flex-direction: row; }

/* ── Desktop (≥900px): inline nav, no burger ──
   The burger/backdrop/checkbox disappear and the same .main-nav items
   render as a horizontal row in the masthead. Flex `order` re-arranges
   the masthead from [burger | brand | lang] to [brand | links | lang].
   Everything below 900px keeps the dropdown behaviour untouched. */
@media (min-width: 900px) {
    .nav-toggle,
    .nav-burger,
    .nav-backdrop { display: none; }

    .masthead-inner > .brand { order: 1; }
    .nav-wrap { order: 2; display: flex; align-items: center; }
    .lang-switch { order: 3; }

    .main-nav,
    .nav-toggle:checked ~ .main-nav {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        flex-direction: row;
        gap: 0.15rem;
        padding: 0;
        width: auto;
        max-width: none;
        max-height: none;
        overflow: visible;
        background: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
        transition: none;
        z-index: auto;
    }
    .main-nav .nav-item { padding: 0.42rem 0.7rem; font-size: 0.9rem; }
    .main-nav .nav-item + .nav-item {
        margin-top: 0;
        border-top: none;
        padding-top: 0.42rem;
    }
    /* Text-only links on desktop; icons stay in the mobile dropdown */
    .main-nav .nav-ico { display: none; }
}

/* ── OTP resend block ──
   Visually separates "resend code" from OTP verification so the
   hCaptcha clearly belongs to the resend action, not the verify step. */
.otp-resend {
    margin-top: 1.75rem;
    padding-top: 1.1rem;
    border-top: 1px dashed var(--line-strong);
}
.otp-resend-hint {
    margin: 0 0 0.6rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink-soft);
}
