:root {
    --figo-bg: #f4f7fb;
    --figo-surface: #ffffff;
    --figo-surface-soft: #f8fafc;
    --figo-border: #e2e8f0;
    --figo-border-strong: #d4dce7;
    --figo-text: #172033;
    --figo-text-soft: #667085;
    --figo-text-muted: #8a94a6;
    --figo-primary: #111827;
    --figo-primary-soft: #1f2937;
    --figo-success: #227a46;
    --figo-success-bg: #eef9f2;
    --figo-success-border: #c9e8d4;
    --figo-danger: #9a2b2b;
    --figo-danger-bg: #fff5f5;
    --figo-danger-border: #efc8c8;
    --figo-shadow: 0 18px 45px rgba(20, 35, 60, 0.08);
    --figo-radius-lg: 18px;
    --figo-radius-md: 14px;
    --figo-radius-sm: 10px;

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color-scheme: light;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    background:
        radial-gradient(
            circle at top left,
            #edf4ff 0,
            transparent 38%
        ),
        var(--figo-bg);

    color: var(--figo-text);
}

a,
button,
input {
    font: inherit;
}

a {
    color: inherit;
}

button,
input {
    outline: none;
}


/* =========================================================
   LOGIN
   ========================================================= */

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 18px;
}

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 36px;

    background: var(--figo-surface);
    border: 1px solid var(--figo-border);
    border-radius: var(--figo-radius-lg);
    box-shadow: var(--figo-shadow);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 50px;
    height: 50px;

    display: grid;
    place-items: center;

    flex: 0 0 auto;

    border-radius: 14px;

    background: var(--figo-primary);
    color: #ffffff;

    font-size: 25px;
    font-weight: 800;
}

.brand h1 {
    margin: 0;

    font-size: 23px;
    line-height: 1.2;
}

.brand p {
    margin: 4px 0 0;

    color: #6b7485;

    font-size: 14px;
}

.separator {
    height: 1px;
    margin: 28px 0;

    background: #e8ebf1;
}

h2 {
    margin: 0;

    font-size: 22px;
}

.intro {
    margin: 8px 0 24px;

    color: #687386;

    line-height: 1.55;
    font-size: 14px;
}

.field {
    margin-bottom: 18px;
}

label {
    display: block;

    margin-bottom: 7px;

    font-size: 14px;
    font-weight: 650;
}

input {
    width: 100%;
    min-height: 46px;

    padding: 10px 13px;

    border: 1px solid #cfd6e2;
    border-radius: 10px;

    background: #ffffff;
    color: var(--figo-text);
}

input:focus {
    border-color: #566981;

    box-shadow:
        0 0 0 3px rgba(86, 105, 129, 0.12);
}

button {
    width: 100%;
    min-height: 48px;

    border: 0;
    border-radius: 10px;

    background: var(--figo-primary);
    color: #ffffff;

    font-weight: 700;

    cursor: pointer;

    transition:
        opacity 0.18s ease,
        transform 0.18s ease,
        background 0.18s ease;
}

button:hover {
    opacity: 0.95;
}

button:active {
    transform: translateY(1px);
}

.alert {
    margin-bottom: 18px;

    padding: 12px 14px;

    border: 1px solid var(--figo-danger-border);
    border-radius: 10px;

    background: var(--figo-danger-bg);
    color: var(--figo-danger);

    font-size: 14px;
}

footer {
    margin-top: 28px;

    text-align: center;

    color: #8790a0;

    font-size: 12px;
}


/* =========================================================
   PANEL ADMINISTRATIVO
   ========================================================= */

.admin-body {
    min-height: 100vh;

    background: var(--figo-bg);
}

.admin-shell {
    min-height: 100vh;

    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;

    min-height: 100vh;
    height: 100vh;

    display: flex;
    flex-direction: column;

    padding: 24px 18px;

    overflow-y: auto;

    background: #111827;
    color: #ffffff;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 2px 8px 26px;
}

