/* User Dashboard Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Header / Navbar */
.admin-header,
.navbar {
    background: #4CAF50; /* Fallback */
    background: -webkit-linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    background: -moz-linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    background: -o-linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    padding: 15px 20px;
    -webkit-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.nav-brand {
    font-size: 24px;
    font-weight: 600;
    color: white;
}

.nav-brand a {
    color: white;
    text-decoration: none;
}

.nav-brand a:hover {
    color: white;
    text-decoration: none;
}

.nav-links {
    display: none; /* Hide desktop nav links by default */
    gap: 20px;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.nav-links > * {
    margin-right: 20px;
}

.nav-links > *:last-child {
    margin-right: 0;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    border-radius: 6px;
    -webkit-transition: background 0.3s;
    -moz-transition: background 0.3s;
    -o-transition: background 0.3s;
    transition: background 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.header-logo {
    font-size: 24px;
    font-weight: 600;
    text-decoration: none;
    color: white;
}

.header-nav {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 20px;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

/* Fallback for older browsers without gap support */
.header-nav > * {
    margin-right: 20px;
}

.header-nav > *:last-child {
    margin-right: 0;
}

.header-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    border-radius: 6px;
    -webkit-transition: background 0.3s;
    -moz-transition: background 0.3s;
    -o-transition: background 0.3s;
    transition: background 0.3s;
}

.header-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Container */
.container,
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.subtitle {
    color: #7f8c8d;
    margin-bottom: 30px;
}

h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #2c3e50;
}

/* Statistics Grid */
.stats-grid {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: (minmax(250px, 1fr))[auto-fit];
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* Fallback for browsers without gap support */
@supports not (gap: 20px) {
    .stats-grid {
        margin: -10px -10px 30px -10px;
    }
    
    .stats-grid > * {
        margin: 10px;
    }
}

.stat-card {
    background: white;
    padding: 30px;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    border-radius: 12px;
    -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    -webkit-transition: -webkit-transform 0.3s, -webkit-box-shadow 0.3s;
    -moz-transition: -moz-transform 0.3s, -moz-box-shadow 0.3s;
    -o-transition: transform 0.3s, box-shadow 0.3s;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    -webkit-transform: translateY(-5px);
    -moz-transform: translateY(-5px);
    -ms-transform: translateY(-5px);
    -o-transform: translateY(-5px);
    transform: translateY(-5px);
    -webkit-box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    -moz-box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #4CAF50;
    margin-bottom: 5px;
}

.stat-label {
    color: #7f8c8d;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Section */
.section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

/* Table */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-admin {
    background: #4CAF50;
    color: white;
}

.badge-user {
    background: #e9ecef;
    color: #495057;
}

.badge-active {
    background: #28a745;
    color: white;
}

.badge-inactive {
    background: #dc3545;
    color: white;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #4CAF50; /* Fallback */
    background: -webkit-linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    background: -moz-linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    background: -o-linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    text-decoration: none;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    -webkit-transition: -webkit-transform 0.2s, -webkit-box-shadow 0.2s;
    -moz-transition: -moz-transform 0.2s, -moz-box-shadow 0.2s;
    -o-transition: transform 0.2s, box-shadow 0.2s;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    -webkit-transform: translateY(-2px);
    -moz-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    -o-transform: translateY(-2px);
    transform: translateY(-2px);
    -webkit-box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    -moz-box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.btn-small:hover {
    background: #45a049;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: #28a745;
}

.btn-success:hover {
    background: #218838;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

input[type="text"],
input[type="email"],
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    border-radius: 6px;
    font-size: 14px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

input:focus,
select:focus {
    outline: none;
    border-color: #4CAF50;
    -webkit-box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    -moz-box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

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

/* Actions */
.actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    border-radius: 12px;
    -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.empty-state p {
    color: #7f8c8d;
    margin-bottom: 30px;
}

/* Hamburger Menu for User Navigation */
.hamburger {
    display: flex; /* Show hamburger menu for all screen sizes */
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
    color: white;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile Navigation */
.nav-links.mobile {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #4CAF50;
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-links.mobile.active {
    display: flex;
}

.nav-links.mobile .nav-link {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0;
    text-align: center;
}

.nav-links.mobile .nav-link:last-child {
    border-bottom: none;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Always show hamburger menu for all screen sizes */
.navbar {
    position: relative;
}

/* Hide desktop nav on mobile, show on desktop */
@media (max-width: 768px) {
    .navbar .nav-links.desktop {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .navbar .nav-links.mobile {
        display: none !important;
    }
}

