:root{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:#111;background:#f5f5f0;font-synthesis:none
}
*{box-sizing:border-box}
body{margin:0;background:#f5f5f0;color:#111}
a{color:inherit}
button{font:inherit}
.health-app{width:min(1380px,calc(100% - 48px));margin:0 auto;padding-bottom:44px}
.health-topbar{height:68px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #c8c8c0}
.health-brand{display:flex;align-items:center;gap:10px;text-decoration:none;font-weight:850;font-size:14px}
.health-brand-mark{display:grid;place-items:center;width:32px;height:32px;background:#111;color:#fff;font-size:11px;font-weight:900}
.back-link{font-size:12px;font-weight:700;text-decoration:none;color:#555}
.back-link:hover{text-decoration:underline}
.health-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;padding:38px 0 22px}
.eyebrow{margin:0 0 8px;font-size:10px;font-weight:900;letter-spacing:.13em;color:#666}
.health-hero h1{margin:0;font-size:clamp(34px,5vw,54px);line-height:1;letter-spacing:-.045em}
.sub{margin:12px 0 0;font-size:13px;line-height:1.5;color:#666}
.refresh-button{min-height:40px;padding:0 14px;border:1px solid #111;background:#fff;box-shadow:2px 2px 0 #111;font-size:12px;font-weight:850;cursor:pointer}
.refresh-button:hover{transform:translate(-1px,-1px);box-shadow:3px 3px 0 #111}
.refresh-button:disabled{opacity:.5;cursor:wait;transform:none}
.summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:18px}
.summary-card{min-width:0;padding:17px 18px;background:#fff;border:1px solid #111;box-shadow:2px 2px 0 rgba(17,17,17,.82)}
.summary-card span{display:block;font-size:9px;font-weight:900;letter-spacing:.12em;color:#666}
.summary-card strong{display:block;margin-top:6px;font-size:27px;line-height:1;letter-spacing:-.035em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.summary-card small{display:block;margin-top:6px;font-size:10px;color:#777;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.banner{margin:0 0 18px;padding:11px 13px;border-left:4px solid #b42318;background:#fff0ee;font-size:12px;font-weight:700;color:#8c1d18}
.health-panel{background:#fff;border:1px solid #111;box-shadow:2px 2px 0 rgba(17,17,17,.82);padding:20px}
.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding-bottom:14px;border-bottom:1px solid #d9d9d2}
.panel-head h2{margin:0;font-size:21px;letter-spacing:-.025em}
.panel-head p{margin:5px 0 0;font-size:10px;color:#777}
.legend{display:flex;align-items:center;gap:14px;font-size:10px;font-weight:750;color:#666}
.legend span{display:flex;align-items:center;gap:5px}
.dot{display:inline-block;width:8px;height:8px;border-radius:50%}
.dot.ok{background:#168548}.dot.warning{background:#c58b00}.dot.info{background:#4b82c3}.dot.error{background:#c7362f}
.collector-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin-top:2px}
.collector-card{min-width:0;padding:15px 14px;border-right:1px solid #deded7;border-bottom:1px solid #deded7}
.collector-card:nth-child(4n){border-right:0}
.collector-card:nth-last-child(-n+4){border-bottom:0}
.collector-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.bank-name{display:flex;align-items:center;gap:8px;min-width:0}
.status-dot{flex:0 0 auto;width:10px;height:10px;border-radius:50%;margin-top:4px;background:#999}
.collector-card.ok .status-dot{background:#168548}
.collector-card.warning .status-dot{background:#c58b00}
.collector-card.info .status-dot{background:#4b82c3}
.collector-card.error .status-dot{background:#c7362f}
.bank-name strong{font-size:13px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.source-id{font-size:9px;font-weight:850;color:#888}
.status-chip{flex:0 0 auto;padding:3px 6px;font-size:9px;font-weight:900}
.collector-card.ok .status-chip{background:#e0f5e8;color:#08723d}
.collector-card.warning .status-chip{background:#fff1c9;color:#7d5b00}
.collector-card.info .status-chip{background:#e7f1fb;color:#285f9d}
.collector-card.error .status-chip{background:#ffe1de;color:#9f251f}
.metrics{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px;margin-top:14px}
.metric span{display:block;font-size:9px;font-weight:750;color:#888}
.metric strong{display:block;margin-top:3px;font-size:11px;font-weight:800;font-variant-numeric:tabular-nums}
.error-copy{margin:11px 0 0;padding:8px 9px;background:#fff2f0;border-left:3px solid #c7362f;font-size:10px;line-height:1.4;color:#8d211b;word-break:break-word}
.info-copy{margin:11px 0 0;padding:8px 9px;background:#eef6ff;border-left:3px solid #4b82c3;font-size:10px;line-height:1.4;color:#285f9d;word-break:break-word}
.no-error{margin:11px 0 0;font-size:10px;color:#8a8a82}
footer{display:flex;justify-content:space-between;gap:16px;padding:13px 2px;font-size:10px;color:#777}
footer code{font-size:10px}
@media(max-width:1000px){
  .collector-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .collector-card:nth-child(4n){border-right:1px solid #deded7}
  .collector-card:nth-child(3n){border-right:0}
  .collector-card:nth-last-child(-n+4){border-bottom:1px solid #deded7}
}
@media(max-width:760px){
  .health-app{width:min(100% - 20px,1380px)}
  .health-topbar{height:58px}
  .health-hero{align-items:flex-start;flex-direction:column;padding:28px 0 18px}
  .refresh-button{width:100%}
  .summary-grid{grid-template-columns:1fr 1fr}
  .collector-grid{grid-template-columns:1fr}
  .collector-card,.collector-card:nth-child(3n),.collector-card:nth-child(4n),.collector-card:nth-last-child(-n+4){border-right:0;border-bottom:1px solid #deded7}
  .collector-card:last-child{border-bottom:0}
  .panel-head{flex-direction:column}
  footer{flex-direction:column}
}


/* ======================================================================
   v0.4.40 — user feedback in Admin Health
   ====================================================================== */
.feedback-health-panel{margin-top:18px}
.feedback-filters{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.feedback-filters button{
  min-height:32px;
  padding:0 10px;
  border:1px solid #bbb;
  background:#fff;
  color:#444;
  font-size:10px;
  font-weight:800;
  cursor:pointer;
}
.feedback-filters button:hover{border-color:#777;background:#f7f9fc}
.feedback-filters button.active{
  border-color:#174ea6;
  background:#eaf2ff;
  color:#174ea6;
}
.feedback-health-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  border-bottom:1px solid #deded7;
}
.feedback-health-summary>div{
  padding:12px 14px;
  border-right:1px solid #deded7;
}
.feedback-health-summary>div:last-child{border-right:0}
.feedback-health-summary span{
  display:block;
  color:#888;
  font-size:9px;
  font-weight:850;
  letter-spacing:.08em;
}
.feedback-health-summary strong{
  display:block;
  margin-top:4px;
  font-size:22px;
  line-height:1;
}
.feedback-admin-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0;
}
.feedback-admin-card{
  min-width:0;
  padding:15px 14px;
  border-right:1px solid #deded7;
  border-bottom:1px solid #deded7;
}
.feedback-admin-card:nth-child(2n){border-right:0}
.feedback-admin-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.feedback-admin-head>div{
  display:flex;
  align-items:center;
  gap:6px;
}
.feedback-category,
.feedback-status{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:0 6px;
  font-size:9px;
  font-weight:900;
}
.feedback-category{background:#eef2f7;color:#384250}
.feedback-status{background:#fff2c8;color:#745500}
.status-reviewing .feedback-status{background:#e7f1fb;color:#285f9d}
.status-fixed .feedback-status{background:#e0f5e8;color:#08723d}
.status-archived .feedback-status{background:#ededeb;color:#666}
.feedback-admin-head time{
  color:#888;
  font-size:9px;
  white-space:nowrap;
}
.feedback-admin-card blockquote{
  margin:12px 0 10px;
  padding:0;
  border:0;
  color:#111;
  font-size:13px;
  line-height:1.45;
  font-weight:700;
}
.feedback-context{
  margin:0;
  color:#3f4348;
  font-size:10.5px;
  font-weight:750;
}
.feedback-meta{
  margin:5px 0 0;
  color:#888;
  font-size:9.5px;
  line-height:1.45;
}
.feedback-admin-actions{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:12px;
}
.feedback-admin-actions button{
  min-height:29px;
  padding:0 8px;
  border:1px solid #bbb;
  background:#fff;
  color:#444;
  font-size:9.5px;
  font-weight:800;
  cursor:pointer;
}
.feedback-admin-actions button:hover:not(:disabled){border-color:#111;background:#f7f9fc}
.feedback-admin-actions button:disabled{
  background:#efefeb;
  color:#999;
  cursor:default;
}
.feedback-empty{
  grid-column:1/-1;
  margin:0;
  padding:22px 14px;
  color:#777;
  font-size:11px;
}
.feedback-empty.error{color:#9f251f}

@media(max-width:760px){
  .feedback-health-summary{grid-template-columns:1fr 1fr}
  .feedback-health-summary>div:nth-child(2n){border-right:0}
  .feedback-health-summary>div:nth-child(-n+2){border-bottom:1px solid #deded7}
  .feedback-admin-list{grid-template-columns:1fr}
  .feedback-admin-card,
  .feedback-admin-card:nth-child(2n){border-right:0}
  .feedback-admin-card:last-child{border-bottom:0}
  .feedback-filters{width:100%}
  .feedback-filters button{flex:1 1 auto}
}


/* v0.4.55 — Kanit for the Thai Admin Health UI */
html[lang="th"] body,
html[lang="th"] body *,
html[lang="th"] button,
html[lang="th"] input,
html[lang="th"] select,
html[lang="th"] textarea{
  font-family:"Kanit",sans-serif!important;
}
html[lang="th"] body{font-synthesis:none!important}


/* v0.4.56 — lighter Kanit hierarchy for Admin Health */
html[lang="th"] body{font-weight:400!important}
html[lang="th"] p,
html[lang="th"] small,
html[lang="th"] .sub,
html[lang="th"] .collector-meta,
html[lang="th"] .feedback-meta{
  font-weight:400!important;
}
html[lang="th"] .eyebrow,
html[lang="th"] .back-link,
html[lang="th"] button,
html[lang="th"] input,
html[lang="th"] select{
  font-weight:500!important;
}
html[lang="th"] h1,
html[lang="th"] h2,
html[lang="th"] h3,
html[lang="th"] strong,
html[lang="th"] b,
html[lang="th"] .health-brand,
html[lang="th"] .summary-card strong{
  font-weight:700!important;
}
html[lang="th"] .refresh-button{font-weight:600!important}


/* v0.4.57 — readable Admin Health type scale */
:root{font-size:16px}
body{font-size:16px!important;line-height:1.5!important}
.health-brand{font-size:16px!important}
.back-link{font-size:14px!important}
.eyebrow{font-size:13px!important}
.health-hero h1{font-size:clamp(38px,5vw,56px)!important}
.sub{font-size:15px!important;line-height:1.5!important}
button,
input,
select,
textarea{font-size:16px!important}
.summary-card span{font-size:13px!important}
.summary-card strong{font-size:32px!important}
.summary-card small{font-size:14px!important}
.collector-card,
.feedback-card{font-size:15px!important}
.collector-meta,
.feedback-meta{font-size:14px!important;line-height:1.45!important}
@media(max-width:620px){
  body{font-size:16px!important}
  .health-app{width:min(100% - 20px,1380px)}
  .health-brand{font-size:15px!important}
  .back-link{font-size:14px!important}
  .sub{font-size:14px!important}
  button,input,select,textarea{font-size:16px!important}
}


/* v0.4.58 — standard system font for Admin Health numbers */
:root{
  --numeric-font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
html body .summary-card strong,
html body .collector-card strong,
html body .feedback-card strong,
html body .collector-meta,
html body .feedback-meta,
html body time,
html body code,
html body .version,
html body .metric-value{
  font-family:var(--numeric-font)!important;
  font-variant-numeric:tabular-nums lining-nums!important;
  font-feature-settings:"tnum" 1,"lnum" 1!important;
}


/* v0.4.59 — same system UI font for Thai and English */
html body,
html body *,
html button,
html input,
html select,
html textarea{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif!important;
}
html[lang="th"] body{font-size:16px!important;line-height:1.5!important}
