/* ============================================
   RESET BASE
============================================ */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f0f2f5;
    color: #333;
}

/* ============================================
   LAYOUT
============================================ */
.main-layout {
    display: block;
}

/* ============================================
   SIDEBAR (DESTRA)
============================================ */
.sidebar {
    width: 250px;
    height: 100vh;
    background: #0f3d66;
    color: white;
    padding: 20px;
    position: fixed;
    top: 0;
    right: 0;
}

.sidebar h2 {
    margin-top: 0;
}

/* Titoli Sidebar */
.sidebar .section-title {
    font-size: 13px;
    margin: 20px 0 10px 0;
    font-weight: bold;
    color: #ddd;
}

/* Linea divisoria */
.divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.2);
    margin: 20px 0;
}

/* MENU */
.menu-item {
    display: block;
    padding: 12px;
    margin-bottom: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    text-decoration: none;
    color: white;
    font-size: 14px;
    transition: all 0.2s;
}

.menu-item:hover {
    background: rgba(255,255,255,0.25);
}

/* ============================================
   CONTENUTO CENTRATO
============================================ */
.content {
    margin-right: 250px;
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;
}

/* ============================================
   WRAPPER CENTRALE
============================================ */
.page-wrapper {
    width: 100%;
    max-width: 900px;
}

/* ============================================
   CARD
============================================ */
.card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.big-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.08);
}

/* ============================================
   TITOLI
============================================ */
h1 {
    margin-top: 0;
}

h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

/* ============================================
   BOTTONI (STANDARDIZZATI)
============================================ */
.button,
button {
    display: inline-flex;          /* 🔥 cambia qui */
    justify-content: center;
    align-items: center;

    width: 140px;
    height: 44px;                  /* 🔥 altezza fissa = identici */

    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
    color: white;
}

/* colori */
.button-green {
    background: #00c853;
}

.button-blue {
    background: #1976d2;
}

.button-red {
    background: #e53935;
}

.button-cancel {
    background: #6c757d;
}

/* hover */
.button:hover {
    opacity: 0.9;
}

.button-cancel:hover {
    background: #5a6268;
}

/* ============================================
   AZIONI FORM (BOTTONI)
============================================ */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    width: 100%;
}

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

.dashboard-actions .button {
    width: auto;                 
    padding: 10px 20px;
    height: auto;
    white-space: nowrap;
}

.hidden-section {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: #f9fafc;
    border-radius: 10px;
}

/* ============================================
   FORM
============================================ */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

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

.form-group label {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 13px;
}

/* INPUT */
input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #9ca3af;
    background: #ffffff;
    font-size: 14px;
    transition: all 0.2s;
}

input:focus {
    border-color: #1976d2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(25,118,210,0.15);
}

/* ============================================
   SEZIONI FORM
============================================ */
.section-box {
    background: #f4f8ff;
    border: 1px solid #1976d2;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.section-box .section-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #1976d2;
}

/* ============================================
   VARIE
============================================ */
form {
    margin-top: 20px;
}

p {
    margin: 5px 0;
}

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

.login-card {
    width: 350px;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.login-card h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #1976d2;
}

.login-actions {
    margin-top: 20px;
    text-align: center;
}

/* errore login */
.login-error {
    background: #ffe5e5;
    color: #d32f2f;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
}