:root {
    --error-crimson: #E11D48;
    --inverse-on-surface: #f0f0fb;
    --on-primary-container: #b8c8ff;
    --slate-text: #191C1E;
    --surface-container-high: #e7e7f2;
    --surface-container-low: #f3f3fd;
    --primary-fixed-dim: #b4c5ff;
    --on-tertiary: #ffffff;
    --surface-tint: #1b55d0;
    --background: #faf8ff;
    --on-secondary-fixed: #06006c;
    --on-tertiary-fixed-variant: #005236;
    --surface: #faf8ff;
    --on-tertiary-fixed: #002113;
    --error: #ba1a1a;
    --on-secondary-container: #fffbff;
    --surface-dim: #d9d9e4;
    --on-surface-variant: #434654;
    --inverse-surface: #2e3038;
    --primary: #003594;
    --secondary-fixed: #e1e0ff;
    --surface-container-highest: #e2e2ec;
    --on-error: #ffffff;
    --tertiary-fixed-dim: #4edea3;
    --surface-container-lowest: #ffffff;
    --primary-fixed: #dbe1ff;
    --outline-variant: #c3c6d6;
    --surface-container: #ededf8;
    --surface-variant: #e2e2ec;
    --secondary-fixed-dim: #c0c1ff;
    --on-primary: #ffffff;
    --tertiary: #00472f;
    --on-primary-fixed: #00174b;
    --outline: #737685;
    --error-container: #ffdad6;
    --on-tertiary-container: #52e1a6;
    --secondary-container: #6063ee;
    --on-secondary-fixed-variant: #2e2ebe;
    --inverse-primary: #b4c5ff;
    --tertiary-container: #006141;
    --on-surface: #191b23;
    --secondary: #4648d4;
    --on-background: #191b23;
    --surface-bright: #faf8ff;
    --surface-bg: #F7F9FB;
    --on-primary-fixed-variant: #003ea8;
    --on-secondary: #ffffff;
    --primary-container: #004ac6;
    --surface-card: #FFFFFF;
    --on-error-container: #93000a;
    --tertiary-fixed: #6ffbbe;
    --sidebar-width: 256px;
    --topbar-height: 64px;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --shadow-sm: 0 1px 2px rgba(25, 27, 35, 0.06);
    --font: "Hanken Grotesk", "Segoe UI", sans-serif;
}

.material-symbols-outlined {
    font-family: "Material Symbols Outlined";
    font-weight: 400;
    font-style: normal;
    font-size: 22px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
    vertical-align: middle;
}

.material-symbols-outlined.is-fill {
    font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

body.app-theme {
    font-family: var(--font);
    font-size: 14px;
    line-height: 20px;
    background-color: var(--background) !important;
    color: var(--on-surface);
    letter-spacing: 0;
    overflow-x: hidden !important;
}

body.app-theme h1,
body.app-theme h2,
body.app-theme h3,
body.app-theme h4,
body.app-theme h5,
body.app-theme h6,
body.app-theme .h1,
body.app-theme .h2,
body.app-theme .h3,
body.app-theme .h4,
body.app-theme .h5,
body.app-theme .h6 {
    font-family: var(--font);
    color: var(--primary);
    margin-top: 0;
}

body.app-theme a {
    color: var(--primary-container);
}

body.app-theme a:hover {
    color: var(--primary);
}

/* Neutralize Metrica enlarge-menu */
body.app-theme.enlarge-menu .left-sidenav,
body.app-theme.enlarge-menu.enlarge-menu-all .left-sidenav,
body.app-theme .left-sidenav {
    width: var(--sidebar-width) !important;
    max-width: var(--sidebar-width) !important;
    min-width: var(--sidebar-width);
    transform: none !important;
    padding: 24px 16px !important;
    background: var(--surface) !important;
    border-right: 1px solid var(--outline-variant);
    box-shadow: var(--shadow-sm);
    height: 100vh;
    min-height: 100vh;
    position: fixed !important;
    left: 0;
    top: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.app-theme .left-sidenav .topbar-left,
body.app-theme.enlarge-menu .left-sidenav .topbar-left,
body.app-theme .leftbar-profile {
    display: none !important;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 24px;
    flex-shrink: 0;
}

.app-brand a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    min-width: 0;
}

.app-brand img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.app-brand h1 {
    font-size: 24px;
    line-height: 32px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--primary);
    margin: 0;
}

.app-brand p {
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.05em;
    font-weight: 700;
    text-transform: none;
    color: var(--on-surface-variant);
    margin: 0;
}

.app-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.app-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--on-surface-variant) !important;
    text-decoration: none !important;
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    border-left: 4px solid transparent;
    transition: background-color 0.2s, color 0.2s, transform 0.15s;
}

.app-nav-link:hover {
    color: var(--primary) !important;
    background: var(--surface-container);
}

.app-nav-link:active {
    transform: scale(0.98);
}

.app-nav-link.is-active {
    color: var(--primary-container) !important;
    font-weight: 700;
    background: var(--surface-container-low);
    border-left-color: var(--primary-container);
}

.app-nav-link.is-active .material-symbols-outlined {
    font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

.app-nav-user {
    margin-top: auto;
    padding: 16px 8px 0;
    border-top: 1px solid var(--outline-variant);
    flex-shrink: 0;
}

.app-nav-user a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    min-width: 0;
}

