:root {
    --primary: #FF6F00;
    --background: #000000;
    --surface: #121212;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
}

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

body {
    background-color: var(--background);
    color: var(--text);
    min-height: 100vh;
}

.glass-container {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
    overflow: hidden;
    /* Prevent overflow */
}

.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    border-right: 1px solid var(--glass-border);
    padding: 40px 20px;
    background: var(--surface);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.main-content {
    margin-left: 260px;
    padding: 40px;
    transition: margin-left 0.3s ease;
}

.sidebar-brand {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 12px;
    border-radius: 12px;
    transition: 0.3s;
    margin-bottom: 8px;
}

.nav-link:hover,
.nav-link.active {
    background: var(--glass);
    color: var(--primary);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 111, 0, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid var(--glass-border);
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary);
    transform: scale(1.05);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
}

input,
select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: 10px;
    color: white;
    outline: none;
}

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

.stat-card {
    flex: 1;
    text-align: center;
}

.stat-card .value {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary);
    margin-top: 10px;
}

/* Responsive Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    min-width: 600px;
    /* Ensure table doesn't squash too much */
}

th {
    text-align: left;
    color: var(--text-muted);
    padding: 16px;
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.badge-success {
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
}

.badge-pending {
    background: rgba(255, 165, 0, 0.1);
    color: #ffa500;
}

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
}

.login-box {
    width: 400px;
    max-width: 100%;
}

/* Mobile Menu Button - Hidden by default on Desktop */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1100;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

/* Modal Global Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    width: 500px;
    max-width: 90%;
}

.close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.3s;
    line-height: 1;
}

.close:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.modal h2 {
    margin-bottom: 20px;
    color: var(--primary);
    font-size: 1.5rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 250px;
        box-shadow: 10px 0 20px rgba(0, 0, 0, 0.5);
    }

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

    .main-content {
        margin-left: 0;
        padding: 20px;
        padding-top: 70px;
        /* Space for menu button */
    }

    .mobile-menu-btn {
        display: block;
    }

    /* Stack flex items on mobile */
    div[style*="display: flex"] {
        flex-wrap: wrap !important;
    }

    /* Specific adjustments for header controls */
    div[style*="justify-content: space-between"] {
        justify-content: center !important;
        gap: 15px;
    }

    div[style*="align-items:flex-end"] {
        align-items: stretch !important;
    }

    /* Filters section */
    div[style*="display:flex; gap:10px; align-items:flex-end"] {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    div[style*="display:flex; gap:10px; align-items:flex-end"]>div {
        width: 100%;
    }

    /* Full width inputs */
    input,
    select,
    textarea {
        width: 100% !important;
        max-width: 100% !important;
    }

    #searchInput {
        width: 100% !important;
    }

    /* Modal Fixes */
    .modal-content,
    div[id$="Modal"] .glass-container {
        width: 95% !important;
        margin: 5% auto !important;
        padding: 20px !important;
        max-height: 90vh;
        overflow-y: auto;
    }

    .stat-card .value {
        font-size: 24px;
    }

    h1 {
        font-size: 24px;
    }

    /* Fix specific form input groups inline styles */
    .form-group>div {
        flex-direction: column !important;
        align-items: stretch !important;
    }
}