/* ===== IRANSans ===== */
@font-face{
  font-family:'IRANSans';
  src:url('../fonts/IRANSans.woff2') format('woff2'),
      url('../fonts/IRANSans.woff')  format('woff');
  font-weight:400;
  font-style:normal;
  font-display:swap;
  unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+200C-200F,U+FB50-FDFF,U+FE70-FEFF,U+0020-007E;
}

/* ===== Reset / Base ===== */
*{
  box-sizing:border-box;
  font-family:inherit;
}
html,body{
  height:100%;
}
html{
  font-family:'IRANSans',-apple-system,'Segoe UI',Roboto,Arial,sans-serif;
}
input,button,select,textarea{
  font:inherit;
}

/* ===== Tokens ===== */

/* ===== Page Layout (یک‌بار تعریف، بدون تکرار) ===== */
body{
  margin:0;
  font-variant-numeric:tabular-nums;
  color:var(--text);
  display:flex;
  flex-direction:column;
  min-height:100vh;
}

/* ===== Header / Footer ===== */
.header{
  width:100%;
}
.header .bar{
  display:flex;
  align-items:center;
  gap:14px;
  justify-content:space-between;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.brand img{
  width:auto;
  object-fit:contain;
}
.footer{
  width:100%;
  margin-top:auto;
  padding:0 var(--page-gutter) 18px var(--page-gutter);
  font-size:12px;
  text-align:center;
}

/* ===== Container: سه ستون روی دسکتاپ، تک ستون روی عرض‌های کم ===== */
.container{
  flex:1 0 auto;
  display:grid;
}

/* ارتفاع کارت‌ها، بدون افراط */
.container > .card{
  min-width:0;
  min-height:0;
}

/* دسکتاپ‌های خیلی بزرگ، کمی ارتفاع حداقلی بده */
@media (min-width:1281px){
  .container > .card{
    min-height:520px;
  }
}

/* ===== Cards ===== */
.card{
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.00)),
    var(--layer);
  border-radius:var(--radius);
  border:1px solid var(--border);
  box-shadow:0 10px 40px rgba(0,0,0,.25);
  backdrop-filter:blur(6px);
}
.pad{
  padding:22px;
}

/* ===== Banner ===== */
.banner .badge{
  padding:6px 10px;
  border-radius:999px;
  background:#0e1533;
  border:1px solid var(--border);
  font-size:12px;
}

/* ===== Forms & Buttons ===== */
.field{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom:12px;
}
label{
  font-size:13px;
  color:#bdc3d6;
}
.input{
  width:100%;
  padding:14px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#0b1226;
  color:var(--text);
  outline:none;
}
.input:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 6px var(--ring);
}
/* دکمه‌ها بدون خط زیر */
.btn,
.btn:link,
.btn:visited{
  text-decoration:none;
}

.btn{
  appearance:none;
  border:0;
  border-radius:12px;
  padding:14px 16px;
  font-weight:700;
  cursor:pointer;
  background:linear-gradient(90deg,var(--primary),var(--accent));
  color:#fff;
  box-shadow:0 12px 26px rgba(124,58,237,.28);
}

/* حالت عمومی secondary (اگر جایی دیگه استفاده شد) */
.btn.secondary{
  background:#141d40;
  color:#d6daf2;
  box-shadow:none;
  border:1px solid var(--border);
}

/* استایل اختصاصی دکمه خروج داخل کارت وضعیت اتصال */
#status-card .btn.secondary{
  background:rgba(239,68,68,.12);
  color:#fecaca;
  border-color:#ef4444;
  box-shadow:none;
  padding:10px 18px;      /* کوچیک‌تر از حالت عادی */
  font-size:13px;
  border-radius:10px;
}

#status-card .btn.secondary:hover{
  background:rgba(239,68,68,.22);
}

.helper{
  font-size:12px;
  color:var(--muted);
}
.err{
  color:var(--err);
  font-size:12px;
  margin-top:6px;
}

/* ===== Portal tiles ===== */
.section{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:10px 2px;
}
.grid{
  display:grid;
}
.tile{
  position:relative;
  border:1px solid var(--border);
  border-radius:16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.00)),
    var(--card);
  text-decoration:none;
  color:var(--text);
}
.icon{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:#18224d;
  font-size:18px;
}
.star{
  position:absolute;
  top:8px;
  left:10px;
  cursor:pointer;
  opacity:.7;
  border:0;
  background:transparent;
}
.star.active{
  opacity:1;
}

/* 🔢 Badge تعداد تیکت‌های جدید روی کاشی تیکتینگ */
.tile .ticket-badge{
  position:absolute;
  top:6px;
  right:10px;
  min-width:20px;
  padding:2px 6px;
  border-radius:999px;
  background:#f97316;
  color:#fff;
  font-size:11px;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 0 0 1px rgba(15,23,42,.9);
}

/* Badge وظایف فعال IT؛ قرینه Badge تیکت در سمت چپ کاشی */
.tile .task-badge{
  position:absolute;
  top:6px;
  left:10px;
  min-width:20px;
  padding:2px 6px;
  border-radius:999px;
  background:linear-gradient(135deg,#06b6d4,#0891b2);
  color:#fff;
  font-size:11px;
  font-weight:800;
  line-height:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 0 0 1px rgba(8,145,178,.18),0 8px 18px rgba(6,182,212,.24);
  z-index:3;
  pointer-events:none;
}
.meta{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.meta .name{
  font-weight:700;
}
.meta .hint{
  font-size:12px;
  color:var(--muted);
}

/* ===== KPI ===== */
.kpis{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap:10px;
}
.kpi{
  display:flex;
  gap:10px;
  align-items:center;
  padding:12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.00)),
    var(--card);
}
.kpi .label{
  color:var(--muted);
  font-size:12px;
}

/* ===== Modal ===== */
html.modal-open,
html.modal-open body{
  overflow:hidden;
}

/* نوار عنوان مودال: دکمه × داخل title و فلکسی */
.modal-title{
  font-size:14px;
  line-height:1.25;
  direction:inherit;
}
.modal-close{
  cursor:pointer;
  min-width:36px;
}
.modal-title .modal-spacer{
  width:36px;
  height:1px;
}
.modal-img{
  height:auto;
}

/* ===== Calendar card & iframe ===== */
#calnote-card{
  display:flex;
  flex-direction:column;
}
#calnote-card > h3{
  margin:0 0 10px;
  flex:0 0 auto;
}
#calendar-panel{
  flex:1 1 auto;
  min-height:430px;
}
#calendar-panel iframe{
  width:100%;
  height:100%;
  border:none;
  display:block;
}

/* ===== Responsive ===== */

/* گرید لینک‌ها روی عرض‌های کمتر */
@media (max-width:1400px){
  .grid{
    grid-template-columns:repeat(4,1fr);
  }
}
@media (max-width:520px){
  .grid{
    grid-template-columns:1fr;
  }
}

/* زیر 1280: سه ستون رو بکن تک ستون، بدون اسکرول افقی */
@media (max-width:1280px){
  .container{
    grid-template-columns:1fr;
    padding:8px 16px 24px 16px;
  }
  .container > .card{
    min-height:auto;
  }
}

/* موبایل: جمع‌وجورتر */
@media (max-width:600px){
  :root{
    --page-gutter:12px;
    --logo-height:56px;
  }
  .container{
    margin-top:8px;
    padding:0 12px 18px 12px;
  }
  .pad{
    padding:16px;
  }
  .kpis{
    grid-template-columns:1fr;
  }
  .grid{
    grid-template-columns:1fr;
  }
  #calendar-panel{
    min-height:260px;
  }
  .modal-iframe{
    height:75vh;
  }
}
/* مرکزچین کردن محتوا داخل کارت‌های KPI ستون وضعیت اتصال */
.kpis .kpi {
  display: flex;
  align-items: center;
  justify-content: center;   /* افقی وسط */
  text-align: center;        /* متن‌ها وسط چین */
}

/* اگر می‌خواهی آیکن کمی از متن فاصله داشته باشد */
.kpis .kpi .icon {
  margin-left: 8px;
}

/* بدنه‌ی متن داخل KPI (برای کنترل بهتر در نسخه‌های بعدی) */
.kpis .kpi .kpi-body {
  display: flex;
  flex-direction: column;
  align-items: center;       /* متن زیر هم وسط */
}
/* اعداد داخل کارت وضعیت اتصال با فونت انگلیسی */
#status-card strong,
#status-card #kpi-io-breakdown {
  font-family:-apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
/* =========================================================
   Admin Print Light System - Flash final layer
   فقط ظاهر؛ بدون تغییر منطق و ساختار
   ========================================================= */
:root{
  --bg:#f4f7fb;--layer:#ffffff;--card:#ffffff;--muted:#64748b;--text:#0f172a;
  --primary:#2563eb;--accent:#0f766e;--ok:#059669;--err:#e11d48;
  --radius:24px;--border:rgba(219,227,238,.92);--ring:rgba(37,99,235,.14);
  --logo-height:86px;--page-gutter:24px;
  --surface-soft:#f8fafc;--surface-muted:#f1f5f9;--primary-soft:#eaf1ff;
  --shadow-sm:0 6px 18px rgba(15,23,42,.06);--shadow-md:0 16px 42px rgba(15,23,42,.10);--shadow-lg:0 28px 80px rgba(15,23,42,.14);
}
html,body{background:#f4f7fb!important;color:var(--text)!important;min-height:100vh;}
body{
  background:
    radial-gradient(900px 420px at 86% -8%,rgba(37,99,235,.14),transparent 62%),
    radial-gradient(760px 440px at 7% 4%,rgba(5,150,105,.10),transparent 64%),
    linear-gradient(180deg,#f8fbff 0%,#f4f7fb 45%,#eef3f8 100%)!important;
}
body::before{content:"";position:fixed;inset:0;pointer-events:none;z-index:-1;background-image:linear-gradient(rgba(15,23,42,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(15,23,42,.025) 1px,transparent 1px);background-size:42px 42px;mask-image:linear-gradient(to bottom,rgba(0,0,0,.72),transparent 70%)}
.header{position:sticky;top:0;z-index:30;padding:12px max(var(--page-gutter),calc((100vw - 1320px)/2 + var(--page-gutter)))!important;border-bottom:1px solid rgba(219,227,238,.82);background:rgba(255,255,255,.86);backdrop-filter:blur(18px) saturate(1.35);box-shadow:0 8px 26px rgba(15,23,42,.06)}
.header .bar{min-height:72px}.brand{margin-inline:auto}.brand img{height:var(--logo-height)!important;max-height:var(--logo-height)!important}.title{color:#020617!important;font-weight:950;letter-spacing:-.3px}.footer{color:var(--muted)!important;padding-bottom:18px!important}
.container{width:min(1320px,calc(100% - 48px))!important;margin:24px auto 38px!important;padding:0!important;gap:20px!important;grid-template-columns:minmax(300px,360px) minmax(520px,1fr) minmax(300px,360px)!important;align-items:start!important}.container>.card{min-height:0!important}
.card,
.box,
.preview,
.kpi,
.tile,
.shortcut,
.section,
#calendar-panel,
#motd-panel{background:rgba(255,255,255,.92)!important;color:var(--text)!important;border:1px solid var(--border)!important;border-radius:24px!important;box-shadow:var(--shadow-sm)!important;backdrop-filter:blur(12px);position:relative;overflow:hidden}.card::before,.box::before,.preview::before,.kpi::before,.tile::before,.section::before{content:"";position:absolute;inset:0 0 auto;height:3px;background:linear-gradient(90deg,rgba(37,99,235,.85),rgba(5,150,105,.72));opacity:.65}.pad,.box,.preview,.section,#calendar-panel,#motd-panel{padding:20px!important}.card h2,.card h3,.section h2,.section h3{color:#020617!important;font-weight:950}.label,label,small,.mini,.info,.helper,.hint{color:var(--muted)!important}.input,input,select,textarea{background:#fff!important;color:var(--text)!important;border:1px solid #dbe3ee!important;border-radius:14px!important;box-shadow:0 1px 0 rgba(15,23,42,.02)!important}.input:focus,input:focus,select:focus,textarea:focus{border-color:rgba(37,99,235,.55)!important;box-shadow:0 0 0 4px rgba(37,99,235,.14)!important}.btn,.btn:link,.btn:visited,button{border-radius:14px!important;font-weight:950!important;text-decoration:none!important}.btn:not(.secondary):not(.danger),button:not(.star):not(.modal-close):not(.pw-toggle){background:linear-gradient(135deg,#2563eb,#1d4ed8)!important;color:#fff!important;box-shadow:0 12px 26px rgba(37,99,235,.22)!important}.btn.secondary,.secondary,#clear,#status-card .btn.secondary{background:#eaf1ff!important;border:1px solid #cfe0ff!important;color:#1d4ed8!important;box-shadow:none!important}.btn.danger{background:#fff1f2!important;border:1px solid #fecdd3!important;color:#e11d48!important;box-shadow:none!important}
.grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important}.tile{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important;gap:8px!important;min-height:126px!important;padding:16px 12px!important;transition:transform .18s ease,box-shadow .18s ease}.tile:hover{transform:translateY(-2px);box-shadow:var(--shadow-md)!important}.tile .icon{width:48px!important;height:48px!important;border-radius:18px!important;background:linear-gradient(135deg,#2563eb,#1d4ed8)!important;color:#fff!important;display:flex!important;align-items:center!important;justify-content:center!important;box-shadow:0 14px 30px rgba(37,99,235,.25)!important}.tile .name{color:#1d4ed8!important;font-weight:950!important}.tile .hint{font-size:12px!important;color:#64748b!important}.tile .star{position:absolute!important;left:10px!important;top:10px!important;width:30px!important;height:30px!important;min-height:30px!important;padding:0!important;border-radius:12px!important;background:#eaf1ff!important;color:#1d4ed8!important;border:1px solid #cfe0ff!important;box-shadow:none!important}.ticket-badge{background:#e11d48!important;color:#fff!important;border-radius:999px!important}.kpis,.kpis--sidebar{gap:12px!important}.kpi{min-height:78px!important}.kpi .icon{background:#eaf1ff!important;color:#2563eb!important}.kpi strong{color:#020617!important}.banner{display:block!important;padding:0!important;border-radius:18px!important;overflow:hidden!important;background:#eaf1ff!important;border:1px solid #cfe0ff!important}.banner iframe{display:block!important;width:100%!important;border:0!important;background:transparent!important}
table{background:#fff!important;color:var(--text)!important;border-radius:18px;overflow:hidden}th,td{border-bottom:1px solid #e7edf5!important}thead th,table tr:first-child th{background:linear-gradient(180deg,#f8fafc,#f1f5f9)!important;color:#64748b!important}
/* حفظ مودال‌های portal-pro؛ مشکل نسخه قبل همین بخش بود */
#modal-root{position:relative!important;z-index:99990!important}.modal-backdrop{position:fixed!important;inset:0!important;z-index:99990!important;display:grid!important;place-items:center!important;padding:20px!important;background:rgba(15,23,42,.52)!important;backdrop-filter:blur(8px)!important}.modal{width:min(96vw,1000px)!important;max-width:calc(100vw - 36px)!important;background:#fff!important;border:1px solid rgba(219,227,238,.92)!important;border-radius:24px!important;box-shadow:var(--shadow-lg)!important;overflow:hidden!important;position:relative!important;color:var(--text)!important}.modal-title{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;padding:10px 12px!important;font-weight:950!important;color:#020617!important;background:rgba(255,255,255,.94)!important;border-bottom:1px solid #e7edf5!important}.modal-close{width:38px!important;height:38px!important;min-height:38px!important;padding:0!important;border-radius:14px!important;background:#eaf1ff!important;color:#1d4ed8!important;border:1px solid #cfe0ff!important;box-shadow:none!important}.modal-body{padding:10px!important;background:#f8fafc!important;max-height:calc(96vh - 58px)!important;overflow:hidden!important}.modal-iframe{display:block!important;width:100%!important;height:calc(95vh - 82px)!important;min-height:640px!important;border:0!important;border-radius:16px!important;background:#fff!important}.modal-img{display:block!important;max-width:100%!important;max-height:calc(96vh - 90px)!important;margin:0 auto!important;border-radius:16px!important;object-fit:contain!important}.modal-open,.modal-open body{overflow:hidden!important}
@media(max-width:1100px){.container{grid-template-columns:1fr 1fr!important}.container>#shortcuts-card{grid-column:1/-1;order:-1}.grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:760px){:root{--page-gutter:14px;--logo-height:60px}.header{position:static!important}.container{width:calc(100% - 20px)!important;grid-template-columns:1fr!important;margin-top:14px!important}.grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.pad,.box,.preview,.section,#calendar-panel,#motd-panel{padding:14px!important}.modal{width:calc(100vw - 18px)!important}.modal-iframe{min-height:70vh!important}.btn,button{width:100%}.tile .star,.modal-close,.pw-toggle{width:36px!important}}
body.portal-status-master{
  --master-max: 1440px;
  --master-gap: 22px;
  --master-min-height: clamp(660px, calc(100vh - 210px), 920px);
  --tile-radius: 28px;
  overflow-x:hidden;
}

body.portal-status-master .header{
  padding-top:10px!important;
  padding-bottom:10px!important;
}
body.portal-status-master .brand img{
  transform:translateY(1px);
}

body.portal-status-master .container{
  display:grid!important;
}

body.portal-status-master .container > .card{
  display:flex!important;
  flex-direction:column!important;
}
body.portal-status-master .container > .card::after{
  content:"";
  position:absolute;
  inset:1px;
  border-radius:inherit;
  pointer-events:none;
}
body.portal-status-master .container > .card > *{
  position:relative;
  z-index:1;
}

body.portal-status-master .pad{
  padding:24px!important;
}
body.portal-status-master .card h3,
body.portal-status-master .card-head h3{
  margin:0!important;
  font-size:18px!important;
  letter-spacing:-.35px;
}
body.portal-status-master .card-head,
body.portal-status-master #shortcuts-card .section{
  min-height:54px;
  margin:0 0 16px!important;
  padding:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  overflow:visible!important;
}
body.portal-status-master #shortcuts-card .section::before,
body.portal-status-master .card-head::before{
  display:none!important;
}
body.portal-status-master #results-count{
  align-items:center;
  justify-content:center;
  min-width:34px;
  height:28px;
  padding:0 10px;
  border-radius:999px;
  background:#eef6ff;
  border:1px solid #d8e8ff;
  color:#2563eb!important;
  font-weight:900;
}
body.portal-status-master #results-count:empty{display:none;}

/* ستون وضعیت: تا پایین صفحه و کارت‌های خوانا */
body.portal-status-master #status-card .kpis,
body.portal-status-master #status-card .kpis--sidebar{
  display:flex!important;
  flex-direction:column!important;
  gap:16px!important;
  flex:1 1 auto!important;
}
body.portal-status-master #status-card .kpi{
  gap:14px!important;
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
body.portal-status-master #status-card .kpi:hover{
  transform:translateY(-3px);
  border-color:#bfd7ff!important;
  box-shadow:0 18px 44px rgba(37,99,235,.12)!important;
}
body.portal-status-master #status-card .kpi .icon{
  background:linear-gradient(135deg,#eff6ff,#dbeafe)!important;
  color:#2563eb!important;
  box-shadow:inset 0 0 0 1px rgba(37,99,235,.10), 0 12px 24px rgba(37,99,235,.11)!important;
}
body.portal-status-master #status-card strong{
  color:#020617!important;
}
body.portal-status-master #status-card .label{
  margin-bottom:4px;
  font-weight:800!important;
}
body.portal-status-master #status-card .btn.secondary{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* ستون میان‌بر: کاشی‌های بزرگ، خاص و مادر طراحی */
body.portal-status-master #shortcuts-card{
  padding:26px!important;
}
body.portal-status-master .tile{
  isolation:isolate;
  border-color:#dbeafe!important;
  transform:translateZ(0);
  transition:transform .24s cubic-bezier(.2,.8,.2,1), box-shadow .24s ease, border-color .24s ease, background .24s ease!important;
}
body.portal-status-master .tile::before{
  height:auto!important;
  inset:0!important;
  border-radius:inherit;
  opacity:.86!important;
  z-index:-1;
}
body.portal-status-master .tile::after{
  content:"";
  position:absolute;
  inset:auto 18px 14px 18px;
  height:26px;
  border-radius:999px;
  background:rgba(37,99,235,.10);
  filter:blur(18px);
  opacity:0;
  transition:opacity .24s ease;
  z-index:-1;
}
body.portal-status-master .tile:hover,
body.portal-status-master .tile:focus-visible{
  border-color:#93c5fd!important;
}
body.portal-status-master .tile:hover::after,
body.portal-status-master .tile:focus-visible::after{
  opacity:1;
}
body.portal-status-master .tile .icon{
  background:
    radial-gradient(circle at 35% 20%,rgba(255,255,255,.35),transparent 35%),
    linear-gradient(135deg,#2563eb,#1d4ed8 58%,#0f766e)!important;
  margin-bottom:4px;
}
body.portal-status-master .tile .name{
  letter-spacing:-.25px;
}
body.portal-status-master .tile .hint{
  font-weight:750!important;
}
body.portal-status-master .tile .star{
  background:rgba(255,255,255,.78)!important;
  backdrop-filter:blur(10px);
  transition:transform .18s ease, background .18s ease!important;
}
body.portal-status-master .tile .star:hover{
  transform:rotate(-12deg) scale(1.08);
  background:#fff!important;
}
body.portal-status-master .tile .ticket-badge{
  box-shadow:0 10px 20px rgba(225,29,72,.22)!important;
}
body.portal-status-master .tile .task-badge{
  background:linear-gradient(135deg,#06b6d4,#0891b2)!important;
  color:#fff!important;
}

/* بنر: یکپارچه با صفحه، بدون کادر اضافه */

/* ستون تقویم: بدون لایه سخن روز، تقویم کامل */
body.portal-status-master #motd-panel{
  display:none!important;
}

/* اکشن و حرکت */
@keyframes portalMasterIn{
  from{opacity:0;transform:translateY(18px) scale(.985);filter:blur(4px)}
  to{opacity:1;transform:none;filter:none}
}
@keyframes portalTileIn{
  from{opacity:0;transform:translateY(16px) scale(.96)}
  to{opacity:1;transform:none}
}
body.portal-status-master .container > .card{
  animation:portalMasterIn .48s cubic-bezier(.2,.8,.2,1) both;
}
body.portal-status-master #shortcuts-card{animation-delay:.04s;}
body.portal-status-master #status-card{animation-delay:.10s;}
body.portal-status-master #calnote-card{animation-delay:.16s;}
body.portal-status-master .tile{
  animation:portalTileIn .42s cubic-bezier(.2,.8,.2,1) both;
}
body.portal-status-master .tile:nth-child(1){animation-delay:.08s}
body.portal-status-master .tile:nth-child(2){animation-delay:.13s}
body.portal-status-master .tile:nth-child(3){animation-delay:.18s}
body.portal-status-master .tile:nth-child(4){animation-delay:.23s}
body.portal-status-master .tile:nth-child(5){animation-delay:.28s}
body.portal-status-master .tile:nth-child(6){animation-delay:.33s}

/* مودال‌ها همچنان سالم و بالای صفحه */
body.portal-status-master #modal-root .modal-backdrop{
  z-index:99990!important;
}
body.portal-status-master .modal{
  border-radius:28px!important;
}
body.portal-status-master .modal-title{
  min-height:58px;
}

@media(max-width:1280px){
  body.portal-status-master .container{
    width:calc(100% - 32px)!important;
  }
}
@media(max-width:860px){
  body.portal-status-master{--master-gap:16px;}
  body.portal-status-master .container{width:calc(100% - 22px)!important;margin-top:14px!important;}
  body.portal-status-master #portal-grid.grid{gap:14px!important;}
  body.portal-status-master .tile{min-height:150px!important;}
}
@media(max-width:560px){
  body.portal-status-master .pad,
  body.portal-status-master #shortcuts-card,
  body.portal-status-master #status-card,
  body.portal-status-master #calnote-card{padding:16px!important;}
  body.portal-status-master .tile{min-height:132px!important;}
  body.portal-status-master #calnote-card{min-height:520px!important;}
  body.portal-status-master #calendar-panel iframe{min-height:430px!important;}
}
@media(prefers-reduced-motion:reduce){
  body.portal-status-master .container > .card,
  body.portal-status-master .tile{animation:none!important;transition:none!important;}
}
body.portal-status-master{
  --v5-max:1520px;
  --v5-side:310px;
  --v5-gap:18px;
  --v5-min:clamp(650px, calc(100vh - 178px), 820px);
  background:
    radial-gradient(700px 360px at 88% -8%, rgba(37,99,235,.14), transparent 66%),
    radial-gradient(760px 380px at 8% 8%, rgba(20,184,166,.10), transparent 66%),
    linear-gradient(180deg,#f9fbff 0%,#f3f7fb 48%,#eef4fa 100%)!important;
  color:#0f172a!important;
}
body.portal-status-master::before{
  background-size:48px 48px!important;
  opacity:.85!important;
}
body.portal-status-master .header{
  position:relative!important;
}
body.portal-status-master .header .bar{
  margin:0 auto;
  justify-content:flex-start!important;
}
body.portal-status-master .brand{
  margin-inline:0!important;
  gap:14px!important;
}
body.portal-status-master .title{
  font-size:17px!important;
  color:#020617!important;
}
body.portal-status-master .title::after{
  margin-top:4px;
  font-size:12px;
  font-weight:750;
  color:#64748b;
  letter-spacing:0;
}
body.portal-status-master .container{
  align-items:stretch!important;
}
body.portal-status-master .container > .card{
  height:100%!important;
  background:rgba(255,255,255,.86)!important;
  border:1px solid rgba(207,224,255,.82)!important;
  box-shadow:0 18px 56px rgba(15,23,42,.09)!important;
  overflow:hidden!important;
}
body.portal-status-master .container > .card::before{
  height:4px!important;
  background:linear-gradient(90deg,#2563eb,#22c1b5,#8b5cf6)!important;
  opacity:.9!important;
}
body.portal-status-master .container > .card::after{
  background:
    radial-gradient(420px 220px at 110% -5%, rgba(37,99,235,.10), transparent 70%),
    linear-gradient(135deg, rgba(255,255,255,.72), transparent 32%)!important;
  opacity:1!important;
}
body.portal-status-master .card h3{
  font-size:17px!important;
  line-height:1.5!important;
}
body.portal-status-master .section-subtitle{
  margin:4px 0 0;
  color:#64748b;
  font-weight:750;
}

/* ستون وسط: دیگر فضای خالی مرده ندارد */
body.portal-status-master #shortcuts-card{
  display:flex!important;
  flex-direction:column!important;
}
body.portal-status-master #shortcuts-card .section{
  margin:0!important;
  padding:0!important;
  flex:0 0 auto!important;
}
body.portal-status-master .portal-hero{
  position:relative;
  flex:0 0 auto;
  overflow:hidden;
  background:
    radial-gradient(280px 160px at 12% 0%, rgba(255,255,255,.40), transparent 62%),
    linear-gradient(135deg,#1d4ed8 0%,#2563eb 48%,#0f766e 100%);
  color:#fff;
}
body.portal-status-master .portal-hero::before{
  content:"";
  position:absolute;
  inset:0;
  background-image:linear-gradient(rgba(255,255,255,.11) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.09) 1px,transparent 1px);
  background-size:28px 28px;
  mask-image:linear-gradient(90deg,rgba(0,0,0,.86),transparent 92%);
}
body.portal-status-master .portal-hero__content{
  max-width:560px;
}
body.portal-status-master .portal-hero h2{
  color:#fff!important;
  font-weight:1000;
}
body.portal-status-master .portal-hero p{
  margin:0;
  color:rgba(255,255,255,.86);
  font-weight:750;
}
@keyframes v5OrbFloat{
  0%,100%{transform:translateY(-50%) rotate(0deg)}
  50%{transform:translateY(calc(-50% - 8px)) rotate(8deg)}
}
body.portal-status-master .tile{
  border:1px solid #dbeafe!important;
}
body.portal-status-master .tile .hint{
  opacity:1!important;
  color:#64748b!important;
}
body.portal-status-master #banner.banner{
  align-self:stretch;
  align-items:center;
  justify-content:center;
}

