:root {
    --sidebar-width: 260px;
    --primary-color: #0c5c93;
    --secondary-color: #1a202c;
    --bg-light: #f8f9fa;
    --text-muted: #718096;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: #333;
    overflow-x: hidden;
}

/* Sidebar */
#sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--secondary-color);
    color: white;
    z-index: 1000;
    transition: all 0.3s;
    overflow-y: auto;
}

#sidebar .sidebar-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    text-align: center;
}

#sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 20px;
    border-radius: 0;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

#sidebar .nav-link i {
    width: 20px;
    margin-right: 15px;
    font-size: 1.1rem;
}

#sidebar .nav-link:hover, #sidebar .nav-link.active {
    color: white;
    background: var(--primary-color);
}

/* Main Content Area */
#content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    transition: all 0.3s;
}

/* Navbar */
#top-nav {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 15px 30px;
}

/* Cards & UI Elements */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #edf2f7;
    font-weight: 700;
    padding: 15px 20px;
    border-radius: 12px 12px 0 0 !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
}

.table thead th {
    background-color: #f7fafc;
    border-bottom: 2px solid #edf2f7;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.badge {
    padding: 0.5em 1em;
    border-radius: 6px;
    font-weight: 500;
}

/* Fix for dropdowns in responsive tables */
.table-responsive {
    overflow: visible !important;
}

@media (max-width: 992px) {
    .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        min-height: 300px; /* Space for dropdowns */
    }
}

/* Modern Upload Component */
.upload-container {
    position: relative;
    width: 100%;
}

.upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(12, 92, 147, 0.03);
}

.upload-area i {
    font-size: 2.5rem;
    color: #cbd5e0;
    margin-bottom: 12px;
    transition: color 0.2s;
}

.upload-area:hover i, .upload-area.dragover i {
    color: var(--primary-color);
}

.upload-area p {
    margin-bottom: 0;
    color: var(--text-muted);
}

.upload-preview {
    margin-top: 15px;
    position: relative;
    display: none;
}

.upload-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.upload-preview .remove-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff4d4f;
    color: white;
    width: auto;
    height: auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid white;
    font-size: 0.8rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input[type="file"].modern-upload-input {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    #sidebar.active {
        margin-left: 0;
    }
    #content {
        margin-left: 0;
        width: 100%;
    }
}
