@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
    --auth-primary: #0f4c3a;
    --auth-primary-dark: #0a3327;
    --auth-primary-light: #16634a;
    --auth-accent: #10b981;
    --auth-accent-hover: #059669;
    --auth-text: #0f172a;
    --auth-text-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-bg: #f8fafc;
    --auth-panel-bg: #0c1f18;
}

body.auth-split-body {
    margin: 0;
    padding: 0;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--auth-bg);
    min-height: 100vh;
    color: var(--auth-text);
    -webkit-font-smoothing: antialiased;
}

.auth-split {
    display: flex;
    min-height: 100vh;
}

/* ── Left panel ── */
.auth-split__panel {
    position: relative;
    width: 42%;
    min-width: 340px;
    background: linear-gradient(160deg, var(--auth-primary) 0%, var(--auth-primary-dark) 60%, #061510 100%);
    color: #fff;
    padding: 3rem 3.5rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.auth-split__panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 100%, rgba(16, 185, 129, 0.12) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 90% 20%, rgba(255, 255, 255, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

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

.auth-split__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.auth-split__brand img {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
}

.auth-split__brand-name {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    opacity: 0.95;
}

.auth-split__panel h1 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin: 0 0 0.75rem;
    max-width: 320px;
}

.auth-split__panel-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 2.5rem;
    max-width: 300px;
}

.auth-split__features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-split__features li {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    margin-bottom: 1.125rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.4;
}

.auth-split__check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.2);
    border: 1.5px solid var(--auth-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.auth-split__check svg {
    width: 10px;
    height: 10px;
    stroke: var(--auth-accent);
}

.auth-split__panel-footer {
    margin-top: auto;
    padding-top: 2rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.auth-split__grid-decor {
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 280px;
    height: 280px;
    opacity: 0.06;
    pointer-events: none;
    z-index: 1;
}

/* ── Right form area ── */
.auth-split__form-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 3rem;
    background: var(--auth-bg);
}

.auth-split__form-inner {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
}

.auth-split__form-header {
    margin-bottom: 2rem;
}

.auth-split__form-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--auth-text);
    letter-spacing: -0.02em;
    margin: 0 0 0.4rem;
}

.auth-split__form-header p {
    font-size: 0.9rem;
    color: var(--auth-text-muted);
    margin: 0;
    line-height: 1.5;
}

.auth-split__field {
    margin-bottom: 1.125rem;
}

.auth-split__field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--auth-text);
    margin-bottom: 0.4rem;
    letter-spacing: 0.01em;
}

.auth-split__field label .required {
    color: #ef4444;
    font-weight: 500;
}

.auth-split__hint {
    display: block;
    font-size: 0.75rem;
    color: var(--auth-text-muted);
    margin-bottom: 0.4rem;
}

.auth-split__field input,
.auth-split__field select {
    width: 100%;
    height: 44px;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    padding: 0 0.875rem;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--auth-text);
    background: #fff;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-split__field input:focus,
.auth-split__field select:focus {
    border-color: var(--auth-primary-light);
    box-shadow: 0 0 0 3px rgba(15, 76, 58, 0.1);
}

.auth-split__field input::placeholder {
    color: #94a3b8;
}

.auth-split__input-wrap {
    position: relative;
}

.auth-split__input-wrap input {
    padding-right: 2.75rem;
}

.auth-split__toggle-pw {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--auth-text-muted);
    display: flex;
    align-items: center;
    line-height: 1;
}

.auth-split__toggle-pw:hover {
    color: var(--auth-text);
}

.auth-split__row {
    display: flex;
    gap: 1rem;
}

.auth-split__row .auth-split__field {
    flex: 1;
}

.auth-split__select-wrap {
    position: relative;
}

.auth-split__select-wrap select {
    appearance: none;
    padding-right: 2.5rem;
    cursor: pointer;
}

.auth-split__select-wrap::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #94a3b8;
    pointer-events: none;
}

.auth-split__phone {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    height: 44px;
}

.auth-split__phone:focus-within {
    border-color: var(--auth-primary-light);
    box-shadow: 0 0 0 3px rgba(15, 76, 58, 0.1);
}

.auth-split__phone-code {
    width: auto !important;
    min-width: 80px;
    height: 100% !important;
    border: none !important;
    border-radius: 0 !important;
    border-right: 1px solid var(--auth-border) !important;
    box-shadow: none !important;
    background: #f8fafc;
    padding: 0 1.75rem 0 0.875rem !important;
    font-size: 0.875rem !important;
    font-weight: 500;
    color: var(--auth-text);
}