/* ستون وضعیت: سلسله مراتب و اکشن واضح */
body.portal-status-master #status-card{
  display:flex!important;
  flex-direction:column!important;
}
body.portal-status-master #status-card h3::after{
  content:none!important;
  display:none!important;
}
body.portal-status-master #status-card .kpis{
  margin-bottom:16px!important;
}
body.portal-status-master #status-card .kpi{
  flex:0 0 auto!important;
  justify-content:flex-start!important;
  background:linear-gradient(145deg,#fff,#f8fbff)!important;
}
body.portal-status-master #status-card .kpi:first-child,
body.portal-status-master #status-card .kpi[data-kind="username-kpi"]{
  background:linear-gradient(135deg,#eff6ff,#fff)!important;
}
body.portal-status-master #status-card .kpi .icon{
  flex:0 0 auto!important;
}
body.portal-status-master #status-card > div:last-child{
  margin-top:auto!important;
}
body.portal-status-master #status-card .btn.secondary{
  border-radius:18px!important;
  font-size:14px!important;
  background:#fff1f2!important;
  border-color:#fecdd3!important;
  color:#e11d48!important;
}
body.portal-status-master #status-card .btn.secondary:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 32px rgba(225,29,72,.12)!important;
}

/* تقویم: ستون کامل اما بدون کادر اضافه و با iframe پر */
body.portal-status-master #calnote-card .card-head{
  min-height:auto!important;
}

body.portal-status-master .footer{
  width:min(var(--v5-max), calc(100% - 44px));
  margin:0 auto!important;
  padding:0 0 16px!important;
  color:#64748b!important;
}
@media(max-width:860px){
  body.portal-status-master .header .bar,
  body.portal-status-master .container,
  body.portal-status-master .footer{width:calc(100% - 24px)!important;}
  body.portal-status-master #portal-grid.grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:560px){
  body.portal-status-master .brand img{height:58px!important;}
  body.portal-status-master .title::after{display:none;}
  body.portal-status-master #portal-grid.grid{grid-template-columns:1fr!important;}
  body.portal-status-master .portal-hero{padding:18px;}
  body.portal-status-master .portal-hero h2{font-size:21px;}
}
body.portal-status-master{
  --v6-max: 1540px;
  --v6-side: 300px;
  --v6-gap: 18px;
  --v6-min: clamp(690px, calc(100vh - 172px), 780px);
}
body.portal-status-master .header .bar{
  width:min(var(--v6-max), calc(100% - 40px))!important;
}
body.portal-status-master .container{
  width:min(var(--v6-max), calc(100% - 40px))!important;
  min-height:var(--v6-min)!important;
  margin:16px auto 22px!important;
  grid-template-columns:var(--v6-side) minmax(0,1fr) var(--v6-side)!important;
  gap:var(--v6-gap)!important;
}
body.portal-status-master .container > .card{
  min-height:var(--v6-min)!important;
  border-radius:26px!important;
}
body.portal-status-master .pad,
body.portal-status-master #shortcuts-card,
body.portal-status-master #status-card,
body.portal-status-master #calnote-card{
  padding:18px!important;
}
body.portal-status-master #shortcuts-card{
  gap:12px!important;
}
body.portal-status-master #shortcuts-card .section{
  min-height:38px!important;
}
body.portal-status-master #shortcuts-card .section h3,
body.portal-status-master #calnote-card .card-head h3,
body.portal-status-master #status-card h3{
  font-size:16px!important;
}
body.portal-status-master .section-subtitle{
  font-size:11.5px!important;
  margin-top:2px!important;
}

/* Hero کوچک‌تر تا فضا برای ۱۲ کاشی واقعی باز شود */
body.portal-status-master .portal-hero{
  padding:16px 20px!important;
  border-radius:22px!important;
  box-shadow:0 14px 30px rgba(37,99,235,.16)!important;
}
body.portal-status-master .portal-hero h2{
  margin:8px 0 2px!important;
  font-size:21px!important;
  letter-spacing:-.55px!important;
}
body.portal-status-master .portal-hero p{
  font-size:12px!important;
  line-height:1.6!important;
}

/* گرید مادر: ظرفیت استاندارد ۴ ردیف سه‌تایی */
body.portal-status-master #portal-grid.grid{
  display:grid!important;
  gap:11px!important;
  scrollbar-width:thin;
}
body.portal-status-master #portal-grid.grid::-webkit-scrollbar{width:5px;height:5px;}
body.portal-status-master #portal-grid.grid::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:999px;}
body.portal-status-master .tile{
  min-height:0!important;
  height:100%!important;
  padding:14px 12px 12px!important;
  border-radius:20px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  background:
    radial-gradient(170px 90px at 78% -18%, rgba(37,99,235,.14), transparent 68%),
    linear-gradient(145deg,#ffffff 0%,#f8fbff 100%)!important;
  box-shadow:0 10px 24px rgba(15,23,42,.065)!important;
}
body.portal-status-master .tile::before{
  background:
    linear-gradient(90deg,#2563eb,#22c1b5) top/100% 3px no-repeat,
    radial-gradient(88px 60px at 50% 26%,rgba(37,99,235,.12),transparent 72%)!important;
}
body.portal-status-master .tile:hover,
body.portal-status-master .tile:focus-visible{
  transform:translateY(-4px) scale(1.008)!important;
  box-shadow:0 18px 44px rgba(37,99,235,.16)!important;
}
body.portal-status-master .tile .icon{
  width:48px!important;
  height:48px!important;
  border-radius:17px!important;
  font-size:20px!important;
  margin:0!important;
  box-shadow:0 12px 24px rgba(37,99,235,.24)!important;
}
body.portal-status-master .tile .meta{
  width:100%!important;
  gap:2px!important;
  text-align:center!important;
  align-items:center!important;
}
body.portal-status-master .tile .name{
  font-size:13.5px!important;
  line-height:1.45!important;
  color:#123fae!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  max-width:100%!important;
}
body.portal-status-master .tile .hint{
  font-size:10.5px!important;
  line-height:1.35!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  max-width:100%!important;
}
body.portal-status-master .tile .star{
  width:26px!important;
  height:26px!important;
  border-radius:10px!important;
  top:8px!important;
  left:8px!important;
  font-size:13px!important;
}
body.portal-status-master .tile .ticket-badge{
  top:7px!important;
  right:8px!important;
  min-width:21px!important;
  height:21px!important;
  font-size:11px!important;
}
body.portal-status-master .tile .task-badge{
  top:7px!important;
  left:8px!important;
  min-width:21px!important;
  height:21px!important;
  padding:0 6px!important;
  font-size:11px!important;
  box-shadow:0 10px 20px rgba(6,182,212,.28)!important;
}

/* تقویم: والد تمیزتر و خواناتر */

/* وضعیت اتصال کمی جمع‌تر تا با صفحه مادر هماهنگ شود */
body.portal-status-master #status-card .kpis{
  gap:11px!important;
  margin-top:14px!important;
}
body.portal-status-master #status-card .kpi{
  min-height:78px!important;
  padding:12px!important;
  border-radius:20px!important;
}
body.portal-status-master #status-card .kpi:first-child,
body.portal-status-master #status-card .kpi[data-kind="username-kpi"]{
  min-height:92px!important;
}
body.portal-status-master #status-card .kpi .icon{
  width:44px!important;
  height:44px!important;
  border-radius:16px!important;
}
body.portal-status-master #status-card strong{
  font-size:16px!important;
}
body.portal-status-master #status-card .btn.secondary{
  height:48px!important;
}

@media(max-width:1280px){
  body.portal-status-master .container{
    grid-template-columns:1fr!important;
    min-height:auto!important;
  }
  body.portal-status-master .container > .card{min-height:auto!important;}
  body.portal-status-master #shortcuts-card{order:1;}
  body.portal-status-master #status-card{order:2;}
  body.portal-status-master #calnote-card{order:3;min-height:620px!important;}
  body.portal-status-master #portal-grid.grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-template-rows:none!important;
    grid-auto-rows:118px!important;
    max-height:none!important;
  }
  body.portal-status-master .tile{height:auto!important;min-height:118px!important;}
  body.portal-status-master #calendar-panel iframe{min-height:520px!important;}
}
@media(max-width:760px){
  body.portal-status-master .tile{min-height:112px!important;}
}
@media(max-width:520px){
  body.portal-status-master .tile{min-height:104px!important;}
}
body.portal-status-master #calnote-card{
  overflow:hidden!important;
}
body.portal-status-master #calnote-card{
  padding:22px!important;
  display:flex!important;
  flex-direction:column!important;
}
body.portal-status-master #calnote-card .card-head{
  margin:0!important;
  padding:0!important;
  flex:0 0 auto!important;
}
body.portal-status-master #calendar-panel{
  flex:0 0 auto!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
}
body.portal-status-master #calendar-panel::before,
body.portal-status-master #motd-panel::before{
  display:none!important;
  content:none!important;
}
body.portal-status-master #calendar-panel iframe{
  display:block!important;
  width:100%!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
}
body.portal-status-master #motd-panel,
body.portal-status-master #motd-panel.motd-inline{
  color:var(--text)!important;
  backdrop-filter:none!important;
}
@media(max-width:760px){
  body.portal-status-master #calendar-panel iframe{
    height:400px!important;
    min-height:400px!important;
    max-height:400px!important;
  }
}
body.portal-status-master #shortcuts-card{
  align-items:stretch!important;
}
body.portal-status-master #portal-grid.grid{
  flex:0 0 auto!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-template-rows:none!important;
  grid-auto-rows:112px!important;
  align-content:start!important;
  overflow:visible!important;
  max-height:none!important;
  padding:2px!important;
}
body.portal-status-master #banner.banner{
  display:block!important;
}
@media(max-width:1180px){
  body.portal-status-master #portal-grid.grid{grid-auto-rows:108px!important;}
}
@media(max-width:760px){
  body.portal-status-master #portal-grid.grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-auto-rows:110px!important;
  }
}
@media(max-width:520px){
  body.portal-status-master #portal-grid.grid{
    grid-template-columns:1fr!important;
    grid-auto-rows:106px!important;
  }
}
body.portal-status-master #status-card .kpi{
  text-align:center!important;
}
body.portal-status-master #status-card .kpi .kpi-body,
body.portal-status-master #status-card .kpi > div:not(.icon){
  flex:1 1 auto!important;
  min-width:0!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
}
body.portal-status-master #status-card .kpi .label,
body.portal-status-master #status-card .kpi strong,
body.portal-status-master #status-card #kpi-io-breakdown{
  text-align:center!important;
}
body.portal-status-master .portal-hero__logos{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:center;
}
body.portal-status-master .portal-hero__logo-card{
  display:grid;
  place-items:center;
  overflow:hidden;
}
body.portal-status-master .portal-hero__logo-card img{
  object-fit:contain;
  display:block;
}
@media(max-width:760px){
  body.portal-status-master .portal-hero__logos{
    top:auto;
    bottom:16px;
  }
}
@keyframes v12LogoFloatMobile{
  0%,100%{transform:translateX(-50%) translateY(0) rotate(0deg)}
  50%{transform:translateX(-50%) translateY(-8px) rotate(8deg)}
}
body.portal-status-master .portal-hero__logos{
  direction:ltr!important;
  gap:12px!important;
  animation:none!important;
}
body.portal-status-master .portal-hero__logo-card{
  border:1px solid rgba(255,255,255,.94)!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.98),
    0 14px 28px rgba(15,23,42,.13),
    0 0 0 1px rgba(59,130,246,.08)!important;
  backdrop-filter:blur(14px) saturate(1.15)!important;
  animation:v13LogoCardFloat 3.8s ease-in-out infinite!important;
}
body.portal-status-master .portal-hero__logo-card:nth-child(2){animation-delay:.18s!important;}
body.portal-status-master .portal-hero__logo-card:nth-child(3){animation-delay:.36s!important;}
body.portal-status-master .portal-hero__logo-card:nth-child(4){animation-delay:.54s!important;}
body.portal-status-master .portal-hero__logo-card img{
  filter:drop-shadow(0 8px 12px rgba(15,23,42,.12))!important;
}
@keyframes v13LogoCardFloat{
  0%,100%{transform:translateY(0) rotate(0deg) scale(1);}
  45%{transform:translateY(-9px) rotate(4deg) scale(1.045);}
  70%{transform:translateY(-3px) rotate(-2deg) scale(1.015);}
}
@media(max-width:1280px){
  body.portal-status-master .portal-hero__logo-card{border-radius:20px!important;}
}
@media(max-width:760px){
  body.portal-status-master .portal-hero__logos{
    left:50%!important;
    transform:translateX(-50%)!important;
    animation:none!important;
  }
  body.portal-status-master .portal-hero__logo-card{border-radius:17px!important;}
}
body.portal-status-master .header{
  background:transparent!important;
  border-bottom:0!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  padding:8px 0 6px!important;
}
body.portal-status-master .brand img{
  width:auto!important;
  filter:drop-shadow(0 10px 18px rgba(37,99,235,.14))!important;
}
body.portal-status-master .title::after{
  content:none!important;
  display:none!important;
}
body.portal-status-master .portal-hero{
  justify-content:flex-start!important;
}
body.portal-status-master .portal-hero__logos{
  margin-inline-start:0!important;
}
body.portal-status-master .tile .icon.icon--image{
  background:rgba(255,255,255,.78)!important;
  border:1px solid rgba(207,224,255,.95)!important;
  box-shadow:0 12px 26px rgba(37,99,235,.14)!important;
  overflow:hidden!important;
}
body.portal-status-master .tile .icon.icon--image img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  display:block!important;
  padding:6px!important;
  filter:none!important;
}
body.portal-status-master .portal-hero__content{
  display:block!important;
  position:relative!important;
  z-index:2!important;
  text-align:right!important;
}
body.portal-status-master .portal-hero__content h2{
  display:block!important;
  margin:0!important;
  color:#fff!important;
  font-size:24px!important;
  line-height:1.45!important;
  font-weight:950!important;
  letter-spacing:-.7px!important;
  text-shadow:0 6px 18px rgba(15,23,42,.18)!important;
}
@media(max-width:1280px){
  body.portal-status-master .portal-hero__content h2{font-size:21px!important;}
}
@media(max-width:760px){
  body.portal-status-master .portal-hero__content h2{font-size:19px!important;text-align:center!important;}
}
body.portal-status-master .brand img{
  height:106px!important;
  max-height:106px!important;
}
body.portal-status-master .header .bar{
  min-height:112px!important;
}
body.portal-status-master #results-count{
  display:none!important;
}
body.portal-status-master .tile .star{
  display:none!important;
}
body.portal-status-master .portal-hero{
  width:100%!important;
  min-height:86px!important;
  padding-left:370px!important;
}
body.portal-status-master .portal-hero__logos{
  left:22px!important;
}
body.portal-status-master .portal-hero__logo-card{
  width:66px!important;
  height:66px!important;
  border-radius:22px!important;
  background:rgba(255,255,255,.92)!important;
}
body.portal-status-master .portal-hero__logo-card img{
  width:56px!important;
  height:56px!important;
}
body.portal-status-master .tile{
  cursor:grab!important;
  user-select:none!important;
}
body.portal-status-master .tile:active{
  cursor:grabbing!important;
}
body.portal-status-master .tile.is-tile-dragging{
  opacity:.62!important;
  transform:scale(.985)!important;
  box-shadow:0 22px 54px rgba(37,99,235,.20)!important;
}
body.portal-status-master #portal-grid.is-reordering .tile:not(.is-tile-dragging){
  transition:transform .16s ease, box-shadow .16s ease!important;
}
@media(max-width:1280px){
  body.portal-status-master .brand img{height:92px!important;max-height:92px!important;}
  body.portal-status-master .header .bar{min-height:100px!important;}
  body.portal-status-master .portal-hero{padding-left:320px!important;}
  body.portal-status-master .portal-hero__logo-card{width:58px!important;height:58px!important;}
  body.portal-status-master .portal-hero__logo-card img{width:50px!important;height:50px!important;}
}
@media(max-width:760px){
  body.portal-status-master .brand img{height:74px!important;max-height:74px!important;}
  body.portal-status-master .header .bar{min-height:84px!important;}
  body.portal-status-master .portal-hero{padding-left:18px!important;padding-bottom:94px!important;}
  body.portal-status-master .portal-hero__logo-card{width:50px!important;height:50px!important;}
  body.portal-status-master .portal-hero__logo-card img{width:42px!important;height:42px!important;}
}
body.portal-status-master #banner.banner{
  order:30!important;
  flex:0 0 auto!important;
  width:100%!important;
  min-height:88px!important;
  height:88px!important;
  margin-top:12px!important;
  padding:0!important;
  border:0!important;
  border-radius:20px!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:hidden!important;
}
body.portal-status-master #banner iframe{
  display:block!important;
  width:100%!important;
  min-height:88px!important;
  height:88px!important;
  max-height:88px!important;
  border:0!important;
  border-radius:20px!important;
  background:transparent!important;
  overflow:hidden!important;
}
body.portal-status-master #motd-panel,
body.portal-status-master #motd-panel.motd-inline{
  display:block!important;
  flex:0 0 auto!important;
  width:100%!important;
  margin:2px 0 0!important;
  padding:0!important;
  border:0!important;
  border-radius:18px!important;
  background:transparent!important;
  box-shadow:none!important;
}
body.portal-status-master #motd-panel iframe{
  display:block!important;
  width:100%!important;
  border:0!important;
  border-radius:18px!important;
  background:transparent!important;
}
body.portal-status-master #calnote-card{
  gap:13px!important;
}
@media(max-width:760px){
  body.portal-status-master #banner.banner,
  body.portal-status-master #banner iframe{
    min-height:102px!important;
    height:102px!important;
    max-height:102px!important;
  }
}
body.portal-status-master #calendar-panel{
  height:auto!important;
  min-height:560px!important;
  max-height:none!important;
  overflow:visible!important;
}
body.portal-status-master #calendar-panel iframe{
  height:560px!important;
  min-height:560px!important;
  max-height:none!important;
  overflow:hidden!important;
}
body.portal-status-master #motd-panel,
body.portal-status-master #motd-panel.motd-inline{
  height:150px!important;
  min-height:150px!important;
  max-height:150px!important;
  overflow:hidden!important;
}
body.portal-status-master #motd-panel iframe{
  height:150px!important;
  min-height:150px!important;
  max-height:150px!important;
  overflow:hidden!important;
}
@media(max-width:760px){
  body.portal-status-master #calendar-panel,
  body.portal-status-master #calendar-panel iframe{
    height:560px!important;
    min-height:560px!important;
    max-height:none!important;
  }
  body.portal-status-master #motd-panel,
  body.portal-status-master #motd-panel.motd-inline,
  body.portal-status-master #motd-panel iframe{
    height:158px!important;
    min-height:158px!important;
    max-height:158px!important;
  }
}

/* ============================
   Portal external auth gate
   ============================ */
html.portal-auth-locked,
body.portal-auth-locked{
  overflow:hidden!important;
}
body.portal-auth-locked > .header,
body.portal-auth-locked > .container,
body.portal-auth-locked > .footer{
  filter:blur(10px) saturate(.92);
  pointer-events:none;
  user-select:none;
}
#portal-auth-gate,
#portal-auth-gate-checking{
  position:fixed;
  inset:0;
  z-index:999999;
  display:grid;
  place-items:center;
  padding:24px;
  background:
    radial-gradient(720px 420px at 80% 12%, rgba(37,99,235,.24), transparent 62%),
    radial-gradient(560px 340px at 12% 82%, rgba(15,118,110,.20), transparent 66%),
    rgba(6,16,35,.70);
  backdrop-filter:blur(18px) saturate(1.15);
  direction:rtl;
}
.portal-auth-card,
.portal-auth-check-card{
  width:min(460px, calc(100vw - 36px));
  background:rgba(255,255,255,.96);
  border:1px solid rgba(219,234,254,.92);
  border-radius:30px;
  box-shadow:0 34px 100px rgba(2,6,23,.32), inset 0 1px 0 rgba(255,255,255,.85);
  color:#0f172a;
  overflow:hidden;
  position:relative;
  isolation:isolate;
}
.portal-auth-card::before,
.portal-auth-check-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:5px;
  background:linear-gradient(90deg,#2563eb,#0ea5e9,#0f766e);
}
.portal-auth-brand{
  display:flex;
  align-items:center;
  gap:14px;
  padding:24px 24px 16px;
}
.portal-auth-brand img,
.portal-auth-check-card img{
  width:64px;
  height:64px;
  object-fit:contain;
  border-radius:20px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  padding:8px;
  flex:0 0 auto;
}
.portal-auth-brand h1{
  margin:0 0 4px;
  font-size:1.16rem;
  font-weight:950;
  color:#020617;
}
.portal-auth-brand p{
  margin:0;
  color:#64748b;
  font-size:.84rem;
  font-weight:750;
  line-height:1.8;
}
#portal-auth-form{
  padding:0 24px 18px;
  display:grid;
  gap:13px;
}
.portal-auth-field{
  display:grid;
  gap:7px;
}
.portal-auth-field span{
  color:#475569;
  font-size:.8rem;
  font-weight:900;
}
.portal-auth-field input{
  width:100%;
  height:46px;
  border:1px solid #dbeafe;
  border-radius:15px;
  background:#f8fbff;
  color:#0f172a;
  padding:0 14px;
  outline:none;
  font-family:inherit;
  font-weight:800;
  direction:ltr;
  text-align:left;
  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.portal-auth-field input:focus{
  border-color:#60a5fa;
  background:#fff;
  box-shadow:0 0 0 4px rgba(96,165,250,.18);
}
#portal-auth-submit{
  height:47px;
  border:0;
  border-radius:16px;
  cursor:pointer;
  font-family:inherit;
  font-weight:950;
  color:#fff;
  background:linear-gradient(135deg,#2563eb,#0f766e);
  box-shadow:0 16px 36px rgba(37,99,235,.26);
  transition:transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
#portal-auth-submit:hover:not(:disabled){
  transform:translateY(-1px);
  box-shadow:0 22px 42px rgba(37,99,235,.30);
}
#portal-auth-submit:disabled{
  opacity:.68;
  cursor:wait;
}
.portal-auth-message{
  min-height:22px;
  color:#dc2626;
  font-size:.84rem;
  font-weight:850;
  line-height:1.8;
  text-align:center;
}
.portal-auth-message.is-ok{
  color:#059669;
}
.portal-auth-foot{
  padding:13px 24px 18px;
  border-top:1px solid #edf2f7;
  color:#64748b;
  font-size:.76rem;
  font-weight:800;
  text-align:center;
  background:linear-gradient(180deg,rgba(248,250,252,.70),rgba(241,245,249,.88));
}
.portal-auth-check-card{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  padding:30px 24px 26px;
  text-align:center;
}
.portal-auth-check-card strong{
  font-size:1.04rem;
  font-weight:950;
}
.portal-auth-check-card span{
  color:#64748b;
  font-size:.86rem;
  font-weight:800;
}
.portal-auth-check-card::after{
  content:"";
  width:34px;
  height:34px;
  border-radius:50%;
  border:3px solid #dbeafe;
  border-top-color:#2563eb;
  animation:portalAuthSpin .8s linear infinite;
  margin-top:4px;
}
@keyframes portalAuthSpin{to{transform:rotate(360deg)}}
@media(max-width:560px){
  #portal-auth-gate,
  #portal-auth-gate-checking{padding:18px}
  .portal-auth-brand{align-items:flex-start;padding:22px 18px 14px}
  #portal-auth-form{padding:0 18px 16px}
  .portal-auth-foot{padding:12px 18px 16px}
}

/* ============================
   Portal SMS OTP + Phone Verification
   ============================ */
.portal-auth-step{
  display:grid;
  gap:13px;
}
.portal-auth-step.is-hidden{
  display:none!important;
}
.portal-auth-otp-info{
  border:1px solid #bbf7d0;
  background:linear-gradient(180deg,#f0fdf4,#ecfeff);
  color:#166534;
  border-radius:16px;
  padding:12px 14px;
  font-size:.84rem;
  font-weight:900;
  line-height:1.9;
  text-align:center;
}
.portal-auth-field--otp input{
  text-align:center!important;
  letter-spacing:8px;
  font-size:1.16rem;
  font-weight:950;
}
.portal-auth-linkbtn{
  width:100%;
  border:0;
  background:transparent;
  color:#2563eb;
  font-family:inherit;
  font-weight:900;
  cursor:pointer;
  padding:2px 0 4px;
}
.portal-auth-linkbtn:hover{
  color:#0f766e;
}

body.portal-status-master #status-card .portal-phone-kpi{
  position:relative;
  overflow:visible!important;
  cursor:default;
}
body.portal-status-master #status-card .portal-phone-kpi.is-verified{
  border-color:#bbf7d0!important;
  background:linear-gradient(145deg,#ffffff,#f0fdf4)!important;
}
body.portal-status-master #status-card .portal-phone-kpi.is-empty{
  border-color:#fed7aa!important;
  background:linear-gradient(145deg,#ffffff,#fff7ed)!important;
}
body.portal-status-master #status-card .portal-phone-kpi.is-verified .icon{
  background:linear-gradient(135deg,#dcfce7,#bbf7d0)!important;
  color:#047857!important;
}
body.portal-status-master #status-card .portal-phone-kpi.is-empty .icon{
  background:linear-gradient(135deg,#ffedd5,#fed7aa)!important;
  color:#ea580c!important;
}
body.portal-status-master #status-card .portal-phone-kpi .kpi-body{
  width:100%;
  min-width:0;
}
body.portal-status-master #status-card .portal-phone-kpi-main{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
}
body.portal-status-master #status-card .portal-phone-kpi-main strong{
  flex:1 1 auto;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  text-align:left;
  direction:ltr;
}
body.portal-status-master #status-card .portal-phone-kpi-action{
  flex:0 0 auto;
  height:34px!important;
  min-height:34px!important;
  padding:0 12px!important;
  border-radius:13px!important;
  border:1px solid #bfdbfe!important;
  background:#eff6ff!important;
  color:#2563eb!important;
  box-shadow:none!important;
  font-family:inherit!important;
  font-size:.75rem!important;
  font-weight:950!important;
  cursor:pointer;
}
body.portal-status-master #status-card .portal-phone-kpi.is-empty .portal-phone-kpi-action{
  border-color:#2563eb!important;
  background:linear-gradient(135deg,#2563eb,#1d4ed8)!important;
  color:#fff!important;
  box-shadow:0 10px 22px rgba(37,99,235,.18)!important;
}
body.portal-status-master #status-card .portal-phone-kpi-action:hover{
  transform:translateY(-1px);
}