.app-nav-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.app-nav-user .app-nav-user-name {
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    color: var(--on-surface);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-nav-user .app-nav-user-role {
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--on-surface-variant);
    margin: 0;
}

.app-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(25, 27, 35, 0.4);
    z-index: 1040;
}

body.app-theme .page-wrapper,
body.app-theme.enlarge-menu .page-wrapper {
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-width);
    min-height: 100vh !important;
    width: calc(100% - var(--sidebar-width));
    padding: 0;
    background: var(--background);
}

body.app-theme .topbar,
body.app-theme.enlarge-menu .topbar {
    position: sticky !important;
    top: 0;
    left: auto !important;
    right: auto !important;
    z-index: 40;
    height: var(--topbar-height);
    max-height: var(--topbar-height);
    background: var(--surface);
    border-bottom: 1px solid var(--outline-variant);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    width: 100%;
}

body.app-theme .navbar-custom,
body.app-theme.enlarge-menu .navbar-custom,
body.app-theme.enlarge-menu.enlarge-menu-all .topbar .navbar-custom {
    margin-left: 0 !important;
    min-height: var(--topbar-height);
    background: transparent;
    width: 100%;
    display: flex;
    align-items: center;
    box-shadow: none;
}

body.app-theme .button-menu-mobile {
    display: none;
    border: none;
    background: transparent;
    color: var(--on-surface-variant) !important;
    width: auto;
    padding: 8px;
    margin-left: -8px;
    border-radius: 999px;
    cursor: pointer;
    line-height: 1;
}

body.app-theme .button-menu-mobile:hover {
    color: var(--primary) !important;
    background: var(--surface-container);
}

body.app-theme .topbar-logo-mobile {
    display: none;
    align-items: center;
}

body.app-theme .topbar-logo-mobile img {
    height: 34px;
    width: auto;
    border-radius: 8px;
}

body.app-theme .page-content-tab,
body.app-theme.enlarge-menu .page-content-tab {
    width: 100% !important;
    margin-left: 0 !important;
    margin-top: 0 !important;
    min-height: calc(100vh - var(--topbar-height));
    padding: 24px 24px 80px;
    position: relative;
    background: var(--background);
}

body.app-theme .page-title-box {
    background: transparent;
    box-shadow: none;
    padding: 0 0 16px;
    margin: 0 0 8px;
}

body.app-theme .container-fluid {
    padding-left: 0;
    padding-right: 0;
}

body.app-theme .modal-header,
body.app-theme .modal-content .modal-header {
    background-color: #004ac6 !important;
    border-bottom: none;
    color: #fff !important;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
}

body.app-theme .modal-title,
body.app-theme .modal-content .modal-header .modal-title {
    color: #fff !important;
    font-weight: 600;
    text-align: left;
    margin: 0 !important;
}

body.app-theme .modal-header .close,
body.app-theme .modal-content .modal-header .close {
    color: #fff !important;
    opacity: 0.85;
    text-shadow: none;
}

body.app-theme .modal-header .close:hover,
body.app-theme .modal-content .modal-header .close:hover {
    color: #fff !important;
    opacity: 1;
}

body.app-theme .footer {
    border-top: 1px solid var(--outline-variant);
    color: var(--on-surface-variant);
    background: transparent;
    padding: 16px 0 0;
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: 32px;
}

body.app-theme .card {
    background: var(--surface-container-lowest);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

body.app-theme .card-header {
    background: var(--surface-container-low) !important;
    color: var(--primary) !important;
    border-bottom: 1px solid var(--outline-variant);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    padding: 16px 24px;
}

body.app-theme .card-header h5,
body.app-theme .card-header h4,
body.app-theme .card-header h3,
body.app-theme .card-header .h5,
body.app-theme .card-header .h4,
body.app-theme .card-header .h3 {
    font-size: 20px;
    line-height: 28px;
    font-weight: 600;
    color: var(--primary) !important;
    margin: 0;
    text-align: left !important;
}

body.app-theme .card-body {
    padding: 16px 24px 24px;
}

body.app-theme .btn-primary,
body.app-theme .btn-primary:not(:disabled):not(.disabled):active,
body.app-theme .btn-primary:focus,
body.app-theme .btn-primary.focus {
    background-color: var(--primary-container) !important;
    border-color: var(--primary-container) !important;
    color: #fff !important;
    box-shadow: var(--shadow-sm) !important;
    border-radius: 8px;
    font-weight: 700;
}

body.app-theme .btn-primary:hover {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: var(--shadow-sm) !important;
}

body.app-theme .btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #004ac6 !important;
    border: none !important;
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 9999px !important;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.05em;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.2s;
}

body.app-theme .btn-cta:hover {
    background-color: var(--primary) !important;
    color: #fff !important;
}

body.app-theme .btn-cta .material-symbols-outlined {
    font-size: 18px;
}

body.app-theme .btn-icon-table {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 9999px;
    background: var(--surface-container);
    color: var(--on-surface-variant);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background-color 0.2s, transform 0.15s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none !important;
    box-shadow: none;
    line-height: 1;
    margin: 0 2px;
}

body.app-theme a.btn-icon-table {
    color: inherit;
}

body.app-theme .btn-icon-table .material-symbols-outlined {
    font-size: 16px;
}

