* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


:root {
    --primary: #F5A623;
    --primary-dark: #E0950F;
    --secondary: #2C3E50;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --gray: #6c757d;
    --white: #ffffff;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --sidebar-width: 280px;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);  /* ← ADD THIS */
    --primary-light: #FFD54F;  /* ← ADD THIS */
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--light);
    overflow: hidden;
}
/* ========== PROFILE SECTION IN SIDEBAR ========== */
/* Light theme styles */
[data-theme="light"] .admin-sidebar {
    background: var(--admin-sidebar-bg);
}

[data-theme="light"] .stat-card,
[data-theme="light"] .recent-activity,
[data-theme="light"] .items-table,
[data-theme="light"] .settings-card {
    background: #ffffff !important;
}

[data-theme="light"] body,
[data-theme="light"] .admin-main {
    background: #f0f2f5 !important;
}

[data-theme="light"] .admin-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e0e0e0 !important;
}




/* Make sidebar nav scrollable */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) rgba(255,255,255,0.1);
}

/* Custom scrollbar for sidebar nav */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Ensure sidebar footer stays at bottom */
.admin-sidebar {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.sidebar-footer {
    margin-top: auto;
    flex-shrink: 0;
}
.sidebar-profile {
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 10px;
}

.profile-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    cursor: pointer;
}

.profile-avatar .upload-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 26px;
    height: 26px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 12px;
    transition: all 0.3s;
}

.profile-avatar .upload-overlay:hover {
    transform: scale(1.1);
}

.profile-name {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.profile-role {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
}

/* ========== COLOR SETTINGS PANEL ========== */

/* Color Settings Styles */
.color-settings {
    background: var(--light);
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.color-settings h4 {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
}

.color-picker-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.color-picker-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray);
}

.color-picker-group input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    background: white;
    padding: 2px;
}

.color-preview-box {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.color-preview-box h4 {
    font-size: 14px;
    margin-bottom: 10px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}


/* ========== THEME VARIABLES ========== */
:root {
    --admin-sidebar-bg: #1a1a2e;
    --admin-sidebar-hover: rgba(245,166,35,0.2);
    --admin-accent: #F5A623;
}

[data-theme="light"] {
    --admin-sidebar-bg: #2c3e50;
    --admin-sidebar-hover: rgba(245,166,35,0.15);
}

.admin-sidebar {
    background: var(--admin-sidebar-bg);
}

.nav-item:hover,
.nav-item.active {
    background: var(--admin-sidebar-hover);
    color: var(--admin-accent);
    border-left-color: var(--admin-accent);
}

.btn-primary {
    background: var(--admin-accent);
}

.btn-primary:hover {
    background: var(--admin-accent);
    filter: brightness(0.9);
}

/* ========== MOMENT THUMBNAIL PREVIEW ========== */
#momentThumbnailPreview {
    margin-top: 10px;
}

#momentThumbnailPreview img {
    max-width: 150px;
    border-radius: 8px;
    border: 2px solid var(--primary);
    padding: 3px;
}

/* ========== RESPONSIVE FIXES ========== */
@media (max-width: 768px) {
    .sidebar-profile {
        padding: 15px;
    }
    
    .profile-avatar {
        width: 50px;
        height: 50px;
    }
    
    .profile-name,
    .profile-role {
        display: none;
    }
    
    .color-picker-group {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .color-picker-group select {
        width: 100%;
    }
}
.admin-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header .logo-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 24px;
}

.sidebar-header h3 {
    margin-bottom: 5px;
}

