/* فونت وزیر — کاملاً محلی؛ هیچ درخواستی به اینترنت ندارد */
@font-face{ font-family:'Vazir'; src:url('../fonts/Vazir-Regular.woff2') format('woff2'); font-weight:400; font-style:normal; font-display:swap; }
@font-face{ font-family:'Vazir'; src:url('../fonts/Vazir-Medium.woff2')  format('woff2'); font-weight:500; font-style:normal; font-display:swap; }
@font-face{ font-family:'Vazir'; src:url('../fonts/Vazir-Bold.woff2')    format('woff2'); font-weight:600 900; font-style:normal; font-display:swap; }

/* ============================================================
   فونت وزیرمتن — کاملاً محلی
   هیچ درخواستی به اینترنت زده نمی‌شود، پس برنامه روی سروری که
   به اینترنت وصل نیست هم دقیقاً همین‌طور نمایش داده می‌شود.
   مجوز فونت: SIL Open Font License — فایل assets/fonts/OFL-Vazirmatn.txt (وزیر هم با همین مجوز منتشر شده)
   ============================================================ */

/* نسخهٔ متغیر: یک فایل برای همهٔ وزن‌ها؛ مرورگرهای جدید این را می‌گیرند */

/* وزن‌های ثابت، برای مرورگرهایی که فونت متغیر را پشتیبانی نمی‌کنند */

/* ============================================================
   IRISA Project Manager
   استایل اصلی — منتقل‌شده از نسخه تک‌فایلی HTML
   ============================================================ */

:root{
  --bg: #0A0F1C; --bg-panel: #121A2C; --bg-panel-2: #17233A; --bg-panel-3: #1D2A45;
  --border: #232F4A; --border-soft: #1A2438;
  --text-primary: #EAEFFB; --text-secondary: #90A0C4; --text-muted: #59678C;
  --cyan: #2FE0D6; --cyan-dim: rgba(47,224,214,0.12);
  --green: #35D399; --green-dim: rgba(53,211,153,0.14);
  --amber: #FBBF3E; --amber-dim: rgba(251,191,62,0.14);
  --red: #FA6E6E; --red-dim: rgba(250,110,110,0.14);
  --font-display: 'Vazir', Tahoma, sans-serif;
  /* برای اعداد و کدها از همان وزیرمتن استفاده می‌شود تا هیچ فونت
     بیرونی لازم نباشد؛ فقط فاصلهٔ ارقام یکنواخت می‌شود */
  --font-mono: 'Vazir', Tahoma, monospace;
  --radius: 14px;
}
*{ box-sizing: border-box; margin:0; padding:0; }
html,body{ background: var(--bg); color: var(--text-primary); font-family: var(--font-display); min-height: 100vh; }
body{
  background-image:
    radial-gradient(circle at 85% -10%, rgba(47,224,214,0.07), transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(53,101,211,0.08), transparent 40%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 34px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 34px);
}
::selection{ background: var(--cyan-dim); color: var(--cyan); }
a{ color:inherit; text-decoration:none; }
.app{ display:grid; grid-template-columns: 264px 1fr; min-height:100vh; }

