:root {
    color-scheme: light;
    --app-bg: #f4f6f9;
    --app-surface: #ffffff;
    --app-surface-muted: #f8fafc;
    --app-border: #dbe3ee;
    --app-text: #1f2937;
    --app-muted: #64748b;
    --app-primary: #184079;
    --app-primary-dark: #0a274f;
    --app-primary-light: #2157a2;
    --app-primary-soft: rgb(24 64 121 / 10%);
    --app-secondary: #283851;
    --app-secondary-dark: #132033;
    --app-accent: #fbc02d;
    --app-danger: #dc3545;
    --app-success: #198754;
    --app-warning: #ffc107;
    --app-sidebar-width: 280px;
    --app-sidebar-collapsed-width: 88px;
    --app-radius: 14px;
    --app-shadow: 0 12px 30px rgb(15 23 42 / 8%);
    --app-z-topbar: 1020;
    --app-z-sidebar: 1030;
    --app-z-user-dropdown: 1040;
    --app-z-sidebar-backdrop: 1070;
    --app-z-sidebar-mobile: 1080;
    --app-z-modal-backdrop: 1090;
    --app-z-modal: 1100;
    --app-z-sweetalert: 1200;
    --color-primary: var(--app-primary);
    --color-border: var(--app-border);
    --color-text: var(--app-text);
    --color-background: var(--app-bg);
}

.daterangepicker.app-date-range {
    z-index: calc(var(--app-z-modal) + 10);
    font-family: inherit;
    max-width: calc(100vw - 2rem);
}

@media (max-width: 767.98px) {
    .daterangepicker.app-date-range {
        width: calc(100vw - 2rem);
    }

    .daterangepicker.app-date-range .dr-calendar,
    .daterangepicker.app-date-range .ranges {
        float: none;
        width: 100%;
        max-width: none;
    }

    .daterangepicker.app-date-range .ranges ul {
        display: flex;
        flex-wrap: wrap;
        width: auto;
    }

    .daterangepicker.app-date-range .ranges li {
        padding: .75rem;
    }
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--app-text);
    background: var(--app-bg);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
.btn,
.action-link,
[role="button"] {
    touch-action: manipulation;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
    outline: 3px solid rgb(24 64 121 / 35%);
    outline-offset: 2px;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgb(24 64 121 / 8%), transparent 18rem),
        var(--app-bg);
}

