/* Tổng thể */
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #eceff1; color: #333; margin: 0; padding: 20px; }
h1 { color: #263238; border-bottom: 2px solid #cfd8dc; padding-bottom: 10px; }

/* Các khối nội dung (Card) */
.card { background: white; padding: 20px; margin-bottom: 25px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.card h2 { margin-top: 0; font-size: 1.2rem; color: #546e7a; text-transform: uppercase; letter-spacing: 1px; }

/* Bảng dữ liệu */
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th { background: #f8f9fa; color: #78909c; font-size: 0.85rem; text-align: left; padding: 12px; }
td { padding: 12px; border-bottom: 1px solid #f0f0f0; }

/* Trạng thái "3 giây" */
.badge { padding: 5px 10px; border-radius: 4px; font-size: 0.8rem; font-weight: bold; }
.status-available { background: #e8f5e9; color: #2e7d32; } /* Xanh lục - Rảnh */
.status-running { background: #fffde7; color: #f9a825; }   /* Vàng - Đang chạy */
.status-issue { background: #ffebee; color: #c62828; }     /* Đỏ - Hỏng */

/* Khối gợi ý AI */
.highlight { border: 2px solid #1976d2; background: #e3f2fd; position: relative; }
.score-tag { position: absolute; top: 20px; right: 20px; font-size: 1.5rem; font-weight: bold; color: #1976d2; }
.btn-assign { background: #1976d2; color: white; border: none; padding: 6px px; border-radius: 6px; cursor: pointer; font-weight: bold; transition: 0.3s; }
.btn-assign:hover { background: #1565c0; box-shadow: 0 4px 8px rgba(0,0,0,0.2); }

select.status-picker {
    width: 130px;              /* Cố định độ rộng để các hàng thẳng hàng nhau */
    padding: 8px 12px;         /* Tạo khoảng trống giữa chữ và viền (Fix lỗi dính chữ) */
    font-size: 0.85rem;
    font-weight: 700;          /* Chữ đậm cho dễ đọc */
    border-radius: 8px;        /* Bo góc mềm mại hơn */
    border: 1px solid rgba(0,0,0,0.1);
    cursor: pointer;
    text-align: center;
    text-align-last: center;   /* Căn giữa chữ trong ô select trên Chrome/Edge */
      transition: all 0.2s ease; /* Hiệu ứng mượt khi di chuột vào */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Đổ bóng nhẹ cho chuyên nghiệp */
}
/* 1. TRẠNG THÁI RẢNH (Xanh lá - Chữ trắng, Mũi tên trắng) */
select.status-available {
    background-color: #2ecc71 !important;
    color: #ffffff !important;
    }

/* 2. TRẠNG THÁI ĐANG CHẠY (Vàng - Chữ xám đậm, Mũi tên xám đậm) */
select.status-running {
    background-color: #f1c40f !important;
    color: #34495e !important;
       }

/* 3. TRẠNG THÁI SỰ CỐ (Đỏ - Chữ trắng, Mũi tên trắng) */
select.status-issue {
    background-color: #e74c3c !important;
    color: #ffffff !important;
   }
   
/* Hiệu ứng khi di chuột qua (Hover) */
select.status-picker:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
	
/* Menu gán nhanh */
.quick-assign-menu {
    background: white;
    border: 1px solid #ccc;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    border-radius: 4px;
    z-index: 1000;
    min-width: 200px;
}
.quick-assign-menu .menu-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
}
.quick-assign-menu .menu-item:hover {
    background-color: #e3f2fd;
    color: #1565c0;
}
.quick-assign-menu .menu-item:last-child {
    border-bottom: none;
}
/* 1. Khung bao quanh mã xe */
.v-code-wrapper {
    position: relative;
    display: inline-block;
    cursor: help; /* Chuyển icon chuột thành dấu chấm hỏi để gợi ý có thông tin */
    color: #1976d2; /* Màu xanh đặc trưng cho các đối tượng có thể tương tác */
}

/* 2. Khung thông tin chi tiết (Tooltip) */
.v-tooltip {
    visibility: hidden;
    width: 180px;
    background-color: #2c3e50; /* Màu nền tối sang trọng */
    color: #ffffff;
    text-align: left;
    border-radius: 4px;
    padding: 10px;
    position: absolute;
    z-index: 999; /* Đảm bảo hiện lên trên cùng, không bị bảng đè lên */
    bottom: 125%; /* Hiển thị phía trên mã xe */
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 0.8rem;
    font-weight: normal;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    line-height: 1.5;
}

/* 3. Mũi tên nhỏ trỏ xuống */
.v-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 20px;
    border-width: 6px;
    border-style: solid;
    border-color: #2c3e50 transparent transparent transparent;
}

/* 4. Hiệu ứng khi di chuột vào (Hover) */
.v-code-wrapper:hover .v-tooltip {
    visibility: visible;
    opacity: 1;
}

/* 5. Quan trọng: Đảm bảo ô của bảng không cắt mất Tooltip */
table td {
    overflow: visible !important;
}