/* ====== الخط العام ====== */
body {
    font-family: 'Tajawal', system-ui, -apple-system, sans-serif;
    background-color: #f4f6f9;
    font-size: 15px;
    min-height: 100vh;
}

/* ====== الأزرار ====== */
.btn {
    border-radius: 10px;
    font-weight: 500;
}
.btn-lg { padding: .75rem 1.25rem; }

/* ====== الكروت ====== */
.card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.card-header {
    background: #fff;
    border-bottom: 1px solid #eef0f3;
    font-weight: 600;
    border-radius: 14px 14px 0 0 !important;
}

/* ====== الحقول ====== */
.form-control, .form-select {
    border-radius: 10px;
    padding: .65rem .9rem;
    border: 1px solid #dee2e6;
}
.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 .15rem rgba(13,110,253,.15);
}
.form-label {
    font-weight: 500;
    margin-bottom: .35rem;
}

/* ====== الجداول على الجوال ====== */
.table-responsive { border-radius: 10px; }
.table th { font-weight: 600; white-space: nowrap; }

/* ====== البطاقات الإحصائية ====== */
.stat-card {
    border-radius: 14px;
    color: #fff;
    padding: 1rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.stat-card .icon {
    font-size: 2rem;
    opacity: .35;
}
.stat-card h5 {
    font-size: .9rem;
    margin: 0 0 .25rem;
    opacity: .9;
}
.stat-card .value {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.bg-grad-blue    { background: linear-gradient(135deg,#0d6efd,#3b82f6); }
.bg-grad-green   { background: linear-gradient(135deg,#198754,#22c55e); }
.bg-grad-red     { background: linear-gradient(135deg,#dc3545,#ef4444); }
.bg-grad-orange  { background: linear-gradient(135deg,#fd7e14,#f59e0b); }
.bg-grad-purple  { background: linear-gradient(135deg,#6f42c1,#8b5cf6); }

/* ====== الصفحات الفرعية على الجوال ====== */
@media (max-width: 576px) {
    .container-fluid { padding-left: .75rem; padding-right: .75rem; }
    .btn-lg { font-size: 1rem; }
    h4, .h4 { font-size: 1.15rem; }
}

/* ====== صفحة الدخول ====== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
}
.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 18px;
    padding: 2rem 1.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,.2);
}
.login-card .logo {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg,#0d6efd,#6610f2);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
}

/* ====== شريط التنقل في الجوال ====== */
.navbar .offcanvas-body .nav-link {
    padding: .75rem .5rem;
    border-radius: 8px;
    color: rgba(255,255,255,.9);
}
.navbar .offcanvas-body .nav-link:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
}

/* ====== تنبيهات ====== */
.alert {
    border-radius: 10px;
    border: none;
}


/* ============ شريط سفلي للجوال ============ */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #eef0f3;
    display: flex;
    justify-content: space-around;
    padding: 6px 0 max(6px, env(safe-area-inset-bottom));
    box-shadow: 0 -2px 12px rgba(0,0,0,.06);
    z-index: 1030;
}
.mobile-bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 2px;
    text-decoration: none;
    color: #6c757d;
    font-size: 10px;
    font-weight: 500;
    transition: color .2s;
    min-width: 0;
}
.mobile-bottom-nav a i {
    font-size: 1.25rem;
}
.mobile-bottom-nav a.active {
    color: #0d6efd;
}
.mobile-bottom-nav a.active i {
    transform: scale(1.1);
}

/* مساحة أسفل الصفحة لتفادي التغطية */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 70px;
    }
    footer.text-center {
        padding-bottom: 60px !important;
    }
}
/* ============ لمسات الجوال ============ */
@media (max-width: 576px) {
    .stat-card {
        padding: .75rem .85rem;
    }
    .stat-card .value {
        font-size: 1.05rem;
    }
    .stat-card h5 {
        font-size: .75rem;
    }
    .stat-card .icon {
        font-size: 1.6rem;
    }
    .btn-group .btn {
        padding: .5rem .25rem;
        font-size: .85rem;
    }
    .card-header {
        padding: .65rem .85rem;
        font-size: .95rem;
    }
    h4, .h4 { font-size: 1.1rem; }
    .table th, .table td {
        padding: .5rem .4rem;
        font-size: .82rem;
    }
}

/* منع التمرير الجانبي */
body, html {
    overflow-x: hidden;
}

/* حقول الإدخال على iOS (منع التكبير التلقائي) */
@media (max-width: 767.98px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* شريط تنقل نشط للجوال */
.navbar .offcanvas-body .nav-link.active {
    background: rgba(255,255,255,.2);
}