/* =============================================================
   AINEDER FICHAJES - ESTILOS DE LAS PANTALLAS DE GESTIÓN
   (Usuarios, Notificaciones, Región y vacaciones, Saldos,
   Auditoría e Inspección)

   Se apoya en los estilos generales de app.css (user-shell,
   employee-main, employee-hero, timeline-card, panel-error...).
   ============================================================= */

.ax-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin: 0 0 20px;
}

.ax-toolbar .ax-field {
    min-width: 160px;
}

.ax-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ax-field label {
    font-size: 13px;
    font-weight: 600;
    color: #4A4F55;
}

.ax-field input,
.ax-field select,
.ax-field textarea {
    border: 1px solid #D6D8DA;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    background: #ffffff;
    color: #0A0F18;
}

.ax-field input:focus,
.ax-field select:focus,
.ax-field textarea:focus {
    outline: 2px solid rgba(0, 30, 77, 0.25);
    border-color: #001E4D;
}

.ax-field small {
    color: #6B7178;
    font-size: 12px;
}

.ax-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ax-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 900px) {
    .ax-grid-2,
    .ax-grid-3 {
        grid-template-columns: 1fr;
    }
}

.ax-card {
    background: #ffffff;
    border: 1px solid #E6E8EB;
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(10, 15, 24, 0.04);
}

.ax-card h2 {
    margin: 0 0 6px;
    font-size: 18px;
    color: #001E4D;
}

.ax-card > p {
    margin: 0 0 18px;
    color: #6B7178;
    font-size: 14px;
}

.ax-button {
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    background: #001E4D;
    color: #ffffff;
    white-space: nowrap;
}

.ax-button:hover {
    background: #001535;
}

.ax-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ax-button-secondary {
    background: #F0F2F5;
    color: #001E4D;
}

.ax-button-secondary:hover {
    background: #E3E6EA;
}

.ax-button-danger {
    background: #FDECEC;
    color: #B42318;
}

.ax-button-danger:hover {
    background: #FAD7D5;
}

.ax-button-small {
    padding: 6px 10px;
    font-size: 13px;
}

.ax-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 18px;
}

.ax-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.ax-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ax-table th {
    text-align: left;
    padding: 10px 12px;
    background: #F7F8FA;
    color: #4A4F55;
    font-weight: 600;
    border-bottom: 1px solid #E6E8EB;
    white-space: nowrap;
}

.ax-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #F0F2F5;
    vertical-align: middle;
}

.ax-table tr:hover td {
    background: #FAFBFC;
}

.ax-table .ax-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.ax-negativo {
    color: #B42318;
    font-weight: 700;
}

.ax-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #F0F2F5;
    color: #4A4F55;
}

.ax-chip-green {
    background: #E7F7EE;
    color: #067647;
}

.ax-chip-red {
    background: #FDECEC;
    color: #B42318;
}

.ax-chip-blue {
    background: #E8EEF8;
    color: #001E4D;
}

.ax-chip-yellow {
    background: #FFF4D6;
    color: #8A5A00;
}

.ax-switch-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #F0F2F5;
}

.ax-switch-row:last-child {
    border-bottom: none;
}

.ax-switch-row strong {
    display: block;
    font-size: 14px;
    color: #0A0F18;
}

.ax-switch-row span {
    font-size: 13px;
    color: #6B7178;
}

.ax-switch-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #001E4D;
    flex-shrink: 0;
}

.ax-inline-number {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ax-inline-number input {
    width: 90px;
}

.ax-message {
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
}

.ax-message-ok {
    background: #E7F7EE;
    color: #067647;
}

.ax-message-error {
    background: #FDECEC;
    color: #B42318;
}

.ax-message-info {
    background: #E8EEF8;
    color: #001E4D;
}

.ax-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 24, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.ax-modal {
    background: #ffffff;
    border-radius: 18px;
    padding: 24px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.ax-modal h3 {
    margin: 0 0 16px;
    color: #001E4D;
}

.ax-json {
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    white-space: pre-wrap;
    word-break: break-word;
    background: #F7F8FA;
    border-radius: 10px;
    padding: 10px;
    max-height: 260px;
    overflow: auto;
}

.ax-muted {
    color: #6B7178;
    font-size: 13px;
}

.ax-empty {
    text-align: center;
    padding: 32px 16px;
    color: #6B7178;
}


/* =========================================================
   CONTRASEÑAS Y SESIÓN (login, cambiar, recuperar, restablecer)
   ========================================================= */

.login-link-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin: 4px 0 14px;
    flex-wrap: wrap;
}

.login-link-row-center {
    justify-content: center;
    margin: 18px 0 0;
}

.login-link-secondary {
    background: none;
    border: none;
    padding: 0;
    color: #001E4D;
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.login-link-secondary:hover {
    color: #0A3A86;
}

.login-info-modern {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #EEF3FB;
    color: #001E4D;
    font-size: 14px;
    line-height: 1.45;
}

.login-info-ok {
    background: #E9F7EF;
    color: #146C43;
}


/* =========================================================
   AVISO DE UBICACIÓN (fichar desde la web)
   ========================================================= */

.ax-aviso-ubicacion {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #EEF3FB;
    color: #001E4D;
    font-size: 13px;
    line-height: 1.45;
}


/* =========================================================
   SALDO EN LA APROBACIÓN DE VACACIONES
   ========================================================= */

.ax-saldo-solicitud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.ax-saldo-item {
    display: flex;
    flex-direction: column;
    min-width: 92px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #F7F8FA;
    font-size: 12px;
    color: #4A4F55;
}

.ax-saldo-item strong {
    font-size: 16px;
    color: #001E4D;
}

.ax-saldo-item.ax-saldo-ok strong {
    color: #146C43;
}

.ax-saldo-item.ax-saldo-negativo {
    background: #FDECEC;
}

.ax-saldo-item.ax-saldo-negativo strong {
    color: #B42318;
}


/* =========================================================
   FACTURAS DEL MES (AINEDER Admin)
   ========================================================= */

.ax-fact-periodo {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ax-fact-periodo select {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #D6D8DA;
    background: #ffffff;
    font-size: 14px;
    min-width: 120px;
}

.ax-fact-acciones {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ax-fact-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.ax-fact-kpi {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 0;
}

.ax-fact-kpi span {
    color: #6B7178;
    font-size: 13px;
    font-weight: 600;
}

.ax-fact-kpi strong {
    color: #001E4D;
    font-size: 24px;
    font-variant-numeric: tabular-nums;
}

.ax-fact-kpi small {
    color: #6B7178;
    font-size: 12px;
}

.ax-fact-kpi-main {
    background: #001E4D;
}

.ax-fact-kpi-main span,
.ax-fact-kpi-main small {
    color: #D6D8DA;
}

.ax-fact-kpi-main strong {
    color: #ffffff;
}

.ax-fact-botones {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 200px;
}

.ax-fact-anulada td {
    opacity: .55;
    text-decoration: line-through;
}

.ax-fact-anulada td:last-child {
    text-decoration: none;
}

.ax-table td .ax-chip {
    margin: 4px 4px 0 0;
}