.sidebar{ border-left: 1px solid var(--border-soft); background: linear-gradient(180deg, rgba(18,26,44,0.6), rgba(10,15,28,0.4)); padding: 26px 20px; display:flex; flex-direction:column; gap: 28px; position:relative; z-index:40; }
.brand{ display:flex; align-items:center; gap:12px; padding: 0 4px; }
.brand-mark{ width:38px; height:38px; border-radius:10px; background: linear-gradient(145deg, var(--cyan), #1A9E97); display:flex; align-items:center; justify-content:center; box-shadow: 0 0 0 1px rgba(47,224,214,0.25), 0 6px 20px -6px rgba(47,224,214,0.5); flex-shrink:0; }
.brand-mark svg{ width:20px; height:20px; }
.brand-text{ line-height:1.5; }
.brand-text .name{ font-weight:800; font-size:15px; letter-spacing:0.2px; }
.brand-text .sub{ font-size:13px; color:var(--text-muted); font-family:var(--font-mono); }
.close-sidebar{ display:none; }

.nav-group{ margin-bottom:6px; border-radius:12px; transition: background .2s ease; }
.nav-group.open{ background: var(--bg-panel); }
.nav-group-btn{ width:100%; display:flex; align-items:center; gap:11px; padding:11px 12px; border:none; background:none; border-radius:12px; cursor:pointer; color:var(--text-secondary); font-family:var(--font-display); font-size:14.5px; font-weight:600; text-align:right; position:relative; transition: background .15s ease, color .15s ease; }
.nav-group-btn > svg:first-child{ width:19px; height:19px; flex-shrink:0; opacity:.85; }
.nav-group-btn:hover{ background: var(--bg-panel-2); color: var(--text-primary); }
.nav-group.open .nav-group-btn{ color: var(--text-primary); }
.nav-group-btn:focus-visible{ outline:2px solid var(--cyan); outline-offset:-2px; }
.nav-group-title{ flex:1; }
.nav-group-count{ min-width:22px; height:22px; padding:0 6px; border-radius:999px; background: var(--bg-panel-3); color: var(--text-muted); font-size:12px; font-weight:500; display:inline-flex; align-items:center; justify-content:center; }
.nav-chev{ width:16px; height:16px; flex-shrink:0; opacity:.7; transition: transform .25s ease; }
.nav-group.open .nav-chev{ transform: rotate(180deg); }
.nav-group.has-active > .nav-group-btn{ color: var(--text-primary); }
.nav-group.has-active > .nav-group-btn::before{ content:''; position:absolute; inset-inline-start:2px; top:50%; width:4px; height:18px; margin-top:-9px; border-radius:4px; background: var(--cyan); }
.nav-group.has-active:not(.open) .nav-group-count{ background: var(--cyan); color:#06101c; }
.nav-panel{ display:grid; grid-template-rows:0fr; transition: grid-template-rows .28s ease; }
.nav-panel > .nav{ overflow:hidden; min-height:0; padding:0 8px; opacity:0; transition: opacity .2s ease, padding .28s ease; }
.nav-group.open > .nav-panel{ grid-template-rows:1fr; }
.nav-group.open > .nav-panel > .nav{ opacity:1; padding:2px 8px 8px; }
@media (prefers-reduced-motion: reduce){ .nav-panel, .nav-panel > .nav, .nav-chev{ transition:none; } }
.nav{ display:flex; flex-direction:column; gap:3px; }
.nav-item{ display:flex; align-items:center; gap:11px; padding: 10px 12px; border-radius: 10px; font-size:14.5px; color: var(--text-secondary); cursor:pointer; transition: background .15s ease, color .15s ease; position:relative; border:none; background:none; width:100%; text-align:right; font-family:var(--font-display); }
.nav-item svg{ width:17px; height:17px; flex-shrink:0; opacity:.85; }
.nav-item.active{ background: var(--bg-panel-3); color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--border); }
.nav-item.active svg{ color: var(--cyan); opacity:1; }
.nav-item.disabled{ color: var(--text-muted); cursor:default; }
.nav-item:not(.disabled):hover{ background: var(--bg-panel-2); color: var(--text-primary); }
.nav-item .soon{ margin-inline-start:auto; font-family: var(--font-mono); font-size:11.5px; color: var(--text-muted); background: rgba(255,255,255,0.04); border: 1px solid var(--border-soft); padding: 2px 6px; border-radius: 999px; }

.sidebar-footer{ margin-top:auto; padding: 12px 12px; border-radius: 12px; background: var(--bg-panel); border: 1px solid var(--border-soft); font-size:13px; color: var(--text-muted); display:flex; align-items:center; gap:9px; }
.dot-pulse{ width:7px; height:7px; border-radius:50%; background: var(--green); box-shadow: 0 0 0 0 rgba(53,211,153,0.6); animation: pulse 2.2s infinite; flex-shrink:0; }
@keyframes pulse{ 0%{ box-shadow: 0 0 0 0 rgba(53,211,153,0.55); } 70%{ box-shadow: 0 0 0 7px rgba(53,211,153,0); } 100%{ box-shadow: 0 0 0 0 rgba(53,211,153,0); } }

.mobile-topbar{ display:none; }

.main{ padding: 26px 34px 50px; max-width: 1420px; }
.topbar{ display:flex; align-items:flex-start; justify-content:space-between; margin-bottom: 26px; flex-wrap:wrap; gap:16px; }
.topbar h1{ font-size:21px; font-weight: 800; letter-spacing: 0.2px; }
.topbar .desc{ font-size:14px; color: var(--text-secondary); margin-top: 5px; }
.status-chip{ display:flex; align-items:center; gap:8px; background: var(--bg-panel); border: 1px solid var(--border-soft); padding: 8px 14px; border-radius: 999px; font-family: var(--font-mono); font-size:13px; color: var(--text-secondary); }
.btn{ display:inline-flex; align-items:center; gap:8px; padding: 9px 16px; border-radius: 10px; font-family: var(--font-display); font-size:14px; font-weight:600; cursor:pointer; border:1px solid var(--border-soft); background: var(--bg-panel-2); color: var(--text-primary); transition: all .15s ease; }
.btn:hover{ background: var(--bg-panel-3); }
.btn-primary{ background: linear-gradient(140deg, var(--cyan), #17A79E); color:#06231F; border:none; }
.btn-primary:hover{ filter: brightness(1.08); }
.btn-ghost{ background:transparent; }

.kpi-grid{ display:grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi-card{ background: linear-gradient(160deg, var(--bg-panel), var(--bg-panel-2)); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 18px 18px 16px; position:relative; overflow:hidden; transition: transform .18s ease, border-color .18s ease; }
.kpi-card:hover{ transform: translateY(-2px); border-color: var(--border); }
.kpi-card::before{ content:""; position:absolute; inset:0 auto auto 0; width:3px; height:100%; background: var(--accent, var(--cyan)); opacity:.75; }
.kpi-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.kpi-label{ font-size:13px; color: var(--text-secondary); }
.kpi-icon{ width:28px; height:28px; border-radius:8px; display:flex; align-items:center; justify-content:center; background: var(--accent-dim, var(--cyan-dim)); }
.kpi-icon svg{ width:15px; height:15px; color: var(--accent, var(--cyan)); }
.kpi-value{ font-family: var(--font-mono); font-size:30px; font-weight: 700; letter-spacing: -0.5px; line-height:1; }
.kpi-unit{ font-size:13px; color: var(--text-muted); margin-inline-start:5px; font-family: var(--font-display); }
.kpi-trend{ display:flex; align-items:center; gap:5px; margin-top:10px; font-family: var(--font-mono); font-size:12.5px; }
.kpi-trend.up{ color: var(--green); } .kpi-trend.down{ color: var(--red); } .kpi-trend.flat{ color: var(--text-muted); }
.kpi-trend span.note{ color: var(--text-muted); font-family: var(--font-display); }

.row{ display:grid; grid-template-columns: 1.35fr 1fr; gap:14px; margin-top:14px; }
.panel{ background: var(--bg-panel); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 20px 22px; }
.panel-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; flex-wrap:wrap; gap:10px; }
.panel-head h2{ font-size:15.5px; font-weight:700; }
.panel-head .meta{ font-size:12.5px; color:var(--text-muted); font-family:var(--font-mono); }

.health-bar{ display:flex; height: 14px; border-radius: 999px; overflow:hidden; background: var(--bg-panel-3); box-shadow: inset 0 0 0 1px var(--border-soft); margin-bottom: 16px; }
.health-seg{ height:100%; transition: width .3s ease; }
.health-seg.ontrack{ background: linear-gradient(90deg, #22B37E, var(--green)); animation: glow 2.6s ease-in-out infinite; }
.health-seg.atrisk{ background: linear-gradient(90deg, #D9A02E, var(--amber)); }
.health-seg.delayed{ background: linear-gradient(90deg, #E24D4D, var(--red)); }
@keyframes glow{ 0%,100%{ filter: brightness(1); } 50%{ filter: brightness(1.18); } }
@media (prefers-reduced-motion: reduce){ .health-seg.ontrack{ animation:none; } .dot-pulse{ animation:none; } }
.health-legend{ display:flex; gap:22px; flex-wrap:wrap; }
.legend-item{ display:flex; align-items:center; gap:8px; font-size:14px; color: var(--text-secondary); }
.legend-dot{ width:9px; height:9px; border-radius:3px; flex-shrink:0; }
.legend-item b{ font-family: var(--font-mono); color: var(--text-primary); font-weight:600; }

.risk-list{ display:flex; flex-direction:column; gap:10px; }
.risk-row{ display:flex; align-items:center; justify-content:space-between; padding: 11px 13px; background: var(--bg-panel-2); border: 1px solid var(--border-soft); border-radius: 10px; }
.risk-info{ display:flex; flex-direction:column; gap:3px; }
.risk-name{ font-size:14px; font-weight:600; }
.risk-group{ font-size:12.5px; color: var(--text-muted); }
.risk-tag{ font-family: var(--font-mono); font-size:12px; padding: 4px 9px; border-radius: 999px; white-space:nowrap; flex-shrink:0; margin-inline-start:10px; }
.risk-tag.amber{ background: var(--amber-dim); color: var(--amber); }
.risk-tag.red{ background: var(--red-dim); color: var(--red); }
.empty-note{ font-size:14px; color: var(--text-muted); padding: 14px 4px; text-align:center; }

.form-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap:14px; margin-bottom:16px; }
.field{ display:flex; flex-direction:column; gap:6px; }
.field label{ font-size:12.5px; color: var(--text-muted); font-family: var(--font-mono); }
.field input, .field select{ background: var(--bg-panel-3); border: 1px solid var(--border-soft); border-radius: 8px; padding: 10px 11px; color: var(--text-primary); font-family: var(--font-mono); font-size:14px; outline:none; width:100%; }
.field input[type=text]{ font-family: var(--font-display); }
.field input:focus, .field select:focus{ border-color: var(--cyan); }
.form-actions{ display:flex; gap:10px; align-items:center; }
.date-select-group{ display:flex; gap:6px; }
.date-select-group select{ font-family: var(--font-display); font-size:13px; padding:10px 6px; }

.member-checklist{ display:flex; flex-direction:column; gap:6px; max-height:180px; overflow-y:auto; background: var(--bg-panel-3); border: 1px solid var(--border-soft); border-radius: 8px; padding: 10px; }
.member-check-row{ display:flex; align-items:center; gap:8px; font-size:14px; padding:5px 4px; border-radius:6px; }
.member-check-row:hover{ background: var(--bg-panel-2); }
.member-check-row input{ width:auto; accent-color: var(--cyan); }
.member-check-row .team-tag{ font-size:12px; color: var(--text-muted); font-family: var(--font-mono); margin-inline-start:auto; }
.member-check-row.hidden{ display:none; }
.empty-note-sm{ font-size:13px; color: var(--text-muted); padding:6px 2px; }

.settings-grid{ display:grid; grid-template-columns: repeat(2,1fr); gap:14px; }

.table-wrap{ overflow-x:auto; border-radius: 12px; border: 1px solid var(--border-soft); }
table{ width:100%; border-collapse:collapse; min-width:920px; }
thead th{ text-align:right; font-size:12.5px; color:var(--text-muted); font-family:var(--font-mono); font-weight:600; padding:12px 14px; background: var(--bg-panel-2); border-bottom:1px solid var(--border-soft); white-space:nowrap; }
tbody td{ padding:12px 14px; font-size:14px; border-bottom:1px solid var(--border-soft); vertical-align:middle; }
tbody tr:last-child td{ border-bottom:none; }
tbody tr:hover{ background: var(--bg-panel-2); }
.cell-mono{ font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.progress-compare{ display:flex; flex-direction:column; gap:4px; min-width:120px; }
.progress-track{ height:6px; border-radius:999px; background: var(--bg-panel-3); position:relative; overflow:hidden; }
.progress-fill{ height:100%; border-radius:999px; }
.progress-labels{ display:flex; justify-content:space-between; font-family:var(--font-mono); font-size:12px; color:var(--text-muted); }
.status-badge{ font-family: var(--font-mono); font-size:12px; padding: 4px 10px; border-radius: 999px; white-space:nowrap; }
.status-badge.ontrack{ background: var(--green-dim); color: var(--green); }
.status-badge.atrisk{ background: var(--amber-dim); color: var(--amber); }
.status-badge.delayed{ background: var(--red-dim); color: var(--red); }
.status-badge.done{ background: var(--cyan-dim); color: var(--cyan); }
.row-actions{ display:flex; gap:6px; }
.icon-btn{ width:28px; height:28px; border-radius:7px; border:1px solid var(--border-soft); background: transparent; color: var(--text-muted); display:flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0; }
.icon-btn:hover{ color: var(--cyan); background: var(--cyan-dim); border-color: transparent; }
.icon-btn.danger:hover{ color: var(--red); background: var(--red-dim); }
.icon-btn svg{ width:13px; height:13px; }

.toast{ position:fixed; bottom:26px; left:50%; transform:translateX(-50%) translateY(20px); opacity:0; pointer-events:none; background: var(--bg-panel-3); border:1px solid var(--cyan); color: var(--text-primary); padding: 12px 22px; border-radius: 12px; font-size:14px; display:flex; align-items:center; gap:8px; transition: all .25s ease; z-index:100; box-shadow: 0 10px 30px -8px rgba(0,0,0,0.5); }
.toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }
.toast.error{ border-color: var(--red); }

.sidebar-overlay{ display:none; }
.section-gap{ margin-bottom:16px; }

/* ---------- افزوده‌های نسخه PHP ---------- */
.alert{ padding:12px 16px; border-radius:10px; font-size:14px; margin-bottom:16px; border:1px solid var(--border-soft); }
.alert.error{ background: var(--red-dim); border-color: rgba(250,110,110,0.35); color: var(--red); }
.alert.success{ background: var(--green-dim); border-color: rgba(53,211,153,0.35); color: var(--green); }
.alert ul{ margin-inline-start:18px; }
.inline-form{ display:inline; }
.hint{ font-size:12.5px; color:var(--text-muted); margin-top:6px; }

/* ---------- ورود، کاربران و دسترسی‌ها ---------- */
.login-body{ display:flex; align-items:center; justify-content:center; min-height:100vh; padding:24px; }
.login-wrap{ width:100%; max-width:410px; }
.login-card{ background: linear-gradient(160deg, var(--bg-panel), var(--bg-panel-2)); border:1px solid var(--border-soft); border-radius:18px; padding:32px 30px 26px; box-shadow: 0 24px 60px -20px rgba(0,0,0,0.6); }
.login-brand{ display:flex; align-items:center; gap:12px; margin-bottom:26px; }
.login-title{ font-size:19px; font-weight:800; margin-bottom:6px; }
.login-desc{ font-size:14px; color:var(--text-secondary); margin-bottom:22px; line-height:1.9; }
.login-foot{ display:flex; align-items:center; justify-content:center; gap:8px; margin-top:24px; padding-top:18px; border-top:1px solid var(--border-soft); font-family:var(--font-mono); font-size:12.5px; color:var(--text-muted); }

.sidebar-user{ margin-top:auto; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px; border-radius:12px; background:var(--bg-panel); border:1px solid var(--border-soft); }
.sidebar-user-info{ display:flex; align-items:center; gap:9px; min-width:0; }
.sidebar-user-name{ font-size:14px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sidebar-user-role{ font-size:12px; color:var(--text-muted); font-family:var(--font-mono); }

.perm-box{ background:var(--bg-panel-3); border:1px solid var(--border-soft); border-radius:12px; padding:16px 18px; margin-top:4px; }
.perm-head{ padding-bottom:14px; margin-bottom:14px; border-bottom:1px solid var(--border-soft); }
.perm-title{ font-size:14px; font-weight:700; margin-bottom:4px; }
.perm-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:4px; }
.perm-item{ background:var(--bg-panel-2); border:1px solid var(--border-soft); border-radius:8px; padding:9px 11px; }
.perm-grid.is-admin{ opacity:.45; pointer-events:none; }
@media (max-width: 780px){ .perm-grid{ grid-template-columns:1fr; } }

@media (max-width: 1100px){ .kpi-grid{ grid-template-columns: repeat(2, 1fr); } .row{ grid-template-columns: 1fr; } .form-grid{ grid-template-columns: repeat(2,1fr);} .settings-grid{ grid-template-columns:1fr; } }
@media (max-width: 780px){
  .app{ grid-template-columns: 1fr; }
  .sidebar{ position:fixed; inset:0 20% 0 auto; width:78%; max-width:300px; transform:translateX(105%); transition: transform .25s ease; box-shadow: -20px 0 50px rgba(0,0,0,0.5); }
  .sidebar.open{ transform:translateX(0); }
  .close-sidebar{ display:flex; margin-inline-start:auto; width:30px; height:30px; border-radius:8px; border:1px solid var(--border-soft); background:transparent; color:var(--text-muted); align-items:center; justify-content:center; cursor:pointer; }
  .sidebar-overlay{ display:none; position:fixed; inset:0; background:rgba(0,0,0,0.5); z-index:35; }
  .sidebar-overlay.open{ display:block; }
  .mobile-topbar{ display:flex; align-items:center; gap:12px; padding:16px; border-bottom:1px solid var(--border-soft); position:sticky; top:0; background:var(--bg); z-index:20; }
  .hamburger{ width:36px; height:36px; border-radius:9px; border:1px solid var(--border-soft); background:var(--bg-panel); color:var(--text-primary); display:flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0; }
  .mobile-topbar .name{ font-weight:800; font-size:15px; }
  .main{ padding: 18px 16px 40px; }
  .kpi-grid{ grid-template-columns: 1fr 1fr; }
  .form-grid{ grid-template-columns: 1fr; }
}
:focus-visible{ outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }

/* ============================================================
   افزوده‌های نسخهٔ کامل: گانت، بار کاری، لوگو، فیلترها
   ============================================================ */

/* ---------- عمومی ---------- */
.dim{ color: var(--text-muted); }
.tag-mini{ display:inline-block; font-family:var(--font-mono); font-size:11.5px; padding:2px 7px; border-radius:999px;
  background: rgba(255,255,255,0.05); border:1px solid var(--border-soft); color: var(--text-muted); margin-inline-start:6px; }
.filter-row{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.chip{ display:inline-flex; align-items:center; padding:7px 14px; border-radius:999px; font-size:13px;
  background: var(--bg-panel-2); border:1px solid var(--border-soft); color: var(--text-secondary); transition: all .15s ease; }
.chip:hover{ color: var(--text-primary); background: var(--bg-panel-3); }
.chip.active{ background: var(--cyan-dim); border-color: transparent; color: var(--cyan); }
.chip-divider{ width:1px; height:20px; background: var(--border); margin:0 4px; }

/* ---------- لوگو ---------- */
.logo-field{ display:flex; gap:16px; align-items:flex-start; flex-wrap:wrap; }
.logo-preview{ width:96px; height:96px; border-radius:12px; background: var(--bg-panel-3); border:1px solid var(--border-soft);
  display:flex; align-items:center; justify-content:center; overflow:hidden; flex-shrink:0; }
.logo-preview.big{ width:128px; height:128px; }
.logo-preview img{ max-width:100%; max-height:100%; object-fit:contain; }
.logo-empty{ font-size:12.5px; color: var(--text-muted); }
.logo-cell{ width:34px; height:34px; border-radius:8px; background: var(--bg-panel-3); border:1px solid var(--border-soft);
  display:flex; align-items:center; justify-content:center; overflow:hidden; flex-shrink:0; font-weight:700; font-size:14px; color: var(--text-secondary); }
.logo-cell.sm{ width:26px; height:26px; font-size:12.5px; border-radius:7px; }
.logo-cell img{ max-width:100%; max-height:100%; object-fit:contain; }
.customer-cell{ display:flex; align-items:center; gap:8px; }
.brand-mark.logo{ background: var(--bg-panel-3); padding:5px; }
.brand-mark.logo img{ max-width:100%; max-height:100%; object-fit:contain; }
input[type=file]{ font-family: var(--font-display); font-size:13px; color: var(--text-secondary);
  background: var(--bg-panel-3); border:1px solid var(--border-soft); border-radius:8px; padding:9px 11px; width:100%; }
.hours-input{ width:64px !important; margin-inline-start:auto; padding:4px 7px !important; font-size:12.5px !important;
  font-family: var(--font-mono) !important; background: var(--bg-panel) !important; }

/* ---------- نمودار گانت ---------- */
.gantt-legend{ display:flex; gap:16px; flex-wrap:wrap; font-size:12.5px; color: var(--text-muted); }
.gantt-legend span{ display:flex; align-items:center; gap:6px; }
.gantt-legend .sw{ width:14px; height:9px; border-radius:3px; display:inline-block; }
.gantt-legend .sw.plan{ background: var(--bg-panel-3); border:1px solid var(--border); }
.gantt-legend .sw.actual{ background: linear-gradient(90deg, #17A79E, var(--cyan)); }
.gantt-legend .sw.expected{ width:0; height:0; border-radius:0; border-left:5px solid transparent; border-right:5px solid transparent; border-top:7px solid var(--amber); }
.gantt-legend .sw.today{ width:2px; height:14px; background: var(--cyan); border-radius:0; }

.gantt-wrap{ overflow-x:auto; }
.gantt{ min-width:760px; }
.gantt-row{ display:grid; grid-template-columns: 260px 1fr; gap:12px; align-items:center;
  padding:9px 0; border-bottom:1px solid var(--border-soft); }
.gantt-row:last-child{ border-bottom:none; }
.gantt-row.gantt-head{ border-bottom:1px solid var(--border); padding-bottom:6px; margin-bottom:4px; }
.gantt-head .gantt-label{ font-size:12.5px; color: var(--text-muted); font-family: var(--font-mono); }
.gantt-label{ min-width:0; }
.gl-main{ display:flex; align-items:center; gap:7px; font-size:14px; }
.gl-code{ font-family: var(--font-mono); color: var(--text-secondary); font-size:12.5px; flex-shrink:0; }
.gl-name{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.gl-sub{ font-size:12px; color: var(--text-muted); margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.status-dot{ width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.status-dot.ontrack{ background: var(--green); } .status-dot.atrisk{ background: var(--amber); }
.status-dot.delayed{ background: var(--red); }   .status-dot.done{ background: var(--cyan); }
.phase-tick{ width:12px; height:1px; background: var(--text-muted); flex-shrink:0; margin-inline-start:6px; }

.gantt-track{ position:relative; height:26px; background: var(--bg-panel-2); border-radius:7px;
  box-shadow: inset 0 0 0 1px var(--border-soft); }
.gantt-row.phase .gantt-track{ height:19px; background: transparent; box-shadow:none; }
.gantt-row.phase .gl-name{ font-size:13px; color: var(--text-secondary); }
.gantt-axis{ height:22px; background:transparent; box-shadow:none; }
.axis-mark{ position:absolute; top:0; height:100%; }
.axis-mark i{ position:absolute; top:0; right:0; width:1px; height:100%; background: var(--border); }
.axis-mark b{ position:absolute; top:3px; right:5px; font-size:11.5px; color: var(--text-muted); font-weight:500; white-space:nowrap; }

.today-line{ position:absolute; top:-3px; bottom:-3px; width:2px; background: var(--cyan); opacity:.55; z-index:3; border-radius:2px; }
.bar{ position:absolute; top:3px; bottom:3px; border-radius:6px; background: var(--bg-panel-3);
  box-shadow: inset 0 0 0 1px var(--border); overflow:visible; min-width:6px; }
.bar.slim{ top:2px; bottom:2px; }
.bar.ontrack{ box-shadow: inset 0 0 0 1px rgba(53,211,153,0.4); }
.bar.atrisk{ box-shadow: inset 0 0 0 1px rgba(251,191,62,0.45); }
.bar.delayed{ box-shadow: inset 0 0 0 1px rgba(250,110,110,0.5); }
.bar.done{ box-shadow: inset 0 0 0 1px rgba(47,224,214,0.45); }
.bar-actual{ position:absolute; top:0; bottom:0; right:0; border-radius:6px;
  background: linear-gradient(90deg, #17A79E, var(--cyan)); opacity:.85; }
.bar-expected{ position:absolute; top:-4px; width:0; height:0; z-index:4;
  border-left:5px solid transparent; border-right:5px solid transparent; border-top:7px solid var(--amber);
  transform: translateX(50%); }
.bar-text{ position:absolute; inset-inline-end:7px; top:50%; transform:translateY(-50%);
  font-family: var(--font-mono); font-size:12px; color: var(--text-primary); z-index:5; text-shadow:0 1px 3px rgba(0,0,0,.6); }
.bar-missing{ position:absolute; inset-inline-start:10px; top:50%; transform:translateY(-50%);
  font-size:12px; color: var(--text-muted); }

/* ---------- بار کاری پرسنل ---------- */
.load-list{ display:flex; flex-direction:column; gap:8px; }
.load-row{ background: var(--bg-panel-2); border:1px solid var(--border-soft); border-radius:11px; padding:12px 14px; }
.load-row.open{ border-color: var(--border); }
.load-head{ display:grid; grid-template-columns: 210px 1fr 150px; gap:14px; align-items:center; }
.load-person{ min-width:0; }
.load-name{ font-size:14px; font-weight:600; display:block; }
.load-team{ font-size:12px; color: var(--text-muted); display:block; margin-top:3px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.load-bar-wrap{ min-width:0; }
.load-bar{ position:relative; display:flex; height:11px; border-radius:999px; overflow:hidden;
  background: var(--bg-panel-3); box-shadow: inset 0 0 0 1px var(--border-soft); }
.load-fill{ height:100%; transition: width .3s ease; }
.load-fill.ok{ background: linear-gradient(90deg, #22B37E, var(--green)); }
.load-fill.full{ background: linear-gradient(90deg, #D9A02E, var(--amber)); }
.load-fill.over{ background: linear-gradient(90deg, #E24D4D, var(--red)); }
.load-fill.idle{ background: var(--border); }
.load-over{ height:100%; background: repeating-linear-gradient(45deg, var(--red), var(--red) 4px, #8A2E2E 4px, #8A2E2E 8px); }
.load-numbers{ display:flex; justify-content:space-between; align-items:center; margin-top:6px; gap:10px; }
.load-pct{ font-family: var(--font-mono); font-size:13px; font-weight:600; }
.load-pct.ok{ color: var(--green); } .load-pct.full{ color: var(--amber); }
.load-pct.over{ color: var(--red); }  .load-pct.idle{ color: var(--text-muted); }
.load-hours{ font-size:12px; color: var(--text-muted); }
.load-side{ display:flex; align-items:center; justify-content:flex-end; gap:8px; }
.load-level{ font-family: var(--font-mono); font-size:12px; padding:4px 9px; border-radius:999px; white-space:nowrap; }
.load-level.ok{ background: var(--green-dim); color: var(--green); }
.load-level.full{ background: var(--amber-dim); color: var(--amber); }
.load-level.over{ background: var(--red-dim); color: var(--red); }
.load-level.idle{ background: rgba(255,255,255,0.04); color: var(--text-muted); }
.load-detail{ margin-top:12px; padding-top:12px; border-top:1px dashed var(--border); }
.load-detail table{ min-width:0; }
.load-detail thead th{ background:transparent; padding:6px 8px; }
.load-detail tbody td{ padding:7px 8px; font-size:13px; }

/* ---------- جمع‌بندی فازها ---------- */
.rollup-grid{ display:grid; grid-template-columns: repeat(4, 1fr); gap:12px; margin-bottom:12px; }
.rollup-item{ background: var(--bg-panel-2); border:1px solid var(--border-soft); border-radius:10px;
  padding:12px 14px; display:flex; flex-direction:column; gap:7px; }
.rl-label{ font-size:12.5px; color: var(--text-muted); }
.rl-value{ font-family: var(--font-mono); font-size:19px; font-weight:700; }
.rl-value.dim{ font-size:15px; color: var(--text-muted); }

/* ---------- کاربر در نوار کناری ---------- */
.sidebar-user{ margin-top:auto; padding:11px 12px; border-radius:12px; background: var(--bg-panel);
  border:1px solid var(--border-soft); display:flex; align-items:center; gap:9px; }
.sidebar-user-info{ display:flex; align-items:center; gap:9px; flex:1; min-width:0; }
.sidebar-user-name{ font-size:14px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sidebar-user-role{ font-size:12px; color: var(--text-muted); font-family: var(--font-mono); margin-top:2px; }

/* ---------- ریسپانسیو ---------- */
@media (max-width: 1100px){
  .rollup-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 780px){
  .gantt-row{ grid-template-columns: 150px 1fr; gap:8px; }
  .gantt{ min-width:620px; }
  .load-head{ grid-template-columns: 1fr; gap:10px; }
  .load-side{ justify-content:flex-start; }
  .rollup-grid{ grid-template-columns: 1fr; }
  .logo-preview{ width:76px; height:76px; }
}

/* ---------- نمودار روند پیشرفت (منحنی S) ---------- */
.chart-wrap{ width:100%; overflow:hidden; }
.scurve{ width:100%; height:340px; display:block; }
.scurve .grid-line{ stroke: var(--border-soft); stroke-width:1; }
.scurve .axis-text{ fill: var(--text-muted); font-size:12.5px; font-family: var(--font-mono); }
.scurve .date-text{ font-size:12px; }
.scurve .deadline-line{ stroke: var(--amber); stroke-width:1.5; stroke-dasharray:5 4; opacity:.7; }
.scurve .deadline-text{ fill: var(--amber); font-size:12px; text-anchor:end; }
.scurve .today-svg-line{ stroke: var(--cyan); stroke-width:2; opacity:.45; }
.scurve .curve{ fill:none; stroke-width:2.5; stroke-linejoin:round; stroke-linecap:round;
  vector-effect: non-scaling-stroke; }
.scurve .curve.planned{ stroke: var(--text-secondary); stroke-dasharray:6 5; }
.scurve .curve.actual{ stroke: var(--cyan); }
.scurve .curve.hours{ stroke: var(--amber); stroke-width:1.8; stroke-dasharray:2 4; opacity:.75; }
.scurve .dot.actual{ fill: var(--cyan); stroke: var(--bg-panel); stroke-width:1.5; }
.gantt-legend .sw.line-plan{ height:0; border-top:2px dashed var(--text-secondary); border-radius:0; }
.gantt-legend .sw.line-actual{ height:3px; background: var(--cyan); }
.gantt-legend .sw.line-hours{ height:0; border-top:2px dotted var(--amber); border-radius:0; }
.chip-count{ display:inline-block; margin-inline-start:7px; font-family: var(--font-mono); font-size:11.5px;
  background: rgba(255,255,255,0.07); padding:1px 6px; border-radius:999px; }
@media (max-width: 780px){ .scurve{ height:260px; } }
.tag-mini.critical{ background: rgba(250,110,110,0.16); border-color: transparent; color: var(--red); }
.tag-mini.danger{ background: var(--red-dim); border-color: transparent; color: var(--red); }

/* ---------- فرم هوشمند کاربر ---------- */
.scope-box{ background: var(--bg-panel-2); border:1px solid var(--border-soft); border-radius:11px;
  padding:14px 16px; margin-bottom:12px; }
.scope-title{ display:flex; align-items:center; justify-content:space-between; gap:12px;
  font-size:14px; font-weight:600; margin-bottom:10px; color: var(--text-primary); }
.scope-box .member-checklist{ max-height:160px; }
.perm-grid{ display:grid; grid-template-columns: repeat(4, 1fr); gap:2px 14px;
  background: var(--bg-panel-3); border:1px solid var(--border-soft); border-radius:8px; padding:10px; }
@media (max-width:1100px){ .perm-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width:780px){ .perm-grid{ grid-template-columns: 1fr; } }

/* ---------- لوگوی سازمان: زمینهٔ سفید و بزرگ ---------- */
.brand.has-logo{ flex-direction:column; align-items:stretch; gap:10px; }
.brand-logo-plate{
  background:#FFFFFF; border-radius:12px; padding:14px 16px;
  display:flex; align-items:center; justify-content:center;
  min-height:86px; width:100%;
  box-shadow: 0 4px 18px -6px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.14);
}
.brand-logo-plate img{ max-width:100%; max-height:64px; object-fit:contain; display:block; }
.brand.has-logo .brand-text{ text-align:center; }
.brand.has-logo .close-sidebar{ position:absolute; top:22px; inset-inline-start:18px; }

.login-logo-plate{
  background:#FFFFFF; border-radius:16px; padding:20px 24px;
  display:flex; align-items:center; justify-content:center;
  min-height:130px; width:100%; margin-bottom:16px;
  box-shadow: 0 8px 30px -10px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.16);
}
.login-logo-plate img{ max-width:100%; max-height:96px; object-fit:contain; display:block; }
.login-brand{ flex-direction:column; align-items:center; }
.brand-mark.login-mark{ width:70px; height:70px; border-radius:16px; background:#FFFFFF; }
.brand-mark.login-mark svg{ width:36px; height:36px; stroke:#0F766E; }

/* ---------- گزارش مشتری ---------- */
.customer-header{ display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.customer-logo-lg{ width:96px; height:96px; border-radius:14px; background:#FFFFFF;
  display:flex; align-items:center; justify-content:center; overflow:hidden; flex-shrink:0;
  box-shadow: 0 0 0 1px var(--border-soft); font-size:32px; font-weight:800; color:#0F766E; }
.customer-logo-lg img{ max-width:88%; max-height:88%; object-fit:contain; }
.donut-wrap{ display:flex; align-items:center; gap:26px; flex-wrap:wrap; }
.donut{ width:220px; height:220px; flex-shrink:0; }
.donut-total{ fill: var(--text-primary); font-family: var(--font-mono); font-size:30px; font-weight:700; }
.donut-label{ fill: var(--text-muted); font-size:13px; }
.donut-legend{ flex:1; min-width:210px; display:flex; flex-direction:column; gap:9px; }
.dl-row{ display:flex; align-items:center; gap:10px; font-size:14px; }
.dl-row.dim{ opacity:.4; }
.dl-dot{ width:11px; height:11px; border-radius:3px; flex-shrink:0; }
.dl-name{ flex:1; }
.dl-count{ color: var(--text-secondary); font-family: var(--font-mono); font-size:13px; }
.dl-pct{ font-family: var(--font-mono); font-weight:600; min-width:42px; text-align:left; }

/* ---------- راهنما ---------- */
.help-doc{ line-height:2.1; font-size:14.5px; }
.help-doc h2{ font-size:17px; margin-bottom:14px; padding-bottom:10px; border-bottom:1px solid var(--border-soft); }
.help-doc h3{ font-size:15px; margin:22px 0 8px; color: var(--cyan); }
.help-doc p{ color: var(--text-secondary); margin-bottom:10px; }
.help-doc ul, .help-doc ol{ margin: 8px 22px 14px; color: var(--text-secondary); }
.help-doc li{ margin-bottom:7px; }
.help-doc b{ color: var(--text-primary); }
.help-doc code{ background: var(--bg-panel-3); padding:2px 7px; border-radius:5px;
  font-family: var(--font-mono); font-size:13px; color: var(--cyan); }
.help-doc pre{ background: var(--bg-panel-3); border:1px solid var(--border-soft); border-radius:9px;
  padding:14px 16px; font-family: var(--font-mono); font-size:13px; line-height:2;
  color: var(--text-primary); overflow-x:auto; margin:10px 0 16px; }
.help-steps li{ margin-bottom:11px; }
.help-note{ background: var(--cyan-dim); border-inline-start:3px solid var(--cyan);
  border-radius:9px; padding:12px 16px; margin:14px 0; font-size:14px; color: var(--text-secondary); }
.help-note.warn{ background: var(--amber-dim); border-inline-start-color: var(--amber); }
.help-table{ min-width:0; width:100%; margin:10px 0 16px; }
.help-table thead th{ background: var(--bg-panel-2); font-size:13px; padding:9px 12px; }
.help-table tbody td{ padding:9px 12px; font-size:14px; }

/* ---------- مقایسه گروه‌ها ---------- */
.bar-compare{ display:flex; flex-direction:column; gap:11px; }
.bc-row{ display:grid; grid-template-columns: 150px 1fr 62px; gap:12px; align-items:center; }
.bc-name{ font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bc-track{ height:11px; border-radius:999px; background: var(--bg-panel-3);
  box-shadow: inset 0 0 0 1px var(--border-soft); overflow:hidden; }
.bc-fill{ display:block; height:100%; border-radius:999px; transition: width .3s ease; }
.bc-fill.ok{ background: linear-gradient(90deg, #22B37E, var(--green)); }
.bc-fill.full{ background: linear-gradient(90deg, #D9A02E, var(--amber)); }
.bc-fill.over{ background: linear-gradient(90deg, #E24D4D, var(--red)); }
.bc-val{ font-family: var(--font-mono); font-size:13px; text-align:left; }
.bc-val.ok{ color: var(--green); } .bc-val.full{ color: var(--amber); } .bc-val.over{ color: var(--red); }

.group-compact{ display:flex; flex-direction:column; gap:12px; }
.gc-row{ display:grid; grid-template-columns: 160px 1fr 80px; gap:10px; align-items:center;
  padding-bottom:11px; border-bottom:1px solid var(--border-soft); }
.gc-row:last-child{ border-bottom:none; padding-bottom:0; }
.gc-name{ font-size:14px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.gc-bar{ height:9px; border-radius:999px; background: var(--bg-panel-3); overflow:hidden;
  box-shadow: inset 0 0 0 1px var(--border-soft); }
.gc-fill{ display:block; height:100%; border-radius:999px; }
.gc-fill.ok{ background: var(--green); } .gc-fill.full{ background: var(--amber); } .gc-fill.over{ background: var(--red); }
.gc-val{ font-family: var(--font-mono); font-size:12.5px; color: var(--text-secondary); text-align:left; }
.gc-meta{ grid-column: 1 / -1; font-size:12px; color: var(--text-muted); margin-top:-4px; }

/* ---------- لینک پورتال ---------- */
.link-cell{ display:flex; gap:6px; align-items:center; min-width:280px; }
.link-input{ flex:1; font-family: var(--font-mono) !important; font-size:12px !important;
  padding:6px 9px !important; background: var(--bg-panel-3) !important; direction:ltr; text-align:left; }
.copy-btn{ padding:6px 12px !important; font-size:12.5px !important; flex-shrink:0; }

/* ---------- پورتال مشتری (صفحه عمومی) ---------- */
.portal-body{ padding:0; }
.portal-wrap{ max-width:1080px; margin:0 auto; padding:26px 20px 40px; }
.portal-header{ display:flex; align-items:center; gap:22px; flex-wrap:wrap;
  background: var(--bg-panel); border:1px solid var(--border-soft); border-radius: var(--radius);
  padding:20px 24px; margin-bottom:16px; }
.portal-brands{ display:flex; gap:12px; align-items:center; flex-shrink:0; }
.portal-logo-plate{ background:#FFFFFF; border-radius:12px; padding:12px 16px;
  display:flex; align-items:center; justify-content:center; min-height:76px; min-width:120px;
  box-shadow: 0 4px 16px -6px rgba(0,0,0,0.5); }
.portal-logo-plate img{ max-width:150px; max-height:56px; object-fit:contain; display:block; }
.portal-title h1{ font-size:19px; font-weight:800; }
.portal-sub{ font-size:14px; color: var(--text-secondary); margin-top:6px; }
.portal-footer{ margin-top:20px; text-align:center; font-size:13px; color: var(--text-muted);
  padding:16px; border-top:1px solid var(--border-soft); }
@media (max-width:780px){
  .bc-row{ grid-template-columns: 100px 1fr 54px; }
  .gc-row{ grid-template-columns: 110px 1fr 66px; }
  .portal-header{ flex-direction:column; align-items:flex-start; }
}

/* ============================================================
   گزارش چاپی — تم روشن، بهینه برای کاغذ A4
   ============================================================ */
.print-page{
  background:#FFFFFF; color:#1B2537;
  font-family: var(--font-display);
  background-image:none;
}
.print-toolbar{
  position:sticky; top:0; z-index:10; display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  background:#F4F6FA; border-bottom:1px solid #DCE2EC; padding:12px 20px;
}
.print-hint{ font-size:13px; color:#6B7689; }
.print-sheet{ max-width:900px; margin:0 auto; padding:26px 26px 40px; }

.print-header{ display:flex; align-items:center; gap:18px; padding-bottom:16px; border-bottom:2px solid #127C74; }
.print-logo{ background:#FFFFFF; border:1px solid #E6EAF2; border-radius:8px; padding:8px 12px;
  display:flex; align-items:center; justify-content:center; min-width:110px; min-height:64px; }
.print-logo img{ max-width:130px; max-height:48px; object-fit:contain; display:block; }
.print-title{ flex:1; }
.print-title h1{ font-size:19px; font-weight:800; color:#1B2537; }
.print-sub{ font-size:14px; color:#4A5568; margin-top:5px; }
.print-meta{ display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px;
  font-size:13px; color:#6B7689; padding:10px 0 4px; }

.print-h2{ font-size:15px; font-weight:700; color:#127C74; margin:20px 0 10px;
  padding-bottom:6px; border-bottom:1px solid #E6EAF2; }

.print-cards{ display:grid; grid-template-columns: repeat(4, 1fr); gap:10px; }
.print-card{ border:1px solid #E6EAF2; border-radius:8px; padding:12px 14px; background:#F9FAFC; }
.print-card span{ display:block; font-size:12.5px; color:#6B7689; margin-bottom:6px; }
.print-card b{ font-size:20px; font-family: var(--font-mono); color:#1B2537; }

.print-summary{ display:flex; align-items:center; gap:26px; flex-wrap:wrap; }
.print-donut{ width:190px; height:190px; flex-shrink:0; }
.print-legend{ flex:1; min-width:230px; }
.pl-row{ display:flex; align-items:center; gap:9px; font-size:14px; padding:5px 0; }
.pl-dot{ width:11px; height:11px; border-radius:3px; flex-shrink:0; }
.pl-name{ flex:1; }
.pl-count{ color:#4A5568; font-family: var(--font-mono); font-size:13px; }
.pl-pct{ font-family: var(--font-mono); font-weight:700; min-width:42px; text-align:left; }
.pl-summary{ margin-top:10px; padding-top:10px; border-top:1px solid #E6EAF2;
  font-size:13px; color:#4A5568; }

.print-table{ width:100%; border-collapse:collapse; margin-bottom:8px; min-width:0; }
.print-table thead th{ background:#F0F3F8; color:#3A4457; font-size:12.5px; font-weight:700;
  padding:9px 8px; border:1px solid #DCE2EC; text-align:center; white-space:nowrap; }
.print-table tbody td{ padding:8px; border:1px solid #E6EAF2; font-size:13px;
  text-align:center; color:#1B2537; vertical-align:middle; }
.print-table tbody tr:nth-child(even) td{ background:#FAFBFD; }
.print-table .ta-start{ text-align:start; }
.print-table .mono{ font-family: var(--font-mono); font-size:12.5px; }
.print-bar{ display:inline-block; width:52px; height:7px; border-radius:999px;
  background:#E6EAF2; overflow:hidden; vertical-align:middle; margin-inline-end:6px; }
.print-bar-fill{ display:block; height:100%; border-radius:999px; }
.print-badge{ display:inline-block; color:#FFFFFF; font-size:12px; padding:3px 9px; border-radius:999px; white-space:nowrap; }
.print-list{ margin:0 20px 12px; font-size:14px; color:#3A4457; line-height:2; }
.print-empty{ padding:24px; text-align:center; color:#6B7689; font-size:14px; }
.print-footer{ margin-top:26px; padding-top:12px; border-top:1px solid #E6EAF2;
  font-size:12.5px; color:#8A94A6; text-align:center; }

@media print{
  @page{ size: A4; margin: 12mm; }
  .no-print{ display:none !important; }
  .print-page{ background:#FFFFFF; }
  .print-sheet{ max-width:none; padding:0; }
  .print-table{ page-break-inside:auto; }
  .print-table tr{ page-break-inside:avoid; page-break-after:auto; }
  .print-table thead{ display:table-header-group; }
  .print-h2{ page-break-after:avoid; }
  .print-header{ page-break-after:avoid; }
  a[href]:after{ content:none !important; }
}
@media (max-width:780px){
  .print-cards{ grid-template-columns: repeat(2,1fr); }
  .print-header{ flex-wrap:wrap; }
}

/* ---------- فرم ارسال ایمیل لینک ---------- */
.mail-row{ display:none; }
.mail-row.open{ display:table-row; }
.mail-row td{ background: var(--bg-panel-2) !important; }
.mail-form{ display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap; }

/* ---------- پیامک ---------- */
textarea{ background: var(--bg-panel-3); border:1px solid var(--border-soft); border-radius:8px;
  padding:10px 11px; color: var(--text-primary); font-family: var(--font-display); font-size:14px;
  outline:none; width:100%; resize:vertical; line-height:1.9; }
textarea:focus{ border-color: var(--cyan); }
.tpl-row{ border:1px solid var(--border-soft); border-radius:10px; padding:12px 14px; margin-bottom:10px;
  background: var(--bg-panel-2); }
.tpl-head{ display:flex; align-items:center; gap:12px; margin-bottom:8px; }
.tpl-head .btn{ margin-inline-start:auto; padding:6px 14px !important; font-size:13px !important; }
.tpl-count{ font-family: var(--font-mono); font-size:12px; color: var(--text-muted); }
.tpl-body{ font-size:13px; }
.preview-block{ border:1px solid var(--border-soft); border-radius:10px; padding:14px; margin-bottom:12px;
  background: var(--bg-panel-2); }
.preview-title{ font-size:14px; font-weight:600; margin-bottom:10px; }
.preview-msg{ background: var(--bg-panel-3); border-radius:9px; padding:11px 13px; margin-bottom:8px; }
.pm-to{ display:flex; gap:10px; align-items:baseline; margin-bottom:6px; font-size:13px; }
.pm-to span{ font-size:12px; color: var(--text-muted); font-family: var(--font-mono); }
.pm-body{ font-size:14px; color: var(--text-secondary); line-height:2; }

/* ============================================================
   حالت روز
   همان متغیرهای حالت شب با مقادیر روشن بازتعریف می‌شوند، پس
   هیچ‌کدام از استایل‌های بعدی نیازی به تغییر ندارند.
   ============================================================ */
html[data-theme="light"]{
  --bg: #F2F5FA; --bg-panel: #FFFFFF; --bg-panel-2: #F7F9FC; --bg-panel-3: #EDF1F7;
  --border: #D3DAE6; --border-soft: #E3E8F0;
  --text-primary: #16203A; --text-secondary: #4C5872; --text-muted: #7C879F;
  --cyan: #0E8F88; --cyan-dim: rgba(14,143,136,0.10);
  --green: #1C9B68; --green-dim: rgba(28,155,104,0.12);
  --amber: #B5810F; --amber-dim: rgba(181,129,15,0.12);
  --red: #CE4646;  --red-dim: rgba(206,70,70,0.12);
}
html[data-theme="light"] body{
  background-image:
    radial-gradient(circle at 85% -10%, rgba(14,143,136,0.06), transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(53,101,211,0.05), transparent 40%),
    repeating-linear-gradient(0deg, rgba(22,32,58,0.022) 0px, rgba(22,32,58,0.022) 1px, transparent 1px, transparent 34px),
    repeating-linear-gradient(90deg, rgba(22,32,58,0.022) 0px, rgba(22,32,58,0.022) 1px, transparent 1px, transparent 34px);
}
html[data-theme="light"] .sidebar{
  background: linear-gradient(180deg, #FFFFFF, #F7F9FC);
  border-left-color: var(--border);
}
html[data-theme="light"] .btn-primary{ color:#FFFFFF; }
html[data-theme="light"] .brand-mark{ box-shadow: 0 0 0 1px rgba(14,143,136,0.25), 0 4px 14px -6px rgba(14,143,136,0.5); }
html[data-theme="light"] .brand-mark svg{ stroke:#FFFFFF; }
html[data-theme="light"] .brand-logo-plate,
html[data-theme="light"] .login-logo-plate,
html[data-theme="light"] .portal-logo-plate{ box-shadow: 0 2px 10px -4px rgba(22,32,58,0.25), 0 0 0 1px var(--border-soft); }
html[data-theme="light"] .bar-actual{ opacity:1; }
html[data-theme="light"] .load-over{ background: repeating-linear-gradient(45deg, var(--red), var(--red) 4px, #9B2C2C 4px, #9B2C2C 8px); }
html[data-theme="light"] .toast{ box-shadow: 0 10px 30px -8px rgba(22,32,58,0.25); }
html[data-theme="light"] .link-input{ background:#FFFFFF !important; }
html[data-theme="light"] input, html[data-theme="light"] select, html[data-theme="light"] textarea{ background:#FFFFFF; }
html[data-theme="light"] input[type=file]{ background:#FFFFFF; }
html[data-theme="light"] .scurve .dot.actual{ stroke:#FFFFFF; }

/* کلید تغییر حالت */
.theme-toggle{
  display:flex; align-items:center; gap:8px; width:100%;
  padding:9px 12px; border-radius:10px; cursor:pointer;
  border:1px solid var(--border-soft); background: var(--bg-panel);
  color: var(--text-secondary); font-family: var(--font-display); font-size:14px;
  transition: background .15s ease, color .15s ease;
}
.theme-toggle:hover{ background: var(--bg-panel-3); color: var(--text-primary); }
.theme-toggle svg{ width:16px; height:16px; flex-shrink:0; }
.theme-toggle .tt-label{ flex:1; text-align:start; }
.theme-toggle .icon-sun{ display:none; }
html[data-theme="light"] .theme-toggle .icon-sun{ display:block; }
html[data-theme="light"] .theme-toggle .icon-moon{ display:none; }

/* ---------- جستجوی سراسری ---------- */
.global-search{ padding: 18px 34px 0; max-width:1420px; }
.global-search form{ position:relative; max-width:520px; }
.global-search svg{ position:absolute; inset-inline-start:13px; top:50%; transform:translateY(-50%);
  width:16px; height:16px; color: var(--text-muted); pointer-events:none; }
.global-search input{ width:100%; padding:10px 40px 10px 14px; border-radius:10px;
  background: var(--bg-panel); border:1px solid var(--border-soft); color: var(--text-primary);
  font-family: var(--font-display); font-size:14px; outline:none; }
.global-search input:focus{ border-color: var(--cyan); background: var(--bg-panel-2); }
.search-form{ display:flex; gap:10px; }
.search-form input{ flex:1; background: var(--bg-panel-3); border:1px solid var(--border-soft);
  border-radius:9px; padding:11px 13px; color: var(--text-primary);
  font-family: var(--font-display); font-size:14px; outline:none; }
.search-form input:focus{ border-color: var(--cyan); }
.search-results{ display:flex; flex-direction:column; gap:6px; }
.search-row{ display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:11px 13px; border-radius:9px; background: var(--bg-panel-2);
  border:1px solid var(--border-soft); transition: background .15s ease; }
.search-row:hover{ background: var(--bg-panel-3); border-color: var(--border); }
.sr-main{ display:flex; flex-direction:column; gap:4px; min-width:0; }
.sr-title{ font-size:14px; font-weight:600; }
.sr-meta{ font-size:12px; color: var(--text-muted); }

/* ---------- شاخص‌های EVM ---------- */
.evm-grid{ display:grid; grid-template-columns: repeat(4, 1fr); gap:12px; }
.evm-card{ background: var(--bg-panel-2); border:1px solid var(--border-soft); border-radius:11px; padding:14px 16px; }
.evm-label{ font-size:12.5px; color: var(--text-muted); display:block; margin-bottom:8px; }
.evm-value{ font-family: var(--font-mono); font-size:24px; font-weight:700; line-height:1;
  font-variant-numeric: tabular-nums; }
.evm-value.ok{ color: var(--green); } .evm-value.full{ color: var(--amber); }
.evm-value.over{ color: var(--red); }  .evm-value.none{ color: var(--text-muted); }
.evm-note{ font-size:12px; color: var(--text-muted); margin-top:7px; display:block; line-height:1.8; }
@media (max-width:1100px){ .evm-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width:780px){
  .global-search{ padding: 14px 16px 0; }
  .evm-grid{ grid-template-columns: 1fr; }
}

/* نوار مراحل چارت سازمانی */
.org-tabs{ display:flex; flex-wrap:wrap; gap:8px; margin: 0 0 16px; }
.org-tab{ display:inline-flex; align-items:center; gap:8px; padding:9px 16px; border-radius:10px; font-size:14px; color:var(--text-secondary); background:var(--bg-panel-2); border:1px solid var(--border-soft); text-decoration:none; }
.org-tab b{ display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; border-radius:50%; background:var(--bg-panel-3); font-size:12.5px; }
.org-tab:hover{ color:var(--text-primary); }
.org-tab.active{ color:var(--text-primary); background:var(--bg-panel-3); box-shadow: inset 0 0 0 1px var(--cyan); }
.org-tab.active b{ background:var(--cyan); color:#06101c; }

/* گزینهٔ «افزودن» انتهای فهرست‌های کشویی */
option.opt-add{ color:var(--cyan); font-weight:600; }
