/* thunhap/income-tab.css — Ước tính thu nhập FA / UM+ (bố cục giống Excel) */
.inc-wrap { max-width: 1280px; margin: 0 auto; padding: 16px; color: #17332d; font-size: 13px; }
.inc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.inc-title { font-size: 19px; font-weight: 800; color: #025b48; }
.inc-sub { color: #64748b; font-size: 12px; margin-top: 4px; }
.inc-role-toggle { display: flex; gap: 6px; background: #eef4f1; padding: 4px; border-radius: 8px; }
.inc-role-btn { border: 0; background: transparent; padding: 8px 16px; border-radius: 6px; font: 700 13px inherit; color: #64748b; cursor: pointer; }
.inc-role-btn.active { background: #025b48; color: #fff; }

/* Bố cục 2 cột như Excel: trái = nhập liệu, phải = kết quả */
.inc-excel { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
.inc-panel { background: #fff; border: 1px solid #d9e2df; border-radius: 8px; padding: 14px; box-shadow: 0 1px 2px rgba(15,45,38,.05); }

/* Tiêu đề section (giống hàng tiêu đề đậm trong Excel) */
.inc-sec { font-size: 14px; font-weight: 800; color: #025b48; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 2px solid #e2e8f0; }
.inc-sec.sub { margin-top: 16px; }

/* Bảng sản phẩm */
.inc-ptable { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 12px; }
.inc-ptable th, .inc-ptable td { padding: 6px 7px; border: 1px solid #d7e0dd; text-align: left; vertical-align: middle; }
.inc-ptable th { background: #eef4f1; color: #025b48; font-weight: 700; text-align: center; }
.inc-ptable td.c { text-align: center; }
.inc-phase { color: #64748b; font-weight: 400; font-size: 11px; }

/* Tách biệt các nhóm hợp đồng: viền đậm giữa nhóm + nền xen kẽ */
.inc-ptable tr.grp-break td { border-top: 2px solid #025b48; }
.inc-ptable tr.grp-0 td { background: #e3efff; }
.inc-ptable tr.grp-1 td { background: #f3f8f6; }
.inc-ptable tr.grp-2 td { background: #fdf7ec; }
.inc-ptable td.num { text-align: right; }
.inc-ptable input { width: 62px; padding: 4px 6px; border: 1px solid #d9e2df; border-radius: 4px; font: inherit; color: #17332d; text-align: right; }
.inc-ptable input:focus { outline: 2px solid #8ec4b7; border-color: #025b48; }

/* Dòng nhập liệu (giống "Label : value unit") */
.inc-irow { display: flex; align-items: baseline; gap: 6px; padding: 4px 0; flex-wrap: wrap; }
.inc-ilabel { color: #334155; font-weight: 700; }
.inc-icolon { color: #94a3b8; }
.inc-irow input, .inc-irow select { padding: 5px 8px; border: 1px solid #d9e2df; border-radius: 4px; font: inherit; color: #17332d; background: #fff; }
.inc-irow input:focus, .inc-irow select:focus { outline: 2px solid #8ec4b7; border-color: #025b48; }
.inc-irow input.num { width: 80px; text-align: right; }
.inc-iunit { color: #64748b; font-size: 12px; }
.inc-inote { color: #c2410c; font-size: 11.5px; }
.inc-ival { color: #0f172a; font-weight: 600; }

/* Dòng kết quả (giống "Label : tháng  triệu đ") */
.inc-outhead { display: grid; grid-template-columns: 1fr 90px 52px; gap: 6px; padding: 6px 4px; font-weight: 700; color: #025b48; border-bottom: 1px solid #d7e0dd; align-items: baseline; }
.inc-outhead .r { text-align: right; }
.inc-outhead .u { text-align: left; color: #64748b; font-weight: 600; font-size: 11px; }
.inc-orow { display: grid; grid-template-columns: 1fr 90px 52px; gap: 6px; padding: 5px 4px; border-bottom: 1px solid #eef2f0; align-items: baseline; }
.inc-orow .l { color: #334155; }
.inc-orow .r { text-align: right; color: #0f172a; font-variant-numeric: tabular-nums; }
.inc-orow .u { color: #94a3b8; font-size: 11px; }
.inc-onote { grid-column: 1 / -1; color: #c2410c; font-size: 11px; padding: 0 0 2px 2px; }
.inc-osub { padding: 8px 4px 2px; font-weight: 700; color: #025b48; font-size: 12.5px; }
.inc-ototal { display: grid; grid-template-columns: 1fr 90px 52px; gap: 6px; padding: 6px 4px; background: #e7f2ed; border-radius: 4px; font-weight: 800; color: #025b48; }
.inc-ototal .r { text-align: right; }
.inc-ototal .u { color: #025b48; font-size: 11px; }

/* Chú thích cuối (footnote Excel) */
.inc-foot { margin-top: 12px; padding: 8px 10px; color: #64748b; font-size: 11px; line-height: 1.5; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; }

.inc-calc-btn { margin-top: 12px; width: 100%; border: 0; border-radius: 6px; background: #025b48; color: #fff; padding: 11px; font: 700 14px inherit; cursor: pointer; }
.inc-calc-btn:hover { background: #014536; }

@media (max-width: 820px) {
  .inc-excel { grid-template-columns: 1fr; }
  .inc-outhead, .inc-orow, .inc-ototal { grid-template-columns: 1fr 76px 46px; }
}

/* Desktop: 2 cột cuộn riêng, ẩn thanh scroll */
@media (min-width: 821px) {
  .inc-excel { align-items: stretch; }
  .inc-panel {
    max-height: 82vh;
    overflow-y: auto;
    scrollbar-width: none;       /* Firefox */
    -ms-overflow-style: none;    /* Edge/IE */
  }
  .inc-panel::-webkit-scrollbar { display: none; } /* Chrome/Safari */
}
