﻿/* File: css/admin_home.css
   Descrizione: Stili dashboard home admin Magistralis.
   Dipendenze: app_shell.css (variabili e font Cinzel giÃ  caricati)
*/

/* PAGE TITLE */
.adm-page-title {
    text-align: center;
    padding: 12px 24px 4px;
}
.adm-page-title h2 {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    letter-spacing: 4px;
    color: #c5a059;
    text-transform: uppercase;
    margin: 0;
}
.adm-page-title p {
    font-size: 1rem;
    color: rgba(197,160,89,0.45);
    margin-top: 5px;
    letter-spacing: 1px;
}

/* STATS ROW */
.adm-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 8px 24px 0;
}
.adm-stat-card {
    background: rgba(14,22,38,0.95);
    border-radius: 10px;
    padding: 10px 18px;
    text-align: center;
    background-clip: padding-box;
    border: 2px solid #c5a059;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);

    transition: box-shadow 0.2s;
}
.adm-stat-card:hover {
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5), 0 0 20px rgba(197,160,89,0.3);

}
.adm-stat-alert-active {
    border-color: #e74c3c !important;

}
.adm-stat-num {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffd277;
    line-height: 1;
}
.adm-stat-label {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    color:#c5a059;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 6px;
}
.adm-stat-delta { font-size: 0.8rem; margin-top: 5px; }
.adm-delta-green { color: #2ecc71; }
.adm-delta-amber { color: #f39c12; }
.adm-delta-red   { color: #e74c3c; }

/* MAIN GRID */
.adm-main-grid {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 8px 24px 8px;
}

/* CARD */
.adm-card {
    background: rgba(14,22,38,0.95);
    border-radius: 12px;
    padding: 12px 16px;
    height: 100%;
    overflow: auto;
    box-sizing: border-box;
    border: 2px solid #c5a059;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);

    transition: box-shadow 0.2s;
}
.adm-card:hover {
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5), 0 0 20px rgba(197,160,89,0.3);

}
.adm-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(197,160,89,0.15);
}
.adm-card-title {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: #c5a059;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 9px;
}

/* DOT */
.adm-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.adm-dot-green { background: #2ecc71; box-shadow: 0 0 7px #2ecc71; }
.adm-dot-amber { background: #f39c12; box-shadow: 0 0 7px #f39c12; }
.adm-dot-red   { background: #e74c3c; box-shadow: 0 0 7px #e74c3c; }

/* PILL */
.adm-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    font-weight: 600;
    font-family: 'Cinzel', serif;
}
.adm-pill-pending { background: rgba(243,156,18,0.12); color: #f39c12; outline: 1px solid rgba(243,156,18,0.35); }
.adm-pill-ok      { background: rgba(46,204,113,0.1);  color: #2ecc71; outline: 1px solid rgba(46,204,113,0.3); }
.adm-pill-denied  { background: rgba(231,76,60,0.1);   color: #e74c3c; outline: 1px solid rgba(231,76,60,0.3); }
.adm-pill-muted   { background: rgba(197,160,89,0.1);  color: #c5a059; outline: 1px solid rgba(197,160,89,0.25); }

/* TABLE — token: th=#b3e5fc Cinzel 0.62rem | td=#c5b89a 1rem sistema | sep=rgba(197,160,89,0.15) */
.adm-table { width: 100%; border-collapse: collapse; }
.adm-table th {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: #b3e5fc;
    text-transform: uppercase;
    padding: 8px 8px;
    text-align: center;
    border-bottom: 1px solid rgba(197,160,89,0.15);
}
.adm-table th:first-child { text-align: left; }
.adm-table td {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 1rem;
    padding: 7px 8px;
    border-bottom: 1px solid rgba(197,160,89,0.15);
    color: #c5b89a;
    text-align: center;
}
.adm-table td:nth-child(2) { text-align: left; }
.adm-table tr:last-child td { border-bottom: none; }
.adm-table tr:hover td { background: rgba(197,160,89,0.04); }

/* LEGEND */
.adm-legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 1rem;
    color: #c5b89a;
}
.adm-legend-dot {
    width: 11px;
    height: 11px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* QUICK LINKS */
.adm-quicklink {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 10px;
    background: rgba(8,14,24,0.7);
    outline: 2px solid rgba(197,160,89,0.25);
    border-radius: 9px;
    margin-bottom: 5px;
    transition: outline-color 0.2s, background 0.2s;
    text-decoration: none;
}
.adm-quicklink:hover {
    outline-color: rgba(197,160,89,0.55);
    background: rgba(197,160,89,0.04);
}
.adm-quicklink-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(197,160,89,0.08);
    outline: 1px solid rgba(197,160,89,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #c5a059;
}
.adm-quicklink-icon svg { width: 17px; height: 17px; }
.adm-quicklink-title {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    color: #c5a059;
    letter-spacing: 0.5px;
}
.adm-quicklink-sub { font-size: 0.8rem; color: rgba(197,160,89,0.4); margin-top: 2px; }
.adm-quicklink-arrow { color: rgba(197,160,89,0.3); font-size: 1.1rem; margin-left: auto; }
.adm-quicklink-body { flex: 1; }

/* ALERT */
.adm-alert-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    background: rgba(255,107,53,0.05);
    outline: 1px solid rgba(255,107,53,0.25);
    border-radius: 7px;
    margin-bottom: 4px;
}
.adm-alert-icon { color: #ff8c5a; font-size: 1rem; flex-shrink: 0; }
.adm-alert-text { font-size: 0.8rem; color: #c5b89a; flex: 1; }
.adm-alert-time { font-size: 0.8rem; color: rgba(197,160,89,0.35); }

/* DIVIDER / SECTION LABEL */
.adm-divider { height: 1px; background: rgba(197,160,89,0.12); margin: 13px 0; }
.adm-section-label {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: rgba(197,160,89,0.4);
    text-transform: uppercase;
    margin-bottom: 5px;
}


#adm-requests-container { overflow: hidden; }
#adm-requests-container .adm-card { max-height: 100%; overflow-y: auto; }

.adm-main-grid { grid-template-rows: 1fr 1fr; }

/* EMERGENZA CARD */
.adm-emg-turno-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}
.adm-emg-slot {
    background: rgba(8,14,24,0.6);
    border-radius: 8px;
    padding: 8px 10px;
    outline: 1px solid rgba(197,160,89,0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}
.adm-emg-slot-label {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    color: #ffffff;
    text-transform: uppercase;
    margin-bottom: 2px;
}
.adm-emg-slot-nome {
    font-size: 1.15rem;
    color: #ffd277;
    font-weight: 600;
}
.adm-emg-slot-sub {
    font-size: 1rem;
    color: rgba(197,160,89,0.6);
}
.adm-emg-cand-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 6px;
}
.adm-emg-cand-col {}
.adm-emg-cand-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px;
    border-bottom: 1px solid rgba(197,160,89,0.08);
}
.adm-emg-cand-rank {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: #ffd277;
    font-weight: 700;
    width: 20px;
    flex-shrink: 0;
}
.adm-emg-cand-nome {
    font-size: 1rem;
    color: #ffffff;
    flex: 1;
}
.adm-emg-no-cand {
    font-size: 1rem;
    color: rgba(197,160,89,0.4);
    padding: 8px 0;
    font-style: italic;
}
.adm-emg-footer {
    margin-top: 8px;
    font-size: 0.8rem;
    color: rgba(197,160,89,0.3);
    text-align: right;
    letter-spacing: 0.5px;
}
.adm-emg-cand-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.adm-emg-cand-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.adm-emg-turno-info {
    font-size: 0.8rem;
    color: rgba(197,160,89,0.7);
    line-height: 1.4;
}
.adm-emg-turno-info strong {
    color: #ffd277;
    font-weight: 600;
}
.adm-emg-turno-info em {
    color: rgba(197,160,89,0.55);
    font-style: normal;
}
.adm-emg-turno-none {
    color: rgba(197,160,89,0.3);
    font-size: 0.8rem;
}
.adm-emg-sep {
    display: none;
}
.adm-emg-cand-clickable {
    cursor: pointer;
    border-radius: 7px;
    transition: background 0.2s, outline 0.2s;
}
.adm-emg-cand-clickable:hover {
    background: rgba(197,160,89,0.07);
    outline: 1px solid rgba(197,160,89,0.35);
}
.adm-emg-cand-nome {
    font-size: 1rem;
    color: #ffffff;
    flex: 1;
}
.adm-emg-slot .adm-pill {
    font-size: 0.8rem;
    padding: 4px 12px;
}









/* MODALE DECRETO EMERGENZA */
.adm-emg-modale-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.adm-emg-modale-box {
    background: rgba(14,22,38,0.98);
    border: 2px solid #c5a059;
    border-radius: 16px;
    box-shadow: 0 0 40px rgba(197,160,89,0.25), inset 0 0 30px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 900px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.adm-emg-modale-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(197,160,89,0.15);
    flex-shrink: 0;
}
.adm-emg-modale-close {
    background: rgba(231,76,60,0.1);
    border: 1px solid rgba(231,76,60,0.3);
    color: #e74c3c;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.adm-emg-modale-close:hover {
    background: rgba(231,76,60,0.25);
}
.adm-emg-modale-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    background: #ffffff;
    color: #000000;
}
.adm-emg-modale-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid rgba(197,160,89,0.15);
    flex-shrink: 0;
}
.adm-emg-modale-footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.adm-emg-btn-stampa {
    background: rgba(197,160,89,0.08);
    border: 1px solid rgba(197,160,89,0.25);
    color: #c5a059;
    border-radius: 8px;
    padding: 8px 20px;
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s;
}
.adm-emg-btn-stampa:hover:not(:disabled) {
    background: rgba(197,160,89,0.15);
}
.adm-emg-btn-stampa:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.adm-emg-btn-annulla {
    background: rgba(197,160,89,0.08);
    border: 1px solid rgba(197,160,89,0.25);
    color: #c5a059;
    border-radius: 8px;
    padding: 8px 20px;
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s;
}
.adm-emg-btn-annulla:hover {
    background: rgba(197,160,89,0.15);
}
.adm-emg-btn-conferma {
    background: linear-gradient(to right, #77530a, #ffd277, #77530a, #77530a, #ffd277, #77530a);
    background-size: 250%;
    background-position: left;
    border: none;
    border-radius: 8px;
    padding: 2px;
    cursor: pointer;
    transition: background-position 0.3s;
}
.adm-emg-btn-conferma:hover:not(:disabled) {
    background-position: right;
}
.adm-emg-btn-conferma:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.adm-emg-btn-conferma-inner {
    background: #141e