:root {
    --fecf-navy-950: #071526;
    --fecf-navy-900: #0b1f35;
    --fecf-navy-800: #12324f;
    --fecf-blue-700: #155eef;
    --fecf-blue-600: #2878ff;
    --fecf-blue-100: #dce9ff;
    --fecf-cyan-500: #19b7c8;
    --fecf-green-600: #079455;
    --fecf-slate-900: #172033;
    --fecf-slate-700: #344054;
    --fecf-slate-600: #475467;
    --fecf-slate-500: #667085;
    --fecf-slate-300: #d0d5dd;
    --fecf-slate-200: #e4e7ec;
    --fecf-slate-100: #f2f4f7;
    --fecf-slate-50: #f8fafc;
    --fecf-white: #ffffff;
    --fecf-danger: #d92d20;
    --fecf-shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
    --fecf-shadow-md: 0 10px 28px rgba(16, 24, 40, .08);
    --fecf-radius-sm: 8px;
    --fecf-radius-md: 12px;
    --fecf-radius-lg: 18px;
    --fecf-sidebar-width: 282px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--fecf-slate-50);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--fecf-slate-900);
    background:
        radial-gradient(circle at 92% 2%, rgba(40, 120, 255, .08), transparent 26rem),
        var(--fecf-slate-50);
    font-family: Inter, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
}

.app-form {
    min-height: 100vh;
}

.app-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: var(--fecf-sidebar-width) minmax(0, 1fr);
}

.app-sidebar {
    position: sticky;
    z-index: 40;
    top: 0;
    display: flex;
    height: 100vh;
    min-width: 0;
    flex-direction: column;
    color: #e8eef7;
    background:
        linear-gradient(180deg, rgba(21, 94, 239, .12), transparent 13rem),
        var(--fecf-navy-950);
    border-right: 1px solid rgba(255, 255, 255, .07);
}

.brand {
    display: flex;
    min-height: 84px;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    color: var(--fecf-white);
    background: linear-gradient(145deg, var(--fecf-blue-600), var(--fecf-cyan-500));
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 13px;
    box-shadow: 0 8px 22px rgba(21, 94, 239, .28);
}

.brand-mark svg {
    width: 23px;
    height: 23px;
}

.brand-copy {
    min-width: 0;
}