/* Editar — azul primario */
body.app-theme .btn-icon-table.editar {
    background: #dbe1ff;
    color: #004ac6;
}

body.app-theme .btn-icon-table.editar:hover {
    background: #004ac6;
    color: #fff;
}

/* Ver — índigo secundario */
body.app-theme .btn-icon-table.ver {
    background: #e1e0ff;
    color: #4648d4;
}

body.app-theme .btn-icon-table.ver:hover {
    background: #4648d4;
    color: #fff;
}

/* Detalle — slate / primary suave */
body.app-theme .btn-icon-table.detalle {
    background: #e7e7f2;
    color: #003594;
}

body.app-theme .btn-icon-table.detalle:hover {
    background: #003594;
    color: #fff;
}

/* Imprimir — verde terciario */
body.app-theme .btn-icon-table.imprimir {
    background: #d8f8e9;
    color: #006141;
}

body.app-theme .btn-icon-table.imprimir:hover {
    background: #006141;
    color: #fff;
}

/* Eliminar — error */
body.app-theme .btn-icon-table.eliminar {
    background: var(--error-container);
    color: var(--error);
}

body.app-theme .btn-icon-table.eliminar:hover {
    background: var(--error);
    color: #fff;
}

body.app-theme .btn-icon-table.subir-comprobante {
    background: #ffe8d6;
    color: #c2410c;
}

body.app-theme .btn-icon-table.subir-comprobante:hover {
    background: #c2410c;
    color: #fff;
}

body.app-theme .btn-icon-table.subir-comprobante.has-file {
    background: #dbe1ff;
    color: #004ac6;
}

body.app-theme .btn-icon-table.subir-comprobante.has-file:hover {
    background: #004ac6;
    color: #fff;
}

body.app-theme .btn-icon-table.subir-comprobante.has-file .material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

body.app-theme .btn-icon-table.reemplazar-comprobante {
    background: #e7e7f2;
    color: #434654;
}

body.app-theme .btn-icon-table.reemplazar-comprobante:hover {
    background: #434654;
    color: #fff;
}

body.app-theme .btn-icon-table:hover {
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

body.app-theme .page-list-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

body.app-theme .page-list-header h1 {
    font-size: 32px;
    line-height: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--on-surface);
    margin: 0;
}

body.app-theme a.btn-cta {
    text-decoration: none !important;
}

/* User cards */
body.app-theme .user-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

body.app-theme .user-card {
    background: var(--surface-container-lowest);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

body.app-theme .user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 27, 35, 0.08);
}

body.app-theme .user-card-body {
    padding: 20px 24px;
    flex: 1;
}

body.app-theme .user-card-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

body.app-theme .user-card-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--primary-fixed);
}

body.app-theme .user-card-identity {
    min-width: 0;
}

body.app-theme .user-card-name {
    font-size: 18px;
    line-height: 24px;
    font-weight: 600;
    color: var(--primary);
    margin: 0;
    word-break: break-word;
}

body.app-theme .user-card-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 10px;
    border-radius: 9999px;
    background: #dbe1ff;
    color: #004ac6;
    font-size: 11px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.app-theme .user-card-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.app-theme .user-card-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--on-surface-variant);
    font-size: 14px;
    line-height: 20px;
}

body.app-theme .user-card-meta-item .material-symbols-outlined {
    font-size: 18px;
    color: #004ac6;
    flex-shrink: 0;
    margin-top: 1px;
}

body.app-theme .user-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 24px;
    border-top: 1px solid var(--outline-variant);
    background: var(--surface-container-low);
}

body.app-theme .user-card-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

body.app-theme .user-status-badge {
    display: inline-flex;
    align-items: center;
    border: none;
    border-radius: 9999px;
    padding: 6px 14px;
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, transform 0.15s;
}

body.app-theme .user-status-badge.is-active {
    background: #d8f8e9;
    color: #006141;
}

body.app-theme .user-status-badge.is-active:hover:not(.is-disabled) {
    background: #006141;
    color: #fff;
}

body.app-theme .user-status-badge.is-inactive {
    background: #e7e7f2;
    color: #434654;
}

body.app-theme .user-status-badge.is-inactive:hover:not(.is-disabled) {
    background: #4648d4;
    color: #fff;
}

body.app-theme .user-status-badge.is-disabled {
    cursor: default;
    opacity: 0.85;
}

body.app-theme .user-empty-state {
    grid-column: 1 / -1;
    background: var(--surface-container-lowest);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    color: var(--on-surface-variant);
}

body.app-theme .user-empty-state .material-symbols-outlined {
    font-size: 40px;
    color: #004ac6;
    margin-bottom: 8px;
}

body.app-theme .user-empty-state p {
    margin: 0;
    font-size: 16px;
}

