:root {
    --primary-blue: #1e3a8a;
    --secondary-blue: #3b82f6;
    --cyan: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --gray: #64748b;
    --light-gray: #f1f5f9;
    --white: #ffffff;
    --sidebar-width: 260px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-gray);
    color: var(--dark);
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-blue), var(--cyan));
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 230px;
    height: 80px;
    margin-bottom: 20px;
}

.login-header h2 {
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 5px;
}

.login-header p {
    color: var(--gray);
}

.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: #fee2e2;
    color: var(--danger);
    border: 1px solid var(--danger);
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--secondary-blue);
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-blue), var(--cyan));
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.3);
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray);
}

/* Admin Wrapper */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    color: var(--white);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    transition: transform 0.3s;
    z-index: 1000;
}

.sidebar-header {
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header img {
    width: 200px;
    height: 60px;
    margin-bottom: 10px;
}

.sidebar-header h3 {
    font-size: 1.2rem;
    color: var(--white);
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.nav-item.active {
    background: rgba(59, 130, 246, 0.2);
    color: var(--white);
    border-left-color: var(--cyan);
}

.nav-item i {
    font-size: 1.2rem;
    width: 20px;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-item.logout {
    color: var(--danger);
}

.nav-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    background: var(--light-gray);
}

/* Topbar */
.topbar {
    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: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
}

.topbar h1 {
    font-size: 1.5rem;
    color: var(--dark);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-info {
    text-align: right;
}

.admin-name {
    display: block;
    font-weight: 600;
    color: var(--dark);
}

.admin-role {
    display: block;
    font-size: 0.85rem;
    color: var(--gray);
}

.btn-view-site {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-blue), var(--cyan));
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-view-site:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 58, 138, 0.3);
}

/* Page Content */
.page-content {
    padding: 30px;
}

/* Statistics Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--white);
}

.stat-info h3 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--gray);
    font-size: 0.95rem;
}

.stat-link {
    color: var(--secondary-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.stat-link:hover {
    color: var(--primary-blue);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* Dashboard Cards */
.dashboard-card {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 1.2rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-link {
    color: var(--secondary-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.card-link:hover {
    text-decoration: underline;
}

.card-body {
    padding: 20px 25px;
}

.no-data {
    text-align: center;
    color: var(--gray);
    padding: 40px 20px;
}

/* Review List */
.review-list, .contact-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.review-item, .contact-item {
    padding: 15px;
    background: var(--light-gray);
    border-radius: 10px;
    border-left: 4px solid var(--secondary-blue);
}

.review-header, .contact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-pending {
    background: #fef3c7;
    color: var(--warning);
}

.badge-approved {
    background: #d1fae5;
    color: var(--success);
}

.badge-rejected {
    background: #fee2e2;
    color: var(--danger);
}

.badge-new {
    background: #dbeafe;
    color: var(--secondary-blue);
}

.badge-read {
    background: #e5e7eb;
    color: var(--gray);
}

.review-rating {
    margin: 8px 0;
}

.review-rating i {
    color: #d1d5db;
    font-size: 0.9rem;
}

.review-rating i.active {
    color: #fbbf24;
}

.review-text, .contact-message {
    color: var(--gray);
    font-size: 0.9rem;
    margin: 8px 0;
}

.review-time, .contact-time {
    font-size: 0.85rem;
    color: var(--gray);
}

.contact-email {
    color: var(--secondary-blue);
    font-size: 0.9rem;
    margin: 5px 0;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--light-gray);
    border-radius: 10px;
}

.activity-icon {
    color: var(--secondary-blue);
    font-size: 0.7rem;
    margin-top: 5px;
}

.activity-info {
    flex: 1;
}

.activity-info strong {
    color: var(--dark);
    margin-right: 5px;
}

.activity-info span {
    color: var(--gray);
    font-size: 0.9rem;
}

.activity-info p {
    color: var(--gray);
    font-size: 0.85rem;
    margin-top: 5px;
}

.activity-time {
    font-size: 0.85rem;
    color: var(--gray);
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .page-content {
        padding: 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        padding: 15px;
    }

    .topbar h1 {
        font-size: 1.2rem;
    }

    .admin-info {
        display: none;
    }
}


.unread-row {
    background: #eff6ff;
    font-weight: 600;
}

.btn-view-message {
    padding: 8px 15px;
    background: var(--secondary-blue);
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-view-message:hover {
    background: var(--primary-blue);
}

.btn-reply {
    background: var(--secondary-blue);
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background: var(--white);
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray);
}

.modal-close:hover {
    color: var(--danger);
}

.modal-content h2 {
    margin-bottom: 25px;
    color: var(--dark);
}

.message-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 15px;
}

.detail-row.full-width {
    grid-template-columns: 1fr;
}

.detail-row strong {
    color: var(--dark);
}

.detail-row span, .detail-row p {
    color: var(--gray);
}

.detail-row p {
    background: var(--light-gray);
    padding: 15px;
    border-radius: 8px;
    line-height: 1.6;
}

.modal-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.btn-primary {
    padding: 12px 25px;
    background: linear-gradient(135deg, var(--primary-blue), var(--cyan));
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 58, 138, 0.3);
}


