@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@400;700;900&family=Manrope:wght@400;500;600;700&display=swap');

:root {
    --navy: #0a1628;
    --navy2: #0f2040;
    --navy3: #162840;
    --blue: #1255cc;
    --bl: #1e6ef5;
    --bp: #e8f0fe;
    --green: #00c98d;
    --gd: #00a874;
    --gp: #e6faf4;
    --gold: #f5a623;
    --red: #e84040;
    --w: #fff;
    --gr: #f0f4fb;
    --gr2: #dde5f4;
    --tx: #1a2540;
    --mu: #6b7fa3;
    --br: rgba(18, 85, 204, .13);
    --sh: 0 4px 20px rgba(10, 22, 40, .08);
    --shl: 0 20px 56px rgba(10, 22, 40, .18);
}

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

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Manrope', sans-serif;
    background: var(--navy);
    color: var(--tx);
}

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

/* ── LAYOUT ── */
.page {
    min-height: 100vh;
    display: grid;
    grid-template-columns:1fr 480px;
}

@media (max-width: 900px) {
    .page {
        grid-template-columns:1fr;
    }
}

/* ── LEFT PANEL ── */
.left {
    background: var(--navy);
    padding: 48px 52px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 55% at 30% 0%, rgba(18, 85, 204, .45) 0%, transparent 65%),
    radial-gradient(ellipse 50% 50% at 90% 90%, rgba(0, 201, 141, .1) 0%, transparent 55%);
}

.left-content {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 56px;
}

.logo svg {
    height: 32px;
    width: auto;
}

/* Heading */
.left-title {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(28px, 3.5vw, 44px);
    font-weight: 900;
    color: white;
    line-height: 1.15;
    letter-spacing: -.5px;
    margin-bottom: 16px;
}

.left-title em {
    color: var(--green);
    font-style: normal;
}

.left-sub {
    font-size: 15px;
    color: rgba(255, 255, 255, .5);
    line-height: 1.75;
    max-width: 440px;
    margin-bottom: 40px;
}

/* Stats */
.left-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: auto;
}

.lst {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 14px;
    padding: 16px 20px;
    min-width: 120px;
}

.lst-n {
    font-family: 'Unbounded', sans-serif;
    font-size: 22px;
    font-weight: 900;
    color: white;
    line-height: 1;
}

.lst-n.g {
    color: var(--green);
}

.lst-n.b {
    color: #7eb8ff;
}

.lst-l {
    font-size: 11px;
    color: rgba(255, 255, 255, .4);
    margin-top: 4px;
}

/* Benefits */
.benefits {
    margin-top: 44px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, .65);
}

.benefit-ic {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.benefit strong {
    color: white;
    display: block;
    font-size: 13px;
    margin-bottom: 1px;
}

.benefit span {
    font-size: 12px;
    color: rgba(255, 255, 255, .4);
}

/* Bottom */
.left-bottom {
    margin-top: 40px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, .25);
}

.left-bottom a {
    color: var(--green);
}

/* Mobile — hide left on small screens */
@media (max-width: 900px) {
    .left {
        display: none;
    }
}

.modal {
    display: none !important;
}

/* ── RIGHT PANEL (FORM) ── */
.right {
    background: #f7faff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 44px;
    min-height: 100vh;
}

@media (max-width: 600px) {
    .right {
        padding: 32px 20px;
    }
}

/* Mobile logo (only on mobile) */
.mob-logo {
    display: none;
    margin-bottom: 32px;
}

@media (max-width: 900px) {
    .mob-logo {
        display: flex;
        align-items: center;
        gap: 10px;
    }
}

.form-wrap {
    width: 100%;
    max-width: 380px;
}

.form-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 22px;
    font-weight: 900;
    color: var(--navy);
    margin-bottom: 6px;
}

.form-sub {
    font-size: 14px;
    color: var(--mu);
    margin-bottom: 32px;
    line-height: 1.5;
}

.form-sub a {
    color: var(--blue);
    font-weight: 700;
}

/* Tabs: Покупець / Постачальник */
.auth-tabs {
    display: flex;
    background: var(--gr);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 28px;
    border: 2px solid var(--br);
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--mu);
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    background: none;
    border: none;
}

.auth-tab.on {
    background: white;
    color: var(--navy);
    box-shadow: 0 2px 8px rgba(10, 22, 40, .1);
}

