:root {
    /* Care / newaccount — slate hero + system primary #ff4d00 */
    --brand: #ff4d00;
    --brand-700: #e64500; /* hover / pressed */
    --brand-500: #ff7133; /* lighter accent */
    --brand-rgb: 255, 77, 0;

    /* Left panel: dark warm base (orangy, not blue-slate) */
    --lp-slate: #1c120d;
    --lp-slate-mid: #2a1a12;

    --palette-orange-900: #7c2d12;
    --palette-orange-800: var(--brand-700);
    --palette-orange-700: var(--brand-700);
    --palette-orange-600: var(--brand);
    --palette-orange-500: var(--brand-500);
    --palette-amber: var(--brand);

    /* Hero panel gradient — deep amber / burnt orange */
    --lp-grad-from: #3b2418;
    --lp-grad-mid:  #2a1810;
    --lp-grad-to:   #1a0f0a;

    /* Legacy names (wizard steps, etc.) */
    --palette-purple: var(--brand);
    --palette-blue:   var(--brand-700);
    --palette-cyan:   var(--brand-500);
    --palette-coral:  #fb7185;

    --base:     #f9fafb;
    --surface:  #ffffff;
    --accent:   var(--brand);

    --violet:   var(--accent);
    --purple:   var(--accent);
    --cyan:     var(--brand-500);
    --teal:     var(--brand-500);
    --grad:     var(--brand-700);
    --grad-soft: linear-gradient(135deg, rgba(var(--brand-rgb), 0.08) 0%, rgba(var(--brand-rgb), 0.05) 100%);

    --white:   #ffffff;
    --off:     #f9fafb;
    --glass:   rgba(255,255,255,0.72);
    --glass2:  #ffffff;

    /* Improved text colors for better accessibility */
    --ink:     #0d1524; /* Darker for better contrast (7.5:1 against white) */
    --ink2:    #2d3748; /* Improved contrast (5.7:1 against white) */
    --ink3:    #4a5568; /* Better for small text (4.8:1 against white) */
    --border:  rgba(var(--brand-rgb), 0.28);
    --border2: rgba(var(--brand-rgb), 0.22);

    --shadow-sm: 0 2px 8px rgba(var(--brand-rgb), 0.07);
    --shadow-lg: 0 24px 80px rgba(var(--brand-rgb), 0.09), 0 8px 32px rgba(var(--brand-rgb), 0.06);
    --shadow-card: 0 4px 6px -1px rgba(16, 24, 40, 0.06), 0 0 0 1px rgba(var(--brand-rgb), 0.1);
    
    /* Additional accessibility variables */
    --focus-ring: 0 0 0 3px rgba(var(--brand-rgb), 0.4);
    --error-color: #dc2626;
    --success-color: #059669;
}

/* ══════════════════════════════════════════════════════
   RESET & BASE
══════════════════════════════════════════════════════ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100vw;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

body {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background: var(--base);
}

/* ══════════════════════════════════════════════════════
   ANIMATED BLOBS
══════════════════════════════════════════════════════ */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
    animation: blobDrift 12s ease-in-out infinite alternate;
}
.blob-1 { width: 600px; height: 600px; top: -150px;  left: -100px; background: rgba(var(--brand-rgb), 0.12); animation-delay: 0s;  }
.blob-2 { width: 500px; height: 500px; bottom: -100px; right: -80px; background: rgba(var(--brand-rgb), 0.08); animation-delay: -5s; }
.blob-3 { width: 350px; height: 350px; top: 40%;     left: 35%;    background: rgba(16, 24, 40, 0.06); animation-delay: -9s; }

@keyframes blobDrift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(30px, 20px) scale(1.06); }
}

/* ══════════════════════════════════════════════════════
   PAGE LAYOUT
══════════════════════════════════════════════════════ */
.page {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
}

