/* =====================================================================
   Dilmaj Studio OS — v4.2 design system
   یک لایه‌ی واحد و تمیز؛ همه‌ی نسخه‌های قبلی (glass / v3 / neon v4) حذف شدند.
   ===================================================================== */
/* فونت‌ها روی خود هاست: IRANSansX (متن و رابط) + Ray (تیترهای نمایشی) */
@font-face { font-family: "IRANSansX"; src: url("fonts/IRANSansXV.woff2") format("woff2-variations"), url("fonts/IRANSansXV.woff2") format("woff2"), url("fonts/IRANSansXV.woff") format("woff"); font-weight: 100 1000; font-style: normal; font-display: swap; }
@font-face { font-family: "Ray"; src: url("fonts/Ray-Medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Ray"; src: url("fonts/Ray-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Ray"; src: url("fonts/Ray-ExtraBold.woff") format("woff"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Ray"; src: url("fonts/Ray-Black.woff") format("woff"); font-weight: 900; font-display: swap; }

/* ---------------------------------------------------------------------
   تم‌ها
   --------------------------------------------------------------------- */
:root, [data-theme="navy_white"] {
  --bg: #090E1C; --bg-hi: #10182F; --bg-lo: #070B16;
  --rail: #070B17;
  --surface: #0F1629; --surface-2: #141D35; --surface-3: #1A2442;
  --field: #0B1224;
  --line: rgba(226, 232, 255, .075); --line-2: rgba(226, 232, 255, .15);
  --text: #EDF0F7; --text-2: #B9C0D4; --muted: #7C86A2;
  --accent: #F4F6FB; --accent-ink: #0A1022; --accent-text: #FFFFFF;
  --accent-soft: rgba(255, 255, 255, .07);
  --ring: rgba(255, 255, 255, .28);
  --logo: #FFFFFF;
  --shadow: 0 1px 0 rgba(255, 255, 255, .025) inset, 0 16px 40px -28px rgba(0, 0, 0, .9);
  --shadow-pop: 0 24px 60px -20px rgba(0, 0, 0, .75), 0 0 0 1px var(--line-2);
  --danger: #F2727F; --ok: #4CC38A; --warn: #E7B45C; --info: #7FA2FF;
}
[data-theme="navy_gold"] {
  --bg: #0A0E19; --bg-hi: #121829; --bg-lo: #070A12;
  --rail: #080B14;
  --surface: #10162A; --surface-2: #151C33; --surface-3: #1B2340;
  --field: #0C1122;
  --line: rgba(230, 214, 180, .075); --line-2: rgba(230, 214, 180, .16);
  --accent: #CFAE6E; --accent-ink: #19130A; --accent-text: #E2C891;
  --accent-soft: rgba(207, 174, 110, .11);
  --ring: rgba(207, 174, 110, .45);
}
[data-theme="navy_blue"] {
  --bg: #080E1E; --bg-hi: #0F1834; --bg-lo: #060A16;
  --rail: #060B18;
  --surface: #0E1630; --surface-2: #131D3B; --surface-3: #192548;
  --field: #0A1226;
  --line: rgba(160, 185, 255, .08); --line-2: rgba(160, 185, 255, .17);
  --accent: #6B93FF; --accent-ink: #FFFFFF; --accent-text: #A3BCFF;
  --accent-soft: rgba(107, 147, 255, .13);
  --ring: rgba(107, 147, 255, .5);
}
[data-theme="light"] {
  --bg: #F4F5F8; --bg-hi: #FFFFFF; --bg-lo: #ECEEF3;
  --rail: #0E1530;
  --surface: #FFFFFF; --surface-2: #F7F8FB; --surface-3: #EFF1F6;
  --field: #FFFFFF;
  --line: #E6E8EF; --line-2: #D2D6E1;
  --text: #0E1530; --text-2: #3A4262; --muted: #6A7290;
  --accent: #121A3A; --accent-ink: #FFFFFF; --accent-text: #1E2A5E;
  --accent-soft: rgba(18, 26, 58, .06);
  --ring: rgba(18, 26, 58, .28);
  --logo: #FFFFFF;
  --shadow: 0 1px 2px rgba(14, 21, 48, .04), 0 10px 30px -22px rgba(14, 21, 48, .25);
  --shadow-pop: 0 24px 50px -18px rgba(14, 21, 48, .28), 0 0 0 1px var(--line);
  --danger: #C4323F; --ok: #0F8454; --warn: #A56A06; --info: #2D55C8;
}

/* نام‌های قدیمی متغیرها — برای استایل‌های inline داخل PHP */
:root, [data-theme] {
  --glass: var(--surface); --glass-2: var(--surface-2); --solid: var(--surface);
  --accent-2: var(--accent-text); --accent-grad: var(--accent); --glow: var(--accent-soft);
}

:root {
  --font-head: "IRANSansX", Tahoma, sans-serif;
  --font-display: "Ray", "IRANSansX", Tahoma, sans-serif;
  --font-body: "IRANSansX", Tahoma, sans-serif;
  --r-xs: 6px; --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px;
  --nav-w: 92px; --top-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --st-pending: #8791AB; --st-filming: #E3A857; --st-filmed: #C48A4A; --st-editing: #6F95FF;
  --st-ready_to_upload: #42C2A4; --st-awaiting_client: #E7B45C; --st-uploaded: #4CC38A;
  /* برچسب نوع تسک: متن / زمینه */
  --t0: #B7A2FF; --t0b: rgba(150, 120, 255, .13);
  --t1: #6FD3A4; --t1b: rgba(76, 195, 138, .12);
  --t2: #8EAEFF; --t2b: rgba(107, 147, 255, .13);
  --t3: #E9C27A; --t3b: rgba(231, 180, 92, .12);
  --t4: #F29CC0; --t4b: rgba(236, 110, 165, .12);
  --t5: #A9B2C8; --t5b: rgba(169, 178, 200, .11);
}
[data-theme="light"] {
  --t0: #5B3FD0; --t0b: #F0ECFF; --t1: #0E7A4C; --t1b: #E6F6EE; --t2: #2D55C8; --t2b: #EAF0FF;
  --t3: #8F5B00; --t3b: #FBF1DE; --t4: #B0306A; --t4b: #FCEAF2; --t5: #4E5773; --t5b: #EEF0F5;
}

/* ---------------------------------------------------------------------
   پایه
   --------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--text); background: var(--bg);
  font-family: var(--font-body); font-size: 14.5px; line-height: 1.75; font-weight: 400;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  
}
body::before {
  /* نور خیلی ملایم بالای صفحه — بدون نئون */
  content: ""; position: fixed; inset: 0 0 auto 0; height: 420px; pointer-events: none; z-index: -1;
  background: radial-gradient(900px 380px at 70% -120px, var(--bg-hi), transparent 70%);
}
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.4; margin: 0; color: var(--text); }
h1 { font-family: var(--font-display); font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.02rem; }
h3 { font-size: .95rem; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.ic { flex: none; }
.hint { font-size: 12.5px; color: var(--muted); }
.late { color: var(--danger) !important; }
.num, td, .stat b { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

/* ---------------------------------------------------------------------
   سطح‌ها (کارت/پنل) — تخت، مرز مویی، سایه نرم
   --------------------------------------------------------------------- */
.glass, .panel, .stat, .card, .auth-box, .ptile, .vcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.menu-pop, .sheet {
  background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: var(--shadow-pop);
}

/* ---------------------------------------------------------------------
   لوگو و آواتار
   --------------------------------------------------------------------- */
.logo {
  display: inline-block; width: 92px; height: 46px; background: var(--logo);
  -webkit-mask: url("img/logo-white.png") center / contain no-repeat;
          mask: url("img/logo-white.png") center / contain no-repeat;
}
.av {
  display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover; background: var(--surface-3); color: var(--text-2);
  box-shadow: 0 0 0 1px var(--line-2);
  font: 600 10.5px/1 var(--font-head);
}
.av-md { width: 38px; height: 38px; font-size: 13px; }
.av-lg { width: 64px; height: 64px; font-size: 20px; }

/* ---------------------------------------------------------------------
   نوار بالا
   --------------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: calc(var(--top-h) + env(safe-area-inset-top));
  display: flex; align-items: center; gap: 16px;
  padding: env(safe-area-inset-top) 32px 0; margin-right: var(--nav-w);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-user { display: flex; align-items: center; gap: 10px; }
.me {
  display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; color: var(--muted);
  padding: 3px 3px 3px 8px; border-radius: 999px; border: 1px solid transparent; transition: border-color .2s;
}
.me:hover { border-color: var(--line-2); }
.me::-webkit-details-marker { display: none; }
.icon-btn {
  position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2); text-decoration: none;
  transition: border-color .2s, color .2s;
}
.icon-btn:hover { border-color: var(--line-2); color: var(--text); }
.icon-btn .ic { width: 19px; height: 19px; }
.badge {
  position: absolute; top: -5px; left: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font: 600 10px/18px var(--font-body); text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}
.top-search {
  flex: 1; max-width: 460px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  transition: border-color .2s, box-shadow .2s;
}
.top-search input { flex: 1; min-height: 0 !important; height: 38px; border: 0 !important; background: none !important; box-shadow: none !important; padding: 0 !important; color: var(--text); font-size: 13.5px; }
.top-search input::placeholder { color: var(--muted); }
.top-search:focus-within { border-color: var(--line-2); box-shadow: 0 0 0 4px var(--accent-soft); }
.brand { margin-right: auto; display: none; text-decoration: none; opacity: .95; }
.top-search { margin-left: auto; }
.brand .logo { width: 64px; height: 32px; background: var(--text); }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: 50px; min-width: 220px; padding: 6px; border-radius: var(--r); z-index: 40; }
.menu-pop a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: var(--r-sm); text-decoration: none; color: var(--text-2); font-size: 13.5px; }
.menu-pop a:hover { background: var(--accent-soft); color: var(--text); }
.menu-name { padding: 8px 10px 10px; font-weight: 600; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: grid; }
.menu-name small { color: var(--muted); font-weight: 400; font-size: 12px; }

/* ---------------------------------------------------------------------
   منوی کناری (ریل)
   --------------------------------------------------------------------- */
.sidenav {
  position: fixed; top: 0; right: 0; bottom: 0; width: var(--nav-w); z-index: 35;
  padding: 16px 10px; display: flex; flex-direction: column; gap: 4px;
  background: var(--rail); border-left: 1px solid var(--line);
  overflow-y: auto; scrollbar-width: none;
}
.sidenav::-webkit-scrollbar { display: none; }
.sidenav::before {
  /* لوگوی بالای ریل */
  content: ""; display: block; flex: none; width: 44px; height: 24px; margin: 8px auto 18px;
  background: #fff; opacity: .92;
  -webkit-mask: url("img/logo-white.png") center / contain no-repeat;
          mask: url("img/logo-white.png") center / contain no-repeat;
}
.sidenav a {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px 9px;
  border-radius: 12px; text-decoration: none; color: rgba(214, 222, 240, .55); font-size: 11.5px; font-weight: 500;
  text-align: center; line-height: 1.35; transition: color .2s, background-color .2s;
}
.sidenav a .ic { width: 21px; height: 21px; }
.sidenav a:hover { color: #fff; background: rgba(255, 255, 255, .04); }
.sidenav a.on { color: #fff; background: rgba(255, 255, 255, .07); }
.sidenav a.on::after {
  content: ""; position: absolute; right: -10px; top: 50%; width: 3px; height: 22px; transform: translateY(-50%);
  border-radius: 3px 0 0 3px; background: var(--accent);
}
[data-theme="light"] .sidenav a.on::after { background: #fff; }
[data-theme="navy_gold"] .sidenav a.on .ic, [data-theme="navy_blue"] .sidenav a.on .ic { color: var(--accent-text); }
.sidenav .nav-settings { margin-top: auto; }
.bottomnav { display: none; }

.main { padding: 28px 32px 64px; max-width: 1520px; }
body.has-nav .main { margin-right: var(--nav-w); }
body.bare .main { margin: 0 auto; padding-top: 24px; }

/* ---------------------------------------------------------------------
   موبایل
   --------------------------------------------------------------------- */
@media (max-width: 860px) {
  :root { --top-h: 60px; }
  .sidenav { display: none; }
  .topbar { margin-right: 0; padding: env(safe-area-inset-top) 16px 0; gap: 10px; }
  .top-search { display: none; }
  .brand { display: flex; }
  .brand .logo { width: 56px; height: 28px; }
  body.has-nav .main { margin-right: 0; padding: 18px 16px calc(100px + env(safe-area-inset-bottom)); }
  h1 { font-size: 1.35rem; }
  .bottomnav {
    position: fixed; z-index: 35; right: 12px; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    display: flex; justify-content: space-around; align-items: stretch; padding: 6px; border-radius: 20px;
    background: color-mix(in srgb, var(--rail) 92%, transparent); border: 1px solid rgba(255, 255, 255, .08);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .7);
  }
  .bottomnav > a, .bottomnav summary {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px 6px; border-radius: 14px;
    color: rgba(214, 222, 240, .55); font-size: 10.5px; font-weight: 500; text-decoration: none; list-style: none; cursor: pointer;
  }
  .bottomnav .ic { width: 21px; height: 21px; }
  .bottomnav summary::-webkit-details-marker { display: none; }
  .bottomnav > a.on { color: #fff; background: rgba(255, 255, 255, .08); }
  [data-theme="navy_gold"] .bottomnav > a.on .ic, [data-theme="navy_blue"] .bottomnav > a.on .ic { color: var(--accent-text); }
  .more { flex: 1; display: flex; }
  .sheet {
    position: fixed; right: 12px; left: 12px; bottom: calc(88px + env(safe-area-inset-bottom)); padding: 6px;
    border-radius: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  }
  .sheet a { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; text-decoration: none; color: var(--text-2); font-size: 13.5px; }
  .sheet a.on, .sheet a:hover { background: var(--accent-soft); color: var(--text); }
}

/* ---------------------------------------------------------------------
   اجزای عمومی
   --------------------------------------------------------------------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 26px; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  font: 600 13.5px/1.4 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: filter .2s, background-color .2s, border-color .2s, transform .1s;
}
.btn .ic { width: 17px; height: 17px; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--accent-soft); filter: none; }
.btn.danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); filter: none; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #04150C; }
[data-theme="light"] .btn.ok { color: #fff; }
.btn.sm { min-height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn.icon-only { padding: 0; width: 40px; }
.btn.sm.icon-only { width: 32px; }

.panel { padding: 22px; }
.panel + .panel { margin-top: 16px; }
.grid2 > .panel, .grid3 > .panel, .split > .panel { margin-top: 0; }
.panel h2 { margin-bottom: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; }
.panel-head a { font-size: 12.5px; color: var(--muted); text-decoration: none; transition: color .2s; }
.panel-head a:hover { color: var(--text); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.mt { margin-top: 16px; }

/* کارت آمار: برچسب، عدد درشت، آیکون کوچک با رنگ مفهومی */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat {
  --tone: var(--text-2);
  position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 18px 18px 16px;
  text-decoration: none; overflow: hidden; transition: border-color .2s, transform .2s var(--ease);
}
.stat:hover { border-color: var(--line-2); }
.stat.tone-accent { --tone: var(--accent-text); }
.stat.tone-danger { --tone: var(--danger); }
.stat.tone-ok { --tone: var(--ok); }
.stat.tone-warn { --tone: var(--warn); }
.stat.tone-muted { --tone: var(--muted); }
.stat-ic {
  order: 2; margin-right: auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex: none;
  color: var(--tone); background: color-mix(in srgb, var(--tone) 11%, transparent);
}
.stat-ic .ic { width: 18px; height: 18px; }
.stat-body { display: grid; flex: 1; gap: 2px; }
.stat-label { color: var(--muted); font-size: 12.5px; }
.stat b { font: 800 1.95rem/1.2 var(--font-head); }
.stat.tone-danger b { color: var(--danger); }
.stat-link { font-size: 12px; color: var(--muted); margin-top: 4px; display: inline-flex; gap: 4px; align-items: center; }
.stat-link::after { content: "←"; transition: transform .2s var(--ease); }
.stat:hover .stat-link { color: var(--text-2); }
.stat:hover .stat-link::after { transform: translateX(-3px); }
@media (max-width: 620px) {
  .stats { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
  .stat { flex-direction: column; align-items: flex-start; padding: 12px; gap: 8px; }
  .stat-ic { order: -1; margin: 0; width: 28px; height: 28px; border-radius: 8px; }
  .stat-ic .ic { width: 15px; height: 15px; }
  .stat b { font-size: 1.45rem; }
  .stat-label { font-size: 11px; line-height: 1.5; } .stat-link { display: none; }
}

/* فرم‌ها */
.form { display: grid; gap: 16px; }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 14px; }
label.field { display: grid; gap: 7px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
input[type=text], input[type=password], input[type=tel], input[type=email], input[type=search], input[type=url],
input[type=time], input[type=number], input[type=date], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 13px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--field); color: var(--text); font: 400 14px/1.5 var(--font-body);
  transition: border-color .2s, box-shadow .2s;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--text) 22%, transparent); }
select { appearance: none; -webkit-appearance: none; padding-left: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%237C86A2' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 12px center; cursor: pointer; }
select option { background: var(--surface-2); color: var(--text); }
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 4px var(--accent-soft); }
input[disabled], select[disabled], textarea[disabled] { opacity: .6; }
.check { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 13.5px; cursor: pointer; }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; accent-color: var(--accent); }
[data-theme="navy_white"] input[type=checkbox], [data-theme="navy_white"] input[type=radio] { accent-color: #DDE3F0; }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 0; }
legend { padding: 0 6px; color: var(--muted); font-size: 12.5px; }

.imgfield { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px dashed var(--line-2); border-radius: var(--r); cursor: pointer; transition: border-color .2s, background-color .2s; }
.imgfield:hover { border-color: var(--ring); background: var(--accent-soft); }
.imgfield-prev { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 10px; overflow: hidden; background: var(--surface-2); color: var(--muted); flex: none; }
.imgfield-prev img { width: 100%; height: 100%; object-fit: cover; }
.imgfield-text { display: grid; flex: 1; }
.imgfield input { max-width: 100%; font-size: 12.5px; color: var(--muted); }

/* پیام‌ها */
.flash {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 13.5px;
  color: var(--text); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); background: color-mix(in srgb, var(--ok) 9%, var(--surface));
}
.flash::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.flash-err { border-color: color-mix(in srgb, var(--danger) 35%, transparent); background: color-mix(in srgb, var(--danger) 9%, var(--surface)); }
.flash-err::before { background: var(--danger); }
.flash-info { border-color: var(--line-2); background: var(--surface); }
.flash-info::before { background: var(--muted); }
.flash a { color: var(--text); }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); display: grid; justify-items: center; gap: 14px; }
.empty > .ic { width: 52px; height: 52px; padding: 13px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }
.empty p { margin: 0; max-width: 420px; }

/* جدول و فهرست */
.table-wrap { overflow-x: auto; }
.panel.table-wrap { padding: 6px 0; }
.panel.table-wrap .table th:first-child, .panel.table-wrap .table td:first-child { padding-right: 22px; }
.panel.table-wrap .table th:last-child, .panel.table-wrap .table td:last-child { padding-left: 22px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: right; font-weight: 500; color: var(--muted); font-size: 12px; padding: 10px 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background-color .15s; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--text) 2.5%, transparent); }
.table tr:last-child td { border-bottom: 0; }
.table a { text-decoration: none; }
.table a:hover { color: var(--accent-text); }
.table tfoot td { font-weight: 700; border-top: 1px solid var(--line-2); }
.list { list-style: none; margin: 0; padding: 0; display: grid; }
.list li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.list li:first-child { padding-top: 2px; }
.list li:last-child { border-bottom: 0; padding-bottom: 0; }
.list a { text-decoration: none; font-weight: 500; }
.list a:hover { color: var(--accent-text); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 500;
  line-height: 24px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); border-color: transparent; }