.app-sidebar {
    position: sticky;
    top: 0;
    z-index: var(--app-z-sidebar);
    width: var(--app-sidebar-width);
    flex: 0 0 var(--app-sidebar-width);
    height: 100vh;
    padding: 1rem;
    color: #fff;
    background:
        linear-gradient(180deg, rgb(255 255 255 / 8%), transparent 16rem),
        linear-gradient(160deg, var(--app-primary-dark), var(--app-primary) 58%, #0f172a);
    box-shadow: 16px 0 42px rgb(15 23 42 / 16%);
    overflow-y: auto;
    transition: width .2s ease, flex-basis .2s ease, transform .2s ease;
}

.app-sidebar-backdrop {
    display: none;
    pointer-events: none;
}

.app-brand {
    display: flex;
    gap: .85rem;
    align-items: center;
    min-height: 78px;
    padding: .85rem .75rem 1rem;
    margin-bottom: .75rem;
    border-bottom: 1px solid rgb(255 255 255 / 14%);
}

.app-brand__mark {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    overflow: hidden;
    background: rgb(10 39 79 / 72%);
    border: 1px solid rgb(255 255 255 / 24%);
    border-radius: 16px;
    box-shadow: 0 14px 28px rgb(0 0 0 / 22%);
}

.app-brand__mark img {
    width: 82%;
    height: 82%;
    object-fit: contain;
}

.app-brand strong,
.app-brand small {
    display: block;
}

.app-brand strong {
    color: #fff;
    font-size: 1rem;
    letter-spacing: .01em;
}

.app-brand small {
    color: rgb(255 255 255 / 68%);
    font-size: .76rem;
}

.app-sidebar__label,
.app-menu__section span {
    display: block;
    padding: .25rem .75rem .65rem;
    color: rgb(255 255 255 / 52%);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.app-menu {
    display: grid;
    gap: .45rem;
}

.app-menu__link,
.app-menu__toggle {
    display: flex;
    gap: .75rem;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    padding: .68rem .75rem;
    color: rgb(255 255 255 / 82%);
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 14px;
    transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.app-menu__link .app-menu__item,
.app-menu__toggle .app-menu__item {
    display: inline-flex;
    gap: .75rem;
    align-items: center;
    min-width: 0;
}

.app-menu__link i,
.app-menu__toggle .app-menu__item i {
    display: inline-grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    color: #fff;
    background: rgb(255 255 255 / 12%);
    border-radius: 10px;
}

.app-menu__link:hover,
.app-menu__toggle:hover,
.app-menu__link.is-active,
.app-menu__toggle[aria-expanded="true"] {
    color: #fff;
    background: rgb(255 255 255 / 12%);
    border-color: rgb(255 255 255 / 15%);
}

.app-menu__chevron {
    color: rgb(255 255 255 / 62%);
    font-size: .82rem;
    transition: transform .18s ease;
}

.app-menu__toggle[aria-expanded="true"] .app-menu__chevron {
    transform: rotate(90deg);
}

.app-menu__submenu {
    padding: .25rem 0 .35rem 1.05rem;
}

.app-menu__submenu a {
    display: flex;
    gap: .65rem;
    align-items: center;
    min-height: 38px;
    padding: .5rem .75rem;
    color: rgb(255 255 255 / 70%);
    border-radius: 12px;
    font-size: .9rem;
}

.app-menu__submenu a:hover,
.app-menu__submenu a.is-active {
    color: #fff;
    background: rgb(255 255 255 / 10%);
}

.app-shell.is-sidebar-collapsed .app-sidebar {
    width: var(--app-sidebar-collapsed-width);
    flex-basis: var(--app-sidebar-collapsed-width);
}

.app-shell.is-sidebar-collapsed .app-brand {
    justify-content: center;
    padding-inline: 0;
}

.app-shell.is-sidebar-collapsed .app-brand > div,
.app-shell.is-sidebar-collapsed .app-sidebar__label,
.app-shell.is-sidebar-collapsed .app-menu__section span,
.app-shell.is-sidebar-collapsed .app-menu__text,
.app-shell.is-sidebar-collapsed .app-menu__chevron,
.app-shell.is-sidebar-collapsed .app-menu__submenu {
    display: none;
}

.app-shell.is-sidebar-collapsed .app-menu__link,
.app-shell.is-sidebar-collapsed .app-menu__toggle {
    justify-content: center;
    padding-inline: .5rem;
}

.app-shell.is-sidebar-collapsed .app-menu__link i,
.app-shell.is-sidebar-collapsed .app-menu__toggle i {
    margin: 0;
}

.app-content {
    display: flex;
    min-width: 0;
    min-height: 100vh;
    flex: 1;
    flex-direction: column;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: var(--app-z-topbar);
    display: flex;
    min-height: 76px;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: .9rem clamp(1rem, 2vw, 1.5rem);
    background: rgb(255 255 255 / 92%);
    border-bottom: 1px solid var(--app-border);
    backdrop-filter: blur(14px);
}

.app-icon-button {
    display: inline-grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    color: var(--app-secondary);
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 13px;
    box-shadow: 0 8px 18px rgb(15 23 42 / 6%);
}

.app-icon-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 2px 0;
    background: currentColor;
    border-radius: 999px;
}

.app-topbar__heading {
    min-width: 0;
    margin-right: auto;
}

.app-topbar__eyebrow {
    color: var(--app-primary);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.app-topbar__title {
    margin: .1rem 0 0;
    color: var(--app-text);
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    font-weight: 800;
}

.app-topbar__actions {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.app-user-menu {
    position: relative;
}

.app-user-menu__toggle {
    display: flex;
    gap: .75rem;
    align-items: center;
    min-height: 48px;
    padding: .35rem .55rem .35rem .35rem;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 999px;
    box-shadow: 0 8px 18px rgb(15 23 42 / 6%);
}

.app-user-menu__avatar,
.app-user-menu__photo {
    object-fit: cover;
    background: #fff;
    border: 2px solid rgb(24 64 121 / 14%);
    border-radius: 999px;
}

.app-user-menu__avatar {
    width: 38px;
    height: 38px;
}

.app-user-menu__photo {
    width: 68px;
    height: 68px;
}

.app-user-menu__text {
    display: grid;
    min-width: 0;
    text-align: left;
}

.app-user-menu__text strong {
    max-width: 190px;
    overflow: hidden;
    color: var(--app-text);
    font-size: .88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-user-menu__text small,
.app-user-menu__header small {
    color: var(--app-muted);
    font-size: .76rem;
}

.app-user-menu__caret {
    color: var(--app-muted);
    font-size: .85rem;
}

.app-user-menu__dropdown {
    position: absolute;
    top: calc(100% + .6rem);
    right: 0;
    z-index: var(--app-z-user-dropdown);
    width: min(320px, 88vw);
    padding: .9rem;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 18px;
    box-shadow: var(--app-shadow);
}

.app-user-menu__header {
    display: grid;
    justify-items: center;
    gap: .35rem;
    padding: .9rem;
    text-align: center;
    background: var(--app-surface-muted);
    border-radius: 14px;
}

.app-user-menu__actions {
    display: grid;
    gap: .45rem;
    padding-top: .75rem;
}

.app-user-menu__action {
    display: flex;
    gap: .6rem;
    align-items: center;
    width: 100%;
    padding: .7rem .8rem;
    color: var(--app-text);
    background: transparent;
    border: 0;
    border-radius: 12px;
    text-align: left;
}

.app-user-menu__action:hover {
    background: var(--app-surface-muted);
}

.app-user-menu__action--danger {
    color: var(--app-danger);
}

.app-main {
    flex: 1;
    min-width: 0;
    padding: clamp(1rem, 2vw, 1.75rem);
}

.app-footer {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: .9rem clamp(1rem, 2vw, 1.5rem);
    color: var(--app-muted);
    background: var(--app-surface);
    border-top: 1px solid var(--app-border);
    font-size: .85rem;
}

.module-shell {
    width: 100%;
}

.module-card,
.card.module-card {
    padding: clamp(1rem, 2vw, 1.35rem);
    overflow: hidden;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 20px;
    box-shadow: var(--app-shadow);
}

.module-header,
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.module-heading,
.toolbar > div:first-child {
    display: flex;
    gap: .85rem;
    align-items: center;
}

.module-icon {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    color: #fff;
    background: linear-gradient(135deg, var(--app-primary), var(--app-primary-light));
    border-radius: 15px;
    box-shadow: 0 12px 24px rgb(24 64 121 / 20%);
    place-items: center;
}

.module-heading h2,
.toolbar h2 {
    margin: 0;
    color: var(--app-text);
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    font-weight: 800;
}

.module-heading p,
.toolbar p {
    margin: .18rem 0 0;
    color: var(--app-muted);
}

.module-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    align-items: center;
    justify-content: flex-end;
}

.summary-tile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    color: #0f172a;
    text-align: left;
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 16px;
    box-shadow: var(--app-shadow-sm);
}

.summary-tile span {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-weight: 800;
}

.summary-tile strong {
    font-size: 1.85rem;
    line-height: 1;
}

.summary-tile--success {
    border-color: rgba(25, 135, 84, .28);
    background: #f0fdf4;
}

.summary-tile--info {
    border-color: rgba(13, 110, 253, .24);
    background: #eff6ff;
}

.summary-tile:hover {
    border-color: var(--app-primary);
}

.metric-card {
    display: grid;
    gap: .35rem;
    height: 100%;
    padding: .95rem 1rem;
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    box-shadow: var(--app-shadow-sm);
}

.metric-card span {
    color: var(--app-muted);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.metric-card strong {
    color: var(--app-text);
    font-size: 1.2rem;
}

.chart-card {
    background: #fff;
    border: 1px solid rgba(24, 64, 121, .12);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow-sm);
    padding: 1rem;
}

.chart-card__header {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    margin-bottom: .75rem;
}

.chart-card__header strong {
    color: var(--app-primary);
    font-size: .95rem;
}

.chart-card__header small {
    color: var(--app-muted);
}

.chart-card__canvas {
    min-height: 320px;
}

.chart-card__canvas--compact {
    min-height: 180px;
}

.module-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(10rem, 1fr));
    gap: .9rem;
    align-items: end;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--app-surface-muted);
    border: 1px solid var(--app-border);
    border-radius: 16px;
}

.module-filters > .module-actions {
    grid-column: 1 / -1;
}

.module-card-form {
    padding: 1rem;
    background: var(--app-surface-muted);
    border: 1px solid var(--app-border);
    border-radius: 16px;
}

