/* =============================================================
   Riapriamo il Planetario di Caserta - Stylesheet 2026
   Tema: astronomia notturna, dark + glassmorphism + accenti stellar
   ============================================================= */

:root {
    --bg-0: #050813;
    --bg-1: #0a0e1f;
    --bg-2: #131830;
    --surface: rgba(20, 26, 50, 0.65);
    --surface-2: rgba(30, 38, 70, 0.55);
    --border: rgba(129, 140, 248, 0.18);
    --border-strong: rgba(129, 140, 248, 0.35);

    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --accent: #818cf8;
    --accent-bright: #a5b4fc;
    --accent-cyan: #22d3ee;
    --accent-purple: #c084fc;
    --accent-gold: #fbbf24;

    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.12);
    --error: #f87171;
    --error-bg: rgba(248, 113, 113, 0.12);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.12);

    --radius: 14px;
    --radius-sm: 9px;
    --radius-lg: 20px;

    --shadow-glow: 0 0 60px rgba(129, 140, 248, 0.18);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35);

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
                    Georgia, serif;
    --font-mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

    --max-width: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background:
        radial-gradient(ellipse at 20% 0%, rgba(129, 140, 248, 0.10), transparent 50%),
        radial-gradient(ellipse at 80% 30%, rgba(192, 132, 252, 0.08), transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(34, 211, 238, 0.06), transparent 50%),
        var(--bg-0);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--accent-bright);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover { color: var(--accent-cyan); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }

ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }

strong { color: var(--text); font-weight: 700; }

/* ---------- Starfield (CSS puro, no JS) ---------- */
.starfield {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.starfield::before,
.starfield::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 25% 15%, #fff, transparent),
        radial-gradient(1px 1px at 50% 80%, #cbd5e1, transparent),
        radial-gradient(1px 1px at 75% 35%, #fff, transparent),
        radial-gradient(2px 2px at 15% 60%, #a5b4fc, transparent),
        radial-gradient(1px 1px at 85% 65%, #c4b5fd, transparent),
        radial-gradient(1px 1px at 40% 25%, #e0e7ff, transparent),
        radial-gradient(1px 1px at 65% 90%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 10% 40%, #a5f3fc, transparent),
        radial-gradient(1px 1px at 90% 10%, #fff, transparent),
        radial-gradient(1px 1px at 30% 70%, #c084fc, transparent);
    background-size: 600px 600px;
    background-repeat: repeat;
    opacity: 0.55;
    animation: twinkle 6s ease-in-out infinite alternate;
}
.starfield::after {
    background-size: 350px 350px;
    background-position: 80px 120px;
    opacity: 0.35;
    animation-duration: 9s;
    animation-delay: -2s;
}
@keyframes twinkle {
    0% { opacity: 0.25; }
    100% { opacity: 0.7; }
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(5, 8, 19, 0.78);
    border-bottom: 1px solid var(--border);
}
.site-header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    font-weight: 700;
}
.brand:hover { color: var(--accent-bright); }
.brand__logo {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 22px rgba(129, 140, 248, 0.45);
}
.brand__name {
    font-family: var(--font-display);
    font-size: 1.05rem;
}
.site-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.site-nav a {
    color: var(--text-muted);
    font-size: 0.95rem;
    padding: 0.35rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
.site-nav a:hover { color: var(--text); border-bottom-color: var(--accent); }
.site-nav__admin {
    font-size: 0.85rem;
    color: var(--text-dim);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.75rem !important;
}
.site-nav__admin:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Layout ---------- */
.page {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 5.5rem 1.25rem 3.5rem;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 24px;
    overflow: hidden;
    margin-top: 1.5rem;
}
.hero__bg {
    position: absolute;
    inset: 0;
    background-image: url('hero.jpg');
    background-size: cover;
    background-position: center;
    z-index: -2;
}
.hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(8, 12, 30, 0.45) 0%,
        rgba(8, 12, 30, 0.35) 50%,
        rgba(8, 12, 30, 0.70) 100%
    );
}
.hero__inner {
    position: relative;
    z-index: 1;
}
.hero__eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.25);
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    margin: 0 0 1.25rem;
}
.hero__title {
    background: linear-gradient(120deg, #f1f5f9 0%, #a5b4fc 45%, #22d3ee 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin: 0 0 1rem;
    text-shadow: 0 0 50px rgba(129, 140, 248, 0.3);
}
.hero__subtitle {
    font-size: 1.15rem;
    color: #f1f5f9;
    max-width: 620px;
    margin: 0 auto 2.5rem;
}

/* ---------- Counter ---------- */
.counter {
    margin: 2.5rem 0;
}
.counter__number {
    font-family: var(--font-mono);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(180deg, #fff, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    letter-spacing: -0.03em;
    text-shadow: 0 0 60px rgba(129, 140, 248, 0.5);
}
.counter__label {
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

/* ---------- Progress bar ---------- */
.progress {
    max-width: 540px;
    margin: 2rem auto 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 999px;
    height: 14px;
    position: relative;
    overflow: hidden;
}
.progress__bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-cyan));
    border-radius: 999px;
    transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 18px rgba(129, 140, 248, 0.5);
    position: relative;
}
.progress__bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    animation: shimmer 2.4s linear infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.progress__label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.6rem;
    font-family: var(--font-mono);
}

/* ---------- Content grid ---------- */
.content-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2.5rem;
    align-items: start;
    margin: 4rem 0 3rem;
}

/* ---------- Petition body ---------- */
.petition-body {
    padding: 2rem;
    background: var(--surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}
.petition-body h2 { margin-top: 0; }
.petition-body p, .petition-body li { color: var(--text); }
.petition-body ul { color: var(--text-muted); }
.petition-body ul li::marker { color: var(--accent); }

.petition-meta {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.92rem;
}
.petition-meta p { margin: 0 0 0.3rem; }

/* ---------- Sign form ---------- */
.sign-form-wrap {
    position: sticky;
    top: 90px;
}
.sign-form {
    padding: 1.75rem;
    background: linear-gradient(160deg, rgba(129, 140, 248, 0.10), rgba(34, 211, 238, 0.06));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glow), var(--shadow-card);
}
.sign-form__title {
    margin: 0 0 1.25rem;
    font-size: 1.4rem;
    color: var(--accent-bright);
}

/* ---------- Fields ---------- */
.field {
    margin-bottom: 1rem;
}
.field > label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.4rem;
    letter-spacing: 0.01em;
}
.field__hint {
    color: var(--text-dim);
    font-weight: 400;
    font-size: 0.8rem;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="password"],
.field textarea,
.field select {
    width: 100%;
    padding: 0.7rem 0.85rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: rgba(5, 8, 19, 0.5);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.field input::placeholder,
.field textarea::placeholder {
    color: var(--text-dim);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.18);
    background: rgba(5, 8, 19, 0.7);
}
.field textarea { resize: vertical; min-height: 80px; }

.field__error {
    display: block;
    color: var(--error);
    font-size: 0.82rem;
    margin-top: 0.35rem;
}

.field--checkbox { display: flex; align-items: flex-start; gap: 0.5rem; }
.field--checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0;
    cursor: pointer;
    line-height: 1.5;
}
.field--checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
    flex-shrink: 0;
}
.field--checkbox span { flex: 1; }
.field--checkbox a { color: var(--accent-bright); text-decoration: underline; }

