:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --light-gray: #ecf0f1;
    --medium-gray: #95a5a6;
    --dark-gray: #7f8c8d;
    --white: #ffffff;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-gray);
    color: var(--primary-color);
}

/* Header Styles */
.main-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 20px 0;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
}

.logo-section img {
    height: 50px;
    margin-right: 15px;
}

.logo-section h1 {
    font-size: 24px;
    font-weight: 600;
}

.user-section {
    display: flex;
    align-items: center;
    position: relative;
}

.user-profile {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 25px;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s;
}

.user-profile:hover {
    background: rgba(255,255,255,0.2);
}

.user-profile img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid var(--white);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    display: none;
    min-width: 200px;
    z-index: 1000;
}

.user-dropdown.active {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 12px 20px;
    color: var(--primary-color);
    text-decoration: none;
    transition: background 0.3s;
}

.user-dropdown a:hover {
    background: var(--light-gray);
}
/* Logo Styles Update */
.logo-section {
    display: flex;
    align-items: center;
}

.logo-section img {
    height: 50px;
    width: auto;
    margin-right: 15px;
    background: white;
    padding: 5px;
    border-radius: 8px;
}

.logo-section h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.logo-section small {
    font-size: 12px;
    opacity: 0.9;
}

/* User Profile Image */
.user-profile img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid var(--white);
    object-fit: cover;
}

/* Navigation Icons */
.nav-menu a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.nav-menu a span {
    font-size: 18px;
}

/* Navigation Bar */
.nav-header {
    background: var(--white);
    border-bottom: 2px solid var(--light-gray);
    position: sticky;
    top: 0;
    z-index: 999;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--light-gray);
    border-bottom-color: var(--accent-color);
}

/* Main Content */
.main-content {
    max-width: 1300px;
    margin: 30px auto;
    padding: 0 20px;
    min-height: calc(100vh - 250px);
}

/* Card Styles */
.card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 25px;
}

.card-header {
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.card-title {
    font-size: 20px;
    color: var(--primary-color);
    font-weight: 600;
}

/* Dashboard Stats */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-left: 4px solid var(--accent-color);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.stat-card.success {
    border-left-color: var(--success);
}

.stat-card.warning {
    border-left-color: var(--warning);
}

.stat-card.danger {
    border-left-color: var(--danger);
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
    margin: 10px 0;
}

.stat-label {
    color: var(--medium-gray);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--light-gray);
}

.data-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--medium-gray);
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--light-gray);
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Button Styles */
.btn {
    padding: 11px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(245, 87, 108, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #ffa502 0%, #ffb84d 100%);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 165, 2, 0.4);
}

.btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
}

.btn-secondary:hover {
    background: #d5dbdb;
    transform: translateY(-2px);
}

.btn-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(79, 172, 254, 0.4);
}

.btn-sm {
    padding: 7px 11px;
    font-size: 13px;
    border-radius: 6px;
    font-weight: 500;
}

/* Circular Icon Buttons for Actions */
.btn-sm.btn-info[style*="width: 32px"],
.btn-sm.btn-warning[style*="width: 32px"],
.btn-sm.btn-danger[style*="width: 32px"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
    margin: 0 2px !important;
}

.btn-sm.btn-info[style*="width: 32px"]:hover,
.btn-sm.btn-warning[style*="width: 32px"]:hover,
.btn-sm.btn-danger[style*="width: 32px"]:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
}

.action-buttons {
    display: flex;
    gap: 6px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--light-gray);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.close-modal {
    font-size: 28px;
    font-weight: bold;
    color: var(--medium-gray);
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--danger);
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 20px;
    margin-top: 50px;
}

.footer p {
    margin: 5px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .data-table {
        font-size: 12px;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--light-gray);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-success {
    background: var(--success);
    color: var(--white);
}

.badge-danger {
    background: var(--danger);
    color: var(--white);
}

.badge-warning {
    background: var(--warning);
    color: var(--white);
}

.badge-info {
    background: var(--accent-color);
    color: var(--white);
}