.sidebar-brand strong {
    display: block;

    font-size: 18px;
    line-height: 1.2;
}

.sidebar-brand span {
    display: block;

    margin-top: 4px;

    color: #94a3b8;

    font-size: 10px;
    letter-spacing: 0.12em;
}

.sidebar .brand-mark {
    background: #ffffff;
    color: #111827;
}

.sidebar-nav {
    display: grid;
    gap: 7px;
}

.nav-item {
    min-height: 46px;

    display: flex;
    align-items: center;
    gap: 11px;

    padding: 0 13px;

    border-radius: 10px;

    color: #cbd5e1;

    text-decoration: none;

    font-size: 14px;
    font-weight: 650;

    transition:
        background 0.18s ease,
        color 0.18s ease;
}

a.nav-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.11);
    color: #ffffff;
}

.nav-disabled {
    cursor: default;
    opacity: 0.58;
}

.nav-item small {
    margin-left: auto;

    color: #94a3b8;

    font-size: 10px;
}

.nav-icon {
    width: 20px;

    flex: 0 0 20px;

    text-align: center;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 24px;
}

.release-box {
    padding: 14px;

    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 10px;

    background: rgba(255, 255, 255, 0.04);
}

.release-box span {
    display: block;

    color: #94a3b8;

    font-size: 11px;
}

.release-box strong {
    display: block;

    margin-top: 4px;

    font-size: 14px;
}

.admin-content {
    min-width: 0;
}

.topbar {
    min-height: 86px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;

    padding: 18px 34px;

    border-bottom: 1px solid var(--figo-border);

    background: rgba(255, 255, 255, 0.98);
}

.topbar h1 {
    margin: 0;

    font-size: 22px;
    line-height: 1.2;
}

.topbar p {
    margin: 5px 0 0;

    color: #7b8494;

    font-size: 13px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 18px;
}

.user-info {
    text-align: right;
}

.user-info strong,
.user-info span {
    display: block;
}

.user-info strong {
    font-size: 13px;
}

.user-info span {
    margin-top: 3px;

    color: #7d8797;

    font-size: 11px;
}

.logout-button {
    width: auto;
    min-height: 39px;

    padding: 0 15px;

    border: 1px solid var(--figo-border-strong);

    background: #ffffff;
    color: #253047;

    font-size: 12px;
}

.logout-button:hover {
    background: #f8fafc;
}

.dashboard-main {
    width: min(1420px, 100%);

    margin: 0 auto;

    padding: 32px 34px 46px;
}

.welcome-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;

    padding: 28px 30px;

    border: 1px solid var(--figo-border);
    border-radius: 16px;

    background: var(--figo-surface);

    box-shadow:
        0 8px 24px rgba(20, 35, 60, 0.025);
}

.eyebrow {
    display: block;

    margin-bottom: 8px;

    color: #758095;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.13em;
}

.welcome-panel h2 {
    margin: 0;

    font-size: 27px;
    line-height: 1.25;
}

.welcome-panel p {
    max-width: 680px;

    margin: 10px 0 0;

    color: #707b8e;

    line-height: 1.6;
    font-size: 14px;
}

.status-pill {
    flex: 0 0 auto;

    padding: 9px 13px;

    border: 1px solid var(--figo-success-border);
    border-radius: 999px;

    background: var(--figo-success-bg);
    color: var(--figo-success);

    font-size: 12px;
    font-weight: 750;

    white-space: nowrap;
}


/* =========================================================
   DASHBOARD
   ========================================================= */

.metrics-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;

    margin-top: 20px;
}

.metric-card {
    padding: 22px;

    border: 1px solid var(--figo-border);
    border-radius: 14px;

    background: var(--figo-surface);
}

.metric-label,
.metric-detail {
    display: block;
}

.metric-label {
    color: #657085;

    font-size: 12px;
    font-weight: 650;
}