.gallery-form {
    max-width: 800px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-blue);
}

.gallery-grid-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.gallery-item-admin {
    background: var(--light-gray);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    transition: all 0.3s;
}

.gallery-item-admin:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.gallery-image-admin {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.gallery-image-admin img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge-status {
    position: absolute;
    top: 10px;
    right: 10px;
}

.badge-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--secondary-blue);
    color: var(--white);
}

.badge-active {
    background: var(--success);
    color: var(--white);
}

.badge-inactive {
    background: var(--gray);
    color: var(--white);
}

.gallery-info-admin {
    padding: 20px;
}

.gallery-info-admin h4 {
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 8px;
}

.gallery-info-admin p {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.gallery-actions {
    display: flex;
    gap: 10px;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid-admin {
        grid-template-columns: 1fr;
    }
}


.staff-form {
    max-width: 900px;
}

.staff-thumb {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}


.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.settings-form {
    max-width: 500px;
}

.settings-form small {
    display: block;
    margin-top: 5px;
    color: var(--gray);
    font-size: 0.85rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 10px;
}

.info-item i {
    font-size: 2rem;
    color: var(--secondary-blue);
}

.info-item strong {
    display: block;
    color: var(--dark);
    margin-bottom: 5px;
}

.info-item p {
    color: var(--gray);
    font-size: 0.9rem;
}

@media (max-width: 968px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}


/* Action Buttons Styling */
.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
}

.btn-action {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--white);
    transition: all 0.3s;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    min-width: 36px;
    height: 36px;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-approve {
    background: var(--success);
}

.btn-approve:hover {
    background: #059669;
}

.btn-reject {
    background: var(--warning);
}

.btn-reject:hover {
    background: #d97706;
}

.btn-delete {
    background: var(--danger);
}

.btn-delete:hover {
    background: #dc2626;
}

.btn-reply {
    background: var(--secondary-blue);
}

.btn-reply:hover {
    background: var(--primary-blue);
}

/* View Message Button */
.btn-view-message {
    padding: 10px 18px;
    background: var(--secondary-blue);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-view-message:hover {
    background: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 58, 138, 0.3);
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--white);
    margin: 5% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease-out;
}

.modal-close {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--gray);
    transition: all 0.3s;
}

.modal-close:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

.modal-content h2 {
    margin-bottom: 30px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.message-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-row {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 15px;
    align-items: start;
}

.detail-row.full-width {
    grid-template-columns: 1fr;
}

.detail-row strong {
    color: var(--dark);
    font-weight: 600;
}

.detail-row span {
    color: var(--gray);
}

.detail-row p {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 10px;
    line-height: 1.8;
    color: var(--dark);
    margin: 0;
}

.modal-actions {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.btn-primary {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary-blue), var(--cyan));
    color: var(--white);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.3);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    padding: 5px;
}

.filter-tab {
    padding: 12px 24px;
    background: var(--white);
    color: var(--dark);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid #e2e8f0;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.filter-tab:hover {
    background: var(--light-gray);
    border-color: var(--secondary-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.filter-tab.active {
    background: linear-gradient(135deg, var(--primary-blue), var(--cyan));
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

/* Filter with badge counts (optional enhancement) */
.filter-tab .badge-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

.filter-tab.active .badge-count {
    background: rgba(255, 255, 255, 0.3);
}



.btn-edit {
    background: var(--secondary-blue);
}

.btn-edit:hover {
    background: var(--primary-blue);
}

.btn-secondary {
    padding: 14px 28px;
    background: var(--gray);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: var(--gray);
    font-size: 0.85rem;
    font-style: italic;
}



.faq-form {
    max-width: 900px;
}

.question-cell {
    max-width: 300px;
    font-weight: 600;
    color: var(--dark);
}

.answer-cell {
    max-width: 250px;
    color: var(--gray);
}

.category-separator {
    background: var(--light-gray);
    font-weight: 700;
}

.category-separator td {
    padding: 12px 15px;
    color: var(--primary-blue);
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: var(--gray);
    font-size: 0.85rem;
}



/* Staff Table - Photo Column Fix */
.data-table td:first-child {
    width: 80px;
    text-align: center;
}

.staff-thumb {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

/* Prevent column overflow */
.data-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    white-space: nowrap;
}

.data-table td.message-cell {
    white-space: normal;
    max-width: 200px;
}

/* Make table scrollable on smaller screens */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px; /* Prevents cramping */
}

/* Column widths for staff table */
.data-table th:nth-child(1) { width: 80px; }   /* Photo */
.data-table th:nth-child(2) { width: 180px; }  /* Name */
.data-table th:nth-child(3) { width: 200px; }  /* Position */
.data-table th:nth-child(4) { width: 120px; }  /* Category */
.data-table th:nth-child(5) { width: 180px; }  /* Specialization */
.data-table th:nth-child(6) { width: 100px; }  /* Experience */
.data-table th:nth-child(7) { width: 100px; }  /* Status */
.data-table th:nth-child(8) { width: 120px; }  /* Actions */