/* ============================================================
   assets/css/style.css
   جامعة المنصورة الجديدة - كلية التمريض (نظام المخازن والعهدة)
   الهوية البصرية: أحمر عنابي فاخر (#800020) + كحلي راقي (#1B2A4A) + ذهبي
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

:root {
    --primary-color: #800020;        /* أحمر عنابي الكلية الملكي */
    --primary-dark: #5c0017;
    --primary-light: #9c1533;
    --secondary-color: #1B2A4A;      /* كحلي الكلية الفاخر */
    --secondary-dark: #0f192d;
    --accent-gold: #D4AF37;          /* لمسة ذهبية ملفتة */
    --accent-gold-hover: #b89628;
    --bg-light: #F0F3F8;
    --card-bg: #FFFFFF;
    --text-main: #2D3748;
    --text-muted: #718096;
    --border-color: #E2E8F0;
    --sidebar-width: 270px;
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 6px 18px rgba(128, 0, 32, 0.07);
    --shadow-lg: 0 12px 30px rgba(27, 42, 74, 0.12);
}

body {
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    direction: rtl;
    text-align: right;
    min-height: 100vh;
}

/* Glassmorphism Cards & Premium Shadows */
.nmu-card {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.nmu-card:hover {
    box-shadow: var(--shadow-lg);
}

.nmu-card-header {
    background: #ffffff;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* Base Components & Buttons */
.btn-primary-nmu {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    padding: 10px 22px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(128, 0, 32, 0.25);
}

.btn-primary-nmu:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(128, 0, 32, 0.35);
}

.btn-gold {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-hover));
    color: #1B2A4A;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.btn-gold:hover {
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

/* Sidebar Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--secondary-color) 0%, #0d1627 100%);
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 4px 0 15px rgba(0,0,0,0.1);
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 24px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(128, 0, 32, 0.2);
}

.sidebar-header img {
    height: 65px;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.sidebar-header h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.sidebar-header small {
    color: var(--accent-gold);
    font-weight: 600;
    display: block;
    margin-top: 4px;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 12px;
    margin: 0;
    flex-grow: 1;
}

.sidebar-menu li {
    margin-bottom: 6px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.sidebar-menu a i {
    font-size: 1.25rem;
    margin-left: 12px;
    width: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.25s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(128, 0, 32, 0.3);
}

.sidebar-menu a:hover i,
.sidebar-menu a.active i {
    color: var(--accent-gold);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.top-navbar {
    background-color: #ffffff;
    height: 70px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
}

.top-navbar .user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-badge {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-gold));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.content-body {
    padding: 30px;
}

/* Cards & Widgets */
.nmu-card {
    background: var(--card-bg);
    border-radius: 14px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    overflow: hidden;
}

.nmu-card-header {
    background: #ffffff;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nmu-card-header h5 {
    margin: 0;
    font-weight: 700;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nmu-card-header h5 i {
    color: var(--primary-color);
}

.nmu-card-body {
    padding: 24px;
}

/* Dynamic Stats Card */
.stat-card {
    border-radius: 14px;
    padding: 24px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-card.bg-nmu-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.stat-card.bg-nmu-secondary {
    background: linear-gradient(135deg, var(--secondary-color), #101c33);
}

.stat-card.bg-nmu-gold {
    background: linear-gradient(135deg, #c59b27, #8e6d12);
}

.stat-card.bg-nmu-danger {
    background: linear-gradient(135deg, #dc3545, #921c27);
}

.stat-card .stat-icon {
    position: absolute;
    left: 20px;
    bottom: 15px;
    font-size: 3.5rem;
    opacity: 0.2;
}

/* Table Styling */
.table-nmu {
    margin: 0;
    width: 100%;
}

.table-nmu th {
    background-color: var(--secondary-color);
    color: #ffffff;
    font-weight: 700;
    padding: 14px 16px;
    border: none;
}

.table-nmu td {
    padding: 14px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
}

.table-nmu tbody tr:hover {
    background-color: rgba(128, 0, 32, 0.03);
}

/* Badges */
.badge-status {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-pending {
    background-color: #FFF3CD;
    color: #856404;
    border: 1px solid #FFEEBA;
}

.badge-completed {
    background-color: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
}

.badge-consumable {
    background-color: #E2E3E5;
    color: #383D41;
}

.badge-permanent {
    background-color: #CCE5FF;
    color: #004085;
}

/* Barcode Scanner Focus Area */
.barcode-input-container {
    background: linear-gradient(135deg, rgba(128, 0, 32, 0.05), rgba(212, 175, 55, 0.05));
    border: 2px dashed var(--primary-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.barcode-input-container input {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
    border: 2px solid var(--primary-color);
}

/* ============================================================
   Mobile & Responsive Adjustments (تنسيقات الهواتف والشاشات الصغيرة)
   ============================================================ */
@media (max-width: 991.98px) {
    .app-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        min-height: auto;
        position: relative;
    }

    .sidebar-header {
        padding: 15px;
    }

    .sidebar-header img {
        height: 50px;
    }

    .sidebar-menu {
        display: flex;
        overflow-x: auto;
        padding: 10px;
        white-space: nowrap;
        gap: 6px;
        background: rgba(0,0,0,0.2);
    }

    .sidebar-menu li {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .sidebar-menu a {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .top-navbar {
        padding: 0 15px;
        height: 60px;
    }

    .top-navbar h5 {
        font-size: 1rem;
    }

    .content-body {
        padding: 15px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card h2 {
        font-size: 1.75rem;
    }

    .btn-primary-nmu, .btn-gold {
        width: 100%;
        margin-bottom: 8px;
    }

    .table-responsive {
        font-size: 0.88rem;
    }
}

