/* ==========================================================================
   Redwood — auth pages (login / registration steps)
   Self-contained: these pages do not load the public site stylesheet.
   One accent: Redwood red #d32f2f (matches --rw-brand in redwood-ui.css).
   The brand panel photo carries a complementary petrol tint (--a-panel-*).
   ========================================================================== */

:root {
    --a-brand: #d32f2f;
    --a-brand-strong: #b71c1c;
    --a-brand-soft: #fdf2f2;
    --a-brand-tint: #f6d9d9;

    /* Auth brand-panel photo tint. Petrol/teal is red's complementary hue,
       so the panel supports the red accents used across the rest of the
       product instead of competing with them. Swap these three values to
       re-tone the panel — e.g. navy #16334f / #0a1c2e / #12283f, or
       charcoal #2a2f36 / #14171b / #1d2126. */
    --a-panel-tint: rgba(8, 68, 76, 0.72);
    --a-panel-tint-deep: rgba(4, 30, 36, 0.88);
    --a-panel-fallback: #0a3d44;

    --a-ink: #191c20;
    --a-text: #3f454d;
    --a-muted: #737a85;

    --a-surface: #ffffff;
    --a-bg: #f6f7f8;
    --a-border: #e6e8ec;
    --a-border-strong: #d3d7dd;

    --a-success: #1f8a4c;
    --a-danger: #c62828;
    --a-radius: 12px;
    --a-radius-sm: 8px;
    --a-transition: 0.15s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 20px;
    background: var(--a-bg);
    color: var(--a-text);
    font-family: "Inter", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   Shell
   -------------------------------------------------------------------------- */
.login-container,
.register-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1080px;
    margin-bottom: 20px;
    border: 1px solid var(--a-border);
    border-radius: 14px;
    background: var(--a-surface);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   Brand panel
   -------------------------------------------------------------------------- */
.brand-section {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    padding: 32px 26px;
    /* Dashboard hero photo under a deep petrol tint (red's complementary
       hue). The tint keeps white text at AA contrast over any part of the
       photo, and the fallback colour shows if the image fails to load. */
    background-color: var(--a-panel-fallback);
    background-image:
        linear-gradient(
            168deg,
            var(--a-panel-tint) 0%,
            var(--a-panel-tint-deep) 100%
        ),
        url("https://i.ibb.co/nZm2QCm/a7205af7-5360-48f4-8d3c-66c11c6e3faa.jpg");
    background-size: cover, cover;
    /* Bias the crop towards the Redwood sign on the branch facade. */
    background-position: 40% 32%, 40% 32%;
    background-repeat: no-repeat, no-repeat;
    color: #ffffff;
    flex-shrink: 0;
}

.brand-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    width: auto;
    height: auto;
    max-width: 130px;
    max-height: 40px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
}

.no-user-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.language-switcher select {
    max-width: 130px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 13px;
    cursor: pointer;
}

.language-switcher select option {
    color: var(--a-ink);
}

.color-switcher {
    display: flex;
    gap: 8px;
}

.color-switcher img {
    width: 20px;
    height: 20px;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity var(--a-transition);
}

.color-switcher img:hover {
    opacity: 1;
}

.brand-body {
    position: relative;
    z-index: 1;
    margin: auto 0;
}

.brand-title {
    margin-bottom: 14px;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.brand-subtitle {
    margin-bottom: 28px;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.92);
}

.brand-points {
    display: grid;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.brand-points li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.brand-points__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
}

.brand-points__icon svg {
    width: 16px;
    height: 16px;
}

.brand-points__title {
    margin-bottom: 2px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.brand-points__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.86);
}

.brand-foot {
    position: relative;
    z-index: 1;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 12px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.78);
}

/* --------------------------------------------------------------------------
   Form panel
   -------------------------------------------------------------------------- */
.login-section,
.register-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 26px;
    background: var(--a-surface);
}

.auth-form-inner {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}

.login-header,
.register-header {
    margin-bottom: 24px;
}

.login-title,
.register-title {
    margin-bottom: 6px;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--a-ink);
}

.login-subtitle,
.register-subtitle {
    color: var(--a-muted);
    font-size: 15px;
}

/* Step tracker */
.auth-steps {
    display: flex;
    align-items: center;
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
}

.auth-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--a-muted);
}

.auth-steps li:not(:last-child)::after {
    content: "";
    flex: 1;
    height: 1px;
    margin: 0 12px;
    background: var(--a-border);
}

