:root {
    --sistemas-blue: #284f9f;
    --sistemas-blue-2: #3c66b6;
    --sistemas-blue-3: #6e89c8;
    --sistemas-bg: #eef3fb;
    --sistemas-card: rgba(255, 255, 255, .92);
    --sistemas-border: rgba(66, 93, 151, .18);
    --sistemas-text: #1e2b47;
    --sistemas-muted: #6f7890;
    --sistemas-danger: #e44d35;
    --sistemas-warning: #f5bd3f;
    --sistemas-success: #4cae72;
    --sistemas-shadow: 0 18px 42px rgba(34, 65, 132, .16);
    --sistemas-soft-shadow: 0 8px 22px rgba(34, 65, 132, .10);
    --sistemas-radius: 18px;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(40, 79, 159, .45) transparent;
}

body {
    min-height: 100vh;
    color: var(--sistemas-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 20% 18%, rgba(255, 255, 255, .96) 0 0, transparent 30%),
        radial-gradient(circle at 72% 46%, rgba(40, 79, 159, .26) 0 0, transparent 32%),
        linear-gradient(115deg, #f7f9fe 0%, #eef3fb 44%, #2e4f96 100%);
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(90deg, rgba(255,255,255,.72), rgba(255,255,255,.16)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='600' viewBox='0 0 900 600'%3E%3Cg fill='none' stroke='%23284f9f' stroke-opacity='.13' stroke-width='28'%3E%3Cpath d='M70 585 C160 390 210 305 352 230 S612 94 865 16'/%3E%3Cpath d='M-18 468 C140 388 250 360 386 366 S660 414 920 292'/%3E%3Cpath d='M770 -30 C650 90 584 168 560 278 S536 468 408 630'/%3E%3C/g%3E%3C/svg%3E") center/cover no-repeat;
    filter: blur(10px);
    transform: scale(1.04);
    opacity: .9;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255,255,255,.18), rgba(40,79,159,.18));
}

.app-shell {
    min-height: 100vh;
    display: flex;
    gap: 14px;
    padding: 18px;
}

.app-sidebar {
    width: 220px;
    flex: 0 0 220px;
    align-self: flex-start;
    position: sticky;
    top: 18px;
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    color: var(--sistemas-text);
    background: var(--sistemas-card);
    border: 1px solid rgba(255,255,255,.78);
    border-radius: var(--sistemas-radius);
    box-shadow: var(--sistemas-shadow);
    backdrop-filter: blur(18px);
    padding: 12px;
}

.app-brand {
    min-height: 78px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .42rem;
    padding: .75rem .5rem 1rem;
    color: var(--sistemas-text);
    text-align: center;
    text-decoration: none;
    font-weight: 800;
    border-bottom: 1px solid var(--sistemas-border);
}

.app-brand-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(145deg, var(--sistemas-blue), var(--sistemas-blue-2));
    border-radius: 50%;
    box-shadow: 0 10px 26px rgba(40,79,159,.28);
}

.app-menu {
    display: grid;
    gap: 7px;
    padding: 12px 0 0;
}

.app-menu a {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: .65rem;
    color: #293754;
    text-decoration: none;
    border: 1px solid rgba(40,79,159,.12);
    border-radius: 8px;
    padding: .48rem .62rem;
    background: rgba(255,255,255,.72);
    box-shadow: 0 5px 13px rgba(34,65,132,.05);
    font-size: .85rem;
    line-height: 1.15;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
}

.app-menu a:hover,
.app-menu a.active {
    color: var(--sistemas-blue);
    background: #fff;
    box-shadow: 0 9px 18px rgba(34,65,132,.12);
    transform: translateY(-1px);
}

.app-menu a.active {
    border-color: rgba(40,79,159,.28);
}

.app-menu i {
    width: 19px;
    color: var(--sistemas-blue-2);
    text-align: center;
}

.app-main {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-topbar {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .7rem 1rem;
    background: rgba(255,255,255,.9);
    border: 1px solid rgba(255,255,255,.72);
    border-radius: var(--sistemas-radius);
    box-shadow: var(--sistemas-soft-shadow);
    backdrop-filter: blur(18px);
    position: sticky;
    top: 18px;
    z-index: 100;
}

.app-topbar strong {
    color: var(--sistemas-blue);
}

.app-main > main.container-fluid {
    padding: 0 !important;
}

.app-footer {
    margin-top: auto;
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    color: rgba(255,255,255,.88);
    background: rgba(40,79,159,.65);
    border: 1px solid rgba(255,255,255,.28);
    border-radius: var(--sistemas-radius);
    backdrop-filter: blur(16px);
}

.card,
.modal-content,
.dropdown-menu,
.toast {
    border: 1px solid rgba(255,255,255,.78);
    border-radius: var(--sistemas-radius);
    background-color: var(--sistemas-card);
    box-shadow: var(--sistemas-shadow);
    backdrop-filter: blur(18px);
}

.card-header,
.modal-header,
.modal-footer {
    border-color: var(--sistemas-border) !important;
    background: transparent !important;
}

.card-body {
    padding: 1rem;
}

.btn {
    border-radius: 8px;
    font-weight: 700;
}

.btn-primary {
    border-color: var(--sistemas-blue);
    background: linear-gradient(135deg, var(--sistemas-blue), var(--sistemas-blue-2));
    box-shadow: 0 9px 18px rgba(40,79,159,.2);
}

.btn-outline-secondary {
    border-color: rgba(40,79,159,.18);
    color: var(--sistemas-blue);
    background: rgba(255,255,255,.72);
}

.form-control,
.form-select {
    min-height: 40px;
    border-color: rgba(40,79,159,.18);
    border-radius: 7px;
    background-color: rgba(255,255,255,.84);
    color: var(--sistemas-text);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(40,79,159,.55);
    box-shadow: 0 0 0 .22rem rgba(40,79,159,.14);
}

.table {
    color: var(--sistemas-text);
}

.table thead th {
    white-space: nowrap;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--sistemas-muted);
    background: rgba(255,255,255,.74);
    border-bottom: 1px solid var(--sistemas-border);
}

.table tbody td {
    border-color: rgba(40,79,159,.10);
}

.badge {
    border-radius: 7px;
}

.bg-white {
    background: transparent !important;
}

.text-muted {
    color: var(--sistemas-muted) !important;
}

.dashboard-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 14px;
}

.dashboard-main {
    min-width: 0;
}

.metric-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(110px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.metric-card {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .55rem .7rem;
    border-radius: 9px;
    border: 1px solid rgba(255,255,255,.74);
    background: rgba(255,255,255,.9);
    box-shadow: var(--sistemas-soft-shadow);
}

.metric-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 6px;
    background: var(--sistemas-blue-2);
    font-size: .75rem;
}

.metric-value {
    font-size: .95rem;
    font-weight: 800;
    line-height: 1;
}

.metric-label {
    color: var(--sistemas-muted);
    font-size: .66rem;
    line-height: 1.05;
}

.workspace-card {
    position: relative;
    min-height: 360px;
    overflow: hidden;
    border-radius: var(--sistemas-radius);
    border: 1px solid rgba(255,255,255,.78);
    background: rgba(255,255,255,.88);
    box-shadow: var(--sistemas-shadow);
}

.workspace-card::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -120px;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: rgba(40,79,159,.54);
    z-index: 0;
}

.workspace-inner {
    position: relative;
    z-index: 1;
    min-height: 360px;
    display: grid;
    grid-template-columns: 1fr minmax(280px, 48%);
    gap: 1rem;
    align-items: center;
    padding: 2rem;
}

.workspace-title {
    color: var(--sistemas-blue);
    font-size: clamp(1.9rem, 5vw, 3.7rem);
    font-weight: 900;
    letter-spacing: -.07em;
    line-height: .95;
}

.workspace-subtitle {
    max-width: 330px;
    color: #203155;
    font-size: 1.12rem;
    font-weight: 800;
    line-height: 1.22;
}

.workspace-panel {
    border: 1px solid rgba(40,79,159,.16);
    border-radius: 12px;
    background: rgba(255,255,255,.88);
    box-shadow: 0 16px 40px rgba(34,65,132,.15);
    overflow: hidden;
}

.workspace-panel-header {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 .75rem;
    background: #fff;
    border-bottom: 1px solid rgba(40,79,159,.10);
}

.workspace-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sistemas-blue-3);
    opacity: .7;
}

.workspace-preview {
    display: grid;
    grid-template-columns: 86px 1fr 92px;
    gap: 10px;
    min-height: 216px;
    padding: 10px;
    background: linear-gradient(135deg, #f7f9ff, #eaf0fb);
}

.preview-nav,
.preview-right,
.preview-content {
    border-radius: 10px;
    background: rgba(255,255,255,.82);
    border: 1px solid rgba(40,79,159,.10);
}

.preview-nav {
    background: linear-gradient(180deg, var(--sistemas-blue), #173a80);
}

.preview-line,
.preview-pill {
    height: 9px;
    margin: 9px;
    border-radius: 999px;
    background: rgba(40,79,159,.16);
}

.preview-pill {
    background: rgba(255,255,255,.32);
}

.preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 9px;
}

.preview-mini-card {
    min-height: 42px;
    border-radius: 9px;
    background: rgba(40,79,159,.11);
}

.dashboard-side {
    display: grid;
    gap: 10px;
    align-content: start;
}

.side-widget {
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.72);
    background: rgba(255,255,255,.92);
    box-shadow: var(--sistemas-soft-shadow);
    padding: .75rem;
}

.side-widget-title {
    color: #1e2b47;
    font-size: .84rem;
    font-weight: 900;
    margin-bottom: .55rem;
}

.ring-chart {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border-radius: 50%;
    background: conic-gradient(var(--sistemas-blue-2) 0 72%, rgba(40,79,159,.14) 72% 100%);
    display: grid;
    place-items: center;
}

.ring-chart::after {
    content: "";
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #fff;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: .45rem;
    min-height: 26px;
    margin-bottom: .35rem;
    font-size: .72rem;
}

.todo-badge {
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #fff;
    background: var(--sistemas-warning);
    font-size: .62rem;
    font-weight: 800;
}

.action-circle {
    width: 150px;
    height: 150px;
    margin: 14px auto 0;
    border-radius: 50%;
    border: 6px solid rgba(255,255,255,.88);
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, var(--sistemas-blue-2), var(--sistemas-blue));
    box-shadow: 0 22px 45px rgba(20,46,105,.25);
}

.action-circle i {
    font-size: 3.4rem;
}

.quick-module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.quick-module-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 70px;
    color: var(--sistemas-text);
    text-decoration: none;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.78);
    background: rgba(255,255,255,.88);
    box-shadow: var(--sistemas-soft-shadow);
    padding: .8rem;
}

.quick-module-card i {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 10px;
    background: var(--sistemas-blue-2);
}

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 430px;
}

.auth-icon {
    color: #fff;
    background: linear-gradient(145deg, var(--sistemas-blue), var(--sistemas-blue-2));
}

.org-chart-wrap {
    overflow-x: auto;
}
.org-tree,
.org-tree ul {
    list-style: none;
    margin: 0;
    padding-left: 1.25rem;
    position: relative;
}
.org-tree > li {
    padding-left: 0;
}
.org-tree li {
    margin: .75rem 0;
    position: relative;
}
.org-tree li::before {
    content: "";
    position: absolute;
    top: 1.25rem;
    left: -.85rem;
    width: .75rem;
    border-top: 1px solid rgba(40,79,159,.25);
}
.org-tree ul::before {
    content: "";
    position: absolute;
    top: 0;
    left: .35rem;
    bottom: 0;
    border-left: 1px solid rgba(40,79,159,.25);
}
.org-node {
    min-width: 220px;
    display: inline-block;
    padding: .75rem .9rem;
    border: 1px solid rgba(255,255,255,.78);
    border-radius: .85rem;
    background: rgba(255,255,255,.88);
    box-shadow: var(--sistemas-soft-shadow);
}

@media (max-width: 1199.98px) {
    .metric-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .dashboard-page {
        grid-template-columns: 1fr;
    }
    .dashboard-side {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .action-circle {
        width: 112px;
        height: 112px;
    }
}

@media (max-width: 991.98px) {
    .app-shell {
        display: block;
        padding: 12px;
    }
    .app-sidebar {
        width: 100%;
        max-height: none;
        position: relative;
        top: 0;
        margin-bottom: 12px;
    }
    .app-brand {
        min-height: auto;
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }
    .app-menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .app-topbar {
        top: 0;
    }
    .workspace-inner {
        grid-template-columns: 1fr;
        padding: 1.2rem;
    }
    .quick-module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

html body .dashboard-page {
    display: block !important;
}

html body .dashboard-page > .dashboard-main {
    width: 100% !important;
    max-width: 100% !important;
}

html body .dashboard-page > .dashboard-side,
html body .dashboard-page .progress,
html body .dashboard-page .progress-bar {
    display: none !important;
}

html body,
html body.app-body,
html body .app-shell,
html body .app-sidebar,
html body .app-main,
html body .dashboard-page,
html body .dashboard-main {
    overflow-x: clip !important;
}

html body::before,
html body::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    background: none !important;
    transform: none !important;
    filter: none !important;
}

html body *::-webkit-scrollbar:horizontal {
    height: 0 !important;
    display: none !important;
}

html body .dashboard-page .dashboard-table-wrap,
html body .dashboard-page .table-responsive,
html body .dashboard-page .card,
html body .dashboard-page .list-group,
html body .dashboard-page .list-group-item,
html body .dashboard-page .row {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

html body .dashboard-page .dashboard-table-wrap {
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, .85);
}

html body .dashboard-page table {
    width: 100% !important;
    table-layout: fixed !important;
}

html body .dashboard-page th,
html body .dashboard-page td {
    min-width: 0 !important;
    overflow-wrap: anywhere !important;
}

@media (max-width: 575.98px) {
    .app-menu,
    .metric-strip,
    .quick-module-grid,
    .dashboard-side {
        grid-template-columns: 1fr;
    }
    .workspace-preview {
        grid-template-columns: 1fr;
    }
    .preview-nav,
    .preview-right {
        display: none;
    }
}

/* EPGRL v28 - Reportes anterior normalizados */
.app-card {
    border: 1px solid rgba(31, 60, 136, .10);
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(31, 60, 136, .08);
    background: rgba(255,255,255,.92);
}
.app-icon-circle {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(31, 60, 136, .10);
    color: #254b9b;
    flex: 0 0 auto;
}
.report-table th {
    white-space: nowrap;
    font-size: .78rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.report-table td {
    font-size: .86rem;
}
@media print {
    .app-sidebar,
    .app-topbar,
    .no-print,
    .btn,
    form,
    .app-menu {
        display: none !important;
    }
    .app-shell,
    .app-main,
    main.container-fluid {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    body.app-body {
        background: #fff !important;
    }
    .report-print-card,
    .card,
    .card-body {
        box-shadow: none !important;
        border: 0 !important;
        padding: 0 !important;
    }
    .report-table {
        font-size: 9px;
    }
}

/* EPGRL v33: fotografías de empleados en listados */
.employee-avatar,
.employee-avatar-fallback {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    object-fit: cover;
    border: 1px solid rgba(15, 23, 42, 0.10);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
    background: rgba(255, 255, 255, 0.92);
}

.employee-avatar-fallback {
    font-weight: 800;
    color: #2563eb;
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.95), rgba(255, 255, 255, 0.95));
}

/* EPGRL v34: asignaciones por tipo y estados sin asignación */
.qeatzul-stat-card {
    border: 1px solid rgba(31, 60, 136, .10);
    border-radius: 20px;
    padding: 18px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 18px 45px rgba(31, 60, 136, .08);
}

.qeatzul-tabs {
    gap: .5rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: .25rem;
}

.qeatzul-tabs .nav-link {
    white-space: nowrap;
    border-radius: 999px;
    color: #334155;
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(31, 60, 136, .10);
}

.qeatzul-tabs .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(37, 99, 235, .22);
}

