/* ===== AUTH PAGES — IMMERSIVE ===== */

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes cardEntry {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(-45deg, #0f0c29, #1a1040, #1e3a5f, #0d2137, #1a0a2e, #0f2027);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 20% 50%, rgba(0, 191, 255, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 60% 80%, rgba(249, 115, 22, 0.06) 0%, transparent 50%);
    z-index: 0;
    animation: float 15s ease-in-out infinite;
}

.auth-page__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.auth-page__bg canvas {
    width: 100%;
    height: 100%;
    opacity: 0.6;
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 2.75rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.1),
                0 0 80px rgba(0, 191, 255, 0.05),
                0 0 80px rgba(139, 92, 246, 0.05);
    animation: cardEntry 0.6s ease-out;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20%;
    right: 20%;
    height: 3px;
    background: linear-gradient(90deg, #00BFFF, #4169E1, #8B5CF6, #E040A0, #F97316);
    border-radius: 0 0 4px 4px;
}

.auth-card__logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.auth-logo-img {
    height: 110px;
    width: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
}

.auth-logo-text {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 0.3em;
    margin-top: -0.5rem;
    background: linear-gradient(135deg, #00BFFF 0%, #4169E1 25%, #8B5CF6 50%, #E040A0 75%, #F97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-card__logo svg {
    height: 40px;
    width: auto;
}

.auth-card__title {
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.4rem;
    color: #0d1117;
}

.auth-card__subtitle {
    text-align: center;
    color: #64748b;
    font-size: 0.92rem;
    margin-bottom: 2rem;
}

.auth-card .form__group { margin-bottom: 1rem; }

.auth-card .form__label {
    color: #334155;
    font-weight: 600;
    font-size: 0.88rem;
}

.auth-card .form__input {
    padding: 0.88rem 1rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s;
    color: #0d1117;
}

.auth-card .form__input:focus {
    background: #fff;
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    outline: none;
}

.auth-card .form__select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8.5L1 3.5h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form__input-wrapper {
    position: relative;
}

.form__input-wrapper .form__input {
    padding-right: 2.75rem;
}

.form__toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    padding: 0.25rem;
    transition: color 0.2s;
}

.form__toggle-password:hover { color: #334155; }
.form__toggle-password svg { width: 18px; height: 18px; }

.auth-card .btn--primary {
    background: linear-gradient(135deg, #8B5CF6, #6C5CE7, #4169E1);
    border: none;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
    transition: all 0.3s;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.auth-card .btn--primary:hover {
    box-shadow: 0 6px 25px rgba(108, 92, 231, 0.45);
    transform: translateY(-1px);
}

.auth-card .btn--outline {
    border: 1.5px solid #e2e8f0;
    color: #64748b;
    background: transparent;
}

.auth-card .btn--outline:hover {
    border-color: #8B5CF6;
    color: #8B5CF6;
    background: rgba(139, 92, 246, 0.04);
}

.auth-card__divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: #94a3b8;
    font-size: 0.82rem;
}

.auth-card__divider::before,
.auth-card__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth-card__footer {
    text-align: center;
    margin-top: 1.75rem;
    font-size: 0.9rem;
    color: #64748b;
}

.auth-card__footer a {
    color: #8B5CF6;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-card__footer a:hover { color: #6C5CE7; }

.auth-card__error {
    padding: 0.8rem 1rem;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 10px;
    color: #ef4444;
    font-size: 0.88rem;
    margin-bottom: 1rem;
    display: none;
    font-weight: 500;
}

.auth-card__error.show { display: block; }

.form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.form__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.form__checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #8B5CF6;
    border-radius: 4px;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.form__checkbox a {
    color: #8B5CF6;
    font-weight: 600;
}

/* ===== PLAN SELECTOR ===== */
.plan-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.plan-option {
    padding: 0.85rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.plan-option:hover {
    border-color: #c4b5fd;
    background: rgba(139, 92, 246, 0.03);
}

.plan-option.selected {
    border-color: #8B5CF6;
    background: rgba(139, 92, 246, 0.06);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.plan-option input { display: none; }

.plan-option__name {
    font-weight: 700;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.15rem;
    color: #0d1117;
}

.plan-option__price {
    font-size: 0.78rem;
    color: #64748b;
}

/* ===== BILLING TOGGLE ===== */
.billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    font-weight: 500;
}

.billing-toggle__label {
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
}

.billing-toggle__label.active {
    color: #0d1117;
    font-weight: 700;
}

.billing-toggle__switch {
    width: 44px;
    height: 24px;
    background: #e2e8f0;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.billing-toggle__switch.active {
    background: linear-gradient(135deg, #8B5CF6, #6C5CE7);
}

.billing-toggle__switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.billing-toggle__switch.active::after {
    transform: translateX(20px);
}

.billing-toggle__badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
}

/* ===== MULTI-STEP REGISTER ===== */
.auth-card--wide {
    max-width: 520px;
}

.register-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 2rem;
}

.register-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    position: relative;
}

.register-step__circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.82rem;
    border: 2px solid #e2e8f0;
    color: #94a3b8;
    background: #f8fafc;
    transition: all 0.3s;
}

.register-step.active .register-step__circle {
    border-color: #8B5CF6;
    background: linear-gradient(135deg, #8B5CF6, #6C5CE7);
    color: #fff;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
}

.register-step.completed .register-step__circle {
    border-color: #8B5CF6;
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

.register-step__label {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 500;
}

.register-step.active .register-step__label {
    color: #8B5CF6;
    font-weight: 600;
}

.register-step__line {
    width: 40px;
    height: 2px;
    background: #e2e8f0;
    margin: 0 0.4rem;
    margin-bottom: 1.2rem;
}

.register-panel {
    display: none;
}

.register-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.register-panel__title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: #0d1117;
}

.form__nav-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.form__nav-row .btn {
    flex: 1;
}

.form__required {
    color: #ef4444;
    font-weight: 400;
}

.form__hint {
    font-weight: 400;
    color: #94a3b8;
    font-size: 0.82em;
}

.form__helper {
    display: block;
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 0.3rem;
}

.form__input-wrapper--prefix {
    display: flex;
    align-items: center;
}

.form__prefix {
    padding: 0.88rem 0.75rem;
    background: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    border-right: none;
    border-radius: 10px 0 0 10px;
    font-size: 0.9rem;
    color: #475569;
    font-weight: 500;
    white-space: nowrap;
}

.form__input--prefixed {
    border-radius: 0 10px 10px 0 !important;
}

/* Vertical plan selector for register */
.plan-selector--vertical {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.plan-selector--vertical .plan-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 0.75rem 1rem;
}

.plan-option__info {
    flex: 1;
    min-width: 0;
}

.plan-option__desc {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.15rem;
}

.plan-selector--vertical .plan-option__price {
    font-weight: 700;
    font-size: 0.88rem;
    color: #6C5CE7;
    white-space: nowrap;
    margin-left: 0.75rem;
}

.plan-selector--vertical .plan-option__price small {
    font-weight: 400;
    font-size: 0.72rem;
    color: #94a3b8;
}

/* Password strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.4rem;
    font-size: 0.78rem;
    font-weight: 500;
}

.password-strength__bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: #e2e8f0;
    overflow: hidden;
}

.password-strength__bar div {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
}

/* Confirmation summary */
.confirm-summary {
    margin-bottom: 1.25rem;
}

.confirm-section {
    margin-bottom: 1rem;
}

.confirm-section__title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #e2e8f0;
}

.confirm-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    font-size: 0.88rem;
}

.confirm-row span {
    color: #64748b;
}

.confirm-row strong {
    font-weight: 600;
    text-align: right;
    color: #0d1117;
}

.payment-notice {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 1rem;
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 10px;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
}

.payment-notice svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #8B5CF6;
    margin-top: 0.1rem;
}