#modal-root .portal-phone-modal-backdrop{
  background:rgba(15,23,42,.50)!important;
  backdrop-filter:blur(10px);
}
#modal-root .portal-phone-auth-modal,
#modal-root .portal-phone-auth-modal *{
  box-sizing:border-box;
  font-family:inherit;
}
#modal-root .portal-phone-auth-modal{
  width:min(430px,calc(100vw - 32px))!important;
  border:1px solid rgba(191,219,254,.95)!important;
  border-radius:28px!important;
  background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
  box-shadow:0 28px 80px rgba(15,23,42,.22)!important;
  color:#0f172a!important;
  direction:rtl;
  overflow:hidden;
}
#modal-root .portal-phone-modal-head{
  display:flex;
  align-items:flex-start;
  gap:13px;
  padding:18px 18px 14px;
  border-bottom:1px solid #e8eef8;
  background:linear-gradient(135deg,#eff6ff,#ffffff 68%);
}
#modal-root .portal-phone-modal-head strong{
  display:block;
  color:#0f172a;
  font-size:1.02rem;
  font-weight:950;
  line-height:1.7;
}
#modal-root .portal-phone-modal-head span{
  display:block;
  color:#64748b;
  font-size:.78rem;
  font-weight:750;
  line-height:1.9;
}
#modal-root .portal-phone-modal-close{
  flex:0 0 auto;
  width:36px!important;
  height:36px!important;
  min-height:36px!important;
  border:1px solid #dbeafe!important;
  border-radius:14px!important;
  background:#fff!important;
  color:#2563eb!important;
  box-shadow:none!important;
  cursor:pointer;
}
#modal-root .portal-phone-modal-body{
  padding:18px;
}
#modal-root .portal-phone-modal-field{
  display:flex;
  flex-direction:column;
  gap:8px;
  color:#334155!important;
  font-size:.78rem;
  font-weight:900;
}
#modal-root .portal-phone-modal-field input{
  width:100%;
  height:48px;
  border:1px solid #dbeafe!important;
  border-radius:16px!important;
  background:#fff!important;
  color:#0f172a!important;
  outline:none;
  padding:0 14px!important;
  font-size:1rem;
  font-weight:950;
  text-align:left;
  direction:ltr;
  box-shadow:0 1px 0 rgba(15,23,42,.02)!important;
}
#modal-root .portal-phone-modal-field input:focus{
  border-color:#60a5fa!important;
  box-shadow:0 0 0 4px rgba(96,165,250,.16)!important;
}
#modal-root .portal-phone-modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:14px;
}
#modal-root .portal-phone-modal-actions--split{
  justify-content:space-between;
}
#modal-root .portal-phone-modal-primary,
#modal-root .portal-phone-modal-secondary{
  height:44px!important;
  min-height:44px!important;
  border-radius:15px!important;
  padding:0 16px!important;
  font-family:inherit!important;
  font-size:.82rem!important;
  font-weight:950!important;
  cursor:pointer;
}
#modal-root .portal-phone-modal-primary{
  border:0!important;
  background:linear-gradient(135deg,#2563eb,#0f766e)!important;
  color:#fff!important;
  box-shadow:0 16px 34px rgba(37,99,235,.22)!important;
}
#modal-root .portal-phone-modal-secondary{
  border:1px solid #cbd5e1!important;
  background:#fff!important;
  color:#475569!important;
  box-shadow:none!important;
}
#modal-root .portal-phone-modal-primary:disabled,
#modal-root .portal-phone-modal-secondary:disabled,
#modal-root .portal-phone-modal-field input:disabled{
  opacity:.62;
  cursor:wait;
}
#modal-root .portal-phone-modal-message{
  min-height:24px;
  margin-top:12px;
  color:#dc2626;
  font-size:.78rem;
  font-weight:900;
  line-height:1.8;
  text-align:center;
}
#modal-root .portal-phone-modal-message.is-ok{
  color:#047857;
}
#modal-root .portal-phone-auth-modal--success{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:11px;
  padding:26px 22px!important;
}
#modal-root .portal-phone-success-mark{
  width:62px;
  height:62px;
  border-radius:22px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#dcfce7,#bbf7d0);
  color:#047857;
  font-size:2rem;
  font-weight:950;
  box-shadow:0 16px 34px rgba(4,120,87,.18);
}
#modal-root .portal-phone-auth-modal--success strong{
  color:#0f172a;
  font-size:1.05rem;
  font-weight:950;
}
#modal-root .portal-phone-auth-modal--success p{
  margin:0 0 4px;
  color:#64748b;
  font-size:.82rem;
  font-weight:800;
  line-height:1.9;
}
@media(max-width:560px){
  body.portal-status-master #status-card .portal-phone-kpi-main{
    align-items:flex-start;
    flex-direction:column;
  }
  body.portal-status-master #status-card .portal-phone-kpi-action{
    width:100%;
  }
  #modal-root .portal-phone-auth-modal{
    width:calc(100vw - 18px)!important;
    border-radius:24px!important;
  }
  #modal-root .portal-phone-modal-actions,
  #modal-root .portal-phone-modal-actions--split{
    flex-direction:column-reverse;
  }
  #modal-root .portal-phone-modal-primary,
  #modal-root .portal-phone-modal-secondary{
    width:100%;
  }
}


/* Personal information tile/modal */
body.portal-status-master #status-card .portal-personal-kpi-main{
  align-items:flex-start;
}
#modal-root .portal-phone-modal-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-bottom:12px;
}
#modal-root .portal-phone-modal-field input[data-profile-first-name],
#modal-root .portal-phone-modal-field input[data-profile-last-name]{
  direction:rtl!important;
  text-align:right!important;
}
@media(max-width:560px){
  #modal-root .portal-phone-modal-grid{
    grid-template-columns:1fr;
    gap:10px;
  }
}

/* Personal information KPI refinement: match all sidebar cards */
body.portal-status-master #status-card .portal-phone-kpi,
body.portal-status-master #status-card .portal-phone-kpi.is-verified,
body.portal-status-master #status-card .portal-phone-kpi.is-empty{
  border-color:var(--border)!important;
  background:linear-gradient(145deg,#fff,#f8fbff)!important;
  box-shadow:var(--shadow-sm)!important;
}
body.portal-status-master #status-card .portal-phone-kpi .icon,
body.portal-status-master #status-card .portal-phone-kpi.is-verified .icon,
body.portal-status-master #status-card .portal-phone-kpi.is-empty .icon{
  background:linear-gradient(135deg,#eff6ff,#dbeafe)!important;
  color:#2563eb!important;
  box-shadow:inset 0 0 0 1px rgba(37,99,235,.10),0 12px 24px rgba(37,99,235,.11)!important;
}
body.portal-status-master #status-card .portal-phone-kpi-main,
body.portal-status-master #status-card .portal-personal-kpi-main{
  width:100%;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  min-width:0;
}
body.portal-status-master #status-card .portal-phone-kpi-main strong,
body.portal-status-master #status-card .portal-personal-kpi-main strong{
  flex:1 1 auto;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  text-align:right!important;
  direction:rtl!important;
  color:#0f172a!important;
  font-weight:950!important;
}
body.portal-status-master #status-card .portal-phone-kpi-action,
body.portal-status-master #status-card .portal-phone-kpi.is-empty .portal-phone-kpi-action,
body.portal-status-master #status-card .portal-phone-kpi.is-verified .portal-phone-kpi-action{
  width:30px!important;
  min-width:30px!important;
  height:30px!important;
  min-height:30px!important;
  padding:0!important;
  border:0!important;
  outline:0!important;
  border-radius:50%!important;
  background:transparent!important;
  color:#64748b!important;
  box-shadow:none!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-family:inherit!important;
  font-size:18px!important;
  line-height:1!important;
  font-weight:900!important;
  cursor:pointer;
}
body.portal-status-master #status-card .portal-phone-kpi-action:hover,
body.portal-status-master #status-card .portal-phone-kpi-action:focus-visible{
  background:transparent!important;
  color:#2563eb!important;
  box-shadow:none!important;
  transform:rotate(22deg)!important;
}
body.portal-status-master #status-card .portal-phone-kpi-action:disabled{
  opacity:.55!important;
  cursor:wait;
  transform:none!important;
}
@media(max-width:560px){
  body.portal-status-master #status-card .portal-phone-kpi-main,
  body.portal-status-master #status-card .portal-personal-kpi-main{
    flex-direction:row!important;
    align-items:center!important;
  }
}


/* Personal profile validation + inline Jalali birth-date picker */
#modal-root .portal-phone-auth-modal--profile{
  max-height:calc(100vh - 24px);
}
#modal-root .portal-phone-auth-modal--profile .portal-phone-modal-body{
  max-height:calc(100vh - 112px);
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
#modal-root .portal-birth-date-input-wrap{
  display:flex;
  align-items:center;
  gap:8px;
}
#modal-root .portal-birth-date-input-wrap input{
  flex:1 1 auto;
  cursor:pointer;
}
#modal-root .portal-birth-date-open{
  flex:0 0 44px!important;
  width:44px!important;
  height:44px!important;
  min-height:44px!important;
  border:1px solid #dbeafe!important;
  border-radius:15px!important;
  background:#f8fbff!important;
  color:#2563eb!important;
  box-shadow:none!important;
  cursor:pointer;
  font-size:1rem!important;
}
#modal-root .portal-birth-date-inline[hidden]{
  display:none!important;
}
#modal-root .portal-birth-date-inline{
  margin:-1px 0 14px;
  border:1px solid #dbeafe;
  border-radius:20px;
  background:#fff;
  box-shadow:0 12px 32px rgba(15,23,42,.08);
  overflow:hidden;
  animation:portalBirthDateInlineIn .18s ease both;
}
@keyframes portalBirthDateInlineIn{
  from{opacity:0;transform:translateY(-5px)}
  to{opacity:1;transform:none}
}
#modal-root .portal-birth-date-picker{
  width:100%;
  background:#fff;
  direction:rtl;
}
#modal-root .portal-birth-date-picker-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-bottom:1px solid #e8eef8;
  background:linear-gradient(135deg,#eff6ff,#fff);
}
#modal-root .portal-birth-date-picker-head strong{
  color:#0f172a;
  font-size:.88rem;
  font-weight:950;
}
#modal-root .portal-birth-date-picker-head button{
  min-height:32px!important;
  border:1px solid #dbeafe!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#2563eb!important;
  padding:0 12px!important;
  box-shadow:none!important;
  cursor:pointer;
  font-size:.75rem!important;
  font-weight:900!important;
}
#modal-root .portal-birth-date-picker-controls{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  padding:12px 14px 7px;
}
#modal-root .portal-birth-date-picker-controls label{
  display:flex;
  flex-direction:column;
  gap:6px;
  color:#475569;
  font-size:.72rem;
  font-weight:900;
}
#modal-root .portal-birth-date-picker-controls select{
  width:100%;
  height:40px;
  border:1px solid #dbeafe!important;
  border-radius:13px!important;
  background:#fff!important;
  color:#0f172a!important;
  padding:0 10px;
  font-family:inherit;
  font-weight:900;
  outline:none;
}
#modal-root .portal-birth-date-picker-controls select:focus{
  border-color:#60a5fa!important;
  box-shadow:0 0 0 3px rgba(96,165,250,.14)!important;
}
#modal-root .portal-birth-date-picker-days{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:5px;
  padding:9px 14px 13px;
}
#modal-root .portal-birth-date-picker-days button{
  width:100%!important;
  height:34px!important;
  min-height:34px!important;
  border:1px solid #e2e8f0!important;
  border-radius:11px!important;
  background:#f8fafc!important;
  color:#0f172a!important;
  box-shadow:none!important;
  font-size:.8rem!important;
  font-weight:900!important;
  cursor:pointer;
}
#modal-root .portal-birth-date-picker-days button:hover,
#modal-root .portal-birth-date-picker-days button.is-selected{
  background:#2563eb!important;
  border-color:#2563eb!important;
  color:#fff!important;
}
#modal-root .portal-birth-date-picker-actions{
  display:flex;
  padding:0 14px 14px;
}
#modal-root .portal-birth-date-picker-actions button{
  width:100%!important;
  min-height:42px!important;
  border:0!important;
  border-radius:13px!important;
  background:linear-gradient(135deg,#2563eb,#0f8ea8)!important;
  color:#fff!important;
  box-shadow:0 9px 22px rgba(37,99,235,.20)!important;
  font-size:.84rem!important;
  font-weight:950!important;
  cursor:pointer;
  transition:transform .18s ease,box-shadow .18s ease,filter .18s ease;
}
#modal-root .portal-birth-date-picker-actions button:hover{
  transform:translateY(-1px);
  box-shadow:0 13px 28px rgba(37,99,235,.26)!important;
  filter:saturate(1.08);
}
#modal-root .portal-birth-date-picker-actions button:active{
  transform:translateY(0);
}
@media(max-width:560px){
  #modal-root .portal-phone-auth-modal--profile{
    max-height:calc(100vh - 12px);
  }
  #modal-root .portal-phone-auth-modal--profile .portal-phone-modal-body{
    max-height:calc(100vh - 100px);
  }
}

/* =========================================================
   Smart assistant avatar — permission-gated, bottom-fixed in calendar card
   ========================================================= */
body.portal-status-master #calnote-card{
  position:relative!important;
}
body.portal-status-master #calnote-card.has-smart-assistant{
  padding-bottom:230px!important;
}
body.portal-status-master .portal-smart-assistant[hidden]{
  display:none!important;
}
body.portal-status-master button#portal-smart-assistant,
body.portal-status-master button#portal-smart-assistant:hover,
body.portal-status-master button#portal-smart-assistant:active,
body.portal-status-master button#portal-smart-assistant:focus{
  position:absolute!important;
  z-index:4!important;
  left:50%!important;
  right:auto!important;
  bottom:0!important;
  width:220px!important;
  height:220px!important;
  min-width:0!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  background:none!important;
  background-color:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
  filter:none!important;
  overflow:visible!important;
  cursor:pointer!important;
  appearance:none!important;
  -webkit-appearance:none!important;
  isolation:isolate;
  transform:translateX(-50%)!important;
}
body.portal-status-master .portal-smart-assistant:focus-visible{
  outline:3px solid rgba(37,99,235,.35)!important;
  outline-offset:3px!important;
  border-radius:20px!important;
}
body.portal-status-master .portal-smart-assistant__image{
  position:absolute!important;
  inset:auto 50% 0 auto!important;
  transform:translateX(50%)!important;
  display:block!important;
  width:auto!important;
  height:220px!important;
  max-width:100%!important;
  object-fit:contain!important;
  object-position:center bottom!important;
  pointer-events:none!important;
  user-select:none!important;
  -webkit-user-drag:none!important;
  transition:opacity .28s ease!important;
  scale:1!important;
}
body.portal-status-master button#portal-smart-assistant:hover .portal-smart-assistant__image,
body.portal-status-master button#portal-smart-assistant:active .portal-smart-assistant__image,
body.portal-status-master button#portal-smart-assistant:focus .portal-smart-assistant__image{
  transform:translateX(50%)!important;
  scale:1!important;
}
body.portal-status-master .portal-smart-assistant__image--idle{
  opacity:1!important;
  visibility:visible!important;
}
body.portal-status-master .portal-smart-assistant__image--wave{
  opacity:0!important;
  visibility:hidden!important;
}
body.portal-status-master .portal-smart-assistant.is-wave-active .portal-smart-assistant__image--idle{
  opacity:0!important;
  visibility:hidden!important;
}
body.portal-status-master .portal-smart-assistant.is-wave-active .portal-smart-assistant__image--wave{
  opacity:1!important;
  visibility:visible!important;
}
@media(max-width:1100px){
  body.portal-status-master #calnote-card.has-smart-assistant{padding-bottom:210px!important;}
  body.portal-status-master .portal-smart-assistant{width:200px!important;height:200px!important;}
  body.portal-status-master .portal-smart-assistant__image{height:200px!important;}
}
@media(max-width:760px){
  body.portal-status-master #calnote-card.has-smart-assistant{padding-bottom:190px!important;}
  body.portal-status-master .portal-smart-assistant{left:50%!important;right:auto!important;width:180px!important;height:180px!important;}
  body.portal-status-master .portal-smart-assistant__image{height:180px!important;}
}
@media(prefers-reduced-motion:reduce){
  body.portal-status-master .portal-smart-assistant__image{transition:none!important;}
}

/* =========================================================
   Smart assistant modal — portal-native, persistent chat
   ========================================================= */