.field--honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1.25rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s, border-color 0.15s, color 0.15s;
    line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: linear-gradient(120deg, var(--accent), var(--accent-cyan));
    color: #050813;
    box-shadow: 0 6px 20px rgba(129, 140, 248, 0.35);
}
.btn-primary:hover {
    box-shadow: 0 8px 28px rgba(129, 140, 248, 0.55);
    color: #050813;
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    color: var(--text);
}
.btn-danger {
    background: rgba(248, 113, 113, 0.15);
    color: var(--error);
    border-color: rgba(248, 113, 113, 0.4);
}
.btn-danger:hover {
    background: rgba(248, 113, 113, 0.25);
}
.btn-block { width: 100%; }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.82rem; }
.btn-disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ---------- Alerts ---------- */
.alert {
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-sm);
    border: 1px solid;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}
.alert ul { margin: 0; padding-left: 1.2rem; }
.alert-success {
    background: var(--success-bg);
    border-color: rgba(52, 211, 153, 0.35);
    color: var(--success);
}
.alert-error {
    background: var(--error-bg);
    border-color: rgba(248, 113, 113, 0.35);
    color: var(--error);
}
.alert-warning {
    background: var(--warning-bg);
    border-color: rgba(251, 191, 36, 0.35);
    color: var(--warning);
}

/* ---------- Recent signatures ---------- */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.section-head h2 { margin: 0; }
.link-arrow {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
}
.link-arrow:hover { color: var(--accent-cyan); }

