/* IMPORTS */
@import url('./app-admin.css');
@import url('./app-gestor.css');
@import url('./app-empleado.css');
@import url('./app-skeleton.css');

@font-face {
    font-family: 'Inter';
    src:
        url('./fonts/Inter/Inter-Regular.woff2') format('woff2'),
        url('./fonts/Inter/Inter-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('./fonts/Inter/Inter.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* GLOBAL */
:root {
    --bs-info: #3b82f6;
    --bs-info-rgb: 59, 130, 246;
    --bs-secondary-color: #64748b;
}

@view-transition {
    navigation: auto;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #eff1f5;
    background-image: url('/storage/background_login.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    font-family: 'Inter';
}

.nav .nav-link {
    color: #475569;
}

.nav .nav-link:hover {
    font-weight: 500;
    color: #475569;
}

.nav-pills .nav-link.active,
.nav-pills .show>.nav-link {
    background-color: #e8f3fe;
    color: #137FEC;
    font-weight: 500;
}

.nav .nav-link:focus {
    color: #137FEC;
}

.form-switch .form-check-input {
    transform: scale(1.4);
    transform-origin: left center;
}

.form-check-input:not(:checked) {
    background-color: #94a3b8;
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3ccircle cx='10' cy='10' r='7' fill='%23ffffff'/%3e%3c/svg%3e");
}

.form-check-input:checked {
    background-color: #62af7c;
    border-color: transparent;
}

.form-check-input:focus {
    box-shadow: none;
}

.input-pers {
    background-color: #f1f5f9;
    color: #64748B;
    border: 1px solid #94A3B8;
}

.active {
    color: #137FEC;
}

.toast-message {
    z-index: 1080;
    max-width: min(640px, calc(100vw - 2rem));
    width: 100%;
    box-sizing: border-box;
}

.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 1090;
    background: rgba(15, 23, 42, 0.95);
    color: #f8fafc;
    border-radius: 0.75rem;
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.35);
}

.cookie-banner__content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.9rem 1rem;
    font-size: 0.92rem;
}

@media (min-width: 768px) {
    .cookie-banner {
        left: auto;
        max-width: 540px;
    }

    .cookie-banner__content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* ===LOGIN=== */

.form-control::placeholder {
    color: #64748B;
    font-size: 18px;
}

.login-label {
    font-size: 22px;
    color: #475569;
}

/* ===DASHBOARD=== */

.menu {
    border-right: 1px solid #E2E8F0;
    background-color: #f8fafc;
    width: 260px;
    overflow-x: hidden;
    height: 100vh;
    position: sticky;
    top: 0;
}

.sidebar-footer {
    min-width: 0;
}

.sidebar-footer .sidebar-user-info {
    max-width: 100%;
}

.sidebar-header {
    min-height: 72px;
}

.logo-menu {
    min-height: 90px;
}

.sidebar-header {
    position: relative;
    min-height: 72px;
}

.sidebar-logo {
    max-height: 50px;
    width: auto;
}

.sidebar-logo-full {
    display: block;
}

.sidebar-logo-favicon {
    display: none;
    max-height: 32px;
    width: auto;
}

.sidebar-nav-icon {
    flex-shrink: 0;
    width: 1.5rem;
}

.logo-menu {
    border-bottom: 1px solid #E2E8F0;
    height: 90px;
    background-color: #f8fafc;
}

.content-header {
    border-bottom: 1px solid #E2E8F0;
    min-height: 90px;
    background-color: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 200;
}

main.flex-fill {
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.logout-menu {
    border-top: 1px solid #E2E8F0;
}

.card-title {
    color: #64748B;
}

.mnt-empresa {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.text-slate-400 {
    color: #94A3B8;
}

.text-green-500 {
    color: #22C55E;
}

.text-orange-500 {
    color: #F29201;
}

.text-brand-primary {
    color: #137FEC;
}

.font-tabular-nums {
    font-variant-numeric: tabular-nums;
}

.auth-toast-container {
    z-index: 1080;
    max-width: 480px;
    width: 100%;
}

.login-btn-fixed-width {
    width: 20rem;
}

.link-inherit-no-decoration {
    text-decoration: none;
    color: inherit;
}

.bg-orange-500 {
    background-color: #F29201;
}

.bg-slate-100 {
    background-color: #eaedf2;
}

.bg-blue-soft {
    background-color: #dde8f5;
}

.icon-box-60 {
    width: 60px;
    height: 60px;
}

.icon-box-34 {
    width: 34px;
    height: 34px;
}

.icon-box-22 {
    width: 22px;
    height: 22px;
}

.icon-size-4rem {
    font-size: 4rem;
}

.text-compact-meta {
    font-size: 0.85rem;
    line-height: 1.1;
}

.icon-clock-muted {
    font-size: 2rem;
    color: #94A3B8;
}

.error-image-10 {
    width: 10%;
}

.error-image-30 {
    width: 30%;
}

.correction-icon-chip {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.18);
}

.footer-caption-muted {
    color: #bdbec2;
    font-size: 0.75rem;
}

.status-pill {
    min-width: 32px;
    height: 24px;
}

.table-empresas-wrapper,
.table-empleados-wrapper,
.table-gestores-wrapper {
    height: 50vh;
    overflow-y: auto;
    overflow-x: auto;
    border-radius: var(--bs-border-radius, 0.5rem);
    background: #fff;
}

.table-empresas-wrapper .table-empresas thead th,
.table-empleados-wrapper .table-empleados thead th,
.table-gestores-wrapper .table-gestores thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: #f8fafc;
    box-shadow: 0 1px 0 0 #e9ecef;
}

.table-empresas tbody tr,
.table-empleados tbody tr,
.table-gestores tbody tr,
.table-empresas thead tr {
    border: none;
    border-bottom: 1px solid #e9ecef;
}

.table-empresas thead tr th,
.table-empleados thead tr th,
.table-gestores thead tr th {
    background-color: #f8fafc;
    padding: 1.5rem;
    color: #94A3B8 !important;
    font-weight: normal;
}

.table-empresas td,
.table-empleados td,
.table-gestores td {
    vertical-align: middle;
    padding: 1.5rem;
}

.table-empresas .action-icons i,
.table-empleados .action-icons i,
.table-gestores .action-icons i {
    cursor: pointer;
    margin-right: 0.5rem;
}

.table-empresas .company-logo,
.table-empleados .company-logo,
.table-gestores .company-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-right: 0.5rem;
}

