/* =========================================================================
   Hypnos — tema sobre Bootstrap 5.3
   Colores del logo:  menta #87C8B2 (alas) · tinta #111418 (texto)
   Primario accesible (texto blanco AA): #247A61
   ========================================================================= */
:root {
    --hy-mint:        #87C8B2;
    --hy-mint-subtle: #E7F5F0;
    --hy-mint-dark:   #247A61;
    --hy-mint-darker: #1B5E4B;
    --hy-ink:         #111418;

    --bs-primary: var(--hy-mint-dark);
    --bs-primary-rgb: 36, 122, 97;
    --bs-primary-text-emphasis: var(--hy-mint-darker);
    --bs-primary-bg-subtle: var(--hy-mint-subtle);
    --bs-primary-border-subtle: #b9e0d2;
    --bs-link-color: var(--hy-mint-dark);
    --bs-link-color-rgb: 36, 122, 97;
    --bs-link-hover-color: var(--hy-mint-darker);
    --bs-link-hover-color-rgb: 27, 94, 75;
    --bs-body-color: var(--hy-ink);
    --bs-body-bg: #F4F6F8;
    --bs-body-font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-border-radius: .5rem;
    --bs-focus-ring-color: rgba(135, 200, 178, .45);
}

.btn-primary {
    --bs-btn-bg: var(--hy-mint-dark);
    --bs-btn-border-color: var(--hy-mint-dark);
    --bs-btn-hover-bg: var(--hy-mint-darker);
    --bs-btn-hover-border-color: var(--hy-mint-darker);
    --bs-btn-active-bg: #164c3d;
    --bs-btn-active-border-color: #164c3d;
    --bs-btn-disabled-bg: var(--hy-mint-dark);
    --bs-btn-disabled-border-color: var(--hy-mint-dark);
    --bs-btn-focus-shadow-rgb: 135, 200, 178;
}
.btn-outline-primary {
    --bs-btn-color: var(--hy-mint-dark);
    --bs-btn-border-color: var(--hy-mint-dark);
    --bs-btn-hover-bg: var(--hy-mint-dark);
    --bs-btn-hover-border-color: var(--hy-mint-dark);
    --bs-btn-active-bg: var(--hy-mint-darker);
}
/* Botón principal de acceso: menta con texto oscuro, como el logo */
.btn-mint {
    --bs-btn-bg: var(--hy-mint);
    --bs-btn-border-color: var(--hy-mint);
    --bs-btn-color: var(--hy-ink);
    --bs-btn-hover-bg: #72bca3;
    --bs-btn-hover-border-color: #72bca3;
    --bs-btn-hover-color: var(--hy-ink);
    --bs-btn-active-bg: #62b096;
    --bs-btn-active-color: var(--hy-ink);
    font-weight: 600;
}
.form-control, .form-select { background-color: #fff; }
.form-control:disabled, .form-select:disabled { background-color: #f3f4f6; }
.text-uppercase::placeholder { text-transform: none; }
.form-control:focus, .form-select:focus { border-color: var(--hy-mint); box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.form-check-input:checked { background-color: var(--hy-mint-dark); border-color: var(--hy-mint-dark); }

/* --- Login y pantallas públicas --- */
.auth-bg { background: radial-gradient(circle at 20% 10%, var(--hy-mint-subtle), transparent 45%), var(--bs-body-bg); }
.auth-card { max-width: 420px; width: 100%; }
.auth-logo { display: block; width: 190px; max-width: 70%; height: auto; margin: 0 auto 1.75rem; }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--bs-secondary-color); font-size: .8125rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--bs-border-color); }

