/* AuthLayout.razor.css */
.auth-shell {
    min-height: 100vh;
    background: #f3f4f6;
}


/* MainLayout.razor.css */
.page {
    position: relative;
    display: flex;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
}

.nav-fab {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 60;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #b9e5e5;
    border-radius: 6px;
    background: #e8fafa;
    color: #806000;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.nav-fab:hover {
    background: #d2f4f4;
}

.nav-flyout {
    position: fixed;
    top: 52px;
    left: 10px;
    z-index: 61;
    width: 228px;
    padding: 8px;
    box-sizing: border-box;
    background: #e8fafa;
    border: 1px solid #b9e5e5;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

main {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.main-body {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
}

@media print {
    .nav-fab,
    .nav-flyout {
        display: none !important;
    }

    .page,
    main,
    .main-body {
        display: block !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        width: 100% !important;
    }
}


/* NavMenu.razor.css */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-context {
    padding: 8px 10px 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid #b9e5e5;
}

.nav-context-name {
    color: #806000;
    font-family: Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
}

.nav-context-sub {
    margin-top: 3px;
    color: #555555;
    font-size: 12px;
}

.nav-section {
    margin: 8px 10px 2px;
    color: #806000;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 42px;
    padding: 0 12px;
    box-sizing: border-box;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #333333;
    font-family: Arial, sans-serif;
    font-size: 14px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.nav-item:hover {
    background: #d2f4f4;
    color: #003399;
    text-decoration: none;
}

.nav-item.active {
    background: #bfeeee;
    color: #003399;
    font-weight: 700;
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    font-size: 17px;
}


/* Admin.razor.css */
.admin-page {
    height: 100%;
    min-height: 0;
    padding: 12px 56px 12px 56px;
    box-sizing: border-box;
    background: #f4f5f7;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
}

.admin-header h1 {
    margin: 0;
    font-size: 20px;
    color: #806000;
}

.subtitle {
    margin-top: 4px;
    color: #555555;
    font-size: 13px;
}

.admin-message {
    margin: 10px 0;
    font-size: 14px;
}

.admin-message.error {
    color: #d00000;
}

.admin-message.ok {
    color: #198754;
}

.admin-toolbar {
    display: flex;
    gap: 8px;
    margin: 10px 0;
    align-items: center;
}

.search-input {
    height: 34px;
    width: 240px;
    padding: 0 10px;
    border: 1px solid #777777;
}

.admin-toolbar button {
    height: 34px;
    padding: 0 12px;
    border: 1px solid #777777;
    background: #f7f7f7;
    cursor: pointer;
}

.admin-toolbar button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.admin-body {
    flex: 1;
    min-height: 0;
    display: flex;
    gap: 12px;
}

.user-list {
    width: 260px;
    min-width: 220px;
    overflow: auto;
    background: white;
    border: 1px solid #bfbfbf;
}

.user-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 8px 10px;
    border: 0;
    border-bottom: 1px solid #eeeeee;
    background: white;
    text-align: left;
    cursor: pointer;
}

.user-item span {
    color: #555555;
    font-size: 12px;
}

.user-item.active {
    background: #e8fafa;
}

.user-item.left {
    color: #888888;
}

.user-item.died {
    color: #8a1f1f;
}

.user-editor {
    flex: 1;
    overflow: auto;
    background: white;
    border: 1px solid #bfbfbf;
    padding: 16px 18px 24px;
}

.user-editor h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.user-editor h3 {
    margin: 18px 0 8px;
    font-size: 15px;
    color: #806000;
}

.user-editor label {
    display: block;
    margin: 10px 0 4px;
    font-size: 13px;
    font-weight: 600;
}

.user-editor input,
.user-editor select {
    width: 100%;
    max-width: 420px;
    height: 34px;
    padding: 0 10px;
    box-sizing: border-box;
    border: 1px solid #a9a9a9;
}

.user-editor .check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    margin-top: 8px;
}

.user-editor .check input {
    width: auto;
    height: auto;
}

.permission-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 4px 16px;
}

.hint {
    color: #666666;
    font-size: 13px;
}

.profile-flag-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 8px;
}

.profile-flag-list {
    max-width: 520px;
    border: 1px solid #d8d8d8;
}

.profile-flag-head,
.profile-flag-row {
    display: grid;
    grid-template-columns: 1fr 64px 64px;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
}

.profile-flag-head {
    font-size: 12px;
    font-weight: 700;
    background: #f4f5f7;
    color: #555555;
}

.profile-flag-row {
    border-top: 1px solid #eeeeee;
    font-size: 13px;
}

.profile-flag-row .check,
.profile-flag-head span:nth-child(2),
.profile-flag-head span:nth-child(3) {
    justify-content: center;
    text-align: center;
    margin: 0;
}

.user-editor button {
    margin-top: 14px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid #777777;
    background: #f7f7f7;
    cursor: pointer;
}


/* ChangePassword.razor.css */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    background: #f3f4f6;
    font-family: Arial, sans-serif;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 36px;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.brand {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #111111;
}

.subtitle {
    margin-top: 10px;
    text-align: center;
    font-size: 15px;
    color: #666666;
}

.divider {
    height: 1px;
    margin: 28px 0 24px 0;
    background: #d6d6d6;
}

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

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 600;
    color: #222222;
}

.form-input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    box-sizing: border-box;
    border: 1px solid #a9a9a9;
    border-radius: 4px;
    outline: none;
    background: #ffffff;
    color: #111111;
    font-family: Arial, sans-serif;
    font-size: 15px;
}

.form-input:focus {
    border-color: #4b8fd8;
    box-shadow: 0 0 0 1px #4b8fd8;
}

.form-input[readonly] {
    background: #f7f7f8;
    color: #333333;
}

.message {
    margin: 2px 0 16px 0;
    font-size: 14px;
    line-height: 1.4;
}

.message.error {
    color: #d00000;
}

.message.success {
    color: #198754;
}

.login-button {
    width: 100%;
    height: 44px;
    margin-top: 4px;
    border: 0;
    border-radius: 5px;
    background: #dddddf;
    color: #111111;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.login-button:hover {
    background: #cccccf;
}

.login-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.footer {
    margin-top: 28px;
    text-align: center;
    color: #999999;
    font-size: 11px;
}

@media (max-width: 520px) {
    .login-page {
        padding: 12px;
    }

    .login-card {
        padding: 28px 22px;
    }
}


/* Dashboard.razor.css */
.dashboard-page {
    min-height: 100vh;
    background: #f3f4f6;
}

.topbar {
    height: 70px;
    padding: 0 56px 0 56px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: white;

    border-bottom: 1px solid #dddddd;
}

.title {
    font-size: 20px;
    font-weight: 700;
}