/* Form fields */
.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--mu);
    margin-bottom: 6px;
}

.field-wrap {
    position: relative;
}

.field-wrap svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mu);
    pointer-events: none;
}

.field input {
    width: 100%;
    padding: 13px 14px 13px 40px;
    border: 2px solid var(--br);
    border-radius: 11px;
    font-family: 'Manrope', sans-serif;
    font-size: 14.5px;
    color: var(--tx);
    background: white;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.field input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(18, 85, 204, .1);
}

.field input::placeholder {
    color: #c0c9dd;
}

/* Password toggle */
.pwd-toggle {
    position: absolute;
    right: 20px;
    top: 70%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--mu);
    padding: 4px;
    transition: color .15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwd-toggle svg {
    position: relative;
    left: 4px;
}

.pwd-toggle:hover {
    color: var(--navy);
}

/* Forgot password */
.field-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

.forgot {
    font-size: 12.5px;
    color: var(--blue);
    font-weight: 700;
}

.forgot:hover {
    text-decoration: underline;
}

/* Submit button */
.btn-submit {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--bl), var(--blue));
    color: white;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(18, 85, 204, .3);
    transition: transform .15s, box-shadow .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 18px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(18, 85, 204, .4);
}

.btn-submit:active {
    transform: none;
}

/* Or divider */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--mu);
    margin-bottom: 18px;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--br);
}

/* Google button */
.btn-google {
    width: 100%;
    padding: 13px;
    border-radius: 12px;
    background: white;
    border: 2px solid var(--br);
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--tx);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: border-color .2s, box-shadow .2s;
    margin-bottom: 28px;
}

.btn-google:hover {
    border-color: var(--blue);
    box-shadow: 0 4px 14px rgba(18, 85, 204, .1);
}

.google-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Register link */
.reg-block {
    text-align: center;
    font-size: 14px;
    color: var(--mu);
    padding-top: 24px;
    border-top: 1px solid var(--br);
}

.reg-block strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--tx);
    margin-bottom: 12px;
}

.reg-btns {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 10px;
}

.reg-btn {
    padding: 12px 10px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    transition: all .15s;
    border: 2px solid var(--br);
    background: white;
    color: var(--navy);
}

.reg-btn:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.reg-btn.green {
    background: linear-gradient(135deg, var(--green), var(--gd));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(0, 201, 141, .25);
}

.reg-btn.green:hover {
    opacity: .9;
    transform: translateY(-1px);
}

/* Error state */
.field.error input {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(232, 64, 64, .1);
}

.field-error {
    font-size: 12px;
    color: var(--red);
    font-weight: 600;
    margin-top: 5px;
    display: none;
}

.field.error .field-error {
    display: block;
}

/* Alert */
.alert {
    background: #fee2e2;
    border: 1px solid rgba(232, 64, 64, .3);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13.5px;
    color: var(--red);
    font-weight: 600;
    margin-bottom: 18px;
    display: none;
    align-items: center;
    gap: 8px;
}

.alert-success {
    background: #fee2e2;
    border: 1px solid rgb(64 232 123 / 0.3);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13.5px;
    color: var(--green);
    font-weight: 600;
    margin-bottom: 18px;
    display: none;
    align-items: center;
    gap: 8px;
}

.alert.show, .alert-success.show {
    display: flex;
}

/* Success */
.alert-success {
    background: var(--gp);
    border: 1px solid rgba(0, 201, 141, .3);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13.5px;
    color: var(--gd);
    font-weight: 600;
    margin-bottom: 18px;
    display: none;
    align-items: center;
    gap: 8px;
}

.alert-success.show {
    display: flex;
}

.pwd-strength {
    margin-top: 6px;
    height: 4px;
    background: var(--gr2);
    border-radius: 4px;
    overflow: hidden;
}

.pwd-strength-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .3s, background .3s;
}

.pwd-hint {
    font-size: 11px;
    color: var(--mu);
    margin-top: 4px;
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--mu);
    margin-bottom: 20px;
    transition: color .15s;
}

.back-link:hover {
    color: var(--navy);
}

/* Trust row */
.trust-row {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--mu);
}

.trust-item svg {
    color: var(--green);
}

#gtt {
    position: fixed;
    bottom: 24px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s, transform .2s;
    z-index: 999;
}

#gtt.show {
    opacity: 1;
    pointer-events: auto;
}

#gtt:active {
    transform: scale(0.92);
}