/* Admin Panel CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #2c3e50;
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    background: #1a252f;
    text-align: center;
}

.sidebar-header h2 {
    font-size: 18px;
    margin: 0;
}

.sidebar-menu {
    padding: 10px 0;
}

.sidebar-menu a {
    display: block;
    padding: 15px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background: #34495e;
    border-left-color: #3498db;
}

.sidebar-menu a i {
    margin-right: 10px;
    width: 20px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.user-menu {
    position: relative;
}

.user-name {
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 5px;
}

.user-menu:hover .dropdown {
    display: block;
}

.dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 5px;
    margin-top: 5px;
}

.dropdown a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown a:hover {
    background: #f5f7fa;
}

.content-area {
    flex: 1;
    padding: 30px;
}

.admin-footer {
    background: white;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #eee;
}

/* Page Elements */
.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    color: #2c3e50;
}

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

.card-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.card-header h2 {
    font-size: 20px;
    margin: 0;
    color: #2c3e50;
}

.card-body {
    padding: 20px;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin-right: 15px;
}

.stat-info h3 {
    font-size: 32px;
    margin: 0;
    color: #2c3e50;
}

.stat-info p {
    margin: 5px 0 0 0;
    color: #7f8c8d;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.dashboard-section h2 {
    font-size: 18px;
    margin-bottom: 15px;
}

.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    margin-right: 15px;
    color: #3498db;
}

.activity-content p {
    margin: 0;
}

.activity-content small {
    color: #7f8c8d;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-text {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
    display: block;
}

.custom-control {
    position: relative;
    padding-left: 30px;
    margin-bottom: 10px;
}

.custom-control-input {
    position: absolute;
    left: 0;
    top: 2px;
}

.custom-control-label {
    cursor: pointer;
}

.form-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: #27ae60;
    color: white;
}

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

.btn-danger {
    background: #e74c3c;
    color: white;
}

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

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-info {
    background: #3498db;
    color: white;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

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

.data-table thead {
    background: #f8f9fa;
}

.data-table th, .data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    font-weight: 600;
    color: #2c3e50;
}

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

.submenu-row {
    background: #f8f9fa;
}

/* Badges */
.badge {
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #27ae60;
    color: white;
}

.badge-warning {
    background: #f39c12;
    color: white;
}

.badge-danger {
    background: #e74c3c;
    color: white;
}

/* Status Buttons */
.btn-status {
    padding: 4px 12px;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-status.active {
    background: #27ae60;
    color: white;
}

.btn-status.inactive {
    background: #95a5a6;
    color: white;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

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

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

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 5px;
    margin-top: 20px;
    justify-content: center;
}

.pagination a {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
    color: #333;
}

.pagination a.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Stats Row */
.stats-row {
    display: flex;
    gap: 20px;
}

.stat-box {
    flex: 1;
    padding: 20px;
    border-radius: 8px;
    color: white;
    text-align: center;
}

.stat-box.warning {
    background: #f39c12;
}

.stat-box.success {
    background: #27ae60;
}

.stat-box.danger {
    background: #e74c3c;
}

.stat-box h3 {
    font-size: 36px;
    margin: 0 0 10px 0;
}

.stat-box p {
    margin: 0;
    font-size: 16px;
}

/* Button Groups */
.btn-group {
    display: inline-flex;
    gap: 0;
}

.btn-group .btn {
    border-radius: 0;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.btn-group .btn:first-child {
    border-radius: 5px 0 0 5px;
}

.btn-group .btn:last-child {
    border-radius: 0 5px 5px 0;
    border-right: none;
}

.btn-outline-primary {
    background: transparent;
    border: 1px solid #3498db;
    color: #3498db;
}

.btn-outline-warning {
    background: transparent;
    border: 1px solid #f39c12;
    color: #f39c12;
}

.btn-outline-success {
    background: transparent;
    border: 1px solid #27ae60;
    color: #27ae60;
}

.btn-outline-danger {
    background: transparent;
    border: 1px solid #e74c3c;
    color: #e74c3c;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Utilities */
.mb-3 { margin-bottom: 20px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: #7f8c8d; }