.qeatzul-tabs .nav-link.active .badge {
    color: #1d4ed8;
}

.avatar-sm,
.avatar-fallback {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    object-fit: cover;
    border: 1px solid rgba(15, 23, 42, .10);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .10);
    background: rgba(255,255,255,.92);
    flex: 0 0 38px;
}

.avatar-fallback {
    font-weight: 800;
    color: #2563eb;
    background: linear-gradient(135deg, rgba(219, 234, 254, .95), rgba(255,255,255,.95));
}

.device-photo-sm,
.device-photo-fallback {
    width: 54px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    object-fit: cover;
    border: 1px solid rgba(15, 23, 42, .10);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .10);
    background: rgba(255,255,255,.92);
    flex: 0 0 54px;
}

.device-photo-fallback {
    color: #2563eb;
    background: linear-gradient(135deg, rgba(219, 234, 254, .95), rgba(255,255,255,.95));
}

/* EPGRL v36 - reportes, cuentas/licencias y revisión por baja */
.qe-tabs .nav-link {
    border-radius: 999px;
    margin-right: .35rem;
    margin-bottom: .35rem;
}
.report-table img,
.report-photo {
    width: 52px;
    height: 42px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #dbe3ef;
    background: #f8fafc;
}
@media print {
    .report-table img,
    .report-photo {
        width: 44px;
        height: 36px;
    }
}

.qe-info-tile{border:1px solid rgba(15,23,42,.08);border-radius:18px;padding:1rem;background:linear-gradient(180deg,rgba(255,255,255,.86),rgba(248,250,252,.78));box-shadow:0 12px 30px rgba(15,23,42,.06)}
.qe-info-tile span{display:block;font-size:.78rem;text-transform:uppercase;letter-spacing:.06em;color:#64748b;font-weight:700}
.qe-info-tile strong{display:block;font-size:1.05rem;color:#0f172a;margin-top:.2rem}
.qe-info-tile small{color:#64748b}
.qe-avatar-sm{width:36px;height:36px;border-radius:12px;object-fit:cover;border:1px solid rgba(15,23,42,.1);background:#eef6ff;display:inline-flex;align-items:center;justify-content:center;color:#2563eb}


.app-user-session {
    min-width: 0;
}

.topbar-user-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .92);
    background: linear-gradient(135deg, rgba(40, 79, 159, .92), rgba(60, 102, 182, .88));
    box-shadow: 0 10px 24px rgba(34, 65, 132, .18);
}

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

.topbar-user-avatar-fallback {
    color: #fff;
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .03em;
    line-height: 1;
}

/* EPGRL v40 - captura directa de fotografías */
.camera-capture-open {
    overflow: hidden;
}
.camera-capture-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.camera-capture-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .72);
    backdrop-filter: blur(4px);
}
.camera-capture-panel {
    position: relative;
    width: min(720px, 100%);
    background: #fff;
    border-radius: 22px;
    padding: 1rem;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .35);
}
.camera-capture-header,
.camera-capture-actions {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: center;
}
.camera-capture-video {
    width: 100%;
    max-height: 62vh;
    object-fit: contain;
    background: #020617;
    border-radius: 18px;
    margin: .85rem 0;
}
@media print {
    .camera-capture-modal {
        display: none !important;
    }
}

/* EPGRL v41 - modales operativos y fotos en organización/kardex */
.app-modal-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.25rem;
    background: rgba(37, 99, 235, .10);
    color: #2563eb;
}
.app-modal-icon-success { background: rgba(22, 163, 74, .12); color: #15803d; }
.app-modal-icon-danger { background: rgba(220, 38, 38, .12); color: #b91c1c; }
.app-modal-icon-warning { background: rgba(245, 158, 11, .16); color: #b45309; }
.app-modal-icon-info { background: rgba(37, 99, 235, .10); color: #2563eb; }
.app-modal-message { white-space: pre-wrap; color: var(--sistemas-text); }
.org-node .avatar-sm { width: 42px; height: 42px; flex-basis: 42px; }

/* EPGRL v48 - búsquedas inteligentes en selects */
.smart-select-wrap {
    position: relative;
}
.smart-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.smart-select-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1080;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .55);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .16);
    padding: .35rem;
}
.smart-select-result {
    width: 100%;
    display: block;
    border: 0;
    background: transparent;
    text-align: left;
    padding: .55rem .7rem;
    border-radius: 10px;
    color: var(--sistemas-text);
    font-size: .92rem;
}
.smart-select-result:hover,
.smart-select-result:focus {
    background: rgba(37, 99, 235, .10);
    outline: none;
}
.smart-select-result:disabled {
    cursor: default;
    background: transparent;
}
@media print {
    .smart-select-results { display: none !important; }
}

/* EPGRL v50 - filas con modal de acciones */
.table-row-clickable {
    cursor: pointer;
}
.table-row-clickable:focus {
    outline: 2px solid rgba(37, 99, 235, .45);
    outline-offset: -2px;
}
.table-row-clickable:hover > * {
    background-color: rgba(37, 99, 235, .045) !important;
}
.table-action-modal-btn {
    display: flex;
    align-items: center;
    gap: .55rem;
    justify-content: flex-start;
    border-radius: 12px;
}
.table-action-modal-btn i {
    width: 1.1rem;
    text-align: center;
}
@media print {
    #appTableActionModal { display: none !important; }
}

/* EPGRL v55: reportes ejecutivos y exportación PDF */
.report-table thead th {
    font-size: .72rem;
    letter-spacing: .045em;
    text-transform: uppercase;
    color: #536582;
    background: rgba(244, 247, 252, .95);
}
.report-print-card {
    border: 1px solid rgba(36, 78, 166, .10);
}
@media print {
    .no-print,
    .app-sidebar,
    .app-topbar,
    .app-flash-alert,
    .btn,
    form {
        display: none !important;
    }
    .app-shell,
    .app-main,
    main.container-fluid {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    body {
        background: #fff !important;
    }
    .card,
    .app-card {
        box-shadow: none !important;
        border: 1px solid #dbe3ef !important;
        break-inside: avoid;
    }
    .report-table {
        font-size: 10.5px;
    }
    .report-table th,
    .report-table td {
        padding: 5px 6px !important;
    }
}


/* EPGRL v56: reportes ejecutivos */
.executive-report-card {
    background: linear-gradient(135deg, #ffffff 0%, #f6f8fc 62%, #edf3ff 100%);
    border: 1px solid rgba(36, 78, 166, .12);
}
.executive-eyebrow {
    color: #244ea6;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: .45rem;
}
.license-chart-box {
    width: 240px;
    height: 240px;
    max-width: min(240px, 100%);
    position: relative;
}
.license-chart-box canvas {
    width: 100% !important;
    height: 100% !important;
}
.report-table th,
.report-table td {
    white-space: nowrap;
}
@media (max-width: 991.98px) {
    .license-chart-box { width: 190px; height: 190px; }
}
@media print {
    .executive-report-card { display: none !important; }
    .report-table th,
    .report-table td { white-space: normal; }
}

/* EPGRL v57 · Reporte Office Familia jerárquico */
.office-family-report {
    display: grid;
    gap: 1rem;
}
.office-family-group {
    border: 1px solid var(--app-border, #dbe3ef);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
}
.office-family-main {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid #e6edf7;
    background: rgba(36, 78, 166, .045);
}
.office-associated-table thead th {
    font-size: .72rem;
    letter-spacing: .055em;
    text-transform: uppercase;
    color: #5f6f89;
    background: #f4f7fb;
}
.office-associated-table td,
.office-associated-table th {
    padding: .72rem .85rem;
}
@media print {
    .office-family-group {
        break-inside: avoid;
        box-shadow: none;
    }
}

/* EPGRL v58 - búsquedas inteligentes generales y visor seguro de secretos */
.smart-search-wrap {
    position: relative;
}
.smart-search-wrap > input[type="search"],
.smart-search-wrap > input[data-smart-search-input] {
    width: 100%;
}
.smart-search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1082;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .55);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .16);
    padding: .35rem;
}
.smart-search-result {
    width: 100%;
    display: block;
    border: 0;
    background: transparent;
    text-align: left;
    padding: .55rem .7rem;
    border-radius: 10px;
    color: var(--sistemas-text);
    font-size: .92rem;
}
.smart-search-result:hover,
.smart-search-result:focus {
    background: rgba(37, 99, 235, .10);
    outline: none;
}
.secret-inline .secret-mask {
    letter-spacing: .08em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
#appSecretModal [data-secret-value] {
    letter-spacing: .04em;
}
@media print {
    .smart-search-results,
    #appSecretModal { display: none !important; }
}

/* EPGRL v61 - Gestión de usuarios */
.user-view-dl dt { color: var(--bs-secondary-color); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.user-view-dl dd { font-weight: 600; }
#usuariosTable .table-row-action { white-space: nowrap; }

/* EPGRL v65 - Cuentas/licencias en cards con búsqueda en resultados */
.cuentas-licencias-page .license-kpi-card {
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 1rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
}
.cuentas-licencias-page > .card-body > .d-flex:first-child {
    align-items: flex-start;
}
.cuentas-create-menu {
    flex: 0 0 auto;
}
.cuentas-create-menu .dropdown-menu {
    min-width: 250px;
    border-radius: 14px;
    border-color: rgba(148, 163, 184, .35);
    box-shadow: 0 18px 38px rgba(15, 23, 42, .14);
}
.cuentas-create-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-weight: 700;
}
.cuentas-create-menu .dropdown-item i {
    width: 1.1rem;
    color: #2563eb;
}
.cuentas-filter-bar {
    padding: .95rem;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 18px;
    background: rgba(248, 250, 252, .78);
}
.cuentas-licencias-page .qe-tabs {
    gap: .45rem;
    padding-bottom: .15rem;
}
.cuentas-licencias-page .qe-tabs .nav-link {
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 999px;
    font-weight: 700;
    background: #fff;
}
.cuentas-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}
.cuenta-license-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    border: 1px solid rgba(148, 163, 184, .38);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .075);
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.cuenta-license-card:hover,
.cuenta-license-card:focus {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, .38);
    box-shadow: 0 22px 46px rgba(15, 23, 42, .12);
    outline: none;
}
.record-card-main {
    padding: 1rem;
}
.record-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    padding: .85rem 1rem 1rem;
    border-top: 1px solid rgba(226, 232, 240, .95);
    background: #f8fafc;
}
.license-icon-badge {
    width: 2.1rem;
    height: 2.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(37, 99, 235, .10);
    color: #1d4ed8;
    flex: 0 0 auto;
}
.license-icon-badge.office_familia {
    background: rgba(34, 197, 94, .12);
    color: #15803d;
}
.license-icon-badge.adobe_cc {
    background: rgba(239, 68, 68, .12);
    color: #b91c1c;
}
.license-icon-badge.otras_licencias {
    background: rgba(245, 158, 11, .14);
    color: #b45309;
}
.license-card-data {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}
.license-card-data > div {
    min-width: 0;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 16px;
    padding: .75rem;
    background: #fbfdff;
}
.license-card-label {
    display: block;
    color: #64748b;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
    margin-bottom: .2rem;
}
.license-card-data strong,
.license-card-data small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.license-card-data small {
    color: #64748b;
}
.cuenta-card-empty {
    margin-top: 1rem;
}
@media (max-width: 575.98px) {
    .cuentas-card-grid { grid-template-columns: 1fr; }
    .license-card-data { grid-template-columns: 1fr; }
    .record-card-actions .btn { flex: 1 1 100%; }
}
@media print {
    .record-card-actions,
    .cuentas-licencias-page form,
    .cuentas-licencias-page .qe-tabs { display: none !important; }
    .cuentas-card-grid { grid-template-columns: 1fr; }
    .cuenta-license-card { box-shadow: none; break-inside: avoid; }
}

/* EPGRL v78 - Reorden visual: interfaz más limpia, menos saturación y menú estable */
:root {
    --sistemas-blue: #244a95;
    --sistemas-blue-2: #315fae;
    --sistemas-blue-3: #7b91c3;
    --sistemas-bg: #f4f7fb;
    --sistemas-card: #ffffff;
    --sistemas-border: rgba(42, 61, 102, .12);
    --sistemas-text: #26324a;
    --sistemas-muted: #6b7486;
    --sistemas-shadow: 0 10px 28px rgba(28, 45, 82, .08);
    --sistemas-soft-shadow: 0 4px 14px rgba(28, 45, 82, .06);
    --sistemas-radius: 14px;
}

html { scroll-behavior: auto; }
body {
    background: linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%) !important;
    background-attachment: fixed;
}
body::before,
body::after { display: none !important; }

