/* Factory Desk - display settings (text size, font, contrast) and the standard page preview / print layout. */

/* ---------- display settings button and panel ---------- */
#fdAa{position:fixed;right:14px;bottom:14px;z-index:900;width:44px;height:44px;border-radius:50%;border:2px solid #1f4e79;background:#fff;color:#1f4e79;font:700 17px Arial,sans-serif;cursor:pointer;box-shadow:0 2px 8px rgba(20,40,70,.25)}
#fdAa:hover{background:#eaf1f8}
#fdAaPanel{position:fixed;right:14px;bottom:66px;z-index:901;width:min(320px,calc(100vw - 28px));background:#fff;color:#111;border:2px solid #1f4e79;border-radius:10px;padding:12px 14px;box-shadow:0 8px 28px rgba(20,40,70,.3);font:14px/1.4 Arial,sans-serif}
#fdAaPanel[hidden]{display:none}
#fdAaPanel h3{margin:0 0 8px;font-size:15px;color:#1f4e79}
#fdAaPanel .row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:8px 0}
#fdAaPanel button{border:1px solid #888;background:#fff;color:#111;border-radius:6px;padding:6px 12px;font:inherit;cursor:pointer}
#fdAaPanel button:hover{background:#eef3f8}
#fdAaPanel select{font:inherit;padding:5px;border:1px solid #888;border-radius:6px;background:#fff;color:#111;max-width:100%}
#fdAaPanel label{display:flex;gap:6px;align-items:center;cursor:pointer}
#fdAaPanel .sz{font-weight:700;min-width:52px;text-align:center}
#fdAaPanel .note{color:#444;font-size:12px}

/* sidebar heights follow the text size, so the last menu items stay reachable */
.tabs.side,.sidebar{height:calc((100vh - var(--hdr,54px)) / var(--fdz,1))!important}

/* fonts that are easy to read */
html.fd-font-arial body,html.fd-font-arial body *{font-family:Arial,Helvetica,sans-serif!important}
html.fd-font-verdana body,html.fd-font-verdana body *{font-family:Verdana,Geneva,sans-serif!important}
html.fd-font-tahoma body,html.fd-font-tahoma body *{font-family:Tahoma,Geneva,sans-serif!important}
html.fd-font-georgia body,html.fd-font-georgia body *{font-family:Georgia,"Times New Roman",serif!important}
html.fd-space body,html.fd-space body *{line-height:1.65!important}

