:root {
    --bg: #03050c;
    --panel: rgba(10, 14, 28, 0.92);
    --border: rgba(255, 255, 255, 0.14);
    --text: #edf3ff;
    --muted: #a5b1cb;
    --placeholder: #a5b1cb6b;
    --accent: #7ea4ff;
    --field-label: #c3d0ef;
    --input-bg: rgba(255, 255, 255, 0.03);
    --option-bg: #0b1020;
    --option-text: #edf3ff;
    --button-bg: #edf3ff;
    --button-text: #000000;
    --button-hover-bg: #000000;
    --button-hover-text: #edf3ff;
    --danger: #f28585;
    --notice: #c9d6f7;
    --progress-track: rgba(255, 255, 255, 0.12);
    --progress-fill-start: #7ea4ff;
    --progress-fill-end: #c4d6ff;
    --card-active-bg: #ffffff;
    --card-active-border: #244b98;
    --card-active-text: #0f2f7a;
    --chip-border: #e7ecf7;
    --chip-bg: #ffffff;
    --chip-text: #153c8a;
    --warning-bg: rgba(242, 133, 133, 0.12);
    --warning-border: rgba(242, 133, 133, 0.45);
    --warning-text: #ffd9d9;
    --error-bg: rgba(242, 133, 133, 0.12);
    --error-border: rgba(242, 133, 133, 0.38);
    --error-text: #ffd9d9;
    --success-chip-bg: rgba(126, 164, 255, 0.18);
    --success-chip-border: rgba(126, 164, 255, 0.45);
    --success-chip-text: #dbe6ff;
    --success-icon-bg: rgba(126, 164, 255, 0.22);
    --success-panel-bg: rgba(255, 255, 255, 0.03);
    --success-panel-border: rgba(255, 255, 255, 0.1);
    --spacing: 8px;
}

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

body {
    background: radial-gradient(900px 500px at 50% -10%, rgba(35, 70, 155, 0.35), transparent 70%), var(--bg);
    color: var(--text);
    font-family: sans-serif;
    min-height: 100vh;
}

.waitlist-page {
    min-height: 100vh;
    padding: calc(var(--spacing) * 5) calc(var(--spacing) * 3);
    display: grid;
    place-items: center;
}

.waitlist-card {
    width: min(560px, 100%);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: calc(var(--spacing) * 4);
    display: grid;
    gap: calc(var(--spacing) * 2);
}

.waitlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(var(--spacing) * 2);
}

.waitlist-title {
    font-family: 'Syne', sans-serif !important;
    text-transform: uppercase;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    padding-top: 1.5rem;
}
.back-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 1rem;
    width: fit-content;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: calc(var(--spacing) * 1.25);
    font-family: sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
}

.brand img {
    height: 20px;
    width: auto;
}

.logo-light {
    display: none;
}

h1 {
    font-family: sans-serif;
    font-size: clamp(1.7rem, 4vw, 2.3rem);
}

.intro {
    text-align: center;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 400;
}

.form-error {
    margin-top: calc(var(--spacing) * 1);
    border: 1px solid var(--error-border);
    background: var(--error-bg);
    color: var(--error-text);
    border-radius: 10px;
    padding: calc(var(--spacing) * 1.25) calc(var(--spacing) * 1.5);
    font-size: 0.95rem;
    line-height: 1.35;
}

.email-verification-note {
    margin-top: calc(var(--spacing) * -0.8);
    margin-bottom: calc(var(--spacing) * 0.3);
    border: 1px solid var(--success-chip-border);
    background: var(--success-chip-bg);
    color: var(--success-chip-text);
    border-radius: 10px;
    padding: calc(var(--spacing) * 1) calc(var(--spacing) * 1.3);
    font-size: 0.88rem;
    line-height: 1.4;
}

.email-verification-note[data-state="error"] {
    border-color: var(--error-border);
    background: var(--error-bg);
    color: var(--error-text);
}

.email-verification-note[data-state="success"] {
    border-color: var(--success-chip-border);
    background: var(--success-chip-bg);
    color: var(--success-chip-text);
}

.email-verification-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: calc(var(--spacing) * 1);
    margin-top: calc(var(--spacing) * -0.6);
    width: 30%;
    margin-bottom: calc(var(--spacing) * 0.3);
    justify-self: center;
}



.email-verification-panel input {
    text-align: center;
    letter-spacing: 0.35em;
    font-weight: 700;
}

.submit-verification-note {
    margin-bottom: calc(var(--spacing) * 0.6);
    color: var(--error-text);
    font-size: 0.88rem;
    line-height: 1.35;
    text-align: center;

}

