/**
 * ═══════════════════════════════════════════════════════════════════════════
 * BRITANNIA — BASE STYLES
 * Palette: design guide ufficiale Britannia 80 a.C.
 * ═══════════════════════════════════════════════════════════════════════════
 */

/* @import MUST come before all rules — W3C CSS spec */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Cinzel+Decorative:wght@400;700&family=Lato:wght@300;400;700&family=EB+Garamond:wght@400;500;700&display=swap');

/* Perry Gothic — Font locale elegante */
@font-face {
    font-family: 'Perry Gothic';
    src: url('../fonts/perry-gothic.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Berry Rotunda — Font rotonda medievale per drop cap */
@font-face {
    font-family: 'Berry Rotunda';
    src: url('../fonts/berry-rotunda.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ═══ RESET & FONTS ═══ */

/* Anti-overflow mobile globale */
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

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

img,
canvas,
svg {
    max-width: 100%;
}

:root {
    /* ─── PALETTE UFFICIALE BRITANNIA ────────────────────── */
    --ds-ocra:       #C49E54;   /* OCRA — accento primario */
    --ds-ocra-dark:  #8a6e1c;
    --ds-ocra-light: #d4b868;
    --ds-verde:      #4C7258;   /* VERDE MUSCHIO */
    --ds-verde-s:    #81997D;   /* VERDE SALVIA */
    --ds-acqua:      #74A4A9;   /* VERDE ACQUA */
    --ds-pietra:     #496C7B;   /* BLU PIETRA */
    --ds-ardesia:    #333D42;   /* ARDESIA */
    --ds-terra:      #D6C9A2;   /* TERRA CHIARA */
    --ds-terra-s:    #D6C9A2;   /* alias */
    --ds-grigio:     #838889;   /* GRIGIO PIETRA */
    --ds-lichene:    #ECEFEB;   /* BIANCO LICHENE */
    --ds-cuoio:      #7a4e2d;   /* CUOIO */

    /* ─── MAPPING sui vecchi nomi (usati in tutto il codebase) ── */
    --gold:          #C49E54;   /* ← OCRA dal design guide */
    --gold-dark:     #8a6e1c;
    --gold-light:    #d4b868;

    /* ─── SFONDI — BIANCO LICHENE (design guide) ────────── */
    --bg-primary:    #ECEFEB;   /* BIANCO LICHENE — sfondo generale */
    --bg-secondary:  #ffffff;   /* pannelli principali */
    --bg-tertiary:   #dde2db;   /* pannelli secondari / hover */
    --bg-panel:      rgba(236, 239, 235, 0.97);

    /* ─── VERDE ──────────────────────────────────────────── */
    --teal:          #4C7258;
    --teal-light:    #5c8a6a;
    --teal-dim:      rgba(76,114,88,0.18);

    /* ─── TESTI — ARDESIA scuro su sfondo chiaro ─────────── */
    --text-primary:   #333D42;   /* ARDESIA — testo principale */
    --text-secondary: #5E6B4D;   /* TERRA UMIDA — testo secondario */
    --text-muted:     #838889;   /* GRIGIO PIETRA — muted */

    /* ─── PERGAMENA (pannelli caldi) ─────────────────────── */
    --parchment:        #D6C9A2;
    --parchment-light:  #e8dfc8;
    --parchment-dark:   #b8a888;
    --parchment-text:   #1a1208;
    --parchment-muted:  #6a5038;
    --parchment-border: #8a7050;

    /* ─── BORDI ──────────────────────────────────────────── */
    --border-color:  rgba(131,136,137,0.30);   /* GRIGIO PIETRA */
    --border-accent: #C49E54;

    /* ─── STATUS ─────────────────────────────────────────── */
    --red:    #c0392b;
    --green:  #4C7258;
    --blue:   #496C7B;
    --purple: #7a4e8e;
    --orange: #c87020;
    --yellow: #C49E54;
    --gray:   #838889;

    /* ─── FONT ───────────────────────────────────────────── */
    --font-title:   'Cinzel', serif;
    --font-display: 'Cinzel Decorative', serif;
    --font-body:    'Lato', sans-serif;
    --font-elegant: 'Perry Gothic', serif;

    /* ─── SPAZIATURA ─────────────────────────────────────── */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
    --spacing-xl: 50px;

    /* ─── OMBRE ──────────────────────────────────────────── */
    --shadow-sm:   0 2px 8px rgba(0,0,0,0.5);
    --shadow-md:   0 5px 20px rgba(0,0,0,0.65);
    --shadow-lg:   0 10px 40px rgba(0,0,0,0.85);
    --shadow-gold: 0 0 20px rgba(196,158,84,0.32);

    /* ─── TEXTURE: SVG noise ─────────────────────────────── */
    --noise-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");

    /* ─── FILIGRANA celtica ──────────────────────────────── */
    --watermark-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cdefs%3E%3ClinearGradient id='wg' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:rgba(196,158,84,0.04);stop-opacity:1' /%3E%3Cstop offset='50%25' style='stop-color:rgba(196,158,84,0.02);stop-opacity:1' /%3E%3Cstop offset='100%25' style='stop-color:rgba(196,158,84,0.04);stop-opacity:1' /%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23wg)'/%3E%3Ccircle cx='50' cy='50' r='60' fill='none' stroke='rgba(196,158,84,0.03)' stroke-width='1'/%3E%3Ccircle cx='350' cy='350' r='70' fill='none' stroke='rgba(196,158,84,0.02)' stroke-width='1'/%3E%3Ccircle cx='350' cy='50' r='50' fill='none' stroke='rgba(76,114,88,0.025)' stroke-width='0.5'/%3E%3Ccircle cx='50' cy='350' r='55' fill='none' stroke='rgba(76,114,88,0.025)' stroke-width='0.5'/%3E%3C/svg%3E");
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);   /* #ECEFEB bianco lichene */
    color: var(--text-primary);       /* #333D42 ardesia */
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: var(--watermark-svg);
    background-repeat: repeat;
    background-attachment: fixed;
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
}

/* ═══ TYPOGRAPHY ═══ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 1px;
}

h1 { font-size: 2.5em; color: var(--ds-verde); }
h2 { font-size: 2em;   color: var(--gold); }
h3 { font-size: 1.5em; color: var(--text-primary); }
h4 { font-size: 1.2em; color: var(--text-secondary); }

p { margin-bottom: var(--spacing-sm); }

a { color: var(--gold); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--gold-light); }

/* ═══════════════════════════════════════════════════════════════════════════
   PULSANTI CELTIC — usabili su tutte le pagine
   4 bracket marks negli angoli via background-image gradients
   ═══════════════════════════════════════════════════════════════════════════ */

/* Mixin angoli Celtic — applica su qualsiasi selettore */
@mixin celtic-corners(
    $size: 10px,
    $thickness: 2px,
    $offset: 5px,
    $color: rgba(255,255,255,0.52)
) { /* sass non disponibile — usare classi helper */ }

.btn-celta {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 26px;
    color: #ECEFEB;
    font-family: var(--font-title);
    font-size: 0.82em;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.2);
    transition: filter 0.2s, transform 0.15s, border-color 0.2s;
    background-color: var(--bc, #4C7258);
    background-image:
        /* TL H */ linear-gradient(rgba(255,255,255,0.52), rgba(255,255,255,0.52)),
        /* TL V */ linear-gradient(rgba(255,255,255,0.52), rgba(255,255,255,0.52)),
        /* TR H */ linear-gradient(rgba(255,255,255,0.52), rgba(255,255,255,0.52)),
        /* TR V */ linear-gradient(rgba(255,255,255,0.52), rgba(255,255,255,0.52)),
        /* BL H */ linear-gradient(rgba(255,255,255,0.52), rgba(255,255,255,0.52)),
        /* BL V */ linear-gradient(rgba(255,255,255,0.52), rgba(255,255,255,0.52)),
        /* BR H */ linear-gradient(rgba(255,255,255,0.52), rgba(255,255,255,0.52)),
        /* BR V */ linear-gradient(rgba(255,255,255,0.52), rgba(255,255,255,0.52)),
        /* bevel */ linear-gradient(160deg, rgba(255,255,255,0.09) 0%, transparent 55%);
    background-size:
        12px 2px, 2px 12px,
        12px 2px, 2px 12px,
        12px 2px, 2px 12px,
        12px 2px, 2px 12px,
        100% 100%;
    background-position:
        5px 5px,                            /* TL H */
        5px 5px,                            /* TL V */
        calc(100% - 17px) 5px,              /* TR H */
        calc(100% - 7px)  5px,              /* TR V */
        5px calc(100% - 7px),               /* BL H */
        5px calc(100% - 17px),              /* BL V */
        calc(100% - 17px) calc(100% - 7px), /* BR H */
        calc(100% - 7px)  calc(100% - 17px);/* BR V */
    background-repeat: no-repeat;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), inset 0 -1px 0 rgba(0,0,0,0.22);
}
.btn-celta:hover  { filter: brightness(1.15); transform: translateY(-1px); border-color: rgba(255,255,255,0.42); }
.btn-celta:active { filter: brightness(0.9); transform: translateY(0); }

/* Varianti */
.btn-celta--verde  { --bc: #4C7258; }
.btn-celta--acqua  { --bc: #496C7B; }
.btn-celta--ocra   { --bc: #9a7832; color: #1a1000; }
.btn-celta--cuoio  { --bc: #7a4e2d; }
.btn-celta--scuro  { --bc: #2a3830; }
.btn-celta--danger { --bc: #7a2828; }
.btn-celta--sm     { padding: 7px 16px; font-size: 0.74em; letter-spacing: 1.5px; }
.btn-celta--lg     { padding: 13px 34px; font-size: 0.9em; }
.btn-celta--full   { width: 100%; justify-content: center; }

/* ═══ BOTTONI LEGACY (usano ora palette aggiornata) ═══ */
.btn {
    font-family: var(--font-title);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 11px 28px;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.25s;
    display: inline-block;
    text-align: center;
    border-radius: 3px;
    background: transparent;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 100%);
    color: #1a1000;
    border-color: var(--gold);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: var(--shadow-gold); }

.btn-outline {
    background: transparent;
    color: var(--gold);
    border-color: var(--gold);
}
.btn-outline:hover { background: rgba(196,158,84,0.12); color: var(--gold-light); }

.btn-outline-full {
    width: 100%;
    padding: 15px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font-title);
    font-size: 1em;
    transition: all 0.25s;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.btn-outline-full:hover { background: rgba(196,158,84,0.06); transform: translateX(4px); border-color: var(--gold); }
.btn-outline-full.gold  { border-color: var(--gold); color: var(--gold); }
.btn-outline-full.red   { border-color: var(--red); color: var(--red); }

.btn-mini {
    padding: 6px 12px;
    font-size: 0.8em;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body);
    border-radius: 3px;
}
.btn-mini:hover { background: var(--bg-tertiary); color: var(--gold); border-color: var(--border-accent); }

.btn-mini-gold {
    padding: 7px 16px;
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    cursor: pointer;
    font-family: var(--font-title);
    font-size: 0.82em;
    letter-spacing: 1px;
    transition: all 0.25s;
    border-radius: 3px;
}
.btn-mini-gold:hover { background: rgba(196,158,84,0.14); box-shadow: var(--shadow-gold); }

.btn-danger { border-color: var(--red) !important; color: var(--red) !important; }
.btn-danger:hover { background: rgba(192,57,43,0.15) !important; }

.btn-main {
    background: linear-gradient(135deg, #4C7258, #3d5c47);
    color: #ECEFEB;
    border: 1px solid rgba(76,114,88,0.5);
    padding: 10px 22px;
    font-family: var(--font-title);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 3px;
}
.btn-main:hover { filter: brightness(1.15); transform: translateY(-2px); box-shadow: 0 4px 14px rgba(76,114,88,0.35); }

/* ═══ INPUTS ═══ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1em;
    transition: all 0.3s;
    border-radius: 3px;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--ds-verde);
    box-shadow: 0 0 8px rgba(76,114,88,0.22);
}
textarea { resize: vertical; min-height: 100px; }

.input-dark-full {
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px;
    width: 100%;
    margin-bottom: 10px;
    border-radius: 3px;
}
.input-dark {
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px;
    border-radius: 3px;
}

/* ═══ PANELS & CARDS ═══ */
.panel {
    --text-primary:   #1a1208;
    --text-secondary: #5a3a18;
    --text-muted:     #8a7050;
    --border-color:   #8a7050;
    background-color: #D6C9A2;
    background-image:
        var(--noise-svg),
        radial-gradient(ellipse at 12% 88%, rgba(120,80,30,0.18) 0%, transparent 45%),
        linear-gradient(148deg, #e8dfc8 0%, #cebf9c 55%, #d8c8a4 100%);
    border: 1px solid #8a7050;
    padding: var(--spacing-md);
    border-radius: 5px;
    color: #1a1208;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
    position: relative;
    z-index: 1;
}

.admin-card,
.faction-card {
    background: #ffffff;
    background-image: var(--noise-svg);
    border: 1px solid var(--border-color);
    border-top: 2px solid var(--ds-verde);
    padding: var(--spacing-md);
    transition: all 0.3s;
    border-radius: 4px;
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(51,61,66,0.1);
    position: relative;
    z-index: 1;
}
.admin-card:hover {
    border-top-color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(51,61,66,0.15);
}

/* ═══ MODALS ═══ */
.modal-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.88);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
    perspective: 1200px;
    transform-style: preserve-3d;
}

/* ═══ TABLES ═══ */
table { width: 100%; border-collapse: collapse; }
table thead { background: var(--bg-tertiary); border-bottom: 2px solid var(--gold); }
table th { padding: 12px; text-align: left; font-family: var(--font-title); color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 0.9em; }
table td { padding: 10px 12px; border-bottom: 1px solid var(--border-color); }
table tr:hover { background: var(--bg-tertiary); }

/* ═══ BADGES & TAGS ═══ */
.badge { display: inline-block; padding: 4px 10px; background: var(--bg-tertiary); border: 1px solid var(--ds-verde); color: var(--ds-verde); font-size: 0.8em; font-family: var(--font-title); text-transform: uppercase; letter-spacing: 1px; border-radius: 3px; }
.tag-badge { background: var(--bg-tertiary); padding: 2px 6px; border-radius: 3px; font-family: var(--font-title); font-size: 0.7em; letter-spacing: 1px; }
.tag-banned { background: rgba(192,57,43,0.1); color: var(--red); border-color: var(--red); }

/* ═══ SCROLLBAR ═══ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-tertiary); }
::-webkit-scrollbar-thumb { background: #b8bdb6; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--ds-verde); }

/* ═══════════════════════════════════════════════════════════════════════════
   TEXTURE CSS — LEGNO & PERGAMENA
   ═══════════════════════════════════════════════════════════════════════════ */

.texture-parchment,
.panel-light {
    --text-primary:   #1a1208;
    --text-secondary: #5a3a18;
    --text-muted:     #8a7050;
    --border-color:   #8a7050;
    --bg-secondary:   rgba(180,155,110,0.25);
    background-color: #D6C9A2;
    background-image:
        var(--noise-svg),
        radial-gradient(ellipse at 12% 88%, rgba(120,80,30,0.20) 0%, transparent 45%),
        radial-gradient(ellipse at 88% 12%, rgba(100,65,20,0.14) 0%, transparent 45%),
        linear-gradient(148deg, #e8dfc8 0%, #cebf9c 50%, #d8c8a4 100%);
    color: #1a1208;
    border: 1px solid #8a7050;
}

.texture-wood {
    background-color: #3a220c;
    background-image:
        repeating-linear-gradient(91deg,
            transparent 0px, transparent 2px,
            rgba(0,0,0,0.05) 2px, rgba(0,0,0,0.05) 3px,
            transparent 3px, transparent 9px,
            rgba(255,220,140,0.018) 9px, rgba(255,220,140,0.018) 10px,
            transparent 10px, transparent 20px),
        repeating-linear-gradient(180deg,
            transparent 0px, transparent 55px,
            rgba(0,0,0,0.04) 55px, rgba(0,0,0,0.04) 57px,
            transparent 57px, transparent 110px),
        linear-gradient(180deg, #5a3818 0%, #3d2610 28%, #2c1a09 58%, #3a2410 80%, #4a2e14 100%);
}

.frame-carved {
    border: 3px solid #5c3a18;
    box-shadow:
        inset 0 0 0 1px rgba(196,158,84,0.20),
        inset 2px 2px 5px rgba(0,0,0,0.55),
        inset -1px -1px 2px rgba(255,200,100,0.06),
        0 6px 20px rgba(0,0,0,0.75),
        0 1px 0 rgba(196,158,84,0.14);
}

.panel-parchment {
    --text-primary:   #1a1208;
    --text-secondary: #5a3a18;
    --text-muted:     #8a7050;
    --border-color:   #8a7050;
    --bg-secondary:   rgba(180,155,110,0.25);
    background-color: #D6C9A2;
    background-image:
        var(--noise-svg),
        radial-gradient(ellipse at 12% 88%, rgba(120,80,30,0.20) 0%, transparent 45%),
        radial-gradient(ellipse at 88% 12%, rgba(100,65,20,0.14) 0%, transparent 45%),
        linear-gradient(148deg, #e8dfc8 0%, #cebf9c 50%, #d8c8a4 100%);
    border: 1px solid #8a7050;
    box-shadow:
        inset 0 0 0 1px rgba(196,158,84,0.15),
        inset 0 1px 0 rgba(255,255,255,0.4),
        0 8px 24px rgba(0,0,0,0.5);
    color: #1a1208;
    position: relative;
    z-index: 1;
}

.texture-linen {
    background-color: #1e2a30;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.018) 2px, rgba(255,255,255,0.018) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,0.018) 2px, rgba(255,255,255,0.018) 4px),
        var(--noise-svg);
}

.texture-paper {
    background-color: #1e2a30;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.04) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.03) 2px, transparent 2px),
        var(--noise-svg);
    background-size: 50px 50px, 80px 80px, 200px 200px;
}

.texture-darkwood {
    background-color: #0d1a20;
    background-image:
        repeating-linear-gradient(90deg, transparent 0px, transparent 2px, rgba(196,158,84,0.025) 2px, rgba(196,158,84,0.025) 4px),
        repeating-linear-gradient(180deg, transparent 0px, transparent 30px, rgba(0,0,0,0.1) 30px, rgba(0,0,0,0.1) 32px),
        var(--noise-svg);
}

/* ═══════════════════════════════════════════════════════════════════════════
   GERARCHIA VISIVA
   ═══════════════════════════════════════════════════════════════════════════ */

.faction-name { position: relative; display: inline-block; }
.faction-name::first-letter { font-size: 1.8em; font-weight: 700; color: var(--gold); font-family: var(--font-title); line-height: 0.8; vertical-align: -0.2em; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.card-textured { background-image: var(--noise-svg), linear-gradient(135deg, rgba(255,255,255,0.02) 0%, transparent 50%, rgba(0,0,0,0.08) 100%); }

/* ═══ UTILITY ═══ */
.text-center { text-align: center; }
.text-gold   { color: var(--gold); }
.text-red    { color: var(--red); }
.text-green  { color: var(--ds-verde); }
.text-blue   { color: var(--ds-pietra); }
.text-muted  { color: var(--text-muted); }
.text-primary { color: var(--text-primary); }
.mt-10 { margin-top: 10px; }   .mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }.mb-20 { margin-bottom: 20px; }
.ml-10 { margin-left: 10px; }  .mr-10 { margin-right: 10px; }
.p-10  { padding: 10px; }      .p-20  { padding: 20px; }
.hidden  { display: none !important; }
.visible { display: block !important; }

/* ═══ DIVIDERS ═══ */
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); margin: var(--spacing-md) 0; }

/* ═══ ANIMATIONS ═══ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.5s ease-out; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}
.pulse { animation: pulse 2s infinite; }

@keyframes slideInRight  { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes slideOutRight { from { transform: translateX(0); }    to { transform: translateX(100%); } }

/* ═══ GRIDS ═══ */
.admin-grid  { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--spacing-md); }
.cards-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--spacing-sm); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
    h1 { font-size: 1.8em; }
    h2 { font-size: 1.5em; }
    h3 { font-size: 1.3em; }
    .btn { padding: 10px 20px; font-size: 0.9em; }
    .admin-grid, .cards-grid { grid-template-columns: 1fr; }
}

/* ═══ SPINNER ═══ */
.spinner { border: 3px solid var(--border-color); border-top: 3px solid var(--ds-verde); border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 20px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ═══ ALERTS ═══ */
.alert { padding: 15px; border-left: 4px solid; margin-bottom: var(--spacing-md); border-radius: 4px; }
.alert-info    { background: rgba(73,108,123,0.1);  border-color: var(--ds-pietra); color: var(--ds-pietra); }
.alert-warning { background: rgba(196,158,84,0.1);  border-color: var(--gold);     color: var(--gold); }
.alert-danger  { background: rgba(192,57,43,0.1);   border-color: var(--red);      color: var(--red); }
.alert-success { background: rgba(76,114,88,0.1);   border-color: var(--ds-verde); color: var(--ds-verde); }