.auth-split__phone input[type="tel"] {
    flex: 1;
    height: 100% !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.auth-split__terms {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin: 1.25rem 0 1.5rem;
    font-size: 0.8125rem;
    color: var(--auth-text-muted);
    line-height: 1.5;
}

.auth-split__terms input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--auth-primary);
}

.auth-split__terms a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-split__terms a:hover {
    text-decoration: underline;
}

.auth-split__submit {
    display: block;
    width: 100%;
    height: 46px;
    background: var(--auth-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.auth-split__submit:hover {
    background: var(--auth-primary-light);
    box-shadow: 0 4px 12px rgba(15, 76, 58, 0.25);
}

.auth-split__error {
    display: block;
    color: #dc2626;
    font-size: 0.78rem;
    margin-top: 0.35rem;
    font-weight: 500;
}

.auth-split__alert {
    border-radius: 10px;
    padding: 0.875rem 1rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.auth-split__alert--success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.auth-split__alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.auth-split__alert-list {
    margin: 0;
    padding-left: 1.125rem;
}

.auth-split__divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.75rem 0 1.25rem;
    color: var(--auth-text-muted);
    font-size: 0.8125rem;
}

.auth-split__divider::before,
.auth-split__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

.auth-split__footer-link {
    text-align: center;
    font-size: 0.875rem;
    color: var(--auth-text-muted);
}

.auth-split__footer-link a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-split__footer-link a:hover {
    text-decoration: underline;
}

.auth-split__extras {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-size: 0.8125rem;
}

.auth-split__extras a {
    color: var(--auth-primary);
    font-weight: 500;
    text-decoration: none;
}

.auth-split__extras a:hover {
    text-decoration: underline;
}

.auth-split__remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--auth-text-muted);
    cursor: pointer;
}

.auth-split__remember input {
    width: 16px;
    height: 16px;
    accent-color: var(--auth-primary);
}

@media (max-width: 991px) {
    .auth-split {
        flex-direction: column;
    }

    .auth-split__panel {
        width: 100%;
        min-width: 0;
        padding: 2rem 1.5rem;
    }

    .auth-split__brand {
        margin-bottom: 1.5rem;
    }

    .auth-split__panel h1 {
        font-size: 1.35rem;
    }

    .auth-split__panel-desc {
        margin-bottom: 1.5rem;
    }

    .auth-split__features li {
        margin-bottom: 0.75rem;
    }

    .auth-split__panel-footer {
        display: none;
    }

    .auth-split__form-wrap {
        padding: 1.5rem 1rem 2.5rem;
    }

    .auth-split__form-inner {
        padding: 1.75rem 1.25rem;
        border-radius: 12px;
    }

    .auth-split__row {
        flex-direction: column;
        gap: 0;
    }
}

/* ── Legal pages ── */
.legal-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f1f5f4;
    color: var(--auth-text);
}

.legal-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--auth-border);
}

.legal-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.875rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.legal-header__brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    color: var(--auth-text);
    font-weight: 600;
    font-size: 0.9375rem;
    flex-shrink: 0;
}

.legal-header__brand img {
    height: 30px;
    width: auto;
}

.legal-header__nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
}

.legal-header__nav-link {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--auth-text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
}

.legal-header__nav-link:hover {
    color: var(--auth-text);
    background: #f1f5f9;
}

.legal-header__nav-link.is-active {
    color: var(--auth-primary);
    background: rgba(15, 76, 58, 0.08);
    font-weight: 600;
}

.legal-header__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.legal-header__back {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--auth-text-muted);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
}

.legal-header__back:hover {
    color: var(--auth-text);
}

.legal-header__signin {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    background: var(--auth-primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.legal-header__signin:hover {
    background: var(--auth-primary-light);
    color: #fff;
}

.legal-main {
    flex: 1;
    padding: 2.5rem 2rem 4rem;
}

.legal-layout {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2.5rem;
    align-items: start;
}

.legal-toc {
    position: sticky;
    top: 5.5rem;
}

.legal-toc__label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--auth-text-muted);
    margin: 0 0 0.875rem;
}

.legal-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 2px solid var(--auth-border);
}

.legal-toc__list li {
    margin: 0;
}

