.popup-container {
    position: fixed;
    z-index: 99999;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(3px);
    background: rgba(0,0,0,0.35);
    display: flex;
    justify-content: center;
    align-items: center;
}

.hidden { display: none; }

/* POPUP FULL WIDTH */
.popup-box {
    width: 95%;
    max-width: 1100px;
    background: white;
    border-radius: var(--radius-large);
    padding-bottom: 20px;
    animation: fadeScale 0.25s ease;
    box-shadow: var(--shadow);
}

@keyframes fadeScale {
    from { opacity: 0; transform: scale(0.94); }
    to { opacity: 1; transform: scale(1); }
}

.popup-header {
    padding: 18px 20px;
    font-size: 22px;
    font-weight: 700;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
}

.popup-content {
    padding: 20px;
}

.popup-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-light);
    text-align: right;
}

.field-row {
    display: flex;
    gap: 15px;
}

.field {
    flex: 1;
    margin-bottom: 12px;
}

.field label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.field input {
    width: 100%;
    border: 1px solid var(--border-light);
    padding: 10px;
    border-radius: var(--radius);
}


/* FIX POPUP SMALL CENTER */
#popup-full.popup-container{
    position:fixed !important;
    top:0; left:0;
    width:100vw; height:100vh;
    background:rgba(0,0,0,0.45);
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:999999 !important;
}
.popup-box{
    background:white;
    padding:20px;
    border-radius:10px;
    max-width:600px;
    width:95%;
    max-height:90vh;
    overflow-y:auto;
}

#popup-login {
    z-index: 3000;
}

#popup-login .popup-box {
    pointer-events: auto !important;
}

#popup-search .popup-small {
    width: 900px !important;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
}

#popup-search-drv {
    z-index: 2000;
}

#popup-view {
    z-index: 2500;
}

#popup-add {
    z-index: 2500;
}

#popup-edit {
    z-index: 2500;
}

/* ===== NHẮC HẠN TÀI XẾ – FIX MÀU _ TÌM KIẾM===== */
.popup-content .tx-warning {
    background: #fff3cd !important;
    color: #856404 !important;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
}

.popup-content .tx-expired {
    background: #f8d7da !important;
    color: #721c24 !important;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
    display: inline-block;
}

/* ===== NHẮC HẠN GPLX – BẢNG TÀI XẾ ===== */
.tx-warning {
    background: #fff3cd;
    color: orange;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
}

.tx-expired {
    background: #f8d7da;
    color: red;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
}

/* ===== FIX CANH CỘT DANH SÁCH TÀI XẾ ===== */

/* Canh giữa theo chiều dọc cho toàn bảng */
.htx-table td,
.htx-table th {
    vertical-align: middle;
}

/* GPLX – Đội – Nhà xe canh giữa ngang */
.htx-table td:nth-child(5), /* GPLX */
.htx-table td:nth-child(7), /* Đội */
.htx-table td:nth-child(8)  /* Nhà xe */ {
    text-align: center;
    white-space: nowrap;
}

/* Cột Hạn GPLX canh giữa + gọn */
.htx-table td:nth-child(6) {
    text-align: center;
}

/* Badge nhắc hạn */
.htx-table td:nth-child(6) span {
    display: inline-block;
    min-width: 110px;
    line-height: 1.3;
}

.tbl-actions {
    display: flex;
    gap: 6px;
}

.tbl-btn {
    padding: 4px 10px;
    border-radius: 6px;
    border: none;
    font-size: 13px;
    cursor: pointer;
    color: #fff;
}

.tbl-view { background: #6b7280; }
.tbl-edit { background: #2563eb; }
.tbl-del  { background: #dc2626; }

.tbl-btn:hover {
    opacity: 0.85;
}

.hidden {
    display: none;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.view-text {
    padding: 10px 12px;
    background: #f3f6fb;
    border-radius: 6px;
    min-height: 38px;
    white-space: pre-wrap;
}

.popup-box.large {
    width: 720px;
    max-width: 95%;
}

.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    background: #fff;
    border-radius: 10px;
    width: 420px;

    z-index: 1000;           /* CAO HƠN overlay */
    
}