.module-filters .form-label {
    margin-bottom: .35rem;
    color: #475569;
    font-size: .82rem;
    font-weight: 750;
}

.filter-search {
    grid-column: span 2;
}

.filter-actions {
    display: flex;
    gap: .5rem;
}

.module-summary,
.module-pagination {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.module-summary {
    padding: .25rem .15rem .75rem;
    color: var(--app-muted);
    font-size: .86rem;
}

.module-pagination {
    padding-top: 1rem;
}

.module-state {
    display: flex;
    gap: .7rem;
    min-height: 8rem;
    align-items: center;
    justify-content: center;
    color: var(--app-muted);
}

.module-state--empty {
    flex-direction: column;
    text-align: center;
}

.module-state--empty i {
    color: #94a3b8;
    font-size: 2rem;
}

.empty-state {
    padding: 1rem;
    color: var(--app-muted);
    text-align: center;
}

.table-zone {
    max-width: 100%;
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: 16px;
    position: relative;
}

.table-zone.is-loading {
    pointer-events: none;
}

.table-zone.is-loading::before {
    align-items: center;
    background: rgba(255, 255, 255, .82);
    border-radius: 16px;
    color: var(--app-primary);
    content: 'Cargando información...';
    display: flex;
    font-weight: 700;
    inset: 0;
    justify-content: center;
    min-height: 120px;
    position: absolute;
    z-index: 5;
}

.table-zone.is-loading::after {
    animation: app-spin .75s linear infinite;
    border: 3px solid rgba(24, 64, 121, .18);
    border-top-color: var(--app-primary);
    border-radius: 50%;
    content: '';
    height: 28px;
    left: calc(50% - 14px);
    position: absolute;
    top: calc(50% + 22px);
    width: 28px;
    z-index: 6;
}

@keyframes app-spin {
    to {
        transform: rotate(360deg);
    }
}

.table-zone table {
    width: 100%;
    margin: 0;
}

.table-zone table.dataTable thead th {
    line-height: 1.18;
    overflow-wrap: normal;
    vertical-align: middle;
    white-space: normal;
    word-break: normal;
}

.table-text-truncate {
    display: block;
    max-width: 22rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-zone .table-responsive {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.app-main .table-responsive {
    max-width: 100%;
    overscroll-behavior-inline: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

.mobile-scroll-hint {
    display: flex;
    gap: .45rem;
    align-items: center;
    margin: 0 0 .65rem;
    color: var(--app-muted);
    font-size: .82rem;
    font-weight: 700;
}

.mobile-scroll-hint i {
    flex: 0 0 auto;
}

.report-chart,
.chart-card__canvas {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.report-chart .apexcharts-canvas,
.report-chart .apexcharts-svg,
.chart-card__canvas .apexcharts-canvas,
.chart-card__canvas .apexcharts-svg {
    max-width: 100% !important;
}

.table-zone .table-responsive table {
    min-width: 680px;
}

.table-zone.table-wide .table-responsive table {
    min-width: 820px;
}

.table-avatar {
    width: 2.4rem;
    height: 3.6rem;
    object-fit: cover;
    object-position: center;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    background: var(--bs-secondary-bg);
}

.table-actions {
    display: block;
    min-width: 10rem;
    text-align: left;
}

.label-default.action-link {
    display: inline-block;
    margin-bottom: .18rem;
    color: #334155;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
    white-space: nowrap;
}

.label-default.action-link:hover {
    color: var(--app-primary);
    text-decoration: underline;
}

.label-default.action-link .fa {
    width: 1rem;
    margin-right: .25rem;
    color: #64748b;
    text-align: center;
}

.app-file-icon {
    display: inline-grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    vertical-align: middle;
}

.label-default.action-link.app-file-icon {
    margin-bottom: 0;
    line-height: 1;
}

.label-default.action-link.app-file-icon:hover {
    text-decoration: none;
}

.app-file-icon .fa,
.label-default.action-link.app-file-icon .fa {
    width: auto;
    margin-right: 0;
    font-size: 1.45rem;
    line-height: 1;
}

.app-file-icon--pdf .fa {
    color: #dc3545;
}

.app-file-icon--excel .fa {
    color: #198754;
}

.app-file-icon--word .fa {
    color: #0d6efd;
}

.app-file-icon--image .fa {
    color: #7c3aed;
}

.app-file-icon--archive .fa {
    color: #f59e0b;
}

.app-file-icon--xml .fa,
.app-file-icon--default .fa {
    color: #64748b;
}

.record-cards {
    display: none;
}

.record-cards-pagination {
    display: none;
}

.record-cards-pagination[hidden] {
    display: none !important;
}

.record-cards .card {
    overflow-wrap: anywhere;
}

.record-cards .card-body {
    min-width: 0;
}

.record-cards .card-body > * {
    min-width: 0;
}

.record-cards .d-flex {
    flex-wrap: wrap;
}

.record-cards .card-body > .d-flex > div {
    min-width: 0;
}

.record-cards .badge {
    max-width: 42%;
    flex: 0 0 auto;
    align-self: flex-start;
    text-align: center;
    white-space: normal;
}

.record-cards a {
    overflow-wrap: anywhere;
}

.record-cards .action-link {
    display: inline-block;
    margin-right: .55rem;
    margin-bottom: .2rem;
}

.record-card__list {
    display: grid;
    gap: .35rem;
}

.record-card__list div {
    display: grid;
    grid-template-columns: minmax(90px, 38%) 1fr;
    gap: .5rem;
}

.record-card__list dt {
    color: #64748b;
    font-weight: 700;
}

.record-card__list dd {
    min-width: 0;
    margin: 0;
}

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

.field-span-2 {
    grid-column: span 2;
}

.form-filter-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 1rem;
    margin-bottom: 1rem;
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: .85rem;
}

.form-filter-bar small {
    display: block;
    margin-top: .15rem;
    color: #64748b;
}

.form-section {
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: .85rem;
    box-shadow: 0 .35rem 1.2rem rgba(15, 23, 42, .04);
}

.form-section-title {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: .75rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--app-border);
}

.form-section-title span {
    display: inline-flex;
    gap: .5rem;
    align-items: center;
    color: var(--app-primary);
    font-weight: 700;
}

.form-section-title small {
    color: #64748b;
    text-align: right;
}

.form-section--danger {
    background: #fff5f5;
    border-color: #dc3545;
    box-shadow: 0 .45rem 1.3rem rgba(220, 53, 69, .12);
}

.form-section--danger .form-section-title {
    border-bottom-color: rgba(220, 53, 69, .25);
}

.form-section--danger .form-section-title span,
.required-hint {
    color: #dc3545;
}

.check-panel {
    grid-column: 1 / -1;
    padding: .8rem 1rem;
    border: 1px solid var(--app-border);
    border-radius: .65rem;
}

.check-panel legend {
    float: none;
    width: auto;
    padding: 0 .35rem;
    margin: 0;
}

.check-options {
    display: flex;
    gap: .7rem;
    flex-wrap: wrap;
}

.check-options label {
    display: inline-flex;
    gap: .35rem;
    align-items: center;
    padding: .35rem .55rem;
    background: #f8fafc;
    border-radius: .45rem;
}

.check-options--columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.check-options--columns label {
    min-width: 0;
    min-height: 2.75rem;
    margin: 0;
    align-items: flex-start;
}

.check-options--columns .form-check-input {
    flex-shrink: 0;
    margin-left: 0;
}

.check-options--columns .form-check-label {
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (min-width: 576px) {
    .check-options--columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 992px) {
    .check-options--columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.nav-tabs-scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
}

.nav-tabs-scroll .nav-link {
    white-space: nowrap;
}

.detail-section {
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: .8rem;
}

.detail-section h3 {
    margin: 0 0 1rem;
    color: var(--app-primary);
    font-size: 1rem;
}

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

.detail-grid div {
    min-width: 0;
}

.detail-grid dt {
    margin-bottom: .15rem;
    color: #64748b;
    font-size: .72rem;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.detail-grid dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.detail-employee-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #fff;
    background: linear-gradient(135deg, var(--app-primary) 0%, var(--app-primary-dark) 100%);
    border-radius: .9rem;
}

.detail-employee-card img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    background: #fff;
    border: 3px solid rgb(255 255 255 / 70%);
    border-radius: 50%;
}

.detail-employee-card h3 {
    margin: 0;
    font-size: 1.15rem;
}

.detail-employee-card p {
    margin: .15rem 0 .45rem;
    color: rgb(255 255 255 / 82%);
}

.detail-employee-card span {
    display: inline-flex;
    margin: 0 .75rem .25rem 0;
    color: rgb(255 255 255 / 88%);
    font-size: .86rem;
}

.file-upload,
.document-upload {
    display: block;
    padding: 1rem;
    background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
    border: 1px solid var(--app-border);
    border-radius: .8rem;
}

.file-upload__header,
.document-upload__header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.file-upload__header h3,
.document-upload__header h3 {
    margin: 0;
    color: var(--app-primary);
    font-size: 1rem;
}

.file-upload__header p,
.document-upload__header p {
    margin: .15rem 0 0;
    color: var(--app-muted);
    font-size: .86rem;
}

.file-upload__header span,
.document-upload__header span {
    display: inline-flex;
    gap: .35rem;
    align-items: center;
    padding: .35rem .6rem;
    color: var(--app-primary-dark);
    background: var(--app-primary-soft);
    border-radius: 999px;
    font-size: .78rem;
    white-space: nowrap;
}

.file-upload__grid,
.document-upload__grid {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(280px, 1.2fr);
    gap: 1rem;
}

.file-upload__grid > *,
.document-upload__grid > * {
    min-width: 0;
}

.file-upload__dropzone,
.document-upload__dropzone {
    display: grid;
    gap: .45rem;
    justify-items: center;
    padding: 1rem;
    color: var(--app-text);
    text-align: center;
    background: #fff;
    border: 1px dashed var(--app-primary-light);
    border-radius: .8rem;
}

.file-upload.is-dragover,
.document-upload.is-dragover {
    border-color: var(--app-primary-light);
}

.file-upload.is-dragover .file-upload__dropzone,
.document-upload.is-dragover .document-upload__dropzone {
    background: var(--app-primary-soft);
    border-color: var(--app-primary);
    border-style: solid;
}

.file-upload__button,
.document-upload__button {
    display: inline-flex;
    gap: .4rem;
    align-items: center;
    justify-content: center;
    padding: .55rem .85rem;
    color: var(--app-primary-dark);
    background: var(--app-primary-soft);
    border: 1px solid rgb(24 64 121 / 18%);
    border-radius: .65rem;
    cursor: pointer;
    font-weight: 700;
}

.file-upload__file,
.document-upload__file {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.file-upload__dropzone small,
.file-upload__selected,
.document-upload__dropzone small,
.document-upload__selected {
    color: var(--app-muted);
    font-size: .82rem;
}

.file-upload__selected,
.document-upload__selected {
    width: 100%;
    padding: .45rem .6rem;
    background: #f8fafc;
    border-radius: .5rem;
}

.file-upload__comments,
.document-comments {
    grid-column: 1 / -1;
}

.file-upload--stacked {
    min-width: 0;
    padding: .5rem;
}

.file-upload--stacked .file-upload__dropzone {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: .35rem;
    padding: .5rem;
}

.file-upload--stacked .file-upload__button,
.file-upload--stacked .file-upload__selected {
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

.file-upload__submit,
.document-upload__submit {
    margin-top: 1rem;
}

.image-upload-preview {
    display: grid;
    gap: .7rem;
    justify-items: center;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: .8rem;
}

.image-upload-preview__frame {
    width: min(174px, 100%);
    aspect-ratio: 116 / 187;
    overflow: hidden;
    background: #e5e7eb;
    border: 1px solid var(--app-border);
    border-radius: .7rem;
    box-shadow: 0 14px 32px rgb(15 23 42 / 10%);
}

.image-upload-preview__frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.image-upload-preview__help {
    margin: 0;
    color: var(--app-muted);
    font-size: .84rem;
    text-align: center;
}

.document-list {
    display: grid;
    gap: .7rem;
}

.document-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: .85rem;
    align-items: center;
    padding: .85rem;
    border: 1px solid var(--app-border);
    border-radius: .7rem;
}

.document-item__icon {
    display: grid;
    width: 2.6rem;
    height: 2.6rem;
    color: var(--app-primary);
    background: rgb(24 64 121 / 9%);
    border-radius: .65rem;
    font-size: 1.25rem;
    place-items: center;
}

.document-item__body {
    display: grid;
    min-width: 0;
}

.document-item__body span,
.document-item__body small {
    overflow: hidden;
    color: #64748b;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-item__actions {
    display: flex;
    gap: .4rem;
    align-items: center;
    justify-content: flex-end;
}

.status-active {
    color: #166534;
    background: #dcfce7;
}

.status-inactive {
    color: #991b1b;
    background: #fee2e2;
}

.btn-primary {
    --bs-btn-bg: var(--app-primary);
    --bs-btn-border-color: var(--app-primary);
    --bs-btn-hover-bg: var(--app-primary-dark);
    --bs-btn-hover-border-color: var(--app-primary-dark);
    --bs-btn-active-bg: var(--app-primary-dark);
    --bs-btn-active-border-color: var(--app-primary-dark);
}

.btn-outline-primary {
    --bs-btn-color: var(--app-primary);
    --bs-btn-border-color: var(--app-primary);
    --bs-btn-hover-bg: var(--app-primary);
    --bs-btn-hover-border-color: var(--app-primary);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 .25rem rgb(24 64 121 / 14%);
}

.error {
    color: #a11d2d;
}

.modal-content {
    border: 0;
    border-radius: 20px;
    box-shadow: var(--app-shadow);
}

.modal-backdrop {
    z-index: var(--app-z-modal-backdrop);
}

.modal {
    z-index: var(--app-z-modal);
    overflow-y: auto;
}

.modal-dialog {
    display: flex;
    align-items: flex-start;
    min-height: calc(100dvh - var(--bs-modal-margin) * 2);
    margin-right: auto;
    margin-left: auto;
}

.modal-dialog-centered {
    align-items: center;
}

.modal-dialog > .modal-content {
    width: 100%;
    max-height: calc(100dvh - var(--bs-modal-margin) * 2);
}

.modal-content > form {
    display: flex;
    max-height: inherit;
    min-height: 0;
    flex-direction: column;
}

.modal-header {
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom-color: var(--app-border);
    background: var(--app-surface);
}

.modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    border-top-color: var(--app-border);
    background: var(--app-surface);
}

.modal-body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.swal2-container {
    z-index: var(--app-z-sweetalert);
}

.login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 3vw, 2rem);
    background:
        radial-gradient(circle at top left, rgb(24 64 121 / 8%), transparent 28rem),
        #f4f6f9;
}

.auth-card {
    width: min(1040px, 100%);
    overflow: hidden;
    background: #fff;
    border: 1px solid rgb(219 227 238 / 90%);
    border-radius: 22px;
    box-shadow: 0 24px 70px rgb(10 39 79 / 16%);
}

.auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-form {
    display: flex;
    min-width: 0;
    padding: clamp(1.5rem, 5vw, 3rem);
    flex-direction: column;
    justify-content: center;
}

.auth-brand {
    margin-bottom: 2rem;
    text-align: center;
}

.auth-brand img {
    display: block;
    width: min(100%, 380px);
    height: auto;
    margin: 0 auto;
}

.auth-heading {
    margin-bottom: 1.5rem;
}

.auth-heading h1 {
    margin: .8rem 0 .45rem;
    font-size: clamp(1.65rem, 3vw, 2rem);
}

.auth-heading p,
.auth-note {
    margin: 0;
    color: var(--app-muted);
}

.auth-badge {
    display: inline-flex;
    padding: .4rem .7rem;
    color: #fff;
    background: var(--app-secondary);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.auth-field {
    margin-bottom: 1rem;
}

.auth-field label {
    display: block;
    margin-bottom: .45rem;
    font-weight: 650;
}

.auth-field label span {
    color: var(--app-danger);
}

.auth-field input {
    width: 100%;
    min-height: 48px;
    padding: .7rem .85rem;
    font-size: 1rem;
    outline: none;
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: .5rem;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.auth-field input:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 .2rem rgb(24 64 121 / 14%);
}

.auth-submit {
    width: 100%;
    min-height: 48px;
    margin-top: .35rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    background: var(--app-primary);
    border: 1px solid var(--app-primary);
    border-radius: .5rem;
}

.auth-submit:hover,
.auth-submit:focus {
    background: var(--app-primary-dark);
    border-color: var(--app-primary-dark);
}

.auth-submit:disabled {
    cursor: wait;
    opacity: .72;
}

.auth-error {
    min-height: 1.25rem;
    margin: .25rem 0 .5rem;
    color: #a11d2d;
    font-size: .9rem;
}

.auth-note {
    margin-top: 1.5rem;
    text-align: center;
    font-size: .85rem;
}

.auth-hero {
    position: relative;
    display: grid;
    min-height: 590px;
    overflow: hidden;
    padding: clamp(2rem, 5vw, 3.25rem);
    color: #fff;
    background:
        radial-gradient(circle at 18% 22%, rgb(251 192 45 / 24%), transparent 10rem),
        radial-gradient(circle at 88% 12%, rgb(255 255 255 / 16%), transparent 16rem),
        linear-gradient(120deg, var(--app-primary-dark), var(--app-primary), var(--app-primary-light), var(--app-primary-dark));
    place-items: center;
}

.auth-hero::before,
.auth-hero::after {
    position: absolute;
    content: "";
    border-radius: 999px;
    pointer-events: none;
}

.auth-hero::before {
    right: -3rem;
    bottom: -3rem;
    width: 14rem;
    height: 14rem;
    background: rgb(255 255 255 / 10%);
}

.auth-hero::after {
    top: 2rem;
    left: 2rem;
    width: 5rem;
    height: 5rem;
    border: 1px solid rgb(255 255 255 / 20%);
}

.auth-hero__content {
    position: relative;
    z-index: 1;
    width: 100%;
    text-align: center;
}

.auth-hero__content img {
    width: min(100%, 420px);
    height: auto;
    filter: brightness(0) invert(1);
}

.auth-hero__content h2 {
    margin: 2rem 0 0;
    color: rgb(255 255 255 / 88%);
    font-size: clamp(1.7rem, 4vw, 2.5rem);
}

.select2-container--bootstrap-5 .select2-selection {
    min-height: 38px;
}

.select2-container {
    max-width: 100%;
}

.dataTables_wrapper {
    width: 100%;
    padding: 0;
}

.dataTables_wrapper .dt--top-section {
    margin: 1rem;
}

.dataTables_wrapper .dt--bottom-section {
    padding: 1rem;
    border-top: 1px solid var(--app-border);
}

.dataTables_wrapper div.dataTables_filter input {
    margin-left: 0;
}

.dataTables_wrapper div.dataTables_info {
    color: var(--app-primary);
    border-color: var(--app-border);
}

.dataTables_wrapper .page-item.active .page-link {
    background-color: var(--app-primary);
}

.dataTables_wrapper .page-link {
    display: inline-grid;
    min-width: 34px;
    min-height: 34px;
    padding: .45rem;
    place-items: center;
}

.dataTables_wrapper .page-link svg {
    width: 18px;
    height: 18px;
}

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

.modal-dialog-scrollable {
    align-items: stretch;
    height: calc(100dvh - var(--bs-modal-margin) * 2);
    min-height: 0;
}

.modal-dialog-scrollable.modal-dialog-fit {
    align-items: flex-start;
    height: auto;
}

.modal-dialog-scrollable form.modal-content,
.modal-dialog-scrollable .modal-content > form {
    display: flex;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    flex-direction: column;
}

.modal-dialog-scrollable.modal-dialog-fit .modal-content,
.modal-dialog-scrollable.modal-dialog-fit form.modal-content,
.modal-dialog-scrollable.modal-dialog-fit .modal-content > form {
    height: auto;
    max-height: calc(100dvh - var(--bs-modal-margin) * 2);
}

.modal-dialog-scrollable .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.modal-detail-scroll {
    max-height: min(46vh, 460px);
    overflow: auto;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    -webkit-overflow-scrolling: touch;
}

.modal-detail-scroll table {
    min-width: 1320px;
    margin-bottom: 0;
}

.modal-detail-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--app-surface);
}