.subtitle {
    margin-top: 3px;
    color: #777777;
    font-size: 13px;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.user-info span {
    color: #777777;
    font-size: 12px;
}

.logout-button {
    height: 36px;
    padding: 0 16px;

    border: 1px solid #cccccc;
    border-radius: 6px;

    background: white;

    font-size: 14px;
    cursor: pointer;
}

.logout-button:hover {
    background: #f2f2f2;
}

.content {
    padding: 36px;
}

.content h1 {
    margin-top: 0;
}

.hint {
    color: #777777;
}

.permission-box {
    max-width: 600px;

    margin-top: 30px;
    padding: 20px;

    background: white;

    border-radius: 8px;

    border: 1px solid #dddddd;
}


/* EstimateProgress.razor.css */
.estimate-page .legend {
    margin-bottom: 8px;
}

.est-legend-plain {
    background: #ffffff;
    border: 1px solid #cfcfcf;
}

.est-legend-medium {
    background: rgba(0, 191, 143, 0.6);
}

.est-legend-high {
    background: rgba(244, 185, 0, 0.6);
}

.est-legend-urgent {
    background: rgba(255, 16, 16, 0.6);
}

.estimate-page .progress-table {
    border-collapse: separate;
    border-spacing: 0;
    /* Chỉ rộng bằng tổng cột — không min-width:100% (kéo rộng cửa sổ tạo “cột trống”). */
    width: max-content;
    min-width: 0;
    table-layout: fixed;
}

.estimate-page .progress-table thead th {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #e7e6e6 !important;
    box-shadow: none;
}

.estimate-page .progress-table thead th.col-sheet-line {
    z-index: 22;
}

.estimate-page .progress-table thead th.col-project,
.estimate-page .progress-table thead th.col-assignee,
.estimate-page .progress-table thead th.col-est-status {
    z-index: 21;
}

.estimate-page .progress-table thead th.col-sheet-line.filter-open,
.estimate-page .progress-table thead th.col-project.filter-open,
.estimate-page .progress-table thead th.col-assignee.filter-open,
.estimate-page .progress-table thead th.col-est-status.filter-open {
    z-index: 10055;
}

.estimate-page .id-filter-dropdown {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 140px;
    padding: 8px;
}

.estimate-page .id-filter-go {
    height: 28px;
    padding: 0 8px;
    border: 1px solid #808080;
    background: #f3f3f3;
    font-size: 12px;
    cursor: pointer;
}

/* Cột 5: Tên công việc — cố định = cột Tiến độ (300px) */
.estimate-table .col-task {
    width: 300px;
    min-width: 300px;
    max-width: 300px;
}

/* table-cell + relative: ô giãn theo hàng, nét lưới bám đúng ô. */
.estimate-table td.col-task,
.estimate-page .progress-table td.col-task,
.estimate-page tr.task-row td.col-task {
    display: table-cell !important;
    position: relative !important;
    vertical-align: middle !important;
    height: auto !important;
    overflow: visible;
    align-content: normal;
    align-items: stretch;
}

.estimate-page td.col-task .task-name-cell,
.estimate-page tr.task-row td.col-task .task-name-cell {
    display: block;
    position: static;
    width: 100%;
    height: auto;
    align-self: auto;
}

.estimate-page td.col-task textarea.task-name-input,
.estimate-page tr.task-row td.col-task textarea.task-name-input,
.estimate-page tr.task-row td.col-task textarea.task-name-input:disabled {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 1px 4px !important;
    line-height: 16.94px !important;
    min-height: 19.36px !important;
    max-height: none !important;
    height: auto;
    overflow: hidden;
    resize: none;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    field-sizing: content;
    background: transparent !important;
}

.estimate-page tr.project-row > td {
    vertical-align: middle !important;
}

.estimate-table .col-priority {
    width: 92px;
    min-width: 92px;
    max-width: 92px;
}

/* Cột 6–7: width cố định tối thiểu (không chỉ min-width — fixed layout vẫn nén min về 0). */
.estimate-table .col-wrap {
    white-space: normal;
}

.estimate-table .col-wrap-request {
    /* "Chủ trì thiết kế yêu cầu nội dung chi tiết" */
    width: 220px;
    min-width: 220px;
    max-width: 220px;
}

.estimate-table .col-wrap-issues {
    /* "Các khó khăn, vướng mắc khi thực hiện" */
    width: 215px;
    min-width: 215px;
    max-width: 215px;
}

.estimate-table th.col-wrap-request,
.estimate-table th.col-wrap-issues {
    white-space: nowrap;
}

.estimate-table .col-lead-pct {
    width: 58px;
    min-width: 58px;
    max-width: 58px;
    white-space: normal;
}

.estimate-table th.col-lead-pct,
.estimate-table th.col-date,
.estimate-table th.col-days,
.estimate-table th.col-progress,
.estimate-table th.col-status {
    height: auto;
    min-height: 72px;
    padding: 2px 1px;
    font-size: 10px;
    line-height: 1.15;
    white-space: normal;
}

.estimate-table .col-date,
.estimate-table .col-days {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
}

.estimate-table .col-status,
.estimate-table th.col-status,
.estimate-table td.col-status {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
}

.estimate-page .col-wrap-request textarea::placeholder,
.estimate-page .col-wrap-issues textarea::placeholder {
    color: #888888 !important;
    -webkit-text-fill-color: #888888 !important;
    opacity: 0.65 !important;
    font-style: italic;
    font-weight: 400;
    white-space: pre-wrap;
}

.estimate-table .col-progress {
    width: 56px;
    min-width: 56px;
    max-width: 56px;
}

/* Cột 15: đủ cho "Hoàn thành, trễ hơn dự kiến" (Arial 12px + padding). */
.estimate-table .col-est-status {
    position: sticky;
    top: 0;
    width: 196px;
    min-width: 196px;
    max-width: 196px;
}

.estimate-table th.col-est-status {
    z-index: 21;
    background: #e7e6e6 !important;
    width: 196px;
    min-width: 196px;
    max-width: 196px;
}

.estimate-table .est-status-text {
    max-width: 100%;
}

.estimate-table .est-status-text {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    min-height: 19.36px;
    padding: 1px 4px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 16.94px;
    white-space: normal;
}

.estimate-table th.col-priority,
.estimate-table th.col-wrap,
.estimate-table th.col-lead-pct,
.estimate-table th.col-est-status,
.estimate-table th.col-progress,
.estimate-table th.col-date,
.estimate-table th.col-days,
.estimate-table th.col-status {
    font-size: 10px;
    line-height: 1.2;
}

/* Same Arial 12px for header + task content cells. */
.estimate-page .progress-table input:not([type="checkbox"]),
.estimate-page .progress-table select,
.estimate-page .progress-table textarea.task-name-input,
.estimate-page .progress-table .task-project-name,
.estimate-page .progress-table .task-number,
.estimate-page .progress-table .project-code-input,
.estimate-page .progress-table .est-status-text {
    font-family: Arial, sans-serif !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 16.94px;
}

/* Project header: bold blue entire row (beat Progress + base 400 rules). */
.estimate-page .progress-table tr.project-row,
.estimate-page .progress-table tr.project-row td,
.estimate-page .progress-table tr.project-row td.col-sheet-line,
.estimate-page .progress-table tr.project-row td *,
.estimate-page .progress-table tr.project-row .task-project-name,
.estimate-page .progress-table tr.project-row .project-code-input,
.estimate-page .progress-table tr.project-row span,
.estimate-page .progress-table tr.project-row input,
.estimate-page .progress-table tr.project-row input:disabled,
.estimate-page .progress-table tr.project-row select,
.estimate-page .progress-table tr.project-row select:disabled,
.estimate-page .progress-table tr.project-row select option,
.estimate-page .progress-table tr.project-row textarea,
.estimate-page .progress-table tr.project-row textarea:disabled,
.estimate-page .progress-table tr.project-row textarea.task-name-input {
    font-family: Arial, sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #0000cc !important;
    -webkit-text-fill-color: #0000cc !important;
}

/* Dòng kê việc (kể cả của user đang đăng nhập): chữ đen như user khác. */
.estimate-page .progress-table tr.task-row,
.estimate-page .progress-table tr.task-row td:not(.approved-cell):not(.rejected-cell),
.estimate-page .progress-table tr.task-row td:not(.approved-cell):not(.rejected-cell) *,
.estimate-page .progress-table tr.task-row input,
.estimate-page .progress-table tr.task-row select,
.estimate-page .progress-table tr.task-row textarea,
.estimate-page .progress-table tr.task-row span {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    font-weight: 400 !important;
}

/* Dòng kê việc của user đang đăng nhập: chữ đen. Đầu mục dự án luôn xanh đậm. */
.estimate-page .progress-table tr.task-row.est-current-user,
.estimate-page .progress-table tr.task-row.est-current-user td:not(.approved-cell):not(.rejected-cell),
.estimate-page .progress-table tr.task-row.est-current-user td:not(.approved-cell):not(.rejected-cell) *,
.estimate-page .progress-table tr.task-row.est-current-user span,
.estimate-page .progress-table tr.task-row.est-current-user input,
.estimate-page .progress-table tr.task-row.est-current-user input:disabled,
.estimate-page .progress-table tr.task-row.est-current-user select,
.estimate-page .progress-table tr.task-row.est-current-user textarea {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

.estimate-page .progress-table tr.project-row.est-current-user,
.estimate-page .progress-table tr.project-row.est-current-user td,
.estimate-page .progress-table tr.project-row.est-current-user td.col-sheet-line,
.estimate-page .progress-table tr.project-row.est-current-user td *,
.estimate-page .progress-table tr.project-row.est-current-user .task-project-name,
.estimate-page .progress-table tr.project-row.est-current-user .project-code-input,
.estimate-page .progress-table tr.project-row.est-current-user span,
.estimate-page .progress-table tr.project-row.est-current-user input,
.estimate-page .progress-table tr.project-row.est-current-user input:disabled,
.estimate-page .progress-table tr.project-row.est-current-user select,
.estimate-page .progress-table tr.project-row.est-current-user textarea,
.estimate-page .progress-table tr.project-row.est-current-user textarea.task-name-input {
    color: #0000cc !important;
    -webkit-text-fill-color: #0000cc !important;
    font-weight: 700 !important;
}

.estimate-page .progress-table tr.task-row td.approved-cell,
.estimate-page .progress-table tr.task-row td.approved-cell select,
.estimate-page .progress-table tr.task-row td.approved-cell select:disabled {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Cột 6–7: textarea cao theo nội dung, căn giữa đứng trong ô. */
.estimate-page .progress-table td.col-wrap-request,
.estimate-page .progress-table td.col-wrap-issues,
.estimate-page tr.task-row td.col-wrap-request,
.estimate-page tr.task-row td.col-wrap-issues {
    vertical-align: middle !important;
}

.estimate-page td.col-wrap-request textarea.task-name-input,
.estimate-page td.col-wrap-issues textarea.task-name-input,
.estimate-page tr.task-row td.col-wrap-request textarea.task-name-input,
.estimate-page tr.task-row td.col-wrap-issues textarea.task-name-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 1px 4px !important;
    line-height: 16.94px !important;
    min-height: 19.36px !important;
    height: auto;
    overflow: hidden;
    resize: none;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.estimate-page tr.task-row td.col-sheet-line {
    font-family: Arial, sans-serif !important;
    font-size: 12px !important;
    font-weight: 400 !important;
}

/*
 * Cột ID sticky (Progress mặc định #f0f0f0) phải cùng màu cột No. / hàng.
 * Không dùng nền xám riêng cho ID trên trang Dự toán.
 */
.estimate-page .progress-table td.col-sheet-line,
.estimate-page .progress-table tr.task-row td.col-sheet-line,
.estimate-page .progress-table tr.project-row td.col-sheet-line {
    background: #ffffff !important;
}

/* Đầu mục dự án: nền ô trắng (không cyan Progress); chữ xanh do rule riêng. */
.estimate-page .progress-table tr.project-row,
.estimate-page .progress-table tr.project-row > td,
.estimate-page .progress-table tr.project-row > td.col-sheet-line,
.estimate-page .progress-table tr.project-row > td.col-no,
.estimate-page .progress-table tr.project-row > td.col-task,
.estimate-page .progress-table tr.project-row > td.col-assignee {
    background-color: #ffffff !important;
    background: #ffffff !important;
}

/* Cấp độ / pending: tô đồng bộ cả hàng kể cả cột ID sticky + cột No. */
.estimate-page .progress-table tr.est-level-plain,
.estimate-page .progress-table tr.est-level-plain td:not(.pct-fill-cell),
.estimate-page .progress-table tr.est-level-plain td.col-sheet-line,
.estimate-page .progress-table tr.est-level-plain td.col-no,
.estimate-page .progress-table tr.project-row.est-level-plain,
.estimate-page .progress-table tr.project-row.est-level-plain td:not(.pct-fill-cell),
.estimate-page .progress-table tr.project-row.est-level-plain td.col-sheet-line,
.estimate-page .progress-table tr.project-row.est-level-plain td.col-no,
.estimate-page .progress-table tr.task-row.est-level-plain,
.estimate-page .progress-table tr.task-row.est-level-plain td:not(.pct-fill-cell),
.estimate-page .progress-table tr.task-row.est-level-plain td.col-sheet-line,
.estimate-page .progress-table tr.task-row.est-level-plain td.col-no {
    background: #ffffff !important;
}

.estimate-page .progress-table tr.project-row.est-priority-pending,
.estimate-page .progress-table tr.project-row.est-priority-pending td,
.estimate-page .progress-table tr.project-row.est-priority-pending td.col-sheet-line,
.estimate-page .progress-table tr.project-row.est-priority-pending td.col-no {
    background: #ffffff !important;
}

.estimate-page .progress-table tr.project-row.est-priority-pending input,
.estimate-page .progress-table tr.project-row.est-priority-pending select,
.estimate-page .progress-table tr.project-row.est-priority-pending textarea,
.estimate-page .progress-table tr.project-row.est-priority-pending input:disabled,
.estimate-page .progress-table tr.project-row.est-priority-pending select:disabled,
.estimate-page .progress-table tr.project-row.est-priority-pending textarea:disabled {
    background-color: transparent !important;
    background: transparent !important;
}

.estimate-page .progress-table tr.est-level-medium,
.estimate-page .progress-table tr.est-level-medium td:not(.pct-fill-cell),
.estimate-page .progress-table tr.est-level-medium td.col-sheet-line,
.estimate-page .progress-table tr.est-level-medium td.col-no,
.estimate-page .progress-table tr.project-row.est-level-medium,
.estimate-page .progress-table tr.project-row.est-level-medium td:not(.pct-fill-cell),
.estimate-page .progress-table tr.project-row.est-level-medium td.col-sheet-line,
.estimate-page .progress-table tr.project-row.est-level-medium td.col-no,
.estimate-page .progress-table tr.task-row.est-level-medium,
.estimate-page .progress-table tr.task-row.est-level-medium td:not(.pct-fill-cell),
.estimate-page .progress-table tr.task-row.est-level-medium td.col-sheet-line,
.estimate-page .progress-table tr.task-row.est-level-medium td.col-no {
    background: rgba(0, 191, 143, 0.6) !important;
}

.estimate-page .progress-table tr.est-level-high,
.estimate-page .progress-table tr.est-level-high td:not(.pct-fill-cell),
.estimate-page .progress-table tr.est-level-high td.col-sheet-line,
.estimate-page .progress-table tr.est-level-high td.col-no,
.estimate-page .progress-table tr.project-row.est-level-high,
.estimate-page .progress-table tr.project-row.est-level-high td:not(.pct-fill-cell),
.estimate-page .progress-table tr.project-row.est-level-high td.col-sheet-line,
.estimate-page .progress-table tr.project-row.est-level-high td.col-no,
.estimate-page .progress-table tr.task-row.est-level-high,
.estimate-page .progress-table tr.task-row.est-level-high td:not(.pct-fill-cell),
.estimate-page .progress-table tr.task-row.est-level-high td.col-sheet-line,
.estimate-page .progress-table tr.task-row.est-level-high td.col-no {
    background: rgba(244, 185, 0, 0.6) !important;
}

.estimate-page .progress-table tr.est-level-urgent td:not(.pct-fill-cell),
.estimate-page .progress-table tr.est-level-urgent td.col-sheet-line,
.estimate-page .progress-table tr.est-level-urgent td.col-no,
.estimate-page .progress-table tr.project-row.est-level-urgent td:not(.pct-fill-cell),
.estimate-page .progress-table tr.project-row.est-level-urgent td.col-sheet-line,
.estimate-page .progress-table tr.project-row.est-level-urgent td.col-no,
.estimate-page .progress-table tr.task-row.est-level-urgent td:not(.pct-fill-cell),
.estimate-page .progress-table tr.task-row.est-level-urgent td.col-sheet-line,
.estimate-page .progress-table tr.task-row.est-level-urgent td.col-no {
    background: rgba(255, 16, 16, 0.6) !important;
}

.estimate-page tr.est-level-medium input,
.estimate-page tr.est-level-medium select,
.estimate-page tr.est-level-medium textarea,
.estimate-page tr.est-level-medium input:disabled,
.estimate-page tr.est-level-medium select:disabled,
.estimate-page tr.est-level-medium textarea:disabled,
.estimate-page tr.est-level-high input,
.estimate-page tr.est-level-high select,
.estimate-page tr.est-level-high textarea,
.estimate-page tr.est-level-high input:disabled,
.estimate-page tr.est-level-high select:disabled,
.estimate-page tr.est-level-high textarea:disabled,
.estimate-page tr.est-level-urgent input,
.estimate-page tr.est-level-urgent select,
.estimate-page tr.est-level-urgent textarea,
.estimate-page tr.est-level-urgent input:disabled,
.estimate-page tr.est-level-urgent select:disabled,
.estimate-page tr.est-level-urgent textarea:disabled,
.estimate-page tr.est-level-plain input,
.estimate-page tr.est-level-plain select,
.estimate-page tr.est-level-plain textarea,
.estimate-page tr.est-level-plain input:disabled,
.estimate-page tr.est-level-plain select:disabled,
.estimate-page tr.est-level-plain textarea:disabled,
.estimate-page tr.project-row.est-level-plain input,
.estimate-page tr.project-row.est-level-plain select,
.estimate-page tr.project-row.est-level-plain textarea,
.estimate-page tr.project-row.est-level-medium input,
.estimate-page tr.project-row.est-level-medium select,
.estimate-page tr.project-row.est-level-medium textarea,
.estimate-page tr.project-row.est-level-high input,
.estimate-page tr.project-row.est-level-high select,
.estimate-page tr.project-row.est-level-high textarea,
.estimate-page tr.project-row.est-level-urgent input,
.estimate-page tr.project-row.est-level-urgent select,
.estimate-page tr.project-row.est-level-urgent textarea,
.estimate-page tr.task-row.est-level-medium input,
.estimate-page tr.task-row.est-level-medium select,
.estimate-page tr.task-row.est-level-medium textarea,
.estimate-page tr.task-row.est-level-high input,
.estimate-page tr.task-row.est-level-high select,
.estimate-page tr.task-row.est-level-high textarea,
.estimate-page tr.task-row.est-level-urgent input,
.estimate-page tr.task-row.est-level-urgent select,
.estimate-page tr.task-row.est-level-urgent textarea {
    background-color: transparent !important;
    background: transparent !important;
}

/*
 * Đầu mục: input/textarea (Người làm, Tên công việc, …) trong suốt
 * để hiện đúng màu cấp độ của ô — không xám disabled (#eceff3) lệch cột No.
 */
.estimate-page .progress-table tr.project-row input,
.estimate-page .progress-table tr.project-row select,
.estimate-page .progress-table tr.project-row textarea,
.estimate-page .progress-table tr.project-row input:disabled,
.estimate-page .progress-table tr.project-row select:disabled,
.estimate-page .progress-table tr.project-row textarea:disabled,
.estimate-page .progress-table tr.project-row .task-name-cell,
.estimate-page .progress-table tr.project-row td.col-task,
.estimate-page .progress-table tr.project-row td.delegated-assignee,
.estimate-page .progress-table tr.project-row td.delegated-assignee input,
.estimate-page .progress-table tr.project-row td.delegated-assignee input:disabled {
    background-color: transparent !important;
    background: transparent !important;
}

/* Cấp độ trên td.col-task / assignee — cùng màu cột No. */
.estimate-page .progress-table tr.project-row.est-level-medium > td.col-task,
.estimate-page .progress-table tr.project-row.est-level-medium > td.col-assignee,
.estimate-page .progress-table tr.project-row.est-level-medium > td.delegated-assignee {
    background: rgba(0, 191, 143, 0.6) !important;
}

.estimate-page .progress-table tr.project-row.est-level-high > td.col-task,
.estimate-page .progress-table tr.project-row.est-level-high > td.col-assignee,
.estimate-page .progress-table tr.project-row.est-level-high > td.delegated-assignee {
    background: rgba(244, 185, 0, 0.6) !important;
}

.estimate-page .progress-table tr.project-row.est-level-urgent > td.col-task,
.estimate-page .progress-table tr.project-row.est-level-urgent > td.col-assignee,
.estimate-page .progress-table tr.project-row.est-level-urgent > td.delegated-assignee {
    background: rgba(255, 16, 16, 0.6) !important;
}

.estimate-page .progress-table tr.project-row.est-level-plain > td.col-task,
.estimate-page .progress-table tr.project-row.est-level-plain > td.col-assignee,
.estimate-page .progress-table tr.project-row.est-level-plain > td.delegated-assignee {
    background: #ffffff !important;
}

.estimate-page .progress-table tr.project-row.est-priority-pending > td.col-task,
.estimate-page .progress-table tr.project-row.est-priority-pending > td.col-assignee,
.estimate-page .progress-table tr.project-row.est-priority-pending > td.delegated-assignee {
    background: #ffffff !important;
}

/* % HT / chủ trì xác nhận: xanh blue nhạt 50%, tô theo % từ trái; phần còn lại trắng (không lấy màu cấp độ). */
.estimate-page .progress-table td.pct-fill-cell,
.estimate-page .progress-table tr.task-row td.pct-fill-cell,
.estimate-page .progress-table tr.est-level-medium td.pct-fill-cell,
.estimate-page .progress-table tr.est-level-high td.pct-fill-cell,
.estimate-page .progress-table tr.est-level-urgent td.pct-fill-cell,
.estimate-page .progress-table tr.est-level-plain td.pct-fill-cell,
.estimate-page .progress-table tr.task-row.est-level-medium td.pct-fill-cell,
.estimate-page .progress-table tr.task-row.est-level-high td.pct-fill-cell,
.estimate-page .progress-table tr.task-row.est-level-urgent td.pct-fill-cell,
.estimate-page .progress-table tr.task-row.est-level-plain td.pct-fill-cell,
.estimate-page .progress-table tr.task-row.est-level-medium td.col-lead-pct.pct-fill-cell,
.estimate-page .progress-table tr.task-row.est-level-medium td.col-progress.pct-fill-cell,
.estimate-page .progress-table tr.task-row.est-level-high td.col-lead-pct.pct-fill-cell,
.estimate-page .progress-table tr.task-row.est-level-high td.col-progress.pct-fill-cell,
.estimate-page .progress-table tr.task-row.est-level-urgent td.col-lead-pct.pct-fill-cell,
.estimate-page .progress-table tr.task-row.est-level-urgent td.col-progress.pct-fill-cell {
    background-color: #ffffff !important;
    background-image: linear-gradient(
        to right,
        rgba(100, 149, 237, 0.5) 0,
        rgba(100, 149, 237, 0.5) var(--pct, 0%),
        #ffffff var(--pct, 0%)
    ) !important;
    background-size: 100% 100% !important;
    background-repeat: no-repeat !important;
}

.estimate-page .progress-table td.pct-fill-cell input,
.estimate-page .progress-table td.pct-fill-cell input:disabled,
.estimate-page .progress-table tr.task-row td.pct-fill-cell input,
.estimate-page .progress-table tr.task-row td.pct-fill-cell input:disabled {
    background-color: transparent !important;
    background: transparent !important;
}

/* Cột 8–14: chữ/nội dung kê việc căn giữa ô. */
.estimate-page .progress-table td.col-priority,
.estimate-page .progress-table td.col-lead-pct,
.estimate-page .progress-table td.col-date,
.estimate-page .progress-table td.col-days,
.estimate-page .progress-table td.col-progress {
    vertical-align: middle !important;
    text-align: center !important;
}

.estimate-page .progress-table td.col-priority select,
.estimate-page .progress-table td.col-priority select:disabled,
.estimate-page .progress-table td.col-lead-pct input,
.estimate-page .progress-table td.col-lead-pct input:disabled,
.estimate-page .progress-table td.col-date input,
.estimate-page .progress-table td.col-date input:disabled,
.estimate-page .progress-table td.col-days input,
.estimate-page .progress-table td.col-days input:disabled,
.estimate-page .progress-table td.col-progress input,
.estimate-page .progress-table td.col-progress input:disabled {
    text-align: center !important;
    vertical-align: middle;
}

.estimate-page .progress-table tr.task-row.est-task-locked input:disabled,
.estimate-page .progress-table tr.task-row.est-task-locked select:disabled,
.estimate-page .progress-table tr.task-row.est-task-locked textarea:disabled {
    cursor: not-allowed;
}

@media print {
    .estimate-page .header-actions,
    .estimate-page .legend,
    .estimate-page .filter-toggle,
    .estimate-page .filter-dropdown,
    .estimate-page .filter-backdrop {
        display: none !important;
    }

    .estimate-page .progress-header {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-bottom: 3mm;
        justify-content: center;
        text-align: center;
        align-items: center;
    }

    .estimate-page .progress-header h1 {
        width: 100%;
        text-align: center;
        font-size: 12pt;
        margin: 0;
    }

    .estimate-page .progress-table thead th {
        position: static !important;
        top: auto !important;
        height: auto !important;
        padding: 1mm 0.35mm !important;
        font-size: 6.5pt !important;
        line-height: 1.15;
        white-space: normal !important;
    }

    .estimate-page .progress-table {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        table-layout: fixed !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    .estimate-page .progress-table td,
    .estimate-page .progress-table th {
        height: auto !important;
        min-height: 0 !important;
        border: 0 !important;
        border-right: 0.75pt solid #000 !important;
        border-bottom: 0.75pt solid #000 !important;
    }

    .estimate-page .progress-table thead th {
        border-top: 0.75pt solid #000 !important;
    }

    .estimate-page .progress-table .col-no {
        border-left: 0.75pt solid #000 !important;
    }

    .estimate-page .progress-table input,
    .estimate-page .progress-table select,
    .estimate-page .progress-table textarea,
    .estimate-page .progress-table span,
    .estimate-page td.col-task textarea.task-name-input,
    .estimate-page tr.task-row td.col-task textarea.task-name-input,
    .estimate-page td.col-wrap-request textarea.task-name-input,
    .estimate-page td.col-wrap-issues textarea.task-name-input,
    .estimate-page tr.task-row td.col-wrap-request textarea.task-name-input,
    .estimate-page tr.task-row td.col-wrap-issues textarea.task-name-input {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        padding: 0.08mm 0.3mm !important;
        line-height: 1.12 !important;
        font-size: 6.5pt !important;
        field-sizing: content !important;
    }

    .estimate-table .col-no { width: 3% !important; min-width: 0 !important; max-width: none !important; }
    .estimate-table .col-project { width: 8% !important; min-width: 0 !important; max-width: none !important; }
    .estimate-table .col-assignee { width: 7% !important; min-width: 0 !important; max-width: none !important; }
    .estimate-table .col-task { width: 16% !important; min-width: 0 !important; max-width: none !important; }
    .estimate-table .col-wrap-request { width: 13% !important; min-width: 0 !important; max-width: none !important; }
    .estimate-table .col-wrap-issues { width: 13% !important; min-width: 0 !important; max-width: none !important; }
    .estimate-table .col-priority { width: 6% !important; min-width: 0 !important; max-width: none !important; }
    .estimate-table .col-lead-pct,
    .estimate-table .col-days,
    .estimate-table .col-progress { width: 4.5% !important; min-width: 0 !important; max-width: none !important; }
    .estimate-table .col-date { width: 5% !important; min-width: 0 !important; max-width: none !important; }
    .estimate-table .col-status,
    .estimate-table .col-est-status { width: 6% !important; min-width: 0 !important; max-width: none !important; }
}


/* Login.razor.css */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    background: #f3f4f6;
    font-family: Arial, sans-serif;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 36px;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.brand {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #111111;
}

.subtitle {
    margin-top: 10px;
    text-align: center;
    font-size: 15px;
    color: #666666;
}

.divider {
    height: 1px;
    margin: 28px 0 24px 0;
    background: #d6d6d6;
}

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

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 600;
    color: #222222;
}

.form-input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    box-sizing: border-box;
    border: 1px solid #a9a9a9;
    border-radius: 4px;
    outline: none;
    background: #ffffff;
    color: #111111;
    font-family: Arial, sans-serif;
    font-size: 15px;
}

.form-input:focus {
    border-color: #4b8fd8;
    box-shadow: 0 0 0 1px #4b8fd8;
}

.message {
    margin: 2px 0 16px 0;
    font-size: 14px;
    line-height: 1.4;
}

.message.error {
    color: #d00000;
}

.login-button {
    width: 100%;
    height: 44px;
    margin-top: 4px;
    border: 0;
    border-radius: 5px;
    background: #dddddf;
    color: #111111;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.login-button:hover {
    background: #cccccf;
}

.login-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.footer {
    margin-top: 28px;
    text-align: center;
    color: #999999;
    font-size: 11px;
}

@media (max-width: 520px) {
    .login-page {
        padding: 12px;
    }

    .login-card {
        padding: 28px 22px;
    }
}


/* Profile.razor.css */
.profile-page {
    height: 100%;
    min-height: 0;
    padding: 12px 56px 24px 56px;
    box-sizing: border-box;
    background: #f4f5f7;
    font-family: Arial, sans-serif;
    overflow: auto;
}

.profile-header h1 {
    margin: 0;
    font-size: 20px;
    color: #806000;
}

.subtitle {
    margin-top: 4px;
    color: #555555;
    font-size: 13px;
}

.profile-message {
    margin: 10px 0;
    font-size: 14px;
}

.profile-message.error {
    color: #d00000;
}

.profile-message.ok {
    color: #198754;
}

.profile-card {
    max-width: 520px;
    margin-top: 16px;
    padding: 16px 18px 20px;
    background: white;
    border: 1px solid #bfbfbf;
}

.profile-card h2 {
    margin: 0 0 12px;
    font-size: 16px;
    color: #806000;
}

.profile-card label {
    display: block;
    margin: 10px 0 4px;
    font-size: 13px;
    font-weight: 600;
}

.profile-card input,
.profile-card select {
    width: 100%;
    max-width: 420px;
    height: 34px;
    padding: 0 10px;
    box-sizing: border-box;
    border: 1px solid #a9a9a9;
}

.profile-card input:disabled,
.profile-card select:disabled {
    background: #f2f2f2;
    color: #555555;
}

.profile-card button {
    margin-top: 14px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid #777777;
    background: #f7f7f7;
    cursor: pointer;
}

.hint {
    color: #666666;
    font-size: 13px;
}


/* Progress.razor.css */
.progress-page {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    padding: 12px;
    padding-bottom: calc(12px + 22px);
    box-sizing: border-box;
    background: #f4f5f7;
    font-family: Arial, sans-serif;
}


/* ============================================================
   HEADER
   ============================================================ */

.progress-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
    padding-left: 44px;
    padding-right: 12px;
}

.header-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    flex: 1 1 auto;
    text-align: left;
}