@media (max-width: 991.98px) {
    body.app-theme .user-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Profile */
body.app-theme .profile-layout {
    max-width: 880px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

body.app-theme .profile-hero {
    margin: 0;
}

body.app-theme .profile-hero-body {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
}

body.app-theme .profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 3px solid #dbe1ff;
    object-fit: cover;
    flex-shrink: 0;
}

body.app-theme .profile-hero-info h2 {
    font-size: 24px;
    line-height: 32px;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 4px;
}

body.app-theme .profile-hero-info p {
    margin: 0 0 10px;
    color: var(--on-surface-variant);
    font-size: 14px;
}

body.app-theme .profile-security-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.app-theme .profile-security-badge .material-symbols-outlined {
    font-size: 16px;
}

body.app-theme .profile-security-badge.is-on {
    background: #d8f8e9;
    color: #006141;
}

body.app-theme .profile-security-badge.is-off {
    background: #fff3cd;
    color: #856404;
}

body.app-theme .profile-section-card {
    margin: 0;
}

body.app-theme .profile-section-card .card-body {
    padding: 24px;
}

body.app-theme .profile-section-copy {
    color: var(--on-surface-variant);
    font-size: 14px;
    line-height: 20px;
    margin: 0 0 16px;
}

body.app-theme .profile-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

body.app-theme .profile-qr {
    display: flex;
    justify-content: center;
    margin: 0 auto 16px;
    padding: 16px;
    width: fit-content;
    background: #fff;
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-lg);
}

body.app-theme .profile-secret {
    text-align: center;
    color: var(--on-surface-variant);
    font-size: 14px;
    margin: 0 0 16px;
}

body.app-theme .profile-secret code {
    display: inline-block;
    margin-left: 6px;
    padding: 4px 10px;
    background: var(--surface-container-low);
    border-radius: 6px;
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 0.04em;
}

body.app-theme .profile-2fa-activate {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

body.app-theme .profile-2fa-activate .form-control {
    max-width: 220px;
}

body.app-theme .profile-2fa-enabled {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius-lg);
    background: #d8f8e9;
    color: #006141;
    margin-bottom: 16px;
}

body.app-theme .profile-2fa-enabled .material-symbols-outlined {
    font-size: 28px;
    flex-shrink: 0;
}

body.app-theme .profile-2fa-enabled strong {
    display: block;
    margin-bottom: 2px;
}

body.app-theme .profile-2fa-enabled p {
    margin: 0;
    color: #005236;
    font-size: 14px;
}

body.app-theme .passkey-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--outline-variant);
}

body.app-theme .passkey-section h6 {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 8px;
}

body.app-theme .passkey-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

body.app-theme .passkey-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: var(--surface-container-low);
    border: 1px solid var(--outline-variant);
    border-radius: 12px;
    margin-bottom: 8px;
}

body.app-theme .passkey-list li strong {
    display: block;
    color: var(--on-surface);
}

body.app-theme .passkey-list li span {
    font-size: 12px;
    color: var(--on-surface-variant);
}

body.app-theme .passkey-empty {
    display: block;
    color: var(--on-surface-variant);
    font-size: 14px;
}

body.app-theme .btn-outline-danger-theme {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--error);
    color: var(--error);
    padding: 10px 20px;
    border-radius: 9999px;
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

body.app-theme .btn-outline-danger-theme:hover {
    background: var(--error);
    color: #fff;
}

body.app-theme .btn-cta:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

@media (max-width: 575.98px) {
    body.app-theme .profile-hero-body {
        flex-direction: column;
        text-align: center;
    }

    body.app-theme .profile-form-actions {
        justify-content: stretch;
    }

    body.app-theme .profile-form-actions .btn-cta,
    body.app-theme .profile-form-actions .btn-outline-danger-theme {
        width: 100%;
        justify-content: center;
    }
}

body.app-theme .form-control,
body.app-theme select.form-control {
    background: var(--surface);
    border: 1px solid var(--outline);
    border-radius: 8px;
    color: var(--on-surface);
    font-family: var(--font);
    font-size: 14px;
    height: calc(1.5em + 0.75rem + 4px);
}

body.app-theme .form-control:focus,
body.app-theme select.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

body.app-theme label {
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--on-surface-variant);
}

/* DataTables / tables */
body.app-theme .card-body > .dataTables_wrapper {
    margin: -16px -24px -24px;
}

body.app-theme .table {
    color: var(--on-surface);
    font-size: 14px;
    line-height: 20px;
    width: 100% !important;
    margin: 0 !important;
    border-collapse: collapse;
}

body.app-theme .table thead th,
body.app-theme table.dataTable thead th {
    background: #004ac6 !important;
    color: #fff !important;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.05em;
    font-weight: 600;
    text-transform: uppercase;
    border: none !important;
    border-bottom: 1px solid var(--outline-variant) !important;
    white-space: nowrap;
    vertical-align: middle;
    padding: 8px 16px !important;
}

body.app-theme table.dataTable thead .sorting:before,
body.app-theme table.dataTable thead .sorting:after,
body.app-theme table.dataTable thead .sorting_asc:before,
body.app-theme table.dataTable thead .sorting_asc:after,
body.app-theme table.dataTable thead .sorting_desc:before,
body.app-theme table.dataTable thead .sorting_desc:after,
body.app-theme table.dataTable thead .sorting_asc_disabled:before,
body.app-theme table.dataTable thead .sorting_asc_disabled:after,
body.app-theme table.dataTable thead .sorting_desc_disabled:before,
body.app-theme table.dataTable thead .sorting_desc_disabled:after {
    color: #fff !important;
    opacity: 0.7;
}

body.app-theme .table td,
body.app-theme table.dataTable td {
    border: none !important;
    border-bottom: 1px solid rgba(198, 198, 206, 0.5) !important;
    vertical-align: middle;
    padding: 8px 16px !important;
    color: var(--on-surface-variant);
}