/* Detalle de incapacidad con subsecuentes. Lleva las dos clases para ganarle
   a la regla .modal-xl del bloque min-width 768px, que va después y lo dejaba
   en 1140px. */
.modal-dialog.modal-dialog-wide {
    --bs-modal-width: min(1560px, calc(100vw - 2rem));
}

.gantt-progress {
    min-width: 180px;
}

.record-card--empty {
    min-height: 9rem;
    color: var(--app-muted);
    text-align: center;
}

.record-card--empty .card-body {
    display: grid;
    gap: .35rem;
    align-content: center;
    justify-items: center;
}

.record-card--empty i {
    margin-bottom: .25rem;
    color: #94a3b8;
    font-size: 2rem;
}

.perfil-shell {
    display: grid;
    gap: 1rem;
}

.perfil-hero {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1.25rem;
    align-items: center;
    padding: 1.5rem;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(24, 64, 121, .95), rgba(38, 99, 171, .88)),
        radial-gradient(circle at top right, rgba(255, 255, 255, .22), transparent 32rem);
    border-radius: var(--app-radius-lg);
    box-shadow: var(--app-shadow);
}

.perfil-hero__avatar-wrap {
    display: grid;
    width: 7.25rem;
    height: 7.25rem;
    padding: .35rem;
    overflow: hidden;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: .5rem;
    place-items: center;
}

