/* ADMIN PANEL STYLES */

:root {
    --admin-primary: #FF6B35;
    --admin-secondary: #004E89;
    --admin-sidebar-bg: #1F2937;
    --admin-sidebar-hover: #374151;
    --admin-bg: #F9FAFB;
    --admin-card-bg: #FFFFFF;
    --admin-border: #E5E7EB;
    --admin-text: #111827;
    --admin-text-light: #6B7280;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--admin-bg);
    color: var(--admin-text);
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 280px;
    background: var(--admin-sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-logo {
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-logo i {
    font-size: 2rem;
    color: var(--admin-primary);
}

.admin-nav {
    flex: 1;
    padding: 1.5rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.nav-item:hover {
    background: var(--admin-sidebar-hover);
    color: white;
}

.nav-item.active {
    background: var(--admin-sidebar-hover);
    color: white;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--admin-primary);
}

.nav-item i {
    font-size: 1.25rem;
    width: 24px;
}

.nav-item .badge {
    margin-left: auto;
    background: var(--admin-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.admin-user {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 48px;
    height: 48px;
    background: var(--admin-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.user-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.logout-btn {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}

.logout-btn:hover {
    color: white;
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-header h1 {
    font-size: 2rem;
    font-weight: 800;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-icon {
    width: 48px;
    height: 48px;
    background: white;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.btn-icon:hover {
    background: var(--admin-bg);
}

.notification-dot {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 8px;
    height: 8px;
    background: #EF4444;
    border-radius: 50%;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

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

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--admin-border);
    color: var(--admin-text);
}

.btn-outline:hover {
    border-color: var(--admin-primary);
    color: var(--admin-primary);
}

/* Sections */
.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #3B82F6, #1D4ED8);
}

.stat-icon.green {
    background: linear-gradient(135deg, #10B981, #059669);
}

.stat-icon.orange {
    background: linear-gradient(135deg, #FF6B35, #E85A2A);
}

.stat-icon.purple {
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--admin-text);
}

.stat-label {
    color: var(--admin-text-light);
    font-size: 0.875rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.dashboard-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dashboard-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--admin-text);
}

/* Table */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.data-table th {
    text-align: left;
    padding: 1rem;
    background: var(--admin-bg);
    color: var(--admin-text-light);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--admin-border);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.success {
    background: #D1FAE5;
    color: #059669;
}

.status-badge.pending {
    background: #FEF3C7;
    color: #D97706;
}

.status-badge.cancelled {
    background: #FEE2E2;
    color: #DC2626;
}

/* Popular Tours */
.popular-tours-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.popular-tour-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tour-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tour-name {
    font-weight: 600;
    color: var(--admin-text);
}

.tour-bookings {
    font-size: 0.875rem;
    color: var(--admin-text-light);
}

.tour-progress {
    height: 8px;
    background: var(--admin-bg);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--admin-primary), #E85A2A);
    border-radius: 4px;
}

/* Tours Table */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.tours-table-wrapper {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.btn-text {
    background: none;
    border: none;
    color: var(--admin-primary);
    cursor: pointer;
    font-weight: 600;
    padding: 0.5rem;
    transition: opacity 0.3s;
}

.btn-text:hover {
    opacity: 0.7;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 8px;
}

/* Messages */
.messages-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message-item {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid transparent;
}

.message-item.unread {
    border-left-color: var(--admin-primary);
    background: #FFF7ED;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.message-sender {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.message-sender i {
    font-size: 1.5rem;
    color: var(--admin-text-light);
}

.message-date {
    color: var(--admin-text-light);
    font-size: 0.875rem;
}

.message-subject {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.message-preview {
    color: var(--admin-text-light);
    margin-bottom: 1rem;
}

.message-actions {
    display: flex;
    gap: 1rem;
}

/* Settings */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.settings-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.settings-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--admin-text);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 2px solid var(--admin-border);
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.3s;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--admin-border);
}

.modal-header h2 {
    font-size: 1.5rem;
}

.modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--admin-bg);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.modal-close:hover {
    background: var(--admin-border);
}

.modal-form {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 968px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        z-index: 1000;
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .mobile-toggle {
        display: flex !important;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .header-search {
        display: none;
    }

    .tours-table-wrapper {
        padding: 1rem;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .action-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Status Badges & Utilities */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.status-active,
.status-badge.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
}

.status-badge.status-inactive {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

.category-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: rgba(139, 92, 246, 0.12);
    color: #8B5CF6;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.btn-icon.btn-edit {
    color: #3B82F6;
    background: rgba(59, 130, 246, 0.1);
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon.btn-edit:hover {
    background: rgba(59, 130, 246, 0.25);
}

.btn-icon.btn-delete {
    color: #EF4444;
    background: rgba(239, 68, 68, 0.1);
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon.btn-delete:hover {
    background: rgba(239, 68, 68, 0.25);
}