@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');
:root{--ink:#18312d;--muted:#70817c;--line:#e1e9e5;--bg:#f4f7f5;--green:#176b55;--green2:#e6f3ed;--gold:#b6812a;--red:#b43f42;--card:#fff;--shadow:0 8px 30px rgba(27,61,51,.055)}
*{box-sizing:border-box}html,body{width:100%;max-width:100%;overflow-x:hidden;overscroll-behavior-x:none}body{margin:0;background:var(--bg);color:var(--ink);font-family:'Cairo',-apple-system,BlinkMacSystemFont,sans-serif;font-size:14px;touch-action:pan-y}img,table,main,section,.layout,.content,.view{max-width:100%}button,input{font:inherit}button{cursor:pointer}.topbar{height:76px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 4vw;position:sticky;top:0;z-index:5}.brand{display:flex;gap:12px;align-items:center}.brand-mark{width:42px;height:42px;border-radius:13px;background:var(--green);color:#fff;display:grid;place-items:center;font-size:25px;font-weight:800}.brand strong{display:block;font-size:16px}.brand small{display:block;color:var(--muted);font-size:11px}.top-actions{display:flex;gap:9px;align-items:center;color:var(--muted);font-size:12px}.status-dot{width:8px;height:8px;background:#d9a441;border-radius:50%}.icon-btn{border:1px solid var(--line);background:#fff;border-radius:10px;padding:7px 11px;color:var(--ink)}.layout{max-width:1500px;margin:auto;display:grid;grid-template-columns:225px minmax(0,1fr);min-height:calc(100vh - 76px)}.sidebar{padding:26px 15px;border-left:1px solid var(--line);background:#fbfcfb;display:flex;flex-direction:column;gap:7px}.side-label{font-size:11px;color:#9aa7a2;padding:0 12px 9px}.nav{display:flex;align-items:center;gap:12px;text-align:right;width:100%;padding:12px;border:0;border-radius:10px;background:transparent;color:#536760}.nav span{font-size:24px;width:22px;text-align:center}.nav .nav-search-icon{font-size:28px}.nav[data-view="documents"] span{font-size:25px}.nav.active{background:var(--green2);color:var(--green);font-weight:700}.sidebar-note{margin-top:auto;background:#fff7e9;border:1px solid #f1e4c9;padding:14px;border-radius:12px;font-size:11px;color:#775c2c;line-height:1.9}.sidebar-note p{margin:5px 0 0}.side-foot{font-size:10px;color:#9aa7a2;padding:10px}.content{padding:32px clamp(16px,3vw,42px);min-width:0}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}.eyebrow{font-size:11px;color:var(--green);font-weight:700;margin:0 0 5px}.page-heading h1{margin:0;font-size:26px;letter-spacing:-.5px}.subheading{margin:6px 0 0;color:var(--muted);font-size:12px}.primary,.secondary,.danger-ghost{border-radius:10px;padding:10px 16px;border:1px solid transparent;font-weight:700;white-space:nowrap}.primary{background:var(--green);color:#fff}.primary:hover{background:#105643}.secondary{background:#fff;border-color:var(--line);color:var(--ink)}.danger-ghost{background:#fff;color:var(--red);border-color:#f0dada}.view{display:none}.view.active{display:block}.search-panel,.card,.selected-panel{background:var(--card);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow)}.search-panel{padding:22px}.search-panel>label{display:block;font-weight:700;margin-bottom:9px}.searchbox{height:52px;border:1px solid #cbd9d2;border-radius:12px;display:flex;align-items:center;gap:10px;padding:0 14px;background:#fcfefd}.searchbox:focus-within{border-color:var(--green);box-shadow:0 0 0 3px #176b5517}.searchbox>span{font-size:24px;color:var(--green)}.searchbox input{flex:1;min-width:0;border:0;outline:0;background:transparent;color:var(--ink)}.clear-btn{border:0;background:transparent;color:var(--muted);font-size:12px}.search-hint{color:var(--muted);font-size:11px;margin:10px 0 15px}.results{display:grid;gap:8px}.empty-state{text-align:center;padding:36px 16px;color:var(--muted)}.empty-icon{font-size:40px;color:#9cbab0}.empty-state strong{display:block;color:var(--ink);margin:8px}.empty-state p{font-size:12px}.result-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:14px;border:1px solid var(--line);border-radius:12px;align-items:center;transition:.15s}.result-row:hover{border-color:#9bc8b8;background:#fbfefc}.result-name{font-weight:700;overflow-wrap:anywhere}.result-meta{display:flex;gap:8px;flex-wrap:wrap;color:var(--muted);font-size:11px;margin-top:5px}.code{font-family:ui-monospace,monospace;direction:ltr;unicode-bidi:plaintext;color:#42635a}.result-actions{display:flex;align-items:center;gap:10px}.qty-chip{background:#f0f5f2;padding:5px 8px;border-radius:8px;font-size:11px;white-space:nowrap}.mini-btn{border:1px solid #c9ddd4;color:var(--green);background:white;border-radius:8px;padding:7px 11px;font-weight:700}.selected-panel{margin-top:18px;padding:20px}.hidden{display:none!important}.selected-head{display:flex;justify-content:space-between;gap:12px}.selected-head h2{font-size:18px;margin:0}.selected-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}.field-box{padding:12px;background:#f7faf8;border-radius:10px;min-width:0}.field-box span{display:block;color:var(--muted);font-size:11px}.field-box strong{display:block;margin-top:4px;overflow-wrap:anywhere}.quantity-area{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;border-top:1px solid var(--line);padding-top:16px}.quantity-area label,.form-grid label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:700}.quantity-area input,.form-grid input{width:100%;min-width:0;border:1px solid #d8e2dd;border-radius:9px;padding:10px;background:#fff;outline-color:var(--green)}.warning{background:#fff4e4;border:1px solid #efd8ae;color:#79521a;padding:11px;border-radius:9px;margin-top:12px;font-size:12px}.ok-note{background:#eaf6ef;color:#24694b;padding:10px;border-radius:9px;margin-top:12px;font-size:12px}.card{padding:22px;margin-bottom:18px}.card h2{margin:0 0 6px;font-size:17px}.muted{color:var(--muted);font-size:12px;line-height:1.8}.small{font-size:11px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:20px 0}.button-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.notice{font-size:11px;color:#805e28;background:#fff8ec;padding:12px;border-radius:9px;margin-top:18px;line-height:1.9}.stats-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:18px}.stat{background:#fff;border:1px solid var(--line);padding:18px;border-radius:14px}.stat span{display:block;font-size:11px;color:var(--muted)}.stat strong{display:block;font-size:26px;margin-top:6px}.card-head{display:flex;justify-content:space-between;align-items:start;gap:10px}.pill{background:var(--green2);color:var(--green);border-radius:20px;padding:5px 10px;font-size:10px}.upload-zone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;border:1.5px dashed #b8cec4;background:#f9fcfa;border-radius:13px;padding:28px 10px;cursor:pointer;margin:18px 0}.upload-zone:hover{border-color:var(--green);background:#f2faf5}.upload-zone span:last-of-type{color:var(--muted);font-size:11px}.upload-icon{font-size:25px;background:var(--green2);color:var(--green);width:45px;height:45px;border-radius:12px;display:grid;place-items:center}.import-log{font-size:11px;line-height:1.9;white-space:pre-wrap;background:#f7faf8;padding:12px;border-radius:9px;margin-top:14px;color:#60736a;max-height:250px;overflow:auto}.rules{padding-right:20px;line-height:2.2;font-size:12px}.toast{position:fixed;top:calc(env(safe-area-inset-top, 0px) + 16px);bottom:auto;left:50%;right:auto;transform:translate(-50%, -8px);max-width:calc(100vw - 32px);width:max-content;background:#183b32;color:#fff;border-radius:10px;padding:12px 18px;box-shadow:var(--shadow);opacity:0;pointer-events:none;transition:.2s;z-index:20}.toast.show{opacity:1;transform:translate(-50%, 0)}
@media(max-width:850px){.layout{grid-template-columns:1fr}.sidebar{position:fixed;z-index:8;bottom:0;right:0;left:0;height:68px;padding:6px 10px;flex-direction:row;justify-content:space-around;border-left:0;border-top:1px solid var(--line);background:#fff}.side-label,.sidebar-note,.side-foot{display:none}.nav{flex-direction:column;justify-content:center;gap:1px;padding:5px 2px;font-size:10px}.nav span{font-size:19px}.content{padding:22px 14px 90px}.topbar{padding:0 14px;height:66px}.top-actions #dbStatus{max-width:125px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.page-heading h1{font-size:22px}.page-heading{align-items:flex-start}.page-heading>.primary{font-size:11px;padding:9px}.selected-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.quantity-area{grid-template-columns:1fr 1fr}.result-row{grid-template-columns:minmax(0,1fr)}.result-actions{justify-content:space-between}.stats-grid{gap:7px}.stat{padding:12px}.stat strong{font-size:21px}.search-panel,.card,.selected-panel{padding:16px}}
@media(max-width:430px){.brand small{font-size:9px}.brand strong{font-size:14px}.top-actions{gap:5px}.page-heading{gap:8px}.page-heading>.primary{white-space:normal;max-width:110px}.form-grid{grid-template-columns:1fr}.quantity-area{grid-template-columns:1fr}.stats-grid{grid-template-columns:1fr 1fr}.stats-grid .stat:last-child{grid-column:1/-1}}
@media print{body{background:#fff}.topbar,.sidebar,.page-heading,.search-panel,.toast,.no-print{display:none!important}.layout{display:block}.content{padding:0}.view{display:none!important}.view.printing{display:block!important}.print-sheet{font-family:'Cairo',Arial,sans-serif;color:#111;padding:10mm;direction:rtl}.print-sheet h1,.print-sheet h2{text-align:center}.print-header{display:flex;justify-content:space-between;align-items:center;border-bottom:3px double #9a2626;padding-bottom:12px}.print-header strong{font-size:18px}.print-meta{display:flex;justify-content:space-between;margin:20px 0}.print-sheet table{width:100%;border-collapse:collapse;margin:20px 0}.print-sheet th,.print-sheet td{border:1px solid #333;padding:8px 5px;text-align:center;font-size:12px}.print-sheet .signature{margin-top:70px;display:flex;justify-content:space-between}.print-sheet .declaration{margin-top:70px;line-height:2.2}}

/* Data quality and print-template refinements */
.warning-tag{display:inline-block;background:#fff1d9;color:#875c19;border-radius:6px;padding:2px 7px;font-size:10px}
.doc-table{width:100%;border-collapse:collapse;font-size:12px}
.doc-table th,.doc-table td{border-bottom:1px solid var(--line);padding:10px 7px;text-align:right;vertical-align:top}
.doc-table th{background:#f5f8f6;color:#52685e;font-size:11px}
.stats-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:850px){.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@page{size:A4 portrait;margin:0}
@media print{
  .view.printing > *:not(#printArea):not(#procurementPrintArea){display:none!important}
  #printArea,#procurementPrintArea{display:block!important}
  .view.printing #printArea,.view.printing #procurementPrintArea{display:block!important}
  .print-sheet{padding:12mm;direction:rtl;font-family:"Cairo",Arial,sans-serif;font-size:12px;line-height:1.8;break-after:page;page-break-after:always}
  .print-sheet:last-child{break-after:auto;page-break-after:auto}
  .official-header{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;border-bottom:3px double #333;padding-bottom:12px;margin-bottom:24px}
  .ministry{display:flex;flex-direction:column;gap:2px;text-align:right}
  .ministry strong{font-size:17px}
  .ministry span{font-size:12px}
  .letter-meta{display:flex;flex-direction:column;gap:6px;text-align:left;font-size:11px}
  .recipient{margin:18px 0 6px;font-weight:700}
  .print-title{text-align:center;font-size:21px;margin:8px 0 16px}
  .document-body{font-size:14px;line-height:2.1;margin:10px 0}
  .print-sheet table{width:100%;border-collapse:collapse;margin:18px 0 24px;page-break-inside:auto}
  .print-sheet thead{display:table-header-group}
  .print-sheet tr{page-break-inside:avoid;page-break-after:auto}
  .print-sheet th,.print-sheet td{border:1px solid #333;padding:7px 5px;text-align:center;font-size:11px}
  .print-sheet th{font-weight:700;background:#f5f5f5!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .declaration{font-size:12px;line-height:2.2;margin-top:30px}
  .signature-row{display:flex;justify-content:space-between;gap:40px;margin-top:55px;font-size:12px}
  .signature-row>div{min-width:40%}
  .pharmacist{display:flex;flex-direction:column;align-items:flex-start;margin-top:35px}
  .director-signature{display:flex;flex-direction:column;align-items:flex-end;margin-top:50px;line-height:2}
  .draft-note{font-size:9px;color:#666;border-top:1px solid #bbb;margin-top:30px;padding-top:7px}
}

@media print{.view.printing .card,.view.printing #view-documents>.card{display:none!important}.form-date{margin:0}.step-title{text-align:center;margin:20px 0 5px}.finance-sign{margin-top:45px}.rules-note{font-size:10px;line-height:1.8}.print-sheet{break-inside:avoid}}

.packet-title{font-size:20px;text-align:center;margin:0 0 18px;border-bottom:2px solid #333;padding-bottom:10px}
@media print{
  @page{size:A4 portrait;margin:0}
  .view.printing>#printArea{display:block!important}
  #printArea{width:210mm;margin:0;padding:0;background:#fff;color:#111;font-family:"Traditional Arabic","Noto Naskh Arabic",serif;font-size:11pt;direction:rtl}
  .official-page{position:relative;width:210mm;height:297mm;min-height:297mm;max-height:297mm;overflow:hidden;box-sizing:border-box;background:#fff;padding:14mm 19mm 13mm;direction:rtl;break-after:page;page-break-after:always;color:#111;font-family:"Traditional Arabic","Noto Naskh Arabic",serif;line-height:1.5}
  .official-page:last-child{break-after:auto;page-break-after:auto}
  .official-page *{box-sizing:border-box}
  .official-page p{margin:3mm 0}
  .official-page .top-meta{display:flex;flex-direction:column;align-items:flex-start;gap:2mm;font-size:10.5pt;margin:13mm 0 16mm}
  .official-page .step{text-align:right;text-decoration:underline;font-size:15pt;margin:0 0 5mm;font-weight:700}
  .official-page .underlined{text-align:center;text-decoration:underline;font-size:16pt;margin:0 0 12mm;font-weight:700}
  .official-page .dept-row{display:flex;justify-content:space-between;gap:5mm;font-size:10pt;margin-bottom:4mm}
  .official-table{width:100%;border-collapse:collapse;table-layout:fixed;margin:0!important;font-size:10pt;direction:rtl}
  .official-table th,.official-table td{border:1px solid #666;padding:1mm 1.2mm;text-align:center;vertical-align:middle;font-size:10pt;height:7.3mm;line-height:1.2;background:#fff!important;color:#111}
  .official-table th{font-weight:700}
  .official-table .n{width:7%}.official-table .name{width:28%;text-align:right;padding-right:2mm}.official-table .qty{width:20%}.official-table .note{width:45%}.official-table .spec{width:23%}.official-table .cost{width:24%}
  .purchase-page .sign-row{display:flex;justify-content:space-between;margin:8mm 0 14mm;font-size:10pt}
  .purchase-page .step-lower{margin-top:0;margin-bottom:3mm}
  .stock-box{border:1px solid #666;height:76mm;padding:5mm 4mm;position:relative;font-size:11pt}
  .stock-title{text-decoration:underline;display:block;margin-bottom:5mm}
  .stock-sign{position:absolute;bottom:18mm;right:25mm}
  .cost-page{padding-top:12mm}
  .cost-page .step{margin-bottom:3mm}.cost-page .cost-title{font-size:15pt;margin-bottom:3mm}.cost-page .intro{font-size:10pt;line-height:1.6;margin:0 0 4mm}
  .cost-page .official-table th,.cost-page .official-table td{height:10mm;font-size:9.5pt;padding:.7mm}
  .cost-page .official-table .name{width:28%}.cost-page .official-table .qty{width:16%}.cost-page .official-table .spec{width:17%}.cost-page .official-table .cost{width:32%}
  .committee{margin-top:20mm;display:flex;flex-direction:column;align-items:flex-end;gap:2mm;font-size:10pt}
  .committee table{width:60%;border-collapse:collapse;margin-top:2mm}.committee th,.committee td{border:1px solid #666;height:10mm;text-align:center;padding:1mm}.committee .chair-sign{margin-top:13mm}
  .blank-finance-page{padding:16mm 19mm}
  .allocation-box{border:1px solid #666;height:72mm;padding:7mm;position:relative;margin-top:0;font-size:11pt}
  .allocation-box> b:first-child,.approval>b:first-child{display:block;text-align:right;text-decoration:underline;font-size:15pt;margin-bottom:4mm}
  .allocation-box h3,.approval h3{font-size:12pt;margin:0 0 4mm;text-align:right}
  .box-sign{position:absolute;bottom:11mm;left:14mm;right:auto;font-size:11pt}
  .allocation-recipient{display:inline-block;font-size:20pt;font-weight:700;line-height:1.5;min-width:62mm;text-align:center;vertical-align:middle}
  .approval{margin-top:38mm;text-align:right}
  .approval-box{border:1px solid #666;width:58%;height:29mm;margin:5mm auto 0}
  .internal-audit{margin-top:23mm;text-align:right;font-size:10.5pt;line-height:1.6}
  .internal-audit>b{display:block;text-decoration:underline;font-size:15pt;margin-bottom:3mm}
  .internal-audit>p{margin:0 0 4mm;font-weight:600}
  .audit-lines{display:flex;flex-direction:column;gap:0;margin:0 0 0 1mm}
  .audit-lines i{display:block;height:9mm;border-bottom:1px solid #666;font-style:normal}
  .supplier-page{padding-top:12mm}
  .supplier-meta{margin:0 0 20mm!important}
  .supplier-title{text-align:center;font-size:17pt;line-height:1.2;margin:0 0 5mm}
  .supplier-page .official-table th,.supplier-page .official-table td{height:7.7mm}
  .supplier-page .official-table .name{width:31%}.supplier-page .official-table .spec{width:18%}.supplier-page .official-table .qty{width:15%}.supplier-page .official-table .note{width:29%}
  .supplier-sign{margin:18mm 0 10mm 0;text-align:left;font-weight:700}
  .rules{font-size:10pt;line-height:1.8}.rules p{margin:2mm 0}
  .final-blank-page{padding:12mm 7mm}
  .contract-frame{border:1px solid #666;height:137mm;padding:7mm;position:relative;font-size:11pt}
  .contract-frame> b:first-child{display:block;text-align:right;margin-bottom:4mm}
  .contract-frame p{margin:2mm 0}
  .vendors{width:100%;border-collapse:collapse;margin-top:5mm;table-layout:fixed}.vendors th,.vendors td{border:1px solid #666;text-align:center;height:9mm;padding:1.2mm;font-size:9pt}.vendors th:nth-child(1),.vendors td:nth-child(1){width:23%}.vendors th:nth-child(2),.vendors td:nth-child(2){width:34%}.vendors th:nth-child(3),.vendors td:nth-child(3){width:25%}.vendors th:nth-child(4),.vendors td:nth-child(4){width:18%}
  .contract-sign{position:absolute;bottom:28mm;right:20mm;font-weight:700}
  .contract-confirm{border:1px solid #666;height:43mm;margin-top:8mm;padding:6mm;font-size:11pt;line-height:1.8}
  .contract-send{border:1px solid #666;height:36mm;margin-top:8mm;padding:6mm;font-size:10.5pt;line-height:1.8}
  /* Keep the official purchase form's complete second-step box on page 1. */
  .purchase-page{padding-top:10mm;padding-bottom:8mm}
  .purchase-page .top-meta{margin:7mm 0 9mm}
  .purchase-page .underlined{margin-bottom:7mm}
  .purchase-page .official-table th,.purchase-page .official-table td{height:5.3mm;padding:.45mm 1mm;font-size:9.5pt}
  .purchase-page .sign-row{margin:6mm 0 8mm}
  .purchase-page .stock-box{height:76mm;overflow:visible}
  .purchase-page .stock-sign{position:absolute;bottom:18mm;left:19mm;right:auto}
  /* The accountant signature belongs inside the step-four frame at left. */
  .allocation-box .box-sign{left:14mm;right:auto;bottom:5mm}
}
/* Use the supplied official Iraqi Ministry of Health logo on both official letters. */
#printArea .auth-page .letterhead,#printArea .apology-page .letterhead{position:relative;display:flex;justify-content:space-between;align-items:flex-start;line-height:1.9;font-weight:bold;margin:0 0 2mm;min-height:0}
#printArea .auth-page .ministry-logo,#printArea .apology-page .ministry-logo{position:absolute;width:25mm;height:20mm;object-fit:contain;left:50%;top:0;transform:translateX(-50%);z-index:1}
#printArea .auth-page .letterhead>div,#printArea .apology-page .letterhead>div{position:relative;z-index:2}
@media print{#printArea .letterhead{display:flex;justify-content:space-between;align-items:flex-start;line-height:1.9;font-weight:bold;margin:2mm 0 10mm}#printArea .letter-number{text-align:left;min-width:48mm}#printArea .letter-rule{border:0;border-top:3px double #111;margin:2mm 0 5mm}#printArea .letter-title{text-align:center;font-size:18pt;margin:3mm 0 5mm;text-decoration:underline}#printArea .letter-text{font-size:13pt;font-weight:bold;line-height:1.65;margin:3mm 0}#printArea .letter-sign{text-align:left;margin:12mm 8mm 0 0;line-height:2;font-size:12pt}#printArea .apology-page .declaration{margin-top:4mm}#printArea .auth-page .official-table,#printArea .apology-page .official-table{margin-top:3mm}}
@media print{#printArea .auth-page,#printArea .apology-page{font-family:Arial,sans-serif;color:#000;box-sizing:border-box;padding:13mm 12mm;position:relative;direction:rtl}#printArea .auth-page{page-break-after:always;break-after:page}#printArea .apology-page{page-break-after:always;break-after:page}#printArea .doc-meta{display:none}#printArea .letter-head{display:flex;justify-content:space-between;align-items:flex-start;font-weight:bold;line-height:1.8;margin-bottom:18mm}#printArea .letter-recipient{text-align:center;font-weight:bold;margin:8mm 0}#printArea .auth-page h2,#printArea .apology-page h2{text-align:center;margin:6mm 0;font-size:16pt}#printArea .letter-body{font-weight:bold;line-height:2;margin:6mm 0 10mm}#printArea .letter-storekeeper{margin-top:20mm;font-weight:bold}#printArea .letter-director{position:absolute;bottom:17mm;right:15mm;line-height:2.1;font-weight:bold}#printArea .apology-declaration{margin-top:25mm;line-height:2;font-weight:bold}#printArea .apology-sign{position:absolute;bottom:18mm;right:15mm;line-height:2;font-weight:bold}#printArea .auth-page .official-table,#printArea .apology-page .official-table{width:100%;border-collapse:collapse;font-size:10pt}#printArea .auth-page .official-table th,#printArea .auth-page .official-table td,#printArea .apology-page .official-table th,#printArea .apology-page .official-table td{border:1px solid #222;padding:2mm;text-align:center}#printArea .auth-page .official-table td,#printArea .apology-page .official-table td{height:9mm}}

.brand-logo{width:56px;height:56px;object-fit:contain;border-radius:14px;flex-shrink:0}.brand-mark{display:none}
@media print{
 #printArea .letter-route{font-weight:700;text-align:center;margin-top:8mm;font-size:13pt}
 #printArea .apology-recipient{text-align:center;font-weight:700;margin:5mm 0 3mm}
 #printArea .committee-pair{display:flex;justify-content:space-between;align-items:flex-start;gap:5mm;margin-top:4mm}
 #printArea .committee-pair .committee{width:49%;margin-top:0;gap:2mm;font-size:9pt}
 #printArea .committee-pair .committee table{width:100%;margin-top:2mm}
 #printArea .committee-pair .committee th,#printArea .committee-pair .committee td{font-size:8.5pt;height:9mm;padding:.5mm}
 #printArea .committee-pair .chair-sign{margin-top:8mm;font-size:8.5pt}
 #printArea .official-table{width:100%;table-layout:fixed;border-collapse:collapse}
 #printArea .official-table th,#printArea .official-table td{white-space:normal;overflow-wrap:anywhere;word-break:break-word;line-height:1.25}
 #printArea .official-table th:nth-child(1),#printArea .official-table td:nth-child(1){width:6%}
 #printArea .official-table th:nth-child(2),#printArea .official-table td:nth-child(2){width:48%}
 #printArea .official-table th:nth-child(3),#printArea .official-table td:nth-child(3){width:14%}
 #printArea .official-table th:nth-child(4),#printArea .official-table td:nth-child(4){width:10%}
 #printArea .official-table td.name{text-align:right;padding-right:2mm;padding-left:2mm}
 #printArea .date-year-left{direction:ltr;unicode-bidi:isolate;display:inline-block;white-space:nowrap}
 #printArea .auth-page .official-table th:nth-child(1),#printArea .auth-page .official-table td:nth-child(1){width:6%}
 #printArea .auth-page .official-table th:nth-child(2),#printArea .auth-page .official-table td:nth-child(2){width:49%}
 #printArea .auth-page .official-table th:nth-child(3),#printArea .auth-page .official-table td:nth-child(3){width:15%}
 #printArea .auth-page .official-table th:nth-child(4),#printArea .auth-page .official-table td:nth-child(4){width:10%}
 #printArea .auth-page .official-table th:nth-child(5),#printArea .auth-page .official-table td:nth-child(5){width:20%}
 #printArea .auth-page .official-table td.name{text-align:right;padding-right:2mm;padding-left:2mm}
}

/* Code-based user sessions and per-user operation history */
.auth-gate{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;padding:22px;background:rgba(8,25,23,.94);backdrop-filter:blur(8px)}
.auth-gate.auth-hidden{display:none}
body.auth-locked{overflow:hidden}
body.auth-locked>.topbar,body.auth-locked>.layout,body.auth-locked>#toast{visibility:hidden}
.login-card{width:min(100%,390px);padding:30px;border:1px solid #d9e5e1;border-radius:22px;background:#fff;box-shadow:0 24px 80px #0003;display:flex;flex-direction:column;gap:13px;color:#173d36}
.login-card h1{font-size:25px;margin:2px 0 0}.login-card>p{margin:0 0 8px;color:#687b76}.login-card>label:not(.remember-row){font-weight:700}
.login-card input:not([type=checkbox]){width:100%;height:54px;border:1px solid #cbd8d4;border-radius:12px;padding:10px 15px;font-size:24px;letter-spacing:9px;text-align:center;background:#f8fbfa;color:#163b34}
.auth-mark{width:54px;height:54px;border-radius:16px;display:grid;place-items:center;background:#123c35;color:white;font-size:29px;font-weight:800}
.remember-row{display:flex;align-items:center;gap:9px;font-size:14px}.remember-row input{width:18px;height:18px;accent-color:#123c35}
.login-error{color:#a32b2b!important;min-height:20px;font-size:13px;margin:0}
.user-session{font-size:13px;font-weight:700;white-space:nowrap;color:#123c35}
.logout-btn{padding:7px 10px;font-size:12px}
.history-panel{margin-top:24px;padding-top:20px;border-top:1px solid #e2eae7}
.history-panel h2{margin:0 0 5px;font-size:19px}
.history-list{display:grid;gap:10px;margin-top:14px}
.history-item{border:1px solid #e0e9e5;border-radius:13px;padding:14px;background:#fbfdfc}
.history-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}
.history-heading strong{font-size:14px}.history-heading span{font-size:12px;color:#55726a;background:#eaf2ef;border-radius:20px;padding:4px 9px}
.history-item p{margin:9px 0;color:#5b6e68;font-size:13px;line-height:1.8}
.history-actions{display:flex;gap:8px}.history-actions button{padding:7px 12px;font-size:12px}
@media(max-width:600px){.login-card{padding:24px}.user-session{display:none}.history-heading{display:block}.history-heading span{display:inline-block;margin-top:7px}}

/* About / attribution */
.about-credit{border-inline-start:4px solid var(--green);background:#f3f8f5;color:var(--green);font-weight:800;text-align:center;font-size:15px;line-height:1.9}
.about-credit p{margin:0}
.about-dialog{position:fixed;inset:0;z-index:100;background:rgba(8,24,19,.52);display:grid;place-items:center;padding:22px}
.about-dialog.hidden{display:none!important}
.about-dialog-card{position:relative;width:min(100%,360px);padding:30px 22px 24px;border-radius:20px;background:#fff;box-shadow:0 18px 60px #0003;text-align:center}
.about-dialog-card h2{margin:10px 0;font-size:20px}
.about-details-card{width:min(100%,520px);max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px);overflow-y:auto}
.about-description{text-align:right;color:var(--ink);font-weight:400;font-size:15px;line-height:1.9;margin:14px 0}
.about-description p{color:inherit;font-weight:400;margin:0 0 10px}
.about-dialog-card .about-credit-line{margin:14px 0 4px;font-size:14px;line-height:1.8}
.about-dialog-card .about-contact{margin:0 0 18px;font-size:14px;line-height:1.8;color:var(--ink);font-weight:600}
.about-contact a{color:var(--green);direction:ltr;unicode-bidi:embed;overflow-wrap:anywhere}
.about-dialog-card p{line-height:2;font-weight:800;color:var(--green);margin:12px 0 22px}
.about-mark{width:48px;height:48px;border-radius:15px;margin:auto;display:grid;place-items:center;background:var(--green2);color:var(--green);font-size:27px;font-weight:800}
.about-close{position:absolute;top:8px;left:10px;border:0;background:transparent;font-size:28px;color:var(--muted);padding:2px 8px}
@media(max-width:850px){.about-credit{font-size:14px;padding:18px 12px}.about-dialog-card{padding:28px 18px 20px}}

/* Small-screen Android usability fixes */
.doc-table{table-layout:fixed;width:100%}
.doc-table th,.doc-table td{overflow-wrap:anywhere;word-break:break-word}
.doc-table th:first-child,.doc-table td:first-child{width:35%}
.doc-table th:nth-child(2),.doc-table td:nth-child(2){width:27%}
.doc-table th:nth-child(3),.doc-table td:nth-child(3){width:17%}
.doc-table th:nth-child(4),.doc-table td:nth-child(4){width:13%}
@media(max-width:850px){.sidebar{height:calc(72px + env(safe-area-inset-bottom));padding:6px 8px calc(6px + env(safe-area-inset-bottom));}.nav{flex:1;min-width:0;line-height:1.25;white-space:normal;overflow-wrap:anywhere}.nav span{flex:0 0 auto}.content{padding-bottom:calc(100px + env(safe-area-inset-bottom))}.doc-table{font-size:11px}.doc-table th,.doc-table td{padding:8px 4px}.doc-table td{line-height:1.5}}

/* Prevent iOS Safari focus-zoom on every text-entry control without shrinking larger controls. */
@media screen {
  input:not([type="checkbox"]):not([type="radio"]), textarea, select {
    font-size: max(16px, 1em);
  }
}

/* Mobile search and print-page material-name editing */
.searchbox input{font-size:16px;min-height:44px}
.doc-table .doc-name-cell{overflow-wrap:anywhere}
.doc-table .doc-actions{display:flex;align-items:center;justify-content:center;gap:4px;white-space:nowrap;word-break:keep-all;overflow-wrap:normal}
.doc-table .doc-edit-btn{padding:7px 8px;font-size:12px;min-width:48px}
.doc-table .doc-delete-btn{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;word-break:keep-all;overflow-wrap:normal;min-width:44px;padding:7px 5px;font-size:13px;line-height:1.2;flex-shrink:0}
.doc-table td:last-child,.doc-table th:last-child{white-space:nowrap;word-break:keep-all;overflow-wrap:normal}

/* Popup for changing a material's print-only name */
.edit-name-dialog{position:fixed;inset:0;z-index:10001;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(8,25,23,.68);backdrop-filter:blur(4px)}
.edit-name-dialog.hidden{display:none!important}
.edit-name-card{position:relative;width:min(100%,760px);max-height:calc(100dvh - 36px);overflow-y:auto;padding:32px 26px 26px;border:1px solid #d9e5e1;border-radius:18px;background:#fff;box-shadow:0 24px 80px #0003;color:var(--ink)}
.edit-name-card h2{margin:0 0 8px;font-size:20px}
.edit-name-card>p{margin:0 0 18px}
.edit-name-card>label{display:block;font-weight:700;font-size:13px;margin-bottom:7px}
.edit-name-card input:not([type=hidden]){display:block;width:100%;min-height:100px;box-sizing:border-box;border:1px solid #cbd8d4;border-radius:10px;padding:10px 12px;font:inherit;font-size:16px;background:#fff;color:var(--ink)}
.edit-name-close{position:absolute;top:8px;left:10px;border:0;background:transparent;font-size:27px;color:var(--muted);padding:2px 8px}

/* Keep the material name independent from its edit control. */
.doc-name-cell .doc-name-text{display:block;overflow-wrap:anywhere;line-height:1.65}
.doc-name-cell .doc-edit-btn{display:block;margin:6px 0 0 auto;white-space:nowrap;padding:5px 10px;font-size:12px}
.history-actions{flex-wrap:wrap}

/* Make history deletion unmistakably visible on mobile and desktop. */
.history-actions .history-delete-btn{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 15px;border:1px solid #b4232d;border-radius:9px;background:#b4232d;color:#fff;font-weight:700;font-size:13px;white-space:nowrap;line-height:1.2;flex-shrink:0}
.history-actions .history-delete-btn:disabled{opacity:.55}
@media print{
 @page{size:A4 portrait;margin:0}
 html,body{margin:0!important;padding:0!important;width:210mm!important;height:auto!important}
 .view.printing,#printArea{display:block!important;width:210mm!important;margin:0!important;padding:0!important;overflow:visible!important;height:auto!important}
 /* iOS Safari adds an extra blank sheet when a full 296-297mm block overflows by fractions of a millimetre. */
 #printArea .official-page{position:relative!important;display:block!important;width:210mm!important;height:280mm!important;min-height:280mm!important;max-height:280mm!important;overflow:hidden!important;box-sizing:border-box!important;margin:0!important;padding:13mm 12mm!important;break-inside:avoid!important;page-break-inside:avoid!important}
 #printArea .official-page:not(:last-child){break-after:page!important;page-break-after:always!important}
 #printArea .official-page:last-child{break-after:auto!important;page-break-after:auto!important}
 #printArea .auth-page,#printArea .apology-page{height:280mm!important;min-height:280mm!important;max-height:280mm!important;break-after:auto!important;page-break-after:auto!important}
 #printArea .official-page *{box-sizing:border-box}
 /* Long material lists continue onto additional printed pages instead of being clipped. */
 #printArea .official-page.multi-item-page{height:auto!important;min-height:280mm!important;max-height:none!important;overflow:visible!important;break-inside:auto!important;page-break-inside:auto!important}
 #printArea .multi-item-page .official-table{break-inside:auto!important;page-break-inside:auto!important}
 #printArea .multi-item-page .official-table thead{display:table-header-group!important}
 #printArea .multi-item-page .official-table tr{break-inside:avoid!important;page-break-inside:avoid!important}
 #printArea .cost-page.multi-item-page .committee-pair{position:static!important;left:auto!important;right:auto!important;top:auto!important;margin-top:8mm!important;break-inside:avoid!important;page-break-inside:avoid!important}
 #printArea .auth-page.multi-item-page .fixed-signature,#printArea .apology-page.multi-item-page .fixed-signature{position:static!important;left:auto!important;right:auto!important;bottom:auto!important;margin:10mm 0 0!important;break-inside:avoid!important;page-break-inside:avoid!important}
 /* Keep committee approvals anchored lower on the estimate form, with room for signatures and stamp. */
 #printArea .cost-page{position:relative!important}
 #printArea .cost-page .committee-pair{position:absolute!important;left:12mm!important;right:12mm!important;top:180mm!important;margin:0!important;align-items:flex-start!important}
 #printArea .cost-page .committee{width:49%!important;margin:0!important}
 #printArea .cost-page .committee table{margin-top:2mm!important}
 #printArea .cost-page .committee .chair-sign{display:block!important;margin-top:12mm!important;min-height:18mm!important;line-height:1.8!important}
 /* Preserve the printed page frame consistently on every form. */
 #printArea .official-page{border:1px solid #b8b8b8!important;outline:1px solid #dedede!important;outline-offset:-4px!important}
}

/* Prevent iOS AirPrint from appending a blank final sheet after the last official form. */
@media print {
  .print-actions { display: none !important; }
  #printArea > .official-page:last-child {
    break-after: auto !important;
    page-break-after: auto !important;
    margin-bottom: 0 !important;
  }
}

/* Keep official signatures anchored at bottom-left, with year-only date below. */
@media print{
 #printArea .auth-page,#printArea .apology-page{position:relative!important}
 #printArea .auth-page .fixed-signature,#printArea .apology-page .fixed-signature{position:absolute!important;left:12mm!important;right:auto!important;bottom:14mm!important;margin:0!important;text-align:left!important;line-height:1.8!important;font-size:12pt!important}
 #printArea .fixed-signature .signature-date{margin-top:2mm;direction:ltr;unicode-bidi:isolate;text-align:left;white-space:pre}
}

/* Large name editor: allow long medical names to be reviewed comfortably on phones. */
.edit-name-dialog{padding:12px}
.edit-name-card{width:min(100%,760px);max-height:calc(100dvh - 24px);overflow-y:auto}
.edit-name-card input#editMaterialName{min-height:clamp(110px,22vh,220px);height:auto;white-space:normal;overflow-wrap:anywhere;line-height:1.6}
@media(min-width:700px){.edit-name-card input#editMaterialName{min-height:150px}}

/* Use a multiline editor so the complete long material name is visible at once. */
.edit-name-card textarea#editMaterialName{display:block;width:100%;min-height:clamp(180px,30vh,300px);height:clamp(180px,30vh,300px);box-sizing:border-box;border:1px solid #cbd8d4;border-radius:10px;padding:14px 12px;font:inherit;font-size:18px;line-height:1.65;background:#fff;color:var(--ink);white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;resize:vertical;direction:auto;text-align:start;overflow-y:auto}
@media(max-width:600px){.edit-name-dialog{align-items:center;padding:12px}.edit-name-card{padding:28px 18px 20px;max-height:calc(100dvh - 24px)}.edit-name-card textarea#editMaterialName{min-height:clamp(190px,28vh,280px);height:clamp(190px,28vh,280px);font-size:17px}}

.history-edit-card{width:min(100%,760px);max-height:calc(100dvh - 24px);overflow:auto}
.history-edit-card>label{display:block;margin:10px 0 4px;font-weight:700;font-size:13px}
.history-edit-card input{width:100%;min-height:42px;box-sizing:border-box;border:1px solid #cbd8d4;border-radius:9px;padding:9px 10px;font:inherit;font-size:16px}
.history-edit-row{border:1px solid #d9e5e1;border-radius:10px;padding:12px;margin:12px 0}
.history-edit-row legend{font-weight:700;padding:0 6px}
.history-edit-row label{display:block;margin:8px 0;font-size:13px;font-weight:600}

/* Saved-history minutes: color-coded actions and delete at the lower-left edge. */
.history-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.history-actions>button:nth-child(3){background:#e8bd35!important;border-color:#d2a51c!important;color:#202020!important}
.history-actions>button:nth-child(4){background:#2878c8!important;border-color:#2168ad!important;color:#fff!important}
.history-actions>button:nth-child(5){background:#800020!important;border-color:#680019!important;color:#fff!important}
.history-actions>.history-delete-btn{background:#e5e7eb!important;border-color:#cbd0d6!important;color:#374151!important;margin-inline-start:auto;order:20}

.quantity-edit-cell{min-width:105px;text-align:center}.doc-qty-edit-btn{display:block;margin:6px auto 0;padding:5px 9px!important;font-size:12px!important;white-space:nowrap}.inline-qty-label{display:block;font-size:12px;font-weight:700}.inline-qty-label input{display:block;width:90px;max-width:100%;min-height:38px;margin:4px auto;padding:6px;border:1px solid #b9ccc5;border-radius:7px;font:inherit;font-size:16px}.inline-qty-warning{min-width:180px;text-align:right}.inline-qty-actions{display:flex;flex-direction:column;gap:5px;min-width:130px}.inline-qty-actions button{font-size:12px!important;padding:7px!important}.inline-qty-actions [hidden]{display:none!important}

.result-actions [data-add-direct]{white-space:normal;max-width:170px}

/* Keep direct-add as a full-width final action at the bottom of each search result card. */
.result-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;max-width:100%}
.result-actions .direct-add-btn{flex:0 0 100%;width:100%;min-height:44px;white-space:normal;max-width:none;order:10}
@media(max-width:850px){.result-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.result-actions .qty-chip{grid-column:1/-1;justify-self:end}.result-actions .mini-btn{width:100%;min-width:0;white-space:normal;line-height:1.5}.result-actions .direct-add-btn{grid-column:1/-1;grid-row:auto;min-height:46px}}

/* Align row actions to the bottom edge of each material row on narrow screens. */
#documentItems tbody tr{vertical-align:bottom}
#documentItems .doc-name-cell,#documentItems .quantity-edit-cell{vertical-align:bottom}
#documentItems .doc-edit-btn,#documentItems .doc-qty-edit-btn{margin-top:8px;display:block}
#documentItems .quantity-edit-cell{padding-bottom:12px}
#documentItems .doc-name-cell{padding-bottom:12px}

/* Keep the quantity value in its normal top position; only the edit action sits at the bottom. */
#documentItems .quantity-edit-cell{position:relative;vertical-align:top!important;padding-bottom:58px!important}
#documentItems .quantity-value{display:block;min-height:1.6em;line-height:1.6;text-align:center}
#documentItems .doc-qty-edit-btn{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);margin:0!important}

/* Android/WebView stability: prevent horizontal drift and overscroll bounce. */
@media screen{html,body{overflow-x:clip!important;overscroll-behavior-x:none!important;width:100%;min-width:0;position:relative}body{touch-action:pan-y pinch-zoom}.layout,.content,.search-panel,.card,.selected-panel{min-width:0;max-width:100%;overflow-wrap:anywhere}}
/* Keep viewport stabilization out of print layout: preserve A4 official-form pagination. */
@media print{html,body{position:static!important;overflow:visible!important;overscroll-behavior:auto!important;width:210mm!important;max-width:none!important;min-width:0!important;height:auto!important;touch-action:auto!important}.view.printing,#printArea{width:210mm!important;max-width:none!important;height:auto!important;overflow:visible!important;margin:0!important;padding:0!important}#printArea .official-page{width:210mm!important;height:280mm!important;min-height:280mm!important;max-height:280mm!important;margin:0!important;box-sizing:border-box!important;break-inside:avoid!important;page-break-inside:avoid!important}#printArea .official-page:not(:last-child){break-after:page!important;page-break-after:always!important}#printArea .official-page:last-child,#printArea > .official-page.final-blank-page{break-after:avoid-page!important;page-break-after:avoid!important;break-before:auto!important;page-break-before:auto!important;margin-bottom:0!important}#printArea > .official-page.final-blank-page{height:277mm!important;min-height:277mm!important;max-height:277mm!important;overflow:hidden!important}}


/* Per-user picker for authorized persons and storekeepers. */
.name-picker-field{position:relative;display:flex;align-items:center;width:100%;min-width:0}
.name-picker-field input{width:100%;min-width:0;padding-left:112px!important}
.name-picker-button{position:absolute;left:5px;top:50%;transform:translateY(-50%);z-index:1;border:1px solid #b8d5c9;border-radius:8px;background:#eaf5ef;color:#145b47;padding:7px 9px;font-size:12px;font-weight:800;white-space:nowrap}
.name-picker-card{width:min(100%,520px);overscroll-behavior:contain;touch-action:pan-y; -webkit-overflow-scrolling:touch}
#namePickerDialog{overscroll-behavior:none;touch-action:pan-y}
#namePickerDialog .name-picker-card{max-height:calc(100vh - 36px);max-height:calc(100dvh - 36px);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
#namePickerDialog .saved-name-list{overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain}
.name-picker-card>label{display:block;font-weight:700;margin:16px 0 6px}
.name-picker-card input#newSavedName{display:block;width:100%;min-height:46px;border:1px solid #cbd8d4;border-radius:10px;padding:10px 12px;font:inherit;font-size:16px;background:#fff;color:var(--ink)}
.saved-name-list{display:grid;gap:8px;max-height:min(38dvh,300px);overflow:auto;margin:14px 0}
.saved-name-row{display:flex;align-items:stretch;gap:6px;min-width:0}
.saved-name-option{display:flex;align-items:center;justify-content:space-between;gap:10px;flex:1;min-width:0;min-height:46px;text-align:right;border:1px solid #d8e5df;border-radius:10px;padding:10px 12px;background:#f9fcfa;color:var(--ink);font:inherit;font-weight:700;overflow-wrap:anywhere}
.saved-name-actions{display:flex;align-items:center;gap:4px;flex-shrink:0}
.saved-name-action{min-height:38px;padding:6px 9px;border:1px solid #d8e5df;border-radius:8px;background:#fff;font:inherit;font-size:12px;font-weight:800;white-space:nowrap}
.saved-name-action.edit{color:#145b47}
.saved-name-action.delete{color:#a32222;border-color:#edcaca}
.saved-name-option:active,.saved-name-option:hover{border-color:var(--green);background:var(--green2)}
.saved-name-empty{padding:18px 12px;text-align:center;border:1px dashed #cbd8d4;border-radius:10px;color:var(--muted);font-size:13px}


/* Prevent iOS Safari focus zoom on form controls throughout the site. */
@media (max-width: 767px) { input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px !important; } }

/* Selective procurement minutes actions */
.print-center-panel{margin-top:18px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#fff}.print-main-action{display:block;width:100%;min-height:54px;white-space:normal;line-height:1.5;border-radius:8px;padding:14px 12px;font-size:15px}.print-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));flex-wrap:nowrap;gap:8px;margin-top:12px}.print-actions button{min-width:0;min-height:44px;white-space:normal;line-height:1.4;padding:9px 6px;border-radius:8px}.minutes-receipt-btn{background:#d8a72e!important;color:#231b08!important;border:1px solid #b98b19!important}.minutes-evaluation-btn{background:#2563a6!important;color:#fff!important;border:1px solid #1d4f85!important}.minutes-referral-btn{background:#7a2438!important;color:#fff!important;border:1px solid #5e1b2b!important}.minutes-item-select{display:flex;align-items:center;justify-content:flex-start;gap:5px;grid-column:1/-1;background:#f3f7f5;border-radius:7px;padding:4px 7px;font-size:12px!important;line-height:1.35!important;width:max-content;max-width:100%;min-height:0!important}.minutes-item-select input{width:16px!important;height:16px!important;min-height:16px!important;max-height:16px!important;margin:0!important;flex:0 0 16px;accent-color:#1d6657}.minutes-item-select{font-size:12px!important}.minutes-item-select *{font-size:12px!important}

/* Clear numbered item descriptions in previous operations */
.history-material-list{display:grid;gap:7px;margin:12px 0 14px;text-align:right}.history-material-line{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:9px 11px;background:#f7faf8;border:1px solid #e3ebe6;border-radius:8px;line-height:1.7}.history-material-name{flex:1;min-width:0;overflow-wrap:anywhere;color:var(--ink);font-weight:600}.history-material-qty{flex:0 0 auto;white-space:nowrap;color:var(--green);font-weight:700;background:var(--green2);border-radius:7px;padding:2px 8px;font-size:12px}@media(max-width:480px){.history-material-line{gap:7px;padding:8px}.history-material-qty{font-size:11px;padding:2px 6px}}

/* Search result badges: national code and medicine type */
.search-meta-badge{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border:1px solid;border-radius:8px;font-size:11px;line-height:1.5;max-width:100%;flex-wrap:wrap}.search-meta-badge b{font-size:10px;white-space:nowrap}.national-code-badge{color:#7b2338;background:#fff5f6;border-color:#e8c5ce}.national-code-badge .code{color:#7b2338;font-weight:800}.kind-badge{color:#a75b12;background:#fff5e8;border-color:#f0d1a8}.kind-badge>span{font-weight:800}@media(max-width:600px){.search-meta-badge{padding:5px 7px;gap:5px}}

/* Pharmaceutical form badge: brown */
.dosage-form-badge{color:#79502b;background:#f7efe5;border-color:#d9b995}.dosage-form-badge>span{font-weight:800;color:#79502b}

.minutes-order-date-title{display:block!important;margin:10px 0 2px!important;font-size:15px!important;font-weight:700!important;color:var(--ink,#173b35)!important;text-align:right!important}

/* Keep the login form hidden while the account startup panel is visible. */
.login-card[hidden],#authLoading[hidden]{display:none!important}

/* Compact three-way print controls: letters only, purchase forms only, or everything. */
.print-center-panel{margin-top:10px;padding:8px;border-radius:10px}.print-document-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:0}.print-document-actions button{min-width:0;min-height:40px;white-space:normal;line-height:1.3;padding:8px 6px;font-size:13px;border-radius:7px}.print-main-action{width:100%;min-height:40px;padding:8px 6px;font-size:13px}.print-letters-btn{background:var(--primary,#176653)!important;color:#fff!important;border:1px solid var(--primary,#176653)!important}.print-purchases-btn{background:var(--primary,#176653)!important;color:#fff!important;border:1px solid var(--primary,#176653)!important}@media(max-width:640px){.print-document-actions{grid-template-columns:1fr;gap:6px}.print-document-actions button{min-height:38px}}

/* Printed tables: each cell draws its own edges. With collapsed borders the outer edge of a table sometimes
   disappeared (at page breaks, on scaled prints and on some printers) and the table looked open at the side. */
#printArea .official-page table{border-collapse:separate!important;border-spacing:0!important}
#printArea .official-page table th,#printArea .official-page table td{border:0!important;border-left:1.2px solid #222!important;border-bottom:1.2px solid #222!important}
#printArea .official-page table tr>:first-child{border-right:1.2px solid #222!important}
#printArea .official-page table thead tr:first-child>*{border-top:1.2px solid #222!important}
#printArea .official-page table thead{display:table-header-group}
#printArea .official-page table tr{break-inside:avoid;page-break-inside:avoid}
#printArea .ministry-logo{display:block}
#catalogsCard select{width:100%;min-height:44px;padding:8px 12px;border:1px solid #cbd8d4;border-radius:10px;background:#fff;font:inherit;color:inherit}
#catalogsCard .pill{white-space:nowrap}
/* ==== Apple minimal theme (screen only; print layouts are untouched) ==== */
@media screen{
:root{--accent:#0071e3;--accent-soft:rgba(0,113,227,.10);--ink:#1d1d1f;--muted:#6e6e73;--line:rgba(0,0,0,.08);--bg:#f5f5f7;--card:#ffffff;--fill:rgba(118,118,128,.12);--fill-soft:rgba(118,118,128,.07);--green:#0071e3;--green2:rgba(0,113,227,.10);--gold:#b25e00;--red:#d70015;--shadow:0 1px 2px rgba(0,0,0,.04),0 0 0 1px rgba(0,0,0,.05);--radius:18px;--ease:cubic-bezier(.2,.8,.2,1)}
@media(prefers-color-scheme:dark){:root{--accent:#2997ff;--accent-soft:rgba(41,151,255,.16);--ink:#f5f5f7;--muted:#a1a1a6;--line:rgba(255,255,255,.12);--bg:#000;--card:#1c1c1e;--fill:rgba(235,235,245,.16);--fill-soft:rgba(235,235,245,.08);--shadow:0 0 0 1px rgba(255,255,255,.08);color-scheme:dark}}
html body{background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Arabic","Cairo","Segoe UI",system-ui,sans-serif;font-size:15px;line-height:1.55;-webkit-font-smoothing:antialiased;letter-spacing:-.003em}
html body *{scrollbar-width:thin}

/* top bar + navigation */
html body .topbar{position:sticky;top:0;z-index:20;height:56px;padding:0 24px;background:rgba(255,255,255,.72);-webkit-backdrop-filter:saturate(180%) blur(22px);backdrop-filter:saturate(180%) blur(22px);border-bottom:1px solid var(--line);box-shadow:none}
@media(prefers-color-scheme:dark){html body .topbar{background:rgba(28,28,30,.72)}}
html body .brand-logo{width:34px;height:34px;border-radius:9px;box-shadow:none}
html body .top-actions{gap:12px;color:var(--muted);font-size:13px}
html body .status-dot{width:8px;height:8px;background:#34c759;box-shadow:none}
html body .icon-btn{width:32px;height:32px;border-radius:50%;border:0;background:var(--fill-soft);color:var(--muted)}
html body .layout{grid-template-columns:230px minmax(0,1fr);max-width:1240px;margin:0 auto}
html body .sidebar{background:transparent;border:0;padding:28px 14px;gap:2px}
html body .side-label{font-size:12px;font-weight:600;color:var(--muted);letter-spacing:.02em;padding:0 12px 8px}
html body .nav{border-radius:10px;padding:10px 12px;font-size:15px;font-weight:500;color:var(--ink);background:transparent;border:0;gap:10px;transition:background .18s var(--ease)}
html body .nav:hover{background:var(--fill-soft)}
html body .nav.active{background:var(--fill)!important;color:var(--ink)!important;font-weight:600}
html body .nav span{color:var(--muted);font-size:17px}
html body .nav.active span{color:var(--accent)}
html body .sidebar-note{background:transparent;border:0;border-top:1px solid var(--line);border-radius:0;color:var(--muted);font-size:12px;padding:16px 12px 0;margin-top:18px}
html body .sidebar-note strong{color:var(--ink);font-size:12px}
html body .side-foot{color:var(--muted);font-size:11px;padding:0 12px}
html body .content{padding:30px 28px 70px;max-width:980px;width:100%}
html body .page-heading{margin-bottom:22px}
html body .eyebrow{color:var(--muted);font-size:13px;font-weight:500;margin:0 0 4px;letter-spacing:0;text-transform:none}
html body .page-heading h1{font-size:34px;font-weight:700;letter-spacing:-.022em;line-height:1.15;margin:0;color:var(--ink)}

/* surfaces */
html body .card,html body .search-panel,html body .selected-panel,html body .stat{background:var(--card);border:0;border-radius:var(--radius);box-shadow:var(--shadow);padding:24px}
html body .card h2,html body .selected-head h2{font-size:20px;font-weight:700;letter-spacing:-.01em;color:var(--ink)}
html body .muted,html body .card p.muted{color:var(--muted)}
html body .card-head{margin-bottom:16px}
html body .stats-grid{gap:14px}
html body .stat{padding:18px 20px}
html body .stat span{color:var(--muted);font-size:13px}
html body .stat strong{font-size:30px;font-weight:700;letter-spacing:-.02em;color:var(--ink)}
html body .pill{background:var(--fill-soft);color:var(--muted);border:0;font-weight:600}

/* search */
html body .search-panel{padding:20px;margin-bottom:16px}
html body .search-panel>label{font-size:13px;font-weight:600;color:var(--muted);margin-bottom:8px;display:block}
html body .searchbox{background:var(--fill);border:0;border-radius:14px;min-height:52px;padding:0 16px;box-shadow:none;transition:box-shadow .18s var(--ease),background .18s}
html body .searchbox:focus-within{background:var(--card);box-shadow:0 0 0 4px var(--accent-soft),0 0 0 1.5px var(--accent)}
html body .searchbox>span{color:var(--muted);font-size:20px}
html body .searchbox input{background:transparent;border:0;outline:0;box-shadow:none;font-size:17px;color:var(--ink)}
html body .searchbox input::placeholder{color:var(--muted)}
html body #clearSearch{background:transparent;border:0;color:var(--accent);font-weight:500}
html body .results{gap:10px}
html body .result-row{background:var(--card);border:0;border-radius:16px;box-shadow:var(--shadow);padding:16px 18px;transition:transform .18s var(--ease),box-shadow .18s var(--ease)}
html body .result-row:hover{transform:translateY(-1px);box-shadow:0 6px 24px rgba(0,0,0,.08),0 0 0 1px rgba(0,0,0,.05)}
html body .result-name{font-size:16px;font-weight:600;letter-spacing:-.01em;color:var(--ink);line-height:1.4}
html body .result-meta,html body .result-meta span{color:var(--muted);font-size:12.5px}
html body .search-meta-badge{background:var(--fill-soft);border:0;border-radius:8px;color:var(--muted);padding:3px 9px;font-size:12px;gap:6px}
html body .search-meta-badge b{color:var(--muted);font-weight:500}
html body .search-meta-badge .code,html body .search-meta-badge span{color:var(--ink)}
html body .search-meta-badge .code{font-variant-numeric:tabular-nums;letter-spacing:.01em}
html body .warning-tag{background:rgba(255,159,10,.14);color:#b25e00;border-radius:8px;font-size:11.5px;font-weight:600}
html body .warning{background:rgba(255,159,10,.10);border:0;border-radius:12px;color:var(--ink)}
html body .result-actions{gap:8px}
html body .result-actions .qty-chip{background:var(--fill-soft);color:var(--ink);border:0;border-radius:980px;padding:6px 12px;font-weight:600}
html body .empty-state{background:transparent;border:0;color:var(--muted)}
html body .empty-state strong{color:var(--ink);font-size:17px}
html body .empty-icon{background:var(--fill-soft);color:var(--muted);border-radius:50%}

/* buttons */
html body button{font-family:inherit}
html body .primary,html body .direct-add-btn,html body .result-actions .direct-add-btn,html body #printBoth{background:var(--accent)!important;color:#fff!important;border:0!important;border-radius:12px!important;font-weight:600;padding:10px 18px;box-shadow:none!important;transition:filter .15s,transform .15s var(--ease)}
html body .primary:hover,html body .direct-add-btn:hover{filter:brightness(1.08);transform:none}
html body .primary:active,html body .direct-add-btn:active{filter:brightness(.94)}
html body .secondary,html body .mini-btn,html body .name-picker-button,html body .print-letters-btn,html body .print-purchases-btn,html body .minutes-evaluation-btn,html body .minutes-receipt-btn,html body .minutes-referral-btn,html body .doc-edit-btn,html body .doc-qty-edit-btn,html body .history-actions button{background:var(--fill-soft)!important;color:var(--accent)!important;border:0!important;border-radius:12px!important;font-weight:600;padding:9px 16px;box-shadow:none!important;transition:background .15s}
html body .secondary:hover,html body .mini-btn:hover,html body .name-picker-button:hover,html body .print-letters-btn:hover,html body .print-purchases-btn:hover,html body .minutes-evaluation-btn:hover,html body .minutes-receipt-btn:hover,html body .minutes-referral-btn:hover,html body .doc-edit-btn:hover,html body .doc-qty-edit-btn:hover,html body .history-actions button:hover{background:var(--fill)!important}
html body .history-actions .history-delete-btn,html body .danger-ghost,html body .doc-delete-btn,html body .clear-btn{background:transparent!important;color:var(--red)!important;border:0!important;font-weight:600}
html body .danger-ghost:hover,html body .doc-delete-btn:hover{background:rgba(255,59,48,.10)!important}
html body .button-row{gap:10px}
html body .print-center-panel{background:transparent;border:0;padding:0;margin-top:22px}
html body .print-document-actions,html body .print-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;margin-bottom:10px}
html body .print-document-actions button,html body .print-actions button{min-height:46px}

/* forms */
html body .form-grid{gap:16px}
html body .form-grid label,html body .quantity-area label{font-size:13px;font-weight:600;color:var(--muted)}
html body input:not([type=checkbox]):not([type=radio]):not([type=file]),html body select,html body textarea{background:var(--card);border:1px solid var(--line);border-radius:12px;min-height:44px;padding:8px 14px;color:var(--ink);font-size:15px;font-family:inherit;box-shadow:none;transition:border-color .15s,box-shadow .15s}
html body input:focus,html body select:focus,html body textarea:focus{outline:0;border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-soft)}
html body .name-picker-field{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:4px;gap:6px}
html body .name-picker-field input{border:0!important;box-shadow:none!important;background:transparent!important;min-height:38px}
html body .name-picker-button{padding:7px 12px;font-size:13px}
html body .upload-zone{background:var(--fill-soft);border:1.5px dashed var(--line);border-radius:16px;color:var(--muted)}
html body .upload-zone:hover{background:var(--accent-soft);border-color:var(--accent)}
html body .upload-icon{background:var(--card);color:var(--accent);border-radius:50%;box-shadow:var(--shadow)}
html body .import-log{background:var(--fill-soft);border:0;border-radius:12px;color:var(--muted)}

/* document table + history */
html body .doc-table{border-collapse:separate;border-spacing:0;font-size:14px}
html body .doc-table th{background:transparent;color:var(--muted);font-size:12px;font-weight:600;border-bottom:1px solid var(--line);padding:10px 8px}
html body .doc-table td{border-bottom:1px solid var(--line);padding:14px 8px;vertical-align:middle}
html body .doc-table tr:last-child td{border-bottom:0}
html body .doc-table td.code,html body .code{font-variant-numeric:tabular-nums;color:var(--muted)}
html body .doc-name-cell{display:table-cell}
html body #documentItems .doc-name-cell .doc-edit-btn{margin-top:8px;display:inline-block}
html body .history-panel{border-top:1px solid var(--line);margin-top:28px;padding-top:22px}
html body .history-item{background:var(--fill-soft);border:0;border-radius:14px;padding:16px}
html body .history-heading{color:var(--ink);font-weight:600}
html body .history-material-list{color:var(--muted)}

/* dialogs, toast, login */
html body .edit-name-dialog,html body .about-dialog{background:rgba(0,0,0,.32);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
html body .edit-name-card,html body .about-dialog-card,html body .name-picker-card,html body .login-card{background:var(--card);border:0;border-radius:22px;box-shadow:0 24px 70px rgba(0,0,0,.25);color:var(--ink)}
html body .about-close{background:var(--fill-soft);border:0;color:var(--muted);border-radius:50%}
html body .toast{background:rgba(29,29,31,.9);color:#fff;border-radius:14px;box-shadow:0 10px 40px rgba(0,0,0,.25);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);font-weight:500;padding:12px 18px}
html body .auth-gate{background:var(--bg)}
html body .login-card{max-width:380px;padding:34px 30px}
html body .login-card h1{font-size:26px;font-weight:700;letter-spacing:-.02em}
html body .login-card input:not([type=checkbox]){text-align:center;font-size:22px;letter-spacing:.4em;min-height:54px;border-radius:14px}
html body .login-error{color:var(--red);font-size:13px}
html body .auth-mark{border-radius:20px;box-shadow:none}

/* phones: bottom tab bar */
@media(max-width:850px){
 html body .layout{grid-template-columns:1fr;max-width:none}
 html body .content{padding:20px 16px 96px}
 html body .page-heading h1{font-size:28px}
 html body .topbar{height:52px;padding:0 16px}
 html body .sidebar{background:rgba(255,255,255,.78);-webkit-backdrop-filter:saturate(180%) blur(22px);backdrop-filter:saturate(180%) blur(22px);border-top:1px solid var(--line);padding:6px 8px calc(6px + env(safe-area-inset-bottom));height:auto;min-height:62px}
 @media(prefers-color-scheme:dark){html body .sidebar{background:rgba(28,28,30,.78)}}
 html body .nav{flex-direction:column;gap:2px;padding:6px 4px;font-size:10.5px;font-weight:500;color:var(--muted);border-radius:10px;background:transparent!important}
 html body .nav.active{color:var(--accent)!important;font-weight:600;background:transparent!important}
 html body .nav span{font-size:21px}
 html body .card,html body .search-panel{padding:16px;border-radius:16px}
 html body .result-row{padding:14px;grid-template-columns:1fr}
 html body .result-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}
 html body .result-actions .direct-add-btn,html body .result-actions [data-add-direct]{grid-column:1/-1}
 html body .print-document-actions,html body .print-actions{grid-template-columns:1fr}
 html body .doc-table th:nth-child(4),html body .doc-table td:nth-child(4){display:none}
}
@media(prefers-reduced-motion:reduce){html body *{transition:none!important}}
}
/* ==== end Apple minimal theme ==== */
@media screen{
html body .searchbox input:not([type=checkbox]):not([type=radio]):not([type=file]){background:transparent;border:0;box-shadow:none;min-height:48px;padding:0 6px;font-size:17px}
html body .searchbox input:focus{border:0;box-shadow:none}
html body .top-actions strong,html body .top-actions #currentUserLabel,html body .user-chip{color:var(--ink)}
html body .top-actions button:not(.icon-btn){background:var(--fill-soft);color:var(--accent);border:0;border-radius:980px;font-weight:600;padding:7px 16px}
html body .doc-table td:last-child{border-bottom:1px solid var(--line)}
html body .doc-table td{vertical-align:middle}
html body .doc-delete-btn,html body .doc-table td:last-child button{color:var(--red)}
}
/* ==== Icons + dark-mode contrast fixes ==== */
@media screen{
html body .ico{display:inline-flex;align-items:center;justify-content:center;line-height:0;flex:none}
html body .ico svg,html body .icon-btn svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
html body .icon-btn svg{width:18px;height:18px}
html body .nav .ico{color:var(--muted);transition:color .18s var(--ease)}
html body .nav.active .ico{color:var(--accent)}
html body .searchbox .ico{color:var(--muted)}
html body .searchbox .ico svg{width:20px;height:20px}
html body .brand-logo{width:36px;height:36px;border-radius:50%;object-fit:contain;background:transparent}
html body .topbar .brand-logo{box-shadow:none}
}
@media screen and (prefers-color-scheme:dark){
html body :is(.history-item,.history-material-line,.saved-name-option,.saved-name-action,.minutes-item-select,.field-box,.import-log,.upload-zone,.qty-chip,.ok-note,.notice,.warning,.stat,.sidebar-note,.print-center-panel,.about-credit,.history-heading span,.national-code-badge,.kind-badge,.dosage-form-badge,.warning-tag){background:var(--fill-soft)!important;color:var(--ink)!important;border-color:var(--line)!important}
html body :is(.history-item p,.field-box label,.field-box span,.history-material-line span,.sidebar-note,.ok-note,.notice,.warning){color:var(--muted)!important}
html body :is(.history-item strong,.history-heading,.field-box strong,.history-material-line b,.history-material-line strong,.saved-name-option span,.saved-name-option b){color:var(--ink)!important}
html body :is(.edit-name-card input:not([type=hidden]),.edit-name-card textarea#editMaterialName,.name-picker-card input#newSavedName,.quantity-area input,.form-grid input,#catalogsCard select,.login-card input:not([type=checkbox])){background:#2c2c2e!important;color:var(--ink)!important;border-color:var(--line)!important}
html body :is(.result-row,.result-row:hover,.result-row:active,.result-row:focus-within){background:var(--card)!important;color:var(--ink)!important}
html body .result-row:hover{background:#252527!important}
html body :is(.result-name,.result-row strong){color:var(--ink)!important}
html body :is(.edit-name-card,.about-dialog-card,.name-picker-card,.login-card,.selected-panel,.search-panel,.card){color:var(--ink)}
html body .saved-name-action.edit{color:var(--accent)!important}
html body .saved-name-action:not(.edit){color:#ff6961!important}
html body .search-meta-badge{color:var(--ink)!important}
html body .search-meta-badge b,html body .search-meta-badge>span:first-child{color:var(--muted)!important}
html body .history-actions>.history-delete-btn{background:transparent!important;color:#ff6961!important}
html body input::placeholder,html body textarea::placeholder{color:#8e8e93!important}
html body .doc-table th{background:transparent!important;color:var(--muted)!important}
html body .upload-zone{border-color:var(--line)!important}
}
@media screen and (prefers-color-scheme:light){
html body :is(.edit-name-card input:not([type=hidden]),.edit-name-card textarea#editMaterialName,.name-picker-card input#newSavedName,.quantity-area input,.form-grid input,#catalogsCard select){background:#fff;color:var(--ink)}
}
/* ==== end icons/dark fixes ==== */

/* ==== search empty state ==== */
@media screen{
html body .empty-icon{background:transparent!important;border-radius:0!important;width:auto!important;height:auto!important;min-height:0!important;padding:0!important;margin:0 auto 6px!important;box-shadow:none!important;font-size:30px;color:var(--muted)}
html body #view-search .search-panel{display:flex;flex-direction:column;min-height:calc(100vh - 320px);min-height:calc(100dvh - 320px)}
html body #view-search .source-note{margin-top:auto!important;padding-top:48px;font-size:11px;line-height:1.8;opacity:.65}
}
/* Print: the phone layout (max-width:850px) adds ~100px bottom padding to .content, which pushed an extra blank sheet. */
@media print{
html body .content,html body .layout,html body .view.printing,html body #printArea{padding:0!important;margin:0!important;min-height:0!important;max-width:none!important}
html body .layout{display:block!important}
html body::after,html body::before{content:none!important;display:none!important}
}
/* ==== database stats: compact single row ==== */
@media screen{
html body .stats-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;margin-bottom:12px}
html body .stat{padding:10px 8px!important;border-radius:14px!important;text-align:center}
html body .stat span{font-size:11px!important;line-height:1.35;display:block;min-height:30px;color:var(--muted)}
html body .stat strong{font-size:20px!important;line-height:1.2;letter-spacing:-.02em}
}
@media screen and (max-width:420px){html body .stat span{font-size:10px!important}html body .stat strong{font-size:17px!important}}

/* iPhone home-screen app: fill the screen, print helper */
html{height:100%;background:var(--bg,#f5f5f7)}
body{min-height:100vh;min-height:100dvh}
.layout{min-height:100vh;min-height:100dvh}


/* iPhone standalone: content runs under the status bar */
html.ios-standalone .topbar{height:auto!important;min-height:52px;padding-top:env(safe-area-inset-top)!important;background:#243a51!important;border-bottom-color:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
html.ios-standalone .topbar,html.ios-standalone .topbar span,html.ios-standalone .topbar small,html.ios-standalone .topbar strong{color:#fff!important}
html.ios-standalone .topbar button{background:rgba(255,255,255,.16)!important;color:#fff!important;border-color:transparent!important}
/* Safari (browser): let the header and bottom bar run under the system bars */
@media screen{html body .topbar{height:auto!important;min-height:calc(52px + env(safe-area-inset-top));padding-top:env(safe-area-inset-top)!important;box-sizing:border-box}
html body .sidebar{padding-bottom:calc(6px + env(safe-area-inset-bottom))}
html,body{background-color:var(--bg,#f5f5f7)}}
/* stats in one row incl. last box; login logo */
html body .stats-grid .stat:last-child{grid-column:auto!important}
html body .auth-mark{width:72px;height:72px;border-radius:50%;background:#243a51 url("logo.svg?v=4") center/cover no-repeat;color:transparent!important;font-size:0!important;box-shadow:0 6px 18px rgba(36,58,81,.25)}
/* Let Safari treat the document as the scroller (content runs under its translucent bars) */
html,body{overflow-x:clip!important;overflow-y:visible!important}
