/* ================= ADMIN DASHBOARD STYLES ================= */

:root {
    --sidebar-width: 260px;
    --header-height: 70px;
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --success-color: #4cc9f0;
    --warning-color: #f8961e;
    --danger-color: #f94144;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fa;
    --border-radius: 10px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Admin Layout */
.admin-dashboard {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fb;
    margin: 0;
    padding: 0;
}

.admin-container {
    display: flex;
    min-height: calc(100vh - var(--header-height));
}

/* Admin Header */
.admin-header {
    background: white;
    height: var(--header-height);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 30px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--dark-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background-color: #f5f7fb;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.admin-logo i {
    font-size: 1.5rem;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: 1px solid #e0e0e0;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-menu-btn:hover {
    background-color: #f5f7fb;
    border-color: var(--primary-color);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.user-name {
    font-weight: 500;
    color: var(--dark-color);
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 280px;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    margin-top: 10px;
    z-index: 1001;
}

.user-dropdown-menu.show {
    display: block;
}

.user-info {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.user-info h4 {
    margin: 0 0 5px 0;
    color: var(--dark-color);
}

.user-info p {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 0.9rem;
}

.role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.admin {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.role-badge.editor {
    background: linear-gradient(135deg, var(--success-color), #38b000);
    color: white;
}

.role-badge.viewer {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

.dropdown-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 5px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: #f5f7fb;
    padding-left: 25px;
}

.dropdown-item.logout {
    color: var(--danger-color);
}

/* Sidebar */
.admin-sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--dark-color) 0%, #16213e 100%);
    color: white;
    transition: all 0.3s ease;
    position: fixed;
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
}

.admin-sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.school-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-circle {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.school-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.school-info p {
    font-size: 0.8rem;
    opacity: 0.7;
    margin: 0;
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: 20px 0;
}

.nav-section {
    margin-bottom: 25px;
}

.section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.5;
    padding: 0 20px 10px;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
    padding-left: 25px;
}

.nav-link.active {
    background-color: rgba(67, 97, 238, 0.2);
    color: white;
    border-left: 4px solid var(--primary-color);
}

.nav-link i {
    width: 24px;
    margin-right: 15px;
    font-size: 1.1rem;
}

.nav-badge {
    margin-left: auto;
    background-color: var(--danger-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.view-site-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.view-site-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: all 0.3s ease;
    padding: 30px;
}

.admin-main.expanded {
    margin-left: 0;
}

.container-fluid {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
}

.welcome-banner h1 {
    margin: 0 0 10px 0;
    color: white;
}

.welcome-banner p {
    margin: 0;
    opacity: 0.9;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.stat-icon.announcements {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
}

.stat-icon.students {
    background-color: rgba(76, 201, 240, 0.1);
    color: var(--success-color);
}

.stat-icon.events {
    background-color: rgba(248, 150, 30, 0.1);
    color: var(--warning-color);
}

.stat-icon.drafts {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.stat-info h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.stat-info p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.stat-action {
    margin-left: auto;
}

.stat-action a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.stat-action a:hover {
    text-decoration: underline;
}

/* Quick Actions */
.section {
    margin-bottom: 30px;
}

.section-header {
    margin-bottom: 20px;
}

.section-title {
    color: var(--dark-color);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.action-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    text-align: center;
    border: 2px solid transparent;
}

.action-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.action-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin: 0 auto 15px;
}

.action-card h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.action-card p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

/* Cards & Grid System */
.row {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.col-8 {
    flex: 2;
}

.col-4 {
    flex: 1;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
}

.card-header h3 {
    margin: 0;
    color: var(--dark-color);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 25px;
}

/* Activity List */
.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.activity-icon.primary {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
}

.activity-icon.success {
    background-color: rgba(76, 201, 240, 0.1);
    color: var(--success-color);
}

.activity-content {
    flex: 1;
}

.activity-content p {
    margin-bottom: 5px;
    color: #555;
}

.activity-time {
    font-size: 0.8rem;
    color: #888;
}

/* Announcements List */
.announcements-list {
    max-height: 300px;
    overflow-y: auto;
}

.announcement-item {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.announcement-item:last-child {
    border-bottom: none;
}

.announcement-item h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1rem;
}

.announcement-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: #888;
}

.announcement-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.announcement-item p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* No Data States */
.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.no-data i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ddd;
}

.no-data p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 992px) {
    .admin-sidebar {
        transform: translateX(-100%);
        width: 280px;
        z-index: 1000;
    }
    
    .admin-sidebar.collapsed {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0 !important;
        padding: 20px;
    }
    
    .row {
        flex-direction: column;
    }
    
    .col-8, .col-4 {
        flex: none;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .admin-header .container {
        padding: 0 15px;
    }
    
    .user-name {
        display: none;
    }
}

@media (max-width: 576px) {
    .admin-main {
        padding: 15px;
    }
    
    .welcome-banner {
        padding: 20px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .stat-action {
        margin-left: 0;
    }
}

/* Custom Scrollbar */
.admin-sidebar::-webkit-scrollbar,
.activity-list::-webkit-scrollbar,
.announcements-list::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar::-webkit-scrollbar-track,
.activity-list::-webkit-scrollbar-track,
.announcements-list::-webkit-scrollbar-track {
    background: transparent;
}

.admin-sidebar::-webkit-scrollbar-thumb,
.activity-list::-webkit-scrollbar-thumb,
.announcements-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover,
.activity-list::-webkit-scrollbar-thumb:hover,
.announcements-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
/* Gallery specific styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.gallery-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Donation specific styles */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success { background: #28a745; color: white; }
.badge-warning { background: #ffc107; color: black; }
.badge-error { background: #dc3545; color: white; }
.badge-secondary { background: #6c757d; color: white; }
.badge-info { background: #17a2b8; color: white; }

/* Bulk actions */
.bulk-actions-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* File upload */
.file-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
}

.file-upload-area:hover {
    border-color: #4e73df;
}

.file-list {
    margin-top: 20px;
    max-height: 200px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    margin-bottom: 5px;
    border-radius: 4px;
}

.file-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #ddd;
    text-align: right;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

/* Table responsive */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.data-table tr:hover {
    background: #f8f9fa;
}
/* Alert Styles */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.page-header h1 {
    margin: 0;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Filter Form */
.filter-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-form .form-group {
    margin-bottom: 0;
}

/* No Data State */
.no-data {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-data i {
    color: #ddd;
    margin-bottom: 20px;
}

.no-data h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.no-data p {
    margin: 0 0 20px 0;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 20px;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #219955;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.btn-outline {
    background: white;
    color: #3498db;
    border: 1px solid #3498db;
}

.btn-outline:hover {
    background: #3498db;
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .filter-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 10px;
    }
}

@media (max-width: 576px) {
    .event-actions {
        flex-wrap: wrap;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}