/* ══════════════════════════════════════════════════════
   LEFT PANEL
══════════════════════════════════════════════════════ */
.lp {
    width: 45%;
    flex-shrink: 0;
    align-self: stretch;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 32px 40px;
    position: relative;
    overflow: hidden;
    /* Slate hero panel (newaccount LoginClient) */
    background: linear-gradient(165deg, var(--lp-grad-from) 0%, var(--lp-grad-mid) 55%, var(--lp-grad-to) 100%);
}

.lp::before { content: none; }

.lp::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.3) 50%, transparent);
    pointer-events: none;
}

.lp-mesh {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at -5% -10%, rgba(var(--brand-rgb), 0.18) 0%, transparent 45%),
        radial-gradient(circle at 105% 105%, rgba(var(--brand-rgb), 0.10) 0%, transparent 50%),
        radial-gradient(circle at 50% 45%, rgba(var(--brand-rgb), 0.08) 0%, transparent 42%),
        radial-gradient(ellipse 120% 80% at 20% 90%, rgba(var(--brand-rgb), 0.06) 0%, transparent 55%);
}

.lp-circle {
    position: absolute;
    width: 480px; height: 480px;
    border-radius: 50%;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255,255,255,0.08);
    pointer-events: none;
}

.lp-circle-2 {
    position: absolute;
    width: 320px; height: 320px;
    border-radius: 50%;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255,255,255,0.06);
    pointer-events: none;
}

/* Brand */
.lp-brand {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 14px;
    animation: slideDown .7s cubic-bezier(.22,1,.36,1) both;
}

.lp-brand-img {
    width: 70px; height: 70px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 1.5px solid rgba(255,255,255,0.45);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.12) inset,
        0 4px 18px rgba(0,0,0,0.35),
        0 0 28px rgba(var(--brand-rgb), 0.35),
        0 0 48px rgba(var(--brand-rgb), 0.2);
    animation: lpBrandGlow 3.5s ease-in-out infinite;
}

.lp-brand-img img { width: 58px; height: 58px; object-fit: contain; }

.lp-brand-name {
    font-family: 'Sora', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 1px 8px rgba(0,0,0,0.2);
}

.lp-brand-loc {
    font-size: 14px;
    font-weight: 400;
    color: #9ca3af;
    margin-top: 3px;
}

/* Hero content */
.lp-hero {
    position: relative;
    z-index: 2;
    animation: slideUp .8s cubic-bezier(.22,1,.36,1) .1s both;
}

.lp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(var(--brand-rgb), 0.1);
    border: 1px solid rgba(var(--brand-rgb), 0.3);
    border-radius: 100px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.lp-eyebrow-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(var(--brand-rgb), 0.55);
}

