/* --- משתני יסוד --- */
:root {
    --primary: #003366;
    --bg-light: #ffffff;
    --white: #ffffff;
    --border: #dddddd;
}

/* --- איפוס --- */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Heebo', sans-serif; }

/* --- מסך כניסה (Login) --- */
body:not(.dashboard-body) {
    background-color: var(--bg-light);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
    direction: rtl;
}

.login-box {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

/* --- מבנה דאשבורד (Dashboard) --- */
body.dashboard-body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    direction: rtl;
}

.top-nav {
    background: var(--primary);
    color: white;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: relative;
    flex-shrink: 0;
}

/* מירכוז ברכה ושעון - מחשב */
.header-info {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
    white-space: nowrap;
}

#systemClock {
    padding-right: 15px;
    border-right: 1px solid rgba(255,255,255,0.3);
    font-family: monospace;
}

.dashboard-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 250px;
    background: var(--white);
    border-left: 1px solid var(--border);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.sidebar-menu { display: flex; flex-direction: column; padding-top: 10px; }
.menu-item {
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    border-right: 4px solid transparent;
}
.menu-item:hover { background: #f0f4f8; }
.menu-item.active {
    background: #eef2f7;
    color: var(--primary);
    border-right-color: var(--primary);
    font-weight: bold;
}

.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--bg-light);
}

.btn-logout {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid white;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
}

/* --- התאמות מובייל --- */
@media (max-width: 768px) {
    .menu-btn { display: block; background: none; border: none; color: white; font-size: 24px; cursor: pointer; }
    .hide-on-mobile { display: none !important; }

    .header-info {
        position: static;
        transform: none;
        flex: 1;
        justify-content: center;
    }

    .sidebar {
        position: fixed;
        right: 0;
        top: 60px;
        height: 100%;
        transform: translateX(100%);
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }
    .sidebar.open { transform: translateX(0); }
}

.main-footer {
    background: var(--white);
    padding: 10px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}