/* SMART Plus+ / MEDICAL OPERATIONS · V32
   Professional minimal health console. Light paper, muted rose accents, accessible targets. */
:root{
  color-scheme:light;
  --ink:#27232d;--forest:#7b3c57;--mint:#a14d72;--line:#e9e3e7;
  --soft:#faf8fa;--subtle:#736e78;--shadow:0 10px 28px rgba(56,35,49,.042);
  --rose:#a54369;--rose-dark:#78334f;--rose-ink:#332a35;
  --rose-line:#eddee5;--rose-pale:#faf0f4;--rose-paper:#fffdfd;
  background:#faf9fa;color:var(--ink);
}
html,body{background:#faf9fa;color:var(--ink)}
body{font-family:'IBM Plex Sans Thai',system-ui,sans-serif;min-width:320px}
main{max-width:1550px;padding:25px clamp(12px,2.4vw,40px) 45px}
p{line-height:1.7}
button, input, select, textarea{font-family:inherit}
input:not([type=checkbox]),select,textarea{background:#fff;border:1px solid #dcd6dd;color:#342c35;border-radius:11px;box-shadow:none}
input:focus,select:focus,textarea:focus{border-color:#a94b75;box-shadow:0 0 0 3px #eac8d622}
:where(button,a,input,select,textarea,summary):focus-visible{outline:3px solid #bd7b98;outline-offset:2px}
h1,h2,h3,h4{color:#27232d}
.eyebrow{color:#936278;font-size:10px;letter-spacing:.16em;font-weight:700}
.health-topbar{height:74px;background:#ffffffec;border-bottom:1px solid #eee9eb;box-shadow:0 2px 15px #29162808;padding-inline:clamp(14px,2.6vw,40px)}
.health-back{background:white;color:#614655;border:1px solid #ece3e8;box-shadow:none;width:42px;height:42px;border-radius:12px}
.health-back:hover{background:#f8f1f5}
.brand-symbol{background:#a5446c;color:white;box-shadow:none;border-radius:12px;width:41px;height:41px}
.brand-symbol svg{width:24px;height:24px}
.health-brand b{color:#29242c;font-size:15px;letter-spacing:0}
.health-brand b span{color:#a4446c}
.health-brand small{color:#7c7580;font-size:11px}
.operator-chip{background:#f8f4f6;color:#705365;border:1px solid #eee3e8;font-size:12px;max-width:300px}
.health-hero{background:white;box-shadow:none;min-height:185px;border:1px solid #ebe5e8;border-radius:20px;padding:30px clamp(21px,3vw,40px);color:var(--ink);gap:24px}
.health-hero::before,.health-hero::after{display:none}
.health-hero .eyebrow{color:#9a5774;display:flex;gap:9px;align-items:center;font-size:10px}
.rose-dot{width:8px;height:8px;border-radius:50%;background:#b8557b;box-shadow:0 0 0 4px #f7eaf0;display:inline-block}
.health-hero h1{font:600 clamp(27px,3.4vw,43px)/1.2 'Kanit',sans-serif;color:#322b33;margin:13px 0 11px}
.health-hero h1 span{display:block;color:#a14269}
.health-hero p{font-size:13px;color:#67616c;max-width:770px}
.health-hero .hero-pills{margin-top:18px;gap:9px}
.health-hero .hero-pills span{border:1px solid #ebe2e7;background:#fcfafb;color:#73646e;font-size:11px;padding:6px 10px}
.hero-emblem{flex:none;display:flex;align-items:center;flex-direction:column;justify-content:center;gap:9px;width:170px;border-left:1px solid #f1ebee;color:#9e476a;padding-left:26px}
.emblem-mark{display:grid;place-items:center;width:94px;height:94px;border:1px solid #f0dfe7;border-radius:25px;background:#f9ebf1}
.emblem-mark svg{width:60px;height:60px;color:#a9466e}
.hero-emblem span{font:700 10px system-ui,sans-serif;letter-spacing:.15em;color:#aa8495}
.health-module-nav{margin:17px 0 18px;display:flex;align-items:center;gap:6px;background:#fff;border:1px solid #ede7ea;border-radius:15px;padding:7px;overflow-x:auto;scrollbar-width:thin;position:relative;box-shadow:0 3px 12px #35203206}
.module-link{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;min-height:42px;padding:9px 18px;border-radius:10px;color:#736a73;font-size:12px;font-weight:600;transition:background .18s,color .18s}
.module-link:hover,.module-link:focus-visible{background:#fbf0f4;color:#87435f}
.module-link.active{color:#803b59;background:#f7eaf0}
.health-security{margin:0 0 19px;background:#f5f1f4;border:1px solid #ebe4e9;color:#6e5d67;box-shadow:none;border-radius:13px;padding:11px 14px;gap:10px;font-size:11px}
.health-security span:last-child{color:#81757d}
.security-icon{color:#9c5a77}
.health-overview{scroll-margin-top:98px}
.console-heading{display:flex;align-items:end;justify-content:space-between;gap:16px;margin:4px 1px 14px}
.console-heading h2{font:600 clamp(19px,2.1vw,25px)/1.35 'Kanit',sans-serif;color:#322e35;margin:3px 0 3px}
.console-heading p{color:#817780;font-size:12px;margin:0}
.console-heading .eyebrow{color:#a66e87}
.console-live,.section-scope{display:inline-flex;align-items:center;gap:7px;border:1px solid #e9e4e7;background:white;border-radius:50px;padding:7px 12px;color:#73636f;font-size:11px;white-space:nowrap;font-weight:500}
.console-live span{width:7px;height:7px;border-radius:50%;background:#6ca988}
.metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin:0 0 15px}
.metric-card,.metric-card.done,.metric-card.agree,.metric-card.follow{border:1px solid #ece5e9;background:#fff;border-radius:16px;padding:17px;box-shadow:none;gap:8px}
.metric-card:before{display:none}
.metric-title{gap:9px}
.metric-title small{color:#77717a;font-size:11px}
.metric-icon,.metric-card.done .metric-icon,.metric-card.agree .metric-icon,.metric-card.waiting .metric-icon,.metric-card.follow .metric-icon{background:#f7edf1;color:#a24f71;border-radius:11px;width:37px;height:37px}
.metric-card strong{font:600 34px/1.15 'Kanit',sans-serif;color:#3c343c}
.metric-card span{font-size:11px;color:#887b83}
.console-quick-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0 30px}
.console-quick-card{display:flex;align-items:center;gap:13px;min-width:0;padding:15px 16px;background:#fff;border:1px solid #ece5e9;border-radius:15px;transition:transform .17s,border-color .17s,background .17s}
.console-quick-card:hover{transform:translateY(-2px);border-color:#e4b9cb;background:#fffdfd}
.quick-icon{display:grid;place-items:center;flex:none;background:#f7eef2;border:1px solid #f0e3e9;color:#a65477;font:700 12px system-ui,sans-serif;width:43px;height:43px;border-radius:13px}
.console-quick-card>div{flex:1;min-width:0}
.console-quick-card b{display:block;color:#332d34;font-size:13px;margin-bottom:2px}
.console-quick-card small{display:block;color:#847982;font-size:11px}
.quick-arrow{font-size:19px;color:#bba1ae;flex:none}
.console-section-heading{margin-top:16px;margin-bottom:15px}
.health-main-layout{grid-template-columns:minmax(290px,356px) minmax(0,1fr);gap:15px}
.roster-panel,.detail-panel{background:#fff;border:1px solid #ebe4e8;border-radius:18px;box-shadow:none;scroll-margin-top:104px}
.roster-panel{top:94px}
.roster-head h2,.student-head h2{color:#342b34}
.roster-head p{color:#88818a}
.roster-head .eyebrow,.student-head .eyebrow,.section-title .eyebrow{color:#aa6683}
.total-badge{background:#f7eaf0;color:#8c4c69}
.search-field{border-color:#eae1e6;background:white;color:#a25b7a}
.search-field input{background:#fff!important;color:#322d35!important;border-color:#e6dce2!important}
.roster-panel select{background:white!important;color:#342d34!important;border-color:#e6dce2!important}
.roster-person{border-top-color:#f0ecef;padding-block:13px}
.roster-person:hover{background:#fbf6f8}
.roster-person.selected{border-left:3px solid #ab5c80;padding-left:12px;background:#f9edf2}
.list-index{background:#f7f1f4;color:#896b7b}
.list-person b{color:#373139}
.list-person small{color:#88808a}
.list-status.recorded{background:#f4e5ed;color:#95506c}
.list-status.unrecorded{background:#f7f4ef;color:#948270}
.detail-panel{min-height:420px}
.empty-selection>.empty-illustration{background:#f7edf2;color:#b06c89;border-radius:22px}
.student-head{border-color:#ede6ea}
.student-head p b{color:#8c4d6a}
.status-pill.has-record{background:#f5e8ee;color:#995474}
.consent-box{background:#fcfafb;border:1px solid #eee4e9;border-radius:16px}
.consent-box.consent-active{background:#f7fbf7;border-color:#dbeadf}
.consent-box.consent-revoked{background:#fffaf9;border-color:#f1e0dc}
.consent-title h3{color:#453743}
.consent-icon{background:#f7eaf0;color:#a25173}
.consent-state-tag{color:#865169;background:#f5e7ee}
.consent-box p{color:#7d6f7a}
.btn.primary,.btn.primary:hover{color:#fff;background:#984b6e;border-color:#984b6e;box-shadow:none}
.btn.primary:hover{background:#7f3a5b;border-color:#7f3a5b}
.btn.ghost{background:#fff;color:#74566a;border-color:#e6d9e1}
.btn.ghost:hover{background:#faf5f8}
.form-tabs{border-color:#efeaed;background:#faf7f8;border-radius:12px}
.tab{color:#766774}
.tab.active{background:#fff;color:#8d4264;border:1px solid #ead8e2;box-shadow:0 1px 6px #37203509}
.form-intro h3,.form-intro h3 svg{color:#614355}
.health-section{border-color:#eee6ea;background:white;border-radius:13px}
.health-section summary{color:#463640}
.health-section[open] summary{background:#fdfafc;border-color:#eee7ea}
.section-number{background:#f5eaf0;color:#a05276}
.record-item{border-color:#eae2e8;background:white}
.record-editor{border-color:#ebe0e7;background:#fdfbfc}
.record-editor.editing{border:1px solid #e6b7ce;background:#fff9fc;box-shadow:none}
.record-edit-btn{background:#f6e9f0;color:#9a4b6d;border:1px solid #ecd7e3}
.record-neutral-btn{background:#f5f4f5;color:#675963;border:1px solid #e6e1e4}
.category-dashboard{background:#fff;border:1px solid #ebe5e8;border-radius:18px;scroll-margin-top:95px;box-shadow:none}
.category-card{border:1px solid #ece6ea;background:#fff;border-radius:13px}
.category-card>span{background:#f7edf2;color:#985575}
.category-card b{color:#604454}
.category-card small{color:#746971}
.health-footer{color:#89818a}
.health-confirm-dialog{color:#322b33}
.delete-dialog-target{background:#fff5f7;border-color:#f0d8e0;color:#693c4f}
.renew-head{background:#fbf3f7;border-color:#f0e0e8}
.renew-head strong{color:#5d3b4f}
.renew-head p{color:#7e6a79}
.cleanup-notice{border-color:#edddd9;background:#fffaf8}
/* New integrated operations */
.console-operations{margin-top:30px;scroll-margin-top:102px}
.operations-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.ops-card{min-width:0;background:white;border:1px solid #ebe4e8;border-radius:19px;overflow:hidden}
.ops-head{display:flex;gap:13px;align-items:center;padding:20px 21px 17px;border-bottom:1px solid #f0e9ed;background:#fefcfd}
.ops-head-icon{display:grid;place-items:center;flex:none;width:44px;height:44px;border:1px solid #f0e3e9;background:#f9eff4;border-radius:13px;color:#a45173}
.ops-head-icon svg{height:23px;width:23px}
.ops-head h3{font:600 20px/1.3 'Kanit',sans-serif;color:#332d34;margin:3px 0}
.ops-head small{font-size:11px;color:#877d86}
.ops-card-body{padding:19px 20px 22px}
.ops-context{display:flex;align-items:center;gap:10px;justify-content:space-between;padding:12px 14px;background:#faf6f8;border:1px solid #f0e6eb;border-radius:11px;margin-bottom:15px;font-size:11px;color:#81717e;flex-wrap:wrap}
.ops-context b{font-size:12px;color:#804963}
.ops-form{display:grid;gap:11px}
.ops-form label{display:grid;gap:6px;font-size:11px;font-weight:600;color:#665461}
.ops-form input,.ops-form select,.ops-form textarea{min-height:43px;font-size:13px;width:100%;padding:10px 12px;border-radius:10px}
.ops-form textarea{min-height:68px}
.ops-field-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.ops-form-actions{display:flex;gap:9px;flex-wrap:wrap}
.ops-primary{min-height:45px;font-size:12px;font-weight:700}
.ops-form-hint{margin:-2px 0 3px;color:#89808a;font-size:11px}
.ops-list-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:18px 0 10px;padding-top:15px;border-top:1px solid #f0e9ed}
.ops-list-head b{font-size:13px;color:#483846}
.ops-refresh{font-size:11px;color:#8f4969;background:#faf3f7;border:1px solid #efe0e7;border-radius:9px;padding:6px 10px;min-height:34px}
.ops-list{display:grid;gap:9px;max-height:440px;overflow-y:auto;scrollbar-width:thin}
.ops-empty{padding:24px 18px;text-align:center;background:#fcfafb;border:1px dashed #e7dfe4;border-radius:12px;color:#89808a;font-size:12px}
.ops-list-item{padding:14px 15px;border:1px solid #eee7eb;border-radius:12px;background:#fff}
.ops-list-row{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.ops-list-item strong{display:block;font-size:13px;color:#433642;line-height:1.55;margin-bottom:3px}
.ops-list-item small,.ops-list-item p{font-size:11px;color:#7d747d;line-height:1.55;margin:4px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.ops-chip{border-radius:999px;padding:5px 9px;white-space:nowrap;background:#f5f0f4;color:#846276;font-size:10px;font-weight:700}
.ops-chip.urgent{background:#fff0ed;color:#a64b41}
.ops-chip.done{background:#edf6ef;color:#447757}
.ops-chip.progress{background:#fff6e7;color:#96713d}
.ops-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:11px}
.ops-actions button{font-size:11px;border:1px solid #e8dde4;border-radius:8px;padding:6px 10px;min-height:34px;background:#fcfafb;color:#78526a;font-weight:600}
.ops-actions button.danger{color:#aa4c4c;background:#fff7f6;border-color:#eedbd9}
.ops-actions button:hover,.ops-refresh:hover{filter:brightness(.965)}
.category-dashboard{margin-top:28px}
[hidden]{display:none!important}
@media(max-width:1150px){.metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.operations-grid{grid-template-columns:1fr}}
@media(max-width:860px){.health-hero{padding:24px}.health-module-nav{margin-top:12px}.hero-emblem{width:120px;padding-left:12px}.emblem-mark{width:70px;height:70px}.emblem-mark svg{width:47px;height:47px}.health-main-layout{grid-template-columns:1fr}.metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.console-quick-grid{grid-template-columns:1fr}.roster-panel{position:relative;top:auto;max-height:none}}
@media(max-width:610px){main{padding:15px 12px 32px}.health-topbar{padding:9px 13px;gap:11px;height:67px}.health-brand b{font-size:13px}.health-brand small{font-size:9px}.operator-chip{font-size:10px;max-width:94px;padding:8px}.health-hero{padding:21px 18px;min-height:unset}.health-hero h1{font-size:29px}.health-hero p{font-size:12px}.hero-emblem{display:none}.health-hero .hero-pills{margin-top:15px;gap:6px}.health-hero .hero-pills span{font-size:10px}.health-module-nav{padding:5px;gap:3px;border-radius:12px}.module-link{min-height:39px;padding:9px 13px;font-size:11px}.health-security{font-size:10px;padding:10px 12px}.console-heading{align-items:flex-start}.console-heading h2{font-size:21px}.console-heading p{font-size:11px}.console-live,.section-scope{font-size:10px;padding:6px 9px}.metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.metric-card{padding:13px}.metric-card strong{font-size:29px}.metric-card:last-child{grid-column:auto}.console-quick-grid{gap:9px;margin-bottom:24px}.console-quick-card{padding:12px;gap:10px}.ops-card-body{padding:14px}.ops-head{padding:16px}.ops-head h3{font-size:18px}.ops-field-grid{grid-template-columns:1fr}.ops-primary{width:100%}.operations-grid{gap:13px}.category-dashboard{margin-top:20px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
