:root {
    --bg-main: #0b0f17;
    --card-bg: rgba(23, 32, 48, 0.85);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #6366f1;
    --input-bg: #0f172a;
    --input-border: #334155;
    --input-focus: #3b82f6;
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.12);
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(99, 102, 241, 0.12) 0%, transparent 40%);
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    border-radius: var(--radius);
    width: 100%;
    max-width: 440px;
    padding: 2.25rem 2rem;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
}

.brand-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.brand-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Tabs */
.auth-tabs {
    display: flex;
    background: var(--input-bg);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--input-border);
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

/* Social Buttons */
.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-social:hover {
    background: #1e293b;
    border-color: #475569;
    transform: translateY(-1px);
}

.btn-google svg, .btn-facebook svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    color: var(--text-subtle);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.divider::before, .divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--input-border);
}

.divider span {
    padding: 0 0.75rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.15rem;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

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

.input-wrapper input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    padding: 0.7rem 0.9rem;
    color: var(--text-main);
    font-size: 0.9375rem;
    outline: none;
    transition: border-color 0.2s;
}

.input-wrapper input:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.toggle-pwd {
    position: absolute;
    right: 0.85rem;
    background: none;
    border: none;
    color: var(--text-subtle);
    cursor: pointer;
    display: flex;
    align-items: center;
}

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

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    margin-bottom: 1.25rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    cursor: pointer;
}

.remember-me input {
    accent-color: var(--primary);
    cursor: pointer;
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.btn-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* Alerts & Status */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    margin-bottom: 1.25rem;
    display: none;
}

.alert-error {
    background: var(--error-bg);
    border: 1px solid var(--error);
    color: #fca5a5;
}

.alert-success {
    background: var(--success-bg);
    border: 1px solid var(--success);
    color: #86efac;
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dashboard UI */
.dashboard-container {
    max-width: 600px;
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--card-border);
}

.user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    object-fit: cover;
}

.badge-provider {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    margin-top: 0.35rem;
}
