/* ==========================================================================
   MHIS Inspection App
   ========================================================================== */
.mhis-app{
  --red:#0E7C66;--red-dk:#0A5E4D;--red-tint:#E6F4F0;--del:#B42318;--del-bg:#FEF3F2;
  --ink:#0B1B2B;--ink2:#2B343A;--muted:#4A5160;--muted2:#5F6673;--line:#E4E2DC;--line2:#EFEDE8;
  --bg:#F7F6F3;--card:#FFFFFF;--soft:#FAF9F7;
  --green:#15803D;--green-bg:#ECFDF3;--green-tx:#166534;
  --blue-bg:#EFF6FF;--blue-tx:#1E40AF;--amber-bg:#FFF7ED;--amber-tx:#9A3412;--grey-bg:#F1F0EC;
  --radius:12px;--shadow:0 1px 2px rgba(25,34,39,.05),0 8px 24px -16px rgba(25,34,39,.18);
  --mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,monospace;
  --display:'Newsreader',Georgia,'Times New Roman',serif;--brandfont:Lexend,Inter,system-ui,sans-serif;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;font-size:15px;line-height:1.5;color:var(--ink);
  -webkit-font-smoothing:antialiased;text-align:left
}
.mhis-app *,.mhis-app *::before,.mhis-app *::after{box-sizing:border-box}
:where(.mhis-app) :is(h1,h2,h3,h4){font-family:var(--display);font-size:inherit;line-height:1.25}
:where(.mhis-app) :is(h1,h2,h3,h4,p,ul,ol,figure){margin:0;padding:0;border:0;background:none;text-transform:none;letter-spacing:normal;color:inherit}
:where(.mhis-app) :is(ul,ol){list-style:none}
:where(.mhis-app) a{color:inherit;text-decoration:none;box-shadow:none}
:where(.mhis-app) :is(button,input,select,textarea){font:inherit;color:inherit;margin:0;letter-spacing:normal;text-transform:none}
:where(.mhis-app) button{cursor:pointer;background:none;border:0;padding:0;line-height:1.2;box-shadow:none;min-height:0}
.mhis-app svg{flex:0 0 auto}
#mhis-app a,.mhis-modal a,.mhis-toasts a{text-decoration:none}
.mhis-app [hidden]{display:none!important}
.mhis-app :focus-visible{outline:2px solid var(--red);outline-offset:2px}

/* Full-screen takeover on the app page */
#mhis-app.mhis-app{position:fixed!important;left:0!important;right:0!important;bottom:0!important;top:var(--wp-admin--admin-bar--height,0px)!important;width:auto!important;max-width:none!important;margin:0!important;padding:0!important;transform:none!important;z-index:99990;background:var(--bg);display:grid;grid-template-columns:268px minmax(0,1fr);overflow:hidden}
body.mhis-app-page{overflow:hidden}

/* Boot */
.mhis-boot{grid-column:1/-1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;color:var(--muted2);font-size:14px}
.mhis-boot-mark svg{width:56px;height:56px;animation:cdrPulse 1.4s ease-in-out infinite}
@keyframes cdrPulse{50%{opacity:.45}}