.pill.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); border-color: transparent; }
.pill.danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: transparent; }
.pill.accent { color: var(--accent-text); background: var(--accent-soft); border-color: transparent; }
.progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
[data-theme="navy_white"] .progress i { background: linear-gradient(90deg, #8FA0C8, #fff); }

/* تب‌ها: زیرخط ظریف */
.tabs {
  display: flex; gap: 22px; flex-wrap: nowrap; margin-bottom: 20px; border-bottom: 1px solid var(--line);
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  position: relative; padding: 10px 1px 12px; text-decoration: none; color: var(--muted); font-size: 13.5px; font-weight: 500;
  white-space: nowrap; transition: color .2s;
}
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); }
.tabs a.on::after { content: ""; position: absolute; right: 0; left: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.filters input, .filters select { width: auto; min-width: 170px; min-height: 38px; font-size: 13.5px; }
.filters input[type=search] { min-width: 230px; }
.board-bar select, .page-head select { width: auto; min-height: 40px; font-size: 13.5px; }

/* ---------------------------------------------------------------------
   صفحه خانه: چرخ
   --------------------------------------------------------------------- */
.home { position: relative; display: grid; justify-items: center; gap: 4px; padding-top: 8px; min-height: calc(100vh - var(--top-h) - 60px); }
.home-greet { text-align: center; }
.home-greet h1 { font-size: 2.2rem; font-weight: 900; }
.home-greet p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.wheel { width: min(640px, 94vw); height: auto; overflow: visible; margin-top: -10px; }
.wheel .slice { cursor: pointer; outline: none; }
.wheel .slice-shape {
  fill: var(--surface); stroke: var(--surface); stroke-width: 18; stroke-linejoin: round;
  transition: fill .3s var(--ease), stroke .3s var(--ease);
}
.wheel .slice-edge { fill: none; stroke: var(--line-2); stroke-width: 1; opacity: .9; pointer-events: none; transition: stroke .3s; }
.wheel .slice-body { transition: transform .4s var(--ease); }
.wheel .slice:hover .slice-body, .wheel .slice:focus-visible .slice-body { transform: translate(var(--dx), var(--dy)); }
.wheel .slice:hover .slice-shape { fill: var(--surface-2); stroke: var(--surface-2); }
.wheel .slice:hover .slice-edge { stroke: var(--ring); }
.wheel .slice:focus-visible .slice-shape { stroke: var(--ring); }
.wheel .s-icon { color: var(--muted); transition: color .3s; }
.wheel .slice:hover .s-icon { color: var(--text); }
.wheel .s-label { fill: var(--text); font: 700 19px var(--font-head); }
.wheel .slice.focus .slice-body { transform: translate(calc(var(--dx) * 1.3), calc(var(--dy) * 1.3)); }
.wheel .slice.focus .slice-shape { fill: var(--accent); stroke: var(--accent); filter: none; }
.wheel .slice.focus .slice-edge { stroke: var(--accent); opacity: .35; }
.wheel .slice.focus .s-icon { color: var(--accent-ink); }
.wheel .slice.focus .s-label { fill: var(--accent-ink); }
.wheel .s-pill rect { fill: var(--accent-ink); opacity: .9; }
.wheel .s-pill text { fill: var(--accent); font: 600 13.5px var(--font-body); }
.wheel .hub-halo { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 5; filter: none; }
.wheel .hub { fill: var(--rail); stroke: var(--line-2); stroke-width: 1; }
.wheel .hub-logo { fill: #fff; }
[data-theme="light"] .wheel .slice:not(.focus) .slice-shape { filter: drop-shadow(0 6px 14px rgba(14, 21, 48, .08)); }
@media (prefers-reduced-motion: reduce) { .wheel .slice-body, .wheel .slice-shape { transition: none; } }

.quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 2px; }
.quick a, .quick form button, .quick .qchip {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); text-decoration: none;
  font: 500 13px/1 var(--font-body); cursor: pointer; transition: border-color .2s, color .2s;
}
.quick .ic { width: 16px; height: 16px; }
.quick a:hover, .quick form button:hover { border-color: var(--ring); color: var(--text); }
.quick form button[name=clock] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.quick .qchip.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.quick form { margin: 0; }
.home-foot {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: auto;
  padding-top: 28px; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line);
}
.home-foot .sig { display: grid; line-height: 1.3; direction: ltr; text-align: left; }
.home-foot .sig b { font: 600 13px/1.2 var(--font-body); letter-spacing: .38em; color: var(--text-2); }
.home-foot .sig span { font-size: 9px; letter-spacing: .28em; }
.home-foot .tag { display: flex; align-items: center; gap: 10px; padding: 0; background: none; color: var(--muted); font-size: 12.5px; }
.home-foot .tag::after { content: ""; width: 26px; height: 1px; background: var(--line-2); }
.wave { display: none; }
@media (max-width: 620px) {
  .home-greet h1 { font-size: 1.45rem; }
  .home-foot { flex-direction: column-reverse; gap: 8px; }
  .wheel .s-label { font-size: 22px; }
}

/* ---------------------------------------------------------------------
   برد تسک
   --------------------------------------------------------------------- */
.board-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); }
.seg a { display: grid; place-items: center; width: 34px; height: 32px; border-radius: 7px; color: var(--muted); transition: color .2s, background-color .2s; }
.seg a:hover { color: var(--text); }
.seg a.on { background: var(--surface-3); color: var(--text); }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 14px; align-items: start; }
.col {
  border-radius: var(--r-lg); padding: 8px; min-height: 160px;
  background: color-mix(in srgb, var(--surface) 55%, transparent); border: 1px solid var(--line);
  transition: border-color .2s, box-shadow .2s;
}
.col.drag-over { border-color: var(--ring); box-shadow: 0 0 0 3px var(--accent-soft); }
.col-head { display: flex; align-items: center; gap: 9px; padding: 8px 8px 12px; font: 600 13.5px var(--font-head); color: var(--text); }
.col-head .count {
  margin-right: auto; display: grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 7px;
  background: var(--surface-3); color: var(--text-2); font: 600 11.5px/1 var(--font-body);
}
.col-body { display: grid; gap: 8px; min-height: 60px; }
.tcard {
  display: flex; gap: 12px; padding: 12px; border-radius: 12px; cursor: default;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.tcard[draggable="true"] { cursor: grab; }
.tcard.dragging { opacity: .4; }
.tcard:hover { border-color: var(--line-2); }
.t-main { flex: 1; min-width: 0; display: grid; align-content: start; gap: 2px; }
.t-title { font-weight: 600; font-size: 13.5px; text-decoration: none; line-height: 1.6; }
.t-title:hover { color: var(--accent-text); }
.t-sub { font-size: 12px; color: var(--muted); }
.t-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.t-foot .who { display: inline-flex; align-items: center; gap: 6px; }
.t-foot .who .av { width: 22px; height: 22px; font-size: 9px; }
.t-foot .due { margin-right: auto; font-variant-numeric: tabular-nums; }
.t-cover { width: 64px; height: 72px; border-radius: 9px; overflow: hidden; flex: none; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); order: 2; }
.t-cover .ic { width: 20px; height: 20px; opacity: .6; }
.t-cover img { width: 100%; height: 100%; object-fit: cover; }
.tag { display: inline-flex; align-items: center; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 500; line-height: 22px; }
.tag.t0 { color: var(--t0); background: var(--t0b); } .tag.t1 { color: var(--t1); background: var(--t1b); }
.tag.t2 { color: var(--t2); background: var(--t2b); } .tag.t3 { color: var(--t3); background: var(--t3b); }
.tag.t4 { color: var(--t4); background: var(--t4b); } .tag.t5 { color: var(--t5); background: var(--t5b); }
.status-select {
  min-height: 30px !important; padding: 3px 28px 3px 10px !important; font-size: 12px !important; border-radius: 8px !important;
  background-position: left 8px center !important; margin-top: 10px; color: var(--text-2) !important;
  background-color: var(--surface-2) !important; border-color: var(--line) !important;
}
.decision { font-size: 11.5px; font-weight: 500; }
.st-chips { display: none; }
@media (max-width: 860px) {
  .st-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: none; }
  .st-chips::-webkit-scrollbar { display: none; }
  .st-chips button {
    flex: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 10px;
    border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font: 500 13px/1 var(--font-body); cursor: pointer;
  }
  .st-chips button b { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; background: var(--surface-3); font-size: 11px; }
  .st-chips button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
  .st-chips button.on b { background: color-mix(in srgb, var(--accent-ink) 12%, transparent); }
  .board.mobile { display: block; overflow: visible; }
  .board.mobile .col { display: none; padding: 0; background: none; border: 0; box-shadow: none; }
  .board.mobile .col.show { display: block; }
  .board.mobile .col-head { display: none; }
  .t-cover { width: 76px; height: 84px; }
  .board-bar h1 { width: 100%; }
  .board-bar > .actions { width: 100%; }
  .board-bar form.actions { width: 100%; flex-wrap: nowrap; }
  .board-bar form.actions select { flex: 1; min-width: 0 !important; }
  .board-bar > .actions > .btn:last-child { margin-right: auto; }
  .page-head > .actions { width: 100%; }
}

/* ---------------------------------------------------------------------
   فرم با ستون کناری / کامنت‌ها
   --------------------------------------------------------------------- */
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
.comments { display: grid; gap: 12px; }
.cmt { display: flex; gap: 10px; }
.cmt-body { flex: 1; padding: 10px 14px; border-radius: 4px 12px 12px 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; }
.cmt.client .cmt-body { border-color: color-mix(in srgb, var(--warn) 28%, transparent); background: color-mix(in srgb, var(--warn) 6%, var(--surface-2)); }
.cmt-meta { font-size: 11.5px; color: var(--muted); display: flex; gap: 8px; }
.cover-big { width: 100%; aspect-ratio: 4 / 5; max-height: 360px; object-fit: cover; border-radius: var(--r); display: block; margin-bottom: 12px; }
.ti-steps { padding-right: 18px; color: var(--text-2); }