.progress-header h1 {
    margin: 0;
    font-size: 17px;
    line-height: 1.25;
    font-weight: 700;
    color: #806000;
    text-align: left;
}

.progress-header .subtitle {
    margin-top: 4px;
    color: #555555;
    font-size: 13px;
}

.progress-header .user-info {
    display: block;
    margin-top: 5px;
    color: #555555;
    font-size: 13px;
    font-style: normal;
    text-align: left;
    white-space: nowrap;
}

.progress-header .user-info strong {
    color: #003399;
    font-size: 13px;
    font-weight: 700;
}


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

.header-actions button {
    height: 34px;
    padding: 0 12px;
    border: 1px solid #777777;
    background: #f7f7f7;
    font-size: 13px;
    cursor: pointer;
}

.header-actions button:hover {
    background: #e9e9e9;
}


.header-actions button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    background: #eeeeee;
    color: #888888;
}

.header-menu-wrap {
    position: relative;
}

.header-actions button.header-menu-fab {
    width: 34px;
    min-width: 34px;
    padding: 0;
    border: 1px solid #b9e5e5;
    border-radius: 6px;
    background: #e8fafa;
    color: #806000;
    font-size: 18px;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.header-actions button.header-menu-fab:hover {
    background: #d2f4f4;
}

.header-admin-flyout {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 10060;
    width: 280px;
    padding: 5px 0;
    background: #ffffff;
    border: 1px solid #9c9c9c;
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.24);
}

