/* Custom styles for the popover table */
/* .popover-table {
    max-width: 400px;
}

.popover-table .popover-body {
    padding: 0;
}

.popover-table .table {
    margin-bottom: 0;
    font-size: 0.8rem;
}

.popover-table .table th,
.popover-table .table td {
    padding: 0.3rem 0.5rem;
    white-space: nowrap;
}


.bad-work,
.rate {
    cursor: pointer;
}

.bad-work:hover,
.rate:hover {
    background-color: rgba(0,0,0,0.05);
} */

/* Custom tooltip table styles */
[data-tooltip-table="true"] {
    position: relative;
    cursor: pointer;
}

.tooltip-table-content {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 300px;
    padding: 8px;
}

[data-tooltip-table="true"]:hover .tooltip-table-content {
    display: block;
}

/* Ensure the table stays visible while hovering */
.tooltip-table-content:hover {
    display: block;
}

/* Table styles within tooltip */
.tooltip-table-content .table {
    margin-bottom: 0;
    background: white;
}

.tooltip-table-content .table th,
.tooltip-table-content .table td {
    padding: 4px 8px;
    font-size: 12px;
    white-space: nowrap;
}

/* Ensure tooltip doesn't get cut off */
.table-responsive {
    overflow: visible !important;
}

.tooltip-table-content {
    /* ... existing styles ... */
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s, transform 0.2s;
}

[data-tooltip-table="true"]:hover .tooltip-table-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Rating tooltip specific styles */
.rating-tooltip {
    min-width: 400px;
    padding: 16px;
    background: white;
    border-radius: 8px;
}

.rating-rows {
    margin-bottom: 16px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 16px;
}

.rating-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.rating-header {
    width: 80px;
    font-weight: 600;
    color: #344050;
}

.stars {
    display: flex;
    gap: 4px;
}

.stars i {
    font-size: 14px;
}

.rating-comment .comment-header {
    font-weight: 600;
    margin-bottom: 8px;
    color: #344050;
}

.rating-comment .comment-text {
    font-size: 13px;
    line-height: 1.5;
    color: #6c757d;
}

/* Update existing tooltip styles */
.tooltip-table-content {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s, transform 0.2s;
}

[data-tooltip-table="true"]:hover .tooltip-table-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Ensure the tooltip stays visible while hovering */
.tooltip-table-content:hover {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Position adjustment for right edge of screen */
.rate-cell {
    position: relative;
}

.rate-cell .tooltip-table-content {
    left: auto;
    right: 0;
}

.detail-item {
    margin-bottom: 0.5rem;
}

.detail-item label {
    display: block;
    margin-bottom: 0.25rem;
    color: #344050;
}

.customer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--phoenix-gray-soft);
    border-radius: 0.5rem;
}

.ratings-content {
    padding: 1rem;
    background-color: var(--phoenix-gray-soft);
    border-radius: 0.5rem;
}

/* Status badge styles */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

/* Enhanced drawer styles */
.offcanvas {
    --phoenix-drawer-width: 450px;
    width: var(--phoenix-drawer-width) !important;
}

.offcanvas-header {
    padding: 1.25rem 1.5rem;
    background-color: var(--phoenix-card-bg);
}

.offcanvas-title {
    font-weight: 600;
    color: var(--phoenix-heading-color);
}

.offcanvas-body {
    padding: 1.5rem;
}

/* Section styling */
.detail-section {
    padding: 1.25rem;
    background-color: var(--phoenix-card-bg);
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.section-title {
    color: var(--phoenix-heading-color);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Grid layout for details */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-item label {
    font-size: 0.875rem;
    color: var(--phoenix-body-color);
    margin-bottom: 0.5rem;
}

.detail-value {
    font-weight: 500;
    color: var(--phoenix-heading-color);
}

/* Customer card styling */
.customer-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--phoenix-gray-soft);
    border-radius: 0.5rem;
}

