/* tools-glow.css — ตกแต่งผลลัพธ์ทุกหน้าของ DEKTHAI Tools (คู่กับ tools-glow.js) · สีจาก design system เท่านั้น */

/* ── ชิปไอคอน ── */
#toolPanel .tg-ic{flex:0 0 auto;display:inline-grid;place-items:center;width:28px;height:28px;border-radius:9px;background:var(--accent-soft);color:var(--ink);font-size:16px;box-shadow:inset 0 0 0 1px rgba(184,224,51,.45);vertical-align:middle}
#toolPanel .tg-ic.is-sm{width:26px;height:26px;border-radius:8px;font-size:15px;margin-right:9px}
#toolPanel .tg-ic.is-ink{background:var(--ink);color:var(--accent);box-shadow:none}
#toolPanel .tg-ic.is-h{width:30px;height:30px;border-radius:10px;background:var(--ink);color:var(--accent);box-shadow:none;font-size:17px}

/* ── แถวสรุปในการ์ดตั๋ว ── */
#toolPanel .tk-hero-rows>div{align-items:center;padding:9px 8px;margin:0 -8px;border-radius:10px;transition:background .15s}
#toolPanel .tk-hero-rows>div:hover{background:var(--bg-soft)}
#toolPanel .tk-hero-rows .tg-lab{display:flex;align-items:center;gap:10px;min-width:0}
#toolPanel .tk-hero-rows .tg-lab em{font-style:normal;min-width:0;overflow-wrap:anywhere}
#toolPanel .tk-hero-rows>div.is-total{background:linear-gradient(90deg,var(--accent-soft),transparent 85%);border-radius:12px;padding:12px 10px}
#toolPanel .tk-hero-body{padding-bottom:16px}

/* ── การ์ดตัวเลข ── */
#toolPanel .tk-stat span{display:flex;align-items:center;gap:6px}
#toolPanel .tk-stat .tg-si{font-size:15px;color:var(--accent-dark);flex:0 0 auto}
#toolPanel .tk-hero .tk-stat .tg-si,#toolPanel .tk-res-dark .tk-stat .tg-si{color:var(--accent)}

/* ── ตาราง ── */
#toolPanel .tk-table-wrap{border-radius:14px;box-shadow:0 18px 32px -28px rgba(10,10,11,.45);background:#fff}
#toolPanel .tk-table thead th{background:var(--ink);color:#fff;font-size:12px;letter-spacing:.05em;padding:11px 14px;border-bottom:0}
#toolPanel .tk-table thead th .tg-hi{margin-right:6px;color:var(--accent);font-size:15px;vertical-align:-2px}
#toolPanel .tk-table thead th:first-child{border-top-left-radius:13px}#toolPanel .tk-table thead th:last-child{border-top-right-radius:13px}
#toolPanel .tk-table tbody td{padding:11px 14px;vertical-align:middle}
#toolPanel .tk-table tbody tr:nth-child(even){background:var(--bg-soft)}
#toolPanel .tk-table tbody tr:hover{background:var(--accent-soft)}
#toolPanel .tk-table tbody td:first-child{font-weight:600;color:var(--ink)}
#toolPanel .tk-table tbody td:first-child .tg-cell{vertical-align:middle;overflow-wrap:anywhere}
#toolPanel .tk-table td.num,#toolPanel .tk-table th.num{font-variant-numeric:tabular-nums}
#toolPanel .tk-table tfoot td{background:var(--accent-soft);border-top:2px solid var(--ink);padding:11px 14px}
#toolPanel .tk-table tfoot .tg-hi{margin-right:6px;font-size:15px;vertical-align:-2px}

/* ── ป้ายสถานะในตาราง ── */
#toolPanel .tg-pill{display:inline-flex;align-items:center;gap:5px;padding:3px 11px 3px 8px;border-radius:100px;font-size:12.5px;font-weight:600;line-height:1.4;white-space:nowrap}
#toolPanel .tg-pill .bx{font-size:15px}
#toolPanel .tg-pill.is-good{background:#ECFDF5;color:#047857}
#toolPanel .tg-pill.is-bad{background:#FEF2F2;color:#B91C1C}
#toolPanel .tg-pill.is-warn{background:#FFFBEB;color:#B45309}

/* ── หัวข้อส่วน ── */
#toolPanel h3.tg-h,#toolPanel h4.tg-h{display:flex;align-items:center;gap:10px;margin-top:22px;margin-bottom:10px;font-weight:800;letter-spacing:-.01em}
#toolPanel h3.tg-h::after{content:'';flex:1;height:2px;border-radius:2px;background:linear-gradient(90deg,var(--border),transparent)}
#toolPanel h4.tg-h .tg-ic.is-h{width:26px;height:26px;font-size:15px}

/* ── ป้ายกำกับช่องกรอก ── */
#toolPanel .t-field>label .tg-fi{margin-right:6px;font-size:16px;color:var(--text-3);vertical-align:-2px}
#toolPanel .t-field:focus-within>label .tg-fi{color:var(--ink)}

/* ── หมายเหตุ ── */
#toolPanel .tk-note.tg-note{margin-top:16px;padding:11px 14px 11px 16px;border-radius:12px;background:var(--bg-soft);border:1px solid var(--border);border-left:4px solid var(--accent);font-size:12.5px;line-height:1.7;color:var(--text-2)}
#toolPanel .tk-note.tg-note>.bx:first-child{color:var(--ink);font-size:16px;vertical-align:-2px;margin-right:4px}

@media (max-width:560px){
  #toolPanel .tk-table thead th .tg-hi{display:none}
  #toolPanel .tk-table thead th,#toolPanel .tk-table tbody td{padding:9px 10px}
  #toolPanel .tg-ic.is-sm{width:22px;height:22px;font-size:13px;margin-right:6px}
}
@media (prefers-reduced-motion:reduce){#toolPanel .tk-hero-rows>div{transition:none}}
