/* =========================================================
   RN Team — سیستم طراحی
   پس‌زمینه‌ی مشکی عمیق، کارت‌های روشن با گوشه‌های بسیار گرد،
   اکسنت سبز نئون، و کنترل‌های قرصی‌شکل.
   ========================================================= */

:root {
  /* ---- سطوح تیره ---- */
  --bg-page:      #0C0E11;
  --bg-header:    #14171B;
  --bg-card:      #14171B;
  --bg-card-soft: #1C2026;
  --bg-inset:     #0F1216;

  /* ---- سطح روشن (پنل‌های سفید داخل تم تیره) ---- */
  --panel-light:      #FFFFFF;
  --panel-light-soft: #F4F6F8;
  --on-light:         #12151A;
  --on-light-soft:    #667080;

  --border:        transparent;
  --border-strong: rgba(255,255,255,0.14);
  --hairline:      rgba(255,255,255,0.06);

  --text-primary:   #F2F4F6;
  --text-secondary: #98A1AD;
  --text-muted:     #646E7B;

  /* ---- اکسنت: سبز نئون ---- */
  --accent:       #C6F24E;
  --accent-hover: #D4F76E;
  --accent-soft:  rgba(198,242,78,0.13);
  --accent-line:  rgba(198,242,78,0.42);
  --on-accent:    #0F1508;

  /* نام‌های قدیمی — برای سازگاری با کدهای موجود */
  --teal: var(--accent);
  --teal-strong: var(--accent);
  --teal-deep: var(--accent);
  --teal-soft: var(--accent-soft);
  --purple: var(--accent);
  --purple-dark: var(--accent);

  --teal-grad:   linear-gradient(135deg, #C6F24E 0%, #93C93B 100%);
  --violet-grad: linear-gradient(135deg, #A78BFA 0%, #7C5CE0 100%);
  --blue-grad:   linear-gradient(135deg, #5EA8FF 0%, #2E6FD8 100%);
  --pink-grad:   linear-gradient(135deg, #F58FC2 0%, #D2569A 100%);
  --dark-grad:   linear-gradient(135deg, #1C2026 0%, #14171B 100%);

  --green: #6DD48A;
  --amber: #F5C45E;
  --red:   #FF7A7A;
  --blue:  #6FB0FF;

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  --noise-opacity: 0.03;

  --radius-sm: 12px;
  --radius:    18px;
  --radius-lg: 26px;
  --radius-xl: 34px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.24);
  --shadow:    0 10px 30px rgba(0,0,0,0.34);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.46);
  --ring-track: rgba(255,255,255,0.08);
}

/* ---- تم روشن ---- */
body.light {
  --bg-page:      #EDEFF2;
  --bg-header:    #FFFFFF;
  --bg-card:      #FFFFFF;
  --bg-card-soft: #F3F5F8;
  --bg-inset:     #E7EAEF;

  --panel-light:      #14171B;
  --panel-light-soft: #1C2026;
  --on-light:         #F2F4F6;
  --on-light-soft:    #98A1AD;

  --border:        transparent;
  --border-strong: rgba(0,0,0,0.14);
  --hairline:      rgba(0,0,0,0.07);

  --text-primary:   #12151A;
  --text-secondary: #5B6472;
  --text-muted:     #8A93A0;

  --on-accent: #0F1508;
  --noise-opacity: 0.04;
  --shadow-sm: 0 2px 8px rgba(15,20,30,0.07);
  --shadow:    0 10px 30px rgba(15,20,30,0.10);
  --shadow-lg: 0 24px 60px rgba(15,20,30,0.14);
  --ring-track: rgba(0,0,0,0.07);
}

/* ---- رنگ‌های اکسنت انتخابی کاربر ---- */
body.accent-lime   { --accent:#C6F24E; --accent-hover:#D4F76E; --accent-soft:rgba(198,242,78,.13); --accent-line:rgba(198,242,78,.42); --on-accent:#0F1508; }
body.accent-teal   { --accent:#2DD4BF; --accent-hover:#5BE0CF; --accent-soft:rgba(45,212,191,.14); --accent-line:rgba(45,212,191,.42); --on-accent:#04201C; }
body.accent-blue   { --accent:#5EA8FF; --accent-hover:#7EBAFF; --accent-soft:rgba(94,168,255,.14); --accent-line:rgba(94,168,255,.42); --on-accent:#03152E; }
body.accent-purple { --accent:#A78BFA; --accent-hover:#BCA6FF; --accent-soft:rgba(167,139,250,.14); --accent-line:rgba(167,139,250,.42); --on-accent:#15082E; }
body.accent-orange { --accent:#FFA23A; --accent-hover:#FFB55F; --accent-soft:rgba(255,162,58,.14); --accent-line:rgba(255,162,58,.42); --on-accent:#2A1400; }
body.accent-red    { --accent:#FF6B6B; --accent-hover:#FF8888; --accent-soft:rgba(255,107,107,.14); --accent-line:rgba(255,107,107,.42); --on-accent:#2E0606; }
body.accent-white  { --accent:#FFFFFF; --accent-hover:#E8EBEF; --accent-soft:rgba(255,255,255,.10); --accent-line:rgba(255,255,255,.30); --on-accent:#0C0E11; }
body.accent-black  { --accent:#2A2F37; --accent-hover:#3A414B; --accent-soft:rgba(255,255,255,.08); --accent-line:rgba(255,255,255,.22); --on-accent:#FFFFFF; }
body.light.accent-white { --accent:#14171B; --accent-hover:#2A2F37; --accent-soft:rgba(0,0,0,.06); --accent-line:rgba(0,0,0,.22); --on-accent:#FFFFFF; }
body.light.accent-black { --accent:#14171B; --accent-hover:#2A2F37; --accent-soft:rgba(0,0,0,.06); --accent-line:rgba(0,0,0,.22); --on-accent:#FFFFFF; }

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Vazirmatn, IRANSans, "Segoe UI", Tahoma, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: var(--noise); opacity: var(--noise-opacity);
}
body > * { position: relative; z-index: 1; }

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }

/* =========================================================
   نوار بالا — کنترل‌های قرصی‌شکل
   ========================================================= */
.top-strip {
  display: flex; align-items: center; gap: 14px;
  height: 68px; padding: 0 20px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--hairline);
  position: sticky; top: 0; z-index: 40;
}
.top-strip-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700; font-size: 19px; letter-spacing: .04em; line-height: 1; white-space: nowrap;
}
.brand-name .t2 { font-weight: 400; opacity: .55; letter-spacing: .16em; font-size: 15px; }

.top-strip-tools { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }

.top-search {
  display: flex; align-items: center; gap: 9px; flex: 1; max-width: 340px;
  background: var(--bg-card-soft); border: 1px solid transparent;
  border-radius: 99px; padding: 9px 16px; transition: border-color .15s;
}
.top-search:focus-within { border-color: var(--accent-line); }
.top-search svg { width: 15px; height: 15px; fill: var(--text-muted); flex-shrink: 0; }
.top-search input { border: none; background: none; outline: none; width: 100%; font-size: 13px; color: var(--text-primary); }
.top-search input::placeholder { color: var(--text-muted); }

.icon-btn {
  position: relative; width: 38px; height: 38px; border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); background: var(--bg-card-soft);
  transition: background .15s, color .15s; flex-shrink: 0;
}
.icon-btn:hover { background: var(--accent); color: var(--on-accent); }
.icon-btn svg { width: 16px; height: 16px; fill: currentColor; }
.icon-btn .dot {
  position: absolute; top: 7px; left: 8px; width: 8px; height: 8px;
  border-radius: 99px; background: var(--accent); border: 2px solid var(--bg-header);
}
.menu-btn { display: none; }

/* سوییچر تیم */
.net-switch {
  display: flex; align-items: center; gap: 9px; padding: 6px 14px 6px 8px;
  border-radius: 99px; background: var(--bg-card-soft); transition: background .15s;
}
.net-switch:not([disabled]):hover { background: var(--bg-inset); }
.net-chip {
  width: 30px; height: 30px; border-radius: 99px; display: flex;
  align-items: center; justify-content: center; overflow: hidden;
  font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.net-chip img { width: 100%; height: 100%; object-fit: cover; }
.net-chip.sm { width: 24px; height: 24px; font-size: 11px; }
.net-caret { font-size: 9px; color: var(--text-muted); }
.net-menu {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 230px; z-index: 60;
  background: var(--bg-card); border: 1px solid var(--border-strong);
  border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow-lg);
}
.net-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: right;
  padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; color: var(--text-secondary);
}
.net-menu-item:hover { background: var(--bg-card-soft); color: var(--text-primary); }
.net-menu-item.on { background: var(--accent-soft); color: var(--text-primary); font-weight: 600; }

/* =========================================================
   چیدمان
   ========================================================= */
.app-body { display: flex; align-items: flex-start; min-height: calc(100vh - 68px); }

.sidebar {
  width: 262px; flex-shrink: 0; background: var(--bg-header);
  border-left: 1px solid var(--border);
  min-height: calc(100vh - 68px); padding: 20px 14px 30px;
  position: sticky; top: 68px; overflow-y: auto; max-height: calc(100vh - 68px);
}
.profile-card {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  background: var(--bg-card-soft); border-radius: var(--radius); margin-bottom: 16px;
}
.profile-card-text { flex: 1; min-width: 0; }
.profile-card-name { font-size: 14px; font-weight: 700; }
.profile-card-role { font-size: 11.5px; color: var(--text-muted); }

.profile-stats {
  display: flex; justify-content: space-between; gap: 6px;
  padding: 0 4px 16px; margin-bottom: 6px; border-bottom: 1px solid var(--hairline);
}
.profile-stat { text-align: center; flex: 1; }
.profile-stat b { display: block; font-size: 15px; font-weight: 700; }
.profile-stat span { font-size: 10.5px; color: var(--text-muted); }

.nav-group-label {
  font-size: 10.5px; color: var(--text-muted); font-weight: 700;
  letter-spacing: .1em; padding: 4px 12px; margin: 16px 0 6px; text-transform: uppercase;
}
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  border-radius: 99px; color: var(--text-secondary); font-size: 13.5px;
  font-weight: 500; transition: background .15s, color .15s;
}
.nav-item svg { width: 17px; height: 17px; fill: currentColor; flex-shrink: 0; }
.nav-item:hover { background: var(--bg-card-soft); color: var(--text-primary); }
.nav-item.active { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.nav-item.active svg { fill: var(--on-accent); }
.nav-item.soon { opacity: .45; cursor: default; }
.nav-badge {
  margin-right: auto; background: var(--accent); color: var(--on-accent);
  font-size: 10.5px; font-weight: 800; min-width: 20px; height: 20px;
  border-radius: 99px; display: flex; align-items: center; justify-content: center; padding: 0 6px;
}
.nav-item.active .nav-badge { background: var(--on-accent); color: var(--accent); }
.nav-lock { margin-right: auto; color: var(--text-muted); }
.nav-lock svg { width: 13px; height: 13px; fill: currentColor; }

.main { flex: 1; min-width: 0; }
.content { padding: 26px 28px 70px; max-width: 1380px; margin: 0 auto; }

.page-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
}
.page-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.muted { color: var(--text-muted); font-size: 13px; }
.head-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

/* =========================================================
   دکمه‌ها — همه قرصی‌شکل
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 20px; border-radius: 99px; font-size: 13px; font-weight: 600;
  background: var(--bg-card-soft); color: var(--text-primary);
  border: 1px solid transparent; transition: background .15s, transform .1s, border-color .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-inset); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text-primary); }
.btn-ghost:hover { background: var(--bg-card-soft); border-color: var(--accent-line); }
.btn-danger, .btn-red { background: rgba(255,122,122,.14); color: var(--red); }
.btn-danger:hover, .btn-red:hover { background: rgba(255,122,122,.24); }
.btn-green { background: var(--accent); color: var(--on-accent); }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-round {
  width: 34px; height: 34px; border-radius: 99px; background: var(--accent);
  color: var(--on-accent); font-size: 19px; line-height: 1;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.btn-round:hover { background: var(--accent-hover); }

/* =========================================================
   کارت‌ها و پنل‌ها
   ========================================================= */
.panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px 24px; margin-bottom: 16px;
}
.panel.full { grid-column: 1 / -1; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { font-size: 16px; font-weight: 700; }
.link { font-size: 12.5px; color: var(--accent); font-weight: 600; }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

.hero {
  background: var(--panel-light); color: var(--on-light);
  border-radius: var(--radius-xl); padding: 30px 34px; margin-bottom: 20px;
  position: relative; overflow: hidden; box-shadow: var(--shadow);
}
.hero h1 { font-size: 27px; font-weight: 800; margin-bottom: 6px; letter-spacing: -.02em; }
.hero p { font-size: 13.5px; color: var(--on-light-soft); }

/* ---- کارت‌های آماری ---- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color .15s, transform .12s;
}
.stat-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.stat-value { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
.stat-icon {
  width: 42px; height: 42px; border-radius: 99px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon svg { width: 19px; height: 19px; fill: var(--accent); }
/* کارت برجسته: پرشده با اکسنت */
.stat-card.grad-teal { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.stat-card.grad-teal .stat-label { color: rgba(15,21,8,.66); }
.stat-card.grad-teal .stat-icon { background: rgba(15,21,8,.13); }
.stat-card.grad-teal .stat-icon svg { fill: var(--on-accent); }
/* کارت سفید */
.stat-card.grad-violet, .stat-card.grad-blue {
  background: var(--panel-light); border-color: transparent; color: var(--on-light);
}
.stat-card.grad-violet .stat-label, .stat-card.grad-blue .stat-label { color: var(--on-light-soft); }
.stat-card.grad-violet .stat-icon, .stat-card.grad-blue .stat-icon { background: rgba(18,21,26,.07); }
.stat-card.grad-violet .stat-icon svg, .stat-card.grad-blue .stat-icon svg { fill: var(--on-light); }

/* ---- لیست‌های ردیفی ---- */
.row-list { display: flex; flex-direction: column; }
.row-item {
  display: flex; align-items: center; gap: 13px; padding: 13px 10px;
  border-radius: var(--radius); border-bottom: 1px solid var(--hairline); transition: background .12s;
}
.row-item:last-child { border-bottom: none; }
.row-item:hover { background: var(--bg-card-soft); }
.row-index {
  width: 28px; height: 28px; border-radius: 99px; background: var(--bg-card-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-muted); flex-shrink: 0;
}
.row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; }
.row-name { font-size: 13.5px; font-weight: 600; }
.row-sub { font-size: 11.5px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.row-end { text-align: left; flex-shrink: 0; }
.row-end b { display: block; font-size: 13px; font-weight: 700; }
.row-end span { font-size: 11px; color: var(--text-muted); }
.row-actions, .row-tools { display: flex; align-items: center; gap: 7px; justify-content: flex-end; flex-shrink: 0; }

/* ---- آواتار ---- */
.avatar {
  width: 42px; height: 42px; border-radius: 99px; background: var(--accent);
  color: var(--on-accent); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; flex-shrink: 0; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.small { width: 34px; height: 34px; font-size: 12px; }
.avatar.xl { width: 88px; height: 88px; font-size: 26px; }
.avatar.grp { background: var(--violet-grad); color: #fff; }
.avatar.hued { color: #fff; }

/* ---- برچسب‌ها ---- */
.pill {
  font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 99px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
}
.pill.green { background: rgba(109,212,138,.15); color: var(--green); }
.pill.amber { background: rgba(245,196,94,.15); color: var(--amber); }
.pill.red   { background: rgba(255,122,122,.15); color: var(--red); }
.pill.blue  { background: rgba(111,176,255,.15); color: var(--blue); }
.pill.gray  { background: var(--bg-card-soft); color: var(--text-secondary); }
.tag-chip {
  font-size: 11px; font-weight: 600; padding: 5px 12px; border-radius: 99px;
  background: var(--bg-card-soft); color: var(--text-secondary); border: 1px solid transparent;
}
.tag-chip.pick { cursor: pointer; }
.tag-chip.pick:hover { border-color: var(--border-strong); }
.tag-chip.on { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.tag-mini { font-size: 9.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--bg-card-soft); color: var(--text-muted); }
.tag-mini.watch { background: rgba(245,196,94,.16); color: var(--amber); }
.dept-chip { font-size: 11px; font-weight: 600; padding: 5px 12px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 99px; flex-shrink: 0; display: inline-block; }
.status-dot.on { background: var(--green); }
.status-dot.off { background: var(--text-muted); }
.status-dot.new { background: var(--accent); }

/* =========================================================
   فرم‌ها
   ========================================================= */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 7px; }
.input, input[type=text], input[type=email], input[type=number], input[type=date], input[type=password], select, textarea {
  width: 100%; background: var(--bg-card-soft); border: 1px solid transparent;
  border-radius: var(--radius-sm); padding: 12px 15px; color: var(--text-primary);
  font-size: 13px; outline: none; transition: border-color .15s;
}
.input:focus, input:focus, select:focus, textarea:focus { border-color: var(--accent-line); }
.input::placeholder, input::placeholder, textarea::placeholder { color: var(--text-muted); }
textarea { resize: vertical; line-height: 1.8; }
select { cursor: pointer; }
.req { color: var(--red); }
.hint { font-size: 11.5px; color: var(--text-muted); line-height: 1.8; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-panel { background: var(--bg-card-soft); border-radius: var(--radius); padding: 18px; }
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--hairline); cursor: pointer;
}
.switch-row:last-of-type { border-bottom: none; }
.switch-row span { display: flex; flex-direction: column; }
.switch-row small { font-size: 11.5px; color: var(--text-muted); }
.switch-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.pick-list { max-height: 270px; overflow-y: auto; }
.pick-list.small { max-height: 160px; }
.pick-row {
  display: flex; align-items: center; gap: 11px; padding: 10px 10px;
  border-radius: var(--radius-sm); cursor: pointer; font-size: 13px;
}
.pick-row:hover { background: var(--bg-card-soft); }
.pick-row input { accent-color: var(--accent); width: 16px; height: 16px; }
.perm-list { max-height: 300px; overflow-y: auto; background: var(--bg-card-soft); border-radius: var(--radius-sm); padding: 8px; }
.muted-inline { color: var(--text-muted); font-size: 12px; }
.color-row { display: flex; gap: 9px; flex-wrap: wrap; }
.color-dot { width: 32px; height: 32px; border-radius: 99px; border: 2px solid transparent; }
.color-dot.on { border-color: var(--text-primary); transform: scale(1.12); }
.color-input { width: 52px; height: 44px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: none; cursor: pointer; padding: 3px; flex-shrink: 0; }
.picker-row { display: flex; gap: 10px; align-items: center; }
.or-line { text-align: center; margin: 16px 0; position: relative; }
.or-line::before { content: ""; position: absolute; top: 50%; right: 0; left: 0; height: 1px; background: var(--border); }
.or-line span { position: relative; background: var(--bg-card); padding: 0 14px; font-size: 11.5px; color: var(--text-muted); }

/* دراپ‌زون */
.dropzone, .drop-zone {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 30px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  cursor: pointer; text-align: center; transition: border-color .15s, background .15s;
}
.dropzone:hover, .drop-zone:hover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.sm { padding: 18px; margin-top: 10px; }
.dz-icon { font-size: 22px; color: var(--accent); }
.dz-title { font-size: 13px; font-weight: 600; }
.dz-sub { font-size: 11.5px; color: var(--text-muted); }

/* =========================================================
   جدول‌ها
   ========================================================= */
.filter-bar {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 16px;
}
.fb-field, .filter-field { display: flex; flex-direction: column; gap: 6px; min-width: 155px; }
.fb-field.grow { flex: 1; }
.fb-field label, .filter-field label { font-size: 11px; color: var(--text-muted); font-weight: 700; }
.filter-bar .input { border-radius: 99px; }

.table-wrap {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; overflow-x: auto;
}
.data-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.data-table thead th {
  text-align: right; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  color: var(--text-muted); padding: 16px 18px; border-bottom: 1px solid var(--hairline);
  background: var(--bg-card-soft); white-space: nowrap; text-transform: uppercase;
}
.data-table td { padding: 15px 18px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.data-table tbody tr { cursor: pointer; transition: background .12s; }
.data-table tbody tr:hover { background: var(--bg-card-soft); }
.data-table tbody tr:last-child td { border-bottom: none; }
.mono { font-family: ui-monospace, "SF Mono", monospace; font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.cell-title { font-size: 13.5px; font-weight: 600; }
.cell-sub { font-size: 11.5px; color: var(--text-muted); }
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-none { font-size: 12px; color: var(--text-muted); }
.icon-del {
  width: 30px; height: 30px; border-radius: 99px; color: var(--text-muted);
  font-size: 13px; display: inline-flex; align-items: center; justify-content: center; transition: background .15s, color .15s;
}
.icon-del:hover { background: rgba(255,122,122,.16); color: var(--red); }
.empty { color: var(--text-muted); font-size: 13px; text-align: center; padding: 46px 16px; }
.empty.sm { padding: 16px; font-size: 12px; }
.empty-team { text-align: center; padding: 50px 16px; }

/* تب‌های سگمنتی */
.seg-tabs, .tabs-row {
  display: flex; gap: 4px; background: var(--bg-card-soft);
  border-radius: 99px; padding: 5px; width: fit-content; margin-bottom: 18px; flex-wrap: wrap;
}
.seg, .tab-btn {
  padding: 9px 20px; border-radius: 99px; font-size: 13px;
  font-weight: 600; color: var(--text-secondary); transition: background .15s, color .15s;
}
.seg:hover, .tab-btn:hover { color: var(--text-primary); }
.seg.active, .tab-btn.on { background: var(--accent); color: var(--on-accent); font-weight: 700; }

/* =========================================================
   تسک‌ها
   ========================================================= */
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 15px; }
.task-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; cursor: pointer; transition: transform .12s, border-color .12s;
  border-right: 3px solid var(--text-muted);
}
.task-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.task-card.amber { border-right-color: var(--amber); }
.task-card.green { border-right-color: var(--green); }
.task-card.red   { border-right-color: var(--red); }
.task-card.blue  { border-right-color: var(--blue); }
.task-card .t { font-size: 13.5px; font-weight: 600; margin-bottom: 8px; }
.task-card .meta { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--text-muted); }
.tc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.tc-top h3 { font-size: 14.5px; font-weight: 700; line-height: 1.6; }
.tc-desc {
  font-size: 12.5px; color: var(--text-secondary); margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tc-foot {
  display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px;
  color: var(--text-muted); border-top: 1px solid var(--hairline); padding-top: 11px;
}

/* فرم تسک */
.tf-tabs { display: flex; gap: 5px; background: var(--bg-card-soft); border-radius: 99px; padding: 5px; width: fit-content; margin: 4px 0 18px; flex-wrap: wrap; }
.tf-tab { padding: 9px 18px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.tf-tab.active { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.tf-body { display: grid; grid-template-columns: 1fr 290px; gap: 18px; align-items: start; }
.tf-main { min-width: 0; }
.tf-side { display: flex; flex-direction: column; gap: 13px; }
.tf-box { background: var(--bg-card-soft); border-radius: var(--radius); padding: 16px; }
.tf-box-label { font-size: 11.5px; color: var(--text-muted); margin: 12px 0 7px; font-weight: 700; }
.tf-box-label:first-child { margin-top: 0; }
.tf-status { background: var(--bg-card); border-radius: 99px; padding: 10px 15px; font-size: 12.5px; }
.prio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.prio-btn { padding: 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--bg-card); color: var(--text-secondary); }
.prio-btn.active { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.file-list { margin-top: 11px; }

/* =========================================================
   پنل جزئیات و مودال
   ========================================================= */
.modal-back {
  position: fixed; inset: 0; background: rgba(6,8,11,.72); backdrop-filter: blur(6px);
  z-index: 80; display: flex; align-items: center; justify-content: center; padding: 22px; overflow-y: auto;
}
.modal {
  background: var(--bg-card); border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl); width: min(560px, 100%); padding: 28px;
  box-shadow: var(--shadow-lg); max-height: 92vh; overflow-y: auto;
}
.modal-wide { width: min(940px, 100%); }
.modal h3 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.modal-x {
  width: 36px; height: 36px; border-radius: 99px; background: var(--bg-card-soft);
  color: var(--text-secondary); font-size: 19px; line-height: 1;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.modal-x:hover { background: var(--accent); color: var(--on-accent); }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.modal-actions .btn { flex: 1; min-width: 120px; }

.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.detail-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.detail-block { margin-bottom: 20px; }
.detail-label { font-size: 11px; color: var(--text-muted); font-weight: 700; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em; }
.detail-text { font-size: 13px; line-height: 1.9; white-space: pre-line; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.detail-grid > div { background: var(--bg-card-soft); border-radius: var(--radius); padding: 14px 16px; }
.detail-grid span { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.detail-grid b { font-size: 13px; font-weight: 700; }
.detail-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 18px; }

/* پایپ‌لاین */
.pipeline { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 6px; }
.pipe-step {
  flex-shrink: 0; padding: 9px 15px; border-radius: 99px; font-size: 11.5px;
  background: var(--bg-card-soft); color: var(--text-muted); white-space: nowrap;
}
.pipe-step.done { background: var(--accent-soft); color: var(--accent); }
.pipe-step.current { background: var(--accent); color: var(--on-accent); font-weight: 700; }

/* تاریخچه */
.hist-line { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--hairline); font-size: 12.5px; }
.hist-line:last-child { border-bottom: none; }
.hist-dot { width: 8px; height: 8px; border-radius: 99px; background: var(--accent); margin-top: 7px; flex-shrink: 0; }
.hist-note { display: block; color: var(--text-secondary); font-size: 12px; }
.hist-time { display: block; color: var(--text-muted); font-size: 10.5px; margin-top: 2px; }

/* فایل‌ها */
.file-group { border-radius: var(--radius); padding: 14px 16px; margin-bottom: 11px; background: var(--bg-card-soft); border: 1px solid transparent; }
.file-group.current { border-color: var(--accent-line); background: var(--accent-soft); }
.file-group.empty-group { opacity: .7; }
.fg-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; flex-wrap: wrap; }
.fg-title { font-size: 12.5px; font-weight: 700; }
.fg-count { font-size: 11px; color: var(--text-muted); margin-right: auto; }
.fg-empty { font-size: 12px; color: var(--text-muted); padding: 6px 0; }
.file-line { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--hairline); font-size: 12.5px; }
.file-line:last-child { border-bottom: none; }
.fl-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-meta { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }

/* =========================================================
   پروژه‌ها
   ========================================================= */
.ws-layout { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
.ws-side {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px; position: sticky; top: 90px;
}
.ws-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ws-head h2 { font-size: 15px; font-weight: 700; }
.ws-search { margin-bottom: 12px; font-size: 12.5px; border-radius: 99px; }
.ws-list { display: flex; flex-direction: column; gap: 3px; max-height: 58vh; overflow-y: auto; }
.ws-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 99px; font-size: 13px; color: var(--text-secondary); width: 100%; text-align: right;
}
.ws-item:hover { background: var(--bg-card-soft); color: var(--text-primary); }
.ws-item.active { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.ws-dot { width: 9px; height: 9px; border-radius: 99px; flex-shrink: 0; }
.ws-logo { width: 20px; height: 20px; border-radius: 99px; overflow: hidden; flex-shrink: 0; }
.ws-logo img { width: 100%; height: 100%; object-fit: cover; }
.ws-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-count { font-size: 10.5px; background: rgba(255,255,255,.09); border-radius: 99px; padding: 1px 8px; }
.ws-item.active .ws-count { background: rgba(15,21,8,.16); }
.ws-main { min-width: 0; }
.ws-crumbs { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.ws-crumbs span { margin: 0 6px; }
.ws-title-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.ws-title-row h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.proj-title { display: flex; align-items: center; gap: 13px; }
.proj-logo {
  width: 46px; height: 46px; border-radius: 99px; display: flex; align-items: center;
  justify-content: center; overflow: hidden; font-size: 17px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.proj-logo img { width: 100%; height: 100%; object-fit: cover; }
.ws-tabs { display: flex; gap: 5px; background: var(--bg-card-soft); border-radius: 99px; padding: 5px; width: fit-content; margin-bottom: 20px; }
.ws-tab { padding: 9px 20px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.ws-tab.active { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.proj-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 6px 0 14px; }
.proj-head h2 { font-size: 18px; font-weight: 700; }
.pt-count { background: rgba(255,255,255,.09); border-radius: 99px; padding: 1px 8px; font-size: 10.5px; margin-right: 5px; }
.project-tabs { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 20px; }
.project-tab {
  display: flex; align-items: center; gap: 9px; padding: 10px 18px; border-radius: 99px;
  background: var(--bg-card); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text-secondary);
}
.project-tab.active { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text-primary); }
.project-tab .dot { width: 9px; height: 9px; border-radius: 99px; }
.progress-bar { height: 8px; background: var(--bg-card-soft); border-radius: 99px; overflow: hidden; margin-bottom: 20px; }
.progress-bar span { display: block; height: 100%; border-radius: 99px; transition: width .3s; }
.stage-row { display: flex; gap: 11px; flex-wrap: wrap; }
.stage-box { flex: 1; min-width: 135px; background: var(--bg-card-soft); border-radius: var(--radius); padding: 17px; text-align: center; }
.stage-count { display: block; font-size: 24px; font-weight: 800; color: var(--accent); }
.stage-label { font-size: 11.5px; color: var(--text-secondary); }

/* بورد */
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.board-col-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 11px; }
.board-col-head h3 { font-size: 12.5px; font-weight: 700; color: var(--text-secondary); }
.board-col-head span { font-size: 11px; color: var(--text-muted); background: var(--bg-card-soft); border-radius: 99px; padding: 2px 9px; }
.board-col { background: var(--bg-card-soft); border-radius: var(--radius-lg); padding: 11px; min-height: 320px; display: flex; flex-direction: column; gap: 11px; }
.board-col .task-card { background: var(--bg-card); }

/* اسپرینت */
.sprint-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 15px; overflow: hidden; }
.sprint-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--hairline); background: var(--bg-card-soft); }
.sprint-name { font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.sprint-body { padding: 8px; }
.bl-row { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: var(--radius); cursor: pointer; }
.bl-row:hover { background: var(--bg-card-soft); }
.bl-dot { width: 8px; height: 8px; border-radius: 99px; flex-shrink: 0; }
.bl-main { flex: 1; min-width: 0; }
.mini-select { background: var(--bg-card-soft); border: none; border-radius: 99px; padding: 6px 11px; font-size: 11.5px; color: var(--text-secondary); flex-shrink: 0; width: auto; }

/* =========================================================
   گفتگو
   ========================================================= */
.chat-wrap { display: grid; grid-template-columns: 310px 1fr; gap: 16px; height: calc(100vh - 180px); min-height: 480px; }
.chat-side { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); display: flex; flex-direction: column; overflow: hidden; }
.chat-side-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--hairline); }
.chat-side-head h2 { font-size: 15px; font-weight: 700; }
.chat-tabs { display: flex; gap: 4px; padding: 12px; border-bottom: 1px solid var(--hairline); flex-wrap: wrap; }
.chat-tab { flex: 1; text-align: center; font-size: 12px; font-weight: 600; padding: 8px; border-radius: 99px; color: var(--text-secondary); }
.chat-tab.active { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.conv-list { flex: 1; overflow-y: auto; padding: 8px; }
.conv-item { display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: var(--radius); cursor: pointer; }
.conv-item:hover { background: var(--bg-card-soft); }
.conv-item.active { background: var(--accent-soft); }
.conv-item.watching { border-right: 2px solid var(--amber); }
.conv-text { flex: 1; min-width: 0; }
.conv-name { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.conv-last { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-end { text-align: left; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.conv-time { font-size: 10.5px; color: var(--text-muted); }
.conv-badge { background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 800; min-width: 20px; height: 20px; border-radius: 99px; display: flex; align-items: center; justify-content: center; padding: 0 6px; }

.chat-main { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); display: flex; flex-direction: column; overflow: hidden; }
.chat-main-head { display: flex; align-items: center; gap: 13px; padding: 15px 20px; border-bottom: 1px solid var(--hairline); }
.cm-title { flex: 1; min-width: 0; }
.cm-title p.n { font-size: 14.5px; font-weight: 700; }
.cm-title p.s { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-meet { display: flex; align-items: center; gap: 8px; background: var(--accent); color: var(--on-accent); font-size: 12.5px; font-weight: 700; padding: 9px 17px; border-radius: 99px; flex-shrink: 0; }
.btn-meet svg { width: 15px; height: 15px; fill: currentColor; }
.back-mobile { display: none; font-size: 19px; color: var(--text-secondary); }

.chat-body { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 13px; }
.msg { display: flex; gap: 10px; max-width: 74%; }
.msg.me { align-self: flex-start; flex-direction: row-reverse; }
.msg.them { align-self: flex-end; }
.bubble { padding: 11px 16px; border-radius: var(--radius); font-size: 13px; line-height: 1.85; word-break: break-word; }
.msg.them .bubble { background: var(--bg-card-soft); border-top-right-radius: 5px; }
.msg.me .bubble { background: var(--accent); color: var(--on-accent); border-top-left-radius: 5px; }
.msg-sender { font-size: 11.5px; font-weight: 700; margin-bottom: 4px; }
.msg-time { font-size: 10px; color: var(--text-muted); margin-top: 4px; display: block; }
.msg.me .msg-time { color: rgba(15,21,8,.55); }
.file-bubble { display: flex; align-items: center; gap: 11px; background: var(--bg-card-soft); border-radius: var(--radius); padding: 12px 16px; }
.file-bubble .fi { font-size: 18px; }
.file-bubble .fn { font-size: 13px; font-weight: 600; }
.file-bubble .fs { font-size: 11px; color: var(--text-muted); }
.day-sep { align-self: center; font-size: 11px; color: var(--text-muted); background: var(--bg-card-soft); padding: 4px 14px; border-radius: 99px; }

.chat-input { display: flex; align-items: center; gap: 9px; padding: 14px 18px; border-top: 1px solid var(--hairline); }
.chat-input input[type=text] { flex: 1; border-radius: 99px; }
.chat-input.impersonating input[type=text] { border-color: var(--amber); }
.chat-input.impersonating .as-select { border-color: var(--amber); color: var(--amber); }
.btn-send, .btn-attach { width: 44px; height: 44px; border-radius: 99px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.btn-send { background: var(--accent); color: var(--on-accent); font-size: 17px; }
.btn-send:hover { background: var(--accent-hover); }
.btn-send svg { width: 18px; height: 18px; fill: currentColor; }
.btn-attach { background: var(--bg-card-soft); color: var(--text-secondary); font-size: 16px; }
.btn-attach svg { width: 18px; height: 18px; fill: currentColor; }
.as-select { background: var(--bg-card-soft); border: 1px solid transparent; border-radius: 99px; padding: 11px 14px; color: var(--text-primary); font-size: 12px; max-width: 165px; flex-shrink: 0; width: auto; }
.readonly-note { font-size: 12.5px; color: var(--amber); text-align: center; width: 100%; }

/* =========================================================
   تیکت‌ها
   ========================================================= */
.ticket-thread { display: flex; flex-direction: column; gap: 13px; max-height: 340px; overflow-y: auto; }
.tmsg { display: flex; gap: 11px; }
.tmsg-body { flex: 1; background: var(--bg-card-soft); border-radius: var(--radius); padding: 12px 16px; }
.tmsg.me .tmsg-body { background: var(--accent-soft); }
.tmsg-head { font-size: 12px; font-weight: 700; display: flex; justify-content: space-between; gap: 10px; }
.tmsg-text { font-size: 13px; color: var(--text-secondary); margin-top: 5px; line-height: 1.85; }
.tk-num { font-family: ui-monospace, monospace; font-size: 12px; color: var(--text-muted); }
.tk-subject { font-size: 13.5px; font-weight: 600; }
.tk-preview { font-size: 11.5px; color: var(--text-muted); }
.tk-person { display: flex; align-items: center; gap: 9px; }
.sent-by { font-size: 11px; color: var(--text-muted); }

/* =========================================================
   تقویم
   ========================================================= */
.cal-nav { display: flex; gap: 8px; }
.cal-legend { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.cl-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-secondary); }
.cl-dot { width: 9px; height: 9px; border-radius: 99px; display: inline-block; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 9px; }
.cal-dow { text-align: center; font-size: 11px; color: var(--text-muted); font-weight: 700; padding-bottom: 8px; text-transform: uppercase; }
.cal-cell {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  min-height: 112px; padding: 10px; display: flex; flex-direction: column; gap: 6px;
}
.cal-cell.out { opacity: .28; min-height: 0; }
.cal-cell.today { border-color: var(--accent); background: var(--accent-soft); }
.cal-day-num { font-size: 12px; color: var(--text-muted); font-weight: 700; }
.cal-cell.today .cal-day-num { color: var(--accent); }
.cal-chip {
  font-size: 11px; font-weight: 600; padding: 5px 10px; border-radius: 99px;
  text-align: right; cursor: pointer; line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-chip:hover { filter: brightness(1.2); }
.chip-gray  { background: var(--bg-card-soft); color: var(--text-secondary); }
.chip-amber { background: rgba(245,196,94,.16); color: var(--amber); }
.chip-green { background: rgba(109,212,138,.16); color: var(--green); }
.chip-red   { background: rgba(255,122,122,.16); color: var(--red); }

/* =========================================================
   اعضا، تیم‌ها، آمار
   ========================================================= */
.member-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 18px; }
.ms-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 15px; border-radius: 99px;
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-secondary); white-space: nowrap; flex-shrink: 0;
}
.ms-item:hover { border-color: var(--border-strong); color: var(--text-primary); }
.ms-item.active { border-color: transparent; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.ms-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.4; }
.ms-text span { font-size: 10.5px; opacity: .7; }

.net-panel { margin-bottom: 16px; }
.net-panel-head { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--hairline); margin-bottom: 14px; flex-wrap: wrap; }
.net-panel-title { flex: 1; min-width: 150px; }
.net-panel-title h2 { font-size: 17px; font-weight: 700; }
.net-members { display: flex; flex-direction: column; }
.nm-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--hairline); }
.nm-row:last-child { border-bottom: none; }
.nm-text { flex: 1; min-width: 0; }
.nm-switch { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-muted); cursor: pointer; flex-shrink: 0; }
.nm-switch input { accent-color: var(--accent); width: 15px; height: 15px; }

.bar-chart { display: flex; align-items: flex-end; gap: 4px; height: 210px; padding: 12px 0 34px; overflow-x: auto; }
.bar-col { flex: 1; min-width: 13px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.bar { width: 68%; min-height: 3px; border-radius: 99px 99px 4px 4px; background: var(--accent); transition: opacity .15s; }
.bar-col:hover .bar { opacity: .75; }
.bar-label { position: absolute; bottom: -28px; font-size: 9px; color: var(--text-muted); transform: rotate(-45deg); white-space: nowrap; }
.kv-list { display: flex; flex-direction: column; }
.kv { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--hairline); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv span { color: var(--text-secondary); }
.kv b { font-weight: 700; }

/* پروفایل و تم */
.avatar-edit { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 11px; }
.theme-cell { text-align: center; }
.theme-swatch {
  width: 100%; height: 52px; border-radius: var(--radius); border: 2px solid transparent;
  cursor: pointer; display: block; transition: transform .12s;
}
.theme-swatch:hover { transform: translateY(-2px); }
.theme-swatch.on { border-color: var(--text-primary); }
.theme-name { font-size: 11.5px; color: var(--text-secondary); margin-top: 6px; }

/* گزارش روزانه */
.notice { background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius); padding: 14px 18px; font-size: 13px; margin-bottom: 18px; }
.report-list { display: flex; flex-direction: column; gap: 13px; }
.report-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 22px; }
.report-card.unseen { border-right: 3px solid var(--accent); }
.rep-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--hairline); margin-bottom: 14px; }
.rep-block { margin-bottom: 13px; }
.rep-block span { display: block; font-size: 11px; color: var(--text-muted); font-weight: 700; margin-bottom: 4px; text-transform: uppercase; }
.rep-block p { font-size: 13px; line-height: 1.9; white-space: pre-line; }
.rep-block.warn p { color: var(--amber); }

