:root {
    --bg-auth: #0b0f17;
    --card-bg: #111827;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --border-color: #1f2937;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

[dir="rtl"] {
    --font-family: "Noto Sans Arabic", "Tajawal", "Segoe UI", Tahoma, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-auth);
    color: var(--text-main);
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.auth-wrapper {
    width: 100%;
    max-width: 960px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.auth-hero {
    padding: 48px;
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
    border-inline-end: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-brand-badge {
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    font-size: 1.25rem;
    display: grid;
    place-items: center;
    border-radius: 12px;
}

.auth-brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.auth-hero-content h1 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
}

.auth-hero-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: #cbd5e1;
}

.auth-feature-icon {
    color: #818cf8;
}

.auth-form-container {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 4px;
}

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

.auth-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.auth-input {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 10px;
    padding: 12px 14px;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25);
}

.auth-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    width: 100%;
    margin-top: 8px;
}

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

.auth-alert {
    padding: 12px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.auth-lang-switch {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 24px;
}

.auth-lang-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
}

.auth-lang-link:hover, .auth-lang-link.active {
    color: #fff;
    background: #1f2937;
}

@media (max-width: 768px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
    }
    .auth-hero {
        display: none;
    }
    .auth-form-container {
        padding: 32px 24px;
    }
}
