:root {
    --auth-bg: #f5f7fb;
    --auth-surface: rgba(255, 255, 255, .94);
    --auth-surface-solid: #ffffff;
    --auth-text: #0b1730;
    --auth-muted: #64748b;
    --auth-subtle: #94a3b8;
    --auth-border: #dfe5ee;
    --auth-border-strong: #cbd5e1;
    --auth-input: #ffffff;
    --auth-primary: #2358e8;
    --auth-primary-hover: #1948ce;
    --auth-focus: rgba(35, 88, 232, .16);
    --auth-danger: #c9364a;
    --auth-danger-soft: #fff1f3;
    --auth-success: #087a5b;
    --auth-shadow: 0 24px 64px rgba(15, 23, 42, .11), 0 3px 12px rgba(15, 23, 42, .05);
    --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

html.dark-mode {
    --auth-bg: #070d18;
    --auth-surface: rgba(13, 23, 39, .94);
    --auth-surface-solid: #0d1727;
    --auth-text: #f3f7fd;
    --auth-muted: #9aabc1;
    --auth-subtle: #718198;
    --auth-border: #243249;
    --auth-border-strong: #34445f;
    --auth-input: #0a1423;
    --auth-primary: #4778ff;
    --auth-primary-hover: #5d89ff;
    --auth-focus: rgba(71, 120, 255, .22);
    --auth-danger: #ff8192;
    --auth-danger-soft: rgba(201, 54, 74, .12);
    --auth-success: #46d6ac;
    --auth-shadow: 0 28px 80px rgba(0, 0, 0, .34), 0 2px 10px rgba(0, 0, 0, .18);
}

html.theme-preload *,
html.theme-preload *::before,
html.theme-preload *::after {
    transition: none !important;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--auth-bg);
    color: var(--auth-text);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

.login-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(560px, 1.12fr) minmax(440px, .88fr);
}

.hero-panel {
    position: relative;
    min-width: 0;
    overflow: hidden;
    color: #eef6ff;
    background:
        radial-gradient(circle at 72% 16%, rgba(27, 113, 219, .24), transparent 31%),
        linear-gradient(145deg, #061226 0%, #071a35 58%, #082340 100%);
}

.hero-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(130, 177, 235, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(130, 177, 235, .045) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(to bottom, black, transparent 76%);
}

.hero-panel::after {
    content: "";
    position: absolute;
    inset: auto -15% -36% 18%;
    height: 60%;
    pointer-events: none;
    background: radial-gradient(ellipse, rgba(6, 182, 212, .12), transparent 66%);
    filter: blur(18px);
}

.hero-panel__glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    z-index: 2;
    background: linear-gradient(to bottom, transparent 5%, rgba(96, 165, 250, .28) 45%, transparent 94%);
}

.hero-layout {
    position: relative;
    z-index: 1;
    width: min(100%, 820px);
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    padding: clamp(30px, 4.5vh, 54px) clamp(34px, 5vw, 78px) 30px;
    display: flex;
    flex-direction: column;
}

.brand-lockup,
.mobile-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(148, 197, 255, .18);
    border-radius: 11px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .05));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 10px 26px rgba(0, 0, 0, .16);
}

.brand-mark img {
    width: 27px;
    height: 27px;
    object-fit: contain;
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-company {
    color: #89a5c7;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.brand-product {
    color: #f7fbff;
    font-size: 15px;
    font-weight: 720;
    letter-spacing: -.015em;
}

.hero-content {
    width: 100%;
    margin: auto 0;
    padding: clamp(34px, 5vh, 60px) 0 28px;
}

.compliance-kicker,
.auth-badge,
.live-state {
    display: inline-flex;
    align-items: center;
}

.compliance-kicker {
    gap: 10px;
    margin-bottom: 20px;
    color: #a9c1df;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .095em;
    text-transform: uppercase;
}

.status-pulse,
.auth-badge > span,
.live-state i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #45d7aa;
    box-shadow: 0 0 0 5px rgba(69, 215, 170, .11);
}

.hero-content h1 {
    margin: 0;
    max-width: 670px;
    color: #f8fbff;
    font-size: clamp(44px, 4.7vw, 66px);
    font-weight: 720;
    letter-spacing: -.052em;
    line-height: 1.025;
}

.hero-content h1 span {
    color: #78b9ff;
}

.hero-lead {
    max-width: 610px;
    margin: 20px 0 0;
    color: #9eb2ca;
    font-size: 15px;
    line-height: 1.7;
}

