﻿/* ===============================
   Variables de tema
================================ */

/* Tema claro */
:root {
    --card-bg: #ffffff;
    --card-border: #dee2e6;
    --card-shadow: rgba(0, 0, 0, 0.08);
    --card-text: #212529;
    --card-muted: #6c757d;
    --focus-border: #20c997;
    --focus-shadow: rgba(32, 201, 151, 0.35);
    --focus-bg: #f8f9fa;
    --focus-left: #0d6efd;
    --required-color: darkred;
    --modal-header-bg: linear-gradient(135deg, #f1f3f5, #e9ecef);
    --modal-header-border: #dee2e6;
    --modal-header-text: #212529;
}

/* Tema oscuro */
[data-bs-theme="dark"] {
    --card-bg: #1e1e2d;
    --card-border: #2b2b40;
    --card-shadow: rgba(0, 0, 0, 0.45);
    --card-text: #ffffff;
    --card-muted: #a1a5b7;
    --focus-border: #2fbfa1;
    --focus-shadow: rgba(47, 191, 161, 0.5);
    --focus-bg: #1f2933;
    --focus-left: #4dabf7;
    --required-color: #ff6b6b;
    --modal-header-bg: linear-gradient(135deg, #1f2933, #111827);
    --modal-header-border: #2b2b40;
    --modal-header-text: #ffffff;
}

/* ===============================
   Stat Card
================================ */

.stat-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    cursor: pointer;
    color: var(--card-text);
    transition: all 0.25s ease;
}

    .stat-card:hover {
        border-color: #094780;
        box-shadow: 0 8px 20px var(--card-shadow);
        transform: translateY(-2px);
    }

/* ===============================
   Contenido
================================ */

.stat-label {
    font-size: 0.975rem;
    color: var(--card-muted);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--card-text);
    line-height: 1.1;
    text-shadow: 0 0 0.6px currentColor;
}

.stat-card h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.stat-card small {
    color: #9ca3af; /* gris suave tipo Tailwind */
    font-size: 0.85rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--focus-border);
    box-shadow: 0 0 0 4px var(--focus-shadow);
}
.input-focus:has(input:focus),
.input-focus:has(textarea:focus),
.input-focus:has(select:focus) {
    background-color: var(--focus-bg);
    border-left: 4px solid var(--focus-left);
    padding-left: 10px;
    transition: all 0.2s ease;
}

label.requerido::after {
    content: " *";
    color: var(--required-color);
    font-weight: bold;
}


.form-icon {
    position: relative;
}

/* ICONO */
.form-icon-start {
    position: absolute;
    left: 8px;
    top: 70%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 2;
}

/* INPUT */
.form-icon .form-control {
    padding-left: 2.5rem; /* espacio real para el icono */
     /* IMPORTANTE: altura consistente */
}

/* FOCUS */
.form-icon:focus-within .form-icon-start {
    color: var(--focus-border);
}

/* DARK MODE */
[data-bs-theme="dark"] .form-icon-start {
    color: #b5b8c1;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.25rem;
    height: 80px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background-color: rgba(255,255,255,0.03);
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

    /* ICONO */
    .action-btn i {
        font-size: 1.75rem;
        color: #9ca3af;
        transition: color 0.25s ease;
    }

    /* TEXTO */
    .action-btn span {
        font-size: 0.95rem;
        font-weight: 500;
        color: #e5e7eb;
    }

    /* HOVER */
    .action-btn:hover {
        background-color: rgba(255,255,255,0.08);
        border-color: var(--focus-border);
        transform: translateY(-2px);
    }

        .action-btn:hover i {
            color: var(--focus-border);
        }

.stepper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    padding: 2rem 0;
}

    /* Línea */
    .stepper::before {
        content: "";
        position: absolute;
        top: 36px;
        left: 0;
        right: 0;
        height: 2px;
        background-color: #e5e7eb;
        z-index: 0;
    }

.step {
    position: relative;
    text-align: center;
    z-index: 1;
    width: 100%;
}

/* Ícono */
.step-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #9ca3af;
}

/* Texto */
.step-info {
    margin-top: 0.75rem;
}

