/* ===== BASE ===== */
body{
    margin:0;
    font-family: "Segoe UI", Arial, sans-serif;
    background:#f5f7fa;
    color:#2c3e50;
    font-size:15px;
}

/* ===== HEADER ===== */
.header{
    background:#1f2937;
    color:white;
    padding:16px;
    text-align:center;
    font-size:22px;
    font-weight:600;
}

/* ===== MENU ===== */
.menu{
    display:flex;
    justify-content:center;
    gap:12px;
    background:white;
    padding:10px;
    border-bottom:1px solid #e5e7eb;
}

.menu a{
    color:#374151;
    padding:8px 14px;
    border-radius:6px;
    text-decoration:none;
    font-size:14px;
    transition:0.2s;
}

.menu a:hover{
    background:#f3f4f6;
}

.menu a.active{
    background:#2563eb;
    color:white;
}

/* ===== CARD ===== */
.card{
    background:white;
    margin:20px;
    padding:20px;
    border-radius:12px;
    box-shadow:0 2px 8px rgba(0,0,0,0.05);
}

/* ===== DASHBOARD ===== */
.dashboard{
    display:flex;
    gap:15px;
    flex-wrap:wrap;
}

.box{
    flex:1;
    min-width:160px;
    padding:16px;
    border-radius:10px;
    background:white;
    border:1px solid #e5e7eb;
    text-align:center;
}

.box h2{
    margin:0;
    font-size:26px;
    color:#111827;
}

.box p{
    margin-top:6px;
    font-size:14px;
    color:#6b7280;
}

/* colori soft */
.box-blue{ border-left:4px solid #3b82f6; }
.box-green{ border-left:4px solid #10b981; }
.box-red{ border-left:4px solid #ef4444; }
.box-orange{ border-left:4px solid #f59e0b; }

/* ===== BOTTONI ===== */
.btn{
    background:#2563eb;
    color:white;
    padding:8px 14px;
    border:none;
    border-radius:6px;
    cursor:pointer;
    text-decoration:none;
    font-size:14px;
}

.btn:hover{
    background:#1d4ed8;
}

.btn-small{
    padding:5px 10px;
    font-size:13px;
}

/* ===== FORM ===== */
input, textarea{
    width:100%;
    padding:10px;
    border-radius:6px;
    border:1px solid #d1d5db;
    font-size:14px;
    margin-top:5px;
    margin-bottom:10px;
}

textarea{
    resize:vertical;
}

/* ===== GRID ===== */
.grid-2{
    display:flex;
    gap:20px;
    flex-wrap:wrap;
}

.grid-box{
    flex:1;
    min-width:300px;
}

/* ===== TABELLE ===== */
table{
    width:100%;
    border-collapse:collapse;
    margin-top:10px;
    font-size:14px;
}

th{
    background:#f3f4f6;
    color:#374151;
    padding:10px;
    text-align:center;
    font-weight:600;
}

td{
    padding:10px;
    text-align:center;
}

tr:nth-child(even){
    background:#f9fafb;
}

/* ===== COMPLEANNI UX ===== */
.highlight-today{
    background:#d1fae5 !important;
    font-weight:bold;
}

.highlight-soon{
    background:#fef3c7 !important;
}

/* ===== INATTIVO ===== */
.tr-inattivo{
    background:#e5e7eb !important;
    color:#6b7280;
}

/* ===== TITOLI ===== */
h3{
    margin-bottom:10px;
    font-size:17px;
    font-weight:600;
}

/* ===== LOGIN ===== */
.login-page{
    display:flex;
    justify-content:center;
    align-items:center;
    height:100vh;
    background:#f5f7fa;
}

.login-container{
    text-align:center;
}

.login-logo{
    width:120px;
    margin-bottom:10px;
}

.login-title{
    font-size:24px;
    font-weight:600;
    margin-bottom:20px;
    color:#1f2937;
}

.login-box{
    background:white;
    padding:25px 30px;
    border-radius:12px;
    box-shadow:0 4px 15px rgba(0,0,0,0.08);
    width:320px;
    margin:auto;
}

.login-box input{
    width:100%;
    padding:10px;
    margin-bottom:12px;
    font-size:14px;
}

/* ===== ERRORI ===== */
.error{
    color:#ef4444;
    margin-bottom:10px;
}
/* ===== SIDEBAR FIX DEFINITIVO ===== */
.sidebar{
    position:fixed;
    left:0;
    top:0;
    width:230px;
    height:100vh;
    background:#1f2937;
    color:white;
    padding:15px;
    display:flex;
    flex-direction:column;
    z-index:1000;
}

.sidebar-logo{
    text-align:center;
    margin-bottom:20px;
}

.sidebar-logo img{
    width:80px;
}

.sidebar-section{
    display:flex;
    flex-direction:column;
    gap:6px;
    margin-bottom:15px;
}

.sidebar a{
    display:block;
    color:#d1d5db;
    text-decoration:none;
    padding:8px 10px;
    border-radius:6px;
    font-size:14px;
}

.sidebar a:hover{
    background:#374151;
}

.sidebar a.active{
    background:#2563eb;
    color:white;
}

.sidebar-title{
    font-size:12px;
    color:#9ca3af;
    margin:10px 0 5px;
}

.sidebar-bottom{
    margin-top:auto;
}

/* CONTENUTO A DESTRA */
.main-content{
    margin-left:230px;
    padding:10px;
}
/* ===== FIX LAYOUT SIDEBAR ===== */

/* elimina margini strani */
body{
    margin:0;
}

/* header allineato perfetto */
.header{
    margin:0;
    border-radius:0;
}

/* contenuto attaccato */
.main-content{
    margin-left:230px;
    padding:0;
}

/* card con margine corretto */
.card{
    margin:20px;
}

/* sidebar piena senza stacco */
.sidebar{
    background:#2f3542; /* grigio professionale */
}

/* hover più elegante */
.sidebar a:hover{
    background:#57606f;
}

/* active più soft */
.sidebar a.active{
    background:#3742fa;
}

/* titolo sidebar */
.sidebar-title{
    color:#a4b0be;
}
/* ===== FORM GRID ===== */
.form-grid{
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap:15px;
}

.form-group{
    display:flex;
    flex-direction:column;
}

.form-group.full{
    grid-column: span 3;
}

.form-actions{
    text-align:center;
    margin-top:15px;
}