.header-actions .header-admin-flyout button {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #222222;
    font-family: Arial, sans-serif;
    font-size: 13px;
    text-align: left;
    box-shadow: none;
    cursor: pointer;
}

.header-actions .header-admin-flyout button:hover:not(:disabled) {
    background: #e8f1fb;
}

.header-actions .header-admin-flyout button.delete-command {
    color: #c00000;
}

.header-actions .header-admin-flyout button.delete-command:hover:not(:disabled) {
    background: #ffe8e8;
}

.header-actions .header-admin-flyout button:disabled {
    color: #aaaaaa;
    cursor: not-allowed;
    background: transparent;
    opacity: 0.65;
}


/* ============================================================
   LEGEND
   ============================================================ */

.legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    margin: 6px 0 10px 0;
    font-size: 13px;
    font-style: italic;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    display: inline-block;
    width: 34px;
    height: 15px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.legend-project {
    background: #08a8df;
}

.legend-member {
    background: #63efbe;
}

.legend-actual {
    background: #00bf8f;
}

/* Vượt tiến độ = CYAN */
.legend-good {
    background: #00e5e5;
}

.legend-slow {
    background: #f4b900;
}

.legend-late {
    background: #ff1010;
}


.sheet-locked-banner {
    margin: 0 0 10px;
    padding: 8px 12px;
    background: #fff3cd;
    border: 1px solid #e0c36a;
    color: #7a5b00;
    font-size: 13px;
    font-weight: 600;
}

.sheet-toast {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 11000;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: min(380px, calc(100vw - 32px));
    padding: 12px 10px 12px 14px;
    background: #ffffff;
    border: 1px solid #c8c8c8;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    color: #222222;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 400;
}

.sheet-toast-message {
    flex: 1 1 auto;
    min-width: 0;
}

.sheet-toast-message .toast-hl-blue {
    color: #08a8df;
    font-weight: 700;
}

.sheet-toast-message .toast-hl-red {
    color: #c00000;
    font-weight: 700;
}

.sheet-toast-close {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    margin: -2px -2px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #666666;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.sheet-toast-close:hover {
    color: #111111;
}


/* ============================================================
   TABLE WRAPPER
   ============================================================ */

.table-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow: auto;
    background: white;
    border: 1px solid #bfbfbf;
    padding-bottom: 22px;
    box-sizing: border-box;
}


/* ============================================================
   TABLE
   ============================================================ */

.progress-table {
    width: max-content;
    min-width: max-content;
    border-collapse: collapse;
    table-layout: fixed;
    background: white;
}

.progress-table th {
    box-sizing: border-box;
    height: 52px;
    padding: 4px 3px;
    border: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid rgba(0, 0, 0, 0.6);
    background: #e7e6e6;
    color: #806000;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    vertical-align: middle;
    white-space: normal;
    position: sticky;
    top: 0;
    z-index: 8;
}

.progress-table td {
    box-sizing: border-box;
    height: auto;
    min-height: 19.36px;
    padding: 0;
    border: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid rgba(0, 0, 0, 0.6);
    background: white;
    vertical-align: middle;
}

.progress-table th:first-child,
.progress-table td:first-child {
    border-left: 1px solid rgba(0, 0, 0, 0.6);
}

.progress-table thead th {
    border-top: 1px solid rgba(0, 0, 0, 0.6);
}


/* ============================================================
   INPUT / SELECT
   MẶC ĐỊNH: NỀN TRẮNG + CHỮ ĐEN
   ============================================================ */

.progress-table input:not([type="checkbox"]),
.progress-table select {
    box-sizing: border-box;
    width: 100%;
    height: 19.36px;
    margin: 0;
    padding: 1px 4px;
    border: 0;
    outline: none;

    background: transparent;
    color: #000000;

    font-family: Arial, sans-serif;
    font-size: 12px;
}

.progress-table input:not([type="checkbox"]):focus,
.progress-table select:focus,
.progress-table textarea.task-name-input:focus {
    box-shadow:
        inset 0 0 0 2px #5b9bd5;
}


/* ============================================================
   DISABLED / LOCKED INPUTS
   ============================================================ */

/*
 * Không đổi kích thước ô khi bị khóa.
 * Chỉ thay cursor và độ tương phản nhẹ.
 */
.progress-table input:disabled,
.progress-table select:disabled,
.progress-table textarea.task-name-input:disabled {
    opacity: 1;
    cursor: default;
    color: #555555;
    background: #f2f2f2;
    /* Cho phép chuột phải tới ô cha (lọc theo user) */
    pointer-events: none;
}

/*
 * Dòng công việc của user khác hoặc đã khóa.
 */
.task-row input:disabled,
.task-row select:disabled,
.task-row textarea:disabled {
    color: #666666;
    background: #f3f3f3;
}

/*
 * Dòng Project bị khóa với user thường.
 */
/*
 * Rejected vẫn giữ màu cảnh báo ngay cả khi input bị disabled.
 * (Không áp nền xám disabled cho đầu mục trên trang Dự toán — xem EstimateProgress.)
 */
.progress-page:not(.estimate-page) .project-row input:disabled,
.progress-page:not(.estimate-page) .project-row select:disabled,
.progress-page:not(.estimate-page) .project-row textarea:disabled {
    color: #6f7f99;
    background: #eceff3;
    cursor: default;
}

/*
 * Rejected vẫn giữ màu cảnh báo ngay cả khi input bị disabled.
 */
.rejected-input-cell input:disabled,
.rejected-input-cell select:disabled,
.rejected-input-cell textarea:disabled {
    opacity: 1;
    background: #ffffff !important;
    color: #808080 !important;
    font-style: italic;
}

/*
 * Approved/Rejected ở ô Ý kiến lãnh đạo vẫn giữ màu
 * khi user không có quyền thay đổi.
 */
.approved-cell select:disabled {
    opacity: 1;
    background: rgba(0, 191, 143, 0.7) !important;
    color: #ffffff !important;
}

.rejected-cell select:disabled {
    opacity: 1;
    background: rgba(255, 16, 16, 0.7) !important;
    color: #ffffff !important;
}


/* ============================================================
   COLUMN WIDTH
   ============================================================ */

.col-sheet-line {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    text-align: center;
    color: #806000;
    font-size: 11px;
    font-weight: 700;
    user-select: none;
    background: #e7e6e6;
}

td.col-sheet-line {
    position: sticky;
    left: 0;
    z-index: 3;
    color: #666666;
    font-weight: 400;
    background: #f0f0f0;
}

tr.project-row td.col-sheet-line {
    font-weight: 700;
}

tr.task-row td.col-sheet-line {
    font-weight: 400;
}

tr.task-row.task-rejected td.col-sheet-line {
    background: #f0f0f0 !important;
    color: #666666 !important;
}

th.col-sheet-line {
    z-index: 12;
    background: #e7e6e6 !important;
    color: #806000 !important;
    font-weight: 700 !important;
}

/* Bản Web chưa rebuild vẫn có <th> rỗng — hiện "ID" ngay từ CSS. */
th.col-sheet-line:empty::before {
    content: "ID";
}

.col-no {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    text-align: center;
    vertical-align: middle;
}

td.col-no {
    text-align: center;
    vertical-align: middle;
}

td.col-no .task-number {
    margin: 0 auto;
}

.col-project {
    position: sticky;
    top: 0;
    z-index: 9;
    width: 108px;
    min-width: 108px;
    max-width: 108px;
}

.col-assignee {
    position: sticky;
    top: 0;
    z-index: 9;
    width: 88px;
    min-width: 88px;
    max-width: 88px;
}

.col-project.filter-open,
.col-assignee.filter-open,
.col-task.filter-open,
.col-progress.filter-open {
    z-index: 10055;
}

.th-with-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.filter-toggle {
    width: 18px;
    height: 18px;
    padding: 0;
    border: 1px solid #b8b0a0;
    background: #f3efe6;
    color: #806000;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
}

.filter-toggle.active {
    background: #806000;
    color: #ffffff;
    border-color: #806000;
}

.filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10040;
    background: transparent;
}

.filter-dropdown {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    z-index: 10050;
    min-width: 240px;
    max-width: 320px;
    max-height: 320px;
    overflow: auto;
    padding: 8px;
    background: #ffffff;
    border: 1px solid #808080;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    direction: ltr;
    text-align: left !important;
    font-size: 12px;
    font-weight: 400;
    color: #222222;
}

.filter-search {
    display: block;
    width: 100%;
    box-sizing: border-box;
    height: 28px;
    margin-bottom: 6px;
    padding: 0 8px;
    border: 1px solid #b0b0b0;
    direction: ltr;
    text-align: left;
    font-size: 12px;
    font-weight: 400;
}

.filter-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    min-height: 26px;
    margin: 0;
    padding: 2px 4px;
    white-space: nowrap;
    cursor: pointer;
    direction: ltr;
    text-align: left !important;
    font-size: 12px;
    font-weight: 400;
    color: #222222;
}

.filter-item input[type="checkbox"] {
    box-sizing: border-box;
    flex: 0 0 15px;
    width: 15px !important;
    min-width: 15px;
    max-width: 15px;
    height: 15px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #777777;
    background: #ffffff !important;
    box-shadow: none !important;
    accent-color: #1a73e8;
    pointer-events: auto !important;
    cursor: pointer;
}

.filter-item span {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left !important;
    font-size: 12px;
    font-weight: 400;
    color: #222222;
    line-height: 15px;
}

.col-task {
    position: relative;
    width: 300px;
    min-width: 300px;
    max-width: 300px;
}

/* Canh giữa đứng tên công việc; table-cell để ô tô đủ cột khi in. */
.progress-table td.col-task {
    vertical-align: middle !important;
    height: auto !important;
    display: table-cell !important;
}

.progress-table td.col-task .task-name-cell {
    display: block;
    width: 100%;
    box-sizing: border-box;
    line-height: 16.94px;
}

.progress-table td.col-task textarea.task-name-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    /* Không dùng height: auto !important — JS fitTaskNameField cần ghi chiều cao theo nội dung. */
    padding: 1px 4px !important;
    line-height: 16.94px !important;
    min-height: 19.36px !important;
    height: auto;
    field-sizing: fixed;
    border: 0;
    outline: none;
    resize: none;
    overflow: hidden;
    background: transparent;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.progress-table tr.project-row > td:not(.gantt-cell) {
    vertical-align: middle !important;
}

.filter-dropdown.task-group-filter {
    min-width: 300px;
    max-width: 480px;
}

.col-date {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
}

.col-days {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
}

.col-progress {
    position: relative;
    width: 50px;
    min-width: 50px;
    max-width: 50px;
}

.progress-filter-dropdown {
    min-width: 180px;
    max-width: 220px;
}

.project-progress-value {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 12px;
    line-height: 19.36px;
}

/* % hoàn thành: xanh blue nhạt 50%, tô theo tỷ lệ từ trái; đè màu trạng thái/cấp độ. */
td.pct-fill-cell,
tr.task-row td.pct-fill-cell,
tr.project-row td.pct-fill-cell,
tr.task-row.task-pending td.pct-fill-cell,
tr.task-row.task-waiting td.pct-fill-cell,
tr.task-row.task-other td.pct-fill-cell,
tr.task-row.task-own td.pct-fill-cell,
tr.task-row.task-manager td.pct-fill-cell {
    background: linear-gradient(
        to right,
        rgba(100, 149, 237, 0.5) 0,
        rgba(100, 149, 237, 0.5) var(--pct, 0%),
        transparent var(--pct, 0%)
    ) !important;
}

td.pct-fill-cell input,
td.pct-fill-cell input:disabled,
tr.task-row td.pct-fill-cell input,
tr.task-row td.pct-fill-cell input:disabled {
    background-color: transparent !important;
}

.col-status {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
}

.col-gantt {
    padding: 0 !important;
    vertical-align: top;
}

th.col-gantt,
td.gantt-cell {
    position: relative;
    height: 1px;
    overflow: hidden;
    /* Track header absolute — giữ bề rộng cột bằng số ngày × 31px, không giãn ngày cuối. */
    min-width: calc(var(--gantt-days, 31) * 31px);
    width: calc(var(--gantt-days, 31) * 31px);
    max-width: calc(var(--gantt-days, 31) * 31px);
}

.gantt-header-track,
.gantt-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: calc(var(--gantt-days, 31) * 31px);
    min-width: calc(var(--gantt-days, 31) * 31px);
    max-width: calc(var(--gantt-days, 31) * 31px);
    height: auto;
    min-height: 0;
}

.gantt-header-day {
    box-sizing: border-box;
    flex: 0 0 31px;
    width: 31px;
    min-width: 31px;
    max-width: 31px;
    height: 100%;
    min-height: 100%;
    align-self: stretch;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(0, 0, 0, 0.6);
    text-align: center;
    line-height: 1.15;
}