.customer-avatar {
    width: 48px;
    height: 48px;
    overflow: hidden;
}

.customer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.customer-status {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 0.5rem;
}

.customer-status.online {
    background-color: var(--phoenix-success);
}

/* Payment styling */
.payment-amount {
    font-weight: 600;
    color: var(--phoenix-primary);
}

.payment-progress {
    color: var(--phoenix-body-color);
    font-size: 0.875rem;
}

/* Ratings card */
.ratings-card {
    padding: 1rem;
    background-color: var(--phoenix-gray-soft);
    border-radius: 0.5rem;
}

.rating-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--phoenix-primary);
    text-align: center;
    margin-bottom: 1rem;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .offcanvas {
        --phoenix-drawer-width: 100%;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
}

.table> :not(caption)>*>* {
    padding: 0.75rem;
    vertical-align: middle;
}

/* Badge styles */
.badge-phoenix {
    padding: 0.4em 0.8em;
    font-weight: 500;
}

.badge-phoenix-success {
    background-color: #ccf6e4;
    color: #00864e;
}

.badge-phoenix-secondary {
    background-color: #e3e6ed;
    color: #7d899b;
}

/* Task list styles */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.task-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

.task-item i {
    font-size: 0.5rem;
}

/* Progress bar styles */
.progress {
    background-color: #e3e6ed;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.3s ease;
}

/* Status indicators */
.status-yes {
    color: #00864e;
}

.status-no {
    color: #e63757;
}

/* Assignment status */
.assignment-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.assignment-status i {
    font-size: 1rem;
}

.process-cell {
    position: relative;
    cursor: pointer;
}

.tooltip-table-content.process-tooltip {
    min-width: 150px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 8px;
}

.task-list-tooltip {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-list-tooltip .task-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border-radius: 4px;
}

.task-list-tooltip .task-item i {
    font-size: 8px;
}

.task-list-tooltip .task-item i.text-danger {
    color: #dc3545;
}

.task-list-tooltip .task-item i.text-success {
    color: #198754;
}

.task-list-tooltip .task-item span {
    font-size: 14px;
    color: #344050;
}

/* Tooltip positioning and animation */
[data-tooltip-table="true"] .tooltip-table-content {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 1000;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s, transform 0.2s;
}

[data-tooltip-table="true"]:hover .tooltip-table-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.table>tbody>tr>td {
    vertical-align: middle;
}

.echart-container {
    height: 300px;
}

.stats-card {
    transition: transform 0.2s;
}

.stats-card:hover {
    transform: translateY(-3px);
}

.quick-widget {
    background-color: var(--phoenix-card-bg);
    border-radius: 0.5rem;
}

.stat-item {
    transition: background-color 0.2s;
}

.stat-item:hover {
    background-color: var(--phoenix-gray-100);
}

/* Charts Layout */
.charts-wrapper {
    margin-top: 2rem;
}

.main-chart-wrap {
    background-color: var(--phoenix-card-bg);
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.stacked-charts {
    display: flex;
    flex-direction: column;
}

.chart-item {
    background-color: var(--phoenix-card-bg);
    border-radius: 0.5rem;
    padding: 1.5rem;
    flex: 1;
}

.h-33 {
    height: 33.333%;
}

/* Chart containers */
.echart-revenue-chart,
.echart-orders-chart,
.echart-chart,
.echart-customers-chart,
.echart-vip-customers-chart {
    width: 100%;
    height: calc(100% - 60px);
}

/* Table styles */
.table-responsive {
    border-radius: 0.5rem;
    background-color: var(--phoenix-card-bg);
}

.echart-revenue-chart>div,
.echart-revenue-chart canvas,
.echart-orders-chart>div,
.echart-orders-chart canvas,
.echart-chart>div,
.echart-chart canvas,
.echart-customers-chart>div,
.echart-customers-chart canvas,
.echart-vip-customers-chart>div,
.echart-vip-customers-chart canvas,
.chart-sparkline>div,
.chart-sparkline canvas,
.echart-cost-structure>div,
.echart-cost-structure canvas,
.echart-revenue-structure>div,
.echart-revenue-structure canvas,
.echart-comback-rate>div,
.echart-comback-rate canvas {
    width: 100% !important;
}

.badge.rounded-circle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-sparkline {
    height: 50px;
    width: 100%;
}

.fs-sm {
    font-size: 0.875rem;
}

.card {
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-3px);
}