.lp-h1 {
    font-family: 'Sora', sans-serif;
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    line-height: 1.12;
    letter-spacing: -.03em;
    margin-bottom: 14px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.lp-h1 span {
    display: block;
    color: var(--accent);
}

.lp-p {
    font-size: 14px;
    font-weight: 400;
    color: #9ca3af;
    line-height: 1.6;
    max-width: 300px;
    margin-bottom: 24px;
}

/* Feature cards */
.lp-cards { display: flex; flex-direction: column; gap: 8px; }

.lp-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 10px 14px;
    backdrop-filter: blur(8px);
    transition: background .2s, transform .2s, box-shadow .2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.lp-card:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.lp-card-ico {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(var(--brand-rgb), 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lp-card-ico svg {
    width: 18px; height: 18px;
    stroke: var(--accent); fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lp-card-text strong { display: block; font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 2px; }
.lp-card-text span   { font-size: 12px; color: #d1d5db; }

/* Contact footer */
.lp-foot {
    position: relative;
    z-index: 2;
    animation: slideUp .8s cubic-bezier(.22,1,.36,1) .2s both;
}

.lp-contact {
    background: linear-gradient(
        145deg,
        rgba(var(--brand-rgb), 0.22) 0%,
        rgba(255, 255, 255, 0.1) 55%,
        rgba(251, 146, 60, 0.08) 100%
    );
    border: 1px solid rgba(251, 146, 60, 0.35);
    border-radius: 14px;
    padding: 16px 20px;
    backdrop-filter: blur(8px);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    gap: 16px;
}

.lp-contact-sep  { width: 1px; height: 32px; background: rgba(251, 146, 60, 0.35); }
.lp-contact-item { font-size: 12.5px; color: rgba(255, 248, 240, 0.92); line-height: 1.6; }
.lp-contact-item strong {
    display: block;
    font-size: 13px;
    color: #fff7ed;
    font-weight: 600;
    margin-bottom: 1px;
}

/* ══════════════════════════════════════════════════════
   RIGHT PANEL
══════════════════════════════════════════════════════ */
.rp {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 32px 38px;
    position: relative;
    z-index: 1;
    /* 60% base */
    background: var(--base);
    overflow-y: auto;
}

.rp-login {
    justify-content: flex-start;
    padding: 24px 32px calc(38px + 24px);
    box-sizing: border-box;
}

.rp-login .rc {
    margin-top: auto;
    margin-bottom: auto;
    flex-shrink: 0;
}

/* Card — white on gray-50, brand border (newaccount LoginClient) */
.rc {
    width: 100%;
    max-width: 460px;
    background: var(--surface);
    border-radius: 24px;
    border: 1.5px solid rgba(var(--brand-rgb), 0.3);
    box-shadow:
        0 4px 6px -1px rgba(16, 24, 40, 0.07),
        0 2px 4px -2px rgba(16, 24, 40, 0.05),
        0 0 0 1px rgba(var(--brand-rgb), 0.1);
    padding: 32px 32px 28px;
    position: relative;
    animation: cardIn .9s cubic-bezier(.22,1,.36,1) .08s both;
}

.rc #login-form,
.rc .verification-container,
.rc #verification-form {
    background: var(--surface);
}

.rc-tab {
    position: absolute;
    top: 0; left: 44px; right: 44px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: var(--accent);
}

/* Logo in card */
.rc-logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 18px;
}

.rc-logo-ring {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--accent);
    padding: 3px;
    box-shadow: 0 8px 32px rgba(var(--brand-rgb), 0.35);
    margin-bottom: 12px;
    animation: popIn .6s cubic-bezier(.34,1.56,.64,1) .3s both;
    transition: transform .3s, box-shadow .3s;
}

.rc-logo-ring:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(var(--brand-rgb), 0.5);
}

.rc-logo-inner {
    width: 100%; height: 100%;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rc-logo-inner img { width: 66px; height: 66px; object-fit: contain; }

/* New company wizard — same card as login (.rc), centered in panel like login */
.rp-register {
    justify-content: center;
    align-items: center;
    align-self: stretch;
    padding: 24px 32px 38px;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    width: 100%;
}

.rp-register .rc-register {
    margin-left: auto;
    margin-right: auto;
    flex: 0 1 auto;
    width: 100%;
    max-width: 460px;
    align-self: center;
}

.rp-register .rc-register-heading {
    margin-bottom: 16px;
}

.rp-register .rc-title {
    font-size: 22px;
    margin-bottom: 3px;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.rp-register .rc-sub {
    font-size: 14px;
    line-height: 1.4;
}

.rp-register .rc-alert {
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 13px;
    border-radius: 10px;
}

.rp-register .steps {
    margin-bottom: 10px;
}

.rp-register .step-item:not(:last-child)::after {
    top: 13px;
    left: calc(50% + 15px);
    right: calc(-50% + 15px);
    height: 2px;
}

.rp-register .step-num {
    width: 28px;
    height: 28px;
    font-size: 12px;
    border-width: 1.5px;
}

.rp-register .step-item.active .step-num {
    box-shadow: 0 2px 10px rgba(var(--brand-rgb), 0.35);
}

.rp-register .step-label {
    font-size: 9px;
    margin-top: 4px;
    letter-spacing: .04em;
}

.rp-register .rc-div {
    margin: 6px 0 8px;
    gap: 8px;
}

.rp-register .rc-div-text {
    font-size: 10px;
}

.rp-register .rc-register-foot {
    margin: 8px 0 6px;
}

.rp-register .fg {
    margin-bottom: 10px;
}

.rp-register .fl {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    letter-spacing: 0.01em;
}

.rp-register .fi-inp {
    height: 44px;
    font-size: 14px;
    line-height: 1.2;
    border-radius: 12px;
    padding: 0 14px 0 44px;
    border-width: 1.5px;
}

.rp-register .fi {
    left: 14px;
    width: 18px;
    height: 18px;
}

.rp-register .fw .fi-inp {
    padding-left: 44px !important;
}

/* VAT / plain numeric field — no leading icon */
.rp-register .vat-rate-wrap .fi-inp {
    padding-left: 16px !important;
}

.rp-register .f-err {
    font-size: 12.5px;
    margin-top: 4px;
}

.rp-register .fw-pair {
    gap: 8px;
}

.rp-register .vat-row {
    gap: 8px;
    margin-bottom: 2px;
}

.rp-register .vat-label {
    font-size: 12px;
}

.rp-register .step-nav {
    margin-top: 12px;
    gap: 10px;
}

.rp-register .btn-step {
    height: 44px;
    font-size: 14px;
    border-radius: 12px;
}

.rp-register .btn-step-next svg {
    width: 15px;
    height: 15px;
}

.rp-register .btn-step-back {
    width: 100px;
    height: 44px;
    font-size: 14px;
}

.rp-register .btn-step-back svg {
    width: 14px;
    height: 14px;
}

.rp-register .btn-newco--register {
    height: 44px;
    font-size: 13px;
    margin-top: 0;
    margin-bottom: 6px;
    border-radius: 12px;
}

.rp-register .btn-newco--register svg {
    width: 16px;
    height: 16px;
}

.rp-register .rc-copy {
    margin-top: 0;
    font-size: 10px;
}

.rc-title {
    font-family: 'Sora', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -.025em;
    margin-bottom: 3px;
}

.rc-sub  { font-size: 14px; color: var(--ink2); font-weight: 400; }
.rc-copy {
    text-align: center;
    font-size: 12px;
    color: rgba(120, 53, 15, 0.55);
    margin-top: 14px;
}

/* Divider */
.rc-div {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}

.rc-div-line { flex: 1; height: 1px; background: var(--border); }
.rc-div-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink3);
    letter-spacing: .07em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Session alert */
.rc-alert {
    padding: 10px 14px;
    margin-bottom: 12px;
    background: rgba(var(--brand-rgb), 0.08);
    border: 1px solid rgba(var(--brand-rgb), 0.2);
    border-left: 3px solid var(--accent);
    border-radius: 10px;
    font-size: 13px;
    color: var(--ink2);
}

/* ══════════════════════════════════════════════════════
   FORM FIELDS
══════════════════════════════════════════════════════ */
.fg { margin-bottom: 16px; }

.fl {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink2);
    margin-bottom: 8px;
}

.fw  { position: relative; }

.fi {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    stroke: var(--ink3); fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
    z-index: 5;
    transition: stroke .2s;
}

.fw:focus-within .fi { stroke: var(--accent); }

.fi-inp {
    display: block;
    width: 100%;
    height: 46px;
    padding: 0 16px 0 44px;
    border: 1.5px solid #e4e7ec;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    color: var(--ink);
    background: #ffffff;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.fi-inp:hover {
    border-color: rgba(var(--brand-rgb), 0.5);
}

.fi-inp::placeholder            { color: #98a2b3; }
.fi-inp:focus                   { border-color: var(--accent); background: #ffffff; box-shadow: var(--focus-ring); }
.has-error .fi-inp              { border-color: var(--error-color); }
.has-error .fi-inp:hover        { border-color: var(--error-color); }
.has-error .fi-inp:focus        { border-color: var(--error-color); box-shadow: 0 0 0 5px rgba(220, 38, 38, 0.2); }
.f-err                          { font-size: 13px; color: var(--error-color); margin-top: 5px; }

/* ══════════════════════════════════════════════════════
   SELECT2
══════════════════════════════════════════════════════ */
.s2-fw                          { position: relative; }
.s2-fw .fi                      { z-index: 10; }
.select2-container              { width: 100% !important; }

.select2-container--default .select2-selection--single {
    height: 46px !important;
    border: 1.5px solid var(--border2) !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    padding-left: 44px !important;
    padding-right: 44px !important;
    outline: none !important;
    transition: border-color .2s, box-shadow .2s !important;
}

.select2-container--default .select2-selection--single:hover {
    border-color: rgba(var(--brand-rgb), 0.5) !important;
}

.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--accent) !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 5px rgba(var(--brand-rgb), 0.3) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--ink) !important;
    font-size: 14px !important;
    font-family: 'DM Sans', sans-serif !important;
    padding: 0 !important;
    line-height: 44px !important;
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder { color: #98a2b3 !important; }

.select2-container--default .select2-selection--single .select2-selection__arrow {
    position: absolute !important;
    right: 12px !important; top: 50% !important;
    transform: translateY(-50%) !important;
    height: auto !important; width: 16px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--ink3) transparent transparent !important;
    border-width: 5px 4px 0 !important;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute !important;
    right: 32px !important; top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important; float: none !important;
    font-size: 18px !important; line-height: 1 !important;
    color: var(--ink3) !important; font-weight: 300 !important;
}

.select2-dropdown {
    border: 1.5px solid var(--border2) !important;
    border-radius: 14px !important;
    box-shadow: var(--shadow-lg) !important;
    overflow: hidden;
    margin-top: 4px;
    font-family: 'DM Sans', sans-serif !important;
    background: rgba(255,255,255,0.96) !important;
    backdrop-filter: blur(16px) !important;
}

.select2-search--dropdown { padding: 8px !important; }

.select2-search--dropdown .select2-search__field {
    border: 1.5px solid var(--border2) !important;
    border-radius: 10px !important;
    padding: 9px 13px !important;
    font-family: 'DM Sans', sans-serif !important;
    font-size: 14px !important;
    outline: none !important;
}

.select2-search--dropdown .select2-search__field:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.2) !important;
}