.sidebar-header span {
    font-size: 12px;
    opacity: 0.7;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(245,166,35,0.2);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

.nav-item i {
    width: 20px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.view-site {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s;
    margin-bottom: 10px;
}

.view-site:hover {
    background: rgba(255,255,255,0.1);
}

.logout-btn {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: var(--danger);
    border-color: var(--danger);
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
}

.admin-header {
    background: var(--white);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--light);
    padding: 8px 15px;
    border-radius: 25px;
}

.header-search i {
    color: var(--gray);
}

.header-search input {
    border: none;
    background: transparent;
    outline: none;
    width: 200px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-weight: 500;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Admin Content */
.admin-content {
    padding: 30px;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.stat-card {
    background: var(--white);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(245,166,35,0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--primary);
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
}

.stat-info p {
    color: var(--gray);
    font-size: 14px;
}

/* Recent Activity */
.recent-activity {
    background: var(--white);
    border-radius: 15px;
    padding: 20px;
}

.recent-activity h3 {
    margin-bottom: 20px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.activity-item i {
    width: 30px;
    color: var(--primary);
}

.activity-item span {
    flex: 1;
}

.activity-item small {
    color: var(--gray);
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 24px;
}

.btn-primary {
    background: var(--admin-accent, #F5A623);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: transform 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-edit {
    background: var(--warning);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 5px;
}

/* Table */
.items-table {
    background: var(--white);
    border-radius: 15px;
    overflow-x: auto;
}

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

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background: var(--light);
    font-weight: 600;
}

tr:hover {
    background: rgba(0,0,0,0.02);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
}

.modal-content h2 {
    padding: 20px 20px 0;
}

.form-group {
    padding: 15px 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.modal-content .btn-primary {
    margin: 0 20px 20px;
    width: calc(100% - 40px);
}

/* Responsive */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 70px;
    }
    
    .sidebar-header h3,
    .sidebar-header span,
    .nav-item span,
    .sidebar-footer span {
        display: none;
    }
    
    .nav-item {
        justify-content: center;
    }
    
    .nav-item i {
        font-size: 20px;
    }
    
    .admin-main {
        margin-left: 70px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
/* Queries Section Styles */
.queries-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-badge {
    background: var(--light);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.stat-badge.pending-count {
    background: #fff3cd;
    color: #856404;
}

.stat-badge.total-count {
    background: #d4edda;
    color: #155724;
}

.stat-badge.auto-delete {
    background: #e2e3e5;
    color: #383d41;
}

.query-filters {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.queries-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.query-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
    border-left: 4px solid var(--primary);
}

.query-card.unread {
    border-left-color: #e74c3c;
    background: #fffaf5;
}

.query-card.replied {
    border-left-color: #27ae60;
}

.query-card.archived {
    opacity: 0.7;
    border-left-color: #95a5a6;
}

.query-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.query-user-info h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
}

.query-user-info .query-email {
    color: var(--gray);
    font-size: 14px;
}

.query-date {
    font-size: 12px;
    color: var(--gray);
}

.query-message {
    background: var(--light);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.query-actions {
    display: flex;
    gap: 10px;
}

.btn-reply {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-delete-query {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-mark-read {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.reply-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.reply-section textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    font-family: inherit;
    resize: vertical;
}

.reply-section .btn-send-reply {
    background: #27ae60;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
}

.admin-reply {
    background: #e8f5e9;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 14px;
}

.admin-reply strong {
    color: #27ae60;
}

.admin-reply small {
    display: block;
    margin-top: 5px;
    color: var(--gray);
    font-size: 11px;
}

.badge {
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
    margin-left: 5px;
}

/* Modal for reply */
.reply-modal .modal-content {
    max-width: 500px;
}

.reply-modal textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    margin: 15px 0;
}

/* Auto-delete info */
.auto-delete-info {
    font-size: 11px;
    color: #7f8c8d;
    margin-top: 5px;
}
/* Image preview styles */
#imagePreview {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

#multipleImagesPreview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

#multipleImagesPreview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #ddd;
    transition: transform 0.2s;
}

#multipleImagesPreview img:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-group small {
    font-size: 12px;
    color: #888;
}

.form-group input[type="file"] {
    padding: 10px 0;
}
/* Settings Card */
.settings-card {
    background: var(--white);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.settings-card h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.settings-card .form-group {
    margin-bottom: 20px;
}

.settings-card label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.settings-card input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
}

.settings-card input:focus {
    outline: none;
    border-color: var(--primary);
}
/* Make color changes visible */
.btn-primary, .donate-btn, .submit-btn {
    transition: all 0.3s ease;
}

/* Animation for theme changes */
@keyframes themeFlash {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

body.theme-changing {
    animation: themeFlash 0.3s ease;
}