@font-face{
  font-family:'Vazir';
  font-style:normal;
  font-weight:100;
  font-display:swap;
  src:url('../fonts/Vazir-Thin.woff2') format('woff2'),
      url('../fonts/Vazir-Thin.woff') format('woff'),
      url('../fonts/Vazir-Thin.ttf') format('truetype');
}
@font-face{
  font-family:'Vazir';
  font-style:normal;
  font-weight:300;
  font-display:swap;
  src:url('../fonts/Vazir-Light.woff2') format('woff2'),
      url('../fonts/Vazir-Light.woff') format('woff'),
      url('../fonts/Vazir-Light.ttf') format('truetype');
}
@font-face{
  font-family:'Vazir';
  font-style:normal;
  font-weight:400;
  font-display:swap;
  src:url('../fonts/Vazir-Regular.woff2') format('woff2'),
      url('../fonts/Vazir-Regular.woff') format('woff'),
      url('../fonts/Vazir-Regular.ttf') format('truetype');
}
@font-face{
  font-family:'Vazir';
  font-style:normal;
  font-weight:500;
  font-display:swap;
  src:url('../fonts/Vazir-Medium.woff2') format('woff2'),
      url('../fonts/Vazir-Medium.woff') format('woff'),
      url('../fonts/Vazir-Medium.ttf') format('truetype');
}
@font-face{
  font-family:'Vazir';
  font-style:normal;
  font-weight:700;
  font-display:swap;
  src:url('../fonts/Vazir-Bold.woff2') format('woff2'),
      url('../fonts/Vazir-Bold.woff') format('woff'),
      url('../fonts/Vazir-Bold.ttf') format('truetype');
}
@font-face{
  font-family:'Vazir';
  font-style:normal;
  font-weight:900;
  font-display:swap;
  src:url('../fonts/Vazir-Black.woff2') format('woff2'),
      url('../fonts/Vazir-Black.woff') format('woff'),
      url('../fonts/Vazir-Black.ttf') format('truetype');
}

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-weak: #e8efff;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Vazir, "Vazirmatn", Tahoma, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(59,130,246,.14), transparent 26%),
    radial-gradient(circle at 88% 10%, rgba(34,197,94,.11), transparent 18%),
    linear-gradient(180deg, #f6faff 0%, #edf4ff 52%, #ecfbff 100%);
  font-size: var(--fs-body, 15px);
  min-height: 100vh;
  background-attachment: fixed;
}
.shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  background: transparent;
}
.sidebar {
  background: #fff;
  border-left: 1px solid var(--border);
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 2;
}
.sidebar-toggle{margin-right:auto;}
.nav-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;}
.nav-icon svg{width:18px;height:18px;stroke:#334155;}
.nav-text{white-space:nowrap;}
.sidebar-collapsed .shell{grid-template-columns:84px 1fr;}
.sidebar-collapsed .sidebar{padding:16px 10px;}
.sidebar-collapsed .brand{justify-content:center;gap:0;padding:10px;}
.sidebar-collapsed .brand-title,
.sidebar-collapsed .brand-sub,
.sidebar-collapsed .nav-text{display:none;}
.sidebar-collapsed .brand-mark{width:40px;height:40px;}
.sidebar-collapsed .sidebar-toggle{margin:0 auto;}
.sidebar-collapsed .nav-list a{justify-content:center;}
.sidebar-collapsed .nav-list a{gap:0;}
.sidebar-collapsed .nav-icon svg{stroke:#0f172a;}
.sidebar-collapsed .nav-footer .nav-text{display:none;}
.sidebar-collapsed .nav-footer a{justify-content:center;}
.sidebar-collapsed .nav-group-items{display:none;}
.sidebar-collapsed .nav-group{padding:10px 0;}
@media (max-width:1024px){
  .sidebar-collapsed .shell{grid-template-columns:1fr;}
  .sidebar-collapsed .sidebar{padding:18px;}
  .sidebar-collapsed .brand-title,
  .sidebar-collapsed .brand-sub,
  .sidebar-collapsed .nav-text{display:inline;}
  .sidebar-collapsed .nav-list a{justify-content:flex-start;gap:8px;}
  .sidebar-collapsed .nav-footer a{justify-content:flex-start;}
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f8fafc;
  margin-bottom: 18px;
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.brand-title { font-size: 16px; font-weight: 700; }
.brand-sub { font-size: 12px; color: var(--muted); }
.nav-list { display: grid; gap: 6px; }
.nav-list a {
  text-decoration: none;
  color: #111827;
  padding: 10px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-menu, 16px);
}
.nav-list a.active {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
}
.nav-list a:hover { background: #f3f4f6; }
.nav-list a.active:hover {
  background: var(--primary);
  color: #fff;
}
.nav-footer { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.nav-footer .danger,
.nav-footer .nav-install { color: inherit; text-decoration: none; }
.nav-footer .nav-install{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
  border-radius:12px;
  padding:10px 12px;
  background:#f8fafc;
  border:1px solid #e5e7eb;
}
.nav-footer .nav-install.ready{
  background:#eef2ff;
  color:#1d4ed8;
  border-color:#c7d2fe;
}
.nav-footer .nav-install.installed{
  background:#dcfce7;
  color:#166534;
  border-color:#bbf7d0;
}
.nav-footer .nav-install.disabled{
  opacity:.45;
  cursor:not-allowed;
  pointer-events:none;
}
.nav-footer .nav-install .nav-icon svg{
  width:18px;
  height:18px;
}
.main { padding: 28px 32px 60px; min-width: 0; }
.main { position: relative; z-index: 1; }
.main{ background: transparent; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.topbar-start{display:flex;align-items:center;gap:10px;min-width:0;}
.topbar-title { color: #1f2937; font-weight: 600; font-size: 14px; letter-spacing: .2px; }
.topbar-user { display: flex; align-items: center; gap: 12px; }
.mobile-sidebar-toggle{display:none;}
.sidebar-backdrop{display:none;}
.welcome { font-weight: 700; }
.roles { display: flex; gap: 6px; }
.muted { color: var(--muted); font-size: 12px; }
.subnote { color: #94a3b8; font-size: 11px; }
.next-btn { display: inline-grid; gap: 2px; text-align: center; }
.next-btn small { font-size: 11px; color: var(--muted); }
.next-btn.disabled { opacity: 0.5; cursor: not-allowed; }
.chip {
  background: var(--primary-weak);
  color: #1d4ed8;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
}
.pwa-status-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  text-decoration:none;
  border:1px solid transparent;
}
.pwa-status-link.active{
  background:#dcfce7;
  color:#166534;
}
.pwa-status-link.disabled{
  opacity:.45;
  cursor:not-allowed;
  pointer-events:none;
}
.pwa-status-link svg{
  width:12px;
  height:12px;
  stroke:currentColor;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0 14px;
}
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.tab { text-decoration: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: #f8fafc; color: #0f172a; font-size: var(--fs-tabs, 15px); }
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: var(--shadow); }
.tab-panel { display: none; margin-top: 14px; }
.tab-panel.active { display: grid; gap: 16px; }
.page-head h1 { margin: 0 0 6px 0; font-size: 22px; }
.page-head p { margin: 0; color: var(--muted); }
.page-head h1 { font-size: var(--fs-headings, 22px); }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.performance-monitoring-page{
  display:grid;
  gap:16px;
  background:
    radial-gradient(circle at 15% 10%, rgba(59,130,246,.16), transparent 24%),
    radial-gradient(circle at 85% 8%, rgba(34,197,94,.13), transparent 18%),
    radial-gradient(circle at 60% 88%, rgba(245,158,11,.10), transparent 20%),
    linear-gradient(180deg, #f5faff 0%, #edf5ff 45%, #e7f9ff 100%);
  border-radius: 28px;
  overflow: hidden;
}
.monitoring-hero{
  display:grid;
  grid-template-columns: minmax(0,1.4fr) minmax(320px,.9fr);
  gap:18px;
  padding:24px;
  border:1px solid rgba(255,255,255,.72);
  background:
    radial-gradient(circle at top right, rgba(255,255,255,.86), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.80) 0%, rgba(235,244,255,.88) 50%, rgba(220,246,255,.92) 100%);
  box-shadow: 0 24px 60px rgba(37,99,235,.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 28px;
}
.monitoring-hero h1{
  margin:4px 0 8px;
  font-size:38px;
  line-height:1.15;
  color:#1d4ed8;
  letter-spacing:-.02em;
}
.monitoring-hero p{
  margin:0;
  color:#52657d;
  font-size:14px;
}
.monitoring-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  width:max-content;
  padding:6px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.82);
  color:#1d4ed8;
  border:1px solid rgba(37,99,235,.10);
  font-size:12px;
  font-weight:700;
  box-shadow:0 8px 20px rgba(37,99,235,.08);
}
.monitoring-scope{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}
.monitoring-filters{
  display:grid;
  gap:10px;
  align-content:start;
  padding:16px;
  border-radius:22px;
  background:rgba(255,255,255,.66);
  border:1px solid rgba(255,255,255,.8);
  box-shadow: 0 14px 30px rgba(37,99,235,.08), inset 0 1px 0 rgba(255,255,255,.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.monitoring-filters label{
  display:grid;
  gap:6px;
  color:#334155;
  font-size:13px;
  font-weight:700;
}
.monitoring-filter-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  padding-top:4px;
}
.monitoring-stats{
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.monitoring-stat{
  position:relative;
  overflow:hidden;
  min-height: 154px;
  padding: 20px;
  border:none;
  box-shadow: 0 16px 34px rgba(37,99,235,.14);
  color:#fff;
  display:grid;
  align-content:space-between;
  isolation:isolate;
}
.monitoring-stat::before{
  content:'';
  position:absolute;
  inset:0;
  border-radius:inherit;
  z-index:-2;
}
.monitoring-stat::after{
  content:'';
  position:absolute;
  inset-inline-end:-22px;
  inset-block-start:-24px;
  width:96px;
  height:96px;
  border-radius:50%;
  background:rgba(255,255,255,.18);
  z-index:-1;
  filter:blur(.2px);
}
.monitoring-stat > div{
  color:rgba(255,255,255,.86);
  font-size:13px;
  font-weight:700;
}
.monitoring-stat strong{
  font-size:34px;
  line-height:1;
  margin-top:0;
  color:#fff;
  letter-spacing:-.03em;
}
.monitoring-stat.tone-blue::before{
  background:linear-gradient(135deg, #2f80ff 0%, #5b6ff5 55%, #6c63ff 100%);
}
.monitoring-stat.tone-cyan::before{
  background:linear-gradient(135deg, #20cbe3 0%, #2b9cf7 55%, #4f7dff 100%);
}
.monitoring-stat.tone-green::before{
  background:linear-gradient(135deg, #35d07f 0%, #22c55e 52%, #7be495 100%);
}
.monitoring-stat.tone-orange::before{
  background:linear-gradient(135deg, #ffb83f 0%, #f59e0b 52%, #ff8a4c 100%);
}
.monitoring-grid{
  display:grid;
  gap:16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.monitoring-bottom-grid{
  display:grid;
  gap:16px;
  grid-template-columns: 1.1fr .9fr;
}
.monitoring-chart-card,
.monitoring-list-card{
  padding:14px;
  background:rgba(255,255,255,.66);
  border-color:rgba(255,255,255,.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:0 16px 36px rgba(37,99,235,.08);
  border-radius:24px;
}
.monitoring-chart-card .chart-head,
.monitoring-list-card .chart-head{
  margin-bottom:2px;
}
.monitoring-chart-card .chart-head h3,
.monitoring-list-card .chart-head h3{
  font-size:15px;
  color:#1e3a8a;
  letter-spacing:-.01em;
}
.monitoring-chart-card .chart-head .muted,
.monitoring-list-card .chart-head .muted{
  color:#6b7c93;
  font-size:12px;
}
.monitoring-chart{
  width:100%;
  height:300px;
  min-height:260px;
  margin-top:10px;
  border-radius:18px;
  overflow:hidden;
  background:linear-gradient(180deg, rgba(255,255,255,.72), rgba(247,250,255,.72));
  border:1px solid rgba(255,255,255,.85);
}
.monitoring-chart-sm{
  height:320px;
}
.monitoring-rank-grid{
  display:grid;
  gap:14px;
  grid-template-columns: 1fr 1fr;
  margin-top:12px;
}
.monitoring-rank-block{
  display:grid;
  gap:8px;
  padding:12px;
  border-radius:18px;
  background:rgba(248,250,252,.82);
  border:1px solid #e8eef7;
}
.monitoring-rank-title{
  font-weight:800;
  color:#1d4ed8;
  margin-bottom:2px;
}
.monitoring-rank-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border:1px solid rgba(219,228,244,.9);
  border-radius:14px;
  background:rgba(255,255,255,.92);
  box-shadow:0 8px 18px rgba(37,99,235,.06);
}
.monitoring-rank-main{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.monitoring-rank-main span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.monitoring-score-badge{
  flex:0 0 auto;
  padding:5px 10px;
  border-radius:999px;
  background:#e8f0ff;
  color:#1d4ed8;
  font-weight:800;
  font-size:12px;
}
.monitoring-chart--drillable{
  cursor:pointer;
  outline:1px solid transparent;
  transition:transform .18s ease, box-shadow .18s ease, outline-color .18s ease;
}
.monitoring-chart--drillable:hover{
  transform:translateY(-1px);
  box-shadow:0 18px 38px rgba(37,99,235,.12);
  outline-color:#c7d2fe;
}
.monitoring-agreement-card{
  display:grid;
  gap:16px;
  padding:18px;
  margin-top:16px;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(255,255,255,.82);
  border-radius:28px;
  box-shadow:0 18px 42px rgba(37,99,235,.08);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
.monitoring-section-head{
  align-items:flex-start;
}
.monitoring-section-pill{
  flex:0 0 auto;
  padding:8px 12px;
  border-radius:999px;
  background:#e8f0ff;
  color:#1d4ed8;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}
.monitoring-agreement-stack{
  display:grid;
  gap:18px;
}
.monitoring-agreement-group{
  display:grid;
  gap:14px;
  padding:14px;
  border-radius:22px;
  background:linear-gradient(180deg, rgba(247,250,255,.96), rgba(236,244,255,.9));
  border:1px solid rgba(219,228,244,.9);
}
.monitoring-agreement-chart{
  width:100%;
  min-height:320px;
}
.monitoring-agreement-project-chart{
  width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  padding:10px 4px 4px;
}
.monitoring-agreement-project-rack{
  min-width:max-content;
  height:420px;
  display:flex;
  align-items:flex-end;
  gap:12px;
  padding:0 6px 6px;
}
.monitoring-project-bar{
  --bar-h:60;
  --inner-h:60;
  width:72px;
  min-width:72px;
  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  gap:8px;
  text-decoration:none;
  color:inherit;
}
.monitoring-project-bar-top{
  height:24px;
  display:flex;
  justify-content:center;
  align-items:flex-end;
}
.monitoring-project-score{
  font-size:12px;
  font-weight:800;
  color:#1d4ed8;
  background:rgba(255,255,255,.88);
  border:1px solid rgba(191,219,254,.9);
  border-radius:999px;
  padding:2px 8px;
  box-shadow:0 8px 18px rgba(37,99,235,.08);
}
.monitoring-project-track{
  position:relative;
  height:calc(var(--bar-h) * 1%);
  min-height:18px;
  border-radius:18px 18px 10px 10px;
  background:linear-gradient(180deg, rgba(59,130,246,.16), rgba(59,130,246,.08));
  border:1px solid rgba(191,219,254,.8);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.65);
  overflow:hidden;
}
.monitoring-project-fill{
  position:absolute;
  inset:auto 0 0 0;
  height:calc(var(--inner-h) * 1%);
  min-height:10px;
  background:linear-gradient(180deg, #34d399 0%, #22c55e 55%, #16a34a 100%);
  border-radius:inherit;
  box-shadow:0 6px 16px rgba(34,197,94,.18);
}
.monitoring-project-fill-inner{
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:linear-gradient(180deg, rgba(255,255,255,.18), transparent 60%);
}
.monitoring-project-label{
  min-height:54px;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  text-align:center;
  color:#0f172a;
  font-size:11px;
  line-height:1.35;
  font-weight:800;
  white-space:normal;
  word-break:break-word;
  transform:rotate(-28deg);
  transform-origin:center top;
  margin-top:2px;
}
.monitoring-project-meta{
  display:flex;
  flex-direction:column;
  gap:2px;
  align-items:center;
  font-size:10px;
  color:#1d4ed8;
  font-weight:700;
  margin-top:-2px;
}
.monitoring-project-bar:hover .monitoring-project-track{
  border-color:rgba(37,99,235,.28);
  box-shadow:0 10px 22px rgba(37,99,235,.12);
}
.monitoring-agreement-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:baseline;
  flex-wrap:wrap;
}
.monitoring-agreement-head h4{
  margin:0;
  color:#1d4ed8;
  font-size:16px;
  font-weight:900;
}
.monitoring-gauge-grid{
  display:grid;
  gap:14px;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
}
.monitoring-gauge-card{
  display:grid;
  gap:12px;
  padding:16px;
  border-radius:22px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(219,228,244,.95);
  box-shadow:0 12px 28px rgba(37,99,235,.08);
  text-decoration:none;
  color:inherit;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.monitoring-gauge-card:hover{
  transform:translateY(-2px);
  border-color:rgba(37,99,235,.22);
  box-shadow:0 18px 38px rgba(37,99,235,.12);
}
.monitoring-gauge-ring{
  --gauge-track:rgba(37,99,235,.10);
  width:112px;
  height:112px;
  margin-inline:auto;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:conic-gradient(var(--gauge-accent) 0 var(--gauge-fill), var(--gauge-track) var(--gauge-fill) 100%);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.72), 0 12px 24px rgba(37,99,235,.10);
}
.monitoring-gauge-ring-inner{
  width:82px;
  height:82px;
  border-radius:50%;
  display:grid;
  place-items:center;
  gap:2px;
  background:rgba(255,255,255,.95);
  border:1px solid rgba(226,232,240,.95);
  text-align:center;
}
.monitoring-gauge-ring-inner strong{
  font-size:28px;
  line-height:1;
  color:#1e3a8a;
  letter-spacing:-.03em;
}
.monitoring-gauge-ring-inner span{
  color:#64748b;
  font-size:12px;
  font-weight:700;
}
.monitoring-gauge-copy{
  display:grid;
  gap:4px;
  text-align:center;
}
.monitoring-gauge-copy h5{
  margin:0;
  font-size:15px;
  color:#0f172a;
  font-weight:800;
  line-height:1.4;
}
.monitoring-gauge-copy p{
  margin:0;
  color:#64748b;
  font-size:12px;
  line-height:1.5;
}
.monitoring-gauge-copy span{
  color:#1d4ed8;
  font-size:12px;
  font-weight:700;
}
.monitoring-empty-state{
  padding:16px;
  border-radius:18px;
  background:rgba(255,255,255,.82);
  border:1px dashed rgba(148,163,184,.6);
  color:#64748b;
  text-align:center;
}
.monitoring-drill-card{
  display:grid;
  gap:14px;
  padding:20px;
  border:1px solid rgba(255,255,255,.82);
  background:
    radial-gradient(circle at top right, rgba(255,255,255,.88), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,.84) 0%, rgba(238,245,255,.92) 100%);
  box-shadow:0 18px 42px rgba(37,99,235,.10);
  border-radius:28px;
}
.monitoring-drill-head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
  flex-wrap:wrap;
}
.monitoring-drill-head h2{
  margin:8px 0 6px;
  font-size:28px;
  line-height:1.2;
  color:#1d4ed8;
}
.monitoring-drill-head p{
  margin:0;
  color:#64748b;
  font-size:13px;
}
.monitoring-drill-back{
  flex:0 0 auto;
}
.monitoring-drill-stats{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
.monitoring-drill-stat{
  padding:16px 18px;
  border-radius:18px;
  background:rgba(255,255,255,.82);
  border:1px solid rgba(219,228,244,.92);
  box-shadow:0 10px 22px rgba(37,99,235,.06);
}
.monitoring-drill-stat span{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:700;
  margin-bottom:10px;
}
.monitoring-drill-stat strong{
  font-size:28px;
  line-height:1;
  color:#0f172a;
  letter-spacing:-.03em;
}
.monitoring-drill-note{
  color:#64748b;
  font-size:12px;
}
.monitoring-drill-chart{
  height:380px;
  min-height:320px;
}
.monitoring-drill-table{
  margin-top:4px;
}
.monitoring-drill-table .thead,
.monitoring-drill-table .row{
  grid-template-columns: 64px 2.1fr 1.2fr 90px 90px 100px;
}
.monitoring-drill-table .row strong{
  color:#1d4ed8;
}
.monitoring-drill-summary{
  display:grid;
  gap:12px;
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.monitoring-drill-summary-card{
  display:grid;
  gap:8px;
  padding:16px 18px;
  background:rgba(255,255,255,.82);
  border:1px solid rgba(219,228,244,.92);
  box-shadow:0 10px 22px rgba(37,99,235,.06);
}
.monitoring-drill-summary-card span{
  color:#64748b;
  font-size:12px;
  font-weight:700;
}
.monitoring-drill-summary-card strong{
  color:#0f172a;
  font-size:26px;
  line-height:1;
}
.monitoring-drill-stage,
.monitoring-drill-table-card{
  margin-top:4px;
}
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 16px;
}
.chart-card { padding: 14px; }
.chart-card:fullscreen { background: #fff; padding: 16px; }
.chart-card:fullscreen .chart-head { margin-bottom: 10px; }
.chart-card:fullscreen canvas { height: calc(100vh - 140px); width: 100%; }
.chart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }

.chart-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.chart-tools form{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.month-control{display:flex;align-items:center;gap:8px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;padding:6px 10px;}
.month-control .month-input{width:64px;padding:6px 8px;border-radius:8px;}
.month-control .month-range{width:140px;accent-color:#2563eb;}
.chart-head{gap:10px;}
.chart-head h3{margin:0;white-space:nowrap;}

.chart-head h3 { font-size: 14px; margin: 0; }
.chart-card canvas { width: 100%; height: 240px; min-height: 200px; display: block; }
.chart-card { overflow: hidden; }
.ag-trend-wrap{margin-top:14px;border-top:1px dashed #dbe3ef;padding-top:12px;}
.ag-trend-head{font-size:13px;font-weight:700;color:#334155;margin-bottom:8px;}
.ag-trend-chart{width:100%;height:260px;min-height:220px;border:1px solid #e5e7eb;border-radius:12px;background:#fff;}
.echarts-trend-wrap{margin-top:14px;border-top:1px dashed #dbe3ef;padding-top:12px;}
.echarts-trend-head{font-size:13px;font-weight:700;color:#334155;margin-bottom:8px;}
.echarts-trend-chart{width:100%;height:260px;min-height:220px;border:1px solid #e5e7eb;border-radius:12px;background:#fff;}
.card.stat strong { font-size: 26px; display: block; margin-top: 6px; }
.table-wrap { padding: 0; 
            background: none;
            border: none;
            box-shadow: none;}
.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
}
.grid label { display: grid; gap: 6px; font-size: 13px; color: #374151; }
.grid label { font-size: var(--fs-labels, 13px); }
.grid-2 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline .btn { white-space: nowrap; }
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-family: inherit;
  background: #fff;
  transition: .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #c7d2fe; box-shadow: 0 0 0 3px #eef2ff; }
select[multiple] { height: 120px; }
.btn {
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #eef2ff;
  color: #1d4ed8;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  font-size: var(--fs-buttons, 15px);
  line-height: 1;
  height: 40px;
  width: auto;
  font-family: Vazir, "Vazirmatn", Tahoma, sans-serif;
}
.icon-btn{width:auto;font-family: Vazir, "Vazirmatn", Tahoma, sans-serif;}
.btn.primary { background: var(--primary); color: #fff; }
.btn.danger { background: #fee2e2; color: #b91c1c; }
.btn.disabled, .btn:disabled { opacity: 0.5; cursor: not-allowed; }
.icon-btn{border:1px solid #e5e7eb;}
.alert { padding: 10px 12px; border-radius: 12px; margin-bottom: 12px; }
.alert.error { background: #fee2e2; color: #991b1b; }
.alert.success { background: #dcfce7; color: #166534; }
.alert.warning { background: #fef3c7; color: #92400e; }
.table {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.thead, .row { display: grid; gap: 10px; padding: 14px 18px; align-items: center; }
.thead { background: #f8fafc; color: var(--muted); font-size: 13px; }
.thead, .row { font-size: var(--fs-tables, 14px); }
.row { border-top: 1px solid #f1f5f9; }
.table .thead, .table .row { grid-auto-columns: minmax(120px, 1fr); }
.table .row > div, .table .thead > div { min-width: 0; }
.users-table .thead, .users-table .row { grid-template-columns: 2fr 2fr 1fr 1.2fr; }
.user-cell { display: grid; gap: 4px; }
.user-name { font-weight: 700; }
.user-username { color: #94a3b8; font-size: 13px; }
.role-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.role-chip { background: #eef2ff; color: #1d4ed8; padding: 4px 10px; border-radius: 999px; font-size: 12px; }
.status-chip { padding: 4px 10px; border-radius: 999px; font-size: 12px; }
.status-chip.on { background: #dcfce7; color: #166534; }
.status-chip.off { background: #fee2e2; color: #991b1b; }
.kpi-table .thead, .kpi-table .row { grid-template-columns: minmax(160px,1.5fr) minmax(220px,2.5fr) minmax(90px,120px) minmax(90px,120px); }
.score-table .thead, .score-table .row { grid-template-columns: minmax(180px,2fr) minmax(90px,120px) minmax(220px,2fr) minmax(90px,120px); }
.score-table.admin-table .thead,
.score-table.admin-table .row { grid-template-columns: minmax(200px,2fr) minmax(110px,140px) minmax(110px,140px) minmax(90px,120px); }
.score-table .thead > div + div,
.score-table .row > div + div{
  border-inline-start:1px solid #edf2f7;
  padding-inline-start:12px;
}
.score-table.admin-table .thead,
.score-table.admin-table .row { padding: 8px 10px; gap: 8px; }
.score-table.admin-table .row input[type="number"] { width: 100%; text-align: center; font-weight: 700; height: 32px; padding: 4px 8px; }
.score-table.admin-table .section-row { background: #f8fafc; font-weight: 800; color: #0f172a; }
.score-table.admin-table .section-row > div { grid-column: 1 / -1; text-align: right; }
.score-table.admin-table .span-2 { grid-column: 2 / span 2; }
.score-table.admin-table .span-2 { justify-self: stretch; width: 100%; }
.score-table.admin-table .span-2-right { grid-column: 3 / span 2; }
.score-table.admin-table .cell-center { text-align: center; }
.score-table .row input[type="range"] { width: 100%; }
.score-inputs { display: grid; grid-template-columns: 1fr 80px; gap: 8px; align-items: center; }
.score-number { width: 80px; text-align: center; }
.score-inputs.disabled { opacity: 0.5; pointer-events: none; }
.score-meta-bottom{
  margin-top:14px;
  margin-bottom:10px;
}
.score-kpi-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.score-head-with-incidents{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.score-incidents-col-head{
  font-size:12px;
  color:#64748b;
  font-weight:700;
  white-space:nowrap;
}
.score-kpi-title{
  font-weight:700;
  color:#0f172a;
}
.score-incident-tools{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  padding:3px;
  border:1px solid #e2e8f0;
  border-radius:12px;
  background:#f8fafc;
  margin-top:0;
  flex-shrink:0;
}
.score-incident-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border:1px solid #d7e2f1;
  border-radius:12px;
  background:#ffffff;
  color:#1d4ed8;
  position:relative;
  text-decoration:none;
  box-shadow:0 2px 8px rgba(15,23,42,.05);
  transition:border-color .16s ease, color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}
.score-incident-btn:hover{
  border-color:#93c5fd;
  background:#eff6ff;
  color:#1e40af;
  box-shadow:0 6px 14px rgba(37,99,235,.14);
  transform:translateY(-1px);
}
.score-incident-btn:active{
  transform:none;
}
.score-incident-btn svg{
  width:24px;
  height:24px;
}
.score-incident-open{
  color:#0f172a;
}
.score-incident-badge{
  position:absolute;
  top:-5px;
  left:-5px;
  min-width:17px;
  height:17px;
  padding:0 4px;
  border-radius:999px;
  background:#b91c1c;
  color:#fff;
  font-size:10px;
  font-weight:700;
  line-height:17px;
  text-align:center;
  border:2px solid #fff;
}
.modal.with-backdrop.score-incidents-modal .modal-card{
  width:min(900px, 94vw);
  max-width:94vw;
  max-height:90vh;
  overflow:hidden;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:0;
}
.modal.with-backdrop.score-incidents-modal .modal-body{
  max-height:calc(90vh - 72px);
  overflow:auto;
  padding:12px;
  display:block;
  gap:0;
}
.score-incidents-modal .modal-head{
  margin:0;
  padding:10px 12px;
  border-bottom:1px solid #e5edf7;
  background:#fff;
}
.score-incidents-modal .modal-title{
  font-size:15px;
  line-height:1.6;
}
.score-incident-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:stretch;
}
.score-incident-item{
  border:1px solid #e5edf7;
  border-radius:14px;
  padding:12px;
  background:#fff;
  display:flex;
  flex-direction:column;
  gap:6px;
  min-height:0;
}
.score-incident-item-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.score-incident-item-head strong{
  font-size:14px;
  line-height:1.8;
}
.score-incident-item-meta{
  font-size:12px;
  color:#64748b;
  line-height:1.6;
  margin:0;
}
.score-incident-item-body{
  font-size:13px;
  color:#334155;
  line-height:1.75;
  margin:0;
}
.z-score-inputs .z-score-val {
  grid-column: 1 / -1;
  justify-self: end;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.nav-group{
  display:grid;
  gap:6px;
  padding:10px 12px;
  border-radius:14px;
}
.nav-group.active{
  background:linear-gradient(180deg, #eef4ff, #e5efff);
  box-shadow:0 10px 24px rgba(37,99,235,.08);
}
.nav-group-title{
  display:flex;
  align-items:center;
  gap:8px;
  color:#111827;
  font-size:var(--fs-menu, 16px);
  font-weight:700;
}
.nav-group-items{
  display:grid;
  gap:4px;
  padding-inline-start:28px;
}
.nav-group-items a{
  text-decoration:none;
  color:#334155;
  border-radius:10px;
  padding:8px 10px;
  display:flex;
  align-items:center;
  min-height:36px;
  font-size:14px;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(226,232,240,.8);
}
.nav-group-items a.active{
  color:#1d4ed8;
  border-color:#c7d2fe;
  background:#eef2ff;
}

.perf-page{
  display:grid;
  gap:16px;
  background:transparent;
}
.perf-hero{
  display:grid;
  grid-template-columns:minmax(0,1.3fr) minmax(320px,.9fr);
  gap:18px;
  padding:24px;
  border:1px solid rgba(255,255,255,.85);
  background:
    radial-gradient(circle at top right, rgba(255,255,255,.92), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,.85), rgba(236,244,255,.92));
  box-shadow:0 24px 60px rgba(37,99,235,.10);
  border-radius:28px;
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
.perf-hero-compact{
  grid-template-columns:1fr;
  gap:10px;
  padding:16px 18px;
}
.perf-title-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.perf-title-inline{
  margin:0 !important;
  font-size:22px !important;
  line-height:1.25 !important;
  color:#1d4ed8 !important;
}
.perf-scope-inline{
  margin-top:0 !important;
  justify-content:flex-start;
}
.perf-scope-inline .chip{
  white-space:nowrap;
}
.perf-hero-compact .perf-hero-copy{
  display:grid;
  gap:8px;
}
.perf-hero-compact h1{
  margin:0;
  font-size:24px;
  line-height:1.2;
}
.perf-hero-compact p{
  margin:0;
  font-size:12px;
  line-height:1.6;
}
.perf-hero-compact .perf-scope{
  margin-top:4px;
}
.perf-hero > .perf-filters{
  display:none;
}
.perf-hero-compact .perf-eyebrow,
.perf-hero-compact p{
  display:none;
}
.perf-hero h1{
  margin:8px 0 8px;
  font-size:38px;
  line-height:1.15;
  color:#1d4ed8;
}
.perf-hero p{
  margin:0;
  color:#53657c;
  font-size:14px;
}
.perf-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  width:max-content;
  padding:6px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.92);
  color:#1d4ed8;
  border:1px solid rgba(37,99,235,.10);
  font-size:12px;
  font-weight:800;
}
.perf-scope{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}
.perf-filters{
  display:grid;
  gap:10px;
  align-content:start;
  padding:16px;
  border-radius:22px;
  background:rgba(255,255,255,.68);
  border:1px solid rgba(255,255,255,.85);
  box-shadow:0 14px 30px rgba(37,99,235,.08);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}
.perf-filters label{
  display:grid;
  gap:6px;
  color:#334155;
  font-size:13px;
  font-weight:700;
}
.perf-filter-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  padding-top:4px;
}
.perf-toolbar{
  position:sticky;
  top:12px;
  z-index:40;
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  padding:12px 14px;
  border-radius:18px;
  background:rgba(255,255,255,.84);
  border:1px solid rgba(219,228,244,.92);
  box-shadow:0 16px 36px rgba(37,99,235,.10);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
.perf-toolbar-fields{
  display:flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
  flex-wrap:wrap;
}
.perf-toolbar-fields label{
  display:grid;
  gap:6px;
  font-size:12px;
  font-weight:800;
  color:#334155;
  white-space:nowrap;
}
.perf-toolbar-fields select{
  min-width:170px;
  height:40px;
  border:1px solid #dbe4f4;
  border-radius:12px;
  background:#fff;
  padding:0 12px;
  font-family:inherit;
}
.perf-toolbar-sections{
  margin-inline-start:auto;
}
.perf-toolbar-dropdown-btn{
  min-width:120px;
  justify-content:space-between;
}
.perf-toolbar-dropdown{
  min-width:320px;
  padding:10px;
  border-radius:16px;
  box-shadow:0 22px 48px rgba(15,23,42,.12);
  display:none;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.perf-toolbar-sections.open .perf-toolbar-dropdown{
  display:grid;
}
.perf-toolbar-section-link{
  position:relative;
  min-height:44px;
  padding:10px 12px 10px 38px;
  border:1px solid #e5edf8;
  background:#fff;
  color:#0f172a;
  border-radius:12px;
  text-decoration:none;
  font-weight:800;
  justify-content:flex-start;
}
.perf-toolbar-section-link::before{
  content:"";
  position:absolute;
  left:12px;
  top:50%;
  width:15px;
  height:15px;
  margin-top:-8px;
  border-radius:4px;
  border:1.5px solid #cbd5e1;
  background:#fff;
}
.perf-toolbar-section-link.active::before{
  border-color:#2563eb;
  background:#2563eb;
  box-shadow:inset 0 0 0 2px #fff;
}
.perf-toolbar-section-link.active{
  border-color:#c7d2fe;
  background:#eff6ff;
  color:#1d4ed8;
}
.perf-toolbar-section-link:hover{
  background:#f8fbff;
}
.perf-toolbar-sections .perf-toolbar-dropdown{
  position:absolute;
  right:0;
  top:52px;
}
.perf-toolbar-tabs{
  display:flex;
  align-items:center;
  gap:8px;
  flex:1 1 auto;
  overflow-x:auto;
  padding-bottom:2px;
  white-space:nowrap;
}
.perf-toolbar-tab{
  flex:0 0 auto;
  height:40px;
  padding:0 14px;
  border-radius:999px;
  border:1px solid #dbe4f4;
  background:#fff;
  color:#1e3a8a;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:800;
}
.perf-toolbar-tab.active{
  background:#2563eb;
  color:#fff;
  border-color:#2563eb;
}
.perf-toolbar-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
}
@media (max-width: 1100px){
  .perf-toolbar-sections{
    width:100%;
    margin-inline-start:0;
    position:relative;
  }
  .perf-toolbar-dropdown{
    width:100%;
    min-width:0;
    grid-template-columns:1fr;
  }
}
.perf-stats{
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.perf-stat{
  position:relative;
  overflow:hidden;
  min-height:154px;
  padding:20px;
  border:none;
  box-shadow:0 16px 34px rgba(37,99,235,.12);
  color:#fff;
  display:grid;
  align-content:space-between;
}
.perf-stat::after{
  content:'';
  position:absolute;
  inset-inline-end:-18px;
  inset-block-start:-20px;
  width:90px;
  height:90px;
  border-radius:50%;
  background:rgba(255,255,255,.16);
}
.perf-stat > div{
  color:rgba(255,255,255,.90);
  font-size:13px;
  font-weight:800;
}
.perf-stat strong{
  font-size:34px;
  line-height:1;
  color:#fff;
  letter-spacing:-.03em;
}
.perf-stat.blue{background:linear-gradient(135deg,#2f80ff,#6366f1);}
.perf-stat.cyan{background:linear-gradient(135deg,#22c1dc,#3b82f6);}
.perf-stat.green{background:linear-gradient(135deg,#27c36d,#22c55e);}
.perf-stat.orange{background:linear-gradient(135deg,#ffb03b,#f97316);}
.perf-panel{
  padding:16px;
  border-radius:24px;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(255,255,255,.82);
  box-shadow:0 16px 36px rgba(37,99,235,.08);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  position:relative;
}
.perf-panel-head{
  display:flex;
  flex-direction:row;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
  margin-bottom:8px;
  flex-wrap:wrap;
  direction:rtl;
}
.perf-panel-head > div{
  min-width:0;
  text-align:right;
}
.perf-widget-tools{
  position:relative;
  display:flex;
  align-items:center;
  gap:6px;
  margin-inline-start:auto;
  flex:0 0 auto;
}
.perf-widget-btn{
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid rgba(37,99,235,.14);
  background:rgba(255,255,255,.92);
  color:#1d4ed8;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 8px 18px rgba(37,99,235,.08);
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.perf-widget-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(37,99,235,.12);
  background:#fff;
}
.perf-widget-btn svg{
  width:18px;
  height:18px;
}
.perf-widget-menu{
  position:absolute;
  top:42px;
  left:0;
  min-width:260px;
  max-width:min(320px, calc(100vw - 40px));
  padding:12px;
  border-radius:16px;
  background:rgba(255,255,255,.98);
  border:1px solid rgba(219,228,244,.95);
  box-shadow:0 24px 50px rgba(15,23,42,.16);
  z-index:8;
}
.perf-widget-menu-head{
  font-size:13px;
  font-weight:900;
  color:#1d4ed8;
  margin-bottom:10px;
}
.perf-widget-menu-block{
  display:grid;
  gap:8px;
  margin-bottom:10px;
}
.perf-widget-menu-label{
  font-size:12px;
  color:#64748b;
  font-weight:700;
}
.perf-widget-size-switch{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
}
.perf-widget-size-btn{
  border:1px solid #dbe4f4;
  border-radius:10px;
  background:#f8fbff;
  color:#1e3a8a;
  padding:8px 10px;
  font-size:12px;
  cursor:pointer;
}
.perf-widget-size-btn.is-active{
  background:#2563eb;
  color:#fff;
  border-color:#2563eb;
}
.perf-widget-toggle{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  color:#0f172a;
  cursor:pointer;
}
.perf-widget-select{
  width:100%;
  border:1px solid #dbe4f4;
  border-radius:10px;
  padding:9px 10px;
  background:#fff;
  font-family:inherit;
  font-size:13px;
}
.perf-widget-menu-scroll{
  max-height:240px;
  overflow:auto;
  padding-right:2px;
}
.perf-widget-item{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  align-items:center;
  gap:12px;
  min-height:60px;
  padding:14px 16px;
  border-top:1px solid #eef2f7;
  font-size:12px;
  color:#0f172a;
  direction:rtl;
  text-align:right;
}
.perf-widget-item input{
  grid-column:2;
  justify-self:start;
  margin:0;
}
.perf-widget-item span{
  grid-column:1;
  justify-self:end;
  text-align:right;
  line-height:1.7;
}
.perf-widget-modal{
  position:fixed;
  inset:0;
  z-index:10000;
  display:grid;
  place-items:center;
  padding:20px;
}
.perf-widget-modal[hidden]{
  display:none !important;
}
.perf-widget-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.40);
  backdrop-filter:blur(4px);
}
.perf-widget-modal-card{
  position:relative;
  width:min(560px, 100%);
  max-height:min(90vh, 780px);
  overflow:auto;
  background:rgba(255,255,255,.98);
  border:1px solid rgba(219,228,244,.95);
  border-radius:24px;
  box-shadow:0 40px 90px rgba(15,23,42,.22);
  padding:18px;
  transform:translateY(10px) scale(.98);
  opacity:0;
  transition:transform .22s ease, opacity .22s ease;
  direction:rtl;
  text-align:right;
}
.perf-widget-modal-card.is-filter-mode{
  width:min(980px, 96vw);
}
.perf-widget-modal-card.is-settings-mode{
  width:min(560px, 100%);
}
.perf-widget-modal.show .perf-widget-modal-card{
  transform:translateY(0) scale(1);
  opacity:1;
}
.perf-widget-modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px;
  direction:rtl;
}
.perf-widget-modal-kicker{
  font-size:12px;
  color:#2563eb;
  font-weight:900;
  margin-bottom:4px;
}
.perf-widget-modal-head h4{
  margin:0;
  font-size:18px;
  color:#0f172a;
  font-weight:900;
}
.perf-widget-modal-close{
  width:36px;
  height:36px;
  border:1px solid #dbe4f4;
  border-radius:10px;
  background:#fff;
  color:#1e293b;
  font-size:22px;
  line-height:1;
  cursor:pointer;
}
.perf-widget-modal-body{
  display:grid;
  gap:14px;
  direction:rtl;
  text-align:right;
}
.perf-widget-form{
  display:grid;
  gap:14px;
  direction:rtl;
  text-align:right;
}
.perf-widget-field{
  display:grid;
  gap:8px;
  direction:rtl;
  text-align:right;
}
.perf-widget-field > span{
  font-size:12px;
  color:#64748b;
  font-weight:700;
  text-align:right;
}
.perf-widget-items{
  display:grid;
  gap:8px;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  max-height:300px;
  overflow:auto;
  padding-inline-end:2px;
  direction:rtl;
}
.perf-widget-item:nth-child(3n+2),
.perf-widget-item:nth-child(3n+3){
  border-inline-start:1px solid #e5edf7;
}
.perf-widget-items .perf-widget-item:nth-child(-n+3){
  border-top-color:transparent;
}
.perf-widget-toggle-modal{
  padding:12px 14px;
  border:1px solid #e2e8f0;
  border-radius:14px;
  background:#f8fbff;
  direction:rtl;
  justify-content:space-between;
  text-align:right;
}
.perf-widget-modal-footer{
  display:flex;
  gap:10px;
  justify-content:flex-start;
  margin-top:18px;
  direction:rtl;
}
@media (max-width: 1100px){
  .perf-widget-modal-card.is-filter-mode{
    width:min(92vw, 920px);
  }
  .perf-widget-items{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px){
  .perf-widget-items{
    grid-template-columns:1fr;
  }
}
.widget-modal-open{
  overflow:hidden;
}
.perf-widget.widget-menu-open{
  z-index:5;
}
.perf-widget.widget-menu-open .perf-chart{
  filter:saturate(1.02);
}
.perf-widget[data-widget-panel="member-project"][data-widget-size="sm"] .perf-project-carousel{
  min-height:260px;
}
.perf-widget[data-widget-panel="member-project"][data-widget-size="md"] .perf-project-carousel{
  min-height:320px;
}
.perf-widget[data-widget-panel="member-project"][data-widget-size="lg"] .perf-project-carousel{
  min-height:420px;
}
.perf-widget[data-widget-panel="member-project"][data-widget-size="sm"] .perf-project-compact .perf-project-bars{
  height:150px;
  width:16px;
}
.perf-widget[data-widget-panel="member-project"][data-widget-size="md"] .perf-project-compact .perf-project-bars{
  height:170px;
  width:32px;
}
.perf-widget[data-widget-panel="member-project"][data-widget-size="lg"] .perf-project-compact .perf-project-bars{
  height:210px;
  width:64px;
}
.perf-widget.is-fullscreen{
  position:fixed;
  inset:16px;
  z-index:9990;
  margin:0 !important;
  overflow:auto;
  box-shadow:0 40px 90px rgba(15,23,42,.26);
}
.perf-widget.is-fullscreen .perf-chart{
  height:calc(100vh - 240px);
  min-height:420px;
}
.perf-widget.is-fullscreen .perf-project-carousel{
  min-height:calc(100vh - 260px);
}
.perf-panel-head h3{
  margin:0;
  color:#1d4ed8;
  font-size:16px;
  font-weight:900;
}
.perf-panel-head .muted{
  color:#64748b;
  font-size:12px;
}
.perf-grid{
  display:grid;
  gap:16px;
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.perf-bottom-grid{
  display:grid;
  gap:16px;
  grid-template-columns:1.1fr .9fr;
}
.perf-chart{
  width:100%;
  min-height:320px;
  height:320px;
  border-radius:18px;
  overflow:hidden;
  background:linear-gradient(180deg, rgba(255,255,255,.75), rgba(247,250,255,.72));
  border:1px solid rgba(255,255,255,.86);
}
.perf-chart.sm{height:280px;min-height:280px;}
.perf-drill-chart{height:360px;min-height:320px;}
.perf-list{
  display:grid;
  gap:10px;
}
.perf-list-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border:1px solid #e8eef7;
  border-radius:14px;
  background:rgba(255,255,255,.95);
}
.perf-list-main{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.perf-list-main span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.perf-pill{
  flex:0 0 auto;
  padding:5px 10px;
  border-radius:999px;
  background:#e8f0ff;
  color:#1d4ed8;
  font-size:12px;
  font-weight:800;
}
.perf-agreement-stack{
  display:grid;
  gap:18px;
}
.perf-agreement-group{
  display:grid;
  gap:14px;
  padding:14px;
  border-radius:22px;
  background:linear-gradient(180deg, rgba(247,250,255,.98), rgba(236,244,255,.92));
  border:1px solid rgba(219,228,244,.9);
}
.perf-agreement-bars{
  display:grid;
  gap:12px;
}
.perf-agreement-bar{
  display:grid;
  gap:6px;
  text-decoration:none;
  color:inherit;
}
.perf-agreement-bar-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:baseline;
}
.perf-agreement-bar-title{
  font-size:12px;
  font-weight:800;
  color:#0f172a;
  line-height:1.4;
}
.perf-agreement-bar-score{
  font-size:12px;
  font-weight:900;
  color:#1d4ed8;
}
.perf-agreement-track{
  position:relative;
  height:28px;
  border-radius:999px;
  background:rgba(191,219,254,.28);
  border:1px solid rgba(191,219,254,.7);
  overflow:hidden;
}
.perf-agreement-fill{
  position:absolute;
  inset:0 auto 0 0;
  border-radius:inherit;
  background:linear-gradient(180deg,#4f8df7,#2563eb);
}
.perf-agreement-fill.inner{
  background:linear-gradient(180deg,#34d399,#16a34a);
}
.perf-agreement-meta{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:11px;
  color:#4b5563;
  font-weight:700;
}
.perf-project-rack{
  display:flex;
  gap:12px;
  align-items:flex-end;
  overflow-x:auto;
  padding:8px 4px 4px;
}
.perf-project{
  min-width:86px;
  width:86px;
  text-decoration:none;
  color:inherit;
  display:grid;
  gap:6px;
  align-content:end;
}
.perf-project-score{
  display:inline-flex;
  align-self:center;
  justify-self:center;
  padding:2px 8px;
  border-radius:999px;
  background:#fff;
  color:#1d4ed8;
  border:1px solid rgba(191,219,254,.9);
  font-size:12px;
  font-weight:800;
}
.perf-project-bars{
  height:320px;
  display:flex;
  align-items:flex-end;
  position:relative;
}
.perf-project-track{
  position:relative;
  width:100%;
  height:100%;
  border-radius:18px 18px 12px 12px;
  background:linear-gradient(180deg, rgba(59,130,246,.18), rgba(59,130,246,.06));
  border:1px solid rgba(191,219,254,.8);
  overflow:hidden;
  transition:height .55s cubic-bezier(.2,.8,.2,1);
}
.perf-project-fill{
  position:absolute;
  inset:auto 0 0 0;
  background:linear-gradient(180deg,#34d399,#16a34a);
  border-radius:inherit;
  transition:height .55s cubic-bezier(.2,.8,.2,1), background .3s ease;
}
.perf-project-fill.is-high{
  background:linear-gradient(180deg,#34d399,#16a34a);
}
.perf-project-fill.is-mid{
  background:linear-gradient(180deg,#60a5fa,#2563eb);
}
.perf-project-fill.is-low{
  background:linear-gradient(180deg,#fbbf24,#f97316);
}
.perf-project-label{
  min-height:56px;
  text-align:center;
  font-size:11px;
  line-height:1.35;
  font-weight:800;
  transform:rotate(-28deg);
  transform-origin:center top;
}
.perf-project-meta{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:2px;
  font-size:10px;
  color:#1d4ed8;
  font-weight:700;
}
.perf-empty{
  padding:16px;
  border-radius:18px;
  background:rgba(255,255,255,.84);
  border:1px dashed rgba(148,163,184,.6);
  color:#64748b;
  text-align:center;
}
.perf-bar-chart{
  --perf-bar-width:40px;
  --perf-bar-count:1;
  min-height:290px;
  display:flex;
  align-items:stretch;
}
.perf-bar-grid{
  width:100%;
  display:grid;
  grid-template-columns:repeat(var(--perf-bar-count),minmax(0,1fr));
  gap:14px;
  align-items:end;
  padding:8px 4px 4px;
  direction:ltr;
}
.perf-bar-item{
  appearance:none;
  border:0;
  background:transparent;
  padding:0;
  display:grid;
  gap:8px;
  align-content:end;
  justify-items:center;
  min-width:0;
  cursor:pointer;
  color:inherit;
  direction:rtl;
}
.perf-bar-item:focus-visible{
  outline:2px solid rgba(37,99,235,.35);
  outline-offset:3px;
  border-radius:14px;
}
.perf-bar-top{
  min-height:22px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid rgba(191,219,254,.9);
  background:#fff;
  color:#1d4ed8;
  font-size:12px;
  font-weight:800;
  line-height:1.2;
}
.perf-bar-track{
  position:relative;
  width:min(var(--perf-bar-width), calc(100% - 8px));
  height:210px;
  border-radius:18px 18px 12px 12px;
  background:linear-gradient(180deg, rgba(59,130,246,.18), rgba(59,130,246,.06));
  border:1px solid rgba(191,219,254,.8);
  overflow:hidden;
  display:flex;
  align-items:flex-end;
  justify-content:center;
}
.perf-bar-fill{
  width:100%;
  border-radius:inherit;
  min-height:4px;
  transition:height .55s cubic-bezier(.2,.8,.2,1), width .25s ease, background .3s ease;
}
.perf-bar-label{
  min-height:48px;
  max-width:100%;
  padding:0 2px;
  text-align:center;
  font-size:11px;
  line-height:1.35;
  font-weight:800;
  color:#111827;
  word-break:break-word;
  overflow-wrap:anywhere;
  white-space:normal;
}
.perf-drill-page .perf-hero h1{
  font-size:34px;
}
.perf-drill-summary{
  display:grid;
  gap:12px;
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.perf-drill-summary-card{
  display:grid;
  gap:8px;
  padding:16px 18px;
  background:rgba(255,255,255,.84);
  border:1px solid rgba(219,228,244,.92);
  box-shadow:0 10px 22px rgba(37,99,235,.06);
  border-radius:18px;
}
.perf-drill-summary-card span{
  color:#64748b;
  font-size:12px;
  font-weight:700;
}
.perf-drill-summary-card strong{
  color:#0f172a;
  font-size:26px;
  line-height:1;
}
.perf-table .thead,
.perf-table .row{
  grid-template-columns:minmax(70px,80px) minmax(180px,2fr) minmax(160px,1.2fr) minmax(90px,120px) minmax(90px,120px) minmax(90px,120px);
}
.perf-table.perf-auditor-table .thead,
.perf-table.perf-auditor-table .row{
  grid-template-columns:minmax(180px,2fr) minmax(180px,2fr) minmax(90px,120px) minmax(90px,120px) minmax(90px,120px) minmax(90px,120px);
}
@media (max-width: 1200px){
  .perf-hero,
  .perf-grid,
  .perf-bottom-grid{
    grid-template-columns:1fr;
  }
  .perf-stats{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .perf-drill-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .perf-bar-track{
    height:180px;
  }
}
@media (max-width: 720px){
  .nav-group-items{
    padding-inline-start:20px;
  }
  .perf-hero,
  .perf-panel{
    padding:16px;
  }
  .perf-hero h1{
    font-size:28px;
  }
  .perf-stats,
  .perf-drill-summary{
    grid-template-columns:1fr;
  }
  .perf-bar-chart{
    min-height:260px;
  }
  .perf-bar-track{
    height:160px;
    width:min(var(--perf-bar-width), calc(100% - 4px));
  }
  .perf-bar-label{
    font-size:10px;
  }
  .perf-chart,
  .perf-chart.sm,
  .perf-drill-chart{
    height:280px;
    min-height:280px;
  }
  .perf-widget-menu{
    min-width:220px;
    max-width:calc(100vw - 32px);
  }
  .perf-table .thead,
  .perf-table .row,
  .perf-table.perf-auditor-table .thead,
  .perf-table.perf-auditor-table .row{
    grid-template-columns:1fr;
  }
}
.tt-toolbar{
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
  margin:3px 0 3px;
  margin-right:auto;
  padding:3px;
 /* border:1px solid #dbe3ef;
  border-radius:10px;
  background:#f8fafc;*/
}
.table-wrap > .tt-toolbar{
  background:transparent;
  border:0;
  box-shadow:none;
  padding:0;
  border-radius:0;
  margin:0 0 8px;
}
.tt-toolbar-btn{
  width:28px;
  height:28px;
  border:1px solid #dbe3ef;
  background:#fff;
  border-radius:8px;
  color:#475569;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
  padding:0;
  transition:all .18s ease;
}
.tt-toolbar-btn:hover{ background:#f8fafc; }
.tt-toolbar-btn.active{
  background:#dbeafe;
  border-color:#93c5fd;
  color:#1d4ed8;
}
.tt-ico-svg{ width:13px; height:13px; }
.tt-head-cell{
  position:relative;
  cursor:default;
  user-select:none;
  padding-inline-end:0;
}
.tt-sort-active .tt-head-cell,
.tt-filter-active .tt-head-cell{ cursor:pointer; }
.tt-main-sort.active,
.tt-head-cell.tt-sorted-asc,
.tt-head-cell.tt-sorted-desc{ color:#1d4ed8; }
.tt-main-filter.active,
.tt-head-cell.tt-filtered{ color:#0f766e; }
.tt-head-cell.tt-sorted-asc::after{
  content:'\2191';
  position:static;
  display:inline-block;
  vertical-align:middle;
  margin-inline-start:4px;
  font-size:11px;
  line-height:1;
  color:#1d4ed8;
}
.tt-head-cell.tt-sorted-desc::after{
  content:'\2193';
  position:static;
  display:inline-block;
  vertical-align:middle;
  margin-inline-start:4px;
  font-size:11px;
  line-height:1;
  color:#1d4ed8;
}
.tt-head-cell.tt-filtered::before{ content:none !important; }
.tt-state-mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  vertical-align:middle;
  margin-inline-start:4px;
  line-height:1;
}
.tt-state-filter{
  width:11px;
  height:11px;
  color:#0f766e;
}
.tt-state-filter svg{
  width:11px;
  height:11px;
  display:block;
}
.tt-inline-filter-wrap{
  display:none;
  position:absolute;
  inset:2px 2px auto 2px;
  inline-size:calc(var(--tt-head-width, 100%) - 4px);
  max-inline-size:calc(var(--tt-head-width, 100%) - 4px);
  box-sizing:border-box;
  z-index:45;
  grid-template-columns:1fr auto;
  gap:4px;
  align-items:center;
  background:#fff;
  border:1px solid #dbe3ef;
  border-radius:8px;
  padding:3px 4px;
  box-shadow:0 8px 18px rgba(15,23,42,.14);
}
.tt-head-cell.tt-filter-editing .tt-inline-filter-wrap{
  display:grid;
  z-index:1000;
 }
.tt-inline-filter{
  width:100%;
  height:24px;
  border-radius:8px;
  border:1px solid #dbe3ef;
  padding:3px 6px;
  font-size:12px;
}
.tt-inline-clear{
  justify-self:end;
  width:20px;
  height:20px;
  border:1px solid #e2e8f0;
  background:#f8fafc;
  color:#475569;
  border-radius:6px;
  cursor:pointer;
  padding:0;
}
.tt-head-cell .tt-col-tools,
.tt-head-cell .tt-col-btn{ display:none !important; }
.score-slider-wrap { position: relative; display: flex; align-items: center; width: 100%; }
.score-slider-wrap .score-range { width: 100%; }
.score-effective-box {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(15,23,42,0.08);
}
.y-inline{display:flex;gap:8px;align-items:center;flex-wrap:wrap;width:100%;}
.y-input-wrap{position:relative;display:inline-flex;align-items:center;width:100%;}
.y-input-wrap input{width:100%;padding-right:30px;padding-left:8px;text-align:center;}
.y-pull-btn{position:absolute;right:6px;width:22px;height:22px;border:1px solid #e5e7eb;background:#f8fafc;color:#475569;border-radius:6px;display:flex;align-items:center;justify-content:center;cursor:pointer;}
.y-pull-btn:hover{background:#eef2f7;color:#1f2937;}
.y-pull-btn svg{width:14px;height:14px;}
.y-pull-btn.off{background:#f1f5f9;color:#94a3b8;border-color:#e2e8f0;cursor:not-allowed;}
.y-pull-btn.ok{background:#ecfdf3;color:#166534;border-color:#bbf7d0;}
.y-pull-btn.sync{background:#fef2f2;color:#991b1b;border-color:#fecaca;}
.y-pull-caption{font-size:11px;color:#64748b;margin-top:4px;}
.score-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.score-meta .meta-item {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}
.score-meta .meta-item .label { color: #6b7280; font-size: 12px; }
.score-meta .meta-item .value { font-weight: 800; font-size: 18px; color: #0f172a; }
.score-z { margin-bottom: 16px; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 14px; padding: 12px; }
.score-z .z-title { font-weight: 700; margin-bottom: 10px; display:flex; align-items:center; justify-content:space-between; gap:10px; }
.score-z .z-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.score-z label { display: grid; gap: 6px; font-size: 12px; color: #374151; }
.z-notes-panel .z-notes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: 10px; }
.z-note-group { border: 1px dashed #dbe3ef; border-radius: 12px; padding: 10px; background: #fff; display: grid; gap: 8px; }
.z-note-role { font-size: 13px; font-weight: 800; color: #0f172a; }
.z-note-item { display: grid; gap: 6px; }
.z-note-meta { font-size: 11px; color: #64748b; }
.z-note-text, .z-note-textarea {
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #f8fafc;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.7;
  color: #0f172a;
  min-height: 74px;
}
.z-note-text { white-space: pre-wrap; }
.z-note-textarea { width: 100%; resize: vertical; text-align: right; direction: rtl; }
.sum { margin-top: 10px; font-weight: bold; }
.sum.ok { color: #166534; }
.sum.warn { color: #b45309; }
.sum.bad { color: #b91c1c; }
.kpi-board { display: grid; gap: 16px; }
.kpi-sticky-bar {
  position: sticky;
  top: 90px;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: #e9f2fb;
  border: 1px solid #4b69d1;
  border-radius: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.sum-badge {
  background: #fff7d6;
  border: 1px solid #d1b25b;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
}
.sum-badge strong { font-size: 18px; }
.sum-badge.sum-ok { background: #eaffea; border-color: #3bbf7a; color: #166534; }
.sum-badge.sum-warn { background: #fff4d6; border-color: #d5a441; color: #92400e; }
.sum-badge.sum-bad { background: #ffe2d6; border-color: #e87c5b; color: #9a3412; }
.sum-ok { color: #16a34a; }
.sum-warn { color: #b45309; }
.sum-bad { color: #b91c1c; }
.settings-tag-input{display:grid;gap:8px;border:1px solid #e5e7eb;background:#fff;border-radius:12px;padding:10px;}
.settings-tag-list{display:flex;flex-wrap:wrap;gap:6px;}
.settings-tag{display:inline-flex;align-items:center;gap:6px;border:1px solid #e2e8f0;background:#f8fafc;border-radius:999px;padding:4px 10px;font-size:12px;}
.settings-tag button{border:0;background:#fee2e2;color:#b91c1c;border-radius:999px;width:18px;height:18px;line-height:18px;padding:0;cursor:pointer;font-size:12px;}
.kpi-item { display: grid; grid-template-columns: 350px 110px 110px 110px 1fr; gap: 12px; align-items: center; padding: 16px; border-radius: 18px; border: 1px solid #e5e7eb; background: #fff; box-shadow: var(--shadow); }
.kpi-title { text-align: right; }
.kpi-title label:first-child { font-weight: 800; font-size: 16px; }
.kpi-title label:last-child { font-size: 12px; color: #6b7280; }
.kpi-title input { text-align: right; }
.kpi-title label { display: grid; gap: 6px; }
.kpi-title { display: grid; gap: 8px; }
.kpi-metric { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; padding: 10px; text-align: center; }
.kpi-metric input { text-align: center; font-weight: 700; }
.kpi-metric.lead { background: #ecfdf3; border-color: #bbf7d0; color: #166534; }
.kpi-metric.pm { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.kpi-metric.total { background: #f8fafc; color: #0f172a; }
.kpi-metric .label { font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.add-kpi { width: 100%; border: 2px dashed #cbd5e1; background: #f8fafc; color: #64748b; }
.icon-btn.danger { background: #fee2e2; color: #b91c1c; }
.switch { display: flex; align-items: center; gap: 10px; }
.switch input { width: auto; }
.font-grid { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.font-card { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 18px; padding: 16px; display: grid; gap: 8px; }
.font-row { display: flex; justify-content: space-between; align-items: center; color: #0f172a; font-weight: 700; }
.font-card input[type="range"] { width: 100%; }
.final-score { margin: 12px 0; font-weight: bold; }
.auth-page{
  min-height:100vh;
  margin:0;
  display:grid;
  place-items:center;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(20,184,166,.20), transparent 55%),
    radial-gradient(900px 420px at 0% 100%, rgba(59,130,246,.14), transparent 55%),
    linear-gradient(160deg, #eef3fb 0%, #e6eef9 45%, #e9f0f8 100%);
  position:relative;
  overflow-x:hidden;
  overflow-y:auto;
}
.auth-ambient{
  position:absolute;
  inset:0;
  pointer-events:none;
  background-image:
    linear-gradient(to right, rgba(15,23,42,.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,23,42,.04) 1px, transparent 1px);
  background-size:48px 48px;
  mask-image: radial-gradient(circle at center, rgba(0,0,0,.6), transparent 85%);
}
.auth-shell{
  width:min(460px, 94vw);
  position:relative;
  z-index:1;
}
.auth-panel{
  background:rgba(255,255,255,.78);
  border:1px solid rgba(255,255,255,.7);
  box-shadow:0 22px 50px rgba(15,23,42,.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius:24px;
  padding:26px;
  display:grid;
  gap:16px;
}
.auth-logo-wrap{
  display:flex;
  justify-content:center;
  align-items:center;
}
.auth-logo{
  max-width:100%;
  width:auto;
  max-height:110px;
  height:auto;
  object-fit:contain;
  display:block;
}
.auth-brand{display:grid;gap:6px;}
.auth-brand h1{
  margin:0;
  font-size:31px;
  line-height:1.15;
  color:#0b1324;
}
.auth-brand p{
  margin:0;
  color:#4b5563;
  font-size:14px;
}
.auth-form{
  display:grid;
  gap:10px;
}
.auth-form label{
  color:#334155;
  font-size:13px;
  font-weight:700;
}
.auth-form input{
  background:#f8fafc;
  border:1px solid #dbe3ef;
  border-radius:14px;
  height:48px;
  padding:0 14px;
  font-size:15px;
  transition:border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.auth-form input:focus{
  outline:none;
  border-color:#2563eb;
  background:#fff;
  box-shadow:0 0 0 3px rgba(37,99,235,.14);
}
.auth-password-wrap{
  position:relative;
}
.auth-password-wrap input{
  padding-left:46px;
}
.auth-eye-btn{
  position:absolute;
  left:10px;
  top:50%;
  transform:translateY(-50%);
  border:0;
  background:transparent;
  color:#64748b;
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border-radius:8px;
  cursor:pointer;
}
.auth-eye-btn:hover{background:#eef2ff;color:#1e40af;}
.auth-eye-btn .eye-off{display:none;}
.auth-eye-btn.is-on .eye-open{display:none;}
.auth-eye-btn.is-on .eye-off{display:block;}
.auth-remember{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  color:#334155;
  cursor:pointer;
  user-select:none;
  margin-top:2px;
}
.auth-remember input{
  width:16px;
  height:16px;
  margin:0;
  accent-color:#2563eb;
}
.auth-submit{
  margin-top:6px;
  height:48px;
  border-radius:14px;
  font-weight:800;
  font-size:15px;
}
.auth-oauth-sep{
  display:flex;
  align-items:center;
  justify-content:center;
  color:#64748b;
  font-size:13px;
  margin-top:2px;
}
.auth-oauth-sep span{
  position:relative;
  padding:0 10px;
}
.auth-oauth-sep span::before,
.auth-oauth-sep span::after{
  content:"";
  position:absolute;
  top:50%;
  width:90px;
  height:1px;
  background:#dbe3ef;
}
.auth-oauth-sep span::before{ right:100%; }
.auth-oauth-sep span::after{ left:100%; }
.auth-google-btn{
  width:100%;
  height:48px;
  border-radius:14px;
  border:1px solid #dbe3ef;
  background:#fff;
  color:#0f172a;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-weight:700;
}
.auth-google-icon{
  width:22px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.auth-google-icon svg{
  display:block;
}
.auth-google-btn:hover{
  background:#f8fafc;
  border-color:#cbd5e1;
}
.auth-passkey-btn{
  width:100%;
  margin-top:10px;
  height:48px;
  border-radius:14px;
  border:1px solid #c7d2fe;
  background:linear-gradient(135deg,#eff6ff,#f8fafc);
  color:#1d4ed8;
  font-weight:800;
}
.auth-passkey-btn:hover{
  background:linear-gradient(135deg,#e0f2fe,#eef2ff);
  border-color:#93c5fd;
}
.auth-passkey-hint{
  margin-top:8px;
  font-size:12px;
  color:#64748b;
  text-align:center;
}
.auth-biometric-shell{
  display:grid;
  justify-items:center;
  gap:12px;
  margin:6px 0 14px;
  text-align:center;
}
.auth-biometric-shell[hidden]{
  display:none !important;
}
.biometric-hero{
  width:108px;
  height:108px;
  border-radius:32px;
  display:grid;
  place-items:center;
  color:#1d4ed8;
  background:linear-gradient(135deg,#eff6ff,#f8fafc);
  border:1px solid #bfdbfe;
  box-shadow:0 18px 40px rgba(37,99,235,.08);
}
.biometric-hero svg{
  display:block;
}
.biometric-copy h2{
  margin:0;
  font-size:28px;
  color:#0f172a;
}
.biometric-copy p{
  margin:6px 0 0;
  color:#475569;
  line-height:1.7;
}
.biometric-fallback{
  color:#2563eb;
  font-weight:700;
}
.biometric-modal{
  position:fixed;
  inset:0;
  z-index:4000;
  display:grid;
  place-items:center;
  background:rgba(15,23,42,.42);
  backdrop-filter:blur(8px);
  opacity:0;
  transition:opacity .18s ease;
}
.biometric-modal[hidden]{
  display:none !important;
}
body.biometric-modal-open{
  overflow:hidden;
}
.biometric-modal.show{
  opacity:1;
}
.auth-transition-active .shell{
  visibility:hidden;
}
.auth-transition-active .auth-shell{
  visibility:hidden;
}
.auth-transition-active::before{
  content:'';
  position:fixed;
  inset:0;
  z-index:9997;
  background:rgba(15,23,42,.42);
  backdrop-filter:blur(8px);
}
.auth-transition-active::after{
  content:none;
}
.auth-transition-active body{
  overflow:hidden;
}
.auth-transition-active #authTransitionModal{
  display:grid !important;
  opacity:1 !important;
}
.auth-transition-active #authTransitionModal[hidden]{
  display:grid !important;
}
.biometric-modal-card{
  width:min(92vw,360px);
  padding:22px 18px 18px;
  border-radius:24px;
  background:#fff;
  border:1px solid rgba(148,163,184,.25);
  box-shadow:0 24px 70px rgba(15,23,42,.22);
  text-align:center;
  display:grid;
  gap:12px;
}
.biometric-modal-icon{
  width:92px;
  height:92px;
  margin:0 auto;
  border-radius:28px;
  display:grid;
  place-items:center;
  color:#1d4ed8;
  background:linear-gradient(135deg,#eff6ff,#fff);
}
.biometric-modal-card h3{
  margin:0;
  font-size:22px;
  color:#0f172a;
}
.biometric-modal-card p{
  margin:0;
  color:#475569;
  line-height:1.7;
}
.biometric-modal-card .btn{
  width:100%;
}
@media (max-width: 640px){
  .biometric-modal{
    padding:18px 14px;
    align-items:center;
    justify-items:center;
  }
  .biometric-modal-card{
    width:min(100%, 420px);
    max-width:calc(100vw - 28px);
    padding:20px 16px 16px;
    border-radius:22px;
    gap:10px;
  }
  .biometric-modal-icon{
    width:78px;
    height:78px;
    border-radius:24px;
  }
  .biometric-modal-card h3{
    font-size:18px;
    line-height:1.35;
  }
  .biometric-modal-card p{
    font-size:13px;
    line-height:1.75;
  }
  .biometric-modal-card .btn{
    min-height:48px;
    border-radius:14px;
  }
}
@media (max-width: 380px){
  .biometric-modal{
    padding:12px;
  }
  .biometric-modal-card{
    max-width:calc(100vw - 24px);
    padding:18px 14px 14px;
  }
  .biometric-modal-icon{
    width:72px;
    height:72px;
  }
  .biometric-modal-card h3{
    font-size:17px;
  }
}
.auth-mode-biometric .auth-form label[for="password"],
.auth-mode-biometric .auth-password-wrap,
.auth-mode-biometric .auth-remember,
.auth-mode-biometric .auth-submit,
.auth-mode-biometric .auth-oauth-sep,
.auth-mode-biometric .auth-google-btn,
.auth-mode-biometric #pwaInstallBtn{
  display:none !important;
}
.auth-mode-normal .auth-biometric-shell{
  display:none;
}
.auth-passkey-btn.is-loading{
  opacity:.7;
  pointer-events:none;
}
@media (max-width: 640px){
  .auth-page{
    place-items:start center;
    padding:16px 0;
  }
  .auth-shell{
    width:min(460px, calc(100vw - 24px));
  }
  .auth-panel{padding:20px;border-radius:20px;}
  .auth-brand h1{font-size:26px;}
  .biometric-copy h2{font-size:24px;}
}
.install-card{width:760px;max-width:96vw;}
.install-section{margin-top:16px;display:grid;gap:10px;}
.install-reqs{display:grid;gap:8px;}
.install-req{display:grid;grid-template-columns:1fr auto;gap:6px;align-items:center;padding:10px 12px;border:1px solid #e5e7eb;border-radius:12px;background:#f8fafc;}
.install-req.ok{border-color:#bbf7d0;background:#f0fdf4;}
.install-req.bad{border-color:#fecaca;background:#fef2f2;}
.install-req-main{font-weight:700;color:#0f172a;}
.install-req-value{font-size:12px;color:#334155;}
.install-req-help{grid-column:1/-1;font-size:12px;color:#64748b;}
.install-steps{margin:0;padding:0 18px 0 0;display:grid;gap:6px;color:#334155;font-size:13px;}
.install-logs{display:grid;gap:6px;}
.install-log{padding:8px 10px;border:1px dashed #d1d5db;border-radius:10px;background:#fff;font-size:12px;color:#334155;}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.modal.show { display: flex; }
.force-profile-modal{
  z-index: 1200;
  background: rgba(15, 23, 42, 0.58);
}
.force-profile-modal .modal-card{
  width: 560px;
  max-width: 96vw;
}
.force-profile-modal .modal-head{
  margin-bottom: 6px;
}
.profile-locked{
  overflow:hidden;
}
.profile-guard-mask{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.38);
  backdrop-filter:grayscale(1) blur(2px);
  z-index:1100;
  pointer-events:auto;
}
.profile-locked .force-profile-modal{
  background:transparent;
}
.profile-locked .force-profile-modal .modal-card{
  box-shadow:0 20px 48px rgba(15,23,42,.28);
}
.profile-locked .toast{
  z-index:1301;
}
.profile-lock-card{
  position:relative;
  z-index:1;
}
.profile-lock-skeleton-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:10px;
  margin-top:10px;
}
.profile-lock-skeleton{
  height:84px;
  border-radius:12px;
  background:linear-gradient(90deg,#e5e7eb 0%,#f1f5f9 50%,#e5e7eb 100%);
  background-size:200% 100%;
  animation:profileLockPulse 1.4s linear infinite;
}
@keyframes profileLockPulse{
  0%{background-position:200% 0}
  100%{background-position:-200% 0}
}
@media (max-width: 680px){
  .profile-lock-skeleton-grid{
    grid-template-columns:1fr;
  }
}
.modal-card {
  width: 520px;
  max-width: 96vw;
  background: #fff;
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 20px;
}
#detailModal,
#pmBreakdownModal{
  padding:10px;
}
.modal-card.modal-lg { width: 720px; }
.modal-card { max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; }
.modal-body { overflow: auto; }
.modal-body { display: grid; gap: 16px; }
.form-section {
  border: 1px solid #eef2f7;
  background: #f9fbff;
  border-radius: 16px;
  padding: 14px;
}
.acl-shell{
  display:grid;
  gap:14px;
}
.acl-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.acl-search{
  flex:1 1 280px;
  max-width:420px;
}
.acl-search input{
  border-radius:12px;
  background:#fff;
}
.acl-filters{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.acl-filter{
  border:1px solid #dbe3ef;
  background:#fff;
  color:#475569;
  border-radius:999px;
  padding:6px 12px;
  font-family:inherit;
  font-size:12px;
  cursor:pointer;
}
.acl-filter.active{
  border-color:#2563eb;
  color:#1d4ed8;
  background:#eff6ff;
}
.acl-role-actions{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:10px;
}
.acl-role-action{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:12px;
  padding:8px 10px;
}
.acl-role-action span{
  font-weight:700;
  color:#334155;
}
.acl-mini{
  height:32px;
  padding:6px 10px;
  border-radius:10px;
  font-size:12px;
}
.acl-mini.ghost{
  background:#fff;
  color:#475569;
}
.acl-board{
  border:1px solid #dbe3ef;
  border-radius:14px;
  background:#fff;
  overflow:hidden;
}
.acl-board-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  padding:10px 12px;
  background:#f8fafc;
  border-bottom:1px solid #e5e7eb;
}
.acl-board-title{
  font-weight:800;
  color:#0f172a;
}
.acl-category-tools{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.acl-table-wrap{
  width:100%;
  overflow:auto;
}
.acl-table{
  width:100%;
  min-width:760px;
  border-collapse:collapse;
}
.acl-table th,
.acl-table td{
  border-bottom:1px solid #edf2f7;
  padding:10px 8px;
  text-align:center;
  font-size:13px;
  vertical-align:middle;
}
.acl-table thead th{
  background:#f8fafc;
  color:#334155;
  font-weight:700;
}
.acl-col-index{
  width:56px;
}
.acl-col-desc{
  width:280px;
  color:#64748b;
  font-size:12px;
}
.acl-title-cell{
  text-align:right;
  font-weight:700;
  color:#0f172a;
}
.acl-role-col{
  width:96px;
}
.acl-switch{
  position:relative;
  display:inline-flex;
  width:44px;
  height:24px;
  cursor:pointer;
}
.acl-switch input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.acl-switch-ui{
  width:44px;
  height:24px;
  border-radius:999px;
  background:#e5e7eb;
  border:1px solid #d1d5db;
  position:relative;
  transition:.2s ease;
}
.acl-switch-ui::after{
  content:"";
  position:absolute;
  top:2px;
  right:2px;
  width:18px;
  height:18px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 4px rgba(15,23,42,0.25);
  transition:.2s ease;
}
.acl-switch input:checked + .acl-switch-ui{
  background:#2563eb;
  border-color:#2563eb;
}
.acl-switch input:checked + .acl-switch-ui::after{
  right:22px;
}
.acl-table-row:hover{
  background:#fafcff;
}
@media (max-width:900px){
  .acl-toolbar{
    align-items:stretch;
  }
  .acl-search{
    max-width:none;
  }
  .acl-role-action{
    flex-wrap:wrap;
    justify-content:flex-start;
  }
}
@media (max-width:640px){
  .acl-table{
    min-width:680px;
  }
  .acl-col-desc{
    width:220px;
  }
}
.section-title { font-weight: 700; margin-bottom: 10px; color: #0f172a; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid label { display: grid; gap: 6px; }
.form-switch { align-items: center; gap: 10px; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 10px; }
.role-tile {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 14px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.role-tile input { width: auto; margin: 0; }
.role-tile:hover { border-color: #c7d2fe; box-shadow: 0 6px 18px rgba(37,99,235,0.08); }
.agreement-access-form{display:grid;grid-template-rows:minmax(0,1fr) auto;gap:18px;min-height:0}
.agreement-access-modal-card{width:min(980px,96vw);padding:22px;max-height:88vh;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden}
.agreement-access-modal-card .modal-head{margin-bottom:0;padding-bottom:8px;border-bottom:1px solid #eef2f7}
.agreement-access-layout{display:grid;grid-template-columns:1fr;gap:16px;align-items:stretch;min-height:0;padding-bottom:10px}
.agreement-access-panel{display:grid;gap:14px;align-content:start;min-height:0}
.agreement-access-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}
.agreement-access-picker-inline{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end}
.agreement-access-picker-shell{position:relative}
.agreement-access-combobox{position:relative}
.agreement-access-combobox-trigger{width:100%;min-height:52px;border:1px solid #dbe3ef;border-radius:16px;background:#fff;padding:0 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;font:inherit;color:#0f172a;cursor:pointer;box-shadow:inset 0 1px 0 rgba(255,255,255,.6)}
.agreement-access-combobox.is-open .agreement-access-combobox-trigger{border-color:#93c5fd;box-shadow:0 0 0 3px #eef4ff}
.agreement-access-combobox-caret{color:#64748b;font-size:16px;line-height:1}
.agreement-access-combobox-panel{position:absolute;top:calc(100% + 8px);right:0;left:0;z-index:30;border:1px solid #dbe3ef;border-radius:18px;background:#fff;box-shadow:0 16px 35px rgba(15,23,42,.12);padding:12px}
.agreement-access-combobox-search input{height:44px}
.agreement-access-options{margin-top:10px;max-height:260px;overflow:auto;display:grid;gap:8px;padding-left:2px}
.agreement-access-option{width:100%;border:1px solid #e5e7eb;border-radius:14px;background:#fff;padding:10px 12px;display:grid;gap:4px;text-align:right;font:inherit;cursor:pointer;color:#0f172a}
.agreement-access-option:hover{border-color:#93c5fd;background:#f8fbff}
.agreement-access-option.is-active{border-color:#2563eb;background:#eff6ff}
.agreement-access-option-name{font-weight:700}
.agreement-access-option-role{font-size:12px;color:#64748b}
.agreement-access-option-empty{padding:14px 12px;border:1px dashed #dbe3ef;border-radius:14px;color:#64748b;background:#f8fafc}
.agreement-access-count{white-space:nowrap}
.agreement-access-table{border-radius:16px;overflow:hidden;display:grid;min-height:0}
.agreement-access-table .thead.columns-3,
.agreement-access-table .row.columns-3{grid-template-columns:1.6fr 1.1fr 84px;align-items:center}
.agreement-access-selected-list{display:grid;max-height:min(46vh, 420px);overflow:auto;padding-bottom:12px}
.agreement-access-row{padding:10px 12px}
.agreement-access-row .user-name{font-weight:700;color:#0f172a}
.agreement-access-row .status-col{line-height:1.8}
.agreement-access-row .ops{justify-self:end}
.agreement-access-empty{padding:14px 12px;color:#64748b}
.agreement-access-remove-btn{color:#b91c1c;background:#fff}
.agreement-access-remove-btn:hover{background:#fef2f2;border-color:#fecaca}
.agreement-access-modal-actions{position:relative;background:#fff;padding-top:10px;padding-bottom:2px;border-top:1px solid #eef2f7;z-index:2}
.agreement-team-table .thead.columns-8,
.agreement-team-table .row.columns-8{grid-template-columns:1.2fr 1fr 1.4fr 1fr 1.1fr 1.1fr 1fr 1fr}
@media (max-width: 640px){
  .agreement-access-modal-card{padding:16px;border-radius:18px}
  .agreement-access-picker-inline{grid-template-columns:1fr}
  .agreement-access-table .thead.columns-3,
  .agreement-access-table .row.columns-3{grid-template-columns:1.3fr 1fr 70px}
  .agreement-access-combobox-panel{left:auto}
}
.role-title { font-weight: 600; color: #111827; }
.modal-actions-sticky {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding-top: 8px;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.icon-btn { border: none; background: #f3f4f6; width: 36px; height: 36px; border-radius: 10px; cursor: pointer; }
.role-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.role-box { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; display: flex; gap: 8px; align-items: center; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-start; }
.period-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.period-grid { align-items: stretch; }
.period-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 16px; display: grid; gap: 10px; box-shadow: var(--shadow); }
.period-head { display: flex; justify-content: space-between; align-items: center; }
.period-title { font-weight: 700; font-size: 18px; }
.period-dates { color: #6b7280; font-size: 13px; }
.team-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.team-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 16px; display: grid; gap: 12px; box-shadow: var(--shadow); }
.team-head { display: flex; justify-content: space-between; align-items: center; }
.team-title { font-weight: 700; font-size: 16px; }
.team-roles { display: grid; gap: 8px; }
.role-row { display: flex; gap: 8px; align-items: center; }
.tag { padding: 4px 10px; border-radius: 999px; font-size: 12px; }
.tag.pm { background: #eff6ff; color: #1d4ed8; }
.tag.lead { background: #ecfdf3; color: #166534; }
.team-members { border-top: 1px dashed #e5e7eb; padding-top: 10px; display: grid; gap: 8px; }
.members-title { font-size: 12px; color: #6b7280; }
.member-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.member-chip { background: #f8fafc; border: 1px solid #e5e7eb; padding: 4px 10px; border-radius: 999px; font-size: 12px; }
.preview-box {
  border: 1px dashed #d1d5db;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
}
.preview-row { display: flex; align-items: center; gap: 8px; }
.text-btn { background: transparent; border: none; color: #2563eb; cursor: pointer; font-weight: 600; }
.text-btn.danger { color: #ef4444; }
.member-select { display: grid; gap: 6px; grid-template-columns: 1fr 1fr; }
.member-item { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; display: flex; gap: 8px; align-items: center; }
.member-item { align-items: flex-start; }
.member-item input { margin-top: 4px; }
.member-info { display: grid; gap: 4px; }
.member-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.member-card { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 14px; padding: 12px; text-decoration: none; color: #0f172a; display: grid; gap: 6px; }
.member-card:hover { border-color: #bfdbfe; box-shadow: var(--shadow); }
.member-name { font-weight: 700; }
.member-card > .subnote { text-align: center; }
.member-card-actions { gap: 8px; }
.member-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
@media (max-width: 1400px){
  .member-grid{grid-template-columns:repeat(3, minmax(0, 1fr));}
}
@media (max-width: 1080px){
  .member-grid{grid-template-columns:repeat(2, minmax(0, 1fr));}
}
.member-incident-link { white-space: nowrap; font-size: 12px; padding: 6px 10px; border-radius: 10px; }
.member-score-link { display: block; text-align: center; text-decoration: none; padding-top: 2px; }
.member-score-link:hover { color: #1d4ed8; }
.home-tile-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;}
.home-tile{background:#f8fafc;border:1px solid #e5e7eb;border-radius:14px;padding:12px;text-decoration:none;color:#0f172a;display:grid;gap:6px;}
.home-tile:hover{border-color:#bfdbfe;box-shadow:var(--shadow);}
.home-tile-title{font-weight:700;}
.home-tile > .subnote { text-align: center; }
.member-table .thead, .member-table .row { grid-template-columns: 70px minmax(140px, 1fr) minmax(140px, 1.6fr); }
.member-table .thead { padding: 8px 12px; font-size: 12px; }
.member-table .row { cursor: pointer; padding: 8px 12px; }
.member-table { max-height: 320px; overflow: auto; }
.member-table .role-chip { padding: 2px 8px; font-size: 11px; }
.member-table input[type="checkbox"] { width: auto; }
.profile-layout{display:grid;grid-template-columns:220px 1fr;gap:16px;margin-top:12px;}
.profile-menu{display:grid;gap:8px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:14px;padding:10px;height:fit-content;}
.profile-tab{
  border:1px solid transparent;
  background:#fff;
  padding:10px 12px;
  border-radius:10px;
  cursor:pointer;
  font-weight:600;
  color:#334155;
  text-align:right;
  font-family:inherit;
  font-size:var(--fs-tabs,15px);
  line-height:1.6;
}
.profile-tab.active{background:#eef2ff;border-color:#c7d2fe;color:#1d4ed8;}
.profile-panels{background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:14px;}
.profile-panel{display:none;}
.profile-panel.active{display:block;}
.profile-form{display:grid;gap:14px;}
.profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.profile-grid label{display:grid;gap:6px;align-content:start;}
.profile-grid input,.profile-grid textarea{width:100%;}
.profile-field-bio{grid-column:1/-1;}
.profile-grid-single{grid-template-columns:1fr;}
.password-field{display:flex;align-items:center;gap:8px;}
.password-field input{flex:1;}
.pass-toggle{width:36px;height:36px;border:1px solid #e5e7eb;background:#f8fafc;border-radius:10px;font-size:16px;line-height:1;}
.pass-toggle{position:relative;display:inline-flex;align-items:center;justify-content:center;}
.pass-toggle svg{width:18px;height:18px;stroke:#334155;}
.pass-toggle .eye-slash{position:absolute;width:18px;height:2px;background:#334155;transform:rotate(-35deg);opacity:0;transition:opacity .15s;}
.pass-toggle.show .eye-slash{opacity:1;}
.password-meter{height:8px;border-radius:999px;background:#e5e7eb;margin-top:6px;overflow:hidden;}
.password-meter-bar{height:100%;width:0;background:#f59e0b;transition:width .2s;}
.password-meter-bar.mid{background:#f59e0b;}
.password-meter-bar.strong{background:#16a34a;}
.password-meter-bar.weak{background:#ef4444;}
.password-meter-text{font-size:12px;color:#64748b;margin-top:4px;}
.field-error{font-size:12px;color:#b91c1c;margin-top:4px;}
.profile-avatar{display:grid;grid-template-columns:120px 1fr;gap:14px;align-items:center;border:1px dashed #e5e7eb;border-radius:14px;padding:12px;background:#f8fafc;}
.profile-avatar img{width:96px;height:96px;border-radius:16px;object-fit:cover;border:1px solid #e5e7eb;background:#fff;}
.passkey-card{margin-top:14px;padding:14px;border-radius:14px;border:1px solid #e5e7eb;background:#f8fafc;display:grid;gap:12px;}
.passkey-card .card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;}
.passkey-list{display:grid;gap:10px;}
.passkey-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid #e5e7eb;border-radius:12px;background:#fff;}
.passkey-item strong{display:block;color:#0f172a;}
.passkey-item .muted{font-size:12px;}
.passkey-item .btn{white-space:nowrap;}
@media (max-width:640px){
  .passkey-item{flex-direction:column;align-items:stretch;}
  .passkey-item .btn{width:100%;}
}
@media (max-width:900px){
  .profile-layout{grid-template-columns:1fr;}
  .profile-grid{grid-template-columns:1fr;}
  .profile-avatar{grid-template-columns:1fr;}
}
.team-form { display: grid; gap: 14px; }
.team-form-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.team-form-grid label { display: grid; gap: 6px; }
.member-card input { margin-left: 6px; }
.jalali-picker { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.jalali-datetime-picker{
  position:relative;
  width:100%;
  direction:rtl;
}
.jdp-trigger{
  width:100%;
  min-height:52px;
  border-radius:16px;
  border:1px solid #dbe3ef;
  background:#fff;
  box-shadow:inset 0 1px 1px rgba(15,23,42,.04);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 14px;
  font-family:inherit;
  font-size:14px;
  color:#0f172a;
  text-align:right;
  cursor:pointer;
}
.jdp-trigger:focus{
  outline:none;
  border-color:#c7d2fe;
  box-shadow:0 0 0 3px #eef2ff;
}
.jdp-trigger-text{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight:600;
}
.jdp-trigger-arrow{
  width:8px;
  height:8px;
  border-right:2px solid #64748b;
  border-bottom:2px solid #64748b;
  transform:rotate(45deg);
  margin-top:-4px;
  flex:0 0 auto;
  transition:transform .2s ease;
}
.jalali-datetime-picker.open .jdp-trigger-arrow{
  transform:rotate(225deg);
  margin-top:2px;
}
.jdp-panel{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  width:min(300px, 100vw - 32px);
  background:#fff;
  border:1px solid #dbe3ef;
  border-radius:14px;
  box-shadow:0 16px 40px rgba(15,23,42,.16);
  padding:10px;
  z-index:3000;
}
.jdp-panel[hidden]{
  display:none !important;
}
.jdp-tabs{
  display:flex;
  gap:6px;
  margin-bottom:8px;
  padding-bottom:8px;
  border-bottom:1px solid #edf2f7;
}
.jdp-tab{
  flex:1;
  border:1px solid #dbe3ef;
  background:#f8fafc;
  color:#334155;
  border-radius:10px;
  min-height:34px;
  font-family:inherit;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
}
.jdp-tab.active{
  background:#e8efff;
  border-color:#93c5fd;
  color:#1d4ed8;
}
.jdp-tab-pane{
  display:none;
}
.jdp-tab-pane.active{
  display:block;
}
.jdp-cal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}
.jdp-cal-nav{
  display:flex;
  align-items:center;
  gap:6px;
}
.jdp-month-name,
.jdp-year-name{
  min-width:74px;
  text-align:center;
  font-size:14px;
  font-weight:700;
  color:#0f172a;
}
.jdp-year-name{
  min-width:52px;
}
.jdp-nav-btn{
  width:30px;
  height:30px;
  border:1px solid #dbe3ef;
  border-radius:8px;
  background:#f8fafc;
  color:#334155;
  font-size:20px;
  line-height:1;
  cursor:pointer;
}
.jdp-nav-btn:hover{
  background:#eef2ff;
  border-color:#bfdbfe;
}
.jdp-weekdays{
  display:grid;
  grid-template-columns:repeat(7, 1fr);
  gap:3px;
  margin-bottom:6px;
}
.jdp-weekdays span{
  text-align:center;
  font-size:11px;
  font-weight:600;
  color:#475569;
  line-height:1.8;
  white-space:nowrap;
}
.jdp-weekdays .is-weekend{
  color:#ef4444;
}
.jdp-days{
  display:grid;
  grid-template-columns:repeat(7, 1fr);
  gap:3px;
}
.jdp-day{
  border:1px solid transparent;
  border-radius:10px;
  min-height:30px;
  background:transparent;
  color:#334155;
  font-family:inherit;
  font-size:12px;
  cursor:pointer;
}
.jdp-day:hover{
  background:#eff6ff;
}
.jdp-day.today{
  border-color:#bfdbfe;
  color:#1d4ed8;
}
.jdp-day.active{
  background:#3b82f6;
  color:#fff;
  border-color:#3b82f6;
  font-weight:700;
}
.jdp-day-blank{
  pointer-events:none;
}
.jdp-foot{
  margin-top:10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.jdp-foot-btn{
  border:0;
  border-radius:10px;
  min-height:34px;
  padding:0 12px;
  font-family:inherit;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
}
.jdp-clear-btn{
  background:#e2e8f0;
  color:#334155;
}
.jdp-today-btn{
  background:#60a5fa;
  color:#fff;
}
.jdp-time-wrap{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.jdp-time-wrap label{
  display:grid;
  gap:6px;
  color:#334155;
  font-size:13px;
  font-weight:700;
}
.jdp-time-wrap label span{
  text-align:right;
}
.jdp-time-wrap select{
  min-height:38px;
  border-radius:10px;
  border:1px solid #dbe3ef;
  background:#fff;
  font-size:13px;
  text-align:center;
}
@media (max-width: 768px){
  .jdp-panel{
    width:min(320px, calc(100vw - 28px));
    right:auto;
    left:0;
  }
}
.history-grid { display: grid; gap: 16px; }
.history-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
.history-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.history-head.center { justify-content: center; gap: 12px; }
.history-meta { display: flex; justify-content: space-between; color: #6b7280; font-size: 13px; margin-bottom: 10px; }
.history-title { font-weight: 700; }
.history-final { font-weight: 700; color: #1d4ed8; }
.history-table .thead, .history-table .row { grid-template-columns: minmax(150px,2fr) minmax(54px,.55fr) 1fr 1fr .95fr .95fr; }
.history-table .thead { background: #f8fafc; }
.history-total { font-weight: 700; background: #f8fafc; }
.detail-section { display: grid; gap: 12px; }
.detail-head { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; text-align: right; direction: rtl; }
.detail-head.detail-head-right { justify-content: flex-end; }
.detail-final { color: #1d4ed8; font-weight: 700; }
.detail-head select { min-width: 180px; max-width: 220px; }
.detail-grid { display: grid; grid-template-columns: minmax(0,2.1fr) minmax(260px,1fr); gap: 12px; direction: ltr; }
.detail-table, .detail-radar { direction: rtl; }
.detail-radar { border: 1px solid var(--border); border-radius: 16px; padding: 8px; background: #fff; min-height: 340px; display:grid; grid-template-rows:auto 1fr; }
.detail-radar h4 { margin: 0 0 10px 0; font-size: 14px; }
.detail-radar .echarts-radar-chart{height:100%; min-height:300px;}
.detail-radar:fullscreen .echarts-radar-chart,
.detail-radar:-webkit-full-screen .echarts-radar-chart{height:calc(100vh - 120px); min-height:420px;}
.suggestion-box{margin-top:10px;border-top:1px solid #e2e8f0;padding-top:10px;}
.suggestion-box h5{margin:0 0 8px 0;font-size:14px;color:#0f172a;}
.suggestion-list{display:grid;gap:8px;}
.suggestion-item{border:1px solid #dbe3ef;border-radius:10px;padding:8px 10px;background:#fff;}
.suggestion-item.high{border-color:#fecaca;background:#fff7f7;}
.suggestion-item.medium{border-color:#fde68a;background:#fffbeb;}
.suggestion-item.low{border-color:#bbf7d0;background:#f0fdf4;}
.suggestion-title{font-size:13px;font-weight:700;margin-bottom:4px;color:#0f172a;}
.suggestion-text{font-size:12px;color:#334155;line-height:1.8;}
.kpi-weight-col{padding-left:4px;padding-right:4px;}
.pm-breakdown-mobile-action{display:none;}
@media (max-width: 1024px) {
  .shell { grid-template-columns: 1fr; min-height:auto; }
  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(86vw, 320px);
    height: 100vh;
    z-index: 1200;
    border-left: 1px solid var(--border);
    border-bottom: 0;
    transform: translateX(110%);
    transition: transform .22s ease;
    overflow: auto;
    box-shadow: 0 20px 50px rgba(15,23,42,.18);
  }
  html.mobile-nav-open .sidebar { transform: translateX(0); }
  .sidebar-toggle{display:none;}
  .mobile-sidebar-toggle{display:inline-flex;align-items:center;justify-content:center;}
  .mobile-sidebar-toggle svg{width:18px;height:18px;stroke:#334155;}
  .sidebar-backdrop{
    display:block;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 1100;
  }
  html.mobile-nav-open .sidebar-backdrop{opacity:1;pointer-events:auto;}
  .nav-list { grid-template-columns: 1fr; }
  .main { padding: 14px 12px 30px; }
  .topbar{position:sticky;top:0;z-index:1000;}
  .topbar-user .roles{display:none;}
  .topbar-user .welcome{font-size:13px;max-width:42vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .grid-2 { grid-template-columns: 1fr; }
  .kpi-table .thead, .kpi-table .row { grid-template-columns: 1fr 1fr; }
  .score-table .thead, .score-table .row { grid-template-columns: 1fr 1fr; }
  .kpi-item { grid-template-columns: 1fr; }
  .font-grid { grid-template-columns: 1fr; }
  .member-select { grid-template-columns: 1fr; }
  .kpi-sticky-bar { top: 10px; flex-direction: column; align-items: stretch; }
  .team-form-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; direction: rtl; }
  .form-grid { grid-template-columns: 1fr; }
  .monitoring-hero{grid-template-columns:1fr;gap:14px;}
  .monitoring-stats{grid-template-columns:repeat(2, minmax(0, 1fr));}
  .monitoring-grid{grid-template-columns:1fr;}
  .monitoring-bottom-grid{grid-template-columns:1fr;}
  .monitoring-agreement-card{padding:14px;}
  .monitoring-agreement-head{flex-direction:column;align-items:flex-start;}
  .monitoring-agreement-chart{height:300px !important; min-height:300px;}
  .monitoring-agreement-project-rack{height:360px;}
  .monitoring-project-bar{width:64px;min-width:64px;}
  .monitoring-rank-grid{grid-template-columns:1fr;}
  .monitoring-drill-summary{grid-template-columns:repeat(2, minmax(0, 1fr));}
  .monitoring-drill-stats{grid-template-columns:repeat(2, minmax(0, 1fr));}
  .monitoring-drill-table .thead,
  .monitoring-drill-table .row{grid-template-columns: 60px 1.8fr 1fr 80px 80px 90px;}
  .monitoring-chart{height:260px;min-height:220px;}
  .monitoring-chart-sm{height:240px;}
  .perf-toolbar{
    flex-wrap:wrap;
  }
  .perf-toolbar-fields{
    width:100%;
  }
  .perf-toolbar-fields select{
    min-width:0;
    width:100%;
  }
  .perf-toolbar-tabs{
    width:100%;
    order:3;
  }
  .perf-toolbar-actions{
    margin-inline-start:auto;
  }
}

@media (max-width: 768px){
  .page-head{flex-direction:column;align-items:flex-start;gap:8px;margin:12px 0 10px;}
  .score-page .page-head{align-items:center;text-align:center;}
  .score-page .page-head h1{width:100%;text-align:center;}
  .cards{grid-template-columns:1fr;gap:10px;}
  .history-head{flex-direction:column;align-items:flex-start;gap:8px;}
  .member-grid{grid-template-columns:1fr;}
  .member-card-head{flex-wrap:wrap;}
  .member-incident-link{width:100%;text-align:center;}
  .monitoring-hero{padding:16px;}
  .monitoring-hero h1{font-size:24px;}
  .monitoring-filters{padding:12px;}
  .monitoring-stats{grid-template-columns:1fr;}
  .monitoring-agreement-chart{height:260px !important; min-height:260px;}
  .monitoring-agreement-project-rack{height:320px;gap:10px;}
  .monitoring-project-bar{width:58px;min-width:58px;}
  .monitoring-project-label{font-size:10px;min-height:48px;}
  .monitoring-drill-head{flex-direction:column;align-items:stretch;}
  .monitoring-drill-head h2{font-size:22px;}
  .monitoring-drill-summary{grid-template-columns:1fr;}
  .monitoring-drill-stats{grid-template-columns:1fr;}
  .monitoring-drill-chart{height:320px;min-height:260px;}
  .monitoring-drill-table .thead{display:none;}
  .monitoring-drill-table .row{
    grid-template-columns:1fr !important;
    gap:8px;
    padding:10px 12px;
  }
  .monitoring-drill-table .row > div{
    display:flex;
    justify-content:space-between;
    gap:10px;
  }
  .monitoring-drill-table .row > div::before{
    content:attr(data-label);
    color:#64748b;
    font-size:12px;
    font-weight:700;
  }
  .monitoring-chart{height:240px;min-height:200px;}
  .monitoring-chart-sm{height:220px;}
  .monitoring-rank-row{padding:9px 10px;}
  .perf-hero-compact{
    padding:14px 16px;
  }
  .perf-hero-compact h1{
    font-size:20px;
  }
  .perf-toolbar{
    padding:10px 12px;
  }
  .perf-toolbar-fields{
    flex-direction:column;
    align-items:stretch;
  }
  .perf-toolbar-actions{
    width:100%;
  }
  .perf-toolbar-actions .btn{
    flex:1 1 0;
    justify-content:center;
  }
  .agreement-team-table{
    overflow:visible;
    border:0;
    background:transparent;
  }
  .agreement-team-table .thead{
    display:none;
  }
  .agreement-team-table .row{
    grid-template-columns:1fr !important;
    gap:8px;
    padding:10px 12px;
    margin-bottom:10px;
    border:1px solid #e5e7eb;
    border-radius:14px;
    background:#fff;
    box-shadow:0 1px 0 rgba(15,23,42,.02);
  }
  .agreement-team-table .row > div{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:10px;
    min-width:0;
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
    text-align:right;
    line-height:1.55;
    font-size:12px;
    padding:5px 0;
    border-bottom:1px dashed #eef2f7;
  }
  .agreement-team-table .row > div:last-child{
    border-bottom:0;
  }
  .agreement-team-table .row > div::before{
    color:#64748b;
    font-size:11px;
    font-weight:600;
    flex:0 0 auto;
    white-space:nowrap;
  }
  .agreement-team-table .row > div:nth-child(1)::before{content:"پروژه / برنامه";}
  .agreement-team-table .row > div:nth-child(2)::before{content:"مدیر محصول";}
  .agreement-team-table .row > div:nth-child(3)::before{content:"اعضای پروژه";}
  .agreement-team-table .row > div:nth-child(4)::before{content:"ارشدهای تیم";}
  .agreement-team-table .row > div:nth-child(5)::before{content:"انتظارات";}
  .agreement-team-table .row > div:nth-child(6)::before{content:"KRها";}
  .agreement-team-table .row > div:nth-child(7)::before{content:"یادداشت";}
  .agreement-team-table .row > div:nth-child(8)::before{content:"امتیاز / ارزش";}
  .agreement-team-table .row > div:nth-child(1){
    font-weight:700;
    font-size:13px;
  }
  .agreement-head{flex-direction:column;align-items:flex-start;gap:6px;}
  .agreement-split{grid-template-columns:1fr;gap:10px;}
  .agreement-list-2col{grid-template-columns:1fr;}
  .detail-head{justify-content:flex-start;align-items:flex-start;gap:8px;}
  .detail-head select{min-width:100%;max-width:100%;}
  .chart-toolbar{width:100%;justify-content:flex-start;}
  .month-control{width:100%;}
  .month-control .month-range{width:100%;}
  .home-tile-grid{grid-template-columns:1fr;}
  .agreement-mini-table .amt-head > div,
  .agreement-mini-table .amt-row > div{font-size:11px;padding:7px 8px;}
  .agreement-section .agreement-block.table-view .agreement-mini-table{
    overflow:visible;
    border:0;
    background:transparent;
    border-radius:0;
  }
  .agreement-section .agreement-block.table-view .agreement-mini-table .amt-head{
    display:none;
  }
  .agreement-section .agreement-block.table-view .agreement-mini-table .amt-row{
    min-width:0;
    grid-template-columns:1fr !important;
    border:1px solid #e2e8f0;
    border-radius:12px;
    background:#fff;
    padding:6px 8px;
    margin-bottom:8px;
  }
  .agreement-section .agreement-block.table-view .agreement-mini-table .amt-row > div{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
    font-size:12px;
    line-height:1.45;
    border-bottom:1px dashed #eef2f7;
    padding:6px 2px;
    text-align:right;
  }
  .agreement-section .agreement-block.table-view .agreement-mini-table .amt-row > div::before{
    content: attr(data-label);
    color:#64748b;
    font-size:11px;
    font-weight:600;
    flex:0 0 auto;
  }
  .agreement-section .agreement-block.table-view .agreement-mini-table .amt-row > div:last-child{
    border-bottom:0;
  }
  .agreement-section .agreement-block.table-view .agreement-mini-table .amt-row.amt-sum{
    background:#eef2ff;
    border-color:#c7d2fe;
  }
  .agreement-section .agreement-block.table-view .agreement-mini-table .amt-row .amt-empty{
    display:none;
  }
  .performance-page .chart-card{padding:10px;}
  .performance-page .chart-head{
    flex-direction:column;
    align-items:stretch;
    gap:8px;
    direction:rtl;
    text-align:right;
  }
  .performance-page .chart-toolbar.compact{justify-content:flex-start;flex-wrap:wrap;gap:6px;}
  .performance-page .tool-popover{right:0;left:auto;max-width:calc(100vw - 26px);}
  .performance-page .chart-card canvas{height:190px;min-height:170px;}
  .performance-page .ag-trend-chart{height:210px;min-height:190px;}
  .performance-page .echarts-trend-chart{height:210px;min-height:190px;}
  .performance-page .detail-radar{min-height:260px;}
  .performance-page .detail-radar .echarts-radar-chart{min-height:240px;}
  .performance-page .suggestion-box h5{font-size:13px;}
  .performance-page .suggestion-text{font-size:12px;}
  .performance-page .detail-head{
    direction:rtl;
    text-align:right;
    align-items:stretch;
    justify-content:flex-end;
  }
  .performance-page .detail-head > h3,
  .performance-page .detail-head > .detail-final,
  .performance-page .detail-head > .muted{
    width:100%;
    text-align:right;
  }
  .performance-page .detail-head > .muted{font-size:12px;}
  .performance-page .detail-head select{
    width:100%;
    text-align:right;
    direction:rtl;
  }
  .performance-page .detail-table .history-table .thead{display:none;}
  .performance-page .detail-table #historyRows{display:grid;gap:8px;}
  .pm-breakdown-mobile-action{display:block;margin-top:8px;}
  .pm-breakdown-mobile-action .btn{width:100%;}
  .performance-page .perf-mobile-card{
    background:#fff;
    border:1px solid #e2e8f0;
    border-radius:12px;
    padding:8px 10px;
    display:grid;
    gap:6px;
  }
  .performance-page .perf-mobile-row{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
    border-bottom:1px dashed #eef2f7;
    padding-bottom:6px;
    direction:rtl;
    text-align:right;
  }
  .performance-page .perf-mobile-row:last-child{border-bottom:0;padding-bottom:0;}
  .performance-page .perf-mobile-row > span{
    color:#64748b;
    font-size:11px;
    flex:0 0 auto;
    text-align:right;
  }
  .performance-page .perf-mobile-row > strong{
    font-size:12px;
    font-weight:700;
    color:#0f172a;
    text-align:right;
    direction:rtl;
  }
  .performance-page .perf-mobile-summary{background:#f8fafc;border-color:#dbe3ef;}
  .performance-page .perf-mobile-final{background:#eef2ff;border-radius:8px;padding:6px;}
  .performance-page .perf-mobile-final > strong{color:#1d4ed8;}
  .score-page{
    direction:rtl;
    text-align:right;
  }
  .score-page .page-head{
    margin:10px 0;
  }
  .score-page .page-head h1{
    font-size:18px;
    line-height:1.7;
    margin:0;
  }
  .score-page .card{
    padding:12px;
    border-radius:14px;
  }
  .score-page .alert.warning .btn{
    margin-top:8px;
    margin-inline-start:0;
  }
  .score-page .score-meta{
    grid-template-columns:1fr;
    gap:8px;
  }
  .score-page .score-meta .meta-item{
    padding:9px 10px;
    gap:4px;
  }
  .score-page .score-meta .meta-item .value{
    font-size:16px;
  }
  .score-page .score-z{
    padding:10px;
    border-radius:12px;
  }
  .score-page .score-z .z-grid{
    grid-template-columns:1fr;
    gap:8px;
  }
  .score-page .score-z .z-title{
    font-size:13px;
    flex-wrap:wrap;
  }
  .score-page .score-z label{
    font-size:12px;
  }
  .score-page .z-notes-panel .z-notes-grid{
    grid-template-columns:1fr;
    gap:8px;
  }
  .score-page .z-note-group{
    padding:8px;
    border-radius:10px;
  }
  .score-page .z-note-text,
  .score-page .z-note-textarea{
    min-height:64px;
    font-size:12px;
    padding:7px 9px;
  }
  .score-page .score-table{
    border:0;
    background:transparent;
    box-shadow:none;
    overflow:visible;
  }
  .score-page .score-table .thead{
    display:none;
  }
  .score-page .score-table .row{
    display:block;
    margin-bottom:8px;
    padding:9px 10px;
    border:1px solid #dbe3ef;
    border-radius:12px;
    background:#fff;
  }
  .score-page .score-table .row > div{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:8px;
    border-bottom:1px dashed #eef2f7;
    padding:6px 0;
    text-align:right;
  }
  .score-page .score-table .thead > div + div,
  .score-page .score-table .row > div + div{
    border-inline-start:0;
    padding-inline-start:0;
  }
  .score-page .score-table .row > div:last-child{
    border-bottom:0;
    padding-bottom:0;
  }
  .score-page .score-table .row > div:empty{
    display:none;
  }
  .score-page .score-incidents-col-head{
    display:none;
  }
  .score-page .score-incident-tools{
    justify-content:flex-end;
    gap:7px;
  }
  .score-page .score-incident-btn{
    width:34px;
    height:34px;
    border-radius:11px;
  }
  .score-page .score-kpi-head{
    width:100%;
    align-items:flex-start;
    gap:8px;
  }
  .score-page .score-kpi-title{
    font-size:13px;
    line-height:1.8;
    flex:1 1 auto;
  }
  .modal.with-backdrop.score-incidents-modal.open{
    display:flex;
    align-items:flex-end;
    justify-content:center;
  }
  .modal.with-backdrop.score-incidents-modal .modal-card{
    width:100vw;
    max-width:100vw;
    min-height:92dvh;
    max-height:100dvh;
    margin:0;
    border-radius:18px 18px 0 0;
    border:0;
    padding:0;
  }
  .score-incidents-modal .modal-head{
    position:sticky;
    top:0;
    z-index:2;
    padding:10px 10px;
  }
  .score-incidents-modal .modal-title{
    font-size:14px;
    line-height:1.7;
  }
  .score-incidents-modal .modal-head .btn{
    min-height:32px;
    padding:0 10px;
    font-size:12px;
  }
  .modal.with-backdrop.score-incidents-modal .modal-body{
    flex:1 1 auto;
    max-height:none;
    min-height:0;
    padding:6px 6px calc(8px + env(safe-area-inset-bottom));
    display:block;
  }
  .score-page .score-incident-item{
    padding:8px 8px;
    border-radius:12px;
    gap:4px;
  }
  .score-page .score-incident-item-head{
    align-items:flex-start;
    gap:4px;
  }
  .score-page .score-incident-item-head strong{
    font-size:12px;
    line-height:1.5;
  }
  .score-page .score-incident-item-meta{
    font-size:10px;
    line-height:1.45;
  }
  .score-page .score-incident-item-body{
    font-size:11px;
    line-height:1.55;
  }
  .score-page .score-table:not(.admin-table) .row > div:nth-child(1)::before{content:'شاخص'; color:#64748b; font-size:11px;}
  .score-page .score-table:not(.admin-table) .row > div:nth-child(2)::before{content:'حداکثر امتیاز شما'; color:#64748b; font-size:11px;}
  .score-page .score-table:not(.admin-table) .row > div:nth-child(3)::before{content:'نمره شما'; color:#64748b; font-size:11px;}
  .score-page .score-table:not(.admin-table) .row > div:nth-child(4)::before{content:'نمره نهایی KPI'; color:#64748b; font-size:11px;}
  .score-page .score-table.admin-table .row:not(.section-row) > div:nth-child(1)::before{content:'عنوان'; color:#64748b; font-size:11px;}
  .score-page .score-table.admin-table .row:not(.section-row) > div:nth-child(2)::before{content:'مقدار'; color:#64748b; font-size:11px;}
  .score-page .score-table.admin-table .row:not(.section-row) > div:nth-child(3)::before{content:'خروجی'; color:#64748b; font-size:11px;}
  .score-page .score-table.admin-table .row:not(.section-row) > div:nth-child(4)::before{content:'نمره نهایی KPI'; color:#64748b; font-size:11px;}
  .score-page .score-table.admin-table .row.section-row{
    background:#f8fafc;
    border-color:#e2e8f0;
  }
  .score-page .score-table.admin-table .row.section-row > div{
    display:block;
    border:0;
    padding:0;
    font-weight:800;
  }
  .score-page .score-table.admin-table .row.section-row > div::before{
    content:none;
  }
  .score-page .score-table.admin-table .row .span-2{
    grid-column:auto;
    width:100%;
  }
  .score-page .score-table input[type="number"]{
    width:100%;
    min-height:36px;
    text-align:center;
  }
  .score-page .score-inputs{
    grid-template-columns:1fr 62px;
    gap:6px;
    width:100%;
  }
  .score-page .score-number{
    width:62px;
    min-height:32px;
  }
  .score-page .score-inputs .score-val{
    grid-column:1 / -1;
    justify-self:end;
    font-weight:700;
    font-size:12px;
  }
  .score-page .kpi-final{
    font-weight:700;
    min-width:42px;
    text-align:left;
    direction:ltr;
  }
  .score-page .inline{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
  }
  .score-page .inline .btn{
    width:100%;
    justify-content:center;
  }
  .score-page .final-score{
    font-size:14px;
    text-align:right;
  }
}
.kpi-item .icon-btn { justify-self: center; }

.summary-table .thead, .summary-table .row { grid-template-columns: 2fr 1.2fr 1fr 170px; }
.summary-table .row { align-items: center; }
.summary-table .user-username { color: #94a3b8; }
.summary-table .btn { height: 36px; }
.summary-table .ops { display: grid; gap: 6px; }
.summary-table.two-col .thead, .summary-table.two-col .row { grid-template-columns: 2fr 170px; }

.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.report-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); display: grid; gap: 12px; }
.report-head h3 { margin: 0 0 6px 0; font-size: 16px; }
.report-head p { margin: 0; color: var(--muted); font-size: 13px; }
.report-fields { display: grid; gap: 12px; grid-template-columns: 1fr; }
.report-fields label { display: grid; gap: 6px; }
.report-result { margin-top: 16px; }
.log-filters { margin-bottom: 16px; }
.logs-tabs{margin-bottom:14px;}
.logs-filter-form { align-items: end; }
.logs-filter-form label { min-width: 0; }
.logs-flow-card{
  padding:16px;
  display:grid;
  gap:14px;
}
.logs-flow-head h2{
  margin:0 0 4px;
  font-size:18px;
}
.logs-flow-head p{
  margin:0;
  color:var(--muted);
  font-size:13px;
}
.logs-flow-stack{
  display:grid;
  gap:14px;
}
.logs-flow-row{
  border:1px solid #dbe3ef;
  border-radius:18px;
  background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);
  box-shadow:0 10px 24px rgba(15,23,42,0.05);
  padding:14px;
  display:grid;
  gap:12px;
}
.logs-flow-row-head{
  display:grid;
  gap:4px;
}
.logs-flow-user{
  font-size:16px;
  font-weight:700;
  color:#0f172a;
}
.logs-flow-meta{
  margin-top:4px;
  color:#64748b;
  font-size:12px;
  line-height:1.7;
}
.logs-flow-dot{
  margin:0 4px;
}
.logs-flow-line{
  margin:0;
  padding:0;
  list-style:none;
  display:flex;
  flex-wrap:wrap;
  gap:12px 28px;
  align-items:stretch;
}
.logs-flow-box{
  min-width:220px;
  max-width:280px;
  flex:1 1 220px;
  position:relative;
  background:#fff;
  border:1px solid #edf2f7;
  border-radius:14px;
  padding:12px 14px;
  display:grid;
  gap:6px;
  align-content:start;
}
.logs-flow-box::after{
  content:'→';
  position:absolute;
  left:-18px;
  top:50%;
  transform:translateY(-50%);
  color:#94a3b8;
  font-size:18px;
  font-weight:700;
}
.logs-flow-box:first-child::after,
.logs-flow-box.is-last::after{
  display:none;
}
.logs-flow-box strong{
  font-size:14px;
  color:#0f172a;
  line-height:1.6;
}
.logs-flow-box-time{
  color:#64748b;
  font-size:12px;
}
.logs-flow-box-desc{
  color:#475569;
  font-size:12px;
  line-height:1.8;
  word-break:break-word;
}
.logs-flow-box.logs-flow-accent{
  border-color:#bfdbfe;
  box-shadow:0 8px 20px rgba(37,99,235,.08);
}
.logs-flow-box.logs-flow-danger{
  border-color:#fecaca;
  box-shadow:0 8px 20px rgba(220,38,38,.06);
}
.logs-flow-box.logs-flow-view{
  border-color:#99f6e4;
  box-shadow:0 8px 20px rgba(15,118,110,.06);
}
.logs-flow-line{
  direction:rtl;
}
.logs-flow-box-title{
  display:flex;
  align-items:center;
  gap:8px;
}
.logs-flow-icon{
  width:28px;
  height:28px;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  position:relative;
  flex:0 0 auto;
  background:rgba(148,163,184,.16);
  color:#475569;
}
.logs-flow-icon::before,
.logs-flow-icon::after{
  content:'';
  position:absolute;
}
.logs-flow-icon-login::before{
  width:12px;
  height:12px;
  border-radius:50%;
  border:2px solid currentColor;
  top:5px;
}
.logs-flow-icon-login::after{
  width:12px;
  height:6px;
  border:2px solid currentColor;
  border-top:0;
  border-radius:0 0 8px 8px;
  bottom:5px;
}
.logs-flow-icon-warning::before{
  width:0;
  height:0;
  border-left:7px solid transparent;
  border-right:7px solid transparent;
  border-bottom:14px solid currentColor;
  top:5px;
}
.logs-flow-icon-warning::after{
  width:2px;
  height:6px;
  background:#fff;
  top:10px;
  border-radius:999px;
  box-shadow:0 8px 0 0 #fff;
}
.logs-flow-icon-logout::before{
  width:10px;
  height:10px;
  border:2px solid currentColor;
  border-left:0;
  right:7px;
  border-radius:0 8px 8px 0;
}
.logs-flow-icon-logout::after{
  width:10px;
  height:2px;
  background:currentColor;
  left:6px;
  top:13px;
  box-shadow:-3px -3px 0 -1px currentColor, -3px 3px 0 -1px currentColor;
  transform:rotate(180deg);
}
.logs-flow-icon-view::before{
  width:14px;
  height:8px;
  border:2px solid currentColor;
  border-radius:10px / 7px;
}
.logs-flow-icon-view::after{
  width:4px;
  height:4px;
  border-radius:50%;
  background:currentColor;
}
.logs-flow-icon-profile::before{
  width:10px;
  height:10px;
  border-radius:50%;
  border:2px solid currentColor;
  top:4px;
}
.logs-flow-icon-profile::after{
  width:12px;
  height:6px;
  border:2px solid currentColor;
  border-top:0;
  border-radius:0 0 8px 8px;
  bottom:4px;
}
.logs-flow-icon-key::before{
  width:8px;
  height:8px;
  border-radius:50%;
  border:2px solid currentColor;
  left:5px;
}
.logs-flow-icon-key::after{
  width:10px;
  height:2px;
  background:currentColor;
  right:5px;
  top:13px;
  box-shadow:-3px 3px 0 0 currentColor;
}
.logs-flow-icon-score::before{
  width:14px;
  height:10px;
  border-left:2px solid currentColor;
  border-bottom:2px solid currentColor;
  left:6px;
  bottom:6px;
}
.logs-flow-icon-score::after{
  width:10px;
  height:10px;
  border-right:2px solid currentColor;
  border-top:2px solid currentColor;
  right:6px;
  top:6px;
  transform:skew(-25deg);
}
.logs-flow-icon-incident::before{
  width:12px;
  height:12px;
  border-radius:4px;
  border:2px solid currentColor;
}
.logs-flow-icon-incident::after{
  width:8px;
  height:2px;
  background:currentColor;
  box-shadow:0 -4px 0 0 currentColor, 0 4px 0 0 currentColor;
}
.logs-flow-icon-agreement::before{
  width:12px;
  height:14px;
  border:2px solid currentColor;
  border-radius:4px;
}
.logs-flow-icon-agreement::after{
  width:6px;
  height:2px;
  background:currentColor;
  box-shadow:0 -4px 0 0 currentColor, 0 4px 0 0 currentColor;
}
.logs-flow-icon-dot::before{
  width:8px;
  height:8px;
  border-radius:50%;
  background:currentColor;
}
.logs-flow-box::after{
  content:'←';
  left:-22px;
}
.logs-flow-box:first-child::after{
  display:block;
}
.logs-flow-box.is-last::after{
  display:none;
}
.logs-flow-box.logs-flow-accent{
  background:linear-gradient(180deg,#f8fbff 0%,#eef6ff 100%);
}
.logs-flow-box.logs-flow-accent .logs-flow-icon{
  background:rgba(37,99,235,.12);
  color:#2563eb;
}
.logs-flow-box.logs-flow-danger{
  background:linear-gradient(180deg,#fff9f9 0%,#fff1f2 100%);
}
.logs-flow-box.logs-flow-danger .logs-flow-icon{
  background:rgba(220,38,38,.12);
  color:#dc2626;
}
.logs-flow-box.logs-flow-view{
  background:linear-gradient(180deg,#f4fffd 0%,#ecfdf5 100%);
}
.logs-flow-box.logs-flow-view .logs-flow-icon{
  background:rgba(15,118,110,.12);
  color:#0f766e;
}
.logs-flow-box.logs-flow-neutral{
  background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
}
.logs-flow-box.logs-flow-neutral .logs-flow-icon{
  background:rgba(100,116,139,.14);
  color:#475569;
}
.logs-flow-empty{
  border:1px dashed #cbd5e1;
  border-radius:16px;
  background:#f8fafc;
  color:#64748b;
  text-align:center;
  padding:26px 18px;
}
.logs-pagination{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  padding:16px 20px 20px;
  margin:0 20px 20px;
  border:1px solid #e5e7eb;
  border-radius:18px;
  background:#fff;
  box-shadow:0 14px 36px rgba(15,23,42,.08);
}
.logs-pagination-info{
  color:#64748b;
  font-size:13px;
  white-space:nowrap;
}
.logs-pagination-links{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:nowrap;
  justify-content:flex-end;
  white-space:nowrap;
  overflow-x:auto;
  max-width:100%;
  padding-bottom:2px;
}
.logs-page-btn{
  min-width:38px;
  height:38px;
  padding:0 12px;
  border:1px solid #dbe3ef;
  border-radius:10px;
  background:#fff;
  color:#334155;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:14px;
  text-decoration:none;
  transition:all .18s ease;
}
.logs-page-btn:hover{
  border-color:#a5b4fc;
  color:#1d4ed8;
  box-shadow:0 6px 16px rgba(37,99,235,.08);
}
.logs-page-btn.active{
  border-color:#6366f1;
  background:#eef2ff;
  color:#4338ca;
  font-weight:700;
}
.logs-page-btn.disabled{
  pointer-events:none;
  opacity:.45;
}
.logs-page-ellipsis{
  min-width:20px;
  text-align:center;
  color:#94a3b8;
  font-weight:700;
}
.logs-per-page-select{
  height:38px;
  min-width:104px;
  border:1px solid #dbe3ef;
  border-radius:10px;
  background:#fff;
  color:#334155;
  padding:0 8px;
  font:inherit;
  font-size:13px;
}
.logs-pagination-links .btn.disabled{
  pointer-events:none;
}
.logs-table{
  padding:14px 20px 20px;
  overflow:auto;
}
.logs-table table{
  min-width:760px;
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  border:1px solid #dbe3ef;
  border-radius:14px;
  overflow:hidden;
  background:#fff;
  font-size:var(--fs-tables,14px);
}
.logs-table th,
.logs-table td{
  border:0;
  border-bottom:1px solid #edf2f7;
  padding:10px 12px;
  text-align:center;
}
.logs-table thead th{
  background:#f8fafc;
  color:#334155;
  font-weight:700;
  border-bottom:1px solid #e2e8f0;
}
.logs-table tbody tr:nth-child(even){
  background:#fcfdff;
}
.logs-table tbody tr:last-child td{
  border-bottom:0;
}
.logs-table tbody td.meta-cell{
  text-align:right;
  white-space:pre-wrap;
  word-break:break-word;
}

@media (max-width: 720px){
  .log-filters{
    padding:14px;
  }
  .logs-filter-form{
    grid-template-columns:1fr;
    gap:10px;
  }
  .logs-filter-form .inline{
    width:100%;
  }
  .logs-filter-form .inline .btn{
    flex:1 1 0;
  }
  .logs-flow-card{
    padding:14px;
  }
  .logs-flow-row{
    padding:12px;
  }
  .logs-flow-line{
    gap:10px 18px;
  }
  .logs-flow-box{
    min-width:100%;
    max-width:100%;
    flex-basis:100%;
  }
  .logs-flow-box::after{
    content:'↓';
    left:50%;
    top:-14px;
    transform:translateX(-50%);
  }
  .logs-table{
    overflow:visible;
  }
  .logs-pagination{
    margin:0 14px 16px;
    padding:14px;
    grid-template-columns:1fr;
  }
  .logs-pagination-links .logs-page-btn{
    flex:1 1 auto;
    text-align:center;
  }
  .logs-per-page-select{
    width:auto;
    min-width:104px;
  }
  .logs-table table{
    min-width:0;
    border-collapse:separate;
    border-spacing:0 10px;
    background:transparent;
  }
  .logs-table thead{
    display:none;
  }
  .logs-table tbody tr{
    display:grid;
    gap:8px;
    padding:12px 14px;
    border:1px solid #dbe3ef;
    border-radius:16px;
    background:#fff;
    box-shadow:0 2px 10px rgba(15,23,42,0.04);
  }
  .logs-table tbody td{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    border:0;
    padding:0;
    text-align:right;
    background:transparent !important;
    white-space:normal;
    word-break:break-word;
  }
  .logs-table tbody td::before{
    content:attr(data-label);
    flex:0 0 auto;
    color:#64748b;
    font-weight:700;
  }
  .logs-table tbody td:last-child{
    line-height:1.7;
  }
}

.report-config{
  padding:20px;
  border-radius:22px;
}
.report-bar{
  display:grid;
  grid-template-columns:repeat(3,minmax(240px,1fr));
  gap:14px;
  align-items:start;
}
.report-picker,
.report-options .opt{
  border:1px solid #dbe3ef;
  border-radius:18px;
  background:#fff;
  padding:14px;
  display:grid;
  gap:10px;
  align-content:start;
  min-height:112px;
}
.report-picker{
  font-weight:700;
}
.report-section{
  position:relative;
}
.report-section::before{
  content:"";
  position:absolute;
  top:14px;
  left:14px;
  width:10px;
  height:10px;
  border-radius:4px;
  background:#2563eb;
  opacity:.2;
}
.report-picker select{
  min-width:0;
  height:48px;
  border-radius:14px;
}
.report-options{
  display:contents;
}
.report-options .opt{
  grid-auto-flow:row;
  border-inline-start-width:2px;
}
.report-options .opt label{
  display:grid;
  gap:7px;
  font-size:13px;
  color:#475569;
  align-content:start;
}
.report-options .opt input,
.report-options .opt select{
  height:46px;
  border-radius:14px;
}
.report-options .opt select[multiple]{
  min-height:160px;
  height:auto;
  padding:8px;
}
.report-options .opt .inline{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.report-options .opt .inline .btn{
  border-radius:12px;
}
.report-actions{
  grid-column:1 / -1;
  border-top:1px solid #e5e7eb;
  margin-top:4px;
  padding-top:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.report-actions .btn{
  min-width:160px;
  height:44px;
  border-radius:14px;
}
.report-actions .btn.primary{
  min-width:190px;
}
.report-actions #showReport{
  order:2;
}
.report-actions #clearReportFilters{
  order:1;
}
.report-export-panel{
  border-top:1px solid #e5e7eb;
  margin-top:16px;
  padding-top:16px;
  display:grid;
  gap:12px;
}
.report-export-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.report-export-head h3{
  margin:0;
  font-size:28px;
  font-weight:900;
}
.report-export-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.report-export-actions .btn{
  min-width:160px;
  height:44px;
  border-radius:14px;
}
@media (max-width: 1200px){
  .report-bar{
    grid-template-columns:1fr 1fr;
  }
}
@media (max-width: 860px){
  .report-config{
    padding:14px;
  }
  .report-bar{
    grid-template-columns:1fr;
  }
  .report-actions{
    flex-direction:column;
    align-items:stretch;
  }
  .report-actions .btn{
    width:100%;
  }
  .report-export-actions{
    justify-content:stretch;
  }
  .report-export-actions .btn{
    width:100%;
  }
}

.multi-select{position:relative;min-width:200px;}
.multi-btn{width:100%;padding:10px 12px;border-radius:12px;border:1px solid var(--border);background:#fff;cursor:pointer;text-align:right;}
.multi-panel{position:absolute;right:0;top:44px;background:#fff;border:1px solid var(--border);box-shadow:var(--shadow);border-radius:12px;padding:8px;display:none;max-height:240px;overflow:auto;z-index:10;min-width:220px;}
.multi-select.open .multi-panel{display:grid;gap:6px;}
.multi-item{display:flex;gap:8px;align-items:center;padding:6px 8px;border-radius:10px;cursor:pointer;}
.multi-item:hover{background:#f8fafc;}
.multi-item input{width:auto;margin:0;}

.multi-actions{display:flex;gap:8px;justify-content:space-between;align-items:center;}
.text-btn.mini{font-size:12px;}
.btn.tiny{height:32px;padding:8px 12px;font-size:12px;}

.month-input{width:90px; padding:8px 10px; border-radius:10px; border:1px solid var(--border);}

.chart-toolbar{display:flex;align-items:center;gap:10px;justify-content:flex-end;flex-wrap:wrap;background:#f8fafc;border:1px solid #e5e7eb;border-radius:16px;padding:6px 10px;box-shadow:var(--shadow);} 
.chart-toolbar form{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.tool-pill{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #e5e7eb;border-radius:999px;padding:6px 10px;font-size:12px;box-shadow:0 6px 18px rgba(15,23,42,0.06);} 
.tool-pill .tool-ico{font-size:14px;} 
.tool-pill .tool-text{font-weight:700;color:#0f172a;} 
.tool-pill .tool-sub{color:#6b7280;font-size:11px;} 
.tool-filter{position:relative;} 
.tool-filter .multi-select{position:relative;min-width:auto;} 
.tool-filter .multi-btn{border:none;background:transparent;padding:0 4px;font-weight:700;} 
.tool-filter .multi-panel{right:0;top:42px;}
.tool-btn{border:none;background:#fff;border:1px solid #e5e7eb;border-radius:12px;width:36px;height:36px;cursor:pointer;box-shadow:0 6px 18px rgba(15,23,42,0.06);} 
.tool-btn:hover{background:#f3f4f6;} 
.month-control.compact{background:transparent;border:none;padding:0;gap:6px;} 
.month-control.compact .month-range{width:90px;} 
.month-control.compact .month-input{width:52px;padding:4px 6px;border-radius:8px;} 


.chart-toolbar.compact{display:flex;align-items:center;gap:8px;justify-content:flex-end;background:transparent;padding:0;border:none;box-shadow:none;}
.chart-toolbar.compact form{display:flex;align-items:center;gap:8px;flex-wrap:nowrap;}
.tool-icon{position:relative;display:inline-flex;align-items:center;justify-content:center;}
.tool-btn{border:none;background:#fff;border:1px solid #e5e7eb;border-radius:12px;width:36px;height:36px;cursor:pointer;box-shadow:0 6px 18px rgba(15,23,42,0.06);} 
.tool-btn:hover{background:#f3f4f6;} 
.tool-badge{position:absolute;top:-6px;right:-6px;background:#2563eb;color:#fff;font-size:10px;line-height:1;padding:3px 6px;border-radius:999px;}
.tool-badge.months{background:#0ea5a4;}
.tool-popover{position:absolute;top:44px;right:0;min-width:220px;background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:10px;box-shadow:var(--shadow);display:none;z-index:20;}
.tool-icon.open .tool-popover{display:grid;gap:8px;}
.popover-title{font-weight:700;font-size:12px;color:#0f172a;}
.filter-popover .multi-item{padding:6px 8px;border-radius:10px;}
.filter-popover{max-height:240px;overflow:auto;}
.month-control.compact{background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;padding:6px 8px;gap:6px;}
.month-control.compact .month-range{width:140px;}
.month-control.compact .month-input{width:54px;padding:4px 6px;border-radius:8px;}

.tool-btn svg{width:16px;height:16px;stroke:#0f172a;}
.tool-btn{display:flex;align-items:center;justify-content:center;}
.chart-card{overflow:visible;}
.chart-head{overflow:visible;}
.tool-popover{max-width:280px;width:max-content;}




/* toolbar overrides */
.chart-card{overflow:visible !important;}
.chart-head{overflow:visible !important;}
.chart-toolbar.compact{background:transparent !important;border:none !important;box-shadow:none !important;gap:8px;}
.chart-toolbar.compact form{display:flex;align-items:center;gap:8px;flex-wrap:nowrap;}
.tool-btn{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:10px;border:1px solid #e5e7eb;background:#fff;}
.tool-btn svg{width:16px;height:16px;stroke:#0f172a;}
.tool-icon{position:relative;}
.tool-badge{position:absolute;top:-6px;right:-6px;background:#2563eb;color:#fff;font-size:10px;line-height:1;padding:3px 6px;border-radius:999px;}
.tool-badge.months{background:#0ea5a4;}
.tool-popover{position:absolute;top:42px;right:0;left:auto;min-width:220px;max-width:calc(100vw - 40px);background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:10px;box-shadow:var(--shadow);display:none;z-index:30;}
.tool-icon.open .tool-popover{display:grid;gap:8px;}
.month-control.compact{background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;padding:6px 8px;gap:6px;}
.month-control.compact .month-range{width:140px;}
.month-control.compact .month-input{width:54px;padding:4px 6px;border-radius:8px;}

.tool-popover{max-width: min(320px, calc(100vw - 40px));}
.tool-popover .month-control{width:100%;}
.tool-popover .month-range{width:160px;max-width:160px;}


.summary-table .thead.columns-8, .summary-table .row.columns-8 { grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; }

.summary-table .role-chips{display:flex;flex-wrap:wrap;gap:6px}
.summary-table .chip{background:#eef2ff;color:#3b5bcc;border-radius:10px;padding:2px 8px;font-size:12px}
.summary-table .ops{display:flex;gap:8px;align-items:center}
.summary-table .icon-btn{width:32px;height:32px;border:1px solid #e5e7eb;border-radius:10px;background:#fff;display:inline-flex;align-items:center;justify-content:center;color:#4b5563}
.summary-table .icon-btn svg{width:18px;height:18px}
.summary-table .icon-btn:hover{background:#f8fafc}
.sort-link{color:inherit;text-decoration:none;border-bottom:1px dashed #cbd5f5}
.pagination{display:flex;gap:6px;justify-content:center;margin-top:12px}
.page-link{padding:4px 10px;border:1px solid #e5e7eb;border-radius:8px;color:#4b5563;text-decoration:none}
.page-link.active{background:#2563eb;color:#fff;border-color:#2563eb}


.summary-table .thead, .summary-table .row{grid-template-columns:1.2fr 1fr 1.2fr 1fr 1fr auto;align-items:center}
.summary-table .row{padding:8px 12px}
.summary-table .row{min-height:38px}
.summary-table .user-name{font-size:13px}
.summary-table .user-username{font-size:12px}
.summary-table .status-col{font-size:12px;color:#6b7280}
.summary-table .ops-left{justify-self:end}
.sort-link{display:inline-flex;gap:6px;align-items:center}
.sort-icon{font-size:12px;color:#9aa4b2}
.pagination.fancy{display:flex;gap:6px;justify-content:center;margin:14px 0 6px}
.pagination.fancy .page-link{min-width:32px;text-align:center;padding:6px 10px;border-radius:999px;border:1px solid #e5e7eb;background:#fff}
.pagination.fancy .page-link.active{background:#2563eb;color:#fff;border-color:#2563eb}
.per-page{display:flex;justify-content:center;margin-bottom:8px}
.per-page select{padding:6px 10px;border-radius:10px;border:1px solid #e5e7eb}


.summary-table .thead, .summary-table .row{grid-template-columns:50px 1.2fr 1fr 1.2fr 1fr 1fr auto;align-items:center}
.summary-table .row{padding:6px 10px}
.summary-table .row-index{font-size:12px;color:#94a3b8}
.status-ok{color:#10b981;font-weight:600}
.status-mid{color:#f59e0b;font-weight:600}
.status-pending{color:#ef4444;font-weight:600}
.status-col-list{display:grid;gap:4px;align-content:start;min-width:260px}
.status-col-list .status-summary{font-weight:700}
.status-item{display:flex;align-items:flex-start;gap:6px;line-height:1.5;color:#475569}
.status-item .status-dot{width:8px;height:8px;border-radius:999px;display:inline-block;margin-top:5px;background:#cbd5e1}
.status-item.done{color:#166534}
.status-item.done .status-dot{background:#10b981}
.status-item.pending{color:#9f1239}
.status-item.pending .status-dot{background:#ef4444}
.modal-iframe{width:85vw;max-width:1400px;height:85vh;max-height:900px}
.modal-iframe iframe{width:100%;height:calc(85vh - 64px);border:0}


.modal-embed .sidebar{display:none}
.modal-embed .topbar{display:none}
.modal-embed .main{margin-right:0;padding-top:0}
.modal-embed .shell{grid-template-columns:1fr}
.modal-iframe iframe{height:calc(85vh - 56px)}

/* manager dashboard summary: dedicated mobile layout, desktop unaffected */
.manager-summary-mobile{display:none}
@media (max-width: 920px){
  .manager-summary-card .manager-summary-table{display:none}
  .manager-summary-mobile{
    display:grid;
    gap:10px;
    margin-top:8px;
  }
  .manager-summary-item{
    border:1px solid #e5e7eb;
    border-radius:14px;
    background:#fff;
    padding:10px 12px;
    display:grid;
    gap:8px;
  }
  .manager-summary-top{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
  }
  .manager-summary-name-wrap{display:grid;gap:2px}
  .manager-summary-name{font-size:14px;color:#0f172a}
  .manager-summary-username{font-size:12px;color:#94a3b8}
  .manager-summary-index{font-size:12px;color:#64748b}
  .manager-summary-roles{display:flex;flex-wrap:wrap;gap:6px}
  .manager-summary-main{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    flex-wrap:wrap;
  }
  .manager-summary-status{font-size:12px}
  .manager-summary-final{font-size:13px;color:#0f172a}
  .manager-summary-detail summary{
    cursor:pointer;
    font-size:12px;
    color:#475569;
    user-select:none;
  }
  .manager-summary-detail .status-col-list{
    min-width:0;
    margin-top:6px;
  }
  .manager-summary-actions{
    display:flex;
    gap:8px;
    justify-content:flex-end;
  }
}

.agreement-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:0;flex-wrap:wrap;position:sticky;top:0;z-index:30;background:var(--bg);padding:8px 0;border-bottom:1px solid #e5e7eb;}
.toolbar-right,.toolbar-left{display:flex;gap:10px;align-items:center;flex-wrap:nowrap;}
.status-wrap{display:inline-flex;align-items:center;gap:8px;border:1px solid #e5e7eb;background:#f8fafc;border-radius:12px;padding:4px 8px;}
.status-wrap .status-label{font-size:12px;color:#6b7280;white-space:nowrap;}
.status-wrap select{width:120px;min-width:120px;background:#fff;}
.agreement-toolbar .label-inline{font-size:13px;color:#6b7280;margin-left:8px;}
.agreement-title-line{display:inline-flex;align-items:center;gap:8px;}
.scoring-lock-toggle{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid #d1d5db;border-radius:8px;background:#fff;color:#475569;cursor:pointer;padding:0;}
.scoring-lock-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.scoring-lock-toggle .lock-open,.scoring-lock-toggle .lock-slash{display:none;}
.scoring-lock-toggle.is-unlocked{color:#0f766e;border-color:#99f6e4;background:#f0fdfa;}
.scoring-lock-toggle.is-unlocked .lock-closed{display:none;}
.scoring-lock-toggle.is-unlocked .lock-open,.scoring-lock-toggle.is-unlocked .lock-slash{display:block;}
.scoring-lock-toggle[hidden]{display:none!important;}
.agreement-table-wrap{/*border:1px solid var(--border);border-radius:16px;background:#fff;box-shadow:var(--shadow);padding-bottom:16px;*/overflow:visible;min-width:0;max-width:100%;}
.agreement-table-head{position:sticky;top:var(--agreement-toolbar-h,56px);z-index:25;background:#f8fafc;border-bottom:1px solid #e5e7eb;overflow:hidden;border-radius:16px 16px 0 0;}
.agreement-table-head .agreement-table{margin:0;}
.agreement-table-scroll{overflow-x:hidden;overflow-y:visible;width:100%;max-width:100%;}
.agreement-table-scroll thead{display:none!important;}
.add-project-wide{width:calc(100% - 20px);margin:12px 10px 0;border:2px dashed #cbd5e1;background:#f8fafc;color:#64748b;display:block;}
.agreement-table{
  width:100%;
  max-width:100%;
  min-width:0;
  border-collapse:collapse;
  font-size:13px;
  position:relative;
  table-layout:fixed;
  --agreement-focus-row-h: calc(var(--agreement-focus-cols-font-size, 13px) * 2.2);
  --ag-col-1:3%;
  --ag-col-2:17%;
  --ag-col-3:9%;
  --ag-col-4:22%;
  --ag-col-5:8%;
  --ag-col-6:8%;
  --ag-col-7:6%;
  --ag-col-8:18%;
  --ag-col-9:12%;
  --ag-col-10:12%;
  --ag-col-11:7%;
}
.agreement-table[data-status="scoring"]{
  --ag-col-2:12%;
  --ag-col-3:8%;
  --ag-col-4:18%;
  --ag-col-5:8%;
  --ag-col-6:8%;
  --ag-col-7:6%;
  --ag-col-8:14%;
  --ag-col-9:10%;
  --ag-col-10:10%;
  --ag-col-11:9%;
}
.agreement-table[data-status="finished"]{
  --ag-col-2:11%;
  --ag-col-3:8%;
  --ag-col-4:16%;
  --ag-col-5:7%;
  --ag-col-6:7%;
  --ag-col-7:6%;
  --ag-col-8:13%;
  --ag-col-9:9%;
  --ag-col-10:10%;
  --ag-col-11:10%;
}
html.sidebar-collapsed .agreement-table{
  --ag-col-2:18%;
  --ag-col-3:10%;
  --ag-col-4:24%;
  --ag-col-5:8%;
  --ag-col-6:8%;
  --ag-col-7:6%;
  --ag-col-8:18%;
  --ag-col-9:10%;
  --ag-col-10:10%;
  --ag-col-11:7%;
}
html.sidebar-collapsed .agreement-table[data-status="scoring"]{
  --ag-col-2:13%;
  --ag-col-3:8%;
  --ag-col-4:20%;
  --ag-col-5:9%;
  --ag-col-6:9%;
  --ag-col-7:6%;
  --ag-col-8:15%;
  --ag-col-9:9%;
  --ag-col-10:9%;
  --ag-col-11:5%;
}
html.sidebar-collapsed .agreement-table[data-status="finished"]{
  --ag-col-2:12%;
  --ag-col-3:8%;
  --ag-col-4:18%;
  --ag-col-5:8%;
  --ag-col-6:8%;
  --ag-col-7:6%;
  --ag-col-8:14%;
  --ag-col-9:9%;
  --ag-col-10:10%;
  --ag-col-11:4%;
}
.agreement-table th:nth-child(1), .agreement-table td:nth-child(1){width:var(--ag-col-1);min-width:0;}
.agreement-table th:nth-child(2), .agreement-table td:nth-child(2){width:var(--ag-col-2);min-width:0;}
.agreement-table th:nth-child(3), .agreement-table td:nth-child(3){width:var(--ag-col-3);min-width:0;}
.agreement-table th:nth-child(4), .agreement-table td:nth-child(4){width:var(--ag-col-4);min-width:0;}
.agreement-table th:nth-child(5), .agreement-table td:nth-child(5){width:var(--ag-col-5);min-width:0;}
.agreement-table th:nth-child(6), .agreement-table td:nth-child(6){width:var(--ag-col-6);min-width:0;}
.agreement-table th:nth-child(7), .agreement-table td:nth-child(7){width:var(--ag-col-7);min-width:0;}
.agreement-table th:nth-child(8), .agreement-table td:nth-child(8){width:var(--ag-col-8);min-width:0;}
.agreement-table th:nth-child(9), .agreement-table td:nth-child(9){width:var(--ag-col-9);min-width:0;}
.agreement-table th:nth-child(10), .agreement-table td:nth-child(10){width:var(--ag-col-10);min-width:0;}
.agreement-table th:nth-child(11), .agreement-table td:nth-child(11){width:var(--ag-col-11);min-width:0;}
.agreement-table tbody td:nth-child(2),
.agreement-table tbody td:nth-child(3),
.agreement-table tbody td:nth-child(4),
.agreement-table tbody td:nth-child(5),
.agreement-table tbody td:nth-child(6){font-size:var(--agreement-focus-cols-font-size, 13px);}
.agreement-table tbody td:nth-child(2) input,
.agreement-table tbody td:nth-child(3) input,
.agreement-table tbody td:nth-child(4) input,
.agreement-table tbody td:nth-child(5) input,
.agreement-table tbody td:nth-child(6) input,
.agreement-table tbody td:nth-child(2) select,
.agreement-table tbody td:nth-child(3) select,
.agreement-table tbody td:nth-child(4) select,
.agreement-table tbody td:nth-child(5) select,
.agreement-table tbody td:nth-child(6) select,
.agreement-table tbody td:nth-child(2) textarea,
.agreement-table tbody td:nth-child(3) textarea,
.agreement-table tbody td:nth-child(4) textarea,
.agreement-table tbody td:nth-child(5) textarea,
.agreement-table tbody td:nth-child(6) textarea,
.agreement-table tbody td:nth-child(4) .text-btn{font-size:var(--agreement-focus-cols-font-size, 13px);}
.agreement-table th,.agreement-table td{border:1px solid #eef2f7;padding:8px 10px;vertical-align:top;background:#fff;overflow:hidden;}
.agreement-table td:nth-child(2),
.agreement-table td:nth-child(3){
  overflow:visible;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.agreement-multiline-cell{
  min-height:36px;
  border:1px solid #d1d5db;
  border-radius:10px;
  background:#fff;
  padding:6px 10px;
  line-height:1.45;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.agreement-cell-multiline{
  width:100%;
  min-height:40px;
  border:1px solid #d1d5db;
  border-radius:10px;
  background:#fff;
  padding:6px 10px;
  line-height:1.45;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  word-break:break-word;
  resize:none;
}
.agreement-cell-multiline:disabled{
  opacity:1;
  color:#0f172a;
  background:#f8fafc;
  border-color:#d1d5db;
}
.agreement-table td:nth-child(2) .compact-inline,
.agreement-table td:nth-child(3) .compact-inline{
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  max-width:none;
  line-height:1.45;
}
.agreement-table tbody tr:nth-child(odd) td{background:#f3f8ff;}
.agreement-table th{background:#f8fafc;font-weight:700;color:#334155;text-align:center;}
.agreement-table thead{display:table-header-group;visibility:visible;}
.agreement-table thead th{position:relative;top:auto;z-index:1;background:#f8fafc!important;color:#334155!important;height:40px;}
.agreement-table thead{box-shadow:0 1px 0 #e5e7eb;}
.agreement-table tbody td{position:relative;z-index:1;}
.agreement-table .cell-center{text-align:center;}
.agreement-table td input,.agreement-table td select,.agreement-table td textarea{font-size:12px;padding:6px 8px;border-radius:10px;max-width:100%;width:100%;box-sizing:border-box;min-width:0;}
.agreement-table td textarea{min-height:54px;}
.agreement-table th:nth-child(8),
.agreement-table td:nth-child(8){max-width:var(--ag-col-8);}
.agreement-table .member-list,.agreement-table .kr-list{display:grid;gap:6px;margin-bottom:6px;}
.agreement-table .member-row,.agreement-table .kr-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(40px,70px) 28px;gap:6px;align-items:center;min-height:var(--agreement-focus-row-h);}
.agreement-table .kr-row{grid-template-columns:1fr 32px;}
.agreement-table .icon-btn{width:28px;height:28px;border-radius:8px;}
.agreement-table .row-actions{display:grid;gap:6px;justify-items:center;}
.agreement-table .note-plus-btn{background:#fff7ed;color:#c2410c;border:1px solid #fdba74;font-weight:700;}
.agreement-table .note-plus-btn.hidden{display:none;}
.agreement-table .scoring-cell-wrap{position:relative;}
.agreement-table .scoring-cell-wrap .member-score-list{padding-left:24px;}
.agreement-table .note-alert-btn{position:absolute;top:50%;left:6px;transform:translateY(-50%);width:22px;height:22px;border-radius:6px;border:1px solid #fdba74;background:#fff7ed;color:#c2410c;font-weight:800;line-height:1;cursor:pointer;z-index:2;}
.agreement-table .note-alert-btn.hidden{display:none;}
.agreement-table .head-note-filter{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:5px;border:1px solid #fdba74;background:#fff7ed;color:#c2410c;font-size:11px;font-weight:800;cursor:pointer;margin-right:6px;vertical-align:middle;}
.agreement-table .head-note-filter.hidden{display:none;}
.agreement-table .head-note-filter.active{background:#c2410c;color:#fff;border-color:#c2410c;}
.note-applied-check{display:inline-flex;align-items:center;gap:6px;margin-top:8px;color:#475569;font-size:13px;}
.note-applied-check input{width:auto;}
.agreement-table .icon-btn.danger:disabled,
.agreement-table .tag-chip .tag-close:disabled{background:#e5e7eb;color:#9ca3af;border-color:#d1d5db;cursor:not-allowed;opacity:1;}
.agreement-table .score-col{text-align:center;}
.agreement-table .scoring-col{text-align:center;}
.agreement-table td.scoring-col{background:#ffedd5!important;}
.agreement-table .member-score-list{display:grid;gap:6px;margin-bottom:6px;}
.agreement-table .member-score-row{display:flex;align-items:center;justify-content:center;min-height:var(--agreement-focus-row-h);}
.agreement-table .member-score-row.placeholder{min-height:var(--agreement-focus-row-h);}
.agreement-table .member-score-input{width:min(72px, 100%);height:var(--agreement-focus-row-h);}
.agreement-table .member-score-input,
.agreement-table .member-score-value,
.agreement-table .score-value{font-size:var(--agreement-focus-cols-font-size, 13px);}
.agreement-table .member-score-value{color:#1f2937;}
.agreement-table .sum-ok{color:#16a34a;font-weight:700;}
.agreement-table .sum-warn{color:#b45309;font-weight:700;}
.agreement-table .sum-bad{color:#b91c1c;font-weight:700;}
.lead-chips{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;margin-bottom:6px;}
.lead-chip{background:#eef2ff;color:#1d4ed8;border:1px solid #c7d2fe;padding:3px 8px;border-radius:999px;font-size:11px;display:inline-flex;align-items:center;gap:6px;cursor:pointer;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.lead-chip small{font-size:12px;line-height:1;color:#64748b;}
.member-add{display:flex;gap:6px;align-items:center;margin-bottom:6px;}
.member-add input{flex:1;}
.member-add .icon-btn{width:30px;height:30px;}
.agreement-table td input[type="number"]{text-align:center;}
.agreement-table td input[list]{background:#fdfefe;}
.agreement-table td input.member-over{background:#fee2e2;border-color:#ef4444;}
.agreement-table tr.similar-row td{background:#fee2e2!important;}
.agreement-table tr.filtered-out{display:none;}
.agreement-table .tag-input{display:grid;gap:6px;}
.agreement-table .tag-list{display:flex;flex-wrap:wrap;gap:6px;}
.agreement-table .tag-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid #e2e8f0;background:#f8fafc;border-radius:5px;padding:2px 8px;font-size:12px;}
.agreement-table .tag-chip .tag-text{white-space:nowrap;cursor:text;}
.agreement-table .tag-chip .tag-edit-input{width:auto;min-width:120px;height:24px;padding:2px 6px;border:1px solid #cbd5e1;border-radius:5px;font-size:12px;}
.agreement-table .tag-chip .tag-edit-textarea{width:min(360px, 100%);min-width:150px;min-height:48px;padding:4px 6px;border:1px solid #cbd5e1;border-radius:5px;font-size:12px;line-height:1.5;resize:vertical;}
.agreement-table .tag-chip .tag-close{border:0;background:#fee2e2;color:#b91c1c;border-radius:999px;width:18px;height:18px;line-height:18px;padding:0;cursor:pointer;font-size:12px;}
.agreement-table .tag-chip .tag-close[disabled]{opacity:1;cursor:not-allowed;background:#e5e7eb;color:#9ca3af;border-color:#d1d5db;}
.agreement-table .tag-input input[type="text"]{width:100%;}
.agreement-table td:nth-child(8) .tag-chip{max-width:100%;white-space:normal;align-items:flex-start;}
.agreement-table td:nth-child(8) .tag-chip .tag-text{white-space:normal;word-break:break-word;}
.agreement-table th.score-col,
.agreement-table td.score-col{
  white-space:nowrap;
}
.draft-restore{position:relative;display:inline-flex;align-items:center;}
.draft-combo{display:inline-flex;align-items:center;gap:8px;padding:0 10px;height:40px;}
.draft-combo .draft-label{white-space:nowrap;}
.draft-combo .draft-timer{min-width:32px;text-align:center;color:#94a3b8;font-weight:600;}
.draft-combo .draft-caret{margin-right:4px;}
.table-font-tools{display:inline-flex;align-items:center;gap:4px;}
.table-font-tools .icon-btn{width:30px;height:30px;border-radius:8px;background:#fff;border:1px solid #e5e7eb;color:#334155;font-weight:700;line-height:1;padding:0;}
.table-font-tools .icon-btn.active{background:#eef2ff;border-color:#c7d2fe;color:#1d4ed8;}
.note-modal-actions{display:flex;justify-content:space-between;align-items:center;width:100%;direction:ltr;}
.note-main-actions{display:inline-flex;gap:8px;align-items:center;direction:rtl;}
.note-delete-btn{font-size:9px!important;padding:4px 8px;height:30px;}
.btn.inactive{background:#e5e7eb;color:#6b7280;}
.btn.warn{background:#ffedd5;color:#9a3412;}
.btn.danger{background:#fee2e2;color:#b91c1c;}
.modal.with-backdrop{position:fixed;inset:0;display:none;z-index:1001;}
.modal.with-backdrop.open{display:block;}
.modal.with-backdrop .modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.35);}
.modal.with-backdrop .modal-card{position:relative;background:#fff;border:1px solid #e5e7eb;border-radius:16px;box-shadow:var(--shadow);width:45vw;max-width:92vw;margin:2vh auto;padding:16px;display:grid;gap:10px;}
.modal.with-backdrop .modal-title{font-weight:700;}
.modal.with-backdrop .modal-body{color:#334155;font-size:14px;}
.modal.with-backdrop .modal-actions{display:flex;gap:8px;justify-content:flex-start;}
.draft-menu{position:absolute;top:42px;right:0;min-width:260px;background:#fff;border:1px solid #e5e7eb;border-radius:12px;box-shadow:var(--shadow);padding:8px;display:none;z-index:50;}
.draft-menu.open{display:block;}
.draft-action{width:100%;text-align:right;border:0;background:#f8fafc;color:#0f172a;border-radius:10px;padding:8px 10px;cursor:pointer;font-size:12px;}
.draft-list{display:grid;gap:6px;margin-top:6px;}
.draft-item{width:100%;text-align:right;border:1px solid #e5e7eb;background:#fff;border-radius:10px;padding:8px 10px;cursor:pointer;font-size:12px;}
.draft-empty{font-size:12px;color:#6b7280;padding:6px 4px;text-align:right;}
.draft-timer{font-size:12px;color:#6b7280;}
.copy-modal{width:520px;max-width:92vw;}
.copy-modal-body{display:grid;gap:10px;max-height:60vh;overflow:auto;}
.copy-filter{width:100%;padding:8px 10px;border-radius:10px;border:1px solid #e5e7eb;}
.copy-periods{display:grid;gap:8px;}
.copy-period-item{display:grid;grid-template-columns:20px 1fr;gap:4px 10px;align-items:center;border:1px solid #e5e7eb;border-radius:12px;padding:10px;background:#f8fafc;cursor:pointer;}
.copy-period-item input{width:auto;grid-row:1 / span 2;}
.copy-period-name{grid-column:2;}
.copy-period-meta{grid-column:2;}
.copy-period-item:hover{border-color:#c7d2fe;background:#eef2ff;}
.copy-period-name{font-weight:700;color:#0f172a;}
.copy-period-meta{font-size:12px;color:#64748b;}
.copy-empty{font-size:12px;color:#64748b;padding:8px;}
.copy-progress-card{width:360px;max-width:90vw;text-align:center;}
.copy-progress-bar{height:6px;border-radius:999px;background:#e5e7eb;overflow:hidden;margin:6px 0 2px;}
.copy-progress-bar span{display:block;height:100%;width:40%;background:#2563eb;animation:copyProgress 1.2s ease-in-out infinite;}
@keyframes copyProgress{
  0%{transform:translateX(-60%);}
  100%{transform:translateX(220%);}
}
.toast{position:fixed;right:24px;top:24px;background:#0f172a;color:#fff;padding:10px 14px;border-radius:12px;opacity:0;transform:translateY(-8px);transition:.2s;z-index:1000;max-width:320px;}
.toast.warning{background:#92400e;}
.toast.show{opacity:1;transform:translateY(0);}
.toast.success{background:#166534;}
.toast.error{background:#991b1b;}
.toast{padding-left:40px;overflow:hidden;}
.toast-close{position:absolute;top:6px;left:6px;width:22px;height:22px;border:0;background:rgba(255,255,255,.15);color:#fff;border-radius:6px;cursor:pointer;line-height:22px;font-size:16px;}
.toast-progress{position:absolute;left:0;right:0;bottom:0;height:3px;background:rgba(255,255,255,.2);}
.toast-progress-bar{height:100%;width:100%;background:rgba(255,255,255,.7);transition:width .1s linear;}
.idle-warning{
  position:fixed;
  top:14px;
  left:50%;
  transform:translateX(-50%) translateY(-14px);
  background:#fff7ed;
  border:1px solid #fdba74;
  color:#9a3412;
  border-radius:12px;
  padding:10px 14px;
  box-shadow:0 12px 28px rgba(15,23,42,.14);
  z-index:1300;
  display:flex;
  align-items:center;
  gap:10px;
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease, transform .2s ease;
}
.idle-warning.show{
  opacity:1;
  transform:translateX(-50%) translateY(0);
  pointer-events:auto;
}
.idle-warning-action{
  border:0;
  background:#ea580c;
  color:#fff;
  border-radius:10px;
  height:32px;
  padding:0 12px;
  font-weight:700;
  cursor:pointer;
}

.agreement-section{display:grid;gap:16px;}
.agreement-block{padding:12px;border:1px dashed #e5e7eb;border-radius:14px;background:#f8fafc;}
.agreement-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;}
.agreement-head-title{display:flex;align-items:center;gap:8px;}
.agreement-view-toggle{width:28px;height:28px;border:1px solid #dbe3ef;background:#fff;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:#334155;}
.agreement-view-toggle:hover{border-color:#bfdbfe;color:#1d4ed8;}
.agreement-view-toggle svg{width:14px;height:14px;}
.agreement-split{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.agreement-section-stacked .agreement-split{grid-template-columns:1fr;gap:14px;}
.agreement-list{display:grid;gap:8px;}
.agreement-list-2col{grid-template-columns:repeat(2,minmax(0,1fr));}
.agreement-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:10px 12px;}
.agreement-view{display:block;}
.agreement-view-table{display:none;}
.agreement-block.table-view .agreement-view-card{display:none;}
.agreement-block.table-view .agreement-view-table{display:block;}
.agreement-mini-table{border:1px solid #dbe3ef;border-radius:12px;background:#fff;overflow:auto;}
.agreement-mini-table .amt-head,
.agreement-mini-table .amt-row{
  min-width:680px;
  display:grid;
  grid-template-columns:2fr 1.4fr 1.4fr 1fr 1fr;
  border-bottom:1px solid #eef2f7;
}
.agreement-mini-table .amt-row.amt-row-4,
.agreement-mini-table .amt-head + .amt-row.amt-row-4,
.agreement-mini-table .amt-head.amt-head-4{
  grid-template-columns:2fr 1.4fr 1.4fr 1fr;
}
.agreement-mini-table .amt-row.amt-row-3,
.agreement-mini-table .amt-head + .amt-row.amt-row-3,
.agreement-mini-table .amt-head.amt-head-3{
  grid-template-columns:2fr 1.4fr 1.4fr;
}
.agreement-mini-table .amt-row.amt-row-5,
.agreement-mini-table .amt-head + .amt-row.amt-row-5,
.agreement-mini-table .amt-head.amt-head-5{
  grid-template-columns:1.2fr 1.5fr 1.2fr 1.2fr 1.9fr;
}
.agreement-mini-table .amt-row.amt-row-7,
.agreement-mini-table .amt-head + .amt-row.amt-row-7,
.agreement-mini-table .amt-head.amt-head-7{
  grid-template-columns:1.1fr 1.1fr 1.1fr .9fr 1.6fr 1.4fr 2fr;
}
.agreement-mini-table .amt-head{background:#f8fafc;font-weight:700;}
.agreement-mini-table .amt-head > div,
.agreement-mini-table .amt-row > div{padding:8px 10px;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.agreement-mini-table[data-sort-enabled="1"] .amt-head > div[data-sort-key]{
  cursor:pointer;
  user-select:none;
  display:inline-flex;
  align-items:center;
  gap:5px;
}
.agreement-mini-table[data-sort-enabled="1"] .amt-head > div[data-sort-dir="asc"]::after{
  content:"\25B2";
  position:static;
  font-size:10px;
  color:#2563eb;
}
.agreement-mini-table[data-sort-enabled="1"] .amt-head > div[data-sort-dir="desc"]::after{
  content:"\25BC";
  position:static;
  font-size:10px;
  color:#2563eb;
}
.agreement-mini-table .amt-row:last-child{border-bottom:0;}
.agreement-mini-table .amt-row.amt-sum{background:#f8fafc;font-weight:700;}
.agreement-block.table-view .agreement-list-2col{grid-template-columns:1fr;}
.agreement-block.table-view .agreement-list-2col .agreement-card{border-radius:8px;padding:8px 10px;display:grid;gap:4px;}
.agreement-block.table-view .agreement-list-2col .agreement-title{font-size:13px;}
.agreement-block.table-view .agreement-list-2col .agreement-meta,
.agreement-block.table-view .agreement-list-2col .agreement-sub{font-size:12px;}
.my-projects-card-list .agreement-caption{
  font-size:13px;
  font-weight:700;
}

/* Keep table mode fully inside the agreement card (dashboard agreements page) */
.agreement-section,
.agreement-section .agreement-block,
.agreement-section .agreement-split,
.agreement-section .agreement-split > div,
.agreement-section .agreement-view,
.agreement-section .agreement-view-table{min-width:0;}
.agreement-section .agreement-block{max-width:100%;overflow-x:hidden;}
.agreement-section .agreement-mini-table{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  overflow-x:auto;
  overflow-y:hidden;
}
.agreement-section .agreement-mini-table .amt-head,
.agreement-section .agreement-mini-table .amt-row{min-width:max(100%,680px);}
.score-page [data-project-brief-id="score-project-brief"] .agreement-mini-table .amt-head > div,
.score-page [data-project-brief-id="score-project-brief"] .agreement-mini-table .amt-row > div{
  white-space:normal;
  overflow:visible;
  text-overflow:unset;
  line-height:1.7;
}
.score-page [data-project-brief-id="score-project-brief"] .agreement-card .agreement-sub{
  white-space:normal;
  line-height:1.8;
}

/* Employee dashboard redesign */
.dash-nav{display:flex;gap:8px;flex-wrap:wrap;margin:6px 0 16px;}
.dash-nav-link{padding:8px 14px;border-radius:999px;border:1px solid var(--border);background:#f8fafc;text-decoration:none;color:#0f172a;font-size:13px;}
.dash-nav-link:hover{background:#eef2ff;}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px;}
.section-head h3{margin:0;font-size:16px;}
.section-desc{color:var(--muted);font-size:12px;margin-top:4px;}
.dash-overview .overview-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;}
.stat-card{background:#f8fafc;border:1px solid var(--border);border-radius:14px;padding:12px;display:grid;gap:6px;}
.stat-label{color:#64748b;font-size:12px;}
.stat-value{font-size:20px;font-weight:700;color:#0f172a;}
.stat-sub{color:#94a3b8;font-size:12px;}

.agreement-center .agreement-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.pill-tabs{display:flex;gap:6px;}
.pill-tabs .pill{border:1px solid var(--border);background:#f8fafc;border-radius:999px;padding:8px 14px;font-size:13px;cursor:pointer;}
.pill-tabs .pill.active{background:var(--primary);border-color:var(--primary);color:#fff;box-shadow:var(--shadow);}
.search-field input{width:220px;min-width:160px;padding:8px 12px;border-radius:999px;}

.agreement-panels{display:grid;gap:14px;}
.agreement-panel{display:none;gap:14px;}
.agreement-panel.active{display:grid;}
.agreement-card-large{border:1px solid var(--border);border-radius:16px;background:#fff;padding:14px;display:grid;gap:12px;}
.agreement-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
.agreement-title{font-weight:700;}
.agreement-meta{font-size:12px;}
.agreement-badges{display:flex;gap:6px;flex-wrap:wrap;}
.badge{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;background:#f1f5f9;color:#334155;font-size:12px;}
.badge-active{background:#ecfdf3;color:#166534;border:1px solid #bbf7d0;}
.badge-finished{background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe;}

.agreement-columns{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.agreement-col-title{font-weight:600;font-size:13px;margin-bottom:8px;color:#334155;}
.project-grid{display:grid;gap:10px;}
.project-card{border:1px solid #e5e7eb;border-radius:12px;padding:10px;background:#fff;display:grid;gap:6px;}
.project-card.subtle{background:#f9fafb;}
.project-top{display:flex;align-items:center;justify-content:space-between;gap:8px;}
.project-name{font-weight:600;font-size:14px;}
.project-value{font-size:12px;color:#64748b;background:#f1f5f9;border-radius:999px;padding:2px 8px;}
.project-meta{display:flex;gap:8px;flex-wrap:wrap;color:#64748b;font-size:12px;}
.project-note{color:#475569;font-size:12px;background:#f8fafc;border:1px dashed #e2e8f0;padding:6px 8px;border-radius:10px;}
.project-tags{display:flex;gap:6px;flex-wrap:wrap;}
.project-tags .tag{background:#eef2ff;color:#1d4ed8;padding:3px 8px;border-radius:999px;font-size:11px;}
.project-members{display:flex;gap:6px;flex-wrap:wrap;}
.member-pill{background:#f1f5f9;color:#0f172a;padding:2px 8px;border-radius:999px;font-size:11px;}
.empty-state{color:#94a3b8;font-size:13px;background:#f8fafc;border:1px dashed #e2e8f0;border-radius:12px;padding:12px;text-align:center;}

.agreement-history-item{border:1px solid var(--border);border-radius:14px;background:#fff;padding:10px;}
.agreement-history-item summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;}
.agreement-history-item summary::-webkit-details-marker{display:none;}
.agreement-history-item .summary-score{font-weight:600;color:#0f172a;background:#f1f5f9;border-radius:999px;padding:4px 10px;font-size:12px;}
.agreement-history-item[open]{box-shadow:var(--shadow);}
.agreement-history-item .project-grid{margin-top:10px;}

.agreement-timeline{margin-top:16px;display:grid;gap:10px;}
.agreement-table .thead,.agreement-table .row{grid-template-columns:2fr 1fr 1fr 1fr 1.4fr;}
.agreement-table .row{align-items:center;}

.scoring-card .member-grid{margin-top:10px;}

.report-matrix-wrap{
  overflow-x:auto;
  overflow-y:hidden;
  border:1px solid #dbe3ef;
  border-radius:12px;
  background:#fff;
}
.report-matrix{
  width:max-content;
  min-width:100%;
  border-collapse:collapse;
}
.report-matrix th,
.report-matrix td{
  border:1px solid #e5e7eb;
  padding:8px 10px;
  text-align:center;
  white-space:nowrap;
  font-size:12px;
}
.report-matrix thead th{
  background:#f8fafc;
  font-weight:800;
  position:sticky;
  top:0;
  z-index:2;
}
.report-matrix th:first-child,
.report-matrix td:first-child{
  position:sticky;
  right:0;
  z-index:1;
  background:#f8fafc;
  font-weight:700;
}
.report-matrix thead th:first-child{
  z-index:3;
}
.report-matrix .matrix-row-summary td{
  background:#ffe9d5;
  font-weight:800;
}
.report-matrix .matrix-row-final td{
  background:#dbeafe;
  font-weight:800;
}

/* Dashboard scoring role visual separation */
.score-role-panel{
  border:1px solid #dbe3ef;
  border-radius:14px;
  padding:10px 12px;
  margin:10px 0;
}
.score-role-panel.role-pm{
  background:#eff6ff;
  border-color:#bfdbfe;
}
.score-role-panel.role-lead{
  background:#fef2f2;
  border-color:#fecaca;
}

@media (max-width:1024px){
  .agreement-columns{grid-template-columns:1fr;}
}
@media (max-width:720px){
  .agreement-table .thead,.agreement-table .row{grid-template-columns:1.6fr 1fr 1fr;}
  .agreement-table .thead div:nth-child(4),
  .agreement-table .thead div:nth-child(5),
  .agreement-table .row div:nth-child(4),
  .agreement-table .row div:nth-child(5){display:none;}
}
.agreement-title{font-weight:700;margin-bottom:4px;}
.agreement-meta{font-size:12px;color:#6b7280;margin-bottom:4px;}
.agreement-sub{font-size:12px;color:#334155;}
@media (max-width:1024px){
  .agreement-split{grid-template-columns:1fr;}
  .agreement-list-2col{grid-template-columns:1fr;}
  .agreement-mini-table .amt-head,
  .agreement-mini-table .amt-row{min-width:640px;}
}
.agreement-layout{display:flex;gap:16px;align-items:flex-start;min-width:0;}
.agreement-main{flex:1 1 auto;min-width:0;}
.agreement-side{
  flex:0 0 clamp(180px,18vw,260px);
  min-width:180px;
  max-width:260px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px;
  box-shadow:var(--shadow);
  position:sticky;
  top:calc(var(--agreement-toolbar-h,56px) + 8px);
  max-height:calc(100vh - (var(--agreement-toolbar-h,56px) + 16px));
  align-self:flex-start;
  overflow:visible;
  z-index:40;
}
.agreement-side-toggle{
  position:absolute;
  left:10px;
  top:10px;
  width:24px;
  height:24px;
  border:1px solid #dbe3ef;
  border-radius:999px;
  background:#eef2f7;
  color:#475569;
  cursor:pointer;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  z-index:4;
  box-shadow:none;
  font-size:12px;
  line-height:1;
}
.agreement-side-toggle .side-toggle-close{display:none;}
.agreement-side.is-collapsed .side-toggle-open{display:none;}
.agreement-side.is-collapsed .side-toggle-close{display:inline;}
.agreement-side-title{
  font-weight:700;
  margin-bottom:6px;
  padding-left:30px;
}
.agreement-side-hint{font-size:12px;color:#6b7280;margin-bottom:10px;}
.agreement-side-scroll{
  min-height:0;
  max-height:calc(100vh - (var(--agreement-toolbar-h,56px) + 82px));
  overflow-x:visible;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:none;
  -ms-overflow-style:none;
}
.agreement-side-scroll::-webkit-scrollbar{
  width:0;
  height:0;
}
.member-bars{display:grid;gap:6px;position:relative;}
.member-bars-head{display:grid;grid-template-columns:1fr 52px;gap:6px;font-size:12px;color:#475569;font-weight:700;margin-bottom:2px;}
.member-bars-score-title{text-align:center;}
.member-bars-share-title{text-align:right;}
.member-bar{display:grid;grid-template-columns:1fr 52px;gap:6px;align-items:center;cursor:pointer;}
.member-bar.selected .member-bar-label{color:#b91c1c;}
.member-bar.selected .member-bar-track{border-color:#ef4444;}
.member-bar.selected{border-radius:10px;}
.member-bar.selected .member-bar-info{
  border:2px solid #ef4444;
  border-radius:12px;
  background:#fff;
  padding:4px 6px;
}
.member-bar-score-cell{display:flex;align-items:center;justify-content:center;background:transparent;border:0;border-radius:0;padding:0;}
.member-bar-score-pill{display:inline-flex;align-items:center;justify-content:center;min-width:36px;height:32px;border-radius:8px;background:#e2e8f0;color:#0f172a;font-weight:700;border:1px solid #cbd5e1;}
.member-bar-info{display:grid;gap:4px;}
.member-bar-label{
  font-size:12px;
  font-weight:600;
  color:#0f172a;
  border:1px solid #d7dfeb;
  background:#fff;
  border-radius:10px;
  padding:5px 8px;
}
.member-bar-track{background:#f1f5f9;border-radius:999px;height:8px;overflow:hidden;border:1px solid #e5e7eb;}
.member-bar-fill{height:100%;}
.member-bar-fill.under{background:#f59e0b;}
.member-bar-fill.full{background:#16a34a;}
.member-bar-fill.over{background:#ef4444;}
.member-bar-value{font-size:11px;color:#64748b;}
.agreement-side.is-collapsed{
  flex-basis:58px;
  min-width:58px;
  max-width:58px;
  padding:10px 8px;
}
.agreement-side.is-collapsed .agreement-side-toggle{
  left:50%;
  transform:translateX(-50%);
}
.agreement-side.is-collapsed .agreement-side-title,
.agreement-side.is-collapsed .agreement-side-hint{display:none;}
.agreement-side.is-collapsed .agreement-side-scroll{
  max-height:calc(100vh - (var(--agreement-toolbar-h,56px) + 40px));
  overflow-y:auto;
  padding-top:48px;
}
.member-bars.member-bars-compact{
  display:grid;
  justify-items:center;
  align-content:flex-start;
  gap:8px;
}
.member-avatar-item{
  width:40px;
  height:40px;
  border:0;
  padding:0;
  margin:0;
  background:transparent;
  border-radius:50%;
  position:relative;
  cursor:pointer;
  z-index:1;
}
.member-avatar-item.selected{
  outline:none;
  box-shadow:none;
}
.member-avatar-item.selected .member-avatar-img,
.member-avatar-item.selected .member-avatar-fallback{
  border-color:#ef4444;
  border-width:1px;
}
.member-avatar-img,
.member-avatar-fallback{
  width:40px;
  height:40px;
  border-radius:50%;
  border:1px solid #cbd5e1;
  background:#f8fafc;
  display:block;
}
.member-avatar-img{object-fit:cover;}
.member-avatar-fallback{position:relative;}
.member-avatar-fallback::before{
  content:'';
  position:absolute;
  top:8px;
  left:12px;
  width:12px;
  height:12px;
  border:2px solid #64748b;
  border-radius:50%;
  box-sizing:border-box;
}
.member-avatar-fallback::after{
  content:'';
  position:absolute;
  left:8px;
  bottom:6px;
  width:18px;
  height:10px;
  border:2px solid #64748b;
  border-top:0;
  border-radius:0 0 10px 10px;
  box-sizing:border-box;
}
.member-avatar-portal{
  position:fixed;
  min-width:128px;
  max-width:165px;
  background:#fff;
  border:1px solid #dbe3ef;
  border-radius:12px;
  box-shadow:0 12px 28px rgba(15,23,42,0.18);
  padding:8px 10px;
  display:block;
  text-align:right;
  pointer-events:none;
  z-index:4000;
  transform:translateY(-50%);
}
.member-avatar-portal[hidden]{display:none!important;}
.member-avatar-portal.is-selected{
  border-color:#ef4444;
  box-shadow:0 12px 28px rgba(239,68,68,0.18);
}
.member-avatar-portal.is-selected .member-avatar-name{color:#b91c1c;}
.member-avatar-portal-body{
  display:grid;
  gap:6px;
  min-width:0;
}
.member-avatar-name{
  font-size:12px;
  font-weight:700;
  color:#0f172a;
  white-space:normal;
  line-height:1.45;
}
.member-avatar-share-track{
  height:7px;
  border:1px solid #e2e8f0;
  border-radius:999px;
  overflow:hidden;
  background:#f8fafc;
}
.member-avatar-share-fill{display:block;height:100%;}
.member-avatar-share-fill.under{background:#f59e0b;}
.member-avatar-share-fill.full{background:#16a34a;}
.member-avatar-share-fill.over{background:#ef4444;}
.member-avatar-share-value{font-size:11px;color:#64748b;}
.status-chip.warn{background:#fff7ed;color:#9a3412;}
.agreement-table .member-row [data-role="member-user-text"]{
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#fff;
}
.agreement-table .member-row [data-role="member-user-text"].selected-member{
  border-color:#ef4444;
  box-shadow:inset 0 0 0 1px #ef4444;
  color:#b91c1c;
  font-weight:700;
}
.agreement-table .member-row [data-role="member-user-text"]:disabled{
  opacity:1;
  color:#0f172a;
  border-color:#d1d5db;
  background:#f8fafc;
}
.agreement-table .member-row [data-role="member-user-text"].selected-member:disabled{
  border-color:#ef4444;
  box-shadow:inset 0 0 0 1px #ef4444;
  color:#b91c1c;
  background:#fff;
}
@media (max-width:1200px){
  .agreement-side:not(.is-collapsed){flex-basis:22%;max-width:280px;}
}
@media (max-width:1024px){
  .agreement-layout{flex-direction:column;}
  .agreement-side{
    width:100%;
    max-width:none;
    position:static;
    max-height:none;
    overflow:visible;
  }
  .agreement-side-toggle{display:none;}
  .agreement-side-scroll{
    max-height:none;
    overflow-y:visible;
  }
  .agreement-side.is-collapsed{
    width:100%;
    min-width:0;
    max-width:none;
    padding:12px;
  }
  .agreement-side.is-collapsed .agreement-side-title,
  .agreement-side.is-collapsed .agreement-side-hint{display:block;}
  .agreement-side.is-collapsed .agreement-side-scroll{overflow-y:visible;max-height:none;}
  .member-bars.member-bars-compact{justify-items:stretch;gap:6px;}
  .member-avatar-item{
    width:100%;
    height:auto;
    border:1px solid #e2e8f0;
    border-radius:10px;
    padding:6px;
    display:grid;
    grid-template-columns:32px 1fr;
    gap:8px;
    align-items:center;
    background:#fff;
  }
  .member-avatar-portal{display:none!important;}
}


.compact-row td{padding:6px 10px;vertical-align:middle;}
.compact-inline{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px;}
.compact-chip{display:inline-flex;align-items:center;border:1px solid #e2e8f0;background:#fff;border-radius:999px;padding:2px 8px;font-size:11px;margin-left:4px;}
.icon-btn.active{background:#eef2ff;color:#1d4ed8;border:1px solid #c7d2fe;}

/* Sidebar expanded: free more width for agreement grid to avoid horizontal overflow */
html:not(.sidebar-collapsed) .agreement-side:not(.is-collapsed){
  flex:0 0 clamp(150px, 14vw, 210px);
  min-width:150px;
  max-width:210px;
}

/* Score page sticky top areas */
body.score-sticky-page .topbar{
  position:sticky;
  top:0;
  z-index:220;
  margin-bottom:0;
}
body.score-sticky-page .score-page .page-head{
  position:sticky;
  top:calc(var(--score-topbar-h, 72px) - 1px);
  z-index:210;
  background:var(--bg);
  padding:10px 0 8px;
  margin:0 0 10px;
}

/* Project accordion in score page */
.project-accordion-card{
  padding:10px 12px;
}
.project-accordion{
  width:100%;
}
.project-accordion-summary{
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  cursor:pointer;
  user-select:none;
  font-weight:700;
  color:#0f172a;
}
.project-accordion-summary::-webkit-details-marker{
  display:none;
}
.project-accordion-icon{
  width:24px;
  height:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #dbe3ef;
  border-radius:8px;
  background:#f8fafc;
  color:#475569;
  transition:transform .2s ease;
}
.project-accordion-icon svg{
  width:16px;
  height:16px;
}
.project-accordion[open] .project-accordion-icon{
  transform:rotate(180deg);
}
.project-accordion-body{
  margin-top:10px;
}

.pm-breakdown-trigger{
  color:#1d4ed8;
  font-weight:700;
}
.modal-card.modal-lg.pm-breakdown-modal-card{
  width:min(1320px, calc(100vw - 24px));
  max-width:calc(100vw - 24px);
  max-height:88vh;
}
.modal-card.modal-lg.detail-modal-card{
  width:min(1480px, calc(100vw - 24px));
  max-width:calc(100vw - 24px);
  max-height:90vh;
}
.detail-modal-card .detail-section{
  min-height:0;
  overflow:auto;
  padding-left:2px;
}
.detail-modal-card .history-meta{
  display:grid;
  grid-template-columns:repeat(3, minmax(160px,1fr));
  gap:8px 12px;
  align-items:start;
}
.detail-modal-card .history-meta span{
  white-space:nowrap;
  line-height:1.6;
}
.detail-modal-card #detailZPm{
  grid-column:1 / -1;
  white-space:normal;
  word-break:break-word;
}
.detail-modal-card .history-table .thead,
.detail-modal-card .history-table .row{
  grid-template-columns:minmax(220px,2.3fr) minmax(90px,.7fr) minmax(340px,3fr) minmax(185px,1.8fr) minmax(105px,.95fr) minmax(105px,.95fr);
}
.detail-modal-card .history-table .thead > div:first-child,
.detail-modal-card .history-table .row > div:first-child{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.detail-modal-card .history-table .row.history-total > div{
  white-space:nowrap;
}
.detail-modal-card #pmBreakdownBtn{
  min-width:260px;
}
.detail-modal-card #pmName{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:normal;
  line-height:1.45;
  max-height:2.9em;
}
.pm-breakdown-wrap{
  overflow:hidden;
}
.pm-breakdown-table{
  width:100%;
  border-collapse:collapse;
  table-layout:auto;
}
.pm-breakdown-table th,
.pm-breakdown-table td{
  border:1px solid #d9e2ec;
  padding:7px 8px;
  text-align:center;
  font-size:12px;
  word-break:break-word;
}
.pm-breakdown-table thead th{
  background:#f1f5f9;
  font-weight:700;
}
.pm-breakdown-table thead th[colspan="2"]{
  min-width:190px;
}
.pm-breakdown-table th:last-child,
.pm-breakdown-table td:last-child{
  min-width:150px;
}
.pm-breakdown-head-cell{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:normal;
  line-height:1.45;
  max-height:2.9em;
}
.pm-breakdown-table tbody td:first-child,
.pm-breakdown-table tfoot td:first-child{
  text-align:right;
  font-weight:600;
}
.pm-breakdown-table .no-pm-share-row td{
  background:#f3f4f6;
  color:#6b7280;
}
.history-table .thead > div.pm-col-clickable,
.history-table .row > div.pm-col-clickable{
  cursor:pointer;
}
.history-table .thead > div.pm-col-clickable:hover,
.history-table .row > div.pm-col-clickable:hover{
  background:#eff6ff;
}
.agreement-score-clickable{
  cursor:pointer;
}
.agreement-score-clickable:hover{
  color:#1d4ed8;
}
.history-table .row.agreement-score-clickable:hover{
  background:#eff6ff;
}
.agreement-breakdown-table th:nth-child(2),
.agreement-breakdown-table td:nth-child(2),
.agreement-breakdown-table th:nth-child(3),
.agreement-breakdown-table td:nth-child(3){
  white-space:nowrap;
}

.pm-breakdown-mobile{
  display:grid;
  gap:10px;
}
.pm-breakdown-mobile-card{
  border:1px solid #d9e2ec;
  border-radius:10px;
  background:#fff;
  padding:10px;
  display:grid;
  gap:8px;
}
.pm-breakdown-mobile-title{
  font-weight:700;
  color:#0f172a;
}
.pm-breakdown-mobile-grid{
  display:grid;
  gap:8px;
}
.pm-breakdown-mobile-item{
  border:1px solid #e5e7eb;
  border-radius:8px;
  padding:8px;
  display:grid;
  gap:3px;
  font-size:13px;
}
.pm-breakdown-mobile-pm{
  font-weight:700;
}
.pm-breakdown-mobile-final,
.pm-breakdown-mobile-summary{
  font-size:13px;
  color:#0f172a;
}

@media (max-width: 768px){
  .detail-modal-card{
    width:calc(100vw - 8px);
    max-height:94vh;
  }
  .detail-modal-card .detail-section{
    overflow:auto;
  }
  .detail-modal-card .history-meta{
    grid-template-columns:1fr;
  }
  .detail-modal-card .history-meta span{
    white-space:normal;
  }
  .pm-breakdown-modal-card{
    width:96vw;
    margin:2vh auto;
    max-height:94vh;
  }
  .pm-breakdown-wrap{
    overflow:auto;
  }
  .pm-breakdown-table{
    display:none;
  }
}

/* Incident evaluator page */
.incident-eval-page{
  display:grid;
  gap:14px;
}
.incident-eval-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  flex-wrap:wrap;
}
.incident-back-btn{
  min-width:96px;
  background:#f8fafc;
  color:#1d4ed8;
  font-size:16px;
  font-weight:700;
  line-height:1.2;
  padding:10px 20px;
}
.incident-head-copy{
  display:grid;
  gap:6px;
  text-align:right;
}
.incident-head-copy h1{
  margin:0;
  font-size:24px;
  line-height:1.25;
  letter-spacing:-0.2px;
}
.incident-head-copy p{
  margin:0;
  color:#64748b;
  font-size:16px;
}
.incident-meta-sep{
  display:inline-block;
  margin:0 8px;
  color:#94a3b8;
}

.incident-filter-card{
  padding:12px 16px;
}
.incident-list-filter{
  border-bottom:1px solid #edf2f7;
}
.incident-filter-form{
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.incident-filter-label{
  display:grid;
  gap:6px;
  min-width:190px;
  color:#334155;
  font-weight:600;
  font-size:15px;
}
.incident-filter-form select{
  min-height:44px;
  border-radius:12px;
  font-size:15px;
}
.incident-filter-form .btn{
  min-height:44px;
  padding:0 18px;
  font-size:16px;
}

.incident-create-card{
  padding:0;
  overflow:visible;
}
.incident-section-head{
  padding:16px 20px;
  border-bottom:1px solid #edf2f7;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.incident-section-head h2{
  margin:0;
  font-size:22px;
  line-height:1.2;
}
.incident-create-form{
  padding:16px 20px 10px;
}
.incident-create-grid{
  display:grid;
  grid-template-columns:minmax(320px, 1fr) minmax(420px, 1.2fr);
  gap:16px;
  align-items:stretch;
}
.incident-create-notes{
  display:grid;
  gap:12px;
  grid-template-rows:auto 1fr;
}
.incident-main-fields{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.incident-kpi-select-field{
  display:grid;
  gap:6px;
  color:#0f172a;
  font-size:15px;
  font-weight:700;
}
.incident-fields-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  align-items:start;
}
.incident-create-form .incident-fields-grid > label{
  min-height:108px;
  align-content:start;
}
.incident-fields-grid label,
.incident-description-field,
.incident-delete-form label{
  display:grid;
  gap:6px;
  color:#0f172a;
  font-size:15px;
  font-weight:700;
}
.incident-fields-grid label span,
.incident-description-field span,
.incident-delete-form label span{
  color:#0f172a;
  font-size:15px;
}
.incident-fields-grid input,
.incident-fields-grid select,
.incident-kpi-select-field select,
.incident-description-field textarea,
.incident-delete-form input{
  min-height:52px;
  border-radius:16px;
  border:1px solid #dbe3ef;
  background:#fff;
  box-shadow:inset 0 1px 1px rgba(15,23,42,0.04);
  font-size:15px;
  line-height:1.35;
  padding:12px 14px;
}
.incident-input-hint{
  color:#64748b;
  font-size:12px;
  line-height:1.35;
}
.incident-description-field textarea{
  min-height:190px;
  max-height:220px;
  resize:vertical;
  padding-top:12px;
}
.incident-description-field.compact textarea{
  min-height:140px;
}
.incident-submit-wrap{
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  margin-top:auto;
  padding-top:2px;
}
.incident-submit-btn{
  min-width:180px;
  height:52px;
  border-radius:16px;
  font-size:18px;
  font-weight:800;
  background:linear-gradient(120deg, #3b82f6 0%, #2563eb 100%);
  color:#fff;
  border:0;
  box-shadow:0 12px 24px rgba(37, 99, 235, 0.25);
}
.incident-create-form .incident-evidence-field{
  gap:8px;
}
.incident-create-form .incident-evidence-field .iu-field{
  width:100%;
}
.incident-create-form .incident-evidence-field .iu-field-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:center;
  gap:8px;
}
.incident-create-form .incident-evidence-field .iu-trigger{
  min-height:52px;
}

.incident-list-card{
  padding:0;
  overflow:hidden;
}
.incident-empty-state{
  padding:34px 12px 36px;
  text-align:center;
  color:#64748b;
}
.incident-empty-state svg{
  width:48px;
  height:48px;
  display:block;
  margin:0 auto 10px;
  color:#b8c3da;
}
.incident-empty-state p{
  margin:0;
  font-size:20px;
}
.incident-classic-table{
  padding:14px 20px 20px;
  overflow:auto;
}
.incident-list-block .incident-view-card{
  display:block;
  padding:14px 20px 20px;
}
.incident-list-block.table-view .incident-view-card{
  display:none;
}
.incident-list-block:not(.table-view) .incident-view-table{
  display:none;
}
.incident-classic-table table{
  min-width:760px;
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  border:1px solid #dbe3ef;
  border-radius:14px;
  overflow:hidden;
  background:#fff;
  font-size:14px;
}
.incident-classic-table thead th{
  background:#f8fafc;
  color:#334155;
  font-weight:700;
  border:0;
  border-bottom:1px solid #e2e8f0;
  padding:10px 12px;
  text-align:center;
}
.incident-classic-table tbody td{
  border:0;
  border-bottom:1px solid #edf2f7;
  padding:10px 12px;
  text-align:center;
  color:#0f172a;
}
.incident-classic-table tbody tr:last-child td{
  border-bottom:0;
}
.incident-classic-table tbody tr:nth-child(even){
  background:#fcfdff;
}
.incident-table-row{
  cursor:pointer;
}
.incident-table-row:hover{
  background:#eff6ff !important;
}
.incident-table-row:focus{
  outline:2px solid #bfdbfe;
  outline-offset:-2px;
}
.incident-cards-grid{
  margin:0;
  align-items:start;
}
.incident-card-item{
  cursor:pointer;
  display:grid;
  gap:10px;
  padding:12px 14px;
  border:1px solid #dbe3ef;
  border-radius:14px;
  background:#fff;
  box-shadow:0 2px 10px rgba(15,23,42,0.04);
  align-content:start;
}
.incident-card-item:hover{
  border-color:#bfdbfe;
  box-shadow:0 10px 24px rgba(37,99,235,0.10);
}
.incident-card-item:focus{
  outline:2px solid #bfdbfe;
  outline-offset:1px;
}
.incident-card-head{
  display:flex;
  align-items:center;
  gap:6px;
  justify-content:flex-start;
  min-height:26px;
}
.incident-card-meta-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:8px 12px;
  padding-top:6px;
  border-top:1px dashed #e8edf5;
}
.incident-card-meta-item{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
}
.incident-card-meta-item .agreement-caption{
  font-size:12px;
  color:#64748b;
  font-weight:600;
  flex:0 0 auto;
}
.incident-card-meta-item strong{
  font-size:13px;
  color:#0f172a;
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  min-width:0;
}
.incident-card-desc{
  margin:0;
  padding-top:6px;
  border-top:1px dashed #e8edf5;
  color:#1e293b;
  font-size:13px;
  line-height:1.9;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.incident-item{
  border:1px solid #e5eaf2;
  border-radius:14px;
  padding:10px 12px;
  background:#fff;
}
.incident-item-summary{
  list-style:none;
  cursor:pointer;
  display:grid;
  gap:7px;
}
.incident-item-summary::-webkit-details-marker{
  display:none;
}
.incident-item-top{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}
.incident-item-top strong{
  font-size:15px;
}
.incident-item-meta{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  color:#64748b;
  font-size:12px;
}
.incident-item-attachment,
.incident-existing-attachment{
  margin-top:8px;
}
.incident-item-attachment img,
.incident-existing-attachment img{
  display:block;
  width:120px;
  height:84px;
  object-fit:cover;
  border-radius:10px;
  border:1px solid #dbe3ef;
}
.incident-item-body{
  display:grid;
  gap:12px;
  margin-top:12px;
  padding-top:12px;
  border-top:1px dashed #e2e8f0;
}
.modal.with-backdrop.incident-detail-modal .modal-card{
  width:min(980px, 94vw);
  max-width:94vw;
  max-height:90vh;
  display:flex;
  flex-direction:column;
  margin:5vh auto;
  padding:16px 18px;
}
.modal.with-backdrop.incident-detail-modal .modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-bottom:10px;
  border-bottom:1px solid #e5e7eb;
}
.modal.with-backdrop.incident-detail-modal .modal-body{
  overflow:auto;
  display:grid;
  gap:12px;
  padding-top:10px;
}
.incident-modal-content{
  display:grid;
  gap:10px;
}
.incident-modal-content .incident-item-meta{
  font-size:13px;
}
.incident-modal-content .incident-item-body{
  border-top:1px dashed #e2e8f0;
  padding-top:10px;
}
.modal.with-backdrop.incident-image-modal .modal-card{
  width:min(980px, 94vw);
  max-width:94vw;
  max-height:90vh;
  display:flex;
  flex-direction:column;
  margin:5vh auto;
  padding:12px 14px;
}
.modal.with-backdrop.incident-image-modal .modal-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  border-bottom:1px solid #e5e7eb;
  padding-bottom:10px;
}
.modal.with-backdrop.incident-image-modal .modal-body{
  padding-top:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:auto;
}
#incidentImagePreview{
  max-width:100%;
  max-height:72vh;
  width:auto;
  height:auto;
  border-radius:10px;
  border:1px solid #dbe3ef;
  background:#fff;
}
.incident-edit-form{
  display:grid;
  gap:12px;
}
.incident-delete-form{
  display:grid;
  gap:8px;
  border-top:1px solid #eef2f7;
  padding-top:12px;
}

/* Advanced image uploader */
html.iu-booting input[type="file"][data-iu-target]{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  margin:0 !important;
  padding:0 !important;
  opacity:0 !important;
  pointer-events:none !important;
}
.iu-hidden-input{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  margin:0 !important;
  padding:0 !important;
  opacity:0 !important;
  pointer-events:none !important;
}
.iu-field{
  width:100%;
}
.iu-field-row{
  display:flex;
  align-items:center;
  gap:8px;
}
.iu-trigger{
  width:100%;
  flex:1 1 auto;
  min-height:52px;
  border:1px solid #dbe3ef;
  border-radius:14px;
  background:#fff;
  padding:10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  cursor:pointer;
  font-family:inherit;
}
.iu-trigger-main{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.iu-trigger-icon{
  color:#64748b;
  font-size:18px;
  line-height:1;
}
.iu-trigger-preview{
  color:#334155;
  font-size:13px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.iu-trigger-thumb{
  width:38px;
  height:38px;
  border-radius:10px;
  object-fit:cover;
  border:1px solid #dbe3ef;
}
.iu-trigger-clear{
  white-space:nowrap;
  min-width:42px;
  width:42px;
  height:42px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.iu-trigger-action{
  min-width:42px;
  width:42px;
  height:42px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  line-height:1;
}
.iu-trigger-clear svg{
  display:block;
}
.iu-trigger-clear[hidden],
.iu-trigger-action[hidden]{
  display:none !important;
}
.iu-mobile-only{
  display:none;
}
.iu-viewer-modal .modal-backdrop{
  background:rgba(15,23,42,.62);
  backdrop-filter:blur(3px);
}
.modal.with-backdrop .iu-viewer-card{
  width:min(92vw, 980px);
  max-height:92vh;
  margin:4vh auto;
  padding:0;
  overflow:hidden;
}
.iu-viewer-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 16px;
  border-bottom:1px solid #e5e7eb;
}
.iu-viewer-head h3{
  margin:0;
  font-size:20px;
}
.iu-viewer-body{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:12px;
  background:#f8fafc;
}
.iu-viewer-body img{
  max-width:100%;
  max-height:68vh;
  width:auto;
  height:auto;
  border-radius:12px;
  border:1px solid #dbe3ef;
  background:#fff;
}
.iu-viewer-actions{
  padding:12px 16px;
  border-top:1px solid #e5e7eb;
  display:flex;
  justify-content:flex-end;
  gap:8px;
}
.iu-modal .modal-backdrop{
  background:rgba(15,23,42,.56);
  backdrop-filter:blur(4px);
}
.modal.with-backdrop .iu-modal-card{
  width:80vw;
  max-width:80vw;
  height:min(95dvh, calc(100dvh - 24px));
  max-height:95dvh;
  margin:12px auto;
  display:grid;
  grid-template-rows:auto auto minmax(0,1fr);
  padding:0;
  overflow:hidden;
}
.modal.with-backdrop .iu-modal-card.iu-step-1 .iu-pane[data-step="1"],
.modal.with-backdrop .iu-modal-card.iu-step-3 .iu-pane[data-step="3"]{
  overflow:visible;
}
.modal.with-backdrop .iu-modal-card.iu-step-2 .iu-pane[data-step="2"]{
  overflow:auto;
}
.iu-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 18px;
  border-bottom:1px solid #e5e7eb;
  background:linear-gradient(180deg,#f6f9ff 0%, #fff 100%);
}
.iu-title{
  margin:0;
  font-size:30px;
  font-weight:800;
}
.iu-close{
  border:1px solid #dbe3ef;
  background:#f8fafc;
  color:#64748b;
  width:40px;
  height:40px;
  border-radius:12px;
  cursor:pointer;
  font-size:24px;
  line-height:1;
}
.iu-steps{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:8px;
  padding:12px 18px;
  border-bottom:1px solid #eef2f7;
  background:#fff;
}
.iu-step{
  border:1px solid #dbe3ef;
  border-radius:12px;
  padding:7px 10px;
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:center;
  gap:8px;
  color:#64748b;
}
.iu-step span{
  width:24px;
  height:24px;
  border-radius:50%;
  border:1px solid #cbd5e1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:700;
  background:#fff;
}
.iu-step b{
  font-size:13px;
  font-weight:700;
}
.iu-step.active{
  border-color:#93c5fd;
  background:#eff6ff;
  color:#1d4ed8;
}
.iu-step.active span{
  border-color:#60a5fa;
}
.iu-step.done{
  border-color:#bbf7d0;
  background:#f0fdf4;
  color:#166534;
}
.iu-step.done span{
  border-color:#4ade80;
  color:#166534;
}
.iu-pane{
  padding:14px 18px 18px;
  min-height:0;
  overflow:hidden;
}
.iu-dropzone{
  border:2px dashed #c9daf7;
  border-radius:16px;
  background:linear-gradient(180deg,#f8fbff 0%, #f2f7ff 100%);
  padding:30px 20px;
  text-align:center;
  color:#475569;
}
.iu-dropzone.is-drag{
  border-color:#3b82f6;
  background:#e9f2ff;
}
.iu-dropzone h4{
  margin:8px 0 4px;
  font-size:22px;
}
.iu-dropzone p{
  margin:0 0 12px;
  font-size:14px;
}
.iu-drop-icon{
  font-size:42px;
  color:#7ea5df;
  line-height:1;
}
.iu-row{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
}
.iu-dropzone small{
  display:block;
  margin-top:10px;
  color:#64748b;
  font-size:12px;
}
.iu-file-meta{
  margin-top:8px;
  color:#334155;
  font-size:13px;
}
.iu-editor-wrap{
  display:grid;
  gap:12px;
}
.iu-editor-canvas{
  border:1px solid #dbe3ef;
  border-radius:14px;
  background:#fff;
  overflow:hidden;
  min-height:0;
}
.iu-editor-canvas canvas{
  width:auto;
  max-width:100%;
  height:auto;
  max-height:100%;
  display:block;
  margin:0 auto;
  cursor:grab;
  touch-action:none;
}
.iu-editor-canvas canvas.dragging{
  cursor:grabbing;
}
.iu-tools{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.iu-ratios{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.iu-ratios button,
.iu-icon-tools button{
  border:1px solid #dbe3ef;
  background:#f8fafc;
  color:#334155;
  border-radius:9px;
  min-width:44px;
  height:32px;
  padding:0 11px;
  font-family:inherit;
  font-size:13px;
  cursor:pointer;
}
.iu-ratios button.active{
  background:#e8efff;
  color:#1d4ed8;
  border-color:#93c5fd;
}
.iu-icon-tools{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.iu-quality-row{
  display:grid;
  gap:6px;
}
.iu-quality-row label{
  display:flex;
  justify-content:space-between;
  font-size:14px;
  font-weight:700;
  color:#334155;
}
.iu-editor-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
}
@media (min-width: 981px){
  .modal.with-backdrop .iu-modal-card.iu-step-2 .iu-pane[data-step="2"]{
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  .modal.with-backdrop .iu-modal-card.iu-step-2 .iu-editor-wrap{
    display:grid;
    grid-template-rows:minmax(0,1fr) auto auto auto;
    gap:12px;
    height:100%;
    min-height:0;
  }
  .modal.with-backdrop .iu-modal-card.iu-step-2 .iu-editor-canvas{
    height:100%;
    min-height:0;
    max-height:calc(95dvh - 300px);
  }
  .modal.with-backdrop .iu-modal-card.iu-step-2 .iu-editor-canvas canvas{
    max-height:calc(95dvh - 320px);
  }
}
.iu-confirm{
  display:grid;
  gap:12px;
  justify-items:center;
  text-align:center;
}
.iu-confirm img{
  max-width:min(340px, 85vw);
  max-height:340px;
  width:auto;
  height:auto;
  border-radius:14px;
  border:1px solid #dbe3ef;
}
.iu-final-meta{
  color:#334155;
  font-size:14px;
  font-weight:700;
}
.iu-progress-wrap{
  display:flex;
  align-items:center;
  gap:10px;
}
.iu-progress{
  width:62px;
  height:62px;
  transform:rotate(-90deg);
}
.iu-progress-bg{
  fill:none;
  stroke:#e2e8f0;
  stroke-width:8;
}
.iu-progress-fg{
  fill:none;
  stroke:#3b82f6;
  stroke-width:8;
  stroke-linecap:round;
  transition:stroke-dashoffset .2s ease;
}
#iuProgressText{
  font-size:16px;
  font-weight:800;
  color:#1d4ed8;
}
.iu-confirm-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:center;
}
@media (max-width: 980px){
  .iu-mobile-only{
    display:inline-flex;
  }
  .modal.with-backdrop.iu-modal{
    inset:0;
    overflow:hidden;
  }
  .modal.with-backdrop.iu-modal.open{
    display:flex;
    align-items:stretch;
    justify-content:stretch;
  }
  .modal.with-backdrop .iu-modal-card{
    width:100%;
    max-width:100%;
    min-height:100dvh;
    height:100dvh;
    max-height:100dvh;
    margin:0;
    border-radius:0;
    border:0;
    box-sizing:border-box;
    overflow-x:hidden;
    grid-template-rows:auto auto minmax(0,1fr);
  }
  .modal.with-backdrop.iu-modal .modal-backdrop{
    backdrop-filter:none;
  }
  .iu-header{
    padding:10px 12px;
  }
  .iu-title{
    font-size:22px;
    line-height:1.25;
  }
  .iu-steps{
    grid-template-columns:repeat(3, minmax(0,1fr));
    gap:6px;
    padding:8px 10px;
  }
  .iu-step{
    border-radius:10px;
    padding:5px 6px;
    gap:6px;
    justify-content:center;
  }
  .iu-step span{
    width:20px;
    height:20px;
    font-size:11px;
  }
  .iu-step b{
    font-size:12px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .iu-pane{
    padding:10px 12px 14px;
    overflow:auto;
  }
  .iu-dropzone{
    border-radius:12px;
    padding:18px 12px;
  }
  .iu-drop-icon{
    font-size:34px;
  }
  .iu-dropzone h4{
    margin:8px 0 6px;
    font-size:20px;
    line-height:1.45;
  }
  .iu-dropzone p{
    font-size:13px;
    margin:0 0 10px;
  }
  .iu-row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    width:100%;
  }
  .iu-row .btn{
    width:100%;
    min-height:42px;
    font-size:14px;
  }
  .iu-dropzone small{
    font-size:11px;
    line-height:1.5;
  }
  .iu-file-meta{
    font-size:12px;
  }
  .iu-editor-wrap{
    gap:10px;
  }
  .iu-editor-canvas{
    border-radius:12px;
  }
  .iu-editor-canvas canvas{
    width:100%;
    height:auto;
    max-height:52dvh;
    min-height:0;
    aspect-ratio:1200/700;
  }
  .iu-tools{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
  }
  .iu-ratios,
  .iu-icon-tools{
    justify-content:center;
  }
  .iu-ratios button,
  .iu-icon-tools button{
    min-width:48px;
    height:34px;
    font-size:13px;
  }
  .iu-quality-row label{
    font-size:13px;
  }
  .iu-editor-actions{
    position:sticky;
    bottom:0;
    background:#fff;
    padding-top:8px;
  }
  .iu-editor-actions .btn{
    min-height:42px;
  }
  .iu-confirm{
    gap:10px;
    padding-bottom:8px;
  }
  .iu-confirm img{
    max-width:100%;
    max-height:34dvh;
  }
  .iu-final-meta{
    font-size:13px;
    line-height:1.5;
  }
  .iu-progress-wrap{
    justify-content:center;
  }
  .iu-confirm-actions{
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
  }
  .iu-confirm-actions .btn{
    width:100%;
    min-height:42px;
  }
  .iu-confirm-actions .btn.primary{
    grid-column:1 / -1;
  }
  .modal.with-backdrop .iu-viewer-card{
    width:100%;
    max-width:100%;
    max-height:100dvh;
    height:100dvh;
    margin:0;
    border-radius:0;
    border:0;
    box-sizing:border-box;
  }
  .iu-viewer-head{
    padding:10px 12px;
  }
  .iu-viewer-head h3{
    font-size:18px;
  }
  .iu-viewer-body img{
    max-height:72dvh;
  }
  .iu-viewer-actions{
    padding:10px 12px;
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .iu-viewer-actions .btn{
    width:100%;
    text-align:center;
  }
}

@media (max-width: 1200px){
  .incident-head-copy h1{
    font-size:26px;
  }
  .incident-section-head h2{
    font-size:28px;
  }
}

@media (max-width: 860px){
  .incident-eval-head{
    align-items:flex-start;
  }
  .incident-eval-head .incident-head-copy{
    width:100%;
  }
  .incident-create-grid{
    grid-template-columns:1fr;
  }
  .incident-create-notes{
    order:1;
  }
  .incident-main-fields{
    order:2;
  }
  .incident-fields-grid{
    grid-template-columns:1fr;
  }
  .incident-list-block .incident-view-card,
  .incident-classic-table{
    padding:12px;
  }
  .incident-card-item{
    padding:10px 11px;
    gap:8px;
  }
  .incident-card-meta-grid{
    grid-template-columns:1fr;
    gap:7px;
  }
  .incident-card-meta-item strong{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .incident-submit-wrap{
    justify-content:flex-start;
    width:100%;
  }
  .incident-submit-btn{
    width:100%;
    min-width:0;
  }
  .incident-create-form .incident-evidence-field .iu-field-row{
    grid-template-columns:minmax(0,1fr) auto auto;
  }
  .incident-create-form .incident-fields-grid > label{
    min-height:unset;
  }
}

/* SLA notifications */
.topbar-notif{
  position:relative;
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid #e2e8f0;
  background:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#0f172a;
  text-decoration:none;
  flex-shrink:0;
}
.topbar-notif:hover{
  background:#f8fafc;
}
.topbar-notif svg{
  width:19px;
  height:19px;
}
.topbar-notif-badge{
  position:absolute;
  top:-6px;
  left:-6px;
  min-width:18px;
  height:18px;
  padding:0 4px;
  border-radius:999px;
  border:2px solid #fff;
  background:#ef4444;
  color:#fff;
  font-size:10px;
  line-height:14px;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.sla-list{
  display:grid;
  gap:10px;
}
.sla-item{
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:12px;
  background:#fff;
  display:grid;
  gap:8px;
}
.sla-item-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.sla-item.is-read{
  opacity:.75;
}
.sla-critical{
  border-color:#fecaca;
  background:#fff7f7;
}
.sla-warning{
  border-color:#fde68a;
  background:#fffbeb;
}
.sla-info{
  border-color:#bfdbfe;
  background:#f8fbff;
}

/* keep toast fully readable over profile lock mask */
.profile-locked .toast{
  z-index:1301 !important;
  opacity:1 !important;
  filter:none !important;
}
body.profile-locked .toast{
  z-index:5001 !important;
  opacity:1 !important;
  filter:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}
body.profile-locked .toast.show{
  opacity:1 !important;
  transform:translateY(0) !important;
}
.menu-config-shell{
  margin-top:14px;
}
.appearance-font-shell{
  margin-bottom:14px;
}
.menu-config-head{
  display:grid;
  grid-template-columns:56px 1fr 1.3fr 84px 92px;
  gap:10px;
  align-items:center;
  color:#64748b;
  font-size:12px;
  font-weight:700;
  padding:0 8px;
}
.menu-config-grid{
  display:grid;
  gap:10px;
}
.menu-config-row{
  display:grid;
  grid-template-columns:56px 1fr 1.3fr 84px 92px;
  gap:10px;
  padding:10px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  background:#fff;
  align-items:center;
  transition:box-shadow .15s ease,border-color .15s ease,transform .15s ease;
}
.menu-config-row:hover{
  border-color:#cbd5e1;
  box-shadow:0 6px 16px rgba(15,23,42,.06);
}
.menu-config-row.is-dragging{
  opacity:.75;
  border-color:#93c5fd;
  box-shadow:0 12px 22px rgba(37,99,235,.18);
}
.menu-drag-handle{
  width:36px;
  height:36px;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#f8fafc;
  cursor:grab;
  display:grid;
  align-content:center;
  justify-items:center;
  gap:3px;
}
.menu-drag-handle:active{
  cursor:grabbing;
}
.menu-drag-handle span{
  width:14px;
  height:2px;
  background:#94a3b8;
  border-radius:99px;
}
.menu-default-title{
  font-weight:700;
  color:#0f172a;
}
.menu-custom-title input{
  height:40px;
  border-radius:10px;
}
.menu-order-badge{
  width:42px;
  height:32px;
  border-radius:10px;
  border:1px solid #dbeafe;
  background:#eff6ff;
  color:#1d4ed8;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
}
.menu-row-actions{
  display:flex;
  gap:6px;
  justify-content:flex-end;
}
@media (max-width: 900px){
  .menu-config-head{
    display:none;
  }
  .menu-config-row{
    grid-template-columns:40px 1fr;
    align-items:start;
  }
  .menu-default-title{
    grid-column:2;
  }
  .menu-custom-title{
    grid-column:2;
  }
  .menu-order-badge{
    grid-column:2;
    justify-self:start;
  }
  .menu-row-actions{
    grid-column:2;
    justify-content:flex-start;
  }
}

/* Timeline flow direction and icon polish overrides */
.logs-flow-box::after{
  content:"\2190";
  left:-22px;
  top:50%;
  transform:translateY(-50%);
  color:#94a3b8;
  font-size:18px;
  font-weight:700;
}
.logs-flow-box:first-child::after{
  display:block;
}
.logs-flow-box.is-last::after{
  display:none;
}
.logs-flow-box-title{
  min-height:28px;
}
.logs-flow-box strong{
  display:inline-flex;
  align-items:center;
}
.logs-flow-box.logs-flow-accent{
  background:linear-gradient(180deg,#f8fbff 0%,#eef6ff 100%);
}
.logs-flow-box.logs-flow-accent .logs-flow-icon{
  background:rgba(37,99,235,.12);
  color:#2563eb;
}
.logs-flow-box.logs-flow-danger{
  background:linear-gradient(180deg,#fff9f9 0%,#fff1f2 100%);
}
.logs-flow-box.logs-flow-danger .logs-flow-icon{
  background:rgba(220,38,38,.12);
  color:#dc2626;
}
.logs-flow-box.logs-flow-view{
  background:linear-gradient(180deg,#f4fffd 0%,#ecfdf5 100%);
}
.logs-flow-box.logs-flow-view .logs-flow-icon{
  background:rgba(15,118,110,.12);
  color:#0f766e;
}
.logs-flow-box.logs-flow-neutral{
  background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
}
.logs-flow-box.logs-flow-neutral .logs-flow-icon{
  background:rgba(100,116,139,.14);
  color:#475569;
}

@media (max-width: 720px){
  .logs-flow-box::after{
    content:"\2193";
    left:50%;
    top:-14px;
    transform:translateX(-50%);
  }
}

.perf-page-members{
  overflow-x:hidden;
  gap:18px;
}
.perf-bi-kicker{
  display:inline-flex;
  align-items:center;
  width:max-content;
  padding:6px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.82);
  border:1px solid rgba(191,219,254,.9);
  color:#1d4ed8;
  font-size:11px;
  font-weight:800;
  letter-spacing:.02em;
}
.perf-bi-intro{
  margin:0;
  color:#52657d;
  font-size:14px;
  line-height:1.9;
  max-width:72ch;
}
.perf-bi-switches{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.perf-bi-switch{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:0 16px;
  border-radius:14px;
  border:1px solid rgba(191,219,254,.95);
  background:rgba(255,255,255,.72);
  color:#1e3a8a;
  text-decoration:none;
  font-size:13px;
  font-weight:700;
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.perf-bi-switch:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 28px rgba(37,99,235,.10);
}
.perf-bi-switch.is-active{
  background:linear-gradient(135deg,#2563eb,#0ea5e9);
  color:#fff;
  border-color:transparent;
}
.perf-bi-board{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);
  gap:16px;
}
.perf-bi-spotlight,
.perf-bi-actions,
.perf-bi-story-card{
  padding:18px 20px;
  border-radius:24px;
  border:1px solid rgba(219,228,244,.92);
  background:linear-gradient(180deg, rgba(255,255,255,.97), rgba(240,247,255,.94));
  box-shadow:0 22px 40px rgba(15,23,42,.06);
}
.perf-bi-spotlight-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.perf-bi-spotlight-head h2{
  margin:6px 0 0;
  font-size:24px;
  color:#0f172a;
}
.perf-bi-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}
.perf-bi-badge.is-positive{
  background:#dcfce7;
  color:#166534;
}
.perf-bi-badge.is-negative{
  background:#fff1f2;
  color:#be123c;
}
.perf-bi-scoreline{
  display:grid;
  gap:4px;
  margin:18px 0 10px;
}
.perf-bi-scoreline strong{
  font-size:42px;
  line-height:1;
  color:#0f172a;
}
.perf-bi-scoreline span,
.perf-bi-summary{
  color:#52657d;
  font-size:14px;
}
.perf-bi-mini-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-top:16px;
}
.perf-bi-mini-card{
  display:grid;
  gap:6px;
  padding:14px;
  border-radius:18px;
  background:rgba(255,255,255,.76);
  border:1px solid rgba(219,228,244,.85);
}
.perf-bi-mini-card span{
  color:#64748b;
  font-size:12px;
  font-weight:700;
}
.perf-bi-mini-card strong{
  color:#0f172a;
  font-size:20px;
}
.perf-bi-action-list{
  display:grid;
  gap:10px;
  margin-top:18px;
}
.perf-bi-action-item{
  padding:14px 16px;
  border-radius:18px;
  background:rgba(255,255,255,.78);
  border:1px solid rgba(224,231,255,.92);
  color:#334155;
  line-height:1.8;
}
.perf-bi-story-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
.perf-bi-dual-list,
.perf-bi-watchlist{
  display:grid;
  gap:12px;
}
.perf-bi-dual-list{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.perf-bi-list-title{
  margin-bottom:10px;
  color:#1d4ed8;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.perf-bi-line,
.perf-bi-watch-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:50px;
  padding:12px 14px;
  border-radius:16px;
  background:rgba(248,250,252,.95);
  border:1px solid rgba(226,232,240,.95);
}
.perf-bi-line span,
.perf-bi-watch-item span{
  color:#52657d;
  font-size:12px;
}
.perf-bi-line strong,
.perf-bi-watch-item strong,
.perf-bi-watch-item em{
  color:#0f172a;
  font-size:14px;
  font-style:normal;
  font-weight:800;
}
.perf-bi-line.is-risk strong,
.perf-bi-watch-item em{
  color:#b45309;
}
.perf-bi-watch-item > div{
  display:grid;
  gap:4px;
}
.perf-hero-members{
  grid-template-columns:minmax(0,1.4fr) minmax(300px,380px);
  align-items:start;
}
.perf-hero-copy{
  display:grid;
  gap:14px;
  align-content:start;
  min-width:0;
}
.perf-filters-members{
  justify-self:stretch;
  width:100%;
  min-width:0;
}
.perf-filter-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.perf-stats-members{
  margin-top:-2px;
}
.perf-insight-grid{
  display:grid;
  gap:16px;
  grid-template-columns:1.2fr .8fr;
}
.perf-panel-wide{
  width:100%;
}
.perf-insight-grid .perf-panel-wide{
  grid-column:1 / -1;
}
.perf-chart-mid{
  height:320px;
  min-height:320px;
}
.perf-project-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.perf-project-counter{
  font-size:12px;
  font-weight:800;
  color:#1d4ed8;
}
.perf-project-actions{
  display:flex;
  gap:8px;
}
.perf-project-carousel{
  position:relative;
  min-height:320px;
  overflow:hidden;
}
.perf-project-page{
  position:absolute;
  inset:0;
  opacity:0;
  transform:translateX(30px);
  pointer-events:none;
  transition:opacity .28s ease, transform .28s ease;
}
.perf-project-page.is-active{
  position:relative;
  opacity:1;
  transform:translateX(0);
  pointer-events:auto;
}
.perf-project-page.is-before{
  transform:translateX(-30px);
}
.perf-project-rack-compact{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(84px, 1fr));
  gap:10px;
  align-items:end;
  overflow:visible;
  padding:10px 0 8px;
}
.perf-project-compact{
  min-width:0;
  width:100%;
  gap:7px;
  justify-items:center;
  align-content:end;
  grid-template-rows:30px 170px 46px 30px;
}
.perf-project-compact .perf-project-bars{
  width:36px;
  height:170px;
  margin-inline:auto;
  align-self:end;
}
.perf-project-compact .perf-project-track{
  border-radius:12px 12px 8px 8px;
}
.perf-project-compact .perf-project-fill{
  border-radius:inherit;
}
.perf-project-compact .perf-project-score{
  padding:2px 7px;
  font-size:11px;
}
.perf-project-compact .perf-project-label{
  min-height:54px;
  font-size:10px;
  line-height:1.55;
  transform:none;
  text-align:center;
  word-break:normal;
  overflow-wrap:anywhere;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  width:100%;
  max-width:84px;
  padding-inline:2px;
}
.perf-project-compact .perf-project-meta{
  font-size:8px;
  line-height:1.35;
  min-height:24px;
  text-align:center;
}
.perf-grid-members{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.perf-rank-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
.perf-rank-card{
  display:grid;
  gap:12px;
  padding:14px;
  border-radius:20px;
  background:linear-gradient(180deg, rgba(255,255,255,.95), rgba(245,249,255,.96));
  border:1px solid rgba(219,228,244,.92);
}
.perf-rank-card-alert{
  background:linear-gradient(180deg, rgba(255,250,245,.96), rgba(255,245,238,.98));
}
.perf-rank-title{
  font-size:14px;
  font-weight:900;
  color:#0f172a;
}
.perf-rank-card-alert .perf-rank-title{
  color:#c2410c;
}
.perf-rank-card .perf-list{
  gap:8px;
}
.perf-rank-card .perf-list-row{
  min-height:52px;
}
.perf-rank-card-alert .perf-pill{
  background:#fff1f2;
  color:#be123c;
}
.perf-rank-card .perf-pill{
  min-width:54px;
  text-align:center;
}
@media (max-width: 1200px){
  .perf-bi-board,
  .perf-bi-story-grid,
  .perf-hero-members,
  .perf-insight-grid{
    grid-template-columns:1fr;
  }
}
@media (max-width: 900px){
  .perf-bi-mini-grid,
  .perf-bi-dual-list,
  .perf-grid-members{
    grid-template-columns:1fr;
  }
  .perf-filter-grid,
  .perf-rank-grid{
    grid-template-columns:1fr;
  }
  .perf-chart-mid{
    height:300px;
    min-height:300px;
  }
}
@media (max-width: 640px){
  .perf-project-toolbar{
    align-items:stretch;
    flex-direction:column;
  }
  .perf-project-actions{
    width:100%;
  }
  .perf-project-actions .btn{
    flex:1 1 0;
  }
  .perf-page-members{
    gap:14px;
  }
  .perf-hero-members{
    padding:18px;
    gap:14px;
  }
  .perf-hero-copy{
    gap:10px;
  }
  .perf-filters-members{
    padding:14px;
  }
  .perf-filter-actions{
    display:grid;
    grid-template-columns:1fr;
  }
  .perf-filter-actions .btn{
    width:100%;
    justify-content:center;
  }
  .perf-stats-members{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .perf-chart-mid,
  .perf-chart{
    height:280px;
    min-height:280px;
  }
  .perf-project-rack-compact{
    padding-inline:0;
  }
  .perf-project-compact{
    min-width:0;
    width:100%;
    grid-template-rows:28px 150px 48px 24px;
  }
  .perf-project-compact .perf-project-bars{
    width:32px;
    height:150px;
  }
.perf-project-compact .perf-project-label{
    min-height:44px;
    max-width:72px;
  }
}

.modern-dashboards-page{
  display:grid;
  gap:18px;
}
.modern-dashboards-hero{
  display:grid;
  grid-template-columns:minmax(0,1.3fr) minmax(320px,.9fr);
  gap:18px;
  padding:22px;
  border-radius:28px;
  background:
    radial-gradient(circle at top left, rgba(14,165,233,.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(34,197,94,.14), transparent 26%),
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(236,246,255,.96));
}
.modern-dashboards-copy{
  display:grid;
  gap:14px;
}
.modern-dashboards-kicker{
  display:inline-flex;
  width:max-content;
  padding:6px 12px;
  border-radius:999px;
  background:#e0f2fe;
  color:#075985;
  font-size:12px;
  font-weight:800;
}
.modern-dashboards-copy h1{
  margin:0;
  font-size:34px;
  color:#0f172a;
}
.modern-dashboards-copy p{
  margin:0;
  color:#52657d;
  line-height:1.9;
}
.modern-dashboards-badges{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.modern-dashboards-filters{
  display:grid;
  gap:12px;
  padding:18px;
  align-content:start;
}
.modern-dashboards-filters label{
  display:grid;
  gap:6px;
  font-size:13px;
  font-weight:700;
}
.modern-dashboards-actions,
.modern-dashboards-export{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.modern-dashboards-tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  padding:14px;
}
.modern-dashboards-tab{
  border:1px solid #dbe3ef;
  background:#f8fbff;
  color:#0f172a;
  border-radius:14px;
  min-height:42px;
  padding:0 14px;
  font-family:inherit;
  cursor:pointer;
}
.modern-dashboards-tab.is-active{
  background:#2563eb;
  color:#fff;
  border-color:#2563eb;
  box-shadow:0 14px 28px rgba(37,99,235,.18);
}
.modern-dashboard-panel{
  display:grid;
  gap:18px;
}
.modern-dashboard-head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
}
.modern-dashboard-head h2{
  margin:0 0 6px;
  font-size:28px;
}
.modern-dashboard-head p{
  margin:0;
  color:#64748b;
}
.modern-cards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:14px;
}
.modern-card{
  display:grid;
  gap:8px;
  padding:18px;
  border-radius:22px;
  color:#fff;
  box-shadow:0 18px 32px rgba(15,23,42,.12);
}
.modern-card.tone-positive{background:linear-gradient(135deg,#0f766e,#14b8a6);}
.modern-card.tone-negative{background:linear-gradient(135deg,#be123c,#fb7185);}
.modern-card.tone-warning{background:linear-gradient(135deg,#b45309,#f59e0b);}
.modern-card.tone-neutral{background:linear-gradient(135deg,#334155,#64748b);}
.modern-card-label{font-size:13px;opacity:.92;}
.modern-card-value{font-size:30px;line-height:1.1;}
.modern-card-hint{font-size:12px;opacity:.88;}
.modern-alerts{
  display:grid;
  gap:10px;
}
.modern-alert-item{
  padding:14px 16px;
  border-radius:18px;
  border:1px solid #dbeafe;
  background:#f8fbff;
  color:#334155;
}
.modern-chart-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
.modern-chart-card{
  padding:18px;
  min-width:0;
}
.modern-chart-canvas{
  height:340px;
  min-height:340px;
}
.modern-table-wrap{
  display:grid;
  gap:10px;
  min-width:0;
}
.modern-widget-caption{
  display:block;
  margin-top:4px;
  line-height:1.8;
}
.modern-chart-card .perf-panel-head,
.modern-table-wrap .perf-panel-head{
  margin-bottom:14px;
}
.modern-chart-card[data-widget-size="sm"] .modern-chart-canvas{
  height:280px;
  min-height:280px;
}
.modern-chart-card[data-widget-size="md"] .modern-chart-canvas{
  height:340px;
  min-height:340px;
}
.modern-chart-card[data-widget-size="lg"] .modern-chart-canvas{
  height:420px;
  min-height:420px;
}
.modern-chart-card.is-fullscreen .modern-chart-canvas{
  height:calc(100vh - 250px);
  min-height:440px;
}
.modern-table{
  border-radius:18px;
  overflow:hidden;
  border:1px solid rgba(219,228,244,.92);
  background:rgba(255,255,255,.92);
}
.modern-table .thead,
.modern-table .row{
  display:grid;
}
.modern-table .thead{
  background:linear-gradient(180deg, rgba(239,246,255,.96), rgba(230,240,255,.94));
  color:#1d4ed8;
  font-size:12px;
  font-weight:900;
}
.modern-table .thead > div,
.modern-table .row > div{
  padding:14px 16px;
  text-align:right;
}
.modern-table .row{
  border-top:1px solid rgba(226,232,240,.92);
  background:rgba(255,255,255,.95);
}
.modern-table .row:nth-child(even){
  background:rgba(248,250,252,.96);
}
.modern-table .row > div{
  color:#0f172a;
  line-height:1.8;
  font-size:13px;
}
@media (max-width: 1100px){
  .modern-dashboards-hero,
  .modern-chart-grid{
    grid-template-columns:1fr;
  }
}
@media (max-width: 720px){
  .modern-dashboards-copy h1{
    font-size:24px;
  }
  .modern-chart-canvas{
    height:280px;
    min-height:280px;
  }
  .modern-table .thead{
    display:none;
  }
  .modern-table .row{
    grid-template-columns:1fr !important;
    padding:10px 0;
  }
  .modern-table .row > div{
    display:grid;
    gap:4px;
    padding:8px 14px;
  }
  .modern-table .row > div::before{
    content:attr(data-label);
    color:#64748b;
    font-size:11px;
    font-weight:800;
  }
}
