/* Modern Admin Dashboard - Uber-inspired */
:root {
    --admin-bg: #f8fafc;
    --admin-card-border: rgba(15, 23, 42, 0.08);
    --admin-primary: #000000;
    --admin-primary-hover: #1f2937;
    --admin-text-dark: #111827;
    --admin-text-muted: #6b7280;
    --admin-accent: #e5e7eb;
    --admin-light: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
}

body.admin-body {
    background: var(--admin-bg);
    min-height: 100vh;
}

.nav-link {
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-right: 0.5rem;
    font-size: 0.95rem;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    color: var(--admin-text-muted);
}

.tab-pane {
    padding: 0.5rem 0;
}

.nav-link.active {
    background-color: transparent;
    border-bottom: 2px solid var(--admin-primary);
    color: var(--admin-text-dark);
    font-weight: 600;
}

.admin-navbar {
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.admin-navbar .container-fluid {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.admin-navbar .navbar-brand {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 1rem;
}

@media (min-width: 992px) {
    .admin-navbar .container-fluid {
        padding-left: 3rem;
        padding-right: 3rem;
    }

    .admin-main {
        padding-top: 5.5rem;
    }
}

.admin-main {
    padding-top: 5rem;
    padding-bottom: 3rem;
}

/* Main tabs styling */
.main-tabs {
    margin-bottom: 2.5rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding-bottom: 0;
    gap: 1rem;
}

.main-tabs .nav-link {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--admin-text-muted);
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
}

.main-tabs .nav-link.active {
    color: var(--admin-text-dark);
    border-bottom: 2px solid var(--admin-primary);
    background: transparent;
}

.main-tabs .nav-link:hover:not(.active) {
    border-color: rgba(226, 232, 240, 0.8);
    color: var(--admin-text-dark);
}

.admin-card {
    border: 1px solid var(--admin-card-border);
    border-radius: 18px;
    box-shadow: 0 18px 45px -20px rgba(15, 23, 42, 0.2);
    background: #fff;
}

.admin-card-header {
    padding: 1.5rem 1.75rem 0.75rem;
    border-bottom: none;
}

.admin-card-header h2 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
}

.admin-card-header p {
    margin-bottom: 0;
    color: #64748b;
}

.admin-card-body {
    padding: 0 1.75rem 1.75rem;
}

.admin-modal-body {
    max-height: 75vh;
    overflow-y: auto;
    padding: 1.25rem;
}

.admin-stats-card {
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.04);
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.1), rgba(100, 116, 139, 0.08));
}

.admin-stats-card h6 {
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.75rem;
}

.admin-stats-card p {
    font-size: 1.85rem;
    font-weight: 600;
    margin: 0;
}

.admin-section-title {
    font-size: 1rem;
    letter-spacing: 0.08em;
    color: #475569;
}

.table-responsive {
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
}

.table thead {
    background: rgba(148, 163, 184, 0.1);
    color: var(--admin-text-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
    font-weight: 600;
}

.table td {
    vertical-align: middle;
    font-size: 0.95rem;
    padding: 1.1rem 0.75rem;
}

.badge-status {
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
}

.badge-status--live {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

.badge-status--draft {
    background: rgba(234, 179, 8, 0.15);
    color: #b45309;
}

.upload-progress-list {
    display: grid;
    gap: 0.75rem;
}

.upload-progress-item {
    background: rgba(15, 23, 42, 0.04);
    border-radius: 12px;
    padding: 0.75rem 1rem;
}

.upload-progress-item .title {
    font-weight: 600;
    font-size: 1.2rem;
    color: #0f172a;
}

.upload-progress-item small {
    color: #64748b;
}

.upload-progress-item .progress {
    height: 6px;
    border-radius: 999px;
    margin-top: 0.5rem;
}

.existing-image-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    margin-bottom: 1rem;
}

.existing-image-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: #fff;
}

.existing-image-card img {
    width: 100%;
    height: 90px;
    object-fit: cover;
}

.existing-image-card button {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background: rgba(15, 23, 42, 0.8);
    color: #fff;
}

.form-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.5rem 1rem;
    margin-bottom: 0.5rem;
}

.form-check-grid .form-check {
    margin-bottom: 0;
}

.form-check-grid .form-check-label {
    font-size: 1.2rem;
}

.form-check-grid .form-check-input {
    cursor: pointer;
}

