/* ============================================================
   CssSuperAdmin.css - Estilos del Super Admin Dashboard
   Color distintivo morado para diferenciar del Setup CSN (rojo)
   ============================================================ */

/* ============================================================
   LOGIN (login del Super Admin)
   ============================================================ */
.sa-login-wrap {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 20px;
}
.sa-login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    padding: 40px 36px;
    max-width: 460px;
    width: 100%;
}
.sa-login-icon {
    width: 66px;
    height: 66px;
    background: linear-gradient(135deg, #7C3AED, #A855F7);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    margin: 0 auto 18px;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}
.sa-login-title {
    text-align: center;
    color: #0F172A;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}
.sa-login-sub {
    text-align: center;
    color: #475569;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 24px;
}
.sa-field {
    margin-bottom: 14px;
}
.sa-label {
    font-size: 14px;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 6px;
    display: block;
    letter-spacing: 0.5px;
}
.sa-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #0F172A;
    border-radius: 8px;
    font-size: 16px;
    color: #000000;
    font-weight: 600;
    background: white;
    font-family: 'Calibri', sans-serif;
    transition: all 0.2s ease;
}
.sa-input:focus {
    outline: none;
    border-color: #7C3AED;
    background: #FFFBEB;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}
.sa-login-btn {
    width: 100%;
    margin-top: 8px;
    background: #7C3AED;
    color: white;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 1px;
    cursor: pointer;
    font-family: 'Calibri', sans-serif;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.sa-login-btn:hover {
    background: #6D28D9;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
}
.sa-login-btn:disabled {
    background: #9CA3AF;
    cursor: not-allowed;
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.sa-dash {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 8px 100px;
    position: relative;
    z-index: 2;
}

.sa-dash-header {
    background: white;
    border-radius: 16px;
    padding: 22px 32px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.sa-dash-title-area {
    display: flex;
    align-items: center;
    gap: 14px;
}
.sa-dash-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #7C3AED, #A855F7);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}
.sa-dash-eyebrow {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #7C3AED;
}
.sa-dash-title {
    font-size: 23px;
    font-weight: 800;
    color: #0F172A;
    letter-spacing: -0.3px;
}
.sa-dash-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sa-user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    background: #FFFBEB;
    border: 1px solid #F59E0B;
    border-radius: 22px;
    font-size: 13px;
    font-weight: 700;
    color: #000000;
}
.sa-user-pill i {
    color: #7C3AED;
}
.sa-logout {
    background: #DC2626;
    color: white;
    padding: 8px 16px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-family: 'Calibri', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}
.sa-logout:hover {
    background: #B91C1C;
}

/* ============================================================
   STATS
   ============================================================ */
.sa-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}
.sa-stat {
    background: white;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
    border-left: 4px solid;
}
.sa-stat-1 { border-color: #1E40AF; }
.sa-stat-2 { border-color: #16A34A; }
.sa-stat-3 { border-color: #7C3AED; }
.sa-stat-4 { border-color: #DC2626; }
.sa-stat-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #475569;
    text-transform: uppercase;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sa-stat-1 .sa-stat-label i { color: #1E40AF; }
.sa-stat-2 .sa-stat-label i { color: #16A34A; }
.sa-stat-3 .sa-stat-label i { color: #7C3AED; }
.sa-stat-4 .sa-stat-label i { color: #DC2626; }
.sa-stat-value {
    font-size: 29px;
    font-weight: 800;
    color: #0F172A;
}

/* ============================================================
   TABLA
   ============================================================ */
.sa-table-card {
    background: white;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}
.sa-table-head-row {
    padding: 18px 28px;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.sa-table-title {
    font-size: 16px;
    font-weight: 800;
    color: #0F172A;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sa-table-title i {
    color: #7C3AED;
}
.sa-table-tools {
    display: flex;
    gap: 10px;
    align-items: center;
}
.sa-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    background: white;
}
.sa-search input {
    border: none;
    outline: none;
    font-size: 14px;
    font-family: 'Calibri', sans-serif;
    width: 230px;
    color: #000000;
    font-weight: 600;
}
.sa-search i {
    color: #94A3B8;
}
.sa-btn-new {
    background: #16A34A;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    font-family: 'Calibri', sans-serif;
    transition: all 0.15s;
}
.sa-btn-new:hover {
    background: #15803D;
}

.sa-table {
    width: 100%;
    border-collapse: collapse;
}
.sa-table th {
    padding: 13px 14px;
    text-align: left;
    background: #F8FAFC;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.6px;
    color: #0F172A;
    text-transform: uppercase;
    border-bottom: 2px solid #1E40AF;
}
.sa-table td {
    padding: 15px 14px;
    border-bottom: 1px solid #F1F5F9;
    font-size: 14px;
    color: #0F172A;
    font-weight: 600;
    vertical-align: middle;
}
.sa-table tr:hover td {
    background: #FFFBEB;
}

.sa-mono {
    font-family: 'Consolas', monospace;
    font-size: 13px;
}
.sa-pwd-visible {
    font-family: 'Consolas', monospace;
    font-size: 13px;
    color: #7C3AED;
    font-weight: 800;
    background: #F5F3FF;
    padding: 3px 8px;
    border-radius: 5px;
}
.sa-pwd-hidden {
    color: #94A3B8;
    font-style: italic;
    font-size: 12px;
}

.sa-counter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 13px;
}
.sa-counter-contracted {
    background: #DBEAFE;
    color: #1E40AF;
}
.sa-counter-created {
    background: #DCFCE7;
    color: #166534;
}

.sa-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}
.sa-active {
    background: #DCFCE7;
    color: #166534;
}
.sa-suspended {
    background: #FEE2E2;
    color: #991B1B;
}
.sa-inactive {
    background: #F1F5F9;
    color: #475569;
}

.sa-actions {
    display: flex;
    gap: 6px;
}
.sa-act-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.15s ease;
}
.sa-act-open {
    background: #DBEAFE;
    color: #1E40AF;
}
.sa-act-open:hover {
    background: #1E40AF;
    color: white;
}
.sa-act-suspend {
    background: #FEF3C7;
    color: #92400E;
}
.sa-act-suspend:hover {
    background: #DC2626;
    color: white;
}
.sa-act-activate {
    background: #DCFCE7;
    color: #166534;
}
.sa-act-activate:hover {
    background: #16A34A;
    color: white;
}
.sa-act-delete {
    background: #FEE2E2;
    color: #991B1B;
}
.sa-act-delete:hover {
    background: #B91C1C;
    color: white;
}

.sa-table-foot {
    padding: 14px 28px;
    border-top: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #475569;
    font-weight: 600;
}

.sa-loading {
    padding: 60px 20px;
    text-align: center;
    color: #94A3B8;
    font-size: 15px;
    font-weight: 600;
}
.sa-loading i {
    margin-right: 8px;
    color: #7C3AED;
}
.sa-error {
    color: #DC2626;
}

/* ============================================================
   BOTON EXTRA EN FreSetupMaster
   ============================================================ */
.master-super-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: linear-gradient(90deg, #7C3AED, #A855F7);
    color: white;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 1px;
    cursor: pointer;
    font-family: 'Calibri', sans-serif;
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.4);
    margin-top: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.master-super-btn:hover {
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.55);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .sa-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .sa-dash-header {
        padding: 18px 20px;
    }
}
@media (max-width: 640px) {
    .sa-stats {
        grid-template-columns: 1fr;
    }
    .sa-table-head-row {
        flex-direction: column;
        align-items: stretch;
    }
    .sa-table {
        font-size: 12px;
    }
}