/* ---------------------------------------------------------------------
   مشتری‌ها
   --------------------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 14px; }
.card { padding: 18px; display: grid; gap: 14px; text-decoration: none; transition: border-color .2s, transform .25s var(--ease); }
a.card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card-top { display: flex; gap: 12px; align-items: center; }
.card-top .logo-sq {
  width: 48px; height: 48px; border-radius: 12px; object-fit: cover; background: var(--surface-2);
  display: grid; place-items: center; font: 700 16px var(--font-head); color: var(--text-2); flex: none; border: 1px solid var(--line);
}
.card-top h3 { font-size: 1rem; }
.kv { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); }
.kv b { color: var(--text); font-weight: 600; }

/* ---------------------------------------------------------------------
   تقویم
   --------------------------------------------------------------------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cal-head h2 { margin: 0; font-size: 1.1rem; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cal .dow { text-align: center; font-size: 11.5px; color: var(--muted); padding: 8px 0; background: var(--surface); }
.cal .day {
  min-height: 108px; padding: 8px; background: var(--surface);
  text-decoration: none; display: flex; flex-direction: column; gap: 3px; overflow: hidden; transition: background-color .15s;
}
.cal .day:hover { background: var(--surface-2); }
.cal .day.out { background: color-mix(in srgb, var(--surface) 60%, var(--bg)); }
.cal .day.out .dn { opacity: .35; }
.cal .day.today .dn { background: var(--accent); color: var(--accent-ink); }
.cal .day.sel { background: var(--surface-3); }
.cal .dn { font: 600 12.5px/24px var(--font-body); width: 24px; height: 24px; text-align: center; border-radius: 50%; }
.cal .day.fri .dn { color: var(--danger); }
.cal .day.today.fri .dn { color: var(--accent-ink); }
.ev { display: block; font-size: 11px; line-height: 1.55; padding: 1px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.list .ev { flex: none; min-width: 72px; text-align: center; }
.ev.k-meeting { background: var(--t2b); color: var(--t2); }
.ev.k-shoot { background: var(--t3b); color: var(--t3); }
.ev.k-publish { background: var(--t1b); color: var(--t1); }
.ev.k-other { background: var(--t5b); color: var(--t5); }
.ev.k-task { background: transparent; color: var(--muted); border: 1px dashed var(--line-2); }
.ev-more { font-size: 10.5px; color: var(--muted); }
@media (max-width: 760px) {
  .cal .day { min-height: 54px; align-items: center; padding: 6px 2px; }
  .cal .ev { display: none; }
  .cal .ev-dots { display: flex; gap: 2px; }
  .cal .ev-more { display: none; }
}
.ev-dots { display: none; }
.ev-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent-text); }

/* ---------------------------------------------------------------------
   حضور و غیاب
   --------------------------------------------------------------------- */
.clock-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.clock-now { font: 800 2.6rem/1 var(--font-head); font-variant-numeric: tabular-nums; }
.clock-times { display: flex; gap: 28px; }
.clock-times div { display: grid; }
.clock-times b { font: 700 1.25rem var(--font-head); }

/* ---------------------------------------------------------------------
   فاکتور (فرم)
   --------------------------------------------------------------------- */
.inv-items .it-row { display: grid; grid-template-columns: minmax(0, 3fr) 90px minmax(0, 1.4fr) 40px; gap: 8px; align-items: center; margin-bottom: 8px; }
.inv-sum { display: grid; gap: 6px; justify-content: end; text-align: left; }
.inv-sum div { display: flex; gap: 24px; justify-content: space-between; min-width: 260px; }
.inv-sum .total { font: 700 1.15rem var(--font-head); border-top: 1px solid var(--line-2); padding-top: 8px; }
@media (max-width: 620px) { .inv-items .it-row { grid-template-columns: 1fr 70px; } .inv-items .it-row input[name="price[]"] { grid-column: 1; } }

/* ---------------------------------------------------------------------
   برگه فاکتور (چاپ سیاه‌وسفید)
   --------------------------------------------------------------------- */