/* --- Layout principal --- */
.app-sidebar { width: 250px; }
.app-sidebar .sidebar-logo { width: 140px; height: auto; }
.app-sidebar .nav-link { color: #4b5563; border-radius: .5rem; padding: .55rem .75rem; display: flex; align-items: center; gap: .6rem; font-weight: 500; }
.app-sidebar .nav-link i { font-size: 1.05rem; }
.app-sidebar .nav-link:hover { background: #f3f4f6; color: var(--hy-ink); }
.app-sidebar .nav-link.active { background: var(--hy-mint-subtle); color: var(--hy-mint-darker); }
.app-sidebar .nav-link.active i { color: var(--hy-mint-dark); }
.sidebar-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: #9ca3af; padding: 1.25rem .75rem .35rem; }
@media (min-width: 992px) {
    .app-sidebar { position: sticky; top: 0; height: 100vh; }
}
.app-topbar { min-height: 64px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .8rem; font-weight: 700; background: var(--hy-mint); color: var(--hy-ink); }

/* --- Componentes --- */
.modal { --bs-modal-bg: #fff; }
.dropdown-menu { --bs-dropdown-bg: #fff; }
.card { --bs-card-bg: #fff; border: 0; box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08); }
.stat-icon { width: 44px; height: 44px; border-radius: .75rem; display: grid; place-items: center; font-size: 1.25rem; }
.table > :not(caption) > * > * { padding: .75rem 1rem; }
.table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; font-weight: 600; background: #f9fafb; white-space: nowrap; }
.table td { white-space: nowrap; }
.row-inactive td { color: #9ca3af; }

/* Roles y estados */
.badge-rol-administrador { background: var(--hy-ink); color: #fff; }
.badge-rol-gerencia      { background: #dbeafe; color: #1e40af; }
.badge-rol-analista      { background: var(--hy-mint-subtle); color: var(--hy-mint-darker); }
.badge-estado-activo     { background: #dcfce7; color: #166534; }
.badge-estado-pendiente  { background: #fef3c7; color: #92400e; }
.badge-estado-inactivo   { background: #f3f4f6; color: #6b7280; }

.btn-google { display: flex; align-items: center; justify-content: center; gap: .6rem; }

/* Tarjetas de áreas del dashboard (clicables, abren modal) */
.area-negocios    { --area-a: #247A61; --area-b: #3fa684; }
.area-especiales  { --area-a: #b45309; --area-b: #e08a1e; }
.area-seguimiento { --area-a: #1e40af; --area-b: #3b6fd8; }
.area-card {
    display: flex; flex-direction: column; gap: .75rem; min-height: 170px;
    padding: 1.4rem 1.5rem; border: 0; border-radius: 1rem; color: #fff; cursor: pointer;
    background: linear-gradient(135deg, var(--area-a, #247A61), var(--area-b, #3fa684));
    box-shadow: 0 6px 18px -6px var(--area-a, #247A61);
    position: relative; overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}
.area-card::after { /* brillo decorativo */
    content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px;
    border-radius: 50%; background: rgba(255, 255, 255, .12);
}
.area-card:hover, .area-card:focus-visible {
    transform: translateY(-4px); box-shadow: 0 14px 28px -8px var(--area-a); outline: none;
}
.area-card:focus-visible { box-shadow: 0 0 0 .25rem rgba(135, 200, 178, .6), 0 14px 28px -8px var(--area-a); }
.area-card:active { transform: translateY(-1px); }
.area-icon { width: 46px; height: 46px; border-radius: .8rem; display: grid; place-items: center; font-size: 1.35rem; background: rgba(255, 255, 255, .2); }
.area-title { font-size: 1.15rem; font-weight: 700; line-height: 1.25; }
.area-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; }
.area-count { font-size: 1.9rem; font-weight: 800; line-height: 1; opacity: .9; }
.area-go { font-size: .85rem; font-weight: 600; opacity: .85; transition: transform .18s ease, opacity .18s ease; }
.area-card:hover .area-go { transform: translateX(4px); opacity: 1; }
.area-modal-header { color: #fff; background: linear-gradient(135deg, var(--area-a), var(--area-b)); border: 0; }
.area-movimientos { --area-a: #0f766e; --area-b: #2bb3a3; }
.area-card-sm { min-height: 140px; padding: 1.2rem 1.3rem; }
.area-card-sm .area-title { font-size: 1.05rem; }
.border-dashed { border-style: dashed !important; }
[data-paso]:not([hidden]) { animation: paso-in .2s ease; }
@keyframes paso-in { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }

/* Campos automáticos en formularios */
.auto-field { height: 100%; padding: .75rem .9rem; border-radius: .6rem; background: #f6f7f9; border: 1px solid #eceef1; }
.auto-field-accent { background: var(--hy-mint-subtle); border-color: #cfeadf; }
.auto-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; display: flex; gap: .35rem; align-items: center; }
.auto-value { font-weight: 600; margin-top: .2rem; line-height: 1.25; }
.auto-field-accent .auto-value { color: var(--hy-mint-darker); }
.auto-hint { font-size: .75rem; color: #6b7280; margin-top: .15rem; }
