/* Exness Auth — Login & Register */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --yellow: #ffcf00;
    --yellow-hover: #e6ba00;
    --bg: #111111;
    --card-bg: #1c1c1c;
    --border: #2e2e2e;
    --border-light: #3a3a3a;
    --text: #ffffff;
    --text-muted: #9a9a9a;
    --text-dim: #6b6b6b;
    --error-bg: rgba(244, 67, 54, 0.12);
    --error-text: #ff6b6b;
    --promo-bg: linear-gradient(145deg, #1a1214 0%, #111 40%, #0d1117 100%);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body { height: 100%; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.hidden { display: none !important; }

/* Page layout */
.auth-page {
    display: flex;
    min-height: 100vh;
}

.auth-promo {
    flex: 1;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 48px;
    background: var(--promo-bg);
    border-right: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.auth-promo::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 207, 0, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

@media (min-width: 900px) {
    .auth-promo { display: flex; }
}

.auth-logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--yellow);
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.auth-promo-content {
    position: relative;
    z-index: 1;
    max-width: 420px;
}

.auth-promo-content h1 {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.auth-promo-content p {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 40px;
}

.auth-stats {
    list-style: none;
    display: flex;
    gap: 32px;
}

.auth-stats li {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--yellow);
}

.stat-label {
    font-size: 13px;
    color: var(--text-dim);
}

.auth-promo-footer {
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.5;
    max-width: 380px;
    position: relative;
    z-index: 1;
}

/* Main form area */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    min-height: 100vh;
}

@media (min-width: 900px) {
    .auth-main {
        flex: 0 0 480px;
        max-width: 480px;
    }
}

.auth-card {
    width: 100%;
    max-width: 400px;
}

/* Mobile logo */
.auth-main::before {
    content: 'exness';
    display: block;
    position: absolute;
    top: 24px;
    left: 24px;
    font-size: 24px;
    font-weight: 700;
    color: var(--yellow);
    letter-spacing: -0.5px;
}

@media (min-width: 900px) {
    .auth-main::before { display: none; }
}

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 4px;
    background: #1a1a1a;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 28px;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.auth-tab.active {
    background: var(--card-bg);
    color: var(--text);
    font-weight: 600;
}

a.auth-tab:hover { color: var(--text); }

/* Headings */
.auth-heading {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.auth-subheading {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Alert */
.auth-alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
}

.auth-alert-error {
    background: var(--error-bg);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: var(--error-text);
}

.auth-alert p + p { margin-top: 4px; }

/* Form */
.auth-form { display: flex; flex-direction: column; gap: 16px; }

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.form-field input,
.form-field select {
    width: 100%;
    padding: 12px 14px;
    background: #1a1a1a;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}

.form-field input::placeholder { color: var(--text-dim); }

.form-field input:focus,
.form-field select:focus {
    border-color: var(--yellow);
}

.form-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239a9a9a' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.form-field select option {
    background: #1a1a1a;
    color: var(--text);
}

/* Password toggle */
.password-wrap {
    position: relative;
}

.password-wrap input { padding-right: 44px; }

.toggle-password {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-dim);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.15s;
}

.toggle-password:hover { color: var(--text-muted); }

.toggle-password svg {
    width: 18px;
    height: 18px;
}

/* Checkbox row */
.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 1px;
    accent-color: var(--yellow);
    flex-shrink: 0;
    cursor: pointer;
}

.terms-label { margin-top: -4px; }

.terms-label a {
    color: var(--yellow);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.terms-label a:hover { color: var(--yellow-hover); }

.link-muted {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

.link-muted:hover { color: var(--yellow); }

/* Primary button */
.btn-auth-primary {
    width: 100%;
    padding: 14px 24px;
    background: var(--yellow);
    color: #111;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    margin-top: 4px;
    transition: background 0.15s;
}

.btn-auth-primary:hover { background: var(--yellow-hover); }

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0 16px;
    color: var(--text-dim);
    font-size: 12px;
}

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

/* Social buttons */
.social-buttons {
    display: flex;
    gap: 12px;
}

.btn-social {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    background: #1a1a1a;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    transition: border-color 0.15s, background 0.15s;
}

.btn-social:hover:not(:disabled) {
    border-color: var(--border-light);
    background: #222;
}

.btn-social:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-social svg {
    width: 18px;
    height: 18px;
}

/* Switch link */
.auth-switch {
    text-align: center;
    margin-top: 28px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--yellow);
    font-weight: 500;
}

.auth-switch a:hover { color: var(--yellow-hover); }

/* Responsive */
@media (max-width: 480px) {
    .auth-main { padding: 72px 16px 24px; }
    .auth-heading { font-size: 22px; }
    .social-buttons { flex-direction: column; }
    .form-row { flex-direction: column; align-items: flex-start; }
}