body.portal-assistant-open{overflow:hidden!important;}
.portal-assistant-modal[hidden]{display:none!important;}
.portal-assistant-modal{
  position:fixed!important;
  inset:0!important;
  z-index:10050!important;
  display:grid!important;
  place-items:center!important;
  padding:24px!important;
  direction:rtl!important;
  font-family:inherit!important;
}
.portal-assistant-modal__backdrop{
  position:absolute!important;
  inset:0!important;
  background:rgba(21,34,48,.48)!important;
  backdrop-filter:blur(11px)!important;
  -webkit-backdrop-filter:blur(11px)!important;
}
.portal-assistant-dialog{
  position:relative!important;
  z-index:1!important;
  width:min(920px,calc(100vw - 40px))!important;
  height:min(680px,calc(100vh - 48px))!important;
  min-height:540px!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  overflow:hidden!important;
  color:#172238!important;
  border:1px solid rgba(14,148,136,.22)!important;
  border-radius:28px!important;
  background:#f8fcfd!important;
  box-shadow:0 32px 90px rgba(18,42,58,.28),0 0 0 1px rgba(255,255,255,.8) inset!important;
}
.portal-assistant-dialog::before{
  content:""!important;
  position:absolute!important;
  inset:0 0 auto 0!important;
  height:3px!important;
  background:linear-gradient(90deg,#2f73e8,#27c3bb,#0f8f84)!important;
  pointer-events:none!important;
}
.portal-assistant-header{
  position:relative!important;
  z-index:2!important;
  min-height:76px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  padding:13px 18px!important;
  border-bottom:1px solid rgba(18,98,107,.10)!important;
  background:linear-gradient(135deg,#fff 0%,#f2fbfc 100%)!important;
}
.portal-assistant-header__identity{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  min-width:0!important;
}
.portal-assistant-header__orb{
  width:38px!important;
  height:48px!important;
  flex:0 0 38px!important;
  display:grid!important;
  place-items:end center!important;
  overflow:visible!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.portal-assistant-header__orb::before,.portal-assistant-header__orb::after{display:none!important;}
.portal-assistant-header__orb img{
  display:block!important;
  width:auto!important;
  height:48px!important;
  max-width:none!important;
  object-fit:contain!important;
}
.portal-assistant-header h2{
  margin:0!important;
  color:#162338!important;
  font-size:17px!important;
  font-weight:950!important;
  line-height:1.4!important;
  white-space:nowrap!important;
}
.portal-assistant-header__actions{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
}
.portal-assistant-limit{
  min-height:34px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:6px 12px!important;
  border:1px solid rgba(15,143,132,.18)!important;
  border-radius:12px!important;
  color:#087b72!important;
  background:#e9f8f5!important;
  font-size:12px!important;
  font-weight:900!important;
  white-space:nowrap!important;
}
.portal-assistant-limit.is-exhausted{
  color:#b42318!important;
  border-color:rgba(220,38,38,.18)!important;
  background:#fff1f1!important;
}
.portal-assistant-close,
.portal-assistant-close:hover,
.portal-assistant-close:focus,
.portal-assistant-close:active{
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  border:1px solid rgba(15,143,132,.16)!important;
  border-radius:12px!important;
  color:#087b72!important;
  background:#eefaf8!important;
  box-shadow:none!important;
  font-size:23px!important;
  font-weight:600!important;
  line-height:1!important;
  cursor:pointer!important;
  transform:none!important;
}
.portal-assistant-close:hover{background:#ddf5f1!important;}
.portal-assistant-main{min-height:0!important;position:relative!important;overflow:hidden!important;}
.portal-assistant-view[hidden]{display:none!important;}
.portal-assistant-view{width:100%!important;height:100%!important;min-height:0!important;}
.portal-assistant-view--chooser{
  display:grid!important;
  place-content:center!important;
  justify-items:center!important;
  gap:34px!important;
  padding:38px 34px!important;
  background:
    radial-gradient(circle at 50% 46%,rgba(39,195,187,.10),transparent 34%),
    linear-gradient(180deg,#fbfefe 0%,#f5fbfc 100%)!important;
}
.portal-assistant-intro{margin:0!important;text-align:center!important;}
.portal-assistant-intro h3{
  margin:0!important;
  color:#172238!important;
  font-size:29px!important;
  font-weight:950!important;
  line-height:1.7!important;
}
.portal-assistant-modes{
  width:min(680px,100%)!important;
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:16px!important;
  margin:0 auto!important;
}
#portal-assistant-modal button.portal-assistant-mode,
#portal-assistant-modal button.portal-assistant-mode:hover,
#portal-assistant-modal button.portal-assistant-mode:focus-visible,
#portal-assistant-modal button.portal-assistant-mode:active{
  position:relative!important;
  min-height:190px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:14px!important;
  padding:22px 17px!important;
  overflow:hidden!important;
  border:1px solid rgba(15,143,132,.15)!important;
  border-radius:22px!important;
  color:#172238!important;
  background:linear-gradient(160deg,#fff 0%,#edf9f7 100%)!important;
  box-shadow:0 15px 34px rgba(22,95,101,.10)!important;
  text-align:center!important;
  cursor:pointer!important;
  transform:none!important;
  transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease!important;
}
#portal-assistant-modal button.portal-assistant-mode::before{
  content:""!important;
  position:absolute!important;
  inset:0 0 auto 0!important;
  height:3px!important;
  background:linear-gradient(90deg,#2f73e8,#27c3bb,#0f8f84)!important;
}
#portal-assistant-modal button.portal-assistant-mode::after{display:none!important;}
#portal-assistant-modal button.portal-assistant-mode:hover,
#portal-assistant-modal button.portal-assistant-mode:focus-visible{
  transform:translateY(-5px)!important;
  border-color:rgba(15,143,132,.35)!important;
  box-shadow:0 22px 42px rgba(15,118,110,.16)!important;
}
.portal-assistant-mode__icon{
  width:58px!important;
  height:58px!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid rgba(15,143,132,.17)!important;
  border-radius:18px!important;
  color:#087f76!important;
  background:#e5f8f4!important;
  box-shadow:0 9px 20px rgba(15,118,110,.10)!important;
  font-size:24px!important;
  transform:none!important;
}
.portal-assistant-mode__copy{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  gap:6px!important;
}
.portal-assistant-mode__copy strong{color:#172238!important;font-size:17px!important;font-weight:950!important;}
.portal-assistant-mode__copy small{color:#65767c!important;font-size:12px!important;font-weight:650!important;line-height:1.9!important;}
.portal-assistant-view--chat{
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr) auto!important;
  min-height:0!important;
  background:#f8fcfd!important;
}
.portal-assistant-chatbar{
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:12px!important;
  padding:10px 14px!important;
  border-bottom:1px solid rgba(18,98,107,.10)!important;
  background:#fff!important;
}
#portal-assistant-modal button.portal-assistant-back,
#portal-assistant-modal button.portal-assistant-new-chat,
#portal-assistant-modal button.portal-assistant-back:hover,
#portal-assistant-modal button.portal-assistant-new-chat:hover,
#portal-assistant-modal button.portal-assistant-back:focus,
#portal-assistant-modal button.portal-assistant-new-chat:focus,
#portal-assistant-modal button.portal-assistant-back:active,
#portal-assistant-modal button.portal-assistant-new-chat:active{
  min-height:38px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  padding:7px 13px!important;
  border:1px solid rgba(15,143,132,.18)!important;
  border-radius:12px!important;
  color:#087b72!important;
  background:#e9f8f5!important;
  box-shadow:none!important;
  font-size:12px!important;
  font-weight:900!important;
  cursor:pointer!important;
  transform:none!important;
}
#portal-assistant-modal button.portal-assistant-back:hover,#portal-assistant-modal button.portal-assistant-new-chat:hover{background:#d9f2ee!important;border-color:rgba(15,143,132,.30)!important;}
.portal-assistant-current-mode{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  text-align:center!important;
}
.portal-assistant-current-mode__icon{
  width:36px!important;
  height:36px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:11px!important;
  color:#087b72!important;
  background:#e7f7f4!important;
  font-size:18px!important;
}
.portal-assistant-current-mode strong{display:block!important;color:#172238!important;font-size:13px!important;font-weight:950!important;}
.portal-assistant-current-mode small{display:block!important;color:#75848a!important;font-size:10px!important;margin-top:2px!important;}
.portal-assistant-conversation{
  min-height:0!important;
  overflow:auto!important;
  display:flex!important;
  flex-direction:column!important;
  gap:16px!important;
  padding:24px 28px!important;
  background:
    radial-gradient(circle at 88% 15%,rgba(39,195,187,.08),transparent 30%),
    linear-gradient(180deg,#f8fcfd 0%,#f3fafb 100%)!important;
  scrollbar-color:rgba(15,143,132,.35) transparent!important;
}
.portal-assistant-message{display:flex!important;align-items:flex-start!important;gap:10px!important;width:100%!important;animation:assistantMessageIn .2s ease both;}
.portal-assistant-message--user{flex-direction:row-reverse!important;}
.portal-assistant-message__avatar{
  width:34px!important;
  height:34px!important;
  flex:0 0 34px!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  border:1px solid rgba(15,143,132,.16)!important;
  border-radius:12px!important;
  color:#087b72!important;
  background:#e6f8f4!important;
  font-size:12px!important;
  font-weight:950!important;
}
.portal-assistant-message__avatar img{display:block!important;height:42px!important;width:auto!important;transform:translateY(4px)!important;}
.portal-assistant-message__avatar--user{background:transparent!important;border-color:rgba(15,143,132,.13)!important;box-shadow:none!important;}
.portal-assistant-message__avatar--user img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important;transform:none!important;border-radius:inherit!important;}
.portal-assistant-message__bubble{
  display:inline-block!important;
  width:fit-content!important;
  min-width:0!important;
  min-height:0!important;
  max-width:min(76%,660px)!important;
  padding:9px 13px!important;
  border:1px solid rgba(18,98,107,.10)!important;
  border-radius:18px 5px 18px 18px!important;
  color:#293746!important;
  background:#fff!important;
  box-shadow:0 10px 24px rgba(26,75,82,.07)!important;
  font-size:13px!important;
  font-weight:600!important;
  line-height:1.75!important;
  white-space:pre-wrap!important;
}
.portal-assistant-message--user .portal-assistant-message__bubble{
  border-color:rgba(15,143,132,.19)!important;
  border-radius:5px 18px 18px 18px!important;
  background:#e9f8f5!important;
}

.portal-assistant-typing{display:inline-flex!important;align-items:center!important;gap:4px!important;padding:5px 0!important;}
.portal-assistant-typing i{width:6px!important;height:6px!important;border-radius:50%!important;background:#0f8f84!important;animation:assistantTyping 1s ease-in-out infinite!important;}
.portal-assistant-typing i:nth-child(2){animation-delay:.15s!important;}.portal-assistant-typing i:nth-child(3){animation-delay:.3s!important;}
.portal-assistant-composer{
  padding:12px 16px 10px!important;
  border-top:1px solid rgba(18,98,107,.10)!important;
  background:#fff!important;
}
.portal-assistant-composer__box{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:end!important;
  gap:10px!important;
  padding:8px 9px 8px 14px!important;
  border:1px solid rgba(15,143,132,.23)!important;
  border-radius:17px!important;
  background:#f8fcfd!important;
  box-shadow:0 0 0 3px rgba(15,143,132,.05)!important;
}
.portal-assistant-composer__box:focus-within{border-color:#159e93!important;box-shadow:0 0 0 4px rgba(21,158,147,.10)!important;}
.portal-assistant-composer textarea,
.portal-assistant-composer textarea:hover,
.portal-assistant-composer textarea:focus{
  width:100%!important;
  min-height:34px!important;
  max-height:150px!important;
  resize:none!important;
  padding:8px 2px!important;
  margin:0!important;
  border:0!important;
  outline:0!important;
  border-radius:0!important;
  color:#263542!important;
  background:transparent!important;
  box-shadow:none!important;
  font:inherit!important;
  font-size:13px!important;
  font-weight:600!important;
  line-height:1.8!important;
}
.portal-assistant-composer textarea::placeholder{color:#8a989d!important;}
.portal-assistant-send,
.portal-assistant-send:hover,
.portal-assistant-send:focus,
.portal-assistant-send:active{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  border:0!important;
  border-radius:13px!important;
  color:#fff!important;
  background:linear-gradient(135deg,#24bdb3,#0f8f84)!important;
  box-shadow:0 10px 22px rgba(15,143,132,.23)!important;
  font-size:20px!important;
  cursor:pointer!important;
  transform:none!important;
}
.portal-assistant-send:disabled{opacity:.42!important;cursor:not-allowed!important;box-shadow:none!important;}
.portal-assistant-composer__meta{display:flex!important;justify-content:space-between!important;gap:12px!important;padding:6px 4px 0!important;color:#829095!important;font-size:9px!important;font-weight:650!important;}
.portal-assistant-modal.is-quota-exhausted .portal-assistant-composer__box{border-color:rgba(220,38,38,.16)!important;background:#fff8f8!important;box-shadow:none!important;}
@keyframes assistantMessageIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes assistantTyping{0%,100%{opacity:.35;transform:translateY(0)}50%{opacity:1;transform:translateY(-3px)}}
@media(max-width:760px){
  .portal-assistant-modal{padding:10px!important;}
  .portal-assistant-dialog{width:100%!important;height:calc(100vh - 20px)!important;min-height:0!important;border-radius:22px!important;}
  .portal-assistant-header{min-height:68px!important;padding:10px 12px!important;}
  .portal-assistant-limit{font-size:10px!important;padding:5px 8px!important;}
  .portal-assistant-view--chooser{place-content:start center!important;padding:30px 14px!important;}
  .portal-assistant-intro h3{font-size:22px!important;}
  .portal-assistant-modes{grid-template-columns:1fr!important;gap:11px!important;}
  #portal-assistant-modal button.portal-assistant-mode{min-height:110px!important;display:grid!important;grid-template-columns:52px 1fr!important;justify-items:start!important;text-align:right!important;padding:15px!important;}
  .portal-assistant-mode__copy{align-items:flex-start!important;text-align:right!important;}
  .portal-assistant-chatbar{grid-template-columns:auto 1fr auto!important;padding:8px!important;}
  .portal-assistant-current-mode small{display:none!important;}
  .portal-assistant-back,.portal-assistant-new-chat{font-size:0!important;width:40px!important;padding:0!important;}
  .portal-assistant-back span{font-size:18px!important;}
  .portal-assistant-new-chat::before{content:"＋"!important;font-size:19px!important;}
  .portal-assistant-conversation{padding:16px 11px!important;}
  .portal-assistant-message__bubble{max-width:88%!important;}
  .portal-assistant-composer{padding:9px!important;}
  .portal-assistant-composer__meta span:first-child{display:none!important;}
  .portal-assistant-composer__meta{justify-content:flex-end!important;}
}
@media(prefers-reduced-motion:reduce){
  .portal-assistant-modal__backdrop,.portal-assistant-message,.portal-assistant-typing i,#portal-assistant-modal button.portal-assistant-mode{animation:none!important;transition:none!important;}
}
/* اطلاعیه فناوری اطلاعات: نمایش کامل کادر و پشتیبانی از متن دوخطی */
body.portal-status-master #banner.banner,
body.portal-status-master #banner.banner iframe {
  display: block !important;
  width: 100% !important;
  height: 112px !important;
  min-height: 112px !important;
  max-height: 112px !important;
  overflow: hidden !important;
}

@media (max-width: 760px) {
  body.portal-status-master #banner.banner,
  body.portal-status-master #banner.banner iframe {
    height: 132px !important;
    min-height: 132px !important;
    max-height: 132px !important;
  }
}

/* =========================================================
   Account settings modal — profile, avatar and device sessions
   ========================================================= */
#modal-root .portal-account-backdrop{
  padding:18px!important;
  align-items:center!important;
  overflow:auto!important;
}
#modal-root .portal-account-modal{
  width:min(640px,calc(100vw - 30px))!important;
  max-width:640px!important;
  height:min(720px,calc(100vh - 36px))!important;
  max-height:720px!important;
  padding:0!important;
  border:0!important;
  border-radius:6px!important;
  background:#fff!important;
  box-shadow:0 24px 60px rgba(15,23,42,.32)!important;
  display:grid!important;
  grid-template-rows:auto auto minmax(0,1fr) auto!important;
  overflow:hidden!important;
  direction:rtl!important;
}
#modal-root .portal-account-modal.is-busy{
  cursor:progress;
}
#modal-root .portal-account-head{
  position:relative;
  min-height:78px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px 64px 10px;
  background:#fff;
}
#modal-root .portal-account-head>strong{
  color:#2b2b2b;
  font-size:1.35rem;
  font-weight:950;
  text-align:center;
}
#modal-root .portal-account-close{
  position:absolute!important;
  inset-inline-start:18px!important;
  top:17px!important;
  width:34px!important;
  height:34px!important;
  min-height:34px!important;
  border:0!important;
  background:transparent!important;
  color:#94a3b8!important;
  box-shadow:none!important;
  font-size:1.5rem!important;
}
#modal-root .portal-account-tabs{
  display:flex;
  justify-content:center;
  align-items:flex-end;
  gap:8px;
  padding:0 26px;
  border-bottom:1px solid #d9dde3;
  background:#fff;
}
#modal-root .portal-account-tabs button{
  position:relative;
  min-width:112px!important;
  min-height:46px!important;
  padding:8px 16px 11px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:#7b7f86!important;
  box-shadow:none!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  font-family:inherit!important;
  font-size:.9rem!important;
  font-weight:900!important;
  cursor:pointer;
}
#modal-root .portal-account-tabs button::after{
  content:"";
  position:absolute;
  right:0;
  left:0;
  bottom:-1px;
  height:3px;
  background:transparent;
}
#modal-root .portal-account-tabs button.is-active{
  color:#2196f3!important;
}
#modal-root .portal-account-tabs button.is-active::after{
  background:#9e9e9e;
}
#modal-root .portal-account-tabs button span{
  font-size:1rem;
  line-height:1;
}
#modal-root .portal-account-body{
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:12px 26px 18px;
  scrollbar-gutter:stable;
  background:#fff;
}
#modal-root .portal-account-pane[hidden]{display:none!important}
#modal-root .portal-account-pane{
  min-height:100%;
  animation:portalAccountPaneIn .16s ease both;
}
@keyframes portalAccountPaneIn{
  from{opacity:0;transform:translateY(3px)}
  to{opacity:1;transform:none}
}
#modal-root .portal-account-phone-chip{
  width:max-content;
  max-width:100%;
  min-height:28px;
  margin:0 auto 12px;
  padding:4px 10px;
  border-radius:999px;
  display:flex;
  align-items:center;
  gap:7px;
  background:#f1f3f5;
  color:#8b929a;
  font-size:.72rem;
  font-weight:800;
}
#modal-root .portal-account-phone-chip b{
  color:#78909c;
  font-weight:900;
}
#modal-root .portal-account-phone-chip button{
  width:24px!important;
  min-width:24px!important;
  height:24px!important;
  min-height:24px!important;
  padding:0!important;
  border:0!important;
  border-radius:50%!important;
  background:transparent!important;
  color:#607d8b!important;
  box-shadow:none!important;
  font-size:.9rem!important;
  cursor:pointer;
}
#modal-root .portal-account-phone-chip.is-unverified{
  background:#fff7ed;
  color:#c2410c;
}
#modal-root .portal-account-avatar-wrap{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  margin-bottom:18px;
}
#modal-root .portal-account-avatar{
  width:112px;
  height:112px;
  border-radius:50%;
  object-fit:cover;
  border:3px solid #fff;
  background:#eef2f7;
  box-shadow:0 3px 10px rgba(15,23,42,.28);
}
#modal-root .portal-account-avatar-button{
  min-height:34px!important;
  padding:6px 13px!important;
  border:0!important;
  border-radius:3px!important;
  background:#2196f3!important;
  color:#fff!important;
  box-shadow:0 3px 7px rgba(15,23,42,.22)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  font-family:inherit!important;
  font-size:.78rem!important;
  font-weight:950!important;
  cursor:pointer;
}
#modal-root .portal-account-avatar-wrap small{
  color:#9aa0a6;
  font-size:.66rem;
  font-weight:700;
}
#modal-root .portal-account-fields{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:22px!important;
  margin:0!important;
}
#modal-root .portal-account-modal .portal-phone-modal-field{
  display:flex;
  flex-direction:column;
  gap:6px;
}
#modal-root .portal-account-modal .portal-phone-modal-field>span{
  color:#80868b!important;
  font-size:.72rem!important;
  font-weight:800!important;
}
#modal-root .portal-account-modal .portal-phone-modal-field input{
  width:100%!important;
  height:38px!important;
  min-height:38px!important;
  padding:5px 8px!important;
  border:0!important;
  border-bottom:1px solid #d7dce1!important;
  border-radius:0!important;
  background:#fff!important;
  color:#2f3337!important;
  box-shadow:none!important;
  outline:none!important;
  font-family:inherit!important;
  font-size:.86rem!important;
  font-weight:850!important;
}
#modal-root .portal-account-modal .portal-phone-modal-field input:focus{
  border-bottom-color:#2196f3!important;
  box-shadow:0 1px 0 #2196f3!important;
}
#modal-root .portal-account-date-row{
  margin-top:20px;
  padding:0 0 2px;
}
#modal-root .portal-account-date-field{
  width:100%;
}
#modal-root .portal-account-modal .portal-birth-date-input-wrap{
  position:relative;
  display:block!important;
}
#modal-root .portal-account-modal .portal-birth-date-input-wrap input{
  padding-inline-end:38px!important;
  cursor:pointer;
}
#modal-root .portal-account-modal .portal-birth-date-open{
  position:absolute!important;
  inset-inline-end:0!important;
  top:0!important;
  width:36px!important;
  min-width:36px!important;
  height:38px!important;
  min-height:38px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:#7f8c96!important;
  box-shadow:none!important;
  font-size:1rem!important;
}
#modal-root .portal-account-modal .portal-birth-date-inline{
  margin:8px 0 14px!important;
  border:1px solid #e1e7ef!important;
  border-radius:14px!important;
  box-shadow:0 10px 26px rgba(15,23,42,.08)!important;
}
#modal-root .portal-account-phone-editor{
  margin-top:14px;
  padding:12px 14px;
  border:1px solid #e3eaf3;
  border-radius:14px;
  background:#f8fafc;
}
#modal-root .portal-account-phone-editor[hidden]{display:none!important}
#modal-root .portal-account-phone-editor small{
  display:block;
  margin-top:7px;
  color:#64748b;
  font-size:.67rem;
  line-height:1.75;
}
#modal-root .portal-security-pane{
  padding-top:12px;
}
#modal-root .portal-security-intro{
  display:flex;
  flex-direction:column;
  gap:5px;
  padding:14px 16px;
  margin-bottom:12px;
  border:1px solid #e2e8f0;
  border-radius:14px;
  background:#f8fafc;
}
#modal-root .portal-security-intro strong{
  color:#263238;
  font-size:.9rem;
  font-weight:950;
}
#modal-root .portal-security-intro span{
  color:#64748b;
  font-size:.72rem;
  line-height:1.8;
}
#modal-root .portal-security-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:4px 2px 10px;
  color:#37474f;
  font-size:.75rem;
}
#modal-root .portal-security-summary strong{font-weight:950}
#modal-root .portal-security-summary span{color:#2196f3;font-weight:900}
#modal-root .portal-session-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
#modal-root .portal-session-item{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(180px,.85fr) auto;
  align-items:center;
  gap:13px;
  padding:13px 14px;
  border:1px solid #e0e5eb;
  border-radius:14px;
  background:#fff;
}
#modal-root .portal-session-item.is-current{
  border-color:#bbdefb;
  background:#f8fcff;
}
#modal-root .portal-session-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
#modal-root .portal-session-title{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
}
#modal-root .portal-session-title strong{
  color:#263238;
  font-size:.82rem;
  font-weight:950;
}
#modal-root .portal-current-session-badge{
  padding:2px 7px;
  border-radius:999px;
  background:#e3f2fd;
  color:#1976d2;
  font-size:.61rem;
  font-weight:950;
}
#modal-root .portal-session-main>span,
#modal-root .portal-session-main>small{
  color:#607d8b;
  font-size:.68rem;
  line-height:1.6;
}
#modal-root .portal-session-main>small{color:#90a4ae}
#modal-root .portal-session-meta{
  display:flex;
  flex-direction:column;
  gap:5px;
}
#modal-root .portal-session-meta span{
  display:flex;
  justify-content:space-between;
  gap:10px;
  color:#78909c;
  font-size:.66rem;
}
#modal-root .portal-session-meta b{font-weight:850}
#modal-root .portal-session-meta em{
  color:#455a64;
  font-style:normal;
  font-weight:800;
}
#modal-root .portal-session-logout,
#modal-root .portal-security-empty button{
  min-height:34px!important;
  padding:5px 10px!important;
  border:1px solid #ffcdd2!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#e53935!important;
  box-shadow:none!important;
  font-family:inherit!important;
  font-size:.68rem!important;
  font-weight:950!important;
  white-space:nowrap;
  cursor:pointer;
}
#modal-root .portal-security-loading,
#modal-root .portal-security-empty{
  min-height:180px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  color:#78909c;
  text-align:center;
}
#modal-root .portal-security-loading span{
  width:28px;
  height:28px;
  border:3px solid #e3f2fd;
  border-top-color:#2196f3;
  border-radius:50%;
  animation:portalSecuritySpin .8s linear infinite;
}
@keyframes portalSecuritySpin{to{transform:rotate(360deg)}}
#modal-root .portal-security-empty--error strong{color:#c62828}
#modal-root .portal-account-footer{
  position:relative;
  min-height:72px;
  padding:12px 16px;
  border-top:1px solid #edf0f3;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
}
#modal-root .portal-account-confirm,
#modal-root .portal-account-cancel{
  min-width:98px!important;
  min-height:40px!important;
  padding:8px 18px!important;
  border-radius:2px!important;
  font-family:inherit!important;
  font-size:.82rem!important;
  font-weight:950!important;
  cursor:pointer;
}
#modal-root .portal-account-confirm{
  order:2;
  border:0!important;
  background:#2196f3!important;
  color:#fff!important;
  box-shadow:0 2px 5px rgba(15,23,42,.26)!important;
}
#modal-root .portal-account-cancel{
  order:1;
  border:0!important;
  background:transparent!important;
  color:#2196f3!important;
  box-shadow:none!important;
}
#modal-root .portal-account-footer .portal-phone-modal-message{
  position:absolute;
  inset-inline-end:16px;
  max-width:310px;
  margin:0!important;
  padding:7px 10px!important;
  border-radius:9px!important;
  font-size:.69rem!important;
  line-height:1.6;
  text-align:right;
}
#modal-root .portal-account-footer .portal-phone-modal-message[hidden]{display:none!important}
#modal-root .portal-account-code-modal{
  width:min(520px,calc(100vw - 30px))!important;
  padding:0!important;
  border-radius:6px!important;
  overflow:hidden!important;
  background:#fff!important;
}
#modal-root .portal-account-code-body{
  padding:22px 28px;
}
#modal-root .portal-account-code-body p{
  margin:0 0 20px;
  color:#607d8b;
  font-size:.8rem;
  line-height:1.9;
}
#modal-root .portal-account-success{
  border-radius:8px!important;
}
body.portal-status-master #status-card .portal-personal-kpi-main strong{
  white-space:normal!important;
  line-height:1.35!important;
}
@media(max-width:700px){
  #modal-root .portal-account-backdrop{padding:6px!important;align-items:flex-start!important}
  #modal-root .portal-account-modal{
    width:calc(100vw - 12px)!important;
    height:calc(100vh - 12px)!important;
    max-height:none!important;
    border-radius:5px!important;
  }
  #modal-root .portal-account-head{min-height:66px;padding:13px 48px 7px}
  #modal-root .portal-account-head>strong{font-size:1.08rem}
  #modal-root .portal-account-tabs{padding:0 10px}
  #modal-root .portal-account-tabs button{min-width:96px!important}
  #modal-root .portal-account-body{padding:10px 14px 14px}
  #modal-root .portal-account-avatar{width:96px;height:96px}
  #modal-root .portal-account-fields{grid-template-columns:1fr!important;gap:12px!important}
  #modal-root .portal-session-item{grid-template-columns:1fr!important;gap:10px}
  #modal-root .portal-session-meta{padding-top:8px;border-top:1px dashed #e2e8f0}
  #modal-root .portal-session-logout{width:100%!important}
  #modal-root .portal-account-footer{padding:10px;flex-wrap:wrap}
  #modal-root .portal-account-confirm,
  #modal-root .portal-account-cancel{flex:1 1 120px!important}
  #modal-root .portal-account-footer .portal-phone-modal-message{
    position:static;
    order:3;
    width:100%;
    max-width:none;
  }
}


/* ==== Status performance profile (2026-07-25) ==== */
body.portal-status-master.portal-shell-ready{visibility:visible}
#banner{min-height:88px}
#calendar-panel{min-height:560px}
#motd-panel{min-height:150px}
.portal-widget-placeholder{position:relative;display:block;width:100%;overflow:hidden;border-radius:18px;background:linear-gradient(90deg,#f3f6fa 20%,#ffffff 38%,#f3f6fa 56%);background-size:220% 100%;animation:portalWidgetPlaceholder 1.2s ease-in-out infinite}
.portal-widget-placeholder--banner{height:88px}
.portal-widget-placeholder--calendar{height:520px}
.portal-widget-placeholder--motd{height:110px}
@keyframes portalWidgetPlaceholder{0%{background-position:100% 0}100%{background-position:-120% 0}}

/* Firefox and modest GPUs spend a disproportionate amount of time painting full-screen blur. */
html.portal-reduced-effects .header,
html.portal-reduced-effects #motd-panel,
html.portal-reduced-effects .modal-backdrop,
html.portal-reduced-effects .portal-assistant-modal__backdrop,
html.portal-reduced-effects .portal-auth-gate,
html.portal-reduced-effects .portal-auth-check-card{
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
html.portal-reduced-effects .portal-hero__logo-card{animation:none!important}
html.portal-reduced-effects .portal-widget-placeholder{animation:none!important;background:#f3f6fa!important}

@media (prefers-reduced-motion: reduce){
  body.portal-status-master *,body.portal-status-master *::before,body.portal-status-master *::after{
    scroll-behavior:auto!important;
  }
  body.portal-status-master .portal-widget-placeholder,
  body.portal-status-master .portal-hero__logo-card,
  body.portal-status-master .tile,
  body.portal-status-master .portal-assistant-message,
  body.portal-status-master .portal-assistant-typing i{
    animation:none!important;
    transition:none!important;
  }
}


/* ===== Status stable first paint v1 =====
   جلوگیری از پرش صفحه و layoutهای میانی هنگام Bootstrap و ساخت کاشی‌ها */
body.portal-status-master .container > .card,
body.portal-status-master .tile{
  animation:none!important;
}
body.portal-status-master #portal-grid.grid{
  contain:layout paint;
}
body.portal-status-master .portal-status-identity-kpi{
  min-height:78px!important;
}
body.portal-status-master .portal-status-identity-kpi strong{
  display:block;
  min-height:1.45em;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.portal-status-master .portal-status-identity-kpi.is-loading strong{
  color:transparent!important;
  position:relative;
  border-radius:8px;
  background:linear-gradient(90deg,#eef2f7 25%,#f8fafc 50%,#eef2f7 75%);
  background-size:200% 100%;
  animation:portalStatusSkeleton 1.25s linear infinite!important;
}
@keyframes portalStatusSkeleton{
  from{background-position:200% 0}
  to{background-position:-200% 0}
}
body.portal-status-master #banner.banner,
body.portal-status-master #banner.banner iframe{
  height:88px!important;
  min-height:88px!important;
  max-height:88px!important;
}
@media (prefers-reduced-motion:reduce){
  body.portal-status-master .portal-status-identity-kpi.is-loading strong{animation:none!important;}
}

/* Stage 5: direct JSON widgets; no banner/MOTD iframe layout cost. */
#banner[hidden] { display: none !important; }
.portal-inline-banner {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  background: linear-gradient(135deg, #eff6ff, #fff 72%);
  box-sizing: border-box;
}
.portal-inline-banner[data-type="warn"] { border-color: #fde68a; background: linear-gradient(135deg, #fffbeb, #fff 72%); }
.portal-inline-banner[data-type="ok"] { border-color: #a7f3d0; background: linear-gradient(135deg, #ecfdf5, #fff 72%); }
.portal-inline-banner__icon {
  width: 40px; height: 40px; border-radius: 13px;
  display: grid; place-items: center;
  color: #fff; font-weight: 900; font-size: 18px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}
.portal-inline-banner__icon::before { content: "i"; }
.portal-inline-banner[data-type="warn"] .portal-inline-banner__icon { background: linear-gradient(135deg, #f59e0b, #d97706); }
.portal-inline-banner[data-type="warn"] .portal-inline-banner__icon::before { content: "!"; }
.portal-inline-banner[data-type="ok"] .portal-inline-banner__icon { background: linear-gradient(135deg, #10b981, #047857); }
.portal-inline-banner[data-type="ok"] .portal-inline-banner__icon::before { content: "✓"; }
.portal-inline-banner__copy { min-width: 0; }
.portal-inline-banner__title { color: #1d4ed8; font-size: 13px; font-weight: 900; line-height: 1.65; }
.portal-inline-banner[data-type="warn"] .portal-inline-banner__title { color: #b45309; }
.portal-inline-banner[data-type="ok"] .portal-inline-banner__title { color: #047857; }
.portal-inline-banner__text { color: #475569; font-size: 11px; line-height: 1.8; white-space: pre-line; overflow-wrap: anywhere; }

.portal-inline-motd {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  align-items: center;
  gap: 9px;
  min-height: 72px;
  padding: 10px 11px;
  border: 1px solid #dbeafe;
  border-radius: 17px;
  background: linear-gradient(135deg,#f8fbff,#fff);
  box-sizing: border-box;
}
.portal-inline-motd__icon {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center;
  color: #fff; font-size: 15px;
  background: linear-gradient(135deg,#4f46e5,#2563eb);
}
.portal-inline-motd__copy { min-width: 0; }
.portal-inline-motd__text { color: #334155; font-size: 11px; line-height: 1.85; overflow-wrap: anywhere; }
.portal-inline-motd__author { margin-top: 3px; color: #64748b; font-size: 10px; }
@media (max-width: 720px) {
  .portal-inline-banner { grid-template-columns: 38px minmax(0,1fr); padding: 9px 10px; }
  .portal-inline-banner__icon { width: 36px; height: 36px; border-radius: 12px; }
}


/* ===== Stage 7: stable media and font loading ===== */
.brand > img,
.portal-hero__logo-card > img{
  aspect-ratio:1 / 1;
  flex:0 0 auto;
}

.portal-hero__logo-card{
  contain:layout paint;
}

.portal-smart-assistant__image{
  aspect-ratio:1 / 1;
}

@media (prefers-reduced-motion: reduce){
  .portal-smart-assistant__image,
  .portal-widget-placeholder{
    animation:none !important;
    transition:none !important;
  }
}

/* =========================================================
   Status viewport-fit layer (2026-07-28)
   حفظ ظاهر فعلی در دسکتاپ‌های استاندارد و تطبیق ارتفاعی بدون اسکرول صفحه
   ========================================================= */
@media (min-width:901px){
  html,
  body.portal-status-master{
    width:100%;
    height:100%;
    min-height:0!important;
    overflow:hidden!important;
  }

  body.portal-status-master{
    --portal-side-width:clamp(228px,23vw,300px);
    --portal-shell-margin-top:16px;
    --portal-shell-margin-bottom:22px;
    --portal-card-padding:18px;
    --portal-calendar-padding:22px;
    --portal-card-gap:12px;
    --portal-calendar-gap:13px;
    --portal-hero-height:106px;
    --portal-hero-logos-height:78px;
    --portal-banner-height:88px;
    --portal-motd-height:150px;
    --portal-grid-max-height:362px;
    --portal-status-kpi-height:78px;
    display:flex!important;
    flex-direction:column!important;
  }

  body.portal-status-master .header,
  body.portal-status-master .footer{
    flex:0 0 auto!important;
  }

  body.portal-status-master .container{
    flex:1 1 0!important;
    width:min(var(--v6-max),calc(100% - 40px))!important;
    height:auto!important;
    min-height:0!important;
    margin:var(--portal-shell-margin-top) auto var(--portal-shell-margin-bottom)!important;
    grid-template-columns:var(--portal-side-width) minmax(0,1fr) var(--portal-side-width)!important;
    gap:var(--v6-gap)!important;
    align-items:stretch!important;
    overflow:visible!important;
  }

  body.portal-status-master .container > .card{
    height:100%!important;
    min-height:0!important;
    max-height:100%!important;
  }

  body.portal-status-master #shortcuts-card{
    order:initial!important;
    min-height:0!important;
    padding:var(--portal-card-padding)!important;
    gap:var(--portal-card-gap)!important;
  }

  body.portal-status-master #status-card{
    order:initial!important;
    min-height:0!important;
    padding:var(--portal-card-padding)!important;
  }

  body.portal-status-master #calnote-card,
  body.portal-status-master #calnote-card:not(.has-smart-assistant){
    order:initial!important;
    min-height:0!important;
    padding:var(--portal-calendar-padding)!important;
    gap:var(--portal-calendar-gap)!important;
  }

  body.portal-status-master #shortcuts-card .section{
    flex:0 0 auto!important;
    min-height:38px!important;
  }

  body.portal-status-master .portal-hero{
    flex:0 0 var(--portal-hero-height)!important;
    height:var(--portal-hero-height)!important;
    min-height:var(--portal-hero-height)!important;
    max-height:var(--portal-hero-height)!important;
  }

  body.portal-status-master .portal-hero__logos{
    height:var(--portal-hero-logos-height)!important;
  }

  body.portal-status-master #portal-grid.grid{
    flex:1 1 var(--portal-grid-max-height)!important;
    min-height:0!important;
    max-height:var(--portal-grid-max-height)!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-template-rows:none!important;
    grid-auto-rows:minmax(0,1fr)!important;
    align-content:stretch!important;
    overflow:hidden!important;
  }

  body.portal-status-master #portal-grid.grid .tile{
    height:100%!important;
    min-height:0!important;
  }

  body.portal-status-master #banner.banner,
  body.portal-status-master #banner.banner iframe{
    flex:0 0 var(--portal-banner-height)!important;
    height:var(--portal-banner-height)!important;
    min-height:var(--portal-banner-height)!important;
    max-height:var(--portal-banner-height)!important;
  }

  body.portal-status-master #banner .portal-widget-placeholder,
  body.portal-status-master #banner .portal-inline-banner{
    height:100%!important;
    min-height:0!important;
    max-height:100%!important;
  }

  body.portal-status-master #calnote-card .card-head{
    flex:0 0 auto!important;
  }

  body.portal-status-master #calendar-panel{
    flex:1 1 560px!important;
    height:auto!important;
    min-height:0!important;
    max-height:560px!important;
    overflow:hidden!important;
  }

  body.portal-status-master #calendar-panel iframe,
  body.portal-status-master #calendar-panel > .portal-widget-placeholder,
  body.portal-status-master #calendar-panel > div{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:100%!important;
    overflow:hidden!important;
  }

  body.portal-status-master #motd-panel,
  body.portal-status-master #motd-panel.motd-inline,
  body.portal-status-master #motd-panel iframe{
    flex:0 0 var(--portal-motd-height)!important;
    height:var(--portal-motd-height)!important;
    min-height:var(--portal-motd-height)!important;
    max-height:var(--portal-motd-height)!important;
    overflow:hidden!important;
  }

  body.portal-status-master #motd-panel > .portal-widget-placeholder,
  body.portal-status-master #motd-panel > .portal-inline-motd{
    height:100%!important;
    min-height:0!important;
    max-height:100%!important;
  }

  body.portal-status-master #status-card .kpis,
  body.portal-status-master #status-card .kpis--sidebar{
    min-height:0!important;
  }

  body.portal-status-master #status-card .kpi,
  body.portal-status-master #status-card .portal-status-identity-kpi{
    min-height:var(--portal-status-kpi-height)!important;
  }
}

@media (min-width:901px) and (max-width:1280px){
  body.portal-status-master{
    --portal-hero-height:96px;
    --portal-hero-logos-height:70px;
  }
}

@media (min-width:901px) and (max-width:1100px){
  body.portal-status-master{
    --v6-gap:14px;
  }

  body.portal-status-master .portal-hero{
    padding-left:248px!important;
  }

  body.portal-status-master .portal-hero__logos{
    left:14px!important;
    gap:8px!important;
  }

  body.portal-status-master .portal-hero__logo-card{
    width:50px!important;
    height:50px!important;
    border-radius:17px!important;
  }

  body.portal-status-master .portal-hero__logo-card img{
    width:44px!important;
    height:44px!important;
  }
}

@media (min-width:901px) and (max-height:950px){
  body.portal-status-master{
    --portal-motd-height:96px;
  }
}

@media (min-width:901px) and (max-height:820px){
  body.portal-status-master{
    --portal-shell-margin-top:10px;
    --portal-shell-margin-bottom:14px;
    --portal-card-padding:14px;
    --portal-calendar-padding:14px;
    --portal-card-gap:10px;
    --portal-calendar-gap:10px;
    --portal-hero-height:88px;
    --portal-hero-logos-height:64px;
    --portal-banner-height:78px;
    --portal-motd-height:76px;
    --portal-grid-max-height:330px;
    --portal-status-kpi-height:68px;
  }

  body.portal-status-master .header .bar{
    min-height:92px!important;
  }

  body.portal-status-master .brand img{
    height:82px!important;
    max-height:82px!important;
  }

  body.portal-status-master #shortcuts-card .section{
    min-height:34px!important;
  }

  body.portal-status-master #status-card .kpis,
  body.portal-status-master #status-card .kpis--sidebar{
    gap:8px!important;
    margin-top:8px!important;
    margin-bottom:10px!important;
  }

  body.portal-status-master #status-card .kpi{
    padding:9px 10px!important;
    border-radius:17px!important;
  }

  body.portal-status-master #status-card .kpi .icon{
    width:40px!important;
    height:40px!important;
    border-radius:14px!important;
  }

  body.portal-status-master #status-card .btn.secondary{
    height:44px!important;
  }

  body.portal-status-master #banner.banner{
    margin-top:8px!important;
  }

  body.portal-status-master #calnote-card.has-smart-assistant{
    padding:var(--portal-calendar-padding) var(--portal-calendar-padding) 145px!important;
  }

  body.portal-status-master button#portal-smart-assistant,
  body.portal-status-master .portal-smart-assistant__image{
    height:135px!important;
  }
}

