/* Dashboard Specific Styles */

/* System Status */
.system-status-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.status-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.status-item:hover {
    background: var(--gray-50);
    border-color: var(--primary-200);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-indicator.online {
    background: var(--success-500);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

.status-indicator.warning {
    background: var(--warning-500);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
}

.status-content {
    flex: 1;
    min-width: 0;
}

.status-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 2px;
}

.status-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
}

.status-progress {
    width: 60px;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    margin-left: auto;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--success-500), var(--success-600));
    border-radius: 2px;
    transition: width var(--transition-normal);
}

.status-action {
    margin-left: auto;
    font-size: 16px;
}

/* Agencies List */
.agencies-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.agency-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.agency-item:hover {
    background: var(--gray-50);
    border-color: var(--primary-200);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.agency-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    flex-shrink: 0;
}

.agency-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agency-content {
    flex: 1;
    min-width: 0;
}

.agency-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.agency-status {
    margin-top: 4px;
}

.agency-actions {
    display: flex;
    gap: var(--spacing-xs);
}

/* Bottom Section */
.bottom-section {
    margin-top: var(--spacing-2xl);
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 4px;
}

.filter-tab {
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    background: transparent;
    color: var(--gray-600);
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-tab.active,
.filter-tab:hover {
    background: white;
    color: var(--gray-900);
    box-shadow: var(--shadow-sm);
}

/* Toggle Button Group */
.btn-group-toggle {
    display: flex;
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 4px;
}

.btn-group-toggle .btn {
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    background: transparent;
    color: var(--gray-600);
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.btn-group-toggle .btn.active,
.btn-group-toggle .btn:hover {
    background: white;
    color: var(--gray-900);
    box-shadow: var(--shadow-sm);
}

/* Table Specific Styles */
.reservation-id {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-600);
    background: var(--primary-50);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    display: inline-block;
}

.customer-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.customer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.customer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.customer-details {
    flex: 1;
    min-width: 0;
}

.customer-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.customer-email {
    font-size: 12px;
    color: var(--gray-500);
}

.tour-info {
    min-width: 0;
}

.tour-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.tour-duration {
    font-size: 12px;
    color: var(--gray-500);
}

.agency-info .agency-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}

.date-info {
    text-align: left;
}

.date-info .date {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.date-info .time {
    font-size: 12px;
    color: var(--gray-500);
}

.amount {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
    text-align: right;
}

.currency {
    font-size: 12px;
    color: var(--gray-500);
    margin-right: 2px;
}

.action-buttons {
    display: flex;
    gap: var(--spacing-xs);
}

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 12px;
}

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

.action-btn:nth-child(2):hover {
    background: var(--warning-500);
}

.action-btn:nth-child(3):hover {
    background: var(--danger-500);
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: var(--z-dropdown);
    max-height: 300px;
    overflow-y: auto;
    margin-top: 4px;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border-bottom: 1px solid var(--gray-100);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.active {
    background: var(--primary-50);
    color: var(--primary-700);
}

.suggestion-item i {
    width: 16px;
    color: var(--gray-400);
    font-size: 14px;
}

.suggestion-item:hover i,
.suggestion-item.active i {
    color: var(--primary-500);
}

/* Custom Tooltip */
.custom-tooltip {
    position: absolute;
    background: var(--gray-900);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    z-index: var(--z-tooltip);
    opacity: 0;
    transform: translateY(4px);
    transition: all var(--transition-fast);
    pointer-events: none;
}

.custom-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--gray-900);
}

.custom-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

/* Notification Dropdown */
.notification-dropdown {
    width: 380px;
    max-height: 500px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notification-dropdown .dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--gray-200);
}

.notification-dropdown .dropdown-header h6 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.mark-all-read {
    background: none;
    border: none;
    color: var(--primary-600);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.mark-all-read:hover {
    background: var(--primary-50);
    color: var(--primary-700);
}

.notification-list {
    max-height: 320px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--gray-100);
    transition: all var(--transition-fast);
    position: relative;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: var(--gray-50);
}

.notification-item.unread {
    background: var(--primary-50);
    border-left: 3px solid var(--primary-500);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    top: 16px;
    right: 16px;
    width: 8px;
    height: 8px;
    background: var(--primary-500);
    border-radius: 50%;
}

.notification-avatar {
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    font-size: 16px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

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

.notification-desc {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 4px;
    line-height: 1.4;
}

.notification-time {
    font-size: 11px;
    color: var(--gray-500);
}

.dropdown-footer {
    padding: var(--spacing-md);
    border-top: 1px solid var(--gray-200);
    text-align: center;
}

.view-all-notifications {
    color: var(--primary-600);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.view-all-notifications:hover {
    background: var(--primary-50);
    color: var(--primary-700);
    text-decoration: none;
}

/* User Dropdown */
.user-dropdown {
    width: 280px;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    z-index: var(--z-dropdown);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
}

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

.user-profile-header {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.user-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gray-200);
}

.user-details .user-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.user-details .user-email {
    font-size: 13px;
    color: var(--gray-500);
}

/* Backdrop */
.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* Dark Theme */
[data-theme="dark"] {
    --gray-50: #1f2937;
    --gray-100: #374151;
    --gray-200: #4b5563;
    --gray-300: #6b7280;
    --gray-400: #9ca3af;
    --gray-500: #d1d5db;
    --gray-600: #e5e7eb;
    --gray-700: #f3f4f6;
    --gray-800: #f9fafb;
    --gray-900: #ffffff;
}

[data-theme="dark"] body {
    background: #111827;
    color: #f3f4f6;
}

[data-theme="dark"] .admin-sidebar,
[data-theme="dark"] .admin-header,
[data-theme="dark"] .card {
    background: #1f2937;
    border-color: #374151;
}

[data-theme="dark"] .stats-card::before {
    opacity: 0.8;
}

[data-theme="dark"] .dropdown-menu {
    background: #1f2937;
    border-color: #374151;
}

[data-theme="dark"] .search-input {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

[data-theme="dark"] .search-input:focus {
    background: #4b5563;
    border-color: var(--primary-500);
}

/* Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* Responsive Improvements */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .dashboard-header {
        padding: var(--spacing-lg);
    }

    .dashboard-actions {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .notification-dropdown {
        width: 320px;
    }

    .user-dropdown {
        width: 260px;
    }
}

@media (max-width: 768px) {
    .admin-content {
        padding: var(--spacing-lg);
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-lg);
        text-align: left;
    }

    .dashboard-welcome h1 {
        font-size: 24px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }

    .table-container {
        font-size: 13px;
    }

    .data-table th,
    .data-table td {
        padding: var(--spacing-md);
    }

    .customer-info {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }

    .action-buttons {
        flex-direction: column;
    }

    .notification-dropdown,
    .user-dropdown {
        width: 280px;
    }

    .global-search {
        display: none;
    }
}

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

    .dashboard-welcome h1 {
        font-size: 20px;
    }

    .dashboard-subtitle {
        font-size: 14px;
    }

    .card-body {
        padding: var(--spacing-lg);
    }

    .quick-actions-grid {
        gap: var(--spacing-md);
    }

    .quick-action-item {
        padding: var(--spacing-md);
    }

    .action-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .notification-dropdown,
    .user-dropdown {
        width: 260px;
    }
}

/* Print Styles */
@media print {
    .admin-sidebar,
    .admin-header,
    .dashboard-actions,
    .card-actions {
        display: none !important;
    }

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

    .admin-content {
        padding: 0 !important;
    }

    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
        break-inside: avoid;
    }

    .stats-card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}
