/* ==================== VARIABLES Y RESET ==================== */
:root {
    --primary-color: #195C33;
    --primary-dark: #0d3d20;
    --secondary-color: #F4C400;
    --secondary-light: #FFE347;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    
    --border-color: #e5e7eb;
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --header-height: 70px;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: var(--shadow-xl);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.sidebar-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
    transition: opacity 0.3s;
}

.sidebar.collapsed .sidebar-title {
    opacity: 0;
    pointer-events: none;
}

.sidebar-toggle {
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: var(--shadow-md);
}

.sidebar-toggle:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-lg);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    border-left: 3px solid transparent;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: var(--secondary-color);
    transition: width 0.3s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item:hover::before {
    width: 3px;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: var(--secondary-color);
}

.nav-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item span:not(.badge) {
    white-space: nowrap;
    transition: opacity 0.3s;
}

.sidebar.collapsed .nav-item span:not(.badge) {
    opacity: 0;
}

.nav-item .badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.sidebar.collapsed .nav-item .badge {
    position: absolute;
    right: 10px;
    top: 10px;
}

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

.admin-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.admin-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.admin-info {
    flex: 1;
    min-width: 0;
}

.admin-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.sidebar.collapsed .admin-info {
    display: none;
}

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

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.sidebar.collapsed .btn-logout span {
    display: none;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* ==================== HEADER ==================== */
.top-header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 18px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    position: relative;
    width: 350px;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(25, 92, 51, 0.1);
}

.notification-btn {
    position: relative;
    width: 44px;
    height: 44px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 18px;
    transition: all 0.3s;
}

.notification-btn:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.user-menu-toggle:hover {
    background: var(--bg-secondary);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a,
.user-dropdown button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
    background: var(--bg-secondary);
}

.user-dropdown i {
    width: 20px;
    color: var(--text-secondary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.logout-link {
    color: var(--danger) !important;
}

/* ==================== CONTENT WRAPPER ==================== */
.content-wrapper {
    padding: 32px;
}

.content-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

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

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

/* ==================== STATS CARDS ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    display: flex;
    gap: 20px;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    flex-shrink: 0;
}

.stat-info { flex: 1; }
.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-change {
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--danger); }
.stat-change.neutral { color: var(--text-tertiary); }

/* ==================== CHARTS ==================== */
.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.chart-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bg-tertiary);
}

.chart-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==================== TABLES ==================== */
.table-container {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

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

.data-table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.data-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s;
}

.data-table tbody tr:hover {
    background: var(--bg-secondary);
}

.data-table td {
    padding: 16px 20px;
    font-size: 14px;
}

