:root {
    --blue: #1E3A8A;
    --teal: #14B8A6;
    --night: #0F172A;
    --ink: #101827;
    --text: #223047;
    --muted: #64748B;
    --line: #E5E7EB;
    --soft: #F7F9FC;
    --white: #FFFFFF;
    --amber: #F59E0B;
    --radius: 22px;
    --radius-lg: 34px;
    --pill: 999px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", Arial, sans-serif;
    color: var(--ink);
    background: var(--white);
    letter-spacing: 0;
}

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

img {
    display: block;
    max-width: 100%;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px clamp(20px, 4vw, 56px);
    color: var(--white);
    background: rgba(15, 23, 42, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(18px);
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 23px;
    letter-spacing: 0;
}

.wordmark img {
    width: 34px;
    height: 34px;
    border-radius: 11px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 14px;
    font-weight: 700;
    color: #C9D5E6;
}

.site-nav a,
.nav-access,
.button,
.price-card a {
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.site-nav a:hover {
    color: var(--white);
}

.nav-access {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--pill);
    padding: 0 18px;
    color: var(--white);
    font-size: 14px;
    font-weight: 800;
}

.nav-access:hover {
    background: var(--white);
    color: var(--night);
}

.hero {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: var(--night);
    color: var(--white);
}

.intelligence-field {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0.72;
    pointer-events: none;
}

.intelligence-field:before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.13) 1px, transparent 1.5px),
        radial-gradient(circle, rgba(20, 184, 166, 0.18) 1px, transparent 1.5px);
    background-position: 0 0, 36px 36px;
    background-size: 72px 72px;
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.96));
}

.intelligence-field:after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(110deg, transparent 0%, rgba(20, 184, 166, 0.08) 46%, transparent 60%),
        linear-gradient(22deg, transparent 10%, rgba(30, 58, 138, 0.14) 56%, transparent 72%);
}

.data-node {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    min-height: 34px;
    border: 1px solid rgba(20, 184, 166, 0.34);
    border-radius: var(--pill);
    padding: 0 15px 0 26px;
    background: rgba(15, 23, 42, 0.72);
    color: #DDFCF8;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 0 0 8px rgba(20, 184, 166, 0.04);
    animation: nodeDrift 7s ease-in-out infinite;
}

.data-node:before {
    content: "";
    position: absolute;
    left: 13px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--teal);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 22px rgba(20, 184, 166, 0.8);
}

.node-cfdi {
    top: 18%;
    right: 36%;
}

.node-ia {
    top: 28%;
    right: 17%;
    border-color: rgba(20, 184, 166, 0.72);
    box-shadow: 0 0 0 12px rgba(20, 184, 166, 0.06), 0 0 48px rgba(20, 184, 166, 0.16);
}

.node-rfc {
    top: 44%;
    right: 42%;
    animation-delay: -1.8s;
}

.node-iva {
    top: 57%;
    right: 22%;
    animation-delay: -3.1s;
}

.node-sat {
    top: 70%;
    right: 38%;
    animation-delay: -2.2s;
}

.node-xml {
    top: 35%;
    right: 58%;
    animation-delay: -4.4s;
}

.node-cliente {
    top: 63%;
    right: 56%;
    animation-delay: -2.8s;
}

.data-line {
    position: absolute;
    z-index: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(20, 184, 166, 0.58), rgba(77, 123, 255, 0.28), transparent);
    transform-origin: left center;
    animation: linePulse 4.8s ease-in-out infinite;
}

.line-a {
    top: 24%;
    right: 18%;
    width: 330px;
    transform: rotate(16deg);
}

.line-b {
    top: 43%;
    right: 19%;
    width: 430px;
    transform: rotate(-11deg);
    animation-delay: -1.2s;
}

.line-c {
    top: 60%;
    right: 23%;
    width: 380px;
    transform: rotate(20deg);
    animation-delay: -2s;
}

.line-d {
    top: 49%;
    right: 44%;
    width: 320px;
    transform: rotate(72deg);
    animation-delay: -2.8s;
}

.line-e {
    top: 70%;
    right: 20%;
    width: 460px;
    transform: rotate(-7deg);
    animation-delay: -3.6s;
}

@keyframes nodeDrift {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -8px, 0);
    }
}

@keyframes linePulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.92;
    }
}

.hero:before,
.hero:after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.hero:before {
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.86) 42%, rgba(15, 23, 42, 0.3) 100%);
}

.hero:after {
    top: 116px;
    right: 0;
    width: 52vw;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(20, 184, 166, 0.8), transparent);
}

.hero-stage {
    position: absolute;
    top: 50%;
    right: clamp(-180px, -7vw, -40px);
    z-index: 1;
    width: min(760px, 58vw);
    min-height: 520px;
    transform: translateY(-44%);
}

.system-panel,
.command-center {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-lg);
    background: rgba(16, 27, 48, 0.82);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(18px);
}

.system-panel {
    position: absolute;
    z-index: 3;
    width: 260px;
    padding: 20px;
}

.panel-left {
    top: 26px;
    left: 0;
}

.panel-right {
    right: 16px;
    bottom: 6px;
}

.panel-kicker {
    margin-bottom: 12px;
    color: var(--teal);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.system-panel strong,
.system-panel span,
.system-panel p,
.system-panel small {
    display: block;
}

.system-panel strong {
    font-size: 16px;
    line-height: 1.25;
}

.system-panel span,
.system-panel p,
.system-panel small {
    color: #B8C7DA;
    line-height: 1.5;
}

.system-panel span {
    margin-top: 6px;
    font-size: 13px;
}

.system-panel p {
    margin: 8px 0 12px;
}

.system-panel small {
    font-weight: 700;
}

.client-state {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.client-state b {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    background: var(--teal);
    border-radius: 50%;
}

.client-state p {
    margin: 0;
    font-size: 13px;
}

.command-center {
    position: absolute;
    top: 100px;
    right: 44px;
    z-index: 2;
    width: 620px;
    padding: 22px;
}

.command-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.command-top span {
    color: var(--teal);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.command-top strong {
    color: #D9E4F2;
    font-size: 13px;
}

.command-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 18px;
}

.command-metrics article {
    min-height: 118px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.06);
}

.command-metrics span {
    color: #B8C7DA;
    font-size: 12px;
    line-height: 1.35;
}

.command-metrics strong {
    display: block;
    margin-top: 18px;
    font-size: 27px;
}

.signal-map {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    gap: 18px;
    min-height: 118px;
    margin-top: 16px;
}

.node {
    position: relative;
    z-index: 2;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 20px;
    background: #101B30;
    color: #D9E4F2;
    font-size: 13px;
    font-weight: 900;
}

.node.active {
    border-color: rgba(20, 184, 166, 0.7);
    box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.18);
}

.trace {
    position: absolute;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.1), rgba(20, 184, 166, 0.9), rgba(30, 58, 138, 0.4));
}

.trace-one {
    left: 20%;
    width: 16%;
}

.trace-two {
    left: 43%;
    width: 16%;
}

.trace-three {
    left: 67%;
    width: 16%;
}

.review-table {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    overflow: hidden;
}

.review-row {
    display: grid;
    grid-template-columns: 12px 1fr 92px;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.review-row:last-child {
    border-bottom: 0;
}

.review-row span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #64748B;
}

.review-row.ok span {
    background: var(--teal);
}

.review-row.warn span {
    background: var(--amber);
}

.review-row b {
    color: #E5EDF7;
    font-size: 13px;
}

.review-row em {
    color: #B8C7DA;
    font-size: 12px;
    font-style: normal;
    text-align: right;
}

.hero-content {
    position: relative;
    z-index: 5;
    width: min(780px, 100%);
    padding: clamp(132px, 18vh, 190px) clamp(20px, 4vw, 56px) 86px;
}

.eyebrow {
    margin: 0 0 16px;
    color: var(--teal);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow.dark {
    color: var(--teal);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 24px;
    max-width: 780px;
    font-size: clamp(50px, 7vw, 94px);
    line-height: 0.96;
    font-weight: 900;
}

h2 {
    margin-bottom: 18px;
    font-size: clamp(34px, 4.7vw, 64px);
    line-height: 1;
    font-weight: 900;
}

h3 {
    margin-bottom: 10px;
    font-size: 21px;
    line-height: 1.2;
}

.hero-copy {
    max-width: 650px;
    color: #D3DEEC;
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.button {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--pill);
    padding: 0 22px;
    font-size: 15px;
    font-weight: 900;
}

.button:hover,
.price-card a:hover {
    transform: translateY(-1px);
}

.button.primary {
    background: var(--teal);
    color: var(--night);
}

.button.secondary {
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: var(--white);
}

.button.secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.statement-band {
    padding: 24px clamp(20px, 4vw, 56px);
    background: var(--teal);
    color: var(--night);
}

.statement {
    width: min(1180px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 28px;
    align-items: center;
}

.statement span:first-child {
    font-size: clamp(22px, 3vw, 34px);
    line-height: 1.1;
    font-weight: 900;
}

.statement span:last-child {
    color: #134E4A;
    font-size: 17px;
    line-height: 1.55;
}

.section,
.closing-cta {
    padding: clamp(76px, 10vw, 128px) clamp(20px, 4vw, 56px);
}

.section-inner {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.section-heading {
    max-width: 780px;
}

.section-heading.narrow {
    max-width: 860px;
    margin-bottom: 42px;
}

.section-heading p:not(.eyebrow),
.velocity-layout p,
.flow-track p,
.future-layout p,
.security-grid p,
.price-card li {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.65;
}

.velocity-section,
.pricing-section {
    background: var(--soft);
}

.velocity-layout {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    gap: clamp(36px, 6vw, 86px);
    align-items: center;
}

.velocity-board,
.flow-card,
.security-grid article,
.price-card,
.future-item {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.velocity-board {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 14px;
    padding: 18px;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.08);
}

.velocity-column {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px;
    border-radius: 26px;
}

.velocity-column span,
.future-item span,
.workflow-number {
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.velocity-column span,
.workflow-number,
.future-item span {
    color: var(--teal);
    font-size: 12px;
}

.velocity-column p {
    margin: 0;
    color: var(--text);
    font-size: 22px;
    line-height: 1.25;
    font-weight: 800;
}

.muted-card {
    background: #EDF2F8;
}

.active-card {
    color: var(--white);
    background: var(--night);
}

.active-card p {
    color: var(--white);
}

.velocity-pulse {
    align-self: center;
    display: grid;
    place-items: center;
    gap: 10px;
    width: 96px;
}

.velocity-pulse b {
    width: 54px;
    height: 54px;
    border: 1px solid rgba(20, 184, 166, 0.35);
    border-radius: 18px;
    background: var(--teal);
    box-shadow: 0 0 0 12px rgba(20, 184, 166, 0.12);
    animation: signalPulse 2.6s ease-in-out infinite;
}

.velocity-pulse small {
    color: var(--teal);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.velocity-metrics {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.velocity-metrics article {
    min-height: 110px;
    padding: 18px;
    border-radius: 22px;
    background: #F8FAFC;
}

.velocity-metrics strong,
.velocity-metrics span {
    display: block;
}

.velocity-metrics strong {
    color: var(--teal);
    font-size: 34px;
}

.velocity-metrics span {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.35;
}

@keyframes signalPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(20, 184, 166, 0.12);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 18px rgba(20, 184, 166, 0.05);
    }
}

.system-section {
    background: var(--white);
}

.flow-track {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.flow-track:before {
    content: "";
    position: absolute;
    top: 56px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.16), var(--teal), rgba(20, 184, 166, 0.16));
    opacity: 0.35;
}

.flow-card {
    position: relative;
    min-height: 320px;
    padding: 26px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

.flow-card:before {
    content: "";
    position: absolute;
    top: 42px;
    left: 26px;
    width: 28px;
    height: 28px;
    border: 8px solid var(--white);
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.35);
}

.flow-card.highlighted {
    color: var(--white);
    background: var(--night);
    border-color: var(--night);
}

.flow-card.highlighted p {
    color: #D5DFEC;
}

.workflow-number {
    margin-bottom: 62px;
}

.intelligence-section {
    background: var(--night);
    color: var(--white);
}

.intelligence-layout {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: clamp(38px, 6vw, 90px);
    align-items: center;
}

.ai-board {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-lg);
    background: #101B30;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.ai-header span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--teal);
}

.ai-card {
    position: relative;
    padding: 26px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-card:last-child {
    border-bottom: 0;
}

.ai-card.active {
    box-shadow: inset 4px 0 0 var(--teal);
}

.ai-card span {
    color: var(--teal);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ai-card p,
.ai-card small,
.intelligence-section .section-heading p:not(.eyebrow) {
    color: #D5DFEC;
}

.ai-card p {
    margin: 10px 0 12px;
    font-size: 18px;
    line-height: 1.55;
}

.ai-card small {
    display: inline-flex;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--pill);
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

.intelligence-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.intelligence-tags span {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--pill);
    padding: 10px 12px;
    color: #D5DFEC;
    font-size: 14px;
    font-weight: 800;
}

.future-section {
    background: var(--white);
}

.future-layout {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: clamp(36px, 6vw, 80px);
    align-items: center;
}

.future-stack {
    display: grid;
    gap: 14px;
}

.future-item {
    position: relative;
    min-height: 138px;
    padding: 26px 28px 26px 88px;
    overflow: hidden;
}

.future-item:before {
    content: "";
    position: absolute;
    left: 28px;
    top: 32px;
    width: 34px;
    height: 34px;
    border-radius: 14px;
    background: #EAF8F6;
    box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.24);
}

.future-item.live {
    color: var(--night);
    background: var(--teal);
    border-color: var(--teal);
}

.future-item.live:before {
    background: var(--night);
}

.future-item.live span {
    color: #134E4A;
}

.future-item strong {
    display: block;
    margin-top: 12px;
    font-size: 22px;
    line-height: 1.25;
}


.security-section {
    background: #F8FAFC;
    border-top: 1px solid var(--line);
}

.security-layout {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: clamp(38px, 7vw, 96px);
    align-items: center;
    margin-bottom: 28px;
}

.security-visual {
    position: relative;
    min-height: 420px;
    border: 1px solid rgba(20, 184, 166, 0.18);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(16, 27, 48, 0.92)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 54px);
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.16);
}

