@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Flex:opsz,wght@6..144,1..1000&display=swap');

* { margin:0; padding:0; box-sizing:border-box; font-family:"Google Sans Flex",sans-serif; }

:root {
    --primary-color: #ff8432;
    --border-color: #e8eaf2;
    --border: 1.5px solid #e8eaf2;
    --box-shadow: 0 4px 15px rgba(117,128,222,.2);
    --bg-primary: #ffffff;
    --bg-secondary: #f0f2f5;
    --text-primary: #0a0a0a;
    --text-secondary: #6b7280;
}

[data-theme="dark"] {
    --bg-primary: #111822;
    --bg-secondary: #1a1f2e;
    --text-primary: #e4e6eb;
    --text-secondary: #b0b3b8;
    --border-color: #3e4042;
    --border: 1.5px solid #3e4042;
}

a { text-decoration:none; color:inherit; }

body { background:var(--bg-secondary); min-height:100vh; }

/* ── Layout ── */
.auth-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ── Left panel ── */
.auth-panel {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff6b00 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.auth-panel::before {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    top: -100px; right: -100px;
}

.auth-panel::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    bottom: -80px; left: -80px;
}

.auth-panel-brand { position:relative; z-index:1; }

.auth-panel-logo { width:140px; margin-bottom:32px; }

.auth-panel-logo-text {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 32px;
    display: block;
}

.auth-panel-heading {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 16px;
}

.auth-panel-sub {
    font-size: 16px;
    color: rgba(255,255,255,.8);
    line-height: 1.7;
    max-width: 340px;
}

.auth-panel-features {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-panel-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,.9);
    font-size: 14px;
    font-weight: 500;
}

.auth-panel-feature-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

/* ── Right panel (form) ── */
.auth-form-panel {
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    overflow-y: auto;
}

.auth-form-wrap {
    width: 100%;
    max-width: 420px;
}

.auth-form-header { margin-bottom: 32px; }

.auth-form-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-form-sub {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

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

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

.auth-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.auth-input-wrap { position:relative; }

.auth-input-icon {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-secondary);
    pointer-events: none;
}

.form-control {
    width: 100%;
    height: 50px;
    padding: 0 16px 0 42px;
    border: var(--border);
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color .2s, background .2s;
}

.form-control:focus {
    border-color: var(--primary-color);
    background: var(--bg-primary);
}

.form-control::placeholder { color: var(--text-secondary); font-size:14px; }

.form-control.no-icon { padding-left: 16px; }

/* Password toggle */
.auth-pw-toggle {
    position: absolute;
    right: 14px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    cursor: pointer; color: var(--text-secondary);
    font-size: 18px; padding: 0;
    display: flex; align-items: center;
}

/* Two-col grid for name fields */
.auth-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }

/* Captcha */
.auth-captcha-row { display:flex; align-items:center; gap:10px; }
.auth-captcha-row .form-control { flex:1; }
.captcha-text {
    padding: 0 14px;
    height: 50px;
    display: flex; align-items: center;
    background: var(--bg-secondary);
    border: var(--border);
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    font-size: 15px;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
}
.captcha-refresh {
    height: 50px; width: 50px;
    border-radius: 12px;
    background: var(--bg-secondary);
    border: var(--border);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: border-color .2s;
}
.captcha-refresh:hover { border-color: var(--primary-color); color: var(--primary-color); }

/* Terms */
.auth-terms {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}
.auth-terms a { color: var(--primary-color); font-weight: 500; }

/* Submit button */
.auth-btn {
    width: 100%;
    height: 50px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: opacity .2s, transform .2s;
    box-shadow: 0 4px 14px rgba(255,132,50,.35);
}
.auth-btn:hover { opacity:.92; transform:translateY(-1px); }

/* Footer links */
.auth-footer {
    margin-top: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.auth-footer-line { font-size:14px; color:var(--text-secondary); margin:0; }
.auth-footer-link { color:var(--primary-color); font-weight:600; }
.auth-footer-link:hover { text-decoration:underline; }
.auth-footer-link--block { display:block; font-size:13px; color:var(--text-secondary); }
.auth-footer-link--block:hover { color:var(--primary-color); }

/* Divider */
.auth-divider {
    display: flex; align-items: center; gap: 12px;
    font-size: 12px; color: var(--text-secondary);
    margin: 4px 0;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1;
    height: 1px; background: var(--border-color);
}

/* Logo light/dark */
.logo-light { display:inline-block; }
.logo-dark  { display:none; }
[data-theme="dark"] .logo-light { display:none; }
[data-theme="dark"] .logo-dark  { display:inline-block; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-panel { display:none; }
    .auth-form-panel { padding: 32px 24px; min-height:100vh; }
}