.select2-results__option {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 14px !important;
    padding: 11px 16px !important;
    color: var(--ink) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--accent) !important;
    color: #fff !important;
}

/* ══════════════════════════════════════════════════════
   TOGGLE / SWITCH
══════════════════════════════════════════════════════ */
.ftog     { display: flex; align-items: center; gap: 10px; margin: 4px 0 16px; }
.ftog-lbl { font-size: 14px; color: var(--ink2); cursor: pointer; }

.sw       { position: relative; width: 38px; height: 21px; display: inline-block; flex-shrink: 0; }
.sw input { display: none; }

.sw-t {
    position: absolute; inset: 0;
    border-radius: 21px;
    background: #E2E8F0;
    cursor: pointer;
    transition: background .22s;
}

.sw-t::after {
    content: '';
    position: absolute;
    left: 3px; top: 3px;
    width: 15px; height: 15px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.18);
    transition: transform .22s;
}

.sw input:checked ~ .sw-t          { background: var(--accent); }
.sw input:checked ~ .sw-t::after   { transform: translateX(17px); }

/* ══════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════ */
.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%; height: 48px;
    background: var(--accent);
    color: #fff; border: none;
    border-radius: 12px;
    font-size: 15px; font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer; letter-spacing: .01em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform .18s, box-shadow .18s;
    margin-bottom: 8px;
    position: relative; overflow: hidden;
}

