/* tools.ashry.win /papers/: the page controls, the A4 sheet (house style of the owner's HR papers), and print. */

/* ---- page controls ---- */
.sel{position:relative}
.sel select{width:100%;appearance:none;-webkit-appearance:none;background:var(--bg);border:1.5px solid var(--line);border-radius:12px;min-height:52px;padding:0 14px;padding-inline-end:40px;color:var(--fg);font:inherit;font-size:15px;font-weight:600;cursor:pointer}
.sel select:focus{border-color:var(--accent);outline:none}
.sel::after{content:"";position:absolute;inset-inline-end:16px;top:50%;width:8px;height:8px;border-inline-end:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:translateY(-70%) rotate(45deg);pointer-events:none}
.paper-chips{display:flex;flex-wrap:wrap;gap:8px}
.paper-chips button{border:1.5px solid var(--line);background:var(--bg);color:var(--fg);border-radius:999px;padding:8px 14px;min-height:40px;font:inherit;font-size:14px;font-weight:700;cursor:pointer}
.paper-chips button[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.ptxt{width:100%;background:var(--bg);border:1.5px solid var(--line);border-radius:12px;color:var(--fg);font:inherit;font-size:16px;font-weight:600;padding:12px 14px;min-height:52px}
.ptxt:focus{border-color:var(--accent);outline:none}
textarea.ptxt{min-height:84px;resize:vertical;line-height:1.6}
input.ptxt[type="date"],input.ptxt[type="time"]{min-height:52px}
.ptxt.ltr{direction:ltr}
[dir="rtl"] .ptxt.ltr{text-align:right}
details.grp{border:1px solid var(--line);border-radius:12px;padding:0 14px;margin-bottom:14px}
details.grp>summary{cursor:pointer;font-weight:700;padding:14px 0;list-style-position:inside}
details.grp[open]>summary{border-bottom:1px solid var(--line);margin-bottom:14px}
.logo-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.logo-row img{height:40px;max-width:120px;object-fit:contain;background:#fff;border-radius:6px;padding:2px}
.logo-row input[type="file"]{max-width:100%;font:inherit;font-size:13px}
.pwarn{font-size:13.5px;color:var(--warn);background:var(--warn-soft);border-radius:10px;padding:8px 12px;margin-bottom:14px}

/* ---- the preview: a real A4 sheet, scaled to the phone ---- */
.stage{position:relative;max-width:100%;overflow:hidden;border-radius:6px;box-shadow:0 2px 14px rgba(0,0,0,.18);background:#fff;margin:0 auto}
.stage .sheet{position:absolute;top:0;left:0;transform-origin:0 0}
#printSheet{display:none}

/* ---- the sheet ---- */
.sheet{width:210mm;height:296mm;padding:12mm 15mm 10mm;display:flex;flex-direction:column;background:#fff;color:#0f172a;
  font-family:"Plex Arabic",Manrope,sans-serif;direction:rtl;text-align:right;box-sizing:border-box;text-underline-offset:55%;
  -webkit-print-color-adjust:exact;print-color-adjust:exact}
.sheet *{box-sizing:border-box}
.sheet bdi,.sheet bdo{font-family:Manrope,"Plex Arabic",sans-serif}
.sheet .doc-lh,.sheet .doc-ft,.sheet .doc-bottom,.sheet .doc-title{flex-shrink:0}
.sheet .doc-lh{display:flex;justify-content:space-between;align-items:center;gap:8mm;padding-bottom:3.5mm;border-bottom:1.5px solid #0f172a}
.sheet .doc-lh-info{text-align:right;line-height:1.55;min-width:0}
.sheet .doc-lh-name{font-size:17px;font-weight:700}
.sheet .doc-lh-logo{height:15mm;width:auto;max-width:50mm;object-fit:contain;display:block}
.sheet .doc-lh-space{height:22mm;flex-shrink:0}
.sheet .doc-ft{margin-top:5mm;border-top:1px solid #cbd5e1;padding-top:2.5mm;display:flex;justify-content:center;flex-wrap:wrap;gap:0 3mm;font-size:10.5px;font-weight:600;color:#475569;line-height:1.6;text-align:center}
.sheet .doc-ft-sep{color:#cbd5e1}
/* The site's micro-text mark: looks like a thin grey rule; up close it reads tools.ashry.win · AS (owner, 4 Nov 2026) */
.sheet .doc-micro{margin-top:4mm;font:600 3pt/1 Manrope,sans-serif;letter-spacing:.06em;color:#6b7280;white-space:nowrap;overflow:hidden;
  direction:ltr;text-align:left;height:3.2pt}
.sheet .doc-title{text-align:center;margin:6mm 0 5mm}
.sheet .doc-title h1{font-size:22px;font-weight:700;margin:0;line-height:1.45;color:#0f172a}
.sheet .doc-title h1::after{content:"";display:block;width:44px;height:3px;border-radius:2px;background:#0f3d5e;margin:5px auto 0}
.sheet .doc-title.is-alert h1{color:#b91c1c}
.sheet .doc-title.is-alert h1::after{background:#b91c1c}
.sheet .doc-lead{font-size:15px;font-weight:700;margin:0 0 3mm}
.sheet .subject{font-size:14px;margin-bottom:2mm}
.sheet .subject span{color:#64748b;font-weight:600}
.sheet .doc-prose{font-size:14px;line-height:1.85;text-align:justify;font-weight:500}
.sheet .doc-prose p{margin:0 0 2.5mm}
.sheet .doc-prose b,.sheet .doc-b{font-weight:700}
.sheet .doc-center{text-align:center}
.sheet .doc-red{color:#b91c1c}
.sheet .doc-kv{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2mm 8mm;border:1px solid #cbd5e1;border-radius:6px;padding:3.5mm 5mm;margin:0 0 4mm;font-size:13px;line-height:1.7}
.sheet .doc-kv>div{display:flex;gap:6px;align-items:baseline;min-width:0}
.sheet .doc-kv span{color:#64748b;font-weight:600;white-space:nowrap;flex-shrink:0}
.sheet .doc-kv b{font-weight:700;min-width:0;overflow-wrap:anywhere}
.sheet .doc-kv .is-wide{grid-column:1 / -1}
.sheet .doc-box{border:1px solid #cbd5e1;border-radius:6px;padding:3mm 5mm;margin:0 0 3mm;font-size:13px;line-height:1.8}
.sheet .doc-box-h{font-size:13px;font-weight:700;margin:0 0 1.5mm}
.sheet .facts{font-size:13px}
.sheet .box-text{font-weight:700;overflow-wrap:anywhere}
.sheet .charge-date{margin-top:1.5mm}
.sheet .charge-date span{color:#64748b;font-weight:600}
.sheet .doc-alert{border:1.5px dashed #b91c1c;background:#fef2f2;color:#991b1b;border-radius:6px;padding:3mm 4mm;font-size:12.5px;font-weight:700;line-height:1.85;margin:0 0 3mm}
.sheet .doc-fldline{display:flex;align-items:baseline;gap:6px}
.sheet .doc-fldline.gap{margin-top:5mm}
.sheet .doc-fldline>span:first-child{white-space:nowrap}
.sheet .doc-rule{flex:1;border-bottom:1px dotted #64748b;min-height:14px;min-width:50px}
.sheet .doc-blank{display:inline-block;height:.95em;border-bottom:1px dotted #64748b;vertical-align:baseline;margin:0 .12em}
.sheet .doc-fields{display:grid;grid-template-columns:repeat(var(--cols,3),minmax(0,1fr));gap:3mm 6mm;font-size:12.5px;font-weight:700;margin-top:2mm}
.sheet .receipt{padding:2.5mm 5mm;line-height:1.7}
.sheet .doc-bottom{margin-top:auto;padding-top:3mm;break-inside:avoid}
.sheet .doc-date{font-size:13px;font-weight:700;margin:0 0 3mm}
.sheet .doc-date span{color:#64748b;font-weight:600}
.sheet .doc-sigs{display:grid;grid-template-columns:repeat(var(--n,2),minmax(0,1fr));gap:0 5mm;align-items:stretch}
.sheet .doc-sig{display:flex;flex-direction:column;align-items:center;text-align:center;min-width:0}
.sheet .doc-sig-role{font-size:13px;font-weight:700;line-height:1.5}
.sheet .doc-sig-name{font-size:11.5px;font-weight:600;color:#475569;line-height:1.4;min-height:18px;overflow-wrap:anywhere}
.sheet .doc-sig-mark{margin-top:auto;height:22mm;width:100%;display:flex;align-items:flex-end;justify-content:center}
.sheet .doc-sig-line{width:82%;border-bottom:1px solid #0f172a}
.sheet .doc-sig-cap{font-size:10.5px;font-weight:600;color:#64748b;margin-top:1.2mm}
.sheet .doc-stamp{width:22mm;height:22mm;border:1px dashed #94a3b8;border-radius:50%}
.sheet .doc-thumb{width:16mm;height:21mm;border:1px dashed #94a3b8;border-radius:8mm 8mm 5mm 5mm}

/* ---- print: only the sheet, one A4 page ---- */
@media print{
  @page{size:A4 portrait;margin:0}
  html,body{background:#fff!important;margin:0;padding:0}
  body>*{display:none!important}
  body>#printSheet{display:block!important}
  #printSheet .sheet{margin:0;box-shadow:none}
}
