/* Prototype-only additions on top of the live ONDE admin theme. Colours come from the live theme:
   green #0a6b52 (header, primary), purple #06493a (links, headings), status pills #067647 / #b54708 / #b42318 / #666. */

.content-wrapper, .content { font-family: 'DBHelvethaicaX', Tahoma, sans-serif; font-size:14px; }
.content .box { border-radius: 6px; }
.content .box-body { padding: 20px; }
.content h3.pt-h, .content .pt-h { font-family: 'DBHelvethaicaX'; font-size:18px; color: #06493a; margin: 0 0 12px; }
.content .pt-sub { color: #777; font-size:14px; margin: -6px 0 16px; }
.table > thead > tr > th { background: #f5f5f5; font-weight: normal; color: #555; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.main-header .logo .logo-lg strong { color: #fff; }
/* Rule: dark background always gets light text. The live CSS paints the navbar green but keeps grey link text. */
.skin-smart .main-header .navbar .nav > li > a,
.skin-smart .main-header .navbar .nav > li > a > span,
.skin-smart .main-header .navbar .nav > li > a > em,
.skin-smart .main-header .navbar .sidebar-toggle { color: #fff !important; }
.sidebar-menu > li.active > a, .sidebar-menu .treeview-menu > li > a { color: #fff; }

/* "ใหม่" marker in the sidebar */
.sidebar-menu .pt-new { display: inline-block; background: #175cd3; color: #fff; font-size:12px !important; font-family: Tahoma !important; line-height: 1; padding: 2px 5px; border-radius: 8px; margin-left: 4px; vertical-align: 2px; }
.sidebar-menu .treeview-menu > li > a { white-space: normal; }
.table td.nw, .table th.nw { white-space: nowrap; }

/* AI disclosure: every AI result is a suggestion that staff confirm (TOR 4.21) */
.ai-note { display: flex; gap: 10px; align-items: center; background: #eaf5ee; border: 1px solid #cfe6d8; color: #06493a; border-radius: 6px; padding: 10px 14px; margin-bottom: 16px; font-size:14px; }
.ai-note em.fa { font-size:16px; }
.ai-chip { display: inline-block; background: #06493a; color: #fff; border-radius: 12px; padding: 1px 10px; font-size:14px; }
.ai-conf { color: #777; font-size:14px; }
.src-ref { display: inline-block; font-size:14px; color: #175cd3; background: #eef5fc; border-radius: 4px; padding: 1px 8px; margin: 2px 4px 2px 0; }
.src-ref:before { content: "\f0c1"; font-family: FontAwesome; margin-right: 5px; }

/* check marks used in the AI result matrices */
.ck { font-size:18px; }
.ck-ok { color: #067647; }
.ck-bad { color: #b42318; }
.ck-warn { color: #f39c12; }
.ck-na { color: #bbb; }
.st-pill { display: inline-block; color: #fff; border-radius: 30px; padding: 4px 14px; font-size:14px; white-space: nowrap; }
.st-ok { background: #067647; } .st-wait { background: #b54708; } .st-bad { background: #b42318; } .st-gray { background: #666; } .st-ai { background: #06493a; } .st-blue { background: #175cd3; }

/* KPI cards */
.kpi { background: #fff; border: 1px solid #e5e5e5; border-radius: 6px; padding: 16px; text-align: center; height: 100%; }
.kpi .kpi-l { color: #555; font-size:14px; }
.kpi .kpi-v { font-size:32px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .kpi-s { color: #888; font-size:14px; }
.kpi-red .kpi-v { color: #b42318; } .kpi-green .kpi-v { color: #067647; } .kpi-purple .kpi-v { color: #06493a; } .kpi-orange .kpi-v { color: #b54708; }
.row-eq { display: flex; flex-wrap: wrap; }
.row-eq > [class*=col-] { display: flex; flex-direction: column; margin-bottom: 15px; }

/* numbered finding list (like "ข้อมูลที่ควรตรวจสอบ") */
.finding { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #e3e3e3; }
.finding:last-child { border-bottom: 0; }
.finding .n { flex: 0 0 30px; height: 30px; border-radius: 50%; background: #175cd3; color: #fff; text-align: center; line-height: 30px; font-size:14px; }
.finding .t { flex: 1; }

/* staff decision bar */
.pt-decide { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; background: #fafafa; border-top: 1px solid #eee; padding: 12px 20px; margin: 20px -20px -20px; border-radius: 0 0 6px 6px; }
.pt-decide .who { margin-right: auto; color: #666; font-size:14px; }
.btn { font-family: 'DBHelvethaicaX'; font-size:14px; }
.btn-onde { background: #0a6b52; border-color: #0a6b52; color: #fff; }
.btn-onde:hover, .btn-onde:focus { background: #06493a; color: #fff; }
.btn-purple { background: #06493a; border-color: #06493a; color: #fff; }
.btn-purple:hover { background: #06493a; color: #fff; }

/* progress bars like the accepted concept */
.pbar { background: #eee; border-radius: 2px; height: 26px; position: relative; }
.pbar > span { display: block; height: 100%; background: #14946f; color: #fff; text-align: right; padding-right: 8px; font-size:14px; line-height: 26px; border-radius: 2px; min-width: 60px; }
.pbar.warn > span { background: #b54708; } .pbar.bad > span { background: #b42318; }

/* left filter panel (year checkboxes) */
.pt-filter { background: #fff; border: 1px solid #e5e5e5; border-radius: 6px; padding: 12px 16px; }
.pt-filter label { display: block; font-weight: normal; margin: 4px 0; }

/* document viewer mock */
.doc-thumb { border: 1px solid #ddd; border-radius: 4px; background: #fff; padding: 10px; position: relative; }
.doc-thumb .hl { position: absolute; border: 3px solid #b42318; border-radius: 4px; }
.doc-page { background: #fff; border: 1px solid #ddd; box-shadow: 0 1px 3px rgba(0,0,0,.08); padding: 24px 28px; font-family: 'Sarabun', Tahoma; font-size:12px; line-height: 1.7; }
mark.diff { background: #ffd2d2; padding: 0 2px; }
mark.okm { background: #d6f3e1; padding: 0 2px; }

/* tabs */
.nav-tabs > li > a { font-family: 'DBHelvethaicaX'; font-size:14px; color: #06493a; }
.nav-tabs > li.active > a { color: #0a6b52; font-weight: bold; }

/* AI chat panel */
.pt-chat { display: none; position: fixed; right: 20px; bottom: 20px; width: 420px; height: 520px; background: #fff; border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.25); z-index: 2000; flex-direction: column; font-family: 'DBHelvethaicaX'; font-size:14px; }
.pt-chat-h { background: #06493a; color: #fff; padding: 10px 14px; border-radius: 8px 8px 0 0; font-size:14px; }
.pt-chat-h small { color: #cfe6d8; margin-left: 6px; font-size:12px; }
.pt-chat-h a { color: #fff; font-size:18px; line-height: 1; }
.pt-chat-b { flex: 1; overflow: auto; padding: 12px; background: #f7f7f9; }
.pt-chat-f { display: flex; gap: 6px; padding: 10px; border-top: 1px solid #eee; }
.pt-msg { max-width: 88%; padding: 8px 12px; border-radius: 10px; margin-bottom: 10px; line-height: 1.35; }
.pt-q { background: #0a6b52; color: #fff; margin-left: auto; }
.pt-a { background: #fff; border: 1px solid #e3e3e3; }
.pt-src { margin-top: 6px; font-size:12px; color: #175cd3; }
.pt-ai-top a { background: rgba(255,255,255,.12) !important; }

.pt-toast { position: fixed; top: 70px; right: 24px; background: #0a6b52; color: #fff; padding: 12px 18px; border-radius: 6px; z-index: 3000; font-family: 'DBHelvethaicaX'; font-size:14px; box-shadow: 0 4px 12px rgba(0,0,0,.2); }

/* "prototype" ribbon so captures are never mistaken for the live system */
.pt-ribbon { position: fixed; left: 0; bottom: 0; background: rgba(6,73,58,.9); color: #fff; font-family: Tahoma; font-size:12px; padding: 3px 10px; z-index: 2500; border-top-right-radius: 6px; }

/* KPI rows (.kp) declared per page as a single flex line: wrap them into two columns on phones */
@media (max-width: 767px) {
  #pt-main .kp { flex-wrap: wrap; }
  #pt-main .kp > div { flex: 1 1 calc(50% - 10px); }
}