.perfil-hero__avatar {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: #fff;
    border-radius: .3rem;
}

.perfil-hero__info {
    min-width: 0;
}

.perfil-hero__label {
    display: inline-block;
    margin-bottom: .35rem;
    color: rgba(255, 255, 255, .72);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.perfil-hero h1 {
    margin: 0;
    overflow: hidden;
    font-size: clamp(1.65rem, 3vw, 2.3rem);
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.perfil-hero p {
    margin: .25rem 0 0;
    color: rgba(255, 255, 255, .78);
}

.perfil-hero__badges {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-top: .75rem;
}

.perfil-hero__actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.perfil-actions {
    display: flex;
    gap: .65rem;
    flex-wrap: wrap;
    align-items: center;
    padding: .25rem 0;
}

.perfil-avisos {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.perfil-avisos:empty {
    display: none;
}

.perfil-extra .accordion-item {
    overflow: hidden;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow);
}

.perfil-extra .accordion-button {
    color: var(--app-primary);
    font-weight: 900;
    background: var(--app-surface);
}

.detail-list {
    display: grid;
    gap: .65rem;
    margin: 0;
}

.detail-list__row {
    display: grid;
    grid-template-columns: minmax(8.5rem, 36%) minmax(0, 1fr);
    gap: .75rem;
    padding-bottom: .65rem;
    border-bottom: 1px solid var(--app-border);
}

.detail-list__row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.detail-list dt {
    color: var(--app-muted);
    font-size: .82rem;
    font-weight: 800;
}

.detail-list dd {
    min-width: 0;
    margin: 0;
    color: #0f172a;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.section-title {
    margin: 0 0 .8rem;
    color: var(--app-primary);
    font-size: .95rem;
    font-weight: 900;
}

.suggestion-hero-image {
    width: 84px;
    max-width: 100%;
    height: 84px;
    object-fit: contain;
    border-radius: 999px;
}

.suggestion-help-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1.15rem;
    align-items: center;
    padding: 1.15rem;
    color: #0f172a;
    background:
        linear-gradient(135deg, rgba(24, 64, 121, .1), rgba(24, 64, 121, .02)),
        #fff;
    border: 1px solid rgba(24, 64, 121, .14);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow-sm);
}