.table-empresas .company-info,
.table-empleados .company-info,
.table-gestores .company-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-empresas .company-text,
.table-empleados .company-text,
.table-gestores .company-text {
    font-size: 0.875rem;
    color: #6c757d;
    line-height: 1.1;
}

.td-empresa~td,
.td-empleado~td,
.td-gestor~td {
    text-align: center;
}

.badge-inactiva {
    background-color: #FEE2E2;
    color: #F87171;
    width: 100%;
}

.badge-activa {
    background-color: #DCFCE7;
    color: #62AF7C;
    width: 100%;
}

/* ===MOBILE=== */

.notification-icon {
    width: 30px;
    height: 30px;
    background-color: rgba(19, 127, 236, 0.09);
}

.main-mobile {
    height: 90dvh;
    overflow-y: auto;
}

.footer-mobile {
    height: 10dvh;
    min-height: 90px;
    background-color: #f8fafc;
    position: fixed;
    bottom: 0;
    z-index: 1000;
}

.footer-menu {
    height: calc(100% - 20px);
}

.footer-version {
    height: 20px;
    background: #137FEC;
    color: #ffffff;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
}

/* === HAMBURGER BTN (oculto en escritorio) === */
.hamburger-btn {
    display: none;
    border: none;
    background: transparent;
    color: #475569;
    font-size: 1.4rem;
    padding: 0.4rem 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

.hamburger-btn:hover {
    background: #e8f3fe;
    color: #137FEC;
}

/* === OVERLAY backdrop del sidebar en móvil === */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1044;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(1px);
}

.sidebar-overlay.active {
    display: block;
}

/* === TABLET + MÓVIL: solo dos modos — oculto u off-canvas completo === */
@media (max-width: 991.98px) {
    .hamburger-btn {
        display: flex;
    }

    .menu {
        position: fixed !important;
        left: -280px;
        top: 0;
        height: 100vh !important;
        z-index: 1045;
        width: 260px !important;
        transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
    }

    .menu.sidebar-open {
        left: 0;
        box-shadow: 6px 0 24px rgba(15, 23, 42, 0.2);
    }

    .table-col-date {
        display: none;
    }

    .content-header {
        padding: 0.875rem 1rem !important;
        min-height: 64px !important;
    }

    .gestor-dashboard-shell {
        padding: 1rem !important;
    }
}

/* En pantallas muy pequeñas ocultar el texto del botón de acción del header
   (se mantiene el icono; font-size:0 oculta nodos de texto inline) */
@media (max-width: 575.98px) {
    .content-header .ms-auto .btn {
        font-size: 0;
        padding-left: 0.6rem;
        padding-right: 0.6rem;
    }

    .content-header .ms-auto .btn i {
        font-size: 1rem;
        margin: 0 !important;
    }
}

/* === MODALES: evitar que header/footer queden fuera de la pantalla ===
   Se fuerza el mismo comportamiento que .modal-dialog-scrollable (altura acotada
   al viewport con scroll interno en el body) en TODOS los modales, aunque no
   incluyan esa clase, para que los botones del footer nunca queden ocultos. */
@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
        height: calc(100% - 1rem);
    }

    .modal-content {
        max-height: 100%;
        overflow: hidden;
    }

    .modal-body {
        overflow-y: auto;
    }

    .modal-footer {
        flex-wrap: wrap;
        row-gap: 0.5rem;
    }

    .modal-footer > * {
        flex: 1 1 auto;
        margin: 0;
    }
}