.security-visual:before {
    content: "";
    position: absolute;
    inset: 34px;
    border: 1px solid rgba(20, 184, 166, 0.16);
    border-radius: 34px;
}

.security-visual:after {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(20, 184, 166, 0.72), transparent);
}

.vault-core {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    width: 210px;
    min-height: 150px;
    display: grid;
    place-items: center;
    gap: 4px;
    padding: 24px;
    border: 1px solid rgba(20, 184, 166, 0.5);
    border-radius: 32px;
    background: rgba(15, 23, 42, 0.82);
    color: var(--white);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 16px rgba(20, 184, 166, 0.06), 0 0 80px rgba(20, 184, 166, 0.16);
}

.vault-core strong {
    font-size: 30px;
    line-height: 1;
}

.vault-core span {
    color: #9FF7EA;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.vault-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    border: 1px solid rgba(20, 184, 166, 0.22);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.ring-one {
    width: 330px;
    height: 330px;
}

.ring-two {
    width: 460px;
    height: 460px;
    opacity: 0.6;
}

.security-chip {
    position: absolute;
    z-index: 5;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(20, 184, 166, 0.32);
    border-radius: var(--pill);
    padding: 0 14px;
    background: rgba(15, 23, 42, 0.8);
    color: #DDFCF8;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.chip-a {
    left: 10%;
    top: 22%;
}

.chip-b {
    right: 12%;
    top: 32%;
}

.chip-c {
    left: 18%;
    bottom: 20%;
}

.security-grid,
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.security-grid article {
    min-height: 220px;
    padding: 28px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.05);
}

.security-grid article span {
    display: inline-flex;
    margin-bottom: 34px;
    color: var(--teal);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pricing-grid {
    align-items: stretch;
    gap: 20px;
}

.price-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 520px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.05);
}

.price-card.featured {
    border-color: rgba(20, 184, 166, 0.62);
    background: linear-gradient(180deg, #FFFFFF 0%, #F0FDFA 100%);
    transform: translateY(-18px);
    box-shadow: 0 30px 80px rgba(20, 184, 166, 0.18);
}

.price-card > span {
    color: var(--teal);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.price-card strong {
    margin: 12px 0 24px;
    color: var(--night);
    font-size: 30px;
}

.plan-badge {
    position: absolute;
    top: 18px;
    left: 50%;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    border-radius: var(--pill);
    padding: 0 13px;
    background: var(--teal);
    color: var(--night);
    font-size: 12px;
    font-weight: 900;
    transform: translateX(-50%);
}

.price-card.featured > span {
    margin-top: 34px;
}

.price-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.price-card li {
    position: relative;
    padding: 13px 0 13px 28px;
    border-top: 1px solid var(--line);
    text-align: left;
}

.price-card li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--teal);
}

.price-card a {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    border-radius: var(--pill);
    background: var(--night);
    color: var(--white);
    font-weight: 900;
}

.price-card.featured a {
    background: var(--teal);
    color: var(--night);
}

.closing-cta {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: var(--night);
}

.closing-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 34px;
    align-items: center;
}

.closing-inner h2 {
    max-width: 860px;
    margin-bottom: 18px;
}

.closing-inner p:not(.eyebrow) {
    max-width: 620px;
    margin-bottom: 0;
    color: #D5DFEC;
    font-size: 18px;
    line-height: 1.6;
}

.cta-field {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cta-field:before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(20, 184, 166, 0.22) 1px, transparent 1.5px);
    background-size: 64px 64px;
    mask-image: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.75));
}

.cta-node {
    position: absolute;
    right: 12%;
    min-width: 70px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(20, 184, 166, 0.32);
    border-radius: var(--pill);
    background: rgba(15, 23, 42, 0.72);
    color: #DDFCF8;
    font-size: 12px;
    font-weight: 900;
}

.cta-node:nth-of-type(3) {
    top: 24%;
}

.cta-node:nth-of-type(4) {
    top: 47%;
    right: 22%;
}

.cta-node:nth-of-type(5) {
    top: 68%;
}

.cta-line {
    position: absolute;
    right: 13%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(20, 184, 166, 0.72), transparent);
}

.cta-line-a {
    top: 42%;
    width: 360px;
    transform: rotate(18deg);
}

.cta-line-b {
    top: 62%;
    width: 420px;
    transform: rotate(-14deg);
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 30px clamp(20px, 4vw, 56px);
    border-top: 1px solid var(--line);
}

.footer-wordmark {
    color: var(--night);
}

.site-footer p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.login-page {
    min-height: 100vh;
    background: var(--night);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 480px);
}

.login-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(28px, 6vw, 70px);
    color: var(--white);
    overflow: hidden;
}

.login-visual:before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.68));
}

.login-intelligence-field {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.login-intelligence-field:before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.12) 1px, transparent 1.5px),
        radial-gradient(circle, rgba(20, 184, 166, 0.2) 1px, transparent 1.5px);
    background-position: 0 0, 38px 38px;
    background-size: 76px 76px;
    opacity: 0.72;
}

.login-intelligence-field:after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(110deg, transparent 0%, rgba(20, 184, 166, 0.1) 44%, transparent 60%),
        linear-gradient(24deg, transparent 10%, rgba(30, 58, 138, 0.16) 54%, transparent 72%);
}

.login-node {
    position: absolute;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    min-width: 62px;
    min-height: 36px;
    border: 1px solid rgba(20, 184, 166, 0.36);
    border-radius: var(--pill);
    padding: 0 15px 0 27px;
    background: rgba(15, 23, 42, 0.68);
    color: #DDFCF8;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    animation: nodeDrift 7s ease-in-out infinite;
}

.login-node:before {
    content: "";
    position: absolute;
    left: 13px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--teal);
    transform: translateY(-50%);
    box-shadow: 0 0 22px rgba(20, 184, 166, 0.8);
}

.login-node-cfdi {
    left: 14%;
    top: 26%;
}

.login-node-ia {
    right: 20%;
    top: 34%;
    border-color: rgba(20, 184, 166, 0.72);
}

.login-node-iva {
    left: 28%;
    bottom: 22%;
    animation-delay: -2.3s;
}

.login-node-rfc {
    right: 14%;
    bottom: 32%;
    animation-delay: -3.8s;
}

.login-line {
    position: absolute;
    z-index: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(20, 184, 166, 0.6), rgba(77, 123, 255, 0.26), transparent);
    transform-origin: left center;
    animation: linePulse 5s ease-in-out infinite;
}

.login-line-a {
    top: 38%;
    left: 16%;
    width: 460px;
    transform: rotate(12deg);
}

.login-line-b {
    bottom: 34%;
    left: 24%;
    width: 520px;
    transform: rotate(-17deg);
    animation-delay: -2s;
}

.login-visual > * {
    position: relative;
    z-index: 1;
}

.back-brand {
    width: fit-content;
    color: var(--white);
}

.login-visual h1 {
    max-width: 690px;
    font-size: clamp(42px, 6vw, 76px);
}

.login-visual p:not(.eyebrow) {
    max-width: 560px;
    color: #D7E0EC;
    font-size: 19px;
    line-height: 1.6;
}

.login-signal {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 520px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    padding-top: 18px;
}

.login-signal span {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--teal);
}

.login-signal p {
    margin: 0;
    font-size: 14px;
}

.login-card {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(28px, 5vw, 54px);
    background: var(--white);
}

.login-card > img {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    margin-bottom: 32px;
}

.login-card h2 {
    margin-bottom: 8px;
    font-size: 34px;
}

.login-card > p {
    color: var(--muted);
    line-height: 1.55;
}

.login-card form {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.login-card label {
    color: #334155;
    font-size: 14px;
    font-weight: 800;
}

.login-card input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 14px;
    color: var(--night);
    font: inherit;
}

.login-card input:focus {
    outline: 3px solid rgba(20, 184, 166, 0.18);
    border-color: var(--teal);
}

.login-card button {
    min-height: 50px;
    margin-top: 12px;
    border: 0;
    border-radius: var(--pill);
    background: var(--teal);
    color: var(--night);
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}

.register-prompt {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.register-prompt a,
.login-card > a {
    color: var(--teal);
    font-weight: 900;
}

.login-card > a {
    margin-top: 22px;
    font-size: 14px;
    font-weight: 900;
}

.public-link {
    display: inline-flex;
    width: fit-content;
}

.form-alert {
    margin-top: 22px;
    border-radius: 16px;
    padding: 13px 14px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.form-alert.error {
    border: 1px solid #FCA5A5;
    background: #FEF2F2;
    color: #991B1B;
}

.form-alert.success {
    border: 1px solid rgba(20, 184, 166, 0.34);
    background: #F0FDFA;
    color: #115E59;
}

.app-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    background: #F8FAFC;
    color: var(--night);
    transition: grid-template-columns 180ms ease;
}

.global-loader-active {
    overflow: hidden;
}

.global-loading-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.global-loading-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.global-loading-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(8px);
}

.global-loading-card {
    position: relative;
    z-index: 1;
    width: min(340px, 100%);
    border: 1px solid rgba(20, 184, 166, 0.22);
    border-radius: 26px;
    padding: 26px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
    text-align: center;
}

.global-loading-spinner {
    display: inline-block;
    width: 44px;
    height: 44px;
    border: 4px solid #CCFBF1;
    border-top-color: var(--teal);
    border-radius: 999px;
    animation: contabox-spin 0.8s linear infinite;
}

.global-loading-card strong {
    display: block;
    margin-top: 16px;
    color: var(--night);
    font-size: 18px;
    font-weight: 800;
}

.global-loading-card p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

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

.app-page:has(.app-sidebar:hover),
.app-page:has(.app-sidebar:focus-within) {
    grid-template-columns: 260px minmax(0, 1fr);
}

.app-sidebar {
    position: sticky;
    top: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 18px 12px;
    background: var(--night);
    color: var(--white);
    overflow: hidden;
}

.app-wordmark {
    min-height: 46px;
    padding: 0 4px;
    color: var(--white);
}

.app-wordmark span,
.nav-label {
    opacity: 0;
    white-space: nowrap;
    transition: opacity 140ms ease;
}

.app-sidebar:hover .app-wordmark span,
.app-sidebar:focus-within .app-wordmark span,
.app-sidebar:hover .nav-label,
.app-sidebar:focus-within .nav-label {
    opacity: 1;
}

.app-nav {
    display: grid;
    gap: 8px;
}

.app-nav a,
.logout-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 16px;
    padding: 0 13px;
    color: #C9D5E6;
    font-size: 14px;
    font-weight: 600;
}