.fiscal-visual {
    width: 100%;
    max-width: 690px;
    margin-top: clamp(30px, 4vh, 44px);
    overflow: hidden;
    border: 1px solid rgba(142, 183, 232, .17);
    border-radius: 17px;
    background: rgba(5, 17, 36, .63);
    box-shadow: 0 30px 70px rgba(0, 5, 18, .25), inset 0 1px 0 rgba(255, 255, 255, .035);
    backdrop-filter: blur(16px);
}

.visual-toolbar {
    min-height: 44px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid rgba(142, 183, 232, .12);
    background: rgba(255, 255, 255, .018);
}

.visual-product {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #cbdaf0;
    font-size: 11px;
    font-weight: 650;
}

.visual-product__icon {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(82, 153, 255, .2);
    border-radius: 7px;
    color: #69a9ff;
    background: rgba(50, 113, 232, .12);
}

.visual-product__icon svg {
    width: 14px;
    height: 14px;
}

.live-state {
    gap: 8px;
    color: #84d9bd;
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
}

.live-state i {
    width: 5px;
    height: 5px;
    box-shadow: 0 0 0 4px rgba(69, 215, 170, .08);
}

.visual-body {
    display: grid;
    grid-template-columns: 1.14fr .86fr;
    gap: 12px;
    padding: 13px;
}

.fiscal-flow,
.fiscal-proof {
    border: 1px solid rgba(142, 183, 232, .105);
    border-radius: 12px;
    background: rgba(255, 255, 255, .025);
}

.fiscal-flow {
    padding: 5px 13px;
}

.flow-step {
    position: relative;
    min-height: 54px;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.flow-step + .flow-step {
    border-top: 1px solid rgba(142, 183, 232, .08);
}

.flow-index {
    color: #58718f;
    font: 600 9px var(--font-mono);
}

.flow-step > span:nth-child(2) {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.flow-step strong {
    color: #dbe8f8;
    font-size: 11px;
    font-weight: 650;
}

.flow-step small {
    overflow: hidden;
    color: #7087a4;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flow-step > svg {
    width: 16px;
    height: 16px;
    color: #45d7aa;
}

.flow-wave {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
}

.flow-wave i {
    width: 2px;
    border-radius: 2px;
    background: #55a3ff;
    animation: fiscal-wave 1.25s ease-in-out infinite;
}

.flow-wave i:nth-child(1) { height: 6px; }
.flow-wave i:nth-child(2) { height: 12px; animation-delay: .12s; }
.flow-wave i:nth-child(3) { height: 8px; animation-delay: .24s; }

@keyframes fiscal-wave {
    0%, 100% { opacity: .45; transform: scaleY(.65); }
    50% { opacity: 1; transform: scaleY(1); }
}

.fiscal-proof {
    padding: 13px;
}

.proof-heading,
.proof-reference,
.proof-metrics,
.proof-seal {
    display: flex;
    align-items: center;
}

.proof-heading,
.proof-reference {
    justify-content: space-between;
    gap: 12px;
}

.proof-heading span,
.proof-reference span {
    color: #7188a5;
    font-size: 9px;
}

.proof-heading strong {
    padding: 4px 7px;
    border: 1px solid rgba(69, 215, 170, .16);
    border-radius: 999px;
    color: #69dfbc;
    background: rgba(69, 215, 170, .075);
    font-size: 8px;
    font-weight: 700;
}

.proof-reference {
    margin-top: 13px;
    padding: 10px 0;
    border-top: 1px solid rgba(142, 183, 232, .08);
    border-bottom: 1px solid rgba(142, 183, 232, .08);
}

.proof-reference code {
    color: #bad1ec;
    font: 600 9px var(--font-mono);
}

.proof-metrics {
    gap: 18px;
    padding: 10px 0;
}

.proof-metrics span {
    display: grid;
    gap: 3px;
}

.proof-metrics small {
    color: #647c99;
    font-size: 8px;
}

.proof-metrics strong {
    color: #d8e6f7;
    font-size: 10px;
    font-weight: 650;
}

.proof-seal {
    gap: 6px;
    padding: 7px 8px;
    border-radius: 7px;
    color: #7fc7ff;
    background: rgba(39, 116, 223, .08);
    font-size: 8px;
    font-weight: 650;
}

.proof-seal svg {
    width: 12px;
    height: 12px;
}

.trust-row {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 18px;
    color: #7187a2;
}

.trust-row > span:not(.trust-row__copy) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #9ab0ca;
    font-size: 10px;
    font-weight: 650;
}

.trust-row svg {
    width: 14px;
    height: 14px;
}

.trust-row__copy {
    margin-left: auto;
    font-size: 9px;
}

.auth-panel {
    position: relative;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 80px clamp(28px, 5vw, 74px) 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 82% 5%, rgba(35, 88, 232, .055), transparent 28%),
        var(--auth-bg);
    transition: background-color .22s ease, color .22s ease;
}