.brand-name {
    display: block;
    overflow: hidden;
    color: var(--fecf-white);
    font-size: 19px;
    font-weight: 750;
    letter-spacing: -.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-tagline {
    display: block;
    margin-top: 2px;
    color: #91a4ba;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.app-nav {
    overflow-x: hidden;
    overflow-y: auto;
    padding: 18px 14px 24px;
    scrollbar-color: #344b64 transparent;
    scrollbar-width: thin;
}

.nav-caption {
    display: block;
    margin: 5px 11px 9px;
    color: #70859c;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.nav-home,
.app-nav details a,
.logout-link {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 43px;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    color: #c5d1df;
    background: transparent;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 550;
    line-height: 1.25;
    text-align: left;
    text-decoration: none;
    transition: color .18s ease, background .18s ease, transform .18s ease;
}

.nav-home:hover,
.app-nav details a:hover,
.logout-link:hover {
    color: var(--fecf-white);
    background: rgba(255, 255, 255, .075);
}

.nav-home.is-active,
.app-nav details a.is-active {
    color: var(--fecf-white);
    background: linear-gradient(90deg, rgba(40, 120, 255, .25), rgba(40, 120, 255, .08));
    box-shadow: inset 3px 0 0 var(--fecf-blue-600);
}

.nav-icon {
    display: inline-grid;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    place-items: center;
    color: #8eadd0;
}

.nav-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.app-nav details {
    margin: 8px 0;
}

.app-nav summary {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: #91a4ba;
    border-radius: 9px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .045em;
    list-style: none;
    text-transform: uppercase;
    transition: color .18s ease, background .18s ease;
}

.app-nav summary::-webkit-details-marker {
    display: none;
}

.app-nav summary:hover {
    color: #dce6f2;
    background: rgba(255, 255, 255, .04);
}

.app-nav summary::after {
    width: 7px;
    height: 7px;
    margin-left: auto;
    content: "";
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .18s ease;
}

.app-nav details[open] summary::after {
    transform: rotate(225deg) translate(-2px, -1px);
}

.app-nav details a {
    min-height: 39px;
    margin-top: 2px;
    padding: 9px 12px 9px 43px;
    color: #aebdcd;
    font-size: 13px;
    font-weight: 500;
}

.app-nav details a::before {
    position: absolute;
    left: 23px;
    width: 5px;
    height: 5px;
    content: "";
    background: #536a82;
    border-radius: 50%;
}

.app-nav details a.is-active::before {
    background: #75b3ff;
    box-shadow: 0 0 0 4px rgba(40, 120, 255, .12);
}

.sidebar-footer {
    margin-top: auto;
    padding: 14px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.logout-link {
    color: #f0b3ae;
}

.app-workspace {
    min-width: 0;
}

.app-topbar {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    min-height: 84px;
    align-items: center;
    gap: 24px;
    padding: 13px clamp(18px, 3vw, 40px);
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--fecf-slate-200);
    box-shadow: var(--fecf-shadow-sm);
    backdrop-filter: blur(14px);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--fecf-slate-700);
    background: var(--fecf-white);
    border: 1px solid var(--fecf-slate-200);
    border-radius: 10px;
    cursor: pointer;
}

.mobile-menu-button svg {
    width: 21px;
    height: 21px;
}

.page-context {
    min-width: 150px;
    margin-right: auto;
}

.page-context-label {
    display: block;
    margin-bottom: 3px;
    color: var(--fecf-slate-500);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.page-context-title {
    display: block;
    overflow: hidden;
    max-width: 280px;
    color: var(--fecf-slate-900);
    font-size: 16px;
    font-weight: 720;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-switcher {
    display: flex;
    min-width: min(390px, 36vw);
    align-items: center;
    gap: 12px;
}

.company-switcher-label {
    flex: 0 0 auto;
    color: var(--fecf-slate-500);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.company-select-wrap {
    position: relative;
    min-width: 0;
    flex: 1 1 auto;
}

.company-select {
    width: 100%;
    height: 44px;
    padding: 0 40px 0 14px;
    overflow: hidden;
    color: var(--fecf-slate-900);
    background: var(--fecf-white);
    border: 1px solid var(--fecf-slate-300);
    border-radius: 10px;
    outline: none;
    box-shadow: var(--fecf-shadow-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.company-select:hover {
    border-color: #98a2b3;
}

.company-select:focus {
    border-color: var(--fecf-blue-600);
    box-shadow: 0 0 0 4px rgba(40, 120, 255, .13);
}

.company-select:disabled {
    color: var(--fecf-slate-500);
    background: var(--fecf-slate-100);
    cursor: not-allowed;
}

.company-message {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    color: var(--fecf-danger);
    font-size: 11px;
    white-space: nowrap;
}

.user-card {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    padding-left: 20px;
    border-left: 1px solid var(--fecf-slate-200);
}

.user-avatar {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    color: var(--fecf-blue-700);
    background: var(--fecf-blue-100);
    border: 1px solid #c4d8ff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .04em;
}

.user-details {
    min-width: 0;
}

.user-name,
.user-role {
    display: block;
    overflow: hidden;
    max-width: 165px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-name {
    color: var(--fecf-slate-900);
    font-size: 13px;
    font-weight: 700;
}

.user-role {
    margin-top: 2px;
    color: var(--fecf-slate-500);
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.app-content {
    min-width: 0;
    padding: clamp(20px, 3vw, 38px);
}

.content-frame {
    width: 100%;
    max-width: 1640px;
    margin: 0 auto;
}

.sidebar-backdrop {
    position: fixed;
    z-index: 35;
    inset: 0;
    display: none;
    background: rgba(7, 21, 38, .56);
    backdrop-filter: blur(2px);
}

/* Componentes compartidos */
.titulo-pagina,
.page-title {
    margin: 0;
    color: var(--fecf-slate-900);
    font-size: clamp(27px, 3vw, 38px);
    font-weight: 780;
    letter-spacing: -.035em;
    line-height: 1.12;
}

.page-subtitle {
    margin: 8px 0 0;
    color: var(--fecf-slate-500);
    font-size: 15px;
    line-height: 1.55;
}

.surface-card {
    background: rgba(255, 255, 255, .97);
    border: 1px solid var(--fecf-slate-200);
    border-radius: var(--fecf-radius-lg);
    box-shadow: var(--fecf-shadow-md);
}

.primary-link,
.secondary-link {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.primary-link {
    color: var(--fecf-white);
    background: var(--fecf-blue-700);
    box-shadow: 0 6px 16px rgba(21, 94, 239, .2);
}

.primary-link:hover {
    background: #004eea;
    transform: translateY(-1px);
}

.secondary-link {
    color: var(--fecf-slate-700);
    background: var(--fecf-white);
    border: 1px solid var(--fecf-slate-300);
}

.secondary-link:hover {
    background: var(--fecf-slate-50);
    border-color: #98a2b3;
}

/* Inicio */
.dashboard-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.dashboard-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    padding: 6px 9px;
    color: #05603a;
    background: #ecfdf3;
    border: 1px solid #abefc6;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.dashboard-badge::before {
    width: 7px;
    height: 7px;
    content: "";
    background: #17b26a;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(23, 178, 106, .1);
}

.dashboard-hero {
    position: relative;
    display: grid;
    overflow: hidden;
    margin-bottom: 24px;
    padding: clamp(25px, 4vw, 42px);
    color: var(--fecf-white);
    background:
        radial-gradient(circle at 88% 20%, rgba(25, 183, 200, .35), transparent 15rem),
        linear-gradient(125deg, var(--fecf-navy-900), #123d69);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 20px;
    box-shadow: 0 18px 36px rgba(7, 21, 38, .14);
    grid-template-columns: minmax(0, 1fr) auto;
}

.dashboard-hero h2 {
    margin: 0;
    font-size: clamp(23px, 3vw, 34px);
    font-weight: 760;
    letter-spacing: -.03em;
}

.dashboard-hero p {
    max-width: 660px;
    margin: 10px 0 0;
    color: #c8d8e9;
    font-size: 14px;
    line-height: 1.65;
}

.dashboard-company {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    padding: 9px 12px;
    color: #e8f1fb;
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 9px;
    font-size: 12px;
}

.hero-emblem {
    display: grid;
    width: 108px;
    height: 108px;
    align-self: center;
    margin-left: 36px;
    place-items: center;
    color: #d8f8fc;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 27px;
    transform: rotate(3deg);
}

.hero-emblem svg {
    width: 55px;
    height: 55px;
}

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

.quick-card {
    display: flex;
    min-height: 174px;
    flex-direction: column;
    padding: 22px;
    text-decoration: none;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.quick-card:hover {
    border-color: #b9d1ff;
    box-shadow: 0 14px 32px rgba(16, 24, 40, .11);
    transform: translateY(-3px);
}

.quick-card-icon {
    display: grid;
    width: 42px;
    height: 42px;
    margin-bottom: 18px;
    place-items: center;
    color: var(--fecf-blue-700);
    background: #eff5ff;
    border: 1px solid #d5e3ff;
    border-radius: 11px;
}

.quick-card-icon svg {
    width: 21px;
    height: 21px;
}

.quick-card h3 {
    margin: 0;
    color: var(--fecf-slate-900);
    font-size: 16px;
    font-weight: 730;
}

.quick-card p {
    margin: 8px 0 0;
    color: var(--fecf-slate-500);
    font-size: 13px;
    line-height: 1.5;
}

.quick-card-arrow {
    margin-top: auto;
    padding-top: 14px;
    color: var(--fecf-blue-700);
    font-size: 12px;
    font-weight: 750;
}

/* Acceso */
.auth-page {
    display: grid;
    min-height: 100vh;
    background: var(--fecf-slate-50);
    grid-template-columns: minmax(340px, 1.05fr) minmax(420px, .95fr);
}

.auth-showcase {
    position: relative;
    display: flex;
    overflow: hidden;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(34px, 6vw, 76px);
    color: var(--fecf-white);
    background:
        radial-gradient(circle at 16% 15%, rgba(40, 120, 255, .38), transparent 20rem),
        radial-gradient(circle at 83% 73%, rgba(25, 183, 200, .24), transparent 24rem),
        var(--fecf-navy-950);
}

.auth-showcase::after {
    position: absolute;
    right: -12rem;
    bottom: -15rem;
    width: 34rem;
    height: 34rem;
    content: "";
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    box-shadow:
        0 0 0 4rem rgba(255, 255, 255, .025),
        0 0 0 8rem rgba(255, 255, 255, .018);
}

.auth-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 13px;
}

.auth-brand .brand-mark {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
}

.auth-brand strong {
    display: block;
    font-size: 21px;
    letter-spacing: -.02em;
}

.auth-brand span {
    display: block;
    margin-top: 3px;
    color: #91a4ba;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.auth-copy {
    position: relative;
    z-index: 1;
    max-width: 610px;
    margin: auto 0;
    padding: 70px 0;
}

.auth-copy .auth-eyebrow {
    margin: 0 0 14px;
    color: #7dd3fc;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.auth-copy h1 {
    max-width: 570px;
    margin: 0;
    font-size: clamp(36px, 5vw, 62px);
    font-weight: 780;
    letter-spacing: -.05em;
    line-height: 1.04;
}

.auth-copy p {
    max-width: 560px;
    margin: 22px 0 0;
    color: #b8c8d9;
    font-size: 16px;
    line-height: 1.7;
}

.auth-trust {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: #91a4ba;
    font-size: 11px;
    font-weight: 650;
}

.auth-trust span::before {
    margin-right: 7px;
    color: #4ade80;
    content: "\2713";
    font-weight: 900;
}

.auth-panel {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 6vw, 80px);
}

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

.auth-card h2 {
    margin: 0;
    color: var(--fecf-slate-900);
    font-size: 30px;
    font-weight: 770;
    letter-spacing: -.035em;
}

.auth-card-intro {
    margin: 9px 0 29px;
    color: var(--fecf-slate-500);
    font-size: 14px;
    line-height: 1.55;
}

.auth-field {
    margin-bottom: 18px;
}

.auth-field label {
    display: block;
    margin-bottom: 7px;
    color: var(--fecf-slate-700);
    font-size: 13px;
    font-weight: 700;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    display: grid;
    width: 19px;
    height: 19px;
    place-items: center;
    color: var(--fecf-slate-500);
    pointer-events: none;
    transform: translateY(-50%);
}

.auth-input-icon svg {
    width: 18px;
    height: 18px;
}

.auth-input {
    width: 100%;
    height: 49px;
    padding: 0 14px 0 44px;
    color: var(--fecf-slate-900);
    background: var(--fecf-white);
    border: 1px solid var(--fecf-slate-300);
    border-radius: 10px;
    outline: none;
    box-shadow: var(--fecf-shadow-sm);
    font-size: 14px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.auth-input:focus {
    border-color: var(--fecf-blue-600);
    box-shadow: 0 0 0 4px rgba(40, 120, 255, .13);
}

.auth-button {
    width: 100%;
    height: 49px;
    margin-top: 4px;
    color: var(--fecf-white);
    background: linear-gradient(110deg, var(--fecf-blue-700), var(--fecf-blue-600));
    border: 0;
    border-radius: 10px;
    box-shadow: 0 9px 21px rgba(21, 94, 239, .22);
    cursor: pointer;
    font-size: 14px;
    font-weight: 780;
    transition: transform .18s ease, box-shadow .18s ease;
}

.auth-button:hover {
    box-shadow: 0 12px 25px rgba(21, 94, 239, .28);
    transform: translateY(-1px);
}

.auth-message {
    display: block;
    margin-bottom: 20px;
    padding: 11px 13px;
    color: #b42318;
    background: #fef3f2;
    border: 1px solid #fecdca;
    border-radius: 9px;
    font-size: 13px;
    line-height: 1.45;
}

.auth-footer {
    margin-top: 24px;
    color: var(--fecf-slate-500);
    font-size: 11px;
    line-height: 1.55;
    text-align: center;
}

@media (max-width: 1180px) {
    .page-context {
        display: none;
    }

    .company-switcher {
        margin-left: auto;
    }

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

@media (max-width: 960px) {
    body.menu-open {
        overflow: hidden;
    }

    .app-shell {
        display: block;
    }

    .app-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(var(--fecf-sidebar-width), 88vw);
        height: 100vh;
        box-shadow: 18px 0 45px rgba(7, 21, 38, .28);
        transform: translateX(-105%);
        transition: transform .22s ease;
    }

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

    body.menu-open .sidebar-backdrop {
        display: block;
    }

    .mobile-menu-button {
        display: inline-flex;
        flex: 0 0 42px;
    }

    .app-topbar {
        gap: 13px;
        min-height: 76px;
    }

    .company-switcher {
        min-width: 0;
        flex: 1 1 auto;
    }

    .company-switcher-label,
    .user-details {
        display: none;
    }

    .user-card {
        padding-left: 12px;
    }

    .auth-page {
        display: block;
    }

    .auth-showcase {
        min-height: auto;
        padding: 28px;
    }

    .auth-copy,
    .auth-trust {
        display: none;
    }

    .auth-panel {
        min-height: calc(100vh - 102px);
        padding: 38px 24px;
    }
}

@media (max-width: 680px) {
    .app-topbar {
        padding-right: 13px;
        padding-left: 13px;
    }

    .company-select {
        height: 42px;
        padding-right: 28px;
        padding-left: 10px;
        font-size: 12px;
    }

    .user-card {
        display: none;
    }

    .app-content {
        padding: 18px 13px 28px;
    }

    .dashboard-header {
        display: block;
    }

    .dashboard-hero {
        display: block;
    }

    .hero-emblem {
        display: none;
    }

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

    .auth-showcase {
        padding: 22px;
    }

    .auth-panel {
        padding: 32px 20px;
    }
}

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

/* ================================================================
   Normalización visual de los módulos existentes
   Esta sección se carga después de los estilos locales de cada ASPX.
   ================================================================ */

.content-frame > .pagina,
.content-frame > .gestion,
.content-frame > .lab,
.content-frame > .pagos,
.content-frame > .plan,
body #ecf-contabilidad,
body #ir17 {
    width: 100%;
    max-width: 1540px;
    margin-right: auto;
    margin-left: auto;
    color: var(--fecf-slate-900);
}

.content-frame > .pagina > .encabezado-pagina,
body #ecf-contabilidad > .encabezado-pagina,
body #ir17 > .cab,
.content-frame > .gestion > h1,
.content-frame > .lab > h1,
.content-frame > .pagos > h1,
.content-frame > .plan > h1 {
    margin: 0 0 24px;
}

.content-frame > .pagina > .encabezado-pagina h1,
body #ecf-contabilidad .encabezado-pagina h1,
body #ir17 .cab h1,
.content-frame > .gestion > h1,
.content-frame > .lab > h1,
.content-frame > .pagos > h1,
.content-frame > .plan > h1 {
    margin: 0;
    color: var(--fecf-slate-900);
    font-size: clamp(27px, 3vw, 38px);
    font-weight: 780;
    letter-spacing: -.035em;
    line-height: 1.12;
}

.content-frame > .pagina > .encabezado-pagina p,
body #ecf-contabilidad .encabezado-pagina p,
body #ir17 .cab p,
.content-frame > .gestion > p,
.content-frame > .lab > h1 + p,
.content-frame > .pagos > h1 + p,
.content-frame > .plan > h1 + p {
    margin: 8px 0 0;
    color: var(--fecf-slate-500);
    font-size: 14px;
    line-height: 1.6;
}

.content-frame .panel,
.content-frame .panel-g,
.content-frame .panel-l,
.content-frame .tarjeta,
.content-frame .panel-plan,
body #ecf-contabilidad .panel,
body #ir17 .panel {
    padding: clamp(20px, 2.4vw, 30px);
    background: rgba(255, 255, 255, .98);
    border: 1px solid var(--fecf-slate-200);
    border-radius: var(--fecf-radius-lg);
    box-shadow: var(--fecf-shadow-md);
}

.content-frame .panel,
.content-frame .panel-g,
.content-frame .panel-l,
.content-frame .panel-plan,
body #ecf-contabilidad .panel,
body #ir17 .panel {
    margin-bottom: 22px;
}

.content-frame .panel h2,
.content-frame .panel-g h2,
.content-frame .panel-l h2,
.content-frame .tarjeta h2,
.content-frame .panel-plan h2,
body #ecf-contabilidad .panel h2,
body #ir17 .panel h2 {
    margin: 0 0 7px;
    color: var(--fecf-slate-900);
    font-size: 19px;
    font-weight: 750;
    letter-spacing: -.015em;
}

.content-frame .panel h3,
.content-frame .panel-g h3,
.content-frame .panel-l h3,
body #ecf-contabilidad .panel h3,
body #ir17 .panel h3 {
    color: var(--fecf-slate-700);
    font-weight: 730;
}

.content-frame .compania,
.content-frame .compania-actual,
.content-frame .estado-actual,
body #ecf-contabilidad .compania,
body #ir17 .compania {
    margin: 0 0 22px;
    padding: 14px 17px;
    color: #1849a9;
    background: linear-gradient(100deg, #eff5ff, #f5f9ff);
    border: 1px solid #c7d7fe;
    border-left: 4px solid var(--fecf-blue-600);
    border-radius: 10px;
    box-shadow: var(--fecf-shadow-sm);
    font-size: 14px;
}

.content-frame .grupo label,
.content-frame .grupo-g label,
.content-frame .campo label,
body #ecf-contabilidad .grupo label,
body #ir17 .grupo label {
    display: block;
    margin-bottom: 7px;
    color: var(--fecf-slate-700);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .015em;
}

.content-frame .campo:not(div),
.content-frame .campo-g,
.content-frame .entrada,
.content-frame .selector:not(div),
.content-frame .campo-area,
.content-frame .campo-multilinea,
.content-frame .campo-tabla,
body #ecf-contabilidad .campo,
body #ecf-contabilidad .campo-area,
body #ir17 .campo,
body #ir17 .area {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    color: var(--fecf-slate-900);
    background: var(--fecf-white);
    border: 1px solid var(--fecf-slate-300);
    border-radius: 9px;
    outline: none;
    box-shadow: var(--fecf-shadow-sm);
    font-size: 14px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.content-frame textarea.campo,
.content-frame textarea.campo-g,
.content-frame textarea.entrada,
.content-frame .campo-multilinea,
.content-frame .campo-area,
body #ecf-contabilidad textarea.campo,
body #ir17 textarea.campo {
    min-height: 92px;
    resize: vertical;
}

.content-frame .campo:not(div):hover,
.content-frame .campo-g:hover,
.content-frame .entrada:hover,
.content-frame .selector:not(div):hover,
body #ecf-contabilidad .campo:hover,
body #ir17 .campo:hover {
    border-color: #98a2b3;
}

.content-frame .campo:not(div):focus,
.content-frame .campo-g:focus,
.content-frame .entrada:focus,
.content-frame .selector:not(div):focus,
.content-frame .campo-area:focus,
.content-frame .campo-multilinea:focus,
.content-frame .campo-tabla:focus,
body #ecf-contabilidad .campo:focus,
body #ir17 .campo:focus {
    border-color: var(--fecf-blue-600);
    box-shadow: 0 0 0 4px rgba(40, 120, 255, .13);
}

