/* ===========================================================
   ZOOM VPRICE – THEME.CSS
   Premium Automotive UI (Mercedes / BMW Style)
   Supports: Dark + Light modes
=========================================================== */

/* ===========================================================
   ROOT VARIABLES
=========================================================== */

:root {
    /* DARK MODE COLORS */
    --bg-main: #05070a;
    --bg-panel: rgba(15, 18, 24, 0.96);
    --bg-card: #141821;
    --bg-input: #0f131a;

    --text-main: #f5f7fa;
    --text-muted: #a8b0bd;

    --accent: #3ea6ff;
    --accent-soft: rgba(62, 166, 255, 0.25);

    --border-subtle: #262b35;

    --error: #ff4d4d;
    --success: #4dff88;

    /* Radius */
    --radius-lg: 18px;
    --radius-md: 12px;

    /* Shadows */
    --shadow-soft: 0 0 35px rgba(0, 0, 0, 0.5);
    --shadow-accent: 0 0 22px rgba(62, 166, 255, 0.35);

    /* Transitions */
    --transition-fast: 0.2s ease-out;
    --transition-med: 0.3s ease-out;

    /* Font */
    --font-main: 'Cairo', 'Tajawal', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===========================================================
   LIGHT MODE OVERRIDE
=========================================================== */

body.light-mode {
    --bg-main: #f4f6fa;
    --bg-panel: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #eef1f7;

    --text-main: #111319;
    --text-muted: #6b7280;

    --accent: #006bd8;
    --accent-soft: rgba(0, 107, 216, 0.18);

    --border-subtle: #dde1ea;

    --shadow-soft: 0 0 24px rgba(0, 0, 0, 0.07);
    --shadow-accent: 0 0 18px rgba(0, 107, 216, 0.3);
}

/* ===========================================================
   GLOBAL STYLES
=========================================================== */

body {
    margin: 0;
    padding: 0;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-main);
    direction: rtl;
    text-align: right;
    min-height: 100vh;
}

::selection {
    background: var(--accent);
    color: white;
}

/* Remove selection blue outline */
*:focus {
    outline: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 9px;
}
::-webkit-scrollbar-track {
    background: var(--bg-input);
}
::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 8px;
}

/* ===========================================================
   LOGIN WRAPPER STRUCTURE
=========================================================== */

.login-wrapper {
    display: grid;
    grid-template-columns: 450px 1fr;
    min-height: 100vh;
    background: var(--bg-main);
}

/* ===========================================================
   LEFT PANEL (FORM AREA)
=========================================================== */

.login-panel {
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* HEADER */
.login-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-box {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    padding: 7px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    object-fit: contain;
}

.brand-text h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.brand-text span {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* THEME BUTTON */
.theme-toggle-btn {
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 18px;
}

.theme-toggle-btn:hover {
    background: var(--bg-input);
    box-shadow: var(--shadow-accent);
    transform: translateY(-2px);
}

/* ===========================================================
   FORM PANEL - GLASS EFFECT
=========================================================== */

.glass-box {
    margin-top: 28px;
    padding: 32px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: var(--shadow-soft);
}

/* Titles */
.login-title {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    text-align: right;
}

.login-subtitle {
    margin-top: 6px;
    margin-bottom: 22px;
    color: var(--text-muted);
    font-size: 14px;
    text-align: right;
}

/* Form */
.form-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group label {
    font-size: 14px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 13px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-input);
    color: var(--text-main);
    transition: var(--transition-fast);
    box-sizing: border-box;
    font-family: inherit;
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: var(--shadow-accent);
}

.form-group input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* LOGIN BUTTON */
.btn-primary {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 17px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--accent), #0e8cf5);
    color: white;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: inherit;
}

.btn-primary:hover:not(:disabled) {
    box-shadow: var(--shadow-accent);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Messages */
.error-msg {
    font-size: 13px;
    color: var(--error);
    min-height: 16px;
    text-align: center;
    padding: 8px 12px;
    background: rgba(255, 77, 77, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 77, 77, 0.2);
}

.success-msg {
    font-size: 13px;
    color: var(--success);
    min-height: 16px;
    text-align: center;
    padding: 8px 12px;
    background: rgba(77, 255, 136, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid rgba(77, 255, 136, 0.2);
}

.attempts-warning {
    font-size: 13px;
    color: #ffa500;
    text-align: center;
    padding: 8px 12px;
    background: rgba(255, 165, 0, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 165, 0, 0.2);
    margin-bottom: 15px;
}

/* Footer */
.login-footer {
    margin-top: 20px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* ===========================================================
   RIGHT PANEL (HERO IMAGE)
=========================================================== */

.login-hero {
    position: relative;
    background-image: url("/ui/assets/Images/2.webp");
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.75), rgba(0,0,0,0.25));
}

.hero-content {
    position: absolute;
    bottom: 40px;
    right: 40px;
    max-width: 42%;
    color: white;
}

.hero-content h2 {
    font-size: 34px;
    margin-bottom: 12px;
    font-weight: 800;
}

.hero-content p {
    font-size: 15px;
    opacity: 0.92;
    line-height: 1.7;
}

/* ===========================================================
   RESPONSIVE DESIGN
=========================================================== */

@media (max-width: 1020px) {
    .login-wrapper {
        grid-template-columns: 1fr;
    }
    
    .login-hero {
        display: none;
    }
    
    .login-panel {
        padding: 30px 25px;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .login-panel {
        padding: 20px;
    }
    
    .glass-box {
        padding: 25px 20px;
        margin-top: 20px;
    }
    
    .login-title {
        font-size: 22px;
    }
    
    .brand-text h1 {
        font-size: 20px;
    }
    
    .hero-content {
        bottom: 20px;
        right: 20px;
        max-width: 80%;
    }
    
    .hero-content h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .login-panel {
        padding: 15px;
    }
    
    .glass-box {
        padding: 20px 15px;
    }
    
    .brand-box {
        gap: 10px;
    }
    
    .brand-logo {
        width: 50px;
        height: 50px;
    }
}

/* Fade + Slide Animation */
.page-fade-in {
    animation: fadeInSoft 0.6s ease forwards;
    opacity: 0;
}

@keyframes fadeInSoft {
    0% {
        opacity: 0;
        transform: translateY(18px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}