/* TT24_D1_DESKTOP_DASHBOARD_V1_BEGIN */
@media (min-width:769px){
  body .tt24-d1-dashboard{
    --d1-navy:#0f2b4a;
    --d1-navy-2:#173e68;
    --d1-blue:#1e6fb5;
    --d1-cyan:#13a8c6;
    --d1-green:#16a34a;
    --d1-gold:#c98f08;
    --d1-red:#dc2626;
    --d1-bg:#f4f7fb;
    --d1-line:#e6ebf1;
    display:flex;
    flex-direction:column;
    gap:16px;
    width:100%;
    min-width:0;
  }
  body .tt24-d1-dashboard *,
  body .tt24-d1-dashboard *::before,
  body .tt24-d1-dashboard *::after{box-sizing:border-box}

  body .tt24-d1-hero{
    position:relative;
    isolation:isolate;
    min-height:148px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
    overflow:hidden;
    padding:24px 28px;
    border:1px solid rgba(255,255,255,.16);
    border-radius:24px;
    color:#fff;
    background:
      radial-gradient(circle at 86% 18%,rgba(255,255,255,.16),transparent 27%),
      linear-gradient(128deg,#0b2741 0%,#163e68 46%,#2451b9 100%);
    box-shadow:0 16px 38px rgba(15,43,74,.16);
  }
  body .tt24-d1-hero::before{
    content:"";
    position:absolute;
    inset:0;
    z-index:-2;
    opacity:.24;
    background-image:radial-gradient(circle,rgba(255,255,255,.75) 1px,transparent 1.2px);
    background-size:26px 26px;
  }
  body .tt24-d1-hero::after{
    content:"";
    position:absolute;
    width:270px;
    height:270px;
    left:-72px;
    bottom:-165px;
    z-index:-1;
    border:34px solid rgba(255,255,255,.07);
    border-radius:50%;
  }
  body .tt24-d1-hero-copy{min-width:0;display:flex;flex-direction:column;align-items:flex-start}
  body .tt24-d1-hero-kicker{
    display:inline-flex;
    align-items:center;
    min-height:28px;
    padding:4px 11px;
    margin-bottom:8px;
    border:1px solid rgba(255,255,255,.22);
    border-radius:999px;
    background:rgba(255,255,255,.09);
    color:rgba(255,255,255,.88);
    font-size:11.5px;
    font-weight:750;
  }
  body .tt24-d1-hero h2{
    margin:0;
    color:#fff !important;
    font-family:'TT24 B Yekan Plus','B Yekan+','BYekanPlus',inherit;
    font-size:30px !important;
    font-weight:700 !important;
    line-height:1.45;
    letter-spacing:-.3px;
  }
  body .tt24-d1-hero p{margin:3px 0 14px;color:rgba(255,255,255,.78);font-size:13px;font-weight:550}
  body .tt24-d1-hero-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px;color:rgba(255,255,255,.93);font-size:12px;font-weight:650}
  body .tt24-d1-live-dot{display:inline-flex;align-items:center;gap:7px}
  body .tt24-d1-live-dot::before{content:"";width:8px;height:8px;border-radius:50%;background:#34d399;box-shadow:0 0 0 5px rgba(52,211,153,.13)}
  body .tt24-d1-hero-logo{
    flex:0 0 92px;
    width:92px;
    height:92px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:7px;
    border:1px solid rgba(255,255,255,.55);
    border-radius:22px;
    background:#fff;
    box-shadow:0 12px 30px rgba(0,0,0,.18);
  }
  body .tt24-d1-hero-logo img{display:block;width:100%;height:100%;object-fit:contain;border-radius:15px}

  body .tt24-d1-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
  body .tt24-d1-kpi{
    position:relative;
    overflow:hidden;
    min-width:0;
    min-height:126px;
    padding:17px 18px 16px;
    border:1px solid var(--d1-line);
    border-radius:19px;
    background:#fff;
    box-shadow:0 8px 22px rgba(15,43,74,.055);
    transition:transform .18s ease,box-shadow .18s ease;
  }
  body .tt24-d1-kpi:hover{transform:translateY(-2px);box-shadow:0 13px 28px rgba(15,43,74,.09)}
  body .tt24-d1-kpi-top{display:flex;align-items:center;gap:8px;color:#66758a;font-size:12px;font-weight:700}
  body .tt24-d1-kpi-mark{width:9px;height:9px;border-radius:3px;background:var(--d1-navy);box-shadow:0 0 0 5px rgba(15,43,74,.07)}
  body .tt24-d1-kpi-gold .tt24-d1-kpi-mark{background:var(--d1-gold);box-shadow:0 0 0 5px rgba(201,143,8,.09)}
  body .tt24-d1-kpi-green .tt24-d1-kpi-mark{background:var(--d1-green);box-shadow:0 0 0 5px rgba(22,163,74,.09)}
  body .tt24-d1-kpi-red .tt24-d1-kpi-mark{background:var(--d1-red);box-shadow:0 0 0 5px rgba(220,38,38,.08)}
  body .tt24-d1-kpi strong{display:block;margin-top:12px;color:#102f50;font-size:29px;line-height:1;font-weight:900;letter-spacing:-.7px}
  body .tt24-d1-kpi small{display:block;margin-top:8px;color:#8a96a8;font-size:10.5px;font-weight:550;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

  body .tt24-d1-main-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,340px);gap:14px;align-items:start;min-width:0}
  body .tt24-d1-main-grid-single{grid-template-columns:minmax(0,1fr)}
  body .tt24-d1-side-stack{display:grid;gap:14px;min-width:0}
  body .tt24-d1-card{
    margin:0 !important;
    padding:20px !important;
    border:1px solid var(--d1-line) !important;
    border-radius:20px !important;
    background:#fff !important;
    box-shadow:0 9px 24px rgba(15,43,74,.055) !important;
    overflow:hidden !important;
  }
  body .tt24-d1-card:hover{transform:none !important;box-shadow:0 9px 24px rgba(15,43,74,.055) !important}
  body .tt24-d1-card::after{display:none !important}
  body .tt24-d1-card-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:15px}
  body .tt24-d1-card-head>div{min-width:0}
  body .tt24-d1-card-head span{display:block;color:#8793a4;font-size:10.5px;font-weight:700;margin-bottom:2px}
  body .tt24-d1-card-head h3{margin:0;color:#102f50 !important;font-size:16px !important;font-weight:900 !important;line-height:1.5}
  body .tt24-d1-card-head .btn{min-height:33px;height:33px;padding:4px 12px;border-radius:10px;font-size:11px;white-space:nowrap}

  body .tt24-d1-table-wrap{overflow:auto;border:1px solid #e8edf3;border-radius:15px;background:#fff}
  body .tt24-d1-files-table{width:100%;min-width:680px;border-collapse:separate;border-spacing:0;font-size:12.5px !important}
  body .tt24-d1-files-table thead th{padding:11px 13px;background:#f7f9fc;color:#748197;font-size:10.5px;font-weight:800;border-bottom:1px solid #e8edf3;text-align:right;white-space:nowrap}
  body .tt24-d1-files-table tbody td{padding:13px;border-bottom:1px solid #eef2f6;color:#344258;vertical-align:middle}
  body .tt24-d1-files-table tbody tr:last-child td{border-bottom:0}
  body .tt24-d1-files-table tbody tr{cursor:pointer;outline:none;transition:background .15s ease}
  body .tt24-d1-files-table tbody tr:hover,
  body .tt24-d1-files-table tbody tr:focus{background:#f2f7fd}
  body .tt24-d1-file-ref{direction:ltr;unicode-bidi:isolate;color:#1e6fb5;font-size:13px;font-weight:900}
  body .tt24-d1-row-action{color:#1e6fb5;font-size:10.5px;font-weight:800;white-space:nowrap}
  body .tt24-d1-files-table .badge-s{font-size:10px;padding:3px 8px;white-space:nowrap}

  body .tt24-d1-side-card{padding:18px !important}
  body .tt24-d1-activity-list{display:grid;gap:3px}
  body .tt24-d1-activity-item{display:grid;grid-template-columns:30px minmax(0,1fr);gap:9px;align-items:center;padding:9px 0;border-bottom:1px solid #edf1f5}
  body .tt24-d1-activity-item:last-child{border-bottom:0}
  body .tt24-d1-activity-index{width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:9px;background:#eef5fb;color:#1e6fb5;font-size:10px;font-weight:900}
  body .tt24-d1-activity-item b{display:block;color:#27384e;font-size:11.5px;font-weight:850;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body .tt24-d1-activity-item small{display:block;margin-top:2px;color:#8a96a8;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body .tt24-d1-compact-empty{padding:26px 12px;text-align:center;color:#93a0b1;font-size:11.5px}

  body .tt24-d1-corr-list .dash-corr-cards{display:grid;gap:7px}
  body .tt24-d1-corr-list .dash-corr-item{padding:9px 10px;border-radius:12px;gap:8px;box-shadow:none}
  body .tt24-d1-corr-list .dash-corr-item b{font-size:11px}
  body .tt24-d1-corr-list .dash-corr-item .muted{font-size:9.5px;line-height:1.55}
  body .tt24-d1-corr-list .corr-status{font-size:9px;padding:2px 6px;white-space:nowrap}
  body .tt24-d1-corr-list .empty{padding:24px 10px;font-size:11px}
  body .tt24-d1-corr-list .empty .ico{font-size:25px}
}

@media (min-width:769px) and (max-width:1120px){
  body .tt24-d1-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body .tt24-d1-main-grid{grid-template-columns:minmax(0,1fr)}
  body .tt24-d1-side-stack{grid-template-columns:repeat(2,minmax(0,1fr))}
}
/* TT24_D1_DESKTOP_DASHBOARD_V1_END */
/* TT24_D1A_DASHBOARD_HERO_LOGO_V1_BEGIN */
@media (min-width:769px){
  body .tt24-d1-hero-logo{
    flex:0 0 110px;
    width:110px;
    height:110px;
    padding:2px;
    overflow:hidden;
    border:1px solid rgba(255,255,255,.72);
    border-radius:22px;
    background:#fff;
    box-shadow:0 12px 30px rgba(0,0,0,.18);
  }
  body .tt24-d1-hero-logo img{
    display:block;
    width:100%;
    height:100%;
    object-fit:contain;
    border-radius:19px;
  }
}
@media (min-width:769px) and (max-width:1120px){
  body .tt24-d1-hero-logo{flex-basis:102px;width:102px;height:102px}
}

/* REQ-010/011: "کارهای من" tab shell -- applies on both mobile and desktop dashboard layouts */
.tt24-dash-tabs{
  display:flex;
  gap:8px;
  margin-bottom:14px;
  border-bottom:1px solid var(--line,#e6ebf1);
}
.tt24-dash-tabs .tab-btn{
  padding:10px 16px;
  border:none;
  background:transparent;
  color:var(--muted,#6b7280);
  font:inherit;
  font-weight:600;
  cursor:pointer;
  border-bottom:2px solid transparent;
  margin-bottom:-1px;
}
.tt24-dash-tabs .tab-btn.active{
  color:var(--d1-navy,#0f2b4a);
  border-bottom-color:var(--d1-blue,#1e6fb5);
}
.tt24-mytasks-type{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  background:#eef2f7;
  color:#334155;
  font-size:12px;
  font-weight:600;
}

/* TT24_MYTASKS_TOTAL_ACTIVE_V1: total-active-count badge inside the existing "کارهای من" tab
   button, and its accessible attention state. Digit stays visible after acknowledgment; only the
   attention treatment (pulse/color) is cleared. Reduced-motion keeps a non-animated color/badge
   state instead of removing the signal entirely. */
.tt24-mytasks-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  height:18px;
  padding:0 5px;
  margin-inline-start:6px;
  border-radius:999px;
  background:#94a3b8;
  color:#fff;
  font-size:11px;
  font-weight:700;
  line-height:18px;
  vertical-align:middle;
}
.tt24-dash-tabs .tab-btn.tt24-mytasks-attention .tt24-mytasks-badge{
  background:#dc2626;
  animation:tt24MyTasksPulse 1.6s ease-in-out infinite;
}
.tt24-dash-tabs .tab-btn.tt24-mytasks-attention{
  color:#dc2626;
}
@keyframes tt24MyTasksPulse{
  0%,100%{ box-shadow:0 0 0 0 rgba(220,38,38,.45); }
  50%{ box-shadow:0 0 0 4px rgba(220,38,38,0); }
}
@media (prefers-reduced-motion:reduce){
  .tt24-dash-tabs .tab-btn.tt24-mytasks-attention .tt24-mytasks-badge{
    animation:none;
  }
}
/* TT24_D1A_DASHBOARD_HERO_LOGO_V1_END */

/* TT24_PATCH6_O07_O08_V1: Team Tasks assignee/role cell and the admin/manager-only priority badge
   (normal is unbadged/default; important=yellow, urgent=red, matching this project's own
   2026-08-27 "three priorities: normal, important (yellow), urgent (red)" decision). */
.tt24-mytasks-unassigned{
  font-style:italic;
}
.tt24-mytasks-role{
  font-size:11.5px;
}
.tt24-mytasks-priority{
  display:inline-block;
  margin-inline-start:8px;
  padding:2px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  vertical-align:middle;
}
.tt24-mytasks-priority-important{
  background:var(--amber-bg,#fff4d6);
  color:var(--amber,#c47c00);
}
.tt24-mytasks-priority-urgent{
  background:var(--red-bg,#ffe8e8);
  color:var(--red,#d33131);
}
.tt24-mytasks-action-cell{
  white-space:nowrap;
}
.tt24-task-attn-btn[disabled]{
  opacity:.55;
  cursor:not-allowed;
}
@media (max-width:768px){
  /* Keep the table horizontally scrollable rather than letting the new columns force the whole
     page to scroll sideways -- the shared .table-wrap wrapper (already used everywhere else in
     this app) already provides overflow-x:auto; this only trims padding so more of the row is
     legible before a horizontal scroll is needed. */
  .tt24-mytasks-role{ display:block; margin-inline-start:0; }
}

/* TT24_D1_MOBILE_DASHBOARD_V1 (2026-10-02): the D1 hero/KPI/cards were styled only at >=769px, so on phones
   (customer portal + staff dashboard) text sat flush against the edge and the logo filled the whole width. */
@media (max-width:768px){
  body .tt24-d1-dashboard{
    --d1-navy:#0f2b4a;--d1-green:#16a34a;--d1-gold:#c98f08;--d1-red:#dc2626;--d1-line:#e6ebf1;
    display:flex;flex-direction:column;gap:12px;width:100%;min-width:0;
  }
  body .tt24-d1-dashboard *,body .tt24-d1-dashboard *::before,body .tt24-d1-dashboard *::after{box-sizing:border-box}
  body .tt24-d1-hero{
    position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:12px;
    padding:16px;border-radius:20px;color:#fff;
    background:radial-gradient(circle at 86% 18%,rgba(255,255,255,.16),transparent 30%),linear-gradient(128deg,#0b2741 0%,#163e68 46%,#2451b9 100%);
    box-shadow:0 10px 26px rgba(15,43,74,.16);
  }
  body .tt24-d1-hero-copy{min-width:0;flex:1 1 auto;display:flex;flex-direction:column;align-items:flex-start}
  body .tt24-d1-hero-kicker{display:inline-flex;padding:3px 10px;margin-bottom:6px;border:1px solid rgba(255,255,255,.22);border-radius:999px;background:rgba(255,255,255,.09);color:rgba(255,255,255,.88);font-size:11px;font-weight:750}
  body .tt24-d1-hero h2{margin:0;color:#fff !important;font-size:19px !important;font-weight:800 !important;line-height:1.5}
  body .tt24-d1-hero p{margin:2px 0 8px;color:rgba(255,255,255,.8);font-size:12px;line-height:1.7}
  body .tt24-d1-hero-meta{display:flex;flex-wrap:wrap;gap:4px 12px;color:rgba(255,255,255,.93);font-size:11px;font-weight:650}
  body .tt24-d1-live-dot{display:inline-flex;align-items:center;gap:6px}
  body .tt24-d1-live-dot::before{content:"";width:7px;height:7px;border-radius:50%;background:#34d399}
  body .tt24-d1-hero-logo{flex:0 0 58px;width:58px;height:58px;padding:2px;overflow:hidden;border-radius:15px;background:#fff;box-shadow:0 8px 20px rgba(0,0,0,.18)}
  body .tt24-d1-hero-logo img{display:block;width:100%;height:100%;object-fit:contain;border-radius:13px}
  body .tt24-d1-kpi-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  body .tt24-d1-kpi{position:relative;overflow:hidden;min-width:0;padding:13px 14px;border:1px solid var(--d1-line);border-radius:16px;background:#fff;box-shadow:0 6px 16px rgba(15,43,74,.05)}
  body .tt24-d1-kpi-top{display:flex;align-items:center;gap:7px;color:#66758a;font-size:11.5px;font-weight:700}
  body .tt24-d1-kpi-mark{flex:0 0 8px;width:8px;height:8px;border-radius:3px;background:var(--d1-navy)}
  body .tt24-d1-kpi-gold .tt24-d1-kpi-mark{background:var(--d1-gold)}
  body .tt24-d1-kpi-green .tt24-d1-kpi-mark{background:var(--d1-green)}
  body .tt24-d1-kpi-red .tt24-d1-kpi-mark{background:var(--d1-red)}
  body .tt24-d1-kpi small{display:block;margin-top:6px;color:#8a96a8;font-size:10.5px;line-height:1.6}
  body .tt24-d1-main-grid,body .tt24-d1-side-stack{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;min-width:0}
  body .tt24-d1-card{margin:0 !important;padding:14px !important;border:1px solid var(--d1-line) !important;border-radius:16px !important;background:#fff !important;overflow:hidden !important}
  body .tt24-d1-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
  body .tt24-d1-card-head>div{min-width:0}
  body .tt24-d1-card-head span{display:block;color:#8793a4;font-size:10.5px;font-weight:700}
  body .tt24-d1-card-head h3{margin:0;font-size:15px !important;font-weight:900 !important}
  body .tt24-d1-card-head .btn{white-space:nowrap}
  body .tt24-d1-table-wrap{overflow:auto;border-radius:12px}
}

/* TT24_D1_KPI_WORD_SIZE_V1 (owner 2026-10-02): the finance-status KPI shows a phrase («مبالغ واریزی شما»), not a
   number -- at the numeric 29px/26px it looked oversized. ~4px smaller on desktop and phone. */
body .tt24-d1-kpi.tt24-d1-kpi-word strong{font-size:25px !important;letter-spacing:-.3px !important}
@media (max-width:768px){ body.tt24-mobile .tt24-d1-kpi.tt24-d1-kpi-word strong,body .tt24-d1-kpi.tt24-d1-kpi-word strong{font-size:21px !important} }

/* TT24_D1_MOBILE_ACTIVITY_V1 (2026-10-03): the side-card rows («کارهای جاری شما»، «آخرین ارسال‌ها») were styled only on
   desktop -- on phones the count sat on its own line above its label. Same compact row as desktop. */
@media (max-width:768px){
  body .tt24-d1-activity-list{display:grid;gap:2px}
  body .tt24-d1-activity-item{display:grid !important;grid-template-columns:30px minmax(0,1fr) !important;gap:9px;align-items:center;padding:9px 0;border-bottom:1px solid #edf1f5}
  body .tt24-d1-activity-item:last-child{border-bottom:0}
  body .tt24-d1-activity-index{width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:9px;background:#eef5fb;color:#1e6fb5;font-size:11px;font-weight:900}
  body .tt24-d1-activity-item b{display:block;color:#27384e;font-size:12.5px;font-weight:800;white-space:normal}
  body .tt24-d1-activity-item small{display:block;margin-top:2px;color:#8a96a8;font-size:11px}
  body .tt24-d1-compact-empty{padding:18px 10px;text-align:center;color:#93a0b1;font-size:12px}
}