.waitlist-form {
    margin-top: calc(var(--spacing) * 1);
    display: grid;
    gap: calc(var(--spacing) * 1.75);
}

.waitlist-form label {
    font-size: 0.85rem;
    letter-spacing: 0.09em;
    color: var(--field-label);
}

.waitlist-form input,
.waitlist-form textarea,
.waitlist-form select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--text);
    color-scheme: dark;
    padding: calc(var(--spacing) * 1.5);
    font-size: 1rem;
    font-family: sans-serif;
    margin-bottom: calc(var(--spacing) * 1);
}

.waitlist-form textarea {
    min-height: 112px;
    resize: vertical;
    line-height: 1.5;
}

.waitlist-form input::placeholder,
.waitlist-form textarea::placeholder {
    color: var(--placeholder);
}

.waitlist-form input:-webkit-autofill,
.waitlist-form input:-webkit-autofill:hover,
.waitlist-form input:-webkit-autofill:focus,
.waitlist-form textarea:-webkit-autofill,
.waitlist-form textarea:-webkit-autofill:hover,
.waitlist-form textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    caret-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px var(--input-bg) inset;
    box-shadow: 0 0 0 1000px var(--input-bg) inset;
    transition: background-color 9999s ease-out 0s;
}

#cv {
    padding: calc(var(--spacing) * 1);
}



#cv::file-selector-button {
    width: 34px;
    height: 34px;
    margin-right: calc(var(--spacing) * 1.25);
    border: none;
    border-radius: 0;
    background: transparent;
    color: transparent;
    cursor: pointer;
    background-image: url("/static/icon/upload-document.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
    filter: brightness(0) invert(1);
}

#cv::-webkit-file-upload-button {
    width: 34px;
    height: 34px;
    margin-right: calc(var(--spacing) * 1.25);
    border: none;
    border-radius: 0;
    background: transparent;
    color: transparent;
    cursor: pointer;
    background-image: url("/static/icon/upload-document.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
    filter: brightness(0) invert(1);
}

#cv:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.optional-tag {
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    margin-left: 4px;
}

.field-helper {
    margin-top: calc(var(--spacing) * -0.45);
    margin-bottom: calc(var(--spacing) * 0.9);
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--placeholder);
}

.field-helper a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

#cv-label.warning {
    color: var(--danger);
}

#cv-label.warning .optional-tag {
    color: var(--danger);
}

.cv-notice {
    margin-top: calc(var(--spacing) * -0.5);
    margin-bottom: calc(var(--spacing) * 0.5);
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.35;
}

.cv-notice.warning {
    color: var(--danger);
}

/* ── intl-tel-input overrides ── */
.phone-wrapper {
    position: relative;
    margin-bottom: calc(var(--spacing) * 1);
    z-index: 1;
}

.phone-wrapper .iti {
    width: 100%;
    display: block;
}

.phone-wrapper .iti__tel-input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--text);
    padding: calc(var(--spacing) * 1.5);
    padding-left: calc(var(--spacing) * 15.5) !important;
    font-size: 1rem;
    font-family: sans-serif;
    margin-bottom: 0;
}