/* انتخاب تیم */
body.choose-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 26px; }
.choose-wrap { width: min(820px, 100%); }
.choose-head { text-align: center; margin-bottom: 30px; }
.choose-head h1 { font-size: 30px; font-weight: 800; margin-bottom: 8px; letter-spacing: -.02em; }
.net-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 15px; }
.net-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 28px 18px; text-align: center; position: relative; transition: transform .12s, border-color .12s;
}
.net-card:hover { transform: translateY(-3px); border-color: var(--accent-line); }
.net-card.current { border-color: var(--accent); }
.net-logo {
  width: 62px; height: 62px; border-radius: 99px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  font-size: 23px; font-weight: 800; color: #fff;
}
.net-logo img { width: 100%; height: 100%; object-fit: cover; }
.net-logo.sm { width: 44px; height: 44px; font-size: 17px; margin: 0; }
.net-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.net-meta { font-size: 11.5px; color: var(--text-muted); }
.net-badge { position: absolute; top: 12px; left: 12px; font-size: 10px; font-weight: 700; background: var(--accent); color: var(--on-accent); padding: 3px 10px; border-radius: 99px; }
.choose-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

/* لوگو */
.logo-picker { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* توست */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--panel-light); color: var(--on-light);
  padding: 14px 26px; border-radius: 99px; font-size: 13px; font-weight: 600;
  z-index: 200; box-shadow: var(--shadow-lg); animation: toastIn .22s ease;
}
.toast.err { background: var(--red); color: #fff; }
.toast.ok { background: var(--accent); color: var(--on-accent); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* =========================================================
   ریسپانسیو
   ========================================================= */
@media (max-width: 1150px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .columns { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .ws-layout { grid-template-columns: 1fr; }
  .ws-side { position: static; }
  .ws-list { flex-direction: row; overflow-x: auto; max-height: none; }
  .ws-item { flex-shrink: 0; }
  .tf-body { grid-template-columns: 1fr; }
  .two-col, .form-cols { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .chat-wrap { grid-template-columns: 1fr; height: auto; }
  .chat-main { display: none; min-height: 68vh; }
  .chat-main.open-mobile { display: flex; }
  .back-mobile { display: block; }
  .chat-side { max-height: 68vh; }
}
@media (max-width: 760px) {
  .sidebar {
    position: fixed; right: 0; top: 68px; height: calc(100vh - 68px);
    z-index: 45; transform: translateX(100%); transition: transform .22s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-btn { display: flex; }
  .overlay.show { display: block; position: fixed; inset: 0; top: 68px; background: rgba(6,8,11,.62); z-index: 42; }
  .top-search { display: none; }
  .brand-name { font-size: 16px; }
  .content { padding: 20px 15px 50px; }
  .page-head h1 { font-size: 23px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 11px; }
  .stat-value { font-size: 24px; }
  .board { grid-template-columns: 1fr; }
  .task-grid { grid-template-columns: 1fr; }
  .cal-grid { gap: 5px; }
  .cal-cell { min-height: 82px; padding: 6px; }
  .cal-chip { font-size: 9.5px; padding: 3px 7px; }
  .modal { padding: 22px; border-radius: var(--radius-lg); }
  .hero { padding: 24px; border-radius: var(--radius-lg); }
}

/* =========================================================
   تکمیلی
   ========================================================= */
.pipe-step { display: inline-flex; align-items: center; gap: 7px; }
.pipe-dot { width: 7px; height: 7px; border-radius: 99px; background: currentColor; opacity: .5; flex-shrink: 0; }
.pipe-step.current .pipe-dot, .pipe-step.done .pipe-dot { opacity: 1; }
.pipe-text { white-space: nowrap; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state h3 { font-size: 17px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.empty-state p { font-size: 13px; margin-bottom: 18px; }

.cell-op { display: flex; flex-direction: column; }
.fl-icon { font-size: 15px; flex-shrink: 0; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
.task-form .tf-pane { min-height: 200px; }
.ws-new { width: 100%; margin-bottom: 12px; }
.pct { font-size: 12px; font-weight: 700; color: var(--accent); }
p.sub { font-size: 12.5px; color: var(--text-secondary); }

/* صفحه ورود */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 22px; }
.login-box { width: 100%; max-width: 440px; }
.login-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 34px; box-shadow: var(--shadow-lg);
}
.login-card h1 { font-size: 21px; font-weight: 800; text-align: center; margin-bottom: 6px; letter-spacing: -.01em; }
.login-card p.sub { text-align: center; margin-bottom: 24px; color: var(--text-muted); }
.login-logo {
  width: 58px; height: 58px; border-radius: 99px; background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; margin: 0 auto 18px;
}
.accounts { display: flex; flex-direction: column; gap: 7px; margin-top: 18px; }
.acc {
  display: flex; align-items: center; gap: 11px; padding: 11px 14px;
  border-radius: 99px; background: var(--bg-card-soft); font-size: 12.5px;
  color: var(--text-secondary); text-align: right; width: 100%; transition: background .15s;
}
.acc:hover { background: var(--accent); color: var(--on-accent); }
.acc b { font-weight: 700; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 16px; }
.login-brand .brand-name { font-size: 26px; }
.login-brand .brand-name .t2 { font-size: 20px; }

/* بنر خوش‌آمد — دو ستونه */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap; }
.hero-text { min-width: 200px; }
.hero-side { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.hero-metric { text-align: center; }
.hero-metric span { display: block; font-size: 11.5px; color: var(--on-light-soft); font-weight: 600; margin-bottom: 2px; }
.hero-metric b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.hero-divider { width: 1px; height: 38px; background: rgba(128,140,155,.26); }
.hero-cta {
  background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 700;
  padding: 12px 22px; border-radius: 99px; white-space: nowrap; transition: filter .15s;
}
.hero-cta:hover { filter: brightness(1.06); }
@media (max-width: 640px) {
  .hero { flex-direction: column; align-items: stretch; gap: 18px; }
  .hero-side { justify-content: space-between; }
  .hero-cta { width: 100%; text-align: center; }
}

/* =========================================================
   المان‌های قرض‌گرفته‌شده از رفرنس بنفش:
   نمودار خطی درخشان + حلقه‌ی پیشرفت دایره‌ای
   ========================================================= */
.glow-chart-wrap { padding: 6px 4px 2px; }
.glow-chart { display: block; overflow: visible; }

.ring-panel {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; text-align: center;
}
.ring-panel .panel-head { align-self: stretch; }
.progress-ring { display: block; margin: 6px auto 0; }

.ring-row { display: grid; grid-template-columns: 240px 1fr; gap: 16px; margin-bottom: 16px; align-items: stretch; }
.stats-grid-2 { grid-template-columns: repeat(2, 1fr); margin-bottom: 0; }
.columns-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 900px) {
  .ring-row { grid-template-columns: 1fr; }
  .columns-3 { grid-template-columns: 1fr; }
}

/* =========================================================
   لیکویید گلس + نوار منوی بالا + دنباله‌ی موس
   این بخش بعد از بقیه می‌آید تا روی قواعد قبلی بنشیند.
   ========================================================= */
:root {
  --glass-bg:        rgba(28, 32, 38, 0.62);
  --glass-bg-strong: rgba(20, 23, 27, 0.80);
  --glass-inset:     rgba(255, 255, 255, 0.05);
  --glass-hi:        rgba(255, 255, 255, 0.10);
  --card-bg:         #171A1F;
  --card-bg-soft:    #1E222A;
  --topbar-h: 74px;
}
body.light {
  --glass-bg:        rgba(255, 255, 255, 0.68);
  --glass-bg-strong: rgba(255, 255, 255, 0.86);
  --glass-inset:     rgba(255, 255, 255, 0.55);
  --glass-hi:        rgba(255, 255, 255, 0.9);
  --card-bg:         #FFFFFF;
  --card-bg-soft:    #F2F4F8;
}

/* ---- شیشه‌ی مایع ---- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  box-shadow:
    inset 0 1px 0 var(--glass-hi),
    inset 0 -1px 0 rgba(0,0,0,0.16),
    var(--shadow);
  border: none;
}
.glass-inset {
  background: var(--glass-inset);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 2px 8px rgba(0,0,0,0.14);
}

/* کارت‌ها: بدون خط دور، با عمق و های‌لایت لبه */
.panel, .stat-card, .table-wrap, .filter-bar, .task-card, .report-card,
.sprint-box, .ws-side, .chat-side, .chat-main, .cal-cell, .net-card, .modal {
  border: none !important;
  background: var(--card-bg);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-sm);
}
.stat-card:hover, .task-card:hover, .net-card:hover {
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow);
}
.bg-card-soft, .tf-box, .form-panel, .detail-grid > div, .board-col,
.file-group, .perm-list, .stage-box {
  border: none !important;
  background: var(--card-bg-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
body.light .bg-card-soft, body.light .tf-box, body.light .form-panel,
body.light .detail-grid > div, body.light .board-col, body.light .file-group,
body.light .perm-list, body.light .stage-box { box-shadow: none; }
.modal { background: var(--glass-bg-strong); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); }

/* =========================================================
   نوار بالا
   ========================================================= */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  height: var(--topbar-h); padding: 0 22px;
  border-radius: 0;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; position: relative; }
.topbar-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-right: auto; }

/* ریل منو — قرص شیشه‌ای وسط */
.rail {
  position: relative; display: flex; align-items: center; gap: 2px;
  padding: 6px; border-radius: 99px; margin: 0 auto;
  max-width: 100%; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail-item {
  position: relative; z-index: 2; overflow: hidden;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 99px;
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  white-space: nowrap; flex-shrink: 0;
  transition: color .28s cubic-bezier(.4,0,.2,1), transform .2s;
}
.rail-item svg { width: 16px; height: 16px; fill: currentColor; transition: transform .28s; }
.rail-item:hover { color: var(--text-primary); }
.rail-item:hover svg { transform: translateY(-1px) scale(1.08); }
.rail-item.lit { color: var(--on-accent); }
.rail-item.active:not(.lit) { color: var(--text-primary); }
.rail-item:active { transform: scale(.96); }
.rail-item .nav-badge { position: static; }

/* گلایدر: قرص شناوری که زیر آیتم می‌لغزد */
.rail-glider {
  position: absolute; z-index: 1; top: 6px; right: auto; left: 0;
  border-radius: 99px; background: var(--accent);
  box-shadow: 0 4px 16px -2px color-mix(in srgb, var(--accent) 55%, transparent);
  opacity: 0; pointer-events: none;
  transition: transform .42s cubic-bezier(.34,1.35,.4,1), width .42s cubic-bezier(.34,1.35,.4,1),
              height .3s ease, opacity .25s ease;
}

/* موج کلیک */
.ripple {
  position: absolute; width: 8px; height: 8px; border-radius: 99px;
  background: currentColor; opacity: .34; transform: translate(-50%, -50%) scale(1);
  animation: rippleOut .6s ease-out forwards; pointer-events: none;
}
@keyframes rippleOut { to { transform: translate(-50%,-50%) scale(22); opacity: 0; } }

/* دکمه‌های ابزار */
.icon-btn.on { background: var(--accent); color: var(--on-accent); }
.avatar-btn { border-radius: 99px; padding: 0; line-height: 0; transition: transform .18s; }
.avatar-btn:hover { transform: scale(1.07); }

/* پاپ‌آپ جستجو */
.search-pop {
  position: absolute; top: calc(100% + 10px); left: 22px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 99px; width: min(420px, calc(100vw - 44px));
  animation: popIn .22s cubic-bezier(.34,1.3,.5,1);
}
.search-pop svg { width: 16px; height: 16px; fill: var(--text-muted); flex-shrink: 0; }
.search-pop input { flex: 1; background: none; border: none; outline: none; font-size: 13.5px; color: var(--text-primary); }

/* شیت «بیشتر» / حساب من */
.sheet {
  position: absolute; top: calc(100% + 10px); left: 22px; z-index: 60;
  width: min(340px, calc(100vw - 44px)); max-height: min(74vh, 640px); overflow-y: auto;
  border-radius: var(--radius-lg); padding: 16px;
  animation: popIn .24s cubic-bezier(.34,1.3,.5,1);
}
@keyframes popIn { from { opacity: 0; transform: translateY(-8px) scale(.97); } to { opacity: 1; transform: none; } }
.sheet-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--hairline); }
.sheet-name { font-size: 14px; font-weight: 700; }
.sheet-role { font-size: 11.5px; color: var(--text-muted); }
.sheet-stats { display: flex; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.sheet-stats > div { flex: 1; text-align: center; }
.sheet-stats b { display: block; font-size: 15px; font-weight: 800; }
.sheet-stats span { font-size: 10.5px; color: var(--text-muted); }
.sheet-nav { padding: 8px 0; }
.sheet-label { font-size: 10px; color: var(--text-muted); font-weight: 800; letter-spacing: .1em; padding: 10px 10px 5px; text-transform: uppercase; }
.sheet-item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: right;
  padding: 10px 12px; border-radius: 99px; font-size: 13px; color: var(--text-secondary);
  transition: background .16s, color .16s, transform .16s;
}
.sheet-item svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.sheet-item:hover { background: var(--card-bg-soft); color: var(--text-primary); transform: translateX(-3px); }
.sheet-item.on { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.sheet-item.locked { opacity: .45; }
.sheet-item.danger { color: var(--red); margin-top: 8px; border-top: 1px solid var(--hairline); border-radius: 0 0 var(--radius) var(--radius); padding-top: 14px; }
.sheet-item .nav-badge { margin-right: auto; }
.only-mobile { display: none; }

/* پرده‌ی پشت منو */
.scrim { position: fixed; inset: 0; z-index: 45; background: rgba(6,8,11,.42); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .22s; }
.scrim.show { opacity: 1; pointer-events: auto; }

/* چیدمان بدون سایدبار */
.content { padding: 28px 26px 80px; max-width: 1320px; margin: 0 auto; }
.app-body, .sidebar, .overlay, .menu-btn, .top-strip { display: none !important; }

/* انیمیشن ورود محتوا هنگام جابه‌جایی بین صفحات */
#page > * { animation: pageIn .42s cubic-bezier(.22,1,.36,1) both; }
#page > *:nth-child(2) { animation-delay: .05s; }
#page > *:nth-child(3) { animation-delay: .1s; }
#page > *:nth-child(4) { animation-delay: .15s; }
#page > *:nth-child(n+5) { animation-delay: .18s; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* =========================================================
   دنباله‌ی موس
   ========================================================= */
@media (pointer: fine) {
  body.has-cursor, body.has-cursor * { cursor: none !important; }
}
.cursor-dot, .cursor-ring, .cursor-trail {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;
  will-change: transform; margin-left: -4px; margin-top: -4px;
}
.cursor-dot { width: 8px; height: 8px; border-radius: 99px; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.cursor-ring {
  width: 34px; height: 34px; margin-left: -17px; margin-top: -17px;
  border-radius: 99px; border: 1.5px solid color-mix(in srgb, var(--accent) 62%, transparent);
  transition: width .22s, height .22s, margin .22s, background .22s, border-color .22s;
}
.cursor-ring.hot {
  width: 52px; height: 52px; margin-left: -26px; margin-top: -26px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-color: var(--accent);
}
.cursor-trail { width: 8px; height: 8px; border-radius: 99px; background: var(--accent); filter: blur(2px); }

/* =========================================================
   ریسپانسیو نوار بالا
   ========================================================= */
@media (max-width: 1080px) {
  .rail-item span { display: none; }
  .rail-item { padding: 11px 14px; }
}
@media (max-width: 760px) {
  .topbar { padding: 0 14px; gap: 10px; height: 66px; }
  .rail { display: none; }
  .only-mobile { display: block; }
  .sheet, .search-pop { left: 10px; right: 10px; width: auto; }
  .content { padding: 20px 14px 60px; }
  .brand-name { font-size: 15px; }
  .cursor-dot, .cursor-ring, .cursor-trail { display: none; }
}

/* =========================================================
   داشبورد بازطراحی‌شده
   ========================================================= */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.dash-eyebrow { font-size: 12px; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.dash-head h1 { font-size: 32px; font-weight: 800; letter-spacing: -.03em; }

.dash-top { display: grid; grid-template-columns: 1fr 300px; gap: 16px; margin-bottom: 16px; }

/* کارت خلاصه با نمودار */
.summary-card { display: flex; flex-direction: column; gap: 14px; padding: 24px 26px; }
.summary-metrics { display: flex; gap: 34px; flex-wrap: wrap; }
.sm-item { display: flex; flex-direction: column; gap: 2px; }
.sm-label { font-size: 11.5px; color: var(--text-muted); font-weight: 600; }
.sm-value { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.summary-chart { margin: 0 -8px; }
.summary-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--hairline); }

/* کارت برجسته با حلقه */
.accent-card {
  background: var(--accent) !important; color: var(--on-accent);
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 14px 34px -10px color-mix(in srgb, var(--accent) 55%, transparent) !important;
}
.accent-card .sm-label { color: color-mix(in srgb, var(--on-accent) 62%, transparent); }
.accent-card .progress-ring text { fill: var(--on-accent) !important; }
.ac-head { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.ac-go { width: 30px; height: 30px; border-radius: 99px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--on-accent) 12%, transparent); font-size: 14px; }
.ac-foot { display: flex; gap: 10px; width: 100%; padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--on-accent) 16%, transparent); }
.ac-foot > div { flex: 1; text-align: center; }
.ac-foot b { display: block; font-size: 19px; font-weight: 800; }
.ac-foot span { font-size: 10.5px; opacity: .68; }
.accent-card .ring-track, .accent-card circle:first-of-type { stroke: color-mix(in srgb, var(--on-accent) 16%, transparent) !important; }