.print-sheet { background: #fff; color: #111827; border: 1px solid #D8DCE5; border-radius: 4px; padding: 36px 40px; max-width: 900px; margin: 0 auto; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .5); }
.print-sheet h1, .print-sheet h2, .print-sheet h3 { color: #0E1530; }
.print-sheet .table { border-collapse: collapse; width: 100%; }
.print-sheet .table th { background: #0E1530; color: #fff; border: 1px solid #0E1530; padding: 10px; font-size: 12px; }
.print-sheet .table td { border: 1px solid #D1D5DB; color: #111827; padding: 10px; background: #fff !important; }
.print-sheet .muted, .print-sheet .hint { color: #5A6478; }
.print-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-bottom: 2px solid #0E1530; padding-bottom: 20px; margin-bottom: 24px; }
.print-head .logo { background: #0E1530; width: 96px; height: 48px; }
.invoice-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; border: 1px solid #D8DCE5; padding: 14px 16px; margin-bottom: 18px; }
.invoice-meta > div { min-width: 0; }
.invoice-label { display: block; color: #6B7280; font-size: 12px; margin-bottom: 2px; }
.print-sheet .inv-sum { margin-inline-start: auto; width: min(390px, 100%); }
.print-sheet .inv-sum > div { border-bottom: 1px solid #E5E7EB; padding: 7px 0; }
.print-sheet .inv-sum .total { border-top: 2px solid #0E1530; border-bottom: 2px solid #0E1530; color: #0E1530; font-size: 1.15rem; }
.invoice-footer { margin-top: 28px; border-top: 1px solid #D8DCE5; padding-top: 14px; display: flex; justify-content: space-between; gap: 24px; }
.invoice-stamp { width: 150px; height: 70px; border: 1px dashed #9CA3AF; display: grid; place-items: center; color: #9CA3AF; font-size: 12px; }
@media print {
  @page { size: A4; margin: 10mm; }
  body { background: #fff !important; font-size: 11px; }
  body::before { display: none; }
  .topbar, .sidenav, .bottomnav, .no-print, .flash, .p-top, .preview-bar { display: none !important; }
  .portal { padding: 0; }
  body.has-nav .main { margin: 0; padding: 0; }
  .print-sheet { border: 0 !important; padding: 0 !important; max-width: none !important; box-shadow: none; }
  .print-sheet .table th { background: #E5E7EB !important; color: #111 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-head .logo { background: #111 !important; }
  .invoice-stamp { height: 55px; }
}

/* ---------------------------------------------------------------------
   ورود و صفحه‌های ساده
   --------------------------------------------------------------------- */
body.bare:not(.portal-body) {
  background:
    radial-gradient(700px 420px at 50% -10%, var(--bg-hi), transparent 70%),
    var(--bg);
}
.auth { min-height: calc(100vh - 48px); display: grid; place-items: center; padding: 20px; }
.auth-box { width: min(400px, 100%); padding: 36px 30px 30px; border-radius: var(--r-xl); display: grid; gap: 14px; text-align: center; box-shadow: var(--shadow-pop); }
.auth-box .logo { margin: 0 auto 10px; width: 84px; height: 42px; background: var(--text); }
.auth-box h1 { font-size: 1.3rem; }
.auth-box p { margin: -6px 0 6px; color: var(--muted); font-size: 13px; }
.auth-box .form, .auth-box.form { text-align: right; }
.auth-box .btn { min-height: 44px; margin-top: 4px; }
.otp-input { text-align: center; letter-spacing: 12px; font: 700 24px var(--font-head) !important; direction: ltr; }

/* ---------------------------------------------------------------------
   تنظیمات
   --------------------------------------------------------------------- */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.theme-opt { position: relative; display: grid; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; font-size: 13px; transition: border-color .2s; }
.theme-opt:hover { border-color: var(--line-2); }
.theme-opt:has(input:checked) { border-color: var(--ring); box-shadow: 0 0 0 3px var(--accent-soft); }
.theme-opt input { position: absolute; opacity: 0; }
.swatch { display: flex; height: 44px; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px var(--line) inset; }
.swatch i { flex: 1; }
.swatch i:last-child { flex: .45; }

/* ---------------------------------------------------------------------
   پنل مشتری
   --------------------------------------------------------------------- */
.portal { max-width: 1180px; margin: 0 auto; padding: calc(18px + env(safe-area-inset-top)) 18px 48px; }
.p-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.p-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.p-brand .logo { width: 56px; height: 28px; background: var(--text); }
.p-brand b { display: block; font: 600 .95rem/1.1 var(--font-body); letter-spacing: .3em; direction: ltr; }
.p-brand span { font-size: 12px; color: var(--muted); }
.p-hero { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.p-hero img, .p-hero .logo-sq { width: 110px; height: 92px; border-radius: 14px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; font: 700 26px var(--font-head); color: var(--text-2); border: 1px solid var(--line); }
.p-hero h1 { font-size: 1.45rem; }
.p-progress { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; }
.p-progress .progress { flex: 1; height: 6px; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
@media (max-width: 520px) { .vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .vcard h3 { font-size: .85rem; } .p-hero img, .p-hero .logo-sq { width: 80px; height: 72px; } }
.vcard { display: grid; gap: 10px; padding: 8px; border-radius: 14px; }
.vthumb { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.vthumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.vcard:hover .vthumb img { transform: scale(1.03); }
.vthumb .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .45)); }
.vthumb .play .ic { width: 40px; height: 40px; padding: 10px; border-radius: 50%; background: rgba(10, 16, 34, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.vcard h3 { font-size: .9rem; text-align: center; font-weight: 600; }
.vcard form { margin: 0; }
.vcard .btn { width: 100%; min-height: 36px; }
.vcard details summary { list-style: none; }
.vcard details summary::-webkit-details-marker { display: none; }
.vcard details[open] summary { display: none; }
.vcard textarea { min-height: 80px; font-size: 13.5px; }
.ptile { border-radius: 14px; padding: 14px; }
.mini-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-size: 12px; }
.mini-cal span { padding: 5px 0; border-radius: 8px; position: relative; font-variant-numeric: tabular-nums; }
.mini-cal .h { color: var(--muted); font-size: 11px; }
.mini-cal .has::after { content: ""; position: absolute; bottom: 1px; right: 50%; transform: translateX(50%); width: 4px; height: 4px; border-radius: 50%; background: var(--ok); }
.mini-cal .today { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.mini-cal .has.pub { box-shadow: 0 0 0 1px var(--ring) inset; }
.preview-bar { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 13px; background: color-mix(in srgb, var(--warn) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }

/* ---------------------------------------------------------------------
   انیمیشن ورود ملایم
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .main > * { animation: rise .45s var(--ease) both; }
  .main > *:nth-child(2) { animation-delay: .04s; }
  .main > *:nth-child(3) { animation-delay: .08s; }
  .main > *:nth-child(4) { animation-delay: .12s; }
  @keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* ---------------------------------------------------------------------
   پنل مشتری — جزئیات
   --------------------------------------------------------------------- */
.vcard { min-width: 0; align-content: start; }
.vcard .pill { white-space: normal; text-align: center; line-height: 1.6; padding: 3px 10px; max-width: 100%; }
.vcard:has(form) { border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.vcard .btn.ok { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.vcard h3 { line-height: 1.6; }

/* ---------------------------------------------------------------------
   رمزها (Password Manager)
   --------------------------------------------------------------------- */
.vault-group { padding: 18px 8px 8px; }
.vault-group + .vault-group { margin-top: 14px; }
.vault-group .panel-head { padding: 0 14px; margin-bottom: 6px; }
.vault-list { list-style: none; margin: 0; padding: 0; }
.vrow {
  display: grid; grid-template-columns: 38px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) 84px; align-items: center; gap: 14px;
  padding: 10px 14px; border-radius: 12px; transition: background-color .15s;
}
.vrow + .vrow { border-top: 1px solid var(--line); }
.vrow:hover { background: color-mix(in srgb, var(--text) 2.5%, transparent); }
.v-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--surface-3); color: var(--text-2); }
.v-ic.v-instagram { color: #F29CC0; background: rgba(236, 110, 165, .12); }
.v-ic.v-email { color: var(--t2); background: var(--t2b); }
.v-ic.v-website, .v-ic.v-hosting { color: var(--t1); background: var(--t1b); }
.v-ic.v-ads { color: var(--t3); background: var(--t3b); }
.v-ic.v-tool { color: var(--t0); background: var(--t0b); }
.v-main { display: grid; min-width: 0; }
.v-title { font-weight: 600; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-title:hover { color: var(--accent-text); }
.v-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-sub a { text-decoration: none; color: var(--text-2); }
.v-sub a:hover { color: var(--text); text-decoration: underline; }
.v-sub .pill { line-height: 18px; font-size: 10.5px; padding: 0 7px; }
.v-sub .pill::before { display: none; }
.v-field {
  display: flex; align-items: center; gap: 4px; min-width: 0; height: 36px; padding: 0 4px 0 10px; border-radius: 9px;
  background: var(--field); border: 1px solid var(--line);
}
.v-val { flex: 1; min-width: 0; font: 500 13px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; color: var(--text-2); }
.v-secret { letter-spacing: .12em; color: var(--muted); }
.vrow.shown .v-secret { letter-spacing: 0; color: var(--text); }
.v-btn {
  display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 7px; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; transition: color .15s, background-color .15s;
}
.v-btn:hover { color: var(--text); background: var(--accent-soft); }
.v-btn:disabled { opacity: .5; cursor: wait; }
.v-str { display: inline-flex; gap: 2px; margin: 0 4px; }
.v-str i { width: 4px; height: 12px; border-radius: 2px; background: var(--surface-3); }
.v-str.s1 i:nth-child(-n+1), .v-meter.s1 i:nth-child(-n+1) { background: var(--danger); }
.v-str.s2 i:nth-child(-n+2), .v-meter.s2 i:nth-child(-n+2) { background: var(--warn); }
.v-str.s3 i:nth-child(-n+3), .v-meter.s3 i:nth-child(-n+3) { background: var(--ok); }
.v-str.s4 i, .v-meter.s4 i { background: var(--ok); }
.v-meta { text-align: left; font-variant-numeric: tabular-nums; }
.v-input { position: relative; display: flex; align-items: center; gap: 2px; }
.v-input input { flex: 1; padding-left: 12px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.v-input input:not([name=username]) { padding-left: 100px; }
.v-input input[name=username] { padding-left: 42px; }
.v-input .v-btn { position: absolute; top: 50%; transform: translateY(-50%); }
.v-input .v-btn:nth-of-type(1) { left: 8px; }
.v-input .v-btn:nth-of-type(2) { left: 38px; }
.v-input .v-btn:nth-of-type(3) { left: 68px; }
.v-meter { display: flex; align-items: center; gap: 4px; height: 16px; }
.v-meter i { flex: 1; max-width: 48px; height: 4px; border-radius: 2px; background: var(--surface-3); transition: background-color .2s; }
.v-meter.s0 { visibility: hidden; }
.v-meter b { font-weight: 500; font-size: 11.5px; color: var(--muted); margin-right: 6px; }
.v-toast {
  position: fixed; z-index: 60; left: 50%; bottom: 28px; transform: translateX(-50%);
  padding: 10px 16px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: 13px; font-weight: 500;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .5); animation: rise .25s var(--ease);
}
.v-toast.bad { background: var(--danger); color: #fff; }
@media (max-width: 1000px) {
  .vrow { grid-template-columns: 38px minmax(0, 1fr) minmax(0, 1fr); }
  .v-user { grid-column: 2; }
  .v-pass { grid-column: 3; }
  .v-main { grid-column: 2 / -1; }
  .v-ic { grid-row: span 2; align-self: start; }
  .v-meta { display: none; }
}
@media (max-width: 620px) {
  .vrow { grid-template-columns: 34px minmax(0, 1fr); gap: 8px 12px; }
  .v-ic { width: 34px; height: 34px; grid-row: span 3; }
  .v-user, .v-pass, .v-main { grid-column: 2; }
  .v-toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* ---------------------------------------------------------------------
   مینی‌اپ ویجت (widget.php)
   --------------------------------------------------------------------- */
body.page-widget .main { max-width: 460px; padding: calc(12px + env(safe-area-inset-top)) 14px calc(24px + env(safe-area-inset-bottom)); }
.wg { display: grid; gap: 12px; }
.wg-top { display: flex; align-items: center; gap: 10px; padding: 2px 2px 4px; }
.wg-brand .logo { width: 40px; height: 20px; background: var(--text); }
.wg-hello { flex: 1; color: var(--muted); font-size: 13px; }
.wg-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.wg-head { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.wg-head b { flex: 1; font-weight: 700; }
.wg-time { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.wg-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 4px color-mix(in srgb, var(--muted) 15%, transparent); }
.wg-dot.in { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); animation: pulse 2s ease-in-out infinite; }
.wg-dot.done { background: var(--accent-text); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--ok) 6%, transparent); } }
.wg-big {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 58px; border-radius: 16px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font: 700 17px/1 var(--font-body); transition: filter .2s, transform .1s;
}
.wg-big:active { transform: scale(.985); }
.wg-big.stop { background: color-mix(in srgb, var(--danger) 14%, var(--surface-2)); color: var(--danger); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 35%, transparent); }
.wg-big:disabled { opacity: .55; cursor: default; }
.wg-kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; }
.wg-kv div { display: grid; gap: 2px; padding: 10px; border-radius: 12px; background: var(--surface-2); text-align: center; }
.wg-kv dt { font-size: 11px; color: var(--muted); }
.wg-kv dd { margin: 0; font: 700 15px/1.3 var(--font-body); font-variant-numeric: tabular-nums; }
.wg-run { display: grid; gap: 10px; text-align: center; }
.wg-task { display: grid; gap: 2px; }
.wg-task b { font-size: 15px; }
.wg-task span { font-size: 12px; color: var(--muted); }
.wg-clockface { font: 800 44px/1.1 var(--font-body); font-variant-numeric: tabular-nums; letter-spacing: .02em; direction: ltr; }
.wg-sub { font-size: 12.5px; color: var(--muted); }
.wg-sub b { color: var(--text-2); }
.wg-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 360px; overflow-y: auto; }
.wg-taskbtn {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font: inherit; text-align: right; cursor: pointer; transition: border-color .15s;
}
.wg-taskbtn:hover { border-color: var(--line-2); }
.wg-taskbtn:disabled { opacity: .5; }
.wg-play { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none; background: var(--accent); color: var(--accent-ink); padding-right: 2px; }
.wg-tt { flex: 1; min-width: 0; display: grid; }
.wg-tt b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wg-tt small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wg-tot { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
body.page-widget .v-toast { bottom: calc(20px + env(safe-area-inset-bottom)); width: max-content; max-width: calc(100% - 32px); text-align: center; }

/* ---------------------------------------------------------------------
   گزارش زمان ادیت
   --------------------------------------------------------------------- */
.rep-bars { display: grid; gap: 2px; }
.rep-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) auto; gap: 12px; align-items: center; padding: 8px 6px; border-radius: 8px; }
.rep-row:hover { background: color-mix(in srgb, var(--text) 3%, transparent); }
.rep-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13.5px; font-weight: 500; }
.rep-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep-track { height: 10px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.rep-fill { height: 100%; border-radius: 4px; background: var(--accent); min-width: 2px; }
[data-theme="navy_white"] .rep-fill { background: #C9D3EA; }
.rep-val { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: left; }
.rep-val small { color: var(--muted); }
.rep-range { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rep-range input { width: 130px; min-height: 38px; direction: ltr; text-align: center; }
.timer-box { display: grid; gap: 12px; }
.timer-box .wg-clockface { font-size: 34px; text-align: center; }
.guide { display: grid; gap: 10px; counter-reset: g; margin: 0; padding: 0; list-style: none; }
.guide li { position: relative; padding-right: 34px; font-size: 13.5px; line-height: 1.9; }
.guide li::before { counter-increment: g; content: counter(g); position: absolute; right: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 12px; font-weight: 700; }
.codebox { position: relative; }
.codebox textarea, .codebox input { font: 12px/1.6 ui-monospace, Menlo, Consolas, monospace !important; direction: ltr; text-align: left; }
.codebox textarea { min-height: 160px; }
.codebox .v-btn { position: absolute; top: 8px; left: 8px; background: var(--surface-3); }
.token-new { border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); background: color-mix(in srgb, var(--ok) 6%, var(--surface)); }
.codeline { display: block; margin: 6px 0; padding: 8px 10px; border-radius: 8px; background: var(--field); border: 1px solid var(--line); direction: ltr; text-align: left; font: 12px/1.6 ui-monospace, Menlo, Consolas, monospace; word-break: break-all; color: var(--text); }
.codebox input { padding-left: 44px !important; }
.guides { grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); }
.auth-alt { display: grid; gap: 8px; margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; font-size: 12.5px; color: var(--muted); }
.acc-client { display: grid; gap: 6px; margin-bottom: 10px; padding: 10px 14px 12px; }
.acc-client legend { padding: 0 6px; }
.acc-client > .check { padding-right: 26px; }
.acc-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
.form { align-content: start; }

/* ---------------------------------------------------------------------
   تقویم شمسی (jdp.js)
   --------------------------------------------------------------------- */
.jdp-wrap { position: relative; display: block; width: 100%; }
.rep-range .jdp-wrap, .filters .jdp-wrap { display: inline-block; width: auto; }
.jdp-wrap input { padding-left: 38px !important; }
.jdp-btn { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }
.jdp-btn:hover { color: var(--text); background: var(--accent-soft); }
.jdp {
  position: absolute; z-index: 90; width: 292px; padding: 12px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: var(--shadow-pop); color: var(--text);
  font-family: var(--font-body); animation: rise .18s var(--ease);
}
.jdp.sheet { position: fixed; left: 10px !important; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); top: auto !important; width: auto; }
.jdp-head { display: flex; align-items: center; gap: 2px; margin-bottom: 8px; }
.jdp-head b { flex: 1; text-align: center; font-size: 14px; }
.jdp-head button, .jdp-foot button { border: 0; background: transparent; color: var(--text-2); cursor: pointer; border-radius: 8px; font: inherit; }
.jdp-head button { width: 30px; height: 30px; font-size: 17px; }
.jdp-head button:hover, .jdp-foot button:hover { background: var(--accent-soft); color: var(--text); }
.jdp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.jdp-dow { font-size: 11px; color: var(--muted); padding: 4px 0; }
.jdp-grid button { height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--text); font: 500 13.5px/1 var(--font-body); cursor: pointer; font-variant-numeric: tabular-nums; }
.jdp-grid button:hover { background: var(--accent-soft); }
.jdp-grid .fri { color: var(--danger); }
.jdp-grid .today { box-shadow: inset 0 0 0 1px var(--ring); }
.jdp-grid .sel { background: var(--accent); color: var(--accent-ink); }
.jdp.sheet .jdp-grid button { height: 44px; font-size: 15px; }
.jdp-foot { display: flex; gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.jdp-foot button { flex: 1; height: 32px; font-size: 12.5px; }
.slip-total { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.slip-total b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.pay-table td { white-space: nowrap; }

/* ---------------------------------------------------------------------
   حسابداری: سود و زیان، حساب‌ها
   --------------------------------------------------------------------- */
.pnl-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; height: 240px; margin: 6px 0 10px; }
.pnl-col { display: grid; grid-template-rows: 1fr auto auto; height: 100%; gap: 4px; text-decoration: none; padding: 6px 2px 4px; border-radius: 10px; transition: background-color .15s; }
.pnl-col:hover, .pnl-col.on { background: color-mix(in srgb, var(--text) 4%, transparent); }
.pnl-bars { display: flex; align-items: flex-end; justify-content: center; gap: 2px; min-height: 0; }
.pnl-bars i { width: min(14px, 38%); border-radius: 4px 4px 0 0; min-height: 2px; }
.pnl-bars .in { background: var(--ok); }
.pnl-bars .out { background: var(--warn); opacity: .85; }
.pnl-lbl { text-align: center; font-size: 11.5px; color: var(--muted); }
.pnl-col.on .pnl-lbl { color: var(--text); font-weight: 600; }
.pnl-net { text-align: center; font-size: 10.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pnl-table th, .pnl-table td { white-space: nowrap; text-align: center; font-size: 12.5px; padding: 9px 8px; }
.pnl-table th:first-child, .pnl-table td:first-child { text-align: right; }
.pnl-table th.on { color: var(--text); }
.pnl-table tfoot td { font-weight: 700; }
.row-on td { background: var(--accent-soft) !important; }
.ok-t { color: var(--ok); }
.ledger li { font-size: 13px; }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.acc-card { display: grid; gap: 4px; align-content: start; }
.acc-card b { font-size: 15px; }
.acc-card .acc-bal { font: 800 1.35rem/1.4 var(--font-body); }
.acc-card.off { opacity: .55; }
.acc-card form { margin-top: 6px; }
@media (max-width: 620px) { .pnl-chart { height: 180px; gap: 2px; } .pnl-net { display: none; } }

/* ---------------------------------------------------------------------
   صورتجلسات
   --------------------------------------------------------------------- */
.meet-list { display: grid; gap: 10px; }
.meet-card { display: flex; align-items: center; gap: 16px; padding: 14px 18px; text-decoration: none; transition: border-color .2s; }
.meet-card:hover { border-color: var(--line-2); }
.meet-date { display: grid; place-items: center; width: 56px; flex: none; padding: 6px 0; border-radius: 12px; background: var(--surface-2); line-height: 1.3; }
.meet-date b { font-size: 1.3rem; }
.meet-date span { font-size: 11px; color: var(--muted); }
.meet-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.meet-main b { font-size: 14.5px; }
.meet-snip { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-check { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line-2); background: transparent; cursor: pointer; padding: 0; }
.m-check:hover { border-color: var(--ok); }
.m-check.on { background: var(--ok); border-color: var(--ok); }
.m-check.on::after { content: "✓"; color: #06150d; font-size: 13px; font-weight: 700; }
.m-acts { display: grid; gap: 8px; margin-bottom: 10px; }
.m-act { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) 130px auto auto; gap: 6px; align-items: center; }
.m-act .check { justify-content: center; }
@media (max-width: 760px) { .m-act { grid-template-columns: 1fr 1fr auto auto; } .m-act > input[name^="act_title"] { grid-column: 1 / -1; } }
.minutes { max-width: 900px; padding: 28px 30px; }
.minutes-head { display: flex; gap: 18px; align-items: flex-start; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.minutes-head .logo { width: 64px; height: 32px; background: var(--text); flex: none; margin-top: 6px; }
.minutes-head h2 { font-size: 1.2rem; margin-bottom: 10px; }
.minutes-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 6px 20px; margin: 0; font-size: 13px; }
.minutes-meta dt { color: var(--muted); font-size: 11.5px; }
.minutes-meta dd { margin: 0; }
.minutes section { margin-bottom: 20px; }
.minutes h3 { font-size: .95rem; margin-bottom: 8px; color: var(--text-2); }
.minutes-body { line-height: 2; font-size: 14px; }
.minutes-dec { margin: 0; padding-right: 20px; display: grid; gap: 6px; line-height: 1.9; }
.minutes-acts .is-done td:nth-child(2) { text-decoration: line-through; color: var(--muted); }
.minutes-foot { border-top: 1px solid var(--line); padding-top: 12px; }
@media print {
  .minutes { background: #fff !important; color: #111 !important; border: 0 !important; box-shadow: none !important; max-width: none; padding: 0; }
  .minutes * { color: #111 !important; }
  .minutes-head .logo { background: #111 !important; }
  .minutes .m-check { border-color: #555 !important; }
}

/* ================= پلنر v5 ================= */
.pl-wrap { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; align-items: start; }
.pl-side { display: grid; gap: 16px; position: sticky; top: 16px; }
.pl-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 2px; }
.pl-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; cursor: pointer; }
label.pl-item:hover { background: var(--surface-2); }
.pl-item input { position: absolute; opacity: 0; pointer-events: none; }
.pl-dot { width: 14px; height: 14px; border-radius: 5px; flex: none; border: 2px solid var(--c); background: var(--c); transition: background-color .15s; }
.pl-item input:not(:checked) ~ .pl-dot { background: transparent; }
.pl-item input:not(:checked) ~ .pl-name { color: var(--muted); }
.pl-item input:focus-visible ~ .pl-dot { outline: 2px solid var(--accent); outline-offset: 2px; }
.pl-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-lock { color: var(--muted); display: inline-flex; }
.pl-n { font-size: 12px; color: var(--muted); min-width: 18px; text-align: center; }
.pl-opts { display: grid; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.pl-main { padding: 16px; min-width: 0; }
.pl-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pl-nav { display: flex; align-items: center; gap: 6px; }
.pl-nav h2 { margin: 0 8px 0 0; font-size: 1.2rem; }
.pl-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); }
.pl-seg a { padding: 5px 14px; border-radius: 7px; color: var(--muted); font-size: 13.5px; }
.pl-seg a:hover { color: var(--text); }
.pl-seg a.on { background: var(--surface-3); color: var(--text); font-weight: 600; }

/* چیپ برنامه با رنگ پلنر */
.pe { display: flex; align-items: center; gap: 4px; font-size: 11.5px; line-height: 1.6; padding: 1px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden;
      background: color-mix(in srgb, var(--c, #9AA3B5) 18%, transparent); color: var(--text); border-inline-start: 3px solid var(--c, #9AA3B5); cursor: pointer; }
.pe span { overflow: hidden; text-overflow: ellipsis; }
.pe i { font-style: normal; color: var(--muted); font-size: 10.5px; flex: none; }
.pe:hover { background: color-mix(in srgb, var(--c, #9AA3B5) 30%, transparent); }
.pe.done span, .wk-ev.done b { text-decoration: line-through; opacity: .6; }
.pe.task { background: transparent; border: 1px dashed var(--line-2); color: var(--muted); }
.pe.dragging, .wk-ev.dragging { opacity: .4; }

/* نمای ماه */
.pc { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.pc-dow { background: var(--surface); text-align: center; font-size: 12px; color: var(--muted); padding: 8px 0; }
.pc-dow .s { display: none; }
.pc-day { background: var(--surface); min-height: 118px; padding: 6px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; position: relative; transition: background-color .15s; }
.pc-day:hover { background: var(--surface-2); }
.pc-day.out { background: color-mix(in srgb, var(--surface) 55%, var(--bg)); }
.pc-day.out .pc-dn { opacity: .45; }
.pc-day.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.pc-day.drop-on { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.pc-day.drop-busy { opacity: .5; }
.pc-top { display: flex; align-items: center; justify-content: space-between; }
.pc-dn { font: 600 13px/26px var(--font-body); min-width: 26px; height: 26px; text-align: center; border-radius: 13px; padding: 0 4px; color: var(--text); }
.pc-dn small { font-weight: 400; color: var(--muted); font-size: 10.5px; }
.pc-day.fri .pc-dn { color: var(--danger); }
.pc-day.today .pc-dn { background: var(--accent); color: var(--accent-ink); }
.pc-add { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); font-size: 17px; line-height: 1; opacity: 0; transition: opacity .15s, background-color .15s; }
.pc-day:hover .pc-add, .pc-add:focus-visible, .agenda-day .pc-add { opacity: 1; }
.pc-add:hover { background: var(--surface-3); color: var(--text); }
.pc-evs { display: grid; gap: 3px; min-width: 0; }
.pc-more { font-size: 11px; color: var(--muted); padding: 0 4px; }
.pc-more:hover { color: var(--text); }
.pc-dots { display: none; }

/* نمای هفته */
.wk-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.wk { display: grid; grid-template-columns: 54px repeat(7, minmax(112px, 1fr)); min-width: 840px; }
.wk-corner, .wk-lbl { background: var(--surface); border-bottom: 1px solid var(--line); }
.wk-lbl { font-size: 11px; color: var(--muted); display: grid; place-items: center; }
.wk-dh { display: grid; justify-items: center; gap: 2px; padding: 8px 0; background: var(--surface); border-bottom: 1px solid var(--line); border-inline-start: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.wk-dh b { font-size: 1.15rem; color: var(--text); width: 34px; height: 34px; line-height: 34px; text-align: center; border-radius: 50%; }
.wk-dh.today b { background: var(--accent); color: var(--accent-ink); }
.wk-dh.sel { box-shadow: inset 0 -2px 0 var(--accent); }
.wk-dh.fri span { color: var(--danger); }
.wk-all { display: grid; gap: 3px; align-content: start; padding: 5px; min-height: 40px; background: var(--surface); border-bottom: 1px solid var(--line-2); border-inline-start: 1px solid var(--line); }
.wk-all.drop-on, .wk-col.drop-on { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.wk-hours { position: relative; background: var(--surface); }
.wk-hours span { position: absolute; inset-inline: 0; transform: translateY(-50%); text-align: center; font-size: 10.5px; color: var(--muted); }
.wk-hours span:first-child { transform: none; }
.wk-col { position: relative; border-inline-start: 1px solid var(--line); cursor: copy;
          background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hpx) - 1px), var(--line) calc(var(--hpx) - 1px), var(--line) var(--hpx)), var(--surface); }
.wk-col.today { background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hpx) - 1px), var(--line) calc(var(--hpx) - 1px), var(--line) var(--hpx)), color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.wk-ev { position: absolute; display: flex; flex-direction: column; gap: 1px; overflow: hidden; padding: 3px 6px; border-radius: 7px; font-size: 11.5px; cursor: pointer; z-index: 1;
         background: color-mix(in srgb, var(--c) 24%, var(--surface)); border-inline-start: 3px solid var(--c); color: var(--text); margin-inline-start: 2px; }
.wk-ev:hover { z-index: 2; box-shadow: var(--shadow-pop); }
.wk-ev b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-ev span { color: var(--muted); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-now { position: absolute; inset-inline: 0; height: 2px; background: var(--danger); z-index: 3; pointer-events: none; }
.wk-now::before { content: ""; position: absolute; inset-inline-start: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }

/* فهرست / دستور کار */
.agenda { display: grid; gap: 14px; }
.agenda-day header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.agenda-day header .pc-add { margin-inline-start: auto; }
.agenda-d { display: inline-grid; justify-items: center; min-width: 46px; padding: 4px 6px; border-radius: 10px; background: var(--surface-2); line-height: 1.2; }
.agenda-d b { font-size: 1.2rem; color: var(--text); }
.agenda-d span { font-size: 11px; }
.agenda-day.today .agenda-d { background: var(--accent); }
.agenda-day.today .agenda-d b, .agenda-day.today .agenda-d span { color: var(--accent-ink); }
.ag-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ag { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; border-radius: 10px; background: color-mix(in srgb, var(--c, #9AA3B5) 9%, var(--surface)); border-inline-start: 3px solid var(--c, #9AA3B5); }
.ag.task { --c: var(--line-2); background: transparent; border: 1px dashed var(--line-2); }
.ag.done .ag-main b { text-decoration: line-through; opacity: .6; }
.ag-tick { margin: 0; flex: none; }
.ag-bar { width: 22px; flex: none; }
.ag-main { display: grid; gap: 2px; min-width: 0; flex: 1; }
.ag-main .hint { font-size: 12px; }

/* دیالوگ افزودن سریع */
dialog.qa { border: 1px solid var(--line-2); border-radius: 16px; padding: 18px; width: min(520px, calc(100vw - 24px)); background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgba(0,0,0,.45); }
dialog.qa::backdrop { background: rgba(5, 10, 25, .55); backdrop-filter: blur(3px); }
.qa-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.qa-head h2 { margin: 0; font-size: 1.1rem; }

/* مدیریت پلنرها */
.pl-colors { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border: 0; padding: 0; }
.pl-colors legend { margin-bottom: 6px; }
.pl-colors label { cursor: pointer; }
.pl-colors input[type=radio] { position: absolute; opacity: 0; }
.pl-colors label > span { display: block; width: 30px; height: 30px; border-radius: 9px; background: var(--c); border: 2px solid transparent; }
.pl-colors input:checked + span { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface) inset; }
.pl-colors input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pl-color-custom { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.pl-color-custom input[type=color] { width: 34px; height: 30px; padding: 0; border: 1px solid var(--line-2); border-radius: 8px; background: none; }
.pl-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 4px 12px; margin: 6px 0 14px; }
.pl-members p { grid-column: 1 / -1; margin: 0; }
.pl-del { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; }
.pl-del h3 { margin: 0 0 8px; font-size: .95rem; color: var(--danger); }

@media (max-width: 1080px) {
  .pl-wrap { grid-template-columns: minmax(0, 1fr); }
  .pl-side { position: static; order: 2; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .pl-list { display: flex; flex-wrap: wrap; gap: 4px; }
}
@media (max-width: 700px) {
  .pl-main { padding: 10px; }
  .pl-nav h2 { font-size: 1.02rem; }
  .pc-dow .l { display: none; }
  .pc-dow .s { display: inline; }
  .pc-day { min-height: 58px; padding: 4px 2px; align-items: center; }
  .pc-evs, .pc-add { display: none; }
  .pc-dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
  .pc-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
  .pc-dots i.t { background: transparent; border: 1px solid var(--muted); }
  .pc-dn small { display: none; }
}

/* ================= فریلنسرها و خدمات ================= */
.fl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.fl-card { display: flex; flex-direction: column; gap: 10px; color: var(--text); position: relative; transition: transform .15s, border-color .15s; }
.fl-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.fl-card.off { opacity: .55; }
.fl-top { display: flex; align-items: center; gap: 10px; }
.fl-name { display: grid; flex: 1; min-width: 0; }
.fl-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-rate { color: var(--warn); letter-spacing: 1px; font-size: 13px; white-space: nowrap; }
.fl-rate i { font-style: normal; color: var(--line-2); }
.fl-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.fl-rate-note { font-size: 12.5px; }
.fl-foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: auto; }
.fl-foot > span { display: grid; gap: 2px; }
.fl-foot .hint { font-size: 11.5px; }
.fl-login { position: absolute; top: 14px; inset-inline-end: 14px; font-size: 11px; display: none; }
.warn-t { color: var(--warn); }
.fl-head { display: flex; align-items: center; gap: 14px; }
.fl-head h1 { margin: 0 0 6px; }
.fl-head p { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 0; }
.fl-skills { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-check { cursor: pointer; }
.chip-check input { position: absolute; opacity: 0; }
.chip-check span { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; color: var(--muted); transition: all .15s; }
.chip-check input:checked + span { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.chip-check input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.kv-list { display: grid; gap: 8px; margin: 0 0 10px; }
.kv-list > div { display: flex; gap: 10px; justify-content: space-between; align-items: baseline; border-bottom: 1px dashed var(--line); padding-bottom: 7px; }
.kv-list dt { color: var(--muted); font-size: 13px; flex: none; }
.kv-list dd { margin: 0; text-align: end; min-width: 0; overflow-wrap: anywhere; }
.fl-pay { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.inline-status { margin: 0; }
.inline-status select { padding: 4px 8px; font-size: 12.5px; min-height: 0; width: auto; }
.fl-jobs tr.is-done td { opacity: .5; }
.fl-jobs tr.is-done b { text-decoration: line-through; }
.fl-pays li { align-items: flex-start; }
.svc-group { margin-bottom: 16px; }
.svc-group h3 { margin: 0 0 8px; font-size: .98rem; display: flex; align-items: center; gap: 8px; }
.svc-row td input[type=text] { min-width: 0; }
.svc-off td { opacity: .5; }
@media (max-width: 700px) { .fl-grid { grid-template-columns: 1fr; } .fl-head .av-lg { width: 48px; height: 48px; } }
.pe, .pc-dn, .pc-more, .pc-add, .ag-main a, .pl-seg a, .wk-dh, .wk-ev, .fl-card, .agenda-day a, .svc-group a { text-decoration: none; }
.ag-main a:hover b, .ag-main a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ================= حضور با QR: کیوسک و صفحه اسکن ================= */
body.kiosk { background: radial-gradient(120% 90% at 80% 0%, var(--bg-hi), var(--bg) 55%, var(--bg-lo)); min-height: 100vh; overflow: hidden; }
.kiosk-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); align-items: center; gap: clamp(24px, 5vw, 80px); padding: clamp(20px, 4vw, 60px); }
.kiosk-qr { display: grid; justify-items: center; gap: 16px; }
.kiosk-card { background: #fff; border-radius: 28px; padding: clamp(14px, 2vw, 26px); box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.06); width: min(68vh, 100%); }
.kiosk-code { aspect-ratio: 1; width: 100%; }
.kiosk-code svg { width: 100%; height: 100%; display: block; }
.kiosk-timer { height: 6px; border-radius: 3px; background: #E7EAF2; margin-top: 14px; overflow: hidden; }
.kiosk-timer i { display: block; height: 100%; background: var(--accent); transform-origin: right; transition: transform 1s linear; }
.kiosk-note { color: var(--muted); margin: 0; font-size: 14px; }
.kiosk-side { display: grid; gap: 14px; align-content: center; }
.kiosk-brand { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.kiosk-brand .logo { width: 44px; height: 30px; }
.kiosk-clock { font: 800 clamp(56px, 8vw, 110px)/1 var(--font-display, var(--font-body)); letter-spacing: .02em; direction: ltr; text-align: right; }
.kiosk-date { color: var(--muted); font-size: 18px; }
.kiosk-steps { margin: 10px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.kiosk-steps li { counter-increment: s; display: flex; align-items: center; gap: 12px; font-size: 17px; }
.kiosk-steps li::before { content: counter(s, persian); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; flex: none; }
.kiosk-present { margin-top: 8px; color: var(--muted); }
.kiosk-present b { color: var(--text); font-size: 22px; margin-inline-end: 4px; }
.kiosk-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 34vh; overflow: hidden; }
.kiosk-feed li { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.kiosk-feed li b { flex: 1; }
.kiosk-feed li span { font-size: 13px; padding: 2px 10px; border-radius: 999px; }
.kiosk-feed li.r-in span { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.kiosk-feed li.r-out span { color: var(--accent-text); background: var(--accent-soft); }
.kiosk-feed li:not(.r-in):not(.r-out) span { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }
.kiosk-feed li time { color: var(--muted); font-size: 13px; }
.kiosk-feed li.fresh { animation: kfresh 1.2s var(--ease, ease) both; }
@keyframes kfresh { from { transform: translateY(-8px); opacity: 0; background: color-mix(in srgb, var(--ok) 25%, var(--surface)); } }
body.kiosk.flash-ok::after, body.kiosk.flash-bad::after { content: ""; position: fixed; inset: 0; pointer-events: none; animation: kflash 1.4s ease-out both; }
body.kiosk.flash-ok::after { box-shadow: inset 0 0 0 10px var(--ok); }
body.kiosk.flash-bad::after { box-shadow: inset 0 0 0 10px var(--danger); }
@keyframes kflash { from { opacity: 1; } to { opacity: 0; } }
.kiosk-fs { justify-self: start; margin-top: 6px; opacity: .6; }
.kiosk-fs:hover { opacity: 1; }
:fullscreen .kiosk-fs { display: none; }
@media (max-width: 860px) { body.kiosk { overflow: auto; } .kiosk-wrap { grid-template-columns: 1fr; } .kiosk-clock { text-align: center; } }

body.scan-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.scan-box { width: min(440px, 100%); text-align: center; display: grid; justify-items: center; gap: 6px; }
.scan-ic { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 10px; }
.scan-box.tone-ok .scan-ic { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); animation: scanpop .5s cubic-bezier(.2,1.4,.4,1) both; }
.scan-box.tone-warn .scan-ic { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.scan-box.tone-err .scan-ic { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
@keyframes scanpop { from { transform: scale(.4); opacity: 0; } }
.scan-box h1 { margin: 0; font-size: 1.5rem; }
.scan-box p { margin: 0; color: var(--text-2, var(--muted)); line-height: 1.9; }
.scan-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; justify-content: center; }
.att-opt { align-items: flex-start; padding: 8px 0; }
.att-opt span { display: grid; gap: 2px; }
.att-opt small { color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.clock-qr { display: flex; align-items: center; }
.clock-qr .hint { display: inline-flex; gap: 6px; align-items: center; }

/* ================= تولید محتوا، گردش کار، فایل‌ها ================= */
.stepper { list-style: none; display: flex; gap: 0; margin: 0 0 16px; padding: 0; overflow-x: auto; counter-reset: s; }
.stepper li { flex: 1 0 110px; display: grid; justify-items: center; gap: 6px; text-align: center; position: relative; font-size: 12.5px; color: var(--muted); padding: 0 4px; }
.stepper li::before { content: ""; position: absolute; top: 15px; inset-inline-start: 50%; width: 100%; height: 2px; background: var(--line-2); z-index: 0; }
.stepper li:last-child::before { display: none; }
.stepper li i { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; background: var(--surface-2); border: 2px solid var(--line-2); color: var(--muted); }
.stepper li.done i { background: var(--ok); border-color: var(--ok); color: #fff; }
.stepper li.done::before { background: var(--ok); }
.stepper li.cur i { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 5px var(--accent-soft); }
.stepper li.cur span { color: var(--text); font-weight: 600; }
.stepper li.k-qc i { border-style: dashed; }
.stepper li.k-client i { border-radius: 9px; }
.stepper li small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.stepper.sm li { flex-basis: 90px; font-size: 11.5px; }
.stepper.sm li i { width: 24px; height: 24px; font-size: 11px; }
.stepper.sm li::before { top: 12px; }
.panel.gate { border-inline-start: 4px solid var(--accent); }
.panel.gate.qc, .panel.gate.client { border-inline-start-color: var(--warn); }
.panel.gate.ok { border-inline-start-color: var(--ok); }
.wf-banner { margin-bottom: 16px; }
.wf-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.wf-chain { margin: -6px 0 8px; }
.ct-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.ct-col { display: grid; gap: 10px; align-content: start; background: color-mix(in srgb, var(--surface) 50%, transparent); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; min-height: 200px; }
.ct-col header { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 4px; }
.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ct-card { display: grid; gap: 6px; padding: 12px 14px; color: var(--text); text-decoration: none; transition: transform .15s, border-color .15s; }
.ct-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.ct-cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 9px; }
.ct-stage { font-size: 13px; }
.ct-prog { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.ct-prog i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.ct-foot { display: flex; align-items: center; gap: 6px; font-size: 12.5px; flex-wrap: wrap; }
.ct-foot .av { width: 22px; height: 22px; font-size: 10px; }
.ct-foot > span:first-of-type { flex: 1; }
.tabs .n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--warn); color: #111; font-size: 11px; margin-inline-start: 4px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.timeline li { position: relative; padding-inline-start: 16px; font-size: 13.5px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 0; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.timeline li.tl-qc_ok::before, .timeline li.tl-client_ok::before, .timeline li.tl-published::before, .timeline li.tl-ready::before { background: var(--ok); }
.timeline li.tl-qc_back::before, .timeline li.tl-client_back::before { background: var(--danger); }
.timeline li .hint { display: block; font-size: 11.5px; }
.tl-note { background: var(--surface-2); border-radius: 8px; padding: 6px 10px; margin: 4px 0; font-size: 13px; }
.f-group { font-size: .9rem; margin: 16px 0 8px; color: var(--muted); }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.fcard { display: grid; grid-template-rows: auto 1fr auto; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.fthumb { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--surface-2); }
video.fthumb { object-fit: contain; background: #000; }
.fthumb.ficon { display: grid; place-items: center; color: var(--muted); }
.fthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fmeta { display: grid; gap: 2px; padding: 8px 10px 0; min-width: 0; }
.fname { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); text-decoration: none; }
.fmeta .hint { font-size: 11.5px; }
.factions { display: flex; gap: 4px; padding: 6px 8px 8px; justify-content: flex-end; }
.factions form { display: flex; gap: 4px; margin: 0; }
.factions .btn.on { color: var(--ok); }
.uploader { display: grid; gap: 10px; }
.up-drop { display: grid; justify-items: center; gap: 4px; padding: 22px 16px; border: 2px dashed var(--line-2); border-radius: 14px; cursor: pointer; text-align: center; color: var(--muted); transition: border-color .15s, background-color .15s; }
.up-drop b { color: var(--text); font-size: 14px; }
.up-drop:hover, .up-drop.on { border-color: var(--accent); background: var(--accent-soft); }
.up-bar { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.up-bar select { width: auto; }
.up-link summary { list-style: none; }
.up-link-form { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.up-link-form input { flex: 1 1 160px; }
.up-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.up-list li { display: grid; grid-template-columns: 1fr auto 120px auto; gap: 10px; align-items: center; font-size: 13px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-prog { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.up-prog i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.up-list li.ok .up-prog i { background: var(--ok); }
.up-list li.err { color: var(--danger); }
.wf-rows { display: grid; gap: 8px; margin-bottom: 10px; }
.wf-row { display: grid; grid-template-columns: auto minmax(140px, 1.4fr) 130px minmax(120px, 1fr) minmax(120px, 1fr) 80px auto auto; gap: 6px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.wf-handle { color: var(--muted); cursor: default; }
.wf-days { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.wf-days input { width: 44px; text-align: center; }
.wf-file { font-size: 12px; white-space: nowrap; }
.wf-move { display: flex; gap: 2px; }
.wf-list { display: grid; gap: 12px; }
.pc-list { display: grid; gap: 18px; }
.pc-item { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 12px; }
.pc-item header h2 { margin: 0; font-size: 1.05rem; }
.pc-caption { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.pc-caption p { margin: 4px 0 0; }
.pc-decide { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.pc-decide details { flex: 1 1 260px; }
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.pkg { display: grid; gap: 6px; align-content: start; }
.pkg-media { position: relative; aspect-ratio: 4/5; border-radius: 14px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.pkg-media img { width: 100%; height: 100%; object-fit: cover; }
.pkg-media .pill { position: absolute; top: 10px; inset-inline-start: 10px; }
.pkg h3 { margin: 4px 0 0; font-size: 1rem; }
.pkg-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pkg-cap p { font-size: 13px; margin: 6px 0 0; }
.danger-t { color: var(--danger); }
@media (max-width: 900px) {
  .wf-row { grid-template-columns: 1fr 1fr; }
  .wf-row .wf-handle { display: none; }
  .wf-row input[type=text][name^="st_name"] { grid-column: 1 / -1; }
  .up-list li { grid-template-columns: 1fr auto; }
  .up-list li .up-prog { grid-column: 1 / -1; }
}

/* اسکنر داخل برنامه */
.scanner-wrap { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.scan-view { position: relative; aspect-ratio: 1; max-width: 520px; margin: 0 auto; border-radius: 20px; overflow: hidden; background: #000; }
.scan-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 14%; pointer-events: none; }
.scan-frame i { position: absolute; width: 34px; height: 34px; border: 4px solid #fff; }
.scan-frame i:nth-child(1) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.scan-frame i:nth-child(2) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.scan-frame i:nth-child(3) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.scan-frame i:nth-child(4) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.scan-msg { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center; color: #cfd5e6; background: rgba(8, 12, 24, .88); }
.scan-msg[hidden] { display: none; }
.code-form { display: flex; gap: 8px; }
.code-form input { font-size: 1.6rem; letter-spacing: .3em; text-align: center; direction: ltr; flex: 1; min-width: 0; }
.kiosk-code-txt { margin-top: 12px; color: #4A5068; font-size: 15px; text-align: center; }
.kiosk-code-txt b { font-size: 24px; letter-spacing: .12em; color: #0B1020; direction: ltr; display: inline-block; }
@media (max-width: 800px) { .scanner-wrap { grid-template-columns: 1fr; } }

/* ================= گزارش روزانه ================= */
.dr-feed { display: grid; gap: 14px; }
.dr header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dr header > div { display: grid; flex: 1; }
.dr header .hint { font-size: 12px; display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.dr-mood { font-size: 26px; }
.dr h3 { font-size: .85rem; color: var(--muted); margin: 10px 0 4px; font-weight: 600; }
.dr-list { margin: 0; padding-inline-start: 0; list-style: none; display: grid; gap: 3px; }
.dr-list li { position: relative; padding-inline-start: 20px; font-size: 14px; }
.dr-list li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--ok); font-weight: 700; }
.dr-list.plan li::before { content: "→"; color: var(--accent-text); }
.dr-block { margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--warn) 12%, transparent); border-inline-start: 3px solid var(--warn); font-size: 13.5px; }
.dr-reacts { display: flex; gap: 6px; margin: 12px 0 4px; flex-wrap: wrap; }
.dr-reacts form { margin: 0; }
.dr-rx { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 3px 10px; font-size: 15px; cursor: pointer; color: var(--text); opacity: .55; transition: all .15s; }
.dr-rx.has { opacity: 1; background: var(--surface-2); }
.dr-rx.on { border-color: var(--accent); background: var(--accent-soft); }
.dr-rx span { font-size: 12px; }
.dr-rx:hover { opacity: 1; }
.dr-comments { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; }
.dr-c { display: flex; gap: 8px; align-items: flex-start; }
.dr-c .av { width: 28px; height: 28px; font-size: 11px; flex: none; }
.dr-c > div { flex: 1; background: var(--surface-2); border-radius: 12px; padding: 6px 10px; font-size: 13.5px; }
.dr-c p { margin: 2px 0 0; }
.dr-cdel { margin: 0; opacity: .5; }
.mention { color: var(--accent-text); font-weight: 600; }
.dr-cform { display: flex; gap: 6px; }
.dr-cform input { flex: 1; }
.dr-moods { display: flex; gap: 6px; border: 0; padding: 0; }
.dr-moods legend { margin-bottom: 6px; }
.dr-moods label { cursor: pointer; }
.dr-moods input { position: absolute; opacity: 0; }
.dr-moods span { display: grid; place-items: center; width: 44px; height: 44px; font-size: 24px; border-radius: 12px; border: 1px solid var(--line); filter: grayscale(.7); transition: all .15s; }
.dr-moods input:checked + span { filter: none; border-color: var(--accent); background: var(--accent-soft); transform: scale(1.08); }
.dr-moods input:focus-visible + span { outline: 2px solid var(--accent); }

/* ================= قرارداد ================= */
.contract-body { font-size: 14px; line-height: 2.05; color: #111827; }
.contract-body h3 { font-size: 14.5px; margin: 18px 0 4px; color: #0E1530; }
.contract-body p { margin: 0 0 6px; text-align: justify; }
.contract-body .c-li { position: relative; padding-inline-start: 18px; }
.contract-body .c-li::before { content: "•"; position: absolute; inset-inline-start: 4px; color: #0E1530; }
.contract-body .c-note { font-size: 13px; color: #374151; background: #F3F4F6; padding: 6px 10px; border-radius: 6px; }
.contract-body .cv { font-weight: 700; color: #0E1530; }
.contract-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 34px; padding-top: 16px; border-top: 1px solid #D8DCE5; }
.contract-sign > div { display: grid; gap: 6px; min-height: 110px; align-content: start; border: 1px dashed #9CA3AF; border-radius: 8px; padding: 12px; }
.contract-sign span { font-size: 12px; color: #6B7280; }
.contract-sign b { color: #111827; }
.c-accept { font-style: normal; font-size: 12px; color: #047857; }
.c-vars { display: flex; flex-wrap: wrap; gap: 5px; }
.c-vars code, .c-vars button { font: 500 12px/1.6 var(--font-body); padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); cursor: pointer; }
.c-vars .money, code.money { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); border-color: transparent; }
.c-editor { font-size: 14px; line-height: 2; min-height: 420px; }
@media print { .contract-sign > div { min-height: 90px; } .contract-body { font-size: 12px; line-height: 1.9; } }

/* فاکتور، اعلام هزینه */
.seg-tabs { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); }
.seg-tabs a { padding: 5px 14px; border-radius: 7px; color: var(--muted); font-size: 13.5px; text-decoration: none; }
.seg-tabs a.on { background: var(--surface-3); color: var(--text); font-weight: 600; }
.inv-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; max-width: 900px; margin: 0 auto 16px; padding: 12px 16px; }
.inv-tools form { margin: 0; }
.inv-share { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; flex: 1; }
.print-sheet .inv-words { font-size: 12.5px; color: #374151; border-bottom: 0 !important; justify-content: flex-start !important; gap: 6px; }
.inv-bank { margin-bottom: 10px; font-size: 13px; }
.inv-bank b { display: block; margin-bottom: 2px; }
body.public-invoice { background: #EEF0F5; padding: 0 12px 24px; }
.claim-list { display: grid; gap: 12px; }
.claim { display: grid; grid-template-columns: 110px 1fr; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.claim-img { display: grid; place-items: center; aspect-ratio: 3/4; border-radius: 9px; overflow: hidden; background: var(--surface-2); color: var(--muted); }
.claim-img img { width: 100%; height: 100%; object-fit: cover; }
.claim-body { display: grid; gap: 4px; align-content: start; min-width: 0; }
.claim-amt { font-size: 1.15rem; font-weight: 700; }
.claim-amt small { font-size: 12px; font-weight: 400; color: var(--muted); }
.claim-act { display: grid; gap: 6px; margin-top: 6px; }
.claim-act .actions { margin: 0; }
@media (max-width: 560px) { .claim { grid-template-columns: 80px 1fr; } }

/* ================= چک‌لیست مراحل، کپشن، پایان مرحله ================= */
.checklist { display: grid; gap: 8px; }
.cl-head { display: flex; justify-content: space-between; align-items: center; }
.cl-count { font-size: 13px; color: var(--muted); }
.cl-bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.cl-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .3s; }
.checklist.all-done .cl-bar i { background: var(--ok); }
.cl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cl-list li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; }
.cl-list li:hover { background: var(--surface-2); }
.cl-list label { display: flex; align-items: center; gap: 10px; flex: 1; cursor: pointer; min-width: 0; }
.cl-list input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--ok); flex: none; }
.cl-list li.on span { text-decoration: line-through; color: var(--muted); }
.cl-list small { font-size: 11px; }
.cl-del { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; opacity: 0; padding: 0 4px; }
.cl-list li:hover .cl-del, .cl-del:focus-visible { opacity: 1; }
.cl-add input { width: 100%; }
.t-flow { display: inline-block; font-size: 11.5px; color: var(--accent-text); text-decoration: none; margin-top: 2px; }
.t-checks { position: relative; display: flex; align-items: center; height: 18px; margin-top: 6px; border-radius: 9px; background: var(--surface-3); overflow: hidden; }
.t-checks i { position: absolute; inset-block: 0; inset-inline-start: 0; background: color-mix(in srgb, var(--accent) 55%, transparent); }
.t-checks.done i { background: color-mix(in srgb, var(--ok) 60%, transparent); }
.t-checks b { position: relative; font-size: 11px; padding: 0 8px; font-weight: 600; }
.cap-preview { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin: 6px 0 10px; }
.cap-preview p { margin: 4px 0 0; }
.wf-cap summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; padding: 8px 0; }
.wf-cap .form { margin-top: 8px; }
.wf-finish { display: grid; gap: 10px; padding: 14px; border-radius: 12px; background: color-mix(in srgb, var(--ok) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.wf-finish .btn { justify-self: start; }
.wf-steps { grid-column: 1 / -1; }
.wf-steps summary { cursor: pointer; font-size: 12.5px; color: var(--accent-text); }
.wf-steps textarea { margin-top: 6px; width: 100%; }
.task-more { align-self: start; }
.task-more > summary { cursor: pointer; font-weight: 600; color: var(--muted); padding: 2px 0; }
.task-more[open] > summary { margin-bottom: 14px; }

/* ---------- v5.4: قرارداد فرم‌محور با استایل قالب ---------- */
.ctpl { --c-acc: #0E1530; --c-fs: 14px; }
.ctpl h1, .ctpl h2, .ctpl h3 { color: var(--c-acc); }
.ctpl .print-head { border-bottom-color: var(--c-acc); }
.ctpl .print-head .logo { background: var(--c-acc); }
.ctpl .c-head-meta { text-align: left; min-width: 190px; }
.ctpl .c-head-meta h1 { font-size: 1.3rem; margin: 0 0 5px; }
.ctpl .contract-body { font-size: var(--c-fs); }
.ctpl .contract-body h3 { font-size: calc(var(--c-fs) + .5px); }
.ctpl .contract-body .cv, .ctpl .contract-body .c-li::before { color: var(--c-acc); }
.ctpl .c-parties { border-inline-start: 3px solid var(--c-acc); }
.ctpl .c-intro { margin-bottom: 14px; }
.ctpl .c-foot { margin-top: 18px; padding-top: 10px; border-top: 1px solid #E5E7EB; font-size: 11.5px; color: #6B7280; text-align: center; }
.c-stamp { max-height: 90px; max-width: 160px; object-fit: contain; }
.c-sig { max-height: 80px; max-width: 220px; object-fit: contain; }
@media print { .ctpl .print-head .logo { background: var(--c-acc) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; } .ctpl .contract-body { font-size: calc(var(--c-fs) - 2px); } }

/* سازنده قالب و فرم قرارداد */
.ct-builder { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.ct-builder > aside { position: sticky; top: 84px; align-self: start; }
.ct-builder .ct-preview { max-height: calc(100vh - 130px); overflow: auto; border-radius: 12px; background: var(--surface-2); padding: 12px; }
.ct-builder .ct-preview .print-sheet { padding: 22px 24px; font-size: 13px; box-shadow: none; }
.ct-preview-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.ct-preview.loading { opacity: .6; }
@media (max-width: 1100px) { .ct-builder { grid-template-columns: 1fr; } .ct-builder > aside { position: static; } .ct-builder .ct-preview { max-height: none; } }
.tf-list { display: grid; gap: 8px; }
.tf-row { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); display: grid; gap: 8px; }
.tf-row.is-section { background: var(--accent-soft); }
.tf-row .tf-main { display: grid; grid-template-columns: auto minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.tf-row .tf-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; align-items: end; }
.tf-row input, .tf-row select, .tf-row textarea { width: 100%; min-width: 0; }
.tf-row label.mini { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.tf-row .tf-flags { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; }
.tf-row.is-section .tf-more, .tf-row.is-section .tf-src { display: none; }
.tf-move { display: flex; flex-direction: column; gap: 2px; }
.tf-move button, .tf-del { border: 0; background: var(--surface-2); color: var(--muted); width: 28px; height: 22px; border-radius: 6px; cursor: pointer; line-height: 1; }
.tf-del { height: 32px; color: var(--danger); }
.tf-key { font-size: 12px; color: var(--muted); }
.tc-row textarea { min-height: 90px; font: inherit; line-height: 1.9; }
.tc-row.off { opacity: .55; }
.tc-row .tc-head { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.ct-chips { position: sticky; top: 0; z-index: 2; background: var(--surface); padding: 8px 0; }
.ct-chips .c-vars button.sys { opacity: .8; }
.ct-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.ct-tabs a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 13.5px; }
.ct-tabs a.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.ct-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 14px; }
.ct-form-grid .f-wide { grid-column: 1 / -1; }
.ct-form-grid h3.f-group { grid-column: 1 / -1; margin: 14px 0 2px; }
.ct-calc { padding: 9px 12px; border-radius: 10px; background: var(--surface-2); font-weight: 700; }
.tpl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tpl-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--surface); display: grid; gap: 10px; }
.tpl-card .sw { width: 22px; height: 22px; border-radius: 6px; display: inline-block; vertical-align: middle; }
/* گفت‌وگوی قرارداد */
.c-thread { display: grid; gap: 10px; }
.c-msg { border-radius: 12px; padding: 10px 14px; background: var(--surface-2); max-width: 92%; }
.c-msg.client { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); justify-self: start; }
.c-msg.staff { justify-self: end; }
.c-msg .c-meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.c-msg .c-ref { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--surface); }
.c-msg p { margin: 0; white-space: pre-wrap; line-height: 1.9; }
.sig-pad { width: 100%; height: 180px; border: 2px dashed var(--line); border-radius: 12px; background: #fff; touch-action: none; cursor: crosshair; display: block; }
.sig-tools { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); margin-top: 6px; }

/* ---------- v5.4: پنل مشتری تازه ---------- */
.p-me { position: relative; }
.p-me > summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 6px 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.p-me > summary::-webkit-details-marker { display: none; }
.p-me .av { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.p-me-name { display: grid; line-height: 1.3; }
.p-me-name b { font-size: 13px; }
.p-me-name small { font-size: 11.5px; color: var(--muted); }
.p-me .menu-pop { right: auto; left: 0; top: 52px; }
.p-nav { display: flex; gap: 6px; margin: 0 0 18px; padding: 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.p-nav a { position: relative; display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 12px; color: var(--text-2); text-decoration: none; font-size: 14px; white-space: nowrap; transition: background .2s, color .2s; }
.p-nav a:hover { background: var(--accent-soft); color: var(--text); }
.p-nav a.on { background: var(--accent); color: var(--accent-ink); }
.p-nav .n { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--warn); color: #111; font-size: 11.5px; display: inline-grid; place-items: center; font-weight: 700; }
@media (max-width: 720px) {
  .portal { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .p-me-name { display: none; }
  .p-me > summary { padding: 3px; }
  .p-nav { position: fixed; z-index: 30; bottom: 0; left: 0; right: 0; margin: 0; border-radius: 18px 18px 0 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; box-shadow: 0 -10px 30px -12px rgba(0,0,0,.45); }
  .p-nav a { flex-direction: column; gap: 3px; padding: 7px 4px; font-size: 11px; flex: 1; justify-content: center; }
  .p-nav .n { position: absolute; top: 2px; inset-inline-end: calc(50% - 22px); min-width: 17px; height: 17px; font-size: 10px; }
}
@media print { .p-nav, .p-me { display: none !important; } }
.p-greet { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 22px 24px; background: linear-gradient(135deg, var(--surface) 0%, var(--accent-soft) 100%); }
.p-greet h1 { margin: 0; font-size: 1.45rem; }
.p-greet p { margin: 4px 0 0; color: var(--muted); }
.p-greet .p-logo { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; font: 700 22px var(--font-head); color: var(--text-2); border: 1px solid var(--line); }
@media (max-width: 560px) { .p-greet { grid-template-columns: auto 1fr; padding: 18px; } .p-greet .p-date { grid-column: 1 / -1; } }
.p-todo { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-top: 14px; }
.p-todo a { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--text); transition: transform .15s, border-color .2s; }
.p-todo a:hover { transform: translateY(-2px); border-color: var(--line-2); }
.p-todo .ic-wrap { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.p-todo a.ok .ic-wrap { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.p-todo b { font-size: 1.05rem; }
.p-todo span { font-size: 12.5px; color: var(--muted); }
.p-callout { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; margin-bottom: 14px; background: color-mix(in srgb, var(--warn) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.p-callout.ok { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.p-callout > div { display: grid; gap: 3px; }
.p-callout span { font-size: 13px; color: var(--text-2); }
.p-contact { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.p-contact .btn { gap: 8px; }
.p-prof { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; }
.p-prof aside { text-align: center; display: grid; gap: 10px; justify-items: center; }
.p-prof aside .p-logo { width: 120px; height: 120px; border-radius: 28px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; font: 700 36px var(--font-head); color: var(--text-2); border: 1px solid var(--line); }
@media (max-width: 820px) { .p-prof { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .p-todo { grid-template-columns: 1fr 1fr; gap: 10px; }
  .p-todo a { grid-template-columns: 1fr; padding: 12px; gap: 6px; }
  .p-todo .ic-wrap { grid-row: auto; width: 36px; height: 36px; }
  .p-todo b { font-size: .92rem; }
  .p-greet .p-logo { width: 52px; height: 52px; }
  .p-greet h1 { font-size: 1.2rem; }
}

/* ---------- v5.5: قرارداد تجمیعی، اقساط، فیلم‌برداری ---------- */
.ci-row .ci-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.ci-row .ci-more { display: grid; grid-template-columns: minmax(0, 2fr) 70px minmax(0, .9fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 8px; align-items: end; }
.ci-row label.mini, .ci-row div.mini { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.ci-row .ct-calc { padding: 8px 10px; }
.in-row { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto minmax(120px, 1fr) auto auto; align-items: center; }
.in-row .check { white-space: nowrap; }
@media (max-width: 760px) {
  .ci-row .ci-main, .ci-row .ci-more { grid-template-columns: 1fr 1fr; }
  .in-row { grid-template-columns: 1fr 1fr; }
}
.print-sheet .c-table { margin: 8px 0 12px; font-size: .92em; }
.print-sheet .c-table th { background: var(--c-acc, #0E1530); border-color: var(--c-acc, #0E1530); }
.print-sheet .c-table tfoot td { font-weight: 700; background: #F3F4F6 !important; }
.print-sheet .c-table .num { text-align: left; white-space: nowrap; }
/* اقساط و جلسات در پنل */
.inst-list { display: grid; gap: 8px; }
.inst { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.inst .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.inst.paid .dot { background: var(--ok); } .inst.overdue .dot { background: var(--danger); } .inst.soon .dot { background: var(--warn); }
.inst.overdue { border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.inst small { color: var(--muted); display: block; font-size: 12px; }
.shoot-meter { display: grid; gap: 10px; }
.shoot-meter .bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.shoot-meter .bar i { display: block; height: 100%; }
.shoot-meter .bar .d { background: var(--ok); } .shoot-meter .bar .b { background: var(--accent); } .shoot-meter .bar .p { background: var(--warn); }
.shoot-meter .legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--text-2); }
.shoot-meter .legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-inline-end: 5px; background: var(--surface-2); vertical-align: middle; }
.shoot-meter .legend .d::before { background: var(--ok); } .shoot-meter .legend .b::before { background: var(--accent); } .shoot-meter .legend .p::before { background: var(--warn); }
.shoot-big { display: flex; align-items: baseline; gap: 8px; }
.shoot-big b { font: 700 2rem var(--font-head); }
.slot-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.slot-day { flex: none; min-width: 74px; border: 1px solid var(--line); border-radius: 14px; padding: 8px 6px; text-align: center; cursor: pointer; background: var(--surface); color: var(--text); font: inherit; }
.slot-day small { display: block; color: var(--muted); font-size: 11.5px; }
.slot-day b { display: block; font-size: 1.15rem; }
.slot-day.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.slot-day.on small { color: inherit; opacity: .8; }
.slot-day[disabled] { opacity: .35; cursor: not-allowed; }
.slot-times { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.slot-times label { cursor: pointer; }
.slot-times input { position: absolute; opacity: 0; pointer-events: none; }
.slot-times span { display: inline-block; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); direction: ltr; }
.slot-times input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.slot-times input:disabled + span { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.slot-times input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- v5.6: باشگاه امتیاز، سطح‌ها، حساب مشتری ---------- */
.lvl { --lvl: #D4AF37; display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--lvl); background: color-mix(in srgb, var(--lvl) 14%, transparent); border: 1px solid color-mix(in srgb, var(--lvl) 35%, transparent); white-space: nowrap; }
.acct-box { display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); margin-bottom: 12px; }
.acct-box span { font-size: 12.5px; color: var(--muted); }
.acct-box b { font: 700 1.35rem var(--font-head); }
.acct-box small { font-size: 12px; color: var(--muted); }
.acct-box.debt b { color: var(--danger); } .acct-box.credit b { color: var(--ok); }
.club-mini { display: grid; gap: 8px; justify-items: start; }
.club-mini .progress { width: 100%; height: 6px; }
.club-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 22px; background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--lvl, #D4AF37) 12%, var(--surface))); }
.club-hero .medal { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--lvl, #D4AF37) 20%, transparent); color: var(--lvl, #D4AF37); border: 2px solid var(--lvl, #D4AF37); }
.club-hero h1 { margin: 0; font-size: 1.4rem; }
.club-hero .big { font: 700 2rem var(--font-head); line-height: 1; }
.club-hero .progress { height: 8px; margin-top: 8px; }
@media (max-width: 640px) { .club-hero { grid-template-columns: auto 1fr; } .club-hero > :last-child { grid-column: 1 / -1; } }
.levels-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.levels-row .lvl { opacity: .45; } .levels-row .lvl.on { opacity: 1; }
.rw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.rw-card { border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; gap: 8px; background: var(--surface); align-content: start; }
.rw-card .cost { font: 700 1.2rem var(--font-head); color: var(--accent-text, var(--accent)); }
.rw-card.locked { opacity: .55; }
.rw-card form { display: grid; gap: 6px; }
.lb-list li .rank { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; font-size: 13px; flex: none; }
.lb-list li:nth-child(1) .rank { background: #D4AF37; color: #111; } .lb-list li:nth-child(2) .rank { background: #C0C7D1; color: #111; } .lb-list li:nth-child(3) .rank { background: #B07B4F; color: #111; }
.pts-plus { color: var(--ok); } .pts-minus { color: var(--danger); }
.stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.stars input { position: absolute; opacity: 0; pointer-events: none; }
.stars label { cursor: pointer; font-size: 26px; line-height: 1; color: var(--line-2, #555); transition: color .15s; }
.stars label:hover, .stars label:hover ~ label, .stars input:checked ~ label { color: #F5B301; }
.stars input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 4px; }

/* ---------- v5.7: فعالیت مشتری و گزارش دوره‌ای ---------- */
.act-feed li { gap: 10px; }
.act-feed .act-day { font-weight: 700; font-size: 13px; color: var(--muted); padding-top: 14px; border-bottom: 0; }
.pill .ic { vertical-align: -2px; }
.report-sheet h3 { font-size: 15px; margin: 20px 0 8px; color: #0E1530; border-bottom: 1px solid #E5E7EB; padding-bottom: 6px; }
.rp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 6px 0 10px; }
.rp-kpis > div { border: 1px solid #E5E7EB; border-radius: 10px; padding: 12px; text-align: center; display: grid; gap: 4px; background: #F9FAFB; }
.rp-kpis b { font: 700 1.5rem var(--font-head); color: #0E1530; }
.rp-kpis span { font-size: 12px; color: #6B7280; }
.rp-list { margin: 0; padding-inline-start: 18px; line-height: 2; color: #111827; font-size: 13.5px; }
.rp-notes { background: #F3F4F6; border-radius: 10px; padding: 12px 14px; line-height: 2; color: #111827; }
.report-sheet a { color: #1D4ED8; }
@media print {
  .ct-builder { display: block !important; }
  .ct-builder > aside { position: static !important; }
  .ct-builder .ct-preview { max-height: none !important; overflow: visible !important; padding: 0 !important; background: none !important; }
  .rp-kpis > div { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- v6: خدمت‌ها، برد یکپارچه کارها، جلسه فیلم‌برداری، سهمیه قرارداد ---------- */
.svc-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--svc, var(--muted)); flex: none; vertical-align: 1px; }
.svc-dot.lg { width: 18px; height: 18px; border-radius: 6px; }
.svc-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--svc, var(--muted)); background: color-mix(in srgb, var(--svc, var(--muted)) 14%, transparent); padding: 2px 9px; border-radius: 999px; }
.svc-tag .svc-dot { width: 7px; height: 7px; }
.svc-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.svc-card { display: grid; gap: 6px; padding: 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; border-top: 4px solid var(--svc, var(--line-2)); transition: transform .15s, border-color .15s; }
.svc-card:hover { transform: translateY(-2px); border-color: var(--svc, var(--line-2)); }
.svc-card.ghost { border-style: dashed; border-top-width: 1px; }
.svc-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.svc-tabs a { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; padding: 8px 14px; min-height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); text-decoration: none; font-size: 13.5px; }
.svc-tabs a.on { color: var(--text); border-color: var(--svc, var(--accent)); background: color-mix(in srgb, var(--svc, var(--accent)) 14%, var(--surface)); font-weight: 600; }
.svc-tabs .n { font-size: 11px; background: var(--surface-3); border-radius: 999px; padding: 0 7px; }
aside .stepper.sm { flex-direction: column; gap: 10px; overflow: visible; }
aside .stepper.sm li { flex: none; grid-template-columns: 30px 1fr; justify-items: start; text-align: start; }
aside .stepper.sm li::before { top: 30px; inset-inline-start: 18px; width: 2px; height: calc(100% - 20px); }
.stepper small { display: block; color: var(--muted); font-size: 11px; }

.wk-card { border-inline-start: 4px solid var(--svc, var(--line-2)); }
.wk-tags { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.wk-tags .pill { font-size: 11px; padding: 1px 8px; }
.wk-board { grid-auto-columns: minmax(240px, 1fr); }
.wk-board .ct-col.wk-col-done { opacity: .85; }
.wk-batches { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; }
.wk-batches.big { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); overflow: visible; }
.wk-batch { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; color: var(--text); text-decoration: none; min-width: 240px; border-inline-start: 4px solid var(--svc, var(--accent)); }
.wk-batch > span { display: grid; gap: 2px; }
.wk-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.wk-split { grid-template-columns: minmax(300px, 1fr) minmax(0, 1.8fr); }
.wk-split > aside { display: grid; gap: 16px; align-content: start; }
.wk-bulkbar { position: sticky; top: 8px; z-index: 3; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 10px; }
.wk-bulkbar select, .wk-bulkbar input { width: auto; min-height: 40px; }
.wk-bulkbar [hidden] { display: none; }
.wk-list { display: grid; gap: 8px; }
.wk-row { display: grid; grid-template-columns: 28px minmax(0, 2.2fr) minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); border-inline-start: 4px solid var(--svc, var(--line-2)); background: var(--surface); cursor: pointer; }
.wk-row.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.wk-row.off { opacity: .5; }
.wk-row input[type=checkbox] { width: 20px; height: 20px; }
.wk-t { display: grid; gap: 2px; min-width: 0; }
.wk-t a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.my-h { font-size: 1rem; margin: 22px 0 10px; display: flex; gap: 8px; align-items: center; }
.my-h.fix, .my-h.late { color: var(--danger); }
.my-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.my-card { display: grid; gap: 10px; padding: 14px; border-inline-start: 4px solid var(--svc, var(--line-2)); }
.my-card.fix { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 45%, transparent); }
.my-main { display: grid; gap: 6px; color: var(--text); text-decoration: none; }
.my-note { font-size: 13px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--text); }
.my-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.my-acts form { margin: 0; }

.q-cells { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.q-cells i { width: 16px; height: 16px; border-radius: 5px; display: inline-block; }
.q-d { background: var(--ok); }
.q-w { background: var(--warn); }
.q-e { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.q-line { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) minmax(0, 1.1fr); gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.q-line:last-child { border-bottom: 0; }
.q-line > div { display: grid; gap: 2px; }
aside .q-line, .grid2 .q-line { grid-template-columns: 1fr; gap: 6px; }
.q-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.q-legend span { display: inline-flex; gap: 6px; align-items: center; }
.q-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.q-edit { align-items: end; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.ci-quota { border-top: 1px dashed var(--line); padding-top: 8px; }
.p-todo a.q-todo .q-cells { grid-column: 1 / -1; margin-top: 4px; }
.p-todo a.q-todo .q-cells i { width: 12px; height: 12px; border-radius: 4px; }
.q-portal { margin-bottom: 14px; padding: 4px 12px; border-radius: 12px; background: var(--surface-2); }
.pc-batch { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px; border-radius: 14px; margin-bottom: 12px; border: 1px solid color-mix(in srgb, var(--ok) 40%, var(--line)); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); }
.pc-batch > div { display: grid; gap: 2px; }
@media (max-width: 760px) {
  .wk-split { grid-template-columns: 1fr; }
  .wk-row { grid-template-columns: 28px 1fr; }
  .wk-row > :nth-child(n+3) { grid-column: 2; }
  .q-line { grid-template-columns: 1fr; gap: 6px; }
}
.wk-bulkbar .wk-date { display: inline-block; width: 150px; }
.wk-bulkbar .wk-date input { width: 100%; }
.wk-bulkbar .check { margin: 0; }

/* ---------- v6.1: بلاگ و ساخت پست/استوری ---------- */
.bl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.bl-card { display: grid; gap: 10px; padding: 12px; align-content: start; }
.bl-cover { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--surface-2); color: var(--muted); }
.bl-cover img { width: 100%; height: 100%; object-fit: cover; }
.bl-cover .pill { position: absolute; top: 8px; inset-inline-start: 8px; background: var(--surface); }
.bl-body { display: grid; gap: 4px; }
.bl-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.bl-edit > aside { display: grid; gap: 16px; align-content: start; }
.bl-title { font-size: 1.15rem; font-weight: 700; }
.bl-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.bl-tools .busy { opacity: .5; pointer-events: none; }
.bl-body-in { font-size: 15px; line-height: 2; min-height: 420px; }
.bl-cover-prev { width: 100%; border-radius: 10px; display: block; margin-bottom: 8px; }
.sc-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; margin-bottom: 14px; position: sticky; top: 8px; z-index: 4; }
.sc-bar .field { margin: 0; min-width: 170px; }
.sc-bar-acts { display: flex; gap: 8px; margin-inline-start: auto; }
.sc-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.sc-list { display: grid; gap: 14px; }
.sc-slide { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; padding: 14px; align-items: start; }
.sc-list.fmt-story .sc-slide { grid-template-columns: 230px minmax(0, 1fr); }
.sc-slide canvas { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .6); background: var(--surface-2); }
.sc-fields { display: grid; gap: 4px; }
.sc-fields .field { margin: 0; }
.sc-head { display: flex; justify-content: space-between; align-items: center; }
.sc-cap { position: sticky; top: 96px; }
.sc-cap textarea { font-size: 13.5px; line-height: 1.9; }
@media (max-width: 1100px) { .sc-wrap { grid-template-columns: 1fr; } .sc-cap { position: static; } }
@media (max-width: 640px) { .sc-slide, .sc-list.fmt-story .sc-slide { grid-template-columns: 1fr; } .sc-slide canvas { max-width: 320px; justify-self: center; } .sc-bar { position: static; } .sc-bar-acts { margin: 0; } }
.btn .n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--warn); color: #111; font-size: 11.5px; font-weight: 700; }

/* درخواست خدمات */
.rq-grp, .rq-step { margin: 18px 0 8px; font-size: 1rem; }
.rq-step { padding-top: 14px; border-top: 1px solid var(--line); }
.rq-svcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.rq-svc { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 14px 14px 14px 40px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.rq-svc input { position: absolute; opacity: 0; pointer-events: none; }
.rq-svc span { display: grid; gap: 3px; }
.rq-svc small { color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.rq-svc i { position: absolute; left: 12px; top: 14px; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-style: normal; font-size: 12px; color: transparent; }
.rq-svc:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.rq-svc:has(input:checked) i { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.rq-svc:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.rq-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rq-chips label { cursor: pointer; }
.rq-chips input { position: absolute; opacity: 0; pointer-events: none; }
.rq-chips span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 14px; }
.rq-chips input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); font-weight: 600; }
.rq-chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.rq-list { display: grid; gap: 12px; }
.rq-card { display: grid; gap: 10px; }
.rq-card.new { border-inline-start: 4px solid var(--warn); }
.rq-card header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.rq-card header > div { display: grid; gap: 2px; }
.rq-chips-ro { display: flex; flex-wrap: wrap; gap: 6px; }
.rq-chips-ro span { padding: 4px 12px; border-radius: 999px; background: var(--surface-2); font-size: 13px; }
.rq-chips-ro .other { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.rq-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; }
.rq-facts dt { font-size: 12px; color: var(--muted); }
.rq-facts dd { margin: 0; font-size: 14px; }
.rq-note { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; line-height: 1.9; }
.rq-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rq-act select { width: auto; min-height: 38px; }
.rq-act input[type=text] { flex: 1 1 220px; min-height: 38px; }
.pb-var-list { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- v6.3: نمای فهرستی کارها ---------- */
.wl-views { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line-2); }
.wl-views a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 13.5px; }
.wl-views a.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.wl { display: grid; gap: 16px; }
.wl-bulk { position: sticky; top: 8px; z-index: 6; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.wl-bulk[hidden] { display: none; }
.wl-bulk .wl-sp { flex: 1; }
.wl-bulk .btn { background: var(--accent-ink); color: var(--accent); border-color: transparent; }
.wl-bulk .btn.ghost { background: transparent; color: var(--accent-ink); border-color: currentColor; }
.wl-bl { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: inherit; }
.wl-bl select { width: auto; min-height: 34px; padding: 0 8px; font-size: 13px; }
.wl-group { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.wl-gh { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line); border-top: 3px solid var(--svc, var(--line-2)); }
.wl-gt { display: grid; gap: 1px; flex: 1; min-width: 180px; }
.wl-gt b { font-size: 15.5px; }
.wl-quota { padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.wl-quota.full { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.wl-group.closed .wl-body { display: none; }
.wl-sel { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--accent); }
.wl-cols, .wl-line { display: grid; grid-template-columns: 30px minmax(0, 2.2fr) 120px minmax(0, 1.6fr) 74px 74px minmax(150px, auto); gap: 10px; align-items: center; padding: 0 14px; }
.wl-cols { padding-block: 7px; font-size: 11.5px; color: var(--muted); border-bottom: 1px solid var(--line); }
.wl-row { border-bottom: 1px solid var(--line); transition: background .2s; }
.wl-row.on { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.wl-row.open { background: var(--surface-2); }
.wl-row.wl-flash { background: color-mix(in srgb, var(--ok) 12%, transparent); }
.wl-row.off { opacity: .5; }
.wl.hide-done .wl-row[data-done="1"] { display: none; }
.wl-line { min-height: 58px; padding-block: 6px; }
.wl-title { display: grid; gap: 1px; justify-items: start; min-width: 0; padding: 4px 0; border: 0; background: none; color: var(--text); font: inherit; text-align: start; cursor: pointer; }
.wl-title b { font-size: 14.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-title:hover b { text-decoration: underline; text-underline-offset: 4px; }
.wl-title .hint { font-size: 12px; }
.wl-dots { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.wl-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.wl-dots i.d { background: var(--svc, var(--accent)); box-shadow: none; }
.wl-dots i.c { width: 14px; height: 14px; background: var(--bg, var(--surface)); box-shadow: inset 0 0 0 3px var(--svc, var(--accent)), 0 0 0 3px color-mix(in srgb, var(--svc, var(--accent)) 22%, transparent); }
.wl-stage { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.wl-pill { padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface-3); color: var(--text); white-space: nowrap; }
.wl-pill.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.wl-pill.client { background: color-mix(in srgb, #E879B9 16%, transparent); color: #E879B9; }
.wl-pill.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.wl-who { width: auto; max-width: 150px; min-height: 34px; padding: 0 8px; font-size: 13px; }
.wl-date { display: grid; font-size: 13px; }
.wl-date small { display: none; color: var(--muted); font-size: 11px; }
.wl-acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.wl-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 13px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; text-decoration: none; }
.wl-btn.go { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.wl-btn.ok { background: var(--ok); color: #0B1020; border-color: transparent; }
.wl-btn.client { border-color: #E879B9; color: #E879B9; }
.wl-btn.back { border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); font-weight: 500; }
.wl-btn.dim { color: var(--muted); font-weight: 500; cursor: default; }
.wl-btn:disabled, .btn.busy { opacity: .55; cursor: progress; }
.wl-btn:hover:not(.dim):not(:disabled) { filter: brightness(1.08); }
.wl-extra:empty { display: none; }
.wl-extra { padding: 0 14px 12px 14px; padding-inline-start: 54px; }
.wl-need { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--accent); background: var(--surface); animation: wl-pop .18s ease-out; }
.wl-need.back { border-color: var(--danger); }
.wl-need b { font-size: 13.5px; }
.wl-url { flex: 1 1 200px; width: auto; min-height: 38px; font-size: 13px; }
.wl-skip { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; padding: 6px; }
.wl-x { border: 0; background: none; color: var(--muted); font-size: 16px; cursor: pointer; width: 34px; height: 34px; border-radius: 8px; }
.wl-x:hover { background: var(--surface-3); }
.wl-upst { flex-basis: 100%; }
.wl-upst:empty { display: none; }
.wl-upbtn { cursor: pointer; }
.wl-drawer { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(200px, .8fr); gap: 16px; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); animation: wl-pop .18s ease-out; }
.wl-dcol { display: grid; gap: 6px; align-content: start; min-width: 0; }
.wl-dcol p { margin: 0; font-size: 13.5px; }
.wl-files { display: flex; flex-wrap: wrap; gap: 6px; }
.wl-files a { padding: 4px 10px; border-radius: 8px; background: var(--surface-3); font-size: 12.5px; color: var(--text); text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-files small { color: var(--muted); }
.wl-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; }
.wl-dates { display: grid; gap: 8px; }
.wl-dates .field { margin: 0; font-size: 12.5px; }
.wl-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px 14px; }
.wl-plus { width: 30px; text-align: center; color: var(--muted); font-size: 20px; }
.wl-add input { flex: 1 1 220px; width: auto; min-height: 40px; border-style: dashed; }
.wl-add select { width: auto; min-height: 40px; max-width: 200px; }
.wl-toast { position: sticky; bottom: 16px; justify-self: center; z-index: 7; max-width: min(640px, 92vw); padding: 11px 18px; border-radius: 14px; font-size: 14px; background: color-mix(in srgb, var(--ok) 18%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); color: var(--text); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.wl-toast.bad { background: color-mix(in srgb, var(--danger) 16%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.wl-toast[hidden] { display: none; }
@keyframes wl-pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 980px) {
  .wl-cols { display: none; }
  .wl-line { grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "s t t" "s d d" "s st st" "s du pu" "s a a"; row-gap: 8px; padding-block: 12px; }
  .wl-line > .wl-sel { grid-area: s; align-self: start; margin-top: 6px; }
  .wl-title { grid-area: t; }
  .wl-dots { grid-area: d; }
  .wl-stage { grid-area: st; }
  .wl-line > .due { grid-area: du; }
  .wl-line > .pub { grid-area: pu; }
  .wl-date { grid-template-columns: auto auto; justify-content: start; gap: 6px; }
  .wl-date small { display: inline; }
  .wl-acts { grid-area: a; justify-content: flex-start; }
  .wl-extra { padding-inline-start: 14px; }
  .wl-drawer { grid-template-columns: 1fr; }
}
.filters input[type=checkbox] { min-width: 0; width: 18px; height: 18px; min-height: 0; }
.wl-pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.wl-stage .wl-pill { max-width: 190px; }
/* انتخاب ساعت */
.tp { width: 292px; }
.tp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; margin-bottom: 8px; }
.tp-grid button { height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: 500 13.5px/1 var(--font-body); cursor: pointer; font-variant-numeric: tabular-nums; }
.tp-grid button:hover { background: var(--accent-soft); }
.tp-grid .sel { background: var(--accent); color: var(--accent-ink); }
.jdp.sheet .tp-grid button { height: 42px; font-size: 15px; }
.tp-wrap input { text-align: left; }
/* v6.4: جلوگیری از بیرون‌زدگی صفحه روی موبایل (ستون‌های grid با محتوای پهن) */
.form > *, .split > *, .wk-split > *, .wf-list > *, .ct-builder > *, .print-head > * { min-width: 0; }
@media (max-width: 1100px) { .split, .wk-split { grid-template-columns: minmax(0, 1fr); } }
.contract-sign { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 620px) {
  .ct-builder { grid-template-columns: minmax(0, 1fr); }
  .ct-builder > aside { position: static; }
  .print-head { flex-wrap: wrap; }
  .contract-sign { grid-template-columns: minmax(0, 1fr); }
  .print-sheet { overflow-x: auto; }
}
.imgfield input[type=file] { min-width: 0; max-width: 100%; flex: 1 1 0; }
.imgfield-text { min-width: 0; }

/* ---------- v6.4: آمار سایت ---------- */
.st-live i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: st-pulse 1.8s infinite; vertical-align: 1px; }
@keyframes st-pulse { 70% { box-shadow: 0 0 0 8px transparent; } }
.st-cards .stat { cursor: default; }
.st-d { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.st-d.up { color: var(--ok); }
.st-d.down { color: var(--danger); }
.st-chart { margin-bottom: 16px; }
.st-bars { display: block; width: 100%; height: 160px; }
.st-bars .pv { fill: color-mix(in srgb, var(--accent) 35%, transparent); }
.st-bars .uv { fill: var(--accent); }
.st-bars g:hover rect { filter: brightness(1.25); }
.st-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 6px; direction: ltr; }
.st-axis span { direction: rtl; }
.st-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-inline: 8px 4px; }
.st-key.pv { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.st-key.uv { background: var(--accent); }
.st-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 16px; }
.st-grid .panel h2 { margin-top: 0; }
.st-h3 { font-size: 13.5px; margin: 16px 0 6px; color: var(--muted); }
.st-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.st-row:last-child { border-bottom: 0; }
.st-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-bar { display: block; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.st-bar b { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.st-row > b { font-variant-numeric: tabular-nums; }
.st-tip { margin: 12px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.st-tip code { font-size: 12px; }
.st-hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; align-items: end; height: 110px; direction: ltr; }
.st-hours.big { height: 170px; }
.st-hours span { display: grid; grid-template-rows: 1fr auto; height: 100%; align-items: end; text-align: center; }
.st-hours i { display: block; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--accent); opacity: .85; }
.st-hours small { font-size: 10px; color: var(--muted); height: 14px; }
.st-recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.dash-st { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
.dash-st .st-bars { height: 70px; }
.dash-st-nums { display: grid; gap: 4px; }
.dash-st-nums b { font-size: 22px; }
.sec-list { display: grid; gap: 8px; }
.sec-item { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.sec-item .ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 800; }
.sec-item.ok .ic { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.sec-item.warn .ic { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.sec-item.bad .ic { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
.sec-item p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.sec-score { font-size: 34px; font-weight: 800; }
.sec-guide ol { margin: 0; padding-inline-start: 20px; display: grid; gap: 8px; font-size: 14px; line-height: 1.9; }
@media (max-width: 620px) { .st-row { grid-template-columns: minmax(0, 1fr) auto auto; } .st-row .st-bar { display: none; } .dash-st { grid-template-columns: 1fr; } }