.btn-login::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 60%);
    pointer-events: none;
}

.btn-login svg {
    width: 18px; height: 18px;
    stroke: #fff; fill: none;
    stroke-width: 2.5;
    stroke-linecap: round; stroke-linejoin: round;
    flex-shrink: 0;
}

.btn-login:hover  {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    background: var(--brand-700);
}
.btn-login:active { transform: translateY(0); }

/* Loading state for login button */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.85;
    cursor: not-allowed;
}

.btn-login.loading > * {
    opacity: 0;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: button-spin 0.8s linear infinite;
    z-index: 1;
}

@keyframes button-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-newco {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%; height: 44px;
    background: transparent;
    color: var(--ink2);
    border: 1.5px solid var(--border2);
    border-radius: 12px;
    font-size: 14px; font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer; text-decoration: none;
    transition: background .18s, border-color .18s, box-shadow .18s;
}

.btn-newco svg {
    width: 17px; height: 17px;
    stroke: var(--ink2); fill: none;
    stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
}

.btn-newco:hover { background: rgba(0,0,0,0.04); border-color: var(--ink3); box-shadow: var(--shadow-sm); }

/* ══════════════════════════════════════════════════════
   STATUS BAR
══════════════════════════════════════════════════════ */
.statusbar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 10;
    min-height: 38px;
    padding: 6px 24px;
    background: linear-gradient(
        180deg,
        rgba(52, 30, 20, 0.96) 0%,
        rgba(26, 15, 10, 0.99) 100%
    );
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(251, 146, 60, 0.28);
    box-shadow: 0 -8px 32px rgba(120, 53, 15, 0.12);
    display: flex;
    align-items: center;
    gap: 0;
}

