/**
 * ConectaTempo — Dashboard SaaS (layout + Bootstrap 5).
 * Cargar después de bootstrap.min.css.
 */

:root {
    --saas-sidebar-w: 200px;
    --saas-sidebar-bg: #ffffff;
    --saas-sidebar-border: #e2e8f0;
    --saas-sidebar-text: #475569;
    --saas-sidebar-hover-bg: #f8fafc;
    --saas-main-bg: #f8fafc;
    --saas-surface: #ffffff;
    --saas-text: #1e293b;
    --saas-border-table: #e2e8f0;
    --saas-primary: #2563eb;
    --saas-primary-hover: #1d4ed8;
    --saas-primary-light: #dbeafe;
    --kw-btn-primary-start: #eff6ff;
    --kw-btn-primary-end: #dbeafe;
    --kw-btn-radius: 14px;
    --kw-btn-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
    --kw-btn-shadow-active: 0 2px 8px rgba(15, 23, 42, 0.16);
    --kw-btn-primary-border: #bfdbfe;
    --kw-btn-primary-text: #0f172a;
}

html {
    box-sizing: border-box;
    height: 100%;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--saas-text);
    background: var(--saas-main-bg);
    height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

svg, i, .icon {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px;
    max-height: 20px;
    display: inline-block;
}

.sidebar-nav-link svg,
.sidebar-nav-link i,
.sidebar-nav-link .icon {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px;
    max-height: 18px;
    display: inline-block;
}

.sidebar-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.sidebar-icon i {
    width: auto !important;
    height: auto !important;
}

.sidebar-icon-emoji{
    font-size: 18px;
    line-height: 1;
}

.sidebar-float-icon {
    font-size: 16px;
    line-height: 1;
}

body.sidebar-collapsed {
    --saas-sidebar-w: 64px;
}

.emp-menu-btn{
    position: fixed;
    top: 12px;
    left: calc(var(--saas-sidebar-w) + 12px);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #4a5568;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
    z-index: 50;
}

body[data-role="empleado"] .emp-menu-btn,
body[data-role="worker"] .emp-menu-btn,
body[data-role="oficina"] .emp-menu-btn{
    display: inline-flex;
    left: auto;
    right: 12px;
}

.emp-menu-btn:hover{
    background: #f8fafc;
    color: #111827;
}

.emp-simple{
    padding: 18px;
}

.emp-simple-head{
    margin-bottom: 12px;
}

.emp-simple-hello{
    font-size: 1.35rem;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.02em;
}

.emp-simple-sub{
    color: #64748b;
}

.emp-simple-meta{
    margin-top: 10px;
    border-top: 1px solid #e2e8f0;
    padding-top: 10px;
    display: grid;
    gap: 8px;
}

.emp-simple-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.emp-simple-actions{
    margin-top: 14px;
    display:flex;
    gap: 10px;
    flex-wrap: wrap;
}

.emp-calendar-card{
    padding: 18px;
}

.emp-calendar-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.emp-calendar-title{
    font-weight: 800;
    color: #111827;
}

.emp-calendar-list{
    display:flex;
    flex-direction:column;
    gap: 10px;
}

.emp-calendar-item{
    display:grid;
    grid-template-columns: 92px 1fr auto;
    gap: 10px;
    align-items:center;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
}

.emp-calendar-date{
    font-weight: 800;
    color: #111827;
    font-size: 0.9rem;
}

.emp-calendar-name{
    color: #334155;
    font-weight: 700;
}