.content-frame input[type="file"] {
    max-width: 100%;
    color: var(--fecf-slate-600);
    background: var(--fecf-white);
    border: 1px solid var(--fecf-slate-300);
    border-radius: 9px;
    font-size: 13px;
}

.content-frame input[type="file"]::file-selector-button {
    min-height: 42px;
    margin-right: 12px;
    padding: 0 14px;
    color: var(--fecf-slate-700);
    background: var(--fecf-slate-100);
    border: 0;
    border-right: 1px solid var(--fecf-slate-300);
    cursor: pointer;
    font-weight: 700;
}

.content-frame .check,
body #ecf-contabilidad .check {
    padding: 12px 14px;
    color: var(--fecf-slate-700);
    background: var(--fecf-slate-50);
    border: 1px solid var(--fecf-slate-200);
    border-radius: 9px;
}

.content-frame input[type="checkbox"],
.content-frame input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--fecf-blue-700);
}

.content-frame .acciones,
body #ecf-contabilidad .acciones,
body #ir17 .acciones {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 19px;
}

.content-frame .boton,
.content-frame .boton-g,
.content-frame .boton-l,
.content-frame .boton-tarjeta,
body #ecf-contabilidad .boton,
body #ir17 .boton {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    color: var(--fecf-white);
    background: var(--fecf-navy-900);
    border: 1px solid transparent;
    border-radius: 9px;
    box-shadow: 0 5px 13px rgba(7, 21, 38, .13);
    cursor: pointer;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.content-frame .boton:hover,