body.app-theme .table-bordered,
body.app-theme .table-bordered td,
body.app-theme .table-bordered th {
    border: none !important;
}

body.app-theme .table-bordered thead th {
    border-bottom: 1px solid var(--outline-variant) !important;
}

body.app-theme table.dataTable tbody tr:hover,
body.app-theme .table tbody tr:hover {
    background: var(--surface-container-low) !important;
}

body.app-theme table.dataTable tbody td:first-child,
body.app-theme .table tbody td:first-child {
    color: var(--primary-container);
    font-weight: 500;
}

body.app-theme .dataTables_wrapper .row {
    margin-left: 0;
    margin-right: 0;
    align-items: center;
}

body.app-theme .dataTables_wrapper > .row:first-child {
    padding: 16px;
    border-bottom: 1px solid var(--outline-variant);
    margin: 0;
}

body.app-theme .dataTables_wrapper > .row:last-child {
    padding: 16px;
    border-top: 1px solid var(--outline-variant);
    margin: 0;
}

body.app-theme .dataTables_wrapper .dataTables_length,
body.app-theme .dataTables_wrapper .dataTables_filter,
body.app-theme .dataTables_wrapper .dataTables_info,
body.app-theme .dataTables_wrapper .dataTables_paginate {
    color: var(--on-surface-variant);
    font-size: 14px;
    line-height: 20px;
    margin: 0;
    padding: 0;
}

body.app-theme .dataTables_wrapper .dataTables_length label,
body.app-theme .dataTables_wrapper .dataTables_filter label {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0;
    font-weight: 400;
    color: var(--on-surface-variant);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

body.app-theme .dataTables_wrapper .dataTables_filter {
    text-align: right;
    position: relative;
}

body.app-theme .dataTables_wrapper .dataTables_filter label {
    font-size: 0;
    justify-content: flex-end;
    position: relative;
}

body.app-theme .dataTables_wrapper .dataTables_filter label::before {
    content: "search";
    font-family: "Material Symbols Outlined";
    font-size: 16px;
    line-height: 1;
    color: var(--outline);
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
}

body.app-theme .dataTables_wrapper .dataTables_length select,
body.app-theme .dataTables_wrapper .dataTables_filter input {
    background: transparent;
    border: 1px solid var(--outline-variant);
    border-radius: 6px;
    color: var(--on-surface);
    padding: 6px 12px;
    font-size: 14px;
    height: auto;
    margin: 0 4px;
}

body.app-theme .dataTables_wrapper .dataTables_filter input {
    padding-left: 36px;
    margin: 0;
    min-width: 200px;
    font-size: 14px !important;
}

body.app-theme .dataTables_wrapper .dataTables_length select:focus,
body.app-theme .dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 1px var(--primary);
}

body.app-theme .dataTables_wrapper .dataTables_paginate {
    text-align: right;
}

body.app-theme .dataTables_wrapper .dataTables_paginate .paginate_button {
    border: none !important;
    border-radius: 6px !important;
    color: var(--on-surface-variant) !important;
    background: transparent !important;
    padding: 6px 12px !important;
    margin: 0 2px;
    min-width: 32px;
    height: 32px;
    line-height: 20px !important;
    box-shadow: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.app-theme .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--surface-container) !important;
    color: var(--on-surface) !important;
    border: none !important;
}

body.app-theme .dataTables_wrapper .dataTables_paginate .paginate_button.current,
body.app-theme .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #004ac6 !important;
    color: #fff !important;
    border: none !important;
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0 !important;
}

body.app-theme .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
body.app-theme .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    opacity: 0.5;
    color: var(--on-surface-variant) !important;
    background: transparent !important;
}

body.app-theme .table-container::-webkit-scrollbar,
body.app-theme .dataTables_scrollBody::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

body.app-theme .table-container::-webkit-scrollbar-track,
body.app-theme .dataTables_scrollBody::-webkit-scrollbar-track {
    background: var(--background);
}

body.app-theme .table-container::-webkit-scrollbar-thumb,
body.app-theme .dataTables_scrollBody::-webkit-scrollbar-thumb {
    background-color: var(--outline-variant);
    border-radius: 4px;
}

.dash-header {
    margin-bottom: 24px;
}

.dash-header h2 {
    font-size: 32px;
    line-height: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--primary);
    margin: 0;
}

.dash-header p {
    font-size: 16px;
    line-height: 24px;
    color: var(--on-surface-variant);
    margin: 4px 0 0;
}

.dash-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
    background: var(--surface-container-lowest);
    padding: 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--surface-container);
    align-items: flex-end;
}

.dash-filters .dash-filter-field {
    flex: 1 1 180px;
    max-width: 280px;
}

.dash-filters .dash-filter-field label {
    display: block;
    margin-bottom: 4px;
}

.dash-filters .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 8px 24px;
}

.dash-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.dash-metric-card {
    background: var(--surface-container-lowest);
    border-radius: 1.25rem;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--surface-container);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.3s;
    min-width: 0;
}

.dash-metric-card:hover {
    transform: translateY(-4px);
}

