:root {
    --primary-color: #E31E24;
    --primary-dark: #b3161b;
    --secondary-color: #1a1a1a;
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-primary: #1c1e21;
    --text-secondary: #65676b;
    --sidebar-width: 260px;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    display: flex;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--secondary-color);
    color: white;
    position: fixed;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid #333;
}

.sidebar-header h2 {
    color: var(--primary-color);
    font-size: 24px;
    letter-spacing: 1px;
    font-weight: 800;
}

.sidebar-menu {
    flex: 1;
    padding: 20px 0;
}

.sidebar-menu ul {
    list-style: none;
}

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

.sidebar-menu ul li a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #b0b3b8;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.sidebar-menu ul li a:hover, .sidebar-menu ul li.active a {
    background-color: var(--primary-color);
    color: white;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #333;
}

.logout-btn {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #444;
}

/* Main Content Styling */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 40px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}


.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(227, 30, 36, 0.1);
    color: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 20px;
}

.stat-info h3 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.stat-info p {
    font-size: 24px;
    font-weight: 700;
}

/* Data Table Styling */
.data-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-header {
    padding: 20px 25px;
    border-bottom: 1px solid #f0f2f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

th {
    background: #f8f9fa;
    padding: 15px 25px;
    text-align: left;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
}

td {
    padding: 15px 25px;
    border-bottom: 1px solid #f0f2f5;
    font-size: 15px;
}

.product-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    border: none;
    transition: 0.3s;
}

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

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

.btn-danger {
    background: #fff0f0;
    color: #e31e24;
}

.btn-danger:hover {
    background: #ffe0e0;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-horizontal { background: #e3f2fd; color: #1976d2; }
.badge-vertical { background: #f3e5f5; color: #7b1fa2; }

/* Form Styling */
.form-card {
    max-width: 800px;
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: border 0.3s;
}

.form-group input:focus {
    border-color: var(--primary-color);
}

/* Split layout for category management */
.split-layout {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}
.left-panel {
    flex: 1;
    min-width: 320px;
}
.right-panel {
    flex: 2;
    min-width: 450px;
}

/* Search and Filters */
.search-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
    flex-wrap: wrap;
}
.search-input-wrapper {
    position: relative;
    flex: 1;
    max-width: 300px;
}
.search-input-wrapper input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid #ddd;
    border-radius: 10px;
    outline: none;
    font-size: 14px;
}
.search-input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}
.filter-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.filter-tab {
    padding: 8px 18px;
    border-radius: 20px;
    background: #e4e6eb;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: 0.3s;
}
.filter-tab.active, .filter-tab:hover {
    background: var(--primary-color);
    color: white;
}

/* Badges */
.badge-pending { background: #fff3cd; color: #856404; }
.badge-completed { background: #d4edda; color: #155724; }
.badge-cancelled { background: #f8d7da; color: #721c24; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal.open {
    display: flex;
}
.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 16px;
    width: 100%;
    max-width: 650px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s;
}
.close-modal:hover {
    color: var(--primary-color);
}
.modal-header {
    border-bottom: 1px solid #f0f2f5;
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.modal-header h2 {
    font-size: 22px;
    color: var(--text-primary);
}

.btn-secondary {
    background: #e4e6eb;
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: #d8dadf;
}
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.action-buttons .btn {
    padding: 8px 12px;
    font-size: 13px;
}
.table-responsive {
    width: 100%;
    overflow-x: auto;
}
.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f2f5;
}
.detail-label {
    font-weight: 600;
    color: var(--text-secondary);
}
.detail-value {
    color: var(--text-primary);
}