.content-frame .boton-g:hover,
.content-frame .boton-l:hover,
.content-frame .boton-tarjeta:hover,
body #ecf-contabilidad .boton:hover,
body #ir17 .boton:hover {
    filter: brightness(1.08);
    box-shadow: 0 8px 18px rgba(7, 21, 38, .18);
    transform: translateY(-1px);
}

.content-frame .boton-principal,
.content-frame .boton-guardar,
.content-frame .boton-exportar,
.content-frame .boton-l.azul,
body #ecf-contabilidad .boton-principal,
body #ecf-contabilidad .boton-exportar,
body #ir17 .boton.azul {
    color: var(--fecf-white);
    background: linear-gradient(110deg, var(--fecf-blue-700), var(--fecf-blue-600));
    box-shadow: 0 7px 17px rgba(21, 94, 239, .2);
}

.content-frame .boton-procesar,
.content-frame .boton-l.ok,
body #ecf-contabilidad .boton-procesar,
body #ir17 .boton.verde {
    color: var(--fecf-white);
    background: var(--fecf-green-600);
}

.content-frame .boton-secundario,
.content-frame .boton-l.sec,
body #ecf-contabilidad .boton-secundario,
body #ir17 .boton.secundario {
    color: var(--fecf-slate-700);
    background: var(--fecf-white);
    border-color: var(--fecf-slate-300);
    box-shadow: var(--fecf-shadow-sm);
}