.dash-metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-metric-icon .material-symbols-outlined {
    font-size: 28px;
    font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

.dash-metric-icon.is-blue {
    background: #eff6ff;
    color: #3b82f6;
}

.dash-metric-icon.is-yellow {
    background: #fefce8;
    color: #eab308;
}

.dash-metric-icon.is-orange {
    background: #fff7ed;
    color: #f97316;
}

.dash-metric-icon.is-pink {
    background: #fdf2f8;
    color: #ec4899;
}

.dash-metric-icon.is-teal {
    background: #f0fdfa;
    color: #14b8a6;
}

.dash-metric-card h3 {
    font-size: 18px;
    line-height: 24px;
    font-weight: 600;
    color: var(--primary);
    margin: 0;
    word-break: break-word;
}

.dash-metric-card p {
    font-size: 11px;
    line-height: 14px;
    letter-spacing: 0.04em;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--on-surface-variant);
    margin: 4px 0 0;
}

.dash-table-card {
    background: var(--surface-container-lowest);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--outline-variant);
    overflow: hidden;
    margin-bottom: 32px;
}

.dash-table-title {
    font-size: 20px;
    line-height: 28px;
    font-weight: 600;
    color: var(--primary);
    margin: 0 0 12px;
}

body.app-theme .dash-table-card .card-body {
    padding: 0;
}

body.app-theme .dash-table-card .card-body > .dataTables_wrapper {
    margin: 0;
}

#datatable_pagos_vencidos tbody td:last-child {
    color: var(--error);
    font-weight: 700;
}

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

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

@media (max-width: 991.98px) {
    body.app-theme .left-sidenav,
    body.app-theme.enlarge-menu .left-sidenav,
    body.app-theme.enlarge-menu.enlarge-menu-all .left-sidenav {
        transform: translateX(-100%) !important;
        width: var(--sidebar-width) !important;
        z-index: 1060;
    }

    body.app-theme.sidebar-open .left-sidenav {
        transform: translateX(0) !important;
    }

    body.app-theme.sidebar-open .app-sidebar-overlay {
        display: block;
    }

    body.app-theme .page-wrapper,
    body.app-theme.enlarge-menu .page-wrapper {
        margin-left: 0;
        width: 100%;
    }

    body.app-theme .button-menu-mobile,
    body.app-theme .topbar-logo-mobile {
        display: flex;
    }

    body.app-theme .page-content-tab {
        padding: 16px 16px 72px;
    }

    .dash-header h2 {
        font-size: 20px;
        line-height: 28px;
    }
}

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

    .dash-filters .dash-filter-field {
        max-width: none;
        flex: 1 1 100%;
    }
}

/* Modal Ver pago */
body.app-theme .pago-detail-modal .modal-body {
    padding: 24px;
    background: var(--background);
}

body.app-theme .pago-detail-label {
    display: block;
    font-size: 11px;
    line-height: 14px;
    letter-spacing: 0.05em;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--on-surface-variant);
    margin-bottom: 4px;
}

body.app-theme .pago-detail-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    padding: 20px;
    margin-bottom: 16px;
    background: var(--surface-container-lowest);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-lg);
}

body.app-theme .pago-detail-number {
    font-size: 28px;
    line-height: 36px;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 4px;
}

body.app-theme .pago-detail-client {
    margin: 0;
    font-size: 15px;
    color: var(--on-surface);
    font-weight: 600;
}

body.app-theme .pago-detail-hero-amount {
    text-align: right;
}

body.app-theme .pago-detail-amount {
    margin: 0;
    font-size: 28px;
    line-height: 36px;
    font-weight: 700;
    color: #004ac6;
}

body.app-theme .pago-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

body.app-theme .pago-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    background: var(--surface-container-lowest);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-lg);
}

body.app-theme .pago-detail-item .material-symbols-outlined {
    font-size: 20px;
    color: #004ac6;
    flex-shrink: 0;
}

body.app-theme .pago-detail-item p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--on-surface);
    word-break: break-word;
}

body.app-theme .pago-detail-item.is-late {
    background: var(--error-container);
    border-color: #f5c2c0;
}

body.app-theme .pago-detail-item.is-late .material-symbols-outlined,
body.app-theme .pago-detail-item.is-late p {
    color: var(--error);
}

body.app-theme .pago-detail-balances {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

body.app-theme .pago-detail-balance {
    padding: 14px 16px;
    background: var(--surface-container-low);
    border-radius: var(--radius-lg);
    border: 1px solid var(--outline-variant);
}

body.app-theme .pago-detail-balance p {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

body.app-theme .pago-detail-balance.is-after {
    background: #d8f8e9;
    border-color: #b6ecd4;
}

body.app-theme .pago-detail-balance.is-after p {
    color: #006141;
}

body.app-theme .pago-detail-subtitle {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 10px;
}

body.app-theme .pago-detail-table-wrap {
    margin-bottom: 16px;
    background: var(--surface-container-lowest);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-lg);
    padding: 16px;
    overflow: hidden;
}

body.app-theme .pago-detail-table {
    margin: 0;
    width: 100%;
}

body.app-theme .pago-detail-table thead th {
    background: #004ac6 !important;
    color: #fff !important;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: none !important;
    padding: 8px 12px !important;
    white-space: nowrap;
}

body.app-theme .pago-detail-table tbody td {
    border: none !important;
    border-bottom: 1px solid rgba(198, 198, 206, 0.5) !important;
    padding: 10px 12px !important;
    font-weight: 600;
    color: var(--on-surface);
    background: #fff;
}

body.app-theme .pago-detail-notes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

body.app-theme .pago-detail-note {
    padding: 14px 16px;
    background: var(--surface-container-lowest);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-lg);
}

