.mmps-app{max-width:1200px;margin:24px auto;background:#fff;color:#192733;padding:24px;border:1px solid #dde3eb;border-radius:10px;font:15px/1.5 Arial,sans-serif}.mmps-app *{box-sizing:border-box}.mmps-app h2{font-size:24px;margin:12px 0}.mmps-app h3{margin:24px 0 10px;font-size:18px}.mmps-nav{display:flex;flex-wrap:wrap;gap:12px;padding:10px 0 18px;border-bottom:1px solid #ddd}.mmps-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.mmps-field{display:flex;flex-direction:column;gap:3px}.mmps-field input,.mmps-field textarea,.mmps-field select,.mmps-login input,.mmps-search input{width:100%;padding:9px;border:1px solid #bac6d2;border-radius:5px;font:inherit}.mmps-cats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:12px;background:#f4f7fa}.mmps-cats label{white-space:nowrap}.mmps-app button,.mmps-button{display:inline-block;background:#176b9f;color:#fff!important;border:0;border-radius:5px;padding:10px 16px;cursor:pointer;text-decoration:none!important;font:inherit}.mmps-button.secondary{background:#e6eef4;color:#123!important}.mmps-form>button{margin-top:16px}.mmps-notice{background:#fff7e5;padding:12px;border-left:3px solid #e0a021}.mmps-success{background:#eaf7ed;padding:9px}.mmps-error{background:#ffebe8;color:#8a1616;padding:10px}.mmps-search{display:flex;gap:8px;margin-bottom:15px}.mmps-table-wrap{overflow-x:auto}.mmps-app table{width:100%;border-collapse:collapse}.mmps-app th,.mmps-app td{border:1px solid #ccd6dd;padding:7px;text-align:left}.mmps-login{max-width:440px}.mmps-paper{background:#eee;padding:14px}.mmps-print-tools{margin:0 0 12px}.mmps-sheet{width:210mm;min-height:297mm;background:#fff;margin:0 auto;padding:11mm 12mm;color:#000;font:10px/1.25 Arial,sans-serif}.mmps-sheet-head{font-weight:700;margin-bottom:5px}.mmps-sheet-head span,.mmps-sheet .sign{float:right}.mmps-print-block{border:1px solid #333;padding:5px 7px;margin-top:-1px;min-height:39px;overflow:hidden}.mmps-print-block h2{font-size:15px;text-align:center;margin:0}.mmps-print-block p{margin:5px 0}.mmps-print-block .center{text-align:center}.mmps-print-block .big{font-weight:bold;margin:8px 0}.mmps-section-title{font-weight:bold;border:1px solid #333;padding:4px;margin-top:-1px}.mmps-final{margin-top:20px;min-height:130px}@media(max-width:700px){.mmps-grid{grid-template-columns:1fr}.mmps-cats{grid-template-columns:repeat(2,1fr)}.mmps-app{padding:12px}.mmps-sheet{width:100%;min-height:0}}@media print{@page{size:A4;margin:0}body{margin:0!important;background:#fff!important}body *{visibility:hidden!important}.mmps-sheet,.mmps-sheet *{visibility:visible!important}.mmps-sheet{position:absolute;top:0;left:0;width:210mm;height:297mm;min-height:0;margin:0;padding:11mm 12mm;box-shadow:none}.mmps-print-tools{display:none!important}.mmps-paper{padding:0;background:#fff}.mmps-app{border:0;margin:0;padding:0;max-width:none}.mmps-final{break-inside:avoid}}

/* MPS dedicated workstation view: scoped strictly to the /mps/ page. */
body.mmps-dedicated-page #main .sidebar,
body.mmps-dedicated-page #main .wf-sidebar,
body.mmps-dedicated-page #main #sidebar,
body.mmps-dedicated-page #main .sidebar-content,
body.mmps-dedicated-page #main .sidebar-divider,
body.mmps-dedicated-page #main .sidebar-right,
body.mmps-dedicated-page .breadcrumbs,
body.mmps-dedicated-page .page-title-breadcrumbs,
body.mmps-dedicated-page .page-title .breadcrumbs {display:none!important;}
body.mmps-dedicated-page #main .content,
body.mmps-dedicated-page #main .wf-container .content,
body.mmps-dedicated-page #main .wf-container-main .content {width:100%!important;max-width:100%!important;float:none!important;margin:0!important;}
body.mmps-dedicated-page #main .wf-wrap,
body.mmps-dedicated-page #main .wf-container,
body.mmps-dedicated-page #main .wf-container-main {max-width:1500px!important;width:calc(100% - 32px)!important;margin-left:auto!important;margin-right:auto!important;}
body.mmps-dedicated-page .page-title,
body.mmps-dedicated-page .page-title.solid-bg {min-height:0!important;padding:8px 0!important;margin-bottom:0!important;}
body.mmps-dedicated-page .page-title .wf-wrap {min-height:0!important;padding:0!important;}
body.mmps-dedicated-page .page-title h1,
body.mmps-dedicated-page .page-title .page-title-head h1 {font-size:20px!important;line-height:1.25!important;margin:0!important;padding:0!important;}
body.mmps-dedicated-page #main {padding-top:10px!important;}
body.mmps-dedicated-page .mmps-app {max-width:1480px;margin:8px auto;padding:18px;}
@media(max-width:700px){body.mmps-dedicated-page #main .wf-wrap{width:calc(100% - 20px)!important;}body.mmps-dedicated-page .mmps-app{padding:10px}}
@media print{body.mmps-dedicated-page .page-title,body.mmps-dedicated-page .masthead{display:none!important}}

/* 0.2.3 – compact familiar Excel-like workstation layout; only MPS form */
body.mmps-dedicated-page .mmps-app{max-width:1560px!important;width:calc(100% - 24px);padding:12px 16px;margin:4px auto}
.mmps-form-compact .mmps-workspace{display:grid;grid-template-columns:minmax(0,1fr) 294px;gap:16px;align-items:start}
.mmps-form-compact .mmps-main-fields{min-width:0}
.mmps-form-compact h3{font-size:15px;margin:13px 0 6px;font-weight:700}
.mmps-form-compact .mmps-field{gap:2px;font-size:12px;min-width:0}
.mmps-form-compact .mmps-field input,.mmps-form-compact .mmps-field select,.mmps-form-compact .mmps-field textarea{font-size:13px!important;min-height:30px;padding:4px 7px!important;line-height:1.25;border-radius:3px;margin:0!important}
.mmps-form-compact .mmps-field textarea{height:32px;min-height:32px;resize:vertical}
.mmps-form-compact .mmps-grid{gap:5px 10px}
.mmps-form-compact .mmps-topline{display:grid;grid-template-columns:170px minmax(220px,1fr);gap:12px;max-width:600px}
.mmps-form-compact .mmps-opl{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:5px 10px}
.mmps-form-compact .mmps-opl>.mmps-field:first-child{grid-column:1/-1}
.mmps-form-compact .mmps-specialists{border:1px solid #d6dce2;padding:7px 9px;border-radius:4px}
.mmps-form-compact .mmps-specialist-line{display:grid;grid-template-columns:minmax(175px,40%) minmax(0,60%);gap:10px;align-items:end;padding:3px 0}
.mmps-form-compact .mmps-specialist-line+.mmps-specialist-line{border-top:1px solid #edf0f3}
.mmps-form-compact .mmps-eye{padding-bottom:7px;margin-bottom:3px;border-bottom:1px solid #d6dce2}
.mmps-form-compact .mmps-eye-detail{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:5px 0 0 27px}
.mmps-form-compact .mmps-final-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.mmps-form-compact .mmps-final-fields>.mmps-field{grid-column:1/-1}
.mmps-form-compact .mmps-final-fields fieldset{margin:0;padding:5px 8px;border:1px solid #d6dce2;min-width:0;font-size:13px}
.mmps-form-compact .mmps-final-fields fieldset label{margin-right:13px;white-space:nowrap}
.mmps-form-compact .mmps-final-fields fieldset input{width:auto;min-height:0;vertical-align:middle;margin:0 3px 0 0}
.mmps-form-compact .mmps-category-panel{border:1px solid #b8c8d5;background:#f6fafc;border-radius:5px;padding:8px 10px;position:sticky;top:15px}
.mmps-form-compact .mmps-category-panel h3{margin:0 0 8px;text-align:center;font-size:16px}
.mmps-form-compact .mmps-cats{display:block;padding:0;background:transparent}
.mmps-form-compact .mmps-cat-group{display:grid;grid-template-columns:1fr 1fr;gap:6px 5px;border:1px solid #cbd6df;border-radius:4px;padding:8px 6px;margin-bottom:8px;background:#fff}
.mmps-form-compact .mmps-cat-group-label{grid-column:1/-1;font-size:12px;color:#445462;font-weight:700}
.mmps-form-compact .mmps-cats label{font-size:12px;white-space:normal;line-height:1.2;display:flex;align-items:flex-start;gap:4px}
.mmps-form-compact .mmps-cats label input{width:15px;height:15px;margin:0;flex-shrink:0}
.mmps-form-compact .mmps-gp-link{margin:5px 0;font-size:12px}
.mmps-form-compact .mmps-notice{font-size:12px;margin:9px 0;padding:7px}
@media(max-width:900px){.mmps-form-compact .mmps-workspace{grid-template-columns:1fr}.mmps-form-compact .mmps-category-panel{position:static;grid-row:1}.mmps-form-compact .mmps-cats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.mmps-form-compact .mmps-cat-group{margin:0}}
@media(max-width:600px){.mmps-form-compact .mmps-topline,.mmps-form-compact .mmps-opl,.mmps-form-compact .mmps-specialist-line,.mmps-form-compact .mmps-final-fields{grid-template-columns:1fr}.mmps-form-compact .mmps-eye-detail{grid-template-columns:1fr 1fr;margin-left:12px}.mmps-form-compact .mmps-cats{grid-template-columns:1fr}}

/* 0.2.4: one-line labels and values, closer to Excel; desktop only. */
@media(min-width:901px){
 .mmps-form-inline .mmps-field{flex-direction:row;align-items:center;gap:5px;min-height:28px}
 .mmps-form-inline .mmps-field > span{flex:0 0 95px;min-width:0;line-height:1.1;font-size:12px}
 .mmps-form-inline .mmps-field > input,
 .mmps-form-inline .mmps-field > textarea,
 .mmps-form-inline .mmps-field > select{flex:1 1 auto;min-width:0;width:0!important;height:27px;min-height:27px;padding:3px 6px!important}
 .mmps-form-inline .mmps-person-fields .mmps-field>span{flex-basis:78px}
 .mmps-form-inline .mmps-opl .mmps-field>span{flex-basis:120px}
 .mmps-form-inline .mmps-topline .mmps-field>span{flex-basis:50px}
 .mmps-form-inline .mmps-topline label.mmps-field{flex-direction:row}
 .mmps-form-inline .mmps-specialist-line .mmps-field>span{flex-basis:83px}
 .mmps-form-inline .mmps-specialist-line .mmps-field:nth-child(2)>span{flex-basis:82px}
 .mmps-form-inline .mmps-eye-detail .mmps-field>span{flex-basis:58px;font-size:11px}
 .mmps-form-inline .mmps-eye-detail{margin-left:22px;gap:5px;grid-template-columns:repeat(2,minmax(0,1fr))}
 .mmps-form-inline .mmps-opl{grid-template-columns:1fr}
 .mmps-form-inline .mmps-opl>.mmps-field:first-child{grid-column:auto}
 .mmps-form-inline .mmps-main-fields h3{margin:9px 0 3px}
 .mmps-form-inline .mmps-specialists{padding:4px 7px}
 .mmps-form-inline .mmps-specialist-line{padding:2px 0}
 .mmps-form-inline .mmps-grid{gap:3px 8px}
 .mmps-form-inline .mmps-category-panel{top:8px}
 .mmps-form-inline .mmps-notice{margin:5px 0;padding:5px}
 .mmps-app .mmps-form-inline .mmps-button{padding:7px 12px}
}
.mmps-reg-filter{display:flex;flex-wrap:wrap;align-items:center}
.mmps-reg-filter input[name=q]{flex:1 1 200px;min-width:170px}
.mmps-reg-filter input[type=date],.mmps-reg-filter select{max-width:160px;padding:8px;border:1px solid #bac6d2;border-radius:4px}
.mmps-reg-tools{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:9px 0}
.mmps-reg-tools .mmps-button{padding:7px 11px}
.mmps-pagination{display:flex;gap:14px;margin:10px 0}
.mmps-actions{white-space:nowrap}
.mmps-actions a+a{margin-left:8px}
.mmps-reg-hint{font-size:12px;color:#52616f}

.mmps-form-inline .mmps-archive-reg{max-width:370px;margin:6px 0}
@media(min-width:901px){.mmps-form-inline .mmps-archive-reg{display:flex;align-items:center;gap:7px}.mmps-form-inline .mmps-archive-reg input{flex:1}}

/* 0.2.5: compact heading and right-hand quick fill */
body.mmps-dedicated-page .mmps-app{padding-top:8px!important}
.mmps-app .mmps-nav{padding:3px 0 7px!important;gap:10px;font-size:13px}
.mmps-form-compact .mmps-title-row{display:flex;align-items:center;gap:20px;flex-wrap:wrap;margin:5px 0 4px}
.mmps-form-compact .mmps-title-row h2{font-size:20px;line-height:1.25;margin:2px 0!important}
.mmps-form-compact .mmps-title-date{display:flex;align-items:center;gap:7px;font-size:13px;white-space:nowrap}
.mmps-form-compact .mmps-title-date input{height:28px;min-height:28px;width:148px;padding:2px 5px}
.mmps-form-compact .mmps-fast-select{display:block;margin:0 0 8px;font-size:12px;font-weight:600}
.mmps-form-compact .mmps-fast-select span{display:block;margin-bottom:3px}
.mmps-form-compact .mmps-fast-select select{width:100%;max-width:100%;height:30px;font-size:12px;padding:3px 5px;background:white;border:1px solid #b8c8d5}
.mmps-form-compact .mmps-category-panel h3{padding-top:4px;border-top:1px solid #ccd7e2}
.mmps-form-compact .mmps-title-row + .mmps-workspace{margin-top:2px}
@media(max-width:900px){.mmps-form-compact .mmps-title-row h2{font-size:18px}}

/* 0.2.6: Compact layout and reliable doctor selection after quick fill. */
.mmps-form-compact .mmps-main-fields>h3:first-child{margin-top:2px!important}
.mmps-form-compact .mmps-person-fields{margin-top:0!important}
.mmps-form-compact .mmps-right-conclusion{margin-top:5px;border-top:1px solid #ccd7e2;padding-top:3px}
.mmps-form-compact .mmps-right-conclusion h3{margin:4px 0 5px;text-align:center;font-size:15px}
.mmps-form-compact .mmps-right-conclusion .mmps-final-fields{display:flex;flex-direction:column;gap:5px}
.mmps-form-compact .mmps-right-conclusion .mmps-final-fields fieldset{padding:4px 6px;font-size:12px}
.mmps-form-compact .mmps-right-conclusion .mmps-final-fields fieldset legend{font-size:12px;font-weight:600;padding:0 3px}
.mmps-form-compact .mmps-right-conclusion .mmps-final-fields fieldset label{margin-right:8px;font-size:12px}
.mmps-form-compact .mmps-right-conclusion .mmps-final-fields>.mmps-field{display:flex;flex-direction:column;align-items:stretch;gap:3px}
.mmps-form-compact .mmps-right-conclusion .mmps-final-fields>.mmps-field>span{flex:none;width:auto}
.mmps-form-compact .mmps-right-conclusion .mmps-final-fields textarea{width:100%!important;height:44px!important;min-height:44px!important;flex:none}
.mmps-form-compact .mmps-doctor-field .mmps-doctor-controls{display:flex;flex:1;min-width:0;gap:2px;align-items:center}
.mmps-form-compact .mmps-doctor-field .mmps-doctor-controls>input{width:0!important;flex:1 1 auto;min-width:0;height:27px!important;min-height:27px!important}
.mmps-form-compact .mmps-doctor-field .mmps-doctor-picker{width:31px!important;max-width:31px!important;min-width:31px!important;flex:0 0 31px;height:27px!important;min-height:27px!important;padding:1px 0!important;font-size:12px!important;cursor:pointer}
@media(min-width:901px){
 .mmps-form-inline .mmps-doctor-field{display:flex;flex-direction:row;align-items:center;gap:5px}
 .mmps-form-inline .mmps-doctor-field>label{flex:0 0 83px;min-width:0;font-size:12px;line-height:1.1}
 .mmps-form-inline .mmps-opl .mmps-doctor-field>label{flex-basis:120px}
 .mmps-form-inline .mmps-category-panel{position:static}
}
@media(max-width:900px){.mmps-form-compact .mmps-doctor-field>label{display:block;font-size:12px}.mmps-form-compact .mmps-right-conclusion{margin-top:10px}}


/* 0.2.7: wider desktop workstation and readable doctor selection. */
@media (min-width: 1100px) {
 body.mmps-dedicated-page .mmps-app {
   width: min(1230px, calc(100vw - 48px)) !important;
   max-width: none !important;
   margin-left: 50% !important;
   margin-right: 0 !important;
   transform: translateX(-50%);
 }
 .mmps-form-compact .mmps-workspace {
   grid-template-columns: minmax(0, 1fr) 264px;
   gap: 12px;
 }
 .mmps-form-compact .mmps-specialist-line {
   grid-template-columns: minmax(0, 50%) minmax(0, 50%);
   gap: 9px;
 }
 .mmps-form-inline .mmps-specialist-line .mmps-doctor-field>label {flex-basis:90px;}
 .mmps-form-inline .mmps-specialist-line .mmps-doctor-controls {min-width:0;}
 .mmps-form-inline .mmps-specialist-line .mmps-doctor-controls>input {font-size:12px!important;}
}
.mmps-app select.mmps-doctor-picker {color:#111!important;background-color:#fff!important;opacity:1!important;}
.mmps-app select.mmps-doctor-picker option {color:#111!important;background:#fff!important;font-weight:500!important;opacity:1!important;}
.mmps-form-compact .mmps-doctor-field .mmps-doctor-picker {width:34px!important;max-width:34px!important;min-width:34px!important;flex:0 0 34px;}

/* 0.2.8: Third desktop control column for A4 print actions. */
@media(min-width:1250px){
 body.mmps-dedicated-page .mmps-app{width:min(1500px,calc(100vw - 38px))!important;}
 .mmps-form-compact .mmps-workspace{grid-template-columns:minmax(0,1fr) 255px 175px!important;gap:12px;}
}
.mmps-form-compact .mmps-print-panel{border:1px solid #b8c8d5;background:#f7f9fb;border-radius:5px;padding:9px;display:flex;flex-direction:column;gap:9px;align-self:start;}
.mmps-form-compact .mmps-print-panel h3{font-size:15px;text-align:center;margin:0 0 5px!important;}
.mmps-form-compact .mmps-print-panel button{background:#e6eef4;color:#172b3c!important;border:1px solid #9fb6c5;border-radius:4px;padding:10px 5px;line-height:1.2;white-space:normal;min-height:42px;font-size:13px;font-weight:bold;cursor:pointer;}
.mmps-form-compact .mmps-print-panel button.mmps-print-primary{background:#176b9f;color:white!important;}
.mmps-form-compact .mmps-print-panel p{font-size:11px;line-height:1.4;color:#42566a;margin:0;}
@media(max-width:1249px){.mmps-form-compact .mmps-print-panel{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));}.mmps-form-compact .mmps-print-panel h3,.mmps-form-compact .mmps-print-panel p{grid-column:1/-1;}}
@media(max-width:650px){.mmps-form-compact .mmps-print-panel{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media print{.mmps-print-panel{display:none!important;}}

/* 0.2.9: positioning ONLY — do not modify form fields or printed certificate.
   The7 places page content in a horizontally offset parent; the companion
   script positions the existing workstation at the actual viewport center. */
@media screen and (min-width:901px){
 body.mmps-dedicated-page .mmps-app.mmps-form-shell-centered{
   position:relative!important;left:auto!important;right:auto!important;
   transform:none!important;
   margin-right:0!important;
   margin-left:0!important; /* JS assigns measured viewport-centering margin. */
 }
}
@media print{
 body.mmps-dedicated-page .mmps-app{transform:none!important;left:auto!important;margin:0!important;}
}

/* 0.3.1: reliable eye value pickers; native suggestions must not lock the value. */
.mmps-app .mmps-eye-input-wrap{display:flex;align-items:stretch;flex:1 1 auto;min-width:0;gap:3px}
.mmps-app .mmps-eye-input-wrap>input{flex:1 1 auto;min-width:0;width:0!important}
.mmps-app .mmps-eye-input-wrap>.mmps-eye-picker{flex:0 0 32px!important;width:32px!important;min-width:32px!important;padding:0 2px!important;color:#111!important;background:#fff!important;border:1px solid #9cadbd;border-radius:3px;font-size:12px!important;cursor:pointer}
.mmps-app .mmps-eye-input-wrap>.mmps-eye-picker option{color:#111;background:#fff}

/* v0.3.2 – narrower left working column (~30%), one compact eye row.
   Scope limited to the MPS FORM on desktop; never touches PDF/print. */
@media screen and (min-width:1250px) {
 body.mmps-dedicated-page .mmps-app:has(.mmps-form-compact) {
   width:min(1130px,calc(100vw - 38px))!important;
 }
 .mmps-form-compact .mmps-workspace {
   grid-template-columns:minmax(0,1fr) 255px 175px!important;
   gap:12px!important;
 }
}
@media screen and (min-width:901px) {
 .mmps-form-inline .mmps-eye-detail {
   display:grid!important;
   grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.05fr) minmax(0,1.40fr)!important;
   gap:6px!important;
   margin:4px 0 0 10px!important;
   align-items:center;
 }
 .mmps-form-inline .mmps-eye-detail .mmps-field {
   min-width:0!important;
   display:flex!important;
   flex-direction:row!important;
   align-items:center!important;
   gap:3px!important;
 }
 .mmps-form-inline .mmps-eye-detail .mmps-field>span:first-child {
   flex:0 0 auto!important;
   width:auto!important;
   font-size:11px!important;
   white-space:nowrap!important;
 }
 .mmps-form-inline .mmps-eye-detail .mmps-field>span.mmps-eye-input-wrap {
   flex:1 1 0!important;
   width:auto!important;
   min-width:0!important;
   gap:2px!important;
 }
 .mmps-form-inline .mmps-eye-detail .mmps-eye-input-wrap>input {
   flex:1 1 0!important;
   width:0!important;
   min-width:0!important;
   height:27px!important;
   padding:2px 4px!important;
   font-size:12px!important;
 }
 .mmps-form-inline .mmps-eye-detail .mmps-eye-input-wrap>select.mmps-eye-picker {
   flex:0 0 24px!important;
   width:24px!important;
   min-width:24px!important;
   height:27px!important;
   padding:0!important;
 }
}

/* v0.3.3: approximately 10% more room for left-side inputs, right panels remain fixed. */
@media screen and (min-width:1250px){
 body.mmps-dedicated-page .mmps-app:has(.mmps-form-compact){width:min(1210px,calc(100vw - 38px))!important;}
}
/* Four eye measures stay on one row: DO/LO half-size, freed space goes to correction/colour. */
@media screen and (min-width:901px){
 .mmps-form-inline .mmps-eye-detail{
  grid-template-columns:minmax(0,.50fr) minmax(0,.50fr) minmax(0,1.55fr) minmax(0,1.75fr)!important;
 }
}

/* v0.3.4: expand centered desktop form by 10%, preserve fixed right-hand columns. */
@media screen and (min-width:1250px){
 body.mmps-dedicated-page .mmps-app:has(.mmps-form-compact){width:min(1331px,calc(100vw - 38px))!important;}
}
/* Ocular doctor has no conclusion field; provide the name its whole row. */
@media screen and (min-width:901px){
 .mmps-form-inline .mmps-eye>.mmps-specialist-line{grid-template-columns:minmax(0,1fr)!important;}
}
/* Keep the editable value intact; add only visual breathing room. */
.mmps-app .mmps-doctor-controls>input{padding-left:8px!important;}
.mmps-app select.mmps-doctor-picker option{padding-left:8px;}

/* v0.3.5: EGN lookup controls share the first personal-data grid cell. */
@media screen and (min-width:901px) {
  .mmps-form-inline .mmps-person-fields .mmps-id-tools {
    display:flex!important;align-items:center!important;gap:5px!important;min-width:0!important;
    white-space:nowrap!important;
  }
  .mmps-form-inline .mmps-person-fields .mmps-id-tools>.mmps-field {
    display:flex!important;min-width:0!important;flex:0 0 44%!important;gap:3px!important;
  }
  .mmps-form-inline .mmps-person-fields .mmps-id-tools>.mmps-field>span:first-child {
    flex:0 0 65px!important;font-size:11px!important;
  }
  .mmps-form-inline .mmps-person-fields .mmps-id-tools>.mmps-field>input {
    flex:1 1 auto!important;width:0!important;min-width:0!important;
  }
  .mmps-form-inline .mmps-person-fields .mmps-id-tools>.mmps-patient-lookup {
    flex:0 0 auto!important;padding:4px 5px!important;font-size:11px!important;
    min-height:26px!important;border:1px solid #aabac8!important;border-radius:3px!important;
    color:#334155!important;background:#edf1f5!important;
  }
  .mmps-form-inline .mmps-person-fields .mmps-id-tools>.mmps-patient-gp {
    flex:0 1 auto!important;font-size:11px!important;line-height:1.1!important;
  }
}
@media screen and (max-width:900px){
 .mmps-id-tools{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
 .mmps-id-tools .mmps-field{flex:1 1 120px;min-width:0}
 .mmps-id-tools .mmps-patient-lookup{padding:5px 6px}
 .mmps-id-tools .mmps-patient-gp{font-size:12px}
}
/* Align right-hand panels to the bottom of the yellow notice on desktop.
   Reduce internal vertical excess rather than forcing the left section taller. */
@media screen and (min-width:1250px){
 .mmps-form-compact .mmps-workspace{align-items:stretch!important;}
 .mmps-form-compact .mmps-category-panel{
   display:flex!important;flex-direction:column!important;align-self:stretch!important;
   position:relative!important;top:0!important;
 }
 .mmps-form-compact .mmps-print-panel{align-self:stretch!important;}
 .mmps-form-compact .mmps-category-panel .mmps-cat-group{
   gap:3px 5px!important;padding:5px 6px!important;margin-bottom:5px!important;
 }
 .mmps-form-compact .mmps-category-panel .mmps-cats label{line-height:1.1!important;}
 .mmps-form-compact .mmps-right-conclusion{margin-top:auto!important;}
 .mmps-form-compact .mmps-right-conclusion h3{margin:4px 0!important;}
 .mmps-form-compact .mmps-final-fields fieldset{padding:3px 5px!important;}
 .mmps-form-compact .mmps-final-fields{gap:3px!important;}
 .mmps-form-compact .mmps-print-panel{gap:7px!important;}
}

/* v0.4.0: UНГ has no conclusion field; doctor selection fills its row. */
@media screen and (min-width:901px){
 .mmps-form-inline .mmps-ent-line{grid-template-columns:minmax(0,1fr)!important;}
}

/* v0.4.1: four independently saved, editable ENT hearing measurements. */
.mmps-ent-hearing{display:grid;grid-template-columns:auto repeat(4,minmax(0,1fr));align-items:center;gap:6px;padding:5px 0 7px 14px;border-bottom:1px solid #edf0f3}
.mmps-ent-hearing .mmps-ent-heading{font-size:12px;font-weight:600;white-space:nowrap}
.mmps-form-inline .mmps-ent-hearing>.mmps-field{display:flex;flex-direction:column;align-items:stretch;gap:2px;min-width:0}
.mmps-form-inline .mmps-ent-hearing>.mmps-field>span{width:auto!important;flex:initial!important;white-space:nowrap;font-size:11px}
.mmps-form-inline .mmps-ent-hearing>.mmps-field>input{min-width:0;width:100%;height:26px;min-height:26px!important;padding:2px 5px!important}
@media(max-width:950px){.mmps-ent-hearing{grid-template-columns:repeat(2,minmax(0,1fr))}.mmps-ent-hearing .mmps-ent-heading{grid-column:1/-1}}

/* v0.4.2: ENT measurements match the visible DO/LO eye-control width.
   Override the inherited desktop width:0 !important used for inline fields. */
.mmps-form-inline .mmps-ent-hearing>.mmps-field>input {
  width:76px!important;max-width:100%!important;min-width:0!important;
  flex:0 0 27px!important;display:block!important;
  height:27px!important;min-height:27px!important;
}

/* v0.5.0: results appear only after the staff member explicitly searches.
   No permanent additional height in the existing compact form. */
.mmps-app .mmps-patient-result[hidden]{display:none!important}
.mmps-app .mmps-patient-result:not([hidden]){
  margin:5px 0 7px;padding:7px 10px;border:1px solid #cbd5e1;
  border-radius:3px;background:#f8fafc;font-size:12px;line-height:1.45;
}
.mmps-app .mmps-patient-result p{margin:2px 0 4px!important;font-size:12px!important;line-height:1.4!important}
.mmps-app .mmps-lookup-active{font-weight:700;color:#166534}
.mmps-app .mmps-lookup-warning{font-weight:600;color:#9a3412}
.mmps-app .mmps-lookup-meta{color:#475569}
.mmps-app .mmps-lookup-apply{
  margin:4px 0!important;padding:4px 8px!important;font-size:12px!important;
  background:#fff!important;color:#0f4c81!important;border:1px solid #94a3b8!important;border-radius:3px!important;
}
.mmps-app .mmps-patient-lookup:disabled{opacity:.7;cursor:progress}


/* v0.5.2: unobtrusive patient-state link next to '1. Лични данни'.
   Detailed lookup remains available via hover, click, touch and keyboard. */
.mmps-form-compact .mmps-person-heading{
  display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;
  position:relative;z-index:7;margin:2px 0 3px;
}
.mmps-form-compact .mmps-person-heading h3{
  margin:0!important;flex:0 0 auto;
}
.mmps-form-compact .mmps-patient-status{position:relative;min-width:0;flex:1 1 280px;}
.mmps-app .mmps-patient-status-trigger{
  display:inline!important;appearance:none;background:transparent!important;
  border:0!important;box-shadow:none!important;border-radius:0!important;
  font-size:12px!important;line-height:1.3!important;font-weight:600!important;
  text-align:left;padding:0!important;margin:0!important;
  text-decoration:underline;text-decoration-thickness:1px;
  text-underline-offset:2px;white-space:normal;cursor:pointer;
}
.mmps-app .mmps-patient-status-trigger[hidden]{display:none!important;}
.mmps-app .mmps-patient-status-trigger.mmps-status-active{color:#166534!important;}
.mmps-app .mmps-patient-status-trigger.mmps-status-warning{color:#9a3412!important;}
.mmps-app .mmps-patient-status-trigger.mmps-status-info{color:#334155!important;}
.mmps-app .mmps-patient-status-trigger:focus-visible{
  outline:2px solid #18598a!important;outline-offset:3px;
}
.mmps-app .mmps-person-heading .mmps-patient-result{
  position:absolute;z-index:30;top:calc(100% + 7px);right:0;
  width:min(650px, calc(100vw - 36px));max-width:none;
  max-height:min(65vh,450px);overflow-y:auto;
  background:#f8fafc;box-shadow:0 8px 24px rgba(15,35,65,.18);
  margin:0!important;padding:9px 11px!important;
}
.mmps-app .mmps-lookup-extra-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:5px 0;}
.mmps-app .mmps-lookup-extra-actions>a{font-size:12px;text-decoration:underline;}
/* Align the EGN input over the ID-card input without shifting the other fields. */
@media screen and (min-width:901px){
 .mmps-form-inline .mmps-person-fields .mmps-id-tools{padding-left:5px!important;}
 .mmps-form-inline .mmps-person-fields .mmps-id-tools>.mmps-field>span:first-child{
  flex:0 0 73px!important;
 }
}
@media(max-width:900px){
 .mmps-app .mmps-person-heading .mmps-patient-result{
  left:0;right:auto;width:min(620px,calc(100vw - 36px));
 }
}

/* v0.5.3: Shift ONLY EGN label and input 2 px right to match ID-card line. */
@media screen and (min-width:901px){
 .mmps-form-inline .mmps-person-fields .mmps-id-tools{padding-left:7px!important;}
}
/* Registry navigation and administrator-only soft-delete/restore actions. */
.mmps-app .mmps-pagination{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:8px 0 12px;}
.mmps-app .mmps-pagination a,.mmps-app .mmps-pagination-disabled{
 padding:5px 9px;border:1px solid #b7cadb;border-radius:4px;font-size:12px;text-decoration:none;
 background:#f8fbfd;color:#18486b;white-space:nowrap;
}
.mmps-app .mmps-pagination-disabled{color:#8b98a5;background:#f0f2f4;border-color:#dbe0e5;}
.mmps-app .mmps-pagination-current{font-size:12px;color:#52616f;margin-left:6px;}
.mmps-app .mmps-record-operation{display:inline-block;margin-left:8px;vertical-align:middle;}
.mmps-app .mmps-record-operation button{font-size:12px!important;padding:4px 7px!important;white-space:nowrap;}
.mmps-app .mmps-record-operation .mmps-delete-action{background:#fff4f2!important;color:#9a2d22!important;border:1px solid #d99e97!important;}
.mmps-app .mmps-record-operation .mmps-restore-action{background:#e9f7ef!important;color:#166534!important;border:1px solid #90caa4!important;}
.mmps-app .mmps-record-operation .mmps-release-action{background:#fff4e5!important;color:#854d0e!important;border:1px solid #d6a55b!important;}
.mmps-app .mmps-reg-hint{margin-top:8px;}

/* 0.5.4: minimal registry quick actions; responsive without impacting certificate forms. */
.mmps-reg-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}
.mmps-reg-tools .mmps-reg-actions .mmps-button{padding:6px 9px;font-size:12px;white-space:nowrap}
@media(max-width:800px){.mmps-reg-actions{justify-content:flex-start}}


/* v0.5.5 — name-fragment search (only personal-data form, no reflow of other fields). */
.mmps-app .mmps-name-tools{display:flex;align-items:center;gap:4px;min-width:0;position:relative;}
.mmps-app .mmps-name-tools>.mmps-field{flex:1 1 auto;min-width:0;}
.mmps-app .mmps-name-tools>.mmps-field>input{min-width:0;}
.mmps-app .mmps-name-tools>.mmps-name-search{
 flex:0 0 auto;padding:4px 6px!important;min-height:26px!important;
 border:1px solid #aabac8!important;border-radius:3px!important;
 background:#edf1f5!important;color:#334155!important;font-size:11px!important;
}
.mmps-app .mmps-name-results[hidden]{display:none!important;}
.mmps-app .mmps-name-results{
 position:absolute;left:0;right:0;top:calc(100% + 3px);z-index:900;
 max-height:285px;overflow-y:auto;background:#fff;border:1px solid #a5b9c9;
 border-radius:4px;box-shadow:0 6px 18px rgba(15,23,42,.20);padding:5px;
 white-space:normal;
}
.mmps-app .mmps-name-results .mmps-name-hint{font-size:11px;color:#475569;margin:4px 5px;line-height:1.4;}
.mmps-app .mmps-name-results .mmps-name-error{font-size:12px;color:#9a3412;padding:5px;}
.mmps-app .mmps-name-results .mmps-name-option{
 display:block;width:100%;background:#fff!important;color:#172b3b!important;
 text-align:left;border:0!important;border-bottom:1px solid #e2e8f0!important;
 border-radius:2px!important;padding:5px 7px!important;font-size:12px!important;
 line-height:1.3!important;white-space:normal;
}
.mmps-app .mmps-name-results .mmps-name-option:hover,
.mmps-app .mmps-name-results .mmps-name-option:focus-visible{
 background:#edf5fc!important;outline:2px solid #2a729e!important;outline-offset:-2px;
}
.mmps-app .mmps-name-results .mmps-name-option small{display:block;color:#576778;font-size:11px;margin-top:1px;}
@media screen and (max-width:900px){.mmps-app .mmps-name-tools{width:100%;}}

/* 0.5.7: Excel-style one-window doctor and category-group quick entry. */
.mmps-form-compact .mmps-fast-select{display:block;margin:0 0 8px;}
.mmps-app .mmps-quick-open{width:100%;padding:7px 9px;background:#e6eef4!important;color:#163d55!important;border:1px solid #abc0d1;text-align:center;font-size:13px;font-weight:700;}
.mmps-fast-select .mmps-quick-current{margin-top:4px;font-size:11px;line-height:1.35;color:#365268;overflow-wrap:anywhere;}
.mmps-app dialog.mmps-quick-dialog{position:fixed;inset:0;width:min(445px,calc(100vw - 30px));max-width:445px;max-height:calc(100vh - 30px);margin:auto;padding:17px;background:white;color:#172b3b;border:1px solid #9eb4c8;border-radius:8px;box-shadow:0 14px 60px #14283f55;z-index:100000;overflow-y:auto;}
.mmps-app dialog.mmps-quick-dialog:not([open]){display:none;}
.mmps-app dialog.mmps-quick-dialog::backdrop{background:rgba(17,32,47,.53);}
.mmps-quick-dialog-head{display:flex;align-items:flex-start;gap:12px;justify-content:space-between;margin:0 0 12px;}
.mmps-form-compact .mmps-quick-dialog-head h3{margin:0!important;font-size:16px;font-weight:700;text-align:left;line-height:1.4;}
.mmps-app .mmps-quick-close{border:1px solid #d4dfe7;background:#f4f6f8!important;color:#223b50!important;font-size:23px;line-height:1;padding:3px 9px;border-radius:4px;}
.mmps-quick-doctor-label{display:block;font-size:13px;font-weight:700;margin-bottom:4px;}
.mmps-app select.mmps-quick-doctors{width:100%;height:179px;min-height:135px;overflow:auto;color:#142c3d;background:#fff;border:1px solid #9dafc1;border-radius:4px;font:14px/1.5 Arial,sans-serif;padding:3px;}
.mmps-app select.mmps-quick-doctors option{color:#172b3b;background:#fff;padding:4px 7px;}
.mmps-quick-groups{display:grid;grid-template-columns:1fr;gap:8px;margin:14px 0 10px;}
.mmps-app .mmps-quick-group{background:#eef4f8!important;color:#122e43!important;border:1px solid #a9becd;border-radius:5px;padding:9px;text-align:center;display:flex;flex-direction:column;gap:2px;align-items:center;}
.mmps-app .mmps-quick-group:hover,.mmps-app .mmps-quick-group:focus-visible{background:#d9e9f3!important;border-color:#377ca3;}
.mmps-quick-group span{font-size:14px;font-weight:700;}
.mmps-quick-group small{font-size:12px;font-weight:400;}
.mmps-app .mmps-quick-group:disabled{opacity:.4;cursor:not-allowed;}
.mmps-quick-dialog-footer{display:flex;gap:8px;flex-wrap:wrap;justify-content:space-between;}
.mmps-app .mmps-quick-detailed,.mmps-app .mmps-quick-cancel{font-size:12px;padding:7px;background:#eff2f5!important;border:1px solid #bac7d2;color:#172b3b!important;}
.mmps-quick-hint,.mmps-quick-warning{font-size:11px;line-height:1.5;color:#41586b;margin:10px 0 0;}
.mmps-quick-warning{color:#a34b1b;}


/* v0.5.9: identifier-fragment chooser. No change to button geometry or behavior. */
.mmps-app .mmps-id-tools{position:relative;}
.mmps-app .mmps-id-tools>.mmps-id-results{
 position:absolute;top:calc(100% + 3px);left:0;right:0;z-index:901;
 min-width:min(350px,calc(100vw - 36px));white-space:normal!important;
}


/* 0.5.11: minimal clickable column headings for complete-registry server sorting. */
.mmps-app .mmps-sort-link{color:#175b83!important;text-decoration:none!important;font-weight:700;white-space:nowrap}
.mmps-app .mmps-sort-link:hover,.mmps-app .mmps-sort-link:focus{text-decoration:underline!important}
.mmps-app .mmps-sort-arrow{font-size:11px;margin-left:5px;color:#587184}
/* 0.5.14: shortened paper-certificate registration. Does not affect the ordinary form or PDF. */
.mmps-paper-form{max-width:980px}.mmps-paper-note{padding:11px 14px;background:#f1f5f8;border-left:3px solid #477b9e;border-radius:3px;color:#354b59}
.mmps-paper-form .mmps-person-fields{max-width:850px}.mmps-paper-cats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;background:transparent;padding:0}
.mmps-paper-cat-section{border:1px solid #ccd6dd;border-radius:6px;padding:10px;min-width:0}.mmps-paper-cat-section legend{font-weight:700;padding:0 4px}
.mmps-paper-cat-items{display:grid;gap:7px}.mmps-paper-cat-items label{display:flex;gap:7px;align-items:center}
.mmps-paper-doctor{margin-top:6px}.mmps-paper-fitness{border:1px solid #ccd6dd;border-radius:6px;display:flex;align-items:center;gap:18px;flex-wrap:wrap;padding:8px 12px}
.mmps-paper-fitness legend{font-weight:700}.mmps-paper-motives{max-width:780px;margin-top:14px}.mmps-paper-submit{margin-top:24px;border-top:1px solid #e2e8ee;padding-top:18px}
.mmps-paper-submit p{font-size:13px;color:#506575}.mmps-paper-success{max-width:760px}.mmps-paper-number{background:#f1f5f8;text-align:center;border-radius:9px;padding:25px 12px;margin:20px 0}
.mmps-paper-number>div{font-size:12px;font-weight:bold;letter-spacing:.04em;color:#536b7d}.mmps-paper-number strong{display:block;margin:11px 0;font-size:32px;color:#153e58}
.mmps-paper-number small{display:block;color:#566e7c}.mmps-paper-success-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
@media(max-width:750px){.mmps-paper-cats{grid-template-columns:1fr}.mmps-paper-number strong{font-size:24px}}

/* v0.5.15 — paper form alignment and centering only; never change the ordinary form or print CSS. */
@media screen {
 .mmps-app .mmps-paper-form{margin-left:auto;margin-right:auto;}
 .mmps-app .mmps-paper-success{margin-left:auto;margin-right:auto;}
 .mmps-app .mmps-paper-form .mmps-person-fields{align-items:start;}
 .mmps-app .mmps-paper-form .mmps-person-fields>.mmps-id-tools,
 .mmps-app .mmps-paper-form .mmps-person-fields>.mmps-name-tools{align-self:start;}
}

/* v0.5.16 — only the short PAPER registration and its result: let the WHITE
   workstation panel hug its content instead of extending across the viewport.
   Ordinary certificate, register, database logic and A4 print are untouched. */
@media screen {
 body.mmps-dedicated-page .mmps-app.mmps-app-paper {
   box-sizing:border-box!important;
   max-width:920px!important;
   width:calc(100% - 24px)!important;
 }
}

/* v0.5.17: readable, wrapping category labels in the register. */
.mmps-app .mmps-reg-categories{min-width:135px;max-width:245px;line-height:1.4;overflow-wrap:anywhere}

/* 0.5.18: an isolated modal for an occasional specialist, not a new permanent doctor. */
.mmps-app dialog.mmps-oneoff-dialog{position:fixed;inset:0;width:min(410px,calc(100vw - 28px));max-height:calc(100vh - 28px);margin:auto;padding:18px;background:#fff;color:#172b3b;border:1px solid #9eb4c8;border-radius:8px;box-shadow:0 14px 55px #14283f55;z-index:100001;overflow-y:auto;}
.mmps-app dialog.mmps-oneoff-dialog:not([open]){display:none!important;}
.mmps-app dialog.mmps-oneoff-dialog::backdrop{background:rgba(17,32,47,.53);}
.mmps-oneoff-head{display:flex;gap:10px;justify-content:space-between;align-items:flex-start;margin:0 0 10px;}
.mmps-form-compact .mmps-oneoff-head h3{font-size:17px;margin:0!important;line-height:1.3;}
.mmps-oneoff-dialog p{font-size:12px;line-height:1.45;margin:0 0 12px;}
.mmps-oneoff-dialog label{display:block;font-size:13px;font-weight:700;margin:10px 0 3px;}
.mmps-app .mmps-oneoff-dialog input{display:block;width:100%;height:35px;padding:6px 9px;border:1px solid #aabccb;border-radius:4px;font-size:14px;}
.mmps-oneoff-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px;flex-wrap:wrap;}
.mmps-app .mmps-oneoff-cancel,.mmps-app .mmps-oneoff-close{background:#edf2f6!important;border:1px solid #bdcbd6;color:#19394c!important;}
.mmps-app .mmps-oneoff-close{font-size:22px;line-height:1;padding:2px 8px;}
.mmps-app .mmps-oneoff-apply{background:#176b9f!important;color:#fff!important;}
.mmps-oneoff-dialog .mmps-oneoff-error{margin-top:10px;color:#a51b1b;font-weight:700;}

/* 0.5.20: small, per-workstation print preference beside the print actions. */
.mmps-form-compact .mmps-print-panel .mmps-print-heading{display:flex;align-items:center;justify-content:center;gap:8px;grid-column:1/-1;position:relative;min-width:0;}
.mmps-form-compact .mmps-print-panel .mmps-print-heading h3{margin:0!important;flex:1 1 auto;text-align:center;font-size:13px!important;line-height:1.12!important;white-space:normal;letter-spacing:0;max-width:110px;}
.mmps-form-compact .mmps-print-settings{position:relative;flex:0 0 auto;}
.mmps-form-compact .mmps-print-panel button.mmps-print-gear{display:inline-flex;gap:3px;align-items:center;justify-content:center;white-space:nowrap;background:#edf3f7!important;border:1px solid #a8bdcb;color:#21394a!important;padding:3px 5px!important;min-height:26px!important;font-size:12px!important;line-height:1.1!important;font-weight:normal;}
.mmps-print-gear:focus-visible{outline:2px solid #176b9f;outline-offset:2px;}
.mmps-form-compact .mmps-print-options{position:absolute;right:0;top:calc(100% + 5px);z-index:1001;width:244px;max-width:80vw;background:#fff;border:1px solid #97aebe;border-radius:6px;box-shadow:0 5px 18px rgba(0,0,0,.17);padding:11px;color:#182c3c;font-size:12px;line-height:1.4;}
.mmps-form-compact .mmps-print-options[hidden],.mmps-form-compact .mmps-direct-print-status[hidden]{display:none!important;}
.mmps-form-compact .mmps-print-options strong{display:block;font-size:13px;margin-bottom:9px;}
.mmps-form-compact .mmps-print-options label{display:flex;align-items:center;gap:5px;margin:7px 0;font-size:12px;font-weight:normal;cursor:pointer;}
.mmps-form-compact .mmps-print-options label input{margin:0;flex:0 0 auto;width:auto;min-height:0;}
.mmps-form-compact .mmps-print-options small{display:block;color:#53697a;font-size:11px;margin-top:9px;}
.mmps-form-compact .mmps-direct-print-status{font-size:11px;background:#eef6fa;border:1px solid #b6d3e1;border-radius:4px;padding:6px;grid-column:1/-1;overflow-wrap:anywhere;}
.mmps-form-compact .mmps-direct-print-status a{font-weight:700;color:#0964a1;}
.mmps-print-hidden-frame{position:fixed!important;top:0!important;left:0!important;width:1px!important;height:1px!important;border:0!important;opacity:0!important;pointer-events:none!important;}

/* Navigation: readable, darker links and two right-aligned references. */
.mmps-app .mmps-nav{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;column-gap:22px;row-gap:7px;}
.mmps-app .mmps-nav-primary,.mmps-app .mmps-nav-references{display:flex;flex-wrap:wrap;align-items:center;gap:10px;min-width:0;}
.mmps-app .mmps-nav-references{margin-left:auto;}
.mmps-app .mmps-nav a{color:#234459!important;font-weight:600!important;text-decoration:underline!important;text-underline-offset:2px;}
.mmps-app .mmps-nav a:hover,.mmps-app .mmps-nav a:focus-visible{color:#104f79!important;text-decoration-thickness:2px!important;}
@media(max-width:840px){.mmps-app .mmps-nav-references{margin-left:0;}}

/* 0.5.23: self-contained 161-row categories reference, no impact on form/register/PDF. */
.mmps-app .mmps-ref-page{width:100%;color:#192f3d;font-size:13px;line-height:1.35}
.mmps-app .mmps-ref-heading{display:flex;align-items:baseline;flex-wrap:wrap;gap:12px;margin:10px 0 6px}
.mmps-app .mmps-ref-heading h2{font-size:21px;margin:0;font-weight:700;color:#183747}
.mmps-app .mmps-ref-heading span{color:#607584;font-size:12px}
.mmps-app .mmps-ref-description{margin:4px 0 14px;color:#4b6574;font-size:12px}
.mmps-app .mmps-ref-filters{display:flex;align-items:end;flex-wrap:wrap;gap:10px;margin-bottom:12px}
.mmps-app .mmps-ref-filters label{flex:1 1 260px;min-width:190px;font-size:12px;font-weight:700;color:#345162}
.mmps-app .mmps-ref-filters label:nth-child(2){flex:0 1 265px}
.mmps-app .mmps-ref-filters input,.mmps-app .mmps-ref-filters select{display:block;width:100%;margin-top:5px;height:36px;border:1px solid #afc2ce;border-radius:5px;background:white;color:#172f40;padding:6px 9px;font-size:13px;line-height:1.2}
.mmps-app .mmps-ref-count{padding-bottom:8px;font-weight:700;color:#416277;white-space:nowrap;font-size:12px}
.mmps-app .mmps-ref-table-wrap{width:100%;overflow-x:auto;border:1px solid #b5c6cf;border-radius:4px}
.mmps-app table.mmps-ref-table{width:100%;min-width:900px;table-layout:fixed;border-collapse:collapse;margin:0;font-size:13px}
.mmps-app .mmps-ref-table thead th{background:#d9eae9!important;color:#173b43!important;text-align:center!important;vertical-align:middle;font-weight:700;line-height:1.2;padding:10px 8px;border:1px solid #c0d4d7;overflow-wrap:anywhere}
.mmps-app .mmps-ref-table tbody td{color:#182e3a;text-align:left;vertical-align:top;padding:8px 9px;line-height:1.33;border:1px solid #d3dce1;overflow-wrap:anywhere}
.mmps-app .mmps-ref-table tbody tr:nth-child(even){background:#f5f8f9}
.mmps-app .mmps-ref-table tbody tr:hover{background:#fff4ce}
.mmps-app .mmps-ref-table tbody tr[hidden]{display:none!important}
@media(max-width:800px){.mmps-app .mmps-ref-filters label:nth-child(2){flex:1 1 210px}}

/* 0.5.33: confirmation ONLY for a new certificate if one exists within six months. */
.mmps-app .mmps-recent-dialog{position:fixed;inset:0;margin:auto;box-sizing:border-box;width:min(480px,calc(100vw - 28px));max-height:calc(100vh - 36px);overflow:auto;padding:20px 22px;background:#fff;color:#20394a;border:1px solid #9cb7c8;border-radius:9px;box-shadow:0 16px 55px rgba(10,29,44,.3);z-index:100010;}
.mmps-app .mmps-recent-dialog:not([open]){display:none!important;}
.mmps-app .mmps-recent-dialog::backdrop{background:rgba(16,32,45,.45);}
.mmps-app .mmps-recent-dialog h3{margin:0 0 12px!important;font-size:18px!important;line-height:1.3!important;color:#193b52;}
.mmps-app .mmps-recent-dialog p{font-size:13px;line-height:1.45;margin:0 0 12px;}
.mmps-app .mmps-recent-dialog .mmps-recent-note{padding:9px 11px;background:#f0f5f9;border-left:3px solid #3380a5;border-radius:3px;}
.mmps-app .mmps-recent-dialog .mmps-recent-error{color:#a32420;font-weight:600;}
.mmps-app .mmps-recent-dialog .mmps-recent-error[hidden]{display:none!important;}
.mmps-app .mmps-recent-actions{display:flex;flex-direction:column;gap:9px;margin-top:16px;}
.mmps-app .mmps-recent-dialog .mmps-recent-action{display:block;box-sizing:border-box;width:100%;text-align:center;margin:0;padding:10px 12px!important;border-radius:5px;border:1px solid #b2c3d0;background:#f0f5f8;color:#244051;font-size:13px!important;font-weight:600;line-height:1.3!important;text-decoration:none;cursor:pointer;}
.mmps-app .mmps-recent-dialog .mmps-recent-action.mmps-recent-new{background:#176ba2;color:#fff;border-color:#176ba2;}
.mmps-app .mmps-recent-dialog .mmps-recent-action:focus-visible{outline:2px solid #095382;outline-offset:2px;}
.mmps-app .mmps-recent-dialog .mmps-recent-action[hidden]{display:none!important;}

.mmps-app .mmps-recent-dialog .mmps-recent-action.mmps-recent-cancel{background:#f0f5f8!important;color:#244051!important;}
.mmps-app .mmps-recent-dialog .mmps-recent-action.mmps-recent-new{background:#176ba2!important;color:#fff!important;}
.mmps-app .mmps-recent-dialog .mmps-recent-action.mmps-recent-existing{background:#f0f5f8!important;color:#244051!important;}