.content-frame .boton-peligro,
.content-frame .boton-l.peligro,
body #ecf-contabilidad .boton-peligro {
    color: var(--fecf-white);
    background: #b42318;
}

.content-frame .tabla-contenedor,
.content-frame .tabla-wrap,
body #ecf-contabilidad .tabla-contenedor,
body #ir17 .tabla-wrap {
    overflow-x: auto;
    background: var(--fecf-white);
    border: 1px solid var(--fecf-slate-200);
    border-radius: 11px;
    scrollbar-color: #98a2b3 transparent;
    scrollbar-width: thin;
}

.content-frame .tabla,
.content-frame .tabla-g,
.content-frame .tabla-l,
body #ecf-contabilidad .tabla,
body #ir17 .tabla {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.content-frame .tabla th,
.content-frame .tabla-g th,
.content-frame .tabla-l th,
body #ecf-contabilidad .tabla th,
body #ir17 .tabla th {
    padding: 12px 13px;
    color: #dce6f2;
    background: var(--fecf-navy-900);
    border: 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .045em;
    line-height: 1.3;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.content-frame .tabla td,
.content-frame .tabla-g td,
.content-frame .tabla-l td,
body #ecf-contabilidad .tabla td,
body #ir17 .tabla td {
    padding: 11px 13px;
    color: var(--fecf-slate-700);
    background: var(--fecf-white);
    border: 0;
    border-bottom: 1px solid var(--fecf-slate-200);
    font-size: 13px;
    vertical-align: middle;
}