.auth-steps__dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border: 1px solid var(--a-border);
    border-radius: 50%;
    background: var(--a-surface);
    color: var(--a-muted);
    font-size: 12px;
    font-weight: 600;
}

.auth-steps li.is-active {
    color: var(--a-ink);
}

.auth-steps li.is-active .auth-steps__dot {
    border-color: var(--a-brand);
    background: var(--a-brand);
    color: #ffffff;
}

.auth-steps li.is-done .auth-steps__dot {
    border-color: var(--a-brand-tint);
    background: var(--a-brand-soft);
    color: var(--a-brand);
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-group {
    margin-bottom: 18px;
}

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

.go-back {
    margin-bottom: 18px;
}

.go-back a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--a-muted);
    font-size: 13px;
    font-weight: 600;
}

.go-back a:hover {
    color: var(--a-brand);
}

@media (max-width: 575px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

.form-label {
    display: block;
    margin-bottom: 6px;
    color: var(--a-ink);
    font-size: 13px;
    font-weight: 600;
}

.required {
    color: var(--a-brand);
}

.input-container {
    position: relative;
}

.form-input,
.form-select {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--a-border-strong);
    border-radius: var(--a-radius-sm);
    background: var(--a-surface);
    color: var(--a-ink);
    font-size: 15px;
    font-family: inherit;
    transition: border-color var(--a-transition), box-shadow var(--a-transition);
    appearance: none;
}

.form-select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23737a85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--a-brand);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12);
}

.form-input::placeholder {
    color: var(--a-muted);
}

.form-textarea {
    width: 100%;
    min-height: 96px;
    padding: 13px 15px;
    border: 1px solid var(--a-border-strong);
    border-radius: var(--a-radius-sm);
    background: var(--a-surface);
    color: var(--a-ink);
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--a-brand);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12);
}

.input-group {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--a-border-strong);
    border-radius: var(--a-radius-sm);
}

.input-group:focus-within {
    border-color: var(--a-brand);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12);
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 13px 14px;
    background: var(--a-bg);
    color: var(--a-ink);
    font-size: 14px;
    font-weight: 600;
    min-width: 72px;
    justify-content: center;
    flex-shrink: 0;
}

.input-group .form-input {
    border: none;
    border-radius: 0;
    flex: 1;
    min-width: 0;
}

.input-group .form-input:focus {
    box-shadow: none;
}

.passo {
    position: relative;
}

.passo .form-input {
    padding-right: 46px;
}

.passo-hide-show {
    position: absolute;
    top: 50%;
    right: 15px;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    border: none;
    background: none;
    cursor: pointer;
    opacity: 0.65;
}

.passo-hide-show:hover {
    opacity: 1;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.forgot-password {
    color: var(--a-brand);
    font-size: 14px;
    font-weight: 600;
}

.forgot-password:hover {
    color: var(--a-brand-strong);
}

/* Checkbox */
.checkbox-wrapper-15 {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.cbx {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    user-select: none;
    cursor: pointer;
}

.cbx span:first-child {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1px solid var(--a-border-strong);
    border-radius: 4px;
    transform: scale(1);
    transition: var(--a-transition);
    flex: 0 0 auto;
}

.cbx span:first-child svg {
    position: relative;
    z-index: 1;
    fill: none;
    stroke: #ffffff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 16px;
    stroke-dashoffset: 16px;
    transition: all 0.2s ease;
}

.inp-cbx:checked + .cbx span:first-child {
    background: var(--a-brand);
    border-color: var(--a-brand);
}

.inp-cbx:checked + .cbx span:first-child svg {
    stroke-dashoffset: 0;
}

.cbx a {
    color: var(--a-brand);
    font-weight: 600;
}

/* Buttons */
.login-button,
.register-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 46px;
    margin: 24px 0 20px;
    padding: 0 22px;
    border: none;
    border-radius: var(--a-radius-sm);
    background: var(--a-brand);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--a-transition);
}

.login-button:hover,
.register-button:hover {
    background: var(--a-brand-strong);
}

.button-icon {
    width: 18px;
    height: 18px;
}

.signup-link,
.login-link {
    color: var(--a-muted);
    font-size: 14px;
    text-align: center;
}

.signup-link a,
.login-link a {
    color: var(--a-brand);
    font-weight: 600;
}

