:root {
    --primary-color: #4a90e2;
    --primary-dark: #357abd;
    --light-bg: #f8f9fa;
    --light-surface: #ffffff;
    --light-surface-hover: #f0f2f5;
    --text-primary: #525151;
    --text-secondary: #6c757d;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --border-color: #dee2e6;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: var(--light-bg);
    color: var(--text-primary);
}

.admin-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--light-bg) 0%, var(--light-surface) 100%);
}

.admin-login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.admin-login-box {
    background: var(--light-surface);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.admin-login-logo {
    text-align: center;
    margin-bottom: 20px;
}

.admin-login-logo img {
    max-width: 150px;
    height: auto;
}

.admin-login-box h2 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 30px;
    font-weight: 600;
}

.admin-login-form .form-group {
    margin-bottom: 20px;
}

.admin-login-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

.admin-login-form label i {
    margin-right: 8px;
}

.admin-login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--light-surface);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.admin-login-form input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.admin-login-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.admin-login-btn i {
    margin-right: 8px;
}

.admin-login-btn:hover {
    background: var(--primary-dark);
}

.login-message {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
}

.login-message.error {
    color: var(--danger-color);
}

.login-message.success {
    color: var(--success-color);
}

/* Admin Dashboard Styles */
.admin-dashboard {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: var(--light-surface);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: width 0.3s ease;
}

.admin-logo {
    padding: 0 20px;
    margin-bottom: 30px;
}

.admin-logo img {
    max-width: 100%;
    height: auto;
}