.content-frame .tabla tr:last-child td,
.content-frame .tabla-g tr:last-child td,
.content-frame .tabla-l tr:last-child td,
body #ecf-contabilidad .tabla tr:last-child td,
body #ir17 .tabla tr:last-child td {
    border-bottom: 0;
}

.content-frame .tabla tr:not(:first-child):hover td,
.content-frame .tabla-g tr:not(:first-child):hover td,
.content-frame .tabla-l tr:not(:first-child):hover td,
body #ecf-contabilidad .tabla tr:not(:first-child):hover td,
body #ir17 .tabla tr:not(:first-child):hover td {
    background: #f8fbff;
}

.content-frame .link-tabla,
.content-frame .link-accion,
.content-frame .seleccionada,
body #ecf-contabilidad .link-accion {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    padding: 6px 10px;
    color: #1849a9;
    background: #eff5ff;
    border: 1px solid #c7d7fe;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

.content-frame .link-peligro,
.content-frame .link-eliminar,
body #ecf-contabilidad .link-peligro {
    color: #b42318;
    background: #fef3f2;
    border-color: #fecdca;
}

.content-frame .mensaje,
.content-frame .mensaje-error,
.content-frame .mensaje-exito,
.content-frame .mensaje-info,
.content-frame .error,
.content-frame .ok:not(.boton-l):not(.boton),
.content-frame .exito,
.content-frame .alerta,
body #ecf-contabilidad .mensaje,
body #ir17 .mensaje {
    display: block;
    margin-bottom: 18px;
    padding: 13px 15px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.55;
}

