/* =====================================================================
   layout.css
   التخطيط العام للصفحة: الشريط العلوي، الحاوية، الواجهات (views)،
   لوحة التحكم (sidebar + main-content)، شريط التنقل السفلي للموبايل،
   وصفحة تسجيل الدخول
   منصة زِمام الرقمية
   ===================================================================== */

/* ============ OFFLINE BANNER ============ */
.offline-banner {
            display: none;
            background: var(--warning-light);
            color: var(--warning);
            font-weight: 800;
            font-size: 0.78rem;
            text-align: center;
            padding: 9px 12px;
            border-bottom: 1px solid var(--border);
            position: sticky;
            top: 0;
            z-index: 99;
        }
.offline-banner.show { display: block; }
/* ============ NAVBAR ============ */
.navbar {
            background: rgba(255,255,255,0.92);
            backdrop-filter: blur(12px);
            padding: 10px 12px;
            box-shadow: 0 1px 0 rgba(0,0,0,0.03);
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            z-index: 100;
            border-bottom: 1px solid var(--border-light);
            gap: 8px;
            flex-wrap: nowrap;
        }
.brand {
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
            flex-shrink: 1;
        }
.brand-logo {
            width: 38px;
            height: 38px;
            border-radius: 10px;
            background: linear-gradient(135deg, var(--nile-dark), var(--nile-light));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            color: white;
            box-shadow: 0 4px 12px rgba(15,76,70,0.2);
            flex-shrink: 0;
            object-fit: cover;
        }
.brand-text h1 {
            font-size: 1rem;
            font-weight: 900;
            white-space: nowrap;
        }
.brand-text p {
            font-size: 0.65rem;
            color: var(--clay);
            font-weight: 700;
            white-space: nowrap;
            display: none;
        }
.nav-btn {
            background: var(--nile-dark);
            color: white;
            border: none;
            padding: 12px 18px;
            border-radius: 30px;
            font-weight: 700;
            cursor: pointer;
            font-size: 0.8rem;
            display: flex;
            align-items: center;
            gap: 6px;
            box-shadow: 0 2px 8px rgba(15,76,70,0.15);
            transition: var(--transition);
            white-space: nowrap;
            flex-shrink: 0;
            min-height: 44px;
        }
.nav-btn:hover { background: var(--nile-light); }
.nav-btn:active { transform: scale(0.96); }
.nav-btn.danger {
            background: #fff;
            color: var(--danger);
            border: 2px solid var(--danger);
            box-shadow: none;
        }
/* ============ CONTAINER ============ */
.container {
            max-width: 1400px;
            margin: 16px auto;
            padding: 0 10px;
        }
.view-section { display: none; animation: fadeIn 0.35s ease; }
.view-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
/* ============ HERO ============ */
.hero-banner {
            text-align: center;
            margin-bottom: 24px;
        }
.hero-banner h2 {
            font-size: 1.5rem;
            font-weight: 900;
            margin-bottom: 8px;
        }
.hero-banner p {
            color: var(--text-muted);
            font-size: 0.9rem;
            max-width: 700px;
            margin: 0 auto;
            padding: 0 8px;
        }
/* ============ DASHBOARD LAYOUT ============ */
.dashboard-layout {
            display: grid;
            grid-template-columns: 1fr;
            gap: 16px;
            align-items: start;
        }
/* Sidebar: desktop only — mobile uses the bottom nav instead, to reduce clutter */
.sidebar {
            display: none;
            background: var(--bg-card);
            border-radius: var(--radius-lg);
            padding: 14px;
            box-shadow: var(--shadow-card);
            border: 1px solid var(--border-light);
            gap: 4px;
            position: sticky;
            top: 90px;
            z-index: 50;
            max-height: calc(100vh - 110px);
            overflow-y: auto;
        }
.menu-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 12px 14px;
            border-radius: var(--radius-md);
            font-weight: 700;
            color: var(--text-muted);
            cursor: pointer;
            font-size: 0.85rem;
            transition: var(--transition);
            margin-bottom: 6px;
            border: none;
            background: transparent;
        }
.menu-item:hover { background: var(--nile-surface); }
.menu-item.active { background: var(--nile-dark); color: white; }
.main-content { min-width: 0; }
/* ============ MOBILE BOTTOM NAV ============ */
.mobile-bottom-nav {
            display: none;
            position: fixed;
            bottom: 0; left: 0; right: 0;
            background: rgba(255,255,255,0.97);
            backdrop-filter: blur(14px);
            border-top: 1px solid var(--border-light);
            box-shadow: 0 -6px 20px rgba(15,76,70,0.08);
            z-index: 200;
            padding-bottom: env(safe-area-inset-bottom);
        }
.mobile-bottom-nav.show { display: flex; }
.mnav-scroll {
            display: flex;
            width: 100%;
            overflow-x: auto;
            scrollbar-width: none;
            -webkit-overflow-scrolling: touch;
        }
.mnav-scroll::-webkit-scrollbar { display: none; }
.mnav-item {
            flex: 1 0 auto;
            min-width: 64px;
            background: none;
            border: none;
            cursor: pointer;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 3px;
            padding: 8px 4px 7px;
            color: var(--text-muted);
            font-weight: 700;
            min-height: var(--bottom-nav-h);
        }
.mnav-icon { font-size: 1.3rem; line-height: 1; transition: transform 0.2s ease; }
.mnav-label { font-size: 0.62rem; white-space: nowrap; }
.mnav-item.active { color: var(--nile-dark); }
.mnav-item.active .mnav-icon { transform: translateY(-2px) scale(1.08); }
.mnav-item:active { opacity: 0.6; }
/* ============ LOGIN ============ */
.login-wrapper {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 60vh;
            padding: 20px;
        }
.login-card {
            width: 100%;
            max-width: 420px;
            padding: 28px 20px;
            text-align: center;
        }
.login-card h2 { font-size: 1.3rem; margin-bottom: 6px; }
.login-card .login-sub { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 20px; }
