* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: "Nunito", sans-serif;
    overflow-x: hidden;
}
/* .wrapper { display: flex; width: 100%; align-items: stretch; } 
#sidebar { min-width: 250px; max-width: 250px; min-height: 100vh; background: linear-gradient(180deg, #1e3a5f 0%, #2c5282 100%); color: #fff; transition: all 0.3s; position: fixed; left: 0; top: 0; z-index: 1000; overflow-y: auto; }
#sidebar .sidebar-header { padding: 20px; background: rgba(0,0,0,0.2); border-bottom: 1px solid rgba(255,255,255,0.1); }
#sidebar .sidebar-header h3 { margin: 0; font-size: 20px; font-weight: 700; }
#sidebar .sidebar-header .user-info { font-size: 13px; margin-top: 8px; opacity: 0.9; }
#sidebar ul.components { padding: 20px 0; }
#sidebar ul li { list-style: none; }
#sidebar ul li a { padding: 12px 20px; font-size: 15px; display: block; color: rgba(255,255,255,0.8); text-decoration: none; transition: all 0.3s; }
#sidebar ul li a:hover, #sidebar ul li a.active { color: #fff; background: rgba(255,255,255,0.1); border-left: 4px solid #fff; padding-left: 16px; }
#sidebar ul li a i { margin-right: 10px; width: 20px; text-align: center; }
#content { width: 100%; padding: 0; min-height: 100vh; transition: all 0.3s; margin-left: 250px; }*/
.top-navbar {
    background: #fff;
    padding: 15px 30px;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* .main-content { padding: 30px; background: #f5f6fa; min-height: calc(100vh - 70px); } */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}
.card-header {
    background: #fff;
    border-bottom: 2px solid #f0f0f0;
    padding: 20px;
    font-weight: 600;
    font-size: 18px;
}
.stat-card {
    padding: 25px;
    border-radius: 10px;
    color: #fff;
    margin-bottom: 20px;
}
.stat-card h6 {
    font-size: 14px;
    margin-bottom: 10px;
    opacity: 0.9;
}
.stat-card h2 {
    font-size: 36px;
    font-weight: 700;
    margin: 0;
}
.stat-card i {
    font-size: 40px;
    opacity: 0.3;
}
.btn {
    border-radius: 6px;
    padding: 8px 20px;
    font-weight: 500;
}
.table {
    background: #fff;
}
.badge {
    padding: 6px 12px;
    font-weight: 500;
}
.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #2d3748;
}
/* @media (max-width: 768px) {
    #sidebar {
        margin-left: -250px;
    }
    #content {
        margin-left: 0;
    }
} */

/* Sidebar Styling */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar-header {
    padding: 18px 15px;
    /* background: rgba(0, 0, 0, 0.2); */
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 15px;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.sidebar .nav-link i {
    width: 20px;
    margin-right: 10px;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: #3498db;
}

.sidebar .nav-link.active {
    background: rgba(52, 152, 219, 0.2);
    color: white;
    border-left-color: #3498db;
}

/* Submenu */
.submenu {
    background: rgba(0, 0, 0, 0.15);
}

.submenu .nav-link {
    padding-left: 45px;
    font-size: 13px;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    min-height: 100vh;
    background: #f8f9fa;
}

/* Top Header */
.top-header {
    background: white;
    height: 60px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.user-menu .dropdown-toggle {
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
}

.user-menu .dropdown-toggle:hover {
    background: #f8f9fa;
}

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

/* Table Action Buttons Fix */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    background: white;
}

.table thead th {
    background: #f8f9fa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    white-space: nowrap;
    padding: 12px 8px;
}

.table tbody td {
    padding: 12px 8px;
    vertical-align: middle;
}

/* Action buttons column - CRITICAL FIX */
.table td:last-child,
.table th:last-child {
    min-width: 120px;
    white-space: nowrap;
    text-align: center;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    margin: 0 2px;
}

/* JSON Viewer */
.json-viewer {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 10px;
    border-radius: 6px;
    font-family: "Consolas", "Monaco", monospace;
    font-size: 13px;
    line-height: 1.6;
    max-height: 600px;
    overflow: auto;
    white-space: pre;
    word-wrap: normal;
}

.json-viewer::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.json-viewer::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.json-viewer::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    margin-bottom: 20px;
}

.card-header {
    background: white;
    border-bottom: 2px solid #f0f0f0;
    font-weight: 600;
    padding: 15px 20px;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 6px;
    padding: 12px 20px;
}

/* Buttons */
.btn {
    border-radius: 6px;
}

/* Badges */
.badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
}
