/* Aniclo Spaziale — stile pagine di gestione (dashboard, login, registrazione, elenco scene) */

:root {
    --bg: #F7F8FA;
    --surface: #FFFFFF;
    --ink: #1A1B23;
    --muted: #6B7280;
    --border: #E5E7EB;
    --accent: #5B5CE0;
    --accent-hover: #4A4BCC;
    --accent-soft: #EEEEFC;
    --success: #16A34A;
    --success-soft: #EFFDF3;
    --danger: #DC2626;
    --danger-soft: #FEF2F2;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(20,20,40,0.04), 0 4px 16px rgba(20,20,40,0.06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

h1, h2, h3 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Barra superiore (dashboard, elenco scene) ---------- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 32px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.topbar-brand img { height: 42px; width: auto; object-fit: contain; }
.topbar-brand span { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 16px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-back { font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.topbar-back:hover { color: var(--ink); text-decoration: none; }

.page {
    max-width: 880px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.page-header h1 { font-size: 26px; }
.page-header p.subtitle { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- Bottoni ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-text { background: none; color: var(--muted); padding: 9px 6px; }
.btn-text:hover { color: var(--ink); }
.btn-danger-text { background: none; color: var(--danger); padding: 4px 6px; font-size: 13px; }
.btn-danger-text:hover { text-decoration: underline; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Card generica ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ---------- Elenco tour (dashboard) ---------- */
.tour-list { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.tour-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s;
}
.tour-row:hover { border-color: #D3D4F5; }
.tour-row-title { font-weight: 600; font-size: 15px; }
.tour-row-meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.tour-row-actions { display: flex; align-items: center; gap: 14px; font-size: 13.5px; flex-shrink: 0; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    margin-top: 24px;
    font-size: 14px;
}

/* ---------- Elenco scene (tour.php) ---------- */
.scene-list { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.scene-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s;
}
.scene-row:hover { border-color: #D3D4F5; }
.scene-row img {
    width: 130px; height: 68px; object-fit: cover; border-radius: 7px; background: var(--bg); flex-shrink: 0;
}
.scene-row-info { flex: 1; min-width: 0; }
.scene-row-title { font-weight: 600; font-size: 14.5px; }
.scene-row-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; margin-top: 6px; }

/* ---------- Avvisi ---------- */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 20px; }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-error { background: var(--danger-soft); color: var(--danger); }

/* ---------- Auth (login / registrazione) ---------- */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.auth-card {
    width: 100%;
    max-width: 380px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 36px 32px;
    position: relative;
    overflow: hidden;
}
.auth-logo-wrap {
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 22px;
}
.auth-logo-wrap img { max-width: 190px; max-height: 56px; width: auto; height: auto; object-fit: contain; }

.auth-card h1 { font-size: 21px; text-align: center; }
.auth-card p.auth-sub { text-align: center; color: var(--muted); font-size: 13.5px; margin: 6px 0 24px; }

.field { margin-top: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--ink); }
.field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    transition: border-color 0.15s, background 0.15s;
}
.field input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface);
}

.auth-submit { margin-top: 22px; }

.auth-separator {
    display: flex; align-items: center; gap: 10px;
    margin: 22px 0;
    color: var(--muted); font-size: 12.5px;
}
.auth-separator::before, .auth-separator::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}

.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}
.btn-google:hover { border-color: #C6C7F0; background: var(--accent-soft); text-decoration: none; }
.btn-google svg { flex-shrink: 0; }

.auth-footer { text-align: center; margin-top: 22px; font-size: 13.5px; color: var(--muted); }

/* ---------- Selettore lingua ---------- */
.lang-switch { display: flex; gap: 2px; }
.lang-switch-item {
    padding: 5px 9px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--muted);
    text-decoration: none;
}
.lang-switch-item:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.lang-switch-item.active { background: var(--accent-soft); color: var(--accent); }
.auth-card .lang-switch { justify-content: center; margin-top: 20px; }