body.app-theme .pago-detail-note p {
    margin: 0;
    font-size: 14px;
    color: var(--on-surface);
    font-weight: 500;
}

body.app-theme .pago-detail-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: var(--surface-container-lowest);
    border-top: 1px solid var(--outline-variant);
    padding: 16px 24px;
}

body.app-theme .btn-outline-muted {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--outline-variant);
    color: var(--on-surface-variant);
    padding: 10px 20px;
    border-radius: 9999px;
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

body.app-theme .btn-outline-muted:hover {
    background: var(--surface-container);
    color: var(--on-surface);
}

@media (max-width: 767.98px) {
    body.app-theme .pago-detail-grid,
    body.app-theme .pago-detail-balances,
    body.app-theme .pago-detail-notes {
        grid-template-columns: 1fr;
    }

    body.app-theme .pago-detail-hero-amount {
        text-align: left;
        width: 100%;
    }

    body.app-theme .pago-detail-footer {
        flex-direction: column-reverse;
    }

    body.app-theme .pago-detail-footer .btn-cta,
    body.app-theme .pago-detail-footer .btn-outline-muted {
        width: 100%;
        justify-content: center;
    }
}

@media print {
    body.app-theme .left-sidenav,
    body.app-theme .topbar,
    body.app-theme .app-sidebar-overlay,
    body.app-theme .footer {
        display: none !important;
    }

    body.app-theme .page-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* Acuerdos crear / editar */
body.app-theme a.btn-outline-muted {
    text-decoration: none !important;
}

body.app-theme .btn-cta.btn-cta-sm {
    padding: 8px 16px;
    font-size: 11px;
}

body.app-theme .acuerdo-form-card .card-body {
    padding: 24px;
}

body.app-theme .acuerdo-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

body.app-theme .acuerdo-section {
    padding: 20px;
    background: var(--surface-container-low);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-lg);
}

body.app-theme .acuerdo-section-title {
    font-size: 16px;
    line-height: 24px;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 16px;
}

body.app-theme .acuerdo-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

body.app-theme .acuerdo-section-head .acuerdo-section-title {
    margin: 0;
}

body.app-theme .form-money-hint {
    display: block;
    margin-top: 4px;
    color: #004ac6;
    font-weight: 700;
    font-size: 12px;
}

body.app-theme .acuerdo-docs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

body.app-theme .acuerdo-doc-card {
    background: var(--surface-container-lowest);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-lg);
    padding: 16px;
}

body.app-theme .acuerdo-doc-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

body.app-theme .acuerdo-doc-card-head label {
    margin: 0;
}

body.app-theme .acuerdo-doc-card-actions {
    display: flex;
    align-items: center;
}

body.app-theme .acuerdo-docs-empty {
    margin: 0;
    color: var(--on-surface-variant);
    font-size: 14px;
}

body.app-theme .acuerdo-form-actions {
    display: flex;
    justify-content: flex-end;
}

body.app-theme .acuerdo-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    border-radius: var(--radius-lg);
    background: var(--error-container);
    color: var(--on-error-container);
}

body.app-theme .acuerdo-alert .material-symbols-outlined {
    color: var(--error);
    flex-shrink: 0;
}

body.app-theme .select2-container .select2-selection--single {
    height: calc(1.5em + 0.75rem + 4px) !important;
    border: 1px solid var(--outline) !important;
    border-radius: 8px !important;
    background: var(--surface) !important;
}

body.app-theme .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: calc(1.5em + 0.75rem + 2px) !important;
    color: var(--on-surface) !important;
    padding-left: 12px;
}

body.app-theme .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
}

body.app-theme .dropify-wrapper {
    border: 1px solid var(--outline-variant);
    border-radius: 8px;
    background: var(--surface-container-lowest);
}

@media (max-width: 991.98px) {
    body.app-theme .acuerdo-docs-grid {
        grid-template-columns: 1fr;
    }
}

/* Login */
body.login-page {
    margin: 0;
    min-height: 100vh;
    font-family: "Hanken Grotesk", "Segoe UI", sans-serif;
    background: #003594;
    color: #191b23;
    overflow-x: hidden;
}

body.login-page .login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
}

body.login-page .login-brand {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background:
        radial-gradient(circle at 20% 20%, rgba(180, 197, 255, 0.22), transparent 42%),
        linear-gradient(160deg, #003594 0%, #004ac6 55%, #00174b 100%);
    color: #fff;
}

body.login-page .login-brand-inner {
    text-align: center;
    max-width: 420px;
}

body.login-page .login-logo {
    width: 112px;
    height: 112px;
    object-fit: cover;
    border-radius: 24px;
    margin-bottom: 20px;
    box-shadow: 0 16px 40px rgba(0, 23, 75, 0.35);
}

body.login-page .login-brand h1 {
    font-size: 48px;
    line-height: 52px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #fff;
    margin: 0 0 8px;
}

body.login-page .login-brand p {
    margin: 0;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: #b4c5ff;
}

body.login-page .login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    background: #faf8ff;
}

body.login-page .login-panel-inner {
    width: 100%;
    max-width: 400px;
}

body.login-page .login-panel h2 {
    font-size: 32px;
    line-height: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #003594;
    margin: 0 0 8px;
}