.theme-toggle {
    position: absolute;
    top: 24px;
    right: 28px;
    min-height: 34px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--auth-border);
    border-radius: 9px;
    color: var(--auth-muted);
    background: color-mix(in srgb, var(--auth-surface-solid) 88%, transparent);
    cursor: pointer;
    font-size: 11px;
    font-weight: 650;
    transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.theme-toggle:hover {
    border-color: var(--auth-border-strong);
    color: var(--auth-text);
}

.theme-toggle:focus-visible,
.password-toggle:focus-visible,
.text-button:focus-visible,
.back-button:focus-visible,
.primary-button:focus-visible {
    outline: 3px solid var(--auth-focus);
    outline-offset: 2px;
}

.theme-icon {
    width: 14px;
    height: 14px;
}

.theme-icon--light,
html.dark-mode .theme-icon--dark {
    display: none;
}

html.dark-mode .theme-icon--light {
    display: block;
}

.mobile-brand {
    display: none;
}

.auth-card {
    width: min(100%, 440px);
    padding: clamp(30px, 3.1vw, 42px);
    border: 1px solid var(--auth-border);
    border-radius: 17px;
    background: var(--auth-surface);
    box-shadow: var(--auth-shadow);
    backdrop-filter: blur(16px);
}

.form-view {
    display: none;
}

.form-view.active {
    display: block;
    animation: form-enter .26s ease both;
}

@keyframes form-enter {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-badge {
    min-height: 26px;
    gap: 8px;
    margin-bottom: 18px;
    padding: 0 9px;
    border: 1px solid color-mix(in srgb, var(--auth-success) 22%, transparent);
    border-radius: 999px;
    color: var(--auth-success);
    background: color-mix(in srgb, var(--auth-success) 7%, transparent);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.auth-badge > span {
    width: 5px;
    height: 5px;
    background: currentColor;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--auth-success) 11%, transparent);
}

.auth-card h2 {
    margin: 0;
    color: var(--auth-text);
    font-size: clamp(30px, 3vw, 36px);
    font-weight: 720;
    letter-spacing: -.045em;
    line-height: 1.08;
}

.auth-intro {
    margin: 10px 0 26px;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.6;
}

.field-group {
    margin-bottom: 17px;
}

.field-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--auth-text);
    font-size: 12px;
    font-weight: 650;
}

.field-wrap {
    position: relative;
}

.field-icon,
.password-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.field-icon {
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--auth-subtle);
    pointer-events: none;
}

.field-icon svg,
.password-toggle svg,
.theme-toggle svg,
.primary-button svg,
.back-button svg,
.security-note svg,
.form-alert svg,
.visual-product__icon svg,
.flow-step > svg,
.proof-seal svg,
.trust-row svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.field-input {
    width: 100%;
    height: 52px;
    padding: 0 44px;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    outline: none;
    color: var(--auth-text);
    background: var(--auth-input);
    box-shadow: inset 0 1px 1px rgba(15, 23, 42, .025);
    font-size: 13px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.field-input::placeholder {
    color: var(--auth-subtle);
}

.field-input:hover {
    border-color: var(--auth-border-strong);
}

.field-input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px var(--auth-focus);
}

.field-input:user-invalid {
    border-color: var(--auth-danger);
}

.field-input:user-invalid:focus {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--auth-danger) 13%, transparent);
}

.field-error {
    display: none;
    margin-top: 6px;
    color: var(--auth-danger);
    font-size: 11px;
}

.field-group:has(.field-input:user-invalid) .field-error {
    display: block;
}

.password-toggle {
    right: 9px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    color: var(--auth-subtle);
    background: transparent;
    cursor: pointer;
    transition: color .18s ease, background .18s ease;
}

.password-toggle:hover {
    color: var(--auth-text);
    background: color-mix(in srgb, var(--auth-text) 5%, transparent);
}

