@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: #e2e8f0;
    --border: 1.5px solid #e2e8f0;
    --box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --border: 1.5px solid #334155;
    --box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

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: #080d18;
    background-image:
        radial-gradient(ellipse at 20% 30%, rgba(255, 132, 50, 0.18) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 52px;
    position: relative;
    overflow: hidden;
}

/* Dot grid */
.auth-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

/* Decorative circles */
.auth-panel::after {
    content: '';
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.06);
    bottom: -100px;
    right: -100px;
    pointer-events: none;
}

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

.auth-panel-logo {
    width: 140px;
    margin-bottom: 40px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.auth-panel-logo-text {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 40px;
    display: block;
    letter-spacing: -0.5px;
}

.auth-panel-heading {
    font-size: 38px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.auth-panel-sub {
    font-size: 16px;
    color: rgba(255,255,255,.6);
    line-height: 1.75;
    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: 14px;
    color: rgba(255,255,255,.8);
    font-size: 14px;
    font-weight: 500;
}

.auth-panel-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.12);
    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: 52px 44px;
    overflow-y: auto;
}

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

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

.auth-form-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

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

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

.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: 17px;
    color: var(--text-secondary);
    pointer-events: none;
    transition: color 0.2s;
}

.auth-input-wrap:focus-within .auth-input-icon {
    color: var(--primary-color);
}

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

.form-control:focus {
    border-color: var(--primary-color);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(255, 132, 50, 0.12);
}

.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: 17px;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.auth-pw-toggle:hover { color: var(--primary-color); }

/* Two-col grid */
.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: 4px;
    font-size: 15px;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: ui-monospace, 'Courier New', monospace;
}

.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: 17px;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: border-color .2s, color .2s, transform .2s;
}

.captcha-refresh:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: rotate(90deg);
}

/* Terms */
.auth-terms {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.65;
}

.auth-terms a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.auth-terms a:hover { text-decoration: underline; }

/* Submit button */
.auth-btn {
    width: 100%;
    height: 52px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .2s ease;
    box-shadow: 0 4px 16px rgba(255, 132, 50, 0.38);
    letter-spacing: 0.2px;
}

.auth-btn:hover {
    opacity: .93;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(255, 132, 50, 0.45);
}

/* 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:700; }
.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: 36px 24px; min-height:100vh; }
    .auth-form-wrap { max-width: 480px; }
}

@media (max-width: 480px) {
    .auth-form-panel { padding: 28px 20px; }
    .auth-grid { grid-template-columns: 1fr; }
}