.metric-value {
    display: block;

    margin: 10px 0 5px;

    color: #121a2a;

    font-size: 31px;
    line-height: 1;
}

.metric-detail {
    color: #929aa8;

    font-size: 11px;
}

.dashboard-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.35fr)
        minmax(320px, 0.65fr);

    gap: 20px;

    margin-top: 20px;
}

.panel {
    padding: 26px;

    border: 1px solid var(--figo-border);
    border-radius: 14px;

    background: var(--figo-surface);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 16px;
}

.panel-header h3 {
    margin: 0;

    color: var(--figo-text);

    font-size: 18px;
    line-height: 1.3;
}

.phase-badge {
    flex: 0 0 auto;

    padding: 6px 9px;

    border-radius: 7px;

    background: #eef2f7;
    color: #677387;

    font-size: 10px;
    font-weight: 700;

    white-space: nowrap;
}

.panel-description {
    margin: 15px 0 20px;

    color: #737e90;

    line-height: 1.6;
    font-size: 13px;
}

.feature-list {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;
}

.feature-list div {
    padding: 12px;

    border: 1px solid #ebedf2;
    border-radius: 9px;

    color: #4d596d;

    font-size: 12px;
    line-height: 1.45;
}

.feature-list span {
    margin-right: 6px;

    color: #277345;

    font-weight: 800;
}

.security-status {
    display: grid;

    gap: 4px;

    margin-top: 18px;
}

.security-status div {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding: 12px 0;

    border-bottom: 1px solid #edf0f4;
}

.security-status div:last-child {
    border-bottom: 0;
}

.security-status span {
    color: #758095;

    font-size: 12px;
}

.security-status strong {
    color: var(--figo-text);

    font-size: 12px;
}

.audit-panel {
    margin-top: 20px;
}

.empty-state {
    margin: 20px 0 0;

    color: #8a94a3;

    font-size: 13px;
}


/* =========================================================
   TABLAS / CLIENTES
   ========================================================= */

.table-wrapper {
    width: 100%;

    margin-top: 20px;

    overflow-x: auto;

    border: 1px solid #edf0f4;
    border-radius: 12px;
}

.admin-table {
    width: 100%;
    min-width: 900px;

    border-collapse: collapse;

    background: #ffffff;

    font-size: 12px;
}

.admin-table th,
.admin-table td {
    padding: 15px 18px;

    vertical-align: middle;
    text-align: left;
}

.admin-table th {
    border-bottom: 1px solid #dfe4ec;

    background: #f8fafc;

    color: #737d8f;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 0.06em;
    text-transform: uppercase;

    white-space: nowrap;
}

.admin-table td {
    border-bottom: 1px solid #edf0f4;

    color: #3f4a5d;

    line-height: 1.45;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-table tbody tr:hover {
    background: #fbfcfe;
}

.admin-table td:first-child {
    min-width: 280px;
}

.admin-table td:nth-child(2),
.admin-table td:nth-child(3),
.admin-table td:nth-child(4),
.admin-table td:nth-child(5),
.admin-table td:nth-child(6),
.admin-table td:nth-child(7) {
    white-space: nowrap;
}

.result-badge {
    display: inline-flex;
    align-items: center;

    min-height: 26px;

    padding: 4px 9px;

    border: 1px solid var(--figo-success-border);
    border-radius: 999px;

    background: var(--figo-success-bg);
    color: var(--figo-success);

    font-size: 10px;
    font-weight: 800;
}

.client-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 32px;

    padding: 7px 11px;

    border: 1px solid #d9dfe8;
    border-radius: 8px;

    background: #ffffff;
    color: #253047;

    text-decoration: none;

    font-size: 11px;
    font-weight: 700;

    transition:
        background 0.18s ease,
        border-color 0.18s ease;
}

.client-link:hover {
    border-color: #c7d0dc;

    background: #f5f7fa;
}

.client-name-link {
    color: #172033;

    font-weight: 750;

    text-decoration: none;
}

