/* KhamYai shared visual theme, screen only. Clinical status colors stay in module styles. */
@font-face{font-family:'KY Thai';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/NotoSansThai-400.ttf') format('truetype')}
@font-face{font-family:'KY Thai';font-style:normal;font-weight:600;font-display:swap;src:url('fonts/NotoSansThai-600.ttf') format('truetype')}
@font-face{font-family:'KY Thai';font-style:normal;font-weight:700 900;font-display:swap;src:url('fonts/NotoSansThai-700.ttf') format('truetype')}
:root{color-scheme:light;--brand:#2563db;--brand-dark:#1d4fb3;--brand-soft:#edf4ff;--navy:#233f72;--blue:#377cf6;--surface:#fff;--surface-soft:#f7f9fd;--background:#f4f7fd;--text:#263b62;--muted:#617493;--border:#dfe8f7;--border-strong:#b8cbea;--radius:18px;--shadow-sm:0 3px 12px #233f7208;--shadow:0 12px 32px #233f7210;--focus:0 0 0 4px #377cf626;--pd-ink:#263b62;--pd-teal:#2563db;--pd-border:#dfe8f7}
body{font-family:'KY Thai','Noto Sans Thai',Tahoma,sans-serif!important;background:#f4f7fd;color:#263b62;line-height:1.65}
body input,body select,body textarea,body button{font-family:inherit}
body h1,body h2,body h3{letter-spacing:0;line-height:1.45}
body :is(.content,.pd-wrap,.standalone-wrap,main){min-width:0}
body :is(.topbar,.pd-header){background:#fff;border-bottom:1px solid #e3eafb;box-shadow:0 2px 10px #233f7206}
body :is(.brand-mini,.pd-brand>span){background:linear-gradient(135deg,#377cf6,#8b5cf6);box-shadow:0 5px 15px #377cf629;color:#fff;border-radius:14px}
body .brand-copy small{color:#377cf6}body .user-chip{background:#f7f9fd;border-color:#dfe8f7;color:#263b62}
body .sidebar{background:#fff;border-right:1px solid #e3eafb;box-shadow:none}
body .sidebar a{color:#29436f;border-radius:10px;font-weight:600}
body .sidebar a:hover{color:#245fdc;background:#edf4ff}
body .sidebar a.active{color:#fff;background:#2563db;box-shadow:0 4px 12px #2563db20;border-color:transparent}
body .sidebar .nav-section{color:#617493!important}
body .sidebar.role-menu .nav-group,body .sidebar.role-menu .nav-group:not([open]){background:#fff!important;border-color:#e2eafa!important}
body .sidebar.role-menu .nav-group summary,body .sidebar.role-menu .nav-group summary span{color:#263f68!important;background:transparent!important}
body .sidebar.role-menu .nav-group summary i{color:#5874a5!important}
body .sidebar.role-menu .nav-group-icon{color:#377cf6!important;background:#eef4ff!important}
body .sidebar.role-menu .nav-group[open] summary{background:#f2f6ff!important;border-bottom-color:#e2eafa!important}
body .sidebar.role-menu .nav-group-links a,body .sidebar.role-menu .nav-account-block a{color:#29436f!important}
body .sidebar.role-menu .nav-group-links a:hover{color:#245fdc!important;background:#edf4ff!important}
body .sidebar.role-menu .nav-group-links a.active{color:#fff!important;background:#2563db!important}
body .sidebar .logout-link,body .sidebar.role-menu .nav-account-block .logout-link{color:#b73551!important}
body :is(.card,.panel,.pd-panel,.cd-panel,.dq-section,.ef-card,.q2-card,.recon-card,.recon-table-card,.table-card,.registry-card,.standalone-card,.source-card,.line-section,.life-panel){border:1px solid #e2eafa;border-radius:18px;box-shadow:0 3px 12px #233f7205}
body :is(.pd-panel,.cd-panel,.dq-section,.recon-card,.recon-table-card,.table-card,.registry-card,.standalone-card,.source-card,.line-section,.life-panel){background:#fff}
body :is(.kpi,.pd-kpi,.ncd-kpi,.ci-kpi,.identity-kpi,.program-kpi,.dq-card){border:1px solid #e2eafa;border-radius:16px;box-shadow:0 4px 12px #233f7205}
body .pd-kpi{background:#fff;border-top:4px solid #377cf6}body .pd-kpi.green{border-top-color:#12bd8b}body .pd-kpi.rose{border-top-color:#8b5cf6}body .pd-kpi.teal{border-top-color:#22b8df}
body .pd-kpi strong{color:#233f72}
body .hero{background:linear-gradient(115deg,#eef5ff,#f1ecff);border:1px solid #dfe7fc;box-shadow:none;color:#233f72}
body .hero h1{color:#233f72}body .hero .eyebrow{color:#526fab}body .hero .hero-copy{color:#617493}
body .hero .button.primary{background:#2563db;color:#fff}
body :is(.page-heading,.person-hero){gap:16px}
body .person-hero{background:linear-gradient(115deg,#fff,#eef5ff);border-color:#dfe8f7;box-shadow:none}
body .pd-hero{padding:24px;border:1px solid #dfe7fc;border-radius:18px;background:linear-gradient(115deg,#eef5ff,#f1ecff)}
body .pd-track span:not(.unknown){background:linear-gradient(90deg,#377cf6,#22b8df)}
body :is(.button.primary,.pd-button){background:#2563db;color:#fff;border-color:#2563db;box-shadow:0 4px 10px #2563db18}
body :is(.button.primary,.pd-button):hover{background:#1d4fb3}
body .button.secondary{background:#edf4ff;color:#2555ac;border-color:#d6e4fb}
body .button.ghost{background:#fff;border-color:#dfe8f7;color:#29436f}
body :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=color]):not([type=file]),select,textarea){border-color:#c6d5ec;border-radius:10px;max-width:100%}
body :is(input,select,textarea):focus{border-color:#377cf6;box-shadow:0 0 0 3px #377cf61a}
body :is(input,select,textarea):disabled{background:#f1f4f9;color:#687b96}
body input[readonly],body textarea[readonly]{background:#f7f9fd}
body :is(.filter-bar,.filters,.pd-filter,.cd-filter,.registry-filter,.audit-filter){border-radius:14px;border-color:#dfe8f7}
body th{background:#f1f5fc;border-bottom-color:#dfe8f7}body td{border-bottom-color:#e7eef9}
body tbody tr:hover{background-color:#f7faff}
body :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid #7553d8;outline-offset:3px}
body :is(button,.button):disabled{opacity:.6;cursor:not-allowed}
.ky-table-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-color:#bdcdea #f3f6fc}
.ky-table-scroll>table{min-width:var(--ky-table-min-width,600px)}
.ky-table-hint{display:none;color:#617493;font-size:12px;margin:5px 0 8px}
body img,body canvas{max-width:100%}
body .login-card{border:1px solid #dfe8f7;box-shadow:0 16px 48px #233f7212;border-radius:22px}
body .login-page{background:linear-gradient(140deg,#eef5ff,#f5f1ff)}
@media(min-width:821px){body .content{padding:26px clamp(20px,2.4vw,36px)}}
@media(max-width:820px){body :is(.topbar,.pd-header){gap:10px}body .topbar-actions{min-width:0;flex-wrap:wrap;gap:7px}body :is(.content,.pd-wrap){padding-left:14px;padding-right:14px}body .page-heading{flex-wrap:wrap}body .page-heading>*{min-width:0}body :is(.filter-bar,.filters,.pd-filter){flex-wrap:wrap}body :is(.button,button,input,select){scroll-margin-top:90px}body :is(.button,button:not(.hm-card-actions button)){min-height:44px}.ky-table-hint{display:block}body .sidebar.mobile-open{background:#fff}body .sidebar a{min-height:48px}body .pd-hero{padding:18px}}
@media(max-width:560px){body .topbar .brand-copy{font-size:15px}body .topbar .brand-mini{width:36px;height:36px}body .topbar .version-chip{display:none}body .topbar .user-chip{max-width:52vw}body .topbar .user-chip>span:last-child{overflow:hidden;text-overflow:ellipsis}body .hero{padding:20px}body .page-heading h1{font-size:24px}body .form-grid>*{min-width:0}body :is(.filter-bar,.filters,.pd-filter) label{max-width:100%}}
@media(prefers-reduced-motion:reduce){body{scroll-behavior:auto}body .live-indicator{animation:none}body :is(.sidebar a,.card,.button){transition:none}}

.ky-table-hint[hidden]{display:none!important}
:root{--m-primary:#2563db;--m-primary2:#1d4fb3;--m-bg:#f4f7fd;--m-text:#263b62;--m-muted:#617493;--m-border:#dfe8f7}
body.login-page{background:linear-gradient(140deg,#eef5ff,#f5f1ff)}
body[class]{background:#f4f7fd}
body.login-page{background:linear-gradient(140deg,#eef5ff,#f5f1ff)}
body .sidebar.role-menu .nav-section{color:#617493!important}
body .sidebar.role-menu .nav-group[open] summary,body .sidebar.role-menu .nav-group[open] summary span{color:#263f68!important}
body :is(.audit-hero,.ci-hero,.dq-hero,.ef-hero,.goal-hero,.ha-hero,.hh-import-hero,.identity-hero,.innovation-hero,.life-hero,.line-admin-hero,.line-control-hero,.line-hero,.line-link-hero,.line-message-hero,.person-dashboard-hero,.program-hero,.recon-hero,.rule-card-hero,.service-hero,.smart-queue-hero,.source-hero,.telecare-hero,.vhv-field-hero,.vhv-menu-admin-hero,.vhv-registry-hero){background:linear-gradient(115deg,#eef5ff,#e0edff);border:1px solid #dbe8fd;border-radius:20px;color:#233f72;box-shadow:none}
body :is(.audit-hero,.ci-hero,.dq-hero,.ef-hero,.goal-hero,.ha-hero,.hh-import-hero,.identity-hero,.innovation-hero,.life-hero,.line-admin-hero,.line-control-hero,.line-hero,.line-link-hero,.line-message-hero,.person-dashboard-hero,.program-hero,.recon-hero,.rule-card-hero,.service-hero,.smart-queue-hero,.source-hero,.telecare-hero,.vhv-field-hero,.vhv-menu-admin-hero,.vhv-registry-hero) :is(h1,h2){color:#2866d9}
body :is(.audit-hero,.ci-hero,.dq-hero,.ef-hero,.goal-hero,.ha-hero,.hh-import-hero,.identity-hero,.innovation-hero,.life-hero,.line-admin-hero,.line-control-hero,.line-hero,.line-link-hero,.line-message-hero,.person-dashboard-hero,.program-hero,.recon-hero,.rule-card-hero,.service-hero,.smart-queue-hero,.source-hero,.telecare-hero,.vhv-field-hero,.vhv-menu-admin-hero,.vhv-registry-hero) :is(p,small,.eyebrow){color:#425c82}
body .telecare-hero-badges span{color:#425c82;background:#fff;border-color:#d6e4fb}
body .smart-queue-hero-total{color:#233f72;background:#fff;border-color:#d6e4fb}
body .person-hero{border-radius:18px}
body .sidebar #ky-admin-menu .ky-menu-search{color:#42577a}
body .sidebar #ky-admin-menu .ky-menu-tools button{color:#30486f;border-color:#d5e0f1;background:#f8faff}