.suggestion-help-hero__media {
    display: grid;
    width: 5.5rem;
    height: 5.5rem;
    place-items: center;
    background: #fff;
    border: 1px solid rgba(24, 64, 121, .12);
    border-radius: 1.25rem;
    box-shadow: 0 12px 28px rgb(15 23 42 / 8%);
}

.suggestion-help-hero__media img {
    width: 4rem;
    height: 4rem;
    object-fit: contain;
}

.suggestion-help-hero h3 {
    margin: .5rem 0 .35rem;
    color: var(--app-primary);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 900;
}

.suggestion-help-hero p,
.help-note p {
    margin: 0;
    color: var(--app-muted);
}

.help-note {
    padding: 1rem;
    background: var(--app-surface-muted);
    border: 1px solid var(--app-border);
    border-radius: .85rem;
}

.help-note strong {
    display: block;
    margin-bottom: .35rem;
    color: var(--app-primary);
}

.suggestion-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .9rem;
}

.suggestion-column {
    min-width: 0;
    overflow: hidden;
    background: var(--app-surface-muted);
    border: 1px solid var(--app-border);
    border-radius: 16px;
}

.suggestion-column header {
    display: flex;
    gap: .5rem;
    align-items: center;
    justify-content: space-between;
    padding: .8rem .9rem;
    color: #fff;
    background: #1d1d1b;
    font-size: 1rem;
    font-weight: 900;
}

.suggestion-column header span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.suggestion-column[data-estatus="Pendiente"] header {
    background: #b45309;
}

.suggestion-column[data-estatus="Seguimiento"] header {
    background: var(--app-primary);
}