.gantt-header-day:last-child {
    border-right: none;
}

.gantt-header-day > div,
.gantt-header-day small {
    display: block;
    line-height: 1.15;
}

.gantt-cell {
    padding: 0 !important;
    vertical-align: top;
    overflow: hidden;
    background: #ffffff !important;
    position: relative;
    /* 1px trick: ô giãn theo hàng; track absolute bám top/bottom, không dùng height:100%. */
    height: 1px;
    min-height: 19.36px;
}

.gantt-cell .gantt-track,
.gantt-cell .timeline-cell {
    color: initial !important;
    -webkit-text-fill-color: initial !important;
}

tr.task-row td.gantt-cell,
tr.project-row td.gantt-cell {
    position: relative;
    height: 1px;
    min-height: 19.36px;
    vertical-align: top;
}

tr.task-row td.gantt-cell .gantt-track,
tr.project-row td.gantt-cell .gantt-track {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    height: auto;
    min-height: 0;
    line-height: 0;
}

tr.task-row td.gantt-cell .timeline-cell,
tr.project-row td.gantt-cell .timeline-cell {
    height: 100%;
    min-height: 100%;
    line-height: 0;
}

.gantt-track > .timeline-cell {
    flex: 0 0 31px;
    width: 31px;
    min-width: 31px;
    max-width: 31px;
    box-sizing: border-box;
    height: 100%;
    min-height: 100%;
    align-self: stretch;
    border-right: 1px solid rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.gantt-header-day:last-child,
.gantt-track > .timeline-cell:last-child {
    flex: 0 0 31px;
    width: 31px;
    min-width: 31px;
    max-width: 31px;
}

.gantt-track > .timeline-cell.fill-join,
.gantt-track > .timeline-cell:last-child {
    border-right-color: transparent;
}

tr.virtual-spacer {
    height: 0;
}

tr.virtual-spacer td {
    padding: 0 !important;
    border: none !important;
    line-height: 0 !important;
    font-size: 0 !important;
    background: transparent !important;
}


/* ============================================================
   PROJECT ROW
   ============================================================ */

.project-row td {
    background: #ffffff;
}

.project-row input,
.project-row select {
    color: #0000cc;
    font-weight: 700;
}


/* ============================================================
   PROJECT CODE
   ============================================================ */

.project-code-input {
    text-align: center;
    color: #0000cc !important;
    font-weight: 700 !important;
}


/* ============================================================
   TASK NUMBER
   ============================================================ */

.task-number {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 19.36px;

    color: #000000;
    font-size: 12px;
    font-weight: 400;

    user-select: none;
}

.task-project-name {
    display: flex;
    align-items: center;

    box-sizing: border-box;

    width: 100%;
    height: 19.36px;

    padding: 3px 5px;

    overflow: hidden;

    color: #000000;

    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 400;

    white-space: nowrap;
    text-overflow: ellipsis;
}

tr.project-row .task-project-name {
    color: #0000cc !important;
    -webkit-text-fill-color: #0000cc !important;
    font-size: 13px;
    font-weight: 700;
}

/* ============================================================
   TASK ROW - BÌNH THƯỜNG
   ============================================================ */

.task-row td {
    background: #ffffff;
    height: 19.36px;
    min-height: 19.36px;
    line-height: 16.94px;
}

.task-row td.col-task {
    height: auto;
    min-height: 19.36px;
}

.task-row input,
.task-row select {
    background: transparent;
    color: #000000;
    font-weight: 400;
}


/*
 * Khi focus vào input/select, không làm thay đổi chiều cao hàng.
 */
.task-row:focus-within td,
.project-row:focus-within td {
    outline: none;
}

/*
 * Viền focus của chính input đã được xử lý phía trên.
 */


/* ============================================================
   REJECTED INPUT AREA

   CHỈ áp dụng cho 4 ô:
   - Thực hiện
   - Tên công việc
   - Ngày bắt đầu theo kế hoạch
   - Số ngày theo kế hoạch

   Class này được Progress.razor gán động khi:
   ApprovalStatus == "Rejected"
   ============================================================ */

.rejected-input-cell {
    background: #ffffff !important;
}

.rejected-input-cell input,
.rejected-input-cell select,
.rejected-input-cell textarea {
    background: #ffffff !important;
    color: #808080 !important;
    font-style: italic;
    font-weight: 400;
}

.rejected-input-cell input::placeholder {
    color: #a0a0a0;
}

.rejected-input-cell input:focus,
.rejected-input-cell select:focus {
    background: #ffffff !important;
    color: #808080 !important;
    box-shadow: inset 0 0 0 2px #5b9bd5;
}


/* ============================================================
   APPROVAL STATUS
   ============================================================ */

.approval-cell select {
    text-align: center;
}


/* Approved */

.approved-cell {
    background: rgba(0, 191, 143, 0.7) !important;
}

.approved-cell select {
    background: rgba(0, 191, 143, 0.7) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-weight: 700;
}

.progress-page tr.task-row td.approved-cell,
.progress-page tr.task-row td.approved-cell select,
.progress-page tr.task-row td.approved-cell select:disabled,
.progress-page tr.task-own td.approved-cell,
.progress-page tr.task-own td.approved-cell select,
.progress-page tr.task-own td.approved-cell select:disabled,
.progress-page tr.task-other td.approved-cell,
.progress-page tr.task-other td.approved-cell select,
.progress-page tr.task-other td.approved-cell select:disabled,
.progress-page tr.task-manager td.approved-cell,
.progress-page tr.task-manager td.approved-cell select,
.progress-page tr.task-manager td.approved-cell select:disabled {
    background: rgba(0, 191, 143, 0.7) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}


/* Rejected = ĐỎ NHẠT, chỉ ô Ý kiến lãnh đạo */

.rejected-cell {
    background: rgba(255, 16, 16, 0.7) !important;
}

.rejected-cell select {
    background: rgba(255, 16, 16, 0.7) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-weight: 700;
}

.progress-page tr.task-row td.rejected-cell,
.progress-page tr.task-row td.rejected-cell select,
.progress-page tr.task-row td.rejected-cell select:disabled,
.progress-page tr.task-own td.rejected-cell,
.progress-page tr.task-own td.rejected-cell select,
.progress-page tr.task-own td.rejected-cell select:disabled,
.progress-page tr.task-other td.rejected-cell,
.progress-page tr.task-other td.rejected-cell select,
.progress-page tr.task-other td.rejected-cell select:disabled,
.progress-page tr.task-manager td.rejected-cell,
.progress-page tr.task-manager td.rejected-cell select,
.progress-page tr.task-manager td.rejected-cell select:disabled {
    background: rgba(255, 16, 16, 0.7) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}


/* ============================================================
   DAY HEADER
   ============================================================ */

.day-header {
    width: 31px;
    min-width: 31px;
    max-width: 31px;
    height: 100%;
    min-height: 100%;
    padding: 0 !important;
    font-size: 10px !important;
}

.day-header > div {
    font-size: 10px;
    font-weight: 700;
}

.day-header small {
    display: block;
    margin-top: 1px;
    color: #666666;
    font-size: 8px;
    font-weight: 400;
}

.sunday-header {
    background: #dddddd !important;
}

.sunday-header,
.sunday-header small {
    color: #e00000 !important;
}

.today-header {
    background: #ffd6e0 !important;
}

.today-header,
.today-header > div,
.today-header small {
    color: #e00000 !important;
    font-weight: 700;
}


/* ============================================================
   TIMELINE
   ============================================================ */

.timeline-cell {
    width: 31px;
    min-width: 31px;
    max-width: 31px;

    height: auto;
    min-height: 19.36px;

    padding: 0 !important;

    background: #ffffff;
}


/* Trong kế hoạch */
.timeline-cell.actual-progress {
    background: #00bf8f !important;
}

/* Hôm nay */
.timeline-cell.today-progress {
    background: #63efbe !important;
}

/* Vượt tiến độ */
.timeline-cell.ahead-progress {
    background: #00e5e5 !important;
}

/* Dự báo trễ - chưa hoàn thành */
.timeline-cell.slow-progress {
    background: #f4b900 !important;
}

/* Trễ thực tế - chỉ khi đã hoàn thành */
.timeline-cell.overdue {
    background: #ff1010 !important;
}

/* Đầu mục dự án: xanh dương thay cho xanh lá */
.timeline-cell.project-actual-progress {
    background: #08a8df !important;
}

.timeline-cell.project-today-progress {
    background: #7ed5f0 !important;
}


/* ============================================================
   PROJECT TIMELINE (legacy class — không còn tô cả hàng)
   ============================================================ */

.project-timeline {
    background: #ffffff;
}


/* ============================================================
   START DAY
   ============================================================ */

.timeline-cell.start-day,
.timeline-cell.actual-finish {
    box-shadow: none;
}


/* ============================================================
   START MARKER
   ============================================================ */

.day-marker {
    position: absolute;

    left: 2px;
    top: 2px;

    z-index: 4;

    color: #0057a8;

    font-size: 9px;
}


/* ============================================================
   FINISH MARKER
   ============================================================ */

.finish-marker {
    position: absolute;

    right: 2px;
    top: 1px;

    z-index: 4;

    color: #ffffff;

    font-size: 12px;
    font-weight: 700;
}


/* ============================================================
   CHỦ NHẬT
   ============================================================ */

.timeline-cell.sunday:not(.actual-progress):not(.today-progress):not(.ahead-progress):not(.slow-progress):not(.overdue):not(.project-actual-progress):not(.project-today-progress) {
    background: #eeeeee !important;
}

/* Chủ nhật trong phạm vi tô tiến độ: giữ màu thanh, không đè xám. */


/* ============================================================
   SPECIAL INPUT ALIGNMENT
   ============================================================ */

.progress-table td:nth-child(6) input,
.progress-table td:nth-child(7) input,
.progress-table td:nth-child(8) input,
.progress-table td:nth-child(9) input {
    text-align: center;

    padding-left: 2px;
    padding-right: 2px;

    font-size: 11px;
}


/* Tên công việc: xuống dòng, ô và hàng tăng theo nội dung */

.progress-table textarea.task-name-input {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-height: 19.36px;
    height: auto;
    margin: 0;
    padding: 1px 4px;
    border: 0;
    outline: none;
    resize: none;
    overflow: hidden;
    background: transparent;
    color: #000000;
    font-family: Arial, sans-serif;
    font-size: 12px;
    line-height: 16.94px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.progress-table td:nth-child(5) {
    white-space: normal;
}


/* Number */

.progress-table input[type="number"] {
    -moz-appearance: textfield;
}

.progress-table input[type="number"]::-webkit-outer-spin-button,
.progress-table input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1000px) {

    .progress-page {
        padding: 6px;
    }

    .progress-header {
        flex-direction: column;
    }

    .header-actions {
        width: 100%;
    }
}

/* ============================================================
   CONTEXT MENU
   ============================================================ */

.context-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: transparent;
}

.context-menu {
    position: fixed;
    z-index: 10000;

    width: 320px;

    padding: 5px 0;

    background: #ffffff;

    border: 1px solid #9c9c9c;
    border-radius: 4px;

    box-shadow:
        0 4px 14px
        rgba(0, 0, 0, 0.24);
}


.context-menu button {
    display: block;

    box-sizing: border-box;

    width: 100%;
    height: 34px;

    padding: 0 14px;

    border: 0;

    background: transparent;

    color: #222222;

    font-family: Arial, sans-serif;
    font-size: 13px;

    text-align: left;

    cursor: pointer;
}


.context-menu button:hover:not(:disabled) {
    background: #e8f1fb;
}


.context-menu button.delete-command {
    color: #c00000;
}


.context-menu button.delete-command:hover:not(:disabled) {
    background: #ffe8e8;
}


.context-menu button:disabled {
    color: #aaaaaa;

    cursor: not-allowed;

    background: transparent;

    opacity: 0.65;
}


.context-menu-separator {
    height: 1px;

    margin: 4px 0;

    background: #dddddd;
}


.progress-import-file {
    display: none;
}


/* ============================================================
   HỘP XÁC NHẬN XÓA CÔNG VIỆC / DỰ ÁN
   ============================================================ */

.confirm-dialog button.login-button {
    min-width: 110px;
    height: 34px;
    border: 0;
    background: #1f6feb;
    color: #ffffff;
    cursor: pointer;
}

.ts-notify-stack {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}

.ts-notify-card {
    background: #ffffff;
    border: 1px solid #b0b0b0;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    font-size: 13px;
    color: #222222;
}

.ts-notify-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.ts-notify-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.ts-notify-actions button {
    height: 30px;
    padding: 0 10px;
    border: 1px solid #888888;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 12px;
}

.ts-notify-actions button.ok {
    background: #d9f2e3;
}

.ts-notify-actions button.no {
    background: #f8d7da;
}

.confirm-overlay {
    position: fixed;

    z-index: 20000;

    left: 0;
    top: 0;
    right: 0;
    bottom: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        rgba(0, 0, 0, 0.35);
}


.confirm-dialog {
    width: 420px;

    max-width:
        calc(100vw - 40px);

    padding: 0;

    background: #ffffff;

    border-radius: 6px;

    box-shadow:
        0 8px 28px
        rgba(0, 0, 0, 0.35);

    overflow: hidden;
}