.content-frame .mensaje-error,
.content-frame .error,
body #ecf-contabilidad .mensaje-error,
body #ir17 .mensaje-error {
    color: #b42318;
    background: #fef3f2;
    border: 1px solid #fecdca;
}

.content-frame .mensaje-exito,
.content-frame .ok:not(.boton-l):not(.boton),
.content-frame .exito,
body #ecf-contabilidad .mensaje-exito,
body #ir17 .mensaje-exito {
    color: #067647;
    background: #ecfdf3;
    border: 1px solid #abefc6;
}

.content-frame .mensaje-info,
body #ecf-contabilidad .mensaje-info,
body #ir17 .mensaje-info {
    color: #1849a9;
    background: #eff5ff;
    border: 1px solid #c7d7fe;
}

.content-frame .alerta,
.content-frame .aviso {
    color: #93370d;
    background: #fffaeb;
    border: 1px solid #fedf89;
    border-left: 4px solid #f79009;
}

.content-frame .nota,
.content-frame .ayuda,
.content-frame .subtitulo,
body #ecf-contabilidad .ayuda,
body #ecf-contabilidad .subtitulo,
body #ir17 .sub {
    color: var(--fecf-slate-500);
    line-height: 1.55;
}

.content-frame .modulos,
body #ecf-contabilidad .modulos {
    gap: 8px;
    margin-bottom: 22px;
    padding: 6px;
    background: var(--fecf-slate-100);
    border: 1px solid var(--fecf-slate-200);
    border-radius: 12px;
}