.admin-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.admin-nav > li > a { /* Direct top-level links */
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.admin-nav > li > a i {
    width: 20px;
    margin-right: 10px;
    font-size: 1.1em;
}

.admin-nav > li.active > a,
.admin-nav > li > a:hover {
    background: var(--light-surface-hover);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

/* Collapsible Navigation Groups */
.nav-group {
    margin: 5px 0;
}

.group-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-weight: 500;
    cursor: pointer;
}

.group-header i:first-child {
    width: 20px;
    margin-right: 10px;
    font-size: 1.1em;
}

.group-header:hover {
    background: var(--light-surface-hover);
    color: var(--primary-color);
}

.toggle-icon {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.nav-group.active .toggle-icon {
    transform: rotate(180deg);
}

.sub-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.nav-group.active .sub-menu {
    max-height: 600px; /* Adjust based on content */
}

.sub-menu li a {
    display: flex;
    align-items: center;
    padding: 10px 20px 10px 40px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95em;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.sub-menu li a i {
    width: 20px;
    margin-right: 10px;
    font-size: 1em;
}

.sub-menu li.active a,
.sub-menu li a:hover {
    background: var(--light-surface-hover);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.admin-logout {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.admin-logout a {
    display: flex;
    align-items: center;
    color: var(--danger-color);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.admin-logout a:hover {
    opacity: 0.8;
}

.admin-logout a i {
    margin-right: 10px;
}

.admin-main {
    flex-grow: 1;
    margin-left: 250px;
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: var(--light-surface);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.admin-header h1.dashboard-title {
    margin: 0;
    font-size: 32px;
    color: var(--primary-color);
    font-weight: 600;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-user-name {
    font-weight: 500;
    color: var(--text-primary);
}

.admin-user i {
    font-size: 1.5em;
    color: var(--text-secondary);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--light-surface);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: var(--light-surface-hover);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.stat-icon i {
    font-size: 1.5em;
    color: var(--primary-color);
}

.stat-info h3 {
    margin: 0;
    font-size: 24px;
    color: var(--text-primary);
}

.stat-info p {
    margin: 5px 0 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.dashboard-content {
    background: var(--dark-surface);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Feedback Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.data-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.data-table tr:hover {
    background-color: #f9f9f9;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-new {
    background-color: #e3f2fd;
    color: #1565c0;
}

.status-read {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-responded {
    background-color: #fff8e1;
    color: #f57f17;
}

.status-closed {
    background-color: #eeeeee;
    color: #616161;
}

.view-btn {
    background-color: transparent;
    border: none;
    color: #2196f3;
    cursor: pointer;
    font-size: 16px;
}

.view-btn:hover {
    color: #0d47a1;
}

/* Feedback Modal Styles */
.feedback-details {
    padding: 20px;
}

.feedback-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.feedback-info p {
    margin: 0;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.feedback-message {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.feedback-message h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
}

.message-content {
    white-space: pre-wrap;
    line-height: 1.5;
}

.feedback-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

#updateStatus {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #2196f3;
    color: white;
}

.btn-primary:hover {
    background-color: #1976d2;
}

.btn-secondary {
    background-color: #4caf50;
    color: white;
}

.btn-secondary:hover {
    background-color: #388e3c;
}

.btn-danger {
    background-color: #f44336;
    color: white;
}

.btn-danger:hover {
    background-color: #d32f2f;
}

.error,
.no-data {
    text-align: center;
    padding: 20px;
    color: #757575;
}

.error {
    color: #d32f2f;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.cancel-btn {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.cancel-btn:hover {
    background: var(--dark-surface-hover);
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 60px;
        overflow: hidden;
    }

    .admin-logo,
    .admin-nav li a span,
    .admin-logout a span,
    .group-header span,
    .toggle-icon {
        display: none;
    }

    .admin-nav > li > a,
    .group-header {
        padding: 12px 20px;
        justify-content: center;
    }

    .admin-nav > li > a i,
    .group-header i:first-child {
        margin-right: 0;
    }

    .sub-menu {
        display: none; /* Hide sub-menus in collapsed state */
    }

    .admin-main {
        margin-left: 60px;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
}

/* Reply Section Styles */
.reply-history {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.reply-list {
    max-height: 200px;
    overflow-y: auto;
}

.reply-item {
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: #666;
}

.reply-content {
    white-space: pre-wrap;
    line-height: 1.5;
}

.reply-form {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.reply-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
    margin-bottom: 10px;
}

.reply-form-actions {
    display: flex;
    justify-content: flex-end;
}

/* Testimonials Page Styles */
.testimonials-filters {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.search-container {
    display: flex;
    width: 100%;
}

.search-container input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.search-container button {
    padding: 0.8rem 1.2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.filter-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-container select {
    flex: 1;
    min-width: 200px;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.testimonial-card {
    background-color: var(--light-surface);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.testimonial-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.testimonial-student {
    display: flex;
    align-items: center;
    gap: 12px;
}

.student-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
    border: 2px solid var(--primary-color);
}

.student-info h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: var(--text-primary);
}

.student-info p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.testimonial-meta {
    text-align: right;
}

.testimonial-rating {
    color: #ffc107;
    font-size: 14px;
    margin-bottom: 5px;
}

.testimonial-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.testimonial-body {
    padding: 15px;
    min-height: 80px;
}

.testimonial-body p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.5;
}

.testimonial-footer {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.02);
}

.testimonial-location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 14px;
}

.testimonial-actions {
    display: flex;
    gap: 8px;
}

.testimonial-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.testimonial-actions button i {
    font-size: 14px;
}

.status-toggle,
.featured-toggle {
    padding: 5px 8px;
}

.status-toggle.approved {
    color: var(--success-color);
    background-color: rgba(40, 167, 69, 0.1);
}

.status-toggle.pending {
    color: #ffc107;
    background-color: rgba(255, 193, 7, 0.1);
}

.featured-toggle {
    color: #6c757d;
    background-color: rgba(108, 117, 125, 0.1);
}

.featured-toggle.featured {
    color: #ff9800;
    background-color: rgba(255, 152, 0, 0.1);
}

.edit-btn {
    color: var(--primary-color);
}

.delete-btn {
    color: var(--danger-color);
}

.edit-btn:hover,
.delete-btn:hover,
.status-toggle:hover,
.featured-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 10px;
}

.pagination button {
    background: var(--light-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button:not(:disabled):hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.page-number {
    min-width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-number.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* Modal for Adding/Editing Testimonials */
.photo-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
    margin: 10px 0;
    border: 2px solid var(--border-color);
}

.loading-indicator {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
}

.loading-indicator i {
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-data,
.error {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
    background-color: var(--light-surface);
    border-radius: 10px;
    margin: 20px 0;
}

.error {
    color: var(--danger-color);
}

/* Notification Styles */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
    max-width: 400px;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.notification.success {
    border-left: 4px solid var(--success-color);
}

.notification.error {
    border-left: 4px solid var(--danger-color);
}

.notification.info {
    border-left: 4px solid var(--primary-color);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-content i {
    font-size: 20px;
}

.notification.success i {
    color: var(--success-color);
}

.notification.error i {
    color: var(--danger-color);
}

.notification.info i {
    color: var(--primary-color);
}

.close-notification {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
}

.notification.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}