.signature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.85rem;
}
.signature-list--full {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.signature-list__item {
    display: flex;
    gap: 0.85rem;
    padding: 1rem;
    background: var(--surface);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s, transform 0.15s;
}
.signature-list__item:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}
.signature-list__avatar {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
    color: #050813;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.05rem;
    text-transform: uppercase;
}
.signature-list__body { flex: 1; min-width: 0; }
.signature-list__name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}
.signature-list__comment {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    font-style: italic;
}
.signature-list__date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

/* ---------- Privacy box ---------- */
.privacy-box {
    margin: 4rem 0 2rem;
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.7;
}
.privacy-box h2 {
    color: var(--accent);
    font-size: 1.3rem;
    margin-top: 0;
}
.privacy-box p { margin: 0 0 0.85rem; }
.privacy-box strong { color: var(--text); }

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 1rem;
    flex-wrap: wrap;
}
.pagination__current {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.88rem;
}

/* ---------- Page head (firmatari) ---------- */
.page-head {
    text-align: center;
    margin: 2rem 0 3rem;
}
.page-head__subtitle {
    color: var(--text-muted);
    max-width: 640px;
    margin: 0.5rem auto 0;
}

/* ---------- Footer ---------- */
.site-footer {
    position: relative;
    z-index: 1;
    margin-top: 4rem;
    padding: 2.5rem 1.25rem;
    background: rgba(5, 8, 19, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
}
.site-footer__inner {
    max-width: var(--max-width);
    margin: 0 auto 2rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 2rem;
}
.site-footer__col h4 {
    color: var(--accent-bright);
    font-size: 0.95rem;
    margin: 0 0 0.85rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.site-footer__col p,
.site-footer__col ul { font-size: 0.85rem; color: var(--text-muted); }
.site-footer__col ul { list-style: none; padding: 0; }
.site-footer__col ul li { margin-bottom: 0.4rem; }
.site-footer__col a { color: var(--text-muted); }
.site-footer__col a:hover { color: var(--accent); }
.site-footer__bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dim);
    font-size: 0.8rem;
    font-family: var(--font-mono);
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* =============================================================
   ADMIN
   ============================================================= */
.admin-body { background: var(--bg-0); }

.admin-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(5, 8, 19, 0.85);
    border-bottom: 1px solid var(--border);
}
.admin-header__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.admin-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.admin-nav a {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0.35rem 0;
    border-bottom: 2px solid transparent;
}
.admin-nav a:hover { color: var(--text); border-bottom-color: var(--accent); }
.admin-nav__logout { color: var(--error) !important; }
.admin-user {
    color: var(--text-dim);
    font-size: 0.82rem;
    font-family: var(--font-mono);
}
.admin-user strong { color: var(--accent-bright); }

.admin-main {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

.admin-footer {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dim);
    font-size: 0.82rem;
    font-family: var(--font-mono);
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-section { margin-bottom: 2.5rem; }
.admin-section__subtitle {
    color: var(--text-muted);
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Admin search form */
.admin-search {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.admin-search__input {
    flex: 1;
    min-width: 200px;
    padding: 0.55rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
}
.admin-search__input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.18);
}
.admin-search__filter {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

/* Login card */
.login-card {
    max-width: 440px;
    margin: 3rem auto;
    padding: 2.5rem 2rem;
    background: var(--surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glow), var(--shadow-card);
    text-align: center;
}
.login-card h1 {
    font-size: 1.75rem;
    margin: 0 0 0.5rem;
    background: linear-gradient(120deg, #fff, var(--accent-bright));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.login-card__subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.75rem;
}

/* Admin forms */
.admin-form {
    max-width: 720px;
    text-align: left;
}
.admin-form .field { margin-bottom: 1.1rem; }
.admin-form textarea { font-family: var(--font-mono); font-size: 0.85rem; }

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}
.stat-card {
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: border-color 0.15s;
}
.stat-card:hover { border-color: var(--border-strong); }
.stat-card__value {
    font-family: var(--font-mono);
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--accent-bright);
    line-height: 1.1;
}
.stat-card__label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.4rem;
}

/* Admin table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    font-size: 0.85rem;
}
.admin-table th,
.admin-table td {
    padding: 0.7rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.admin-table th {
    background: rgba(129, 140, 248, 0.08);
    color: var(--accent-bright);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(129, 140, 248, 0.04); }
.admin-table__comment { color: var(--text-muted); max-width: 240px; }
.admin-table__actions { white-space: nowrap; }
.admin-table__empty {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem !important;
}
.admin-table td a { color: var(--accent-bright); }

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge--ok {
    background: rgba(52, 211, 153, 0.15);
    color: var(--success);
}
.badge--muted {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-muted);
}
.badge--warn {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

/* Mailing campaigns */
.mailing-subject { max-width: 260px; }
.mailing-form textarea {
    font-family: var(--font-body, inherit);
    line-height: 1.5;
}

