/* Custom Admin Interface Styles */

:root {
    --sidebar-bg: #1a1a1a;
    --sidebar-hover: #2a2a2a;
    --primary-color: #26a69a;
    --primary-hover: #2bbbad;
    --danger-color: #ef5350;
    --warning-color: #ffa726;
    --success-color: #66bb6a;
    --info-color: #42a5f5;
    --card-bg: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --body-bg: #f5f5f5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-dark);
}

/* Sidebar */
.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background-color: var(--sidebar-bg);
    color: white;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s ease;
}

.admin-sidebar .logo {
    padding: 20px;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: bold;
}

.admin-sidebar .logo i {
    font-size: 1.5rem;
}

.admin-sidebar nav {
    padding: 20px 0;
}

.admin-sidebar .nav-item {
    display: block;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 3px solid transparent;
}

.admin-sidebar .nav-item:hover,
.admin-sidebar .nav-item.active {
    background-color: var(--sidebar-hover);
    color: white;
    border-left-color: var(--primary-color);
}

.admin-sidebar .nav-item i {
    width: 20px;
    text-align: center;
}

/* Main Content */
.admin-content {
    margin-left: 250px;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* Top Bar */
.admin-topbar {
    background-color: white;
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-topbar h1 {
    font-size: 1.5rem;
    color: var(--text-dark);
    font-weight: 600;
}

.admin-topbar .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-topbar .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* Content Area */
.content-area {
    padding: 30px;
}

/* Statistics Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-card .icon {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.stat-card .icon.green {
    background-color: #66bb6a;
}

.stat-card .icon.red {
    background-color: #ef5350;
}

.stat-card .icon.blue {
    background-color: #42a5f5;
}

.stat-card .icon.yellow {
    background-color: #ffa726;
}

.stat-card .icon.teal {
    background-color: #26a69a;
}

.stat-card .details h3 {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-card .details p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background-color: #f9f9f9;
}

table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
}

table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

table tbody tr:hover {
    background-color: #f9f9f9;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #5cb85c;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #e53935;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Badges */
.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.badge-warning {
    background-color: #fff3e0;
    color: #e65100;
}

.badge-danger {
    background-color: #ffebee;
    color: #c62828;
}

.badge-info {
    background-color: #e3f2fd;
    color: #1565c0;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.95rem;
    background-color: white;
    cursor: pointer;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.alert-danger {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.alert-warning {
    background-color: #fff3e0;
    color: #e65100;
    border-left: 4px solid #ff9800;
}

.alert-info {
    background-color: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid #2196f3;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-content {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-topbar {
        padding: 15px;
    }

    .content-area {
        padding: 15px;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-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);
    }
}