/* Country selector */
.country-phone-group {
    display: flex;
    gap: 0;
}

.country-phone-group .form__select {
    max-width: 110px;
    border-radius: 10px 0 0 10px;
    border-right: none;
    font-size: 0.85rem;
}

.country-phone-group .form__input {
    border-radius: 0 10px 10px 0;
    flex: 1;
}

/* Legal pages */
.auth-card--legal {
    max-width: 800px;
    text-align: left;
}

.auth-card--legal h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0d1117;
    margin: 1.5rem 0 0.75rem;
}

.auth-card--legal h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
    margin: 1rem 0 0.5rem;
}

.auth-card--legal p, .auth-card--legal li {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.7;
}

.auth-card--legal ul, .auth-card--legal ol {
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.auth-card--legal li {
    margin-bottom: 0.3rem;
}

/* ===== FIELD ERRORS ===== */
.form__field-error {
    display: none;
    font-size: 0.78rem;
    color: #ef4444;
    margin-top: 0.25rem;
    font-weight: 500;
}

.form__input--error {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.03) !important;
}

.form__input--error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
    border-color: #ef4444 !important;
}

/* ===== REGISTER PANEL DESC ===== */
.register-panel__desc {
    font-size: 0.88rem;
    color: #64748b;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/* ===== ADDON CARDS ===== */
.addons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.addon-card {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.addon-card:hover {
    border-color: #c4b5fd;
    background: rgba(139, 92, 246, 0.02);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.addon-card--selected {
    border-color: #8B5CF6;
    background: rgba(139, 92, 246, 0.06);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.addon-card--selected .addon-card__check {
    opacity: 1;
    transform: scale(1);
}

.addon-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.addon-card__icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8B5CF6;
    background: rgba(139, 92, 246, 0.08);
    border-radius: 8px;
}

.addon-card__icon svg {
    width: 18px;
    height: 18px;
}

.addon-card__check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #8B5CF6;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.addon-card__check svg {
    width: 12px;
    height: 12px;
    color: #fff;
}

.addon-card__name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0d1117;
    margin-bottom: 0.25rem;
}

.addon-card__desc {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.addon-card__price {
    font-size: 0.88rem;
    font-weight: 700;
    color: #6C5CE7;
}

.addon-card__price small {
    font-weight: 400;
    font-size: 0.72rem;
    color: #94a3b8;
}

/* ===== ADDONS SUMMARY BOX ===== */
.addons-summary {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
}

.addons-summary__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}

.addons-summary__header svg {
    width: 16px;
    height: 16px;
    color: #8B5CF6;
}

.addons-summary__item {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: #64748b;
    padding: 0.25rem 0;
}

.addons-summary__total {
    border-top: 1.5px solid #8B5CF6;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    font-size: 0.88rem;
    color: #6C5CE7;
    text-align: right;
}

/* ===== CONFIRM HIGHLIGHT ROW ===== */
.confirm-row--highlight {
    background: rgba(139, 92, 246, 0.06);
    padding: 0.6rem 0.75rem !important;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.confirm-row--highlight span { color: #475569; font-weight: 600; }
.confirm-row--highlight strong { color: #6C5CE7; font-size: 1rem; }

/* ===== PHONE VERIFICATION ===== */
.phone-verify__box {
    background: rgba(139, 92, 246, 0.04);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 0.75rem;
}

.phone-verify__icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8B5CF6;
    flex-shrink: 0;
}

.phone-verify__icon svg {
    width: 24px;
    height: 24px;
}

.phone-verify__content {
    flex: 1;
}

.phone-verify__text {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.phone-verify__code-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.75rem;
}

.phone-verify__digit {
    width: 40px !important;
    height: 44px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0;
    padding: 0 !important;
    border-radius: 8px !important;
}

.phone-verify__separator {
    color: #cbd5e1;
    font-size: 1.2rem;
}

.phone-verify__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.phone-verify__timer {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 500;
}

.phone-verify__status {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.phone-verify__status--success { color: #10b981; }
.phone-verify__status--error { color: #ef4444; }

@media (max-width: 480px) {
    .auth-card { padding: 1.75rem; }
    .auth-card--wide { max-width: 100%; }
    .register-step__label { font-size: 0.65rem; }
    .register-step__line { width: 20px; }
    .plan-selector--vertical { max-height: 260px; }
    .auth-card--legal { padding: 1.5rem; }
    .addons-grid { grid-template-columns: 1fr; }
    .phone-verify__box { flex-direction: column; }
    .phone-verify__digit { width: 34px !important; height: 38px; }
}