.form-section-title {
    text-transform: uppercase;
    font-size: 1.1rem;
    letter-spacing: 0.06em;
    color: var(--admin-text-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.form-text-muted {
    color: var(--admin-text-muted);
    font-size: 1.1rem;
}

#adminAlertPlaceholder .alert {
    border-radius: 12px;
}

.admin-empty-state {
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: #475569;
}

.tab-content {
    padding: 0.5rem 0.25rem;
}

.admin-empty-state svg {
    height: 64px;
    width: 64px;
    margin-bottom: 1rem;
    color: rgba(148, 163, 184, 0.6);
}

.offcanvas-admin-config .form-label {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

@media (max-width: 991.98px) {
    .admin-main {
        padding-top: 5rem;
    }

    .admin-card-header {
        padding: 1.25rem 1.25rem 0.5rem;
    }

    .admin-card-body {
        padding: 0 1.25rem 1.25rem;
    }

    .table-responsive {
        border-radius: 16px;
    }
}

/* Tab content improvements */
.tab-pane {
    transition: all 0.3s ease-in-out;
}

.tab-pane.active {
    animation: fadeIn 0.4s ease-in-out;
}

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

/* Mobile-first table and modal improvements */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
}
.admin-modal-body {
    max-height: 75vh;
    overflow-y: auto;
    padding: 1.25rem !important;
}
.admin-card, .admin-card-body, .admin-card-header {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}
.admin-modal-body .row.g-4, .admin-modal-body .row.g-3 {
    flex-direction: row !important;
    gap: 1rem !important;
}
.form-control, .form-select, .btn {
    font-size: 0.95rem;
    min-height: 2.5rem;
    padding: 0.4rem 1.1rem;
}
.form-check-grid {
    grid-template-columns: 1fr !important;
    gap: 0.5rem 0 !important;
}
/* Hide less important columns or stack rows for mobile */
@media (max-width: 400px) {
    .admin-card-header, .admin-card-body {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    .form-control, .form-select, .btn {
        font-size: 0.95rem;
        min-height: 2.5rem;
    }
    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 1.2rem;
    }
}
/* Compact modal styles */
.modal-content {
    border-radius: 12px;
}

.editor-wrapper {
    width: 100%;
    margin-bottom: 1.75rem;
}

.editor-wrapper:last-child {
    margin-bottom: 0;
}

/* Quill editor layout adjustments */
.ql-toolbar.ql-snow {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 14px 14px 0 0;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    margin-bottom: 0;
}

.ql-toolbar.ql-snow .ql-formats button {
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.ql-toolbar.ql-snow .ql-formats button:hover,
.ql-toolbar.ql-snow .ql-formats button:focus {
    background-color: rgba(15, 23, 42, 0.08);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.ql-toolbar.ql-snow .ql-formats button.ql-active,
.ql-toolbar.ql-snow .ql-formats button.ql-active:hover {
    background-color: rgba(15, 23, 42, 0.15);
    color: #0f172a;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.18);
}

.ql-toolbar.ql-snow .ql-picker {
    border-radius: 8px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.ql-toolbar.ql-snow .ql-picker:hover,
.ql-toolbar.ql-snow .ql-picker.ql-expanded {
    background-color: rgba(15, 23, 42, 0.08);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.quill-editor.ql-container.ql-snow {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-top: none;
    border-radius: 0 0 14px 14px;
    background: #ffffff;
    margin-bottom: 1.5rem;
}

.quill-editor .ql-editor {
    min-height: 160px;
    padding: 0.75rem;
}

@media (max-width: 576px) {
    .admin-modal-body {
        padding: 1rem !important;
    }

    .ql-toolbar.ql-snow {
        padding: 0.4rem 0.5rem;
    }

    .quill-editor.ql-container.ql-snow {
        margin-bottom: 2.25rem;
        border-radius: 0 0 16px 16px;
    }

    .quill-editor .ql-editor {
        min-height: 140px;
        padding: 0.6rem;
    }

    .editor-wrapper {
        margin-bottom: 2.25rem;
    }

    .admin-modal-body .row.g-3 > [class*="col-"],
    .admin-modal-body .row.g-4 > [class*="col-"] {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .admin-modal-body .form-label {
        margin-bottom: 0.35rem;
        font-weight: 600;
    }

    .admin-modal-body .form-check-grid {
        gap: 0.6rem;
    }
}

.modal-header {
    padding: 1.25rem 1.5rem 0.5rem;
}

.modal-footer {
    padding: 0.75rem 1.5rem 1.25rem;
}

.modal-dialog.modal-xl .row > [class^="col-"] {
    padding: 0.75rem;
}

.admin-modal-body .row {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

.form-label {
    margin-bottom: 0.35rem;
    font-size: 1.2rem;
    font-weight: 500;
}

/* View modal styles */
.view-modal .modal-dialog {
    max-width: 95vw;
    margin: 0.5rem auto;
}
.view-modal .modal-content {
    border-radius: 12px;
    padding: 1rem;
}
@media (max-width: 575.98px) {
    .admin-navbar .container-fluid {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .admin-navbar .navbar-brand {
        font-size: 0.95rem;
    }

    .admin-navbar .btn {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .admin-stats-card {
        text-align: center;
    }

    .admin-stats-card p {
        font-size: 1.65rem;
    }
}

/* ===== MODERN UI COMPONENTS ===== */

/* App Header */
.app-header {
    padding: 0 0.5rem;
}

.app-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--admin-text-dark);
    margin: 0;
    letter-spacing: -0.025em;
}

.app-subtitle {
    font-size: 1rem;
    color: var(--admin-text-muted);
    font-weight: 400;
}

/* Ghost Button */
.btn-ghost {
    background: transparent;
    border: 1px solid var(--admin-accent);
    color: var(--admin-text-muted);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-ghost:hover {
    background: var(--admin-light);
    border-color: var(--admin-text-muted);
    color: var(--admin-text-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Search Container */
.search-container {
    max-width: 500px;
    padding: 0 0.5rem;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: var(--admin-text-muted);
    z-index: 2;
    font-size: 1rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 2.75rem;
    border: 1px solid var(--admin-accent);
    border-radius: var(--border-radius-lg);
    background: var(--admin-light);
    color: var(--admin-text-dark);
    font-size: 1rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: var(--shadow-md), 0 0 0 3px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.search-input::placeholder {
    color: var(--admin-text-muted);
    font-weight: 400;
}

/* Modern Table */
.table-container {
    background: var(--admin-light);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--admin-accent);
    overflow: hidden;
    margin: 0 0.5rem;
}

.modern-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table thead {
    background: #f9fafb;
    border-bottom: 1px solid var(--admin-accent);
}

.modern-table thead th {
    padding: 1.25rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--admin-text-dark);
    text-transform: none;
    letter-spacing: 0;
    border: none;
    text-align: left;
}

.modern-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.15s ease;
}

.modern-table tbody tr:hover {
    background: #f9fafb;
}

.modern-table tbody tr:last-child {
    border-bottom: none;
}

.modern-table tbody td {
    padding: 1.5rem 1.5rem;
    font-size: 0.95rem;
    color: var(--admin-text-dark);
    border: none;
    vertical-align: middle;
}

/* Floating Add Button */
.floating-add-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 64px;
    height: 64px;
    background: var(--admin-primary);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.floating-add-btn:hover {
    background: var(--admin-primary-hover);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.floating-add-btn:active {
    transform: translateY(0) scale(0.95);
}

.floating-add-btn i {
    transition: transform 0.2s ease;
}

.floating-add-btn:hover i {
    transform: rotate(90deg);
}

/* Empty State */
.empty-state {
    padding: 4rem 2rem;
    text-align: center;
    margin: 0 0.5rem;
}

.empty-state-content {
    max-width: 400px;
    margin: 0 auto;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
}

.empty-state-icon i {
    font-size: 2rem;
    color: var(--admin-text-muted);
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--admin-text-dark);
    margin-bottom: 0.75rem;
}

.empty-state-text {
    font-size: 1rem;
    color: var(--admin-text-muted);
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Primary Outline Button */
.btn-primary-outline {
    background: transparent;
    border: 2px solid var(--admin-primary);
    color: var(--admin-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary-outline:hover {
    background: var(--admin-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Packages Container */
.packages-container {
    margin-bottom: 2rem;
}

/* Status Badges - Modern Style */
.badge-status {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-status--live {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.badge-status--draft {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .app-title {
        font-size: 1.75rem;
    }
    
    .floating-add-btn {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
    }
    
    .search-container {
        padding: 0;
        margin: 0 0.5rem;
    }
    
    .table-container {
        margin: 0;
        border-radius: var(--border-radius-lg);
    }
    
    .modern-table thead th,
    .modern-table tbody td {
        padding: 1rem 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Hide price and status on tablet */
    .modern-table thead th:nth-child(3),
    .modern-table tbody td:nth-child(3),
    .modern-table thead th:nth-child(4),
    .modern-table tbody td:nth-child(4) {
        display: none;
    }
    
    .empty-state {
        padding: 3rem 1rem;
    }
    
    .empty-state-icon {
        width: 64px;
        height: 64px;
    }
    
    .empty-state-icon i {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .app-header .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
    
    /* Hide destination column on mobile, keep actions */
    .modern-table thead th:nth-child(2),
    .modern-table tbody td:nth-child(2) {
        display: none;
    }
    
    /* Hide price and status columns on mobile */
    .modern-table thead th:nth-child(3),
    .modern-table tbody td:nth-child(3),
    .modern-table thead th:nth-child(4),
    .modern-table tbody td:nth-child(4) {
        display: none;
    }
    
    /* Make actions column more prominent on mobile */
    .modern-table thead th:nth-child(5),
    .modern-table tbody td:nth-child(5) {
        width: 40%;
        text-align: center !important;
    }
    
    /* Center actions header on mobile */
    .text-center-mobile {
        text-align: center !important;
    }
    
    /* Adjust action buttons for mobile */
    .modern-table .btn-group-sm .btn {
        padding: 0.5rem 0.75rem;
        margin: 0 0.125rem;
    }
    
    /* Make action buttons more touch-friendly on mobile */
    .modern-table .btn-group .btn {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .floating-add-btn {
        bottom: 1rem;
        right: 1rem;
        width: 52px;
        height: 52px;
        font-size: 1.125rem;
    }
}