.client-name-link:hover {
    text-decoration: underline;
}

.muted {
    color: #929aa8;

    font-size: 11px;
}


/* =========================================================
   DETALLE CLIENTE
   ========================================================= */

.client-detail-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 14px;

    margin-top: 22px;
}

.client-detail-grid > div {
    min-width: 0;

    padding: 16px;

    border: 1px solid #e6eaf0;
    border-radius: 10px;

    background: #fafbfc;
}

.client-detail-grid span,
.client-detail-grid strong {
    display: block;
}

.client-detail-grid span {
    margin-bottom: 7px;

    color: #808a9b;

    font-size: 11px;
}

.client-detail-grid strong {
    color: #263247;

    font-size: 13px;
    line-height: 1.45;

    overflow-wrap: anywhere;
}

.primary-link,
.secondary-link {
    display: flex;

    width: 100%;
    min-height: 44px;

    align-items: center;
    justify-content: center;

    margin-top: 12px;

    padding: 11px 15px;

    border-radius: 9px;

    text-align: center;
    text-decoration: none;

    font-size: 12px;
    font-weight: 700;

    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

.primary-link {
    background: var(--figo-primary);
    color: #ffffff;
}

.primary-link:hover {
    background: var(--figo-primary-soft);
}

.secondary-link {
    border: 1px solid #d9dfe8;

    background: #ffffff;
    color: #344056;
}

.secondary-link:hover {
    border-color: #c8d1de;

    background: #f8fafc;
}

.primary-link:active,
.secondary-link:active {
    transform: translateY(1px);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {

    .metrics-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 820px) {

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;

        min-height: auto;
        height: auto;
    }

    .sidebar-footer {
        display: none;
    }

    .topbar {
        align-items: flex-start;

        padding: 18px;
    }

    .topbar-user {
        align-items: flex-end;
        flex-direction: column;

        gap: 9px;
    }

    .dashboard-main {
        padding: 20px 18px 32px;
    }

    .welcome-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .client-detail-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 560px) {

    .login-card {
        padding: 28px 22px;
    }

    .metrics-grid,
    .feature-list {
        grid-template-columns: 1fr;
    }

    .user-info {
        display: none;
    }

    .welcome-panel {
        padding: 22px;
    }

    .welcome-panel h2 {
        font-size: 22px;
    }

    .panel {
        padding: 20px;
    }

    .dashboard-main {
        padding-inline: 12px;
    }

}


/* =========================================================
   NUEVO CLIENTE FIGO
   ========================================================= */

.client-form {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.form-field {
    display: grid;
    gap: 7px;
}

.form-field label {
    margin: 0;
    color: #344056;
    font-size: 12px;
    font-weight: 750;
}

.form-field input {
    min-height: 46px;
}

.form-field small {
    color: #8a94a6;
    font-size: 11px;
}

.primary-action {
    margin-top: 4px;
}

.preflight-summary {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 13px;
}

.preflight-ok {
    border: 1px solid var(--figo-success-border);
    background: var(--figo-success-bg);
    color: var(--figo-success);
}

.preflight-fail {
    border: 1px solid var(--figo-danger-border);
    background: var(--figo-danger-bg);
    color: var(--figo-danger);
}

.check-list {
    display: grid;
    gap: 8px;
    margin-top: 15px;
}

.check-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e8ecf2;
    border-radius: 9px;
    background: #fafbfc;
}

.check-item span {
    width: 20px;
    flex: 0 0 20px;
    font-weight: 900;
    text-align: center;
}

.check-item p {
    margin: 0;
    line-height: 1.45;
    font-size: 12px;
}

.check-ok span {
    color: var(--figo-success);
}

.check-fail span {
    color: var(--figo-danger);
}

.preflight-ready {
    margin-top: 18px;
    padding: 15px;
    border: 1px solid #dbe3ec;
    border-radius: 10px;
    background: #f8fafc;
}

.preflight-ready strong,
.preflight-ready p {
    display: block;
}

.preflight-ready p {
    margin: 6px 0 0;
    color: #788397;
    font-size: 11px;
}


/* =========================================================
   CONFIRMACION / CREDENCIALES CLIENTE
   ========================================================= */

.preflight-confirm-form {
    margin-top: 16px;
}

.danger-confirm-button {
    background: #9b2c2c;
    color: #ffffff;
}

.danger-confirm-button:hover {
    background: #842424;
}

.credentials-panel {
    border-color: #d7dee8;
}

.credential-warning {
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid #f0d9a9;
    border-radius: 10px;
    background: #fffaf0;
    color: #765315;
}

.credential-warning strong {
    display: block;
    font-size: 13px;
}

.credential-warning p {
    margin: 5px 0 0;
    line-height: 1.5;
    font-size: 11px;
}

.credential-box {
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid #e2e7ee;
    border-radius: 10px;
    background: #f8fafc;
}

.credential-box span,
.credential-box strong {
    display: block;
}

.credential-box span {
    margin-bottom: 6px;
    color: #7d8797;
    font-size: 11px;
}

.credential-box strong {
    color: #172033;
    font-size: 13px;
    overflow-wrap: anywhere;
}


/* =========================================================
   USUARIOS INTERNOS
   ========================================================= */

.users-table td:first-child {
    min-width: 180px;
}

.user-email {
    display: block;
    margin-top: 4px;
    color: #8a94a6;
    font-size: 10px;
    font-weight: 500;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid #dce3ec;
    border-radius: 999px;
    background: #f5f7fa;
    color: #445166;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.state-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.state-normal {
    border: 1px solid #dbe3ec;
    background: #f8fafc;
    color: #5c6778;
}

.state-warning {
    border: 1px solid #f0d9a9;
    background: #fffaf0;
    color: #765315;
}

.state-blocked {
    border: 1px solid var(--figo-danger-border);
    background: var(--figo-danger-bg);
    color: var(--figo-danger);
}

.state-inactive {
    border: 1px solid #dce2ea;
    background: #f3f5f8;
    color: #6b7485;
}


/* =========================================================
   CREAR USUARIO INTERNO
   ========================================================= */

.form-select {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid #cfd6e2;
    border-radius: 10px;
    background: #ffffff;
    color: var(--figo-text);
    font: inherit;
    outline: none;
}

.form-select:focus {
    border-color: #566981;
    box-shadow:
        0 0 0 3px rgba(86, 105, 129, 0.12);
}

.role-description {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.role-description > div {
    padding: 14px 16px;
    border: 1px solid #e6eaf0;
    border-radius: 10px;
    background: #fafbfc;
}

.role-description strong {
    display: block;
    color: #253047;
    font-size: 12px;
}

.role-description p {
    margin: 6px 0 0;
    color: #788397;
    line-height: 1.5;
    font-size: 11px;
}

/* =========================================================
   DETALLE / EDICION USUARIO
   ========================================================= */

.user-success-notice {
    margin-bottom: 18px;
    padding: 13px 16px;
    border: 1px solid var(--figo-success-border);
    border-radius: 10px;
    background: var(--figo-success-bg);
    color: var(--figo-success);
    font-size: 12px;
    font-weight: 700;
}

/* =========================================================
   ESTADO DE USUARIO
   ========================================================= */

.user-action-form {
    margin-top: 12px;
}

.user-danger-button,
.user-enable-button {
    width: 100%;
    min-height: 44px;
    padding: 11px 15px;
    border-radius: 9px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.user-danger-button {
    background: #9b2c2c;
}

.user-danger-button:hover {
    background: #842424;
}

.user-enable-button {
    background: #247548;
}

.user-enable-button:hover {
    background: #1d633c;
}

.self-protection-note {
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid #e1e6ee;
    border-radius: 10px;
    background: #f8fafc;
}

.self-protection-note strong {
    display: block;
    color: #344056;
    font-size: 12px;
}

.self-protection-note p {
    margin: 5px 0 0;
    color: #7d8797;
    line-height: 1.5;
    font-size: 11px;
}


/* =========================================================
   RESTABLECIMIENTO DE CONTRASEÑA
   ========================================================= */

.user-reset-password-button {
    width: 100%;
    min-height: 44px;
    padding: 11px 15px;
    border: 1px solid #d7ad43;
    border-radius: 9px;
    background: #fff8e6;
    color: #6d5211;
    font-size: 12px;
    font-weight: 700;
}

.user-reset-password-button:hover {
    background: #fcefcc;
}

.temporary-password-box {
    margin: 14px 0;
    padding: 18px;
    overflow-wrap: anywhere;
    border: 1px dashed #c9a13e;
    border-radius: 10px;
    background: #fffaf0;
    text-align: center;
}

.temporary-password-box code {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
}

.credential-warning {
    margin: 14px 0 18px;
    padding: 14px 16px;
    border: 1px solid #ead9ac;
    border-radius: 10px;
    background: #fffdf7;
}

.credential-warning strong {
    display: block;
    margin-bottom: 6px;
}

.credential-warning p {
    margin: 5px 0;
    line-height: 1.55;
    font-size: 12px;
}


/* =========================================================
   AUDITORIA
   ========================================================= */

.audit-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.audit-metric-card {
    padding: 18px;
    border: 1px solid #e1e6ee;
    border-radius: 12px;
    background: #ffffff;
}

.audit-metric-card span {
    display: block;
    margin-bottom: 10px;
    color: #778198;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.audit-metric-card strong {
    display: block;
    color: #111b30;
    font-size: 28px;
    line-height: 1;
}

.audit-metric-card small {
    display: block;
    margin-top: 9px;
    color: #8a94a6;
    font-size: 11px;
}

.audit-panel {
    overflow: hidden;
}

.audit-counter {
    color: #7b8597;
    font-size: 12px;
    font-weight: 700;
}

.audit-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.audit-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}

.audit-table th {
    padding: 12px 14px;
    border-bottom: 1px solid #dde3ec;
    color: #7a8497;
    text-align: left;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.audit-table td {
    padding: 14px;
    border-bottom: 1px solid #edf0f5;
    color: #344056;
    font-size: 12px;
    vertical-align: top;
}

.audit-table tbody tr:last-child td {
    border-bottom: 0;
}

.audit-table tbody tr:hover {
    background: #fafbfd;
}

.audit-date-cell {
    white-space: nowrap;
}

.audit-user-name,
.audit-event-code,
.audit-entity-id {
    display: block;
    margin-top: 4px;
    color: #9099aa;
    font-size: 10px;
}

.audit-system-user {
    color: #8a94a6;
    font-style: italic;
}

.audit-event-name {
    display: block;
}

.audit-result {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.audit-result-success {
    background: #edf8f1;
    color: #246a43;
}

.audit-result-warning {
    background: #fff4e5;
    color: #8a5a13;
}

.audit-detail-cell {
    min-width: 240px;
    line-height: 1.5;
}

.audit-empty-state {
    padding: 30px 18px;
    text-align: center;
}

.audit-empty-state strong {
    display: block;
    color: #344056;
}

.audit-empty-state p {
    margin: 7px 0 0;
    color: #8a94a6;
    font-size: 12px;
}

@media (max-width: 1050px) {
    .audit-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .audit-metrics-grid {
        grid-template-columns: 1fr;
    }
}


cat >> /home/vctecfig/public_html/gestion/assets/css/gestion.css <<'CSS'

/* =========================================================
   P2.5.2 - SEGURIDAD / INTENTOS DE ACCESO
   ========================================================= */

.security-access-page {
    margin: 0;
    min-height: 100vh;
}

.security-access-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}

.security-access-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 28px 20px;
    border-right: 1px solid rgba(127, 127, 127, .18);
}

.security-access-brand {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 0 12px 28px;
}

.security-access-brand strong {
    font-size: 1.45rem;
    letter-spacing: .04em;
}

.security-access-brand span {
    opacity: .7;
}

.security-access-nav {
    display: grid;
    gap: 6px;
}

.security-access-sidebar-footer {
    display: grid;
    gap: 6px;
    margin-top: auto;
    padding: 24px 12px 0;
}

.security-access-sidebar-footer span {
    font-size: .75rem;
    opacity: .6;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.security-access-sidebar-footer a {
    margin-top: 8px;
}

.security-access-main {
    min-width: 0;
    padding: 34px;
}

.security-access-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.security-access-header h1,
.security-access-panel h2 {
    margin: 5px 0 7px;
}

.security-access-header p {
    margin: 0;
    opacity: .72;
}

.security-access-back {
    white-space: nowrap;
}

.security-access-alert {
    margin-bottom: 22px;
    padding: 14px 16px;
    border: 1px solid rgba(180, 90, 90, .35);
    border-radius: 12px;
}

.security-access-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.security-access-metrics article {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid rgba(127, 127, 127, .18);
    border-radius: 14px;
}

.security-access-metrics span {
    font-size: .82rem;
    opacity: .68;
}

.security-access-metrics strong {
    font-size: 1.65rem;
}

.security-access-panel {
    margin-bottom: 24px;
    padding: 22px;
    border: 1px solid rgba(127, 127, 127, .18);
    border-radius: 16px;
}

.security-access-panel-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.security-access-filters {
    display: grid;
    grid-template-columns:
        minmax(160px, 1.2fr)
        minmax(180px, 1fr)
        minmax(140px, .8fr)
        minmax(145px, .8fr)
        minmax(145px, .8fr);
    gap: 14px;
    align-items: end;
}

.security-access-filters label {
    display: grid;
    gap: 7px;
    font-size: .82rem;
}

.security-access-filters input,
.security-access-filters select {
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid rgba(127, 127, 127, .25);
    border-radius: 10px;
    font: inherit;
}

.security-access-filter-actions {
    display: flex;
    gap: 10px;
    grid-column: 1 / -1;
    margin-top: 4px;
}

.security-access-filter-actions button,
.security-access-filter-actions a {
    padding: 10px 15px;
    border-radius: 10px;
}

.security-access-table-wrap {
    overflow-x: auto;
}

.security-access-table {
    width: 100%;
    border-collapse: collapse;
}

.security-access-table th,
.security-access-table td {
    padding: 13px 12px;
    border-bottom: 1px solid rgba(127, 127, 127, .15);
    text-align: left;
    vertical-align: middle;
}

.security-access-table th {
    font-size: .76rem;
    opacity: .65;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.security-access-table td small {
    display: block;
    margin-top: 4px;
    opacity: .62;
}

.security-access-event-code {
    font-weight: 600;
}

.security-access-result {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 700;
}

.security-access-result.success {
    border: 1px solid rgba(75, 150, 100, .35);
}

.security-access-result.failure {
    border: 1px solid rgba(180, 90, 90, .35);
}

.security-access-empty,
.security-access-info {
    padding: 18px;
    border: 1px solid rgba(127, 127, 127, .18);
    border-radius: 14px;
}

.security-access-info p {
    margin: 7px 0 0;
    opacity: .72;
}

@media (max-width: 1100px) {
    .security-access-metrics {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .security-access-filters {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .security-access-shell {
        grid-template-columns: 1fr;
    }

    .security-access-sidebar {
        min-height: auto;
    }

    .security-access-main {
        padding: 22px 16px;
    }

    .security-access-header,
    .security-access-panel-title {
        flex-direction: column;
    }

    .security-access-metrics,
    .security-access-filters {
        grid-template-columns: 1fr;
    }
}