.content-frame .modulo,
body #ecf-contabilidad .modulo {
    padding: 10px 15px;
    color: var(--fecf-slate-600);
    background: transparent;
    border: 0;
    border-radius: 8px;
    box-shadow: none;
    font-size: 12px;
}

.content-frame .modulo:hover,
.content-frame .modulo-activo,
body #ecf-contabilidad .modulo:hover,
body #ecf-contabilidad .modulo-activo {
    color: var(--fecf-blue-700);
    background: var(--fecf-white);
    box-shadow: var(--fecf-shadow-sm);
}

.content-frame .metrica,
.content-frame .dato,
body #ecf-contabilidad .tarjeta,
body #ir17 .tarjeta {
    background: linear-gradient(145deg, #f8fafc, #f1f6fd);
    border: 1px solid var(--fecf-slate-200);
    border-radius: 11px;
}

.content-frame .xml-visor {
    color: #dce6f2;
    background: var(--fecf-navy-950);
    border: 1px solid #243b53;
    border-radius: 11px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .025);
}

.content-frame code,
.content-frame .codigo {
    font-family: Consolas, "Cascadia Code", "Courier New", monospace;
}

@media (max-width: 760px) {
    .content-frame .panel,
    .content-frame .panel-g,
    .content-frame .panel-l,
    .content-frame .tarjeta,
    .content-frame .panel-plan,
    body #ecf-contabilidad .panel,
    body #ir17 .panel {
        padding: 17px;
        border-radius: 13px;
    }

    .content-frame .fila,
    .content-frame .fila-3,
    .content-frame .fila-4,
    .content-frame .fila-g,
    .content-frame .rejilla,
    .content-frame .metricas,
    body #ecf-contabilidad .fila,
    body #ecf-contabilidad .fila-3,
    body #ecf-contabilidad .fila-4,
    body #ir17 .fila,
    body #ir17 .fila-3,
    body #ir17 .resumen {
        grid-template-columns: minmax(0, 1fr);
    }

    .content-frame .boton,
    .content-frame .boton-g,
    .content-frame .boton-l,
    body #ecf-contabilidad .boton,
    body #ir17 .boton {
        width: 100%;
    }
}

@media print {
    .app-sidebar,
    .app-topbar,
    .sidebar-backdrop {
        display: none !important;
    }

    .app-shell {
        display: block;
    }

    .app-content {
        padding: 0;
    }

    .content-frame .panel,
    .content-frame .panel-g,
    .content-frame .panel-l,
    .content-frame .tarjeta,
    .content-frame .panel-plan {
        box-shadow: none;
    }
}