.password-toggle svg {
    width: 17px;
    height: 17px;
}

.eye-closed,
.password-toggle.is-visible .eye-open {
    display: none;
}

.password-toggle.is-visible .eye-closed {
    display: block;
}

.form-options {
    margin: -1px 0 19px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.form-options > span {
    color: var(--auth-subtle);
    font-size: 10px;
    line-height: 1.35;
}

.text-button,
.back-button {
    padding: 0;
    border: 0;
    color: var(--auth-primary);
    background: transparent;
    cursor: pointer;
    font-weight: 650;
}

.text-button {
    flex: none;
    font-size: 11px;
}

.text-button:hover,
.back-button:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.primary-button {
    width: 100%;
    min-height: 52px;
    padding: 0 16px 0 18px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(0, 35, 130, .16);
    border-radius: 10px;
    color: #ffffff;
    background: linear-gradient(180deg, #376bf4 0%, var(--auth-primary) 100%);
    box-shadow: 0 10px 22px rgba(35, 88, 232, .23), inset 0 1px 0 rgba(255, 255, 255, .23);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.primary-button:hover:not(:disabled) {
    transform: translateY(-1px);
    background: linear-gradient(180deg, #2f62e9 0%, var(--auth-primary-hover) 100%);
    box-shadow: 0 13px 26px rgba(35, 88, 232, .28), inset 0 1px 0 rgba(255, 255, 255, .2);
}

.primary-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 7px 15px rgba(35, 88, 232, .22), inset 0 1px 0 rgba(255, 255, 255, .16);
}

.primary-button:disabled {
    opacity: .62;
    cursor: not-allowed;
}

.primary-button > span:first-child {
    justify-self: center;
    padding-left: 20px;
}

.primary-button > svg {
    width: 18px;
    height: 18px;
}

.button-spinner {
    display: none;
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255, 255, 255, .3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: button-spin .7s linear infinite;
}

@keyframes button-spin {
    to { transform: rotate(360deg); }
}

.form-alert {
    margin-top: 15px;
    padding: 11px 12px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    border: 1px solid color-mix(in srgb, var(--auth-danger) 20%, transparent);
    border-radius: 9px;
    color: var(--auth-danger);
    background: var(--auth-danger-soft);
    font-size: 11px;
    line-height: 1.45;
}

.form-alert svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.back-button {
    margin-bottom: 24px;
    display: flex;
    width: max-content;
    align-items: center;
    gap: 5px;
    color: var(--auth-muted);
    font-size: 11px;
}

.back-button svg {
    width: 15px;
    height: 15px;
}

.security-note {
    margin-top: 24px;
    padding-top: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-top: 1px solid var(--auth-border);
}

.security-note > span:first-child {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--auth-primary);
    background: color-mix(in srgb, var(--auth-primary) 8%, transparent);
}

.security-note svg {
    width: 15px;
    height: 15px;
}

.security-note > span:last-child {
    display: grid;
    gap: 2px;
}

.security-note strong {
    color: var(--auth-text);
    font-size: 10px;
    font-weight: 700;
}

.security-note small {
    color: var(--auth-subtle);
    font-size: 9px;
    line-height: 1.45;
}

.auth-footer {
    width: min(100%, 440px);
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: var(--auth-subtle);
    font-size: 9px;
}

/* Hero clair — une présence produit plus légère, proche de la console Admin. */
.login-shell {
    position: relative;
    isolation: isolate;
    grid-template-columns: minmax(560px, 1.04fr) minmax(440px, .96fr);
    background:
        radial-gradient(circle at 9% 8%, rgba(36, 99, 235, .10), transparent 26%),
        radial-gradient(circle at 45% 82%, rgba(6, 182, 212, .10), transparent 31%),
        radial-gradient(circle at 91% 7%, rgba(76, 116, 206, .055), transparent 24%),
        linear-gradient(145deg, #f8fbff 0%, #f1f6fc 56%, #f5f8fc 100%);
}

.login-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(55, 91, 138, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(55, 91, 138, .045) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, black, rgba(0, 0, 0, .48) 76%, transparent);
}

.hero-panel {
    color: #10203b;
    border-right: 0;
    background: transparent;
}

.hero-panel::before {
    background-image: none;
}

.hero-panel::after {
    inset: auto -8% -30% 24%;
    background: radial-gradient(ellipse, rgba(29, 133, 214, .12), transparent 66%);
}

.hero-panel__glow {
    background: linear-gradient(to bottom, transparent 5%, rgba(37, 99, 235, .16) 45%, transparent 94%);
}

.hero-layout {
    width: min(100%, 780px);
    padding-inline: clamp(38px, 5vw, 72px);
}

.brand-mark {
    border-color: #d6e3f1;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 8px 22px rgba(15, 39, 74, .09), inset 0 1px 0 #fff;
}

.brand-company {
    color: #5f7696;
}

.brand-product {
    color: #12223c;
}

.compliance-kicker {
    min-height: 30px;
    margin-bottom: 18px;
    padding: 0 11px;
    border: 1px solid #d7e4f2;
    border-radius: 8px;
    color: #395778;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 4px 14px rgba(35, 72, 118, .05);
}

.status-pulse {
    animation: login-status-pulse 2.6s ease-out infinite;
}

@keyframes login-status-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(16, 185, 129, .10); }
    50% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
}