/* high contrast: black on white, strong borders, nothing pale */
html.fd-contrast body{color:#000!important;background:#fff!important}
html.fd-contrast .muted,html.fd-contrast .fld,html.fd-contrast .crumb,html.fd-contrast .muted-h,html.fd-contrast .kv .k,html.fd-contrast .kpi .l,html.fd-contrast .grp-h,html.fd-contrast nav.side h4{color:#111!important;opacity:1!important}
html.fd-contrast .card,html.fd-contrast .kpi,html.fd-contrast .pagebar,html.fd-contrast .tg,html.fd-contrast .person{border:2px solid #333!important}
html.fd-contrast .btn,html.fd-contrast button{border:2px solid #222!important;color:#000!important}
html.fd-contrast .btn.pri,html.fd-contrast .btn.ok{background:#0b3a66!important;color:#fff!important}
html.fd-contrast .tbl th,html.fd-contrast table.t th{background:#d9d9d9!important;color:#000!important;border:1px solid #000!important}
html.fd-contrast .tbl td,html.fd-contrast table.t td{border:1px solid #444!important}
html.fd-contrast .inp,html.fd-contrast input,html.fd-contrast select,html.fd-contrast textarea{border:2px solid #222!important;background:#fff!important;color:#000!important}
html.fd-contrast .side .tab.on,html.fd-contrast nav.side a.on,html.fd-contrast .nav-item.active{background:#cfe3f7!important;color:#000!important;border-left:6px solid #000!important}
html.fd-contrast a{color:#00308f!important;text-decoration:underline}
html.fd-contrast *:focus{outline:3px solid #b00020!important;outline-offset:2px}

/* ---------- standard page preview ---------- */
#fdPreview{position:fixed;inset:0;z-index:1000;background:#6b7280;display:flex;flex-direction:column;font-family:Arial,Helvetica,sans-serif}
#fdPreview .pv-tool{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:8px 14px;background:#fff;border-bottom:2px solid #1f4e79;color:#111;font-size:14px}
#fdPreview .pv-tool b{color:#1f4e79}
#fdPreview .pv-tool label{display:flex;align-items:center;gap:5px}
#fdPreview .pv-tool select,#fdPreview .pv-tool button{font:inherit;padding:6px 10px;border:1px solid #777;border-radius:6px;background:#fff;color:#111;cursor:pointer}
#fdPreview .pv-tool button.pri{background:#1f4e79;color:#fff;border-color:#1f4e79}
#fdPreview .pv-tool .sp{flex:1}
#fdPreview .pv-info{color:#333;font-size:13px}
#fdPreview .pv-stage{flex:1;overflow:auto;padding:22px 12px 40px;text-align:center}
#fdPreview .pv-sheet{display:inline-block;text-align:left;vertical-align:top;background:#fff;color:#000;box-shadow:0 4px 22px rgba(0,0,0,.45);box-sizing:border-box;position:relative}
#fdPreview .pv-sheet .pv-left{position:absolute;left:0;top:0;bottom:0;border-right:1px dashed #b9c2cf;background:repeating-linear-gradient(to bottom,#f4f6f9 0,#f4f6f9 6px,#fff 6px,#fff 12px);opacity:.9}
#fdPreview .pv-sheet .pv-leftlab{position:absolute;left:2mm;top:50%;transform:rotate(-90deg);transform-origin:left top;font-size:8pt;color:#8a94a3;white-space:nowrap}
#fdPreview .pv-doc{position:relative;font-size:10.5pt;line-height:1.4}
#fdPreview table.pv-frame{border-collapse:collapse;width:100%}
#fdPreview table.pv-frame>thead>tr>td,#fdPreview table.pv-frame>tfoot>tr>td{padding:0}
#fdPreview .pv-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;border-bottom:2px solid #000;padding-bottom:4px;margin-bottom:8px}
#fdPreview .pv-org{font-size:13pt;font-weight:700}
#fdPreview .pv-title{font-size:11pt;font-weight:700;text-align:center;flex:1}
#fdPreview .pv-meta{font-size:8.5pt;text-align:right;color:#222}
#fdPreview .pv-foot{display:flex;justify-content:space-between;border-top:1px solid #000;padding-top:3px;margin-top:8px;font-size:8.5pt;color:#222}
#fdPreview .pv-body{display:block;transform-origin:left top}
#fdPreview .pv-body h2{font-size:13pt;margin:10px 0 6px;color:#000}
#fdPreview .pv-body h3{font-size:11.5pt;margin:10px 0 4px;color:#000}
#fdPreview .pv-body .card{border:0;padding:0;margin:0 0 10px;background:#fff}
#fdPreview .pv-body table{border-collapse:collapse;width:100%}
#fdPreview .pv-body th,#fdPreview .pv-body td{border:1px solid #666;padding:3px 5px;font-size:9.5pt;color:#000;background:#fff;vertical-align:top}
#fdPreview .pv-body th{background:#eee!important;color:#000!important;font-weight:700}
#fdPreview .pv-body tr.sec td,#fdPreview .pv-body tfoot td,#fdPreview .pv-body tr.grp td,#fdPreview .pv-body tr.tot td{background:#f3f3f3!important;color:#000!important;font-weight:700}
#fdPreview .pv-body .scroll{overflow:visible!important;border:0!important;max-width:none!important}
#fdPreview .pv-body .pill,#fdPreview .pv-body .tag,#fdPreview .pv-body .banner,#fdPreview .pv-body .warnbox,#fdPreview .pv-body .sev{background:#fff!important;color:#000!important;border:1px solid #777!important;padding:1px 6px;border-radius:0}
#fdPreview .pv-body div.grid3,#fdPreview .pv-body div.row2,#fdPreview .pv-body div.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:4px 14px}
#fdPreview .pv-body .muted{color:#222!important}
#fdPreview .pv-body .v{border-bottom:1px solid #999;padding:0 2px}
#fdPreview .pv-body .pc1,#fdPreview .pv-body .pc3{background:#fff!important}
#fdPreview .pv-body .badge{display:none}

@media print{
  html.fd-previewing body{display:none!important}
  #fdAa,#fdAaPanel{display:none!important}
  #fdPreview{position:static!important;background:#fff!important;display:block!important;overflow:visible!important}
  #fdPreview .pv-tool{display:none!important}
  #fdPreview .pv-stage{padding:0!important;overflow:visible!important;background:#fff!important}
  #fdPreview .pv-sheet{display:block!important;box-shadow:none!important;width:auto!important;min-height:0!important;padding:0!important;margin:0!important;background:#fff!important}
  #fdPreview .pv-left,#fdPreview .pv-leftlab,#fdPreview .pv-guide{display:none!important}
  #fdPreview table.pv-frame>thead{display:table-header-group}
  #fdPreview table.pv-frame>tfoot{display:table-footer-group}
  #fdPreview .pv-body tr{break-inside:avoid}
  #fdPreview .pv-body thead{display:table-header-group}
}

#fdPreview .pv-body > *{max-width:none!important;margin:0!important;padding:0!important;width:auto!important;float:none!important}
#fdPreview .pv-body .shell{display:block!important}
