:root {
    --bg-body: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.96);
    --border-light: rgba(18, 140, 126, 0.2);
    --accent-purple: #128c7e;
    --accent-purple-dim: rgba(18, 140, 126, 0.08);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --grad-purple: linear-gradient(135deg, #128c7e 0%, #075e54 100%);
    --shadow-soft: 0 20px 40px rgba(0,0,0,0.2);
    --shadow-purple: 0 12px 24px rgba(18, 140, 126, 0.3);
}

* { box-sizing: border-box; font-family: 'Tajawal', sans-serif; margin: 0; padding: 0; }

body { 
    background: var(--bg-body); 
    color: var(--text-main); 
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background-color: var(--bg-body);
    background-image: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.85)), url('../images/login-bg.jpg');
    overflow-x: hidden;
    padding: 20px;
}

.auth-container { width: 100%; max-width: 420px; position: relative; z-index: 10; }

.auth-card { 
    background: var(--card-bg); 
    border: 1px solid rgba(255,255,255,0.3); 
    border-radius: 35px; 
    padding: 40px 30px;
    box-shadow: var(--shadow-soft);
    text-align: center;
    display: none;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.auth-card.active { display: block; }

@keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }

.logo-box { margin-bottom: 30px; }
.logo-title { font-size: 32px; margin: 0; color: var(--accent-purple); font-weight: 900; letter-spacing: -1px; }

.form-group { margin-bottom: 20px; text-align: right; }
label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 800; color: var(--text-muted); }

input, select { 
    width: 100%; background: #ffffff; border: 1px solid var(--border-light); color: var(--text-main);
    padding: 18px 25px; border-radius: 18px; font-size: 16px; outline: none; transition: 0.3s;
    text-align: center;
}
input:focus { border-color: var(--accent-purple); box-shadow: 0 0 0 4px var(--accent-purple-dim); }

.main-btn { 
    background: var(--grad-purple); color: #fff; border: none; padding: 18px; border-radius: 20px;
    width: 100%; font-weight: 900; font-size: 17px; cursor: pointer; transition: 0.3s;
    box-shadow: var(--shadow-purple);
    margin-top: 10px;
}
.main-btn:active { transform: scale(0.96); }

.role-selector { display: flex; gap: 10px; margin-bottom: 30px; }
.role-option { flex: 1; position: relative; }
.role-option input { display: none; }
.role-label { display: block; text-align: center; padding: 12px; border: 1px solid var(--border-light); border-radius: 18px; cursor: pointer; font-weight: 700; color: var(--text-muted); background: #ffffff; transition: 0.3s; }
.role-option input:checked + .role-label { border-color: var(--accent-purple); background: var(--accent-purple-dim); color: var(--accent-purple); }

.switch-text { margin-top: 25px; font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.switch-text span { color: var(--accent-purple); cursor: pointer; font-weight: 800; text-decoration: underline; }

.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: #1f2937; color: #fff; padding: 12px 24px; border-radius: 12px; font-weight: 700; font-size: 14px; display: none; z-index: 100; border: 1px solid var(--border-light); }
.toast.show { display: block; }

.lang-switcher { display: flex; justify-content: center; margin-bottom: 30px; gap: 15px; }
.lang-btn { 
    background: rgba(255, 255, 255, 0.1); 
    border: 1px solid rgba(255, 255, 255, 0.2); 
    padding: 10px 25px; 
    border-radius: 15px; 
    font-size: 14px; 
    font-weight: 800;
    color: #fff; 
    cursor: pointer; 
    transition: 0.3s;
    backdrop-filter: blur(5px);
    display: flex; align-items: center; gap: 8px;
}
.lang-btn.active { 
    background: var(--accent-purple); 
    border-color: var(--accent-purple); 
    color: #fff; 
    box-shadow: var(--shadow-purple);
}

.google-btn {
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    color: #555;
    padding: 15px;
    border-radius: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.google-btn:active { transform: scale(0.98); background: #f8f8f8; }

/* Animation for icons */
.logo-box img { animation: float 3s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Vehicle Selection Grid */
.v-selection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 5px;
}
.v-card-select {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 130px;
    overflow: hidden;
    position: relative;
}
.v-card-select:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}
.v-card-select.active {
    border: 3px solid var(--primary);
    box-shadow: 0 0 25px rgba(18, 140, 126, 0.3);
    transform: scale(1.02);
}
.v-card-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.v-card-icon img {
    width: 110%; 
    height: 110%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
    transition: 0.3s;
}
.v-card-select:hover img {
    transform: scale(1.1);
}