@media (min-width:901px) and (max-height:740px){
  body.portal-status-master{
    --portal-shell-margin-top:6px;
    --portal-shell-margin-bottom:8px;
    --portal-card-padding:12px;
    --portal-calendar-padding:12px;
    --portal-card-gap:8px;
    --portal-calendar-gap:8px;
    --portal-hero-height:78px;
    --portal-hero-logos-height:58px;
    --portal-banner-height:70px;
    --portal-motd-height:72px;
    --portal-grid-max-height:330px;
    --portal-status-kpi-height:62px;
  }

  body.portal-status-master .header .bar{
    min-height:78px!important;
  }

  body.portal-status-master .brand img{
    height:70px!important;
    max-height:70px!important;
  }

  body.portal-status-master #shortcuts-card .section{
    min-height:32px!important;
  }

  body.portal-status-master #shortcuts-card .section h3,
  body.portal-status-master #calnote-card .card-head h3,
  body.portal-status-master #status-card h3{
    font-size:15px!important;
  }

  body.portal-status-master .section-subtitle{
    font-size:10.5px!important;
  }

  body.portal-status-master .tile{
    padding:8px 10px!important;
    gap:4px!important;
  }

  body.portal-status-master .tile .icon{
    width:42px!important;
    height:42px!important;
    border-radius:14px!important;
  }

  body.portal-status-master .tile .name{
    font-size:12.5px!important;
  }

  body.portal-status-master .tile .hint{
    font-size:8.8px!important;
  }

  body.portal-status-master #status-card .kpis,
  body.portal-status-master #status-card .kpis--sidebar{
    gap:6px!important;
    margin-top:6px!important;
    margin-bottom:8px!important;
  }

  body.portal-status-master #status-card .kpi{
    padding:7px 8px!important;
  }

  body.portal-status-master #status-card .kpi .icon{
    width:36px!important;
    height:36px!important;
    border-radius:13px!important;
  }

  body.portal-status-master #status-card strong{
    font-size:14px!important;
  }

  body.portal-status-master #status-card .btn.secondary{
    height:40px!important;
  }

  body.portal-status-master #banner.banner{
    margin-top:6px!important;
  }

  body.portal-status-master #calnote-card.has-smart-assistant{
    padding:var(--portal-calendar-padding) var(--portal-calendar-padding) 122px!important;
  }

  body.portal-status-master button#portal-smart-assistant,
  body.portal-status-master .portal-smart-assistant__image{
    height:112px!important;
  }
}

@media (min-width:901px) and (max-width:1100px){
  body.portal-status-master .container > #shortcuts-card,
  body.portal-status-master .container > #status-card,
  body.portal-status-master .container > #calnote-card{
    grid-column:auto!important;
    grid-row:auto!important;
  }
}


/* =========================================================
   Calendar notes control below calendar (2026-07-29)
   عنوان کارت حذف شده و دکمه همیشه بلافاصله زیر تقویم قرار می‌گیرد.
   ========================================================= */
body.portal-status-master #portal-calendar-notes-shortcut{
  flex:0 0 40px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-width:0!important;
  height:40px!important;
  min-height:40px!important;
  max-height:40px!important;
  margin:0!important;
  padding:0 12px!important;
  gap:7px!important;
  border:1px solid #93c5fd!important;
  border-radius:14px!important;
  background:linear-gradient(135deg,#e0f2fe,#dbeafe)!important;
  color:#1d4ed8!important;
  box-shadow:0 6px 14px rgba(37,99,235,.10)!important;
  font-family:inherit!important;
  font-size:12px!important;
  font-weight:950!important;
  line-height:1!important;
  white-space:nowrap!important;
  cursor:pointer!important;
  transform:none!important;
}
body.portal-status-master #portal-calendar-notes-shortcut:hover,
body.portal-status-master #portal-calendar-notes-shortcut:focus-visible{
  border-color:#2563eb!important;
  background:linear-gradient(135deg,#dbeafe,#bfdbfe)!important;
  color:#1e40af!important;
  box-shadow:0 0 0 3px rgba(37,99,235,.10)!important;
  outline:none!important;
  transform:none!important;
}
body.portal-status-master #portal-calendar-notes-shortcut > span:first-child{
  font-size:14px!important;
  line-height:1!important;
}

@media (min-width:901px){
  body.portal-status-master #calnote-card{
    /* پس از حذف عنوان، تقویم از ابتدای فضای داخلی کارت شروع می‌شود. */
    align-content:stretch!important;
  }
}


/* =========================================================
   Calendar last-row protection (2026-07-29 v14)
   تقویم در Flexbox کوچک نمی‌شود؛ فقط جمله روز در ارتفاع کم اجازه جمع‌شدن دارد.
   ========================================================= */
@media (min-width:901px){
  body.portal-status-master #calendar-panel{
    flex-shrink:0!important;
  }
  body.portal-status-master #portal-calendar-notes-shortcut{
    flex-shrink:0!important;
  }
  body.portal-status-master #motd-panel,
  body.portal-status-master #motd-panel.motd-inline,
  body.portal-status-master #motd-panel iframe{
    flex-shrink:1!important;
    min-height:64px!important;
  }
}

/* =========================================================
   Birthday launcher character — dedicated image layer (v18)
   تصویر گل‌به‌دست مستقل از idle/wave است تا تعویض src یا preload
   روی نمایش آن اثر نگذارد.
   ========================================================= */
body.portal-status-master .portal-smart-assistant__image--birthday{
  opacity:0!important;
  visibility:hidden!important;
}
body.portal-status-master .portal-smart-assistant.is-birthday .portal-smart-assistant__image--idle,
body.portal-status-master .portal-smart-assistant.is-birthday:hover .portal-smart-assistant__image--idle,
body.portal-status-master .portal-smart-assistant.is-birthday:focus-visible .portal-smart-assistant__image--idle,
body.portal-status-master .portal-smart-assistant.is-birthday .portal-smart-assistant__image--wave,
body.portal-status-master .portal-smart-assistant.is-birthday:hover .portal-smart-assistant__image--wave,
body.portal-status-master .portal-smart-assistant.is-birthday:focus-visible .portal-smart-assistant__image--wave{
  opacity:0!important;
  visibility:hidden!important;
}
body.portal-status-master .portal-smart-assistant.is-birthday .portal-smart-assistant__image--birthday,
body.portal-status-master .portal-smart-assistant.is-birthday:hover .portal-smart-assistant__image--birthday,
body.portal-status-master .portal-smart-assistant.is-birthday:focus-visible .portal-smart-assistant__image--birthday{
  opacity:1!important;
  visibility:visible!important;
  filter:drop-shadow(0 14px 20px rgba(244,114,182,.20)) drop-shadow(0 8px 14px rgba(37,99,235,.12))!important;
  animation:portalBirthdayCharacterFloat 3.8s ease-in-out infinite!important;
}

/* =========================================================
   Birthday experience — bouquet character + celebration card (v17)
   فقط در روز تولد خود کاربر فعال می‌شود.
   ========================================================= */