.app-nav svg,
.logout-link svg,
.mobile-bottom-nav svg {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    fill: currentColor;
}

.app-nav a.active,
.app-nav a:hover {
    background: rgba(20, 184, 166, 0.16);
    color: #DDFCF8;
}

.logout-link {
    margin-top: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-bottom-nav {
    display: none;
}

.app-main {
    padding: clamp(22px, 3vw, 34px) clamp(18px, 3.4vw, 42px);
}

.app-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.app-header h1 {
    margin-bottom: 7px;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.08;
}

.app-header.compact h1 {
    font-size: clamp(26px, 2.6vw, 38px);
}

.app-header p:not(.eyebrow) {
    max-width: 640px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

.subscription-pill {
    min-width: 220px;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 14px;
    background: var(--white);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.05);
}

.subscription-pill.trial {
    border-color: rgba(20, 184, 166, 0.38);
    background: #F0FDFA;
}

.subscription-pill span,
.subscription-pill strong {
    display: block;
}

.subscription-pill span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.subscription-pill strong {
    margin-top: 6px;
    color: var(--night);
    font-size: 18px;
}

.app-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.app-metrics article,
.app-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.05);
}

.app-metrics article {
    min-height: 116px;
    padding: 18px;
}

.app-metrics span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-metrics strong {
    display: block;
    margin-top: 18px;
    color: var(--teal);
    font-size: 28px;
}

.app-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.app-panel {
    min-height: 240px;
    padding: 24px;
}

.app-panel.dark {
    color: var(--white);
    background: var(--night);
    border-color: var(--night);
}

.panel-title span {
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--teal);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.panel-title h2 {
    font-size: clamp(22px, 2.1vw, 28px);
    line-height: 1.12;
}

.app-panel p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.app-panel.dark p {
    color: #D5DFEC;
}

.admin-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    background: var(--white);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.05);
}

.admin-panel + .admin-panel {
    margin-top: 16px;
}

