/* tabcards.css — หน้าตา Tabulator (ตาราง/การ์ด) ให้เข้ากับธีมกรมท่า — ใช้คู่กับ tabcards.js */
.tc.tabulator{ border-radius:16px; border:1px solid #E3E9F4; box-shadow:0 6px 18px rgba(30,58,138,.06); font-size:14.5px; background:#fff; }
.tc .tabulator-header{ background:#F5F8FE; border-bottom:1px solid #E3E9F4; }
.tc .tabulator-header .tabulator-col{ background:transparent; border-right:0; }
.tc .tabulator-col .tabulator-col-title{ font-size:13px; font-weight:600; color:#475569; white-space:nowrap; }
.tc .tabulator-tableholder{ background:#fff; }
.tc .tabulator-row{ border-bottom:1px solid #F0F3F9; background:#fff; }
.tc .tabulator-row.tabulator-row-even{ background:#fff; }
.tc .tabulator-row:hover{ background:#F7FAFF !important; }
.tc .tabulator-row .tabulator-cell{ border-right:0; padding:12px 10px; }
.tc .tabulator-cell.tc-wrap{ white-space:normal; word-break:break-word; line-height:1.45; }
.tc .tabulator-footer{ background:#FAFBFE; border-top:1px solid #E3E9F4; }
.tc .tabulator-footer .tabulator-page{ border-radius:8px; }
.tc .tabulator-footer .tabulator-page.active{ background:#1E3A8A; border-color:#1E3A8A; color:#fff; }
.tc .tabulator-footer .tabulator-page-size{ border-radius:8px; }
.tc .tabulator-calcs-holder, .tc .tabulator-calcs-holder .tabulator-row{ background:#F5F8FE !important; }
.tc .tabulator-calcs-holder .tabulator-cell{ color:#1E3A8A; font-weight:600; }
.tc-empty{ padding:36px 12px; text-align:center; color:#64748B; white-space:normal; }
.tc-empty .bi{ display:block; font-size:38px; color:#B9CDF5; margin-bottom:6px; }
.tc-empty b{ display:block; color:#334155; font-size:15.5px; margin-bottom:2px; }
.tc .tabulator-row[role=row]{ cursor:default; }
.tc.tc-link .tabulator-row{ cursor:pointer; }

/* ---- โหมดการ์ด (มือถือ) ---- */
.tc.tc-card.tabulator{ border:0; box-shadow:none; background:transparent; }
.tc.tc-card .tabulator-header{ display:none; }
.tc.tc-card .tabulator-tableholder{ background:transparent; }
.tc.tc-card .tabulator-table{ background:transparent; }
.tc.tc-card .tabulator-row, .tc.tc-card .tabulator-row.tabulator-row-even{ background:transparent; border:0; }
.tc.tc-card .tabulator-row:hover{ background:transparent !important; }
.tc.tc-card .tabulator-row .tabulator-cell{ padding:0 0 12px; white-space:normal; }
.tc.tc-card .tabulator-footer{ border:1px solid #E3E9F4; border-radius:14px; }
.tc.tc-card .tabulator-footer .tabulator-footer-contents{ flex-direction:column; gap:6px; }
.tc.tc-card .tabulator-footer .tabulator-pages .tabulator-page:not(.active){ display:none; }

/* การ์ดพื้นฐาน */
.tcc{ position:relative; overflow:hidden; border:1px solid #E3E9F4; border-radius:16px; background:#fff; padding:14px 16px;
      box-shadow:0 4px 14px rgba(30,58,138,.06); }
.tcc::before{ content:""; position:absolute; left:0; top:0; bottom:0; width:4px; background:var(--tcc-bar, #C3D4F5); }
.tcc-h{ display:flex; gap:12px; align-items:flex-start; }
.tcc-no{ flex:0 0 34px; height:34px; border-radius:10px; display:grid; place-items:center; font-weight:600; font-size:13.5px; color:#2563EB; background:#EEF3FF; }
.tcc-t{ flex:1; min-width:0; }
.tcc-t .p{ font-weight:600; color:#1E3A8A; font-size:16px; line-height:1.35; }
.tcc-t .s{ font-size:13px; color:#64748B; margin-top:2px; }
.tcc-meta{ display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.tcc-meta span{ display:inline-flex; align-items:center; gap:5px; font-size:12.5px; padding:3px 10px; border-radius:999px; background:#F1F4F9; color:#475569; }
.tcc-meta span.ok{ background:#DCFCE7; color:#15803D; } .tcc-meta span.wait{ background:#FEF3C7; color:#B45309; }
.tcc-meta span.bad{ background:#FEE4E2; color:#B42318; } .tcc-meta span.info{ background:#EEF3FF; color:#2563EB; }
.tcc-act{ display:flex; gap:8px; margin-top:12px; }
.tcc-act .btn{ flex:1; border-radius:11px; }

/* ชิ้นส่วนที่ใช้ในตาราง */
.tc-chip{ display:inline-flex; align-items:center; gap:4px; padding:3px 10px; border-radius:999px; font-size:12.5px; font-weight:500; white-space:nowrap; background:#F1F4F9; color:#475569; }
.tc-chip.ok{ background:#DCFCE7; color:#15803D; } .tc-chip.wait{ background:#FEF3C7; color:#B45309; }
.tc-chip.bad{ background:#FEE4E2; color:#B42318; } .tc-chip.info{ background:#EEF3FF; color:#2563EB; }
.tc-yes{ width:28px; height:28px; border-radius:50%; display:inline-grid; place-items:center; background:#DCFCE7; color:#15803D; font-size:15px; }
.tc-no{ width:28px; height:28px; border-radius:50%; display:inline-grid; place-items:center; background:#F1F4F9; color:#CBD5E1; font-size:13px; }
.tc-main{ font-weight:600; color:#1E3A8A; text-decoration:none; }
a.tc-main:hover{ text-decoration:underline; }
.tc-sub{ font-size:12.5px; color:#64748B; }

/* โหมดการ์ด: ชนะ style เฉพาะหน้า (#w-table ...) */
.tc.tc-card .tabulator-row, .tc.tc-card .tabulator-row.tabulator-row-even{ background:transparent !important; border:0 !important; }
.tc.tc-card .tabulator-row .tabulator-cell{ padding:0 0 12px !important; border:0 !important; }
.tc.tc-card .tabulator-calcs-holder{ display:none !important; }
.tc.tc-card.tabulator{ border:0 !important; box-shadow:none !important; background:transparent !important; }
.tc.tc-card .tabulator-header{ display:none !important; }
.tc.tc-card .tabulator-footer{ background:#fff !important; }
.tcc-sum{ display:flex; justify-content:space-between; align-items:flex-end; gap:10px; margin-top:10px; padding-top:10px; border-top:1px dashed #E3E9F4; }
.tcc-sum .amt{ font-size:20px; font-weight:600; color:#15803D; }
.tcc-sum .bill{ font-family:ui-monospace,Menlo,Consolas,monospace; font-size:12.5px; padding:2px 8px; border-radius:7px; background:#F1F4F9; color:#334155; }
