/* Documents: the strip under the request text, the page order of the case page, and the full-screen viewer (DocStrip / DocViewer).
   Tokens only (light + dark); flex/grid children carry min-width:0. */

/* ---------- case page: header ⇒ fields sheet ⇒ numbered drawers (structure quiz 7 Nov 2026: «د» + the sheet of «ج») ---------- */
.cx{display:flex;flex-direction:column;gap:14px}
.cx .cd-hd{margin-bottom:0}
.cx .note-warn{margin:0}
.cx-sheet{overflow:hidden;padding:0}
.cx-sheet dl{margin:0 0 -1px;display:grid;grid-template-columns:minmax(0,1fr)}
.cx-sheet .kv{display:grid;grid-template-columns:92px minmax(0,1fr);border-bottom:1px solid var(--sep);min-height:48px}
.cx-sheet dt{display:flex;align-items:center;padding:8px 14px;font-size:13px;color:var(--ink3);background:color-mix(in srgb,var(--field) 55%,transparent)}
.cx-sheet dd{margin:0;display:flex;align-items:center;gap:6px;padding:6px 14px;font-size:14.5px;min-width:0}
.cx-sheet dd b{font-weight:600}
.cx-sheet dd .unit{font-style:normal;font-size:12px;color:var(--ink3)}
.cx-sheet .tel-pill{height:34px;padding:0 12px;font-size:14px;gap:6px}
.cx-sheet .tel-pill .i{width:15px;height:15px}
.cx-sheet .edit-link{min-height:34px;margin-inline-start:6px;padding:0 4px;font-size:13px}
.cx-dr{overflow:hidden;padding:0}
.cx-d+.cx-d{border-top:1px solid var(--sep)}
.cx-d.open{background:color-mix(in srgb,var(--field) 35%,transparent)}
.dr-h{display:flex;align-items:center;gap:14px;width:100%;min-height:60px;padding:10px 18px;text-align:start;background:none;border:0;color:inherit;font:inherit;cursor:pointer}
.dr-h:focus-visible{outline:2px solid var(--em);outline-offset:-2px}
@media (hover:hover){ .dr-h:hover{background:color-mix(in srgb,var(--em) 6%,transparent)} }
.dr-n{width:30px;height:30px;border-radius:50%;background:var(--field);color:var(--ink2);display:grid;place-items:center;font-size:14px;font-weight:600;flex:none}
.cx-d.open .dr-n{background:var(--em);color:#fff}
.dr-t{width:96px;flex:none;font-weight:600;font-size:15px}
.dr-v{flex:1;min-width:0;color:var(--ink2);font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dr-c{width:18px;height:18px;color:var(--ink3);flex:none;transition:transform .2s cubic-bezier(.2,.8,.2,1)}
.cx-d.open .dr-c{transform:rotate(180deg)}
.cx-d.open .dr-v{visibility:hidden}
.dr-b{padding:0 18px 16px;padding-inline-start:62px;min-width:0}
.dr-b .note-card{padding:0}
.dr-b .nbody{line-height:1.7}
.dr-b .nbody p+p{margin-top:2px}
.dr-b .list .row{padding-inline:0}
.dr-b .dstrip .sec-t{display:none}
.dr-b .dstrip .sec{margin:0 0 6px}
.dr-b .fundrow{background:none;box-shadow:none;border-radius:0}
.dr-b .fundrow .row{padding-inline:0}
.dr-b .tl{padding-top:4px}
.dr-b .note-add{margin-bottom:10px}
.dr-ok{width:15px;height:15px;color:var(--em-t);margin-inline-start:6px;vertical-align:-2px;stroke-width:3}

/* «کارِ الان»: path stepper + one sentence + the one button of this viewer (level 2, 7 Nov 2026) */
.now{padding:14px 16px;display:flex;flex-direction:column;gap:14px}
.now.mine{background:color-mix(in srgb,var(--em) 7%,var(--card))}
.steps{display:flex;margin:4px 0 14px;padding:0;list-style:none;max-width:520px}
.steps li{flex:1;display:flex;flex-direction:column;align-items:center;gap:5px;position:relative;font-size:13px;color:var(--ink3);min-width:0}
.steps li+li::before{content:"";position:absolute;top:10px;inset-inline-start:calc(-50% + 15px);inset-inline-end:calc(50% + 15px);height:2px;border-radius:2px;background:var(--sep)}
.steps li.done::before,.steps li.cur::before{background:var(--em)}
.steps .sd{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:var(--card);box-shadow:inset 0 0 0 2px var(--sep);flex:none}
.steps .done .sd{background:var(--em);box-shadow:none;color:#fff}
.steps .done .sd .i{width:13px;height:13px;stroke-width:3}
.steps .cur .sd{box-shadow:inset 0 0 0 2px var(--em),0 0 0 4px color-mix(in srgb,var(--em) 16%,transparent)}
.steps .cur .sd::after{content:"";width:8px;height:8px;border-radius:50%;background:var(--em)}
.steps .done .sl{color:var(--ink2)}
.steps .cur .sl{color:var(--em-t);font-weight:700}
.now-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.now-t{flex:1 1 200px;min-width:0;display:flex;flex-direction:column;gap:3px}
.now-t b{font-size:16px;font-weight:700;line-height:1.5}
.now-t small{font-size:13px;color:var(--ink3)}
.now-b{display:flex;gap:8px;align-items:center}
.now-b .btn{height:46px;min-width:150px}
.now-b .more-btn{width:46px;height:46px}
.now .note-warn{margin:0}
/* the sheet: a value read from the request text waits for «همین را بگذار»; empty fields are faint «+ …» links */
@media (hover:hover){ .add-link:hover{color:var(--em-t)} }
.add-link:focus-visible{outline:2px solid var(--em);outline-offset:2px}
.cx-adds{display:flex;flex-wrap:wrap;gap:0 16px;padding:4px 10px;border-top:1px solid var(--sep)}
.add-link{display:inline-flex;align-items:center;gap:4px;min-height:40px;padding:0 4px;border:0;background:none;color:var(--ink3);font:inherit;font-size:13px;cursor:pointer}
.add-link .i{width:14px;height:14px}
@media (max-width:640px){
 .cx{gap:10px}
 .cx-sheet .kv{min-height:42px}
 .cx .dr-b{padding-bottom:10px}
 .cx .cd-hd h1{font-size:22px;line-height:1.45}
 .now{gap:8px;padding:12px 14px}
 .cx .dr-h{min-height:46px;padding-block:6px}
 .now-b .btn{height:44px}
 .now-b:has(.btn){width:100%}
 .now-b .btn{flex:1}
}
@media (max-width:899px){
 .dr-h{gap:12px;padding:10px 16px}
 .dr-t{width:auto;min-width:78px}
 .dr-b{padding:0 16px 14px}
 .cx-sheet .kv{grid-template-columns:96px minmax(0,1fr)}
}
/* laptop: the action row sits on the header's line, at its far edge; no floating glass bar */
@media (min-width:900px){
 .cx{max-width:1040px;margin-inline:auto}
 .now{padding:16px 22px}
 .now-row{flex-wrap:nowrap}
 .now-t{flex:0 1 auto}
 .now-b{margin-inline-start:24px}
 .now-b:not(:has(.btn)){margin-inline-start:auto}
 .now-b .btn{height:48px;min-width:190px}
 .now-b .more-btn{width:48px;height:48px}
 .steps{max-width:560px}
 .cx-sheet dl{grid-template-columns:repeat(2,minmax(0,1fr))}
 .cx-sheet .kv:nth-child(odd) dd{border-inline-end:1px solid var(--sep)}
 .cx-sheet .kv:last-child:nth-child(odd){grid-column:1/-1}
 .cx-sheet .kv:last-child:nth-child(odd) dd{border-inline-end:0}
}

/* ---------- the strip ---------- */
.dstrip{margin-bottom:8px}
.dstrip .sec{margin:6px 6px 8px;align-items:center}
.dstrip-add{gap:4px;height:32px;padding:0 14px 0 12px;font-size:13px}
.dstrip-add .i{width:16px;height:16px}
.dtiles{display:flex;gap:12px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scroll-padding-inline:16px;
 scrollbar-width:none;margin-inline:-16px;padding:4px 16px 16px;-webkit-overflow-scrolling:touch}
.dtiles::-webkit-scrollbar{display:none}
.dt-wrap{position:relative;flex:none;scroll-snap-align:start;min-width:0}
.dt{position:relative;display:block;width:132px;height:132px;border-radius:18px;overflow:hidden;background:var(--card);box-shadow:var(--shadow);
 padding:0;transition:transform .18s cubic-bezier(.2,.8,.2,1),box-shadow .18s}
.dt:active{transform:scale(.97)}
.dt:focus-visible{outline:2px solid var(--em);outline-offset:2px}
@media (hover:hover){ .dt:hover{transform:translateY(-2px);box-shadow:var(--glass-sh)} .dt:active{transform:scale(.97)} }
.dt img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;-webkit-user-drag:none}
.dt-ph{position:absolute;inset:0;display:grid;place-items:center;color:var(--ink3)}
.dt-ph .i{width:30px;height:30px}
.dt-kind{position:absolute;inset-inline-start:8px;bottom:8px;max-width:calc(100% - 16px);padding:2px 9px;border-radius:99px;font-size:11px;line-height:1.7;
 color:#fff;background:rgba(0,0,0,.45);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dt-pdf{position:absolute;inset:0 0 26px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}
.dt-pdf svg{width:52px;height:52px;filter:drop-shadow(0 4px 8px rgba(229,72,77,.35))}
.dt-pdf b{font-size:12px;font-weight:600;color:var(--ink2);letter-spacing:.04em}
.dt-more{position:absolute;top:6px;inset-inline-end:6px;width:26px;height:26px;border-radius:50%;background:rgba(0,0,0,.45);color:#fff;display:grid;place-items:center;
 -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:0}
.dt-more::after{content:"";position:absolute;inset:-9px}
.dt-more .i{width:15px;height:15px}
.dt-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;box-shadow:none;background:transparent;
 border:2px dashed color-mix(in srgb,var(--ink3) 45%,transparent);color:var(--em-t);font-size:14px;font-weight:500}
.dt-empty .i{width:26px;height:26px}
.dt-skel{background:var(--field);box-shadow:none;animation:dt-pulse 1.4s ease-in-out infinite}
@keyframes dt-pulse{50%{opacity:.55}}
@media (min-width:900px){
 .dtiles{display:grid;grid-template-columns:repeat(auto-fill,150px);gap:12px;overflow:visible;scroll-snap-type:none;margin-inline:0;padding:4px 0 10px}
 .dt{width:150px;height:150px}
 .dt-more{width:28px;height:28px}
 .dstrip .sec{justify-content:flex-start;gap:14px}
}

/* ---------- the viewer (built by doc-viewer.js on <body>) ---------- */
.dv{position:fixed;inset:0;z-index:200;background:#000;color:#fff;opacity:0;transform:scale(.97);
 transition:opacity .18s cubic-bezier(.2,.8,.2,1),transform .18s cubic-bezier(.2,.8,.2,1);overscroll-behavior:contain;outline:none;
 -webkit-user-select:none;user-select:none}
.dv.in{opacity:1;transform:none}
.dv-stage{position:absolute;inset:0;overflow:hidden;touch-action:none;cursor:default}
.dv-stage.zoomed{cursor:grab}
.dv-stage.panning{cursor:grabbing}
.dv-slide{position:absolute;inset:0;display:grid;place-items:center}
.dv-img{width:100%;height:100%;object-fit:contain;display:block;will-change:transform;transform-origin:50% 50%;-webkit-user-drag:none;max-width:100vw;max-height:100dvh}
.dv-img.snap{transition:transform .22s cubic-bezier(.2,.8,.2,1)}
.dv-pdf{position:absolute;inset:64px 0 0 0;width:100%;height:calc(100% - 64px);border:0;background:#fff}
.dv-msg{position:absolute;inset:0;display:grid;place-items:center;font-size:16px;color:rgba(255,255,255,.75);pointer-events:none;text-align:center;padding:0 24px}
.dv-spin{position:absolute;top:50%;left:50%;width:26px;height:26px;margin:-13px;border-radius:50%;border:3px solid rgba(255,255,255,.25);border-top-color:#fff;animation:dv-rot .8s linear infinite;pointer-events:none}
@keyframes dv-rot{to{transform:rotate(360deg)}}
.dv-top{position:absolute;top:0;inset-inline:0;z-index:3;display:flex;align-items:center;gap:8px;padding:max(10px,env(safe-area-inset-top)) 12px 10px;
 background:rgba(30,30,32,.62);-webkit-backdrop-filter:blur(22px) saturate(1.6);backdrop-filter:blur(22px) saturate(1.6);min-height:64px;box-sizing:border-box}
.dv-count{flex:1;min-width:0;text-align:center;font-size:14px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dv-btn{width:44px;height:44px;border-radius:50%;flex:none;display:grid;place-items:center;color:#fff;background:rgba(255,255,255,.12);padding:0;border:0;cursor:pointer;transition:background .15s}
.dv-btn:hover{background:rgba(255,255,255,.22)}
.dv-btn:focus-visible,.dv-nav:focus-visible,.dv-menu button:focus-visible{outline:2px solid #fff;outline-offset:2px}
.dv-btn svg,.dv-nav svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.dv-nav{position:absolute;top:50%;margin-top:-22px;z-index:2;width:44px;height:44px;border-radius:50%;display:none;place-items:center;color:#fff;padding:0;border:0;cursor:pointer;
 background:rgba(30,30,32,.62);-webkit-backdrop-filter:blur(22px);backdrop-filter:blur(22px);transition:background .15s,opacity .15s}
.dv-nav:hover{background:rgba(60,60,64,.8)}
.dv-nav[hidden]{display:none}
.dv-prev{right:16px}
.dv-next{left:16px}
@media (min-width:900px) and (hover:hover){ .dv-nav:not([hidden]){display:grid} }
.dv-menu{position:absolute;top:calc(max(10px,env(safe-area-inset-top)) + 50px);inset-inline-end:12px;min-width:170px;padding:6px;border-radius:20px;
 background:rgba(44,44,46,.88);-webkit-backdrop-filter:blur(22px);backdrop-filter:blur(22px);box-shadow:0 12px 36px -8px rgba(0,0,0,.6);display:flex;flex-direction:column}
.dv-menu[hidden]{display:none}
.dv-menu button{height:46px;border-radius:14px;padding:0 14px;display:flex;align-items:center;gap:10px;color:#fff;font:inherit;font-size:15px;text-align:start;border:0;background:none;cursor:pointer}
.dv-menu button:hover{background:rgba(255,255,255,.1)}
.dv-menu button.danger{color:#ff6b6e}
.dv-menu svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
@media (prefers-reduced-motion:reduce){ .dv,.dv-img.snap,.dt{transition:none} .dv{transform:none} }