.signup-link a:hover,
.login-link a:hover {
    color: var(--a-brand-strong);
}

/* Errors */
.error-message {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-left: 3px solid var(--a-danger);
    border-radius: 6px;
    background: rgba(198, 40, 40, 0.07);
    color: var(--a-danger);
    font-size: 14px;
}

.error-message p {
    margin: 0;
}

.success-message {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-left: 3px solid var(--a-success);
    border-radius: 6px;
    background: rgba(31, 138, 76, 0.08);
    color: var(--a-success);
    font-size: 14px;
}

.success-message p {
    margin: 0;
}

/* One-time code inputs */
.otp-inputs {
    display: flex;
    gap: 12px;
}

.otp-input {
    width: 100%;
    flex: 1;
    min-width: 0;
    height: 56px;
    padding: 0;
    border: 1px solid var(--a-border-strong);
    border-radius: 10px;
    background: var(--a-surface);
    color: var(--a-ink);
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    font-variant-numeric: tabular-nums;
    transition: border-color var(--a-transition), box-shadow var(--a-transition);
}

.otp-input:focus {
    outline: none;
    border-color: var(--a-brand);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.14);
}

.otp-expiry {
    margin-top: 10px;
    font-size: 13px;
    color: var(--a-muted);
}

.otp-expiry strong {
    color: var(--a-ink);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 575px) {
    .otp-inputs {
        gap: 8px;
    }

    .otp-input {
        height: 48px;
        font-size: 19px;
    }
}

.g-recaptcha {
    margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   KYC / uploads
   -------------------------------------------------------------------------- */
.kyc-section {
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid var(--a-border);
    border-radius: var(--a-radius-sm);
    background: var(--a-bg);
}

.kyc-header {
    margin-bottom: 14px;
    color: var(--a-ink);
    font-size: 15px;
    font-weight: 600;
}

.step-details-form .form-group:last-child {
    margin-bottom: 0;
}

.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.file-upload label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    border: 1px dashed var(--a-border-strong);
    border-radius: var(--a-radius-sm);
    background: var(--a-surface);
    color: var(--a-muted);
    font-size: 14px;
    cursor: pointer;
    transition: border-color var(--a-transition), color var(--a-transition);
}

.file-upload label:hover {
    border-color: var(--a-brand);
    color: var(--a-brand);
}

.upload-icon {
    width: 18px;
    height: 18px;
}

/* --------------------------------------------------------------------------
   Legal footer
   -------------------------------------------------------------------------- */
.banking-footer {
    width: 100%;
    max-width: 1080px;
    margin-top: 4px;
    padding: 14px 18px;
    border: 1px solid var(--a-border);
    border-radius: var(--a-radius-sm);
    background: var(--a-surface);
}

.footer-text {
    margin: 0;
    color: var(--a-muted);
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.footer-link {
    color: var(--a-muted);
    transition: color var(--a-transition);
}

.footer-link:hover {
    color: var(--a-brand);
}

.icon-wrapper {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin: 0 4px;
}

.footer-icon {
    display: block;
    width: 24px;
    height: auto;
}

.ehl-icon {
    width: 17px;
    transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
    .login-container,
    .register-container {
        flex-direction: row;
        min-height: 640px;
    }

    .brand-section {
        flex: 1;
        padding: 44px 42px;
        background-position: 40% center, 40% center;
    }

    .login-section,
    .register-section {
        flex: 1;
        padding: 44px 46px;
    }
}

@media (min-width: 992px) {
    .brand-section {
        flex: 1.05;
        padding: 48px;
    }

    .login-section,
    .register-section {
        padding: 48px 56px;
    }

    .brand-title {
        font-size: 30px;
    }
}

@media (max-width: 575px) {
    body {
        padding: 16px 12px;
    }

    .brand-section {
        gap: 22px;
        padding: 24px 20px;
        /* Hidden feature list makes the panel short on phones; give the
           photo room so the crop still looks deliberate. */
        min-height: 320px;
    }

    .brand-title {
        font-size: 22px;
    }

    .brand-subtitle {
        margin-bottom: 0;
    }

    .brand-points {
        display: none;
    }

    .auth-steps__label {
        display: none;
    }

    .auth-steps li:not(:last-child)::after {
        margin: 0 8px;
    }

    .banking-footer {
        padding: 12px 14px;
    }

    .footer-text {
        font-size: 11px;
    }
}