.sb-l { display: flex; align-items: center; gap: 14px; flex: 1; overflow: hidden; min-width: 0; }
.sb-r { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.sb-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    line-height: 1.35;
    color: #ffedd5;
    white-space: nowrap;
    font-family: 'DM Sans', sans-serif;
}

.sb-item svg {
    width: 13px; height: 13px;
    stroke: rgba(251, 191, 36, 0.75);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
    flex-shrink: 0;
}

.sb-item strong { font-weight: 600; color: #fffbeb; }
.sb-sep         { width: 1px; height: 16px; background: rgba(251, 146, 60, 0.35); flex-shrink: 0; }

.sb-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(var(--brand-rgb), 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    font-family: 'DM Sans', sans-serif;
}

.sb-badge-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--brand-500); box-shadow: 0 0 6px rgba(var(--brand-rgb), 0.5); }

.sb-err         { color: #FCA5A5 !important; }
.sb-err svg     { stroke: #FCA5A5 !important; }
.sb-err strong  { color: #FCA5A5 !important; }
.sb-warn { color: #fde68a !important; }
.sb-warn svg { stroke: #fde68a !important; }
.sb-warn strong { color: #fef08a !important; }

.sb-expiring-note {
    font-size: 11px;
    font-weight: 600;
    color: #fef9c3;
}

/* ══════════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════════ */
@keyframes lpBrandGlow {
    0%, 100% {
        box-shadow:
            0 0 0 1px rgba(255,255,255,0.12) inset,
            0 4px 18px rgba(0,0,0,0.35),
            0 0 26px rgba(var(--brand-rgb), 0.38),
            0 0 48px rgba(var(--brand-rgb), 0.22);
    }
    50% {
        box-shadow:
            0 0 0 1px rgba(255,255,255,0.15) inset,
            0 4px 18px rgba(0,0,0,0.35),
            0 0 36px rgba(var(--brand-rgb), 0.5),
            0 0 64px rgba(var(--brand-rgb), 0.3);
    }
}

@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp   { from { opacity: 0; transform: translateY(24px);  } to { opacity: 1; transform: translateY(0); } }
@keyframes cardIn    { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes popIn     { from { opacity: 0; transform: scale(.6); }  to { opacity: 1; transform: scale(1); } }

/* ══════════════════════════════════════════════════════
   RESPONSIVE — ≤ 820px
══════════════════════════════════════════════════════ */
@media (max-width: 820px) {
    html, body {
        overflow-x: hidden;
        overflow-y: hidden;
        height: 100vh;
        height: 100dvh;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .page {
        flex-direction: column;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: hidden;
    }

    .lp {
        width: 100%;
        padding: 20px 20px 18px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        min-height: unset;
        background: linear-gradient(135deg, var(--lp-grad-from) 0%, var(--lp-grad-mid) 100%);
    }

    .lp::after                          { display: none; }
    .lp-circle, .lp-circle-2, .lp-mesh { display: none; }
    .lp-hero, .lp-foot                 { display: none; }

    .lp-brand          { animation: none; }
    .lp-brand-img      { width: 48px; height: 48px; border-radius: 50%; }
    .lp-brand-img img  { width: 38px; height: 38px; }
    .lp-brand-name     { font-size: 16px; }
    .lp-brand-loc      { font-size: 12px; }

    .rp {
        flex: 1;
        width: 100%;
        min-width: 0;
        min-height: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 20px 16px 38px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }

    .rc {
        width: 100%;
        max-width: 100%;
        padding: 28px 24px 24px;
        border-radius: 20px;
        margin: 0;
    }

    .rc-logo-ring      { width: 70px; height: 70px; }
    .rc-logo-inner img { width: 58px; height: 58px; }
    .rp-register {
        padding: 20px 16px 38px;
        justify-content: center;
    }
    .rp-register .rc-register {
        max-width: 100%;
    }
    .rc-title          { font-size: 22px; }
    .rc-sub            { font-size: 14px; margin-bottom: 20px; }
    .fi-inp            { height: 48px; font-size: 15px; }
    .btn-login         { height: 50px; font-size: 15px; }
    .btn-newco         { height: 46px; font-size: 14px; }
    
    /* Improve form spacing for mobile */
    .fg {
        margin-bottom: 18px;
    }
    
    .fl {
        margin-bottom: 8px;
    }
    
    /* Better touch handling for select2 */
    .select2-container--default .select2-selection--single {
        height: 48px;
    }
    
    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 48px;
        font-size: 15px;
    }
    
    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 48px;
    }
    
    /* Reduce hover effects for touch devices */
    .lp-card:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    }
    
    .rc-logo-ring:hover {
        transform: scale(1.02);
        box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.4);
    }
    
    /* Improve focus states for touch */
    .fi-inp:focus {
        box-shadow: 0 0 0 4px rgba(var(--brand-rgb), 0.25);
    }
}

@media (max-width: 400px) {
    .rp            { padding: 16px 12px 38px; }
    .rc            { padding: 20px 16px 18px; }
    .lp-brand-name { font-size: 13px; }
    
    /* Improve touch targets */
    .fi-inp        { height: 46px; font-size: 15px; }
    .btn-login     { height: 48px; font-size: 15px; }
    .btn-newco     { height: 44px; font-size: 14px; }
    
    /* Reduce hover effects for touch devices */
    .lp-card:hover {
        transform: none;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }
    
    .rc-logo-ring:hover {
        transform: none;
        box-shadow: 0 0 0 2px rgba(var(--brand-rgb), 0.3);
    }
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE — ≤ 320px (very small screens)
   ══════════════════════════════════════════════════════ */
@media (max-width: 320px) {
    .rp            { padding: 12px 8px 32px; }
    .rc            { padding: 18px 14px 16px; border-radius: 16px; }
    
    .rc-logo-ring      { width: 60px; height: 60px; }
    .rc-logo-inner img { width: 50px; height: 50px; }
    
    .rc-title          { font-size: 18px; }
    .rc-sub            { font-size: 12px; }
    
    .fi-inp            { height: 44px; font-size: 14px; }
    .btn-login         { height: 46px; font-size: 14px; }
    .btn-newco         { height: 42px; font-size: 13px; }
    
    /* Stack form labels above inputs for better space usage */
    .fg {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .fl {
        margin-bottom: 6px;
        width: 100%;
    }
    
    .fi {
        width: 100%;
    }
    
    /* Adjust company selection for very small screens */
    .select2-container--default .select2-selection--single {
        height: 44px;
    }
    
    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 44px;
        font-size: 14px;
    }
    
    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 44px;
    }
}

/* ══════════════════════════════════════════════════════
   STEP INDICATOR  (new-company wizard)
══════════════════════════════════════════════════════ */
.steps {
    display: flex;
    align-items: flex-start;
    margin-bottom: 28px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    left: calc(50% + 20px);
    right: calc(-50% + 20px);
    height: 2px;
    background: var(--border2);
    z-index: 0;
    transition: background .3s;
}

.step-item.done::after { background: var(--violet); }

.step-num {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #fff4ed;
    border: 2px solid var(--border2);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700;
    color: var(--ink3);
    position: relative; z-index: 1;
    transition: all .25s;
}

.step-item.active .step-num {
    background: var(--accent);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(var(--brand-rgb), 0.38);
}

.step-item.done .step-num {
    background: var(--ink3);
    border-color: transparent;
    color: #fff;
}

.step-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--ink3);
    margin-top: 7px;
    text-align: center;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.step-item.active .step-label { color: var(--accent); }
.step-item.done  .step-label  { color: var(--ink2); }

/* ══════════════════════════════════════════════════════
   STEP PANELS
══════════════════════════════════════════════════════ */
.step-panel          { display: none; }
.step-panel.active   { display: block; }

/* Guard: prevent third-party CSS (e.g. datepicker3.css .datepicker{padding:4px})
   from collapsing the icon padding on any input inside a .fw wrapper */
.fw .fi-inp { padding-left: 44px !important; }

/* ══════════════════════════════════════════════════════
   PAIRED INPUTS  (date BS / AD side by side)
══════════════════════════════════════════════════════ */
.fw-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ══════════════════════════════════════════════════════
   VAT ROW
══════════════════════════════════════════════════════ */
.vat-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vat-label {
    font-size: 14px;
    color: var(--ink2);
    white-space: nowrap;
    flex-shrink: 0;
}

.vat-rate-wrap      { flex: 1; }
.vat-rate-wrap .fi-inp { padding-left: 16px; }

/* ══════════════════════════════════════════════════════
   STEP NAV BUTTONS
══════════════════════════════════════════════════════ */
.step-nav {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-step {
    flex: 1; height: 50px;
    border-radius: 12px;
    font-size: 15px; font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: transform .18s, box-shadow .18s, background .18s;
    border: none;
    text-decoration: none;
}

.btn-step-next {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 6px 20px rgba(var(--brand-rgb), 0.35);
    position: relative; overflow: hidden;
}

.btn-step-next::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
    pointer-events: none;
}

.btn-step-next svg { width: 17px; height: 17px; stroke: #fff; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.btn-step-next:hover  { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(var(--brand-rgb), 0.42); }
.btn-step-next:active { transform: translateY(0); }

.btn-step-back {
    background: transparent;
    color: var(--ink2);
    border: 1.5px solid var(--border2) !important;
    flex: 0 0 auto;
    width: 120px;
}

.btn-step-back svg { width: 16px; height: 16px; stroke: var(--ink2); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.btn-step-back:hover { background: rgba(0,0,0,0.04); border-color: var(--ink3) !important; }

.btn-step-back[hidden], .btn-step-back.hidden { display: none !important; }

@media (max-width: 820px) {
    .fw-pair     { grid-template-columns: 1fr 1fr; gap: 8px; }
    .step-label  { display: none; }
}

@media (max-width: 440px) {
    .fw-pair { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════
   VERIFICATION CODE INPUTS
══════════════════════════════════════════════════════ */
.verification-container {
    width: 100%;
}

.verification-code-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.verification-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.verification-input {
    width: 50px;
    height: 60px;
    border: 2px solid var(--border2);
    border-radius: 12px;
    background: #fff4ed;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
    color: var(--ink);
    outline: none;
    transition: all 0.2s;
}

.verification-input:focus {
    border-color: var(--accent);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(var(--brand-rgb), 0.22);
    transform: scale(1.05);
}

.verification-input:invalid {
    border-color: var(--border2);
}

.verification-input.filled {
    border-color: var(--accent);
    background: #ffffff;
}

.verification-input.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

@media (max-width: 820px) {
    .verification-inputs {
        gap: 8px;
        margin: 16px 0;
    }
    
    .verification-input {
        width: 44px;
        height: 54px;
        font-size: 20px;
    }
}

@media (max-width: 400px) {
    .verification-inputs {
        gap: 6px;
    }
    
    .verification-input {
        width: 40px;
        height: 50px;
        font-size: 18px;
    }
}