body.portal-status-master .portal-smart-assistant.is-birthday .portal-smart-assistant__image--idle,
body.portal-status-master .portal-smart-assistant.is-birthday:hover .portal-smart-assistant__image--idle,
body.portal-status-master .portal-smart-assistant.is-birthday:focus-visible .portal-smart-assistant__image--idle{
  opacity:1!important;
  filter:drop-shadow(0 14px 20px rgba(244,114,182,.20)) drop-shadow(0 8px 14px rgba(37,99,235,.12))!important;
  animation:portalBirthdayCharacterFloat 3.8s ease-in-out infinite!important;
}
body.portal-status-master .portal-smart-assistant.is-birthday .portal-smart-assistant__image--wave,
body.portal-status-master .portal-smart-assistant.is-birthday:hover .portal-smart-assistant__image--wave,
body.portal-status-master .portal-smart-assistant.is-birthday:focus-visible .portal-smart-assistant__image--wave{
  opacity:0!important;
}
body.portal-status-master .portal-smart-assistant.is-birthday:focus-visible{
  outline-color:rgba(236,72,153,.34)!important;
}
body.portal-birthday-open{overflow:hidden!important;}
.portal-birthday-modal[hidden]{display:none!important;}
body.portal-birthday-open{overflow:hidden!important;}
.portal-birthday-modal{
  position:fixed!important;
  inset:0!important;
  z-index:10120!important;
  display:grid!important;
  place-items:center!important;
  padding:24px!important;
  direction:rtl!important;
  font-family:inherit!important;
}
.portal-birthday-modal__backdrop{
  position:absolute!important;
  inset:0!important;
  background:
    radial-gradient(circle at 13% 12%,rgba(47,111,226,.26),transparent 31%),
    radial-gradient(circle at 86% 86%,rgba(211,160,56,.19),transparent 32%),
    linear-gradient(135deg,rgba(5,18,40,.82),rgba(16,38,72,.70))!important;
  backdrop-filter:blur(17px) saturate(1.12)!important;
  -webkit-backdrop-filter:blur(17px) saturate(1.12)!important;
}
.portal-birthday-dialog{
  position:relative!important;
  z-index:1!important;
  width:min(980px,calc(100vw - 42px))!important;
  min-height:570px!important;
  max-height:calc(100vh - 46px)!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  border:1px solid rgba(255,255,255,.72)!important;
  border-radius:32px!important;
  color:#172a46!important;
  background:
    linear-gradient(112deg,rgba(255,255,255,.985) 0%,rgba(248,251,255,.98) 54%,rgba(241,246,255,.98) 100%)!important;
  box-shadow:
    0 48px 125px rgba(2,12,30,.48),
    0 0 0 1px rgba(255,255,255,.62) inset,
    0 1px 0 rgba(255,255,255,.95) inset!important;
  isolation:isolate!important;
}
.portal-birthday-dialog::before{
  content:""!important;
  position:absolute!important;
  inset:0 0 auto 0!important;
  height:5px!important;
  z-index:7!important;
  background:linear-gradient(90deg,#0e55b8 0%,#35a5dd 35%,#d5a73c 72%,#f1d88a 100%)!important;
  pointer-events:none!important;
}
.portal-birthday-dialog::after{
  content:""!important;
  position:absolute!important;
  inset:0!important;
  z-index:-1!important;
  pointer-events:none!important;
  background:
    linear-gradient(90deg,transparent 0 69%,rgba(27,83,166,.035) 69% 69.15%,transparent 69.15%),
    radial-gradient(circle at 91% 14%,rgba(51,126,221,.10),transparent 23%),
    radial-gradient(circle at 8% 94%,rgba(215,171,65,.10),transparent 25%)!important;
}
.portal-birthday-dialog__glow{
  position:absolute!important;
  z-index:-1!important;
  border-radius:50%!important;
  filter:blur(2px)!important;
  pointer-events:none!important;
}
.portal-birthday-dialog__glow--one{
  width:360px!important;
  height:360px!important;
  top:-185px!important;
  right:-95px!important;
  background:radial-gradient(circle,rgba(67,143,235,.16),transparent 69%)!important;
}
.portal-birthday-dialog__glow--two{
  width:330px!important;
  height:330px!important;
  bottom:-190px!important;
  left:-100px!important;
  background:radial-gradient(circle,rgba(225,184,82,.15),transparent 69%)!important;
}
.portal-birthday-close,
.portal-birthday-close:hover,
.portal-birthday-close:focus,
.portal-birthday-close:active{
  position:absolute!important;
  z-index:12!important;
  top:18px!important;
  left:18px!important;
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  border:1px solid rgba(33,79,143,.13)!important;
  border-radius:13px!important;
  color:#1e4d8f!important;
  background:rgba(255,255,255,.82)!important;
  box-shadow:0 12px 28px rgba(25,55,97,.11)!important;
  backdrop-filter:blur(10px)!important;
  -webkit-backdrop-filter:blur(10px)!important;
  font-family:inherit!important;
  font-size:24px!important;
  font-weight:500!important;
  line-height:1!important;
  cursor:pointer!important;
  transform:none!important;
}
.portal-birthday-close:hover,
.portal-birthday-close:focus-visible{
  color:#0d3e83!important;
  border-color:rgba(23,86,167,.25)!important;
  background:#fff!important;
  outline:3px solid rgba(46,120,210,.11)!important;
  outline-offset:2px!important;
}
.portal-birthday-header{
  position:relative!important;
  z-index:3!important;
  min-height:104px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:28px!important;
  padding:28px 76px 22px 42px!important;
  border-bottom:1px solid rgba(24,71,134,.09)!important;
}
.portal-birthday-brand{
  display:flex!important;
  align-items:center!important;
  gap:13px!important;
  margin:0!important;
}
.portal-birthday-brand__logo{
  width:56px!important;
  height:56px!important;
  flex:0 0 56px!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid rgba(40,95,170,.12)!important;
  border-radius:17px!important;
  background:rgba(255,255,255,.88)!important;
  box-shadow:0 13px 32px rgba(26,67,127,.10)!important;
}
.portal-birthday-brand__logo img{
  display:block!important;
  width:46px!important;
  height:46px!important;
  object-fit:contain!important;
}
.portal-birthday-brand__text{
  display:flex!important;
  flex-direction:column!important;
  gap:3px!important;
}
.portal-birthday-brand__text strong{
  color:#183b6b!important;
  font-size:14px!important;
  font-weight:1000!important;
}
.portal-birthday-brand__text small{
  color:#71839e!important;
  font-size:11px!important;
  font-weight:750!important;
}
.portal-birthday-official-badge{
  display:inline-flex!important;
  align-items:center!important;
  gap:8px!important;
  padding:9px 13px!important;
  border:1px solid rgba(45,105,181,.12)!important;
  border-radius:999px!important;
  color:#45617f!important;
  background:rgba(239,246,255,.82)!important;
  font-size:10.5px!important;
  font-weight:900!important;
  white-space:nowrap!important;
}
.portal-birthday-official-badge i{
  width:7px!important;
  height:7px!important;
  border-radius:50%!important;
  background:#2d79d2!important;
  box-shadow:0 0 0 5px rgba(45,121,210,.10)!important;
}
.portal-birthday-main{
  position:relative!important;
  z-index:2!important;
  flex:1 1 auto!important;
  min-height:0!important;
  display:grid!important;
  grid-template-columns:minmax(0,1.38fr) minmax(290px,.82fr)!important;
  align-items:stretch!important;
}
.portal-birthday-copy{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  padding:38px 76px 42px 48px!important;
}
.portal-birthday-eyebrow{
  width:max-content!important;
  max-width:100%!important;
  display:inline-flex!important;
  align-items:center!important;
  gap:8px!important;
  padding:8px 13px!important;
  border:1px solid rgba(204,155,48,.22)!important;
  border-radius:999px!important;
  color:#8a6823!important;
  background:linear-gradient(180deg,rgba(255,251,237,.94),rgba(250,244,222,.84))!important;
  font-size:10.5px!important;
  font-weight:950!important;
}
.portal-birthday-eyebrow::before{
  content:"✦"!important;
  color:#d7a52f!important;
  font-size:12px!important;
}
.portal-birthday-heading{
  display:grid!important;
  gap:9px!important;
  margin-top:18px!important;
}
.portal-birthday-heading h2{
  margin:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:2px!important;
  line-height:1.28!important;
  letter-spacing:-.5px!important;
}
.portal-birthday-heading__line{
  color:#172b49!important;
  font-size:clamp(31px,4.2vw,52px)!important;
  font-weight:1000!important;
}
.portal-birthday-heading__name{
  width:max-content!important;
  max-width:100%!important;
  color:#1461b9!important;
  font-size:clamp(27px,3.5vw,45px)!important;
  font-weight:1000!important;
  background:linear-gradient(90deg,#114f9b,#2f87d3 58%,#b78928)!important;
  -webkit-background-clip:text!important;
  background-clip:text!important;
  -webkit-text-fill-color:transparent!important;
}
.portal-birthday-heading time{
  min-height:22px!important;
  color:#7d8da4!important;
  font-size:11px!important;
  font-weight:850!important;
}
.portal-birthday-message-card{
  position:relative!important;
  max-width:610px!important;
  margin-top:24px!important;
  padding:20px 23px 18px!important;
  border:1px solid rgba(35,89,160,.10)!important;
  border-right:4px solid #2f7bc8!important;
  border-radius:17px!important;
  background:linear-gradient(135deg,rgba(247,251,255,.92),rgba(255,255,255,.95))!important;
  box-shadow:0 14px 35px rgba(27,67,119,.07)!important;
}
.portal-birthday-quote-mark{
  position:absolute!important;
  top:-13px!important;
  left:17px!important;
  color:rgba(35,105,181,.14)!important;
  font-family:Georgia,serif!important;
  font-size:62px!important;
  line-height:1!important;
  font-weight:700!important;
  pointer-events:none!important;
}
.portal-birthday-message-card p{
  position:relative!important;
  z-index:1!important;
  margin:0!important;
  color:#4b607c!important;
  font-size:14px!important;
  font-weight:650!important;
  line-height:2.05!important;
  text-align:justify!important;
}
.portal-birthday-signature{
  width:max-content!important;
  max-width:100%!important;
  display:flex!important;
  flex-direction:column!important;
  gap:3px!important;
  margin-top:22px!important;
  padding-top:14px!important;
  border-top:1px solid rgba(31,79,143,.10)!important;
}
.portal-birthday-signature span{
  color:#8490a3!important;
  font-size:10.5px!important;
  font-weight:750!important;
}
.portal-birthday-signature strong{
  color:#254d81!important;
  font-size:13px!important;
  font-weight:1000!important;
}
.portal-birthday-emblem{
  position:relative!important;
  min-height:390px!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  border-right:1px solid rgba(35,84,151,.08)!important;
  background:
    radial-gradient(circle at 50% 48%,rgba(255,255,255,.94) 0 21%,transparent 22%),
    linear-gradient(155deg,rgba(229,239,253,.72),rgba(247,250,255,.42) 52%,rgba(249,243,222,.52))!important;
}
.portal-birthday-emblem::before{
  content:""!important;
  position:absolute!important;
  inset:16px!important;
  border:1px solid rgba(255,255,255,.80)!important;
  border-radius:24px!important;
  box-shadow:0 0 0 1px rgba(31,86,160,.045) inset!important;
  pointer-events:none!important;
}
.portal-birthday-emblem__orbit{
  position:absolute!important;
  border-radius:50%!important;
  pointer-events:none!important;
}
.portal-birthday-emblem__orbit--outer{
  width:290px!important;
  height:290px!important;
  border:1px solid rgba(38,101,181,.14)!important;
  box-shadow:0 0 0 26px rgba(255,255,255,.28),0 0 0 54px rgba(48,116,199,.035)!important;
}
.portal-birthday-emblem__orbit--inner{
  width:202px!important;
  height:202px!important;
  border:1px dashed rgba(199,154,54,.28)!important;
}
.portal-birthday-emblem__seal{
  position:relative!important;
  z-index:2!important;
  width:164px!important;
  height:164px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:1px!important;
  border:1px solid rgba(207,161,54,.24)!important;
  border-radius:50%!important;
  background:
    radial-gradient(circle at 35% 28%,rgba(255,255,255,.98),rgba(250,248,239,.95) 65%,rgba(239,229,195,.88))!important;
  box-shadow:
    0 24px 55px rgba(32,68,118,.17),
    0 0 0 8px rgba(255,255,255,.55),
    0 0 0 9px rgba(32,91,166,.07)!important;
}
.portal-birthday-emblem__seal-kicker{
  color:#8a7550!important;
  font-size:9px!important;
  font-weight:900!important;
}
.portal-birthday-emblem__seal strong{
  color:#174f91!important;
  font-size:44px!important;
  font-weight:1000!important;
  line-height:1.2!important;
}
.portal-birthday-emblem__seal small{
  color:#9a7b3b!important;
  font-size:10px!important;
  font-weight:950!important;
}
.portal-birthday-emblem__spark{
  position:absolute!important;
  z-index:3!important;
  color:#d6a832!important;
  font-size:18px!important;
  text-shadow:0 8px 19px rgba(200,151,42,.20)!important;
}
.portal-birthday-emblem__spark--one{top:22%;right:17%;}
.portal-birthday-emblem__spark--two{bottom:25%;left:19%;font-size:13px!important;color:#3c8ad3!important;}
.portal-birthday-emblem__ribbon{
  position:absolute!important;
  z-index:3!important;
  bottom:42px!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  color:#637b9a!important;
  font-size:9.5px!important;
  font-weight:950!important;
  letter-spacing:.2px!important;
}
.portal-birthday-emblem__ribbon span{
  width:36px!important;
  height:1px!important;
  background:linear-gradient(90deg,transparent,rgba(74,112,160,.38))!important;
}
.portal-birthday-emblem__ribbon span:last-child{transform:scaleX(-1)!important;}
.portal-birthday-footer{
  position:relative!important;
  z-index:3!important;
  min-height:50px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:20px!important;
  padding:13px 76px 13px 42px!important;
  border-top:1px solid rgba(24,71,134,.08)!important;
  color:#8996a8!important;
  background:rgba(247,250,254,.72)!important;
  font-size:9.5px!important;
  font-weight:750!important;
}
.portal-birthday-footer__mark{
  color:rgba(20,69,132,.44)!important;
  font-family:Arial,sans-serif!important;
  font-size:10px!important;
  font-weight:800!important;
  letter-spacing:3px!important;
}
.portal-birthday-sprinkles{
  position:absolute!important;
  inset:0!important;
  z-index:6!important;
  overflow:hidden!important;
  pointer-events:none!important;
}
.portal-birthday-sprinkles i{
  position:absolute!important;
  left:var(--x)!important;
  top:var(--y)!important;
  width:7px!important;
  height:15px!important;
  border-radius:999px!important;
  background:var(--c)!important;
  opacity:.72!important;
  transform:rotate(var(--r))!important;
  box-shadow:0 5px 12px rgba(34,78,132,.10)!important;
}
@media(max-width:820px){
  .portal-birthday-modal{padding:12px!important;}
  .portal-birthday-dialog{
    width:min(590px,calc(100vw - 24px))!important;
    min-height:0!important;
    max-height:calc(100vh - 24px)!important;
    overflow:auto!important;
    border-radius:25px!important;
  }
  .portal-birthday-header{
    min-height:88px!important;
    padding:22px 66px 18px 24px!important;
  }
  .portal-birthday-official-badge{display:none!important;}
  .portal-birthday-main{
    grid-template-columns:1fr!important;
  }
  .portal-birthday-copy{
    padding:30px 28px 32px!important;
  }
  .portal-birthday-heading__line{font-size:36px!important;}
  .portal-birthday-heading__name{font-size:31px!important;}
  .portal-birthday-message-card{margin-top:20px!important;}
  .portal-birthday-emblem{
    min-height:250px!important;
    border-right:0!important;
    border-top:1px solid rgba(35,84,151,.08)!important;
  }
  .portal-birthday-emblem__orbit--outer{width:205px!important;height:205px!important;box-shadow:0 0 0 18px rgba(255,255,255,.28),0 0 0 36px rgba(48,116,199,.035)!important;}
  .portal-birthday-emblem__orbit--inner{width:148px!important;height:148px!important;}
  .portal-birthday-emblem__seal{width:124px!important;height:124px!important;}
  .portal-birthday-emblem__seal strong{font-size:34px!important;}
  .portal-birthday-emblem__ribbon{bottom:20px!important;}
  .portal-birthday-footer{padding:12px 28px!important;}
  .portal-birthday-close,
  .portal-birthday-close:hover,
  .portal-birthday-close:focus,
  .portal-birthday-close:active{top:13px!important;left:13px!important;}
}
@media(max-width:460px){
  .portal-birthday-header{padding-right:22px!important;}
  .portal-birthday-brand__logo{width:48px!important;height:48px!important;flex-basis:48px!important;}
  .portal-birthday-brand__logo img{width:40px!important;height:40px!important;}
  .portal-birthday-brand__text strong{font-size:12.5px!important;}
  .portal-birthday-brand__text small{font-size:9.5px!important;}
  .portal-birthday-copy{padding:26px 22px 28px!important;}
  .portal-birthday-heading__line{font-size:31px!important;}
  .portal-birthday-heading__name{font-size:27px!important;}
  .portal-birthday-message-card{padding:18px 18px 16px!important;}
  .portal-birthday-message-card p{font-size:12.5px!important;line-height:1.95!important;}
  .portal-birthday-emblem{min-height:225px!important;}
  .portal-birthday-footer__mark{display:none!important;}
}
@media(max-height:690px) and (min-width:821px){
  .portal-birthday-dialog{min-height:520px!important;}
  .portal-birthday-header{min-height:88px!important;padding-top:21px!important;padding-bottom:17px!important;}
  .portal-birthday-copy{padding-top:27px!important;padding-bottom:28px!important;}
  .portal-birthday-heading{margin-top:13px!important;}
  .portal-birthday-message-card{margin-top:17px!important;padding-top:16px!important;padding-bottom:14px!important;}
  .portal-birthday-message-card p{line-height:1.85!important;}
  .portal-birthday-signature{margin-top:15px!important;}
  .portal-birthday-emblem{min-height:355px!important;}
}

@media(prefers-reduced-motion:reduce){
  body.portal-status-master .portal-smart-assistant.is-birthday .portal-smart-assistant__image--idle,
  body.portal-status-master .portal-smart-assistant.is-birthday .portal-smart-assistant__image--birthday,
  .portal-birthday-sprinkles i{animation:none!important;}
}


/* =========================================================
   Birthday launcher stability + transparent bouquet (v19)
   کاراکتر تولد در صفحه ثابت است و هیچ انیمیشن یا جابه‌جایی
   hover/focus روی آن اعمال نمی‌شود.
   ========================================================= */
body.portal-status-master button#portal-smart-assistant.is-birthday,
body.portal-status-master button#portal-smart-assistant.is-birthday:hover,
body.portal-status-master button#portal-smart-assistant.is-birthday:active,
body.portal-status-master button#portal-smart-assistant.is-birthday:focus,
body.portal-status-master button#portal-smart-assistant.is-birthday:focus-visible{
  transform:none!important;
  translate:none!important;
  animation:none!important;
}
body.portal-status-master .portal-smart-assistant.is-birthday .portal-smart-assistant__image--birthday,
body.portal-status-master .portal-smart-assistant.is-birthday:hover .portal-smart-assistant__image--birthday,
body.portal-status-master .portal-smart-assistant.is-birthday:active .portal-smart-assistant__image--birthday,
body.portal-status-master .portal-smart-assistant.is-birthday:focus .portal-smart-assistant__image--birthday,
body.portal-status-master .portal-smart-assistant.is-birthday:focus-visible .portal-smart-assistant__image--birthday{
  opacity:1!important;
  visibility:visible!important;
  animation:none!important;
  transition:none!important;
  translate:none!important;
  transform:translateX(50%)!important;
  scale:1!important;
  will-change:auto!important;
}


/* =========================================================
   Birthday modal v21 — modern + emotional
   ========================================================= */
.portal-birthday-dialog.portal-birthday-dialog--v21{
  width:min(940px,calc(100vw - 42px))!important;
  min-height:535px!important;
  height:auto!important;
  max-height:calc(100vh - 42px)!important;
  display:block!important;
  overflow:hidden!important;
  border:1px solid rgba(255,255,255,.78)!important;
  border-radius:34px!important;
  color:#1a2940!important;
  background:rgba(249,251,255,.94)!important;
  box-shadow:0 42px 120px rgba(6,20,47,.44),0 1px 0 rgba(255,255,255,.95) inset!important;
  backdrop-filter:blur(22px) saturate(1.08)!important;
  -webkit-backdrop-filter:blur(22px) saturate(1.08)!important;
  isolation:isolate!important;
  animation:portalBirthdayV21In .38s cubic-bezier(.2,.78,.25,1) both!important;
}
.portal-birthday-dialog.portal-birthday-dialog--v21::before{
  content:""!important;
  position:absolute!important;
  inset:0 0 auto 0!important;
  z-index:12!important;
  height:4px!important;
  background:linear-gradient(90deg,#286dd6 0%,#65b6ef 35%,#f0c761 67%,#ef87a4 100%)!important;
  pointer-events:none!important;
}
.portal-birthday-dialog.portal-birthday-dialog--v21::after{
  content:""!important;
  position:absolute!important;
  inset:0!important;
  z-index:-2!important;
  background:
    radial-gradient(circle at 77% 12%,rgba(81,151,235,.14),transparent 27%),
    radial-gradient(circle at 15% 88%,rgba(244,190,90,.12),transparent 25%),
    linear-gradient(135deg,rgba(255,255,255,.96),rgba(244,248,255,.92))!important;
  pointer-events:none!important;
}
.portal-birthday-dialog--v21 .portal-birthday-close,
.portal-birthday-dialog--v21 .portal-birthday-close:hover,
.portal-birthday-dialog--v21 .portal-birthday-close:focus,
.portal-birthday-dialog--v21 .portal-birthday-close:active{
  top:18px!important;
  left:18px!important;
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  border:1px solid rgba(255,255,255,.78)!important;
  border-radius:14px!important;
  color:#31577f!important;
  background:linear-gradient(145deg,rgba(255,255,255,.58),rgba(233,241,251,.34))!important;
  -webkit-backdrop-filter:blur(14px) saturate(145%)!important;
  backdrop-filter:blur(14px) saturate(145%)!important;
  box-shadow:0 10px 26px rgba(39,72,113,.13),0 1px 0 rgba(255,255,255,.78) inset!important;
  font-size:25px!important;
  font-weight:400!important;
  line-height:1!important;
}
.portal-birthday-dialog--v21 .portal-birthday-close:hover,
.portal-birthday-dialog--v21 .portal-birthday-close:focus-visible{
  color:#1f4f84!important;
  background:linear-gradient(145deg,rgba(255,255,255,.76),rgba(229,239,251,.52))!important;
  border-color:rgba(255,255,255,.94)!important;
  box-shadow:0 12px 30px rgba(39,72,113,.17),0 1px 0 rgba(255,255,255,.9) inset!important;
  outline:2px solid rgba(77,132,194,.13)!important;
  outline-offset:3px!important;
}
.portal-birthday-v21{
  position:relative!important;
  min-height:535px!important;
  display:grid!important;
  grid-template-columns:minmax(300px,.86fr) minmax(0,1.38fr)!important;
  direction:ltr!important;
}
.portal-birthday-v21__art,
.portal-birthday-v21__content{
  direction:rtl!important;
}
.portal-birthday-v21__art{
  position:relative!important;
  min-height:535px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:27px!important;
  overflow:hidden!important;
  padding:54px 34px 42px!important;
  border-right:1px solid rgba(39,91,159,.08)!important;
  background:
    radial-gradient(circle at 50% 38%,rgba(255,255,255,.96) 0 14%,transparent 40%),
    linear-gradient(155deg,rgba(230,240,255,.88),rgba(244,248,255,.72) 51%,rgba(255,243,226,.84))!important;
}
.portal-birthday-v21__art::after{
  content:""!important;
  position:absolute!important;
  inset:22px!important;
  border:1px solid rgba(255,255,255,.72)!important;
  border-radius:26px!important;
  box-shadow:0 0 0 1px rgba(31,86,160,.045) inset!important;
  pointer-events:none!important;
}
.portal-birthday-v21__aurora{
  position:absolute!important;
  border-radius:50%!important;
  filter:blur(2px)!important;
  pointer-events:none!important;
}
.portal-birthday-v21__aurora--one{
  width:330px!important;
  height:330px!important;
  top:-150px!important;
  left:-120px!important;
  background:radial-gradient(circle,rgba(88,158,236,.22),transparent 68%)!important;
}
.portal-birthday-v21__aurora--two{
  width:300px!important;
  height:300px!important;
  right:-120px!important;
  bottom:-145px!important;
  background:radial-gradient(circle,rgba(243,184,84,.22),transparent 68%)!important;
}
.portal-birthday-v21__bouquet-mark{
  position:relative!important;
  z-index:2!important;
  width:230px!important;
  height:230px!important;
  flex:0 0 230px!important;
  border:1px solid rgba(255,255,255,.83)!important;
  border-radius:50%!important;
  background:
    radial-gradient(circle at 38% 30%,rgba(255,255,255,.98),rgba(250,251,255,.91) 55%,rgba(232,240,252,.88))!important;
  box-shadow:
    0 32px 70px rgba(35,75,126,.17),
    0 0 0 18px rgba(255,255,255,.34),
    0 0 0 19px rgba(44,105,181,.055)!important;
}
.portal-birthday-v21__bouquet-mark::before,
.portal-birthday-v21__bouquet-mark::after{
  content:""!important;
  position:absolute!important;
  inset:25px!important;
  border-radius:50%!important;
  border:1px dashed rgba(52,115,196,.14)!important;
}
.portal-birthday-v21__bouquet-mark::after{
  inset:52px!important;
  border-style:solid!important;
  border-color:rgba(222,174,72,.16)!important;
}
.portal-birthday-v21__petal{
  position:absolute!important;
  z-index:3!important;
  left:50%!important;
  top:50%!important;
  width:39px!important;
  height:64px!important;
  margin:-58px 0 0 -19px!important;
  border-radius:72% 72% 50% 50%!important;
  transform-origin:50% 58px!important;
  box-shadow:0 10px 20px rgba(53,73,111,.11)!important;
}
.portal-birthday-v21__petal--1{transform:rotate(0deg)!important;background:linear-gradient(180deg,#ff9eb5,#f16e91)!important;}
.portal-birthday-v21__petal--2{transform:rotate(45deg)!important;background:linear-gradient(180deg,#ffd676,#f2b74d)!important;}
.portal-birthday-v21__petal--3{transform:rotate(90deg)!important;background:linear-gradient(180deg,#87c8f6,#5da5df)!important;}
.portal-birthday-v21__petal--4{transform:rotate(135deg)!important;background:linear-gradient(180deg,#8edbbd,#5cb695)!important;}
.portal-birthday-v21__petal--5{transform:rotate(180deg)!important;background:linear-gradient(180deg,#d9a5e8,#b879cf)!important;}
.portal-birthday-v21__petal--6{transform:rotate(225deg)!important;background:linear-gradient(180deg,#ffb092,#ee8462)!important;}
.portal-birthday-v21__petal--7{transform:rotate(270deg)!important;background:linear-gradient(180deg,#9fb7f5,#748fdc)!important;}
.portal-birthday-v21__petal--8{transform:rotate(315deg)!important;background:linear-gradient(180deg,#ffc1d4,#e983a4)!important;}
.portal-birthday-v21__petal-core{
  position:absolute!important;
  z-index:5!important;
  left:50%!important;
  top:50%!important;
  width:66px!important;
  height:66px!important;
  transform:translate(-50%,-50%)!important;
  border:8px solid rgba(255,255,255,.74)!important;
  border-radius:50%!important;
  background:radial-gradient(circle at 35% 30%,#fff5b6,#f4c45a 58%,#d99c2c)!important;
  box-shadow:0 15px 28px rgba(207,149,45,.22)!important;
}
.portal-birthday-v21__stem{
  position:absolute!important;
  z-index:1!important;
  left:50%!important;
  top:124px!important;
  width:8px!important;
  height:78px!important;
  border-radius:999px!important;
  background:linear-gradient(180deg,#6abc8f,#3c916b)!important;
  transform-origin:top!important;
}
.portal-birthday-v21__stem--one{transform:translateX(-7px) rotate(13deg)!important;}
.portal-birthday-v21__stem--two{transform:translateX(5px) rotate(-14deg)!important;}
.portal-birthday-v21__leaf{
  position:absolute!important;
  z-index:2!important;
  top:165px!important;
  width:35px!important;
  height:18px!important;
  border-radius:100% 0 100% 0!important;
  background:linear-gradient(135deg,#77c69c,#3f9870)!important;
}
.portal-birthday-v21__leaf--one{left:77px!important;transform:rotate(21deg)!important;}
.portal-birthday-v21__leaf--two{right:73px!important;transform:scaleX(-1) rotate(15deg)!important;}
.portal-birthday-v21__art-copy{
  position:relative!important;
  z-index:2!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  text-align:center!important;
  gap:3px!important;
}
.portal-birthday-v21__art-copy span{
  color:#7d89a0!important;
  font-size:11px!important;
  font-weight:850!important;
}
.portal-birthday-v21__art-copy strong{
  color:#214f91!important;
  font-size:29px!important;
  font-weight:1000!important;
  line-height:1.35!important;
}
.portal-birthday-v21__art-copy small{
  color:#b07b3a!important;
  font-size:10.5px!important;
  font-weight:850!important;
}
.portal-birthday-v21__content{
  position:relative!important;
  min-width:0!important;
  min-height:535px!important;
  display:flex!important;
  flex-direction:column!important;
  background:linear-gradient(145deg,rgba(255,255,255,.89),rgba(247,250,255,.76))!important;
}
.portal-birthday-v21__header{
  min-height:94px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:24px!important;
  padding:22px 78px 17px 42px!important;
  border-bottom:1px solid rgba(35,84,151,.075)!important;
}
.portal-birthday-v21__brand{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  min-width:0!important;
}
.portal-birthday-v21__logo{
  width:52px!important;
  height:52px!important;
  flex:0 0 52px!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid rgba(50,105,179,.10)!important;
  border-radius:16px!important;
  background:rgba(255,255,255,.91)!important;
  box-shadow:0 12px 28px rgba(31,72,129,.09)!important;
}
.portal-birthday-v21__logo img{
  width:44px!important;
  height:44px!important;
  display:block!important;
  object-fit:contain!important;
}
.portal-birthday-v21__brand-copy{
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
}
.portal-birthday-v21__brand-copy strong{
  color:#173b70!important;
  font-size:13.5px!important;
  font-weight:1000!important;
}
.portal-birthday-v21__brand-copy small{
  color:#74849d!important;
  font-size:10px!important;
  font-weight:750!important;
}
.portal-birthday-v21__occasion{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:34px!important;
  padding:7px 13px!important;
  border:1px solid rgba(226,174,66,.28)!important;
  border-radius:999px!important;
  color:#8b681f!important;
  background:rgba(255,248,225,.82)!important;
  box-shadow:0 8px 20px rgba(188,139,43,.08)!important;
  font-size:10px!important;
  font-weight:900!important;
  white-space:nowrap!important;
}
.portal-birthday-v21__body{
  flex:1 1 auto!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  padding:34px 78px 42px 48px!important;
}
.portal-birthday-v21__kicker{
  margin:0 0 10px!important;
  color:#4e78ae!important;
  font-size:11px!important;
  font-weight:900!important;
}
.portal-birthday-v21__title{
  margin:0!important;
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:baseline!important;
  gap:5px 12px!important;
  color:#162c4c!important;
  line-height:1.32!important;
  letter-spacing:-.5px!important;
}
.portal-birthday-v21__name{
  color:#1e63b8!important;
  font-size:46px!important;
  font-weight:1000!important;
  background:linear-gradient(135deg,#1e63b8,#5c8fd2 58%,#c28e2d)!important;
  -webkit-background-clip:text!important;
  background-clip:text!important;
  -webkit-text-fill-color:transparent!important;
}
.portal-birthday-v21__title-line{
  color:#1c2e48!important;
  font-size:36px!important;
  font-weight:1000!important;
}
.portal-birthday-v21__date{
  width:max-content!important;
  display:inline-flex!important;
  align-items:center!important;
  margin-top:8px!important;
  color:#8b6b42!important;
  font-size:10.5px!important;
  font-weight:850!important;
}
.portal-birthday-v21__date::before{
  content:""!important;
  width:25px!important;
  height:1px!important;
  margin-left:9px!important;
  background:linear-gradient(90deg,#d3a74d,transparent)!important;
}
.portal-birthday-v21__message{
  position:relative!important;
  margin-top:25px!important;
  padding:20px 24px 18px!important;
  border:1px solid rgba(44,102,176,.10)!important;
  border-right:4px solid #3c7fce!important;
  border-radius:20px!important;
  background:rgba(255,255,255,.76)!important;
  box-shadow:0 18px 42px rgba(28,67,119,.08),0 1px 0 rgba(255,255,255,.92) inset!important;
}
.portal-birthday-v21__quote{
  position:absolute!important;
  top:-12px!important;
  left:20px!important;
  color:rgba(48,114,196,.18)!important;
  font-family:Georgia,serif!important;
  font-size:54px!important;
  font-weight:900!important;
  line-height:1!important;
}
.portal-birthday-v21__message p{
  margin:0!important;
  color:#344a68!important;
  font-size:13.5px!important;
  font-weight:760!important;
  line-height:2.05!important;
}
.portal-birthday-v21__signature{
  margin-top:22px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  gap:2px!important;
}
.portal-birthday-v21__signature::before{
  content:""!important;
  width:72px!important;
  height:1px!important;
  margin-bottom:8px!important;
  background:linear-gradient(90deg,#d7af5b,transparent)!important;
}
.portal-birthday-v21__signature span{
  color:#8995a6!important;
  font-size:9.5px!important;
  font-weight:800!important;
}
.portal-birthday-v21__signature strong{
  color:#244f86!important;
  font-size:13px!important;
  font-weight:1000!important;
}
@keyframes portalBirthdayV21In{
  from{opacity:0;transform:translateY(16px) scale(.975);}
  to{opacity:1;transform:translateY(0) scale(1);}
}
@media(max-width:820px){
  .portal-birthday-dialog.portal-birthday-dialog--v21{
    width:min(610px,calc(100vw - 24px))!important;
    min-height:0!important;
    max-height:calc(100vh - 24px)!important;
    overflow:auto!important;
    border-radius:27px!important;
  }
  .portal-birthday-v21{
    min-height:0!important;
    grid-template-columns:1fr!important;
  }
  .portal-birthday-v21__content{min-height:0!important;grid-row:1!important;}
  .portal-birthday-v21__art{
    min-height:270px!important;
    grid-row:2!important;
    padding:35px 26px 31px!important;
    border-right:0!important;
    border-top:1px solid rgba(39,91,159,.08)!important;
  }
  .portal-birthday-v21__bouquet-mark{width:165px!important;height:165px!important;flex-basis:165px!important;transform:scale(.72)!important;margin:-23px 0!important;}
  .portal-birthday-v21__header{min-height:86px!important;padding:19px 67px 16px 24px!important;}
  .portal-birthday-v21__occasion{display:none!important;}
  .portal-birthday-v21__body{padding:28px 28px 32px!important;}
  .portal-birthday-v21__name{font-size:39px!important;}
  .portal-birthday-v21__title-line{font-size:31px!important;}
}
@media(max-width:460px){
  .portal-birthday-modal{padding:8px!important;}
  .portal-birthday-dialog.portal-birthday-dialog--v21{width:calc(100vw - 16px)!important;max-height:calc(100vh - 16px)!important;border-radius:23px!important;}
  .portal-birthday-v21__header{padding:17px 59px 14px 18px!important;}
  .portal-birthday-v21__logo{width:47px!important;height:47px!important;flex-basis:47px!important;}
  .portal-birthday-v21__logo img{width:39px!important;height:39px!important;}
  .portal-birthday-v21__brand-copy strong{font-size:12px!important;}
  .portal-birthday-v21__brand-copy small{font-size:9px!important;}
  .portal-birthday-v21__body{padding:25px 21px 28px!important;}
  .portal-birthday-v21__name{font-size:34px!important;}
  .portal-birthday-v21__title-line{font-size:27px!important;}
  .portal-birthday-v21__message{padding:18px 18px 16px!important;}
  .portal-birthday-v21__message p{font-size:12.5px!important;line-height:1.95!important;}
  .portal-birthday-v21__art{min-height:235px!important;}
  .portal-birthday-v21__art-copy strong{font-size:25px!important;}
}
@media(max-height:680px) and (min-width:821px){
  .portal-birthday-dialog.portal-birthday-dialog--v21{min-height:500px!important;}
  .portal-birthday-v21,.portal-birthday-v21__art,.portal-birthday-v21__content{min-height:500px!important;}
  .portal-birthday-v21__art{padding-top:35px!important;padding-bottom:30px!important;gap:18px!important;}
  .portal-birthday-v21__bouquet-mark{transform:scale(.86)!important;margin:-16px 0!important;}
  .portal-birthday-v21__header{min-height:84px!important;padding-top:17px!important;padding-bottom:13px!important;}
  .portal-birthday-v21__body{padding-top:25px!important;padding-bottom:27px!important;}
  .portal-birthday-v21__message{margin-top:18px!important;padding-top:16px!important;padding-bottom:14px!important;}
  .portal-birthday-v21__message p{line-height:1.9!important;}
  .portal-birthday-v21__signature{margin-top:15px!important;}
}
@media(prefers-reduced-motion:reduce){
  .portal-birthday-dialog.portal-birthday-dialog--v21{animation:none!important;}
}


/* =========================================================
   Birthday modal close/title correction v23
   The global button skin has greater specificity, so the
   birthday close button must be isolated with the modal id.
   ========================================================= */
#portal-birthday-modal .portal-birthday-dialog--v21 button.portal-birthday-close.modal-close,
#portal-birthday-modal .portal-birthday-dialog--v21 button.portal-birthday-close.modal-close:hover,
#portal-birthday-modal .portal-birthday-dialog--v21 button.portal-birthday-close.modal-close:focus,
#portal-birthday-modal .portal-birthday-dialog--v21 button.portal-birthday-close.modal-close:focus-visible,
#portal-birthday-modal .portal-birthday-dialog--v21 button.portal-birthday-close.modal-close:active{
  appearance:none!important;
  -webkit-appearance:none!important;
  background:rgba(255,255,255,.20)!important;
  background-color:rgba(255,255,255,.20)!important;
  background-image:none!important;
  border:1px solid rgba(255,255,255,.72)!important;
  color:#31577f!important;
  box-shadow:0 9px 24px rgba(28,62,103,.12),0 1px 0 rgba(255,255,255,.72) inset!important;
  -webkit-backdrop-filter:blur(16px) saturate(135%)!important;
  backdrop-filter:blur(16px) saturate(135%)!important;
  opacity:1!important;
  filter:none!important;
  text-shadow:none!important;
  transform:none!important;
  outline:none!important;
}
#portal-birthday-modal .portal-birthday-dialog--v21 button.portal-birthday-close.modal-close:hover,
#portal-birthday-modal .portal-birthday-dialog--v21 button.portal-birthday-close.modal-close:focus-visible{
  background:rgba(255,255,255,.34)!important;
  background-color:rgba(255,255,255,.34)!important;
  background-image:none!important;
  border-color:rgba(255,255,255,.92)!important;
  color:#1f4f84!important;
  box-shadow:0 11px 28px rgba(28,62,103,.15),0 1px 0 rgba(255,255,255,.88) inset!important;
}
.portal-birthday-v21__name::after{
  content:"،"!important;
  display:inline!important;
  margin-inline-start:1px!important;
  color:#2f6fbb!important;
  -webkit-text-fill-color:#2f6fbb!important;
}

/* =========================================================
   Birthday flower composition v27 (native embedded version)
   The animation is rendered directly in an isolated Shadow DOM.
   Only the left artwork of the birthday modal is affected.
   ========================================================= */
#portal-birthday-modal .portal-birthday-v21__art{
  overflow:visible!important;
}
#portal-birthday-modal .portal-birthday-v21__flower-stage{
  position:relative!important;
  z-index:3!important;
  width:314px!important;
  height:292px!important;
  flex:0 0 292px!important;
  margin:-8px 0 6px!important;
  overflow:visible!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  transform:none!important;
  isolation:isolate!important;
  pointer-events:none!important;
}
#portal-birthday-modal .portal-birthday-v21__flower-stage::before{
  content:none!important;
  display:none!important;
}
#portal-birthday-modal .portal-birthday-v21__flower-stage::after{
  content:""!important;
  position:absolute!important;
  z-index:1!important;
  left:50%!important;
  bottom:12px!important;
  width:154px!important;
  height:22px!important;
  transform:translateX(-50%)!important;
  border-radius:50%!important;
  background:radial-gradient(ellipse,rgba(44,82,62,.11) 0%,rgba(44,82,62,.045) 48%,transparent 74%)!important;
  filter:blur(3px)!important;
  pointer-events:none!important;
}
#portal-birthday-modal .portal-birthday-v21__flower-host{
  --bf-u:3.02px;
  position:absolute!important;
  z-index:4!important;
  left:50%!important;
  bottom:12px!important;
  display:block!important;
  width:306px!important;
  height:288px!important;
  transform:translateX(-50%)!important;
  overflow:visible!important;
  border:0!important;
  background:transparent!important;
  color-scheme:light!important;
  pointer-events:none!important;
  filter:none!important;
}
#portal-birthday-modal template[data-birthday-flower-template]{
  display:none!important;
}

@media (max-width:820px){
  #portal-birthday-modal .portal-birthday-v21__flower-stage{
    width:258px!important;
    height:232px!important;
    flex-basis:232px!important;
    margin:-4px 0 4px!important;
    transform:none!important;
  }
  #portal-birthday-modal .portal-birthday-v21__flower-stage::before{
    content:none!important;
    display:none!important;
  }
  #portal-birthday-modal .portal-birthday-v21__flower-stage::after{
    bottom:10px!important;
    width:132px!important;
  }
  #portal-birthday-modal .portal-birthday-v21__flower-host{
    --bf-u:2.56px;
    bottom:10px!important;
    width:252px!important;
    height:236px!important;
  }
}

@media (max-width:560px){
  #portal-birthday-modal .portal-birthday-v21__flower-stage{
    width:224px!important;
    height:202px!important;
    flex-basis:202px!important;
    margin:-2px 0 2px!important;
  }
  #portal-birthday-modal .portal-birthday-v21__flower-stage::before{
    content:none!important;
    display:none!important;
  }
  #portal-birthday-modal .portal-birthday-v21__flower-stage::after{
    bottom:9px!important;
    width:118px!important;
  }
  #portal-birthday-modal .portal-birthday-v21__flower-host{
    --bf-u:2.28px;
    width:220px!important;
    height:206px!important;
    bottom:8px!important;
  }
}

@media (prefers-reduced-motion:reduce){
  #portal-birthday-modal .portal-birthday-v21__flower-host{
    filter:none!important;
  }
}

/* =========================================================
   Smart assistant launcher — pixel-stable states + centered desktop size (v30)
   هر سه حالت idle / wave / birthday روی یک بوم 512×640،
   با یک اندازه و یک نقطه پای ثابت نمایش داده می‌شوند.
   ========================================================= */
body.portal-status-master button#portal-smart-assistant,
body.portal-status-master button#portal-smart-assistant:hover,
body.portal-status-master button#portal-smart-assistant:active,
body.portal-status-master button#portal-smart-assistant:focus,
body.portal-status-master button#portal-smart-assistant:focus-visible{
  top:auto!important;
  right:auto!important;
  bottom:0!important;
  left:50%!important;
  width:176px!important;
  height:220px!important;
  transform:translateX(-50%)!important;
  translate:none!important;
  scale:1!important;
  overflow:visible!important;
}

body.portal-status-master button#portal-smart-assistant .portal-smart-assistant__image,
body.portal-status-master button#portal-smart-assistant:hover .portal-smart-assistant__image,
body.portal-status-master button#portal-smart-assistant:active .portal-smart-assistant__image,
body.portal-status-master button#portal-smart-assistant:focus .portal-smart-assistant__image,
body.portal-status-master button#portal-smart-assistant:focus-visible .portal-smart-assistant__image{
  position:absolute!important;
  inset:0!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  aspect-ratio:auto!important;
  object-fit:contain!important;
  object-position:center bottom!important;
  transform:none!important;
  translate:none!important;
  scale:1!important;
  margin:0!important;
}

body.portal-status-master .portal-smart-assistant__image--wave:not([src]){
  display:none!important;
}

body.portal-status-master button#portal-smart-assistant.is-birthday,
body.portal-status-master button#portal-smart-assistant.is-birthday:hover,
body.portal-status-master button#portal-smart-assistant.is-birthday:active,
body.portal-status-master button#portal-smart-assistant.is-birthday:focus,
body.portal-status-master button#portal-smart-assistant.is-birthday:focus-visible{
  transform:translateX(-50%)!important;
  translate:none!important;
  scale:1!important;
}

@media(max-width:1100px){
  body.portal-status-master button#portal-smart-assistant,
  body.portal-status-master button#portal-smart-assistant:hover,
  body.portal-status-master button#portal-smart-assistant:active,
  body.portal-status-master button#portal-smart-assistant:focus,
  body.portal-status-master button#portal-smart-assistant:focus-visible{
    width:160px!important;
    height:200px!important;
  }
}

@media(max-width:760px){
  body.portal-status-master button#portal-smart-assistant,
  body.portal-status-master button#portal-smart-assistant:hover,
  body.portal-status-master button#portal-smart-assistant:active,
  body.portal-status-master button#portal-smart-assistant:focus,
  body.portal-status-master button#portal-smart-assistant:focus-visible{
    width:144px!important;
    height:180px!important;
  }
}

/* فقط در نمایشگرهای واقعاً کم‌ارتفاع نسخه جمع‌وجور فعال می‌شود.
   در دسکتاپ‌های معمولی، اندازه اصلی 176×220 حفظ می‌شود. */
@media(min-width:901px) and (max-height:820px){
  body.portal-status-master button#portal-smart-assistant,
  body.portal-status-master button#portal-smart-assistant:hover,
  body.portal-status-master button#portal-smart-assistant:active,
  body.portal-status-master button#portal-smart-assistant:focus,
  body.portal-status-master button#portal-smart-assistant:focus-visible{
    width:108px!important;
    height:135px!important;
  }
}

@media(min-width:901px) and (max-height:740px){
  body.portal-status-master button#portal-smart-assistant,
  body.portal-status-master button#portal-smart-assistant:hover,
  body.portal-status-master button#portal-smart-assistant:active,
  body.portal-status-master button#portal-smart-assistant:focus,
  body.portal-status-master button#portal-smart-assistant:focus-visible{
    width:90px!important;
    height:112px!important;
  }
}

/* =========================================================
   Smart assistant seamless state switch (2026-08-03 v31)
   تصویر متحرک فقط بعد از آماده‌شدن فریم نخست نمایش داده می‌شود.
   حذف Crossfade از ایجاد فاصله/چشمک بین حالت ثابت و متحرک جلوگیری می‌کند.
   ========================================================= */
body.portal-status-master .portal-smart-assistant__image--idle,
body.portal-status-master .portal-smart-assistant__image--wave{
  transition:none!important;
}

/* =========================================================
   Portal tutorial bubble + remote video modal (2026-08-03 v36)
   کارت آموزشی کوچک و مستقل، سمت چپ فضانورد و بدون هم‌پوشانی.
   ========================================================= */
body.portal-status-master .portal-tutorial-bubble[hidden],
.portal-tutorial-modal[hidden]{
  display:none!important;
}

body.portal-status-master button#portal-tutorial-bubble,
body.portal-status-master button#portal-tutorial-bubble:hover,
body.portal-status-master button#portal-tutorial-bubble:active,
body.portal-status-master button#portal-tutorial-bubble:focus{
  position:absolute!important;
  z-index:6!important;
  left:calc(50% + 28px)!important;
  right:auto!important;
  bottom:150px!important;
  width:96px!important;
  min-width:0!important;
  min-height:50px!important;
  margin:0!important;
  padding:8px 9px!important;
  display:grid!important;
  place-items:center!important;
  direction:rtl!important;
  color:#173750!important;
  border:1px solid rgba(30,111,165,.20)!important;
  border-radius:25px 24px 25px 22px!important;
  background:linear-gradient(145deg,rgba(255,255,255,.99),rgba(241,250,255,.98))!important;
  box-shadow:0 10px 22px rgba(23,74,112,.14),0 1px 0 rgba(255,255,255,.95) inset!important;
  font-family:inherit!important;
  font-size:9.5px!important;
  font-weight:800!important;
  line-height:1.55!important;
  text-align:center!important;
  cursor:pointer!important;
  appearance:none!important;
  -webkit-appearance:none!important;
  transform:none!important;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease!important;
  isolation:isolate!important;
}

