/* QPro - Auth Pages CSS */
/* Light/Dark Theme - Modern Design */

:root {
    --bg:          #f8fafc;
    --bg-card:     #ffffff;
    --bg-input:    #f1f5f9;
    --text:        #0f172a;
    --text-muted:  #64748b;
    --text-light:  #94a3b8;
    --border:      #e2e8f0;
    --border-focus:#2563eb;
    --primary:     #2563eb;
    --primary-h:   #1d4ed8;
    --primary-t:   #eff6ff;
    --success:     #059669;
    --success-bg:  #ecfdf5;
    --danger:      #dc2626;
    --danger-bg:   #fef2f2;
    --brand-bg:    #0f172a;
    --brand-text:  #f8fafc;
    --brand-muted: #94a3b8;
    --font:        'Plus Jakarta Sans', system-ui, sans-serif;
    --radius:      12px;
    --radius-sm:   8px;
    --shadow:      0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg:   0 10px 25px rgba(0,0,0,0.1);
}

[data-theme="dark"] {
    --bg:          #0f172a;
    --bg-card:     #1e293b;
    --bg-input:    #0f172a;
    --text:        #f1f5f9;
    --text-muted:  #94a3b8;
    --text-light:  #64748b;
    --border:      #334155;
    --border-focus:#3b82f6;
    --primary:     #3b82f6;
    --primary-h:   #2563eb;
    --primary-t:   #1e3a5f;
    --success:     #10b981;
    --success-bg:  #064e3b;
    --danger:      #f87171;
    --danger-bg:   #450a0a;
    --brand-bg:    #020617;
    --brand-text:  #f8fafc;
    --brand-muted: #64748b;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   AUTH PAGE LAYOUT
   ============================================================ */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 900px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
}

/* ============================================================
   LEFT BRAND PANEL
   ============================================================ */
.auth-brand {
    background: var(--brand-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 40%, rgba(37,99,235,0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 70%, rgba(16,185,129,0.1) 0%, transparent 60%);
    pointer-events: none;
}

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

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2.5rem;
}

.brand-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--brand-text);
    letter-spacing: -0.5px;
}

.brand-headline {
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand-text);
    line-height: 1.25;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.brand-sub {
    font-size: 1rem;
    color: var(--brand-muted);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bf-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--brand-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.bf-icon {
    width: 20px;
    height: 20px;
    background: rgba(37,99,235,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #60a5fa;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ============================================================
   RIGHT FORM PANEL
   ============================================================ */
.auth-form-panel {
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.theme-toggle-wrap {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.theme-toggle:hover { background: var(--border); color: var(--text); }

[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"]  .icon-sun  { display: none; }

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

.form-header {
    margin-bottom: 2rem;
}

.form-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
    margin-bottom: 0.35rem;
}

.form-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.alert svg { flex-shrink: 0; margin-top: 1px; }

.alert-danger  { background: var(--danger-bg);  color: var(--danger);  }
.alert-success { background: var(--success-bg); color: var(--success); }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.auth-form { display: flex; flex-direction: column; gap: 1.25rem; }

.form-group { display: flex; flex-direction: column; gap: 0.45rem; }

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.label-link {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 400;
}
.label-link:hover { text-decoration: underline; }

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-light);
    pointer-events: none;
    flex-shrink: 0;
}

.input-wrap input {
    width: 100%;
    height: 46px;
    padding: 0 44px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font);
    color: var(--text);
    transition: all 0.2s;
    outline: none;
}

.input-wrap input:focus {
    border-color: var(--border-focus);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.input-wrap input::placeholder { color: var(--text-light); }

.input-eye {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    border-radius: 4px;
    transition: color 0.2s;
}
.input-eye:hover { color: var(--text); }

/* Checkbox */
.form-check-row { flex-direction: row; align-items: center; }

.check-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 400;
    user-select: none;
}

.check-label input[type="checkbox"] { display: none; }

.checkmark {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.check-label input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.check-label input:checked + .checkmark::after {
    content: '';
    width: 10px;
    height: 6px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg) translateY(-1px);
    display: block;
}

/* Submit Button */
.btn-primary {
    width: 100%;
    height: 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 0.25rem;
}

.btn-primary:hover:not(:disabled) { background: var(--primary-h); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.spin { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Footer */
.auth-footer-text {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.auth-footer-text a { color: var(--primary); text-decoration: none; font-weight: 500; }
.auth-footer-text a:hover { text-decoration: underline; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0 1rem;
}

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

.auth-divider span {
    font-size: 0.75rem;
    color: var(--text-light);
    white-space: nowrap;
}

.auth-security-note {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Select */
select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font);
    color: var(--text);
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