.hero-content h1 {
    max-width: 630px;
    color: #0d1d36;
    font-size: clamp(42px, 4.25vw, 60px);
    font-weight: 735;
    letter-spacing: -.047em;
    line-height: 1.04;
}

.hero-content h1 span {
    color: #2563eb;
}

.hero-lead {
    max-width: 590px;
    margin-top: 17px;
    color: #5f7189;
    line-height: 1.65;
}

.fiscal-illustration {
    position: relative;
    width: 100%;
    max-width: 660px;
    height: 286px;
    margin-top: clamp(24px, 3.4vh, 36px);
    isolation: isolate;
}

.illustration-aura {
    position: absolute;
    inset: 15% 19%;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(53, 119, 246, .16), rgba(48, 189, 206, .06) 43%, transparent 72%);
    filter: blur(17px);
    animation: illustration-breathe 5s ease-in-out infinite;
}

.signal-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.signal-line {
    fill: none;
    stroke: #8bb6e9;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-dasharray: 5 9;
    animation: signal-travel 8s linear infinite;
}

.signal-line--two { stroke: #55c5d4; animation-delay: -2s; }
.signal-line--three { stroke: #9e8cf2; animation-delay: -4s; }
.signal-line--four { stroke: #e9ab55; animation-delay: -6s; }

.fiscal-node {
    position: absolute;
    z-index: 2;
    width: 178px;
    min-height: 58px;
    padding: 9px 10px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    border: 1px solid #d9e5f1;
    border-radius: 11px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 14px 32px rgba(30, 67, 111, .10), 0 2px 6px rgba(30, 67, 111, .04);
    backdrop-filter: blur(12px);
    animation: node-float 4.8s ease-in-out infinite;
}

.fiscal-node--ticket { top: 9px; left: 0; }
.fiscal-node--nacef { top: 5px; right: 0; animation-delay: -1.4s; }
.fiscal-node--smdf { bottom: 8px; left: 0; animation-delay: -2.8s; }
.fiscal-node--qr { right: 0; bottom: 5px; animation-delay: -3.7s; }

.node-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 10px;
}

.node-icon svg,
.device-icon svg,
.shield-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.node-icon--blue { color: #2563eb; border-color: #cfe0ff; background: #eaf2ff; }
.node-icon--cyan { color: #07869b; border-color: #bfe9ef; background: #e8f9fb; }
.node-icon--violet { color: #7654d8; border-color: #ddd2ff; background: #f1edff; }
.node-icon--amber { color: #b86708; border-color: #f3d7aa; background: #fff5e3; }

.fiscal-node > span:nth-child(2) {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.fiscal-node strong {
    overflow: hidden;
    color: #1b304c;
    font-size: 10px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fiscal-node small {
    color: #7a8da4;
    font-size: 8px;
}

.node-check {
    color: #07956c;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.node-live {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #13b887;
    box-shadow: 0 0 0 5px rgba(19, 184, 135, .12);
    animation: node-live 1.8s ease-out infinite;
}

.fiscal-core {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    width: 252px;
    min-height: 154px;
    padding: 15px;
    border: 1px solid #cadbed;
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(244, 249, 255, .96));
    box-shadow: 0 24px 55px rgba(26, 65, 112, .15), 0 3px 10px rgba(26, 65, 112, .06);
    transform: translate(-50%, -50%);
    animation: core-float 5.4s ease-in-out infinite;
}

.core-topline,
.core-device {
    display: flex;
    align-items: center;
}

.core-topline {
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 11px;
    border-bottom: 1px solid #e3ebf4;
}

.core-product {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #46617f;
    font-size: 8px;
    font-weight: 750;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.core-product i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #18b886;
    box-shadow: 0 0 0 4px rgba(24, 184, 134, .10);
}

.core-status {
    padding: 4px 7px;
    border: 1px solid #bfe8d8;
    border-radius: 999px;
    color: #087a5b;
    background: #eafaf3;
    font-size: 7px;
    font-weight: 750;
}

.core-device {
    gap: 11px;
    padding: 14px 0 10px;
}

.device-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border: 1px solid #cde0fb;
    border-radius: 12px;
    color: #2563eb;
    background: linear-gradient(145deg, #edf5ff, #e2efff);
}

.core-device > span:last-child {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.core-device small,
.core-device em {
    color: #7890aa;
    font-size: 7px;
    font-style: normal;
}

.core-device strong {
    color: #1b304c;
    font: 700 9px var(--font-mono);
}

.core-device em {
    color: #087a5b;
    font-weight: 700;
}

.core-progress {
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5edf6;
}

.core-progress span {
    display: block;
    width: 72%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #22b8cf, #18b886);
    animation: fiscal-progress 3.2s ease-in-out infinite;
}

.security-orbit {
    position: absolute;
    top: 50%;
    right: -28px;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
}

.shield-ring {
    position: absolute;
    inset: 0;
    border: 1px dashed rgba(37, 99, 235, .32);
    border-radius: 50%;
    animation: shield-spin 12s linear infinite;
}

.shield-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid #c8dcfb;
    border-radius: 50%;
    color: #2563eb;
    background: #f1f6ff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .15);
}

.data-particle {
    position: absolute;
    z-index: 4;
    width: 6px;
    height: 6px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #2e72eb;
    box-shadow: 0 3px 9px rgba(30, 82, 178, .24);
    animation: particle-drift 4.6s ease-in-out infinite;
}

.data-particle--one { top: 80px; left: 31%; }
.data-particle--two { right: 29%; bottom: 70px; background: #12a5b8; animation-delay: -1.7s; }
.data-particle--three { bottom: 38px; left: 42%; background: #7757d5; animation-delay: -3s; }

@keyframes signal-travel {
    to { stroke-dashoffset: -84; }
}

@keyframes illustration-breathe {
    0%, 100% { opacity: .72; transform: scale(.94); }
    50% { opacity: 1; transform: scale(1.06); }
}

@keyframes node-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes node-live {
    0%, 100% { box-shadow: 0 0 0 4px rgba(19, 184, 135, .12); }
    55% { box-shadow: 0 0 0 8px rgba(19, 184, 135, 0); }
}

@keyframes core-float {
    0%, 100% { transform: translate(-50%, -50%); }
    50% { transform: translate(-50%, calc(-50% - 5px)); }
}

@keyframes fiscal-progress {
    0%, 100% { width: 58%; }
    50% { width: 91%; }
}

@keyframes shield-spin {
    to { transform: rotate(360deg); }
}

@keyframes particle-drift {
    0%, 100% { opacity: .45; transform: translate(0, 0); }
    50% { opacity: 1; transform: translate(8px, -9px); }
}

.fiscal-visual {
    max-width: 660px;
    margin-top: clamp(26px, 3.6vh, 38px);
    border-color: #d8e4f1;
    border-radius: 12px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 22px 54px rgba(31, 61, 101, .11), 0 2px 8px rgba(31, 61, 101, .05);
    backdrop-filter: blur(18px);
}

.visual-toolbar {
    border-bottom-color: #e2eaf3;
    background: #f8fbff;
}

.visual-product {
    color: #243b5a;
}

.visual-product__icon {
    border-color: #cfe0f7;
    color: #2563eb;
    background: #eaf3ff;
}

.live-state {
    color: #087a5b;
}

.visual-body {
    gap: 10px;
    padding: 11px;
}

.fiscal-flow,
.fiscal-proof {
    border-color: #e0e8f2;
    border-radius: 9px;
    background: #fbfdff;
}

.flow-step + .flow-step,
.proof-reference {
    border-color: #e7edf5;
}

.flow-index {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border: 1px solid #d7e5f6;
    border-radius: 7px;
    color: #2563eb;
    background: #edf5ff;
}

.flow-step strong,
.proof-metrics strong {
    color: #20344f;
}

.flow-step small,
.proof-heading span,
.proof-reference span,
.proof-metrics small {
    color: #71839a;
}

.proof-heading strong {
    border-color: #bfe8d8;
    color: #087a5b;
    background: #eafaf3;
}

.proof-reference code {
    color: #34506f;
}

.proof-seal {
    color: #1f5fc4;
    background: #edf5ff;
}

.trust-row {
    gap: 9px;
}

.trust-row > span:not(.trust-row__copy) {
    min-height: 32px;
    padding: 0 9px 0 5px;
    border: 1px solid #dbe5f0;
    border-radius: 7px;
    color: #4f6784;
    background: rgba(255, 255, 255, .72);
}

.trust-row > span:not(.trust-row__copy) svg {
    width: 23px;
    height: 23px;
    padding: 5px;
    border-radius: 6px;
}

.trust-row > span:nth-child(1) svg { color: #087a5b; background: #e7f8f1; }
.trust-row > span:nth-child(2) svg { color: #2563eb; background: #eaf2ff; }
.trust-row > span:nth-child(3) svg { color: #7654d8; background: #f1edff; }

.trust-row__copy {
    color: #71839a;
}

.auth-panel {
    background: transparent;
}

html.dark-mode .login-shell {
    background:
        radial-gradient(circle at 12% 10%, rgba(33, 105, 205, .17), transparent 28%),
        radial-gradient(circle at 48% 82%, rgba(8, 153, 180, .11), transparent 32%),
        radial-gradient(circle at 91% 7%, rgba(64, 95, 168, .10), transparent 25%),
        linear-gradient(145deg, #081426 0%, #0a1b32 58%, #0c2037 100%);
}

html.dark-mode .login-shell::before {
    background-image:
        linear-gradient(rgba(130, 177, 235, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(130, 177, 235, .04) 1px, transparent 1px);
}

html.dark-mode .hero-panel {
    color: #eef6ff;
    border-right-color: transparent;
    background: transparent;
}

html.dark-mode .auth-panel {
    background: transparent;
}

html.dark-mode .fiscal-node,
html.dark-mode .fiscal-core {
    border-color: #29405d;
    background: linear-gradient(145deg, rgba(15, 34, 58, .97), rgba(10, 27, 48, .95));
    box-shadow: 0 20px 48px rgba(0, 0, 0, .28);
}

html.dark-mode .fiscal-node strong,
html.dark-mode .core-device strong {
    color: #e4edf8;
}

html.dark-mode .fiscal-node small,
html.dark-mode .core-device small {
    color: #8197b1;
}

html.dark-mode .core-topline {
    border-bottom-color: #263b57;
}

html.dark-mode .core-product {
    color: #a8bdd5;
}

html.dark-mode .core-progress {
    background: #263b57;
}

html.dark-mode .shield-icon {
    border-color: #385b88;
    color: #77aaff;
    background: #132c4c;
}

html.dark-mode .brand-mark,
html.dark-mode .compliance-kicker,
html.dark-mode .trust-row > span:not(.trust-row__copy) {
    border-color: rgba(142, 183, 232, .17);
    background: rgba(255, 255, 255, .055);
    box-shadow: none;
}

html.dark-mode .brand-company,
html.dark-mode .hero-lead,
html.dark-mode .trust-row__copy {
    color: #91a7c2;
}

html.dark-mode .brand-product,
html.dark-mode .hero-content h1 {
    color: #f4f8fd;
}

html.dark-mode .compliance-kicker,
html.dark-mode .trust-row > span:not(.trust-row__copy) {
    color: #aec3dc;
}

html.dark-mode .fiscal-visual {
    border-color: #263b57;
    background: rgba(10, 24, 43, .92);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
}

html.dark-mode .visual-toolbar,
html.dark-mode .fiscal-flow,
html.dark-mode .fiscal-proof {
    border-color: #263b57;
    background: rgba(255, 255, 255, .025);
}

html.dark-mode .visual-product,
html.dark-mode .flow-step strong,
html.dark-mode .proof-metrics strong {
    color: #dbe8f8;
}

html.dark-mode .flow-index {
    border-color: rgba(82, 153, 255, .18);
    color: #69a9ff;
    background: rgba(50, 113, 232, .10);
}

html.dark-mode .proof-reference code {
    color: #bad1ec;
}

@media (max-width: 1180px) {
    .login-shell {
        grid-template-columns: minmax(500px, 1fr) minmax(420px, .82fr);
    }

    .hero-layout {
        padding-inline: 44px;
    }

    .hero-content h1 {
        font-size: clamp(42px, 4.8vw, 56px);
    }

    .fiscal-node {
        width: 148px;
        grid-template-columns: 34px minmax(0, 1fr) auto;
        gap: 7px;
        padding-inline: 7px;
    }

    .node-icon {
        width: 34px;
        height: 34px;
    }

    .fiscal-core {
        width: 216px;
        padding: 13px;
    }

    .trust-row__copy {
        display: none;
    }
}

@media (max-width: 1050px) and (min-width: 961px) {
    .fiscal-node {
        width: 48px;
        min-height: 48px;
        padding: 6px;
        grid-template-columns: 1fr;
    }

    .fiscal-node > span:nth-child(2),
    .fiscal-node > i {
        display: none;
    }

    .fiscal-core {
        width: 228px;
    }
}

@media (max-width: 960px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        min-height: auto;
    }

    .hero-layout {
        width: 100%;
        min-height: auto;
        padding: 18px clamp(20px, 5vw, 42px);
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
    }

    .hero-content {
        display: none;
    }

    .trust-row {
        min-height: 42px;
        margin-left: auto;
    }

    .auth-panel {
        min-height: calc(100vh - 79px);
        min-height: calc(100dvh - 79px);
        padding: 68px 24px 24px;
    }

    .auth-card {
        width: min(100%, 460px);
    }

    .auth-footer {
        width: min(100%, 460px);
    }
}

@media (max-width: 620px) {
    .hero-panel {
        display: none;
    }

    .auth-panel {
        min-height: 100vh;
        min-height: 100dvh;
        justify-content: flex-start;
        padding: 18px 18px 22px;
    }

    .theme-toggle {
        top: 20px;
        right: 18px;
        width: 36px;
        min-height: 36px;
        justify-content: center;
        padding: 0;
    }

    .theme-toggle span {
        display: none;
    }

    .mobile-brand {
        width: 100%;
        min-height: 40px;
        display: flex;
        margin-bottom: clamp(34px, 8vh, 64px);
        padding-right: 46px;
    }

    .mobile-brand .brand-mark {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-color: var(--auth-border);
        background: var(--auth-surface-solid);
        box-shadow: 0 5px 16px rgba(15, 23, 42, .08);
    }

    .mobile-brand .brand-mark img {
        width: 24px;
        height: 24px;
    }

    .mobile-brand > span:last-child {
        display: grid;
        gap: 2px;
    }

    .mobile-brand strong {
        color: var(--auth-text);
        font-size: 13px;
        font-weight: 720;
    }

    .mobile-brand small {
        color: var(--auth-subtle);
        font-size: 9px;
    }

    .auth-card {
        width: 100%;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    .auth-card h2 {
        font-size: 31px;
    }

    #resetView .back-button {
        margin-bottom: 18px;
    }

    #resetView h2 {
        font-size: 29px;
    }

    .auth-intro {
        margin-bottom: 24px;
    }

    .auth-footer {
        width: 100%;
        margin-top: auto;
        padding-top: 34px;
    }
}

@media (max-width: 380px) {
    .auth-panel {
        padding-inline: 14px;
    }

    .theme-toggle {
        right: 14px;
    }

    .form-options > span {
        max-width: 120px;
    }

    .auth-footer span:last-child {
        display: none;
    }
}

@media (max-height: 760px) and (min-width: 961px) {
    .hero-layout {
        padding-top: 26px;
        padding-bottom: 20px;
    }

    .hero-content {
        padding-block: 24px 18px;
    }

    .hero-content h1 {
        font-size: clamp(40px, 4.3vw, 56px);
    }

    .hero-lead {
        margin-top: 14px;
        line-height: 1.55;
    }

    .fiscal-visual {
        margin-top: 24px;
    }

    .fiscal-illustration {
        height: 250px;
        margin-top: 20px;
    }

    .fiscal-node--smdf,
    .fiscal-node--qr {
        bottom: 0;
    }

    .auth-panel {
        padding-top: 62px;
        padding-bottom: 20px;
    }

    .auth-card {
        padding: 28px 34px;
    }

    .auth-intro {
        margin-bottom: 20px;
    }

    .field-group {
        margin-bottom: 13px;
    }

    .security-note {
        margin-top: 19px;
        padding-top: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