/* ---------- Sidebar ---------- */
.mhis-side{background:#F1F0EC;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:22px;padding:20px 16px;overflow-y:auto}
.mhis-side-logo{display:block;padding:4px 6px 6px}
.mhis-side-logo svg{height:40px;width:auto;display:block}
.mhis-nav{display:flex;flex-direction:column;gap:2px}
.mhis-nav a{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:8px;font-size:15px;font-weight:500;color:var(--muted)}
.mhis-nav a:hover{background:rgba(255,255,255,.6);color:var(--ink)}
.mhis-nav a.is-active{background:#fff;color:var(--ink);font-weight:600;box-shadow:0 1px 2px rgba(25,34,39,.08)}
.mhis-nav a.is-active svg{color:var(--red)}
.mhis-nav .mhis-badge{margin-left:auto}
.mhis-side-bottom{margin-top:auto;display:flex;flex-direction:column;gap:12px}
.mhis-tip{background:#fff;border:1px solid var(--line);border-radius:10px;padding:14px;font-size:13px;color:var(--muted)}
.mhis-tip b{display:block;font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted2);margin-bottom:6px;font-weight:600}
.mhis-user{display:flex;align-items:center;gap:10px;padding:10px;border-radius:10px;background:#fff;border:1px solid var(--line)}
.mhis-avatar{width:34px;height:34px;border-radius:50%;background:var(--ink);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;flex:0 0 34px}
.mhis-user-meta{min-width:0;flex:1}
.mhis-user-meta b{display:block;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mhis-user-meta span{display:block;font-size:12px;color:var(--muted2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mhis-icon-btn{width:36px;height:36px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;color:var(--muted)}
.mhis-icon-btn:hover{background:var(--line2);color:var(--ink)}

/* ---------- Main ---------- */
.mhis-main{overflow-y:auto;overflow-x:hidden;min-width:0;scroll-behavior:smooth}
.mhis-page{max-width:1240px;margin:0 auto;padding:36px 40px 80px}
.mhis-page.is-narrow{max-width:980px}
.mhis-topbar{display:none}

.mhis-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:16px 24px;margin-bottom:28px}
.mhis-eyebrow{font-size:12px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--muted2)}
.mhis-title{font-family:var(--display);font-size:36px;line-height:1.1;letter-spacing:-.02em;font-weight:700;margin-top:6px}
.mhis-sub{color:var(--muted);margin-top:8px;font-size:15px}
.mhis-head-actions{display:flex;flex-wrap:wrap;gap:10px}
.mhis-crumb{display:inline-flex;align-items:center;gap:6px;font-size:14px;color:var(--muted);margin-bottom:14px}
.mhis-crumb:hover{color:var(--ink)}

/* Buttons */
.mhis-btn{display:inline-flex;text-decoration:none;align-items:center;justify-content:center;gap:8px;padding:10px 16px;min-height:42px;border-radius:8px;font-size:14px;font-weight:600;border:1px solid transparent;white-space:nowrap;transition:background .15s,border-color .15s,color .15s}
.mhis-app .mhis-btn{line-height:1.2}
.mhis-btn-primary{background:var(--ink);color:#fff}
.mhis-btn-primary:hover{background:#000}
.mhis-btn-red{background:var(--red);color:#fff}
.mhis-btn-red:hover{background:var(--red-dk)}
.mhis-btn-outline{background:#fff;border-color:#D3D0C8;color:var(--ink)}
.mhis-btn-outline:hover{border-color:var(--ink)}
.mhis-btn-ghost{color:var(--muted)}
.mhis-btn-ghost:hover{background:var(--line2);color:var(--ink)}
.mhis-btn-danger{color:#B91C1C}
.mhis-btn-danger:hover{background:#FEF2F2}
.mhis-btn-block{width:100%}
.mhis-btn-sm{padding:7px 12px;min-height:34px;font-size:13px}
.mhis-btn[disabled]{opacity:.55;cursor:not-allowed}

/* Pills / badges */
.mhis-pill{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:600;white-space:nowrap;line-height:1.5}
.mhis-pill::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.75}
.mhis-pill.is-draft{background:var(--grey-bg);color:#57534E}
.mhis-pill.is-submitted{background:var(--blue-bg);color:var(--blue-tx)}
.mhis-pill.is-approved,.mhis-pill.is-active,.mhis-pill.is-filed{background:var(--green-bg);color:var(--green-tx)}
.mhis-pill.is-on_hold{background:var(--amber-bg);color:var(--amber-tx)}
.mhis-pill.is-completed{background:var(--grey-bg);color:#44403C}
.mhis-pill.is-missing{background:var(--red-tint);color:var(--red-dk)}
.mhis-badge{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 7px;border-radius:999px;background:var(--red);color:#fff;font-size:12px;font-weight:700}
.mhis-ai{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600;color:var(--red)}
.mhis-chip{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:999px;border:1px solid var(--line);background:#fff;font-size:12.5px;color:var(--muted)}
.mhis-chip.is-warn{border-color:#F3C9A8;background:var(--amber-bg);color:var(--amber-tx)}
.mhis-chip.is-danger{border-color:#F5C2CA;background:var(--red-tint);color:var(--red-dk)}

/* Cards */
.mhis-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.mhis-card-pad{padding:22px 24px}
.mhis-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:20px 24px 14px}
.mhis-card-title{font-family:var(--display);font-size:20px;font-weight:700;letter-spacing:-.01em;margin-top:4px}
.mhis-link{display:inline-flex;align-items:center;gap:6px;font-size:13.5px;font-weight:600;color:var(--ink)}
.mhis-link:hover{color:var(--red)}
.mhis-grid{display:grid;gap:18px}
.mhis-grid-kpi{grid-template-columns:repeat(4,minmax(0,1fr))}
.mhis-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.mhis-grid-main{grid-template-columns:minmax(0,1.75fr) minmax(0,1fr);align-items:start}
.mhis-stack{display:flex;flex-direction:column;gap:18px}

/* KPI */
.mhis-kpi{padding:20px 22px;display:flex;flex-direction:column;gap:14px;position:relative;overflow:hidden}
.mhis-kpi-top{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.mhis-kpi-label{font-weight:600;font-size:14px}
.mhis-kpi-hint{font-size:12.5px;color:var(--muted2)}
.mhis-kpi-ic{width:36px;height:36px;border-radius:9px;display:flex;align-items:center;justify-content:center;background:var(--red-tint);color:var(--red)}
.mhis-kpi-value{font-family:var(--mono);font-size:40px;font-weight:500;letter-spacing:-.03em;line-height:1}
.mhis-kpi-value small{font-family:Inter,sans-serif;font-size:13px;color:var(--muted2);letter-spacing:0;margin-left:6px;font-weight:500}
.mhis-kpi-foot{display:flex;gap:22px;font-size:12px;color:var(--muted2);border-top:1px solid var(--line2);padding-top:12px}
.mhis-kpi-foot b{display:block;color:var(--ink);font-size:14px;font-weight:600}
.mhis-kpi-foot span{text-transform:uppercase;letter-spacing:.06em;font-size:11px}
.mhis-spark{position:absolute;right:18px;top:62px;opacity:.9}

/* Brief */
.mhis-brief{background:var(--ink);color:#fff;border-color:var(--ink);padding:22px 24px;display:flex;flex-direction:column;gap:16px}
.mhis-brief .mhis-eyebrow{color:#FCA5B1;display:flex;align-items:center;gap:8px}
.mhis-brief h2{font-family:var(--display);font-size:22px;line-height:1.25;font-weight:600;letter-spacing:-.01em}
.mhis-brief p{color:#C5CAD3;font-size:14px}
.mhis-brief-list{display:flex;flex-direction:column;gap:2px;border-top:1px solid #2E363D;padding-top:10px}
.mhis-brief-item{display:flex;align-items:center;gap:12px;padding:9px 8px;border-radius:8px;color:#fff;font-size:14px}
.mhis-brief-item:hover{background:#232B31}
.mhis-brief-item small{display:block;color:#9AA1AD;font-size:12.5px}
.mhis-brief-item .n{margin-left:auto;font-family:var(--mono);color:#FCA5B1;font-size:14px}
.mhis-brief-ok{display:flex;align-items:center;gap:10px;color:#A7F3D0;font-size:14px}
.mhis-dot{width:9px;height:9px;border-radius:50%;flex:0 0 9px}

/* Today strip */
.mhis-today{display:flex;flex-wrap:wrap;gap:10px;padding:16px 20px;align-items:center}
.mhis-today-label{font-weight:600;font-size:14px;margin-right:6px}
.mhis-today-item{display:inline-flex;align-items:center;gap:10px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:var(--soft);font-size:13.5px}
.mhis-today-item:hover{border-color:#C9C6BE;background:#fff}

/* Chart */
.mhis-chart{padding:4px 24px 20px}
.mhis-chart svg{width:100%;height:auto;display:block;overflow:visible}
.mhis-chart text{font-family:Inter,sans-serif;font-size:11px;fill:var(--muted2)}
.mhis-legend{display:flex;flex-wrap:wrap;gap:14px;font-size:12.5px;color:var(--muted);padding:0 24px 18px}
.mhis-legend span{display:inline-flex;align-items:center;gap:6px}
.mhis-legend i{width:10px;height:10px;border-radius:3px;display:block}
.mhis-bar-rect{transition:opacity .15s}
.mhis-bar-group:hover .mhis-bar-rect{opacity:.8}
.mhis-hbar{display:grid;grid-template-columns:minmax(0,160px) minmax(0,1fr) 72px;gap:12px;align-items:center;font-size:13.5px;padding:7px 0}
.mhis-hbar-track{height:10px;background:var(--line2);border-radius:5px;overflow:hidden}
.mhis-hbar-track i{display:block;height:100%;border-radius:5px}
.mhis-hbar b{font-family:var(--mono);font-weight:500;text-align:right}
.mhis-hbar span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Lists */
.mhis-list>*+*{border-top:1px solid var(--line2)}
.mhis-proj-row{display:flex;align-items:center;gap:14px;padding:14px 24px}
.mhis-proj-row:hover{background:var(--soft)}
.mhis-proj-bar{width:4px;height:36px;border-radius:2px;flex:0 0 4px}
.mhis-proj-row b{display:block;font-weight:600;font-size:14.5px}
.mhis-code{font-family:var(--mono);font-size:12px;color:var(--muted2);letter-spacing:.06em}
.mhis-proj-row .mhis-pill{margin-left:auto}
.mhis-rep-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 24px;align-items:center;padding:16px 24px}
.mhis-rep-row:hover{background:var(--soft)}
.mhis-rep-name{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px}
.mhis-rep-name b{font-weight:600;font-size:15px}
.mhis-rep-text{color:var(--muted);font-size:14px;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mhis-rep-meta{display:flex;align-items:center;gap:18px;font-size:13px;color:var(--muted);white-space:nowrap}
.mhis-rep-meta span{display:inline-flex;align-items:center;gap:6px}
.mhis-rep-meta .hrs{font-family:var(--mono);color:var(--ink);min-width:70px;text-align:right;justify-content:flex-end}
.mhis-rep-meta .date{font-family:var(--mono);min-width:56px;text-align:right;justify-content:flex-end}
.mhis-card-foot{padding:14px 24px;border-top:1px solid var(--line2);font-size:13px;color:var(--muted2);display:flex;justify-content:space-between;gap:12px}

/* Filters */
.mhis-filters{display:grid;grid-template-columns:minmax(0,1fr) 220px 180px 160px;gap:10px;margin-bottom:18px}
.mhis-input,.mhis-select,.mhis-textarea{width:100%;padding:10px 12px;border:1px solid #D3D0C8;border-radius:8px;background:#fff;font-size:14.5px;min-height:42px;color:var(--ink);box-shadow:none}
.mhis-input:focus,.mhis-select:focus,.mhis-textarea:focus{outline:2px solid var(--red);outline-offset:0;border-color:var(--red)}
.mhis-search{position:relative}
.mhis-search svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--muted2);pointer-events:none}
.mhis-search .mhis-input{padding-left:38px}
.mhis-select{appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235F6673' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;padding-right:32px}
.mhis-textarea{min-height:96px;resize:vertical;line-height:1.55}
.mhis-tabs{display:inline-flex;gap:4px;background:#EAE8E3;padding:4px;border-radius:10px;margin-bottom:18px;flex-wrap:wrap}
.mhis-tab{padding:7px 14px;border-radius:7px;font-size:13.5px;font-weight:600;color:var(--muted)}
.mhis-tab.is-active{background:#fff;color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.1)}
.mhis-tab small{color:var(--muted2);font-weight:500;margin-left:4px}

/* Project cards */
.mhis-grid-proj{grid-template-columns:repeat(auto-fill,minmax(340px,1fr))}
.mhis-proj-card{display:flex;flex-direction:column;border-top:4px solid var(--c,var(--red));overflow:hidden;transition:transform .15s,box-shadow .15s}
.mhis-proj-card:hover{transform:translateY(-2px);box-shadow:0 2px 4px rgba(25,34,39,.06),0 16px 32px -18px rgba(25,34,39,.3)}
.mhis-proj-card-body{padding:20px 22px;display:flex;flex-direction:column;gap:10px;flex:1}
.mhis-proj-card h3{font-family:var(--display);font-size:22px;font-weight:700;letter-spacing:-.01em;line-height:1.2}
.mhis-proj-card p{color:var(--muted);font-size:14px}
.mhis-proj-facts{display:flex;flex-direction:column;gap:6px;font-size:13.5px;color:var(--muted);padding-top:12px;border-top:1px solid var(--line2);margin-top:4px}
.mhis-proj-facts span{display:flex;align-items:center;gap:8px}
.mhis-proj-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid var(--line2);background:var(--soft)}
.mhis-proj-stats div{padding:12px 16px;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted2)}
.mhis-proj-stats div+div{border-left:1px solid var(--line2)}
.mhis-proj-stats b{display:block;font-family:var(--mono);font-size:15px;font-weight:500;color:var(--ink);letter-spacing:0;text-transform:none;margin-top:2px}
.mhis-value{font-family:var(--mono);font-size:14px;color:var(--ink)}

/* Project detail */
.mhis-ph{border-top:5px solid var(--c,var(--red));padding:24px 26px;display:flex;flex-direction:column;gap:18px}
.mhis-ph-top{display:flex;flex-wrap:wrap;justify-content:space-between;gap:16px;align-items:flex-start}
.mhis-facts{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px;border-top:1px solid var(--line2);padding-top:18px}
.mhis-fact small{display:block;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted2);margin-bottom:4px;font-weight:600}
.mhis-fact b{font-weight:600;font-size:14.5px}
.mhis-progress{height:6px;background:var(--line2);border-radius:3px;overflow:hidden;margin-top:8px}
.mhis-progress i{display:block;height:100%;background:var(--c,var(--red))}
.mhis-check-row{display:flex;align-items:flex-start;gap:12px;padding:12px 24px}
.mhis-check-row input{width:18px;height:18px;margin-top:2px;accent-color:var(--red);flex:0 0 18px;cursor:pointer}
.mhis-check-row label{flex:1;cursor:pointer;font-size:14px}
.mhis-check-row label small{display:block;color:var(--muted2);font-size:12.5px;margin-top:2px}
.mhis-check-row.is-done label{color:var(--muted2);text-decoration:line-through}
.mhis-sev{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:2px 8px;border-radius:999px;white-space:nowrap}
.mhis-sev.high{background:var(--red-tint);color:var(--red-dk)}
.mhis-sev.medium{background:var(--amber-bg);color:var(--amber-tx)}
.mhis-sev.low{background:var(--grey-bg);color:#57534E}

/* Report sheet */
.mhis-toolbar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;margin-bottom:18px}
.mhis-toolbar-actions{display:flex;flex-wrap:wrap;gap:8px}
.mhis-sheet{overflow:hidden}
.mhis-sheet-head{padding:28px 32px 22px;border-top:5px solid var(--c,var(--red))}
.mhis-sheet-eyebrow{display:flex;flex-wrap:wrap;align-items:center;gap:10px;font-family:var(--mono);font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted2)}
.mhis-sheet-title{font-family:var(--display);font-size:34px;font-weight:700;letter-spacing:-.02em;line-height:1.1;margin:10px 0 8px}
.mhis-sheet-meta{display:flex;flex-wrap:wrap;gap:6px 20px;font-size:13.5px;color:var(--muted)}
.mhis-sheet-meta .mhis-code{font-size:13px}
.mhis-sheet-summary{background:var(--soft);border-top:1px solid var(--line2);border-bottom:1px solid var(--line2);padding:20px 32px;display:flex;flex-direction:column;gap:10px}
.mhis-sheet-summary p{font-size:15.5px;line-height:1.55}
.mhis-sheet-summary-head{display:flex;justify-content:space-between;align-items:center;gap:10px}
.mhis-flags{display:flex;flex-wrap:wrap;gap:8px}
.mhis-sheet-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-bottom:1px solid var(--line2)}
.mhis-sheet-stats div{padding:18px 32px}
.mhis-sheet-stats div+div{border-left:1px solid var(--line2)}
.mhis-sheet-stats small{display:block;font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted2);font-weight:600;margin-bottom:4px}
.mhis-sheet-stats b{font-size:16px;font-weight:600}
.mhis-sheet-sec{padding:22px 32px;border-bottom:1px solid var(--line2)}
.mhis-sheet-sec:last-child{border-bottom:0}
.mhis-sheet-sec h3{font-size:11.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted2);font-weight:600;margin-bottom:10px}
.mhis-sheet-sec p{white-space:pre-line;font-size:15px}
.mhis-sheet-sec+.mhis-sheet-sec.is-tight{padding-top:0;border-top:0}
.mhis-sheet-foot{padding:16px 32px;background:var(--soft);font-size:12.5px;color:var(--muted2);display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px}
.mhis-table-wrap{border:1px solid var(--line);border-radius:10px;overflow:auto}
.mhis-table{width:100%;border-collapse:collapse;font-size:14px;min-width:520px}
.mhis-table th{background:var(--soft);text-align:left;font-weight:600;font-size:12px;letter-spacing:.04em;color:var(--muted2);padding:10px 14px;border-bottom:1px solid var(--line);white-space:nowrap}
.mhis-table td{padding:10px 14px;border-bottom:1px solid var(--line2)}
.mhis-table tr:last-child td{border-bottom:0}
.mhis-table .num{text-align:right;font-family:var(--mono)}
.mhis-table tfoot td{background:var(--soft);font-weight:700;border-top:1px solid var(--line)}
.mhis-bullets li{display:flex;gap:10px;padding:4px 0;font-size:15px}
.mhis-bullets li::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--red);margin-top:9px;flex:0 0 6px}

/* Form */
.mhis-form{display:flex;flex-direction:column;gap:18px}
.mhis-form-sec{padding:22px 24px}
.mhis-app .mhis-form-sec h2{font-family:var(--display);font-size:18px;font-weight:700;line-height:1.3;letter-spacing:-.01em;margin:0 0 4px}
.mhis-app .mhis-form-sec .mhis-help{font-size:13.5px;color:var(--muted2);margin:0 0 16px}
.mhis-fields{display:grid;gap:14px}
.mhis-fields-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.mhis-fields-6{grid-template-columns:1.6fr repeat(4,minmax(0,1fr)) auto}
.mhis-field{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600;color:var(--ink)}
.mhis-field small{font-weight:400;color:var(--muted2)}
.mhis-checkbox{display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:500;cursor:pointer;min-height:42px}
.mhis-checkbox input{width:18px;height:18px;accent-color:var(--red)}
.mhis-crew-table{width:100%;border-collapse:collapse;min-width:720px}
.mhis-crew-table th{font-size:12px;font-weight:600;color:var(--muted2);text-align:left;padding:0 6px 8px;white-space:nowrap}
.mhis-crew-table td{padding:4px 6px;vertical-align:middle}
.mhis-crew-table .mhis-input{min-height:40px;padding:8px 10px}
.mhis-crew-table .tot{font-family:var(--mono);text-align:right;padding-right:12px;white-space:nowrap}
.mhis-crew-table tfoot td{padding-top:12px;font-weight:700;border-top:1px solid var(--line2)}
.mhis-repeat{display:flex;flex-direction:column;gap:8px}
.mhis-repeat-row{display:grid;grid-template-columns:minmax(0,1fr) 130px 40px;gap:8px;align-items:center}
.mhis-repeat-row.is-simple{grid-template-columns:minmax(0,1fr) 40px}
.mhis-form-actions{position:sticky;bottom:0;z-index:5;background:rgba(247,246,243,.92);backdrop-filter:blur(6px);border-top:1px solid var(--line);margin:0 -40px -80px;padding:14px 40px;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px}
.mhis-form-actions .mhis-head-actions{margin-left:auto}
.mhis-weather-row{display:grid;grid-template-columns:1.4fr repeat(4,minmax(0,1fr));gap:12px;align-items:end}
.mhis-err{color:#B91C1C;font-size:13px;font-weight:500}

/* Empty */
.mhis-empty{padding:56px 24px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:12px}
.mhis-empty-ic{width:56px;height:56px;border-radius:14px;background:var(--red-tint);color:var(--red);display:flex;align-items:center;justify-content:center}
.mhis-empty h3{font-family:var(--display);font-size:22px;font-weight:700}
.mhis-empty p{color:var(--muted);max-width:440px}
.mhis-empty .mhis-head-actions{justify-content:center;margin-top:6px}

/* Modal */
.mhis-modal{position:fixed;inset:0;z-index:100000;background:rgba(25,34,39,.5);display:flex;align-items:flex-start;justify-content:center;padding:6vh 16px;overflow-y:auto;animation:cdrFade .15s ease-out}
.mhis-modal-box{background:#fff;border-radius:14px;width:100%;max-width:620px;box-shadow:0 24px 64px -16px rgba(0,0,0,.4);animation:cdrUp .18s ease-out}
.mhis-modal-head{display:flex;justify-content:space-between;align-items:center;padding:20px 24px;border-bottom:1px solid var(--line2)}
.mhis-modal-head h2{font-family:var(--display);font-size:20px;font-weight:700}
.mhis-modal-body{padding:20px 24px;display:flex;flex-direction:column;gap:14px}
.mhis-modal-foot{padding:16px 24px;border-top:1px solid var(--line2);display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.mhis-swatches{display:flex;gap:8px;flex-wrap:wrap}
.mhis-swatch{width:30px;height:30px;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 1px var(--line)}
.mhis-swatch[aria-pressed="true"]{box-shadow:0 0 0 2px var(--ink)}
@keyframes cdrFade{from{opacity:0}}
@keyframes cdrUp{from{opacity:0;transform:translateY(10px)}}

/* Toast */
.mhis-toasts{position:fixed;right:20px;bottom:20px;z-index:100001;display:flex;flex-direction:column;gap:8px}
.mhis-toast{background:var(--ink);color:#fff;padding:12px 16px;border-radius:10px;font-size:14px;box-shadow:0 12px 32px -12px rgba(0,0,0,.5);display:flex;align-items:center;gap:10px;animation:cdrUp .2s ease-out;max-width:380px}
.mhis-toast.is-error{background:#991B1B}

/* Login */
.mhis-app--login{min-height:70vh;display:flex;align-items:center;justify-content:center;padding:48px 16px;background:var(--bg)}
.mhis-login{width:100%;max-width:420px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:32px;box-shadow:var(--shadow)}
.mhis-login-logo svg{height:44px;width:auto;display:block;margin-bottom:22px}
.mhis-login h1{font-family:var(--display);font-size:26px;font-weight:700;letter-spacing:-.01em}
.mhis-login-sub{color:var(--muted);font-size:14.5px;margin:6px 0 20px}
.mhis-login form p{margin:0 0 14px}
.mhis-login label{display:block;font-size:13px;font-weight:600;margin-bottom:6px}
.mhis-login input[type=text],.mhis-login input[type=password]{width:100%;padding:11px 12px;border:1px solid #D3D0C8;border-radius:8px;font-size:15px;min-height:44px}
.mhis-login .login-remember label{display:inline-flex;align-items:center;gap:8px;font-weight:500}
.mhis-login input[type=submit]{width:100%;background:var(--red);color:#fff;border:0;border-radius:8px;padding:13px;font-size:15px;font-weight:600;cursor:pointer;min-height:46px}
.mhis-login input[type=submit]:hover{background:var(--red-dk)}
.mhis-login-alt{font-size:13.5px;color:var(--muted);text-align:center;margin-top:10px!important}
.mhis-login-alt a{color:var(--red);font-weight:600}

/* ---------- Responsive ---------- */
@media (max-width:1180px){
  .mhis-grid-kpi{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mhis-facts{grid-template-columns:repeat(3,minmax(0,1fr))}
  .mhis-filters{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
}
@media (max-width:960px){
  #mhis-app.mhis-app{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}
  .mhis-side{position:fixed;top:var(--wp-admin--admin-bar--height,0px);bottom:0;left:0;width:284px;z-index:20;transform:translateX(-105%);transition:transform .2s ease;box-shadow:0 0 40px rgba(0,0,0,.25)}
  .mhis-app.is-menu-open .mhis-side{transform:none}
  .mhis-scrim{position:fixed;inset:0;background:rgba(25,34,39,.45);z-index:15}
  .mhis-topbar{display:flex;align-items:center;gap:10px;padding:10px 14px;background:#fff;border-bottom:1px solid var(--line)}
  .mhis-topbar .mhis-side-logo svg{height:32px}
  .mhis-topbar .mhis-btn{margin-left:auto}
  .mhis-page{padding:24px 18px 64px}
  .mhis-grid-main,.mhis-grid-2{grid-template-columns:minmax(0,1fr)}
  .mhis-form-actions{margin:0 -18px -64px;padding:12px 18px}
  .mhis-weather-row{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mhis-weather-row>:first-child{grid-column:1/-1}
  .mhis-fields-3{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:640px){
  .mhis-title{font-size:28px}
  .mhis-grid-kpi{grid-template-columns:minmax(0,1fr)}
  .mhis-kpi-value{font-size:34px}
  .mhis-filters{grid-template-columns:minmax(0,1fr)}
  .mhis-rep-row{grid-template-columns:minmax(0,1fr);padding:14px 18px}
  .mhis-rep-text{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
  .mhis-rep-meta{gap:12px;flex-wrap:wrap}
  .mhis-rep-meta .hrs,.mhis-rep-meta .date{min-width:0}
  .mhis-proj-row,.mhis-card-head,.mhis-check-row{padding-left:18px;padding-right:18px}
  .mhis-grid-proj{grid-template-columns:minmax(0,1fr)}
  .mhis-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mhis-sheet-head,.mhis-sheet-summary,.mhis-sheet-sec,.mhis-sheet-foot{padding-left:18px;padding-right:18px}
  .mhis-sheet-title{font-size:26px}
  .mhis-sheet-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mhis-sheet-stats div{padding:14px 18px}
  .mhis-sheet-stats div:nth-child(3){border-left:0}
  .mhis-sheet-stats div:nth-child(n+3){border-top:1px solid var(--line2)}
  .mhis-form-sec{padding:18px}
  .mhis-repeat-row{grid-template-columns:minmax(0,1fr) 40px}
  .mhis-repeat-row .mhis-select{grid-column:1;grid-row:2}
  .mhis-hbar{grid-template-columns:minmax(0,110px) minmax(0,1fr) 60px}
  .mhis-toolbar .mhis-btn .lbl{display:none}
  .mhis-modal{padding:0}
  .mhis-modal-box{border-radius:0;min-height:100%}
}
@media (prefers-reduced-motion:reduce){.mhis-app *{animation:none!important;transition:none!important}}

/* ---------- Print (Save as PDF) ---------- */
@media print{
  @page{margin:14mm}
  body.mhis-app-page>*:not(#mhis-print-root){display:none!important}
  body.mhis-app-page{overflow:visible!important;background:#fff!important}
  #mhis-print-root{display:block!important}
  #mhis-print-root .mhis-card{box-shadow:none;border-color:#ddd}
  #mhis-print-root .mhis-noprint{display:none!important}
  #mhis-print-root .mhis-sheet-summary,#mhis-print-root .mhis-sheet-foot,#mhis-print-root .mhis-table th,#mhis-print-root .mhis-table tfoot td{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  #mhis-print-root .mhis-sheet-sec,#mhis-print-root .mhis-table-wrap{break-inside:avoid}
}
#mhis-print-root{display:none}

/* ---------- Photos & videos ---------- */
.mhis-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px}
.mhis-gallery.is-mini{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.mhis-media{position:relative;margin:0;display:flex;flex-direction:column;gap:6px}
.mhis-media-open{display:block;position:relative;width:100%;aspect-ratio:4/3;border-radius:8px;overflow:hidden;background:#E9E7E2;border:1px solid var(--line)}
.mhis-media-open img,.mhis-media-open video{width:100%;height:100%;object-fit:cover;display:block}
.mhis-media-open:hover img{transform:scale(1.03)}
.mhis-media-open img{transition:transform .2s}
.mhis-media-play{position:absolute;inset:0;margin:auto;width:44px;height:44px;border-radius:50%;background:rgba(25,34,39,.7);color:#fff;display:flex;align-items:center;justify-content:center;padding-left:3px}
.mhis-gallery.is-mini .mhis-media-play{width:32px;height:32px}
.mhis-media figcaption{font-size:12.5px;color:var(--muted)}
.mhis-media-cap.mhis-input{min-height:34px;padding:6px 8px;font-size:13px}
.mhis-media-del{position:absolute;top:6px;right:6px;width:28px;height:28px;border-radius:50%;background:rgba(25,34,39,.75);color:#fff;display:flex;align-items:center;justify-content:center}
.mhis-media-del:hover{background:var(--red)}
.mhis-media.is-pending .mhis-media-open{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:12px;background:var(--soft)}
.mhis-media.is-pending small{font-size:11.5px;color:var(--muted2);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mhis-media-prog{width:80%;height:6px;border-radius:3px;background:var(--line);overflow:hidden}
.mhis-media-prog i{display:block;height:100%;background:var(--red);transition:width .2s}
.mhis-file{position:relative;overflow:hidden;cursor:pointer}
.mhis-file input{position:absolute;inset:0;opacity:0;cursor:pointer;font-size:0}
.mhis-file:focus-within{outline:2px solid var(--red);outline-offset:2px}
.mhis-drop{border:2px dashed transparent;border-radius:10px;transition:border-color .15s,background .15s}
.mhis-drop.is-over{border-color:var(--red);background:var(--red-tint)}
.mhis-drop-hint{display:flex;align-items:center;justify-content:center;gap:8px;padding:26px 12px;border:2px dashed var(--line);border-radius:10px;color:var(--muted2);font-size:14px;text-align:center}
.mhis-modal-box.is-wide{max-width:1000px;background:#111}
.mhis-modal-box.is-wide .mhis-modal-head{border-color:#222}.mhis-modal-box.is-wide .mhis-modal-head h2{color:#fff}.mhis-modal-box.is-wide .mhis-modal-head .mhis-icon-btn{color:#ddd}
.mhis-modal-box.is-wide .mhis-modal-body{padding:0}
.mhis-lb-stage{display:flex;align-items:center;justify-content:center;background:#000;min-height:300px;max-height:72vh}
.mhis-lb-stage img,.mhis-lb-stage video{max-width:100%;max-height:72vh;display:block}
.mhis-lb-bar{display:flex;align-items:center;gap:8px;padding:10px 14px;color:#ddd;font-size:14px}
.mhis-lb-bar span{flex:1;text-align:center}.mhis-lb-bar small{color:#9AA1AD;margin-left:6px}
.mhis-lb-bar .mhis-icon-btn{color:#ddd}.mhis-lb-bar .mhis-icon-btn:hover{background:#222;color:#fff}
@media print{#mhis-print-root .mhis-gallery{grid-template-columns:repeat(3,1fr)}#mhis-print-root .mhis-media-play{display:none}}

/* ---------- Sign in / create account ---------- */
.mhis-auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;background:#EFEDE8;padding:4px;border-radius:10px;margin-bottom:22px}
.mhis-auth-tabs a{text-align:center;padding:9px;border-radius:7px;font-size:14px;font-weight:600;color:var(--muted)}
.mhis-auth-tabs a[aria-selected="true"]{background:#fff;color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.1)}
.mhis-auth-form p{margin:0 0 14px}
.mhis-auth-form label{display:flex;justify-content:space-between;align-items:baseline;font-size:13px;font-weight:600;margin-bottom:6px;color:var(--ink)}
.mhis-auth-form label span{font-weight:400;color:var(--muted2);margin-left:4px;margin-right:auto}
.mhis-auth-form input[type=text],.mhis-auth-form input[type=email],.mhis-auth-form input[type=password]{width:100%;padding:11px 12px;border:1px solid #D3D0C8;border-radius:8px;font-size:15px;min-height:46px;background:#fff;color:var(--ink);box-shadow:none}
.mhis-auth-form input:focus{outline:2px solid var(--red);outline-offset:0;border-color:var(--red)}
.mhis-auth-form small{display:block;font-size:12.5px;color:var(--muted2);margin-top:6px}
.mhis-auth-form .mhis-check label{display:flex;justify-content:flex-start;gap:8px;align-items:center;font-weight:500;font-size:14px}
.mhis-auth-form .mhis-check input{width:18px;height:18px;accent-color:var(--red);margin:0}
.mhis-auth-form .mhis-check a,.mhis-forgot{color:var(--red);font-weight:600}
.mhis-forgot{font-size:12.5px}
.mhis-auth-btn{width:100%;background:var(--red);color:#fff;border:1px solid var(--red);border-radius:8px;padding:13px;font-size:15px;font-weight:600;cursor:pointer;min-height:48px}
.mhis-auth-btn:hover{background:var(--red-dk)}
.mhis-auth-btn.is-outline{background:#fff;color:var(--ink);border-color:#D3D0C8}
.mhis-auth-btn.is-outline:hover{border-color:var(--ink)}
.mhis-alert{padding:12px 14px;border-radius:8px;background:var(--green-bg);color:var(--green-tx);font-size:14px;margin:0 0 16px;line-height:1.45}
.mhis-alert.is-error{background:#FEF2F2;color:#991B1B}
.mhis-auth-ic{width:56px;height:56px;border-radius:14px;background:var(--red-tint);color:var(--red);display:flex;align-items:center;justify-content:center;margin-bottom:16px}
.mhis-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}
.mhis-app--login .mhis-login h1{font-family:var(--display);font-size:26px;font-weight:700;letter-spacing:-.01em;line-height:1.2}
.mhis-app--login.is-embedded{min-height:0;background:transparent;padding:32px 0}

/* ---------- Sign-in popup ---------- */
.mhis-auth-modal{position:fixed;inset:0;z-index:100050;background:rgba(25,34,39,.55);display:flex;align-items:flex-start;justify-content:center;padding:6vh 16px;overflow-y:auto;animation:cdrFade .15s ease-out}
.mhis-auth-modal[hidden]{display:none}
html.mhis-modal-open,html.mhis-modal-open body{overflow:hidden}
.mhis-auth-box{position:relative;animation:cdrUp .2s ease-out;box-shadow:0 30px 80px -20px rgba(0,0,0,.45)}
.mhis-auth-x{position:absolute;top:14px;right:14px;width:38px;height:38px;border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--muted);background:none;border:0;cursor:pointer;padding:0}
.mhis-auth-x:hover{background:var(--line2);color:var(--ink)}
.mhis-auth-title{font-family:var(--display);font-size:26px;font-weight:700;letter-spacing:-.01em;line-height:1.2;margin:0;color:var(--ink)}
.mhis-auth-modal .mhis-login{margin:0 auto}
@media (max-width:520px){.mhis-auth-modal{padding:0;background:#fff}.mhis-auth-box{max-width:none;min-height:100%;border:0;border-radius:0;box-shadow:none;padding:24px 20px}}

/* ---------- Trial & billing ---------- */
.mhis-billbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px 16px;padding:10px 20px;background:#FFF7ED;border-bottom:1px solid #F3C9A8;color:#7C2D12;font-size:14px}
.mhis-billbar span{display:inline-flex;align-items:center;gap:8px}
.mhis-billbar.is-urgent{background:var(--red-tint);border-color:#F5C2CA;color:var(--red-dk)}
.mhis-paywall{max-width:820px;margin:20px auto 0;display:flex;flex-direction:column;align-items:center}
.mhis-paywall .mhis-empty-ic{margin-bottom:16px}
.mhis-paywall-saved{display:inline-flex;align-items:center;gap:8px;margin-top:16px;padding:7px 14px;border-radius:999px;background:var(--green-bg);color:var(--green-tx);font-size:13.5px;font-weight:600}
.mhis-plan-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px;width:100%;margin-top:26px}
.mhis-plan-card{position:relative;background:#fff;border:1px solid var(--line);border-radius:14px;padding:26px;display:flex;flex-direction:column;gap:12px;box-shadow:var(--shadow)}
.mhis-plan-card.is-featured{border:2px solid var(--red)}
.mhis-plan-tag{position:absolute;top:-12px;left:24px;background:var(--red);color:#fff;font-size:12px;font-weight:700;padding:4px 10px;border-radius:999px}
.mhis-plan-card h3{font-family:var(--display);font-size:20px;font-weight:700}
.mhis-plan-price b{font-family:var(--display);font-size:40px;font-weight:700;letter-spacing:-.02em}
.mhis-plan-price span{color:var(--muted2);margin-left:6px}
.mhis-plan-card p{color:var(--muted);font-size:14px}
.mhis-plan-card ul{display:flex;flex-direction:column;gap:8px;font-size:14px;margin:4px 0 8px}
.mhis-plan-card li{display:flex;align-items:center;gap:8px}
.mhis-plan-card li svg{color:var(--green)}
.mhis-plan-card .mhis-btn{margin-top:auto}
.mhis-app .mhis-opt{font-weight:400;color:#5F6673}
.mhis-app .mhis-kpi-hint svg{vertical-align:-2px;margin-right:2px}

/* ---------- Per-project plans ---------- */
.mhis-plan-grid.is-3{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:860px){.mhis-plan-grid.is-3{grid-template-columns:1fr}}
.mhis-plan-card.is-off{opacity:.55}
.mhis-plan-card.is-company{background:var(--soft)}
.mhis-plan-total{font-size:13.5px;color:var(--muted);background:var(--soft);border:1px solid var(--line2);border-radius:10px;padding:10px 12px;line-height:1.5}
.mhis-plan-card.is-company .mhis-plan-total{background:#fff}
.mhis-plan-total b{color:var(--ink);font-size:15px}
.mhis-plan-controls{display:flex;flex-wrap:wrap;gap:12px 20px;align-items:center;justify-content:center;margin-top:22px;width:100%}
.mhis-seg{display:inline-flex;background:#F1F0EC;border:1px solid var(--line);border-radius:999px;padding:3px}
.mhis-seg button{border:0;background:transparent;border-radius:999px;padding:8px 16px;font:600 14px/1 inherit;font-family:inherit;color:var(--muted);cursor:pointer}
.mhis-seg button[aria-pressed="true"]{background:#fff;color:var(--ink);box-shadow:0 1px 3px rgba(25,34,39,.12)}
.mhis-seg em{font-style:normal;color:var(--green);font-size:12px;margin-left:4px}
.mhis-qty{display:inline-flex;align-items:center;gap:10px;font-size:14px;color:var(--muted)}
.mhis-qty button{width:34px;height:34px;border-radius:50%;border:1px solid var(--line);background:#fff;font-size:18px;line-height:1;color:var(--ink);cursor:pointer}
.mhis-qty button:disabled{opacity:.4;cursor:default}
.mhis-qty b{min-width:26px;text-align:center;font-family:var(--display);font-size:20px;color:var(--ink)}
.mhis-qty.is-big{width:100%;justify-content:space-between;padding:12px 14px;border:1px solid var(--line);border-radius:12px}
.mhis-usage{display:flex;flex-direction:column;gap:6px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#fff}
.mhis-usage-top{display:flex;justify-content:space-between;gap:12px;font-size:13px;color:var(--muted)}
.mhis-usage-top b{color:var(--ink)}
.mhis-usage-bar{height:8px;border-radius:99px;background:var(--grey-bg);overflow:hidden}
.mhis-usage-bar i{display:block;height:100%;background:var(--green);border-radius:99px}
.mhis-usage.is-full .mhis-usage-bar i{background:#D97706}
.mhis-usage.is-over .mhis-usage-bar i{background:var(--red)}
.mhis-usage small{font-size:12.5px;color:var(--muted2)}
.mhis-usage.is-compact{padding:8px 12px;min-width:190px;gap:5px}
.mhis-head-actions .mhis-usage.is-compact,.mhis-head .mhis-usage.is-compact{margin-right:4px}
.mhis-limit-opts{list-style:none;margin:16px 0 0;padding:0;display:flex;flex-direction:column;gap:10px}
.mhis-limit-opts li{display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;column-gap:14px;align-items:center;padding:12px 14px;border:1px solid var(--line);border-radius:12px}
.mhis-limit-opts li b{font-size:14.5px}
.mhis-limit-opts li span{grid-column:1;font-size:13px;color:var(--muted)}
.mhis-limit-opts li .mhis-btn{grid-column:2;grid-row:1/3}
.mhis-ro-note{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 14px;padding:12px 14px;border-radius:12px;background:var(--grey-bg);border:1px solid var(--line);font-size:14px;color:var(--ink2)}
.mhis-ro-note span{flex:1;min-width:220px}
.mhis-ro-note.is-warn{background:var(--red-tint);border-color:#F5C2CA;color:var(--red-dk)}
.mhis-pill.is-locked{background:var(--red-tint);color:var(--red-dk)}
.mhis-pro-badge{display:inline-block;margin-left:6px;padding:2px 6px;border-radius:5px;background:var(--ink);color:#fff;font:700 10px/1.3 var(--display);letter-spacing:.06em;vertical-align:1px}
.mhis-btn .mhis-pro-badge{margin:0 4px 0 0}
.mhis-pro-gate{display:flex;gap:12px;align-items:flex-start;color:var(--muted)}
.mhis-logo-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.mhis-logo-prev{width:150px;height:56px;border:1px dashed var(--line);border-radius:10px;display:flex;align-items:center;justify-content:center;background:#fff;font-size:12px;color:var(--muted2);overflow:hidden}
.mhis-logo-prev img{max-width:100%;max-height:100%;object-fit:contain}
.mhis-btn-ghost{background:transparent;border:1px solid transparent;color:var(--muted)}
.mhis-btn-ghost:hover{color:var(--red-dk)}
.mhis-plan-cap{display:inline-flex;align-self:flex-start;align-items:center;gap:6px;background:var(--red-tint);color:var(--red-dk);border-radius:999px;padding:5px 11px;font-size:13px;font-weight:600}
.mhis-app .mhis-danger{border-top:1px solid var(--line2);padding-top:14px}
.mhis-app .mhis-btn-danger{color:var(--red-dk);border-color:#F5C2CA}
.mhis-app .mhis-btn-danger:hover{background:var(--red-tint);border-color:var(--red)}
.mhis-del-list{list-style:disc!important;margin:0 0 12px 20px!important;padding:0;color:var(--ink2);font-size:14px;display:flex;flex-direction:column;gap:6px}
.mhis-del-list li{display:list-item!important}

/* ---------- Offline mode ---------- */
.mhis-sync{display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border-radius:999px;border:1px solid var(--line);background:#fff;color:var(--muted);font-size:12.5px;font-weight:600;line-height:1.2;cursor:pointer;white-space:nowrap;max-width:100%}
.mhis-sync span{overflow:hidden;text-overflow:ellipsis}
.mhis-sync:hover{border-color:var(--ink2)}
.mhis-sync.is-ok{color:var(--green-tx)}
.mhis-sync.is-ok svg{color:var(--green)}
.mhis-sync.is-off{background:var(--grey-bg);color:var(--ink2);border-color:#D9D6CF}
.mhis-sync.is-wait{background:var(--amber-bg);color:var(--amber-tx);border-color:#F3C9A8}
.mhis-sync.is-busy{background:var(--blue-bg);color:var(--blue-tx);border-color:#C7DBFB}
.mhis-sync.is-busy svg{animation:cdrSpin 1s linear infinite}
.mhis-sync.is-bad{background:var(--red-tint);color:var(--red-dk);border-color:#F5C2CA}
@keyframes cdrSpin{to{transform:rotate(360deg)}}
.mhis-side-bottom>.mhis-sync{align-self:flex-start}
.mhis-topbar .mhis-sync{margin-left:auto;padding:6px 10px}
.mhis-topbar .mhis-sync+.mhis-btn{margin-left:0}
.mhis-sync-n{display:none}
@media (max-width:480px){.mhis-topbar .mhis-sync span{display:none}.mhis-topbar .mhis-sync{padding:7px 9px;gap:5px}.mhis-topbar .mhis-sync-n{display:inline;font-size:12px}}
.mhis-chip.is-wait{border-color:#F3C9A8;background:var(--amber-bg);color:var(--amber-tx)}
.mhis-offline-note{display:flex;gap:10px;align-items:flex-start;margin:0 0 14px;padding:12px 14px;border-radius:10px;background:var(--amber-bg);border:1px solid #F3C9A8;color:var(--amber-tx);font-size:14px;line-height:1.45}
.mhis-offline-note svg{margin-top:2px}
.mhis-offline-note.is-bad{background:var(--red-tint);border-color:#F5C2CA;color:var(--red-dk)}
.mhis-offline-note .mhis-link{color:inherit;text-decoration:underline;font-size:inherit;padding:0}
.mhis-media-wait{position:absolute;left:6px;top:6px;display:inline-flex;align-items:center;gap:4px;padding:3px 7px;border-radius:999px;background:rgba(25,34,39,.82);color:#fff;font-size:11px;font-weight:600}
.mhis-media-open{position:relative}
.mhis-sync-note{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:10px;background:var(--blue-bg);color:var(--blue-tx);font-size:14px;margin-bottom:12px}
.mhis-sync-note.is-off{background:var(--grey-bg);color:var(--ink2)}
.mhis-sync-note.is-ok{background:var(--green-bg);color:var(--green-tx)}
.mhis-sync-list{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.mhis-sync-item{padding:12px 14px;border-bottom:1px solid var(--line2);background:#fff}
.mhis-sync-item:last-child{border-bottom:0}
.mhis-sync-row{display:flex;gap:10px;align-items:flex-start}
.mhis-sync-row>svg{color:var(--muted2);margin-top:2px}
.mhis-sync-row>div{flex:1;min-width:0}
.mhis-sync-row b{display:block;font-size:14px;font-weight:600;overflow-wrap:anywhere}
.mhis-sync-row small{display:block;color:var(--muted2);font-size:12.5px;margin-top:2px}
.mhis-sync-row .mhis-chip{flex:0 0 auto;padding:3px 9px;font-size:11.5px}
.mhis-sync-why{margin:10px 0 0 28px!important;font-size:13px;color:var(--muted)}
.mhis-sync-acts{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 0 28px}
@media (max-width:400px){.mhis-topbar{gap:8px;padding:10px 12px}.mhis-topbar .mhis-side-logo svg{height:25px;width:auto}}

/* ==========================================================================
   MHIS — inspection screens (added on top of the shared base above)
   ========================================================================== */
/* Logo */
.mhis-logo{display:inline-flex;align-items:center;gap:10px;color:inherit}
.mhis-mark-img{width:40px;height:40px;object-fit:contain;display:block}
.mhis-logo-word{display:flex;flex-direction:column;line-height:1;font-family:var(--brandfont)}
.mhis-lw1{font-weight:700;font-size:16.5px;letter-spacing:-.02em;color:#01223A}
.mhis-lw1 em{font-style:normal;color:#007771}
.mhis-lw2{font-weight:400;font-size:12.5px;color:#3B4652;margin-top:3px}
.mhis-side-logo{padding:2px 4px 4px!important}
.mhis-side-logo .mhis-logo{gap:9px}
.mhis-boot-mark .mhis-mark-img{width:56px;height:56px}
.mhis-login-logo .mhis-logo{justify-content:center}
.mhis-login-logo .mhis-mark-img{width:46px;height:46px}
.mhis-login-logo .mhis-lw1{font-size:19px}.mhis-login-logo .mhis-lw2{font-size:14px}

/* Sidebar */
.mhis-side{background:#F3F1EC}
.mhis-side-label{font-size:11px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--muted2);padding:0 12px;margin:4px 0 -14px}
.mhis-nav a{position:relative}
.mhis-nav a.is-active svg{color:#B7791F}
.mhis-nav .mhis-badge{margin-left:auto;background:var(--red-tint);color:var(--red-dk);font-size:11.5px;font-weight:700;border-radius:999px;padding:1px 8px}
.mhis-btn-lg{min-height:46px;padding:11px 20px;font-size:15px;border-radius:10px}
.mhis-btn-primary{background:#1C2B36}
.mhis-btn-primary:hover{background:#0B1B2B}
.mhis-btn-del{background:var(--del);color:#fff}
.mhis-btn-del:hover{background:#912018}
.mhis-btn-danger{color:var(--del)}
.mhis-trialbox{background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin-bottom:12px}
.mhis-trialbox.is-urgent{border-color:#F2A93B;background:#FFF8EC}
.mhis-trialbox-top{display:flex;justify-content:space-between;align-items:baseline;font-size:13px}
.mhis-trialbox-top span{color:var(--muted2)}
.mhis-trialbox-bar{height:6px;background:var(--line2);border-radius:9px;margin:9px 0 8px;overflow:hidden}
.mhis-trialbox-bar i{display:block;height:100%;background:var(--red);border-radius:9px}
.mhis-trialbox-bar.is-wide{margin:14px 0 0}
.mhis-link-btn{color:var(--red);font-weight:600;font-size:13px}
.mhis-link-btn:hover{text-decoration:underline}

/* Headings in the serif display face */
.mhis-title{font-weight:500!important;letter-spacing:-.015em!important;font-size:44px!important}
.mhis-eyebrow{font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--muted2);font-weight:500}
.mhis-sub{font-size:16px;color:var(--muted);max-width:640px;margin-top:10px}
.mhis-h2{font-family:var(--display);font-size:21px;font-weight:500;line-height:1.2}
.mhis-h2.is-lg{font-size:25px}
.mhis-muted{color:var(--muted2);font-size:14px}
.mhis-crumb{display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:14px;margin-bottom:18px}
.mhis-crumb:hover{color:var(--ink)}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Pills: statuses + conditions */
.mhis-pill{letter-spacing:.06em;text-transform:uppercase;font-size:11.5px;padding:5px 12px;border:1px solid transparent}
.mhis-pill::before{display:none}
.mhis-pill.is-scheduled{background:#EFEDE8;color:#3D3A36}
.mhis-pill.is-in_progress{background:#FFF4E5;color:#B45309;border-color:#F6DDB8}
.mhis-pill.is-completed{background:#E8F3EE;color:#1F7A4D;border-color:#CFE6DA}
.mhis-pill.is-delivered{background:#EEF0F2;color:#1C2B36;border-color:#DCE0E4}
.mhis-cpill{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;padding:4px 10px;border-radius:999px;white-space:nowrap;background:#F1F0EC;color:#57534E;border:1px solid #E4E2DC}
.mhis-cpill::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.8}
.mhis-cpill.is-satisfactory{background:#E8F3EE;color:#1F7A4D;border-color:#CFE6DA}
.mhis-cpill.is-monitor{background:#FFF4E5;color:#B45309;border-color:#F6DDB8}
.mhis-cpill.is-defect{background:#FEF3F2;color:#B42318;border-color:#FAD3CF}
.mhis-cpill.is-not_inspected{color:#78716C}
.mhis-cdot{display:inline-flex;align-items:center;gap:7px;font-size:11.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted2);font-weight:500}
.mhis-cdot::before{content:"";width:7px;height:7px;border-radius:50%;background:#A8A29E}
.mhis-cdot.is-satisfactory::before{background:#1F7A4D}.mhis-cdot.is-monitor::before{background:#C2761B}.mhis-cdot.is-defect::before{background:#C2362B}
.mhis-chip{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;padding:3px 9px;border-radius:999px;background:#EFEDE8;color:#57534E}

/* Dashboard stat cards (warm corner glow + dot pattern, as in the design) */
.mhis-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;margin-bottom:22px}
.mhis-stat{position:relative;overflow:hidden;background:#fff;border:1px solid var(--line);border-radius:22px;padding:24px 26px 22px;box-shadow:0 18px 40px -26px rgba(11,27,43,.28);min-height:220px;display:flex;flex-direction:column}
.mhis-stat::before{content:"";position:absolute;right:-60px;top:-60px;width:260px;height:200px;background:radial-gradient(closest-side,rgba(214,166,108,.30),transparent);pointer-events:none}
.mhis-stat h3{font-family:Inter,system-ui,sans-serif;font-size:21px;font-weight:500;position:relative;max-width:75%}
.mhis-dots{position:absolute;right:22px;top:24px;display:grid;grid-template-columns:repeat(4,9px);gap:6px 6px;transform:skewX(-14deg)}
.mhis-dots i{width:9px;height:9px;border-radius:50%;background:#B7843E;display:block}
.mhis-dots i:nth-child(1),.mhis-dots i:nth-child(5),.mhis-dots i:nth-child(9),.mhis-dots i:nth-child(10){opacity:0}
.mhis-stat-row{margin-top:auto;display:flex;align-items:flex-end;justify-content:space-between;gap:12px;position:relative}
.mhis-stat-big{font-family:var(--display);font-size:84px;line-height:.9;font-weight:600;letter-spacing:-.03em}
.mhis-stat-sub{display:flex;gap:22px;padding-bottom:6px}
.mhis-stat-sub div{display:flex;flex-direction:column;gap:4px;font-size:14px}
.mhis-stat-sub span{color:var(--muted2)}
.mhis-stat-sub b{font-size:16px;font-weight:600}
.mhis-sched-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:22px;overflow:hidden}
.mhis-sched{padding:16px 20px;border-left:1px solid var(--line2);display:flex;flex-direction:column;gap:2px;min-width:0}
.mhis-sched:first-child{border-left:0}
.mhis-sched b{font-family:var(--display);font-size:30px;font-weight:600;line-height:1}
.mhis-sched span{font-size:13px;font-weight:600;color:var(--ink2);margin-top:4px}
.mhis-sched small{font-size:12.5px;color:var(--muted2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mhis-sched.is-late b{color:var(--del)}
.mhis-sched.is-ok b{color:#1F7A4D}
.mhis-dash-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(0,1fr);gap:22px;align-items:start}
.mhis-card{border-radius:18px}
.mhis-card-head2{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:24px 26px 18px;border-bottom:1px solid var(--line2)}
.mhis-card-head2 h2{font-family:var(--display);font-size:23px;font-weight:500}
.mhis-card-head2 p{color:var(--muted2);font-size:14px;margin-top:3px}
.mhis-link{display:inline-flex;align-items:center;gap:6px;font-size:14px;color:var(--ink2);font-weight:500;white-space:nowrap}
.mhis-link:hover{color:var(--ink)}
.mhis-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:16px 26px;border-top:1px solid var(--line2)}
.mhis-card-head2 + .mhis-row{border-top:0}
.mhis-row:hover{background:#FBFAF8}
.mhis-row-main{display:flex;flex-direction:column;gap:3px;min-width:0}
.mhis-row-main b{font-weight:500;font-size:16px}
.mhis-row-main span{font-size:14px;color:var(--muted2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mhis-row-side{display:flex;align-items:center;gap:14px;flex:0 0 auto}
.mhis-row-date{font-size:14px;color:var(--ink2)}
.mhis-row-date.is-late{color:var(--del);font-weight:600}
.mhis-row-ic{color:var(--muted2);display:inline-flex}
.mhis-card-pad2{padding:24px 26px}
.mhis-cbars{display:grid;gap:16px;margin:20px 0 22px}
.mhis-cbar-top{display:flex;justify-content:space-between;font-size:14.5px;margin-bottom:8px}
.mhis-cbar-top b{font-weight:500;color:var(--ink2)}
.mhis-cbar-track{height:6px;background:#F1EFEB;border-radius:9px;overflow:hidden}
.mhis-cbar-track i{display:block;height:100%;border-radius:9px;min-width:3px}
.mhis-cbar-track .is-sat{background:#2F7A55}.mhis-cbar-track .is-mon{background:#B7843E}.mhis-cbar-track .is-def{background:#C2362B}.mhis-cbar-track .is-ni{background:#B9B2A8}
.mhis-next{display:flex;flex-direction:column;gap:3px;background:#F4F3F0;border-radius:14px;padding:16px 18px}
.mhis-next span{font-size:11.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted2)}
.mhis-next b{font-size:16.5px;font-weight:500;margin-top:4px}
.mhis-next small{font-size:13.5px;color:var(--muted2)}
a.mhis-next:hover{background:#EFEDE8}

/* Inspections list */
.mhis-toolbar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}
.mhis-tabs{display:flex;flex-wrap:wrap;gap:4px;background:#EFEDE8;padding:4px;border-radius:12px}
.mhis-tab{padding:8px 14px;border-radius:9px;font-size:14px;font-weight:500;color:var(--muted);min-height:38px}
.mhis-tab span{color:var(--muted2);font-weight:400;margin-left:3px}
.mhis-tab[aria-selected="true"]{background:#fff;color:var(--ink);box-shadow:0 1px 2px rgba(11,27,43,.08)}
.mhis-search{position:relative;display:flex;align-items:center;min-width:260px}
.mhis-search svg{position:absolute;left:12px;color:var(--muted2)}
.mhis-search .mhis-input{padding-left:36px}

/* Inspection detail */
.mhis-head-detail{align-items:flex-start}
.mhis-detail-meta{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:14px;color:var(--muted)}
.mhis-head-detail .mhis-title{margin-top:12px}
.mhis-sel-wrap .mhis-select{min-width:170px}
.mhis-progress-card{padding:0;overflow:hidden;margin-bottom:28px}
.mhis-progress-top{display:flex;justify-content:space-between;align-items:center;padding:22px 26px}
.mhis-pct{font-family:var(--display);font-size:30px;font-weight:500}
.mhis-progress-bar{height:6px;background:#EFEDE8}
.mhis-progress-bar i{display:block;height:100%;background:var(--red)}
.mhis-cgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
.mhis-cgrid div{padding:18px 26px;border-left:1px solid var(--line2);display:flex;flex-direction:column;gap:8px}
.mhis-cgrid div:first-child{border-left:0}
.mhis-cgrid b{font-family:var(--display);font-size:28px;font-weight:500;line-height:1}
.mhis-detail-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(300px,1fr);gap:24px;align-items:start}
.mhis-detail-grid aside{display:flex;flex-direction:column;gap:18px}
.mhis-findings-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:14px;flex-wrap:wrap}
.mhis-fsec{margin-bottom:16px;overflow:hidden}
.mhis-fsec-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:16px 24px;border-bottom:1px solid var(--line2);background:#FCFBF9}
.mhis-fsec-head h3{font-family:var(--display);font-size:19px;font-weight:500}
.mhis-fsec-head span{font-size:12.5px;color:var(--muted2)}
.mhis-frow{display:flex;width:100%;justify-content:space-between;align-items:center;gap:14px;padding:16px 24px;text-align:left;border-top:1px solid var(--line2)}
.mhis-fsec-head + .mhis-frow{border-top:0}
.mhis-frow:hover{background:#FBFAF8}
.mhis-frow-main{display:flex;flex-direction:column;gap:3px;min-width:0}
.mhis-frow-main b{font-weight:500;font-size:15.5px}
.mhis-frow-main span{font-size:13.5px;color:var(--muted2)}
.mhis-frow-main em{font-style:normal;font-size:13.5px;color:var(--ink2);display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
.mhis-frow-side{display:flex;align-items:center;gap:10px;flex:0 0 auto}
.mhis-frow-ph{display:inline-flex;align-items:center;gap:4px;font-size:12.5px;color:var(--muted2)}
.mhis-dl{display:grid;gap:12px;margin-top:16px}
.mhis-dl div{display:flex;justify-content:space-between;gap:12px;font-size:14px}
.mhis-dl dt{color:var(--muted2)}
.mhis-dl dd{margin:0;font-weight:500;text-align:right}
.mhis-client{display:flex;flex-direction:column;gap:6px;margin-top:14px;font-size:14.5px}
.mhis-client b{font-weight:500;font-size:15.5px}
.mhis-client a{color:var(--ink2)}
.mhis-client small{color:var(--muted2);margin-top:6px}
.mhis-share-acts{display:flex;flex-wrap:wrap;gap:8px}
.mhis-sigs{display:grid;gap:10px;margin-top:14px}
.mhis-sig{display:flex;align-items:center;gap:12px;padding:8px;border:1px solid var(--line2);border-radius:12px;background:#FCFBF9}
.mhis-sig img{width:110px;height:34px;object-fit:contain;background:#fff;border-radius:6px;border:1px solid var(--line2)}
.mhis-sig b{display:block;font-size:14px;font-weight:600}
.mhis-sig small{font-size:12px;color:var(--muted2)}
.mhis-cmp-link{display:flex;align-items:center;gap:12px;color:var(--ink)}
.mhis-cmp-link > svg:first-child{color:var(--red)}
.mhis-cmp-link span{flex:1;display:flex;flex-direction:column}
.mhis-cmp-link b{font-weight:600;font-size:14.5px}
.mhis-cmp-link small{font-size:13px;color:var(--muted2)}
.mhis-cmp-link:hover{border-color:var(--red)}
.mhis-recur{display:flex;gap:12px;align-items:flex-start;color:var(--ink)}
.mhis-recur > svg{color:var(--red);margin-top:2px}
.mhis-recur b{display:block;font-weight:600;font-size:14.5px}
.mhis-recur small{font-size:13px;color:var(--muted2)}
.mhis-recur a{text-decoration:underline}

/* Modal tweaks (finding dialog in the design) */
.mhis-modal-box{border-radius:18px;background:#FAF9F7}
.mhis-modal-head{align-items:flex-start}
.mhis-modal-head h2{font-family:var(--display);font-size:25px;font-weight:600}
.mhis-modal-sub{color:var(--muted);font-size:14.5px;margin-top:6px}
.mhis-modal-box.is-finding{max-width:740px}
.mhis-modal-body{display:flex;flex-direction:column;gap:16px}
.mhis-modal-foot{gap:10px}
.mhis-flabel{font-size:11.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);font-weight:500}
.mhis-fields-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.mhis-fields-2 .is-span,.mhis-fields-3 .is-span{grid-column:1/-1}
.mhis-input,.mhis-select{border-radius:10px;border-color:#DCD8D0;min-height:44px}
textarea.mhis-input{line-height:1.5;resize:vertical}
.mhis-input[readonly]{background:#F4F3F0;color:var(--muted)}
.mhis-mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px}
.mhis-static{min-height:44px;display:flex;align-items:center;font-weight:500;font-size:14.5px;color:var(--ink2)}
.mhis-fphotos{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:10px}
.mhis-fphotos:empty{display:none}
.mhis-fph{position:relative;margin:0;aspect-ratio:4/3;border-radius:10px;overflow:hidden;background:#EFEDE8}
.mhis-fph > button:first-child{display:block;width:100%;height:100%}
.mhis-fph img,.mhis-fph video{width:100%;height:100%;object-fit:cover;display:block}
.mhis-fph-load{position:absolute;inset:0;display:grid;place-items:center;font-size:13px;font-weight:600;color:var(--muted)}
.mhis-fph-del{position:absolute;top:5px;right:5px;width:26px;height:26px;border-radius:50%;background:rgba(11,27,43,.75);color:#fff;display:grid;place-items:center}
.mhis-fph-mark{position:absolute;left:5px;bottom:5px;display:inline-flex;align-items:center;gap:4px;padding:4px 8px;border-radius:999px;background:rgba(255,255,255,.92);font-size:11.5px;font-weight:600;color:var(--ink)}
.mhis-fph-play{position:absolute;inset:0;display:grid;place-items:center;color:#fff;pointer-events:none}
.mhis-fph-play svg{filter:drop-shadow(0 1px 3px rgba(0,0,0,.5))}
.mhis-addph{cursor:pointer}

/* Markup editor */
.mhis-markup{z-index:100002}
.mhis-mk-tools{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.mhis-mk-tools button{display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border-radius:9px;border:1px solid var(--line);background:#fff;font-size:13.5px;font-weight:500;min-height:40px}
.mhis-mk-tools button[aria-pressed="true"]{background:var(--ink);color:#fff;border-color:var(--ink)}
.mhis-mk-sep{width:1px;height:26px;background:var(--line);margin:0 4px}
.mhis-mk-sw{width:40px;padding:0!important;justify-content:center}
.mhis-mk-sw::after{content:"";width:18px;height:18px;border-radius:50%;background:var(--c);box-shadow:inset 0 0 0 1px rgba(0,0,0,.2)}
.mhis-mk-sw.is-on{outline:2px solid var(--ink);outline-offset:1px}
.mhis-mk-stage{background:#1C2B36;border-radius:12px;padding:10px;display:grid;place-items:center;min-height:240px}
.mhis-mk-stage canvas{max-width:100%;max-height:62vh;cursor:crosshair;border-radius:6px;display:block}
.mhis-mk-stage p{color:#fff}

/* Signature pad */
.mhis-pad{position:relative;border:1.5px dashed #C9C4BA;border-radius:12px;background:#fff;overflow:hidden}
.mhis-pad canvas{width:100%;height:auto;display:block;cursor:crosshair}
.mhis-pad .mhis-btn{position:absolute;right:8px;top:8px}
.mhis-pad-hint{position:absolute;left:18px;bottom:16px;color:#A8A29E;font-size:14px;pointer-events:none;border-top:1px solid #E4E2DC;padding-top:6px;width:45%}

/* Share */
.mhis-share{display:grid;grid-template-columns:180px minmax(0,1fr);gap:20px;align-items:start}
.mhis-qr{background:#fff;border:1px solid var(--line);border-radius:12px;padding:8px}
.mhis-qr svg{width:100%;height:auto;display:block}
.mhis-copy{display:flex;gap:8px}
.mhis-copy .mhis-input{flex:1;min-width:0}

/* Forms */
.mhis-form-sec{padding:24px 26px;margin-bottom:18px;display:flex;flex-direction:column;gap:14px}
.mhis-fields-addr{grid-template-columns:2fr 1.2fr .6fr .8fr}
.mhis-form-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:8px}

/* Reports grid */
.mhis-rgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.mhis-rcard{padding:22px 24px;display:flex;flex-direction:column;gap:26px;color:var(--ink);border-radius:18px}
.mhis-rcard:hover{border-color:#CFCAC0}
.mhis-rcard-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.mhis-rcard-top b{display:block;font-weight:500;font-size:17px}
.mhis-rcard-top span{font-size:14px;color:var(--muted2)}
.mhis-rcard-bot{display:flex;justify-content:space-between;font-size:14px;color:var(--ink2)}
.mhis-rcard-open{display:inline-flex;align-items:center;gap:6px}

/* Report document */
.mhis-page.is-doc{max-width:980px}
.mhis-doc-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.mhis-doc-bar .mhis-crumb{margin:0}
.mhis-doc{background:#fff;border:1px solid var(--line);box-shadow:0 30px 60px -40px rgba(11,27,43,.35);padding:56px 64px;color:#111;font-size:14px}
.mhis-doc-lbl{display:block;font-size:10.5px;letter-spacing:.14em;text-transform:uppercase;color:#8A8F98;margin-bottom:6px}
.mhis-doc-head{display:flex;justify-content:space-between;gap:20px;padding-bottom:26px;border-bottom:1px solid #E8E8E8}
.mhis-doc-co{display:flex;gap:14px;align-items:flex-start}
.mhis-doc-co img{max-height:52px;max-width:140px;object-fit:contain}
.mhis-doc-co h2{font-family:var(--display);font-size:24px;font-weight:500;margin-bottom:4px}
.mhis-doc-co small{display:block;color:#555;font-size:12.5px}
.mhis-doc-meta{text-align:right;display:flex;flex-direction:column;align-items:flex-end}
.mhis-doc-meta b{font-weight:500;font-size:15px}
.mhis-doc-meta small{color:#666}
.mhis-doc-meta code{font-size:12px;color:#555}
.mhis-doc-sec{padding:26px 0;border-bottom:1px solid #E8E8E8}
.mhis-doc-sec h1{font-family:var(--display);font-size:34px;font-weight:500;line-height:1.15}
.mhis-doc-place{color:#555;margin-top:4px}
.mhis-doc-people{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:20px}
.mhis-doc-people b{display:block;font-weight:500}
.mhis-doc-people small{display:block;color:#555;font-size:12.5px}
.mhis-doc-boxes{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:6px 0 14px}
.mhis-doc-boxes.is-4{grid-template-columns:repeat(4,1fr)}
.mhis-doc-boxes div{border:1px solid #E5E5E5;border-radius:10px;padding:12px 14px;display:flex;flex-direction:column;gap:8px}
.mhis-doc-boxes b{font-family:var(--display);font-size:26px;font-weight:500;line-height:1}
.mhis-doc-summary{color:#333}
.mhis-doc-dl{display:grid;grid-template-columns:1fr 1fr;gap:0 28px;margin:0}
.mhis-doc-dl div{display:flex;justify-content:space-between;padding:9px 0;border-bottom:1px solid #F0F0F0}
.mhis-doc-dl dt{color:#666}.mhis-doc-dl dd{margin:0;font-weight:500}
.mhis-doc-group{margin-top:18px}
.mhis-doc-group h3{font-family:var(--display);font-size:21px;font-weight:500;padding-bottom:8px;border-bottom:1px solid #DDD;margin-bottom:6px}
.mhis-doc-item{padding:12px 0}
.mhis-doc-item-top{display:flex;justify-content:space-between;gap:12px;align-items:baseline}
.mhis-doc-item-top b{font-weight:500}
.mhis-doc-cond{font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:#888;white-space:nowrap}
.mhis-doc-cond.is-defect{color:#B42318}.mhis-doc-cond.is-monitor{color:#B45309}.mhis-doc-cond.is-satisfactory{color:#1F7A4D}
.mhis-doc-item p{margin-top:5px;color:#333}
.mhis-doc-item p span{color:#888}
.mhis-doc-loc{color:#777!important;font-style:italic}
.mhis-doc-photos{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:10px}
.mhis-doc-photos button,.mhis-doc-photos video{display:block;aspect-ratio:4/3;width:100%;border-radius:6px;overflow:hidden;background:#F0F0F0}
.mhis-doc-photos img{width:100%;height:100%;object-fit:cover;display:block}
.mhis-doc-sigs{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.mhis-doc-scope p{font-size:12px;color:#555;line-height:1.6}
.mhis-doc-sign{display:grid;grid-template-columns:1fr 1fr;gap:28px;padding-top:40px}
.mhis-doc-sign div{border-top:1px solid #999;padding-top:6px}
.mhis-doc-sign span{display:block;font-size:12px;color:#777}
.mhis-doc-sign b{font-weight:500}
.mhis-ro-note{display:flex;gap:10px;align-items:flex-start;padding:12px 16px;border-radius:12px;background:#FFF8EC;border:1px solid #F6DDB8;color:#7A4A0C;font-size:14px;margin-bottom:16px}
.mhis-ro-note.is-warn{background:var(--del-bg);border-color:#FAD3CF;color:#7A1A12}

/* Follow-ups */
.mhis-todo{display:flex;gap:14px;align-items:flex-start;padding:16px 24px;border-top:1px solid var(--line2)}
.mhis-fsec-head + .mhis-todo{border-top:0}
.mhis-todo.is-done .mhis-todo-main{opacity:.5;text-decoration:line-through}
.mhis-todo-check{position:relative;flex:0 0 auto;margin-top:1px;cursor:pointer}
.mhis-todo-check input{position:absolute;opacity:0;width:24px;height:24px;margin:0;cursor:pointer}
.mhis-todo-check span{display:block;width:24px;height:24px;border-radius:7px;border:1.5px solid #C9C4BA;background:#fff}
.mhis-todo-check input:checked + span{background:var(--red);border-color:var(--red);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E");background-size:15px;background-position:center;background-repeat:no-repeat}
.mhis-todo-check input:focus-visible + span{outline:2px solid var(--red);outline-offset:2px}
.mhis-todo-main{flex:1;min-width:0;font-size:14.5px}
.mhis-todo-main b{font-weight:600}
.mhis-todo-main p{margin-top:4px;color:var(--ink2);font-size:14px}
.mhis-todo-side{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.mhis-sevtag{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:3px 8px;border-radius:6px;background:#FEF3F2;color:var(--del)}
.mhis-sevtag.is-moderate{background:#FFF4E5;color:#B45309}
.mhis-fsec-head h3 a:hover{text-decoration:underline}

/* Templates */
.mhis-tgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.mhis-tpl{padding:20px 22px;display:flex;flex-direction:column;gap:10px}
.mhis-tpl-top b{display:block;font-family:var(--display);font-size:19px;font-weight:500}
.mhis-tpl-top span{font-size:13px;color:var(--muted2)}
.mhis-tpl .mhis-head-actions{margin-top:auto}
.mhis-tpl-rows{display:grid;gap:8px;max-height:46vh;overflow:auto;padding-right:2px}
.mhis-tpl-row{display:grid;grid-template-columns:200px minmax(0,1fr) auto;gap:8px;align-items:center}
.mhis-tpl-row.is-ro{grid-template-columns:200px minmax(0,1fr);padding:9px 12px;border:1px solid var(--line2);border-radius:10px;background:#fff;font-size:14px}
.mhis-tpl-row.is-ro span{color:var(--muted2)}
.mhis-tpl-row.is-ro b{font-weight:500}

/* Compare */
.mhis-cmp{background:#fff;border:1px solid var(--line);border-radius:18px;overflow:hidden}
.mhis-cmp-head,.mhis-cmp-row{display:grid;grid-template-columns:220px minmax(0,1fr) minmax(0,1fr)}
.mhis-cmp-head{background:#FCFBF9;border-bottom:1px solid var(--line2)}
.mhis-cmp-head b{padding:14px 18px;font-family:var(--display);font-size:18px;font-weight:500;border-left:1px solid var(--line2)}
.mhis-cmp-head small{display:block;font-family:Inter,sans-serif;font-size:12.5px;color:var(--muted2);font-weight:400}
.mhis-cmp-row{border-top:1px solid var(--line2)}
.mhis-cmp-row.is-worse{background:#FFFAF9}
.mhis-cmp-name{padding:16px 18px;display:flex;flex-direction:column;gap:2px}
.mhis-cmp-name b{font-weight:600}
.mhis-cmp-name span{font-size:13px;color:var(--muted2)}
.mhis-cmp-name em{font-style:normal;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--del);margin-top:6px}
.mhis-cmp-cell{padding:16px 18px;border-left:1px solid var(--line2);display:flex;flex-direction:column;gap:8px;font-size:14px}
.mhis-cmp-cell.is-empty{color:var(--muted2);font-style:italic}
.mhis-cmp-ph{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}
.mhis-cmp-ph img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:8px;display:block}

/* Settings */
.mhis-set-card{padding:28px 30px;margin-bottom:22px;display:flex;flex-direction:column;gap:16px}
.mhis-set-head h2{font-family:var(--display);font-size:24px;font-weight:500}
.mhis-set-head p{color:var(--muted);font-size:14.5px;margin-top:4px}
.mhis-set-card.is-danger{border-color:#F4C7C2}
.mhis-set-card.is-danger h2{color:var(--del)}
.mhis-set-card.is-danger .mhis-btn{align-self:flex-start}
.mhis-set-card > .mhis-btn{align-self:flex-start}
.mhis-plan-now{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;padding:16px 18px;border:1px solid var(--line2);border-radius:14px;background:#FCFBF9}
.mhis-plan-now b{display:block;font-size:16px}
.mhis-plan-now span{font-size:13.5px;color:var(--muted2)}
.mhis-del-list{list-style:disc!important;padding-left:20px!important;display:grid;gap:4px;font-size:14px;color:var(--ink2)}

/* Responsive */
@media (max-width:1180px){
  .mhis-stats{gap:14px}.mhis-stat-big{font-size:66px}.mhis-stat h3{font-size:18px}
  .mhis-tgrid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:1024px){
  .mhis-dash-grid,.mhis-detail-grid{grid-template-columns:1fr}
  .mhis-stats{grid-template-columns:1fr}
  .mhis-stat{min-height:170px}
  .mhis-sched-row{grid-template-columns:repeat(2,1fr)}
  .mhis-sched:nth-child(3){border-left:0}
  .mhis-sched:nth-child(n+3){border-top:1px solid var(--line2)}
}
@media (max-width:760px){
  .mhis-title{font-size:32px!important}
  .mhis-cgrid{grid-template-columns:repeat(2,1fr)}
  .mhis-cgrid div:nth-child(3){border-left:0}
  .mhis-cgrid div:nth-child(n+3){border-top:1px solid var(--line2)}
  .mhis-rgrid,.mhis-tgrid{grid-template-columns:1fr}
  .mhis-fields-2,.mhis-fields-addr{grid-template-columns:1fr}
  .mhis-row{flex-direction:column;align-items:flex-start;gap:8px}
  .mhis-row-side{width:100%;justify-content:space-between}
  .mhis-doc{padding:26px 20px}
  .mhis-doc-head,.mhis-doc-people,.mhis-doc-dl,.mhis-doc-sign,.mhis-doc-sigs{grid-template-columns:1fr;flex-direction:column}
  .mhis-doc-meta{text-align:left;align-items:flex-start}
  .mhis-doc-boxes,.mhis-doc-boxes.is-4{grid-template-columns:repeat(2,1fr)}
  .mhis-doc-photos{grid-template-columns:repeat(2,1fr)}
  .mhis-share{grid-template-columns:1fr}
  .mhis-qr{max-width:200px}
  .mhis-tpl-row{grid-template-columns:1fr auto}
  .mhis-tpl-row .mhis-select{grid-column:1/-1}
  .mhis-tpl-row.is-ro{grid-template-columns:1fr}
  .mhis-cmp-head{display:none}
  .mhis-cmp-row{grid-template-columns:1fr 1fr}
  .mhis-cmp-name{grid-column:1/-1;border-bottom:1px solid var(--line2)}
  .mhis-cmp-cell:nth-child(2){border-left:0}
  .mhis-search{min-width:0;width:100%}
  .mhis-todo{flex-wrap:wrap}
  .mhis-todo-side{width:100%;justify-content:flex-start;padding-left:38px}
  .mhis-set-card{padding:22px 20px}
  .mhis-page .mhis-head-actions{width:100%}
}
@media print{
  .mhis-doc{border:0;box-shadow:none;padding:0}
  .mhis-doc-photos button{break-inside:avoid}
  .mhis-doc-item{break-inside:avoid}
}