.app-shell {
    gap: 12px;
    padding: 12px;
}
.app-sidebar {
    width: 236px;
    flex-basis: 236px;
    top: 12px;
    max-height: calc(100vh - 24px);
    padding: 10px;
    border-color: rgba(226,232,240,.9);
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .07);
    backdrop-filter: none;
}
.app-brand {
    min-height: 74px;
    gap: .35rem;
    padding: .6rem .45rem .85rem;
}
.app-brand-icon {
    width: 42px;
    height: 42px;
    box-shadow: none;
}
.app-menu {
    display: block;
    padding-top: .65rem;
}
.app-menu-group {
    margin: .78rem .35rem .35rem;
    color: #8791a5;
    font-size: .64rem;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.app-menu-group:first-child { margin-top: .2rem; }
.app-menu a {
    min-height: 36px;
    gap: .55rem;
    margin-bottom: 4px;
    padding: .44rem .55rem;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    box-shadow: none;
    font-size: .83rem;
    transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.app-menu a:hover,
.app-menu a.active {
    transform: none !important;
    color: var(--sistemas-blue);
    background: #f2f6fc;
    box-shadow: none;
}
.app-menu a.active {
    border-color: rgba(49,95,174,.20);
    box-shadow: inset 3px 0 0 var(--sistemas-blue);
}
.app-menu i {
    width: 18px;
    font-size: .86rem;
}
.app-menu-text {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.1;
}
.app-menu-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.app-menu-text small {
    margin-top: 2px;
    color: #8b95a7;
    font-size: .64rem;
    font-weight: 600;
}
.app-menu-module {
    margin-bottom: 6px;
}
.app-menu-module-button {
    width: 100%;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .55rem;
    border: 1px solid rgba(226,232,240,.95);
    border-radius: 9px;
    background: #f8fafc;
    color: var(--sistemas-text);
    padding: .46rem .55rem;
    font-size: .82rem;
    font-weight: 900;
    text-align: left;
}
.app-menu-module-button span {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
}
.app-menu-module-button i {
    width: 18px;
    color: var(--sistemas-blue);
    text-align: center;
}
.app-menu-module-chevron {
    transition: transform .12s ease;
}
.app-menu-module.is-open .app-menu-module-button {
    color: var(--sistemas-blue);
    border-color: rgba(49,95,174,.22);
    background: #eef4ff;
}
.app-menu-module.is-open .app-menu-module-chevron {
    transform: rotate(180deg);
}
.app-menu-module-items {
    padding: 5px 0 2px 8px;
}

.app-main { gap: 10px; }
.app-topbar {
    min-height: 54px;
    top: 12px;
    padding: .58rem .85rem;
    border-color: rgba(226,232,240,.9);
    background: #fff;
    box-shadow: 0 5px 18px rgba(15, 23, 42, .055);
    backdrop-filter: none;
}
.topbar-user-avatar,
.topbar-user-avatar img,
.topbar-user-avatar-fallback {
    width: 34px;
    height: 34px;
}

.card,
.modal-content,
.dropdown-menu,
.toast,
.workspace-card,
.side-widget,
.quick-module-card,
.metric-card,
.cuenta-license-card,
.cuentas-licencias-page .license-kpi-card,
.org-node {
    border-color: rgba(226, 232, 240, .95) !important;
    background: #fff !important;
    box-shadow: var(--sistemas-soft-shadow) !important;
    backdrop-filter: none !important;
}
.card,
.workspace-card,
.side-widget,
.quick-module-card { border-radius: 14px; }
.card-header {
    padding: .78rem .95rem;
    color: #334155;
    font-size: .92rem;
    font-weight: 800;
    background: #fbfcfe !important;
}
.card-body { padding: .95rem; }

.btn {
    min-height: 36px;
    border-radius: 8px;
    font-size: .88rem;
    box-shadow: none !important;
}
.btn-primary { background: var(--sistemas-blue); border-color: var(--sistemas-blue); }
.form-control,
.form-select {
    min-height: 38px;
    border-color: rgba(148, 163, 184, .45);
    background-color: #fff;
    border-radius: 8px;
    font-size: .92rem;
}
textarea.form-control { min-height: 84px; }
label,
.form-label { font-size: .86rem; font-weight: 700; color: #334155; }
.form-text,
small.text-muted { line-height: 1.35; }

.table { font-size: .88rem; }
.table > :not(caption) > * > * { padding: .55rem .65rem; }
.table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: .68rem;
    letter-spacing: .055em;
}
.table-responsive {
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, .85);
}
.table-responsive .table { margin-bottom: 0; }
.badge { font-size: .72rem; font-weight: 700; }

.dashboard-page {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}
.dashboard-side {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.metric-strip {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.metric-card {
    min-height: 58px;
    padding: .72rem .78rem;
}
.metric-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #eef4ff;
    color: var(--sistemas-blue);
}
.metric-value { font-size: 1.05rem; }
.metric-label { font-size: .72rem; }
.workspace-card { min-height: 0; overflow: hidden; }
.workspace-card::after { display: none; }
.workspace-inner {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    padding: 1.05rem 1.15rem;
}
.workspace-title {
    font-size: clamp(1.55rem, 2.7vw, 2.15rem);
    letter-spacing: -.035em;
    line-height: 1.05;
}
.workspace-subtitle {
    max-width: 640px;
    margin-bottom: .8rem !important;
    font-size: .98rem;
    font-weight: 700;
}
.workspace-panel { display: none; }
.quick-module-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.quick-module-card {
    min-height: 64px;
    padding: .72rem .8rem;
    transition: border-color .12s ease, background-color .12s ease;
}
.quick-module-card:hover,
.quick-module-card:focus {
    border-color: rgba(49, 95, 174, .30) !important;
    background: #f8fbff !important;
    color: var(--sistemas-blue);
    transform: none;
}
.quick-module-card i {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #eef4ff;
    color: var(--sistemas-blue);
}
.side-widget { padding: .75rem .8rem; }
.side-widget-title { margin-bottom: .35rem; font-size: .78rem; }
.action-circle { display: none; }

.row.g-3 { --bs-gutter-x: .75rem; --bs-gutter-y: .75rem; }
.row.g-4 { --bs-gutter-x: .85rem; --bs-gutter-y: .85rem; }
.container-fluid > .card,
main.container-fluid > .card { margin-bottom: .85rem; }

.app-footer {
    min-height: 38px;
    color: #64748b;
    background: #fff;
    border-color: rgba(226,232,240,.9);
    box-shadow: var(--sistemas-soft-shadow);
    backdrop-filter: none;
    font-size: .82rem;
}

@media (max-width: 1199.98px) {
    .dashboard-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
    .app-shell { display: block; padding: 8px; }
    .app-sidebar {
        position: static;
        width: 100%;
        max-height: none;
        margin-bottom: 8px;
    }
    .app-brand {
        min-height: 52px;
        flex-direction: row;
        justify-content: flex-start;
        border-bottom: 0;
        padding: .35rem .4rem .55rem;
    }
    .app-brand-icon { width: 34px; height: 34px; }
    .app-menu {
        display: block;
        overflow-x: visible;
        padding: .35rem 0 .2rem;
    }
    .app-menu-group { display: none; }
    .app-menu a {
        min-height: 34px;
        margin-bottom: 4px;
        border-color: rgba(226,232,240,.95);
        background: #fff;
    }
    .app-menu-module-items {
        padding-left: 6px;
    }
    .app-menu a.active { box-shadow: inset 0 -3px 0 var(--sistemas-blue); }
    .app-menu-text small { display: none; }
    .app-topbar { position: static; margin-bottom: 8px; }
}
@media (max-width: 575.98px) {
    .dashboard-side { grid-template-columns: 1fr; }
    .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quick-module-grid { grid-template-columns: 1fr; }
    .workspace-inner { padding: .9rem; }
    .card-body { padding: .85rem; }
    .btn { width: 100%; }
    .btn-group .btn,
    .input-group .btn,
    .record-card-actions .btn { width: auto; }
}

/* EPGRL v79 - tema limpio y flujo operativo de asignaciones */
:root {
    --sistemas-bg: #f4f6fa;
    --sistemas-card: #ffffff;
    --sistemas-border: rgba(15, 23, 42, .10);
    --sistemas-text: #172033;
    --sistemas-muted: #667085;
    --sistemas-shadow: 0 10px 26px rgba(15, 23, 42, .07);
    --sistemas-soft-shadow: 0 6px 16px rgba(15, 23, 42, .06);
    --sistemas-radius: 14px;
}

body {
    background: var(--sistemas-bg) !important;
}

body::before,
body::after {
    display: none !important;
}

.app-sidebar,
.app-topbar,
.card,
.modal-content,
.qeatzul-stat-card,
.assignment-record-card,
.assignment-choice-card,
.assignment-action-card {
    background: #fff !important;
    border-color: var(--sistemas-border) !important;
    box-shadow: var(--sistemas-soft-shadow) !important;
    backdrop-filter: none !important;
}

.app-footer {
    color: var(--sistemas-muted);
    background: #fff;
    border-color: var(--sistemas-border);
    box-shadow: var(--sistemas-soft-shadow);
    backdrop-filter: none;
}

.bg-white {
    background: #fff !important;
}

.assignment-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.assignment-search {
    width: min(520px, 100%);
    display: flex;
    gap: .5rem;
}

.assignment-action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem;
}

.assignment-action-card {
    min-height: 96px;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    color: var(--sistemas-text);
    text-decoration: none;
    border: 1px solid var(--sistemas-border);
    border-radius: 16px;
    padding: 1rem;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.assignment-action-card:hover {
    transform: translateY(-1px);
    border-color: rgba(40, 79, 159, .28) !important;
}

.assignment-action-card i {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--sistemas-blue-2);
    border-radius: 12px;
}

.assignment-action-card span {
    font-weight: 800;
}

.assignment-action-card small {
    color: var(--sistemas-muted);
}

.assignment-action-card.primary {
    border-color: rgba(40, 79, 159, .32) !important;
}

.assignment-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.assignment-card-grid.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.assignment-record-card {
    border: 1px solid var(--sistemas-border);
    border-radius: 16px;
    padding: 1rem;
    background: #fff;
}

.assignment-record-top,
.assignment-person-line {
    display: flex;
    gap: .75rem;
    align-items: center;
    min-width: 0;
}

.assignment-person-line {
    margin-top: .85rem;
    padding-top: .85rem;
    border-top: 1px solid var(--sistemas-border);
}

.assignment-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
    margin-top: .85rem;
}

.assignment-meta-grid span {
    min-width: 0;
    display: block;
    padding: .55rem;
    border-radius: 10px;
    background: #f8fafc;
    color: var(--sistemas-text);
    font-size: .86rem;
}

.assignment-meta-grid strong {
    display: block;
    color: var(--sistemas-muted);
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.assignment-accessory-list {
    margin-top: .85rem;
    padding: .75rem;
    border: 1px dashed rgba(40, 79, 159, .24);
    border-radius: 12px;
    background: #f8fbff;
}

.assignment-accessory-list .badge {
    margin: 0 .25rem .25rem 0;
    white-space: normal;
    text-align: left;
}

.assignment-record-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .5rem;
    margin-top: 1rem;
}

.assignment-empty-card {
    border: 1px dashed rgba(15, 23, 42, .18);
    border-radius: 16px;
    padding: 1.25rem;
    color: var(--sistemas-muted);
    background: #fff;
}

.assignment-choice-card {
    border: 1px solid var(--sistemas-border);
    border-radius: 16px;
    padding: 1rem;
}

.assignment-choice-title {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: center;
    margin-bottom: .65rem;
    color: var(--sistemas-text);
    font-weight: 800;
}

.assignment-choice-value {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: .75rem;
    margin-bottom: .75rem;
    border-radius: 12px;
    background: #f8fafc;
    color: var(--sistemas-text);
    font-weight: 700;
}

.assignment-picker-search {
    min-height: 46px;
    font-size: 1rem;
}

.assignment-picker-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.assignment-picker-card {
    width: 100%;
    display: flex;
    gap: .75rem;
    align-items: center;
    min-height: 92px;
    padding: .75rem;
    color: var(--sistemas-text);
    text-align: left;
    border: 1px solid var(--sistemas-border);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

button.assignment-picker-card {
    appearance: none;
}

.assignment-picker-card:hover,
.assignment-picker-card:focus,
.assignment-picker-card.is-selected {
    border-color: rgba(40, 79, 159, .42);
    box-shadow: 0 8px 20px rgba(40, 79, 159, .10);
    outline: none;
    transform: translateY(-1px);
}

.assignment-picker-photo {
    width: 66px;
    height: 52px;
    flex: 0 0 66px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--sistemas-blue);
    background: #eef4ff;
    border-radius: 14px;
    border: 1px solid rgba(40, 79, 159, .12);
    font-weight: 800;
}

.assignment-picker-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.assignment-picker-photo-avatar {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
    border-radius: 50%;
}

.assignment-picker-body {
    min-width: 0;
    display: grid;
    gap: .15rem;
}

.assignment-picker-body strong,
.assignment-picker-body small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assignment-picker-body small {
    color: var(--sistemas-muted);
}

.assignment-available-section {
    border-top: 1px solid var(--sistemas-border);
    padding-top: 1rem;
}
.assignment-mini-list {
    display: grid;
    gap: .65rem;
    max-height: 520px;
    overflow-y: auto;
    padding-right: .15rem;
}
.assignment-free-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
    max-height: 520px;
    overflow-y: auto;
    padding-right: .15rem;
}
.assignment-mini-card {
    min-width: 0;
    border: 1px solid var(--sistemas-border);
    border-radius: 14px;
    background: #fff;
    padding: .75rem;
}
.responsiva-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.responsiva-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .85rem;
    border: 1px solid var(--sistemas-border);
    border-radius: 16px;
    background: #fff;
    padding: 1rem;
    color: var(--sistemas-text);
    text-decoration: none;
    box-shadow: var(--sistemas-soft-shadow);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.responsiva-card:hover,
