﻿:root {
    --deat-black: #000000;
    --deat-charcoal: #1d1d1f;
    --deat-dark-grey: #424245;
    --deat-mid-grey: #86868b;
    --deat-light-grey: #d2d2d7;
    --deat-off-white: #f5f5f7;
    --deat-white: #ffffff;
    --deat-blue: #0071e3;
    --deat-blue-hover: #0077ed;
    --deat-success: #34c759;
    --deat-error: #ff3b30;
    --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
}

.auth-page {
    /*position: fixed;*/
    inset: 0;
    background: linear-gradient(180deg, #f5f5f7 0%, #ffffff 100%);
    font-family: var(--font-family);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    z-index: 9999;
    -webkit-font-smoothing: antialiased;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: var(--deat-white);
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 12px 48px rgba(0,0,0,0.08);
    padding: 56px 48px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
}

.auth-logo-icon {
    width: 64px;
    height: 64px;
    background: var(--deat-black);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

    .auth-logo-icon svg {
        width: 32px;
        height: 32px;
    }

.auth-logo-text {
    font-size: 28px;
    font-weight: 700;
    color: var(--deat-black);
    letter-spacing: -0.5px;
}

.auth-logo-tagline {
    font-size: 15px;
    color: var(--deat-mid-grey);
    margin-top: 4px;
}

.auth-logo-img {
    max-width: 160px;
    height: auto;
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--deat-black);
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 17px;
    color: var(--deat-mid-grey);
    text-align: center;
    margin-bottom: 32px;
    line-height: 1.5;
}

    .auth-subtitle a {
        color: var(--deat-blue);
        text-decoration: none;
    }

        .auth-subtitle a:hover {
            text-decoration: underline;
        }

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
}

.step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .step-dot.inactive {
        background: var(--deat-off-white);
        color: var(--deat-mid-grey);
    }

    .step-dot.active {
        background: var(--deat-black);
        color: var(--deat-white);
    }

    .step-dot.completed {
        background: var(--deat-success);
        color: var(--deat-white);
    }

.step-connector {
    width: 24px;
    height: 2px;
    background: var(--deat-light-grey);
    margin: 0 4px;
}

    .step-connector.completed {
        background: var(--deat-success);
    }

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--deat-charcoal);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 16px 18px;
    font-size: 17px;
    font-family: var(--font-family);
    color: var(--deat-black);
    background: var(--deat-off-white);
    border: 2px solid transparent;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
}

    .form-input::placeholder {
        color: var(--deat-mid-grey);
    }

    .form-input:focus {
        background: var(--deat-white);
        border-color: var(--deat-blue);
        box-shadow: 0 0 0 4px rgba(0,113,227,0.1);
    }

    .form-input.error {
        border-color: var(--deat-error);
    }

.form-error {
    font-size: 13px;
    color: var(--deat-error);
    margin-top: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--deat-off-white);
    border: 2px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .radio-option:hover {
        background: #ebebed;
    }

    .radio-option.selected {
        background: var(--deat-white);
        border-color: var(--deat-black);
    }