.suggestion-column[data-estatus="Finalizada"] header {
    background: #198754;
}

.suggestion-column[data-estatus="Rechazada"] header {
    background: #991b1b;
}

.suggestion-column__body {
    display: grid;
    gap: .7rem;
    min-height: 12rem;
    align-content: start;
    padding: .8rem;
}

.suggestion-card {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: .35rem;
    padding: .8rem;
    color: var(--app-text);
    text-align: left;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-left: 4px solid var(--app-primary);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgb(15 23 42 / 7%);
    cursor: pointer;
    overflow-wrap: anywhere;
}

.suggestion-card[data-estatus="Pendiente"] {
    border-left-color: #f59e0b;
}

.suggestion-card[data-estatus="Seguimiento"] {
    border-left-color: var(--app-primary);
}

.suggestion-card[data-estatus="Finalizada"] {
    border-left-color: #198754;
}

.suggestion-card[data-estatus="Rechazada"] {
    border-left-color: #dc3545;
}

.suggestion-card:hover {
    border-color: var(--app-primary-light);
    box-shadow: 0 14px 30px rgb(24 64 121 / 13%);
}

.suggestion-card__date {
    color: #198754;
    font-weight: 800;
}

.suggestion-card__employee {
    font-weight: 900;
}

.suggestion-card__description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.suggestion-card__meta {
    color: var(--app-muted);
    font-size: .85rem;
}

.suggestion-description {
    white-space: pre-wrap;
}

.suggestion-status-badge {
    display: inline-flex;
    width: auto;
    max-width: max-content;
    justify-self: start;
    align-self: center;
    padding: .4rem .7rem;
    line-height: 1;
    white-space: nowrap;
}

.perfil-chip-list {
    display: flex;
    gap: .45rem;
    flex-wrap: wrap;
}

.module-chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.75rem;
    padding: .25rem .65rem;
    color: var(--app-primary);
    font-size: .8rem;
    font-weight: 800;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 999px;
}

.form-grid__full {
    grid-column: 1 / -1;
}