body.login-page .login-panel-copy {
    margin: 0 0 28px;
    color: #434654;
    font-size: 16px;
    line-height: 24px;
}

body.login-page .login-form .form-group {
    margin-bottom: 18px;
}

body.login-page .login-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: #434654;
}

body.login-page .login-input {
    position: relative;
}

body.login-page .login-input .material-symbols-outlined {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #004ac6;
    font-size: 20px;
    pointer-events: none;
}

body.login-page .login-input .form-control {
    height: 48px;
    padding-left: 44px;
    border: 1px solid #c3c6d6;
    border-radius: 10px;
    background: #fff;
    color: #191b23;
    font-size: 14px;
    box-shadow: none;
}

body.login-page .login-input .form-control:focus {
    border-color: #004ac6;
    box-shadow: 0 0 0 1px #004ac6;
}

body.login-page .login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 24px;
    font-size: 14px;
    color: #434654;
    cursor: pointer;
    font-weight: 500;
}

body.login-page .login-remember input {
    width: 16px;
    height: 16px;
    accent-color: #004ac6;
}

body.login-page .login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    background: #004ac6;
    border: none;
    color: #fff;
    padding: 10px 24px;
    border-radius: 9999px;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.05em;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(25, 27, 35, 0.06);
    transition: background-color 0.2s;
}

body.login-page .login-submit:hover {
    background: #003594;
    color: #fff;
}

body.login-page .login-submit .material-symbols-outlined {
    font-size: 18px;
}

body.login-page .invalid-feedback {
    font-size: 13px;
}

@media (max-width: 991.98px) {
    body.login-page {
        overflow: visible;
    }

    body.login-page .login-shell {
        grid-template-columns: 1fr;
        align-content: start;
    }

    body.login-page .login-brand {
        min-height: auto;
        padding: 24px 24px 48px;
    }

    body.login-page .login-logo {
        width: 72px;
        height: 72px;
        border-radius: 16px;
        margin-bottom: 12px;
    }

    body.login-page .login-brand h1 {
        font-size: 32px;
        line-height: 36px;
    }

    body.login-page .login-panel {
        position: relative;
        z-index: 2;
        padding: 0 20px 32px;
        align-items: flex-start;
        margin-top: -32px;
        background: transparent;
        overflow: visible;
    }

    body.login-page .login-panel-inner {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        background: #faf8ff;
        border-radius: 20px;
        padding: 24px 20px;
        box-shadow: 0 12px 32px rgba(0, 23, 75, 0.16);
    }

    body.login-page .login-panel h2 {
        margin-top: 0;
    }
}

/* 2FA */
body.login-page .verify-panel {
    text-align: center;
}

body.login-page .verify-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #dbe1ff;
    color: #004ac6;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.login-page .verify-icon .material-symbols-outlined {
    font-size: 32px;
    font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

body.login-page .digits-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 8px 0 12px;
}

body.login-page .digit-input {
    width: 48px !important;
    height: 56px;
    padding: 0 !important;
    border: 1px solid #c3c6d6;
    border-radius: 10px;
    font-size: 22px;
    font-weight: 700;
    color: #003594;
    text-align: center;
    background: #fff;
    box-shadow: none;
}

body.login-page .digit-input:focus {
    border-color: #004ac6;
    box-shadow: 0 0 0 1px #004ac6;
    outline: none;
}

body.login-page .digit-input.filled {
    border-color: #004ac6;
    background: #dbe1ff;
}

body.login-page .digit-input.error {
    border-color: #ba1a1a;
    background: #ffdad6;
    color: #93000a;
}

body.login-page .message-container {
    min-height: 28px;
    margin-top: 8px;
}

body.login-page .message {
    display: none;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
}

body.login-page .message.show {
    display: inline-block;
}

body.login-page .message.error {
    background: #ffdad6;
    color: #93000a;
}

body.login-page .message.success {
    background: #d8f8e9;
    color: #006141;
}

body.login-page .loading-spinner {
    display: none;
    padding: 12px 0;
}

body.login-page .loading-spinner.show {
    display: block;
}

body.login-page .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #c3c6d6;
    border-top-color: #004ac6;
    border-radius: 50%;
    animation: login-spin 0.8s linear infinite;
    margin: 0 auto;
}

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

body.login-page .logout-link {
    display: inline-block;
    margin-top: 16px;
    color: #434654;
    font-size: 13px;
    text-decoration: none;
}

body.login-page .logout-link:hover {
    color: #004ac6;
}

body.login-page .webauthn-box {
    margin: 0 0 20px;
}

body.login-page .webauthn-box .login-submit {
    width: 100%;
}

body.login-page .webauthn-hint {
    margin: 10px 0 0;
    font-size: 13px;
    color: #434654;
}

body.login-page .webauthn-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.login-page .webauthn-skip {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    background: #fff;
    border: 1px solid #c3c6d6;
    color: #434654;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: 9999px;
    padding: 12px 20px;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

body.login-page .webauthn-skip:hover {
    border-color: #004ac6;
    color: #004ac6;
    background: #f3f3fd;
}

@media (max-width: 480px) {
    body.login-page .digit-input {
        width: 40px !important;
        height: 48px;
        font-size: 18px;
    }

    body.login-page .digits-container {
        gap: 6px;
    }
}
