:root {
    --sidebar-width: 260px;
    --topbar-height: 70px;
    --bg-color: #f8fafc;
    --sidebar-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 16px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Signika', sans-serif;
}

/* Material Symbols Support (Both Outlined and Rounded) */
.material-symbols-rounded,
.material-symbols-outlined {
    font-family: 'Material Symbols Rounded', 'Material Symbols Outlined', sans-serif;
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    transition: var(--transition);
}

.sidebar a {
    text-decoration: none;
    color: inherit;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2.5rem;
    padding: 0 0.5rem;
}

.sidebar-logo img {
    height: 45px;
    width: auto;
}

.sidebar-logo div {
    font-family: 'Signika', sans-serif;
}

.sidebar-logo span {
    font-size: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.sidebar-logo strong {
    font-size: 1.1rem;
    display: block;
    line-height: 1;
}

.nav-menu {
    list-style: none;
    flex-grow: 1;
    padding: 0;
    /* Clear default UL padding */
    margin: 0;
    /* Clear default UL margin */
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(16, 147, 53, 0.1);
    color: var(--primary-main);
}

.nav-link.text-danger {
    color: #dc3545 !important;
}

.nav-link.text-danger:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #a71d2a !important;
}

.nav-link .material-symbols-rounded {
    font-size: 22px;
}

.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Top Bar Styling */
.topbar {
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 900;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 0;
    margin-right: 1rem;
}

.sidebar-toggle .material-symbols-rounded {
    font-size: 28px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: #f0f2f1;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    width: 300px;
    gap: 8px;
}

.search-bar input {
    background: none;
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.9rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    display: flex;
}

.icon-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-main);
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    border: 2px solid white;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 20px;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--primary-dark);
}

/* Dashboard Sections */
.dashboard-container {
    padding: 2rem;
    animation: fadeIn 0.6s ease-out;
}

.welcome-section {
    margin-bottom: 2rem;
}

.welcome-section h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.welcome-section p {
    color: var(--text-muted);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(16, 147, 53, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.green {
    background: rgba(16, 147, 53, 0.1);
    color: var(--primary-main);
}

.stat-icon.orange {
    background: rgba(249, 168, 86, 0.1);
    color: var(--accent-main);
}

.stat-icon.blue {
    background: rgba(0, 143, 215, 0.1);
    color: var(--alternative-main);
}

.stat-info .value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-info .label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Secondary Panels */
.panels-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.panel {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.panel-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-text {
    color: var(--primary-main);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    transition: var(--transition);
    border: 1px solid rgba(16, 147, 53, 0.3);
}

.btn-text:hover {
    background: var(--primary-main);
    color: white;
    border-color: var(--primary-main);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
}

.custom-table th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

.custom-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.02);
}

.status-pills {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-pills.success {
    background: #e6f7ed;
    color: #109335;
}

.status-pills.pending {
    background: #fff4e6;
    color: #f9a856;
}

.status-pills.danger {
    background: #fff0f0 !important;
    color: #e53935 !important;
    border: 1px solid #ffcdd2;
}

.status-pills.warning {
    background: #fff9e6 !important;
    color: #d97706 !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .panels-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
        padding: 1.5rem;
    }

    .sidebar.show {
        transform: translateX(0);
        box-shadow: 20px 0 30px rgba(0, 0, 0, 0.1);
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
    }

    .main-content {
        margin-left: 0;
    }

    .topbar {
        padding: 0 1rem;
    }

    .dashboard-container {
        padding: 1rem;
    }

    .welcome-section h1 {
        font-size: 1.4rem;
    }

    .panel {
        padding: 1rem;
    }

    .panel-header h3 {
        font-size: 1rem;
    }

    .custom-table th,
    .custom-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
        white-space: normal;
        word-break: break-word;
        min-width: 80px;
    }

    .custom-table td:last-child {
        white-space: nowrap;
    }

    .status-pills {
        padding: 2px 8px;
        font-size: 10px;
        display: inline-block;
    }

    .search-bar {
        display: none;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(2px);
        z-index: 999;
        transition: var(--transition);
    }

    .sidebar-overlay.show {
        display: block;
    }
}