.phone-wrapper .iti__tel-input:focus {
    outline: none;
    border-color: rgba(126, 164, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(126, 164, 255, 0.2);
}

.phone-wrapper .iti__flag-container,
.phone-wrapper .iti__selected-dial-code {
    color: var(--text);
}

.phone-wrapper .iti__country-container {
    background: transparent;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    max-width: calc(var(--spacing) * 13.75);
    overflow: hidden;
}

.phone-wrapper .iti__selected-country {
    background: transparent;
    border: none;
    border-right: 1px solid var(--border);
    border-radius: 10px 0 0 10px;
    padding: 0 10px;
    height: calc(100% - 8px);
    display: inline-flex;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
    min-width: 0;
    flex-direction: row;
    max-width: 100%;
    overflow: hidden;
}

.phone-wrapper .iti__selected-country:hover,
.phone-wrapper .iti__selected-country[aria-expanded="true"] {
    background: rgba(126, 164, 255, 0.08);
}

.phone-wrapper .iti__selected-country-primary,
.phone-wrapper .iti__flag-container,
.phone-wrapper .iti__selected-country-inner {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 0;
}

.phone-wrapper .iti__flag {
    flex-shrink: 0;
    margin-right: 6px;
}

.phone-wrapper .iti__selected-dial-code {
    display: inline-block;
    white-space: nowrap;
    line-height: 1;
    flex-shrink: 0;
    margin-left: 0;
}

.iti__dropdown-content {
    background: var(--option-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
    z-index: 1200;
    min-width: 100%;
}

.iti__country:hover,
.iti__country.iti__highlight {
    background: rgba(126, 164, 255, 0.12);
}

.iti__country-name,
.iti__dial-code {
    color: var(--text);
}

.iti__search-input {
    background: var(--input-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    font-family: sans-serif;
}



[data-theme="light"] .phone-wrapper .iti__tel-input {
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
    border-color: rgba(0, 20, 80, 0.18);
}

[data-theme="light"] .phone-wrapper .iti__selected-country {
    border-right-color: rgba(0, 20, 80, 0.18);
}

[data-theme="light"] .iti__dropdown-content {
    background: #fff;
    border-color: rgba(0, 20, 80, 0.18);
    box-shadow: 0 14px 28px rgba(35, 61, 112, 0.18);
}

[data-theme="light"] .iti__country-name,
[data-theme="light"] .iti__dial-code {
    color: var(--text);
}

[data-theme="light"] .iti__search-input {
    background: #fff;
    color: var(--text);
    border-color: rgba(0, 20, 80, 0.18);
}
/* ── end intl-tel-input overrides ── */

.waitlist-form input:focus,
.waitlist-form textarea:focus,
.waitlist-form select:focus {
    outline: none;
    border-color: rgba(126, 164, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(126, 164, 255, 0.2);
}

.waitlist-form select option {
    color: var(--option-text);
    background: var(--option-bg);
}

[data-theme="light"] .waitlist-form input,
[data-theme="light"] .waitlist-form textarea,
[data-theme="light"] .waitlist-form select {
    color-scheme: light;
}

.waitlist-form label.non-gcc-toggle {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing) * 1);
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.75rem;
    color: var(--text);
    margin-bottom: calc(var(--spacing) * 1);
}

.non-gcc-toggle input {
    width: auto;
    accent-color: var(--accent);
}

.custom-country-field {
    display: grid;
    gap: calc(var(--spacing) * 1.25);
}

.custom-country-field[hidden] {
    display: none !important;
}

.waitlist-form select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.non-gcc-toggle input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.waitlist-form button {
    justify-self: center;
    text-decoration: none;
    padding: calc(var(--spacing) * 2) calc(var(--spacing) * 4);
    background: var(--button-bg);
    display: inline-flex;
    color: var(--button-text);
    text-decoration: none;
    font-family: 'Syne', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    gap: calc(var(--spacing) * 1);
    flex-direction: column;

}
.waitlist-form button.process {

    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    gap: calc(var(--spacing) * 1);
    flex-direction: row;
}

.waitlist-form button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.waitlist-form button:hover::before {
    width: 400px;
    height: 400px;
}

.waitlist-form button:hover {
    transform: scale(1.05);
    color: var(--button-hover-text);
    background: var(--button-hover-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.waitlist-form button:disabled:not(.is-loading),
.waitlist-form button.is-blocked {
    cursor: not-allowed;
    opacity: 0.72;
    transform: none;
}

.waitlist-form button .btn-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    animation: onboardSpin 0.7s linear infinite;
}

.waitlist-form button.is-loading .btn-spinner {
    display: inline-block;
}

.waitlist-form button.is-loading {
    cursor: not-allowed;
    background: var(--button-hover-bg);
    color: var(--button-hover-text);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.waitlist-form button.is-loading::before {
    width: 0;
    height: 0;
}

.waitlist-form button.is-loading:hover {
    background: var(--button-hover-bg);
    color: var(--button-hover-text);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

@keyframes onboardSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}


.notice {
    margin-top: calc(var(--spacing) * 1.5);
    color: var(--notice);
    font-size: 1rem;
    text-align: center;
}

.success-note {
    margin-top: calc(var(--spacing) * 0.5);
}

.success-badge {
    display: inline-flex;
    align-items: center;
    gap: calc(var(--spacing) * 1);
    border: 1px solid var(--success-chip-border);
    background: var(--success-chip-bg);
    color: var(--success-chip-text);
    border-radius: 999px;
    padding: calc(var(--spacing) * 0.85) calc(var(--spacing) * 1.5);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    font-weight: 600;
    width: fit-content;
}

.success-badge svg {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--success-icon-bg);
    stroke: currentColor;
    stroke-width: 1.9;
}

.success-panel {
    margin-top: calc(var(--spacing) * 1);
    border: 1px solid var(--success-panel-border);
    background: var(--success-panel-bg);
    border-radius: 12px;
    padding: calc(var(--spacing) * 2);
}

.success-panel h2 {
    font-size: 1.02rem;
    font-weight: 700;
    margin-bottom: calc(var(--spacing) * 1.5);
}
.waitlist-title {
    font-family: 'Syne', sans-serif !important;
    text-transform: uppercase;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    padding-top: 1.5rem;
}
.success-list {
    list-style: disc;
    padding-left: calc(var(--spacing) * 2.5);
    color: var(--muted);
    display: grid;
    gap: calc(var(--spacing) * 0.75);
    line-height: 1.4;
}

.success-actions {
    margin-top: calc(var(--spacing) * 1);
    display: flex;
    justify-content: center;
}

.referral-panel {
    margin-top: calc(var(--spacing) * 2);
}

.referral-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: calc(var(--spacing) * 1.5);
}

.referral-code-row {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing) * 1.5);
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: calc(var(--spacing) * 1.2) calc(var(--spacing) * 1.5);
}