.confirm-dialog.backup-dialog {
    width: 560px;
}

.confirm-dialog.change-info-dialog {
    width: 560px;
}

.change-info-label {
    font-weight: 700;
    margin-top: 10px;
    margin-bottom: 4px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.change-info-label:first-child {
    margin-top: 0;
}

.change-info-block {
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 180px;
    overflow: auto;
}

.backup-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 280px;
    overflow: auto;
    margin-top: 10px;
}

.backup-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #ffffff;
    text-align: left;
    cursor: pointer;
}

.backup-item.selected {
    border-color: #08a8df;
    background: #eef9ff;
}

.backup-item-name {
    font-weight: 600;
    color: #222222;
    word-break: break-all;
}

.backup-item-meta {
    font-size: 12px;
    color: #666666;
}


.confirm-title {
    padding: 14px 18px;

    border-bottom:
        1px solid #dddddd;

    font-size: 16px;
    font-weight: 700;

    color: #333333;
}


.confirm-message {
    padding: 20px 18px;

    color: #333333;

    font-size: 14px;

    line-height: 1.5;
}


.confirm-actions {
    display: flex;

    justify-content: flex-end;

    gap: 8px;

    padding: 12px 18px;

    border-top:
        1px solid #dddddd;

    background: #f7f7f7;
}


.confirm-actions button {
    min-width: 90px;

    height: 34px;

    padding: 0 14px;

    border-radius: 4px;

    cursor: pointer;

    font-size: 13px;
}


.cancel-button {
    border:
        1px solid #999999;

    background:
        #ffffff;

    color:
        #333333;
}


.confirm-delete-button {
    border:
        1px solid #b00000;

    background:
        #c00000;

    color:
        #ffffff;

    font-weight: 700;
}


.confirm-delete-button:hover {
    background:
        #a00000;
}

/* ============================================================
   BỔ SUNG CHO PHÂN QUYỀN / HỘP XÁC NHẬN
   ============================================================ */

/*
 * Tên công việc dài trong hộp xác nhận không phá layout.
 */
.confirm-message strong {
    overflow-wrap: anywhere;
}

/*
 * Nút xác nhận bị vô hiệu hóa nếu sau này bổ sung kiểm tra quyền.
 */
.confirm-actions button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/*
 * Giữ scrollbar ổn định khi bảng có nhiều dòng.
 */
.table-wrapper {
    scrollbar-gutter: stable;
}

/*
 * Không cho textarea/select/input làm tăng kích thước cột.
 */
.progress-table input,
.progress-table select,
.progress-table textarea {
    max-width: 100%;
}

/*
 * Dòng đã hoàn thành/khóa có thể gắn class locked-row về sau.
 * Không thay đổi kích thước, chỉ thay cursor.
 */
.locked-row input,
.locked-row select {
    cursor: default;
}
.logout-button {
    margin-left: 10px;

    background: #ffffff;

    color: #c00000;

    border: 1px solid #c00000;

    font-weight: 600;
}

.logout-button:hover {
    background: #c00000 !important;

    color: #ffffff;
}
/* =========================================================
   DÒNG ĐẦU MỤC DỰ ÁN
   Chỉ bảng Tiến độ — không áp cyan lên trang Dự toán (lệch màu cột ID).
   ========================================================= */

.progress-page:not(.estimate-page) tr.project-row,
.progress-page:not(.estimate-page) tr.project-row td:not(.gantt-cell):not(.timeline-cell) {
    background-color: #ffffff !important;
    background: #ffffff !important;

    /* Chữ xanh blue đậm (như Excel đầu mục) */
    color: #0000cc !important;

    font-size: 13px;
    font-weight: 700;
    opacity: 1 !important;
}


/* Tất cả nội dung bên trong dòng Project */
.progress-page:not(.estimate-page) tr.project-row span,
.progress-page:not(.estimate-page) tr.project-row div:not(.gantt-track):not(.timeline-cell),
.progress-page:not(.estimate-page) tr.project-row label,
.progress-page:not(.estimate-page) tr.project-row a {
    color: #0000cc !important;
    font-size: 13px;
    font-weight: 700;
    opacity: 1 !important;
    -webkit-text-fill-color: #0000cc !important;
}


/* Khi đang sửa ô */
.progress-page:not(.estimate-page) tr.project-row input,
.progress-page:not(.estimate-page) tr.project-row select,
.progress-page:not(.estimate-page) tr.project-row textarea {
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: #0000cc !important;
    -webkit-text-fill-color: #0000cc !important;

    font-size: 13px;
    font-weight: 700;
    opacity: 1 !important;
}

/* Gantt đầu mục: ngày trống trắng, CN xám — không đè màu đánh giá tiến độ */
tr.project-row td.gantt-cell {
    background-color: #ffffff !important;
}

tr.project-row td.gantt-cell .timeline-cell:not(.actual-progress):not(.today-progress):not(.ahead-progress):not(.slow-progress):not(.overdue):not(.project-actual-progress):not(.project-today-progress) {
    background: #ffffff !important;
}

tr.project-row td.gantt-cell .timeline-cell.sunday:not(.actual-progress):not(.today-progress):not(.ahead-progress):not(.slow-progress):not(.overdue):not(.project-actual-progress):not(.project-today-progress) {
    background: #eeeeee !important;
}

tr.project-row td.delegated-assignee input,
tr.project-row td.delegated-assignee input:disabled,
tr.project-row.delegated-lead td.delegated-assignee input,
tr.project-row.delegated-lead td.delegated-assignee input:disabled {
    color: #c00000 !important;
    -webkit-text-fill-color: #c00000 !important;
    font-weight: 700 !important;
}

/* =========================================================
   DÒNG CÔNG VIỆC CHI TIẾT
   Luôn nền trắng - chữ đen
   Kể cả khi readonly / disabled
   ========================================================= */

tr.task-row,
tr.task-row td {
    background-color: #ffffff;
    color: #000000;

    opacity: 1 !important;
}


/* Nội dung thông thường */
tr.task-row span,
tr.task-row div,
tr.task-row label {
    color: #000000;
    opacity: 1 !important;
}


/* Input / Select / Textarea */
tr.task-row input,
tr.task-row select,
tr.task-row textarea {
    background-color: #ffffff;
    color: #000000;

    opacity: 1 !important;
}


/* =========================================================
   Ô READONLY
   Không cho sửa nhưng hình thức vẫn như ô bình thường
   ========================================================= */

tr.task-row input[readonly],
tr.task-row textarea[readonly] {
    background-color: #ffffff !important;
    color: #000000 !important;

    opacity: 1 !important;
}


/* =========================================================
   Ô DISABLED
   Trình duyệt thường tự làm xám/mờ -> ép trở lại trắng/đen
   ========================================================= */

tr.task-row input:disabled,
tr.task-row select:disabled,
tr.task-row textarea:disabled,
tr.task-row button:disabled {
    background-color: #ffffff !important;
    color: #000000 !important;

    opacity: 1 !important;
    cursor: default !important;

    -webkit-text-fill-color: #000000 !important;
}


/* Firefox */
tr.task-row input:disabled,
tr.task-row select:disabled,
tr.task-row textarea:disabled {
    -moz-opacity: 1;
}


/* Placeholder nếu có */
.progress-table input::placeholder,
tr.task-row input::placeholder,
tr.task-row textarea::placeholder {
    color: currentColor;
    opacity: 0.5;
}

/* =========================================================
   CÔNG VIỆC CHI TIẾT - MẶC ĐỊNH
   ========================================================= */

tr.task-row,
tr.task-row td:not(.timeline-cell):not(.gantt-cell):not(.approved-cell):not(.rejected-cell) {
    background-color: #ffffff;
    opacity: 1 !important;
}


/* =========================================================
   MANGD / MANPGD
   Công việc chi tiết: chữ đen
   ========================================================= */

tr.task-manager,
tr.task-manager td:not(.timeline-cell):not(.gantt-cell):not(.approved-cell):not(.rejected-cell),
tr.task-manager span,
tr.task-manager div:not(.timeline-cell):not(.gantt-track),
tr.task-manager label,
tr.task-manager td:not(.approved-cell):not(.rejected-cell) input,
tr.task-manager td:not(.approved-cell):not(.rejected-cell) select,
tr.task-manager td:not(.approved-cell):not(.rejected-cell) textarea {
    color: #000000 !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #000000 !important;
}


/* Kể cả ô bị khóa — không đè Approved/Rejected */

tr.task-manager td:not(.approved-cell):not(.rejected-cell) input:disabled,
tr.task-manager td:not(.approved-cell):not(.rejected-cell) select:disabled,
tr.task-manager td:not(.approved-cell):not(.rejected-cell) textarea:disabled,
tr.task-manager td:not(.approved-cell):not(.rejected-cell) input[readonly],
tr.task-manager td:not(.approved-cell):not(.rejected-cell) textarea[readonly] {
    color: #000000 !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #000000 !important;
}


/* =========================================================
   USER THƯỜNG - CÔNG VIỆC CỦA MÌNH
   Không tô màu user đang đăng nhập; chữ đen như hàng khác.
   Không đè nền/chữ ô Approved / Rejected.
   ========================================================= */

.progress-page:not(.estimate-page) tr.task-own,
.progress-page:not(.estimate-page) tr.task-own td:not(.timeline-cell):not(.gantt-cell):not(.approved-cell):not(.rejected-cell),
.progress-page:not(.estimate-page) tr.task-own span,
.progress-page:not(.estimate-page) tr.task-own div:not(.timeline-cell):not(.gantt-track),
.progress-page:not(.estimate-page) tr.task-own label,
.progress-page:not(.estimate-page) tr.task-own td:not(.approved-cell):not(.rejected-cell) input,
.progress-page:not(.estimate-page) tr.task-own td:not(.approved-cell):not(.rejected-cell) select,
.progress-page:not(.estimate-page) tr.task-own td:not(.approved-cell):not(.rejected-cell) textarea {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    opacity: 1 !important;
}


.progress-page:not(.estimate-page) tr.task-own td:not(.approved-cell):not(.rejected-cell) input:disabled,
.progress-page:not(.estimate-page) tr.task-own td:not(.approved-cell):not(.rejected-cell) select:disabled,
.progress-page:not(.estimate-page) tr.task-own td:not(.approved-cell):not(.rejected-cell) textarea:disabled,
.progress-page:not(.estimate-page) tr.task-own td:not(.approved-cell):not(.rejected-cell) input[readonly],
.progress-page:not(.estimate-page) tr.task-own td:not(.approved-cell):not(.rejected-cell) textarea[readonly] {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    opacity: 1 !important;
}


/* =========================================================
   USER THƯỜNG - CÔNG VIỆC NGƯỜI KHÁC
   ========================================================= */

tr.task-other,
tr.task-other td:not(.timeline-cell):not(.gantt-cell):not(.approved-cell):not(.rejected-cell):not(.pct-fill-cell),
tr.task-other span,
tr.task-other div:not(.timeline-cell):not(.gantt-track),
tr.task-other label,
tr.task-other td:not(.approved-cell):not(.rejected-cell) input,
tr.task-other td:not(.approved-cell):not(.rejected-cell) select,
tr.task-other td:not(.approved-cell):not(.rejected-cell) textarea {
    color: #000000 !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #000000 !important;
}


tr.task-other td:not(.approved-cell):not(.rejected-cell) input:disabled,
tr.task-other td:not(.approved-cell):not(.rejected-cell) select:disabled,
tr.task-other td:not(.approved-cell):not(.rejected-cell) textarea:disabled,
tr.task-other td:not(.approved-cell):not(.rejected-cell) input[readonly],
tr.task-other td:not(.approved-cell):not(.rejected-cell) textarea[readonly] {
    color: #000000 !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #000000 !important;
}

/* =========================================================
   USER THƯỜNG - Ô CẦN CẬP NHẬT TIẾN ĐỘ
   ========================================================= */

tr.task-own td.own-progress-warning,
tr.task-own td.own-progress-warning input,
tr.task-own td.own-progress-warning select,
tr.task-own td.own-progress-warning textarea {
    background-color: #ffffff !important;

    color: #c00000 !important;

    opacity: 1 !important;

    -webkit-text-fill-color: #c00000 !important;

    font-weight: 600;
}


/* Kể cả ô đang bị disabled */
tr.task-own td.own-progress-warning input:disabled,
tr.task-own td.own-progress-warning select:disabled,
tr.task-own td.own-progress-warning textarea:disabled {
    background-color: #ffffff !important;

    color: #c00000 !important;

    opacity: 1 !important;

    -webkit-text-fill-color: #c00000 !important;
}


/* =========================================================
   CHƯA DUYỆT — vàng từ Thực hiện → Ngày kết thúc thực tế
   CHỜ (sửa người làm sau khi đã duyệt) — hồng cùng phạm vi
   ID / No / Dự án / Ý kiến lãnh đạo / Gantt giữ nền trắng
   ========================================================= */