.radio-circle {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border: 2px solid var(--deat-light-grey);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.radio-option.selected .radio-circle {
    border-color: var(--deat-black);
    border-width: 7px;
}

.radio-content {
    flex: 1;
}

.radio-label {
    font-size: 17px;
    font-weight: 600;
    color: var(--deat-black);
    margin-bottom: 4px;
}

.radio-description {
    font-size: 14px;
    color: var(--deat-mid-grey);
    line-height: 1.4;
}

.radio-option .help-icon {
    width: 28px;
    height: 28px;
    background: rgba(0,0,0,0.05);
    border: none;
    border-radius: 50%;
    color: var(--deat-mid-grey);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .radio-option .help-icon:hover {
        background: var(--deat-blue);
        color: var(--deat-white);
    }

/* Auth marketing/billing preference row — wraps a label + a .toggle-track/.toggle-thumb
   mini-switch. Renamed from .toggle-switch to avoid collision with the standard
   slider-toggle pattern (.toggle-switch > input + .toggle-slider) used elsewhere. */
.auth-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.auth-toggle-label {
    font-size: 16px;
    color: var(--deat-charcoal);
}

.toggle-track {
    width: 52px;
    height: 32px;
    background: #c7c7cc;
    border-radius: 16px;
    cursor: pointer;
    position: relative;
    transition: background 0.2s ease;
    flex-shrink: 0;
    border: 1px solid #b5b5ba;
}

    .toggle-track:hover {
        background: #b5b5ba;
    }

    .toggle-track.active {
        background: #34c759;
        border-color: #34c759;
    }

        .toggle-track.active:hover {
            background: #2db550;
        }

.toggle-thumb {
    position: absolute;
    width: 28px;
    height: 28px;
    background: #ffffff;
    border-radius: 50%;
    top: 1px;
    left: 1px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.04);
    transition: transform 0.2s ease;
}

.toggle-track.active .toggle-thumb {
    transform: translateX(20px);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    background: var(--deat-off-white);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .checkbox-group:hover {
        background: #ebebed;
    }

.checkbox-box {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border: 2px solid var(--deat-light-grey);
    border-radius: 6px;
    transition: all 0.2s ease;
}

    .checkbox-box.checked {
        background: var(--deat-black);
        border-color: var(--deat-black);
    }

        .checkbox-box.checked::after {
            content: '';
            display: block;
            width: 12px;
            height: 6px;
            border-left: 2px solid white;
            border-bottom: 2px solid white;
            transform: rotate(-45deg);
            margin: 5px 0 0 4px;
        }

.checkbox-label {
    font-size: 15px;
    color: var(--deat-charcoal);
    line-height: 1.5;
}

    .checkbox-label a {
        color: var(--deat-blue);
        text-decoration: none;
    }

.expandable-section {
    margin-bottom: 12px;
}

.expandable-trigger {
    width: 100%;
    padding: 16px;
    background: var(--deat-off-white);
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    color: var(--deat-mid-grey);
    cursor: pointer;
    text-align: left;
    font-family: var(--font-family);
    transition: all 0.2s ease;
}

    .expandable-trigger:hover {
        background: #ebebed;
        color: var(--deat-charcoal);
    }

.expandable-content {
    padding: 20px;
    background: var(--deat-off-white);
    border-radius: 0 0 12px 12px;
    margin-top: -8px;
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    flex: 1;
    padding: 16px 24px;
    font-size: 17px;
    font-weight: 600;
    font-family: var(--font-family);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

    .btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.btn-primary {
    background: var(--deat-black);
    color: var(--deat-white);
}

    .btn-primary:hover:not(:disabled) {
        background: var(--deat-charcoal);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

.btn-secondary {
    background: var(--deat-off-white);
    color: var(--deat-charcoal);
}

    .btn-secondary:hover:not(:disabled) {
        background: #ebebed;
    }

.btn-outline {
    background: transparent;
    color: var(--deat-black);
    border: 2px solid var(--deat-black);
}

    .btn-outline:hover:not(:disabled) {
        background: var(--deat-black);
        color: var(--deat-white);
    }

.btn-link {
    background: none;
    color: var(--deat-blue);
    padding: 8px 0;
    flex: none;
}

    .btn-link:hover {
        text-decoration: underline;
    }

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.password-input-wrapper {
    position: relative;
}

    .password-input-wrapper .form-input {
        padding-right: 70px;
    }

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--deat-blue);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-family);
}

.info-box {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    background: rgba(0,113,227,0.08);
    border-radius: 12px;
    margin-bottom: 20px;
}

.info-box-icon {
    width: 24px;
    height: 24px;
    background: var(--deat-blue);
    color: var(--deat-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.info-box-text {
    font-size: 14px;
    color: var(--deat-charcoal);
    line-height: 1.5;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--deat-success);
    border-radius: 50%;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pop 0.4s ease;
}

@keyframes pop {
    0% {
        transform: scale(0);
    }

    70% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.success-icon::after {
    content: '';
    width: 32px;
    height: 16px;
    border-left: 4px solid white;
    border-bottom: 4px solid white;
    transform: rotate(-45deg) translateY(-4px);
}

.success-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--deat-black);
    text-align: center;
    margin-bottom: 8px;
}

.success-message {
    font-size: 17px;
    color: var(--deat-mid-grey);
    text-align: center;
    line-height: 1.5;
    margin-bottom: 32px;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 15px;
    color: var(--deat-mid-grey);
}

    .auth-footer a {
        color: var(--deat-blue);
        text-decoration: none;
        font-weight: 500;
    }

        .auth-footer a:hover {
            text-decoration: underline;
        }

.help-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10000;
}

    .help-panel-overlay.open {
        opacity: 1;
        visibility: visible;
    }

.help-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 100%;
    height: 100%;
    background: var(--deat-white);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 10001;
    display: flex;
    flex-direction: column;
}

    .help-panel.open {
        transform: translateX(0);
    }

.help-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--deat-light-grey);
}

.help-panel-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--deat-black);
}

.help-panel-close {
    width: 32px;
    height: 32px;
    background: var(--deat-off-white);
    border: none;
    border-radius: 50%;
    font-size: 18px;
    color: var(--deat-mid-grey);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .help-panel-close:hover {
        background: #ebebed;
    }

.help-panel-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

    .help-panel-content p {
        font-size: 16px;
        color: var(--deat-charcoal);
        line-height: 1.6;
    }

@media (max-width: 540px) {
    .auth-card {
        padding: 40px 24px;
        border-radius: 20px;
    }

    .auth-title {
        font-size: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .btn-group {
        flex-direction: column;
    }
}
