/* Sona3 v6.1.6 Final Production — focused layout, medical PDF/attachments, readiness and regression protection */
:root{
  --v613-green:#0d7468;--v613-blue:#2464d8;--v613-bg:#eef4f6;--v613-card:#fff;
  --v613-text:#17232e;--v613-muted:#74818d;--v613-line:#dfe7eb;--v613-soft:#f7fafb;
  --v613-danger:#c93d4b;
}
body.settings-mode .header{display:none!important}
#settings .settings-hero{justify-content:center;text-align:center;padding:14px 18px}
#settings .settings-hero>div{width:100%}
#settings .settings-hero h2{margin-inline:auto;text-align:center}
#settings:not(.active) .settings-section{display:none}
.settings-main:empty:before{content:"اختر قسمًا من قائمة الإعدادات";display:block;text-align:center;color:#64748b;padding:32px}

/* Compact action rows: detailed research and users */
.dr-table .dr-actions,.v504-user-actions,.v603-user-actions,.users-actions,.user-actions{
  display:grid!important;grid-template-columns:repeat(2,minmax(74px,1fr))!important;gap:6px!important;
  align-items:stretch!important;min-width:160px!important;max-width:230px!important;margin-inline:auto!important
}
.dr-table .dr-actions button,.v504-user-actions button,.v603-user-actions button,.users-actions button,.user-actions button{
  min-height:34px!important;height:auto!important;padding:6px 8px!important;margin:0!important;border-radius:9px!important;
  font-size:11px!important;line-height:1.25!important;white-space:normal!important
}

/* Medical page */
#medical,#medicalFormPage{background:var(--v613-bg);direction:rtl;padding-bottom:92px}
#medical.active,#medicalFormPage.active{display:block}
.v613-medical-page{padding:10px 0 28px;color:var(--v613-text)}
.v613-medical-title-card{background:#fff;border:1px solid #e9eff2;border-radius:17px;padding:11px 14px;margin-bottom:9px;box-shadow:0 4px 13px rgba(20,42,64,.05);text-align:center}
.v613-medical-title-card h2{font-size:19px;margin:0;text-align:center}
.v613-medical-stats-shell{background:#fff;border:1px solid #e9eff2;border-radius:20px;padding:9px;box-shadow:0 4px 13px rgba(20,42,64,.05)}
.v613-medical-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;width:100%;overflow:visible}
.v613-medical-stat{min-width:0;background:var(--v613-soft);border:1px solid #edf2f4;border-radius:13px;padding:8px 5px;text-align:center;display:grid;align-content:center;min-height:68px}
.v613-medical-stat small{display:block;color:var(--v613-muted);font-size:9px;line-height:1.25;white-space:normal}
.v613-medical-stat strong{display:block;margin-top:4px;font-size:15px;line-height:1.2;color:#162032;overflow-wrap:anywhere}
.v613-export-row{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:8px}
.v613-export-btn{height:35px;border:1px solid #dfe7eb;border-radius:10px;background:#fff;color:#334155;font-family:inherit;font-weight:800;font-size:11px;cursor:pointer}
.v613-medical-tools{background:#fff;border:1px solid #e9eff2;border-radius:20px;padding:10px;margin-top:10px;box-shadow:0 4px 13px rgba(20,42,64,.05)}
.v613-search-row{display:grid;grid-template-columns:minmax(0,1fr) 82px;gap:7px}
.v613-search-input{height:44px;border:1px solid var(--v613-line);border-radius:12px;background:var(--v613-soft);padding:0 11px;font-family:inherit;font-size:12px;min-width:0}
.v613-primary-btn{border:0;border-radius:12px;background:linear-gradient(90deg,var(--v613-green),var(--v613-blue));color:#fff;font-family:inherit;font-weight:900;cursor:pointer}
.v613-search-btn{height:44px;font-size:12px}
.v613-filter-row{display:grid;grid-template-columns:42px 1fr 1fr;gap:7px;margin-top:8px}
.v613-filter-row select,.v613-filter-toggle{height:39px;border:1px solid var(--v613-line);border-radius:11px;background:#fff;font-family:inherit;font-size:11px;min-width:0;padding:0 7px}
.v613-filter-toggle{font-size:18px;font-weight:900;cursor:pointer}
.v613-extra-filters{display:none;grid-template-columns:1fr 1fr;gap:7px;margin-top:7px}
.v613-extra-filters.open{display:grid}
.v613-extra-filters input,.v613-extra-filters select{height:39px;border:1px solid var(--v613-line);border-radius:11px;padding:0 8px;font-family:inherit;font-size:11px;min-width:0}
.v613-add-bar{height:46px;width:100%;margin-top:8px;font-size:14px}
.v613-med-list-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:14px 3px 8px}
.v613-med-list-head h3{margin:0;font-size:16px}.v613-med-list-head span{font-size:11px;color:var(--v613-muted)}
.v613-med-list{display:grid;gap:10px}
.v613-request-card{background:#fff;border:1px solid #e8eef1;border-radius:18px;overflow:hidden;box-shadow:0 4px 13px rgba(20,42,64,.05);border-inline-start:5px solid #cbd5e1}
.v613-request-card.status-review{border-inline-start-color:#eab308;background:linear-gradient(90deg,rgba(254,249,195,.55),#fff 20%)}
.v613-request-card.status-rejected{border-inline-start-color:#dc2626;background:linear-gradient(90deg,rgba(254,226,226,.65),#fff 20%)}
.v613-request-card.status-approved{border-inline-start-color:#4ade80;background:linear-gradient(90deg,rgba(220,252,231,.72),#fff 20%)}
.v613-request-card.status-executed{border-inline-start-color:#047857;background:linear-gradient(90deg,rgba(209,250,229,.72),#fff 20%)}
.v613-request-card.status-monthly{border-inline-start-color:#38bdf8;background:linear-gradient(90deg,rgba(224,242,254,.75),#fff 20%)}
.v613-request-top{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;padding:12px 12px 9px;border-bottom:1px solid #eef3f5}
.v613-request-top h3{margin:0;font-size:19px;line-height:1.35;color:#111827}.v613-request-top p{margin:4px 0 0;color:var(--v613-muted);font-size:10px;line-height:1.45}
.v613-status{flex:none;padding:5px 8px;border-radius:999px;font-size:9px;font-weight:900;background:#eaf2ff;color:#215fb5;max-width:110px;text-align:center}
.v613-status.status-review{background:#fef9c3;color:#854d0e}.v613-status.status-rejected{background:#fee2e2;color:#991b1b}.v613-status.status-approved{background:#dcfce7;color:#166534}.v613-status.status-executed{background:#047857;color:#fff}.v613-status.status-monthly{background:#e0f2fe;color:#075985}
.v613-request-body{padding:10px 12px 12px}.v613-request-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.v613-request-cell{background:var(--v613-soft);border:1px solid #eef3f5;border-radius:11px;padding:8px;min-width:0}.v613-request-cell small{display:block;color:var(--v613-muted);font-size:9px}.v613-request-cell b{display:block;margin-top:3px;font-size:11px;line-height:1.35;overflow-wrap:anywhere}
.v613-tags{display:flex;gap:5px;overflow-x:auto;padding:8px 0 1px;scrollbar-width:none}.v613-tags::-webkit-scrollbar{display:none}.v613-tag{white-space:nowrap;padding:4px 7px;border-radius:999px;background:#edf8f6;border:1px solid #d4ebe6;color:#0b7469;font-size:9px}
.v613-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-top:8px}.v613-actions button{height:35px;border-radius:9px;border:1px solid var(--v613-line);background:#fff;font-family:inherit;font-size:10px;font-weight:900;cursor:pointer;min-width:0}.v613-actions .view{background:#edf5ff;color:#205daf;border-color:#dce9fa}.v613-actions .delete{background:#fff4f4;color:var(--v613-danger);border-color:#f0d4d4}
.v613-details{display:none;border-top:1px dashed var(--v613-line);padding:10px 12px;background:#fbfdfe}.v613-details.open{display:block}.v613-details-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.v613-detail{background:#fff;border:1px solid #edf2f4;border-radius:10px;padding:8px}.v613-detail small{display:block;color:var(--v613-muted);font-size:9px}.v613-detail b{display:block;margin-top:3px;font-size:11px;overflow-wrap:anywhere}
.v613-med-empty{text-align:center;background:#fff;border:1px dashed #cbd5e1;border-radius:16px;padding:24px;color:#64748b;font-weight:800}
.v613-fab{position:fixed;right:max(18px,calc((100vw - 430px)/2 + 18px));bottom:18px;width:58px;height:58px;border-radius:50%;border:0;background:linear-gradient(135deg,var(--v613-green),var(--v613-blue));color:#fff;font-size:30px;line-height:1;box-shadow:0 10px 22px rgba(36,100,216,.28);z-index:1200;cursor:pointer}

/* Standalone medical form */
.v613-form-page{padding:9px 0 30px}.v613-form-hero{display:flex;justify-content:space-between;align-items:center;gap:8px;background:linear-gradient(135deg,#0f766e,#2563eb);color:#fff;border-radius:20px;padding:14px;margin-bottom:10px}.v613-form-hero h2{margin:0;font-size:19px}.v613-form-hero p{margin:4px 0 0;color:#dbeafe;font-size:10px}.v613-back-btn{border:1px solid rgba(255,255,255,.38);background:rgba(255,255,255,.14);color:#fff;border-radius:10px;height:36px;padding:0 10px;font-family:inherit;font-weight:800;cursor:pointer}
.v613-form-status-first{background:#fff;border:2px solid #dbeafe;border-radius:17px;padding:10px;margin-bottom:9px;box-shadow:0 4px 13px rgba(20,42,64,.05)}
.v613-form-section{background:#fff;border:1px solid #e9eff2;border-radius:18px;padding:12px;margin-bottom:9px;box-shadow:0 4px 13px rgba(20,42,64,.045)}.v613-form-section h3{margin:0 0 10px;font-size:14px;color:#0f4f67}.v613-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.v613-form-grid label{display:grid;gap:5px;font-size:11px;font-weight:800;color:#334155;min-width:0}.v613-form-grid label.full{grid-column:1/-1}.v613-form-grid input,.v613-form-grid select,.v613-form-grid textarea{width:100%;min-width:0;border:1px solid #dbe4e8;border-radius:11px;background:#fbfdfe;padding:9px;font-family:inherit;font-size:12px;color:#17232e}.v613-form-grid input,.v613-form-grid select{height:42px}.v613-form-grid textarea{min-height:78px;resize:vertical}.v613-form-grid input:disabled,.v613-form-grid select:disabled,.v613-form-grid textarea:disabled{opacity:.68;background:#f1f5f9}.v613-help{font-size:9px;color:#74818d;font-weight:500;line-height:1.45}
.v613-mode-toggle{display:grid;grid-template-columns:1fr 1fr;gap:7px}.v613-mode-btn{height:42px;border:1px solid #cfdbe1;background:#fff;border-radius:11px;font-family:inherit;font-size:11px;font-weight:900;color:#475569;cursor:pointer}.v613-mode-btn.active{color:#fff;border-color:transparent;background:linear-gradient(90deg,#0d7468,#2464d8);box-shadow:0 5px 13px rgba(36,100,216,.2)}
#medRequestMode{display:none}.v613-checkboxes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.v613-checkbox{display:flex!important;grid-auto-flow:column;justify-content:start;align-items:center;gap:5px;background:#f8fafc;border:1px solid #e6edf0;border-radius:10px;padding:8px;font-size:10px!important}.v613-checkbox input{width:16px!important;height:16px!important;padding:0!important}
.v613-file-preview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:7px}.v613-file-item{position:relative;border:1px solid #e2e8f0;border-radius:10px;overflow:hidden;background:#f8fafc;min-height:82px}.v613-file-item img{width:100%;height:72px;object-fit:cover;display:block}.v613-file-item span{display:block;padding:4px;font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v613-existing-files{display:grid;gap:6px}.v613-existing-file{display:flex;align-items:center;justify-content:space-between;gap:8px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:9px;padding:7px;font-size:10px}.v613-existing-file a{color:#1d4ed8;font-weight:800;text-decoration:none}
.v613-form-actions{position:sticky;bottom:0;z-index:20;display:grid;grid-template-columns:1fr 1fr;gap:8px;background:rgba(238,244,246,.93);backdrop-filter:blur(8px);padding:10px 0}.v613-form-actions button{height:46px;border-radius:12px;font-family:inherit;font-weight:900;border:1px solid #d7e1e6;cursor:pointer}.v613-save-btn{border:0!important;background:linear-gradient(90deg,#0d7468,#2464d8);color:#fff}.v613-cancel-btn{background:#fff;color:#334155}

/* Operations preload cards */
.ops-preload-section{margin:14px 0}.ops-preload-section h3{margin:0 0 8px;color:#0f172a}.ops-preload-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.ops-preload-card{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:12px;box-shadow:0 8px 18px rgba(15,23,42,.05)}.ops-preload-card h4{margin:0 0 4px;font-size:14px}.ops-preload-card p{margin:0;color:#64748b;font-size:10px;line-height:1.5}.ops-preload-meta{display:flex;justify-content:space-between;gap:6px;margin:9px 0;font-size:10px;color:#475569}.ops-preload-btn{width:100%;height:38px;border:0;border-radius:10px;background:linear-gradient(135deg,#0f766e,#2563eb);color:#fff;font-family:inherit;font-weight:900;cursor:pointer}.ops-preload-btn:disabled{opacity:.6;cursor:wait}.ops-preload-status{margin-top:7px;font-size:9px;color:#64748b}.v613-confirm-overlay{position:fixed;inset:0;background:rgba(15,23,42,.56);display:flex;align-items:center;justify-content:center;padding:18px;z-index:99999}.v613-confirm-box{width:min(390px,100%);background:#fff;border-radius:18px;padding:16px;direction:rtl;box-shadow:0 25px 70px rgba(0,0,0,.26)}.v613-confirm-box h3{margin:0 0 8px;font-size:17px}.v613-confirm-box p{margin:0;color:#475569;line-height:1.7;font-size:12px}.v613-confirm-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}.v613-confirm-actions button{height:42px;border-radius:11px;font-family:inherit;font-weight:900;cursor:pointer}.v613-confirm-ok{border:0;background:#0f766e;color:#fff}.v613-confirm-cancel{border:1px solid #dbe4e8;background:#fff;color:#334155}

/* Print */
.v613-print-root{display:none}
@media print{
 @page{size:A4 portrait;margin:7mm}
 html,body{background:#fff!important;overflow:visible!important;height:auto!important}
 body>*:not(.med-print-root){display:none!important}.v613-print-root.med-print-root{display:block!important;position:static!important;inset:auto!important;width:auto!important;min-height:auto!important;visibility:visible!important;opacity:1!important;direction:rtl;font-family:Arial,Tahoma,sans-serif;color:#111827;background:#fff!important;padding:0!important}
 .v613-print-header{border-bottom:2px solid #0f766e;padding-bottom:5mm;margin-bottom:4mm}.v613-print-header h1{margin:0;font-size:21px}.v613-print-header .case-name{margin-top:3mm;font-size:25px;font-weight:900;color:#0f4f67}.v613-print-meta{font-size:10px;color:#64748b;margin-top:2mm}
 .v613-print-section{border:1px solid #d9e2e7;border-radius:8px;padding:3mm;margin-bottom:3mm;break-inside:avoid}.v613-print-section h2{margin:0 0 2mm;font-size:13px;color:#0f766e}.v613-print-grid{display:grid;grid-template-columns:1fr 1fr;gap:2mm}.v613-print-field{background:#f8fafc;border:1px solid #edf2f4;border-radius:5px;padding:2mm}.v613-print-field.wide{grid-column:1/-1}.v613-print-field small{display:block;color:#64748b;font-size:8px}.v613-print-field strong{display:block;margin-top:1mm;font-size:10px;overflow-wrap:anywhere}.v613-print-images{display:grid;grid-template-columns:1fr 1fr;gap:3mm}.v613-print-image{break-inside:avoid;border:1px solid #dbe4e8;border-radius:6px;padding:2mm}.v613-print-image img{display:block;width:100%;height:auto;max-height:115mm;object-fit:contain}.v613-print-image figcaption{font-size:8px;margin-top:1mm;color:#475569}.v613-print-list-card{border-bottom:1px solid #dbe4e8;padding:3mm 0;break-inside:avoid}.v613-print-list-card h2{font-size:15px;margin:0 0 1mm}.v613-print-list-card p{font-size:9px;margin:1mm 0;color:#334155}
}

body.dark-mode #medical,body.dark-mode #medicalFormPage{--v613-bg:#07111f;--v613-card:#0f172a;--v613-text:#f8fafc;--v613-muted:#94a3b8;--v613-soft:#111d30;--v613-line:#334155;background:#07111f}
body.dark-mode .v613-medical-title-card,body.dark-mode .v613-medical-stats-shell,body.dark-mode .v613-medical-tools,body.dark-mode .v613-request-card,body.dark-mode .v613-detail,body.dark-mode .v613-form-section,body.dark-mode .v613-form-status-first,body.dark-mode .ops-preload-card{background:#0f172a;border-color:#334155;color:#f8fafc}
body.dark-mode .v613-medical-stat,body.dark-mode .v613-request-cell,body.dark-mode .v613-details,body.dark-mode .v613-form-grid input,body.dark-mode .v613-form-grid select,body.dark-mode .v613-form-grid textarea{background:#111d30;border-color:#334155;color:#f8fafc}
body.dark-mode .v613-request-top h3,body.dark-mode .ops-preload-section h3{color:#f8fafc}

@media(max-width:390px){
 .v613-medical-stat{padding:7px 3px;min-height:64px}.v613-medical-stat small{font-size:8px}.v613-medical-stat strong{font-size:13px}
 .v613-actions{grid-template-columns:1fr 1fr}.v613-request-grid,.v613-details-grid,.v613-form-grid{grid-template-columns:1fr}.v613-form-grid label.full{grid-column:auto}.v613-extra-filters{grid-template-columns:1fr}.v613-file-preview{grid-template-columns:repeat(2,minmax(0,1fr))}
 .ops-preload-grid{grid-template-columns:1fr}
}


/* ============================================================
   Sona3 v6.1.6 focused production overrides
   ============================================================ */

/* Compact extraction and distribution pre-load controls */
#extract .extract-hero p{display:none!important}
#extract .extract-hero{padding-block:12px!important;min-height:0!important}
#extract .v603-lazy-load-bar,
#distribution .v603-lazy-load-bar{
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:9px!important;
  padding:8px 10px!important;margin:8px 0 10px!important;min-height:48px!important;border-radius:14px!important;
  background:#fff!important;border:1px solid #dfe7eb!important;box-shadow:0 4px 12px rgba(15,23,42,.05)!important
}
#extract .v603-lazy-load-bar>div,
#distribution .v603-lazy-load-bar>div{min-width:0;display:flex;align-items:center;gap:7px}
#extract .v603-lazy-load-bar strong,
#distribution .v603-lazy-load-bar strong{font-size:12px!important;white-space:nowrap;margin:0!important}
#extract .v603-lazy-load-bar small,
#distribution .v603-lazy-load-bar small{display:none!important}
#extract .v603-lazy-load-bar .btn,
#distribution .v603-lazy-load-bar .btn{
  width:auto!important;min-width:0!important;height:34px!important;min-height:34px!important;padding:0 10px!important;
  border-radius:9px!important;font-size:10px!important;white-space:nowrap!important;margin:0!important
}

/* User management: remove redundant hero and reuse the same add-user action as a floating button */
#settings-section-users{padding-bottom:88px;position:relative}
#settings-section-users>.settings-section-head{display:none!important}
#v615FloatingAddUser.v615-floating-add-user{
  position:fixed;left:max(18px,calc((100vw - 430px)/2 + 18px));right:auto;bottom:18px;z-index:1350;
  width:58px;height:58px;min-width:58px;padding:0;border:0;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#0f766e,#2563eb);color:#fff;font-size:29px;font-family:inherit;font-weight:900;
  box-shadow:0 12px 28px rgba(37,99,235,.28);cursor:pointer
}
#settings-section-users:not(.active) #v615FloatingAddUser{display:none!important}

/* Medical attachment removal and upload progress */
.v615-existing-actions{display:flex;align-items:center;gap:7px;flex:none}
.v615-remove-attachment,.v615-remove-pending{
  border:0;background:#fee2e2;color:#991b1b;width:28px;height:28px;border-radius:50%;font-size:18px;line-height:1;
  font-family:Arial,sans-serif;font-weight:900;cursor:pointer;display:flex;align-items:center;justify-content:center
}
.v615-remove-pending{position:absolute;top:4px;left:4px;z-index:3;width:25px;height:25px;background:rgba(153,27,27,.92);color:#fff}
.v615-upload-progress{grid-column:1/-1;background:#f8fafc;border:1px solid #dbe5ea;border-radius:11px;padding:8px}
.v615-upload-progress>div{display:flex;justify-content:space-between;gap:8px;font-size:10px;color:#475569;margin-bottom:5px}
.v615-upload-progress progress{width:100%;height:8px;accent-color:#0f766e}

/* Compact, consistent inline loading and empty states */
.v615-inline-state,.v615-recent-loading{font-size:11px!important;line-height:1.6!important;color:#64748b!important;text-align:center!important;padding:14px!important}
.v615-recent-loading>span{display:block;margin-bottom:7px;font-size:11px;color:#64748b}
.v615-skeleton-list{display:grid;gap:7px;width:100%}
.v615-skeleton-card{display:grid;gap:6px;background:#fff;border:1px solid #e8eef1;border-radius:13px;padding:10px;overflow:hidden}
.v615-skeleton-card span{display:block;height:9px;border-radius:999px;background:linear-gradient(90deg,#eef2f6 25%,#f8fafc 50%,#eef2f6 75%);background-size:200% 100%;animation:v615Skeleton 1.25s linear infinite}
.v615-skeleton-card span:nth-child(1){width:58%}.v615-skeleton-card span:nth-child(2){width:88%}.v615-skeleton-card span:nth-child(3){width:72%}
@keyframes v615Skeleton{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* Operations readiness card */
.v615-readiness-section{background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:12px;margin:12px 0;box-shadow:0 8px 18px rgba(15,23,42,.05)}
.v615-readiness-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.v615-readiness-head h3{margin:0;font-size:16px;color:#0f172a}.v615-readiness-head small{color:#64748b;font-size:10px}
.v615-readiness-head button{height:34px;border:0;border-radius:9px;padding:0 10px;background:#e0f2fe;color:#075985;font-family:inherit;font-size:10px;font-weight:900;cursor:pointer}
.v615-readiness-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.v615-readiness-item{background:#f8fafc;border:1px solid #e8eef1;border-radius:11px;padding:8px;min-width:0}
.v615-readiness-item span{display:block;color:#64748b;font-size:9px}.v615-readiness-item strong{display:block;margin-top:4px;font-size:11px;color:#17232e;overflow-wrap:anywhere}
.v615-readiness-item.pass{border-inline-start:3px solid #22c55e}.v615-readiness-item.fail{border-inline-start:3px solid #ef4444}.v615-readiness-item.info{border-inline-start:3px solid #38bdf8}
.v615-readiness-results{display:grid;gap:6px;margin-top:9px}
.v615-test-row{display:grid;grid-template-columns:48px 1fr;gap:3px 8px;align-items:center;border-radius:9px;padding:7px 8px;background:#f8fafc;border:1px solid #e8eef1}
.v615-test-row b{grid-row:1/3;font-size:9px;text-align:center;border-radius:999px;padding:4px}.v615-test-row.pass b{background:#dcfce7;color:#166534}.v615-test-row.fail b{background:#fee2e2;color:#991b1b}
.v615-test-row span{font-size:11px;font-weight:900}.v615-test-row small{font-size:9px;color:#64748b}

/* Medical PDF: readable type, dense information, one full-width report below another */
@media print{
  @page{size:A4 portrait;margin:8mm}
  .v613-print-header{padding-bottom:4mm;margin-bottom:3mm}
  .v613-print-header h1{font-size:23px!important}.v613-print-header .case-name{font-size:28px!important;margin-top:2mm!important}
  .v613-print-meta{font-size:11px!important}
  .v613-print-section{padding:3.2mm!important;margin-bottom:2.5mm!important;border-radius:7px!important}
  .v613-print-section h2{font-size:15px!important;margin-bottom:2.2mm!important}
  .v613-print-grid{gap:2.2mm!important}
  .v613-print-field{padding:2.6mm!important}.v613-print-field small{font-size:9.5px!important}.v613-print-field strong{font-size:12.5px!important;line-height:1.45!important}
  .v615-print-attachments{break-inside:auto!important;page-break-inside:auto!important}
  .v613-print-images{display:block!important}
  .v613-print-image{display:block!important;width:100%!important;margin:0 0 5mm!important;padding:2.5mm!important;break-inside:avoid!important;page-break-inside:avoid!important;box-sizing:border-box!important}
  .v613-print-image img{display:block!important;width:auto!important;max-width:100%!important;height:auto!important;max-height:145mm!important;object-fit:contain!important;margin:0 auto!important}
  .v613-print-image figcaption{font-size:10px!important;margin-top:2mm!important;text-align:center!important}
  .v613-print-list-card h2{font-size:17px!important}.v613-print-list-card p{font-size:11px!important;line-height:1.5!important}
}

body.dark-mode .v615-readiness-section,body.dark-mode .v615-skeleton-card{background:#0f172a;border-color:#334155;color:#f8fafc}
body.dark-mode .v615-readiness-item,body.dark-mode .v615-test-row,body.dark-mode .v615-upload-progress{background:#111d30;border-color:#334155;color:#f8fafc}
body.dark-mode .v615-readiness-head h3,body.dark-mode .v615-readiness-item strong{color:#f8fafc}

@media(max-width:390px){
  #extract .v603-lazy-load-bar strong,#distribution .v603-lazy-load-bar strong{font-size:10px!important}
  #extract .v603-lazy-load-bar .btn,#distribution .v603-lazy-load-bar .btn{font-size:9px!important;padding-inline:8px!important}
  .v615-readiness-grid{grid-template-columns:1fr 1fr}
}

/* ============================================================
   Sona3 v6.1.6 final scoped overrides
   ============================================================ */

/* Smart refresh action beside section titles — no large preload cards. */
#extract .v603-lazy-load-bar,#distribution .v603-lazy-load-bar{display:none!important}
.v616-title-smart-host{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;flex-wrap:nowrap!important}
#extract .extract-hero.v616-title-smart-host{padding:10px 12px!important;min-height:0!important}
#extract .extract-hero.v616-title-smart-host p{display:none!important}
.v616-title-smart-host h2,.v616-title-smart-host h3{margin:0!important;min-width:0!important}
.v616-smart-refresh{
  flex:none!important;width:auto!important;min-width:0!important;max-width:48%!important;height:32px!important;min-height:32px!important;
  padding:0 9px!important;border:1px solid #cfe0ea!important;border-radius:999px!important;background:linear-gradient(135deg,#eff8ff,#e8faf5)!important;
  color:#0f5f72!important;font-family:inherit!important;font-size:9px!important;font-weight:900!important;line-height:1.2!important;
  white-space:normal!important;text-align:center!important;box-shadow:none!important;cursor:pointer!important
}
.v616-smart-refresh:disabled{opacity:.65;cursor:wait!important}

/* Recent cases: preserve rendered rows during a background refresh. */
.v616-recent-background-note,.v616-recent-loading-text{font-size:10px!important;color:#64748b!important;text-align:center!important;padding:7px 4px!important}
.v616-recent-background-note{border-top:1px dashed #dbe5ea;margin-top:6px}

/* Medical PDF: page 1 is reserved for all request data; reports begin on page 2. */
.v616-print-root.v616-print-measuring{
  display:block!important;position:fixed!important;left:-10000px!important;top:0!important;width:194mm!important;
  visibility:hidden!important;opacity:0!important;pointer-events:none!important;background:#fff!important
}
.v616-print-summary-page{box-sizing:border-box;width:100%;height:281mm;overflow:hidden;position:relative}
.v616-print-summary-scale{width:100%;transform-origin:top right}
.v616-print-attachments-root{width:100%;box-sizing:border-box}
.v616-print-images-vertical{display:block;width:100%}
.v616-print-attachment-row{display:block;width:100%;box-sizing:border-box;margin:0 0 6mm;padding:3mm;border:1px solid #d9e2e7;border-radius:7px;break-inside:avoid;page-break-inside:avoid;background:#fff}
.v616-print-attachment-row img{display:block;width:100%;height:auto;max-height:246mm;object-fit:contain;margin:0 auto}
.v616-print-attachment-row figcaption{font-size:10px;line-height:1.45;text-align:center;color:#475569;margin-top:2mm}

@media print{
  @page{size:A4 portrait;margin:8mm}
  .v616-print-root{padding:0!important;margin:0!important;width:auto!important}
  .v616-print-summary-page{height:281mm!important;break-after:auto!important;page-break-after:auto!important;overflow:hidden!important}
  .v616-print-summary-page.has-attachments{break-after:page!important;page-break-after:always!important}
  .v616-print-summary-scale{transform-origin:top right!important}
  .v616-print-summary-page .v613-print-header{padding-bottom:3mm!important;margin-bottom:2mm!important}
  .v616-print-summary-page .v613-print-header h1{font-size:21px!important}
  .v616-print-summary-page .v613-print-header .case-name{font-size:25px!important;margin-top:1.5mm!important}
  .v616-print-summary-page .v613-print-meta{font-size:9.5px!important}
  .v616-print-summary-page .v613-print-section{padding:2.4mm!important;margin-bottom:1.8mm!important;border-radius:6px!important;break-inside:avoid!important}
  .v616-print-summary-page .v613-print-section h2{font-size:13px!important;margin-bottom:1.6mm!important}
  .v616-print-summary-page .v613-print-grid{gap:1.5mm!important}
  .v616-print-summary-page .v613-print-field{padding:1.8mm!important;border-radius:4px!important}
  .v616-print-summary-page .v613-print-field small{font-size:8px!important}
  .v616-print-summary-page .v613-print-field strong{font-size:10.5px!important;line-height:1.3!important}
  .v616-print-attachments-root{break-before:auto!important;page-break-before:auto!important}
  .v616-print-attachments-root>h2{font-size:18px!important;color:#0f766e!important;margin:0 0 4mm!important}
  .v616-print-attachment-row{display:block!important;width:100%!important;margin:0 0 6mm!important;padding:3mm!important;break-inside:avoid!important;page-break-inside:avoid!important}
  .v616-print-attachment-row img{display:block!important;width:100%!important;height:auto!important;max-height:246mm!important;object-fit:contain!important}
  .v616-print-attachment-row figcaption{font-size:10px!important}
}

body.dark-mode .v616-smart-refresh{background:#111d30!important;border-color:#334155!important;color:#bae6fd!important}
@media(max-width:390px){
  .v616-smart-refresh{max-width:52%!important;font-size:8px!important;padding-inline:7px!important}
  .v616-title-smart-host h2{font-size:22px!important}
}

/* Mirror the print typography while measuring the first medical PDF page off-screen. */
.v616-print-root.v616-print-measuring{direction:rtl!important;font-family:Arial,Tahoma,sans-serif!important;color:#111827!important;padding:0!important}
.v616-print-measuring .v613-print-header{border-bottom:2px solid #0f766e;padding-bottom:3mm;margin-bottom:2mm}
.v616-print-measuring .v613-print-header h1{margin:0;font-size:21px}
.v616-print-measuring .v613-print-header .case-name{margin-top:1.5mm;font-size:25px;font-weight:900;color:#0f4f67}
.v616-print-measuring .v613-print-meta{font-size:9.5px;color:#64748b;margin-top:2mm}
.v616-print-measuring .v613-print-section{border:1px solid #d9e2e7;border-radius:6px;padding:2.4mm;margin-bottom:1.8mm;break-inside:avoid}
.v616-print-measuring .v613-print-section h2{margin:0 0 1.6mm;font-size:13px;color:#0f766e}
.v616-print-measuring .v613-print-grid{display:grid;grid-template-columns:1fr 1fr;gap:1.5mm}
.v616-print-measuring .v613-print-field{background:#f8fafc;border:1px solid #edf2f4;border-radius:4px;padding:1.8mm;box-sizing:border-box;min-width:0}
.v616-print-measuring .v613-print-field.wide{grid-column:1/-1}
.v616-print-measuring .v613-print-field small{display:block;color:#64748b;font-size:8px}
.v616-print-measuring .v613-print-field strong{display:block;margin-top:1mm;font-size:10.5px;line-height:1.3;overflow-wrap:anywhere}


/* v6.1.6 adaptive first-page fitting: shrink actual layout metrics, not only paint scale. */
.v616-print-summary-page .v613-print-header{padding-bottom:var(--v616-header-pad,3mm)!important;margin-bottom:var(--v616-header-margin,2mm)!important}
.v616-print-summary-page .v613-print-header h1{font-size:var(--v616-h1-size,21px)!important}
.v616-print-summary-page .v613-print-header .case-name{font-size:var(--v616-name-size,25px)!important;margin-top:var(--v616-name-margin,1.5mm)!important}
.v616-print-summary-page .v613-print-meta{font-size:var(--v616-meta-size,9.5px)!important;margin-top:var(--v616-meta-margin,2mm)!important}
.v616-print-summary-page .v613-print-section{padding:var(--v616-section-pad,2.4mm)!important;margin-bottom:var(--v616-section-margin,1.8mm)!important;border-radius:var(--v616-section-radius,6px)!important}
.v616-print-summary-page .v613-print-section h2{font-size:var(--v616-section-title,13px)!important;margin-bottom:var(--v616-section-title-margin,1.6mm)!important}
.v616-print-summary-page .v613-print-grid{gap:var(--v616-grid-gap,1.5mm)!important}
.v616-print-summary-page .v613-print-field{padding:var(--v616-field-pad,1.8mm)!important;border-radius:var(--v616-field-radius,4px)!important}
.v616-print-summary-page .v613-print-field small{font-size:var(--v616-label-size,8px)!important}
.v616-print-summary-page .v613-print-field strong{font-size:var(--v616-value-size,10.5px)!important;line-height:1.25!important;margin-top:var(--v616-value-margin,1mm)!important}



/* ============================================================
   Sona3 v6.1.9 — Medical services modification 4
   Compact cards, modal details, attachment gallery and redesigned PDF.
   ============================================================ */
.v619-med-request-card{border-inline-start-width:4px;box-shadow:0 10px 28px rgba(20,42,64,.075)}
.v619-med-card-grid{display:grid;grid-template-columns:minmax(150px,.72fr) minmax(0,1.6fr);gap:8px}
.v619-med-card-grid .diagnosis b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.7em}
.v619-med-card-meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:8px;color:#64748b;font-size:9px;font-weight:800}
.v619-med-card-meta span{background:#f8fafc;border:1px solid #e8eef1;border-radius:999px;padding:5px 8px}
.v619-med-card-meta .attachments{margin-inline-start:auto;background:#effaf8;color:#0f766e;border-color:#d4ebe6}
.v619-med-card-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
.v619-med-card-actions .view{grid-column:1/-1;height:41px!important;font-size:12px!important;background:linear-gradient(90deg,#eaf4ff,#eafaf6)!important;border-color:#cfe2ef!important;color:#155e75!important}

body.v619-med-modal-open{overflow:hidden}
.v619-med-details-modal{position:fixed;inset:0;z-index:450000;display:none;align-items:flex-end;justify-content:center;background:rgba(2,6,23,.62);backdrop-filter:blur(8px);padding:0}
.v619-med-details-modal.open{display:flex}
.v619-med-details-dialog{width:min(980px,100%);max-height:94dvh;background:#f6f9fb;border-radius:24px 24px 0 0;overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr) auto;box-shadow:0 -20px 70px rgba(2,6,23,.24);direction:rtl}
.v619-med-details-dialog>header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:15px 16px;background:#fff;border-bottom:1px solid #e2e8f0}
.v619-med-details-dialog>header small{display:block;color:#0f766e;font-size:10px;font-weight:900}.v619-med-details-dialog>header h3{margin:3px 0 0;color:#0f172a;font-size:21px}.v619-med-details-dialog>header p{margin:4px 0 0;color:#64748b;font-size:10px}
.v619-med-details-dialog>header button{flex:none;width:38px;height:38px;border:1px solid #dbe4e8;border-radius:50%;background:#fff;color:#334155;font-size:24px;line-height:1;cursor:pointer}
.v619-med-details-dialog>main{padding:12px;overflow:auto;overscroll-behavior:contain}
.v619-med-detail-section{background:#fff;border:1px solid #e2e8f0;border-radius:17px;padding:12px;margin-bottom:10px;box-shadow:0 5px 15px rgba(15,23,42,.035)}
.v619-med-detail-section h4{display:flex;align-items:center;gap:8px;margin:0 0 10px;color:#0f4f67;font-size:14px}.v619-med-detail-section h4>span{display:inline-flex;align-items:center;justify-content:center;width:25px;height:25px;border-radius:8px;background:#eaf8f5;color:#0f766e;font-size:11px}.v619-med-detail-section h4 em{margin-inline-start:auto;font-style:normal;font-size:10px;color:#64748b}
.v619-med-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.v619-med-detail-field{min-width:0;border:1px solid #edf2f4;border-radius:12px;padding:9px;background:#f8fafc}.v619-med-detail-field.wide{grid-column:1/-1}.v619-med-detail-field small{display:block;color:#64748b;font-size:9px}.v619-med-detail-field b{display:block;margin-top:4px;color:#17232e;font-size:12px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}
.v619-med-details-dialog>footer{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;padding:11px 12px;background:#fff;border-top:1px solid #e2e8f0}.v619-med-details-dialog>footer button{height:43px;border:1px solid #dbe4e8;border-radius:11px;background:#fff;color:#334155;font-family:inherit;font-weight:900;cursor:pointer}.v619-med-details-dialog>footer .edit{background:#eef5ff;color:#1d4ed8}.v619-med-details-dialog>footer .pdf{background:#effaf8;color:#0f766e}

.v619-med-attachment-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.v619-med-attachment-card{position:relative;margin:0;min-width:0;border:1px solid #e2e8f0;border-radius:13px;overflow:hidden;background:#fff}.v619-med-attachment-image{display:block;width:100%;padding:0;border:0;background:#f1f5f9;cursor:pointer}.v619-med-attachment-image img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover}.v619-med-attachment-card figcaption{display:grid;gap:3px;padding:8px}.v619-med-attachment-card figcaption span{font-size:10px;font-weight:900;color:#0f766e}.v619-med-attachment-card figcaption small{font-size:8px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v619-med-attachment-unavailable,.v619-med-attachments-empty{display:flex;align-items:center;justify-content:center;min-height:120px;padding:12px;text-align:center;background:#f8fafc;color:#64748b;font-size:10px}.v619-med-attachments-empty{border:1px dashed #cbd5e1;border-radius:12px;min-height:74px}

.v619-med-attachments-help{margin:-2px 0 10px;color:#64748b;font-size:10px;line-height:1.6}.v619-med-upload-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px}.v619-med-upload-actions button{height:43px;border:1px solid #cfe0ea;border-radius:11px;background:#fff;color:#0f5f72;font-family:inherit;font-weight:900;cursor:pointer}.v619-med-upload-actions button:last-of-type{background:linear-gradient(90deg,#edf9f6,#edf5ff)}.v619-med-upload-actions button:disabled{opacity:.55;cursor:not-allowed;filter:grayscale(.2)}
.v619-med-pending-gallery{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;margin:9px 0!important}.v619-med-pending-card{position:relative;margin:0;border:1px solid #dbe4e8;border-radius:13px;overflow:hidden;background:#fff}.v619-med-pending-card>img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover}.v619-med-pending-card figcaption{display:grid;gap:5px;padding:7px}.v619-med-pending-card select{width:100%;height:34px;border:1px solid #dbe4e8;border-radius:8px;background:#fff;font-family:inherit;font-size:9px;padding:0 5px}.v619-med-pending-card small{font-size:8px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v619-med-edit-pending{position:absolute;top:5px;right:5px;z-index:3;border:0;border-radius:999px;background:rgba(15,118,110,.92);color:#fff;font-family:inherit;font-size:8px;font-weight:900;padding:6px 8px;cursor:pointer}.v619-med-existing-block{margin-top:10px}.v619-med-existing-block>strong{display:block;margin-bottom:7px;font-size:11px;color:#334155}.v619-med-attachment-card.existing>.v615-remove-attachment{position:absolute;top:5px;left:5px;z-index:4}

body.dark-mode .v619-med-details-dialog,body.dark-mode .v619-med-details-dialog>main{background:#07111f}.dark-mode .v619-med-details-dialog>header,.dark-mode .v619-med-details-dialog>footer,.dark-mode .v619-med-detail-section,.dark-mode .v619-med-attachment-card,.dark-mode .v619-med-pending-card{background:#0f172a;border-color:#334155;color:#f8fafc}.dark-mode .v619-med-detail-field,.dark-mode .v619-med-card-meta span,.dark-mode .v619-med-attachment-unavailable{background:#111d30;border-color:#334155}.dark-mode .v619-med-detail-field b,.dark-mode .v619-med-details-dialog>header h3{color:#f8fafc}.dark-mode .v619-med-pending-card select{background:#111d30;border-color:#334155;color:#f8fafc}

/* Medical PDF inspired by the approved reference layout. */
.v619-med-print-header{display:flex;align-items:center;justify-content:space-between;gap:8mm;padding:2mm 0 5mm;border-bottom:2px solid #0f8793}.v619-med-print-header h1{margin:0;color:#173c67;font-size:23px}.v619-med-print-header .brand{display:flex;align-items:center;gap:3mm}.v619-med-print-header .mark{display:flex;align-items:center;justify-content:center;width:14mm;height:14mm;border:2px solid #0f8793;border-radius:50%;color:#0f8793;font-size:22px;font-weight:900}.v619-med-print-header .brand strong,.v619-med-print-header .brand small{display:block}.v619-med-print-header .brand strong{color:#173c67;font-size:14px}.v619-med-print-header .brand small{color:#64748b;font-size:8px;margin-top:1mm}
.v619-med-print-identity{display:grid;grid-template-columns:1.5fr 1fr 1fr .85fr;border:1px solid #d8e2e7;border-radius:8px;margin:5mm 0 4mm;overflow:hidden}.v619-med-print-identity>div{padding:3mm;border-inline-start:1px solid #e4ebef;min-width:0}.v619-med-print-identity>div:first-child{border-inline-start:0}.v619-med-print-identity small,.v619-med-print-cell small{display:block;color:#64748b;font-size:8px}.v619-med-print-identity strong{display:block;margin-top:1.5mm;color:#173c67;font-size:11px;overflow-wrap:anywhere}
.v619-med-print-section{border:1px solid #d8e2e7;border-radius:8px;padding:3mm;margin-bottom:3mm;break-inside:avoid}.v619-med-print-section h2{display:flex;align-items:center;gap:2mm;margin:0 0 2.5mm;color:#0f8793;font-size:14px}.v619-med-print-section h2 .number{font-size:12px}.v619-med-print-section h2 .icon{font-size:14px}.v619-med-print-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;border:1px solid #dfe7eb;border-radius:6px;overflow:hidden}.v619-med-print-cell{padding:3mm;border-inline-start:1px solid #e6ecef;border-bottom:1px solid #e6ecef;min-width:0}.v619-med-print-cell:nth-child(4n+1){border-inline-start:0}.v619-med-print-cell.wide{grid-column:1/-1;border-inline-start:0}.v619-med-print-cell strong{display:block;margin-top:1.4mm;color:#1f3654;font-size:10.5px;line-height:1.45;overflow-wrap:anywhere}.v619-med-print-cell.badge strong{display:inline-block;background:#e7f7f2;color:#0f766e;border-radius:999px;padding:1.5mm 3mm}
.v619-med-print-bottom{display:grid;grid-template-columns:1fr 1fr;border:1px solid #d8e2e7;border-radius:8px;overflow:hidden;margin-top:3mm}.v619-med-print-bottom>div{padding:3mm;min-height:18mm}.v619-med-print-bottom>div+div{border-inline-start:1px solid #dfe7eb}.v619-med-print-bottom h3{margin:0 0 2mm;color:#173c67;font-size:11px}.v619-med-print-bottom p{margin:0;color:#475569;font-size:9px;line-height:1.6}.v619-med-print-footer{display:flex;justify-content:space-between;gap:8px;margin-top:4mm;padding-top:2.5mm;border-top:2px solid #0f8793;color:#64748b;font-size:8px}
.v619-med-print-attachments-root{break-before:page;page-break-before:always}.v619-med-print-attachments-root>header{display:flex;justify-content:space-between;align-items:flex-end;gap:8px;border-bottom:2px solid #0f8793;padding-bottom:3mm;margin-bottom:4mm}.v619-med-print-attachments-root>header h2{margin:0;color:#173c67;font-size:20px}.v619-med-print-attachments-root>header p{margin:0;color:#64748b;font-size:9px}.v619-med-print-attachments-grid{display:grid;grid-template-columns:1fr 1fr;gap:5mm}.v619-med-print-attachment{margin:0;border:1px solid #d8e2e7;border-radius:7px;padding:2.5mm;break-inside:avoid;page-break-inside:avoid;background:#fff}.v619-med-print-attachment img{display:block;width:100%;height:105mm;object-fit:contain;background:#f8fafc}.v619-med-print-attachment figcaption{display:grid;gap:1mm;margin-top:2mm;text-align:center}.v619-med-print-attachment figcaption strong{color:#0f766e;font-size:10px}.v619-med-print-attachment figcaption span{color:#64748b;font-size:8px}

@media(min-width:721px){.v619-med-details-modal{align-items:center;padding:20px}.v619-med-details-dialog{border-radius:24px;max-height:90vh}}
@media(max-width:720px){.v619-med-card-grid{grid-template-columns:1fr}.v619-med-card-meta .attachments{margin-inline-start:0}.v619-med-detail-grid{grid-template-columns:1fr}.v619-med-detail-field.wide{grid-column:auto}.v619-med-attachment-gallery,.v619-med-pending-gallery{grid-template-columns:repeat(2,minmax(0,1fr))!important}.v619-med-details-dialog{height:94dvh}.v619-med-details-dialog>header h3{font-size:19px}.v619-med-upload-actions{grid-template-columns:1fr 1fr}}
@media(max-width:370px){.v619-med-card-actions{grid-template-columns:1fr 1fr}.v619-med-card-actions .view{grid-column:1/-1}.v619-med-card-actions .delete{grid-column:1/-1}.v619-med-upload-actions{grid-template-columns:1fr}}
@media print{
  @page{size:A4 portrait;margin:8mm}
  .v619-med-print-header,.v619-med-print-identity,.v619-med-print-section,.v619-med-print-bottom,.v619-med-print-footer,.v619-med-print-attachments-root{box-sizing:border-box}
  .v619-med-print-attachments-root{break-before:page!important;page-break-before:always!important}
  .v619-med-print-attachment{break-inside:avoid!important;page-break-inside:avoid!important}
}

/* ============================================================
   Sona3 v6.1.9 — Medical modification 4 refinement
   Larger A4 typography, clear icons and isolated attachment editing.
   ============================================================ */
.v619-med-attachment-actions{
  position:absolute;top:6px;left:6px;z-index:6;display:flex;align-items:center;gap:5px;direction:ltr
}
.v619-med-attachment-actions .v615-remove-attachment,
.v619-med-attachment-actions .v615-remove-pending,
.v619-med-attachment-actions .v619-med-edit-pending,
.v619-med-attachment-actions .v619-med-edit-existing{
  position:static!important;inset:auto!important;display:inline-flex;align-items:center;justify-content:center;
  width:30px;height:30px;min-width:30px;padding:0;border:0;border-radius:50%;color:#fff;
  font:900 18px/1 Arial,sans-serif;cursor:pointer;box-shadow:0 3px 9px rgba(15,23,42,.24)
}
.v619-med-attachment-actions .v619-med-edit-pending,
.v619-med-attachment-actions .v619-med-edit-existing{background:rgba(15,118,110,.95);font-size:17px}
.v619-med-attachment-actions .v615-remove-attachment,
.v619-med-attachment-actions .v615-remove-pending{background:rgba(153,27,27,.94)}
.v619-med-attachment-actions button:focus-visible{outline:3px solid rgba(255,255,255,.92);outline-offset:2px}
.v619-med-pending-card>img,.v619-med-attachment-card.existing .v619-med-attachment-image img{min-height:120px}

.v619-med-type-overlay{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(15,23,42,.62);direction:rtl}
.v619-med-type-dialog{width:min(360px,100%);padding:17px;border-radius:18px;background:#fff;box-shadow:0 24px 70px rgba(0,0,0,.28)}
.v619-med-type-dialog h3{margin:0;color:#0f4f67;font-size:18px}.v619-med-type-dialog p{margin:7px 0 12px;color:#64748b;font-size:11px;line-height:1.6}
.v619-med-type-dialog select{width:100%;height:45px;border:1px solid #cfdde3;border-radius:11px;background:#fbfdfe;padding:0 10px;font-family:inherit;font-size:13px;color:#17232e}
.v619-med-type-dialog>div{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:13px}.v619-med-type-dialog button{height:42px;border:1px solid #dbe4e8;border-radius:10px;background:#fff;color:#334155;font-family:inherit;font-weight:900;cursor:pointer}.v619-med-type-dialog .confirm{border:0;background:#0f766e;color:#fff}
.dark-mode .v619-med-type-dialog{background:#0f172a;color:#f8fafc}.dark-mode .v619-med-type-dialog h3{color:#ccfbf1}.dark-mode .v619-med-type-dialog select{background:#111d30;border-color:#334155;color:#f8fafc}

/* New medical PDF hierarchy — scoped only to the medical export markup. */
.v619-med-print-header{padding:1.5mm 0 4mm;border-bottom:2.5px solid #0f8793;gap:7mm}
.v619-med-print-header h1{font-size:29px;line-height:1.2;font-weight:900;letter-spacing:0;color:#173c67}
.v619-med-print-header .brand{gap:3mm}.v619-med-print-header .mark{width:15mm;height:15mm;font-size:24px;border-width:2.5px}
.v619-med-print-header .brand strong{font-size:16px;line-height:1.25}.v619-med-print-header .brand small{font-size:10px;line-height:1.35;margin-top:.7mm}
.v619-med-print-header svg,.v619-med-print-identity svg,.v619-med-print-section svg,.v619-med-print-bottom svg,.v619-med-print-attachments-root svg{display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

.v619-med-print-identity{grid-template-columns:1.55fr 1fr 1fr .85fr;margin:4mm 0 3mm;border-radius:10px;border-color:#cfdde3;background:#fff}
.v619-med-print-identity>div{padding:2.7mm 3mm;min-height:18mm;display:flex;flex-direction:column;justify-content:center}
.v619-med-print-identity small,.v619-med-print-cell small{display:flex;align-items:center;gap:1.3mm;color:#667085;font-size:11px;font-weight:700;line-height:1.25}
.v619-med-print-identity small svg{width:17px;height:17px;color:#15929b;flex:none}
.v619-med-print-identity strong{margin-top:1.2mm;color:#173c67;font-size:14px;line-height:1.3;font-weight:900}
.v619-med-print-identity .primary strong{font-size:16px}

.v619-med-print-section{padding:2.4mm;margin-bottom:2.2mm;border-radius:10px;border-color:#cfdde3;background:#fff}
.v619-med-print-section h2{gap:1.8mm;margin:0 0 2mm;color:#148b94;font-size:17.5px;line-height:1.2;font-weight:900}
.v619-med-print-section h2 .number{display:inline-flex;align-items:center;justify-content:center;width:25px;height:25px;border-radius:7px;background:#e9f8f7;color:#0f766e;font-size:12px;flex:none}
.v619-med-print-section h2 .icon{display:inline-flex;align-items:center;justify-content:center;width:25px;height:25px;flex:none}
.v619-med-print-section h2 .icon svg{width:23px;height:23px}
.v619-med-print-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:1.2mm;border:0;border-radius:0;overflow:visible}
.v619-med-print-cell{box-sizing:border-box;padding:2.3mm 2.5mm;border:1px solid #dce6ea!important;border-radius:7px;background:#fff;min-height:15.5mm}
.v619-med-print-cell.quarter{grid-column:span 1}.v619-med-print-cell.half{grid-column:span 2}.v619-med-print-cell.wide{grid-column:1/-1}
.v619-med-print-cell small svg{width:18px;height:18px;color:#15929b;flex:none}
.v619-med-print-cell strong{margin-top:1.25mm;color:#1d3553;font-size:14px;line-height:1.35;font-weight:800}
.v619-med-print-cell.primary-value strong,.v619-med-print-cell.key-value strong{font-size:15.5px;font-weight:900}
.v619-med-print-cell.long-value strong{font-size:13.5px;line-height:1.45}.v619-med-print-cell.diagnosis strong{font-size:14px}
.v619-med-print-cell.badge strong{padding:1.3mm 2.6mm;border-radius:999px;font-size:14px}
.v619-med-print-section.section-finance .v619-med-print-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
.v619-med-print-section.section-finance .v619-med-print-cell{grid-column:span 1;padding-inline:1.5mm;text-align:center}
.v619-med-print-section.section-finance .v619-med-print-cell small{justify-content:center;font-size:10.5px}.v619-med-print-section.section-finance .v619-med-print-cell strong{font-size:13.5px;white-space:nowrap}

.v619-med-print-bottom{margin-top:2.2mm;border-radius:10px;border-color:#cfdde3;background:#fff}
.v619-med-print-bottom>div{padding:2.8mm;min-height:17mm}.v619-med-print-bottom h3{display:flex;align-items:center;gap:1.5mm;margin:0 0 1.5mm;color:#173c67;font-size:14px;font-weight:900}
.v619-med-print-bottom h3 svg{width:20px;height:20px;color:#148b94;flex:none}.v619-med-print-bottom p{font-size:11.5px;line-height:1.55;color:#475569}
.v619-med-print-footer{margin-top:2.5mm;padding-top:2mm;border-top-width:2px;font-size:9.5px;font-weight:700}

/* First-page compact mode reduces wasted height before any scaling is applied. */
.v619-med-print-compact .v619-med-print-header{padding-bottom:2.8mm}.v619-med-print-compact .v619-med-print-identity{margin:2.8mm 0 2mm}
.v619-med-print-compact .v619-med-print-identity>div{padding-block:2mm;min-height:15.5mm}
.v619-med-print-compact .v619-med-print-section{padding:1.8mm;margin-bottom:1.5mm}.v619-med-print-compact .v619-med-print-section h2{margin-bottom:1.3mm}
.v619-med-print-compact .v619-med-print-cell{padding:1.7mm 2mm;min-height:13.5mm}.v619-med-print-compact .v619-med-print-bottom>div{padding:2mm;min-height:14mm}.v619-med-print-compact .v619-med-print-footer{margin-top:1.6mm}

.v619-med-print-attachments-root{box-sizing:border-box;width:100%;height:281mm;overflow:hidden;display:flex;flex-direction:column;break-before:page;page-break-before:always;background:#fff}
.v619-med-print-attachments-root>header{display:flex;justify-content:space-between;align-items:flex-end;gap:8mm;padding:1mm 0 3mm;margin:0 0 4mm;border-bottom:2.5px solid #0f8793}
.v619-med-print-attachments-root>header>div{min-width:0}.v619-med-print-attachments-root>header h2{display:flex;align-items:center;gap:2mm;margin:0;color:#173c67;font-size:23px;font-weight:900}.v619-med-print-attachments-root>header h2 svg{width:25px;height:25px;color:#148b94}
.v619-med-print-attachments-root>header p{margin:1.2mm 0 0;color:#64748b;font-size:11px;font-weight:700}.v619-med-print-attachments-root>header>span{color:#0f766e;font-size:11px;font-weight:900;white-space:nowrap}
.v619-med-print-attachments-grid{flex:1;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:repeat(2,minmax(0,1fr));gap:4mm;min-height:0}
.v619-med-print-attachment{display:flex;flex-direction:column;min-height:0;margin:0;padding:2.2mm;border-radius:9px;border-color:#cfdde3;overflow:hidden}
.v619-med-print-attachment img{flex:1;display:block;width:100%;height:auto;min-height:0;object-fit:contain;background:#f8fafc}
.v619-med-print-attachment figcaption{flex:none;gap:.8mm;margin-top:1.6mm}.v619-med-print-attachment figcaption strong{font-size:12px}.v619-med-print-attachment figcaption span{font-size:9.5px;line-height:1.35}
.v619-med-print-attachments-root>footer{display:flex;justify-content:space-between;gap:8px;margin-top:3mm;padding-top:2mm;border-top:2px solid #0f8793;color:#64748b;font-size:9.5px;font-weight:700}

@media print{
  @page{size:A4 portrait;margin:8mm}
  .v613-print-root.med-print-root{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
  .v616-print-summary-page,.v619-med-print-attachments-root{height:281mm!important}
  .v619-med-print-header h1{font-size:29px!important}.v619-med-print-section h2{font-size:17.5px!important}
  .v619-med-print-cell small,.v619-med-print-identity small{font-size:11px!important}.v619-med-print-cell strong{font-size:14px!important}
  .v619-med-print-cell.primary-value strong,.v619-med-print-cell.key-value strong{font-size:15.5px!important}.v619-med-print-cell.long-value strong{font-size:13.5px!important}
  .v619-med-print-attachments-root{break-before:page!important;page-break-before:always!important;break-after:page;page-break-after:always}
  .v619-med-print-attachments-root:last-child{break-after:auto!important;page-break-after:auto!important}
}

/* Keep the target font sizes at print scale by removing vertical waste first. */
.v619-med-print-compact .v619-med-print-header{padding-top:.8mm;padding-bottom:2.2mm}
.v619-med-print-compact .v619-med-print-identity{margin:2mm 0 1.4mm}
.v619-med-print-compact .v619-med-print-identity>div{padding:1.5mm 2.4mm;min-height:13.2mm}
.v619-med-print-compact .v619-med-print-section{padding:1.35mm;margin-bottom:1mm}
.v619-med-print-compact .v619-med-print-section h2{margin-bottom:.8mm}
.v619-med-print-compact .v619-med-print-grid{gap:.75mm}
.v619-med-print-compact .v619-med-print-cell{padding:1.25mm 1.8mm;min-height:11.8mm}
.v619-med-print-compact .v619-med-print-cell strong{margin-top:.75mm;line-height:1.28}
.v619-med-print-compact .v619-med-print-bottom{margin-top:1mm}
.v619-med-print-compact .v619-med-print-bottom>div{padding:1.45mm 2mm;min-height:12.5mm}
.v619-med-print-compact .v619-med-print-bottom h3{margin-bottom:.7mm}
.v619-med-print-compact .v619-med-print-footer{margin-top:1mm;padding-top:1.2mm}
@media print{
  html,body{margin:0!important;padding:0!important}
}


/* ===== Sona3 v6.1.9 Phase 3 — medical details, audit and page-one PDF ===== */
.v619-med-print-header{
  display:grid;grid-template-columns:minmax(42mm,.8fr) minmax(0,1.7fr);align-items:center;gap:8mm;
  padding:2mm 0 4mm;border-bottom:2.5px solid #0f8793;direction:rtl
}
.v619-med-print-header .brand{display:block;min-width:0}
.v619-med-print-header .brand strong,.v619-med-print-header .brand small{display:block}
.v619-med-print-header .brand strong{color:#173c67;font-size:17px;font-weight:900;line-height:1.25}
.v619-med-print-header .brand small{margin-top:1mm;color:#64748b;font-size:10.5px;font-weight:700;line-height:1.35}
.v619-med-print-header .document-heading{text-align:center;min-width:0}
.v619-med-print-header .document-heading h1{margin:0;color:#173c67;font-size:29px;line-height:1.15;font-weight:900}
.v619-med-print-header .document-meta{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:2mm 4mm;margin-top:2mm;color:#64748b;font-size:10.5px;font-weight:700}
.v619-med-print-header .document-meta b{color:#173c67;font-weight:900}
.v619-med-print-header .document-meta .status{display:inline-flex;align-items:center;min-height:7mm;padding:1.2mm 3mm;border-radius:999px;background:#e8f7f4;color:#0f766e;font-size:10.5px;font-weight:900}
.v619-med-print-summary-card{display:grid;grid-template-columns:1.35fr .65fr 1fr 1fr;margin:4mm 0 3mm;border:1px solid #cfdde3;border-radius:10px;overflow:hidden;background:#fff;direction:rtl}
.v619-med-print-summary-card>div{box-sizing:border-box;min-width:0;min-height:16.5mm;padding:2.5mm 3mm;border-inline-start:1px solid #e2e8ec;border-top:1px solid #e2e8ec;display:flex;flex-direction:column;justify-content:center}
.v619-med-print-summary-card>div:nth-child(-n+4){border-top:0}.v619-med-print-summary-card>div:nth-child(4n+1){border-inline-start:0}
.v619-med-print-summary-card small{color:#667085;font-size:10.5px;font-weight:700;line-height:1.2}
.v619-med-print-summary-card strong{display:block;min-height:1.25em;margin-top:1.2mm;color:#173c67;font-size:14px;line-height:1.3;font-weight:900;overflow-wrap:anywhere}
.v619-med-print-summary-card>div.wide strong{font-size:15.5px}
.v619-med-print-medical,.v619-med-print-finance{box-sizing:border-box;margin-bottom:2.4mm;padding:2.5mm;border:1px solid #cfdde3;border-radius:10px;background:#fff;break-inside:avoid;page-break-inside:avoid}
.v619-med-print-medical h2,.v619-med-print-finance h2{display:flex;align-items:center;gap:1.8mm;margin:0 0 2.2mm;color:#148b94;font-size:18px;line-height:1.2;font-weight:900}
.v619-med-print-medical h2 svg,.v619-med-print-finance h2 svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.v619-med-print-medical-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1.2mm}
.v619-med-print-medical .v619-med-print-cell{box-sizing:border-box;min-width:0;min-height:17mm;padding:2.5mm;border:1px solid #dce6ea!important;border-radius:7px;background:#fff}
.v619-med-print-medical .v619-med-print-cell.quarter{grid-column:span 1}.v619-med-print-medical .v619-med-print-cell.half{grid-column:span 2}
.v619-med-print-medical .v619-med-print-cell small{display:block;color:#667085;font-size:11px;font-weight:700;line-height:1.2}
.v619-med-print-medical .v619-med-print-cell strong{display:block;min-height:1.3em;margin-top:1.3mm;color:#1d3553;font-size:14.5px;line-height:1.4;font-weight:850;overflow-wrap:anywhere}
.v619-med-print-medical .v619-med-print-cell.primary-value strong{font-size:15.5px;font-weight:900}.v619-med-print-medical .v619-med-print-cell.diagnosis strong{font-size:15px}.v619-med-print-medical .v619-med-print-cell.long-value strong{font-size:13.5px}
.v619-med-print-medical .v619-med-print-cell.badge strong{display:inline-block;min-height:0;padding:1.2mm 2.8mm;border-radius:999px;background:#fff5e7;color:#9a5a00;font-size:13.5px}
.v619-med-print-finance-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1.2mm}
.v619-med-print-finance-cell{box-sizing:border-box;min-width:0;min-height:18mm;padding:2.5mm 1.5mm;border:1px solid #dce6ea;border-radius:7px;text-align:center;background:#fff;display:flex;flex-direction:column;justify-content:center}
.v619-med-print-finance-cell small{color:#667085;font-size:10.5px;font-weight:700;line-height:1.25}
.v619-med-print-finance-cell strong{display:block;min-height:1.3em;margin-top:1.3mm;color:#173c67;font-size:13.5px;line-height:1.3;font-weight:900;white-space:nowrap}
.v619-med-print-bottom{margin-top:0;margin-bottom:0;border-radius:10px;border-color:#cfdde3;background:#fff}
.v619-med-print-bottom>div{box-sizing:border-box;min-height:18mm;padding:2.7mm}.v619-med-print-bottom h3{font-size:14px}.v619-med-print-bottom p{min-height:1.4em;font-size:11.5px}
.v619-med-print-footer{margin-top:2.5mm;padding-top:2mm;border-top:2px solid #0f8793;font-size:9.5px;font-weight:700;direction:rtl}
.v619-med-print-footer span:last-child{direction:ltr;text-align:left}
.v619-med-print-compact .v619-med-print-header{padding-top:.5mm;padding-bottom:2.5mm}.v619-med-print-compact .v619-med-print-header .document-heading h1{font-size:26px}.v619-med-print-compact .v619-med-print-summary-card{margin:2.4mm 0 1.6mm}.v619-med-print-compact .v619-med-print-summary-card>div{min-height:13mm;padding:1.6mm 2.2mm}.v619-med-print-compact .v619-med-print-medical,.v619-med-print-compact .v619-med-print-finance{padding:1.5mm;margin-bottom:1.2mm}.v619-med-print-compact .v619-med-print-medical h2,.v619-med-print-compact .v619-med-print-finance h2{margin-bottom:1mm}.v619-med-print-compact .v619-med-print-medical-grid,.v619-med-print-compact .v619-med-print-finance-grid{gap:.7mm}.v619-med-print-compact .v619-med-print-medical .v619-med-print-cell,.v619-med-print-compact .v619-med-print-finance-cell{min-height:13mm;padding:1.4mm}.v619-med-print-compact .v619-med-print-bottom>div{min-height:13mm;padding:1.5mm 2mm}.v619-med-print-compact .v619-med-print-footer{margin-top:1mm;padding-top:1.2mm}
@media print{
  .v619-med-print-header .document-heading h1{font-size:29px!important}
  .v619-med-print-summary-card small,.v619-med-print-medical .v619-med-print-cell small{font-size:10.5px!important}
  .v619-med-print-summary-card strong{font-size:14px!important}.v619-med-print-summary-card>div.wide strong{font-size:15.5px!important}
  .v619-med-print-medical .v619-med-print-cell strong{font-size:14.5px!important}.v619-med-print-finance-cell strong{font-size:13.5px!important}
}

/* ============================================================
   Sona3 v6.1.9 — Medical PDF first page (v620 isolated layout)
   Attachment pages intentionally keep the approved v619 design.
   ============================================================ */
.v620-med-print-header,
.v620-med-summary-card,
.v620-med-section,
.v620-med-bottom,
.v620-med-footer{box-sizing:border-box;direction:rtl}
.v620-med-print-header svg,
.v620-med-summary-card svg,
.v620-med-section svg,
.v620-med-bottom svg{display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

.v620-med-print-header{
  display:grid;grid-template-columns:minmax(42mm,.9fr) minmax(82mm,1.45fr) minmax(36mm,.72fr);
  align-items:center;gap:5mm;padding:1.5mm 0 4mm;margin-bottom:3.2mm;border-bottom:2.4px solid #138b94
}
.v620-med-brand{min-width:0}.v620-med-brand strong,.v620-med-brand small{display:block}
.v620-med-brand strong{color:#173c67;font-size:16px;line-height:1.25;font-weight:900}
.v620-med-brand small{margin-top:.8mm;color:#5d7182;font-size:10px;line-height:1.35;font-weight:700}
.v620-med-title-block{text-align:center;min-width:0}.v620-med-title-block h1{margin:0;color:#173c67;font-size:28px;line-height:1.2;font-weight:900}
.v620-med-request-line{display:flex;align-items:center;justify-content:center;gap:1.5mm;flex-wrap:wrap;margin-top:2mm;color:#64748b;font-size:10.5px;font-weight:700}
.v620-med-request-line>b{color:#173c67;font-size:12px;overflow-wrap:anywhere}
.v620-med-status-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;color:#138b94}
.v620-med-status-icon svg{width:18px;height:18px}
.v620-med-status{display:inline-flex;align-items:center;justify-content:center;min-height:7mm;padding:0 3mm;border:1px solid #bde4d8;border-radius:999px;background:#eaf8f3;color:#0f766e;font-size:10.5px;font-weight:900;white-space:nowrap}
.v620-med-print-date{text-align:left;min-width:0}.v620-med-print-date span,.v620-med-print-date b{display:block}
.v620-med-print-date span{color:#64748b;font-size:9px;font-weight:700}.v620-med-print-date b{margin-top:1mm;color:#334155;font-size:9.5px;line-height:1.45;font-weight:800}

.v620-med-summary-card{margin-bottom:3mm;border:1px solid #cfdee4;border-radius:10px;background:#fff;overflow:hidden}
.v620-med-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
.v620-med-summary-cell{box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;min-width:0;min-height:19mm;padding:2.5mm 2.7mm;border-inline-start:1px solid #e1e9ed}
.v620-med-summary-cell:nth-child(4n+1){border-inline-start:0}
.v620-med-summary-cell:nth-child(n+5){border-top:1px solid #dce7eb}
.v620-med-summary-cell small,.v620-med-field small{display:flex;align-items:center;gap:1.2mm;color:#6b7785;font-size:10.5px;line-height:1.25;font-weight:700}
.v620-med-summary-cell small svg,.v620-med-field small svg{flex:none;width:18px;height:18px;color:#15929b}
.v620-med-summary-cell strong{display:block;margin-top:1.25mm;color:#1d3553;font-size:13.5px;line-height:1.35;font-weight:900;overflow-wrap:anywhere}
.v620-med-summary-cell.primary strong{font-size:15px}

.v620-med-section{margin-bottom:3mm;border:1px solid #cfdee4;border-radius:10px;background:#fff;overflow:hidden;break-inside:avoid;page-break-inside:avoid}
.v620-med-section>h2{display:flex;align-items:center;gap:2mm;margin:0;padding:2.3mm 3mm;background:linear-gradient(100deg,#118d96,#0f766e);color:#fff;font-size:17px;line-height:1.2;font-weight:900}
.v620-med-section>h2 svg{width:22px;height:22px;flex:none}
.v620-med-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;padding:2.4mm}
.v620-med-field{box-sizing:border-box;min-width:0;min-height:17mm;padding:2.2mm 2.5mm;border:1px solid #e0e8ec;background:#fbfdfe}
.v620-med-field.span-1{grid-column:span 1}.v620-med-field.span-2{grid-column:span 2}.v620-med-field.wide{grid-column:1/-1}
.v620-med-field:nth-child(1){border-radius:0 7px 0 0}.v620-med-field:nth-child(2){border-radius:7px 0 0 0}
.v620-med-field strong{display:block;margin-top:1.2mm;color:#1d3553;font-size:13.5px;line-height:1.4;font-weight:900;overflow-wrap:anywhere}
.v620-med-field .v620-med-value-badge{display:inline-flex;width:auto;min-height:7mm;align-items:center;padding:0 3mm;border:1px solid #bde4d8;border-radius:999px;background:#eaf8f3;color:#0f766e;font-size:12.5px}
.v620-med-field.diagnosis{min-height:27mm;border-radius:0 0 7px 7px;background:#fff}
.v620-med-field.diagnosis strong{font-size:14px;line-height:1.6;font-weight:800}

.v620-med-finance-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1.5mm;padding:2.5mm}
.v620-med-finance-field{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:20mm;padding:2mm 1.5mm;border:1px solid #dce7eb;border-radius:7px;background:#fbfdfe;text-align:center}
.v620-med-finance-field small{color:#667085;font-size:9.8px;line-height:1.35;font-weight:700}
.v620-med-finance-field strong{display:block;min-height:1.4em;margin-top:1.2mm;color:#173c67;font-size:13px;line-height:1.35;font-weight:900;overflow-wrap:anywhere}

.v620-med-bottom{display:grid;grid-template-columns:1.35fr .65fr;margin-top:.2mm;border:1px solid #cfdee4;border-radius:10px;background:#fff;overflow:hidden;break-inside:avoid;page-break-inside:avoid}
.v620-med-bottom>div{box-sizing:border-box;min-height:22mm;padding:2.7mm 3mm}.v620-med-bottom>div+div{border-inline-start:1px solid #dce7eb}
.v620-med-bottom h3{display:flex;align-items:center;gap:1.5mm;margin:0 0 1.5mm;color:#173c67;font-size:13.5px;font-weight:900}
.v620-med-bottom h3 svg{width:20px;height:20px;color:#138b94;flex:none}.v620-med-bottom p{margin:0;color:#475569;font-size:11.5px;line-height:1.55;font-weight:700;overflow-wrap:anywhere}
.v620-med-footer{display:flex;align-items:center;justify-content:space-between;gap:6mm;margin-top:3mm;padding-top:2mm;border-top:2px solid #138b94;color:#657482;font-size:9.5px;line-height:1.35;font-weight:700}

/* Reduce spacing only when the runtime fitter detects overflow. */
.v619-med-print-compact .v620-med-print-header{padding-top:.5mm;padding-bottom:2.5mm;margin-bottom:2mm}
.v619-med-print-compact .v620-med-title-block h1{font-size:25px}
.v619-med-print-compact .v620-med-summary-card,.v619-med-print-compact .v620-med-section{margin-bottom:1.8mm}
.v619-med-print-compact .v620-med-summary-cell{min-height:16mm;padding:1.7mm 2.2mm}
.v619-med-print-compact .v620-med-section>h2{padding:1.5mm 2.5mm;font-size:15.5px}
.v619-med-print-compact .v620-med-grid{padding:1.5mm}.v619-med-print-compact .v620-med-field{min-height:14mm;padding:1.5mm 2mm}
.v619-med-print-compact .v620-med-field.diagnosis{min-height:22mm}.v619-med-print-compact .v620-med-finance-grid{padding:1.5mm}
.v619-med-print-compact .v620-med-finance-field{min-height:17mm;padding:1.4mm 1mm}.v619-med-print-compact .v620-med-bottom>div{min-height:18mm;padding:1.8mm 2.4mm}
.v619-med-print-compact .v620-med-footer{margin-top:1.7mm;padding-top:1.3mm}

@media print{
  .v620-med-print-header,.v620-med-summary-card,.v620-med-section,.v620-med-bottom,.v620-med-footer{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
  .v620-med-title-block h1{font-size:28px!important}.v620-med-section>h2{font-size:17px!important}
  .v620-med-summary-cell small,.v620-med-field small{font-size:10.5px!important}.v620-med-summary-cell strong{font-size:13.5px!important}.v620-med-summary-cell.primary strong{font-size:15px!important}
  .v620-med-field strong{font-size:13.5px!important}.v620-med-field.diagnosis strong{font-size:14px!important}.v620-med-finance-field strong{font-size:13px!important}
}
