/* ===============================
   AUTH PAGES — Genesi
   Stile coerente con l'app principale.
   NON modifica style.css.
   =============================== */

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

:root {
    --bg: #0c0c14;
    --card-bg: rgba(17, 17, 25, 0.9);
    --text: #fff;
    --text-muted: rgba(180, 180, 195, 0.6);
    --accent: #00e5ff;
    --accent-dim: rgba(0, 229, 255, 0.15);
    --error: #ff4d6a;
    --success: #00e676;
    --border: rgba(255, 255, 255, 0.08);
    --radius: 10px;
}

html, body {
    height: 100%;
    overflow: auto;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 50% 40% at 50% 30%, rgba(30, 30, 50, 0.3) 0%, transparent 70%),
        radial-gradient(ellipse 30% 50% at 20% 80%, rgba(0, 229, 255, 0.03) 0%, transparent 60%);
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 32px;
    backdrop-filter: blur(12px);
}

.auth-card h1 {
    font-size: 22px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 8px;
    text-align: center;
}

.auth-card .subtitle {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.5;
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.field input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.field input:focus {
    border-color: var(--accent);
}

.field input::placeholder {
    color: var(--text-muted);
}

.btn {
    display: block;
    width: 100%;
    padding: 13px;
    background: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: opacity 0.2s;
}

.btn:hover {
    opacity: 0.9;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn--secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    margin-top: 16px;
}

.btn--secondary:hover {
    background: var(--accent-dim);
}

.msg {
    margin-top: 16px;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    line-height: 1.5;
    display: none;
}

.msg.error {
    display: block;
    background: rgba(255, 77, 106, 0.1);
    border: 1px solid rgba(255, 77, 106, 0.3);
    color: var(--error);
}

.msg.success {
    display: block;
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid rgba(0, 230, 118, 0.3);
    color: var(--success);
}

.msg.loading {
    display: block;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
}

.links {
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
}

.links a {
    color: var(--accent);
    text-decoration: none;
    opacity: 0.8;
}

.links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.links span {
    color: var(--text-muted);
    margin: 0 6px;
}

/* Admin page */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 24px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
}

.stat-card .value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
}

.stat-card .label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 28px 20px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