.step-title {
    display: block;
    font-weight: 600;
}

.step-text {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Badge */
.step-badge {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f1f5f9;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    color: #374151;
}

/* Estados */
.step.active .step-icon {
    border-color: #2563eb;
    color: #2563eb;
}

.step.completed .step-icon {
    background-color: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.step.disabled {
    opacity: 0.4;
}


.action-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.5rem;
    background-color: var(--bs-body-bg);
    border-top: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 -6px 20px rgba(0,0,0,0.08);
    z-index: 1050;
}

/* Evita que tape el contenido */
body {
    padding-bottom: 90px;
}

/* Dark mode */
[data-bs-theme="dark"] .action-footer {
    border-top-color: rgba(255,255,255,0.1);
    box-shadow: 0 -6px 20px rgba(0,0,0,0.4);
}

.number-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #0d6efd;
    color: #0d6efd;
    font-weight: 600;
    font-size: 0.95rem;
    margin-right: 0.5rem;
}


h1 small {
    color: #9ca3af; /* gris suave tipo Tailwind */
    font-size: 0.85rem;
}


.modal-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    box-shadow: 0 12px 30px var(--card-shadow);
    color: var(--card-text);
    cursor: pointer;
}

.modal-header-custom {
    background: var(--modal-header-bg);
    border-bottom: 1px solid var(--modal-header-border);
    color: var(--modal-header-text);
    padding: 1rem 1.5rem;
}

    .modal-header-custom .modal-title {
        font-size: 1.15rem;
        letter-spacing: 0.3px;
    }

    .modal-header-custom .btn-close {
        filter: invert(1);
        opacity: 0.85;
    }

[data-bs-theme="dark"] .modal-header-custom .btn-close {
    filter: none;
}


.modal-body-custom {
    padding: 1.5rem;
    background-color: var(--card-bg);
}

.modal.fade .modal-dialog {
    transform: translateY(-10px);
    transition: transform .25s ease-out;
}

.modal.show .modal-dialog {
    transform: translateY(0);
}


.modal-body-custom .form-control:focus {
    border-color: var(--focus-border);
    box-shadow: 0 0 0 .2rem var(--focus-shadow);
}

.required::after {
    content: " *";
    color: var(--required-color);
}

@media (max-width: 991.98px) {
    .nav-user {
        min-height: 56px;
        display: flex;
        align-items: center;
    }
}

.modal {
    overflow-y: auto;
}

body.modal-open {
    padding-right: 0 !important;
    overflow-y: auto !important; /* Opcional: permite scroll si la modal es muy larga */
}

body {
    padding-right: 0 !important;
}

.modal {
    overflow-y: auto;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0D6ABF, #094780);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(13, 106, 191, 0.35);
}

    .stat-icon i {
        font-size: 1.6rem;
        color: #ffffff;
    }

.stat-icon-success {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #198754, #146c43);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(13, 106, 191, 0.35);
}

.stat-icon-success i {
    font-size: 1.6rem;
    color: #ffffff;
}

.stat-icon-error {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #dc3545, #a71d2a);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(13, 106, 191, 0.35);
}

.stat-icon-error i {
    font-size: 1.6rem;
    color: #ffffff;
}

.stat-icon-warning {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #fd7e14, #c35a06);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(13, 106, 191, 0.35);
}

.stat-icon-warning i {
    font-size: 1.6rem;
    color: #ffffff;
}

.stat-card-2 {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    cursor: pointer;
    color: var(--card-text);
    transition: all 0.25s ease;
    padding: 0.5rem;
}

.stat-card-2:hover {
    border-color: #094780;
    box-shadow: 0 8px 20px var(--card-shadow);
    transform: translateY(-2px);
}

.stat-value-2 {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--card-text);
    line-height: 1.1;
    text-shadow: 0 0 0.6px currentColor;
}


.card-portlets {
    border-radius: 0.75rem;
    border: 1px solid var(--card-border);
    transition: all 0.25s ease;
}
.card-portlets:hover {
    border-color: #094780;
    box-shadow: 0 8px 20px var(--card-shadow);
    transform: translateY(-2px);
    cursor: pointer;
}