/* register.php — современная форма регистрации */

.auth-register-page {
    justify-content: flex-start;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(28px, env(safe-area-inset-bottom));
}

.auth-register-shell {
    width: 100%;
    max-width: 480px;
    position: relative;
}

.auth-register-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 0 2px;
}

.auth-register-toolbar .auth-back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.35);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.auth-register-toolbar .auth-back-home:hover {
    color: var(--accent-cyan);
    border-color: rgba(34, 211, 238, 0.35);
    background: rgba(34, 211, 238, 0.08);
}

.auth-register-toolbar .ui-theme-toggle {
    flex-shrink: 0;
}

.auth-register-box {
    max-width: 100%;
    padding: 36px 36px 32px;
}

.auth-register-hero {
    text-align: center;
    margin-bottom: 24px;
}

.auth-register-ico {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(34, 211, 238, 0.18));
    color: #a78bfa;
    border: 1px solid rgba(167, 139, 250, 0.25);
    box-shadow: 0 8px 24px -12px rgba(99, 102, 241, 0.45);
}

.auth-register-box .logo {
    margin-bottom: 6px;
}

.auth-register-box .subtitle {
    margin-bottom: 0;
    line-height: 1.45;
}

.auth-register-ref {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 12px;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.28);
    color: #34d399;
}

.auth-register-benefits {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
    margin-bottom: 22px;
}

.auth-register-benefit {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.auth-register-benefit i {
    color: var(--accent-cyan);
    font-size: 0.72rem;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.45;
}

.auth-alert-ico {
    flex-shrink: 0;
    font-size: 1.1rem;
    margin-top: 1px;
}

.auth-alert.error {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: var(--accent-red);
}

.auth-alert.success {
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.3);
    color: var(--accent-emerald);
}

.auth-field {
    margin-bottom: 16px;
}

.auth-field-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.auth-field-label i {
    opacity: 0.75;
    font-size: 0.85em;
    color: var(--accent-cyan);
}

.auth-input-wrap {
    position: relative;
}

.auth-register-page .auth-form .auth-input-wrap input[type="text"],
.auth-register-page .auth-form .auth-input-wrap input[type="email"],
.auth-register-page .auth-form .auth-input-wrap input[type="password"] {
    width: 100%;
    padding: 13px 16px;
    margin-bottom: 0 !important;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-register-page .auth-form .auth-input-wrap input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-cyan-dim);
}

.auth-register-page .auth-form .auth-input-wrap input::placeholder {
    color: var(--text-muted);
    opacity: 0.85;
}

.auth-register-page .auth-form .auth-input-wrap--password input {
    padding-right: 48px;
}

.auth-pwd-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
}

.auth-pwd-toggle:hover {
    color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.08);
}

.auth-form .btn-register {
    width: 100%;
    margin-top: 6px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-telegram-block {
    margin: 0 0 4px;
    text-align: center;
}

.auth-telegram-block iframe {
    margin: 0 auto;
}

.auth-register-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.auth-register-links p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.auth-register-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.auth-register-links a:hover {
    text-decoration: underline;
}

.auth-page .legal-agree-check-all i {
    margin-right: 0.35rem;
}

@media (max-width: 600px) {
    .auth-register-box {
        padding: 28px max(18px, env(safe-area-inset-left)) 26px max(18px, env(safe-area-inset-right));
    }

    .auth-register-toolbar .auth-back-home span {
        display: none;
    }
}

/* ——— Светлая тема ——— */
html[data-ui-theme="light"] body.auth-register-page .auth-register-toolbar .auth-back-home,
html[data-bs-theme="light"] body.auth-register-page .auth-register-toolbar .auth-back-home {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: #64748b !important;
}

html[data-ui-theme="light"] body.auth-register-page .auth-register-toolbar .auth-back-home:hover,
html[data-bs-theme="light"] body.auth-register-page .auth-register-toolbar .auth-back-home:hover {
    color: #0284c7 !important;
    border-color: rgba(14, 165, 233, 0.35) !important;
    background: rgba(14, 165, 233, 0.06) !important;
}

html[data-ui-theme="light"] body.auth-register-page .auth-register-ico,
html[data-bs-theme="light"] body.auth-register-page .auth-register-ico {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(14, 165, 233, 0.15)) !important;
    color: #6d28d9 !important;
    border-color: rgba(124, 58, 237, 0.2) !important;
}

html[data-ui-theme="light"] body.auth-register-page .auth-register-ref,
html[data-bs-theme="light"] body.auth-register-page .auth-register-ref {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.28) !important;
    color: #047857 !important;
}

html[data-ui-theme="light"] body.auth-register-page .auth-register-benefit,
html[data-bs-theme="light"] body.auth-register-page .auth-register-benefit {
    background: #f1f5f9 !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    color: #64748b !important;
}

html[data-ui-theme="light"] body.auth-register-page .auth-register-benefit i,
html[data-bs-theme="light"] body.auth-register-page .auth-register-benefit i {
    color: #0284c7 !important;
}

html[data-ui-theme="light"] body.auth-register-page .auth-field-label i,
html[data-bs-theme="light"] body.auth-register-page .auth-field-label i {
    color: #0284c7 !important;
}

html[data-ui-theme="light"] body.auth-register-page .auth-form .auth-input-wrap input[type="text"],
html[data-ui-theme="light"] body.auth-register-page .auth-form .auth-input-wrap input[type="email"],
html[data-ui-theme="light"] body.auth-register-page .auth-form .auth-input-wrap input[type="password"],
html[data-bs-theme="light"] body.auth-register-page .auth-form .auth-input-wrap input[type="text"],
html[data-bs-theme="light"] body.auth-register-page .auth-form .auth-input-wrap input[type="email"],
html[data-bs-theme="light"] body.auth-register-page .auth-form .auth-input-wrap input[type="password"] {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.15) !important;
    color: #0f172a !important;
}

html[data-ui-theme="light"] body.auth-register-page .auth-form .auth-input-wrap input::placeholder,
html[data-bs-theme="light"] body.auth-register-page .auth-form .auth-input-wrap input::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

html[data-ui-theme="light"] body.auth-register-page .auth-field-label,
html[data-bs-theme="light"] body.auth-register-page .auth-field-label {
    color: #334155 !important;
}