.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-pending { background: #fef3c7; color: #92400e; }
.status-confirmed { background: #d1fae5; color: #065f46; }
.status-cancelled { background: #fee2e2; color: #991b1b; }

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    margin-right: 6px;
}

.action-btn:hover { transform: translateY(-2px); }
.btn-view { background: #dbeafe; color: #1e40af; }
.btn-edit { background: #fef3c7; color: #92400e; }
.btn-delete { background: #fee2e2; color: #991b1b; }

/* ==================== BUTTONS ==================== */
.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(25, 92, 51, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(25, 92, 51, 0.4);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

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

/* ==================== MODALS ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active { display: flex; }

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease-out;
}

.modal-large { max-width: 900px; }

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 24px 28px;
    border-bottom: 2px solid var(--bg-tertiary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg);
}

.modal-body { padding: 28px; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid var(--bg-tertiary);
}

/* ==================== FORMS ==================== */
.form-group { margin-bottom: 20px; }

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(25, 92, 51, 0.1);
}

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

.required { color: var(--danger); }

/* ==================== DESTINATIONS & REPORTS ==================== */
.destinations-grid, .reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.destination-card, .report-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.destination-card:hover, .report-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.destination-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.destination-content {
    padding: 20px;
}

.destination-type {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    color: var(--primary-color);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.destination-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.destination-location {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.destination-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.destination-actions {
    display: flex;
    gap: 8px;
}

.destination-actions button { flex: 1; }

/* ==================== SETTINGS ==================== */
.settings-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.settings-group {
    background: white;
    padding: 28px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.settings-group h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bg-tertiary);
}

/* ==================== SISTEMA DE NOTIFICACIONES MEJORADO ==================== */

/* ===== TOAST DE NOTIFICACIONES (MEJORADO DEL PRIMER ARCHIVO) ===== */
.notification-toast {
    position: fixed;
    top: 80px;
    right: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 400px;
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid var(--primary-color); /* ✨ MEJORADO */
}

.notification-toast.fade-out {
    animation: slideOutRight 0.3s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

.toast-icon {
    width: 44px; /* ✨ MEJORADO: 44px en lugar de 40px */
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    color: white;
}

.toast-content {
    flex: 1;
    min-width: 0; /* ✨ MEJORADO */
}

.toast-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
    overflow: hidden; /* ✨ MEJORADO */
    text-overflow: ellipsis;
    white-space: nowrap;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
    flex-shrink: 0;
    font-size: 16px;
    width: 28px; /* ✨ MEJORADO */
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.toast-close:hover {
    background: var(--bg-tertiary); /* ✨ MEJORADO */
    color: var(--danger);
}

/* ===== PANEL DE NOTIFICACIONES (MEJORADO DEL PRIMER ARCHIVO) ===== */
.notifications-panel {
    position: fixed;
    top: 70px;
    right: -420px; /* ✨ MEJORADO: 420px en lugar de 400px */
    width: 420px;
    max-height: calc(100vh - 90px);
    background: white;
    border-radius: 16px 0 0 16px; /* ✨ MEJORADO */
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15); /* ✨ MEJORADO */
    z-index: 1000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* ✨ MEJORADO */
    display: flex;
    flex-direction: column;
    border-left: 3px solid var(--primary-color); /* ✨ MEJORADO */
}

.notifications-panel.active {
    right: 0; /* ✨ MEJORADO: sin margen */
}

.notifications-header {
    padding: 20px 24px; /* ✨ MEJORADO */
    border-bottom: 2px solid var(--bg-tertiary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, white 100%); /* ✨ MEJORADO */
}

.notifications-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.notifications-header h3 i {
    font-size: 20px; /* ✨ MEJORADO */
}

.notifications-actions {
    display: flex;
    gap: 8px;
}

.btn-mark-read,
.btn-close-panel {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
    width: 36px; /* ✨ MEJORADO */
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-mark-read:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.btn-close-panel:hover {
    background: #fee2e2;
    color: var(--danger);
}

.notifications-body {
    overflow-y: auto;
    flex: 1;
    padding: 12px;
}

.notifications-body::-webkit-scrollbar {
    width: 6px; /* ✨ MEJORADO */
}

.notifications-body::-webkit-scrollbar-track {
    background: var(--bg-secondary); /* ✨ MEJORADO */
    border-radius: 10px;
}

.notifications-body::-webkit-scrollbar-thumb {
    background: var(--text-tertiary); /* ✨ MEJORADO */
    border-radius: 10px;
}

.notifications-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.notifications-empty {
    text-align: center;
    padding: 80px 20px; /* ✨ MEJORADO */
    color: var(--text-tertiary);
}

.notifications-empty i {
    font-size: 64px; /* ✨ MEJORADO */
    margin-bottom: 16px;
    display: block;
    opacity: 0.5; /* ✨ MEJORADO */
}

.notifications-empty p {
    font-size: 14px;
    font-weight: 500; /* ✨ MEJORADO */
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 14px; /* ✨ MEJORADO */
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    border: 1px solid transparent; /* ✨ MEJORADO */
}

.notification-item:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color); /* ✨ MEJORADO */
    transform: translateX(-4px); /* ✨ MEJORADO */
}

.notification-item.unread {
    background: #fffbeb; /* ✨ MEJORADO */
    border-color: #fef3c7;
}

.notification-item.unread:hover {
    background: #fef3c7;
}

.notification-item.read {
    opacity: 0.7;
}

.notification-icon {
    width: 44px; /* ✨ MEJORADO: 44px en lugar de 40px */
    height: 44px;
    border-radius: 12px; /* ✨ MEJORADO */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    color: white;
}

.notification-icon.user {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.notification-icon.reservation {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.notification-icon.system {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.notification-content {
    flex: 1;
    min-width: 0; /* ✨ MEJORADO */
}

.notification-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.notification-message {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px; /* ✨ MEJORADO */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notification-time {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500; /* ✨ MEJORADO */
}

.notification-dot {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 10px; /* ✨ MEJORADO: 10px en lugar de 8px */
    height: 10px;
    background: var(--warning);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2); /* ✨ MEJORADO */
    animation: pulse 2s ease-in-out infinite; /* ✨ MEJORADO */
}

/* ✨ NUEVO: Animación de pulso */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* ===== PANEL DE RESULTADOS DE BÚSQUEDA ===== */
.search-results-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-results-header {
    padding: 16px 20px;
    border-bottom: 2px solid var(--bg-tertiary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-results-header strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
}

.search-clear {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.search-clear:hover {
    background: #fee2e2;
    color: var(--danger);
}

.search-section {
    padding: 12px;
}

.search-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-result-item:hover {
    background: var(--bg-secondary);
}

.search-result-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
}

.search-result-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary-color);
    margin-bottom: 2px;
}

.search-result-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.search-result-more {
    padding: 12px;
    text-align: center;
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 600;
}

.search-no-results {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-tertiary);
}

.search-no-results i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
    .charts-row { grid-template-columns: 1fr; }
}

@media (max-width: 968px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .mobile-menu-toggle {
        display: flex;
    }
    .search-box {
        width: 200px;
    }
    .user-name {
        display: none;
    }
    .content-wrapper {
        padding: 20px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .filter-group {
        width: 100%;
        flex-direction: column;
    }
    .filter-select, .filter-input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .notifications-panel {
        width: calc(100vw - 40px); /* ✨ MEJORADO */
        right: -100vw;
    }
    
    .notifications-panel.active {
        right: 20px;
    }
    
    .notification-toast {
        right: 12px;
        left: 12px;
        max-width: none;
    }
    
    .search-results-panel {
        position: fixed;
        top: 70px;
        left: 12px;
        right: 12px;
        max-height: calc(100vh - 90px);
    }
}

@media (max-width: 640px) {
    .top-header {
        padding: 0 16px;
    }
    .search-box {
        display: none;
    }
    .page-title {
        font-size: 18px;
    }
    .table-container {
        overflow-x: auto;
    }
    .data-table {
        min-width: 800px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .destinations-grid,
    .reports-grid,
    .settings-container {
        grid-template-columns: 1fr;
    }
}

/* ==================== MEJORAS DE RENDIMIENTO ==================== */
.stat-card,
.chart-card,
.activity-item,
.destination-card {
    will-change: transform;
    backface-visibility: hidden;
}

/* ==================== ANIMACIONES OPTIMIZADAS ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== ESTADO DE CARGA OPTIMIZADO ==================== */
#pageLoader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

#pageLoader.hiding {
    opacity: 0;
    pointer-events: none;
}

/* ==================== ESTILOS PARA RESALTAR ELEMENTOS ==================== */
@keyframes highlight {
    0% {
        background-color: #fef3c7;
    }
    100% {
        background-color: transparent;
    }
}

.highlight-animation {
    animation: highlight 2s ease-out;
}
/* ==================== ESTILOS PARA BOTONES DE DESTINOS ==================== */

/* Contenedor de acciones de destino */
.destination-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

/* Botón de peligro (eliminar) */
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
    flex: 1;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

.btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.btn-danger i {
    font-size: 14px;
}

/* Ajustes para el botón secundario (editar) */
.destination-actions .btn-secondary {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Animación de la tarjeta de destino al eliminar */
.destination-card.deleting {
    animation: cardDeleteAnimation 0.4s ease;
    pointer-events: none;
}

@keyframes cardDeleteAnimation {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.95) rotateZ(-2deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.8) rotateZ(-5deg);
    }
}

/* Toast de éxito personalizado */
.success-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    animation: slideInRight 0.3s ease;
}

.success-toast.hiding {
    animation: slideOutRight 0.3s ease;
}

/* Toast de error */
.error-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    animation: slideInRight 0.3s ease;
}

.error-toast.hiding {
    animation: slideOutRight 0.3s ease;
}

/* Animaciones de toast */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Modal de confirmación personalizado (opcional para futuras mejoras) */
.confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.confirmation-modal.active {
    opacity: 1;
    pointer-events: all;
}

.confirmation-content {
    background: white;
    padding: 32px;
    border-radius: 16px;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.confirmation-modal.active .confirmation-content {
    transform: scale(1);
}

.confirmation-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde047 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.confirmation-icon i {
    font-size: 32px;
    color: #f59e0b;
}

.confirmation-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    text-align: center;
    margin-bottom: 12px;
}

.confirmation-message {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 24px;
}

.confirmation-actions {
    display: flex;
    gap: 12px;
}

.confirmation-actions button {
    flex: 1;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .destination-actions {
        flex-direction: column;
    }
    
    .destination-actions .btn-secondary,
    .destination-actions .btn-danger {
        width: 100%;
    }
    
    .success-toast,
    .error-toast {
        top: 60px;
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
    }
}

/* Estado de carga para destinos */
.destination-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.destination-card.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

/* Placeholder para imagen no encontrada */
.destination-image[src*="placeholder.jpg"] {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.destination-image[src*="placeholder.jpg"]::after {
    content: '\f03e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    font-size: 48px;
    color: #9ca3af;
}

/* Badge de nuevo destino */
.destination-card.new-destination {
    position: relative;
}

.destination-card.new-destination::before {
    content: 'NUEVO';
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Animación de resaltado */
.destination-card.highlight {
    animation: highlightPulse 1s ease;
}

@keyframes highlightPulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 8px 24px rgba(244, 196, 0, 0.4);
        transform: translateY(-4px);
    }
}

/* Estado vacío de destinos */
.destinations-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.destinations-empty-state i {
    font-size: 80px;
    color: #d1d5db;
    margin-bottom: 24px;
    display: block;
}

.destinations-empty-state h3 {
    font-size: 24px;
    font-weight: 700;
    color: #374151;
    margin: 0 0 12px 0;
}

.destinations-empty-state p {
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 32px 0;
}

/* Mejoras en el grid de destinos */
.destinations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

@media (max-width: 1200px) {
    .destinations-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .destinations-grid {
        grid-template-columns: 1fr;
    }
}