.referral-code-value {
    flex: 1;
    font-family: monospace;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text);
}

.referral-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 5px 12px;
    cursor: pointer;
    transition: border-color 150ms ease, color 150ms ease;
}

.referral-copy-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.success-btn {
    background: var(--button-bg);
    color: var(--button-text);
    justify-self: center;
    text-decoration: none;
    padding: calc(var(--spacing) * 2) calc(var(--spacing) * 4);
    display: inline-flex;
    font-family: 'Syne', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    gap: calc(var(--spacing) * 1);
}

.success-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.success-btn:hover::before {
    width: 400px;
    height: 400px;
}

.success-btn:hover {
    transform: scale(1.05);
    color: var(--button-hover-text);
    background: var(--button-hover-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.success-btn-home {
    min-width: min(100%, 240px);
}

@media (max-width: 520px) {
    .waitlist-page {
        padding: 0;
        min-height: 100vh;
    }

    .waitlist-card {
        padding: calc(var(--spacing) * 3);
    }

    .email-verification-panel {
        grid-template-columns: 1fr;
    }

    .waitlist-form button {
        width: 100%;
    }
    .waitlist-card h1{
        margin: calc(var(--spacing) * 2) 0;
    }

}

/* Light Theme Overrides */
[data-theme="light"] {
    --bg: #f0f4fc;
    --panel: rgba(220, 232, 255, 0.9);
    --text: #1a2140;
    --muted: #4a5580;
    --border: rgba(0, 20, 80, 0.12);
    --accent: #3356b8;
    --field-label: #314977;
    --input-bg: rgba(255, 255, 255, 0.94);
    --option-bg: #eef4ff;
    --option-text: #1a2140;
    --button-bg: #2f54a3;
    --button-text: #ffffff;
    --button-hover-bg: #223f7d;
    --button-hover-text: #ffffff;
    --notice: #3e5688;
    --progress-track: rgba(49, 73, 119, 0.18);
    --progress-fill-start: #4f72c4;
    --progress-fill-end: #7f9ee0;
    --card-active-bg: #eaf1ff;
    --card-active-border: #5073c2;
    --card-active-text: #223f7d;
    --chip-border: #b8c9ec;
    --chip-bg: #f4f8ff;
    --chip-text: #2f4f90;
    --warning-bg: rgba(212, 96, 96, 0.12);
    --warning-border: rgba(212, 96, 96, 0.35);
    --warning-text: #8f2b2b;
    --error-bg: rgba(212, 96, 96, 0.1);
    --error-border: rgba(212, 96, 96, 0.28);
    --error-text: #8f2b2b;
    --success-chip-bg: rgba(51, 86, 184, 0.1);
    --success-chip-border: rgba(51, 86, 184, 0.26);
    --success-chip-text: #2a4d9f;
    --success-icon-bg: rgba(51, 86, 184, 0.14);
    --success-panel-bg: rgba(255, 255, 255, 0.94);
    --success-panel-border: rgba(0, 20, 80, 0.14);
}

[data-theme="light"] body {
    background: radial-gradient(1000px 560px at 50% -10%, #dbe7ff 0%, #edf3ff 45%, var(--bg) 100%);
    color: var(--text);
}

[data-theme="light"] .waitlist-card,
[data-theme="light"] .auth-main,
[data-theme="light"] .auth-aside,
[data-theme="light"] .plan-card,
[data-theme="light"] .profile-share-card,
[data-theme="light"] .card-shell {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 20, 80, 0.12);
    color: var(--text);
}

[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select {
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
    border-color: rgba(0, 20, 80, 0.18);
}

[data-theme="light"] .logo-dark {
    display: none;
}

[data-theme="light"] .logo-light {
    display: inline-block;
}
