﻿:root {
    --primary-color: #b11915;
    --primary-dark: #8a130f;
    --primary-light: #f8d7d6;
    --secondary-color: #f5a623;
    --dark-color: #333;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --gray-light: #e9ecef;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: #f5f7fa;
    color: var(--dark-color);
    direction: rtl;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Layout */
.dashboard-container {
    display: flex;
    width: 100vw;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: #fff;
    box-shadow: var(--box-shadow);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    gap: 12px;
}

    .sidebar-header .logo {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background-color: var(--primary-color);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-weight: 700;
    }

    .sidebar-header h2 {
        font-size: 1.2rem;
        color: var(--primary-color);
    }

.sidebar-menu {
    padding: 1.5rem 0;
}

.menu-item {
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gray-color);
    transition: var(--transition);
    cursor: pointer;
    border-right: 3px solid transparent;
}

    .menu-item:hover {
        background-color: var(--primary-light);
        color: var(--primary-color);
    }

    .menu-item.active {
        background-color: var(--primary-light);
        color: var(--primary-color);
        border-right-color: var(--primary-color);
    }

    .menu-item i {
        width: 20px;
        text-align: center;
    }

    .menu-item span {
        font-weight: 500;
    }

.submenu {
    padding-right: 2.5rem;
    display: none;
}

    .submenu.active {
        display: block;
    }

.submenu-item {
    padding: 0.6rem 0;
    color: var(--gray-color);
    transition: var(--transition);
    cursor: pointer;
}

    .submenu-item:hover {
        color: var(--primary-color);
    }

    .submenu-item.active {
        color: var(--primary-color);
        font-weight: 600;
    }

/* Main Content */
.main-content {
    flex: 1;
    margin-right: 260px;
    transition: var(--transition);
}

/* Topbar */
.topbar {
    background-color: #fff;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 99;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--gray-color);
    cursor: pointer;
}

.page-title h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-box {
    position: relative;
}

    .search-box input {
        padding: 0.5rem 1rem;
        padding-right: 2.5rem;
        border: 1px solid var(--gray-light);
        border-radius: var(--border-radius);
        width: 200px;
        font-family: 'Cairo', sans-serif;
    }

    .search-box i {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--gray-color);
    }

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Content Area */
.content-area {
    padding: 2.0rem;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

    .stat-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    }

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.stat-info p {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.orders {
    background-color: #4caf50;
}

.revenue {
    background-color: #2196f3;
}

.products {
    background-color: #ff9800;
}

.customers {
    background-color: #9c27b0;
}

/* Tables */
.table-container {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
    overflow: hidden;
}

.table-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .table-header h2 {
        font-size: 1.3rem;
        font-weight: 700;
    }

    .table-header a {
        color: var(--primary-color);
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 5px;
    }

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: #f8f9fa;
}

th {
    padding: 1rem;
    text-align: right;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 1px solid var(--gray-light);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-light);
    color: var(--gray-color);
}

tr:last-child td {
    border-bottom: none;
}

.status {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

    .status.pending {
        background-color: #fff3cd;
        color: #856404;
    }

    .status.completed {
        background-color: #d4edda;
        color: #155724;
    }

    .status.processing {
        background-color: #d1ecf1;
        color: #0c5460;
    }

    .status.cancelled {
        background-color: #f8d7da;
        color: #721c24;
    }

.btn {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    border: none;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

    .btn-primary:hover {
        background-color: var(--primary-dark);
    }

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

    .btn-outline:hover {
        background-color: var(--primary-light);
    }

.btn-sm {
    padding: 0.3rem 0.7rem;
    font-size: 0.85rem;
}

.action-btns {
    display: flex;
    gap: 0.5rem;
}

/* Chart Section */
.chart-container {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

    .chart-header h2 {
        font-size: 1.3rem;
        font-weight: 700;
    }

.chart-wrapper {
    height: 300px;
    position: relative;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

        .sidebar.active {
            transform: translateX(0);
        }

    .main-content {
        margin-right: 0;
    }

    .menu-toggle {
        display: block;
    }

    .search-box input {
        width: 150px;
    }
}

@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-box {
        display: none;
    }

    .table-container {
        overflow-x: auto;
    }

    table {
        min-width: 800px;
    }
}

@media (max-width: 576px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }

    .topbar-right {
        gap: 1rem;
    }

    .user-profile span {
        display: none;
    }
}

.edit-btn-icon {
    width: 140px;
    height: 40px;
    background-image: url('../logo/edit.png');
    background-size: 32px 32px;
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 25px 25px;
    margin-right: 15px;
}

.delete-btn-icon {
    width: 140px;
    height: 40px;
    background-image: url('../logo/delete.png');
    background-size: 32px 32px;
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 30px 30px;
    margin-right: 15px;
}

.AddNew-btn-icon {
    width: 140px;
    height: 40px;
    background-image: url('../logo/addnew.png');
    background-size: 32px 32px;
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 30px 30px;
    margin-right: 15px;
}


.Cancel-btn-icon {
    width: 140px;
    height: 40px;
    background-image: url('../logo/cancel2.png');
    background-size: 32px 32px;
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 30px 30px;
    margin-right: 15px;
}

.Save-btn-icon {
    width: 200px;
    height: 40px;
    background-image: url('../logo/saveuser.png');
    background-size: 32px 32px;
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 30px 30px;
    margin-right: 15px;
}

.update-btn-icon {
    width: 200px;
    height: 40px;
    background-image: url('../logo/update.png');
    background-size: 32px 32px;
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 30px 30px;
    margin-right: 15px;
}

.refresh-btn-icon {
    width: 200px;
    height: 40px;
    background-image: url('../logo/refresh.png');
    background-size: 32px 32px;
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 30px 30px;
    margin-right: 15px;
}
