:root {
    --sidebar-width: 250px;
    --bs-primary: #07A2A7;
    --bs-primary-rgb: 7, 162, 167;
    --bs-primary-bg-subtle: #e6f7f8;
    --bs-secondary: #053063;
    --bs-secondary-rgb: 5, 48, 99;
    --bs-secondary-bg-subtle: #e6ecf3;
    --bs-primary-text-emphasis: #035e61;
    --bs-secondary-text-emphasis: #02203e;
}

.btn-primary {
    --bs-btn-bg: #07A2A7;
    --bs-btn-border-color: #07A2A7;
    --bs-btn-hover-bg: #068a8e;
    --bs-btn-hover-border-color: #068a8e;
    --bs-btn-active-bg: #057377;
    --bs-btn-active-border-color: #057377;
}

.btn-outline-primary {
    --bs-btn-color: #07A2A7;
    --bs-btn-border-color: #07A2A7;
    --bs-btn-hover-bg: #07A2A7;
    --bs-btn-hover-border-color: #07A2A7;
    --bs-btn-active-bg: #068a8e;
    --bs-btn-active-border-color: #068a8e;
}

.btn-secondary {
    --bs-btn-bg: #053063;
    --bs-btn-border-color: #053063;
    --bs-btn-hover-bg: #042850;
    --bs-btn-hover-border-color: #042850;
    --bs-btn-active-bg: #03203e;
    --bs-btn-active-border-color: #03203e;
}

.btn-outline-secondary {
    --bs-btn-color: #053063;
    --bs-btn-border-color: #053063;
    --bs-btn-hover-bg: #053063;
    --bs-btn-hover-border-color: #053063;
    --bs-btn-active-bg: #042850;
    --bs-btn-active-border-color: #042850;
}

.text-primary {
    color: #07A2A7 !important;
}

.text-secondary {
    color: #053063 !important;
}

.bg-primary {
    background-color: #07A2A7 !important;
}

.bg-secondary {
    background-color: #053063 !important;
}

.border-primary {
    border-color: #07A2A7 !important;
}

.border-secondary {
    border-color: #053063 !important;
}

a {
    color: #07A2A7;
}

a:hover {
    color: #068a8e;
}

.page-link {
    color: #07A2A7;
}

.page-link:hover {
    color: #068a8e;
}

.page-item.active .page-link {
    background-color: #07A2A7;
    border-color: #07A2A7;
}

.badge.bg-primary,
.alert-primary {
    background-color: #07A2A7 !important;
}

.table thead th {
    background-color: #053063;
    color: #fff;
}

.nav-pills .nav-link.active {
    background-color: #07A2A7 !important;
}

#sidebarMenu {
    background-color: #053063 !important;
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1030;
    display: flex;
    flex-direction: column;
}

#sidebarMenu .sidebar-nav-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
}

#sidebarMenu .sidebar-nav-scroll::-webkit-scrollbar {
    width: 4px;
}

#sidebarMenu .sidebar-nav-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}

.main-content-wrapper {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
}

@media (max-width: 991.98px) {
    #sidebarMenu {
        display: none;
        position: fixed;
        z-index: 1050;
        left: 0;
        top: 0;
        height: 100vh;
    }
    #sidebarMenu.show {
        display: flex;
    }
    .main-content-wrapper {
        margin-left: 0;
        width: 100%;
    }
}

html[dir="rtl"] #sidebarMenu {
    left: auto;
    right: 0;
}

html[dir="rtl"] .main-content-wrapper {
    margin-left: 0;
    margin-right: var(--sidebar-width);
}

@media (max-width: 991.98px) {
    html[dir="rtl"] .main-content-wrapper {
        margin-right: 0;
    }
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.card {
    border-radius: 0.5rem;
}

.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.pagination {
    margin-bottom: 0;
}

/* ============================================
   Dashboard Styles
   ============================================ */

.dash-welcome {
    background: linear-gradient(135deg, #053063 0%, #042850 50%, #03203e 100%);
    border-radius: 1rem;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}
.dash-welcome::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(7, 162, 167, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}
.dash-welcome::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(7, 162, 167, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}
.dash-welcome * {
    position: relative;
    z-index: 1;
}
.dash-welcome h3 {
    color: #fff;
    font-weight: 700;
}
.dash-welcome p {
    color: rgba(255,255,255,0.75);
}
.dash-welcome .btn-primary {
    background-color: #07A2A7;
    border-color: #07A2A7;
}
.dash-welcome .btn-primary:hover {
    background-color: #068a8e;
    border-color: #068a8e;
}
.dash-welcome .btn-outline-light {
    border-color: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.9);
}
.dash-welcome .btn-outline-light:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}
.dash-welcome .stat-item {
    border-right: 1px solid rgba(255,255,255,0.15);
    padding: 0 1.5rem;
}
.dash-welcome .stat-item:last-child {
    border-right: none;
}
.dash-welcome .stat-value {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
}
.dash-welcome .stat-label {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dash-kpi-card {
    border: none;
    border-radius: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.dash-kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}
.dash-kpi-card .kpi-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}
.dash-kpi-card .kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}
.dash-kpi-card .kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
}
.dash-kpi-card .kpi-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}
.dash-kpi-card .kpi-trend {
    font-size: 0.75rem;
    font-weight: 600;
}
.dash-kpi-card .kpi-trend i {
    font-size: 0.65rem;
}

.dash-quick-action {
    border: none;
    border-radius: 1rem;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}
.dash-quick-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}
.dash-quick-action .action-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}
.dash-quick-action:hover .action-icon {
    transform: scale(1.1);
}

.dash-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.dash-section-header h5 {
    font-weight: 700;
    margin: 0;
    font-size: 1rem;
    color: #212529;
}
.dash-section-header .dash-section-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: #07A2A7;
    text-decoration: none;
}
.dash-section-header .dash-section-link:hover {
    color: #068a8e;
}

.dash-activity-timeline {
    position: relative;
    padding-left: 2rem;
}
.dash-activity-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}
.dash-activity-item {
    position: relative;
    margin-bottom: 1.25rem;
}
.dash-activity-item:last-child {
    margin-bottom: 0;
}
.dash-activity-item .timeline-dot {
    position: absolute;
    left: -2rem;
    top: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    color: #fff;
}
.dash-activity-item .activity-time {
    font-size: 0.7rem;
    color: #adb5bd;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.dash-activity-item .activity-text {
    font-size: 0.85rem;
    color: #495057;
}

.dash-low-stock-item {
    border: none;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}
.dash-low-stock-item:hover {
    background-color: #f8f9fa;
}
.dash-low-stock-item .stock-progress {
    height: 6px;
    border-radius: 3px;
}

.dash-summary-card {
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}
.dash-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

.dash-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}
.dash-status-indicator .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.dash-status-indicator .status-dot.online {
    background-color: #28a745;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.4);
}
.dash-status-indicator .status-dot.offline {
    background-color: #dc3545;
}
.dash-status-indicator .status-dot.warning {
    background-color: #ffc107;
}

.chart-container {
    position: relative;
    height: 250px;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #adb5bd;
}
.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}
.empty-state p {
    font-size: 0.85rem;
    margin: 0;
}

@media (max-width: 767.98px) {
    .dash-welcome {
        padding: 1.5rem;
    }
    .dash-welcome .stat-item {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        padding: 0.75rem 0;
    }
    .dash-welcome .stat-item:last-child {
        border-bottom: none;
    }
    .dash-kpi-card {
        margin-bottom: 0.75rem;
    }
    .dash-kpi-card .kpi-value {
        font-size: 1.4rem;
    }
    .chart-container {
        height: 200px;
    }
}