.responsiva-card:focus {
    color: var(--sistemas-text);
    border-color: rgba(40, 79, 159, .34);
    box-shadow: 0 12px 28px rgba(40, 79, 159, .12);
    transform: translateY(-1px);
    outline: none;
}
.responsiva-card-top,
.responsiva-person {
    display: flex;
    gap: .75rem;
    align-items: center;
    min-width: 0;
}
.responsiva-card-top strong,
.responsiva-card-top small,
.responsiva-person strong,
.responsiva-person small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.responsiva-card-top small,
.responsiva-person small {
    color: var(--sistemas-muted);
}
.responsiva-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
}
.responsiva-card-meta span {
    min-width: 0;
    display: block;
    border-radius: 10px;
    background: #f8fafc;
    padding: .6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.responsiva-card-meta strong {
    display: block;
    color: var(--sistemas-muted);
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.responsiva-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    padding-top: .75rem;
    border-top: 1px solid var(--sistemas-border);
    color: var(--sistemas-blue);
    font-size: .82rem;
    font-weight: 800;
}

.assignment-accessory-card .form-check-input {
    margin: 0 .25rem 0 0;
    flex: 0 0 auto;
}

.min-w-0 {
    min-width: 0;
}

@media (max-width: 1199.98px) {
    .assignment-action-grid,
    .assignment-card-grid,
    .responsiva-card-grid,
    .assignment-card-grid.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .assignment-header,
    .assignment-search {
        flex-direction: column;
        align-items: stretch;
    }
    .assignment-action-grid,
    .assignment-card-grid,
    .assignment-card-grid.compact,
    .responsiva-card-grid,
    .assignment-free-grid,
    .assignment-picker-grid {
        grid-template-columns: 1fr;
    }
    .assignment-meta-grid {
        grid-template-columns: 1fr;
    }
}

@media print {
    .assignment-action-grid,
    .assignment-search,
    .assignment-record-actions,
    .assignment-picker-modal {
        display: none !important;
    }
}

/* Vista dinamica tipo admin turquesa */
:root {
    --sistemas-teal: #08aebe;
    --sistemas-teal-2: #28c6c8;
    --sistemas-dark: #243a42;
    --sistemas-dark-2: #182a31;
    --sistemas-pink: #ff4e78;
    --sistemas-orange: #ffad24;
    --sistemas-violet: #7461e8;
    --sistemas-green: #23b77b;
}

body {
    background:
        linear-gradient(90deg, rgba(238, 244, 249, .96) 0 42%, rgba(156, 222, 207, .72) 42% 73%, rgba(106, 209, 190, .86) 73% 100%);
}

body::before {
    opacity: .28;
    filter: blur(8px);
}

.app-shell {
    gap: 0;
    padding: 0;
}

.app-sidebar {
    top: 0;
    width: 250px;
    flex-basis: 250px;
    min-height: 100vh;
    max-height: 100vh;
    border: 0;
    border-radius: 0;
    background: linear-gradient(180deg, var(--sistemas-dark), var(--sistemas-dark-2));
    color: #eaf7f8;
    box-shadow: 16px 0 36px rgba(15, 38, 46, .24);
}

.app-brand {
    color: #fff;
    border-bottom-color: rgba(255,255,255,.12);
}

.app-brand small,
.app-sidebar .text-muted {
    color: rgba(255,255,255,.68) !important;
}

.app-brand-icon {
    background: linear-gradient(135deg, var(--sistemas-teal), var(--sistemas-teal-2));
    border-radius: 14px;
}

.app-menu a,
.app-menu-module-button {
    color: rgba(255,255,255,.78);
    background: rgba(255,255,255,.04);
    border-color: rgba(255,255,255,.08);
    box-shadow: none;
}

.app-menu a:hover,
.app-menu a.active,
.app-menu-module.is-open > .app-menu-module-button {
    color: #fff;
    background: linear-gradient(135deg, var(--sistemas-teal), #08a3b3);
    border-color: rgba(255,255,255,.16);
    box-shadow: 0 12px 24px rgba(8, 174, 190, .25);
}

.app-menu i,
.app-menu-module-button i {
    color: currentColor;
}

.app-main {
    padding: 18px 22px;
}

.app-topbar {
    top: 18px;
    border-radius: 0;
    background: linear-gradient(135deg, var(--sistemas-teal), #10b6c4);
    color: #fff;
    box-shadow: 0 10px 28px rgba(8, 174, 190, .24);
}

.app-topbar strong,
.app-topbar .text-muted {
    color: #fff !important;
}

.app-footer {
    display: none;
}

.card,
.modal-content,
.floating-card,
.sucursal-board,
.floating-toolbar {
    border: 1px solid rgba(255,255,255,.82);
    border-radius: 8px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 14px 34px rgba(26, 58, 74, .13);
    backdrop-filter: blur(14px);
}

.card {
    transition: transform .18s ease, box-shadow .18s ease;
}

.card:hover,
.floating-card:hover,
.puesto-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 44px rgba(26, 58, 74, .18);
}

.btn-primary,
.btn-success,
.btn-danger,
.btn-warning {
    border: 0;
    color: #fff;
}

.btn-primary { background: linear-gradient(135deg, #2086df, #2ec4f3); }
.btn-success { background: linear-gradient(135deg, #1fac73, #33d19a); }
.btn-danger { background: linear-gradient(135deg, #ff456a, #ff6f4f); }
.btn-warning { background: linear-gradient(135deg, #ffad24, #ffcf4d); color: #513700; }

.form-control,
.form-select {
    border-radius: 8px;
}

.smart-search-wrap,
.smart-select-wrap {
    width: 100%;
}

.smart-search-wrap > .form-control,
.smart-select-input {
    min-height: 52px;
    font-size: 1rem;
    padding-left: 1rem;
    box-shadow: 0 10px 24px rgba(26,58,74,.08);
}

.smart-search-results,
.smart-select-results {
    border-radius: 8px;
    box-shadow: 0 18px 36px rgba(26,58,74,.2);
    overflow: hidden;
}

.app-modal-icon {
    width: 92px;
    height: 92px;
    border-radius: 28px;
    font-size: 2.5rem;
    box-shadow: 0 18px 34px rgba(26,58,74,.16);
}

.app-modal-icon-success { background: linear-gradient(135deg, #d9fff0, #24c486); color: #08724b; }
.app-modal-icon-danger { background: linear-gradient(135deg, #ffe2e9, #ff4e78); color: #9d1735; }
.app-modal-icon-warning { background: linear-gradient(135deg, #fff3cf, #ffb225); color: #8a5a00; }
.app-modal-icon-info { background: linear-gradient(135deg, #d9fbff, var(--sistemas-teal)); color: #06616b; }

.app-message-success .modal-content { border-top: 7px solid #24c486; }
.app-message-danger .modal-content { border-top: 7px solid #ff4e78; }
.app-message-warning .modal-content { border-top: 7px solid #ffb225; }
.app-message-info .modal-content { border-top: 7px solid var(--sistemas-teal); }

.app-message-success .modal-title::before,
.app-message-danger .modal-title::before,
.app-message-warning .modal-title::before,
.app-message-info .modal-title::before {
    display: inline-block;
    margin-right: .45rem;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.app-message-success .modal-title::before { content: "\f058"; color: #24c486; }
.app-message-danger .modal-title::before { content: "\f057"; color: #ff4e78; }
.app-message-warning .modal-title::before { content: "\f071"; color: #ffb225; }
.app-message-info .modal-title::before { content: "\f05a"; color: var(--sistemas-teal); }

.module-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-radius: 8px;
    padding: 1.3rem 1.5rem;
    color: #fff;
    box-shadow: 0 18px 38px rgba(8,174,190,.2);
}

.module-hero-teal {
    background: linear-gradient(135deg, #08aebe, #29c5c9);
}

.module-hero h1 {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 800;
}

.module-hero p {
    margin: .25rem 0 0;
    max-width: 760px;
    color: rgba(255,255,255,.86);
}

.module-kicker {
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.floating-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
}

.smart-search-xl {
    position: relative;
}

.smart-search-xl > i {
    position: absolute;
    left: 1rem;
    top: 50%;
    z-index: 2;
    color: var(--sistemas-teal);
    transform: translateY(-50%);
}

.smart-search-xl .form-control {
    min-height: 60px;
    padding-left: 3rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.metric-pill {
    min-width: 124px;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: .65rem;
    align-items: center;
    border-radius: 8px;
    padding: .7rem .9rem;
    color: #fff;
}

.metric-pill span {
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1;
}

.metric-pill small {
    grid-column: 2;
    opacity: .9;
    font-weight: 700;
}

.metric-pill.danger { background: linear-gradient(135deg, #ff456a, #ff7358); }
.metric-pill.success { background: linear-gradient(135deg, #17aa72, #39d39c); }

.sucursal-board {
    padding: 1rem;
}

.sucursal-board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.sucursal-board-header h2 {
    margin: 0;
    color: var(--sistemas-dark);
    font-size: 1.15rem;
    font-weight: 900;
}

.puesto-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.puesto-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 12px 28px rgba(26,58,74,.12);
    transition: transform .18s ease, box-shadow .18s ease;
}

.puesto-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
}

.puesto-card-vacante::before { background: #ff456a; }
.puesto-card-ocupado::before { background: #19b77c; }

.puesto-card-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #fff;
    font-size: 1.35rem;
    margin-bottom: .85rem;
}

.puesto-card-vacante .puesto-card-icon { background: linear-gradient(135deg, #ff456a, #ff7358); }
.puesto-card-ocupado .puesto-card-icon { background: linear-gradient(135deg, #18ab72, #31d19a); }

.puesto-card h3 {
    margin: 0;
    color: #1e2d35;
    font-size: 1rem;
    font-weight: 900;
}

.puesto-meta {
    color: #6b7785;
    font-size: .82rem;
}

.puesto-status {
    height: fit-content;
    border-radius: 999px;
    padding: .32rem .62rem;
    color: #fff;
    font-size: .72rem;
    font-weight: 900;
}

.puesto-card-vacante .puesto-status { background: #ff456a; }
.puesto-card-ocupado .puesto-status { background: #19b77c; }

.puesto-person {
    border-radius: 8px;
    background: #f5f8fb;
    padding: .7rem;
}

.puesto-person span,
.transfer-last-person span {
    display: block;
    color: #7b8794;
    font-size: .68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.puesto-person strong,
.transfer-last-person strong {
    display: block;
    color: #1e2d35;
    line-height: 1.25;
}

.puesto-person-last {
    margin-top: .55rem;
}

.puesto-mini-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .8rem;
}

.puesto-mini-metrics span {
    border-radius: 999px;
    background: #eef7f8;
    color: #24606b;
    padding: .35rem .65rem;
    font-size: .78rem;
    font-weight: 800;
}

.floating-card {
    padding: 1rem;
}

.accent-danger { border-left: 5px solid #ff456a; }
.accent-info { border-left: 5px solid var(--sistemas-teal); }
.accent-warning { border-left: 5px solid #ffad24; }

.section-title {
    margin-bottom: .75rem;
    color: #1e2d35;
    font-weight: 900;
}

.transfer-option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}

.transfer-option {
    display: flex;
    gap: .65rem;
    align-items: flex-start;
    border: 1px solid #dbe8ee;
    border-radius: 8px;
    background: #f8fbfd;
    padding: .75rem;
}

.transfer-option strong,
.transfer-option small {
    display: block;
}

.transfer-option small {
    color: #6b7785;
}

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

@media (max-width: 767.98px) {
    .app-shell {
        display: block;
    }
    .app-sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
        max-height: none;
    }
    .app-main {
        padding: 12px;
    }
    .floating-toolbar,
    .puesto-grid,
    .transfer-option-grid {
        grid-template-columns: 1fr;
    }
    .module-hero {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Ajuste final de paleta tipo referencia FAB Admin */
:root {
    --fab-cyan: #10afbd;
    --fab-cyan-light: #27c4ca;
    --fab-sidebar: #263b43;
    --fab-sidebar-dark: #203239;
    --fab-page: #f2f6fa;
    --fab-card: #ffffff;
    --fab-text: #273942;
    --fab-muted: #7c8894;
    --fab-pink: #ff4f71;
    --fab-green: #22bf81;
    --fab-blue: #1f91df;
    --fab-orange: #ffad24;
    --fab-purple: #7561e8;
}

body,
body.app-body {
    color: var(--fab-text) !important;
    background: var(--fab-page) !important;
}

body::before,
body::after {
    display: none !important;
}

.app-shell {
    background: var(--fab-page) !important;
}

.app-sidebar {
    background: linear-gradient(180deg, var(--fab-sidebar) 0%, var(--fab-sidebar-dark) 100%) !important;
    color: #dce9ed !important;
    box-shadow: 10px 0 28px rgba(20, 43, 52, .18) !important;
}

.app-brand {
    min-height: 92px !important;
    color: #fff !important;
    background: var(--fab-cyan) !important;
    border: 0 !important;
    border-radius: 0 !important;
    margin: -12px -12px 12px !important;
    padding: 1rem !important;
}

.app-brand-icon {
    background: rgba(255,255,255,.18) !important;
    border: 1px solid rgba(255,255,255,.35) !important;
    box-shadow: none !important;
}

.app-menu-module-button {
    min-height: 46px !important;
    border-radius: 6px !important;
    color: rgba(255,255,255,.8) !important;
    background: transparent !important;
    border-color: transparent !important;
}

.app-menu a {
    min-height: 42px !important;
    margin: .18rem 0 !important;
    border: 0 !important;
    border-radius: 6px !important;
    color: rgba(255,255,255,.74) !important;
    background: transparent !important;
    box-shadow: none !important;
}

.app-menu-module.is-open > .app-menu-module-button,
.app-menu a:hover,
.app-menu a.active {
    color: #fff !important;
    background: var(--fab-cyan) !important;
    box-shadow: 0 12px 24px rgba(16, 175, 189, .22) !important;
}

.app-menu small {
    color: rgba(255,255,255,.62) !important;
}

.app-main {
    background: var(--fab-page) !important;
    padding: 18px 22px !important;
}

.app-main > .app-topbar,
.app-topbar {
    min-height: 66px !important;
    top: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #fff !important;
    background: var(--fab-cyan) !important;
    box-shadow: 0 2px 12px rgba(20, 43, 52, .16) !important;
}

.app-topbar .btn-outline-secondary {
    border-color: rgba(255,255,255,.55) !important;
    color: #fff !important;
    background: rgba(255,255,255,.12) !important;
}

.module-hero.module-hero-teal {
    background: var(--fab-cyan) !important;
    box-shadow: 0 10px 22px rgba(16, 175, 189, .18) !important;
}

.card,
.modal-content,
.floating-card,
.sucursal-board,
.floating-toolbar,
.puesto-card {
    border: 0 !important;
    border-radius: 6px !important;
    background: var(--fab-card) !important;
    box-shadow: 0 8px 24px rgba(37, 53, 63, .08) !important;
    backdrop-filter: none !important;
}

.floating-toolbar {
    padding: 1rem !important;
}

.smart-search-xl .form-control,
.smart-search-wrap > .form-control,
.smart-select-input,
.form-control,
.form-select {
    border-color: #cfd9e4 !important;
    background: #fff !important;
    color: var(--fab-text) !important;
}

.smart-search-xl > i {
    color: var(--fab-cyan) !important;
}

.metric-pill.danger {
    background: #ff5967 !important;
}

.metric-pill.success {
    background: #25bf83 !important;
}

.puesto-card-vacante::before {
    background: #ff5967 !important;
}

.puesto-card-ocupado::before {
    background: #25bf83 !important;
}

.puesto-card-vacante .puesto-card-icon {
    background: #ff5967 !important;
}

.puesto-card-ocupado .puesto-card-icon {
    background: #25bf83 !important;
}

.puesto-card-vacante .puesto-status {
    background: #ff5967 !important;
}

.puesto-card-ocupado .puesto-status {
    background: #25bf83 !important;
}

.puesto-mini-metrics span {
    background: #e9f8fb !important;
    color: #176d78 !important;
}

.btn-primary {
    background: var(--fab-blue) !important;
}

.btn-success {
    background: var(--fab-green) !important;
}

.btn-danger {
    background: #ff5967 !important;
}

.btn-warning {
    background: var(--fab-orange) !important;
}

.accent-info {
    border-left-color: var(--fab-blue) !important;
}

.accent-warning {
    border-left-color: var(--fab-orange) !important;
}

.accent-danger {
    border-left-color: var(--fab-pink) !important;
}

.app-modal-icon-info {
    background: var(--fab-cyan) !important;
    color: #fff !important;
}

.app-modal-icon-success {
    background: var(--fab-green) !important;
    color: #fff !important;
}

.app-modal-icon-danger {
    background: var(--fab-pink) !important;
    color: #fff !important;
}

.app-modal-icon-warning {
    background: var(--fab-orange) !important;
    color: #fff !important;
}

/* Paleta final tipo Start Bootstrap */
:root {
    --sb-dark: #343a40;
    --sb-sidebar: #212529;
    --sb-sidebar-muted: #868e96;
    --sb-page: #ffffff;
    --sb-soft: #f8f9fa;
    --sb-border: #dee2e6;
    --sb-text: #212529;
    --sb-muted: #6c757d;
    --sb-primary: #007bff;
    --sb-warning: #ffc107;
    --sb-success: #28a745;
    --sb-danger: #dc3545;
    --fb-blue: #1877f2;
    --fb-blue-dark: #0f5fc4;
    --fb-blue-light: #4aa3ff;
}

body,
body.app-body {
    color: var(--sb-text) !important;
    background: var(--sb-page) !important;
}

.app-shell {
    background: var(--sb-page) !important;
}

.app-sidebar {
    background: var(--sb-sidebar) !important;
    color: rgba(255,255,255,.75) !important;
    box-shadow: none !important;
    border-right: 1px solid #343a40 !important;
}

.app-brand {
    min-height: 56px !important;
    align-items: flex-start !important;
    justify-content: center !important;
    color: #fff !important;
    background: var(--sb-dark) !important;
    border-bottom: 1px solid #3f474e !important;
    margin: -12px -12px 18px !important;
    padding: .85rem 1rem !important;
    text-align: left !important;
}

.app-brand-icon {
    display: none !important;
}

.app-brand small {
    display: none !important;
}

.app-menu-module-button {
    min-height: 38px !important;
    color: var(--sb-sidebar-muted) !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    font-size: .75rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
}

.app-menu a {
    min-height: 44px !important;
    color: rgba(255,255,255,.62) !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.app-menu a:hover,
.app-menu a.active,
.app-menu-module.is-open > .app-menu-module-button {
    color: #fff !important;
    background: transparent !important;
    box-shadow: none !important;
}

.app-menu a.active i,
.app-menu a:hover i {
    color: #fff !important;
}

.app-menu small {
    color: var(--sb-sidebar-muted) !important;
}

.app-main {
    padding: 0 !important;
    background: var(--sb-page) !important;
}

.app-main > main.container-fluid {
    padding: 2rem 1.5rem !important;
}

.app-topbar {
    min-height: 56px !important;
    top: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: linear-gradient(135deg, var(--fb-blue-dark), var(--fb-blue), var(--fb-blue-light)) !important;
    color: #fff !important;
    box-shadow: none !important;
}

.app-topbar .text-muted,
.app-topbar strong {
    color: #fff !important;
}

.module-hero.module-hero-teal {
    color: #fff !important;
    background: linear-gradient(135deg, var(--fb-blue-dark), var(--fb-blue), var(--fb-blue-light)) !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 1.3rem 1.5rem !important;
}

.module-hero h1 {
    color: #fff !important;
    font-size: 2.25rem !important;
    font-weight: 500 !important;
}

.module-hero p,
.module-kicker {
    color: rgba(255,255,255,.88) !important;
}

.module-hero .btn-light {
    border: 1px solid var(--sb-border) !important;
    background: var(--sb-soft) !important;
    color: var(--sb-text) !important;
}

.floating-toolbar,
.sucursal-board,
.card,
.modal-content,
.floating-card,
.puesto-card {
    border: 1px solid var(--sb-border) !important;
    border-radius: 4px !important;
    background: #fff !important;
    box-shadow: none !important;
}

.floating-toolbar {
    background: var(--sb-soft) !important;
}

.smart-search-xl .form-control,
.smart-search-wrap > .form-control,
.smart-select-input,
.form-control,
.form-select {
    border-color: #ced4da !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}

.smart-search-xl > i {
    color: var(--sb-primary) !important;
}

.btn {
    border-radius: 4px !important;
}

.btn-primary,
.metric-pill.primary {
    background: var(--sb-primary) !important;
}

.btn-warning,
.metric-pill.warning {
    background: var(--sb-warning) !important;
    color: #212529 !important;
}

.btn-success,
.metric-pill.success {
    background: var(--sb-success) !important;
}

.btn-danger,
.metric-pill.danger {
    background: var(--sb-danger) !important;
}

.metric-pill {
    border-radius: 4px !important;
    box-shadow: none !important;
}

.puesto-card::before {
    display: none !important;
}

.puesto-card-vacante {
    border-top: 4px solid var(--sb-danger) !important;
}

.puesto-card-ocupado {
    border-top: 4px solid var(--sb-success) !important;
}

.puesto-card-vacante .puesto-card-icon,
.puesto-card-vacante .puesto-status {
    background: var(--sb-danger) !important;
}

.puesto-card-ocupado .puesto-card-icon,
.puesto-card-ocupado .puesto-status {
    background: var(--sb-success) !important;
}

.puesto-card-icon,
.puesto-status,
.puesto-mini-metrics span {
    border-radius: 4px !important;
}

.puesto-mini-metrics span {
    background: #e9ecef !important;
    color: var(--sb-text) !important;
}

.sucursal-board-header {
    border-bottom: 1px solid var(--sb-border) !important;
    margin: -1rem -1rem 1rem !important;
    padding: .9rem 1rem !important;
    background: var(--sb-soft) !important;
}

.sucursal-board-header h2 {
    font-size: 1rem !important;
    font-weight: 500 !important;
}

.accent-info {
    border-left: 4px solid var(--sb-primary) !important;
}

.accent-warning {
    border-left: 4px solid var(--sb-warning) !important;
}

.accent-danger {
    border-left: 4px solid var(--sb-danger) !important;
}

.app-modal-icon-info,
.app-message-info .modal-content {
    border-color: var(--sb-primary) !important;
}

.app-modal-icon-info {
    background: var(--sb-primary) !important;
}

.app-modal-icon-success {
    background: var(--sb-success) !important;
}

.app-modal-icon-danger {
    background: var(--sb-danger) !important;
}

.app-modal-icon-warning {
    background: var(--sb-warning) !important;
    color: #212529 !important;
}

/* Puestos compactos */
.puesto-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: .75rem !important;
}

.puesto-card {
    padding: .75rem !important;
    min-height: auto !important;
}

.puesto-card-icon {
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px !important;
    margin: 0 0 .55rem 0 !important;
    font-size: 1rem !important;
}

.puesto-card h3 {
    font-size: .92rem !important;
}

.puesto-meta,
.puesto-person,
.puesto-mini-metrics span {
    font-size: .75rem !important;
}

.puesto-person {
    padding: .45rem !important;
    margin-top: .5rem !important;
}

.puesto-person-inline {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: .55rem;
}

.puesto-person-inline img,
.puesto-person-avatar {
    width: 38px;
    height: 38px;
    border-radius: 4px;
    object-fit: cover;
    background: #e9ecef;
}

.puesto-person-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--sb-muted);
}

.puesto-person span,
.transfer-last-person span {
    font-size: .62rem !important;
}

.puesto-status {
    padding: .22rem .45rem !important;
    font-size: .65rem !important;
}

.puesto-mini-metrics {
    gap: .35rem !important;
    margin-top: .55rem !important;
}

.puesto-mini-metrics span {
    padding: .24rem .45rem !important;
}

@media (max-width: 1399.98px) {
    .puesto-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

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

@media (max-width: 575.98px) {
    .puesto-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Correccion definitiva: sin turquesa, solo azul Facebook */
:root {
    --sistemas-teal: #1877f2;
    --sistemas-teal-2: #4aa3ff;
    --fab-cyan: #1877f2;
    --fab-cyan-light: #4aa3ff;
}

html body .app-shell .app-main .app-topbar,
html body .app-topbar,
html body .module-hero.module-hero-teal,
html body .app-brand {
    background: linear-gradient(120deg, #171b22 0%, #0e1116 100%) !important;
    background-color: #0e1116 !important;
}
html body .app-menu a.active,
html body .app-menu a:hover,
html body .app-menu-module.is-open > .app-menu-module-button {
    background: rgba(246, 135, 31, .16) !important;
    background-color: rgba(246, 135, 31, .16) !important;
}

.report-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    border: 1px solid var(--sb-border);
    border-radius: 4px;
    background: #fff;
    padding: .9rem;
}

.plantilla-sucursal {
    border-top: 1px solid var(--sb-border);
    padding-top: 1rem;
}

.plantilla-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .8rem;
}

.plantilla-header span {
    color: var(--sb-muted);
    font-size: .85rem;
}

.plantilla-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: .35rem;
}

.plantilla-list-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: .65rem;
    border: 1px solid var(--sb-border);
    border-radius: 4px;
    background: #fff;
    padding: .45rem .6rem;
}

.plantilla-list-item img,
.plantilla-avatar {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    object-fit: cover;
    background: #e9ecef;
}

.plantilla-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--sb-muted);
}

.plantilla-list-body strong,
.plantilla-list-body span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plantilla-list-body span {
    color: var(--sb-muted);
    font-size: .9rem;
}

@media print {
    .app-sidebar,
    .app-topbar,
    .module-hero-actions,
    .floating-toolbar,
    .report-toolbar,
    .puesto-card .btn,
    .modal,
    .smart-search-results {
        display: none !important;
    }
    .app-main,
    .app-main > main.container-fluid {
        padding: 0 !important;
    }
    .sucursal-board {
        break-inside: avoid;
        box-shadow: none !important;
        margin-bottom: 10mm !important;
    }
    body[data-print-report="vacantes"] [data-report-kind="activos"],
    body[data-print-report="vacantes"] [data-report-kind="planillas"],
    body[data-print-report="activos"] [data-report-kind="vacantes"],
    body[data-print-report="activos"] [data-report-kind="planillas"],
    body[data-print-report="planillas"] [data-report-kind="vacantes"],
    body[data-print-report="planillas"] .sucursal-board-header .badge {
        display: none !important;
    }
    body[data-print-report="vacantes"] .sucursal-board:not(:has([data-report-kind="vacantes"])),
    body[data-print-report="activos"] .sucursal-board:not(:has([data-report-kind="activos"])),
    body[data-print-report="planillas"] .sucursal-board:not(:has([data-report-kind="activos"])) {
        display: none !important;
    }
}

@media print {
    body[data-print-report] {
        background: #fff !important;
    }

    body[data-print-report] .module-hero {
        display: block !important;
        color: #1f2937 !important;
        background: #fff !important;
        border: 1px solid #d7dde6 !important;
        padding: 10px 12px !important;
        margin-bottom: 10px !important;
    }

    body[data-print-report] .module-hero h1 {
        font-size: 18px !important;
        margin: 0 0 3px !important;
    }

    body[data-print-report] .module-hero p,
    body[data-print-report] .module-kicker {
        font-size: 11px !important;
        color: #4b5563 !important;
        margin: 0 !important;
    }

    body[data-print-report] .sucursal-board {
        border: 1px solid #d7dde6 !important;
        border-radius: 4px !important;
        padding: 0 !important;
        margin: 0 0 10px !important;
        background: #fff !important;
        page-break-inside: avoid;
    }

    body[data-print-report] .sucursal-board-header {
        margin: 0 !important;
        padding: 8px 10px !important;
        background: #f2f4f7 !important;
        border-bottom: 1px solid #d7dde6 !important;
    }

    body[data-print-report] .sucursal-board-header h2 {
        font-size: 13px !important;
        margin: 0 !important;
        color: #1f2937 !important;
    }

    body[data-print-report] .sucursal-board-header .small {
        font-size: 10px !important;
    }

    body[data-print-report] .puesto-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 5px !important;
        padding: 8px !important;
    }

    body[data-print-report] .puesto-card {
        display: grid !important;
        grid-template-columns: 34px minmax(0, 1fr) !important;
        gap: 8px !important;
        align-items: start !important;
        border: 1px solid #d7dde6 !important;
        border-left-width: 4px !important;
        border-top-width: 1px !important;
        border-radius: 4px !important;
        padding: 7px !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    body[data-print-report] .puesto-card-vacante {
        border-left-color: #dc3545 !important;
    }

    body[data-print-report] .puesto-card-ocupado {
        border-left-color: #198754 !important;
    }

    body[data-print-report] .puesto-card-icon {
        width: 28px !important;
        height: 28px !important;
        margin: 0 !important;
        font-size: 12px !important;
    }

    body[data-print-report] .puesto-card-body > .d-flex {
        align-items: flex-start !important;
    }

    body[data-print-report] .puesto-card h3 {
        font-size: 12px !important;
        margin-bottom: 2px !important;
    }

    body[data-print-report] .puesto-meta,
    body[data-print-report] .puesto-person,
    body[data-print-report] .puesto-mini-metrics span {
        font-size: 10px !important;
    }

    body[data-print-report] .puesto-person-inline {
        grid-template-columns: 32px minmax(0, 1fr) !important;
        gap: 6px !important;
        padding: 4px !important;
        margin-top: 5px !important;
    }

    body[data-print-report] .puesto-person-inline img,
    body[data-print-report] .puesto-person-avatar {
        width: 32px !important;
        height: 32px !important;
    }

    body[data-print-report] .puesto-person strong,
    body[data-print-report] .puesto-person span,
    body[data-print-report] .puesto-mini-metrics span {
        white-space: normal !important;
    }

    body[data-print-report] .puesto-person span {
        font-size: 9px !important;
    }

    body[data-print-report] .puesto-status {
        font-size: 9px !important;
        padding: 2px 5px !important;
    }

body[data-print-report] .puesto-mini-metrics {
        margin-top: 5px !important;
        gap: 4px !important;
    }

    body[data-print-report] .puesto-mini-metrics span {
        padding: 2px 5px !important;
    }
}

.smart-search-icon,
.dashboard-info-icon,
.smart-search-result-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    border-radius: 8px;
    color: #fff;
    background: var(--sistemas-blue);
}

.smart-search-hero {
    display: flex;
    justify-content: center;
    padding: 20px 10px 8px;
}

.smart-search-hero-inner {
    width: min(760px, 100%);
    text-align: center;
}

.smart-search-hero h2 {
    margin: 0 0 14px;
    color: var(--sistemas-text);
    font-size: 1.9rem;
    font-weight: 800;
}

.smart-search-box {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    min-height: 56px;
    border: 1px solid rgba(37,99,235,.28);
    border-radius: 999px;
    background: rgba(255,255,255,.92);
    box-shadow:
        0 16px 38px rgba(37,99,235,.24),
        0 0 0 7px rgba(37,99,235,.07),
        inset 0 1px 0 rgba(255,255,255,.95);
    backdrop-filter: blur(14px);
    transition: box-shadow .16s ease, border-color .16s ease;
}

.smart-search-box:focus-within {
    border-color: rgba(37,99,235,.55);
    box-shadow:
        0 20px 46px rgba(37,99,235,.32),
        0 0 0 8px rgba(37,99,235,.11),
        inset 0 1px 0 rgba(255,255,255,.98);
}

.smart-search-box > i {
    color: var(--sistemas-blue);
    text-align: center;
}

.smart-search-box .form-control {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.smart-search-results {
    display: grid;
    gap: 6px;
    text-align: left;
}

.smart-search-result {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 1px solid var(--sistemas-border);
    border-radius: 8px;
    background: rgba(255,255,255,.82);
    color: var(--sistemas-text);
    padding: 8px;
    text-align: left;
}

.smart-search-result:hover {
    background: #fff;
    border-color: rgba(40,79,159,.35);
}

.smart-search-result-body {
    min-width: 0;
}

.smart-search-result-body strong,
.smart-search-result-body small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.smart-search-result-body small,
.smart-search-empty {
    color: var(--sistemas-muted);
    font-size: .88rem;
}

.smart-search-result-type {
    border: 1px solid var(--sistemas-border);
    border-radius: 999px;
    padding: 3px 8px;
    color: var(--sistemas-muted);
    background: #fff;
    font-size: .75rem;
}

.dashboard-search-results {
    display: grid;
    position: static !important;
    inset: auto !important;
    z-index: auto !important;
    gap: 8px;
    width: 100%;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: left;
}

.dashboard-search-results:empty {
    display: none !important;
}

.dashboard-search-results .smart-search-empty {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 14px;
    padding: .75rem .9rem;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
}

.dashboard-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.dashboard-info-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 86px;
    padding: 12px;
    text-decoration: none;
    color: #fff;
    border: 0;
    border-radius: 8px;
    background: var(--sistemas-blue);
    box-shadow: var(--sistemas-soft-shadow);
}

.dashboard-info-card:hover {
    color: #fff;
    transform: translateY(-1px);
}

.dashboard-info-card .dashboard-info-icon {
    background: rgba(255,255,255,.18);
}

.dashboard-info-card-1 { background: #2563eb; }
.dashboard-info-card-2 { background: #0f766e; }
.dashboard-info-card-3 { background: #7c3aed; }
.dashboard-info-card-4 { background: #c2410c; }
.dashboard-info-card-5 { background: #be123c; }
.dashboard-info-card-6 { background: #047857; }
.dashboard-info-card-7 { background: #1d4ed8; }

.dashboard-info-body strong,
.dashboard-info-body small,
.dashboard-info-body em {
    display: block;
    min-width: 0;
}

.dashboard-info-body strong {
    font-size: 1.4rem;
    line-height: 1;
}

.dashboard-info-body small {
    font-weight: 800;
}

.dashboard-info-body em {
    color: rgba(255,255,255,.78);
    font-size: .8rem;
    font-style: normal;
}

.smart-detail-table th {
    width: 190px;
    color: var(--sistemas-muted);
    text-transform: capitalize;
}

.dashboard-page .quick-module-card {
    color: #fff !important;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.32) !important;
    background: linear-gradient(135deg, rgba(37,99,235,.82), rgba(29,78,216,.64)) !important;
    box-shadow:
        0 14px 30px rgba(15, 23, 42, .18),
        inset 0 1px 0 rgba(255,255,255,.34) !important;
    backdrop-filter: blur(16px) saturate(135%);
}

.dashboard-page .quick-module-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(255,255,255,.32), transparent 42%),
        linear-gradient(315deg, rgba(255,255,255,.12), transparent 48%);
}

.dashboard-page .quick-module-card > * {
    position: relative;
    z-index: 1;
}

.dashboard-page .quick-module-card:nth-child(12n+1) { background: linear-gradient(135deg, rgba(37,99,235,.86), rgba(29,78,216,.62)) !important; }
.dashboard-page .quick-module-card:nth-child(12n+2) { background: linear-gradient(135deg, rgba(15,118,110,.86), rgba(13,148,136,.62)) !important; }
.dashboard-page .quick-module-card:nth-child(12n+3) { background: linear-gradient(135deg, rgba(124,58,237,.86), rgba(109,40,217,.62)) !important; }
.dashboard-page .quick-module-card:nth-child(12n+4) { background: linear-gradient(135deg, rgba(194,65,12,.86), rgba(234,88,12,.62)) !important; }
.dashboard-page .quick-module-card:nth-child(12n+5) { background: linear-gradient(135deg, rgba(190,18,60,.86), rgba(225,29,72,.62)) !important; }
.dashboard-page .quick-module-card:nth-child(12n+6) { background: linear-gradient(135deg, rgba(4,120,87,.86), rgba(5,150,105,.62)) !important; }
.dashboard-page .quick-module-card:nth-child(12n+7) { background: linear-gradient(135deg, rgba(3,105,161,.86), rgba(2,132,199,.62)) !important; }
.dashboard-page .quick-module-card:nth-child(12n+8) { background: linear-gradient(135deg, rgba(101,163,13,.86), rgba(132,204,22,.62)) !important; }
.dashboard-page .quick-module-card:nth-child(12n+9) { background: linear-gradient(135deg, rgba(147,51,234,.86), rgba(168,85,247,.62)) !important; }
.dashboard-page .quick-module-card:nth-child(12n+10) { background: linear-gradient(135deg, rgba(180,83,9,.86), rgba(245,158,11,.62)) !important; }
.dashboard-page .quick-module-card:nth-child(12n+11) { background: linear-gradient(135deg, rgba(14,116,144,.86), rgba(6,182,212,.62)) !important; }
.dashboard-page .quick-module-card:nth-child(12n+12) { background: linear-gradient(135deg, rgba(67,56,202,.86), rgba(99,102,241,.62)) !important; }

.dashboard-page .quick-module-card:hover,
.dashboard-page .quick-module-card:focus {
    color: #fff !important;
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.dashboard-page .quick-module-card i {
    color: #fff !important;
    background: rgba(255,255,255,.20) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.28);
}

.dashboard-page .quick-module-card small,
.dashboard-page .quick-module-card .text-muted {
    color: rgba(255,255,255,.78) !important;
}

html body.app-body {
    --layout-sidebar-width: 250px;
    --layout-header-height: 66px;
    --layout-footer-height: 42px;
    overflow-x: hidden;
}

html,
html body {
    max-width: 100%;
    overflow-x: hidden !important;
}

html body .app-shell {
    display: block !important;
    min-height: 100vh !important;
    padding: 0 !important;
    background: var(--sb-page) !important;
    overflow-x: hidden !important;
}

html body .app-sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    z-index: 1040 !important;
    width: var(--layout-sidebar-width) !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    overflow-y: auto !important;
    border: 1px solid rgba(255,255,255,.22) !important;
    border-width: 0 1px 0 0 !important;
    background:
        linear-gradient(180deg, rgba(17,24,39,.82), rgba(31,41,55,.74)),
        linear-gradient(135deg, rgba(37,99,235,.28), rgba(15,118,110,.18)) !important;
    box-shadow: 16px 0 34px rgba(15,23,42,.22) !important;
    backdrop-filter: blur(18px) saturate(135%) !important;
    transition: transform .22s ease !important;
}

html body.app-sidebar-collapsed .app-sidebar {
    transform: translateX(calc(-1 * var(--layout-sidebar-width))) !important;
}

html body .app-main {
    display: block !important;
    min-width: 0 !important;
    width: calc(100% - var(--layout-sidebar-width)) !important;
    min-height: 100vh !important;
    margin-left: var(--layout-sidebar-width) !important;
    padding: calc(var(--layout-header-height) + 18px) 22px calc(var(--layout-footer-height) + 18px) !important;
    background: var(--sb-page) !important;
    overflow-x: hidden !important;
    transition: margin-left .22s ease, width .22s ease !important;
}

html body.app-sidebar-collapsed .app-main {
    margin-left: 0 !important;
    width: 100% !important;
}

html body .app-topbar {
    position: fixed !important;
    top: 0 !important;
    left: var(--layout-sidebar-width) !important;
    right: 0 !important;
    z-index: 1030 !important;
    min-height: var(--layout-header-height) !important;
    border: 1px solid rgba(255,255,255,.30) !important;
    border-width: 0 0 1px !important;
    border-radius: 0 !important;
    color: #fff !important;
    background:
        linear-gradient(135deg, rgba(15,95,196,.88), rgba(24,119,242,.76), rgba(74,163,255,.68)) !important;
    box-shadow:
        0 14px 32px rgba(37,99,235,.20),
        inset 0 1px 0 rgba(255,255,255,.28) !important;
    backdrop-filter: blur(18px) saturate(140%) !important;
    transition: left .22s ease !important;
}

html body.app-sidebar-collapsed .app-topbar {
    left: 0 !important;
}

html body .app-topbar > div:first-of-type {
    min-width: 0;
    flex: 1 1 auto;
}

html body .app-topbar strong,
html body .app-topbar .text-muted {
    color: #fff !important;
}

html body .app-sidebar-toggle {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.36) !important;
    background: rgba(255,255,255,.16) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.28);
}

html body .app-footer {
    position: fixed !important;
    left: var(--layout-sidebar-width) !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 1025 !important;
    min-height: var(--layout-footer-height) !important;
    display: flex !important;
    align-items: center !important;
    color: rgba(255,255,255,.88) !important;
    border: 1px solid rgba(255,255,255,.26) !important;
    border-width: 1px 0 0 !important;
    border-radius: 0 !important;
    background:
        linear-gradient(135deg, rgba(17,24,39,.82), rgba(31,41,55,.66)) !important;
    box-shadow:
        0 -12px 28px rgba(15,23,42,.14),
        inset 0 1px 0 rgba(255,255,255,.18) !important;
    backdrop-filter: blur(18px) saturate(135%) !important;
    transition: left .22s ease !important;
}

html body.app-sidebar-collapsed .app-footer {
    left: 0 !important;
}

html body .app-brand {
    background: linear-gradient(135deg, rgba(37,99,235,.72), rgba(14,116,144,.54)) !important;
    border-bottom: 1px solid rgba(255,255,255,.18) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.24) !important;
}

html body .app-menu-module-button,
html body .app-menu a {
    border: 1px solid rgba(255,255,255,.10) !important;
    background: rgba(255,255,255,.06) !important;
    backdrop-filter: blur(10px);
}

html body .app-menu-module.is-open > .app-menu-module-button,
html body .app-menu a.active,
html body .app-menu a:hover {
    color: #fff !important;
    background: linear-gradient(135deg, rgba(37,99,235,.80), rgba(14,165,233,.58)) !important;
    box-shadow:
        0 10px 22px rgba(37,99,235,.20),
        inset 0 1px 0 rgba(255,255,255,.22) !important;
}

@media (max-width: 991.98px) {
    html body .app-main {
        margin-left: 0 !important;
        width: 100% !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    html body .app-sidebar {
        transform: translateX(calc(-1 * var(--layout-sidebar-width))) !important;
    }
    html body:not(.app-sidebar-collapsed) .app-sidebar {
        transform: translateX(0) !important;
    }
    html body .app-topbar,
    html body .app-footer {
        left: 0 !important;
    }
}

/* ===== EPGRL: Tarjeta de empleado (estilo credencial) en modal de detalle ===== */
.emp-card-dialog { max-width: 720px; }
.emp-card-modal {
    border: 0;
    border-radius: 20px;
    overflow: hidden;
    background: transparent;
    box-shadow: 0 30px 80px rgba(4, 8, 20, .55);
}
.emp-card-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    opacity: .9;
}
.emp-card {
    position: relative;
    color: #f4f6fb;
    background:
        radial-gradient(120% 90% at 85% -10%, rgba(246, 135, 31, .22) 0, transparent 46%),
        linear-gradient(160deg, #171b22 0%, #0e1116 60%, #0b0d12 100%);
    padding: 18px 20px 16px;
}
.emp-card::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 5px;
    background: linear-gradient(90deg, #f6871f, #ffc061 55%, #f6871f);
}
.emp-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}
.emp-card-brand { display: flex; align-items: center; gap: 10px; }
.emp-card-shield {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 11px;
    color: #0b0d12;
    background: linear-gradient(135deg, #ffc061, #f6871f);
    font-size: 1.05rem;
    box-shadow: 0 8px 20px rgba(246, 135, 31, .35);
}
.emp-card-brand-text {
    display: flex; flex-direction: column; line-height: 1.05;
    font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: .95rem;
}
.emp-card-brand-text small {
    font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
    font-size: .58rem; color: rgba(255, 255, 255, .55);
}
.emp-card-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 999px;
    font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: #d6ffe4;
    background: rgba(76, 174, 114, .16);
    border: 1px solid rgba(76, 174, 114, .5);
}
.emp-card-hero {
    display: flex; gap: 16px; align-items: center;
    padding-bottom: 14px; margin-bottom: 14px;
    border-bottom: 1px dashed rgba(246, 135, 31, .35);
}
.emp-card-photo {
    position: relative;
    width: 92px; height: 92px; flex: 0 0 92px;
    border-radius: 16px; overflow: hidden;
    border: 2px solid rgba(246, 135, 31, .75);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .45);
    background: #0b0d12;
}
.emp-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.emp-card-photo-fallback {
    width: 100%; height: 100%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 2.2rem; font-weight: 800; color: #f6871f;
    background: linear-gradient(135deg, #232936, #12151b);
}
.emp-card-hero-info { min-width: 0; }
.emp-card-name {
    font-size: 1.5rem; font-weight: 800; line-height: 1.1;
    text-transform: uppercase; letter-spacing: .01em;
}
.emp-card-role { color: #ffc061; font-weight: 600; margin-top: 2px; }
.emp-card-tags {
    display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px;
    font-size: .78rem; color: rgba(255, 255, 255, .72);
}
.emp-card-tags i { color: #f6871f; margin-right: 4px; }
.emp-card-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
    margin-bottom: 14px;
}
.emp-card-cell {
    display: flex; flex-direction: column; gap: 2px;
    padding: 8px 10px; border-radius: 11px;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .07);
}
.emp-card-cell-label {
    font-size: .58rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
}
.emp-card-cell-value { font-size: .86rem; font-weight: 600; color: #f4f6fb; word-break: break-word; }
.emp-card-assign {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    margin-bottom: 12px;
}
.emp-card-assign-col {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 13px; padding: 10px 12px;
}
.emp-card-assign-title {
    display: flex; align-items: center; gap: 8px;
    font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: #ffc061; margin-bottom: 8px;
}
.emp-card-assign-title i { color: #f6871f; }
.emp-card-count {
    margin-left: auto;
    min-width: 22px; text-align: center;
    padding: 1px 7px; border-radius: 999px;
    font-size: .72rem; color: #0b0d12; background: #f6871f; font-weight: 800;
}
.emp-card-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; max-height: 170px; overflow-y: auto; }
.emp-card-list li {
    display: flex; flex-direction: column; line-height: 1.15;
    padding-left: 12px; position: relative;
}
.emp-card-list li::before {
    content: ""; position: absolute; left: 0; top: 6px;
    width: 6px; height: 6px; border-radius: 50%; background: #f6871f;
}
.emp-card-list-main { font-size: .82rem; font-weight: 600; color: #f4f6fb; }
.emp-card-list-sub { font-size: .72rem; color: rgba(255, 255, 255, .6); }
.emp-card-empty { font-size: .8rem; color: rgba(255, 255, 255, .45); font-style: italic; }
.emp-card-foot {
    display: flex; flex-wrap: wrap; gap: 8px 18px;
    padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: .8rem; color: rgba(255, 255, 255, .78);
}
.emp-card-foot i { color: #f6871f; margin-right: 5px; }
.emp-card-actions {
    background: #0b0d12;
    border-top: 1px solid rgba(255, 255, 255, .08);
    gap: 6px;
}
@media (max-width: 575.98px) {
    .emp-card-hero { flex-direction: column; text-align: center; align-items: center; }
    .emp-card-tags { justify-content: center; }
    .emp-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .emp-card-assign { grid-template-columns: 1fr; }
    .emp-card-name { font-size: 1.25rem; }
}

/* ===== Tarjeta: cuadros por categoría + edición en línea ===== */
.emp-card-cats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.emp-cat-box {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 13px;
    padding: 10px 12px;
    min-width: 0;
}
.emp-cat-head {
    display: flex; align-items: center; gap: 8px;
    font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    color: #ffc061; margin-bottom: 8px;
}
.emp-cat-head i { color: #f6871f; }
.emp-cat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 230px; overflow-y: auto; }
.emp-cat-item { min-width: 0; }
.emp-cat-item-head {
    width: 100%;
    display: flex; align-items: center; gap: 8px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 9px;
    padding: 6px 9px;
    color: #f4f6fb; text-align: left; cursor: pointer;
}
.emp-cat-item-head:hover { border-color: rgba(246, 135, 31, .5); background: rgba(246, 135, 31, .08); }
.emp-cat-item-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.15; }
.emp-cat-item-main { font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emp-cat-item-sub { font-size: .7rem; color: rgba(255, 255, 255, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emp-cat-caret { color: #f6871f; transition: transform .18s; font-size: .72rem; }
.emp-cat-item-head.is-open .emp-cat-caret { transform: rotate(180deg); }
.emp-cat-list-plain { max-height: none; }
.emp-cat-corr { display: flex; align-items: center; gap: 8px; font-size: .82rem; padding: 3px 0; flex-wrap: wrap; }

.emp-dev-wrap { padding: 8px 4px 2px; }
.emp-dev-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.emp-dev-field { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.emp-dev-label { font-size: .58rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .45); }

.emp-editable {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .86rem; font-weight: 600; color: #f4f6fb;
    cursor: pointer; border-radius: 6px; padding: 1px 4px; margin: -1px -4px; max-width: 100%;
}
.emp-editable .emp-editable-val { word-break: break-word; }
.emp-editable.is-readonly { cursor: default; }
.emp-editable:not(.is-readonly):hover { background: rgba(246, 135, 31, .12); }
.emp-edit-ico { font-size: .62rem; color: rgba(246, 135, 31, .75); opacity: 0; transition: opacity .15s; }
.emp-editable:not(.is-readonly):hover .emp-edit-ico { opacity: 1; }
.emp-editable.is-readonly .emp-edit-ico { display: none; }
.emp-editable.emp-just-saved { background: rgba(76, 174, 114, .25); }
.emp-edit-box { display: inline-flex; align-items: center; gap: 4px; width: 100%; }
.emp-edit-input {
    flex: 1; min-width: 90px;
    background: #0b0d12; color: #fff;
    border: 1px solid rgba(246, 135, 31, .6); border-radius: 7px;
    padding: 3px 7px; font-size: .82rem;
}
.emp-edit-input:focus { outline: none; border-color: #f6871f; box-shadow: 0 0 0 2px rgba(246, 135, 31, .25); }
.emp-edit-save, .emp-edit-cancel {
    border: 0; border-radius: 7px; width: 26px; height: 26px; flex: 0 0 26px;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: .78rem;
}
.emp-edit-save { background: #f6871f; color: #0b0d12; }
.emp-edit-save:hover { background: #ffa23e; }
.emp-edit-save:disabled { opacity: .6; cursor: default; }
.emp-edit-cancel { background: rgba(255, 255, 255, .12); color: #fff; }
.emp-edit-cancel:hover { background: rgba(255, 255, 255, .2); }
.emp-card-role .emp-editable { color: #ffc061; }

@media (max-width: 767.98px) {
    .emp-card-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .emp-dev-panel { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
    .emp-card-cats { grid-template-columns: 1fr; }
}

/* ===== Tema oscuro/naranja en los menús (sidebar + topbar) ===== */
html body .app-sidebar {
    background: linear-gradient(180deg, #171b22 0%, #0e1116 100%) !important;
    border: 1px solid rgba(246, 135, 31, .18) !important;
    box-shadow: 0 18px 42px rgba(4, 8, 20, .40) !important;
}
html body .app-brand {
    color: #fff !important;
    background: linear-gradient(180deg, #171b22 0%, #0e1116 100%) !important;
    background-color: #0e1116 !important;
}
html body .app-brand small,
html body .app-sidebar .text-muted { color: rgba(255, 255, 255, .5) !important; }
html body .app-brand-icon {
    background: linear-gradient(135deg, #ffc061, #f6871f) !important;
    color: #0b0d12 !important;
    box-shadow: 0 8px 20px rgba(246, 135, 31, .35) !important;
}
html body .app-menu-module-button { color: rgba(255, 255, 255, .82) !important; }
html body .app-menu-module-button:hover { color: #fff !important; }
html body .app-menu-module-button i,
html body .app-menu-module-chevron { color: rgba(246, 135, 31, .85) !important; }
html body .app-menu-module.is-open > .app-menu-module-button,
html body .app-menu-module.is-open .app-menu-module-button {
    color: #ffc061 !important;
    background: rgba(246, 135, 31, .16) !important;
    background-color: rgba(246, 135, 31, .16) !important;
    border-color: rgba(246, 135, 31, .40) !important;
}
html body .app-menu a { color: rgba(255, 255, 255, .72) !important; }
html body .app-menu a small { color: rgba(255, 255, 255, .40) !important; }
html body .app-menu a i { color: rgba(246, 135, 31, .80) !important; }
html body .app-menu a:hover { background: rgba(246, 135, 31, .10) !important; color: #fff !important; }
html body .app-menu a.active {
    background: rgba(246, 135, 31, .16) !important;
    color: #ffc061 !important;
    border-left: 3px solid #f6871f !important;
}
html body .app-menu a.active i,
html body .app-menu a.active small { color: #ffc061 !important; }
html body .app-shell .app-main .app-topbar,
html body .app-topbar {
    background: linear-gradient(120deg, #171b22 0%, #0e1116 100%) !important;
    background-color: #0e1116 !important;
    border: 1px solid rgba(246, 135, 31, .20) !important;
    border-bottom: 2px solid rgba(246, 135, 31, .55) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 10px 26px rgba(4, 8, 20, .35) !important;
}
html body .app-menu a.active,
html body .app-menu a:hover { background-color: rgba(246, 135, 31, .16) !important; }
html body .topbar-user-avatar { border: 2px solid rgba(246, 135, 31, .60) !important; }
html body .app-sidebar-toggle {
    color: #0b0d12 !important;
    background: linear-gradient(135deg, #ffc061, #f6871f) !important;
    border: 0 !important;
}

/* ===== Acoplar TODO el sistema al tema naranja (azul de marca -> naranja) ===== */
:root {
    --sistemas-blue: #cf6a12;
    --sistemas-blue-2: #f6871f;
    --sistemas-blue-3: #ffb35c;
    --sistemas-teal: #f6871f;
    --sistemas-teal-2: #ffb35c;
    --fab-cyan: #f6871f;
    --fab-cyan-light: #ffb35c;
    --bs-primary: #f6871f;
    --bs-primary-rgb: 246, 135, 31;
    --bs-link-color: #cf6a12;
    --bs-link-color-rgb: 207, 106, 18;
    --bs-link-hover-color: #a9540b;
    --bs-link-hover-color-rgb: 169, 84, 11;
}

/* Botones primarios */
html body .btn-primary {
    --bs-btn-bg: #f6871f;
    --bs-btn-border-color: #f6871f;
    --bs-btn-hover-bg: #e0760f;
    --bs-btn-hover-border-color: #e0760f;
    --bs-btn-active-bg: #cf6a12;
    --bs-btn-active-border-color: #cf6a12;
    --bs-btn-disabled-bg: #f6871f;
    --bs-btn-disabled-border-color: #f6871f;
    color: #0b0d12 !important;
    border-color: #f6871f !important;
    background: linear-gradient(135deg, #ffa23e, #f6871f) !important;
    box-shadow: 0 9px 18px rgba(246, 135, 31, .22) !important;
}
html body .btn-primary:hover,
html body .btn-primary:focus {
    color: #0b0d12 !important;
    background: linear-gradient(135deg, #ffb35c, #e0760f) !important;
}
html body .btn-outline-primary {
    --bs-btn-color: #cf6a12;
    --bs-btn-border-color: #f6871f;
    --bs-btn-hover-bg: #f6871f;
    --bs-btn-hover-border-color: #f6871f;
    --bs-btn-hover-color: #0b0d12;
    --bs-btn-active-bg: #e0760f;
    --bs-btn-active-border-color: #e0760f;
    color: #b95c0d !important;
    border-color: #f6871f !important;
}
html body .btn-outline-primary:hover,
html body .btn-outline-primary:focus {
    color: #0b0d12 !important;
    background-color: #f6871f !important;
    border-color: #f6871f !important;
}
html body .btn-link { color: #cf6a12 !important; }

/* Enlaces, badges, focus y controles de formulario */
html body a:not(.btn):not(.app-menu a):not(.app-brand) { color: #b95c0d; }
html body a:not(.btn):not(.app-menu a):not(.app-brand):hover { color: #a9540b; }
html body .text-primary { color: #cf6a12 !important; }
html body .badge.text-bg-primary,
html body .badge.bg-primary { background-color: #f6871f !important; color: #0b0d12 !important; }
html body .form-control:focus,
html body .form-select:focus {
    border-color: #f6871f !important;
    box-shadow: 0 0 0 .2rem rgba(246, 135, 31, .25) !important;
}
html body .form-check-input:checked {
    background-color: #f6871f !important;
    border-color: #f6871f !important;
}
html body .form-check-input:focus {
    border-color: #f6871f !important;
    box-shadow: 0 0 0 .2rem rgba(246, 135, 31, .25) !important;
}
html body .nav-tabs .nav-link.active { color: #b95c0d !important; border-bottom-color: #f6871f !important; }
html body .nav-pills .nav-link.active { background-color: #f6871f !important; color: #0b0d12 !important; }
html body .page-item.active .page-link { background-color: #f6871f !important; border-color: #f6871f !important; color: #0b0d12 !important; }
html body .page-link { color: #b95c0d; }
html body .spinner-border, html body .spinner-grow { color: #f6871f; }
html body .progress-bar { background-color: #f6871f; }
html body *:focus-visible { outline-color: #f6871f !important; }
html body .card { border-top: 2px solid rgba(246, 135, 31, .30); }
html body .table > thead { color: #8a4a0c; }

/* Mosaicos del dashboard -> tonos naranja (antes multicolor) */
html body .dashboard-page .quick-module-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
html body .dashboard-page .quick-module-card:nth-child(n) {
    background: linear-gradient(135deg, #f6871f, #cf6a12) !important;
}
html body .dashboard-page .quick-module-card:nth-child(2n) {
    background: linear-gradient(135deg, #ffa23e, #e0760f) !important;
}
html body .dashboard-page .quick-module-card:nth-child(3n) {
    background: linear-gradient(135deg, #d9741a, #a8540b) !important;
}
html body .dashboard-page .quick-module-card .metric-value,
html body .dashboard-page .quick-module-card b,
html body .dashboard-page .quick-module-card strong { color: #fff !important; }

/* === Tarjetas de plastico transparente (glassmorphism) 2026-07-06 === */
.puesto-card,
.emp-card-modal {
    background: linear-gradient(135deg, rgba(255,255,255,.60), rgba(255,255,255,.30)) !important;
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid rgba(255,255,255,.60) !important;
    box-shadow: 0 8px 32px rgba(31,58,74,.18), inset 0 1px 0 rgba(255,255,255,.70) !important;
}
.puesto-nivel-pill {
    display: inline-block;
    margin-top: .45rem;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    color: #0f2033;
    background: rgba(255,255,255,.65);
    border: 1px solid rgba(255,255,255,.80);
}
/* === Fondo azul para lucir el glassmorphism en puestos 2026-07-06 === */
.sucursal-board {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%) !important;
    padding: 1.25rem 1.25rem 1.5rem !important;
    border-radius: 18px !important;
    box-shadow: 0 18px 42px rgba(23,37,84,.30);
}
.sucursal-board .sucursal-board-header h2 { color: #ffffff !important; }
.sucursal-board .sucursal-board-header .text-muted { color: #d6e4ff !important; }
.puesto-card {
    background: linear-gradient(135deg, rgba(255,255,255,.42), rgba(255,255,255,.20)) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    border: 1px solid rgba(255,255,255,.55) !important;
    box-shadow: 0 8px 30px rgba(23,37,84,.28), inset 0 1px 0 rgba(255,255,255,.65) !important;
}
.puesto-card h3 { color: #10233a; }
.puesto-meta { color: #24405f !important; }
/* ===== Glass card estilo tarjeta de credito sobre fondo colorido (2026-07-06) ===== */
.sucursal-board {
    position: relative;
    background:
        radial-gradient(circle at 12% 20%, rgba(139,92,246,.55), transparent 30%),
        radial-gradient(circle at 88% 78%, rgba(20,184,166,.50), transparent 32%),
        radial-gradient(circle at 72% 12%, rgba(59,130,246,.45), transparent 26%),
        linear-gradient(135deg, #4c1d95 0%, #1e3a8a 48%, #0e7490 100%) !important;
    padding: 1.4rem !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 45px rgba(23,37,84,.35);
    overflow: hidden;
}
.sucursal-board .sucursal-board-header h2 { color:#fff !important; }
.sucursal-board .sucursal-board-header .text-muted { color:#dbe6ff !important; }
.puesto-card {
    background: linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.08)) !important;
    -webkit-backdrop-filter: blur(16px) saturate(150%) !important;
    backdrop-filter: blur(16px) saturate(150%) !important;
    border: 1px solid rgba(255,255,255,.55) !important;
    border-radius: 18px !important;
    box-shadow: 0 10px 34px rgba(15,23,42,.30), inset 0 1px 0 rgba(255,255,255,.55) !important;
}
.puesto-card h3,
.puesto-card .puesto-meta,
.puesto-card .puesto-person span,
.puesto-card .puesto-person strong,
.puesto-card .puesto-mini-metrics span { color:#f2f6ff !important; }
.puesto-card .puesto-person-avatar { background: rgba(255,255,255,.2) !important; color:#fff !important; }
.puesto-nivel-pill { background: rgba(255,255,255,.85) !important; color:#0f2033 !important; border-color: rgba(255,255,255,.9) !important; }

/* ===== Organigrama top-down por niveles ===== */
.org-scroll { overflow-x:auto; padding:8px 4px 18px; }
.org-chart { display:inline-block; min-width:100%; }
.org-chart ul { display:flex; justify-content:center; padding-top:22px; position:relative; margin:0; list-style:none; }
.org-chart li { list-style:none; text-align:center; position:relative; padding:22px 8px 0; }
.org-chart li::before, .org-chart li::after { content:''; position:absolute; top:0; right:50%; border-top:2px solid #c2cfe4; width:50%; height:22px; }
.org-chart li::after { right:auto; left:50%; border-left:2px solid #c2cfe4; }
.org-chart li:only-child { padding-top:0; }
.org-chart li:only-child::before, .org-chart li:only-child::after { display:none; }
.org-chart li:first-child::before, .org-chart li:last-child::after { border:0 none; }
.org-chart li:last-child::before { border-right:2px solid #c2cfe4; border-radius:0 6px 0 0; }
.org-chart li:first-child::after { border-radius:6px 0 0 0; }
.org-chart ul ul::before { content:''; position:absolute; top:0; left:50%; border-left:2px solid #c2cfe4; width:0; height:22px; }
.org-box { display:inline-block; min-width:148px; max-width:190px; padding:8px 12px; border-radius:12px; color:#fff; box-shadow:0 6px 16px rgba(15,23,42,.18); }
.org-box-name { font-weight:700; font-size:.8rem; line-height:1.15; }
.org-box-role { font-size:.68rem; opacity:.92; margin-top:2px; }
.org-box-sub { font-size:.62rem; opacity:.8; }
.org-box-lvl { display:inline-block; margin-top:5px; font-size:.6rem; font-weight:700; background:rgba(255,255,255,.28); padding:1px 8px; border-radius:999px; }
.org-box.lvl-10{background:#1e3a8a}.org-box.lvl-40{background:#0e7490}.org-box.lvl-50{background:#1d4ed8}.org-box.lvl-60{background:#2563eb}.org-box.lvl-70{background:#3b82f6}.org-box.lvl-80{background:#60a5fa;color:#08213f}.org-box.lvl-90{background:#93c5fd;color:#08213f}.org-box.lvl-x{background:#94a3b8}
.org-box.lvl-80 .org-box-lvl, .org-box.lvl-90 .org-box-lvl { background:rgba(8,33,63,.18) }
.org-legend { display:flex; flex-wrap:wrap; gap:8px 14px; }
.org-legend-item { display:inline-flex; align-items:center; gap:6px; font-size:.72rem; color:#334155; }
.org-swatch { width:15px; height:15px; border-radius:4px; display:inline-block }
.org-swatch.lvl-10{background:#1e3a8a}.org-swatch.lvl-40{background:#0e7490}.org-swatch.lvl-50{background:#1d4ed8}.org-swatch.lvl-60{background:#2563eb}.org-swatch.lvl-70{background:#3b82f6}.org-swatch.lvl-80{background:#60a5fa}.org-swatch.lvl-90{background:#93c5fd}
/* ===== Ajuste legibilidad tarjetas glass puestos v2 (2026-07-06) ===== */
.puesto-card {
    background: linear-gradient(135deg, rgba(255,255,255,.26), rgba(255,255,255,.10)) !important;
}
.puesto-person, .puesto-person-inline, .puesto-person-last {
    background: rgba(255,255,255,.15) !important;
    border: 1px solid rgba(255,255,255,.32) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}
.puesto-person span { color:#dbe6ff !important; }
.puesto-person strong { color:#ffffff !important; }
.puesto-person-avatar { background: rgba(255,255,255,.22) !important; color:#fff !important; }
.puesto-mini-metrics span {
    background: rgba(255,255,255,.16) !important;
    border: 1px solid rgba(255,255,255,.32) !important;
    color:#eef3ff !important;
}
.puesto-meta { color:#e9f0ff !important; }
.puesto-status { box-shadow: 0 2px 8px rgba(0,0,0,.2); }
/* ===== Organigrama: duo directivos + impresion carta (2026-07-06) ===== */
.org-duo { display:inline-flex; gap:18px; justify-content:center; align-items:stretch; }

@media print {
    @page { size: letter landscape; margin: 8mm; }
    body * { visibility: hidden !important; }
    #orgPrintArea, #orgPrintArea * { visibility: visible !important; }
    #orgPrintArea {
        position: absolute !important; left: 0; top: 0; width: 100% !important;
        margin: 0 !important; border: 0 !important; box-shadow: none !important;
    }
    #orgPrintArea .org-scroll { overflow: visible !important; }
    #orgPrintArea .card-header { border: 0 !important; }
    .d-print-none { display: none !important; }
    .org-box, .org-swatch {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}
/* ===================== TEMA VIKINGO NORDICO (2026-07-06) ===================== */
:root {
    --sistemas-blue: #3b5b73; --sistemas-blue-2: #4d6f88; --sistemas-blue-3: #7d9bb0;
    --fab-orange: #c8922f; --sistemas-danger: #a12d2d;
    --vik-carbon:#14171c; --vik-pizarra:#1f2a33; --vik-acero:#3b5b73; --vik-bronce:#c8922f; --vik-rojo:#a12d2d;
}
/* Acentos globales (todas las paginas) */
.btn-primary { background:#3b5b73 !important; border-color:#33526a !important; color:#fff !important; }
.btn-primary:hover, .btn-primary:focus { background:#2f4a60 !important; border-color:#284255 !important; }
.btn-danger { background:#a12d2d !important; border-color:#8a2626 !important; }
.btn-outline-danger { color:#c8922f !important; border-color:#c8922f !important; }
.btn-outline-danger:hover { background:#c8922f !important; color:#17120a !important; }
.app-brand-icon { background: linear-gradient(145deg, #3b5b73, #c8922f) !important; }
.app-topbar strong { color:#c8922f !important; }

/* Paneles oscuros + glass cards vikingas (puestos) */
.sucursal-board {
    background:
        radial-gradient(circle at 15% 18%, rgba(200,146,47,.28), transparent 30%),
        radial-gradient(circle at 85% 80%, rgba(59,91,115,.55), transparent 34%),
        linear-gradient(135deg, #14171c 0%, #1f2a33 55%, #26333d 100%) !important;
    border: 1px solid rgba(200,146,47,.25);
}
.puesto-card {
    background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.04)) !important;
    border: 1px solid rgba(200,146,47,.35) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.25) !important;
}
.puesto-nivel-pill { background:#c8922f !important; color:#17120a !important; border-color:#e0b25a !important; }

/* Organigrama: escala vikinga (oro arriba -> pizarra abajo) */
.org-box.lvl-10{background:#c8922f;color:#17120a}
.org-box.lvl-40{background:#a12d2d;color:#fff}
.org-box.lvl-50{background:#4d6f88;color:#fff}
.org-box.lvl-60{background:#3b5b73;color:#fff}
.org-box.lvl-70{background:#33506a;color:#fff}
.org-box.lvl-80{background:#2a4256;color:#e8eef3}
.org-box.lvl-90{background:#223648;color:#cdd8e2}
.org-box.lvl-10 .org-box-lvl{background:rgba(23,18,10,.22)}
.org-swatch.lvl-10{background:#c8922f}.org-swatch.lvl-40{background:#a12d2d}.org-swatch.lvl-50{background:#4d6f88}.org-swatch.lvl-60{background:#3b5b73}.org-swatch.lvl-70{background:#33506a}.org-swatch.lvl-80{background:#2a4256}.org-swatch.lvl-90{background:#223648}
/* ===== Fix encabezado panel sucursal (tema vikingo) 2026-07-06 ===== */
section.sucursal-board {
    background:
        radial-gradient(circle at 15% 18%, rgba(200,146,47,.26), transparent 30%),
        radial-gradient(circle at 85% 80%, rgba(59,91,115,.55), transparent 34%),
        linear-gradient(135deg, #14171c 0%, #1f2a33 55%, #26333d 100%) !important;
}
.sucursal-board-header { background: transparent !important; border: 0 !important; box-shadow: none !important; }
.sucursal-board-header h2,
.sucursal-board .sucursal-board-header h2 { color: #ffffff !important; text-shadow: 0 1px 3px rgba(0,0,0,.55); }
.sucursal-board-header .text-muted,
.sucursal-board .sucursal-board-header .text-muted { color: #e2e9f3 !important; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.sucursal-board-header .badge { background: #c8922f !important; color: #17120a !important; }

/* QeatBot contextual */
.qeatbot-launcher{position:fixed;right:24px;bottom:24px;z-index:1040;border:0;border-radius:999px;background:linear-gradient(135deg,#0b5ed7,#5936b4);color:#fff;padding:13px 18px;box-shadow:0 12px 30px rgba(23,43,77,.28);display:flex;align-items:center;gap:8px;font-weight:700}
.qeatbot-launcher:hover{transform:translateY(-2px);box-shadow:0 15px 34px rgba(23,43,77,.34)}
.qeatbot-panel{position:fixed;right:24px;bottom:84px;width:min(410px,calc(100vw - 24px));height:min(620px,calc(100vh - 120px));z-index:1050;background:#fff;border:1px solid #dce3ef;border-radius:18px;box-shadow:0 22px 60px rgba(20,35,60,.3);display:flex;flex-direction:column;overflow:hidden;opacity:0;pointer-events:none;transform:translateY(16px) scale(.98);transition:.18s ease}
.qeatbot-panel.is-open{opacity:1;pointer-events:auto;transform:none}
.qeatbot-header{background:linear-gradient(135deg,#102f5d,#5936b4);color:#fff;padding:15px 17px;display:flex;justify-content:space-between;align-items:center}
.qeatbot-header strong{display:block}.qeatbot-header small{display:block;opacity:.78;margin-top:2px}
.qeatbot-messages{flex:1;overflow:auto;padding:16px;background:#f4f7fb;display:flex;flex-direction:column;gap:10px}
.qeatbot-message{max-width:88%;padding:10px 12px;border-radius:14px;white-space:pre-wrap;line-height:1.42;box-shadow:0 2px 7px rgba(20,35,60,.08)}
.qeatbot-message.bot{align-self:flex-start;background:#fff;border-bottom-left-radius:4px}
.qeatbot-message.user{align-self:flex-end;background:#0b5ed7;color:#fff;border-bottom-right-radius:4px}
.qeatbot-message.error{border-left:3px solid #dc3545}.qeatbot-message.loading{opacity:.7;font-style:italic}
.qeatbot-message small{display:block;margin-top:7px;opacity:.62;font-size:.72rem}
.qeatbot-form{padding:12px;border-top:1px solid #e2e7ef;background:#fff;display:flex;gap:8px;align-items:flex-end}
.qeatbot-form textarea{resize:none;max-height:110px}.qeatbot-form .btn{white-space:nowrap}
@media(max-width:575.98px){.qeatbot-launcher{right:12px;bottom:12px}.qeatbot-panel{right:12px;bottom:70px;width:calc(100vw - 24px);height:calc(100vh - 90px)}}