tr.task-row.task-pending td.status-range,
tr.task-row.task-pending td:nth-child(n+4):nth-child(-n+9):not(.pct-fill-cell),
tr.task-row.task-pending td.status-range input,
tr.task-row.task-pending td:nth-child(n+4):nth-child(-n+9):not(.pct-fill-cell) input,
tr.task-row.task-pending td.status-range textarea,
tr.task-row.task-pending td:nth-child(n+4):nth-child(-n+9):not(.pct-fill-cell) textarea,
tr.task-row.task-pending td.status-range select,
tr.task-row.task-pending td:nth-child(n+4):nth-child(-n+9):not(.pct-fill-cell) select,
tr.task-row.task-pending td.status-range input:disabled,
tr.task-row.task-pending td:nth-child(n+4):nth-child(-n+9):not(.pct-fill-cell) input:disabled,
tr.task-row.task-pending td.status-range textarea:disabled,
tr.task-row.task-pending td:nth-child(n+4):nth-child(-n+9):not(.pct-fill-cell) textarea:disabled,
tr.task-row.task-pending td.status-range select:disabled,
tr.task-row.task-pending td:nth-child(n+4):nth-child(-n+9):not(.pct-fill-cell) select:disabled,
tr.task-row td.pending-input-cell:not(.pct-fill-cell),
tr.task-row td.pending-input-cell:not(.pct-fill-cell) input,
tr.task-row td.pending-input-cell:not(.pct-fill-cell) select,
tr.task-row td.pending-input-cell:not(.pct-fill-cell) input:disabled,
tr.task-row td.pending-input-cell:not(.pct-fill-cell) select:disabled {
    background-color: #ffe9a8 !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    opacity: 1 !important;
}

tr.task-row.task-waiting td.status-range,
tr.task-row.task-waiting td:nth-child(n+4):nth-child(-n+9):not(.pct-fill-cell),
tr.task-row.task-waiting td.status-range input,
tr.task-row.task-waiting td:nth-child(n+4):nth-child(-n+9):not(.pct-fill-cell) input,
tr.task-row.task-waiting td.status-range textarea,
tr.task-row.task-waiting td:nth-child(n+4):nth-child(-n+9):not(.pct-fill-cell) textarea,
tr.task-row.task-waiting td.status-range select,
tr.task-row.task-waiting td:nth-child(n+4):nth-child(-n+9):not(.pct-fill-cell) select,
tr.task-row.task-waiting td.status-range input:disabled,
tr.task-row.task-waiting td:nth-child(n+4):nth-child(-n+9):not(.pct-fill-cell) input:disabled,
tr.task-row.task-waiting td.status-range textarea:disabled,
tr.task-row.task-waiting td:nth-child(n+4):nth-child(-n+9):not(.pct-fill-cell) textarea:disabled,
tr.task-row.task-waiting td.status-range select:disabled,
tr.task-row.task-waiting td:nth-child(n+4):nth-child(-n+9):not(.pct-fill-cell) select:disabled {
    background-color: #ffd0e0 !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    opacity: 1 !important;
}

tr.task-row td.pending-approval-cell,
tr.task-row td.pending-approval-cell select,
tr.task-row td.pending-approval-cell select:disabled {
    background-color: #ffffff !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    opacity: 1 !important;
}


/* =========================================================
   REJECTED — đỏ, thắng rule chữ đen nền trắng
   ========================================================= */

tr.task-row.task-rejected td:not(.timeline-cell):not(.gantt-cell):not(.rejected-cell) {
    background-color: #ffffff !important;
    color: #808080 !important;
    font-style: italic;
}

tr.task-row.task-rejected td:not(.timeline-cell):not(.gantt-cell):not(.rejected-cell) input,
tr.task-row.task-rejected td:not(.timeline-cell):not(.gantt-cell):not(.rejected-cell) textarea,
tr.task-row.task-rejected td:not(.timeline-cell):not(.gantt-cell):not(.rejected-cell) select,
tr.task-row.task-rejected td:not(.timeline-cell):not(.gantt-cell):not(.rejected-cell) span,
tr.task-row.task-rejected td.rejected-input-cell,
tr.task-row.task-rejected td.rejected-input-cell input,
tr.task-row.task-rejected td.rejected-input-cell textarea,
tr.task-row.task-rejected td.rejected-input-cell select,
tr.task-row.task-rejected td.rejected-input-cell input:disabled,
tr.task-row.task-rejected td.rejected-input-cell textarea:disabled,
tr.task-row.task-rejected td.rejected-input-cell select:disabled {
    background-color: #ffffff !important;
    color: #808080 !important;
    -webkit-text-fill-color: #808080 !important;
    opacity: 1 !important;
    font-weight: 400;
    font-style: italic;
}

tr.task-row td.waiting-approval-cell,
tr.task-row td.waiting-approval-cell select,
tr.task-row td.waiting-approval-cell select:disabled {
    background-color: #ffffff !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    opacity: 1 !important;
}

tr.task-row td.approved-cell,
tr.task-row td.approved-cell select,
tr.task-row td.approved-cell select:disabled {
    background-color: rgba(0, 191, 143, 0.7) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
    font-weight: 700;
}

tr.task-row td.rejected-cell,
tr.task-row td.rejected-cell select,
tr.task-row td.rejected-cell select:disabled {
    background-color: rgba(255, 16, 16, 0.7) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
    font-weight: 700;
    font-style: normal;
}


.progress-table input::placeholder,
.progress-table input:disabled::placeholder,
tr.task-row input::placeholder,
tr.task-row input:disabled::placeholder {
    color: #888888 !important;
    -webkit-text-fill-color: #888888 !important;
    opacity: 0.55 !important;
    font-weight: 400;
}


/* ============================================================
   IN ẤN: A4 ngang, lề 1cm, vừa chiều ngang, lặp header
   ============================================================ */