@media (min-width: 768px) {
    .mobile-scroll-hint {
        display: none;
    }

    .modal-lg {
        --bs-modal-width: min(800px, calc(100vw - 2rem));
    }

    .modal-xl {
        --bs-modal-width: min(1140px, calc(100vw - 2rem));
    }
}

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

    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-search,
    .filter-actions {
        grid-column: span 2;
    }

    .suggestion-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    body.is-sidebar-open {
        overflow: hidden;
    }

    .app-shell {
        display: block;
    }

    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: var(--app-z-sidebar-mobile);
        width: min(84vw, var(--app-sidebar-width));
        transform: translateX(-105%);
    }

    body.is-sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    body.is-sidebar-open .app-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: var(--app-z-sidebar-backdrop);
        display: block;
        pointer-events: auto;
        background: rgb(15 23 42 / 50%);
    }

    .app-topbar {
        min-height: 68px;
    }

    .app-user-menu__text {
        display: none;
    }

    .app-menu__link,
    .app-menu__toggle,
    .app-menu__submenu a {
        min-height: 44px;
    }

    .auth-card {
        border-radius: 18px;
    }

    .auth-grid {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        min-height: auto;
        padding: 1.25rem;
    }

    .auth-hero::before,
    .auth-hero::after {
        display: none;
    }

    .auth-hero__content img {
        width: min(72vw, 260px);
    }

    .auth-hero__content h2 {
        display: none;
    }

    .suggestion-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    body {
        overflow-x: hidden;
    }

    .app-main {
        padding: 1rem;
    }

    .app-footer {
        display: grid;
        justify-content: center;
        text-align: center;
    }

    .module-header,
    .toolbar,
    .toolbar > div:first-child {
        align-items: stretch;
    }

    .module-heading {
        min-width: 0;
        align-items: center;
    }

    .module-icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        border-radius: 12px;
    }

    .module-heading > div {
        min-width: 0;
    }

    .module-heading h2,
    .toolbar h2 {
        font-size: 1.08rem;
    }

    .module-heading p {
        overflow-wrap: anywhere;
    }

    .module-card,
    .card.module-card {
        padding: .9rem;
        border-radius: 16px;
    }

    .module-actions,
    .module-actions .btn,
    .toolbar > .btn {
        width: 100%;
    }

    .module-actions .btn,
    .filter-actions .btn,
    .form-actions .btn,
    .modal-footer .btn,
    .form-control,
    .form-select,
    .select2-container--bootstrap-5 .select2-selection {
        min-height: 44px;
    }

    .app-main button:not(.btn-close),
    .app-main a.btn {
        min-width: 44px;
        min-height: 44px;
    }

    .app-main .btn-close {
        width: 44px;
        height: 44px;
        padding: 0;
        background-position: center;
    }

    .module-filters {
        grid-template-columns: 1fr;
    }

    .filter-search,
    .filter-actions {
        grid-column: auto;
    }

    .filter-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-actions .btn,
    .form-actions .btn {
        width: 100%;
    }

    .table-zone {
        display: none;
    }

    .record-cards {
        display: grid;
        gap: .8rem;
    }

    .record-cards-pagination {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: .75rem;
        margin-top: 1rem;
    }

    .record-cards-pagination > .btn {
        flex: 1 1 0;
    }

    .record-cards-pagination > span {
        order: -1;
        flex: 1 0 100%;
        color: var(--app-muted);
        font-size: .85rem;
        font-weight: 700;
        text-align: center;
    }

    .record-cards .card-body {
        padding: .9rem;
    }

    .record-cards .badge {
        max-width: 100%;
    }

    .record-cards .action-link {
        min-height: 44px;
        padding-block: .7rem;
    }

    .kanban-tarjeta,
    .suggestion-card {
        min-height: 44px;
        touch-action: manipulation;
    }

    .form-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .field-span-2,
    .form-grid__full {
        grid-column: auto;
    }

    .form-filter-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .form-filter-bar .btn-group {
        width: 100%;
    }

    .form-filter-bar .btn {
        flex: 1 1 0;
    }

    .form-section {
        padding: .85rem;
    }

    .form-section-title {
        display: block;
    }

    .form-section-title small {
        display: block;
        margin-top: .3rem;
        text-align: left;
    }

    .suggestion-help-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .suggestion-help-hero__media {
        margin: 0 auto;
    }

    .modal-fullscreen-sm-down .modal-content,
    .modal-fullscreen-md-down .modal-content {
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }

    .modal-fullscreen-sm-down,
    .modal-fullscreen-md-down {
        display: flex;
        align-items: stretch;
        width: 100vw;
        max-width: none;
        height: 100dvh;
        min-height: 100dvh;
        margin: 0;
    }

    .modal-fullscreen-sm-down .modal-body,
    .modal-fullscreen-md-down .modal-body {
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-dialog:not(.modal-fullscreen-sm-down):not(.modal-fullscreen-md-down) {
        align-items: flex-start;
        min-height: auto;
    }

    .modal-body {
        overflow-wrap: anywhere;
    }

    .modal-footer {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .5rem;
    }

    .modal-footer .btn {
        width: 100%;
    }

    .suggestion-board {
        grid-template-columns: 1fr;
    }

    .suggestion-column__body {
        min-height: auto;
    }

    .file-upload,
    .document-upload {
        grid-template-columns: 1fr;
    }

    .file-upload__header,
    .file-upload__grid,
    .document-upload__header,
    .document-upload__grid,
    .detail-employee-card {
        grid-template-columns: 1fr;
    }

    .file-upload__header,
    .document-upload__header {
        display: grid;
    }

    .file-upload__header span,
    .document-upload__header span {
        justify-self: start;
        white-space: normal;
    }

    .file-upload__dropzone,
    .document-upload__dropzone {
        padding: .85rem;
    }

    .image-upload-preview__frame {
        width: min(150px, 100%);
    }

    .detail-employee-card {
        text-align: center;
        justify-items: center;
    }

    .file-upload__comments,
    .document-comments {
        grid-column: auto;
    }

    .document-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .document-item__actions {
        grid-column: 1 / -1;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .perfil-hero {
        grid-template-columns: minmax(0, 1fr);
        text-align: center;
        justify-items: center;
    }

    /* HOME-010: el bloque de texto ocupa la columna y el nombre largo salta de línea. */
    .perfil-hero__info {
        justify-self: stretch;
    }

    .perfil-hero h1 {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .perfil-hero__badges,
    .perfil-hero__actions {
        justify-content: center;
    }

    .detail-list__row {
        grid-template-columns: 1fr;
        gap: .2rem;
    }
}

.expense-section-heading > div {
    min-width: 0;
}

.expense-section-heading > div small {
    display: block;
    margin-top: .2rem;
    text-align: left;
}

.expense-section-action {
    flex: 0 0 auto;
    min-height: 32px;
}

.expense-request-summary {
    padding: 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(145deg, var(--app-surface-muted), #fff);
    border: 1px solid var(--app-border);
    border-left: 4px solid var(--app-primary);
    border-radius: .8rem;
}

.expense-request-summary strong,
.expense-request-summary [data-caja-info],
.expense-request-summary [data-viaticos-info] {
    overflow-wrap: anywhere;
}

.expense-concept-editor {
    background: var(--app-surface-muted);
    border: 1px solid var(--app-border);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 70%);
}

.expense-concept-editor .card-body {
    padding: 1rem;
}

.expense-editor-group {
    display: flex;
    gap: .5rem;
    align-items: baseline;
    padding-top: .25rem;
    color: var(--app-primary-dark);
    border-top: 1px solid var(--app-border);
}

.expense-editor-group:first-child {
    padding-top: 0;
    border-top: 0;
}

.expense-editor-group span {
    font-weight: 700;
}

.expense-editor-group small {
    color: var(--app-muted);
}

.file-upload--expense-compact .file-upload__dropzone {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    min-height: 42px;
    padding: .45rem;
    text-align: left;
}

.file-upload--expense-compact .file-upload__selected {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.expense-concepts-table {
    min-width: 1080px;
}

.expense-concepts-table th,
.expense-concepts-table td {
    vertical-align: middle;
}

.expense-concepts-table .expense-wrap,
.expense-wrap {
    max-width: 18rem;
    overflow-wrap: anywhere;
    white-space: normal;
}

.expense-concepts-table .btn,
.record-card [data-concept-action] {
    min-width: 32px;
    min-height: 32px;
}

.expense-totals {
    padding-top: 1rem;
    border-top: 1px solid var(--app-border);
}

.expense-totals__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

.expense-total-field {
    display: grid;
    gap: .15rem;
    min-width: 0;
    padding: .7rem .85rem;
    background: var(--app-surface-muted);
    border: 1px solid var(--app-border);
    border-radius: .7rem;
}

.expense-total-field span {
    color: var(--app-muted);
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
}

.expense-total-field output {
    overflow: hidden;
    color: var(--app-primary-dark);
    font-size: 1.05rem;
    font-weight: 700;
    text-align: right;
    text-overflow: ellipsis;
}

.expense-total-field--grand {
    background: var(--app-primary-soft);
    border-color: rgb(24 64 121 / 28%);
}

@media (max-width: 767.98px) {
    .expense-section-heading {
        display: flex;
        gap: .75rem;
    }

    .expense-totals__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .expense-concept-editor .card-body {
        padding: .85rem;
    }
}

@media (max-width: 420px) {
    .expense-section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .expense-section-action {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

@media (max-width: 480px) {
    .app-topbar {
        min-height: 62px;
        gap: .5rem;
        padding: .65rem .75rem;
    }

    .app-topbar__eyebrow {
        display: none;
    }

    .app-topbar__title {
        font-size: 1.05rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .app-user-menu__toggle {
        min-height: 42px;
        padding: .2rem;
    }

    .app-user-menu__avatar {
        width: 36px;
        height: 36px;
    }

    .app-user-menu__caret {
        display: none;
    }

    .modal-footer {
        grid-template-columns: 1fr;
    }

    .login {
        padding: .65rem;
    }

    .auth-card {
        border-radius: 14px;
    }

    .auth-form {
        padding: 1.5rem 1.15rem;
    }

    .auth-brand {
        margin-bottom: 1.5rem;
    }

    .filter-actions {
        grid-template-columns: 1fr;
    }
}
#expedienteTabla .expediente-tipos-cell {
    width: 18rem;
    min-width: 12rem;
    max-width: 20rem;
    white-space: normal;
    overflow-wrap: anywhere;
}
#cargaResultadoFilas .carga-resultado-mensaje,
#datosBancariosCargaResultado .carga-resultado-mensaje,
#bitacoraCargaResultado .carga-resultado-mensaje {
    width: 22rem;
    min-width: 16rem;
    max-width: 24rem;
    white-space: normal;
    overflow-wrap: anywhere;
}