/* Modalità test/live */
.mail-mode-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid;
    margin-bottom: 1.5rem;
}
.mail-mode-box p { margin: 0.35rem 0 0; color: var(--text-muted); font-size: 0.9rem; }
.mail-mode-box--test {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.35);
}
.mail-mode-box--test strong { color: #fbbf24; }
.mail-mode-box--live {
    background: rgba(52, 211, 153, 0.08);
    border-color: rgba(52, 211, 153, 0.35);
}
.mail-mode-box--live strong { color: var(--success); }
.badge--live {
    background: rgba(52, 211, 153, 0.15);
    color: var(--success);
}

/* Checklist verifica invio */
.mail-check-form { margin-bottom: 1rem; }
.mail-check-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: grid;
    gap: 0.4rem;
}
.mail-check-list__item {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-muted);
}
.mail-check-list__item.is-ok { border-color: rgba(52, 211, 153, 0.35); }
.mail-check-list__item.is-fail { border-color: rgba(239, 68, 68, 0.45); }
.mail-check-list__item.is-warn { border-color: rgba(245, 158, 11, 0.4); }
.mail-check-list__status { font-weight: 700; }
.mail-check-list__item.is-ok .mail-check-list__status { color: var(--success); }
.mail-check-list__item.is-fail .mail-check-list__status { color: var(--error); }
.mail-check-list__item.is-warn .mail-check-list__status { color: #fbbf24; }
.mail-check-list__label { color: var(--text); font-weight: 600; }

.badge--danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}
.is-active-filter { border-color: var(--accent) !important; }

/* Selezione destinatari dalla lista firme */
.mail-selected-form { margin-top: 1rem; }
.alert-info {
    background: rgba(129, 140, 248, 0.1);
    border: 1px solid rgba(129, 140, 248, 0.35);
    color: var(--text);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.alert-info a { color: var(--accent-bright); }
input[type="checkbox"] { accent-color: var(--accent); }

.inline-form {
    display: inline;
    margin-left: 0.35rem;
}

.admin-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0 1.5rem;
}

.admin-dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.4rem 1.25rem;
    font-size: 0.88rem;
    margin: 0;
}
.admin-dl dt {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.admin-dl dd { margin: 0; color: var(--text); }

/* Setup page */
.setup-header {
    text-align: center;
    margin: 3rem 0 2rem;
}
.setup-header h1 {
    background: linear-gradient(120deg, #fff, var(--accent-bright));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.setup-header .subtitle { color: var(--text-muted); }
.container {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
}
.card {
    padding: 2rem;
    background: var(--surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}
.card h2 { margin-top: 0; color: var(--accent-bright); }
.checks {
    list-style: none;
    padding: 0;
    margin: 1rem 0 1.5rem;
}
.checks li {
    padding: 0.5rem 0.85rem;
    margin-bottom: 0.4rem;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.04);
    border-left: 3px solid;
    font-family: var(--font-mono);
    font-size: 0.88rem;
}
.checks li.ok { border-color: var(--success); color: var(--success); }
.checks li.fail { border-color: var(--error); color: var(--error); }
.warning {
    color: var(--warning);
    background: var(--warning-bg);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(251, 191, 36, 0.3);
    font-size: 0.9rem;
    display: block;
    margin: 1rem 0;
}
.warning code { font-family: var(--font-mono); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    .sign-form-wrap {
        position: static;
    }
    .site-footer__inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .site-header__inner { flex-direction: column; align-items: flex-start; }
    .site-nav { gap: 1rem; }
    .hero { padding: 2.5rem 1rem 2rem; }
    .petition-body,
    .privacy-box,
    .sign-form { padding: 1.25rem; }
    .signature-list,
    .signature-list--full {
        grid-template-columns: 1fr;
    }
    .admin-table { font-size: 0.78rem; }
    .admin-table th,
    .admin-table td { padding: 0.5rem 0.55rem; }
    .admin-table__comment { max-width: 140px; }
    .admin-header__inner { flex-direction: column; align-items: flex-start; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-dl { grid-template-columns: 1fr; }
    .admin-dl dt { margin-top: 0.5rem; }
}

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .progress__bar::after { display: none; }
}

:focus-visible {
    outline: 2px solid var(--accent);
    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;
}