@media print {
    .progress-page {
        display: block !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        padding: 0 !important;
        background: #ffffff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .progress-header {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-bottom: 3mm;
        justify-content: center;
        text-align: center;
        align-items: center;
    }

    .progress-header h1 {
        width: 100%;
        text-align: center;
        font-size: 12pt;
        margin: 0;
    }

    .header-actions,
    .header-admin-flyout,
    .filter-toggle,
    .filter-dropdown,
    .filter-backdrop,
    .ts-notify-stack,
    .sheet-toast,
    .context-menu,
    .logout-button,
    .progress-header .user-info,
    .col-sheet-line {
        display: none !important;
    }

    .legend {
        margin: 0 0 3mm 0;
        gap: 8px;
        font-size: 8pt;
        justify-content: center;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .legend-color {
        border: 1px solid #555555;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .table-wrapper {
        display: block !important;
        flex: none !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        width: 100% !important;
        border: 0 !important;
        background: transparent !important;
    }

    .progress-table {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        table-layout: fixed !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    .progress-table thead {
        display: table-header-group !important;
    }

    .progress-table tbody {
        display: table-row-group !important;
    }

    .progress-table tr {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .progress-table thead th {
        position: static !important;
        top: auto !important;
        z-index: auto !important;
        height: auto !important;
        padding: 1mm 0.4mm !important;
        font-size: 6.5pt !important;
        line-height: 1.15;
        background: #e7e6e6 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    .progress-table th,
    .progress-table td {
        border: 0 !important;
        border-right: 0.75pt solid #000 !important;
        border-bottom: 0.75pt solid #000 !important;
    }

    .progress-table thead th {
        border-top: 0.75pt solid #000 !important;
    }

    .progress-table .col-no {
        border-left: 0.75pt solid #000 !important;
    }

    .progress-table td {
        height: auto !important;
        min-height: 0 !important;
        padding: 0 !important;
        font-size: 6.5pt !important;
        line-height: 1.12 !important;
    }

    .progress-table input,
    .progress-table select,
    .progress-table textarea,
    .progress-table span,
    .task-number {
        font-size: 6.5pt !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        padding: 0.08mm 0.3mm !important;
        line-height: 1.12 !important;
    }

    .progress-table td.col-task .task-name-cell,
    .progress-table td.col-task textarea.task-name-input {
        min-height: 0 !important;
        line-height: 1.12 !important;
        padding: 0.08mm 0.3mm !important;
        height: auto !important;
        field-sizing: content !important;
    }

    .col-no {
        width: 3.2% !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    .col-project {
        width: 7.2% !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    .col-assignee {
        width: 6.5% !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    .col-task {
        width: 16% !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    .progress-table td.col-task {
        display: table-cell !important;
        vertical-align: middle !important;
        width: 16% !important;
    }

    .progress-table td.col-task .task-name-cell,
    .progress-table td.col-task textarea.task-name-input {
        display: block !important;
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        height: auto !important;
        field-sizing: content !important;
        white-space: pre-wrap !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
    }

    .col-date,
    .col-days,
    .col-progress,
    .col-status {
        width: 4.2% !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    .col-gantt,
    .gantt-cell {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 0 !important;
    }

    .gantt-header-track,
    .gantt-track {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
    }

    .day-header,
    .gantt-header-day,
    .timeline-cell {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 0 !important;
        flex: 1 1 0 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    .gantt-header-day,
    .gantt-track > .timeline-cell,
    .gantt-track > .timeline-cell.fill-join {
        border-right: 0.75pt solid #000 !important;
        background-image: none !important;
        box-shadow: none !important;
    }

    .gantt-header-day:last-child,
    .gantt-track > .timeline-cell:last-child {
        border-right: 0 !important;
        background-image: none !important;
    }

    .day-header,
    .gantt-header-day {
        height: 100% !important;
        min-height: 100% !important;
        align-self: stretch !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        font-size: 5.5pt !important;
    }

    .day-header > div,
    .day-header small,
    .gantt-header-day > div,
    .gantt-header-day small {
        font-size: 5.5pt !important;
        margin: 0 !important;
        line-height: 1.15 !important;
    }

    .gantt-cell,
    .gantt-track {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    .gantt-track > .timeline-cell {
        height: 100% !important;
        min-height: 100% !important;
        align-self: stretch !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    td.gantt-cell,
    th.col-gantt {
        position: relative !important;
        height: 1px !important;
        overflow: visible !important;
        vertical-align: top !important;
        background-color: #ffffff !important;
        background-image: none !important;
    }

    tr.virtual-spacer {
        display: none !important;
    }
}

/* Sticky header: separate borders so body rows don't paint under/flicker through thead. */
.progress-page:not(.estimate-page) .progress-table {
    border-collapse: separate;
    border-spacing: 0;
}

.progress-page:not(.estimate-page) .progress-table thead th {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #e7e6e6 !important;
    box-shadow: none;
}

.progress-page:not(.estimate-page) .progress-table thead th.col-sheet-line {
    z-index: 22;
}

.progress-page:not(.estimate-page) .progress-table thead th.col-project,
.progress-page:not(.estimate-page) .progress-table thead th.col-assignee {
    z-index: 21;
}

.progress-page:not(.estimate-page) .progress-table thead th.col-sheet-line.filter-open,
.progress-page:not(.estimate-page) .progress-table thead th.col-project.filter-open,
.progress-page:not(.estimate-page) .progress-table thead th.col-assignee.filter-open,
.progress-page:not(.estimate-page) .progress-table thead th.col-task.filter-open,
.progress-page:not(.estimate-page) .progress-table thead th.col-progress.filter-open {
    z-index: 10055;
}

.progress-page .id-filter-dropdown {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 140px;
    padding: 8px;
}

.progress-page .id-filter-go {
    height: 28px;
    padding: 0 8px;
    border: 1px solid #808080;
    background: #f3f3f3;
    font-size: 12px;
    cursor: pointer;
}

/* Ý kiến lãnh đạo: luôn giữ nền Approved/Rejected, kể cả hàng task-own. */
.progress-page tr.task-row td.approved-cell,
.progress-page tr.task-row td.approved-cell select,
.progress-page tr.task-row td.approved-cell select:disabled {
    background: rgba(0, 191, 143, 0.7) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* ============================================================
   Bảng tiến độ: font/cỡ chữ đồng bộ với ô mô tả công việc chi tiết
   ============================================================ */

.progress-page:not(.estimate-page) .progress-table tbody td:not(.timeline-cell):not(.gantt-cell),
.progress-page:not(.estimate-page) .progress-table tbody td:not(.timeline-cell):not(.gantt-cell) input,
.progress-page:not(.estimate-page) .progress-table tbody td:not(.timeline-cell):not(.gantt-cell) select,
.progress-page:not(.estimate-page) .progress-table tbody td:not(.timeline-cell):not(.gantt-cell) textarea,
.progress-page:not(.estimate-page) .progress-table tbody td .task-number,
.progress-page:not(.estimate-page) .progress-table tbody td .task-project-name,
.progress-page:not(.estimate-page) .progress-table tbody td .project-progress-value,
.progress-page:not(.estimate-page) .progress-table tbody td.col-sheet-line,
.progress-page:not(.estimate-page) .progress-table tbody tr.project-row td:not(.gantt-cell):not(.timeline-cell),
.progress-page:not(.estimate-page) .progress-table tbody tr.project-row input,
.progress-page:not(.estimate-page) .progress-table tbody tr.project-row select,
.progress-page:not(.estimate-page) .progress-table tbody tr.project-row textarea,
.progress-page:not(.estimate-page) .progress-table tbody tr.project-row span,
.progress-page:not(.estimate-page) .progress-table tbody tr.project-row .task-project-name,
.progress-page:not(.estimate-page) tr.task-row td.approved-cell,
.progress-page:not(.estimate-page) tr.task-row td.approved-cell select,
.progress-page:not(.estimate-page) tr.task-row td.approved-cell select:disabled,
.progress-page:not(.estimate-page) tr.task-row td.rejected-cell,
.progress-page:not(.estimate-page) tr.task-row td.rejected-cell select,
.progress-page:not(.estimate-page) tr.task-row td.rejected-cell select:disabled {
    font-family: Arial, sans-serif !important;
    font-size: 12px !important;
}

.progress-page:not(.estimate-page) .day-header,
.progress-page:not(.estimate-page) .gantt-header-day {
    width: 31px;
    min-width: 31px;
    max-width: 31px;
    font-size: 15px !important;
    line-height: 1.15;
}

.progress-page:not(.estimate-page) .day-header > div,
.progress-page:not(.estimate-page) .gantt-header-day > div {
    font-size: 15px !important;
    line-height: 1.15;
}

.progress-page:not(.estimate-page) .day-header small,
.progress-page:not(.estimate-page) .gantt-header-day small {
    font-size: 12px !important;
    line-height: 1.15;
    margin-top: 0;
}

.progress-page tr.task-row td.rejected-cell,
.progress-page tr.task-row td.rejected-cell select,
.progress-page tr.task-row td.rejected-cell select:disabled {
    background: rgba(255, 16, 16, 0.7) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}




/* Timesheet.razor.css */
.ts-page {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    padding: 10px 12px 12px;
    box-sizing: border-box;
    background: #f4f5f7;
    font-family: Arial, sans-serif;
    font-weight: 400;
}

.ts-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
    padding-left: 44px;
    padding-right: 8px;
}

.ts-titles .org {
    font-size: 13px;
    font-weight: 700;
    color: #333333;
}

.ts-titles h1 {
    margin: 4px 0 0;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
}

.ts-titles .month-line {
    margin-top: 4px;
    font-size: 14px;
    font-weight: 700;
    color: #444444;
}

.user-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    color: #555555;
    font-size: 13px;
    font-weight: 400;
}

.user-info strong {
    color: #003399;
    font-weight: 700;
}

.view-only {
    color: #888888;
    font-style: italic;
}

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

.header-actions button {
    height: 34px;
    padding: 0 12px;
    border: 1px solid #777777;
    background: #f7f7f7;
    font-size: 13px;
    cursor: pointer;
}

.header-actions button:hover {
    background: #e9e9e9;
}

.logout-button {
    background: #fff4f4 !important;
}

.ts-error {
    margin: 0 0 8px 44px;
    color: #b00000;
    font-size: 13px;
    white-space: pre-line;
}

.ts-info {
    margin: 0 0 8px 44px;
    color: #0b6e4f;
    font-size: 13px;
}

.ts-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin: 0 0 8px 44px;
    font-size: 12px;
    color: #555555;
}

.ts-legend b {
    color: #111111;
    font-weight: 700;
}

.ts-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    background: #ffffff;
    border: 1px solid #bfbfbf;
}

.ts-loading {
    padding: 24px;
    color: #666666;
}

.ts-table {
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;
    min-width: 100%;
    font-size: 12px;
    font-weight: 400;
}

.ts-table th,
.ts-table td {
    border: 1px solid #bdbdbd;
    padding: 2px 3px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    font-weight: 400;
}

.ts-table thead th {
    background: #eef2f7;
    font-weight: 700;
    position: sticky;
    z-index: 2;
}

.ts-table thead .weekday-row > th {
    top: 0;
    height: 26px;
    z-index: 4;
}

.ts-table thead .date-row > th {
    top: 26px;
    height: 24px;
    z-index: 3;
}

.ts-table thead th.col-no,
.ts-table thead th.col-name,
.ts-table thead th.col-sum {
    top: 0;
    z-index: 5;
    vertical-align: middle;
}

.col-no {
    min-width: 32px;
    width: 32px;
    left: 0;
    position: sticky;
    z-index: 3;
    background: #eef2f7;
    font-weight: 400 !important;
}

tbody .col-no {
    background: #ffffff;
    z-index: 1;
    font-weight: 400;
}

.col-name {
    text-align: left !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    left: 32px;
    position: sticky;
    z-index: 3;
    background: #eef2f7;
    overflow: hidden;
    vertical-align: middle !important;
}

thead .col-name {
    font-weight: 700 !important;
    text-align: center !important;
}

tbody .col-name {
    background: #ffffff;
    z-index: 1;
    font-weight: 400 !important;
}

.col-day {
    min-width: 30px;
    width: 30px;
    font-weight: 400;
}

.col-day.sunday {
    background: rgb(222, 235, 247);
}

.col-day.today {
    background: rgb(248, 203, 173) !important;
    color: #8a3b00;
}

.col-day.pending:not(.sunday) {
    background: #f8d7da !important;
}

.col-day.pending.sunday {
    background: rgb(222, 235, 247) !important;
}

.pending-text,
.mark-input.pending {
    font-style: italic;
    font-weight: 400;
    color: #111111;
}

.col-sum {
    min-width: 40px;
    background: #e2efda !important;
    font-variant-numeric: tabular-nums;
    font-weight: 400;
    text-align: right !important;
    vertical-align: middle !important;
    padding-right: 5px !important;
}

.col-sum.total,
.col-sum.total-head {
    font-weight: 700;
    min-width: 46px;
}

.mark-input {
    width: 100%;
    min-width: 26px;
    border: 0;
    background: transparent;
    text-align: center;
    font-size: 11px;
    font-weight: 400;
    padding: 0;
    box-sizing: border-box;
    color: #111111;
}

.mark-input:focus {
    outline: 1px solid #4b8fd8;
    background: #ffffff;
}

.ts-context-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
}

.ts-context-menu {
    position: fixed;
    z-index: 9999;
    min-width: 260px;
    background: #ffffff;
    border: 1px solid #9c9c9c;
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    padding: 4px 0;
}

.ts-context-menu button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
}

.ts-context-menu button:hover:not(:disabled) {
    background: #eef3f9;
}

.ts-context-menu button:disabled {
    color: #999999;
    cursor: not-allowed;
}

.ts-context-menu button.danger {
    color: #b42318;
}

.ts-context-sep {
    height: 1px;
    margin: 4px 0;
    background: #dddddd;
}

.ts-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ts-panel {
    width: min(420px, 92vw);
    background: #ffffff;
    border-radius: 8px;
    padding: 16px 18px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.ts-panel h3 {
    margin: 0 0 12px;
    font-size: 16px;
}

.ts-panel label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    margin-bottom: 10px;
}

.ts-panel select,
.ts-panel input {
    height: 32px;
    padding: 0 8px;
    border: 1px solid #aaaaaa;
    border-radius: 4px;
}

.ts-panel-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ts-panel-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.ts-panel-actions button {
    height: 34px;
    padding: 0 14px;
    border: 1px solid #777777;
    background: #f7f7f7;
    cursor: pointer;
}

.ts-panel-actions button.primary {
    background: #dbe8f8;
    border-color: #6a8fb8;
}

.ts-notify-stack {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}

.ts-notify-card {
    background: #ffffff;
    border: 1px solid #b0b0b0;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    font-size: 13px;
}

.ts-notify-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.ts-notify-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.ts-notify-actions button {
    height: 30px;
    padding: 0 10px;
    border: 1px solid #888888;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 12px;
}

.ts-notify-actions button.ok {
    background: #d9f2e3;
}

.ts-notify-actions button.no {
    background: #f8d7da;
}

@media print {
    .header-actions,
    .ts-legend,
    .ts-error,
    .ts-info,
    .user-info,
    .ts-context-menu,
    .ts-context-backdrop,
    .ts-overlay,
    .ts-notify-stack {
        display: none !important;
    }

    .ts-header {
        padding-left: 0 !important;
    }

    .ts-page {
        background: #ffffff;
        height: auto;
        padding: 0;
    }

    .ts-table-wrap {
        overflow: visible;
        border: 0;
    }

    .col-no,
    .col-name {
        position: static !important;
    }

    .col-day.today {
        background: transparent !important;
        color: inherit !important;
    }

    .col-day.sunday {
        background: rgb(222, 235, 247) !important;
    }

    .col-sum {
        background: #e2efda !important;
    }

    .print-zero-sum {
        display: none !important;
    }

    .ts-table,
    .ts-table th,
    .ts-table td {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}


/* ProgressGanttTrack.razor.css */
.gantt-track {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    width: calc(var(--gantt-days, 31) * 31px);
    min-width: calc(var(--gantt-days, 31) * 31px);
    max-width: calc(var(--gantt-days, 31) * 31px);
    height: auto;
    min-height: 0;
    line-height: 0;
}

.gantt-track > .timeline-cell {
    box-sizing: border-box;
    flex: 0 0 31px;
    width: 31px;
    min-width: 31px;
    max-width: 31px;
    height: 100%;
    min-height: 100%;
    align-self: stretch;
    padding: 0;
    line-height: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.6);
    overflow: hidden;
    background: #ffffff;
}

.gantt-track > .timeline-cell:last-child,
.gantt-track > .timeline-cell.fill-join {
    flex: 0 0 31px;
    width: 31px;
    min-width: 31px;
    max-width: 31px;
    border-right-color: transparent;
}

.gantt-track > .timeline-cell.actual-progress {
    background: #00bf8f !important;
}

.gantt-track > .timeline-cell.today-progress {
    background: #63efbe !important;
}

.gantt-track > .timeline-cell.ahead-progress {
    background: #00e5e5 !important;
}

.gantt-track > .timeline-cell.slow-progress {
    background: #f4b900 !important;
}

.gantt-track > .timeline-cell.overdue {
    background: #ff1010 !important;
}

.gantt-track > .timeline-cell.project-actual-progress {
    background: #08a8df !important;
}

.gantt-track > .timeline-cell.project-today-progress {
    background: #7ed5f0 !important;
}

.gantt-track > .timeline-cell.project-timeline {
    background: #e7e6e6;
}

.gantt-track > .timeline-cell.sunday {
    background: #eeeeee;
}

.gantt-track > .timeline-cell.sunday.actual-progress {
    background: #00bf8f !important;
}

.gantt-track > .timeline-cell.sunday.today-progress {
    background: #63efbe !important;
}

.gantt-track > .timeline-cell.sunday.ahead-progress {
    background: #00e5e5 !important;
}

.gantt-track > .timeline-cell.sunday.slow-progress {
    background: #f4b900 !important;
}

.gantt-track > .timeline-cell.sunday.overdue {
    background: #ff1010 !important;
}

.gantt-track > .timeline-cell.sunday.project-actual-progress {
    background: #08a8df !important;
}

.gantt-track > .timeline-cell.sunday.project-today-progress {
    background: #7ed5f0 !important;
}

.gantt-track > .timeline-cell.start-day,
.gantt-track > .timeline-cell.actual-finish {
    box-shadow: none;
}

@media print {
    .gantt-track {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        align-items: stretch !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    .gantt-track > .timeline-cell {
        flex: 1 1 0 !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        height: 100% !important;
        min-height: 100% !important;
        align-self: stretch !important;
        overflow: visible !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
        border: 0 !important;
        border-right: 0.75pt solid #000 !important;
        background-image: none !important;
        box-shadow: none !important;
    }

    .gantt-track > .timeline-cell.fill-join {
        border-right: 0.75pt solid #000 !important;
    }

    .gantt-track > .timeline-cell:last-child {
        border-right: 0 !important;
        background-image: none !important;
    }

    .gantt-track > .timeline-cell.actual-progress,
    .gantt-track > .timeline-cell.sunday.actual-progress {
        background-color: #00bf8f !important;
        box-shadow: none !important;
    }

    .gantt-track > .timeline-cell.today-progress,
    .gantt-track > .timeline-cell.sunday.today-progress {
        background-color: #63efbe !important;
        box-shadow: none !important;
    }

    .gantt-track > .timeline-cell.ahead-progress,
    .gantt-track > .timeline-cell.sunday.ahead-progress {
        background-color: #00e5e5 !important;
        box-shadow: none !important;
    }

    .gantt-track > .timeline-cell.slow-progress,
    .gantt-track > .timeline-cell.sunday.slow-progress {
        background-color: #f4b900 !important;
        box-shadow: none !important;
    }

    .gantt-track > .timeline-cell.overdue,
    .gantt-track > .timeline-cell.sunday.overdue {
        background-color: #ff1010 !important;
        box-shadow: none !important;
    }

    .gantt-track > .timeline-cell.project-actual-progress,
    .gantt-track > .timeline-cell.sunday.project-actual-progress {
        background-color: #08a8df !important;
        box-shadow: none !important;
    }

    .gantt-track > .timeline-cell.project-today-progress,
    .gantt-track > .timeline-cell.sunday.project-today-progress {
        background-color: #7ed5f0 !important;
        box-shadow: none !important;
    }

    .gantt-track > .timeline-cell.sunday:not(.actual-progress):not(.today-progress):not(.ahead-progress):not(.slow-progress):not(.overdue):not(.project-actual-progress):not(.project-today-progress) {
        background-color: #eeeeee !important;
        box-shadow: none !important;
    }
}