.emp-calendar-tag{
    font-size: 0.75rem;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.emp-calendar-tag--ausencia{ background:#fff7ed; color:#9a3412; }
.emp-calendar-tag--festivo{ background:#eff6ff; color:#1d4ed8; }
.emp-calendar-tag--turno{ background:#ecfdf5; color:#047857; }

@media (max-width: 520px){
    .emp-calendar-item{ grid-template-columns: 1fr; }
}

/* ========== Shell: flex + altura viewport ========== */
.app-shell {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    height: 100vh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

body.is-embed .app-shell {
    height: auto;
    max-height: none;
    overflow: visible;
}

body.is-embed .content,
body.is-embed .main-scroll-region {
    overflow: visible;
}

body.is-embed .content,
body.is-embed .main-scroll-region {
    background: #ffffff;
}

body.is-embed .app-page-inner.container-fluid {
    padding: 16px !important;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

/* ========== Sidebar ========== */
.sidebar {
    flex: 0 0 var(--saas-sidebar-w);
    width: var(--saas-sidebar-w);
    min-width: 0;
    background: var(--saas-sidebar-bg);
    border-right: 1px solid var(--saas-sidebar-border);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: flex-basis 0.2s ease, width 0.2s ease;
}

.sidebar-menu-toggle {
    flex-shrink: 0;
    width: calc(100% - 16px);
    margin: 12px 8px 8px;
    padding: 10px;
    border: 1px solid var(--saas-sidebar-border);
    border-radius: 6px;
    background: #f0f1f4;
    color: #333;
    cursor: pointer;
    font-size: 1rem;
}

.sidebar-menu-toggle:hover {
    background: var(--saas-sidebar-hover-bg);
}

.sidebar-brand {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 12px 10px 12px 12px;
    width: 100%;
    gap: 10px;
}

.sidebar-brand-left{
    display:flex;
    align-items:center;
    flex: 1 1 auto;
    min-width:0;
}

.sidebar-brand-logo {
    max-width: 160px;
    max-height: 48px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.sidebar-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #000;
    letter-spacing: -0.02em;
}

/* Navegación: enlaces en columna */
.sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 0 6px 10px;
    gap: 0;
}

.sidebar-nav-section {
    margin: 12px 0 6px;
    padding-top: 8px;
    border-top: 1px solid var(--saas-sidebar-border);
}

.sidebar-nav-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.sidebar-section-title {
    display: block;
    padding: 0 12px 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6c757d;
}

.sidebar-top-toggle {
    position: static;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid var(--saas-sidebar-border);
    background: #ffffff;
    color: #4a5568;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
    z-index: 2;
    cursor: pointer;
}

.sidebar-top-toggle:hover {
    background: var(--saas-sidebar-hover-bg);
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    margin: 0;
    color: var(--saas-sidebar-text);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    background: transparent;
    text-align: left;
    box-sizing: border-box;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-nav-link:hover {
    background: var(--saas-sidebar-hover-bg);
    color: #000;
    text-decoration: none;
}

.sidebar-nav-link:hover .sidebar-icon {
    color: var(--empresa-accent);
}

.sidebar-nav-link.is-active {
    background: #dee2e6;
    color: #000;
    font-weight: 600;
}

.sidebar-nav-link.is-active .sidebar-icon {
    color: var(--empresa-accent);
}

.sidebar-label {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-pill {
    flex-shrink: 0;
    margin-left: auto;
    min-width: 1.25rem;
    padding: 0 0.35rem;
    height: 1.25rem;
    border-radius: 999px;
    background: #000;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.25rem;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-link-logout {
    flex-shrink: 0;
    margin: auto 8px 12px;
    padding-top: 12px;
    border-top: 1px solid var(--saas-sidebar-border);
    color: #6c757d;
}

.sidebar-link-logout:hover {
    color: #000;
}

/* Submenú empleado */
.sidebar-submenu {
    margin: 0;
}

.sidebar-submenu > summary {
    list-style: none;
    cursor: pointer;
}

.sidebar-submenu > summary::-webkit-details-marker {
    display: none;
}

.sidebar-submenu > summary::after {
    content: "▸";
    margin-left: auto;
    font-size: 0.75rem;
    opacity: 0.6;
    flex-shrink: 0;
}

.sidebar-submenu[open] > summary::after {
    transform: rotate(90deg);
    display: inline-block;
}

.sidebar-submenu-links {
    display: flex;
    flex-direction: column;
    padding: 4px 0 4px 8px;
}

.sidebar-submenu-link {
    padding: 8px 14px 8px 14px;
    font-size: 0.875rem;
}

/* Colapsar menú */
body.sidebar-collapsed .sidebar-label,
body.sidebar-collapsed .sidebar-section-title,
body.sidebar-collapsed .sidebar-title {
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
    position: absolute;
}

body.sidebar-collapsed .sidebar-brand-logo {
    max-width: 28px;
    max-height: 28px;
}

body.sidebar-collapsed .sidebar-brand{
    padding: 10px 8px 10px 10px;
}

body.sidebar-collapsed .sidebar-top-toggle{
    width: 26px;
    height: 26px;
}

body.sidebar-collapsed .sidebar-nav-link {
    padding: 6px 6px;
    text-align: center;
    justify-content: center;
    gap: 0;
}

body.sidebar-collapsed .sidebar-nav-link:hover {
    background: transparent;
}

body.sidebar-collapsed .sidebar-nav-link:hover .sidebar-icon {
    background: #e9ecef;
    color: #000;
}

body.sidebar-collapsed .sidebar-nav-link.is-active {
    background: transparent;
}

body.sidebar-collapsed .sidebar-nav-link.is-active .sidebar-icon {
    background: #e9ecef;
}

body.sidebar-collapsed .sidebar-submenu > summary::after {
    display: none;
}

body.sidebar-collapsed .toggle-label {
    display: none;
}

/* Sidebar overlay (solo empleado/worker/oficina): no empuja el contenido */
body[data-role="empleado"] .sidebar,
body[data-role="worker"] .sidebar,
body[data-role="oficina"] .sidebar{
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #111827;
    color: #e5e7eb;
}

body[data-role="empleado"] .content,
body[data-role="worker"] .content,
body[data-role="oficina"] .content{
    margin-left: 0;
}

/* Empleados: el main-scroll-region es el contenedor de scroll real */
body[data-role="empleado"] .app-shell,
body[data-role="worker"] .app-shell,
body[data-role="oficina"] .app-shell {
    overflow: hidden;
    height: 100dvh;
    max-height: 100dvh;
}

body[data-role="empleado"] .content,
body[data-role="worker"] .content,
body[data-role="oficina"] .content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

body[data-role="empleado"] .main-scroll-region,
body[data-role="worker"] .main-scroll-region,
body[data-role="oficina"] .main-scroll-region {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

body[data-role="empleado"] .sidebar-brand,
body[data-role="worker"] .sidebar-brand,
body[data-role="oficina"] .sidebar-brand{
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

body[data-role="empleado"] .sidebar-title,
body[data-role="worker"] .sidebar-title,
body[data-role="oficina"] .sidebar-title{
    color: #f9fafb;
}

body[data-role="empleado"] .sidebar-nav-link,
body[data-role="worker"] .sidebar-nav-link,
body[data-role="oficina"] .sidebar-nav-link{
    color: #e5e7eb;
}

body[data-role="empleado"] .sidebar-nav-link:hover,
body[data-role="worker"] .sidebar-nav-link:hover,
body[data-role="oficina"] .sidebar-nav-link:hover{
    color: #ffffff;
}

body[data-role="empleado"] .sidebar-nav-link .sidebar-icon,
body[data-role="worker"] .sidebar-nav-link .sidebar-icon,
body[data-role="oficina"] .sidebar-nav-link .sidebar-icon{
    color: #e5e7eb;
}

body[data-role="empleado"] .sidebar-nav-link:hover .sidebar-icon,
body[data-role="worker"] .sidebar-nav-link:hover .sidebar-icon,
body[data-role="oficina"] .sidebar-nav-link:hover .sidebar-icon{
    background: rgba(255,255,255,0.08);
    color: #ffffff;
}

body[data-role="empleado"] .sidebar-nav-link.is-active,
body[data-role="worker"] .sidebar-nav-link.is-active,
body[data-role="oficina"] .sidebar-nav-link.is-active{
    background: rgba(255,255,255,0.06);
}

.sidebar-nav-section--emp{
    padding-top: 6px;
}

body[data-role="empleado"] .sidebar-nav-section--emp,
body[data-role="worker"] .sidebar-nav-section--emp,
body[data-role="oficina"] .sidebar-nav-section--emp{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px 10px 6px;
}

body[data-role="empleado"] .sidebar-nav-section--emp .sidebar-section-title,
body[data-role="worker"] .sidebar-nav-section--emp .sidebar-section-title,
body[data-role="oficina"] .sidebar-nav-section--emp .sidebar-section-title{
    grid-column: 1 / -1;
    padding: 0 4px 2px;
}

body[data-role="empleado"] .sidebar-nav-section--emp .sidebar-nav-link,
body[data-role="worker"] .sidebar-nav-section--emp .sidebar-nav-link,
body[data-role="oficina"] .sidebar-nav-section--emp .sidebar-nav-link{
    margin: 0;
    padding: 10px 10px;
    border-radius: 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    justify-content: center;
    text-align: center;
    min-height: 52px;
}

body[data-role="empleado"] .sidebar-nav-section--emp .sidebar-nav-link:hover,
body[data-role="worker"] .sidebar-nav-section--emp .sidebar-nav-link:hover,
body[data-role="oficina"] .sidebar-nav-section--emp .sidebar-nav-link:hover{
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.14);
}

body[data-role="empleado"] .sidebar-nav-section--emp .sidebar-nav-link.is-active,
body[data-role="worker"] .sidebar-nav-section--emp .sidebar-nav-link.is-active,
body[data-role="oficina"] .sidebar-nav-section--emp .sidebar-nav-link.is-active{
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.16);
}

body[data-role="empleado"] .sidebar-nav-section--emp .sidebar-label,
body[data-role="worker"] .sidebar-nav-section--emp .sidebar-label,
body[data-role="oficina"] .sidebar-nav-section--emp .sidebar-label{
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    font-weight: 800;
}

body[data-role="empleado"] .sidebar-section-title,
body[data-role="worker"] .sidebar-section-title,
body[data-role="oficina"] .sidebar-section-title{
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.08em;
}

.sidebar-emp-dot{
    display: inline-block;
    width: 18px;
    text-align: center;
    opacity: 0.65;
    flex: 0 0 auto;
}

body[data-role="empleado"] .sidebar-nav-section--emp .sidebar-emp-dot,
body[data-role="worker"] .sidebar-nav-section--emp .sidebar-emp-dot,
body[data-role="oficina"] .sidebar-nav-section--emp .sidebar-emp-dot{
    display: none;
}

body.sidebar-overlay-open::before{
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.25);
    z-index: 55;
}

body.sidebar-overlay-open .sidebar{
    transform: translateX(0);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

body.sidebar-overlay-open .emp-menu-btn{
    display: none !important;
}

body[data-role="empleado"] .main-scroll-region,
body[data-role="worker"] .main-scroll-region,
body[data-role="oficina"] .main-scroll-region{
    overflow-x: hidden;
}

@media (max-width: 768px){
    .app-page-inner.container-fluid{
        padding: 16px;
    }
}

body.sidebar-overlay-open.sidebar-collapsed .sidebar-label,
body.sidebar-overlay-open.sidebar-collapsed .sidebar-section-title,
body.sidebar-overlay-open.sidebar-collapsed .sidebar-title{
    opacity: 1;
    width: auto;
    height: auto;
    overflow: visible;
    position: static;
}

body.sidebar-overlay-open.sidebar-collapsed .sidebar-nav-link{
    padding: 8px 10px;
    justify-content: flex-start;
    gap: 10px;
    text-align: left;
}

body.sidebar-overlay-open.sidebar-collapsed .sidebar-nav-link:hover{
    background: var(--saas-sidebar-hover-bg);
}

body.sidebar-overlay-open.sidebar-collapsed .sidebar-nav-link.is-active{
    background: rgba(37, 99, 235, 0.08);
}

/* ========== Área principal ========== */
.content {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--saas-main-bg);
    overflow: hidden;
}

.main-scroll-region {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: auto;
    overflow-y: auto;
    background: var(--saas-main-bg);
}

/* Contenedor de página: padding 30px + Bootstrap fluid */
.app-page-inner.container-fluid {
    width: 100%;
    max-width: 100%;
    padding: 30px;
    margin: 0;
    box-sizing: border-box;
    --bs-gutter-x: 0;
}

/* Evita doble padding si la vista ya abre con .container-fluid */
.app-page-inner > .container-fluid {
    padding-left: 0;
    padding-right: 0;
}

/* Títulos de sección */
.app-page-inner h1,
.app-page-inner > .container-fluid > h1:first-child,
.app-page-inner > .container-fluid > h2:first-child {
    font-size: 1.625rem;
    font-weight: 600;
    color: var(--saas-text);
    margin-top: 0;
    margin-bottom: 1rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.app-page-inner h2,
.app-page-inner .h4,
.app-page-inner h3.h6 {
    font-weight: 600;
    color: var(--saas-text);
}

.app-page-title {
    font-size: 1.625rem;
    font-weight: 600;
    color: var(--saas-text);
    margin-bottom: 1rem;
}

/* Topbar legacy */
.topbar {
    background: #fff;
    border: 1px solid var(--saas-sidebar-border);
    border-left: 3px solid #000;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.topbar-flex {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Tarjetas */
.card {
    background: var(--saas-surface);
    border: 1px solid var(--saas-sidebar-border);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.card-body {
    padding: 1.25rem 1.35rem;
}

/* Botones: azul, texto blanco, 6px, sin borde visible en primario */
.btn {
    border-radius: 6px;
    font-weight: 600;
}

.btn-primary{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600 !important;
    font-size: 14px;
    padding: 8px 12px !important;
    border-radius: var(--kw-btn-radius) !important;
    border: 1px solid var(--kw-btn-primary-border) !important;
    background: linear-gradient(135deg, var(--kw-btn-primary-start) 0%, var(--kw-btn-primary-end) 100%) !important;
    color: var(--kw-btn-primary-text) !important;
    box-shadow: var(--kw-btn-shadow);
}
.btn-primary:hover{
    filter: brightness(0.98);
    color: var(--kw-btn-primary-text) !important;
}
.btn-primary:active{
    transform: translateY(1px);
    box-shadow: var(--kw-btn-shadow-active);
}
.btn-primary:focus{
    box-shadow: var(--kw-btn-shadow);
}

.btn-outline-primary,
.btn-outline-secondary {
    background: #fff !important;
    color: #111827 !important;
    border: 1px solid #e2e8f0 !important;
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #111827 !important;
}

.btn-success{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600 !important;
    font-size: 14px;
    padding: 8px 12px !important;
    border-radius: var(--kw-btn-radius) !important;
    background: #f0fdf4 !important;
    border: 1px solid #86efac !important;
    color: #166534 !important;
    box-shadow: var(--kw-btn-shadow);
}
.btn-success:hover{ filter: brightness(1.03); color: #166534 !important; }
.btn-success:active{ transform: translateY(1px); box-shadow: var(--kw-btn-shadow-active); }

.btn-danger{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600 !important;
    font-size: 14px;
    padding: 8px 12px !important;
    border-radius: var(--kw-btn-radius) !important;
    background: #fff1f2 !important;
    border: 1px solid #fecdd3 !important;
    color: #9f1239 !important;
    box-shadow: var(--kw-btn-shadow);
}
.btn-danger:hover{ filter: brightness(1.03); color: #9f1239 !important; }
.btn-danger:active{ transform: translateY(1px); box-shadow: var(--kw-btn-shadow-active); }

.btn-shift,
.btn-cal{
    display:inline-flex;
    align-items:center;
    gap:8px;
    font-weight:600;
    font-size:14px;
    padding:8px 12px;
    border-radius: var(--kw-btn-radius);
    border:none;
    cursor:pointer;
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
    box-shadow: var(--kw-btn-shadow);
    text-decoration:none;
}
.btn-shift:active,
.btn-cal:active{
    transform: translateY(1px);
    box-shadow: var(--kw-btn-shadow-active);
}
.btn-shift-primary,
.btn-cal:not(.btn-cal-secondary):not(.btn-cal-outline):not(.btn-danger):not(.btn-cal-arrow){
    background: linear-gradient(135deg, var(--kw-btn-primary-start) 0%, var(--kw-btn-primary-end) 100%);
    color: var(--kw-btn-primary-text) !important;
    border: 1px solid var(--kw-btn-primary-border);
}
.btn-shift-primary:hover,
.btn-cal:not(.btn-cal-secondary):not(.btn-cal-outline):not(.btn-danger):not(.btn-cal-arrow):hover{
    filter:brightness(0.98);
    color: var(--kw-btn-primary-text) !important;
}
.btn-shift-secondary,
.btn-cal-secondary{
    background:#475569;
    color:#fff !important;
}
.btn-shift-secondary:hover,
.btn-cal-secondary:hover{
    filter:brightness(1.06);
    color:#fff !important;
}
.btn-cal-outline{
    background:#eef2ff;
    color:#1d4ed8 !important;
    border:1px solid #bfdbfe;
    box-shadow:none;
}
.btn-cal-outline:hover{
    filter:brightness(1.03);
    color:#1d4ed8 !important;
}

/* Tablas minimalistas */
.table {
    --bs-table-bg: #fff;
    --bs-table-striped-bg: #fafafa;
    --bs-table-hover-bg: #f1f3f5;
    border-color: transparent;
    border-collapse: separate;
    border-spacing: 0;
}

.table > :not(caption) > * > * {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--saas-border-table);
    border-top: none;
    border-left: none;
    border-right: none;
    vertical-align: middle;
}

.table thead th {
    background: #fff;
    color: #000;
    font-weight: 600;
    font-size: 0.8125rem;
    border-bottom: 1px solid #dee2e6;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table > :not(:last-child) > :last-child > * {
    border-bottom-color: var(--saas-border-table);
}

.form-control,
.form-select,
textarea {
    border-radius: 6px;
    border-color: #ced4da;
}

.form-control:focus,
.form-select:focus {
    border-color: #868e96;
    box-shadow: 0 0 0 0.15rem rgba(0, 0, 0, 0.06);
}

a {
    color: var(--saas-primary);
}

.content {
    background: #f3f4f6;
}

.main-scroll-region {
    background: #f3f4f6;
}

.content .app-page-inner.container-fluid {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
    margin: 16px;
    padding: 22px;
}

body.is-embed .content .app-page-inner.container-fluid {
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.content .biz-page {
    background: #f4f7f9;
    border-radius: 14px;
    padding: 24px;
    margin: -22px;
}

.content .biz-page .card,
.content .biz-page .biz-card {
    background: #ffffff;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 20px;
}

.content .biz-page .page-title {
    font-weight: 700;
    margin: 0 0 14px 0;
}

.content .biz-page .page-subtitle {
    margin: 0 0 16px 0;
    color: #6b7280;
    font-size: 0.95rem;
}

.content .biz-page .btn,
.content .biz-page .btn-cal,
.content .biz-page .admin-punch-form select,
.content .biz-page .admin-punch-form button,
.content .biz-page .timeline-filter input,
.content .biz-page .timeline-filter select,
.content .biz-page .timeline-filter button {
    border-radius: 14px !important;
}

.content .biz-page .admin-punch-form select,
.content .biz-page .admin-punch-form button {
    padding: 10px 16px !important;
}
.content .biz-page .btn-cal{
    padding: 8px 12px !important;
}

.content .biz-page .calendar-toolbar {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.content .biz-page .calendar-actions {
    margin-top: 16px;
}

.content .biz-page .calendario-wrapper {
    margin-top: 16px;
    box-shadow: none;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
}

.content .biz-page .admin-cierre-card {
    background: #ffffff;
    border: none;
}

.content .card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
}

.content .card-header {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.content .btn {
    border-radius: 10px;
}

.content .table-responsive {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.content .table-responsive > .table {
    margin-bottom: 0;
}

.content .table > :not(caption) > * > * {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.content .table thead th {
    background: #f3f4f6;
    color: #6c757d;
    border-bottom: 1px solid #e5e7eb;
}

.content .form-control,
.content .form-select,
.content textarea {
    border-radius: 10px;
    border-color: #d1d5db;
}

.content .form-control:focus,
.content .form-select:focus,
.content textarea:focus {
    border-color: var(--saas-primary);
    box-shadow: 0 0 0 0.15rem rgba(37, 99, 235, 0.15);
}

a:hover {
    color: var(--saas-primary-hover);
}

.alert {
    border-radius: 8px;
}

.modal-content {
    border-radius: 10px;
    border: 1px solid var(--saas-sidebar-border);
}

.list-group-item-action:hover {
    background-color: #f8f9fa !important;
}

.pagination .page-item.active .page-link {
    background: #000;
    border-color: #000;
    color: #fff;
}

/* Utilidades legacy */
.color-options {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.color-box {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
}

.color-box:hover {
    border: 2px solid #333;
}

.color-box.active {
    border: 3px solid #000;
}

.btn {
    margin-top: 0;
}

/* Turnos / calendario (grises) */
.turno-tm,
.calendar-cell.turno-tm,
.color-1,
.calendar-cell.color-1 {
    background-color: #6b7280 !important;
    color: #fff !important;
}

.turno-of,
.calendar-cell.turno-of,
.color-2,
.calendar-cell.color-2 {
    background-color: #9ca3af !important;
    color: #fff !important;
}

.turno-n,
.calendar-cell.turno-n,
.color-3,
.calendar-cell.color-3 {
    background-color: #374151 !important;
    color: #fff !important;
}

/* Auth */
body.auth-layout {
    min-height: 100vh;
    height: auto;
    max-height: none;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: var(--saas-main-bg);
    color: #000;
}

.auth-layout .auth-card {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border: 1px solid var(--saas-sidebar-border);
    border-radius: 16px;
    padding: 2.25rem 2rem 2rem;
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.10);
}

.auth-layout .auth-brand {
    color: #000;
    font-weight: 700;
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.auth-layout .auth-sub {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.auth-layout .form-control {
    border-color: #ced4da;
}

.auth-layout .auth-links a {
    color: #495057;
    font-weight: 500;
}

.auth-layout .auth-links a:hover {
    color: #000;
}

.auth-layout .auth-password-field {
    position: relative;
}

.auth-layout .auth-password-field .form-control {
    padding-right: 2.75rem;
}

.auth-layout .auth-password-toggle {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #6c757d;
    padding: 0.35rem;
    cursor: pointer;
    border-radius: 6px;
}

.auth-layout .auth-password-toggle:hover {
    background: #f1f3f5;
    color: #000;
}

.auth-layout .auth-password-toggle:focus-visible {
    outline: 2px solid #000;
    outline-offset: 1px;
}

.dash-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.dash-top-title {
    font-size: 1.2rem;
    font-weight: 850;
    letter-spacing: -0.02em;
    color: #1e293b;
}

.dash-top-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.dash-top-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 700;
}

.dash-top-right {
    width: min(520px, 100%);
}

.dash-header-title {
    font-size: 1.85rem;
    font-weight: 750;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: #0f172a;
}

.dash-header-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.dash-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e9ecef;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 600;
}

.dash-global-search {
    width: min(520px, 100%);
}

.dash-search {
    position: relative;
}

.dash-search svg {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    fill: #94a3b8;
    pointer-events: none;
}

.dash-search .form-control {
    padding-left: 2.25rem;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    background: #fff;
}

.dash-search .form-control:focus {
    border-color: rgba(0, 122, 255, 0.4);
    box-shadow: 0 0 0 0.25rem rgba(0, 122, 255, 0.12);
}

.biz-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15,23,42,0.06), 0 10px 28px rgba(15,23,42,0.04);
}

.dashboard-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(15,23,42,0.06), 0 10px 28px rgba(15,23,42,0.04);
}

.dashboard-card > .card-body {
    padding: 0;
}

.dash-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
}

.emp-widget-grid{
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.emp-widget{
    padding: 14px;
}

.emp-widget--hero{
    grid-column: 1 / -1;
}

.emp-widget-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.emp-widget-title{
    display:flex;
    align-items:center;
    gap: 10px;
    font-weight: 900;
    color:#0f172a;
}

.emp-widget-link{
    font-size: .85rem;
    font-weight: 800;
    text-decoration:none;
    color: var(--saas-primary);
}

.emp-widget-link:hover{
    color: var(--saas-primary-hover);
    text-decoration: underline;
}

.emp-clock-body{
    display:flex;
    flex-direction:column;
    gap: 10px;
}

.emp-clock-sede{
    max-width: 360px;
}

.emp-clock-btn{
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    height: 92px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap: 10px;
    color:#111827;
    font-weight: 900;
    letter-spacing: .02em;
    box-shadow: 0 10px 22px rgba(15,23,42,0.10);
}

.emp-clock-btn--start{
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.emp-clock-btn--stop{
    background: #fff5f5;
    border-color: #fed7d7;
    color: #c53030;
}

.emp-clock-btn.disabled{
    opacity:.55;
    cursor:not-allowed;
}

.emp-clock-timer{
    text-align:center;
    font-weight: 800;
    color:#0f172a;
}

.emp-time-summary{
    display:flex;
    gap: 10px;
    justify-content:center;
    flex-wrap:wrap;
}

.emp-time-chip{
    display:flex;
    align-items:center;
    gap: 8px;
    text-decoration:none;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background:#fff;
    color:#0f172a;
    font-weight: 900;
}

.emp-time-chip:hover{
    border-color: rgba(37,99,235,0.35);
}

.emp-time-chip-label{
    font-size: .8rem;
    font-weight: 900;
    color:#64748b;
}

.emp-time-chip-val{
    font-size: .9rem;
    font-weight: 900;
    color:#0f172a;
}

.emp-clock-gps{
    text-align:center;
    font-size: .85rem;
    font-weight: 700;
    color:#64748b;
}

.emp-avatars{
    display:flex;
    align-items:center;
    gap: 10px;
    overflow-x:auto;
    padding-bottom: 4px;
}

.emp-peers{
    display:flex;
    align-items:flex-start;
    gap: 14px;
    overflow-x:auto;
    padding-bottom: 4px;
}

.emp-peer{
    flex: 0 0 auto;
    width: 84px;
    text-align:center;
}

.emp-peer-avatar{
    width: 48px;
    height: 48px;
    border-radius: 999px;
    overflow:hidden;
    border: 1px solid #e2e8f0;
    background:#fff;
    margin: 0 auto;
    position: relative;
}

.emp-peer-avatar img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display:block;
}

.emp-peer-ini{
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight: 900;
    color:#0f172a;
    letter-spacing: .02em;
}

.emp-peer-dot{
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background:#22c55e;
    position:absolute;
    right: 1px;
    bottom: 1px;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(15,23,42,0.18);
}

.emp-peer-name{
    margin-top: 6px;
    font-size: .78rem;
    font-weight: 800;
    color:#666;
    white-space: nowrap;
    overflow:hidden;
    text-overflow: ellipsis;
}

.emp-dir-card-shell{
    border-radius: 12px;
}

.emp-dir-title{
    font-weight: 900;
    color:#0f172a;
    font-size: 1.05rem;
}

.emp-dir-sub{
    font-size: .9rem;
    color:#64748b;
    font-weight: 700;
}

.emp-dir-grid{
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.emp-dir-emp{
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background:#fff;
    padding: 12px;
    text-align:center;
    box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}

.emp-dir-emp:hover{
    border-color: rgba(37,99,235,0.35);
}

.emp-dir-avatar{
    width: 64px;
    height: 64px;
    border-radius: 999px;
    overflow:hidden;
    margin: 0 auto 10px;
    border: 1px solid #e2e8f0;
    background:#fff;
}

.emp-dir-avatar img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.emp-dir-ini{
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#0f172a;
    font-weight: 900;
    letter-spacing: .02em;
}

.emp-dir-name{
    font-size: .85rem;
    font-weight: 900;
    color:#666;
    white-space: nowrap;
    overflow:hidden;
    text-overflow: ellipsis;
}

.emp-profile-card{
    border-radius: 12px;
}

.emp-profile-avatar{
    width: 92px;
    height: 92px;
    border-radius: 999px;
    overflow:hidden;
    border: 1px solid #e2e8f0;
    background:#fff;
    margin: 0 auto 12px;
}

.emp-profile-avatar img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.emp-profile-ini{
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#0f172a;
    font-weight: 900;
    font-size: 1.4rem;
    letter-spacing: .02em;
}

.emp-profile-name{
    text-align:center;
    font-weight: 900;
    color:#0f172a;
}

.emp-profile-email{
    text-align:center;
    font-size: .9rem;
    font-weight: 700;
    color:#64748b;
}

.emp-avatar{
    width: 44px;
    height: 44px;
    border-radius: 999px;
    overflow:hidden;
    border: 1px solid #e2e8f0;
    background:#fff;
    flex: 0 0 auto;
}

.emp-avatar img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display:block;
}

.emp-avatar-ini{
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight: 900;
    color:#0f172a;
    background:#e2e8f0;
}

.emp-events{
    display:flex;
    flex-direction:column;
    gap: 10px;
}

.emp-event{
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
    background:#fff;
}

.emp-event-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.emp-event-tag{
    font-size: .75rem;
    font-weight: 900;
    color:#475569;
    background:#f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 2px 8px;
    border-radius: 999px;
}

.emp-event-date{
    font-size: .8rem;
    font-weight: 800;
    color:#64748b;
}

.emp-event-name{
    font-weight: 800;
    color:#0f172a;
}

.emp-muted{
    color:#64748b;
    font-weight: 700;
}

.emp-settings-grid{
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.emp-settings-item{
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
    background:#fff;
}

.emp-settings-label{
    font-size: .8rem;
    font-weight: 800;
    color:#64748b;
}

.emp-settings-value{
    font-weight: 800;
    color:#0f172a;
    margin-top: 2px;
}

@media (max-width: 1199.98px) {
    .dash-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .dash-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.dash-kpi {
    display: block;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.03);
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.dash-kpi:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.05);
    border-color: #dee2e6;
}

.dash-kpi-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
}

.dash-kpi-value {
    margin-top: 0.35rem;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.dash-kpi-meta {
    margin-top: 0.25rem;
    font-size: 0.78rem;
    color: #94a3b8;
}

.dash-card-title {
    font-size: 1rem;
    font-weight: 750;
    letter-spacing: -0.01em;
    color: #0f172a;
}

.dash-card-sub {
    margin-top: 0.2rem;
    font-size: 0.82rem;
    color: #64748b;
}

.dash-chart-wrap {
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    padding: 0.75rem;
}

.dash-chart-lg {
    min-height: 260px;
}

.dash-chart-xl {
    min-height: 320px;
}

@media (max-width: 991.98px) {
    .dash-chart-xl {
        min-height: 260px;
    }
}

.dash-panel-grid {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 1rem;
}

@media (max-width: 991.98px) {
    .dash-panel-grid {
        grid-template-columns: 1fr;
    }
}

.dash-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.dash-a-title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #1e293b;
}

.dash-a-sub {
    margin-top: 0.25rem;
    font-size: 0.9rem;
    color: #64748b;
}

.dash-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.dash-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid #dbeafe;
    background: rgba(0, 122, 255, 0.08);
    color: #0f172a;
    text-decoration: none;
    white-space: nowrap;
}

.dash-action-btn:hover {
    background: rgba(0, 122, 255, 0.12);
    border-color: rgba(0, 122, 255, 0.25);
}

.dash-action-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 12px;
    background: #007aff;
}

.dash-action-ico svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

.dash-stats {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (max-width: 991.98px) {
    .dash-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .dash-stats {
        grid-template-columns: 1fr;
    }
}

.dash-stat-btn {
    width: 100%;
    border: 0;
    text-align: left;
    cursor: pointer;
}

.dash-stat {
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem;
    border-radius: 12px;
    border: 1px solid #eef2f7;
    background: #ffffff;
    text-decoration: none;
    color: inherit;
}

.dash-stat:hover {
    background: #fbfdff;
    border-color: #e2e8f0;
}

.dash-stat.is-active {
    border-color: rgba(34, 197, 94, 0.35);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.10);
}

.dash-stat-ico {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: #f1f5f9;
    border: 1px solid #eef2f7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dash-stat-ico svg {
    width: 20px;
    height: 20px;
    fill: #0f172a;
    opacity: 0.85;
}

.dash-stat--blue .dash-stat-ico {
    background: rgba(0, 122, 255, 0.12);
    border-color: rgba(0, 122, 255, 0.18);
}

.dash-stat--blue .dash-stat-ico svg {
    fill: #007aff;
    opacity: 1;
}

.dash-stat--green .dash-stat-ico {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.18);
}

.dash-stat--green .dash-stat-ico svg {
    fill: #16a34a;
    opacity: 1;
}

.dash-stat--orange .dash-stat-ico {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.18);
}

.dash-stat--orange .dash-stat-ico svg {
    fill: #f59e0b;
    opacity: 1;
}

.dash-stat-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dash-stat-label {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 700;
}

.dash-stat-value {
    margin-top: 0.15rem;
    font-size: 1.05rem;
    font-weight: 850;
    color: #1e293b;
    letter-spacing: -0.01em;
}

.dash-emp-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 991.98px) {
    .dash-emp-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .dash-emp-grid {
        grid-template-columns: 1fr;
    }
}

.dash-emp-card {
    display: block;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
}

.dash-emp-card:hover {
    border-color: #cbd5e1;
    background: #fbfdff;
}

.dash-emp-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dash-emp-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    flex: 0 0 auto;
}

.dash-emp-avatar--ini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #1e293b;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

.dash-emp-card-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dash-emp-card-name {
    font-weight: 850;
    color: #1e293b;
    line-height: 1.15;
}

.dash-badge {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 850;
    border: 1px solid transparent;
}

.dash-badge--on {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
    border-color: rgba(34, 197, 94, 0.22);
}

.dash-badge--off {
    background: #f1f5f9;
    color: #64748b;
    border-color: #e2e8f0;
}

.dash-emp-card-foot {
    margin-top: 12px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.dash-emp-card-foot-label {
    font-size: 0.78rem;
    font-weight: 750;
    color: #64748b;
}

.dash-emp-card-foot-val {
    font-size: 0.9rem;
    font-weight: 850;
}

.is-hidden {
    display: none !important;
}

.dash-b-title {
    font-size: 1rem;
    font-weight: 850;
    color: #0f172a;
}

.dash-b-sub {
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: #64748b;
}

.dash-alerts {
    margin-top: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.dash-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    border: 1px solid #eef2f7;
    text-decoration: none;
    color: inherit;
}

.dash-alert-ico {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eef2f7;
    background: #f8fafc;
}

.dash-alert-ico svg {
    width: 18px;
    height: 18px;
    fill: #0f172a;
    opacity: 0.9;
}

.dash-alert-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dash-alert-title {
    font-weight: 800;
    color: #0f172a;
}

.dash-alert-sub {
    font-size: 0.82rem;
    color: #64748b;
}

.dash-alert-count {
    margin-left: auto;
    min-width: 40px;
    height: 30px;
    padding: 0 0.65rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.dash-alert--ok {
    background: #ffffff;
}

.dash-alert--ok .dash-alert-count {
    background: #f1f5f9;
    color: #475569;
}

.dash-alert--warn {
    background: #fff7ed;
    border-color: #fed7aa;
}

.dash-alert--warn .dash-alert-count {
    background: #ffedd5;
    color: #9a3412;
}

.dash-alert--crit {
    background: #fef2f2;
    border-color: #fecaca;
}

.dash-alert--crit .dash-alert-count {
    background: #fee2e2;
    color: #991b1b;
}

.dash-b-split {
    margin: 1rem 0;
    height: 1px;
    background: #eef2f7;
}

.dash-b-mini-title {
    font-size: 0.82rem;
    font-weight: 850;
    color: #0f172a;
    margin-bottom: 0.6rem;
}

.dash-c-head,
.dash-d-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.dash-c-title {
    font-size: 1rem;
    font-weight: 850;
    color: #0f172a;
}

.dash-c-sub {
    margin-top: 0.2rem;
    font-size: 0.85rem;
    color: #64748b;
}

.dash-link {
    text-decoration: none;
    font-weight: 800;
    color: #007aff;
}

.dash-link:hover {
    text-decoration: underline;
}

.table.dash-table-min {
    border-color: transparent;
}

.table.dash-table-min thead th {
    border-bottom: 1px solid #eef2f7;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.table.dash-table-min tbody td {
    border-top: 1px solid #f1f5f9;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.table.dash-table-min tbody tr:hover {
    background: #fbfdff;
}

.dash-emp {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.dash-emp-ava {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #eef2f7;
    color: #0f172a;
    font-weight: 900;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dash-emp-name {
    font-weight: 850;
    color: #0f172a;
}

.dash-num-pos {
    color: #16a34a;
    font-weight: 850;
}

.dash-num-neg {
    color: #dc2626;
    font-weight: 850;
}

.dash-num-neutral {
    color: #64748b;
    font-weight: 800;
}

@media (max-width: 991.98px) {
    .dash-chart-lg {
        min-height: 220px;
    }
}

.dash-icon-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e9ecef;
}

.dash-btn {
    border-radius: 12px;
}

.dash-metrics-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.dash-metric-label {
    font-size: 0.78rem;
    color: #64748b;
}

.dash-metric-value {
    margin-top: 0.15rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
}

.dash-metric-muted {
    color: #64748b;
    font-weight: 700;
}

.dash-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dash-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    background: #fff;
    text-decoration: none;
    color: inherit;
}

.dash-list-item:hover {
    border-color: #dee2e6;
    background: #fbfdff;
}

.dash-list-left {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dash-list-title {
    font-weight: 750;
    color: #0f172a;
}

.dash-list-sub {
    font-size: 0.8rem;
    color: #64748b;
}

.dash-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 28px;
    padding: 0 0.55rem;
    border-radius: 999px;
    background: rgba(0, 122, 255, 0.12);
    color: #007aff;
    font-weight: 800;
}

.dash-mini-split {
    height: 1px;
    background: #eef2f7;
    margin: 0.9rem 0;
}

.dash-mini-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.dash-mini-item,
.dash-mini-link {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    background: #f8fafc;
    color: inherit;
    text-decoration: none;
}

.dash-mini-link:hover {
    background: #f3f7ff;
    border-color: #dbeafe;
}

.dash-mini-title {
    font-weight: 750;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-mini-sub {
    font-size: 0.8rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table.dash-table {
    border-color: #eef2f7;
}

.table.dash-table thead th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    border-bottom: 1px solid #eef2f7;
}

.table.dash-table tbody td {
    border-top: 1px solid #f1f5f9;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

.table.dash-table tbody tr:nth-child(odd) {
    background: #fbfcfe;
}

.table.dash-table tbody tr:hover {
    background: #f3f7ff;
}

.dash-fade-in {
    animation: dashFadeIn 0.35s ease both;
}

@keyframes dashFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dash-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1050;
}

.dash-fab-btn {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: none;
    background: #007aff;
    color: #fff;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 14px 28px rgba(0, 122, 255, 0.22);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.dash-fab-btn:hover {
    background: #006be0;
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(0, 122, 255, 0.26);
}

.dash-fab-btn:focus-visible {
    outline: 3px solid rgba(0, 122, 255, 0.25);
    outline-offset: 3px;
}

.dash-fab-menu {
    position: absolute;
    right: 0;
    bottom: 66px;
    min-width: 200px;
    padding: 0.4rem;
    border-radius: 16px;
    border: 1px solid #e9ecef;
    background: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.dash-fab.open .dash-fab-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dash-fab-menu a {
    display: block;
    padding: 0.6rem 0.75rem;
    border-radius: 12px;
    color: #0f172a;
    text-decoration: none;
    font-weight: 650;
}

.dash-fab-menu a:hover {
    background: #f1f5f9;
}

/* ========== Scrollbars finos (sidebar + contenido) ========== */
.sidebar-nav,
.main-scroll-region,
.modal-body,
.table-responsive {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.32) transparent;
}

.sidebar-nav::-webkit-scrollbar,
.main-scroll-region::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.sidebar-nav::-webkit-scrollbar-track,
.main-scroll-region::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
    background: transparent;
    margin: 6px 0;
}

.sidebar-nav::-webkit-scrollbar-thumb,
.main-scroll-region::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    border: 1px solid transparent;
    background-clip: padding-box;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover,
.main-scroll-region::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.42);
    background-clip: padding-box;
}

.sidebar-nav::-webkit-scrollbar-corner,
.main-scroll-region::-webkit-scrollbar-corner {
    background: transparent;
}
