/* CSS Variables for Theme */
:root {
    --primary-color: #4361ee;
    --primary-dark: #0000ff;
    --secondary-color: #2ecc71;
    --secondary-dark: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --gray-color: #95a5a6;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Login Page Styles */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.login-container {
    width: 100%;
    max-width: 600px;
    padding: 20px;
}

.login-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--dark-color);
    margin-bottom: 10px;
}

.login-header p {
    color: var(--gray-color);
}

.login-form .form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.error-message {
    color: var(--danger-color);
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

.demo-credentials {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 14px;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gray-color);
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-full {
    width: 100%;
}

.btn-action {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin: 0 3px;
    border-radius: 4px;
    transition: var(--transition);
}

.edit-btn {
    color: var(--primary-color);
}

.edit-btn:hover {
    background: rgba(52, 152, 219, 0.1);
}

.delete-btn {
    color: var(--danger-color);
}

.delete-btn:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* Admin Panel Layout */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background: #3a56d4;
    color: var(--white);
    transition: var(--transition);
    position: fixed;
    height: 100vh;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 18px;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    display: none;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
}

.sidebar-nav .nav-item {
    margin: 5px 0;
}

.sidebar-nav .nav-item a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--light-color);
    text-decoration: none;
    transition: var(--transition);
}

.sidebar-nav .nav-item a:hover,
.sidebar-nav .nav-item.active a {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.sidebar-nav .nav-item a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-left: 250px;
    transition: var(--transition);
}

/* Top Navbar */
.top-navbar {
    background: var(--white);
    padding: 15px 30px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-left {
    display: flex;
    align-items: center;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    margin-right: 15px;
    color: var(--dark-color);
    display: none;
}

.navbar-right {
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.user-avatar {
    margin-left: 10px;
    font-size: 24px;
    color: var(--primary-color);
}

/* Content Area */
.content-area {
    padding: 30px;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(52, 152, 219, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 24px;
    color: var(--primary-color);
}

.stat-info h3 {
    font-size: 14px;
    color: var(--gray-color);
    margin-bottom: 5px;
}

.stat-number {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark-color);
    display: block;
}

.stat-change {
    font-size: 12px;
    color: var(--secondary-color);
}

/* Dashboard Content */
.dashboard-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.content-section {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.content-section h2 {
    margin-bottom: 15px;
    color: var(--dark-color);
    font-size: 18px;
}

/* Activity List */
.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(52, 152, 219, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--primary-color);
}

.activity-details p {
    margin-bottom: 5px;
}

.activity-time {
    font-size: 12px;
    color: var(--gray-color);
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.action-btn {
    background: var(--white);
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.action-btn i {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.action-btn span {
    font-size: 14px;
    color: var(--dark-color);
}

/* Content Header */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-box {
    position: relative;
    width: 300px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
}

.filters select {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
}

/* Table Styles */
.table-container {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--dark-color);
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: var(--dark-color);
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-color);
}

.modal-body {
    padding: 20px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Settings Styles */
.settings-container {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.settings-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    padding: 15px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
}

.settings-content {
    padding: 30px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.settings-form {
    max-width: 500px;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group input {
    width: auto;
    margin-right: 10px;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        width: 70px;
    }
    
    .sidebar-header h2,
    .sidebar-nav .nav-item span {
        display: none;
    }
    
    .sidebar-nav .nav-item a {
        justify-content: center;
        padding: 15px;
    }
    
    .sidebar-nav .nav-item a i {
        margin-right: 0;
        font-size: 20px;
    }
    
    .main-content {
        margin-left: 70px;
    }
    
    .menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .content-area {
        padding: 15px;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .search-box {
        width: 100%;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 600px;
    }
    
    .settings-tabs {
        flex-direction: column;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
}