.admin-flash {
    margin: 0 0 16px;
    border-radius: 18px;
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.admin-flash p {
    margin: 0;
}

.admin-flash.success {
    border: 1px solid rgba(20, 184, 166, 0.25);
    background: #F0FDFA;
    color: #0F766E;
}

.admin-flash.error {
    border: 1px solid rgba(220, 38, 38, 0.18);
    background: #FEF2F2;
    color: #991B1B;
}

.impersonation-panel {
    display: none;
    gap: 8px;
    margin-top: 12px;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 8px;
    padding: 10px;
    background: rgba(255, 251, 235, 0.98);
    color: #78350F;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.35;
}

.app-sidebar:hover .impersonation-panel,
.app-sidebar:focus-within .impersonation-panel {
    display: grid;
}

.impersonation-panel span {
    max-height: 48px;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.impersonation-panel form,
.mobile-impersonation-exit {
    margin: 0;
}

.impersonation-panel button,
.mobile-impersonation-exit button {
    min-height: 32px;
    width: 100%;
    border: 0;
    border-radius: 8px;
    padding: 0 10px;
    background: #0F766E;
    color: var(--white);
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.mobile-impersonation-exit {
    display: none;
}

.admin-metrics strong {
    color: var(--teal);
}

.admin-table {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.admin-table-head,
.admin-table article {
    display: grid;
    grid-template-columns: minmax(240px, 1.35fr) minmax(150px, 0.7fr) minmax(180px, 0.8fr) minmax(170px, 0.7fr);
    gap: 14px;
    align-items: center;
}

.admin-table-head {
    padding: 0 14px 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-table article {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    background: #F8FAFC;
}

.admin-table strong,
.admin-users-grid strong {
    display: block;
    color: var(--night);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.admin-table p,
.admin-table small,
.admin-table article > div > span:not(.admin-status),
.admin-users-grid span,
.admin-users-grid p,
.admin-users-grid small {
    display: block;
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.admin-account-cell small {
    color: #0F766E;
    font-weight: 600;
}

.admin-status {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border-radius: var(--pill);
    padding: 0 10px;
    background: #F1F5F9;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

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

.admin-status.trialing {
    background: #F0FDFA;
    color: #0F766E;
}

.admin-status.new {
    background: #DBEAFE;
    color: #1E40AF;
}

.admin-status.past_due {
    background: #FEF3C7;
    color: #92400E;
}

.admin-status.canceled,
.admin-status.inactive {
    background: #FEE2E2;
    color: #991B1B;
}

.admin-users-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.admin-users-grid article {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    background: #F8FAFC;
}

.admin-inline-action {
    min-height: 34px;
    margin-top: 10px;
    border: 0;
    border-radius: var(--pill);
    padding: 0 14px;
    background: var(--teal);
    color: var(--white);
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

.admin-inline-action:hover {
    background: #0F766E;
}

.sat-access-switch {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.sat-access-switch label {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    row-gap: 2px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px;
    background: #F8FAFC;
    cursor: pointer;
}

.sat-access-switch input {
    margin-top: 3px;
    accent-color: var(--teal);
}

.sat-access-switch strong,
.sat-access-switch span {
    grid-column: 2;
}

.sat-access-switch strong {
    color: var(--night);
    font-size: 13px;
    font-weight: 700;
}

.sat-access-switch span,
.sat-access-panel p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.sat-access-panel {
    display: none;
    margin-bottom: 14px;
}

.sat-access-panel.active {
    display: block;
}

.sat-access-panel label,
.ciec-inline-form label {
    display: grid;
    gap: 8px;
    color: var(--night);
    font-size: 13px;
    font-weight: 650;
}

.sat-access-panel input[type="password"],
.ciec-inline-form input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 14px;
    color: var(--night);
    font: inherit;
}

.access-status-grid,
.fiscal-detail-lists {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.fiscal-detail-lists {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 16px;
}

.fiscal-document-actions {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.fiscal-document-actions article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid rgba(20, 184, 166, 0.22);
    border-radius: 24px;
    padding: 16px;
    background:
        radial-gradient(circle at 12% 22%, rgba(20, 184, 166, 0.12), transparent 30%),
        linear-gradient(135deg, #F8FAFC 0%, #FFFFFF 100%);
}

.fiscal-document-actions span {
    display: block;
    margin-bottom: 6px;
    color: #0F766E;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fiscal-document-actions h3 {
    margin: 0 0 6px;
    color: var(--night);
    font-size: 17px;
    font-weight: 650;
}

.fiscal-document-actions p,
.fiscal-document-actions small {
    display: block;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.fiscal-document-actions small {
    margin-top: 6px;
}

.fiscal-document-actions form {
    flex: 0 0 auto;
}

.fiscal-document-actions.compact {
    margin-top: 4px;
}

.fiscal-document-actions.compact article {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.fiscal-document-actions.compact form,
.fiscal-document-actions.compact .app-button {
    width: fit-content;
}

.opinion-assisted-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.opinion-upload-form {
    display: grid;
    gap: 10px;
}

.opinion-upload-form .integrated-file {
    min-height: 96px;
}

.integrated-file.compact-file {
    border-radius: 20px;
    padding: 14px;
}

.fiscal-detail-lists article {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    background: #F8FAFC;
}

.fiscal-detail-lists h3 {
    margin: 0 0 10px;
    color: var(--night);
    font-size: 14px;
}

.fiscal-detail-lists p,
.fiscal-detail-lists li {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.fiscal-detail-lists ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 16px;
}

.ciec-inline-form {
    display: grid;
    gap: 10px;
    width: 100%;
}

.client-onboarding-page {
    max-width: 1180px;
}

.client-wizard {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.wizard-rail {
    position: sticky;
    top: 24px;
    display: grid;
    gap: 10px;
}

.wizard-rail button {
    display: grid;
    grid-template-columns: 34px 1fr;
    column-gap: 10px;
    row-gap: 2px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 12px;
    background: var(--white);
    text-align: left;
    cursor: pointer;
}

.wizard-rail button span {
    width: 34px;
    height: 34px;
    grid-row: span 2;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #F1F5F9;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.wizard-rail button strong {
    color: var(--night);
    font-size: 13px;
    font-weight: 750;
}

.wizard-rail button small {
    color: var(--muted);
    font-size: 11px;
}

.wizard-rail button.active,
.wizard-rail button.done {
    border-color: rgba(20, 184, 166, 0.32);
    background: #F0FDFA;
}

.wizard-rail button.active span,
.wizard-rail button.done span {
    background: var(--teal);
    color: var(--white);
}

.wizard-stage {
    min-height: 560px;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: clamp(18px, 3vw, 30px);
    background:
        radial-gradient(circle at 90% 8%, rgba(20, 184, 166, 0.12), transparent 28%),
        linear-gradient(180deg, #FFFFFF, #F8FAFC);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.wizard-slide {
    display: none;
    gap: 20px;
}

.wizard-slide.active {
    display: grid;
}

.wizard-copy {
    max-width: 680px;
}

.wizard-copy span {
    color: var(--teal);
    font-size: 12px;
    font-weight: 750;
}

.wizard-copy h2 {
    margin: 6px 0 8px;
    color: var(--night);
    font-size: clamp(24px, 4vw, 42px);
    line-height: 1;
    letter-spacing: 0;
}

.wizard-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.rfc-entry {
    display: grid;
    gap: 10px;
    max-width: 620px;
    color: var(--night);
    font-size: 13px;
    font-weight: 750;
}

.rfc-entry input {
    min-height: 76px;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 0 22px;
    background: var(--white);
    color: var(--night);
    font: inherit;
    font-size: clamp(24px, 5vw, 42px);
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.rfc-entry input:focus,
.rfc-entry input.field-error {
    outline: 4px solid rgba(20, 184, 166, 0.16);
    border-color: var(--teal);
}

.rfc-entry input.field-error {
    outline-color: rgba(220, 38, 38, 0.16);
    border-color: #DC2626;
}

.wizard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 4px;
}

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

.sat-method-cards label {
    min-height: 190px;
    display: grid;
    align-content: start;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 18px;
    background: var(--white);
    cursor: pointer;
}

.sat-method-cards label.active {
    border-color: rgba(20, 184, 166, 0.5);
    background: #F0FDFA;
    box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.18);
}

.sat-method-cards input {
    width: 18px;
    height: 18px;
    accent-color: var(--teal);
}

.sat-method-cards span {
    width: fit-content;
    border-radius: var(--pill);
    padding: 6px 10px;
    background: #E2E8F0;
    color: var(--night);
    font-size: 11px;
    font-weight: 800;
}

.sat-method-cards label.active span {
    background: var(--teal);
    color: var(--white);
}

.sat-method-cards strong {
    color: var(--night);
    font-size: 18px;
    line-height: 1.15;
}

.sat-method-cards p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.credential-panels {
    display: grid;
}

.automatic-csf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 14px;
}

.automatic-csf-actions .app-button {
    margin-top: 0;
}

.automatic-csf-actions p,
.csf-status {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.csf-status.loading {
    color: #0F766E;
}

.csf-status.success {
    color: #047857;
}

.csf-status.error {
    color: #B91C1C;
}

.csf-modal[hidden] {
    display: none;
}

.csf-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 18px;
}

.csf-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(10px);
}

.csf-modal-panel {
    position: relative;
    width: min(620px, 100%);
    max-height: calc(100vh - 36px);
    display: grid;
    justify-items: center;
    gap: 12px;
    border: 1px solid rgba(20, 184, 166, 0.24);
    border-radius: 30px;
    padding: 30px 24px;
    background:
        radial-gradient(circle at 50% 0%, rgba(20, 184, 166, 0.16), transparent 46%),
        #FFFFFF;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
    text-align: center;
}

.csf-modal-log {
    width: 100%;
    max-height: 220px;
    overflow: auto;
    margin: 4px 0 0;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    padding: 12px;
    background: #0F172A;
    color: #CCFBF1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
    line-height: 1.45;
    text-align: left;
    white-space: pre-wrap;
}

.csf-modal-close {
    margin-top: 2px;
}

.csf-spinner {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 4px solid #D1FAE5;
    border-top-color: var(--teal);
    animation: csf-spin 0.8s linear infinite;
}

.csf-modal-panel p {
    margin: 4px 0 0;
    color: var(--teal);
    font-size: 12px;
    font-weight: 800;
}

.csf-modal-panel h2 {
    margin: 0;
    color: var(--night);
    font-size: clamp(24px, 5vw, 34px);
    line-height: 1;
}

.csf-modal-panel span {
    max-width: 320px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

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

.manual-tax-details {
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 14px;
    background: var(--white);
}

.manual-tax-details summary {
    color: var(--night);
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
}

.manual-tax-details .form-grid {
    margin-top: 16px;
}

.initial-sync-field {
    display: grid;
    gap: 12px;
    border: 1px solid rgba(20, 184, 166, 0.24);
    border-radius: 22px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(240, 253, 250, 0.96), rgba(255, 255, 255, 0.98));
}

.initial-sync-field > div {
    display: grid;
    gap: 4px;
}

.initial-sync-field span,
.initial-sync-lock-content > span {
    color: var(--teal-strong);
    font-size: 12px;
    font-weight: 750;
}

.initial-sync-field strong {
    color: var(--night);
    font-size: 16px;
}

.initial-sync-field p,
.initial-sync-field small {
    color: var(--muted);
    line-height: 1.5;
}

.initial-sync-field label {
    display: grid;
    gap: 8px;
    color: var(--night);
    font-size: 13px;
    font-weight: 700;
}

.initial-sync-field input {
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 14px;
    color: var(--night);
    font: inherit;
}

.app-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    border-radius: var(--pill);
    padding: 0 16px;
    background: var(--teal);
    color: var(--night);
    font-weight: 700;
    font-size: 14px;
}

.app-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.2);
}

.app-button.ghost {
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--night);
}

.data-panel,
.form-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.05);
}

.data-panel {
    padding: 10px;
}

.empty-state {
    min-height: 280px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 24px;
}

.empty-state h2 {
    max-width: 520px;
    font-size: clamp(24px, 3vw, 30px);
    line-height: 1.15;
}

.empty-state p {
    max-width: 520px;
    color: var(--muted);
    line-height: 1.6;
}

.client-list {
    display: grid;
    gap: 10px;
}

.client-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.client-header-actions .app-button {
    margin-top: 0;
}

.client-search-minimal {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: var(--pill);
    padding: 0 14px;
    background: var(--white);
}

.client-search-minimal span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.client-search-minimal input {
    width: min(26vw, 220px);
    border: 0;
    background: transparent;
    color: var(--night);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
}

.client-search-minimal input:focus {
    outline: 0;
}

.client-row {
    display: grid;
    grid-template-columns: minmax(240px, 1.2fr) minmax(180px, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-height: 82px;
    border-radius: 16px;
    padding: 16px;
    background: #F8FAFC;
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.client-row:hover {
    transform: translateY(-1px);
    background: #F0FDFA;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.client-row strong,
.client-row span,
.client-row p {
    display: block;
}

.client-identity {
    display: flex;
    align-items: center;
    min-width: 0;
}

.client-row strong {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.client-row small {
    display: block;
    margin-top: 5px;
    color: var(--teal);
    font-size: 13px;
    font-weight: 600;
}

.client-row > div:not(.client-identity) > span,
.client-status-tags span {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.client-row p {
    margin: 0;
    color: var(--night);
    font-weight: 500;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.client-status-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.client-status-tags span {
    margin: 0;
    border-radius: var(--pill);
    padding: 7px 10px;
    letter-spacing: 0;
    font-weight: 600;
    text-transform: none;
}

.client-status-tags .tag-ready {
    background: rgba(20, 184, 166, 0.14);
    color: #0F766E;
}

.client-status-tags .tag-pending {
    background: #F1F5F9;
    color: #64748B;
}

.filter-empty {
    margin-top: 10px;
    border: 1px dashed var(--line);
    border-radius: 18px;
    padding: 28px;
    background: #F8FAFC;
    text-align: center;
}

.filter-empty h2 {
    font-size: 22px;
}

.filter-empty p {
    color: var(--muted);
}

.client-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 16px;
    align-items: start;
}

.client-profile {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 16px;
    align-items: stretch;
    margin-bottom: 16px;
}

.client-tabs-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 10px;
    align-items: stretch;
    margin-bottom: 16px;
}

.client-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: var(--pill);
    padding: 6px;
    background: #F8FAFC;
}

.client-tabs button {
    min-height: 38px;
    flex: 1 1 180px;
    border: 0;
    border-radius: var(--pill);
    padding: 0 14px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.client-tabs button.active {
    background: var(--white);
    color: var(--night);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.request-drawer-toggle {
    width: 44px;
    min-height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    color: var(--teal);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    cursor: pointer;
}

.request-drawer-toggle svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.client-tab-panel {
    display: none;
}

.client-tab-panel.active {
    display: grid;
    gap: 16px;
}

.monthly-control-panel,
.client-sync-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    background: var(--white);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.05);
}

.monthly-control-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.monthly-control-panel span {
    display: block;
    color: var(--teal);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.monthly-control-panel h2 {
    margin: 6px 0 0;
    color: var(--night);
    font-size: clamp(24px, 2.4vw, 32px);
    line-height: 1.1;
}

.period-status-badge {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    border-radius: var(--pill);
    padding: 0 10px;
    background: #ECFEFF;
    color: #0F766E;
    font-size: 11px;
    font-style: normal;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.period-status-badge.closed {
    background: #EFF6FF;
    color: #1E3A8A;
}

.period-status-badge.presented {
    background: #DCFCE7;
    color: #166534;
}

.period-status-badge.in_review {
    background: #FEF3C7;
    color: #92400E;
}

.monthly-control-panel p,
.client-sync-panel p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.period-control-stack {
    display: grid;
    justify-items: end;
    gap: 10px;
}

.month-picker {
    display: flex;
    align-items: end;
    gap: 10px;
}

.month-picker label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.month-picker input {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 12px;
    color: var(--night);
    font: inherit;
}

.month-picker .app-button {
    margin-top: 0;
}

.period-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.period-actions form {
    margin: 0;
}

.period-actions button,
.period-actions span {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(20, 184, 166, 0.28);
    border-radius: var(--pill);
    padding: 0 12px;
    background: #F0FDFA;
    color: #0F766E;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
}

.period-actions button {
    cursor: pointer;
}

.period-actions button.ghost {
    border-color: var(--line);
    background: var(--white);
    color: var(--muted);
}

.client-month-groups {
    display: grid;
    gap: 12px;
}

.client-month-group-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.client-month-group-tabs a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: var(--pill);
    padding: 0 16px;
    background: var(--white);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.client-month-group-tabs a.active {
    border-color: rgba(20, 184, 166, 0.55);
    background: #CCFBF1;
    color: var(--night);
}

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

.client-month-grid article {
    position: relative;
    min-height: 140px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    background: var(--white);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.05);
}

.client-month-grid article.active {
    border-color: rgba(20, 184, 166, 0.55);
    background: #F0FDFA;
}

.month-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.month-card-top a {
    min-width: 0;
}

.month-card-xml-link {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(20, 184, 166, 0.28);
    border-radius: 999px;
    background: #F0FDFA;
    color: #0F766E;
}

.month-card-xml-link svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.month-card-xml-link:hover {
    border-color: rgba(20, 184, 166, 0.6);
    background: #CCFBF1;
}

.client-month-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.month-card-body {
    display: block;
}

.month-card-summary {
    display: block;
    color: inherit;
    text-decoration: none;
}

.client-month-grid strong {
    display: block;
    margin-top: 16px;
    color: var(--teal);
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1;
}

.client-month-grid p {
    margin: 12px 0 0;
    color: var(--night);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.month-card-total {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 10px;
    color: inherit;
    text-decoration: none;
}

.month-card-total span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
}

.month-card-total b {
    color: var(--night);
    font-size: 14px;
    font-weight: 850;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.month-card-breakdown-toggle {
    width: 100%;
    min-height: 32px;
    margin-top: 10px;
    border: 1px solid rgba(20, 184, 166, 0.32);
    border-radius: var(--pill);
    background: #F0FDFA;
    color: var(--night);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.month-card-breakdown {
    display: grid;
    gap: 6px;
    margin-top: 12px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 10px;
}

.month-card-breakdown[hidden] {
    display: none;
}

.month-card-breakdown div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
}

.month-card-breakdown span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.25;
}

.month-card-breakdown b {
    color: var(--night);
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.month-card-breakdown-total {
    margin-top: 4px;
    border-top: 1px solid rgba(15, 23, 42, 0.12);
    padding-top: 8px;
}

.month-card-breakdown-total span,
.month-card-breakdown-total b {
    color: var(--night);
    font-weight: 900;
}

.client-month-grid small {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}

.payables-filter-panel,
.payables-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.05);
}

.payables-filter-panel {
    margin-bottom: 14px;
    padding: 16px;
}

.payables-filter-panel form {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px auto;
    align-items: end;
    gap: 12px;
}

.payables-filter-panel label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.payables-filter-panel select,
.payables-filter-panel input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 12px;
    background: #F8FAFC;
    color: var(--night);
    font: inherit;
}

.xml-filter-panel form {
    grid-template-columns: minmax(240px, 1fr) auto auto;
}

.xml-documents-panel .panel-title {
    margin-bottom: 14px;
}

.xml-excel-table {
    min-width: 1840px;
}

.payables-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.payables-summary-grid article,
.payables-total-card {
    min-height: 126px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    background: var(--white);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.05);
}

.payables-total-card {
    display: block;
    color: inherit;
    cursor: pointer;
}

.payables-total-card:hover {
    border-color: rgba(20, 184, 166, 0.5);
    transform: translateY(-1px);
}

.payables-summary-grid span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.payables-summary-grid strong {
    display: block;
    margin-top: 16px;
    color: var(--teal);
    font-size: 28px;
    line-height: 1;
}

.payables-summary-grid p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.payables-card-breakdown {
    display: grid;
    gap: 6px;
    margin-top: 14px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 10px;
}

.payables-card-breakdown div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.payables-summary-grid .payables-card-breakdown span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0;
    line-height: 1.25;
    text-transform: none;
}

.payables-card-breakdown b {
    color: var(--night);
    font-size: 12px;
    font-weight: 900;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.payables-card-total {
    margin-top: 4px;
    border-top: 1px solid rgba(15, 23, 42, 0.12);
    padding-top: 8px;
}

.payables-summary-grid .payables-card-total span,
.payables-card-total b {
    color: var(--night);
    font-weight: 900;
}

.payables-card-action {
    display: block;
    margin-top: 12px;
    color: #0F766E;
    font-size: 12px;
    font-weight: 800;
}

.payables-panel {
    margin-bottom: 14px;
    padding: 18px;
}

.payables-list,
.payables-provider-list {
    display: grid;
    gap: 10px;
}

.payables-list article,
.payables-provider-list article {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 180px 230px;
    align-items: start;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    background: #F8FAFC;
}

.payables-provider-list article {
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1.1fr) auto;
    align-items: center;
}

.payables-provider-list article:has(.payable-pending-pill) {
    border-color: rgba(220, 38, 38, 0.28);
    background: #FEF2F2;
}

.payable-main > span,
.payable-main small,
.payable-provider-main > span,
.payable-provider-main p,
.payable-status p,
.payable-amounts span,
.payable-provider-amounts span {
    color: var(--muted);
    font-size: 12px;
}

.payable-main strong,
.payable-provider-main strong {
    display: block;
    margin-top: 5px;
    color: var(--night);
    font-size: 16px;
    line-height: 1.25;
}

.payable-main p,
.payable-provider-main p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.payable-pending-pill {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    margin-top: 10px;
    border-radius: var(--pill);
    padding: 0 10px;
    background: #FEE2E2;
    color: #B91C1C;
    font-size: 11px;
    font-weight: 900;
}

.payable-main small {
    display: block;
    margin-top: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    overflow-wrap: anywhere;
}

.payable-status {
    display: grid;
    justify-items: start;
    gap: 9px;
}

.payable-status p {
    margin: 0;
    line-height: 1.4;
}

.payable-amounts,
.payable-provider-amounts {
    display: grid;
    gap: 7px;
}

.payable-provider-amounts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.payable-amounts div,
.payable-provider-amounts div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.payable-provider-amounts div {
    grid-template-columns: 1fr;
    gap: 4px;
}

.payable-amounts strong,
.payable-provider-amounts strong {
    color: var(--night);
    font-size: 14px;
    font-weight: 900;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.payable-provider-amounts strong {
    text-align: left;
}

.payable-provider-actions {
    display: flex;
    justify-content: flex-end;
}

.payable-provider-actions .app-button {
    min-height: 38px;
    border: 1px solid var(--line);
    padding: 0 14px;
    background: var(--white);
    white-space: nowrap;
    cursor: pointer;
}

.payable-detail-page-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.payable-detail-page-summary article {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    background: var(--white);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.05);
}

.payable-detail-page-summary article.pending {
    border-color: rgba(220, 38, 38, 0.28);
    background: #FEF2F2;
}

.payable-detail-page-summary span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.payable-detail-page-summary strong {
    display: block;
    margin-top: 14px;
    color: var(--teal);
    font-size: 24px;
    font-variant-numeric: tabular-nums;
}

.payable-excel-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
}

.payable-excel-table {
    width: 100%;
    min-width: 1320px;
    border-collapse: collapse;
    color: var(--night);
    font-size: 12px;
}

.payable-excel-table th,
.payable-excel-table td {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 9px 10px;
    text-align: left;
    vertical-align: middle;
}

.payable-excel-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #E2E8F0;
    color: #334155;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.payable-excel-table tr.has-pending td {
    background: #FEF2F2;
}

.payable-excel-table tbody tr:hover td {
    background: #F0FDFA;
}

.payable-excel-table th:last-child,
.payable-excel-table td:last-child {
    border-right: 0;
}

.payable-excel-table tbody tr:last-child td {
    border-bottom: 0;
}

.uuid-cell {
    max-width: 300px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    overflow-wrap: anywhere;
}

.amount-cell {
    text-align: right;
    white-space: nowrap;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.payment-cell {
    min-width: 240px;
}

.payment-relation-list {
    display: grid;
    gap: 8px;
}

.payment-relation-item {
    display: grid;
    gap: 4px;
}

.payment-relation-item span,
.payment-relation-item small,
.payment-empty {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.payment-relation-item strong {
    color: var(--night);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.table-actions {
    display: flex;
    gap: 6px;
}

.table-actions.compact {
    gap: 4px;
}

.table-actions a {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(20, 184, 166, 0.28);
    border-radius: var(--pill);
    padding: 0 9px;
    background: #F0FDFA;
    color: #0F766E;
    font-size: 11px;
    font-weight: 800;
}

.payable-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.payable-pagination a,
.payable-pagination span {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--pill);
    padding: 0 13px;
    background: var(--white);
    color: var(--night);
    font-size: 12px;
    font-weight: 800;
}

.payable-pagination span {
    color: var(--muted);
}

.payable-pagination a.disabled {
    color: #94A3B8;
    pointer-events: none;
}

.client-sync-panel form {
    margin-top: 14px;
}

.sync-scope-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.sync-scope-grid label {
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px;
    background: #F8FAFC;
    color: var(--night);
    font-size: 13px;
    font-weight: 600;
}

.sync-scope-grid input {
    width: 18px;
    height: 18px;
    accent-color: var(--teal);
}

.client-request-list article {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
    align-items: start;
}

.request-drawer {
    position: fixed;
    inset: 0;
    z-index: 80;
    pointer-events: none;
}

.request-drawer.open {
    pointer-events: auto;
}

.request-drawer-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    background: rgba(15, 23, 42, 0);
    transition: background 180ms ease;
}

.request-drawer.open .request-drawer-backdrop {
    background: rgba(15, 23, 42, 0.26);
}

.request-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(430px, 100%);
    height: 100%;
    display: grid;
    align-content: start;
    gap: 14px;
    overflow-y: auto;
    border-left: 1px solid var(--line);
    padding: 22px;
    background: var(--white);
    box-shadow: -28px 0 60px rgba(15, 23, 42, 0.16);
    transform: translateX(100%);
    transition: transform 180ms ease;
}

.request-drawer.open .request-drawer-panel {
    transform: translateX(0);
}

.request-drawer-panel header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.request-drawer-panel header span {
    display: block;
    color: var(--teal);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.request-drawer-panel header h2 {
    margin: 6px 0 0;
    font-size: 22px;
    line-height: 1.1;
}

.request-drawer-panel header button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #F8FAFC;
    color: var(--night);
    cursor: pointer;
}

.request-drawer-panel header svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.drawer-sync-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(20, 184, 166, 0.26);
    border-radius: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #F0FDFA 0%, #FFFFFF 72%);
}

.drawer-sync-form span {
    display: block;
    color: var(--teal);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.drawer-sync-form p {
    margin: 5px 0 0;
    color: var(--night);
    font-size: 13px;
    font-weight: 550;
    line-height: 1.4;
}

.drawer-sync-form button {
    min-height: 38px;
    border: 0;
    border-radius: var(--pill);
    padding: 0 16px;
    background: var(--teal);
    color: var(--white);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.drawer-sync-form button:disabled {
    background: #E2E8F0;
    color: #64748B;
    cursor: not-allowed;
}

.drawer-status-message {
    border: 1px solid rgba(20, 184, 166, 0.28);
    border-radius: 14px;
    padding: 10px 12px;
    background: #F0FDFA;
    color: #0F766E;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.4;
}

.drawer-status-message.error {
    border-color: #FCA5A5;
    background: #FEF2F2;
    color: #991B1B;
}

.client-documents-panel {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    background: var(--white);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.05);
}

.client-documents-panel.is-loading {
    opacity: 0.58;
    pointer-events: none;
}

.client-documents-panel.is-loading::after {
    content: "Actualizando detalle...";
    position: absolute;
    top: 14px;
    right: 14px;
    border-radius: var(--pill);
    padding: 7px 11px;
    background: #CCFBF1;
    color: var(--night);
    font-size: 11px;
    font-weight: 700;
}

.document-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.document-classification-block {
    margin-top: 20px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.document-list article {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(190px, 0.8fr) minmax(220px, 0.9fr);
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    background: #F8FAFC;
}

.document-main,
.document-amounts,
.tax-breakdown {
    min-width: 0;
}

.document-main span,
.document-amounts span,
.tax-breakdown span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.document-main strong {
    display: block;
    margin-top: 8px;
    color: var(--night);
    font-size: 15px;
    font-weight: 650;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.document-main p,
.document-main small,
.document-amounts p,
.tax-breakdown p {
    display: block;
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.related-uuid-list {
    display: grid;
    gap: 4px;
    margin-top: 8px;
    border-left: 2px solid rgba(20, 184, 166, 0.35);
    padding-left: 9px;
}

.related-uuid-list span {
    color: #0F766E;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.related-uuid-list small {
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.document-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.document-actions a {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(20, 184, 166, 0.28);
    border-radius: var(--pill);
    padding: 0 11px;
    background: #F0FDFA;
    color: #0F766E;
    font-size: 12px;
    font-weight: 650;
}

.document-actions.compact {
    margin-top: 9px;
}

.document-actions.compact a {
    min-height: 28px;
    padding: 0 10px;
    font-size: 11px;
}

.document-amounts strong {
    display: block;
    margin-top: 8px;
    color: var(--night);
    font-size: 20px;
    font-weight: 700;
}

.payment-link-status {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: var(--pill);
    padding: 0 10px;
    background: #F1F5F9;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
}

.payment-link-status.paid {
    background: #DCFCE7;
    color: #166534;
}

.payment-link-status.partial {
    background: #FEF3C7;
    color: #92400E;
}

.payment-link-status.pending {
    background: #FEE2E2;
    color: #991B1B;
}

.tax-breakdown {
    display: grid;
    gap: 5px;
}

.tax-breakdown p {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
}

.tax-breakdown p:first-of-type {
    margin-top: 8px;
}

.tax-breakdown strong {
    color: var(--night);
    font-weight: 650;
    white-space: nowrap;
}

.review-summary-grid,
.review-balance-grid {
    display: grid;
    gap: 12px;
}

.review-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.review-balance-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.review-summary-grid article,
.review-balance-grid article,
.review-workbench {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.05);
}

.review-summary-grid article,
.review-balance-grid article {
    min-height: 118px;
    padding: 16px;
}

.review-summary-grid span,
.review-balance-grid span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.review-summary-grid strong,
.review-balance-grid strong {
    display: block;
    margin-top: 14px;
    color: var(--teal);
    font-size: clamp(22px, 2.6vw, 30px);
    line-height: 1.05;
}

.review-balance-grid p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.review-workbench {
    padding: 18px;
}

.review-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.review-filter-select {
    min-width: 210px;
    display: grid;
    gap: 6px;
}

.review-filter-select span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.review-filter-select select {
    width: 100%;
    min-height: 42px;
    appearance: none;
    border: 1px solid rgba(20, 184, 166, 0.32);
    border-radius: 16px;
    padding: 0 40px 0 14px;
    background:
        linear-gradient(45deg, transparent 50%, #0F766E 50%) calc(100% - 18px) 18px / 6px 6px no-repeat,
        linear-gradient(135deg, #0F766E 50%, transparent 50%) calc(100% - 12px) 18px / 6px 6px no-repeat,
        linear-gradient(180deg, #FFFFFF 0%, #F0FDFA 100%);
    color: var(--night);
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.review-tax-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 16px;
}

.review-tax-strip span {
    border-radius: var(--pill);
    padding: 8px 10px;
    background: #F0FDFA;
    color: #0F766E;
    font-size: 12px;
    font-weight: 650;
}

.monthly-review-table {
    display: grid;
    gap: 8px;
}

.monthly-review-table-head,
.monthly-review-table article {
    display: grid;
    grid-template-columns: 72px minmax(240px, 1.4fr) minmax(130px, 0.6fr) minmax(160px, 0.7fr) minmax(180px, 0.8fr);
    gap: 12px;
    align-items: center;
}

.monthly-review-table-head {
    padding: 0 12px 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.monthly-review-table article {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px;
    background: #F8FAFC;
}

.monthly-review-table article.is-hidden {
    display: none;
}

.review-check {
    display: grid;
    place-items: center;
}

.review-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--teal);
}

.review-doc-main span,
.monthly-review-table article p {
    display: block;
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.review-doc-main span {
    margin-top: 0;
    font-weight: 650;
}

.review-doc-main strong,
.review-amount-cell strong {
    display: block;
    margin-top: 6px;
    color: var(--night);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.review-payment {
    width: fit-content;
    border-radius: var(--pill);
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 650;
}

.review-payment.paid {
    background: rgba(20, 184, 166, 0.14);
    color: #0F766E;
}

.review-payment.pending {
    background: #FEF3C7;
    color: #92400E;
}

.review-payment.partial {
    background: #DBEAFE;
    color: #1E3A8A;
}

.review-note input {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 12px;
    background: var(--white);
    color: var(--night);
    font: inherit;
    font-size: 13px;
}

.cfdi-document-page {
    min-height: 100vh;
    background: #F8FAFC;
    color: var(--night);
    font-family: "Inter", Arial, sans-serif;
    letter-spacing: 0;
}

.cfdi-document-shell {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 56px;
}

.cfdi-document-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.cfdi-document-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--night);
    font-size: 18px;
    font-weight: 800;
}

.cfdi-document-brand img {
    width: 148px;
    height: auto;
}

.cfdi-document-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.cfdi-document-actions a,
.cfdi-document-actions button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(20, 184, 166, 0.28);
    border-radius: var(--pill);
    padding: 0 14px;
    background: var(--white);
    color: #0F766E;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
}

.cfdi-document-actions button {
    border-color: var(--teal);
    background: var(--teal);
    color: var(--night);
}

.cfdi-document-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: clamp(20px, 4vw, 38px);
    background:
        linear-gradient(90deg, rgba(20, 184, 166, 0.08), transparent 28%),
        var(--white);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.cfdi-document-card:before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 8px;
    background: linear-gradient(90deg, var(--teal), #2DD4BF, rgba(30, 58, 138, 0.92));
}

.cfdi-report-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin: 4px 0 22px;
}

.cfdi-report-header img {
    width: 172px;
    height: auto;
    display: block;
}

.cfdi-report-header p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.cfdi-report-status {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.cfdi-report-status span {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(20, 184, 166, 0.3);
    border-radius: var(--pill);
    padding: 0 10px;
    background: #F0FDFA;
    color: #0F766E;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cfdi-xml-warning {
    max-width: 520px;
    margin: 12px 0 0;
    color: #92400E;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.cfdi-report-id {
    min-width: 230px;
    display: grid;
    grid-template-columns: 1fr 0.7fr;
    gap: 8px;
}

.cfdi-report-id div {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 13px 14px;
    background: rgba(248, 250, 252, 0.86);
    text-align: right;
}

.cfdi-report-header span,
.cfdi-report-footer span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cfdi-report-header strong {
    display: block;
    margin-top: 8px;
    color: var(--night);
    font-size: 14px;
    font-weight: 650;
}

.cfdi-document-hero {
    position: relative;
    z-index: 1;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    border-radius: 24px;
    padding: clamp(18px, 3vw, 28px);
    background:
        radial-gradient(circle at 84% 18%, rgba(20, 184, 166, 0.2), transparent 28%),
        linear-gradient(135deg, #0F172A, #132341);
    color: var(--white);
}

.cfdi-document-hero:before {
    content: "";
    position: absolute;
    right: -72px;
    top: -86px;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(20, 184, 166, 0.24);
    border-radius: 58px;
    transform: rotate(22deg);
}

.cfdi-document-hero > * {
    position: relative;
    z-index: 1;
}

.cfdi-document-hero span,
.cfdi-section-title span,
.cfdi-document-meta span,
.cfdi-party-grid span,
.cfdi-stamp-grid span,
.cfdi-document-total span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cfdi-document-hero span,
.cfdi-document-total span {
    color: #9FF7EA;
}

.cfdi-document-hero h1 {
    margin: 10px 0 8px;
    color: var(--white);
    font-size: clamp(34px, 6vw, 64px);
    line-height: 0.95;
}

.cfdi-document-hero p,
.cfdi-document-total p {
    margin: 0;
    color: #D5DFEC;
    overflow-wrap: anywhere;
}

.cfdi-document-total {
    min-width: min(260px, 100%);
    align-self: stretch;
    display: grid;
    align-content: center;
    justify-items: end;
    text-align: right;
}

.cfdi-document-total strong {
    display: block;
    margin-top: 10px;
    color: var(--teal);
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1;
}

.cfdi-summary-ribbon {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(170px, 0.8fr) minmax(120px, 0.5fr);
    gap: 1px;
    margin: -10px 18px 16px;
    overflow: hidden;
    border: 1px solid rgba(20, 184, 166, 0.22);
    border-radius: 18px;
    background: rgba(20, 184, 166, 0.22);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.cfdi-summary-ribbon div {
    min-width: 0;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.94);
}

.cfdi-summary-ribbon span {
    display: block;
    color: #0F766E;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cfdi-summary-ribbon strong {
    display: block;
    margin-top: 7px;
    color: var(--night);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.cfdi-document-meta,
.cfdi-party-grid,
.cfdi-document-bottom,
.cfdi-stamp-grid {
    display: grid;
    gap: 12px;
}

.cfdi-document-meta {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 14px;
}

.cfdi-document-meta article,
.cfdi-party-grid article,
.cfdi-tax-card,
.cfdi-totals-card,
.cfdi-stamp-panel,
.cfdi-stamp-grid article {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.92);
}

.cfdi-document-meta article {
    min-height: 82px;
    padding: 14px;
}

.cfdi-document-meta strong {
    display: block;
    margin-top: 10px;
    color: var(--night);
    font-size: 15px;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.cfdi-party-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 14px;
}

.cfdi-party-grid article {
    position: relative;
    padding: 18px;
}

.cfdi-party-grid article:before {
    content: "";
    position: absolute;
    left: 18px;
    top: 18px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--teal);
}

.cfdi-party-grid article span {
    padding-left: 18px;
}

.cfdi-party-grid h2 {
    margin: 12px 0 8px;
    font-size: clamp(18px, 2.4vw, 24px);
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.cfdi-party-grid p {
    margin: 0;
    color: var(--muted);
    font-weight: 650;
}

.cfdi-lines-section,
.cfdi-stamp-panel {
    margin-top: 18px;
}

.cfdi-section-title {
    margin-bottom: 12px;
}

.cfdi-section-title h2 {
    margin: 6px 0 0;
    font-size: 20px;
}

.cfdi-lines-table {
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: var(--white);
}

.cfdi-lines-head,
.cfdi-lines-table article {
    display: grid;
    grid-template-columns: 0.7fr 0.7fr minmax(260px, 1.8fr) 0.8fr 0.8fr;
    gap: 12px;
    align-items: center;
}

.cfdi-lines-head {
    padding: 12px 14px;
    background: #0F172A;
    color: #DDFCF8;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cfdi-lines-table article {
    padding: 14px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

.cfdi-lines-table article:nth-child(odd) {
    background: #FBFCFE;
}

.cfdi-lines-table article strong {
    color: var(--night);
    font-weight: 650;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.cfdi-empty-row {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    background: #F8FAFC;
    color: var(--muted);
}

.cfdi-document-bottom {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
    margin-top: 18px;
}

.cfdi-tax-card,
.cfdi-totals-card,
.cfdi-stamp-panel {
    padding: 18px;
}

.cfdi-tax-card dl,
.cfdi-totals-card dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.cfdi-tax-card div,
.cfdi-totals-card div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid var(--line);
    padding-top: 10px;
}

.cfdi-tax-card div:first-child,
.cfdi-totals-card div:first-child {
    border-top: 0;
    padding-top: 0;
}

.cfdi-tax-card dt,
.cfdi-totals-card dt {
    color: var(--muted);
    font-size: 13px;
}

.cfdi-tax-card dd,
.cfdi-totals-card dd {
    margin: 0;
    color: var(--night);
    font-size: 16px;
    font-weight: 700;
}

.cfdi-totals-card div:last-child dd {
    color: var(--teal);
    font-size: 24px;
}

.cfdi-totals-card {
    border-color: rgba(20, 184, 166, 0.26);
    background: linear-gradient(180deg, #F0FDFA 0%, #FFFFFF 100%);
}

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

.cfdi-stamp-grid article {
    padding: 14px;
}

.cfdi-stamp-grid strong {
    display: block;
    margin-top: 8px;
    color: var(--night);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.cfdi-report-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 24px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

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

.detail-grid div {
    min-height: 82px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    background: #F8FAFC;
}

.detail-grid dt {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.detail-grid dd {
    margin: 0;
    color: var(--night);
    font-weight: 500;
    line-height: 1.45;
}

.status-stack {
    display: grid;
    gap: 10px;
}

.status-stack p {
    margin: 0;
    color: var(--muted);
    font-weight: 500;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.status-stack .app-button {
    width: fit-content;
    margin-top: 4px;
}

.status-pill {
    width: fit-content;
    border-radius: var(--pill);
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-pill.ready {
    background: rgba(20, 184, 166, 0.14);
    color: #0F766E;
}

.status-pill.pending {
    background: #FEF3C7;
    color: #92400E;
}

.status-pill.warning {
    background: #DBEAFE;
    color: #1D4ED8;
}

.initial-sync-lock-panel {
    min-height: min(620px, calc(100vh - 190px));
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
    gap: 24px;
    align-items: stretch;
    border: 1px solid rgba(20, 184, 166, 0.22);
    border-radius: 30px;
    padding: 18px;
    background:
        radial-gradient(circle at 18% 20%, rgba(20, 184, 166, 0.18), transparent 34%),
        linear-gradient(135deg, #F8FAFC 0%, #FFFFFF 52%, #F0FDFA 100%);
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.08);
}

.initial-sync-lock-visual {
    position: relative;
    min-height: 280px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 24px;
    background:
        linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px),
        #0F172A;
    background-size: 28px 28px;
}

.initial-sync-lock-visual span {
    position: absolute;
    width: 170px;
    aspect-ratio: 1;
    border: 1px solid rgba(20, 184, 166, 0.42);
    border-radius: 999px;
    box-shadow: 0 0 70px rgba(20, 184, 166, 0.36);
}

.initial-sync-lock-visual strong {
    position: relative;
    color: var(--white);
    font-size: clamp(46px, 8vw, 82px);
    line-height: 1;
}

.initial-sync-lock-content {
    display: grid;
    align-content: center;
    gap: 16px;
    padding: clamp(12px, 2vw, 28px);
}

.initial-sync-lock-content h2 {
    max-width: 680px;
    color: var(--night);
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.05;
}

.initial-sync-lock-content p {
    max-width: 700px;
    color: var(--muted);
    line-height: 1.65;
}

.initial-sync-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.initial-sync-meta div {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    background: var(--white);
}

.initial-sync-meta small {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.initial-sync-meta strong {
    display: block;
    margin-top: 5px;
    color: var(--night);
    font-size: 14px;
}

.initial-sync-message {
    border: 1px solid rgba(20, 184, 166, 0.24);
    border-radius: 16px;
    padding: 12px 14px;
    background: #F0FDFA;
    color: #0F766E !important;
    font-weight: 650;
}

.initial-sync-progress {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #E5E7EB;
}

.initial-sync-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--teal);
    transition: width 0.3s ease;
}

.initial-sync-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.initial-sync-actions form {
    margin: 0;
}

.compact-form {
    margin-top: 16px;
}

.fiel-form {
    margin-top: 16px;
}

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

.fiel-grid label,
.integrated-file {
    display: grid;
    gap: 8px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.fiel-grid input[type="password"] {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    background: var(--white);
    color: var(--night);
    font: inherit;
}

.fiel-grid input[type="password"]:focus {
    outline: 3px solid rgba(20, 184, 166, 0.16);
    border-color: var(--teal);
}

.integrated-file {
    min-height: 112px;
    position: relative;
    align-content: center;
    gap: 12px;
    border: 1px solid rgba(20, 184, 166, 0.24);
    border-radius: 24px;
    padding: 18px;
    background: #F8FAFC;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.integrated-file:hover {
    border-color: rgba(20, 184, 166, 0.45);
    background: #F0FDFA;
}

.integrated-file input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.integrated-file span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.integrated-file strong {
    width: fit-content;
    max-width: 100%;
    border-radius: var(--pill);
    padding: 9px 13px;
    background: var(--white);
    box-shadow: inset 0 0 0 1px var(--line);
    color: var(--night);
    font-size: 14px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.form-actions .app-button {
    margin-top: 0;
}

.manual-worker-form {
    margin: 0;
}

.manual-worker-button {
    min-height: 42px;
    border: 0;
    border-radius: var(--pill);
    padding: 0 18px;
    background: var(--teal);
    color: var(--white);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(20, 184, 166, 0.24);
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.manual-worker-button:hover {
    transform: translateY(-1px);
}

.manual-worker-button:disabled {
    cursor: wait;
    opacity: 0.68;
    transform: none;
}

.cfdi-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 16px;
    align-items: start;
}

.cfdi-form-grid {
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
}

.scope-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.scope-grid label {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px;
    background: #F8FAFC;
    color: var(--night);
    cursor: pointer;
}

.scope-grid input {
    width: 18px;
    height: 18px;
    accent-color: var(--teal);
}

.scope-grid span {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.request-list {
    display: grid;
    gap: 10px;
}

.request-list article {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    background: #F8FAFC;
}

.request-list strong,
.request-list span,
.request-list p {
    display: block;
}

.request-list strong {
    color: var(--night);
    font-size: 15px;
    font-weight: 600;
}

.worker-modal[hidden] {
    display: none;
}

.worker-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 20px;
}

.worker-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.54);
    backdrop-filter: blur(10px);
}

.worker-modal-panel {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: min(78vh, 680px);
    display: grid;
    gap: 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 28px;
    padding: 20px;
    background: var(--white);
    box-shadow: 0 34px 90px rgba(15, 23, 42, 0.24);
}

.client-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.danger-link-button,
.danger-submit-button {
    min-height: 44px;
    border-radius: var(--pill);
    padding: 0 16px;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}

.client-status-tags small {
    width: 100%;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.danger-link-button {
    border: 1px solid rgba(220, 38, 38, 0.2);
    background: #FEF2F2;
    color: #991B1B;
}

.danger-submit-button {
    border: 0;
    background: #DC2626;
    color: var(--white);
}

.danger-submit-button.secondary-danger {
    border: 1px solid rgba(234, 88, 12, 0.22);
    background: #FFF7ED;
    color: #C2410C;
}

.danger-submit-button.secondary-danger:hover {
    background: #FFEDD5;
}

.danger-divider {
    width: 100%;
    height: 1px;
    border: 0;
    margin: 18px 0;
    background: rgba(148, 163, 184, 0.35);
}

.delete-client-panel {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(10px);
}

.delete-client-panel[hidden] {
    display: none;
}

.delete-client-card {
    width: min(520px, 100%);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 26px;
    padding: 22px;
    background: var(--white);
    box-shadow: 0 34px 90px rgba(15, 23, 42, 0.24);
}

.delete-client-card p {
    color: var(--muted);
    line-height: 1.55;
}

.delete-client-card label {
    display: grid;
    gap: 8px;
    color: var(--night);
    font-size: 13px;
    font-weight: 700;
}

.delete-client-card input {
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 14px;
    color: var(--night);
    font: inherit;
}

.worker-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.worker-modal-header span {
    display: block;
    color: var(--teal);
    font-size: 12px;
    font-weight: 600;
}

.worker-modal-header h2 {
    margin: 4px 0 0;
    color: var(--night);
    font-size: 22px;
    font-weight: 650;
}

.worker-modal-header button {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #F8FAFC;
    color: var(--night);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.worker-modal pre {
    max-height: 52vh;
    margin: 0;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    background: #0B1220;
    color: #DDFCF8;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.request-list span:not(.status-pill) {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.request-list small {
    display: block;
    margin-top: 6px;
    color: #64748B;
    font-size: 11px;
    font-weight: 500;
}

.request-list p,
.mini-empty p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.mini-empty {
    border: 1px dashed var(--line);
    border-radius: 16px;
    padding: 18px;
    background: #F8FAFC;
}

.form-panel {
    padding: 22px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.form-grid label,
.upload-panel label {
    display: grid;
    gap: 8px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.form-grid input,
.form-grid select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    background: var(--white);
    color: var(--night);
    font: inherit;
}

.form-grid input:focus,
.form-grid select:focus {
    outline: 3px solid rgba(20, 184, 166, 0.16);
    border-color: var(--teal);
}

.upload-panel {
    display: grid;
    gap: 14px;
}

.file-drop {
    min-height: 150px;
    place-items: center;
    border: 1px dashed rgba(20, 184, 166, 0.5);
    border-radius: 18px;
    padding: 20px;
    background: #F0FDFA;
    text-align: center;
    cursor: pointer;
}

.file-drop input {
    width: 1px;
    height: 1px;
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.file-drop strong {
    color: var(--night);
    font-size: 16px;
}

.file-drop span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.file-drop .file-name {
    max-width: 100%;
    border-radius: 999px;
    padding: 9px 12px;
    background: rgba(20, 184, 166, 0.12);
    color: #0F766E;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.file-drop .file-reading {
    max-width: 100%;
    border-radius: 999px;
    padding: 9px 12px;
    background: rgba(30, 58, 138, 0.08);
    color: var(--blue);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.file-drop .file-error {
    color: #B91C1C;
    font-weight: 600;
}

@media (max-width: 1060px) {
    .hero {
        min-height: auto;
    }

    .hero-stage {
        position: relative;
        top: auto;
        right: auto;
        width: calc(100% - 40px);
        min-height: 600px;
        margin: 0 20px 56px;
        transform: none;
    }

    .command-center {
        right: 0;
        width: min(100%, 620px);
    }

    .panel-left {
        left: 0;
    }

    .panel-right {
        right: 0;
    }

    .velocity-layout,
    .intelligence-layout,
    .future-layout,
    .security-layout,
    .statement,
    .closing-inner,
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-shell {
        min-height: 100vh;
    }

    .login-visual {
        min-height: 420px;
    }

    .flow-track,
    .security-grid,
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .initial-sync-lock-panel {
        grid-template-columns: 1fr;
    }

    .flow-track:before {
        display: none;
    }

    .price-card.featured {
        transform: none;
    }

    .app-page {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .app-sidebar {
        position: sticky;
        min-height: 100vh;
        padding: 18px 12px;
    }

    .app-nav {
        grid-template-columns: 1fr;
        overflow-x: visible;
    }

    .logout-link {
        margin-top: auto;
        width: auto;
    }

    .app-header {
        display: grid;
    }

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

    .app-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-table-head {
        display: none;
    }

    .admin-table article,
    .admin-users-grid {
        grid-template-columns: 1fr 1fr;
    }

    .client-wizard {
        grid-template-columns: 1fr;
    }

    .wizard-rail {
        position: static;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .wizard-rail button {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .wizard-rail button span {
        grid-row: auto;
    }

    .wizard-rail button small {
        display: none;
    }

    .sat-method-cards {
        grid-template-columns: 1fr;
    }

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

    .client-row {
        grid-template-columns: 1fr 1fr;
    }

    .cfdi-document-meta,
    .review-summary-grid,
    .review-balance-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cfdi-document-bottom,
    .cfdi-lines-head,
    .cfdi-lines-table article {
        grid-template-columns: 1fr;
    }

    .cfdi-summary-ribbon {
        grid-template-columns: 1fr;
        margin-right: 0;
        margin-left: 0;
    }

    .cfdi-lines-head {
        display: none;
    }

    .cfdi-lines-table article {
        align-items: start;
    }
}

@media (max-width: 760px) {
    :root {
        --radius: 18px;
        --radius-lg: 24px;
    }

    .initial-sync-lock-panel {
        min-height: auto;
        gap: 14px;
        border-radius: 24px;
        padding: 12px;
    }

    .initial-sync-lock-visual {
        min-height: 180px;
        border-radius: 20px;
    }

    .initial-sync-lock-visual span {
        width: 120px;
    }

    .initial-sync-lock-content {
        padding: 8px;
    }

    .initial-sync-lock-content h2 {
        font-size: 28px;
    }

    .initial-sync-meta {
        grid-template-columns: 1fr;
    }

    .initial-sync-actions .app-button {
        width: 100%;
    }

    .site-header {
        padding: 12px 16px;
    }

    .site-nav {
        display: none;
    }

    .wordmark {
        font-size: 20px;
    }

    .wordmark img {
        width: 30px;
        height: 30px;
    }

    .nav-access {
        min-height: 38px;
        padding: 0 14px;
        font-size: 13px;
    }

    .hero {
        display: flex;
        flex-direction: column;
    }

    .intelligence-field {
        opacity: 0.42;
    }

    .data-node,
    .data-line {
        display: none;
    }

    .hero-content {
        order: 1;
        padding: 96px 18px 28px;
    }

    h1 {
        margin-bottom: 18px;
        font-size: 40px;
        line-height: 1.02;
    }

    h2 {
        margin-bottom: 14px;
        font-size: 32px;
        line-height: 1.08;
    }

    h3 {
        font-size: 19px;
    }

    .eyebrow {
        margin-bottom: 12px;
        font-size: 11px;
    }

    .hero-copy,
    .section-heading p:not(.eyebrow),
    .velocity-layout p,
    .flow-track p,
    .future-layout p,
    .security-grid p,
    .price-card li,
    .closing-inner p:not(.eyebrow) {
        font-size: 16px;
        line-height: 1.55;
    }

    .hero-actions {
        gap: 10px;
        margin-top: 24px;
    }

    .button {
        min-height: 48px;
        padding: 0 18px;
    }

    .hero-stage {
        order: 2;
        width: auto;
        min-height: 0;
        margin: 0 18px 44px;
    }

    .command-center {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: 100%;
        margin-bottom: 14px;
    }

    .system-panel {
        display: none;
    }

    .command-center {
        padding: 14px;
        border-radius: 22px;
    }

    .command-top {
        padding-bottom: 12px;
    }

    .command-metrics {
        gap: 8px;
        margin-top: 12px;
    }

    .command-metrics article {
        min-height: 86px;
        padding: 12px 10px;
        border-radius: 16px;
    }

    .command-metrics span {
        font-size: 10px;
    }

    .command-metrics strong {
        margin-top: 12px;
        font-size: 20px;
    }

    .signal-map {
        min-height: auto;
        margin-top: 12px;
    }

    .node {
        min-height: 46px;
        border-radius: 15px;
        font-size: 11px;
    }

    .review-table {
        border-radius: 16px;
    }

    .review-row {
        grid-template-columns: 10px 1fr;
        gap: 10px;
        min-height: auto;
        padding: 12px;
    }

    .review-row em {
        grid-column: 2;
        text-align: left;
    }

    .command-metrics,
    .signal-map,
    .velocity-board,
    .velocity-metrics,
    .flow-track,
    .security-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .command-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .signal-map {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .signal-map {
        gap: 10px;
    }

    .trace {
        display: none;
    }

    .section,
    .closing-cta {
        padding: 58px 18px;
    }

    .section-heading.narrow {
        margin-bottom: 26px;
    }

    .statement-band {
        padding: 24px 18px;
    }

    .statement {
        gap: 12px;
    }

    .statement span:first-child {
        font-size: 26px;
        line-height: 1.12;
    }

    .statement span:last-child {
        font-size: 15px;
        line-height: 1.5;
    }

    .velocity-board {
        gap: 10px;
        padding: 12px;
    }

    .velocity-pulse {
        width: 100%;
        min-height: 70px;
    }

    .velocity-column {
        min-height: auto;
        padding: 20px;
        border-radius: 18px;
    }

    .velocity-column p {
        font-size: 19px;
        line-height: 1.28;
    }

    .velocity-metrics {
        gap: 8px;
    }

    .velocity-metrics article {
        min-height: auto;
        padding: 14px;
    }

    .velocity-metrics strong {
        font-size: 28px;
    }

    .flow-card {
        min-height: auto;
        padding: 22px;
    }

    .flow-card:before {
        top: 22px;
        left: auto;
        right: 22px;
        width: 22px;
        height: 22px;
        border-width: 6px;
    }

    .workflow-number {
        margin-bottom: 42px;
    }

    .ai-board {
        border-radius: 24px;
    }

    .ai-card {
        padding: 20px;
    }

    .ai-card p {
        font-size: 16px;
    }

    .intelligence-tags {
        gap: 8px;
        margin-top: 22px;
    }

    .intelligence-tags span {
        padding: 9px 11px;
        font-size: 12px;
    }

    .security-visual {
        min-height: 330px;
        border-radius: 24px;
    }

    .vault-core {
        width: 180px;
    }

    .ring-one {
        width: 260px;
        height: 260px;
    }

    .ring-two {
        width: 360px;
        height: 360px;
    }

    .security-chip {
        font-size: 11px;
    }

    .chip-a {
        left: 7%;
        top: 18%;
    }

    .chip-b {
        right: 7%;
        top: 26%;
    }

    .chip-c {
        left: 13%;
        bottom: 16%;
    }

    .security-grid article,
    .price-card {
        min-height: auto;
        padding: 22px;
    }

    .security-grid article span {
        margin-bottom: 22px;
    }

    .future-item {
        padding-left: 26px;
        padding-top: 80px;
    }

    .future-item:before {
        top: 28px;
    }

    .future-item strong {
        font-size: 19px;
    }

    .price-card {
        text-align: left;
    }

    .price-card.featured > span {
        margin-top: 40px;
    }

    .price-card strong {
        font-size: 25px;
    }

    .plan-badge {
        left: 22px;
        transform: none;
    }

    .closing-inner,
    .site-footer {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .cta-node,
    .cta-line {
        display: none;
    }

    .site-footer {
        flex-direction: column;
        padding: 26px 18px;
    }

    .button,
    .hero-actions a,
    .closing-inner a {
        width: 100%;
    }

    .login-page {
        background: var(--white);
    }

    .login-shell {
        min-height: 100vh;
        display: block;
    }

    .login-visual {
        display: none;
    }

    .login-card {
        min-height: 100vh;
        justify-content: center;
        padding: 24px 18px;
    }

    .login-card > img {
        width: 54px;
        height: 54px;
        margin-bottom: 24px;
    }

    .login-card h2 {
        font-size: 26px;
    }

    .login-card form {
        margin-top: 24px;
        gap: 11px;
    }

    .login-card input,
    .login-card button {
        min-height: 50px;
    }

    .register-prompt,
    .public-link {
        text-align: center;
    }

    .public-link {
        width: 100%;
        justify-content: center;
    }

    .cfdi-document-shell {
        width: min(100% - 24px, 1120px);
        padding: 14px 0 28px;
    }

    .cfdi-document-toolbar,
    .cfdi-document-hero,
    .cfdi-party-grid,
    .cfdi-stamp-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .cfdi-document-actions {
        justify-content: stretch;
    }

    .cfdi-document-actions a,
    .cfdi-document-actions button {
        flex: 1;
        min-width: 0;
        padding: 0 10px;
    }

    .cfdi-document-card {
        border-radius: 22px;
        padding: 14px;
    }

    .cfdi-report-header,
    .cfdi-report-footer {
        display: grid;
        grid-template-columns: 1fr;
        text-align: left;
    }

    .cfdi-report-header > div:last-child {
        min-width: 0;
        text-align: left;
    }

    .cfdi-report-id {
        min-width: 0;
        grid-template-columns: 1fr;
    }

    .cfdi-report-id div {
        text-align: left;
    }

    .cfdi-report-header img {
        width: 150px;
    }

    .cfdi-document-hero {
        gap: 18px;
        border-radius: 20px;
    }

    .cfdi-document-total {
        justify-items: start;
        text-align: left;
    }

    .cfdi-document-meta {
        grid-template-columns: 1fr;
    }

    .admin-table article,
    .admin-users-grid,
    .access-status-grid,
    .fiscal-detail-lists {
        grid-template-columns: 1fr;
    }

    .app-page {
        display: block;
        padding-bottom: 78px;
    }

    .app-sidebar {
        display: none;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        z-index: 60;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
        border: 1px solid rgba(15, 23, 42, 0.12);
        border-radius: 24px;
        padding: 8px;
        background: rgba(255, 255, 255, 0.92);
        box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
        backdrop-filter: blur(18px);
    }

    .mobile-bottom-nav:has(.mobile-impersonation-exit) {
        grid-template-columns: repeat(5, 1fr);
    }

    .mobile-bottom-nav a {
        min-height: 54px;
        display: grid;
        place-items: center;
        gap: 3px;
        border-radius: 18px;
        color: var(--muted);
        font-size: 11px;
        font-weight: 800;
    }

    .mobile-bottom-nav a.active {
        background: #F0FDFA;
        color: var(--teal);
    }

    .mobile-impersonation-exit {
        display: block;
    }

    .mobile-impersonation-exit button {
        min-height: 54px;
        border-radius: 18px;
        background: #0F766E;
        font-size: 11px;
    }

    .mobile-bottom-nav svg {
        width: 21px;
        height: 21px;
    }

    .app-main {
        padding: 20px 14px;
    }

    .app-header h1 {
        font-size: 26px;
        line-height: 1.1;
    }

    .app-header p:not(.eyebrow),
    .app-panel p {
        font-size: 14px;
    }

    .app-header {
        display: grid;
        gap: 12px;
        margin-bottom: 14px;
    }

    .app-header .app-button,
    .app-header .manual-worker-button,
    .app-header .subscription-pill {
        width: 100%;
    }

    .client-header-actions {
        display: grid;
        width: 100%;
        gap: 8px;
    }

    .client-search-minimal {
        width: 100%;
        justify-content: space-between;
    }

    .client-search-minimal input {
        width: 100%;
        min-width: 0;
    }

    .subscription-pill {
        width: 100%;
    }

    .app-metrics,
    .app-grid,
    .payables-summary-grid,
    .payables-filter-panel form,
    .payables-list article,
    .payables-provider-list article,
    .payable-provider-amounts,
    .payable-detail-page-summary {
        grid-template-columns: 1fr;
    }

    .app-metrics article {
        min-height: auto;
        padding: 14px;
    }

    .app-metrics strong {
        margin-top: 10px;
        font-size: 24px;
    }

    .payables-summary-grid strong {
        font-size: 24px;
    }

    .payable-pagination {
        justify-content: stretch;
    }

    .payable-pagination a,
    .payable-pagination span {
        flex: 1;
        justify-content: center;
        padding: 0 8px;
    }

    .app-panel {
        min-height: auto;
        padding: 18px;
    }

    .panel-title h2 {
        font-size: 21px;
    }

    .client-row,
    .client-form,
    .client-profile,
    .client-month-grid,
    .document-list article,
    .client-request-list article,
    .cfdi-workspace,
    .cfdi-form-grid,
    .detail-grid,
    .access-status-grid,
    .fiscal-detail-lists,
    .fiel-grid,
    .form-grid,
    .review-balance-grid,
    .review-summary-grid,
    .monthly-review-table article,
    .drawer-sync-form,
    .sync-scope-grid {
        grid-template-columns: 1fr;
    }

    .client-tabs {
        border-radius: 20px;
        padding: 5px;
    }

    .client-tabs-row {
        grid-template-columns: minmax(0, 1fr) 44px;
    }

    .client-tabs button {
        flex-basis: 100%;
        justify-content: center;
    }

    .request-drawer-panel {
        width: min(390px, calc(100% - 28px));
        padding: 18px;
    }

    .fiscal-document-actions article {
        display: grid;
        gap: 14px;
    }

    .fiscal-document-actions form,
    .fiscal-document-actions .app-button {
        width: 100%;
    }

    .wizard-stage {
        min-height: auto;
        border-radius: 22px;
        padding: 16px;
    }

    .wizard-copy h2 {
        font-size: 26px;
    }

    .rfc-entry input {
        min-height: 62px;
        border-radius: 18px;
        font-size: 24px;
    }

    .wizard-actions .app-button,
    .wizard-actions a {
        width: 100%;
    }

    .monthly-control-panel {
        display: grid;
        padding: 16px;
    }

    .month-picker {
        display: grid;
        width: 100%;
    }

    .period-control-stack {
        justify-items: stretch;
    }

    .period-actions {
        justify-content: stretch;
    }

    .period-actions form,
    .period-actions button,
    .period-actions span {
        width: 100%;
    }

    .month-picker input,
    .month-picker .app-button {
        width: 100%;
    }

    .client-month-grid article {
        min-height: auto;
        padding: 16px;
    }

    .client-month-grid strong {
        margin-top: 12px;
        font-size: 34px;
    }

    .month-card-top {
        align-items: center;
    }

    .document-list article {
        gap: 12px;
        padding: 13px;
    }

    .document-amounts strong {
        font-size: 18px;
    }

    .review-workbench {
        padding: 16px;
    }

    .review-panel-header {
        display: grid;
    }

    .review-filter-select {
        min-width: 0;
        width: 100%;
    }

    .monthly-review-table-head {
        display: none;
    }

    .monthly-review-table article {
        align-items: start;
        gap: 10px;
    }

    .review-check {
        place-items: start;
    }

    .review-summary-grid article,
    .review-balance-grid article {
        min-height: auto;
    }

    .client-sync-panel {
        padding: 16px;
    }

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

    .client-row {
        gap: 10px;
        min-height: auto;
        padding: 14px;
    }

    .client-status-tags {
        justify-content: flex-start;
    }

    .form-panel {
        padding: 16px;
    }

    .file-drop {
        min-height: 128px;
        padding: 16px;
    }

    .detail-grid div {
        min-height: auto;
        padding: 12px;
    }

    .form-grid input,
    .form-grid select,
    .fiel-grid input[type="password"] {
        min-height: 44px;
    }

    .integrated-file {
        min-height: 104px;
        padding: 16px;
    }

    .form-actions {
        justify-content: stretch;
    }

    .form-actions .app-button {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .site-header {
        padding: 10px 14px;
    }

    .wordmark {
        font-size: 18px;
    }

    .nav-access {
        min-height: 36px;
        padding: 0 12px;
    }

    .hero-content {
        padding: 86px 16px 24px;
    }

    h1 {
        font-size: 36px;
        line-height: 1.04;
    }

    h2 {
        font-size: 29px;
    }

    .hero-copy,
    .section-heading p:not(.eyebrow),
    .velocity-layout p,
    .flow-track p,
    .future-layout p,
    .security-grid p,
    .price-card li,
    .closing-inner p:not(.eyebrow) {
        font-size: 15px;
    }

    .hero-stage {
        margin: 0 14px 38px;
    }

    .command-center {
        padding: 12px;
    }

    .command-metrics {
        gap: 6px;
    }

    .command-metrics article {
        min-height: 78px;
        padding: 10px 8px;
    }

    .command-metrics strong {
        font-size: 18px;
    }

    .node {
        min-height: 42px;
        font-size: 10px;
    }

    .section,
    .closing-cta {
        padding: 50px 16px;
    }

    .statement-band {
        padding: 22px 16px;
    }

    .statement span:first-child {
        font-size: 23px;
    }

    .velocity-column,
    .flow-card,
    .ai-card,
    .security-grid article,
    .price-card {
        padding: 18px;
    }

    .security-visual {
        min-height: 300px;
    }

    .vault-core {
        width: 158px;
        min-height: 130px;
    }

    .vault-core strong {
        font-size: 25px;
    }

    .ring-one {
        width: 220px;
        height: 220px;
    }

    .ring-two {
        width: 300px;
        height: 300px;
    }

    .security-chip {
        min-height: 34px;
        padding: 0 11px;
        font-size: 10px;
    }

    .future-item {
        padding: 72px 18px 20px;
    }

    .price-card strong {
        font-size: 23px;
    }

    .login-card {
        padding: 24px 16px;
    }

    .login-card h2 {
        font-size: 25px;
    }

    .app-page .app-main {
        padding: 18px 12px;
    }

    .app-page .app-header h1,
    .app-page .app-header.compact h1 {
        font-size: 24px;
    }

    .app-page .panel-title h2 {
        font-size: 20px;
    }

    .app-page .empty-state h2 {
        font-size: 22px;
    }

    .app-page .client-row strong,
    .app-page .detail-grid dd,
    .app-page .integrated-file strong {
        font-size: 14px;
    }
}

@media print {
    @page {
        size: letter;
        margin: 10mm;
    }

    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    html,
    body.cfdi-document-page {
        background: #FFFFFF;
        color: #0F172A;
        font-family: "Inter", Arial, sans-serif;
        margin: 0;
        padding: 0;
    }

    .cfdi-document-shell {
        width: 100%;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    .cfdi-document-toolbar,
    .cfdi-document-actions {
        display: none;
    }

    .cfdi-document-card {
        border: 0;
        border-radius: 0;
        padding: 8mm 7mm;
        box-shadow: none;
        box-sizing: border-box;
        box-decoration-break: clone;
        -webkit-box-decoration-break: clone;
    }

    .cfdi-report-header {
        margin-bottom: 7mm;
        border-bottom: 1px solid #E5E7EB;
        padding-bottom: 4mm;
    }

    .cfdi-report-header img {
        width: 42mm;
    }

    .cfdi-report-id div {
        border-color: #E5E7EB;
        border-radius: 4mm;
        background: #FFFFFF;
    }

    .cfdi-document-hero {
        color: #FFFFFF;
        background:
            radial-gradient(circle at 84% 18%, rgba(20, 184, 166, 0.22), transparent 30%),
            linear-gradient(135deg, #0F172A, #132341);
        border: 1px solid #0F172A;
        border-radius: 5mm;
        padding: 5mm;
    }

    .cfdi-document-hero h1 {
        font-size: 24pt;
        line-height: 1;
    }

    .cfdi-document-total strong {
        font-size: 20pt;
    }

    .cfdi-document-hero h1,
    .cfdi-document-hero p,
    .cfdi-document-total p {
        color: #FFFFFF;
    }

    .cfdi-document-hero span,
    .cfdi-document-total span {
        color: #9FF7EA;
    }

    .cfdi-document-total strong,
    .cfdi-totals-card div:last-child dd {
        color: #0F766E;
    }

    .cfdi-document-total strong {
        color: #14B8A6;
    }

    .cfdi-summary-ribbon {
        margin: -3mm 5mm 5mm;
        border-color: rgba(20, 184, 166, 0.28);
        box-shadow: none;
    }

    .cfdi-summary-ribbon div {
        background: #FFFFFF;
    }

    .cfdi-document-meta,
    .cfdi-party-grid,
    .cfdi-document-bottom,
    .cfdi-stamp-grid,
    .cfdi-lines-section,
    .cfdi-stamp-panel,
    .cfdi-report-footer {
        break-inside: avoid;
    }

    .cfdi-lines-table article,
    .cfdi-document-meta article,
    .cfdi-party-grid article,
    .cfdi-tax-card,
    .cfdi-totals-card,
    .cfdi-stamp-panel,
    .cfdi-stamp-grid article {
        background: #FFFFFF;
        box-shadow: none;
    }

    .cfdi-document-meta article,
    .cfdi-party-grid article,
    .cfdi-tax-card,
    .cfdi-totals-card,
    .cfdi-stamp-panel,
    .cfdi-stamp-grid article,
    .cfdi-lines-table {
        border-color: #E5E7EB;
        border-radius: 4mm;
    }

    .cfdi-lines-head {
        background: #F8FAFC;
    }

    .cfdi-section-title h2,
    .cfdi-party-grid h2 {
        color: #0F172A;
    }

    .cfdi-report-footer {
        margin-top: 6mm;
        padding-top: 4mm;
    }
}
