    :root { --primary: #4285F4; --bg: #f4f7f6; }
        body { 
            font-family: 'Poppins', sans-serif; 
            background: var(--bg); 
            display: flex; 
            align-items: center; 
            justify-content: center; 
            height: 100vh; 
            margin: 0; 
            overflow: hidden;
        }
        .login-card { 
            background: white; 
            padding: 40px 30px; 
            border-radius: 40px; 
            box-shadow: 0 20px 50px rgba(0,0,0,0.1); 
            text-align: center; 
            width: 85%; 
            max-width: 380px;
            border: 1px solid rgba(255,255,255,0.3);
            backdrop-filter: blur(10px);
        }
        .logo-box {
            width: 90px; height: 90px;
            margin: 0 auto 20px;
            border-radius: 50%;
            padding: 5px;
            background: white;
            box-shadow: 0 10px 20px rgba(66, 133, 244, 0.2);
            border: 2px solid var(--primary);
        }
        .logo-box img { 
            width: 100%; height: 100%; 
            object-fit: cover; 
            border-radius: 50%; 
        }
        h2 { margin: 0; font-weight: 800; color: #333; letter-spacing: -0.5px; font-size: 22px; }
        p { color: #999; font-size: 13px; margin-top: 5px; margin-bottom: 25px; }
        
        .input-group { position: relative; margin-bottom: 20px; }
        input[type="password"] { 
            width: 100%; 
            padding: 16px; 
            border: 2px solid #f0f0f0; 
            border-radius: 20px; 
            box-sizing: border-box; 
            font-size: 18px; 
            text-align: center; 
            outline: none; 
            transition: 0.3s;
            background: #fafafa;
            font-family: inherit;
        }
        input:focus { border-color: var(--primary); background: white; box-shadow: 0 0 15px rgba(66, 133, 244, 0.1); }
        
        button { 
            width: 100%; 
            padding: 16px; 
            background: var(--primary); 
            color: white; 
            border: none; 
            border-radius: 20px; 
            font-weight: 700; 
            cursor: pointer; 
            font-size: 16px; 
            box-shadow: 0 10px 20px rgba(66, 133, 244, 0.3);
            transition: 0.3s;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        button:active { transform: scale(0.98); box-shadow: 0 5px 10px rgba(66, 133, 244, 0.2); }
        
        .error-msg { 
            background: #fff5f5; color: #ff4d4d; 
            padding: 10px; border-radius: 12px; 
            font-size: 12px; margin-top: 15px; 
            border: 1px solid #ffebeb;
        }
        /* صندوق التعليمات العلوي */
.instruction-box {
    position: absolute;
    top: 20px; /* سيعلو فوق الهيدر المخفي */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    z-index: 10005; /* تأكد أنه فوق كل شيء */
    background: var(--primary);
    border-radius: 20px;
    padding: 15px;
    display: none; /* يظهر فقط عند البدء */
    color: white;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.inst-icon {
    font-size: 24px;
    background: rgba(255,255,255,0.2);
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inst-content { flex: 1; }
#next-step { font-weight: 600; font-size: 14px; display: block; margin-bottom: 2px; }
.inst-details { font-size: 11px; opacity: 0.9; display: flex; gap: 8px; }

/* الأزرار الجانبية */
.side-navigation-controls {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1001;
}

.side-nav-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: var(--shadow);
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: 0.3s;
}

.recalc-btn { color: var(--primary); }
.google-btn { color: #EA4335; }
.side-nav-btn:active { transform: scale(0.9); }
/* تأكد أن صندوق الملاحة لا يغطي الأزرار الجانبية */
#instruction-card {
    display: none; /* مخفي في البداية */
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;

.side-navigation-controls {
    z-index: 1005;
    display: none; /* مخفي في البداية ويظهر عند بدء الملاحة */
}

/* زر العودة للملخص (اختياري) */
.exit-nav-btn {
    position: absolute;
    bottom: 100px;
    left: 20px;
    z-index: 1005;
    background: #ff4d4d;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 10px;
}
#ui-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0; /* حواف دائرية من فوق فقط */
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    transition: transform 0.4s ease-out; /* حركة ناعمة */
    z-index: 1000;
    max-height: 80vh; /* أقصى ارتفاع 80% من الشاشة */
    overflow-y: auto; /* السماح بالتمرير داخلها */
    padding-top: 10px;
}

/* مقبض السحب (الخط اللي فوق) */
#ui-container::before {
    content: "";
    display: block;
    width: 40px;
    height: 5px;
    background: #ccc;
    margin: 5px auto 15px;
    border-radius: 10px;
}

/* حالة الإغلاق (تنزيلها لتحت) */
.pos-bottom {
    transform: translateY(calc(100% - 60px)); /* يظهر منها فقط 60 بكسل */
}

/* حالة الفتح (رفعها لفوق) */
.pos-top {
    transform: translateY(0);
}