:root {
    --kg-navy: #14243f;
    --kg-navy-deep: #0d1930;
    --kg-pink: #d82f76;
    --kg-pink-dark: #bd2865;
    --kg-ink: #172641;
    --kg-muted: #6e7788;
    --kg-line: #e3e6ed;
    --kg-paper: #faf9fc;
}

body.brand-page {
    margin: 0;
    background: var(--kg-paper);
    color: var(--kg-ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
.brand-page *, .brand-page *::before, .brand-page *::after { box-sizing: border-box; }
.brand-page h1, .brand-page h2, .brand-page h3, .brand-page h4 {
    color: var(--kg-ink) !important;
    font-family: inherit !important;
    letter-spacing: -.045em;
    line-height: 1.12;
}
.brand-page a { color: var(--kg-pink-dark); text-decoration: none; }
.brand-page a:hover { color: var(--kg-pink-dark); text-decoration: none; }
.brand-page a:focus-visible, .brand-page button:focus-visible, .brand-page input:focus-visible, .brand-page select:focus-visible {
    outline: 3px solid var(--kg-pink);
    outline-offset: 4px;
}
.kg-skip { position: absolute; top: -100px; left: 24px; z-index: 100; background: #fff; padding: 10px 18px; border-radius: 6px; }
.kg-skip:focus { top: 12px; }
.kg-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--kg-navy) !important; font-size: 19px; font-weight: 750; letter-spacing: -.035em; }
.kg-eyebrow { margin: 0 0 20px; color: var(--kg-pink-dark); font-size: 11px; font-weight: 750; letter-spacing: .18em; text-transform: uppercase; }
.brand-page .kg-button, .brand-page .kg-submit, .brand-page .btn-login {
    display: inline-flex; justify-content: center; align-items: center; gap: 14px;
    min-height: 50px; padding: 13px 23px; border: 1px solid var(--kg-pink);
    border-radius: 8px; background: var(--kg-pink); color: #fff !important;
    font-family: inherit; font-size: 14px; font-weight: 700; line-height: 1.5;
    box-shadow: 0 5px 16px rgba(229,62,131,.12); cursor: pointer;
    transition: background .15s, box-shadow .15s;
}
.brand-page .kg-button:hover, .brand-page .kg-submit:hover, .brand-page .btn-login:hover { background: var(--kg-pink-dark); border-color: var(--kg-pink-dark); box-shadow: 0 7px 20px rgba(189,40,101,.2); }
.brand-page .kg-button-secondary { background: transparent; color: var(--kg-navy) !important; border-color: var(--kg-line); box-shadow: none; }
.brand-page .kg-button-secondary:hover { background: #fff; border-color: var(--kg-navy); }
.kg-arrow { font-size: 19px; font-weight: 400; }
.kg-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; max-width: 1240px; margin: auto; padding: 30px 40px; }
.kg-nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 25px; }
.kg-nav a { color: var(--kg-navy); font-size: 13px; font-weight: 650; }
.kg-nav .kg-button { min-height: 42px; padding: 10px 19px; }
.kg-home-main { max-width: 1240px; padding: 70px 40px 42px; margin: auto; }
.kg-hero { display: grid; grid-template-columns: 1.08fr 1fr; gap: 75px; align-items: center; }
.kg-hero h1 { margin: 0 0 25px; font-size: clamp(46px, 5.6vw, 76px); font-weight: 750 !important; letter-spacing: -.06em; line-height: 1.07; }
.kg-hero h1 em { font-family: Georgia, serif; font-weight: 400; color: var(--kg-pink); }
.kg-hero-description { max-width: 410px; font-size: 17px; color: var(--kg-muted); line-height: 1.85; }
.kg-hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.kg-hero-note { font-size: 12px; margin: 18px 0 0; color: var(--kg-muted); }
.kg-workspace { position: relative; padding: 28px; background: var(--kg-navy); border-radius: 18px; color: #fff; box-shadow: 0 25px 65px rgba(20,36,63,.16); }
.kg-workspace::before { content: ''; position: absolute; width: 125px; height: 125px; right: -20px; top: -28px; border: 1px solid rgba(229,62,131,.35); border-radius: 50%; z-index: -1; }
.kg-workspace-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,.12); }
.kg-workspace-top span { font-size: 10px; letter-spacing: .15em; color: #bcc7d9; text-transform: uppercase; }
.kg-workspace-top b { font-size: 13px; font-weight: 650; }
.kg-workspace-heading { margin: 29px 0 8px; font-size: 27px; letter-spacing: -.04em; font-weight: 650; }
.kg-workspace-caption { color: #b3bfd2; font-size: 13px; margin-bottom: 26px; }
.kg-workspace-row { display: flex; gap: 15px; align-items: center; padding: 18px 0; border-top: 1px solid rgba(255,255,255,.1); }
.kg-workspace-number { font-size: 11px; color: #f38db8; width: 28px; flex-shrink: 0; }
.kg-workspace-row b { display: block; color: #fff; font-size: 14px; font-weight: 600; }
.kg-workspace-row small { display: block; color: #a9b6cc; font-size: 12px; margin-top: 3px; }
.kg-workspace-row .kg-arrow { margin-left: auto; color: #f38db8; }
.kg-workspace-foot { display: flex; align-items: center; gap: 8px; padding-top: 21px; margin-top: 7px; font-size: 11px; color: #bcc7d9; border-top: 1px solid rgba(255,255,255,.12); }
.kg-dot { height: 6px; width: 6px; border-radius: 50%; background: #f38db8; display: inline-block; }
.kg-features { margin-top: 77px; padding-top: 33px; border-top: 1px solid var(--kg-line); display: grid; grid-template-columns: repeat(3, 1fr); gap: 50px; }
.kg-feature-number { color: var(--kg-pink-dark); font-size: 11px; font-weight: 650; }
.kg-feature h2 { font-size: 17px; font-weight: 700 !important; margin: 12px 0 10px; letter-spacing: -.02em; }
.kg-feature p { margin: 0; font-size: 13px; color: var(--kg-muted); line-height: 1.8; max-width: 270px; }
.kg-footer { display: flex; justify-content: space-between; gap: 20px; max-width: 1240px; padding: 26px 40px; margin: auto; font-size: 11px; color: var(--kg-muted); }

/* Shared authentication shell. These rules are scoped away from the POS. */
.kg-auth-shell { display: grid; grid-template-columns: minmax(340px, 43%) 1fr; min-height: 100vh; }
.kg-auth-story { display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; background: var(--kg-navy-deep); padding: 45px 54px; color: #fff; }
.kg-auth-story::after { content: ''; position: absolute; bottom: -235px; right: -220px; height: 560px; width: 560px; border: 1px solid rgba(243,141,184,.14); border-radius: 50%; pointer-events: none; }
.kg-auth-story .kg-brand { color: #fff !important; position: relative; z-index: 1; }
.kg-auth-story-content { position: relative; z-index: 1; max-width: 365px; padding: 42px 0; }
.kg-auth-story .kg-eyebrow { color: #f38db8; }
.kg-auth-story h2 { color: #fff !important; font-size: clamp(37px, 3.8vw, 53px); font-weight: 650 !important; margin: 0 0 24px; line-height: 1.14; }
.kg-auth-story h2 em { color: #f38db8; font-family: Georgia, serif; font-weight: 400; }
.kg-auth-story-content > p:not(.kg-eyebrow) { color: #b4bfd2; font-size: 14px; line-height: 1.85; margin-bottom: 38px; }
.kg-auth-benefit { display: flex; align-items: flex-start; gap: 15px; padding: 17px 0; border-top: 1px solid rgba(255,255,255,.12); }
.kg-auth-benefit > span { color: #f38db8; font-size: 11px; padding-top: 4px; }
.kg-auth-benefit b { display: block; font-size: 13px; font-weight: 600; }
.kg-auth-benefit small { color: #a9b6cc; font-size: 12px; }
.kg-auth-story-footer { position: relative; z-index: 1; color: #a9b6cc; font-size: 11px; }
.kg-auth-main { display: flex; flex-direction: column; min-width: 0; padding: 33px 48px 23px; background: #fff; }
.kg-auth-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; font-size: 12px; color: var(--kg-muted); }
.kg-auth-toolbar a { font-weight: 650; }
.kg-mobile-brand { display: none; }
.kg-language { display: inline-flex; align-items: center; gap: 8px; }
.kg-language label { margin: 0; font-weight: 500; }
.kg-language select { border: 0; background: #f5f6f9; border-radius: 5px; padding: 7px 9px; color: var(--kg-navy); font-family: inherit; max-width: 170px; font-size: 12px; }
.kg-auth-content { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 50px 0; }
.kg-auth-form { width: 100%; max-width: 400px; margin: 0 auto; }
.brand-page .login-form { float: none; padding: 0; margin: 0 auto; color: var(--kg-ink); }
.kg-auth-form h1 { font-size: 37px; font-weight: 750 !important; margin: 0 0 13px; }
.kg-form-description { color: var(--kg-muted); font-size: 14px; margin: 0 0 31px; line-height: 1.8; }
.kg-auth-form .kg-eyebrow { margin-bottom: 14px; }
.brand-page .form-group { margin-bottom: 22px; }
.brand-page .form-group > label { font-size: 12px; margin-bottom: 9px; font-weight: 650; color: var(--kg-ink); }
.brand-page .form-control { min-height: 48px; height: 48px; background: #fbfbfd; color: var(--kg-navy); border: 1px solid var(--kg-line); border-radius: 7px; box-shadow: none; padding: 11px 14px; font-size: 14px; font-family: inherit; }
.brand-page .form-control::placeholder { color: #8a919e; }
.brand-page .form-control:focus { border-color: var(--kg-pink); background: #fff; box-shadow: 0 0 0 3px rgba(229,62,131,.08); }
.brand-page .has-error .form-control { border-color: #b72b57; }
.brand-page .help-block, .brand-page label.error { font-size: 12px; color: #b72b57; margin-top: 8px; }
.kg-password-wrap { position: relative; }
.kg-password-wrap .form-control { padding-right: 65px; }
.kg-password-toggle { position: absolute; right: 10px; top: 8px; padding: 7px 5px; background: transparent; border: 0; color: var(--kg-muted); font-family: inherit; font-size: 11px; font-weight: 650; cursor: pointer; }
.kg-password-toggle:hover { color: var(--kg-pink-dark); }
.kg-form-options { display: flex; justify-content: space-between; align-items: center; gap: 14px; font-size: 12px; margin: 2px 0 26px; }
.kg-remember { display: flex; align-items: center; gap: 9px; font-weight: 400; margin: 0; color: var(--kg-muted); cursor: pointer; }
.kg-remember input { width: 16px; height: 16px; margin: 0; accent-color: var(--kg-pink); }
.kg-submit { width: 100%; }
.kg-form-bottom { text-align: center; color: var(--kg-muted); font-size: 12px; margin: 25px 0 0; }
.kg-form-bottom a { font-weight: 650; }
.kg-auth-footer { text-align: center; font-size: 11px; color: var(--kg-muted); }
.brand-page .kg-alert { border-radius: 7px; border: 1px solid #c9e3d7; background: #f1faf5; color: #2d6445; padding: 13px 15px; font-size: 13px; margin-bottom: 22px; }
.brand-page .kg-alert-error { border-color: #f1c5d8; background: #fff4f8; color: #a42352; }

/* Keep the existing registration wizard and its validation behavior. */
.kg-auth-registration .kg-auth-shell { grid-template-columns: minmax(310px, 34%) 1fr; }
.kg-auth-registration .kg-auth-story { position: sticky; top: 0; height: 100vh; }
.kg-auth-registration .kg-auth-story h2 { font-size: 42px; }
.kg-auth-registration .kg-auth-main { padding: 33px 40px 23px; }
.kg-registration-form { max-width: 750px; }
.kg-registration-form .kg-form-description { margin-bottom: 26px; }
.brand-page .wizard > .steps { margin: 0 0 26px; }
.brand-page .wizard > .steps > ul { display: flex; padding: 0; gap: 10px; }
.brand-page .wizard > .steps > ul > li { width: auto !important; flex: 1; }
.brand-page .wizard > .steps a, .brand-page .wizard > .steps a:hover, .brand-page .wizard > .steps a:active {
    display: block; margin: 0; padding: 12px; border-radius: 7px; background: #f3f4f8; color: var(--kg-muted); font-size: 12px;
}
.brand-page .wizard > .steps .current a, .brand-page .wizard > .steps .current a:hover { background: var(--kg-navy); color: #fff; }
.brand-page .wizard > .steps .done a, .brand-page .wizard > .steps .done a:hover { background: #fdeaf2; color: var(--kg-pink-dark); }
.brand-page .wizard > .steps .number { font-size: 13px; margin-right: 5px; }
.brand-page .wizard > .content { background: transparent !important; margin: 0; min-height: 0; overflow: visible; }
.brand-page .wizard > .content > .body { position: relative; width: 100%; height: auto; padding: 0; float: none; background: #fff; color: var(--kg-ink); border: 0; }
.brand-page .wizard > .content > .body input { display: block; }
.brand-page .wizard > .content > .body > legend { font-size: 18px; font-weight: 650; color: var(--kg-navy); padding-bottom: 14px; margin-bottom: 23px; }
.brand-page .wizard > .actions { margin-top: 23px; }
.brand-page .wizard > .actions a, .brand-page .wizard > .actions a:hover { background: var(--kg-pink); color: #fff; padding: 11px 22px; border-radius: 7px; font-size: 13px; font-weight: 600; }
.brand-page .wizard > .actions .disabled a, .brand-page .wizard > .actions .disabled a:hover { background: #f3f4f8; color: var(--kg-muted); }
.brand-page .input-group .form-control { border-radius: 0 7px 7px 0; }
.brand-page .input-group-addon { border-color: var(--kg-line); border-radius: 7px 0 0 7px; background: #f5f6f9; color: var(--kg-muted); }
.brand-page .select2-container--default .select2-selection--single { min-height: 48px; border: 1px solid var(--kg-line); background: #fbfbfd; border-radius: 0 7px 7px 0; padding: 8px 2px; }
.brand-page .select2-container--default .select2-selection--single .select2-selection__arrow { height: 46px; }
.brand-page .file-input .btn { border-radius: 5px; }
.brand-page .file-input .btn-primary { background: var(--kg-pink); border-color: var(--kg-pink); color: #fff; }
.brand-page .wizard .form-group label { font-size: 12px; }

@media (min-width: 1450px) {
    .kg-auth-story { padding: 55px 75px; }
    .kg-auth-story-content { max-width: 410px; }
}
@media (max-height: 780px) and (min-width: 801px) {
    .kg-auth-story { padding-top: 32px; padding-bottom: 28px; }
    .kg-auth-story-content { padding: 25px 0; }
    .kg-auth-story h2 { font-size: 42px; }
    .kg-auth-benefit { padding: 13px 0; }
}
@media (max-width: 1050px) {
    .kg-hero { gap: 36px; }
    .kg-auth-story { padding: 35px 32px; }
    .kg-auth-main { padding: 28px 32px 23px; }
    .kg-auth-toolbar { gap: 12px; }
    .kg-language label { display: none; }
    .kg-auth-registration .kg-auth-shell { grid-template-columns: 300px 1fr; }
    .kg-auth-registration .kg-auth-main { padding: 28px; }
}
@media (max-width: 800px) {
    .kg-header { padding: 24px; }
    .kg-nav { gap: 17px; }
    .kg-home-main { padding: 42px 24px 25px; }
    .kg-hero { grid-template-columns: 1fr; gap: 45px; }
    .kg-hero-copy { max-width: 570px; }
    .kg-hero h1 { font-size: 61px; }
    .kg-workspace { max-width: 570px; width: 100%; }
    .kg-features { margin-top: 49px; gap: 22px; }
    .kg-footer { padding: 25px 24px; }
    .kg-auth-shell, .kg-auth-registration .kg-auth-shell { display: block; }
    .kg-auth-story { display: none; }
    .kg-mobile-brand { display: flex; margin-bottom: 30px; }
    .kg-auth-main, .kg-auth-registration .kg-auth-main { min-height: 100vh; padding: 28px 32px 22px; }
    .kg-auth-content { padding: 52px 0; }
}
@media (max-width: 480px) {
    .kg-brand { font-size: 17px; gap: 9px; }
    .kg-header { gap: 12px; padding: 21px; }
    .kg-nav { gap: 12px; }
    .kg-nav .kg-nav-register { display: none; }
    .kg-nav .kg-button { padding: 9px 14px; font-size: 12px; }
    .kg-home-main { padding: 32px 21px 20px; }
    .kg-hero h1 { font-size: 47px; }
    .kg-hero-description { font-size: 15px; }
    .kg-workspace { padding: 23px; }
    .kg-workspace::before { display: none; }
    .kg-features { grid-template-columns: 1fr; gap: 23px; }
    .kg-feature { display: grid; grid-template-columns: 24px 1fr; gap: 10px; }
    .kg-feature-number { padding-top: 12px; }
    .kg-feature p { max-width: none; }
    .kg-footer { flex-direction: column; gap: 5px; padding: 22px 21px; }
    .kg-auth-main, .kg-auth-registration .kg-auth-main { padding: 24px 22px 20px; }
    .kg-auth-form h1 { font-size: 33px; }
    .kg-auth-content { padding: 38px 0; }
    .kg-auth-toolbar { font-size: 11px; }
    .kg-language select { max-width: 132px; }
    .kg-form-options { align-items: flex-start; font-size: 11px; }
    .brand-page .wizard > .steps a { padding: 11px 7px; font-size: 10px; }
    .brand-page .wizard > .steps .number { display: block; margin: 0 0 4px; }
    .brand-page .wizard > .content > .body .col-md-6, .brand-page .wizard > .content > .body .col-md-4, .brand-page .wizard > .content > .body .col-md-12 { padding-left: 0; padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) { .brand-page * { transition: none !important; animation: none !important; } }
