/* ==========================================================================
   Paleta de Colores Corporativa (Verde Esmeralda #1BCB81 y Gris Grafito #606062)
   ========================================================================== */

:root {
    --brand-primary: #1BCB81;
    --brand-primary-hover: #16b06f;
    --brand-primary-active: #12925c;
    --brand-primary-light: #E8FAF2;
    --brand-primary-border: #b3f0d4;
    --brand-secondary: #606062;
    --brand-secondary-hover: #4d4d4f;
    --brand-dark: #242628;
    --brand-dark-header: #1b1d1f;
}

/* --------------------------------------------------------------------------
   1. Botones Primarios y Secundarios
   -------------------------------------------------------------------------- */
.btn-primary {
    background-color: #1BCB81 !important;
    border-color: #1BCB81 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(27, 203, 129, 0.25);
    transition: all 0.2s ease-in-out;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #16b06f !important;
    border-color: #16b06f !important;
    color: #ffffff !important;
    box-shadow: 0 4px 8px rgba(27, 203, 129, 0.35);
}

.btn-primary:active,
.btn-primary.active {
    background-color: #12925c !important;
    border-color: #12925c !important;
    color: #ffffff !important;
}

.btn-outline-primary {
    color: #1BCB81 !important;
    border-color: #1BCB81 !important;
    background-color: transparent !important;
    transition: all 0.2s ease-in-out;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: #1BCB81 !important;
    border-color: #1BCB81 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 8px rgba(27, 203, 129, 0.25);
}

.btn-secondary {
    background-color: #606062 !important;
    border-color: #606062 !important;
    color: #ffffff !important;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #4d4d4f !important;
    border-color: #4d4d4f !important;
}

/* --------------------------------------------------------------------------
   2. Textos, Fondos e Insignias (Badges)
   -------------------------------------------------------------------------- */
.text-primary {
    color: #1BCB81 !important;
}

.bg-primary {
    background-color: #1BCB81 !important;
    color: #ffffff !important;
}

.badge-primary {
    background-color: #1BCB81 !important;
    color: #ffffff !important;
}

.badge-secondary {
    background-color: #606062 !important;
    color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   3. Tarjetas (Cards)
   -------------------------------------------------------------------------- */
.card-primary.card-outline {
    border-top: 3px solid #1BCB81 !important;
}

.card-secondary.card-outline {
    border-top: 3px solid #606062 !important;
}

.card {
    border-radius: 0.5rem;
}

.card-header:first-child {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

/* --------------------------------------------------------------------------
   4. Barra Lateral de Navegación (Sidebar)
   -------------------------------------------------------------------------- */
.main-sidebar {
    background-color: #242628 !important;
}

.brand-link {
    background-color: #1b1d1f !important;
    border-bottom: 1px solid #333639 !important;
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active,
.sidebar-light-primary .nav-sidebar > .nav-item > .nav-link.active {
    background-color: #1BCB81 !important;
    color: #ffffff !important;
    box-shadow: 0 3px 8px rgba(27, 203, 129, 0.4) !important;
    font-weight: 600;
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   5. Elementos de Formulario (Inputs, Checks, Focus)
   -------------------------------------------------------------------------- */
.form-control:focus,
.custom-select:focus {
    border-color: #1BCB81 !important;
    box-shadow: 0 0 0 0.2rem rgba(27, 203, 129, 0.25) !important;
}

.custom-control-input:checked ~ .custom-control-label::before {
    background-color: #1BCB81 !important;
    border-color: #1BCB81 !important;
}

.page-item.active .page-link {
    background-color: #1BCB81 !important;
    border-color: #1BCB81 !important;
    color: #ffffff !important;
}

.page-link {
    color: #606062;
}

.page-link:hover {
    color: #1BCB81;
}

/* --------------------------------------------------------------------------
   6. Encabezados de Tarjetas y Alineación de Botones a la Derecha
   -------------------------------------------------------------------------- */
.card-header::after,
.card-header::before {
    display: none !important;
}

.card-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap;
    gap: 0.5rem;
    position: relative;
    width: 100% !important;
}

.card-header > .card-title,
.card-header .card-title {
    float: none !important;
    margin-bottom: 0 !important;
    margin-right: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    font-size: 1.15rem;
}

.card-header > .card-tools,
.card-header .card-tools,
.card-header > div:last-child:not(.card-title):not(:first-child),
.card-header > a.btn:last-child,
.card-header > button.btn:last-child {
    float: none !important;
    margin-left: auto !important;
    margin-right: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

.card-header .card-tools .btn + .btn,
.card-header .card-tools a + a,
.card-header .card-tools .btn + a,
.card-header .card-tools a + .btn {
    margin-left: 0.35rem;
}

.card-header .card-tools form {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0;
}
