/*
 * 🖥️ صفحه‌ی اصلیِ «میزِ کار» (resources/views/home/workbench.blade.php) — طرحِ ۳، ۲۷ مهر ۱۴۰۵.
 * هم‌رنگِ میزِ کارِ ‎/chat/ (فلاتر، تمِ تیره). بی‌وابستگی؛ فقط Vazirmatnِ خودمیزبان.
 */
:root {
  --bg: #161616;
  --side: #1b1b1b;
  --ink: #ececec;
  --mut: #9b9b9b;
  --mut2: #7e7e7e;
  --line: #2c2c2c;
  --card: #1d1d1d;
  --soft: #242424;
  --hover: #262626;
  --field: #1f1f1f;
  --acc: #f5a85e;
  --acc-ink: #1e1308;
  --bz-bg: #2a2118;
  --bz-ink: #f5c08a;
  --err: #f29a9a;
  --ok: #86c99a;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Vazirmatn, Tahoma, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.85;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
html.lock { overflow: hidden; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; top: -60px; right: 12px; z-index: 100; background: var(--acc); color: var(--acc-ink); padding: 8px 14px; border-radius: 10px; text-decoration: none; font-weight: 800; }
.skip:focus { top: 12px; }
.grow { flex: 1; }
.ltr { direction: ltr; text-align: left; }

/* ───────── چیدمان ───────── */
.wb { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; }

/* ───────── نوارِ کناری ───────── */
.side {
  position: sticky; top: 0;
  height: 100vh; height: 100dvh;
  width: 272px; flex: none;
  background: var(--side);
  border-inline-end: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 10px;
  overflow-y: auto; scrollbar-width: thin;
}
.side-h { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 10px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 900; font-size: 18px; padding: 4px 6px; border-radius: 10px; }
.logo { width: 28px; height: 28px; stroke: none; }
.new {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin-bottom: 8px;
  border-radius: 12px; background: var(--soft); border: 1px solid var(--line);
  font-weight: 700; font-size: 14px; text-align: right;
}
.new:hover { background: var(--hover); }
.new svg { width: 18px; height: 18px; }
.side-nav { display: flex; flex-direction: column; gap: 1px; }
.side-l { font-size: 12px; font-weight: 800; color: var(--mut2); padding: 12px 12px 4px; }
.si {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 12px; border-radius: 10px;
  font-size: 14px; color: #d6d6d6; text-decoration: none; text-align: right;
}
.si:hover { background: var(--hover); }
.si svg { width: 18px; height: 18px; color: var(--mut); }
.locked {
  display: flex; gap: 8px; margin: 4px 6px; padding: 11px 12px;
  border: 1px dashed #3b3b3b; border-radius: 12px;
  font-size: 12.5px; line-height: 1.7; color: #8f8f8f;
}
.locked svg { width: 16px; height: 16px; margin-top: 3px; }
.side-f { margin-top: auto; display: grid; gap: 6px; padding-top: 12px; }
.bz {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
  background: var(--bz-bg); color: var(--bz-ink); font-size: 13.5px; font-weight: 700; text-decoration: none;
}
.bz svg { width: 18px; height: 18px; }
.login { height: 42px; border-radius: 12px; background: var(--acc); color: var(--acc-ink); font-weight: 900; font-size: 14.5px; }
.login:hover, .pill:hover, .btn:hover { filter: brightness(1.06); }
.ib { width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; color: #a0a0a0; }
.ib:hover { background: var(--hover); }
.only-narrow { display: none; }
.side-scrim { display: none; }

/* ───────── سربرگِ ستونِ اصلی ───────── */
.mh {
  position: sticky; top: 0; z-index: 5;
  height: 56px; display: flex; align-items: center; gap: 8px; padding: 0 18px;
  background: rgba(22, 22, 22, .86);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.chip { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 15px; padding: 5px 10px; }
.chip svg { width: 16px; height: 16px; color: var(--mut); }
.pill { background: var(--acc); color: var(--acc-ink); border-radius: 999px; padding: 6px 18px; font-weight: 900; font-size: 14px; }

/* ───────── خانه ───────── */
.hero {
  min-height: calc(100vh - 56px); min-height: calc(100dvh - 56px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 0 32px 84px; position: relative;
  background: radial-gradient(560px 300px at 50% 62%, rgba(245, 168, 94, .11), rgba(245, 168, 94, 0) 70%);
}
.kick { font-size: 13px; font-weight: 700; color: var(--mut); }
.greet { font-size: 33px; font-weight: 900; line-height: 1.4; margin-bottom: 6px; text-align: center; text-wrap: balance; }
.cmp {
  width: min(700px, 100%);
  background: var(--field); border: 1px solid #343434; border-radius: 24px;
  padding: 10px 12px; box-shadow: 0 14px 44px rgba(0, 0, 0, .38);
}
.cmp:focus-within { border-color: #4a4a4a; }
.modes { display: inline-flex; gap: 3px; padding: 3px; background: #161616; border-radius: 12px; margin-bottom: 6px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.modes button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 13px; border-radius: 9px; font-size: 13px; color: #a6a6a6; white-space: nowrap; }
.modes button[aria-checked="true"] { background: #2d2d2d; color: #fff; font-weight: 700; }
.modes svg { width: 15px; height: 15px; }
.cmp textarea {
  display: block; width: 100%; border: 0; outline: 0; resize: none; background: transparent;
  font-size: 16px; line-height: 1.7; min-height: 58px; max-height: 40vh; padding: 4px 6px;
}
.cmp textarea::placeholder { color: #7c7c7c; }
.cmp-row { display: flex; align-items: center; gap: 6px; }
.kb { font-size: 11px; color: #6f6f6f; }
.send { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--acc); color: var(--acc-ink); transition: background .15s ease, opacity .15s ease; }
.send:disabled { background: #2e2e2e; color: #6a6a6a; }
.hint { font-size: 13px; color: var(--mut); display: flex; gap: 6px 12px; flex-wrap: wrap; justify-content: center; max-width: 700px; }
.ex { color: #dadada; border-bottom: 1px dashed #5a5a5a; line-height: 1.6; }
.ex:hover { color: #fff; border-bottom-color: var(--acc); }
.note { font-size: 12px; color: var(--mut2); text-align: center; max-width: 560px; }
.more {
  position: absolute; bottom: 20px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--mut); text-decoration: none;
}
.more svg { width: 16px; height: 16px; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: none; } 50% { transform: translateY(3px); } }

/* ───────── معرفی ───────── */
.content { border-top: 1px solid var(--line); padding: 56px 48px 24px; display: grid; gap: 60px; max-width: 1100px; margin: 0 auto; }
.sec { display: grid; gap: 16px; }
.sec h2 { font-size: 26px; font-weight: 900; line-height: 1.45; text-wrap: balance; }
.lead { color: #b4b4b4; max-width: 68ch; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; gap: 6px; align-content: start; }
.card h3 { font-size: 15.5px; font-weight: 800; line-height: 1.6; }
.card p { font-size: 13.5px; color: var(--mut); line-height: 1.85; }
.card.link { text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.card.link:hover { border-color: #444; transform: translateY(-2px); }
.thumb { aspect-ratio: 16 / 9; border-radius: 12px; margin-bottom: 6px; position: relative; overflow: hidden; }
.t-sun {
  background:
    radial-gradient(circle at 70% 36%, #ffebc0 0 8%, rgba(255, 235, 192, 0) 9%),
    radial-gradient(120% 55% at 18% 104%, #8c4b2f 0 46%, rgba(140, 75, 47, 0) 47%),
    radial-gradient(130% 50% at 88% 108%, #6a3526 0 46%, rgba(106, 53, 38, 0) 47%),
    linear-gradient(180deg, #f9ca92 0%, #f09a5f 46%, #c9653f 70%, #7b3d2a 100%);
}
.t-sea {
  background:
    radial-gradient(circle at 72% 26%, #f3f6f2 0 7%, rgba(243, 246, 242, 0) 8%),
    repeating-linear-gradient(176deg, rgba(255, 255, 255, .07) 0 2px, rgba(255, 255, 255, 0) 2px 14px),
    linear-gradient(180deg, #0b1e2b 0%, #14384c 55%, #2b6178 100%);
}
.t-doc { background: #2a2a2a; display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 0 30%; }
.t-doc i { display: block; height: 5px; border-radius: 3px; background: #4a4a4a; }
.t-doc i:first-child { background: var(--acc); width: 60%; height: 7px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 13.5px; color: #d0d0d0; }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }
.two > div { display: grid; gap: 14px; align-content: start; }
.steps { display: grid; gap: 10px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 2px 12px; counter-increment: s; }
.steps li::before { content: counter(s, persian); grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; background: var(--bz-bg); color: var(--bz-ink); display: grid; place-items: center; font-weight: 900; font-size: 14px; }
.steps b { font-size: 15px; }
.steps span { font-size: 13.5px; color: var(--mut); }
.all a { color: var(--bz-ink); font-weight: 700; text-decoration: none; }
.all a:hover { text-decoration: underline; }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--mut); font-size: 20px; line-height: 1; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--mut); padding-top: 8px; font-size: 14px; }
.cta { background: linear-gradient(150deg, #2a2118, #1d1d1d); border: 1px solid var(--line); border-radius: 22px; padding: 28px; justify-items: start; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 14px; background: var(--acc); color: var(--acc-ink); font-weight: 900; font-size: 15px; text-decoration: none; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .55; }

/* ───────── پانویس ───────── */
.ft { border-top: 1px solid var(--line); padding: 26px 48px 36px; max-width: 1100px; margin: 0 auto; display: grid; gap: 16px; font-size: 13px; color: var(--mut); }
.ft-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.ft-links a { text-decoration: none; }
.ft-links a:hover { color: var(--ink); }
.ft-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.ft-row img { width: 72px; height: auto; background: #fff; border-radius: 10px; padding: 4px; }
.ft-addr { font-style: normal; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.ft-addr a { text-decoration: none; }
.ft-addr a:hover { color: var(--ink); }
.copy { font-size: 12px; color: var(--mut2); }

/* ───────── کشوی ورود ───────── */
.ov { position: fixed; inset: 0; z-index: 50; }
.ov-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); animation: fade .2s ease; }
.drawer {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 420px; max-width: 100%;
  background: #1c1c1c; border-inline-start: 1px solid #333;
  padding: 26px 26px calc(22px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto; animation: slideL .28s ease;
}
.grab { display: none; }
.x { position: absolute; top: 14px; left: 14px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--mut); }
.x:hover { background: var(--hover); }
.dr-t { font-size: 22px; font-weight: 900; line-height: 1.45; padding-inline-end: 40px; }
.why { display: grid; gap: 9px; padding: 14px; border-radius: 14px; background: #222; }
.why li { display: flex; gap: 10px; align-items: center; font-size: 13.5px; }
.why svg { color: var(--acc); width: 18px; height: 18px; }
.draft { display: grid; gap: 2px; background: var(--soft); border-radius: 14px; padding: 9px 14px; }
.dl { font-size: 11.5px; font-weight: 700; color: var(--mut); }
.draft p { font-size: 14px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.step { display: grid; gap: 11px; }
.lbl { font-size: 13px; font-weight: 700; color: var(--mut); margin-bottom: -4px; }
.in {
  height: 50px; width: 100%; border-radius: 14px;
  border: 1.5px solid #3a3a3a; background: var(--field);
  padding: 0 14px; font-size: 18px; outline: none;
}
.in:focus { border-color: var(--acc); }
.in.code { font-size: 26px; letter-spacing: 12px; text-align: center; font-weight: 800; }
.in::placeholder { color: #5f5f5f; }
.err { font-size: 13px; color: var(--err); line-height: 1.7; }
.ok { font-size: 13px; color: var(--ok); line-height: 1.7; }
.keep { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; line-height: 1.7; color: var(--mut); }
.keep svg { width: 16px; height: 16px; margin-top: 3px; color: var(--ok); }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--mut); justify-self: start; }
.back svg { width: 16px; height: 16px; }
.sub { font-size: 14px; color: var(--mut); }
.sub b { color: var(--ink); }
.linkish { font-size: 13px; color: var(--bz-ink); justify-self: start; text-decoration: underline; text-underline-offset: 3px; }
.linkish:disabled { color: var(--mut2); text-decoration: none; }
.again { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.legal { font-size: 11.5px; color: var(--mut2); margin-top: auto; }
.legal a { color: var(--mut); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideL { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes slideU { from { transform: translateY(100%); } to { transform: none; } }

/* ───────── پهنای کم (موبایل/تبلتِ عمودی) ───────── */
/* ⚠️ شرطِ دوم: گوشیِ لمسی با «Desktop site» (innerWidth=980) هم همین چینشِ موبایل را بگیرد — ر.ک. js/workbench-boot.js */
@media (max-width: 899px), (pointer: coarse) and (max-device-width: 600px) {
  .side {
    position: fixed; z-index: 40; top: 0; bottom: 0; right: 0;
    width: min(86vw, 300px);
    transform: translateX(105%); transition: transform .26s ease;
    border-inline-end: 0; box-shadow: none;
  }
  .side.open { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .6); }
  .side-scrim { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, .5); }
  .only-narrow { display: inline-grid; }
  .mh { padding: 0 10px; }
  .hero { justify-content: flex-start; padding: 0 12px 18px; gap: 10px; min-height: calc(100svh - 56px); }
  .kick { margin-top: auto; }
  .greet { font-size: 25px; margin-bottom: auto; }
  .cmp { border-radius: 22px; }
  .modes { display: flex; width: 100%; }
  .modes button { flex: 1; justify-content: center; padding: 5px 4px; }
  .kb { display: none; }
  .hint { font-size: 12.5px; }
  .more { position: static; margin-top: 4px; }
  .content { padding: 40px 16px 16px; gap: 46px; }
  .sec h2 { font-size: 22px; }
  .grid3, .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2, .two { grid-template-columns: minmax(0, 1fr); }
  .ft { padding: 22px 16px calc(30px + env(safe-area-inset-bottom, 0px)); }
  .drawer {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%;
    max-height: 92vh; max-height: 92dvh;
    border-radius: 24px 24px 0 0; border: 0;
    padding: 12px 18px calc(20px + env(safe-area-inset-bottom, 0px));
    gap: 12px; animation: slideU .3s ease;
  }
  .grab { display: block; width: 42px; height: 5px; border-radius: 3px; background: #444; margin: 0 auto 4px; flex: none; }
  .dr-t { font-size: 19px; }
  .why { padding: 11px 12px; gap: 7px; }
  .why li { font-size: 12.5px; }
}
@media (max-width: 520px), (pointer: coarse) and (max-device-width: 600px) {
  .grid3, .grid4 { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* 📱 گوشی در حالتِ «Desktop site»: چینشِ موبایل (بالا) با zoom به اندازه‌ی واقعیِ صفحه — ضریب را workbench-boot.js می‌گذارد. */
html.dsk-phone { zoom: var(--dz, 1); }
/* ⚠️ zoom واحدهای vh/svh/dvh را هم بزرگ می‌کند (همان ضریب) ⇒ به ارتفاعِ واقعیِ صفحه برگردان. */
html.dsk-phone .wb { min-height: calc(100vh / var(--dz, 1)); }
html.dsk-phone .hero { min-height: calc(100vh / var(--dz, 1) - 56px); min-height: calc(100svh / var(--dz, 1) - 56px); }
html.dsk-phone .drawer { max-height: calc(92vh / var(--dz, 1)); max-height: calc(92dvh / var(--dz, 1)); }
