/* ================================
   RICHIESTE – CSS PREMIUM
   Modulo dedicato, nessuna interferenza
   ================================ */

/* --- CARD PRINCIPALI --- */
.detail-card,
.list-card,
.form-card {
    background: #ffffff;
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
}

/* --- LISTA ELEMENTI --- */
.list-item {
    background: #f9fafc;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid #e6e9ef;
    transition: all 0.2s ease;
}

.list-item:hover {
    background: #ffffff;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

/* --- TITOLI GLOBALI --- */
h2, h3, h4 {
    margin-top: 0;
    color: #1a1f36;
}

/* --- TITOLI SEZIONI FORM (blu ACTIS) --- */
.form-card h3,
.form-card h4 {
    color: #2b6cb0;
}

/* --- TAG STATO --- */
.status-tag {
    display: inline-block;
    background: #dfe3eb;
    color: #4a4f5c;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-top: 6px;
}

/* --- BOTTONI PREMIUM --- */
.btn-primary {
    background: #2b6cb0;
    color: #ffffff !important;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s ease;
}

.btn-primary:hover {
    background: #245a92;
}

.btn-secondary {
    background: #4a5568; /* grigio scuro elegante */
    color: #ffffff !important;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s ease;
}

.btn-secondary:hover {
    background: #d6dce5;
}

.btn-danger {
    background: #e53e3e;
    color: #ffffff !important;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s ease;
}

.btn-danger:hover {
    background: #c53030;
}

/* --- AZIONI --- */
.actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

/* --- EMPTY STATE --- */
.empty-state {
    text-align: center;
    padding: 30px;
    color: #6b7280;
    font-size: 1rem;
    opacity: 0.8;
}

/* --- FORM --- */
.form-card label {
    display: block;
    margin-top: 15px;
    font-weight: 600;
    color: #2d3748;
}

.form-card input,
.form-card select,
.form-card textarea {
    box-sizing: border-box;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #cbd5e0;
    margin-top: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;

    display: block;        /* 🔥 fondamentale */
    margin-left: auto;     /* 🔥 centra */
    margin-right: auto;    /* 🔥 centra */
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
    border-color: #2b6cb0;
    outline: none;
}

/* --- ALERT ACTIONS --- */
.alert-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

/* --- LAYOUT DEDICATO --- */
.richieste-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.richieste-topbar {
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.richieste-topbar h1 {
    margin: 0;
    font-size: 1.8rem;
    color: #1a1f36;
}

.richieste-topbar .subtitle {
    margin-top: 4px;
    color: #4a5568;
    font-size: 1rem;
}

.richieste-content {
    margin-top: 20px;
    overflow-x: hidden; /* elimina scroll orizzontale */
    padding: 0; /* AGGIUNGI QUESTO */
}

/* ============================
   FIX OVERRIDE STYLE.CSS
   ============================ */

.btn-primary,
.btn-secondary,
.btn-danger {
    color: #ffffff !important;
}

.btn-primary *,
.btn-secondary *,
.btn-danger * {
    color: #ffffff !important;
}

/* NON toccare max-width, altrimenti la card si deforma */
.form-card {
    overflow-x: hidden;
}

.form-card {
    max-width: 500px;   /* o 550px, o 600px */
    margin: 0 auto;     /* centra la card */
}

/* Gli input devono restare fluidi, ma NON forzati al 100% */
input, select, textarea {
    width: 100%;
}

.form-card h3,
.form-card h4 {
    color: #2b6cb0 !important;
}

.detail-card,
.list-card,
.form-card {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08) !important;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
    justify-items: center; /* opzionale ma consigliato */
}

.menu-card {
    color: #ffffff !important;   /* 🔥 testo bianco */
    font-weight: 600;            /* opzionale: più elegante */
    text-align: center;
    padding: 14px 20px; /* altezza ridotta */
    max-width: 260px;   /* larghezza controllata della card */
    margin: 0 auto;     /* centra la card dentro la colonna */
}

/* --- CONTENITORE PRINCIPALE RICHIESTE (identico alla Home) --- */
.page-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    overflow-x: hidden; /* elimina lo scroll orizzontale */
}

.menu-card.home-card h2 {
    color: #ffffff !important;
}
