/* mod/css/giberti.css - Design System Ufficiale Giberti */
:root { 
    --gib-navy: #2c3e50; 
    --gib-blue: #3498db; 
    --gib-red: #e74c3c; 
    --gib-orange: #e67e22;
    --gib-light: #f8f9fa;
    --gib-border: #ccc;
    --gib-border-light: #e0e0e0;
}

/* ==========================================
   1. CONTENITORI BASE E LAYOUT
   ========================================== */
.gib-container { margin: 30px auto; max-width: 800px; font-family: sans-serif; padding: 0 15px; }
.gib-container-wide { margin: 20px auto; max-width: 900px; font-family: sans-serif; padding-bottom: 60px; }
.gib-main-wrapper { display: flex; gap: 30px; max-width: 1350px; margin: 20px auto; font-family: sans-serif; align-items: flex-start; padding: 0 15px; }
.gib-sidebar { flex: 1; min-width: 300px; background: #fff; border-radius: 10px; border: 1px solid var(--gib-border-light); padding: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.gib-content-area { flex: 3; }
.gib-card { background: #fff; border-radius: 10px; border: 1px solid var(--gib-border-light); padding: 20px; margin-bottom: 25px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.gib-card-title { font-size: 0.85em; font-weight: bold; text-transform: uppercase; color: #7f8c8d; border-bottom: 1px solid #eee; padding-bottom: 10px; margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; }

/* ==========================================
   2. FILTRI E FORM (Stile grigio compatto)
   ========================================== */
.gib-filter-row { display: flex; gap: 15px; align-items: flex-end; margin-bottom: 15px; background: #f9f9f9; padding: 15px; border-radius: 8px; border: 1px solid #eee; flex-wrap: wrap; }
.gib-filter-row > div { flex-grow: 1; } /* Fa espandere i box in modo naturale */
.gib-filter-row label { font-size: 0.75em; font-weight: bold; color: #7f8c8d; display: block; margin-bottom: 5px; text-transform: uppercase; }
.gib-field { height: 38px !important; box-sizing: border-box; border: 1px solid var(--gib-border); border-radius: 4px; padding: 0 10px; font-size: 0.9em; background: #fff; width: 100%; }

/* ==========================================
   3. TABELLE (Bordi sottili, font compatto)
   ========================================== */
.gib-table { width: 100%; border-collapse: collapse; font-size: 0.9em; }
.gib-table th { background: #f8f9fa; color: #7f8c8d; padding: 10px; text-align: center; border-bottom: 2px solid #eee; font-weight: bold; }
.gib-table td { padding: 10px 8px; border-bottom: 1px solid #f0f0f0; color: #333; }
.gib-table tr:hover { background-color: #fcfcfc; }

/* ==========================================
   4. BOTTONI
   ========================================== */
.gib-btn { height: 38px; padding: 0 20px; border-radius: 4px; cursor: pointer; font-weight: bold; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: 0.2s; border: none; text-decoration: none; }
.gib-btn-sm { height: 30px; padding: 0 20px; }
.gib-btn-primary { background: var(--gib-navy); color: #fff !important; }
.gib-btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

/* Icone Quadrate (Azzera Filtri, Oggi, Elimina in tabella) */
.gib-icon-btn { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; border: 1px solid var(--gib-border); border-radius: 4px; background: #fff; padding: 0; box-sizing: border-box; text-decoration: none; }
.gib-icon-btn:hover { background: #f0f0f0; }

/* Tasti Home (Fisso e Fluttuante) */
.gib-bottom-home { display: inline-block; padding: 12px 35px; background-color: #95a5a6; color: white !important; text-decoration: none; border-radius: 50px; font-weight: bold; transition: 0.3s; }
.gib-bottom-home:hover { background-color: #7f8c8d; transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.gib-floating-home { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: #95a5a6; color: white !important; padding: 12px 30px; border-radius: 50px; font-weight: bold; text-decoration: none; box-shadow: 0 4px 15px rgba(0,0,0,0.3); z-index: 1000; transition: 0.3s; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.gib-floating-home:hover { background: var(--gib-navy); transform: translateX(-50%) translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.4); }

/* ==========================================
   5. COMPONENTI EXTRA E MODAL
   ========================================== */
.gib-progress-bg { background: #eee; border-radius: 10px; height: 6px; width: 100%; margin-top: 5px; overflow: hidden; }
.gib-progress-fill { height: 100%; background: var(--gib-blue); }
.gib-progress-fill.warning { background: var(--gib-orange); }
.gib-progress-fill.danger { background: var(--gib-red); }

.gib-alert-conflict { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; padding: 15px; border-radius: 8px; margin-bottom: 20px; display: flex; align-items: center; font-weight: bold; }
.gib-row-conflict { background-color: #fff9db !important; }
.gib-row-conflict:hover { background-color: #fff3bf !important; }
.gib-badge-error { background: var(--gib-orange); color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.75em; text-transform: uppercase; margin-left: 5px; }

.gib-report-box { max-width: 600px; margin: 20px auto; background: #fff; padding: 20px; border-radius: 8px; border: 1px solid var(--gib-border-light); box-shadow: 0 2px 8px rgba(0,0,0,0.05); font-family: sans-serif; }
.gib-report-box ul { list-style-type: none; padding: 0; }
.gib-report-box li { padding: 10px; border-bottom: 1px solid #eee; font-size: 0.95em; }

.gib-modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); }
.gib-modal-content { background-color: #fefefe; margin: 10% auto; padding: 25px; border-radius: 12px; width: 90%; max-width: 600px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); font-family: sans-serif; line-height: 1.6; }
.gib-modal-header { border-bottom: 1px solid #eee; padding-bottom: 10px; margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; }
.gib-modal-header h2 { margin: 0; font-size: 1.2em; color: var(--gib-navy); }
.gib-close-modal { color: #aaa; font-size: 28px; font-weight: bold; cursor: pointer; }
.gib-close-modal:hover { color: #000; }
.gib-guida-link { color: var(--gib-blue); cursor: pointer; font-size: 0.85em; text-decoration: underline; margin-left: 10px; font-weight: normal; display: inline-flex; align-items: center; text-transform: none;}
.gib-guida-link:hover { color: #2980b9; }


/* ==========================================
   MODULO ISCRIZIONI - WIZARD E ADMIN
   ========================================== */
:root {
    --giberti-navy: #2c3e50;
    --giberti-blue: #3498db;
    --giberti-light: #f8fafc;
    --giberti-orange: #e67e22;
    --giberti-text: #334155;
    --giberti-border: #e2e8f0;
}

/* Stili Pannello Admin Iscrizioni */
.badge-tipo { padding: 4px 8px; border-radius: 4px; font-size: 0.75em; font-weight: bold; text-transform: uppercase; }
.badge-nuova { background: #d4edda; color: #155724; }
.badge-trasf { background: #fff3cd; color: #856404; }
.doc-link { color: #3498db; text-decoration: none; margin-right: 8px; transition: 0.2s; display: inline-block;}
.doc-link:hover { color: #e74c3c; transform: scale(1.1); }

/* Stili Generali Wizard */
body.wizard-body { background-color: #f4f7f6; font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; color: var(--giberti-text); margin: 0; padding: 0; }
.wizard-container { max-width: 900px; margin: 40px auto; padding: 0 15px; }

/* Header Wizard */
.header-ribbon { border-bottom: 3px solid var(--giberti-blue) !important; background-color: #f4f7f6; padding: 15px 0; }
.school-identity { display: flex; flex-direction: column; justify-content: center; transform: translateY(0px); }
.school-name { font-size: 1.35rem; font-weight: 800; color: var(--giberti-navy); font-family: 'Montserrat', sans-serif; text-transform: uppercase; letter-spacing: 2px; line-height: 1; margin: 0; }
.school-type { font-size: 0.8rem; color: #94a3b8; font-family: 'Montserrat', sans-serif; margin-top: 4px; letter-spacing: 0.5px; }

/* Wizard Progress Bar */
.wizard-steps { display: flex; justify-content: space-between; margin-bottom: 50px; position: relative; }
.wizard-steps::before { content: ""; position: absolute; top: 21px; left: 10%; right: 10%; height: 3px; background: var(--giberti-border); z-index: 1; }
.step-item { position: relative; z-index: 2; text-align: center; display: flex; flex-direction: column; align-items: center; flex: 1; }
.step-num { width: 42px; height: 42px; border-radius: 50%; background: #fff; border: 3px solid var(--giberti-border); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; font-weight: bold; color: #94a3b8; transition: 0.4s; line-height: 1; box-shadow: 0 0 0 5px #f4f7f6; }
.step-item.active .step-num { border-color: var(--giberti-blue); background: var(--giberti-blue); color: #fff; box-shadow: 0 0 0 5px #f4f7f6, 0 0 0 8px rgba(52, 152, 219, 0.1); }
.step-label { font-size: 0.75rem; color: #94a3b8; text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; }
.step-item.active .step-label { color: var(--giberti-blue); }

/* Landing Page (index) */
.hero-section { background: var(--giberti-navy); color: white; padding: 60px 0; margin-bottom: 40px; border-bottom: 5px solid var(--giberti-blue); }
.choice-card { border: none; border-radius: 20px; padding: 45px 30px; text-align: center; transition: all 0.3s ease; cursor: pointer; background: #fff; height: 100%; box-shadow: 0 4px 15px rgba(0,0,0,0.05); display: flex; flex-direction: column; align-items: center; }
.choice-card:hover { transform: translateY(-12px); box-shadow: 0 15px 35px rgba(0,0,0,0.12); border: 1px solid var(--giberti-blue); }
.img-container { margin-bottom: 30px; height: 180px; display: flex; align-items: center; justify-content: center; }
.img-choice { width: 160px; height: auto; object-fit: contain; filter: drop-shadow(0 8px 12px rgba(0,0,0,0.1)); }
.choice-card h3 { color: var(--giberti-navy); font-weight: 700; margin-bottom: 15px; }

/* Form e Componenti */
.wizard-card { border: 1px solid var(--giberti-border); border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.03); background: #fff; padding: 20px; margin-bottom: 25px; }
.section-title-giberti { color: var(--giberti-navy); font-weight: 800; font-size: 1.15rem; margin-bottom: 1.5rem; text-transform: uppercase; letter-spacing: 0.5px; }
.form-label-gib { font-weight: 600; font-size: 0.85rem; color: var(--giberti-navy); margin-bottom: 0.5rem; display: block; }
.form-control-gib, .form-select-gib { border-radius: 8px; border: 1px solid var(--giberti-border); padding: 10px 12px; width: 100%; box-sizing: border-box; }
.form-control-gib:focus { border-color: var(--giberti-blue); box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1); outline: none; }
.form-control-gib[readonly] { background-color: #f1f5f9; }
.btn-wizard { background: var(--giberti-blue); color: #fff; border-radius: 50px; padding: 12px 35px; font-weight: 700; border: none; transition: 0.3s; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.5px; text-decoration: none; display: inline-block; cursor: pointer; }
.btn-wizard:hover { background: var(--giberti-navy); color: white; transform: translateY(-2px); }
#final-submit { background: var(--giberti-navy); }
#final-submit:hover { background: #1a252f; }

/* ==========================================
   MODULO ADOZIONI
   ========================================== */

/* Badge per Modulo Adozioni */
.badge-acquisto { background: #ffebee; color: #c62828; }
.badge-inuso { background: #e8f5e9; color: #2e7d32; }
.badge-consigliato { background: #f3f3f3; color: #555; }

/* Griglia per Form COMPATTI */
.gib-form-grid { display: flex; gap: 10px; margin-bottom: 10px; }
.gib-form-grid > div { flex: 1; }
.gib-form-grid-2 { grid-template-columns: 1fr 1fr; }


/* ==========================================
   FIX PULSANTI ISCRITTI (.btn-giberti)
   ========================================== */
.btn-giberti {
    background-color: var(--giberti-blue, #3498db);
    color: #ffffff !important;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 50px;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-giberti:hover {
    background-color: var(--giberti-navy, #2c3e50);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(44, 62, 80, 0.35);
}

.btn-giberti:disabled,
.btn-giberti[disabled] {
    background-color: #94a3b8 !important;
    border-color: #94a3b8 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    transform: none !important;
}