* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

:root {
    /* Light Mode Colors */
    --bg-color: #f3f4f6;
    --surface-color: #ffffff;
    --text-color: #111827;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;

    /* Primary Theme Color */
    --primary-color: #20b2aa;
    /* Lightseagreen */
    --primary-light: rgba(32, 178, 170, 0.1);
    --primary-dark: #1b9e97;

    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Dimensions */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
    --header-height: 70px;

    /* Shadows and Transitions */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

html[data-theme="dark"],
body[data-theme="dark"],
[data-theme="dark"] {
    /* Dark Mode Colors */
    --bg-color: #0f172a;
    --surface-color: #1e293b;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
    overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

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

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--surface-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: fixed;
    height: 100vh;
    z-index: 1000;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo-icon {
    font-size: 28px;
    color: var(--primary-color);
    margin-right: 10px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color) !important;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.sidebar.collapsed .logo-text {
    display: none;
}

.nav-links {
    list-style: none;
    padding: 20px 0;
    flex: 1;
    overflow-y: auto;
}

.nav-links li {
    margin-bottom: 5px;
    position: relative;
}

.nav-links a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.nav-links a i {
    font-size: 22px;
    margin-right: 15px;
    min-width: 24px;
    text-align: center;
}

.sidebar.collapsed .nav-links a i {
    margin-right: 0;
}

.sidebar.collapsed .link-name {
    display: none;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    background-color: var(--primary-light);
    border-left-color: var(--primary-color);
}

.nav-item-group .nav-submenu {
    list-style: none;
    margin: 0;
    padding: 0 0 4px 0;
}

.nav-item-group .nav-submenu a {
    padding: 8px 20px 8px 52px;
    font-size: 13px;
    font-weight: 500;
    border-left: 4px solid transparent;
}

.nav-item-group .nav-submenu a:hover,
.nav-item-group .nav-submenu a.active {
    color: var(--primary-color);
    background-color: var(--primary-light);
    border-left-color: var(--primary-color);
}

.sidebar.collapsed .nav-item-group .nav-submenu {
    display: none;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    color: var(--danger);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 0;
    transition: var(--transition);
}

.sidebar-footer a i {
    font-size: 22px;
    margin-right: 15px;
    min-width: 24px;
}

.sidebar.collapsed .sidebar-footer a .link-name {
    display: none;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
    min-width: 0;
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

/* Header */
.header {
    min-height: var(--header-height);
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 99;
}

.header-left {
    display: flex;
    align-items: center;
}

.toggle-btn {
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

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

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 280px;
}

.search-box-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: var(--text-muted);
}

.search-box-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.search-box input {
    padding: 8px 12px 8px 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-color);
    color: var(--text-color);
    outline: none;
    width: 100%;
    max-width: 100%;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-color);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: var(--transition);
}

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

.badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: bold;
    height: 16px;
    width: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--surface-color);
}

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

.profile-dropdown img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-name {
    font-weight: 600;
    font-size: 14px;
}

.profile-role {
    font-size: 12px;
    color: var(--text-muted);
}

/* Dashboard Content */
.content-wrapper {
    padding: 30px;
}

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

.page-title h1 {
    font-size: 24px;
    font-weight: 700;
}

.date-filter {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--surface-color);
    color: var(--text-color);
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

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

.stat-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-right: 20px;
}

.stat-icon.blue {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.stat-icon.green {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-icon.orange {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.stat-icon.primary {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.stat-details h3 {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 5px;
}

.stat-details .value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
}

.stat-details .trend {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend.up {
    color: var(--success);
}

.trend.down {
    color: var(--danger);
}

/* Charts Layout */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

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

.chart-title {
    font-size: 16px;
    font-weight: 600;
}

.chart-container-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Recent Orders Table */
.table-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

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

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th,
td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    font-size: 14px;
    color: var(--text-color);
}

tr:hover td {
    background-color: var(--bg-color);
}

.status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.status-badge.completed {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-badge.pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.status-badge.cancelled {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.user-td {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-td img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.action-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.action-link:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 16px;
    }

    .content-wrapper {
        padding: 20px;
    }

    .search-box {
        max-width: 180px;
    }

    .sidebar {
        transform: translateX(-100%);
    }

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

    .main-content {
        margin-left: 0 !important;
    }

    .profile-info {
        display: none;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    /* Mobile Overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

@media (max-width: 575px) {
    .header .search-box {
        display: none;
    }

    .page-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .chart-header .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .chart-container-wrapper {
        height: 250px;
        /* Reduce chart height on small screens */
    }

    /* Traffic chart specific to prevent it running off */
    canvas#trafficChart {
        max-width: 200px !important;
        max-height: 200px !important;
    }

    .table-card {
        padding: 15px;
    }

    .notification-menu {
        width: 100vw;
        max-width: 320px;
        position: fixed;
        right: 10px;
        top: 60px;
    }

    .modal {
        width: 95%;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }
}

/* Forms & Buttons */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

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

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

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

.btn-secondary:hover {
    background-color: var(--bg-color);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 14px;
    transition: var(--transition);
    outline: none;
    box-sizing: border-box;
}

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

/* Dropdowns */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 1000;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu.dropdown-menu-right {
    right: 0;
    left: auto;
}

.dropdown-header {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-header h4 {
    font-size: 14px;
    margin: 0;
}

.dropdown-header a {
    font-size: 12px;
    color: var(--primary-color);
    text-decoration: none;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
    gap: 10px;
}

.dropdown-item:hover {
    background-color: var(--bg-color);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 5px 0;
}

/* Notification Dropdown Specifics */
.notification-menu {
    width: 300px;
}

.notification-menu .dropdown-item {
    align-items: flex-start;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.notification-menu .dropdown-item.unread {
    background-color: var(--primary-light);
}

.item-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.item-details p {
    margin: 0 0 5px 0;
    font-size: 13px;
    line-height: 1.4;
}

.item-details span {
    font-size: 11px;
    color: var(--text-muted);
}

.dropdown-footer {
    padding: 10px;
    text-align: center;
}

.dropdown-footer a {
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: var(--surface-color);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-md);
}

.modal-overlay.show .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: var(--surface-color);
    color: var(--text-color);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    transform: translateX(0);
} 
.btn-outline-primary{
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    background-color: transparent;
}
.btn-outline-primary:hover{
    background-color: var(--primary-light);
} 
.btn-outline-secondary{
    color: var(--text-color);
    border: 1px solid var(--border-color);
    background-color: transparent;
} 
.btn-outline-secondary:hover{
    background-color: var(--bg-color);
}