body.portal-status-master button#portal-tutorial-bubble::before{
  content:""!important;
  position:absolute!important;
  z-index:0!important;
  top:-12px!important;
  left:10px!important;
  width:76px!important;
  height:31px!important;
  background:
    radial-gradient(circle at 15px 20px,rgba(250,254,255,.99) 0 13px,transparent 13.6px),
    radial-gradient(circle at 39px 14px,rgba(250,254,255,.99) 0 18px,transparent 18.6px),
    radial-gradient(circle at 63px 20px,rgba(250,254,255,.99) 0 12px,transparent 12.6px)!important;
  filter:
    drop-shadow(0 -1px 0 rgba(30,111,165,.20))
    drop-shadow(-1px 0 0 rgba(30,111,165,.12))
    drop-shadow(1px 0 0 rgba(30,111,165,.12))!important;
  pointer-events:none!important;
}

body.portal-status-master button#portal-tutorial-bubble::after{
  content:""!important;
  position:absolute!important;
  left:-7px!important;
  right:auto!important;
  bottom:8px!important;
  width:13px!important;
  height:13px!important;
  border-top:1px solid rgba(30,111,165,.20)!important;
  border-left:1px solid rgba(30,111,165,.20)!important;
  border-right:0!important;
  background:rgba(245,252,255,.99)!important;
  transform:rotate(-45deg)!important;
  border-radius:4px 0 0 0!important;
}

body.portal-status-master button#portal-tutorial-bubble:hover{
  border-color:rgba(30,111,165,.34)!important;
  box-shadow:0 13px 26px rgba(23,74,112,.18),0 1px 0 rgba(255,255,255,.98) inset!important;
  transform:translateY(-2px)!important;
}

body.portal-status-master button#portal-tutorial-bubble:active{
  transform:none!important;
}

body.portal-status-master button#portal-tutorial-bubble:focus-visible{
  outline:3px solid rgba(37,99,235,.30)!important;
  outline-offset:3px!important;
}

body.portal-status-master .portal-tutorial-bubble__text{
  position:relative!important;
  z-index:1!important;
  display:block!important;
  min-width:0!important;
  font-size:inherit!important;
  line-height:inherit!important;
}

body.portal-status-master .portal-smart-assistant.is-birthday ~ .portal-tutorial-bubble{
  display:none!important;
}

@media(max-width:1100px){
  body.portal-status-master button#portal-tutorial-bubble,
  body.portal-status-master button#portal-tutorial-bubble:hover,
  body.portal-status-master button#portal-tutorial-bubble:active,
  body.portal-status-master button#portal-tutorial-bubble:focus{
    left:calc(50% + 26px)!important;
    right:auto!important;
    bottom:136px!important;
    width:94px!important;
    min-height:47px!important;
    padding:7px 8px!important;
    font-size:9px!important;
  }
}

@media(max-width:760px){
  body.portal-status-master button#portal-tutorial-bubble,
  body.portal-status-master button#portal-tutorial-bubble:hover,
  body.portal-status-master button#portal-tutorial-bubble:active,
  body.portal-status-master button#portal-tutorial-bubble:focus{
    left:calc(50% + 24px)!important;
    right:auto!important;
    bottom:124px!important;
    width:90px!important;
    min-height:45px!important;
    font-size:8.8px!important;
  }
}

@media(min-width:901px) and (max-height:820px){
  body.portal-status-master button#portal-tutorial-bubble,
  body.portal-status-master button#portal-tutorial-bubble:hover,
  body.portal-status-master button#portal-tutorial-bubble:active,
  body.portal-status-master button#portal-tutorial-bubble:focus{
    left:calc(50% + 26px)!important;
    right:auto!important;
    bottom:91px!important;
    width:92px!important;
    min-height:43px!important;
    padding:6px 8px!important;
    font-size:8.3px!important;
  }
}

@media(min-width:901px) and (max-height:740px){
  body.portal-status-master button#portal-tutorial-bubble,
  body.portal-status-master button#portal-tutorial-bubble:hover,
  body.portal-status-master button#portal-tutorial-bubble:active,
  body.portal-status-master button#portal-tutorial-bubble:focus{
    left:calc(50% + 23px)!important;
    right:auto!important;
    bottom:76px!important;
    width:88px!important;
    min-height:40px!important;
    padding:6px 7px!important;
    font-size:8.3px!important;
  }
}

body.portal-tutorial-open{
  overflow:hidden!important;
}

.portal-tutorial-modal{
  position:fixed!important;
  inset:0!important;
  z-index:10100!important;
  display:grid!important;
  place-items:center!important;
  padding:22px!important;
  direction:rtl!important;
  font-family:inherit!important;
}

.portal-tutorial-modal__backdrop{
  position:absolute!important;
  inset:0!important;
  background:
    radial-gradient(circle at 18% 12%,rgba(39,142,213,.20),transparent 34%),
    linear-gradient(135deg,rgba(9,24,40,.76),rgba(18,48,72,.67))!important;
  backdrop-filter:blur(12px) saturate(1.08)!important;
  -webkit-backdrop-filter:blur(12px) saturate(1.08)!important;
}

.portal-tutorial-dialog{
  position:relative!important;
  z-index:1!important;
  width:min(900px,calc(100vw - 40px))!important;
  max-height:calc(100vh - 44px)!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  color:#172c42!important;
  border:1px solid rgba(255,255,255,.76)!important;
  border-radius:25px!important;
  background:linear-gradient(145deg,#fbfdff,#eef7fc)!important;
  box-shadow:
    0 38px 100px rgba(2,16,28,.42),
    0 0 0 1px rgba(39,142,213,.08) inset!important;
}

.portal-tutorial-dialog::before{
  content:""!important;
  position:absolute!important;
  inset:0 0 auto 0!important;
  height:3px!important;
  background:linear-gradient(90deg,#2f73e8,#27c3bb,#1674bd)!important;
  pointer-events:none!important;
}

.portal-tutorial-header{
  position:relative!important;
  z-index:2!important;
  min-height:84px!important;
  padding:18px 22px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:16px!important;
  border-bottom:1px solid rgba(25,91,132,.11)!important;
  background:rgba(255,255,255,.77)!important;
}

.portal-tutorial-header__title{
  display:flex!important;
  align-items:center!important;
  gap:13px!important;
  min-width:0!important;
}

.portal-tutorial-header__icon{
  flex:0 0 42px!important;
  width:42px!important;
  height:42px!important;
  display:grid!important;
  place-items:center!important;
  padding-right:3px!important;
  color:#fff!important;
  border-radius:14px!important;
  background:linear-gradient(145deg,#278ed5,#176db4)!important;
  box-shadow:0 9px 20px rgba(22,116,189,.24)!important;
  font-size:14px!important;
}

.portal-tutorial-header h2{
  margin:0!important;
  color:#173750!important;
  font-size:20px!important;
  line-height:1.45!important;
  font-weight:900!important;
}

.portal-tutorial-header p{
  margin:3px 0 0!important;
  color:#648095!important;
  font-size:12px!important;
  line-height:1.6!important;
  font-weight:600!important;
}

.portal-tutorial-close,
.portal-tutorial-close:hover,
.portal-tutorial-close:focus,
.portal-tutorial-close:active{
  flex:0 0 40px!important;
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  padding:0!important;
  margin:0!important;
  display:grid!important;
  place-items:center!important;
  color:#31536a!important;
  border:1px solid rgba(34,92,126,.15)!important;
  border-radius:13px!important;
  background:#eef7fb!important;
  box-shadow:none!important;
  font:400 28px/1 Arial,sans-serif!important;
  cursor:pointer!important;
  transform:none!important;
}

.portal-tutorial-close:hover,
.portal-tutorial-close:focus-visible{
  color:#113850!important;
  border-color:rgba(34,92,126,.28)!important;
  background:#e0f1f8!important;
}

.portal-tutorial-body{
  min-height:0!important;
  padding:18px!important;
  background:
    radial-gradient(circle at 50% 0%,rgba(39,142,213,.08),transparent 43%),
    #eef6fa!important;
}

.portal-tutorial-video-frame{
  position:relative!important;
  width:100%!important;
  overflow:hidden!important;
  aspect-ratio:16/9!important;
  border:1px solid rgba(255,255,255,.38)!important;
  border-radius:18px!important;
  background:#08131d!important;
  box-shadow:
    0 17px 38px rgba(4,22,35,.25),
    0 0 0 1px rgba(5,24,38,.35) inset!important;
}

.portal-tutorial-video{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  background:#08131d!important;
}

@media(max-width:640px){
  .portal-tutorial-modal{
    padding:10px!important;
  }
  .portal-tutorial-dialog{
    width:calc(100vw - 20px)!important;
    max-height:calc(100vh - 20px)!important;
    border-radius:20px!important;
  }
  .portal-tutorial-header{
    min-height:72px!important;
    padding:14px!important;
  }
  .portal-tutorial-header__icon{
    flex-basis:36px!important;
    width:36px!important;
    height:36px!important;
    border-radius:12px!important;
  }
  .portal-tutorial-header h2{
    font-size:17px!important;
  }
  .portal-tutorial-header p{
    display:none!important;
  }
  .portal-tutorial-close,
  .portal-tutorial-close:hover,
  .portal-tutorial-close:focus,
  .portal-tutorial-close:active{
    flex-basis:36px!important;
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
  }
  .portal-tutorial-body{
    padding:10px!important;
  }
  .portal-tutorial-video-frame{
    border-radius:13px!important;
  }
}

@media(prefers-reduced-motion:reduce){
  body.portal-status-master button#portal-tutorial-bubble{
    transition:none!important;
  }
}

/* =========================================================
   Today's birthdays — replaces only the daily quote content
   Built on the current running portal layout (2026-08-06 v1)
   ========================================================= */
body.portal-status-master #motd-panel > .portal-inline-birthday{
  position:relative!important;
  isolation:isolate!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:100%!important;
  display:grid!important;
  grid-template-columns:46px minmax(0,1fr) 46px!important;
  align-items:center!important;
  gap:10px!important;
  padding:8px 14px!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
  border:1px solid rgba(221,145,61,.34)!important;
  border-radius:18px!important;
  background:
    radial-gradient(190px 90px at 2% 0%,rgba(245,164,193,.22),transparent 72%),
    radial-gradient(210px 100px at 98% 100%,rgba(238,193,84,.20),transparent 74%),
    linear-gradient(135deg,#fffdf9 0%,#fff8fb 48%,#fffdf5 100%)!important;
  box-shadow:
    0 10px 26px rgba(106,72,31,.08),
    inset 0 1px 0 rgba(255,255,255,.96)!important;
}
body.portal-status-master #motd-panel > .portal-inline-birthday::before,
body.portal-status-master #motd-panel > .portal-inline-birthday::after{
  content:""!important;
  position:absolute!important;
  z-index:-1!important;
  width:90px!important;
  height:90px!important;
  border-radius:50%!important;
  pointer-events:none!important;
}
body.portal-status-master #motd-panel > .portal-inline-birthday::before{
  top:-52px!important;
  right:-34px!important;
  background:radial-gradient(circle,rgba(232,131,171,.18),rgba(232,131,171,0) 70%)!important;
}
body.portal-status-master #motd-panel > .portal-inline-birthday::after{
  left:-36px!important;
  bottom:-54px!important;
  background:radial-gradient(circle,rgba(232,181,57,.18),rgba(232,181,57,0) 70%)!important;
}
body.portal-status-master .portal-inline-birthday__copy{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
}
body.portal-status-master .portal-inline-birthday__text{
  color:#4d3427!important;
  font-size:clamp(11.5px,1.02vw,14px)!important;
  font-weight:900!important;
  line-height:1.65!important;
  letter-spacing:-.015em!important;
  overflow-wrap:anywhere!important;
  text-wrap:balance!important;
}
body.portal-status-master .portal-inline-birthday.is-many .portal-inline-birthday__text{
  font-size:clamp(10.5px,.92vw,12.5px)!important;
  line-height:1.58!important;
}
body.portal-status-master .portal-inline-birthday__flower{
  position:relative!important;
  width:40px!important;
  height:40px!important;
  display:block!important;
  flex:0 0 40px!important;
  filter:drop-shadow(0 7px 8px rgba(119,70,31,.11))!important;
  transform-origin:center!important;
}
body.portal-status-master .portal-inline-birthday__flower--left{transform:scale(.88) rotate(-8deg)!important;}
body.portal-status-master .portal-inline-birthday__flower--right{transform:scale(.88) rotate(8deg)!important;}
body.portal-status-master .portal-inline-birthday__flower::before{
  content:""!important;
  position:absolute!important;
  left:15px!important;
  top:13px!important;
  width:10px!important;
  height:10px!important;
  border-radius:50%!important;
  background:#f6c64f!important;
  box-shadow:
    0 -10px 0 1px #ef9fbd,
    9px -3px 0 1px #f4b1c8,
    6px 8px 0 1px #e892b3,
    -6px 8px 0 1px #f3b9cf,
    -9px -3px 0 1px #e99ab9!important;
}
body.portal-status-master .portal-inline-birthday__flower::after{
  content:""!important;
  position:absolute!important;
  left:19px!important;
  top:24px!important;
  width:3px!important;
  height:16px!important;
  border-radius:999px!important;
  background:linear-gradient(180deg,#6fa56b,#3f7546)!important;
  box-shadow:
    6px 5px 0 -1px #7fae73,
    -5px 9px 0 -1px #6f9f67!important;
}
@media(max-width:760px){
  body.portal-status-master #motd-panel > .portal-inline-birthday{
    grid-template-columns:34px minmax(0,1fr) 34px!important;
    gap:7px!important;
    padding:7px 9px!important;
    border-radius:17px!important;
  }
  body.portal-status-master .portal-inline-birthday__flower{
    width:32px!important;
    height:32px!important;
    flex-basis:32px!important;
    transform:scale(.72)!important;
  }
  body.portal-status-master .portal-inline-birthday__text{
    font-size:10.8px!important;
    line-height:1.62!important;
  }
  body.portal-status-master .portal-inline-birthday.is-many .portal-inline-birthday__text{
    font-size:10px!important;
    line-height:1.5!important;
  }
}
@media(min-width:901px) and (max-height:820px){
  body.portal-status-master #motd-panel > .portal-inline-birthday{
    grid-template-columns:34px minmax(0,1fr) 34px!important;
    gap:7px!important;
    padding:5px 9px!important;
  }
  body.portal-status-master .portal-inline-birthday__flower{
    transform:scale(.70)!important;
  }
  body.portal-status-master .portal-inline-birthday__text{
    font-size:11.3px!important;
    line-height:1.55!important;
  }
}
@media(prefers-reduced-motion:reduce){
  body.portal-status-master .portal-inline-birthday__flower{animation:none!important;}
}



/* ===== Status UI cleanup — based on complete birthdays running version ===== */
body.portal-status-master .brand .title{
  display:none!important;
}

body.portal-status-master .brand{
  align-items:flex-end!important;
  transform:translateY(10px)!important;
}

body.portal-status-master .brand > img{
  width:72px!important;
  height:72px!important;
  max-width:72px!important;
  max-height:72px!important;
}

body.portal-status-master #shortcuts-card .portal-shortcuts-summary{
  display:none!important;
}

body.portal-status-master .tile .hint,
body.portal-status-master .tile .meta .hint,
body.portal-status-master .tile small.hint{
  display:none!important;
}

body.portal-status-master .tile{
  gap:5px!important;
}

body.portal-status-master .footer.portal-footer-brand{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
}

body.portal-status-master .footer.portal-footer-brand img{
  width:28px!important;
  height:28px!important;
  max-width:28px!important;
  max-height:28px!important;
  object-fit:contain!important;
  display:block!important;
}

body.portal-status-master .footer.portal-footer-brand span{
  display:block!important;
}

@media(max-width:760px){
  body.portal-status-master .brand{
    transform:translateY(5px)!important;
  }
  body.portal-status-master .brand > img{
    width:58px!important;
    height:58px!important;
    max-width:58px!important;
    max-height:58px!important;
  }
  body.portal-status-master .footer.portal-footer-brand img{
    width:24px!important;
    height:24px!important;
    max-width:24px!important;
    max-height:24px!important;
  }
}


/* ===== Logo transfer: remove top brand, enlarge footer logo ===== */
body.portal-status-master > .header{
  display:none!important;
}

body.portal-status-master .footer.portal-footer-brand{
  gap:10px!important;
}

body.portal-status-master .footer.portal-footer-brand img{
  width:40px!important;
  height:40px!important;
  max-width:40px!important;
  max-height:40px!important;
  flex:0 0 40px!important;
}

@media(max-width:760px){
  body.portal-status-master .footer.portal-footer-brand img{
    width:34px!important;
    height:34px!important;
    max-width:34px!important;
    max-height:34px!important;
    flex-basis:34px!important;
  }
}

/* ===== Required account profile warning — entry-time only (2026-08-06) ===== */
#modal-root .portal-profile-warning-backdrop{
  z-index:99996!important;
  padding:18px!important;
  background:rgba(15,23,42,.58)!important;
  backdrop-filter:blur(10px) saturate(1.08)!important;
}
#modal-root .portal-profile-warning-dialog{
  position:relative!important;
  width:min(92vw,520px)!important;
  max-width:520px!important;
  display:grid!important;
  grid-template-columns:66px minmax(0,1fr)!important;
  gap:17px!important;
  padding:27px 27px 23px!important;
  border:1px solid rgba(251,191,36,.42)!important;
  border-radius:26px!important;
  background:
    radial-gradient(240px 150px at 100% 0,rgba(255,247,214,.95),transparent 72%),
    linear-gradient(145deg,#fffdfa,#ffffff 66%)!important;
  box-shadow:0 30px 75px rgba(15,23,42,.28),inset 0 1px 0 rgba(255,255,255,.95)!important;
  color:#0f172a!important;
  overflow:hidden!important;
}
#modal-root .portal-profile-warning-dialog::after{
  content:""!important;
  position:absolute!important;
  inset:auto -42px -54px auto!important;
  width:150px!important;
  height:150px!important;
  border-radius:50%!important;
  background:rgba(251,191,36,.10)!important;
  pointer-events:none!important;
}
#modal-root .portal-profile-warning-close{
  position:absolute!important;
  top:13px!important;
  left:13px!important;
  z-index:2!important;
  width:36px!important;
  height:36px!important;
  min-height:36px!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid #fde68a!important;
  border-radius:12px!important;
  background:#fffbeb!important;
  color:#b45309!important;
  font:900 23px/1 Arial,sans-serif!important;
  box-shadow:none!important;
}
#modal-root .portal-profile-warning-icon{
  width:64px!important;
  height:64px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:21px!important;
  background:linear-gradient(145deg,#fbbf24,#f59e0b)!important;
  color:#fff!important;
  font:950 34px/1 Arial,sans-serif!important;
  box-shadow:0 14px 28px rgba(245,158,11,.27)!important;
}
#modal-root .portal-profile-warning-copy{
  min-width:0!important;
  padding-left:25px!important;
}
#modal-root .portal-profile-warning-copy>strong{
  display:block!important;
  margin:1px 0 7px!important;
  color:#92400e!important;
  font-size:18px!important;
  font-weight:950!important;
  line-height:1.65!important;
}
#modal-root .portal-profile-warning-copy>p{
  margin:0!important;
  color:#475569!important;
  font-size:13px!important;
  font-weight:720!important;
  line-height:1.95!important;
}
#modal-root .portal-profile-warning-missing{
  display:flex!important;
  align-items:flex-start!important;
  flex-wrap:wrap!important;
  gap:5px!important;
  margin-top:13px!important;
  padding:10px 12px!important;
  border:1px solid #fde68a!important;
  border-radius:14px!important;
  background:rgba(255,251,235,.86)!important;
  font-size:12px!important;
  line-height:1.8!important;
}
#modal-root .portal-profile-warning-missing span{color:#78716c!important;font-weight:750!important;}
#modal-root .portal-profile-warning-missing b{color:#9a3412!important;font-weight:950!important;}
#modal-root .portal-profile-warning-copy>small{
  display:block!important;
  margin-top:10px!important;
  color:#94a3b8!important;
  font-size:10.5px!important;
  font-weight:700!important;
  line-height:1.8!important;
}
#modal-root .portal-profile-warning-actions{
  grid-column:1/-1!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:9px!important;
  margin-top:3px!important;
  padding-top:17px!important;
  border-top:1px solid #f1f5f9!important;
}
#modal-root .portal-profile-warning-actions button{
  min-height:43px!important;
  padding:9px 18px!important;
  border-radius:14px!important;
  font-family:inherit!important;
  font-size:12px!important;
  font-weight:900!important;
  cursor:pointer!important;
}
#modal-root .portal-profile-warning-primary{
  border:1px solid #2563eb!important;
  background:linear-gradient(135deg,#2563eb,#1d4ed8)!important;
  color:#fff!important;
  box-shadow:0 10px 22px rgba(37,99,235,.20)!important;
}
#modal-root .portal-profile-warning-secondary{
  border:1px solid #dbe4ef!important;
  background:#f8fafc!important;
  color:#64748b!important;
  box-shadow:none!important;
}
#modal-root .portal-profile-warning-actions button:hover{transform:translateY(-1px)!important;}
#modal-root .portal-profile-warning-actions button:active{transform:translateY(0)!important;}
@media(max-width:560px){
  #modal-root .portal-profile-warning-backdrop{padding:10px!important;}
  #modal-root .portal-profile-warning-dialog{
    width:100%!important;
    grid-template-columns:52px minmax(0,1fr)!important;
    gap:12px!important;
    padding:23px 17px 18px!important;
    border-radius:22px!important;
  }
  #modal-root .portal-profile-warning-icon{width:50px!important;height:50px!important;border-radius:17px!important;font-size:27px!important;}
  #modal-root .portal-profile-warning-copy{padding-left:22px!important;}
  #modal-root .portal-profile-warning-copy>strong{font-size:15px!important;}
  #modal-root .portal-profile-warning-actions{flex-direction:column!important;align-items:stretch!important;}
  #modal-root .portal-profile-warning-actions button{width:100%!important;}
}
@media(prefers-reduced-motion:reduce){
  #modal-root .portal-profile-warning-actions button{transition:none!important;}
}


/* ===== Status username Persian font alignment v1 =====
   فقط مقدار نام کاربر؛ مقادیر انگلیسی/عددی سایر KPIها بدون تغییر می‌مانند. */
body.portal-status-master #status-card [data-portal-user-name]{
  font-family:'IRANSans',-apple-system,'Segoe UI',Roboto,Arial,sans-serif!important;
}

