/* =====================================================================
 * assets/tdc.css — MODULE "TIÊU CHUẨN – ĐO LƯỜNG – CHẤT LƯỢNG" (DIP 1.5)
 * Prefix tc-. Dùng biến palette chung (--navy/--blue/--gold/--green/--red/--line…)
 * để đổi màu theo cấu hình. KHÔNG dùng color-mix. Thẻ đồng cao, chống vỡ dòng
 * (line-clamp/ellipsis), bố cục gọn theo phong cách quốc tế.
 * ===================================================================== */

.tc-wrap{max-width:1200px;margin:0 auto}

/* ---------- HERO CÔNG KHAI ---------- */
.tc-hero{position:relative;overflow:hidden;border-radius:20px;padding:34px 30px;color:#fff;
  background:linear-gradient(135deg,var(--navy) 0%,var(--blue) 100%);box-shadow:0 18px 40px -18px rgba(8,28,52,.5)}
.tc-hero::after{content:"";position:absolute;right:-70px;top:-70px;width:300px;height:300px;border-radius:50%;background:rgba(255,255,255,.06)}
.tc-hero-in{position:relative;z-index:1;max-width:760px}
.tc-hero-badge{display:inline-block;background:rgba(255,255,255,.16);font-size:11.5px;font-weight:800;letter-spacing:.6px;padding:5px 13px;border-radius:20px;margin-bottom:12px}
.tc-hero h1{margin:0 0 9px;font-size:27px;line-height:1.18;letter-spacing:-.4px}
.tc-hero p{margin:0;color:rgba(255,255,255,.88);font-size:14px;line-height:1.6;max-width:60ch}
.tc-hero-tags{display:flex;flex-wrap:wrap;gap:7px;margin-top:14px}
.tc-htag{font-size:12px;font-weight:600;background:rgba(255,255,255,.14);padding:5px 11px;border-radius:20px;white-space:nowrap}