/* نوار پروژه‌ها */
.proj-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px; }
.proj-mini { background: var(--card-bg-soft); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px; transition: transform .14s; }
.proj-mini:hover { transform: translateY(-3px); }
.pm-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.proj-logo.sm { width: 34px; height: 34px; font-size: 13px; }
.pm-name { font-size: 13.5px; font-weight: 700; }
.pm-sub { font-size: 11.5px; color: var(--text-muted); }
.pm-bar { height: 5px; background: var(--glass-inset); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.pm-bar span { display: block; height: 100%; border-radius: 99px; transition: width .4s; }

@media (max-width: 900px) {
  .dash-top { grid-template-columns: 1fr; }
  .dash-head h1 { font-size: 25px; }
  .summary-metrics { gap: 22px; }
  .sm-value { font-size: 24px; }
}

/* عناصری که با صفت hidden پنهان می‌شوند باید واقعاً پنهان بمانند،
   چون display:flex در قواعد بالا بر hidden غالب می‌شود. */
[hidden] { display: none !important; }

/* در تم روشن، اکسنت روشن روی پس‌زمینه‌ی سفید خوانا نیست.
   برای متن و لینک از یک سایه‌ی تیره‌تر استفاده می‌کنیم؛
   پرشدگی‌ها (دکمه، قرص منو، کارت برجسته) همان اکسنت روشن می‌مانند. */
:root { --accent-ink: var(--accent); }
body.light { --accent-ink: color-mix(in srgb, var(--accent) 62%, #14181B); }

.link, .stage-count, .pct, .dept-chip, .tag-chip.on ~ .link { color: var(--accent-ink); }
.dept-chip { background: color-mix(in srgb, var(--accent) 16%, transparent); }
body.light .pill.green { color: color-mix(in srgb, var(--green) 55%, #101418); }
body.light .pill.amber { color: color-mix(in srgb, var(--amber) 55%, #101418); }
body.light .pill.blue  { color: color-mix(in srgb, var(--blue) 55%, #101418); }
body.light .pill.red   { color: color-mix(in srgb, var(--red) 55%, #101418); }
body.light .cursor-dot, body.light .cursor-trail { background: var(--accent-ink); }
body.light .cursor-ring { border-color: color-mix(in srgb, var(--accent-ink) 70%, transparent); }

/* =========================================================
   نشان RN Team
   لوگو برداری است و رنگش را از currentColor می‌گیرد،
   پس در تم روشن و تیره خودکار هماهنگ می‌شود.
   ========================================================= */
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex-shrink: 0;
  color: var(--text-primary);
}
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-mark svg path { fill: currentColor; }
.brand { display: flex; align-items: center; gap: 10px; }

/* در صفحه‌ی ورود بزرگ‌تر */
.login-brand .brand-mark { width: 46px; height: 46px; }

/* وقتی کنار قرص اکسنت می‌نشیند، رنگش را هماهنگ کن */
.rail-item.lit .brand-mark, .nav-item.active .brand-mark { color: var(--on-accent); }
/* صفحه‌ی ورود: نشان بالای نام، بزرگ‌تر */
.login-brand { flex-direction: column; gap: 10px; }
.login-brand .brand-mark { width: 58px; height: 58px; }

/* =========================================================
   ورود با رمز عبور
   ========================================================= */
.pw-wrap { position: relative; }
.pw-wrap input { padding-left: 74px; }
.pw-toggle {
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  font-size: 11.5px; font-weight: 700; color: var(--accent-ink);
  padding: 6px 12px; border-radius: 99px;
}
.pw-toggle:hover { background: var(--accent-soft); }
.login-error {
  background: rgba(255,122,122,.14); color: var(--red);
  border-radius: var(--radius-sm); padding: 11px 15px;
  font-size: 12.5px; margin-bottom: 14px; line-height: 1.7;
}
.login-note {
  font-size: 11.5px; color: var(--text-muted);
  text-align: center; margin-top: 18px; line-height: 1.8;
}

/* =========================================================
   اصلاح نمایش روی موبایل و تبلت
   ========================================================= */

/* محافظ کلی: هیچ‌چیز نباید صفحه را به‌صورت افقی بکشاند */
html, body { max-width: 100%; overflow-x: hidden; }
.scrim { width: 100vw; left: 0; right: auto; }

/* ---------- تبلت: آیپد عمودی و افقی ---------- */
@media (max-width: 1024px) {
  .content { padding: 22px 18px 70px; }
  .dash-top { grid-template-columns: 1fr 260px; }
  .board { grid-template-columns: repeat(2, 1fr); }
  .ws-layout { grid-template-columns: 210px 1fr; }
  .tf-body { grid-template-columns: 1fr 250px; }
  .columns-3 { grid-template-columns: 1fr 1fr; }
  .chat-wrap { grid-template-columns: 270px 1fr; }
}

@media (max-width: 860px) {
  .dash-top { grid-template-columns: 1fr; }
  .columns, .columns-3 { grid-template-columns: 1fr; }
  .ws-layout { grid-template-columns: 1fr; }
  .ws-side { position: static; }
  .ws-list { flex-direction: row; overflow-x: auto; max-height: none; padding-bottom: 4px; }
  .ws-item { flex-shrink: 0; }
  .tf-body { grid-template-columns: 1fr; }
  .ring-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- موبایل ---------- */
@media (max-width: 760px) {
  /* نوار بالا: اجازه‌ی جمع شدن به عناصر */
  .topbar {
    gap: 8px; padding: 0 12px; height: 62px;
    justify-content: space-between;
  }
  .topbar-brand { flex: 1 1 auto; min-width: 0; overflow: hidden; }
  .topbar-tools { gap: 4px; flex-shrink: 0; margin-right: 0; }

  .net-switch { padding: 5px 8px; gap: 7px; max-width: 100%; min-width: 0; }
  .net-switch .brand-name {
    font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
  }
  .net-switch .brand-name .t2 { display: none; }
  .brand-mark { width: 26px; height: 26px; }
  .net-chip { width: 26px; height: 26px; font-size: 11px; }

  .icon-btn { width: 34px; height: 34px; }
  .icon-btn svg { width: 15px; height: 15px; }
  .avatar-btn .avatar.small { width: 32px; height: 32px; font-size: 11px; }

  /* روی صفحه‌های خیلی باریک، نام تیم حذف شود تا جا باز شود */
  .content { padding: 18px 13px 56px; }
  .dash-head h1 { font-size: 22px; }
  .page-head h1 { font-size: 21px; }
  .stat-value { font-size: 22px; }
  .sm-value { font-size: 21px; }
  .summary-metrics { gap: 18px; }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 16px; }
  .panel { padding: 17px 16px; border-radius: var(--radius); }
  .task-grid, .board, .proj-strip { grid-template-columns: 1fr; }

  /* دکمه‌ها و اکشن‌ها */
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; justify-content: center; }
  .page-head, .dash-head { gap: 12px; }

  /* جدول‌ها: اسکرول افقی داخل خودشان، نه کل صفحه */
  .table-wrap { border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 720px; }

  /* فرم‌ها و مودال */
  .modal { padding: 18px; border-radius: var(--radius-lg); max-height: 94vh; }
  .modal-actions { flex-direction: column; }
  .modal-actions .btn { width: 100%; }
  .two-col, .form-cols, .detail-grid { grid-template-columns: 1fr; }
  .filter-bar { padding: 14px; gap: 10px; }
  .fb-field { min-width: 100%; }

  /* تقویم */
  .cal-grid { gap: 4px; }
  .cal-cell { min-height: 66px; padding: 5px; border-radius: var(--radius-sm); }
  .cal-chip { font-size: 9px; padding: 2px 6px; }
  .cal-dow { font-size: 9.5px; }
  .cal-nav { width: 100%; }
  .cal-nav .btn { flex: 1; padding: 9px 10px; font-size: 12px; }

  /* گفتگو */
  .chat-wrap { grid-template-columns: 1fr; height: auto; }
  .msg { max-width: 88%; }

  /* اسپرینت و بک‌لاگ */
  .bl-row { flex-wrap: wrap; gap: 8px; }
  .mini-select { width: 100%; }
  .sprint-head { flex-wrap: wrap; }

  /* آمار */
  .bar-chart { height: 170px; }
  .ring-panel .progress-ring { width: 130px !important; height: 130px !important; }

  /* ورود */
  .login-card { padding: 24px 20px; border-radius: var(--radius-lg); }
  .login-wrap { padding: 16px; }

  /* انتخاب تیم */
  .net-grid { grid-template-columns: 1fr; }
  .choose-head h1 { font-size: 23px; }
}

/* ---------- موبایل باریک ---------- */
@media (max-width: 400px) {
  .topbar { padding: 0 10px; gap: 6px; }
  .net-switch .brand-name { display: none; }
  .topbar-tools { gap: 2px; }
  .icon-btn { width: 32px; height: 32px; }
  .stats-grid { grid-template-columns: 1fr; }
  .summary-metrics { gap: 14px; }
  .sm-value { font-size: 19px; }
  .content { padding: 16px 11px 50px; }
}

/* ---------- حالت افقی موبایل ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  .topbar { height: 54px; }
  .sheet { max-height: 78vh; }
  .modal { max-height: 96vh; }
}

/* روی دستگاه لمسی، هدف‌های کلیک باید به‌اندازه‌ی کافی بزرگ باشند */
@media (pointer: coarse) {
  .btn { min-height: 42px; }
  .icon-btn, .btn-round { min-width: 38px; min-height: 38px; }
  .sheet-item, .pick-row, .nav-item { min-height: 44px; }
  .icon-del { min-width: 34px; min-height: 34px; }
}

/* =========================================================
   نسخه ۳ — اجزای تازه
   (ریخته‌شده روی سیستم طراحی قبلی؛ همه از متغیرهای رنگ و تم استفاده می‌کنند)
   ========================================================= */

/* ---------- فونت وزیرمتن (فایل محلی، با پشتیبان CDN) ---------- */
@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/Vazirmatn[wght].woff2") format("woff2-variations"),
       url("/fonts/Vazirmatn[wght].woff2") format("woff2"),
       url("https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn[wght].woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
body { font-family: "Vazirmatn", IRANSans, Tahoma, "Segoe UI", sans-serif; font-feature-settings: "ss01"; }
input, select, textarea, button { font-family: inherit; }
.mono { font-variant-numeric: tabular-nums; }
body.modal-open { overflow: hidden; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip-link { position: absolute; top: -40px; right: 12px; z-index: 999; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 99px; }
.skip-link:focus { top: 10px; }
.center { text-align: center; }
.late { color: var(--red) !important; }
.accent-text { color: var(--accent); }
.ok-text { color: var(--green); }
.err-text { color: var(--red); }
.muted-inline { color: var(--text-muted); font-weight: 400; }
.link-btn { color: var(--accent); font-size: 12.5px; font-weight: 600; padding: 4px 0; }
.link-btn:hover { text-decoration: underline; }
.center-block { display: block; margin: 14px auto 0; }
.btn svg { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }
.btn[disabled], button[disabled] { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-danger-solid { background: var(--red); color: #fff; font-weight: 700; }
.btn-danger-solid:hover { filter: brightness(1.08); }
.input-lg { font-size: 16px; padding: 14px 16px; font-weight: 600; }
.input-sm { padding: 9px 13px; font-size: 12.5px; }
.input.mini, select.mini { width: auto; min-width: 140px; padding: 9px 14px; border-radius: 99px; font-size: 12.5px; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
kbd { font-family: inherit; font-size: 10px; background: var(--card-bg-soft); border-radius: 6px; padding: 2px 7px; color: var(--text-muted); }

/* ---------- توست ---------- */
.toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 520px); }
.toast { position: static; transform: none; pointer-events: auto; text-align: center; max-width: 100%; animation: toastIn2 .28s cubic-bezier(.34,1.3,.5,1); transition: opacity .25s, transform .25s; }
.toast.info { background: var(--panel-light); color: var(--on-light); }
.toast.out { opacity: 0; transform: translateY(10px); }
@keyframes toastIn2 { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- مودال و دیالوگ ---------- */
.modal { animation: modalIn .26s cubic-bezier(.22,1,.36,1); }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-sm { width: min(430px, 100%); }
.confirm-icon { width: 54px; height: 54px; border-radius: 99px; margin: 0 auto 12px; display: grid; place-items: center; font-size: 24px; font-weight: 800; background: var(--accent-soft); color: var(--accent); }
.confirm-icon.danger { background: rgba(255,122,122,.15); color: var(--red); }
.confirm-text { text-align: center; color: var(--text-secondary); margin-top: 8px; line-height: 1.9; }
.choice-list { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; }
.choice { text-align: right; background: var(--card-bg-soft); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; border: 1px solid transparent; transition: border-color .15s, transform .12s; }
.choice:hover { border-color: var(--accent-line); transform: translateX(-2px); }
.choice b { font-size: 13.5px; }
.choice span { font-size: 11.5px; color: var(--text-muted); }
.choice.danger b { color: var(--red); }
.choice.danger:hover { border-color: rgba(255,122,122,.5); }
.sticky-actions { position: sticky; bottom: -28px; background: inherit; padding: 14px 0 4px; margin-bottom: -4px; }

/* ---------- اسکلت بارگذاری و حالت خالی ---------- */
.skeleton-wrap { display: flex; flex-direction: column; gap: 14px; }
.skeleton { height: 92px; border-radius: var(--radius-lg); background: linear-gradient(90deg, var(--card-bg) 0%, var(--card-bg-soft) 50%, var(--card-bg) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
.skeleton:first-child { height: 54px; width: 40%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty-state { padding: 48px 20px; }
.es-art { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 26px; background: var(--accent-soft); position: relative; transform: rotate(-8deg); }
.es-art::after { content: ""; position: absolute; inset: 18px; border-radius: 12px; border: 3px solid var(--accent); opacity: .7; }
.fatal { min-height: 100vh; display: grid; place-content: center; text-align: center; gap: 12px; }

/* ---------- آواتار ---------- */
.avatar.xs { width: 24px; height: 24px; font-size: 9.5px; }
.avatar-row { display: flex; flex-wrap: wrap; gap: 8px; }
.av-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--card-bg-soft); border-radius: 99px; padding: 4px 4px 4px 12px; font-size: 12px; }

/* ---------- پیل‌ها ---------- */
.pill.xs { font-size: 10px; padding: 3px 9px; }
.pill.proj { background: color-mix(in srgb, var(--pc) 16%, transparent); color: var(--pc); }
body.light .pill.proj { background: color-mix(in srgb, var(--pc) 14%, white); color: color-mix(in srgb, var(--pc) 70%, black); }
.proj-dot { display: inline-block; width: 8px; height: 8px; border-radius: 99px; margin-left: 4px; vertical-align: middle; }
.status-inline { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.status-inline.on { background: rgba(109,212,138,.15); color: var(--green); }
.status-inline.warn { background: rgba(245,196,94,.15); color: var(--amber); }
.status-inline.off { background: var(--card-bg-soft); color: var(--text-muted); }
.notice.err { background: rgba(255,122,122,.1); border-color: rgba(255,122,122,.35); color: var(--red); }

/* ---------- تب‌ها، چیپ‌ها و فیلتر ---------- */
.seg-tabs { display: flex; gap: 5px; background: var(--card-bg-soft); border-radius: 99px; padding: 5px; width: fit-content; margin-bottom: 18px; max-width: 100%; }
.seg-tabs.compact { margin-bottom: 0; }
.seg-tabs.scroll { overflow-x: auto; scrollbar-width: none; }
.seg-tabs.scroll::-webkit-scrollbar { display: none; }
.seg { padding: 9px 18px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.seg svg { width: 14px; height: 14px; fill: currentColor; }
.seg.active { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.chip-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-tab { padding: 8px 15px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--card-bg-soft); color: var(--text-secondary); transition: background .15s, color .15s; }
.chip-tab:hover { color: var(--text-primary); }
.chip-tab.on { background: var(--accent); color: var(--on-accent); }
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--radius-lg); margin-bottom: 16px; }
.search-field { display: flex; align-items: center; gap: 8px; background: var(--card-bg-soft); border-radius: 99px; padding: 0 15px; min-width: 180px; }
.search-field.grow { flex: 1; }
.search-field svg { width: 15px; height: 15px; fill: var(--text-muted); flex-shrink: 0; }
.search-field input { background: none !important; border: 0 !important; padding: 10px 0 !important; flex: 1; font-size: 12.5px; outline: none; color: var(--text-primary); }

/* ---------- تاریخ‌انتخاب‌گر شمسی ---------- */
.jdate-btn { text-align: right; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.jdate-btn::before { content: "📅"; font-size: 13px; opacity: .7; }
.jdate-btn.mini { border-radius: 99px; padding: 9px 14px; width: auto; }
.jd-ph { color: var(--text-muted); }
.mini-date .jdate-btn { border-radius: 99px; padding: 9px 14px; font-size: 12.5px; }
.jpicker { position: fixed; z-index: 400; width: 290px; border-radius: var(--radius-lg); padding: 14px; animation: popIn .2s cubic-bezier(.34,1.3,.5,1); background: var(--glass-bg-strong); }
.jp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.jp-head b { font-size: 14px; }
.jp-head button { width: 32px; height: 32px; border-radius: 99px; background: var(--card-bg-soft); font-size: 18px; line-height: 1; }
.jp-head button:hover { background: var(--accent); color: var(--on-accent); }
.jp-week, .jp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.jp-week span { font-size: 11px; color: var(--text-muted); padding: 4px 0; font-weight: 700; }
.jp-grid button { height: 34px; border-radius: 10px; font-size: 12.5px; }
.jp-grid button:hover { background: var(--card-bg-soft); }
.jp-grid button.today { box-shadow: inset 0 0 0 1.5px var(--accent-line); color: var(--accent); font-weight: 700; }
.jp-grid button.sel { background: var(--accent); color: var(--on-accent); font-weight: 800; }
.jp-time { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.jp-time label { font-size: 12px; color: var(--text-muted); }
.jp-time input { flex: 1; direction: ltr; background: var(--card-bg-soft); border: 0; border-radius: 10px; padding: 8px 10px; color: var(--text-primary); }
.jp-foot { display: flex; justify-content: space-between; margin-top: 10px; }
.jp-foot button { font-size: 12px; font-weight: 700; color: var(--accent); padding: 6px 8px; }

/* ---------- جستجوی سراسری ---------- */
.search-pop { flex-direction: column; align-items: stretch; border-radius: var(--radius-lg); padding: 10px; width: min(560px, calc(100vw - 24px)); gap: 0; left: 50%; transform: translateX(-50%); }
.sp-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px 10px; border-bottom: 1px solid var(--hairline); }
.sp-results { max-height: 60vh; overflow-y: auto; padding-top: 6px; }
.sp-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; }
.sp-item:hover, .sp-item.on { background: var(--card-bg-soft); }
.sp-type { font-size: 10px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.sp-type.t-ticket { background: rgba(111,176,255,.15); color: var(--blue); }
.sp-type.t-member { background: rgba(167,139,250,.16); color: #A78BFA; }
.sp-type.t-contact { background: rgba(245,196,94,.15); color: var(--amber); }
.sp-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.sp-sub { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }
.sp-hint { font-size: 12px; color: var(--text-muted); padding: 14px; text-align: center; }

/* ---------- داشبورد ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi { background: var(--card-bg); border-radius: var(--radius-lg); padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-sm); transition: transform .14s, box-shadow .14s; position: relative; overflow: hidden; }
.kpi:hover { transform: translateY(-3px); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow); }
.kpi span { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.kpi b { font-size: 32px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
.kpi i { font-style: normal; font-size: 11px; color: var(--text-muted); }
.kpi::after { content: ""; position: absolute; inset: auto -20px -30px auto; width: 90px; height: 90px; border-radius: 99px; background: var(--accent-soft); opacity: 0; transition: opacity .2s; }
.kpi.hot { background: var(--accent); color: var(--on-accent); }
.kpi.hot span, .kpi.hot i { color: color-mix(in srgb, var(--on-accent) 65%, transparent); }
.kpi.warn b { color: var(--amber); }
.kpi.bad b { color: var(--red); }
.kpi:hover::after { opacity: 1; }
.date-chip { width: 44px; flex-shrink: 0; text-align: center; background: var(--card-bg-soft); border-radius: 12px; padding: 5px 0; line-height: 1.2; }
.date-chip b { display: block; font-size: 16px; }
.date-chip small { font-size: 9.5px; color: var(--text-muted); }
.warn-panel { box-shadow: inset 0 0 0 1px rgba(255,122,122,.25), var(--shadow-sm) !important; }
.notif-dot { width: 9px; height: 9px; border-radius: 99px; background: var(--card-bg-soft); flex-shrink: 0; }
.notif-dot.new { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
a.row-item { color: inherit; }
.row-item[data-task] { cursor: pointer; }

/* ---------- کارت تسک ---------- */
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.task-card { position: relative; cursor: pointer; }
.task-card.overdue { box-shadow: inset 0 0 0 1px rgba(255,122,122,.35), var(--shadow-sm) !important; }
.task-card.my-turn { box-shadow: inset 0 0 0 1.5px var(--accent-line), var(--shadow-sm) !important; }
.turn-flag { position: absolute; top: -9px; left: 16px; background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 800; padding: 3px 10px; border-radius: 99px; }
.tc-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tc-who { display: inline-flex; align-items: center; gap: 6px; }
.tc-meta { display: inline-flex; gap: 10px; }
.stage-chips { display: inline-flex; gap: 3px; }
.stage-chips .sc { width: 22px; height: 22px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; background: var(--accent-soft); }
.stage-chips .sc.off { opacity: .28; filter: grayscale(1); background: var(--card-bg-soft); }
.stage-chips.sm .sc { width: 18px; height: 18px; font-size: 9px; border-radius: 6px; }

/* ---------- پنل تسک ---------- */
.task-modal .detail-head { align-items: flex-start; }
.dh-main { min-width: 0; }
.dh-kicker { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.dh-main h3 { font-size: 21px; line-height: 1.5; }
.dh-tools { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.action-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px; border-radius: var(--radius); background: var(--accent-soft); margin-bottom: 20px; }
.ab-label { font-size: 12px; font-weight: 800; color: var(--accent); margin-left: 4px; }
.action-bar .btn small { opacity: .7; font-weight: 500; }
.action-none { margin-bottom: 18px; }
.db-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.db-head .detail-label { margin-bottom: 0; }
.pipe-step.skip { opacity: .38; text-decoration: line-through; text-decoration-color: var(--text-muted); }
.scenario-box { background: var(--card-bg-soft); border-radius: var(--radius); padding: 14px 16px; max-height: 320px; overflow-y: auto; }
.detail-grid b.late { color: var(--red); }
.fl-thumb { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.fl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fl-body .fl-meta { font-size: 10.5px; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius); cursor: pointer; text-align: center; transition: border-color .15s, background .15s; margin-top: 8px; }
.dropzone.over, .dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.upq { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.upq-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.upq-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.upq-bar { width: 120px; height: 6px; background: var(--card-bg); border-radius: 99px; overflow: hidden; flex-shrink: 0; display: block; }
.upq-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .2s; }
.upq-row.done .upq-pct { color: var(--green); }
.upq-row.fail .upq-pct { color: var(--red); }
.caption-block textarea { font-size: 13px; line-height: 2; }
.cap-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
details.history summary { cursor: pointer; list-style: none; }
details.history summary::-webkit-details-marker { display: none; }
details.history summary::after { content: " ▾"; }
.hist-dot.minor { background: var(--text-muted); opacity: .5; }
.danger-zone { border-top: 1px solid var(--hairline); padding-top: 14px; margin-top: 8px; display: flex; justify-content: flex-end; }
.member-pick { max-height: 46vh; }

/* ---------- مراحل ---------- */
.stage-toggle-list { display: flex; flex-direction: column; gap: 8px; }
.stage-toggle { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card-bg-soft); border-radius: var(--radius); cursor: pointer; }
.stage-toggle input { display: none; }
.stage-toggle .st-ic { font-size: 18px; }
.stage-toggle span:nth-child(3) { flex: 1; font-weight: 600; }
.stage-toggle .sw { width: 38px; height: 22px; border-radius: 99px; background: var(--card-bg); position: relative; transition: background .2s; flex-shrink: 0; }
.stage-toggle .sw::after { content: ""; position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; border-radius: 99px; background: var(--text-muted); transition: transform .2s, background .2s; }
.stage-toggle input:checked ~ .sw { background: var(--accent); }
.stage-toggle input:checked ~ .sw::after { transform: translateX(-16px); background: var(--on-accent); }
.stage-toggle:has(input:not(:checked)) { opacity: .6; }
.stage-picker { background: var(--card-bg-soft); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px; }
.sp-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sp-head b { font-size: 13px; }
.stage-toggle-list.inline { flex-direction: row; flex-wrap: wrap; }
.stage-pill { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 99px; background: var(--card-bg); font-size: 12.5px; font-weight: 600; color: var(--text-muted); border: 1.5px dashed var(--border-strong); transition: all .16s; }
.stage-pill span { filter: grayscale(1); opacity: .6; transition: inherit; }
.stage-pill.on { background: var(--accent); color: var(--on-accent); border: 1.5px solid transparent; }
.stage-pill.on span { filter: none; opacity: 1; }
.stage-pill:hover { transform: translateY(-1px); }
.type-row { display: flex; flex-wrap: wrap; gap: 7px; margin: -4px 0 14px; }
.type-btn { padding: 8px 16px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--card-bg-soft); color: var(--text-secondary); }
.type-btn.on { background: var(--text-primary); color: var(--bg-page); }
.ai-box summary { cursor: pointer; font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.stage-matrix th, .stage-matrix td { text-align: center; }
.stage-matrix th small { font-weight: 500; color: var(--text-muted); }
.mini-switch { display: inline-block; position: relative; width: 38px; height: 22px; cursor: pointer; }
.mini-switch input { display: none; }
.mini-switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--card-bg-soft); transition: background .2s; }
.mini-switch i::after { content: ""; position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; border-radius: 99px; background: var(--text-muted); transition: transform .2s; }
.mini-switch input:checked + i { background: var(--accent); }
.mini-switch input:checked + i::after { transform: translateX(-16px); background: var(--on-accent); }
.table-wrap.flat { box-shadow: none !important; background: transparent !important; padding: 0; }

/* ---------- برد مراحل (کشیدن و رها کردن) ---------- */
.board-hint { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.board-hint svg { width: 16px; height: 16px; fill: var(--accent); }
.sboard { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 14px; scroll-snap-type: x proximity; min-height: 420px; }
.sb-col { flex: 0 0 250px; display: flex; flex-direction: column; scroll-snap-align: start; }
.sb-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 10px; }
.sb-head h3 { font-size: 12.5px; font-weight: 700; color: var(--text-secondary); }
.sb-head span { font-size: 11px; background: var(--card-bg-soft); border-radius: 99px; padding: 2px 9px; color: var(--text-muted); }
.sb-list { flex: 1; background: var(--card-bg-soft); border-radius: var(--radius-lg); padding: 9px; display: flex; flex-direction: column; gap: 9px; min-height: 160px; border: 2px dashed transparent; transition: border-color .15s, background .15s; }
.sb-list.over { border-color: var(--accent); background: var(--accent-soft); }
.sb-card { position: relative; background: var(--card-bg); border-radius: var(--radius); padding: 12px 13px 10px; box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-sm); cursor: pointer; transition: transform .12s, box-shadow .12s; touch-action: pan-y; user-select: none; }
.sboard.movable .sb-card { cursor: grab; }
.sb-card:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow); }
.sb-card.amber { border-right: 3px solid var(--amber); }
.sb-card.green { border-right: 3px solid var(--green); }
.sb-card.red, .sb-card.overdue { border-right: 3px solid var(--red); }
.sb-proj { position: absolute; top: 12px; left: 12px; width: 8px; height: 8px; border-radius: 99px; }
.sb-title { font-size: 13px; font-weight: 700; line-height: 1.6; margin-left: 14px; }
.sb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 8px 0; }
.sb-due { font-size: 10.5px; color: var(--text-muted); }
.sb-foot { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-secondary); padding-top: 8px; border-top: 1px solid var(--hairline); }
.sb-foot > span:not(.avatar):not(.stage-chips) { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sb-foot .stage-chips { margin-right: auto; }
.sb-empty { font-size: 11.5px; color: var(--text-muted); text-align: center; padding: 26px 8px; }
.sb-dragging { opacity: .35; }
.sb-armed { box-shadow: 0 0 0 2px var(--accent) !important; }
.sb-ghost { position: fixed; top: 0; left: 0; z-index: 500; pointer-events: none; box-shadow: var(--shadow-lg) !important; opacity: .95; }
body.dragging-card, body.dragging-card * { cursor: grabbing !important; user-select: none; }

/* ---------- پروژه‌ها ---------- */
.progress-bar.slim { height: 5px; margin: -8px 0 18px; }
.sprint-box.done { opacity: .7; }
.bl-row .stage-chips { flex-shrink: 0; }

/* ---------- تقویم ---------- */
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-title { min-width: 120px; text-align: center; font-size: 15px; }
.cal-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.cal-add { width: 22px; height: 22px; border-radius: 99px; background: var(--card-bg-soft); color: var(--text-muted); font-size: 15px; line-height: 1; opacity: 0; transition: opacity .15s; }
.cal-cell:hover .cal-add { opacity: 1; }
.cal-add:hover { background: var(--accent); color: var(--on-accent); }
.cal-cell.past:not(.today) .cal-day-num { opacity: .5; }
.cal-cell.friday .cal-day-num { color: var(--red); }
.cal-cell.over { box-shadow: inset 0 0 0 2px var(--accent) !important; }
.cal-chip { display: flex; align-items: center; gap: 5px; width: 100%; text-align: right; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: grab; }
.cal-chip i { width: 6px; height: 6px; border-radius: 99px; flex-shrink: 0; }
.cal-chip.dragging { opacity: .4; }
.cal-more { font-size: 10.5px; color: var(--accent); font-weight: 700; padding: 2px 4px; }
@media (hover: none) { .cal-add { opacity: 1; } }

/* ---------- جدول‌های واکنش‌گرا ---------- */
.data-table tr[data-id], .data-table tr[data-msg] { cursor: pointer; }
.data-table tr.attn td:first-child { box-shadow: inset -3px 0 0 var(--accent); }
.data-table tr.inactive { opacity: .55; }
.data-table .strong { font-weight: 700; }
.data-table th.chk, .data-table td.chk { width: 36px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 760px) {
  .data-table.responsive thead { display: none; }
  .data-table.responsive, .data-table.responsive tbody, .data-table.responsive tr, .data-table.responsive td { display: block; width: 100%; }
  .data-table.responsive tr { padding: 12px 14px; border-bottom: 1px solid var(--hairline); }
  .data-table.responsive td { padding: 4px 0 !important; border: 0 !important; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; }
  .data-table.responsive td[data-l]::before { content: attr(data-l); font-size: 11px; color: var(--text-muted); font-weight: 600; flex-shrink: 0; }
  .data-table.responsive td.row-tools { justify-content: flex-start; padding-top: 8px !important; flex-wrap: wrap; }
  .data-table.responsive td.chk { width: auto; }
}

/* ---------- گفتگو ---------- */
.chat-search { display: flex; align-items: center; gap: 8px; margin: 12px 12px 0; background: var(--card-bg-soft); border-radius: 99px; padding: 0 14px; }
.chat-search svg { width: 14px; height: 14px; fill: var(--text-muted); }
.chat-search input { flex: 1; background: none !important; border: 0 !important; padding: 9px 0 !important; font-size: 12.5px; outline: none; color: var(--text-primary); }
.conv-item { width: 100%; text-align: right; color: inherit; }
.conv-item.has-unread .conv-name { font-weight: 800; }
.conv-item.has-unread .conv-last { color: var(--text-secondary); }
.chat-body { gap: 4px; position: relative; }
.chat-body.over { box-shadow: inset 0 0 0 2px var(--accent); }
.msg { margin-top: 8px; }
.msg.grouped { margin-top: 0; }
.msg-col { display: flex; flex-direction: column; min-width: 0; }
.msg.me .msg-col { align-items: flex-start; }
.msg.them .msg-col { align-items: flex-end; }
.avatar-spacer { width: 34px; flex-shrink: 0; }
.bubble { white-space: pre-wrap; }
.bubble a { text-decoration: underline; }
.bubble.deleted { font-style: italic; opacity: .6; background: transparent !important; box-shadow: inset 0 0 0 1px var(--hairline); color: var(--text-muted) !important; }
.img-bubble img { max-width: min(320px, 60vw); max-height: 320px; border-radius: var(--radius); display: block; margin-bottom: 4px; }
.vid-bubble { max-width: min(360px, 64vw); border-radius: var(--radius); margin-bottom: 4px; background: #000; }
a.file-bubble { color: inherit; margin-bottom: 4px; }
a.file-bubble:hover { box-shadow: inset 0 0 0 1px var(--accent-line); }
.msg-time { display: flex; align-items: center; gap: 6px; }
.msg-time em { font-style: normal; color: var(--amber); }
.tick { font-style: normal; font-size: 10px; letter-spacing: -2px; }
.tick.seen { color: var(--blue); }
.msg.me .tick.seen { color: var(--on-accent); opacity: .8; }
.msg-del { font-size: 10px; color: var(--text-muted); opacity: 0; transition: opacity .15s; }
.msg:hover .msg-del { opacity: 1; }
.msg-del:hover { color: var(--red); }
.chat-empty { margin: auto; text-align: center; color: var(--text-muted); font-size: 13px; padding: 30px; }
.upload-bubble { align-self: flex-start; display: flex; align-items: center; gap: 10px; background: var(--card-bg-soft); padding: 10px 14px; border-radius: var(--radius); font-size: 12px; }
.day-sep { margin: 10px 0 4px; }
.chat-input { align-items: flex-end; }
.chat-input textarea { flex: 1; resize: none; border-radius: 22px; padding: 12px 18px; max-height: 140px; line-height: 1.7; }
.chat-input.impersonating textarea { border-color: var(--amber); }
label.btn-attach { cursor: pointer; }
@media (max-width: 860px) { .chat-wrap { height: calc(100vh - 150px); } }

/* ---------- اعضا ---------- */
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 58vh; overflow-y: auto; }
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--card-bg-soft); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 12.5px; }
.pick-row.disabled { opacity: .45; }
.pick-row.strong { font-weight: 700; }
@media (max-width: 700px) { .perm-grid { grid-template-columns: 1fr; } }

/* ---------- مالی ---------- */
.stats-grid.three { grid-template-columns: repeat(3, 1fr); }
.stat-card.warn .stat-value { color: var(--amber); }
.stat-value.money { font-size: 22px; line-height: 1.5; }
.stat-value.money small { font-size: 12px; font-weight: 600; opacity: .65; }
.dispute { background: rgba(245,196,94,.08); border-radius: var(--radius); padding: 14px 16px; }
.legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--text-muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.lg.a, .b2.a { background: var(--accent); }
.lg.b, .b2.b { background: var(--text-muted); opacity: .6; }
.bars2 { display: flex; align-items: flex-end; gap: 14px; height: 190px; padding-top: 10px; }
.b2-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; }
.b2-pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 5px; }
.b2 { width: min(26px, 38%); border-radius: 8px 8px 3px 3px; min-height: 3px; transition: height .5s cubic-bezier(.22,1,.36,1); }
.b2-label { font-size: 11px; color: var(--text-muted); }

/* ---------- گزارش، لاگ، اعلان ---------- */
.slim-panel { padding: 16px 20px; }
.slim-panel .panel-head { margin-bottom: 10px; }
.slim-panel h2 { font-size: 13.5px; }
.log-day { font-size: 11px; font-weight: 800; color: var(--text-muted); padding: 14px 0 4px; letter-spacing: .02em; }
.log-day:first-child { padding-top: 0; }
.hist-line[data-task] { cursor: pointer; border-radius: 10px; }
.hist-line[data-task]:hover { background: var(--card-bg-soft); }
.row-item.notif.unread .row-name { font-weight: 800; }
.pw-meter { height: 5px; background: var(--card-bg-soft); border-radius: 99px; overflow: hidden; margin-bottom: 8px; }
.pw-meter i { display: block; height: 100%; width: 0; transition: width .25s, background .25s; }

/* ---------- ورود ---------- */
body.login-page { background: radial-gradient(1200px 600px at 80% -10%, var(--accent-soft), transparent 60%), var(--bg-page); }
.login-card { animation: modalIn .4s cubic-bezier(.22,1,.36,1); }
.login-card .field input { width: 100%; }
.login-foot { text-align: center; font-size: 11px; color: var(--text-muted); margin-top: 16px; }
.otp-input { text-align: center; font-size: 26px !important; letter-spacing: .5em; font-weight: 800; padding: 12px !important; }

/* ---------- پنل پیامک ---------- */
.sms-hero { display: grid; grid-template-columns: 320px 1fr; gap: 16px; margin-bottom: 16px; }
.credit-card { position: relative; overflow: hidden; border-radius: var(--radius-xl); padding: 22px 24px; color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 60%, #000) 100%);
  box-shadow: 0 18px 40px -16px color-mix(in srgb, var(--accent) 60%, transparent); display: flex; flex-direction: column; gap: 4px; }
.credit-card::before { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 99px; left: -60px; top: -90px; background: rgba(255,255,255,.14); }
.credit-card::after { content: ""; position: absolute; width: 150px; height: 150px; border-radius: 99px; left: 40px; bottom: -90px; background: rgba(255,255,255,.08); }
.credit-card > * { position: relative; z-index: 1; }
.credit-card.err { background: linear-gradient(135deg, #3a2a2a, #1e1515); color: #fff; }
.cc-top { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; opacity: .8; }
.cc-refresh { width: 30px; height: 30px; border-radius: 99px; background: rgba(0,0,0,.1); color: inherit; font-size: 15px; }
.cc-refresh:hover { background: rgba(0,0,0,.18); }
.cc-value { font-size: 36px; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.cc-sub { font-size: 11.5px; opacity: .72; min-height: 18px; }
.cc-line { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(0,0,0,.12); font-size: 12px; }
.sms-stats { margin-bottom: 0; }
.sms-stats .stat-card { gap: 4px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.quick { text-align: right; background: var(--card-bg); border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 22px; box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-sm); transition: transform .14s; }
.quick:hover { transform: translateY(-3px); }
.quick b { font-size: 13.5px; margin-top: 6px; }
.quick span { font-size: 11.5px; color: var(--text-muted); }
.compose { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.compose-side { position: sticky; top: 94px; display: flex; flex-direction: column; gap: 14px; }
.rc-count { font-size: 12px; font-weight: 800; color: var(--accent); background: var(--accent-soft); padding: 4px 12px; border-radius: 99px; }
.r-pane { margin-top: 14px; }
.group-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.group-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 99px; background: var(--card-bg-soft); cursor: pointer; font-size: 12.5px; }
.group-chip input { accent-color: var(--accent); }
.group-chip small { color: var(--text-muted); }
.group-chip:has(input:checked) { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.sms-text { font-size: 14px; line-height: 2; min-height: 150px; }
.var-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.var-chip { font-size: 11px; font-weight: 700; padding: 5px 11px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.var-chip:hover { background: var(--accent); color: var(--on-accent); }
.var-chip.static { cursor: default; direction: ltr; }
.counter-row { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-muted); margin: 8px 0 12px; font-weight: 600; }
.phone-mock { background: #0b0c0e; border-radius: 34px; padding: 12px; box-shadow: var(--shadow-lg), inset 0 0 0 2px #222; position: relative; }
body.light .phone-mock { background: #1a1c20; }
.pm-notch { width: 90px; height: 20px; border-radius: 99px; background: #000; margin: 0 auto 8px; }
.pm-head { text-align: center; color: #bbb; font-size: 11.5px; padding-bottom: 10px; border-bottom: 1px solid #222; direction: ltr; }
.pm-body { min-height: 230px; max-height: 360px; overflow-y: auto; padding: 14px 6px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pm-bubble { background: #26282d; color: #eee; padding: 10px 14px; border-radius: 18px 18px 18px 4px; font-size: 12.5px; line-height: 1.9; white-space: pre-wrap; word-break: break-word; max-width: 92%; align-self: flex-end; }
.pm-time { font-size: 10px; color: #777; align-self: flex-end; }
.send-box { margin-bottom: 0; }
.send-box .kv-list { margin-bottom: 14px; }
.send-box .btn-block + .btn-block { margin-top: 8px; }
.sms-preview-box { background: var(--card-bg-soft); border-radius: var(--radius); padding: 14px 16px; white-space: pre-wrap; line-height: 2; margin-bottom: 14px; }
.recipient-list { max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; }
.rcp { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--hairline); font-size: 12.5px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; font-size: 12.5px; color: var(--text-muted); }
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; border-radius: 99px; background: var(--accent-soft); margin-bottom: 12px; font-size: 12.5px; }
.bulk-bar b { margin-left: auto; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tpl-card { background: var(--card-bg); border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; gap: 8px; box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-sm); }
.tpl-card.sample { box-shadow: inset 0 0 0 1.5px dashed var(--border-strong); background: transparent; border: 1.5px dashed var(--border-strong); }
.tpl-title { font-weight: 800; font-size: 14px; }
.tpl-body { font-size: 12.5px; color: var(--text-secondary); white-space: pre-wrap; line-height: 1.9; flex: 1; }
.tpl-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--hairline); }
.settings-cols { align-items: start; }
.steps-mini { font-size: 12px; color: var(--text-secondary); padding-right: 18px; margin-bottom: 16px; line-height: 2; }
details.adv { margin-top: 10px; }
details.adv summary, .event-item details summary { cursor: pointer; font-size: 12px; font-weight: 700; color: var(--accent); padding: 6px 0; }
.event-list { display: flex; flex-direction: column; gap: 8px; }
.event-item { background: var(--card-bg-soft); border-radius: var(--radius); padding: 4px 14px 8px; }
.event-item .switch-row { border: 0; padding: 8px 0 2px; }
.event-item textarea { margin-top: 6px; font-size: 12.5px; }

/* ---------- یادآوری‌ها ---------- */
.rem-card { display: flex; align-items: center; gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--hairline); }
.rem-card:last-child { border-bottom: 0; }
.rem-card.sent, .rem-card.cancelled { opacity: .6; }
.rem-card.due .rem-time { background: var(--accent); color: var(--on-accent); }
.rem-time { width: 72px; flex-shrink: 0; text-align: center; background: var(--card-bg-soft); border-radius: 16px; padding: 8px 4px; line-height: 1.4; }
.rem-time b { display: block; font-size: 12.5px; }
.rem-time span { font-size: 11px; opacity: .75; }
.rem-main { flex: 1; min-width: 0; }
.rem-title { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rem-body { font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; }
.rem-meta { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.rem-meta .avatar-row { gap: 0; }
.rem-meta .avatar-row .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--card-bg); }
details.panel > summary { list-style: none; cursor: pointer; margin-bottom: 0; }
details.panel[open] > summary { margin-bottom: 12px; }

/* ---------- آپلود سنتر ---------- */
.uc-sec + .uc-sec { margin-top: 26px; }
.section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.section-title h2 { font-size: 16px; font-weight: 800; }
.uc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.uc-grid.small { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.uc-card { background: var(--card-bg); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-sm); }
.uc-media { aspect-ratio: 16 / 10; background: var(--card-bg-soft); display: grid; place-items: center; overflow: hidden; }
.uc-grid.small .uc-media { aspect-ratio: 16 / 7; }
.uc-media img, .uc-media video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.uc-noimg { font-size: 22px; font-weight: 800; color: var(--text-muted); opacity: .5; }
.uc-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.uc-top { display: flex; flex-wrap: wrap; gap: 6px; }
.uc-title { font-size: 15px; font-weight: 800; cursor: pointer; }
.uc-title:hover { color: var(--accent); }
.uc-cap { background: var(--card-bg-soft); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.uc-cap p { font-size: 12px; color: var(--text-secondary); white-space: pre-wrap; max-height: 110px; overflow: hidden; line-height: 1.9; }
.uc-cap .btn { align-self: flex-start; }
.uc-files { display: flex; flex-wrap: wrap; gap: 6px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; padding: 6px 12px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.file-chip small { opacity: .7; }
.uc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--hairline); }

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 1150px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .compose { grid-template-columns: 1fr; }
  .compose-side { position: static; }
  .phone-mock { max-width: 320px; margin: 0 auto; width: 100%; }
}
@media (max-width: 980px) {
  .sms-hero { grid-template-columns: 1fr; }
  .dash-top { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .stats-grid.three { grid-template-columns: 1fr 1fr; }
  .kpi b { font-size: 26px; }
  .filter-bar { padding: 10px; }
  .search-field { min-width: 100%; }
  .input.mini, select.mini { flex: 1; min-width: 0; }
  .sb-col { flex-basis: 78vw; }
  .modal { max-height: 94vh; }
  .modal-back { padding: 10px; align-items: flex-end; }
  .dh-main h3 { font-size: 17px; }
  .action-bar .btn { flex: 1 1 auto; }
  .cal-cell { min-height: 74px; }
  .cal-chip { font-size: 0; padding: 3px; height: 8px; border-radius: 4px; }
  .cal-chip i { display: none; }
  .cal-grid .cal-dow { font-size: 10px; }
  .uc-grid, .uc-grid.small { grid-template-columns: 1fr; }
  .rem-card { flex-wrap: wrap; }
  .page-head h1 { font-size: 22px; }
  .sticky-actions { bottom: -22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.sboard { user-select: none; -webkit-user-select: none; }

/* ---------- اتصال‌ها / گوگل درایو ---------- */
.drive-hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.dh-logo { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; flex-shrink: 0;
  background: conic-gradient(from 200deg, #1FA463, #FFD04B, #4688F4, #1FA463); }
.dh-logo svg { width: 32px; height: 32px; fill: #fff; filter: drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
.dh-text { flex: 1; min-width: 220px; }
.dh-text h2 { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.dh-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.switch-row.compact { border: 0; padding: 0 8px; gap: 10px; }
.copy-row { display: flex; align-items: center; gap: 8px; background: var(--card-bg-soft); border-radius: var(--radius-sm); padding: 8px 10px 8px 12px; }
.copy-row code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 12px; color: var(--accent); }
.guide .steps { padding-right: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 12.5px; line-height: 1.9; color: var(--text-secondary); margin-bottom: 12px; }
.guide .steps b { color: var(--text-primary); }
.guide .steps a { color: var(--accent); }
.guide .steps code { display: block; margin-top: 4px; background: var(--card-bg-soft); border-radius: 8px; padding: 6px 10px; font-size: 11px; overflow-x: auto; white-space: nowrap; color: var(--text-primary); }
.store-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 99px; margin-left: 5px; vertical-align: middle; }
.store-tag svg { width: 10px; height: 10px; fill: currentColor; }
.store-tag.drive { background: rgba(70,136,244,.15); color: #6FA2FF; }
.store-tag.link { background: var(--accent-soft); color: var(--accent); }
.add-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 12px; }
.add-link svg { width: 14px; height: 14px; fill: currentColor; }