.legal-toc__list a {
    display: block;
    padding: 0.4rem 0 0.4rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--auth-text-muted);
    text-decoration: none;
    line-height: 1.4;
    border-left: 2px solid transparent;
    margin-left: -2px;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.legal-toc__list a:hover {
    color: var(--auth-primary);
    border-left-color: var(--auth-primary);
}

.legal-content {
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 40px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.legal-hero {
    padding: 2.5rem 3rem 2rem;
    background: linear-gradient(135deg, #f8faf9 0%, #fff 100%);
    border-bottom: 1px solid var(--auth-border);
}

.legal-hero__eyebrow {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--auth-accent);
    margin: 0 0 0.625rem;
}

.legal-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--auth-text);
    margin: 0 0 1rem;
    line-height: 1.2;
}

.legal-hero__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.legal-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    background: rgba(15, 76, 58, 0.08);
    color: var(--auth-primary);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid rgba(15, 76, 58, 0.12);
}

.legal-hero__version {
    font-size: 0.75rem;
    color: var(--auth-text-muted);
    font-weight: 500;
}

.legal-prose {
    padding: 2rem 3rem 2.5rem;
}

.legal-lead {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #475569;
    margin: 0 0 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--auth-border);
}

.legal-section {
    padding-bottom: 1.75rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.legal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.legal-section h2 {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--auth-text);
    margin: 0 0 0.875rem;
    letter-spacing: -0.01em;
}

.legal-section__num {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--auth-accent);
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.legal-section p {
    font-size: 0.9rem;
    line-height: 1.8;
    color: #475569;
    margin: 0 0 0.875rem;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

.legal-section ul {
    margin: 0.5rem 0 0.875rem;
    padding: 0;
    list-style: none;
}

.legal-section li {
    position: relative;
    padding-left: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.75;
    color: #475569;
    margin-bottom: 0.5rem;
}

.legal-section li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--auth-accent);
}

.legal-section li strong {
    color: var(--auth-text);
    font-weight: 600;
}

.legal-contact {
    display: flex;
    gap: 1.25rem;
    margin: 0 3rem 2.5rem;
    padding: 1.5rem 1.75rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #bbf7d0;
    border-radius: 14px;
}

.legal-contact__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #bbf7d0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-primary);
    flex-shrink: 0;
}

.legal-contact__body h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--auth-text);
    margin: 0 0 0.35rem;
}

.legal-contact__body p {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #475569;
    margin: 0 0 0.5rem;
}

.legal-contact__email {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--auth-primary);
    text-decoration: none;
    margin: 0;
}

a.legal-contact__email:hover {
    text-decoration: underline;
}

.legal-footer {
    background: #fff;
    border-top: 1px solid var(--auth-border);
}

.legal-footer__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.legal-footer__copy {
    font-size: 0.8125rem;
    color: var(--auth-text-muted);
    margin: 0;
}

.legal-footer__links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.legal-footer__links a {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--auth-text-muted);
    text-decoration: none;
}

.legal-footer__links a:hover {
    color: var(--auth-primary);
}

@media (max-width: 991px) {
    .legal-header__inner {
        padding: 0.75rem 1rem;
        gap: 1rem;
    }

    .legal-header__nav {
        display: none;
    }

    .legal-main {
        padding: 1.5rem 1rem 2.5rem;
    }

    .legal-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .legal-toc {
        position: static;
        margin-bottom: 1.25rem;
        background: #fff;
        border: 1px solid var(--auth-border);
        border-radius: 12px;
        padding: 1rem 1.25rem;
    }

    .legal-toc__list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem 1rem;
        border-left: none;
    }

    .legal-toc__list a {
        padding: 0;
        margin-left: 0;
        border-left: none;
        font-size: 0.75rem;
    }

    .legal-hero {
        padding: 1.75rem 1.5rem 1.5rem;
    }

    .legal-hero h1 {
        font-size: 1.5rem;
    }

    .legal-prose {
        padding: 1.5rem;
    }

    .legal-contact {
        margin: 0 1.5rem 1.5rem;
        padding: 1.25rem;
    }

    .legal-footer__inner {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem 1rem;
    }
}

@media (max-width: 480px) {
    .legal-header__brand span {
        display: none;
    }

    .legal-header__back {
        display: none;
    }

    .legal-contact {
        flex-direction: column;
        margin: 0 1rem 1.25rem;
    }
}