/* ===== Status username true centering v2 =====
   دکمه تنظیمات در گوشه می‌ماند اما دیگر روی مرکز واقعی نام کاربر اثر ندارد. */
body.portal-status-master #status-card [data-kind="full-name-kpi"] .portal-personal-kpi-main{
  position:relative!important;
  justify-content:center!important;
  width:100%!important;
  min-height:36px!important;
}
body.portal-status-master #status-card [data-kind="full-name-kpi"] .portal-personal-kpi-main > div:first-child{
  width:100%!important;
  min-width:0!important;
  padding-inline:36px!important;
  text-align:center!important;
}
body.portal-status-master #status-card [data-kind="full-name-kpi"] .portal-personal-kpi-main .label,
body.portal-status-master #status-card [data-kind="full-name-kpi"] [data-portal-user-name]{
  width:100%!important;
  text-align:center!important;
}
body.portal-status-master #status-card [data-kind="full-name-kpi"] .portal-phone-kpi-action{
  position:absolute!important;
  left:0!important;
  top:50%!important;
  margin:0!important;
  transform:translateY(-50%)!important;
}
body.portal-status-master #status-card [data-kind="full-name-kpi"] .portal-phone-kpi-action:hover,
body.portal-status-master #status-card [data-kind="full-name-kpi"] .portal-phone-kpi-action:focus-visible{
  transform:translateY(-50%) rotate(22deg)!important;
}
body.portal-status-master #status-card [data-kind="full-name-kpi"] .portal-phone-kpi-action:disabled{
  transform:translateY(-50%)!important;
}

/* ===== My assigned coded assets (portal sidebar + read-only modal) ===== */
body.portal-status-master #status-card .portal-my-assets-kpi{
  cursor:pointer!important;
  justify-content:center!important;
  align-items:center!important;
  user-select:none;
  outline:none;
}
body.portal-status-master #status-card .portal-my-assets-kpi:hover,
body.portal-status-master #status-card .portal-my-assets-kpi:focus-visible{
  border-color:#93c5fd!important;
  box-shadow:0 18px 44px rgba(37,99,235,.16)!important;
}
body.portal-status-master #status-card .portal-my-assets-kpi:focus-visible{
  box-shadow:0 0 0 4px rgba(37,99,235,.14),0 18px 44px rgba(37,99,235,.16)!important;
}
body.portal-status-master #status-card .portal-my-assets-kpi__icon{
  width:50px!important;
  height:50px!important;
  padding:7px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}
body.portal-status-master #status-card .portal-my-assets-kpi__icon img{
  display:block;
  width:34px;
  height:34px;
  object-fit:contain;
}

body.portal-my-assets-open{
  overflow:hidden!important;
}
.portal-my-assets-modal[hidden]{
  display:none!important;
}
.portal-my-assets-modal{
  position:fixed;
  inset:0;
  z-index:2147481200;
  display:grid;
  place-items:center;
  padding:22px;
  direction:rtl;
}
.portal-my-assets-modal__backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.50);
  backdrop-filter:blur(5px);
}
.portal-my-assets-dialog{
  position:relative;
  z-index:1;
  width:min(920px,calc(100vw - 32px));
  max-height:min(760px,calc(100vh - 44px));
  display:flex;
  flex-direction:column;
  overflow:hidden;
  background:#fff;
  border:1px solid #dbeafe;
  border-radius:26px;
  box-shadow:0 30px 90px rgba(15,23,42,.24);
  color:#0f172a;
}
.portal-my-assets-dialog__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:22px 24px 18px;
  border-bottom:1px solid #e5edf8;
  background:linear-gradient(135deg,#f8fbff,#eff8ff);
}
.portal-my-assets-dialog__header h2{
  margin:0;
  color:#0f172a;
  font-size:21px;
  font-weight:950;
}
.portal-my-assets-dialog__header p{
  margin:7px 0 0;
  color:#64748b;
  font-size:12px;
  line-height:1.8;
}
.portal-my-assets-close{
  flex:0 0 auto;
  width:38px;
  height:38px;
  min-height:38px!important;
  padding:0!important;
  border:1px solid #cfe0ff!important;
  border-radius:13px!important;
  background:#eaf1ff!important;
  color:#1d4ed8!important;
  box-shadow:none!important;
  font-size:22px;
  line-height:1;
  cursor:pointer;
}
.portal-my-assets-close:hover,
.portal-my-assets-close:focus-visible{
  background:#dbeafe!important;
  outline:none;
}
.portal-my-assets-content{
  overflow:auto;
  overscroll-behavior:contain;
  padding:20px 24px 24px;
  min-height:190px;
}
.portal-my-assets-loading,
.portal-my-assets-empty,
.portal-my-assets-error{
  min-height:150px;
  display:grid;
  place-items:center;
  text-align:center;
  padding:24px;
  border:1px dashed #cbd5e1;
  border-radius:18px;
  background:#f8fafc;
  color:#64748b;
  font-weight:850;
  line-height:1.9;
}
.portal-my-assets-error{
  color:#b91c1c;
  border-color:#fecaca;
  background:#fff7f7;
}
.portal-my-assets-section + .portal-my-assets-section{
  margin-top:20px;
}
.portal-my-assets-section__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.portal-my-assets-section__head h3{
  margin:0;
  color:#0f172a;
  font-size:16px;
  font-weight:950;
}
.portal-my-assets-section__count{
  min-width:34px;
  height:28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 9px;
  border-radius:999px;
  background:#eaf1ff;
  border:1px solid #cfe0ff;
  color:#1d4ed8;
  font-size:12px;
  font-weight:950;
}
.portal-my-assets-table-wrap{
  overflow:auto;
  border:1px solid #e2e8f0;
  border-radius:17px;
  background:#fff;
}
.portal-my-assets-table{
  width:100%;
  border-collapse:collapse;
  min-width:660px;
  table-layout:auto;
}
.portal-my-assets-table th,
.portal-my-assets-table td{
  padding:12px 13px;
  text-align:right;
  vertical-align:middle;
  border-bottom:1px solid #eef2f7;
  white-space:nowrap;
}
.portal-my-assets-table th{
  background:#f8fafc;
  color:#64748b;
  font-size:11px;
  font-weight:900;
}
.portal-my-assets-table td{
  color:#1e293b;
  font-size:13px;
  font-weight:750;
}
.portal-my-assets-table tr:last-child td{
  border-bottom:0;
}
.portal-my-assets-table__title{
  color:#0f172a!important;
  font-weight:950!important;
  white-space:normal!important;
  min-width:170px;
}
.portal-my-assets-code{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:70px;
  min-height:28px;
  padding:3px 9px;
  border-radius:10px;
  background:#eff6ff;
  border:1px solid #dbeafe;
  color:#1d4ed8;
  font-family:Inter,IRANSans,sans-serif;
  font-weight:900;
  direction:ltr;
}
.portal-my-assets-section-empty{
  padding:16px;
  border:1px dashed #dbe4ef;
  border-radius:15px;
  background:#fbfdff;
  color:#64748b;
  text-align:center;
  font-size:12px;
  font-weight:800;
}
.portal-my-assets-dialog__footer{
  padding:13px 24px 15px;
  border-top:1px solid #e5edf8;
  background:#f8fafc;
  color:#64748b;
  font-size:11px;
  line-height:1.9;
}

@media (max-width:700px){
  .portal-my-assets-modal{padding:10px;}
  .portal-my-assets-dialog{
    width:calc(100vw - 20px);
    max-height:calc(100vh - 20px);
    border-radius:20px;
  }
  .portal-my-assets-dialog__header{padding:17px 16px 14px;}
  .portal-my-assets-dialog__header h2{font-size:18px;}
  .portal-my-assets-content{padding:15px 14px 18px;}
  .portal-my-assets-dialog__footer{padding:11px 15px 13px;}
}

/* ===== Portal tile icons: frameless, larger and visually balanced ===== */
body.portal-status-master .tile .icon.icon--image{
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  overflow:visible!important;
  position:relative!important;
  isolation:isolate;
}

body.portal-status-master .tile .icon.icon--image img{
  --portal-icon-scale:1.06;
  --portal-icon-hover-scale:1.11;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  object-fit:contain!important;
  display:block!important;
  position:relative!important;
  z-index:1;
  transform:scale(var(--portal-icon-scale));
  transform-origin:center center;
  transition:transform .18s cubic-bezier(.2,.8,.2,1)!important;
}

/* Simple full-frame logos are already visually heavy, so keep them restrained. */
body.portal-status-master .tile .icon.icon--image img[src$="tile-mizito.png"],
body.portal-status-master .tile .icon.icon--image img[src$="tile-attendance.png"],
body.portal-status-master .tile .icon.icon--image img[src$="tile-internal-list.png"]{
  --portal-icon-scale:1.00;
  --portal-icon-hover-scale:1.05;
}

/* Detailed illustrations need a little more visual weight at the same layout size. */
body.portal-status-master .tile .icon.icon--image img[src$="tile-hr.png"]{
  --portal-icon-scale:1.10;
  --portal-icon-hover-scale:1.15;
}
body.portal-status-master .tile .icon.icon--image img[src$="tile-pdf.png"]{
  --portal-icon-scale:1.08;
  --portal-icon-hover-scale:1.13;
}
body.portal-status-master .tile .icon.icon--image img[src^="data:image/svg+xml"]{
  --portal-icon-scale:1.08;
  --portal-icon-hover-scale:1.13;
}

body.portal-status-master .tile:hover .icon.icon--image img,
body.portal-status-master .tile:focus-visible .icon.icon--image img{
  transform:translateY(-1px) scale(var(--portal-icon-hover-scale));
}

@media (prefers-reduced-motion:reduce){
  body.portal-status-master .tile .icon.icon--image img{
    transition:none!important;
  }
  body.portal-status-master .tile:hover .icon.icon--image img,
  body.portal-status-master .tile:focus-visible .icon.icon--image img{
    transform:scale(var(--portal-icon-scale));
  }
}

/* ===== Status sidebar icons: unified professional SVG system ===== */
body.portal-status-master #status-card .kpi .icon.portal-status-icon,
body.portal-status-master #status-card .portal-phone-kpi .icon.portal-status-icon,
body.portal-status-master #status-card .portal-phone-kpi.is-verified .icon.portal-status-icon,
body.portal-status-master #status-card .portal-phone-kpi.is-empty .icon.portal-status-icon,
body.portal-status-master #status-card .portal-my-assets-kpi__icon.portal-status-icon{
  width:44px!important;
  min-width:44px!important;
  height:44px!important;
  min-height:44px!important;
  padding:0!important;
  border:1px solid rgba(37,99,235,.12)!important;
  border-radius:15px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 44px!important;
  overflow:visible!important;
  position:relative!important;
  color:#2563eb!important;
  background:linear-gradient(145deg,#eff6ff,#ecfdfb)!important;
  box-shadow:0 8px 20px rgba(37,99,235,.075)!important;
  transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease!important;
}
body.portal-status-master #status-card .portal-status-icon-svg{
  width:23px!important;
  height:23px!important;
  display:block!important;
  overflow:visible!important;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
  transform:none;
  transform-origin:center;
  shape-rendering:geometricPrecision;
  transition:transform .18s cubic-bezier(.2,.8,.2,1),opacity .18s ease!important;
}
body.portal-status-master #status-card .portal-status-icon-svg .portal-status-icon-soft{
  fill:currentColor!important;
  stroke:none!important;
  opacity:.095!important;
}
body.portal-status-master #status-card .portal-status-icon-svg .portal-status-icon-accent{
  fill:#14b8a6!important;
  stroke:#14b8a6!important;
  opacity:.96!important;
}
body.portal-status-master #status-card .kpi:hover .portal-status-icon,
body.portal-status-master #status-card .kpi:focus-within .portal-status-icon{
  border-color:rgba(37,99,235,.20)!important;
  background:linear-gradient(145deg,#eff6ff,#ecfeff)!important;
  box-shadow:0 10px 22px rgba(37,99,235,.10)!important;
}
body.portal-status-master #status-card .kpi:hover .portal-status-icon-svg,
body.portal-status-master #status-card .kpi:focus-within .portal-status-icon-svg{
  transform:translateY(-1px) scale(1.045);
}

/* Assets uses the exact same icon treatment as every other status row. */
body.portal-status-master #status-card .portal-my-assets-kpi__icon img{
  display:none!important;
}
body.portal-status-master #status-card .portal-my-assets-kpi:hover{
  border-color:#bfd7ff!important;
  box-shadow:0 18px 44px rgba(37,99,235,.12)!important;
}
body.portal-status-master #status-card .portal-my-assets-kpi:focus-visible{
  border-color:#bfd7ff!important;
  box-shadow:0 0 0 4px rgba(37,99,235,.14),0 18px 44px rgba(37,99,235,.12)!important;
}

/* Account settings is also SVG, not a platform-dependent emoji glyph. */
body.portal-status-master #status-card .portal-phone-kpi-action{
  color:#64748b!important;
}
body.portal-status-master #status-card .portal-status-action-svg{
  width:17px!important;
  height:17px!important;
  display:block!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.7!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
  transform-origin:center!important;
}
body.portal-status-master #status-card .portal-account-action-loading .portal-status-action-svg{
  animation:portalStatusGearSpin .9s linear infinite;
}
@keyframes portalStatusGearSpin{
  to{transform:rotate(360deg)}
}
@media(prefers-reduced-motion:reduce){
  body.portal-status-master #status-card .portal-status-icon-svg{
    transition:none!important;
  }
  body.portal-status-master #status-card .kpi:hover .portal-status-icon-svg,
  body.portal-status-master #status-card .kpi:focus-within .portal-status-icon-svg{
    transform:none!important;
  }
  body.portal-status-master #status-card .portal-account-action-loading .portal-status-action-svg{
    animation:none!important;
  }
}

/* ==========================================================
   External portal only: preserve AD + OTP auth gate styling
   while the signed-in shell uses the latest login portal UI.
   ========================================================== */
/* External portal login: visually identical to MikroTik login page. */
/* ============================
   Portal external auth gate
   ============================ */
html.portal-auth-locked,
body.portal-auth-locked{
  overflow:hidden!important;
}
body.portal-auth-locked > .header,
body.portal-auth-locked > .container,
body.portal-auth-locked > .footer{
  filter:blur(8px) saturate(.95);
  pointer-events:none;
  user-select:none;
}
#portal-auth-gate,
#portal-auth-gate-checking{
  position:fixed;
  inset:0;
  z-index:999999;
  display:grid;
  place-items:center;
  padding:24px;
  background:
    radial-gradient(760px 420px at 82% 12%, rgba(37,99,235,.15), transparent 64%),
    radial-gradient(620px 420px at 12% 88%, rgba(20,184,166,.13), transparent 66%),
    linear-gradient(135deg, rgba(244,249,255,.96), rgba(248,250,252,.98) 48%, rgba(236,254,255,.94));
  backdrop-filter:blur(18px) saturate(1.15);
  direction:rtl;
}

#portal-auth-gate,
#portal-auth-gate-checking{
  grid-template-rows:1fr auto;
  row-gap:18px;
}
.portal-auth-footer{
  align-self:end;
  justify-self:center;
  max-width:calc(100vw - 32px);
  padding:8px 18px;
  border-radius:999px;
  color:#64748b;
  font-size:.82rem;
  font-weight:850;
  line-height:1.9;
  text-align:center;
  letter-spacing:-.01em;
  background:rgba(255,255,255,.62);
  border:1px solid rgba(191,219,254,.58);
  box-shadow:0 12px 32px rgba(15,23,42,.08);
  backdrop-filter:blur(12px);
}
@property --portal-login-angle{
  syntax:"<angle>";
  inherits:false;
  initial-value:0deg;
}
.portal-auth-shell{
  position:relative;
  width:400px;
  height:200px;
  max-width:calc(100vw - 34px);
  display:flex;
  justify-content:center;
  align-items:center;
  border-radius:22px;
  isolation:isolate;
  background:
    repeating-conic-gradient(
      from var(--portal-login-angle),
      #2563eb 0%,
      #2563eb 5%,
      transparent 5%,
      transparent 40%,
      #14b8a6 50%
    );
  box-shadow:0 26px 70px rgba(15,23,42,.20);
  animation:portalLoginRotate 4s linear infinite;
  transition:width .55s cubic-bezier(.2,.85,.2,1), height .55s cubic-bezier(.2,.85,.2,1), box-shadow .3s ease, transform .3s ease;
}
.portal-auth-shell::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:22px;
  background:
    repeating-conic-gradient(
      from var(--portal-login-angle),
      #38bdf8 0%,
      #38bdf8 5%,
      transparent 5%,
      transparent 40%,
      #1d4ed8 50%
    );
  animation:portalLoginRotate 4s linear infinite;
  animation-delay:-1s;
  z-index:-2;
}
.portal-auth-shell::after{
  content:"";
  position:absolute;
  inset:4px;
  border-radius:17px;
  background:linear-gradient(180deg,#ffffff,#f8fbff);
  border:1px solid rgba(191,219,254,.88);
  z-index:-1;
}
.portal-auth-shell:hover,
.portal-auth-shell:focus-within,
.portal-auth-shell.is-open{
  width:450px;
  height:500px;
  box-shadow:0 34px 90px rgba(15,23,42,.24), 0 0 46px rgba(56,189,248,.14);
  transform:translateY(-2px);
}
@keyframes portalLoginRotate{
  from{--portal-login-angle:0deg}
  to{--portal-login-angle:360deg}
}
.portal-auth-card{
  position:absolute;
  inset:60px;
  z-index:2;
  display:flex;
  justify-content:center;
  align-items:center;
  border-radius:14px;
  color:#0f172a;
  background:rgba(255,255,255,.74);
  border-bottom:2px solid rgba(37,99,235,.22);
  box-shadow:inset 0 10px 22px rgba(37,99,235,.07), inset 0 -18px 38px rgba(20,184,166,.05);
  overflow:hidden;
  transition:inset .55s cubic-bezier(.2,.85,.2,1), background .25s ease, box-shadow .25s ease;
}
.portal-auth-shell:hover .portal-auth-card,
.portal-auth-shell:focus-within .portal-auth-card,
.portal-auth-shell.is-open .portal-auth-card{
  inset:40px;
  background:rgba(255,255,255,.88);
}
.portal-auth-content{
  width:min(72%, 320px);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:0;
  transition:gap .55s cubic-bezier(.2,.85,.2,1), width .55s cubic-bezier(.2,.85,.2,1);
}
.portal-auth-shell:hover .portal-auth-content,
.portal-auth-shell:focus-within .portal-auth-content,
.portal-auth-shell.is-open .portal-auth-content{
  gap:16px;
}
.portal-auth-brand{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  text-align:center;
  margin:0;
  min-height:64px;
  flex:0 0 auto;
}
.portal-auth-brand img,
.portal-auth-check-card img{
  width:44px;
  height:44px;
  object-fit:contain;
  border-radius:15px;
  background:linear-gradient(180deg,#ffffff,#eff6ff);
  border:1px solid rgba(191,219,254,.88);
  padding:6px;
  box-shadow:0 12px 24px rgba(37,99,235,.12);
  flex:0 0 auto;
  transition:width .55s cubic-bezier(.2,.85,.2,1), height .55s cubic-bezier(.2,.85,.2,1), border-radius .55s cubic-bezier(.2,.85,.2,1), padding .55s cubic-bezier(.2,.85,.2,1);
}
.portal-auth-shell:hover .portal-auth-brand img,
.portal-auth-shell:focus-within .portal-auth-brand img,
.portal-auth-shell.is-open .portal-auth-brand img{
  width:58px;
  height:58px;
  border-radius:18px;
  padding:7px;
}
.portal-auth-brand h1{
  margin:0;
  font-size:1.08rem;
  line-height:1.15;
  font-weight:950;
  letter-spacing:.08em;
  color:#0f172a;
  white-space:nowrap;
}
.portal-auth-brand h1::before,
.portal-auth-brand h1::after{
  content:"";
  display:inline-block;
  width:7px;
  height:7px;
  margin:0 9px;
  border-radius:50%;
  background:#38bdf8;
  box-shadow:0 0 14px rgba(56,189,248,.55);
  vertical-align:middle;
}
.portal-auth-brand h1::after{
  background:#14b8a6;
  box-shadow:0 0 14px rgba(20,184,166,.45);
}
#portal-auth-form{
  width:100%;
  display:grid;
  gap:13px;
  margin:0;
  max-height:0;
  opacity:0;
  overflow:hidden;
  pointer-events:none;
  transform:translateY(14px);
  transition:max-height .55s cubic-bezier(.2,.85,.2,1), opacity .28s ease .08s, transform .55s cubic-bezier(.2,.85,.2,1);
}
.portal-auth-shell:hover #portal-auth-form,
.portal-auth-shell:focus-within #portal-auth-form,
.portal-auth-shell.is-open #portal-auth-form{
  max-height:360px;
  opacity:1;
  pointer-events:auto;
  transform:translateY(0);
}
.portal-auth-step{
  display:grid;
  gap:13px;
}
.portal-auth-step.is-hidden{
  display:none!important;
}
.portal-auth-field{
  display:grid;
  gap:6px;
}
.portal-auth-field span{
  display:none!important;
}
.portal-auth-field input{
  width:100%;
  height:46px;
  border:2px solid rgba(37,99,235,.18);
  border-radius:999px;
  background:rgba(255,255,255,.78);
  color:#0f172a;
  padding:0 18px;
  outline:none;
  font-family:inherit;
  font-weight:850;
  direction:rtl;
  text-align:right;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95);
  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease;
}
.portal-auth-field input::placeholder{
  color:#64748b;
}
.portal-auth-field input:focus{
  border-color:#38bdf8;
  background:#fff;
  box-shadow:0 0 0 4px rgba(56,189,248,.15), 0 14px 28px rgba(37,99,235,.09);
  transform:translateY(-1px);
}
.portal-auth-remember{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:9px;
  padding:1px 10px 0;
  color:#334155;
  font-size:.78rem;
  font-weight:900;
  line-height:1.6;
  cursor:pointer;
  user-select:none;
}
.portal-auth-remember input{
  width:18px;
  height:18px;
  margin:0;
  flex:0 0 auto;
  accent-color:#0ea5e9;
  cursor:pointer;
}
.portal-auth-remember span{
  min-width:0;
}
#portal-auth-submit{
  width:100%;
  height:46px;
  border:0;
  border-radius:999px;
  cursor:pointer;
  font-family:inherit;
  font-weight:950;
  color:#fff;
  background:linear-gradient(135deg,#2563eb 0%, #0ea5e9 56%, #14b8a6 100%);
  box-shadow:0 16px 34px rgba(37,99,235,.24);
  transition:transform .2s ease, box-shadow .2s ease, opacity .18s ease, filter .18s ease;
}
#portal-auth-submit:hover:not(:disabled){
  transform:translateY(-2px);
  filter:saturate(1.08);
  box-shadow:0 22px 46px rgba(37,99,235,.30), 0 0 34px rgba(14,165,233,.20);
}
#portal-auth-submit:active:not(:disabled){
  transform:translateY(0);
}
#portal-auth-submit:disabled{
  opacity:.68;
  cursor:wait;
}
.portal-auth-message{
  min-height:21px;
  color:#dc2626;
  font-size:.82rem;
  font-weight:900;
  line-height:1.7;
  text-align:center;
}
.portal-auth-message.is-ok{
  color:#059669;
}
.portal-auth-otp-info{
  border:1px solid rgba(20,184,166,.22);
  background:linear-gradient(180deg,rgba(240,253,250,.95),rgba(239,246,255,.95));
  color:#0f766e;
  border-radius:15px;
  padding:10px 12px;
  font-size:.8rem;
  font-weight:900;
  line-height:1.8;
  text-align:center;
}
.portal-auth-field--otp input{
  direction:ltr!important;
  text-align:center!important;
  letter-spacing:8px;
  font-size:1.15rem;
  font-weight:950;
}
.portal-auth-linkbtn{
  width:100%;
  border:0;
  background:transparent;
  color:#2563eb;
  font-family:inherit;
  font-size:.82rem;
  font-weight:950;
  cursor:pointer;
  padding:0;
}
.portal-auth-linkbtn:hover{
  color:#0f766e;
}
.portal-auth-check-card{
  position:relative;
  width:min(330px, calc(100vw - 36px));
  min-height:170px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:9px;
  padding:26px 22px;
  text-align:center;
  border-radius:24px;
  background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,251,255,.96));
  border:1px solid rgba(191,219,254,.92);
  box-shadow:0 30px 90px rgba(15,23,42,.20), inset 0 4px 0 rgba(14,165,233,.36);
  color:#0f172a;
}
.portal-auth-check-card strong{
  font-size:1rem;
  font-weight:950;
}
.portal-auth-check-card span{
  color:#64748b;
  font-size:.82rem;
  font-weight:850;
}
.portal-auth-check-card::after{
  content:"";
  width:32px;
  height:32px;
  border-radius:50%;
  border:3px solid #dbeafe;
  border-top-color:#0ea5e9;
  animation:portalAuthSpin .8s linear infinite;
  margin-top:2px;
}
@keyframes portalAuthSpin{to{transform:rotate(360deg)}}
@media(max-width:560px){
  #portal-auth-gate,
  #portal-auth-gate-checking{
    padding:14px;
    row-gap:12px;
    align-items:center;
  }
  .portal-auth-shell{
    width:min(390px, calc(100vw - 24px));
    height:180px;
    border-radius:20px;
  }
  .portal-auth-shell:hover,
  .portal-auth-shell:focus-within,
  .portal-auth-shell.is-open{
    width:min(410px, calc(100vw - 24px));
    height:min(462px, calc(100svh - 92px));
  }
  .portal-auth-card{inset:50px}
  .portal-auth-shell:hover .portal-auth-card,
  .portal-auth-shell:focus-within .portal-auth-card,
  .portal-auth-shell.is-open .portal-auth-card{inset:24px}
  .portal-auth-content{width:min(84%, 300px)}
  .portal-auth-shell:hover .portal-auth-content,
  .portal-auth-shell:focus-within .portal-auth-content,
  .portal-auth-shell.is-open .portal-auth-content{gap:12px}
  .portal-auth-brand{gap:4px;min-height:58px}
  .portal-auth-brand img{width:38px;height:38px;border-radius:13px;padding:5px}
  .portal-auth-shell:hover .portal-auth-brand img,
  .portal-auth-shell:focus-within .portal-auth-brand img,
  .portal-auth-shell.is-open .portal-auth-brand img{width:50px;height:50px;border-radius:16px;padding:6px}
  .portal-auth-brand h1{font-size:1rem}
  .portal-auth-field input,
  #portal-auth-submit{height:43px}
  #portal-auth-form{gap:10px}
  .portal-auth-step{gap:10px}
  .portal-auth-otp-info{padding:8px 10px;font-size:.76rem}
  .portal-auth-footer{
    max-width:calc(100vw - 28px);
    padding:7px 13px;
    font-size:.76rem;
    box-shadow:0 8px 22px rgba(15,23,42,.07);
  }
}
@media(max-width:380px){
  .portal-auth-shell{height:170px}
  .portal-auth-shell:hover,
  .portal-auth-shell:focus-within,
  .portal-auth-shell.is-open{height:min(438px, calc(100svh - 86px))}
  .portal-auth-card{inset:46px}
  .portal-auth-shell:hover .portal-auth-card,
  .portal-auth-shell:focus-within .portal-auth-card,
  .portal-auth-shell.is-open .portal-auth-card{inset:20px}
  .portal-auth-content{width:88%}
}


    a.portal-auth-linkbtn{
      display:block;
      text-align:center;
      text-decoration:none;
    }
