:root {
    --primary-color: #ef6f22;
    --secondary-color: #333;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --text-color: #212529;
    --sidebar-width: 250px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--light-bg);
    line-height: 1.6;
}

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
}

.login-image {
    flex: 1;
    background: url("../images/login-bg.jpg") center/cover;
    position: relative;
    overflow: hidden;
}

.login-image::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(239, 111, 34, 0.8);
}

.login-form-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

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

.login-form h1 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

/* Main Layout */
.main-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--secondary-color);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    padding: 1.5rem;
    background: rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-menu li {
    margin-bottom: 0.25rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-menu i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

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

.header {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.content {
    padding: 2rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.card-body {
    padding: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background: #d55f1c;
}

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

.btn-secondary:hover {
    background: #222;
}

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

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

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

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

.table th {
    background: var(--light-bg);
    font-weight: 600;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-card h4 {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .login-container {
        flex-direction: column;
    }
    
    .login-image {
        height: 200px;
    }
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }


/* Alert styles that were missing */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Modal styles */
#eventModal, #uploadModal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 400px;
    max-width: 90%;
}

#modalOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

/* Form improvements */
textarea.form-control {
    resize: vertical;
}

/* Print styles */
@media print {
    .sidebar, .header, .btn, .form-group {
        display: none !important;
    }
    
    .main-content {
        margin: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}

/* Responsive tables */
@media (max-width: 768px) {
    .table {
        font-size: 0.875rem;
    }
    
    .table td, .table th {
        padding: 0.5rem;
    }
}
/* Hamburger menu functionality */
.sidebar.hidden {
    transform: translateX(-100%);
}

.main-content {
    transition: margin-left 0.3s ease;
}

#sidebarToggle {
    background: transparent;
    border: 1px solid #ddd;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#sidebarToggle:hover {
    background: #f0f0f0;
    border-color: #999;
}

/* Desktop behavior */
@media (min-width: 769px) {
    .sidebar {
        transition: transform 0.3s ease;
    }
    
    .sidebar.hidden {
        transform: translateX(-250px);
    }
}

/* Mobile behavior */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.hidden {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0 !important;
    }
}

/* Enhanced Menu Toggle Button */
.menu-toggle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.menu-toggle-btn {
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-width: 45px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle-btn:hover {
    background: #f8f9fa;
    border-color: #ef6f22;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.menu-toggle-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.menu-arrow {
    font-size: 16px;
    font-weight: bold;
    color: #000000;
    transition: transform 0.3s ease, color 0.3s ease;
    user-select: none;
}

.menu-toggle-btn:hover .menu-arrow {
    color: #ef6f22;
    transform: scale(1.1);
}

.menu-toggle-label {
    font-size: 10px;
    color: #666;
    text-align: center;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    margin-top: 1px;
    white-space: nowrap;
}

/* Hamburger menu functionality - Enhanced */
.sidebar.hidden {
    transform: translateX(-100%);
}

.main-content {
    transition: margin-left 0.3s ease;
}

/* Desktop behavior */
@media (min-width: 769px) {
    .sidebar {
        transition: transform 0.3s ease;
    }
    
    .sidebar.hidden {
        transform: translateX(-250px);
    }
    
    /* Update arrow direction based on sidebar state */
    .sidebar.hidden ~ .main-content .menu-arrow {
        transform: rotate(180deg);
    }
}

/* Mobile behavior */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.hidden {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .menu-toggle-label {
        font-size: 9px;
    }
    
    .menu-toggle-btn {
        min-width: 40px;
        height: 35px;
        padding: 6px 10px;
    }
    
    .menu-arrow {
        font-size: 14px;
    }
}

/* Additional visual enhancements */
.menu-toggle-container {
    position: relative;
}

.menu-toggle-container::before {
    content: "";
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.menu-toggle-container:hover::before {
    opacity: 0.1;
    background: #ef6f22;
}