.cost-metrics {
    font-size: 0.75rem;
}

.cost-items {
    font-size: 0.875rem;
}

.badge {
    font-weight: 500;
    padding: 0.25em 0.5em;
}

.choices__list--dropdown {
    background-color: var(--phoenix-card-bg);
}

.choices__list--dropdown .choices__item--selectable.is-highlighted,
.choices__list[aria-expanded] .choices__item--selectable.is-highlighted {
    background-color: var(--phoenix-primary)!important;
}

.cursor-pointer {
    cursor: pointer;
}

.cursor-pointer:hover {
    background-color: var(--phoenix-gray-100);
}

/* Prevent text selection on row click */
.cursor-pointer td {
    user-select: none;
}


.offcanvas-large {
    --phoenix-drawer-width: 75vw;
    width: var(--phoenix-drawer-width) !important;
}

.timeline-container {
    padding-left: 6px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 6px;
    bottom: 0;
    width: 2px;
    background: var(--phoenix-gray-200);
}

.timeline-item {
    position: relative;
}

.timeline-icon {
    position: relative;
    z-index: 1;
}

.timeline-content {
    padding-bottom: 1.5rem;
}

/* File sections */
.file-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.file-icon i {
    font-size: 1.25rem;
}

.file-preview img {
    object-fit: cover;
}

/* Colors for different timeline items */
.timeline-item:nth-child(2) .timeline-icon .rounded-circle {
    background-color: var(--phoenix-warning);
}

.timeline-item:nth-child(3) .timeline-icon .rounded-circle {
    background-color: var(--phoenix-warning);
}


/* Thêm CSS cho editor popover */
.editor-popover-table {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
  }

  .editor-cell {
    position: relative;
  }

  .editor-cell:hover .editor-popover-table {
    display: block;
  }

  .editor-popover-table table {
    margin: 0;
    min-width: 800px;
  }

  .editor-popover-table th,
  .editor-popover-table td {
    padding: 4px 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  /* Thiết lập độ rộng cố định cho từng cột */
  .editor-popover-table th:nth-child(1),
  .editor-popover-table td:nth-child(1) {
    width: 120px; /* Cột Tên nhân viên */
  }

  .editor-popover-table th:nth-child(2),
  .editor-popover-table td:nth-child(2) {
    width: 130px; /* Cột Trạng thái */
  }

  .editor-popover-table th:nth-child(3),
  .editor-popover-table td:nth-child(3) {
    width: 130px; /* Cột Chất lượng trung bình */
  }

  .editor-popover-table th:nth-child(4),
  .editor-popover-table td:nth-child(4) {
    width: 130px; /* Cột Tình trạng đạt chỉ tiêu */
  }

  .editor-popover-table th:nth-child(5),
  .editor-popover-table td:nth-child(5) {
    width: 150px; /* Cột Nghỉ phép */
  }

.custom-select-container {
    position: relative;
}

.custom-select-selected {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    cursor: pointer;
    min-height: 31px;
    /* Fixed height for empty state */
}

.custom-select-selected.placeholder {
    color: #6c757d;
    /* Bootstrap's text-muted color */
}

.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    display: none;
    margin-top: 0.25rem;
}

.custom-select-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
}

.custom-select-option:hover {
    background-color: #f8f9fa;
}

.custom-select-thumbnail {
    width: 20px;
    height: 20px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.custom-select-container.active .custom-select-dropdown {
    display: block;
}

/* Hide original select */
.custom-select {
    display: none;
}