/* ---------- TAB PHÂN HỆ (CÔNG KHAI) ---------- */
.tc-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}
.tc-tab{display:flex;align-items:center;gap:9px;text-decoration:none;border:1px solid var(--line);background:#fff;border-radius:13px;padding:11px 16px;color:var(--navy);font-weight:700;font-size:13.5px;transition:.15s;min-width:0}
.tc-tab .ic{font-size:18px;flex:0 0 auto}
.tc-tab .tx{display:flex;flex-direction:column;line-height:1.2;min-width:0}
.tc-tab .tx small{font-size:11px;font-weight:600;color:var(--muted)}
.tc-tab:hover{border-color:var(--blue);transform:translateY(-1px)}
.tc-tab.on{background:var(--blue);border-color:var(--blue);color:#fff}
.tc-tab.on .tx small{color:rgba(255,255,255,.85)}

/* ---------- KPI ---------- */
.tc-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:18px 0}
.tc-kpi{background:#fff;border:1px solid var(--line);border-radius:14px;padding:15px 16px;display:flex;flex-direction:column;gap:4px;min-width:0;border-top:3px solid var(--blue)}
.tc-kpi.k-cb{border-top-color:var(--blue)} .tc-kpi.k-mv{border-top-color:var(--gold)}
.tc-kpi.k-kd{border-top-color:var(--green)} .tc-kpi.k-tbt{border-top-color:var(--red)}
.tc-kpi .n{font-size:25px;font-weight:800;color:var(--navy);line-height:1;font-variant-numeric:tabular-nums}
.tc-kpi .l{font-size:12.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tc-kpi .s{font-size:11px;color:var(--green);font-weight:700}

/* ---------- BỘ LỌC ---------- */
.tc-filter{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px 16px;margin-bottom:16px}
.tc-filter .fld{display:flex;flex-direction:column;gap:4px;min-width:0}
.tc-filter .fld label{font-size:11.5px;font-weight:700;color:var(--muted)}
.tc-filter input,.tc-filter select{height:40px;border:1px solid var(--line);border-radius:9px;padding:0 11px;font-size:13.5px;background:#fff;max-width:230px;width:auto}
.tc-filter .fld.grow{flex:1}
.tc-filter .fld.grow input{width:100%;max-width:none}
.tc-filter .acts{display:flex;gap:8px}
.tc-filter .btn-loc{height:40px;padding:0 16px;border:0;border-radius:9px;background:var(--blue);color:#fff;font-weight:700;font-size:13.5px;cursor:pointer;white-space:nowrap}
.tc-filter .btn-xoa{height:40px;padding:0 14px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--muted);font-weight:600;font-size:13.5px;text-decoration:none;display:inline-flex;align-items:center;white-space:nowrap}

/* ---------- PILL TRẠNG THÁI / NHÃN ---------- */
.tc-pill{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:700;padding:3px 10px;border-radius:20px;color:#fff;white-space:nowrap}
.tc-tag{display:inline-flex;align-items:center;font-size:11px;font-weight:700;padding:2px 9px;border-radius:11px;background:var(--blue-l);color:var(--blue);white-space:nowrap}
.tc-risk{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:800;padding:2px 9px;border-radius:11px;border:1.5px solid currentColor;background:#fff}

/* ---------- BẢNG DỮ LIỆU ---------- */
.tc-card{background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.tc-card .tc-card-h{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 16px;border-bottom:1px solid var(--line);flex-wrap:wrap}
.tc-card .tc-card-h h3{margin:0;font-size:15px;color:var(--navy)}
.tc-table{width:100%;border-collapse:collapse;font-size:13.5px}
.tc-table th,.tc-table td{padding:11px 14px;text-align:left;border-bottom:1px solid var(--line);vertical-align:middle}
.tc-table th{background:var(--bg);font-size:11.5px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.4px;white-space:nowrap}
.tc-table tr:last-child td{border-bottom:0}
.tc-table tr:hover td{background:#fafcff}
.tc-table .t-main{font-weight:700;color:var(--navy)}
.tc-table .t-sub{font-size:12px;color:var(--muted);margin-top:2px;display:block;max-width:42ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tc-table .t-acts{white-space:nowrap;text-align:right}
.tc-table .t-acts a{font-size:12.5px;font-weight:600;text-decoration:none;color:var(--blue);margin-left:10px}
.tc-table .t-acts a.del{color:var(--red)}
.tc-empty{padding:40px 20px;text-align:center;color:var(--muted);font-size:14px}
.tc-empty .em-ic{font-size:34px;display:block;margin-bottom:8px;opacity:.5}

/* ---------- THẺ CÔNG KHAI (đồng cao) ---------- */
.tc-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px;align-items:stretch}
.tc-item{display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px;height:100%;box-sizing:border-box;transition:.15s;border-top:3px solid var(--blue)}
.tc-item:hover{transform:translateY(-2px);box-shadow:0 14px 30px -18px rgba(8,28,52,.4);border-color:var(--blue)}
.tc-item .it-h{display:flex;align-items:center;gap:8px;margin-bottom:8px;flex-wrap:wrap}
.tc-item .it-ti{font-size:14.5px;font-weight:800;color:var(--navy);line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tc-item .it-org{font-size:12.5px;color:var(--muted);margin:2px 0 10px;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
.tc-item .it-meta{margin-top:auto;display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--ink)}
.tc-item .it-meta .row{display:flex;gap:6px;align-items:baseline}
.tc-item .it-meta .row b{color:var(--muted);font-weight:600;flex:0 0 auto;min-width:74px}
.tc-item .it-meta .row span{color:var(--navy);font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ---------- TBT (bản tin) ---------- */
.tc-tbt-item{display:flex;flex-direction:column;gap:8px;background:#fff;border:1px solid var(--line);border-left:4px solid var(--red);border-radius:13px;padding:15px 17px;height:100%;box-sizing:border-box}
.tc-tbt-item .tt{font-size:14px;font-weight:800;color:var(--navy);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tc-tbt-item .mt{display:flex;flex-wrap:wrap;gap:7px;align-items:center;font-size:11.5px;color:var(--muted)}
.tc-tbt-item .mt .flag{font-weight:700;color:var(--navy)}
.tc-tbt-item .sum{font-size:12.5px;color:var(--ink);line-height:1.55;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tc-tbt-item .ft{margin-top:auto;display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:11.5px}
.tc-tbt-item .ft .dl{color:var(--red);font-weight:700}
.tc-tbt-item .ft a{color:var(--blue);font-weight:700;text-decoration:none;white-space:nowrap}

/* ---------- HỒ SƠ CHI TIẾT (form) ---------- */
.tc-form{background:#fff;border:1px solid var(--line);border-radius:14px;padding:20px 22px}
.tc-form .sec-lb{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.5px;color:var(--blue);margin:18px 0 12px;padding-bottom:6px;border-bottom:1px solid var(--line)}
.tc-form .sec-lb:first-child{margin-top:0}
.tc-grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px 18px}
.tc-grid3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px 18px}
.tc-fld{display:flex;flex-direction:column;gap:5px;min-width:0}
.tc-fld.full{grid-column:1/-1}
.tc-fld label{font-size:12.5px;font-weight:700;color:var(--navy)}
.tc-fld label .req{color:var(--red)}
.tc-fld input,.tc-fld select,.tc-fld textarea{border:1px solid var(--line);border-radius:9px;padding:10px 12px;font-size:13.5px;width:100%;box-sizing:border-box;background:#fff}
.tc-fld input:focus,.tc-fld select:focus,.tc-fld textarea:focus{outline:none;border-color:var(--blue)}
.tc-fld .hint{font-size:11px;color:var(--muted)}
.tc-form-acts{display:flex;gap:10px;margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}

/* ---------- THANH PHÂN HỆ (QUẢN TRỊ) ---------- */
.tc-subnav{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
.tc-subnav a{display:inline-flex;align-items:center;gap:7px;text-decoration:none;border:1px solid var(--line);background:#fff;border-radius:10px;padding:9px 14px;color:var(--navy);font-weight:700;font-size:13px}
.tc-subnav a.on{background:var(--navy);border-color:var(--navy);color:#fff}
.tc-subnav a:hover{border-color:var(--blue)}

/* ---------- RESPONSIVE ---------- */
@media(max-width:980px){.tc-kpis{grid-template-columns:repeat(2,1fr)}.tc-grid2,.tc-grid3{grid-template-columns:1fr}}
@media(max-width:720px){.tc-hero{padding:24px 20px}.tc-hero h1{font-size:22px}
  .tc-table thead{display:none}
  .tc-table,.tc-table tbody,.tc-table tr,.tc-table td{display:block;width:100%;box-sizing:border-box}
  .tc-table tr{border:1px solid var(--line);border-radius:11px;margin-bottom:10px;padding:6px 4px}
  .tc-table td{border-bottom:1px solid #f0f3f7;text-align:left}
  .tc-table td:last-child{border-bottom:0}
  .tc-table .t-acts{text-align:left}
  .tc-table .t-acts a{margin:0 12px 0 0}}
