/* APK identity: original black/red logo; neutral reporting surfaces.
   Success and warning colors describe data state, not brand emphasis. */
:root {
  --ink: #22252b;
  --muted: #636973;
  --line: #e1e3e8;
  --paper: #f5f6f8;
  --brand: #ed1e23;
  --brand-action: #c71927;
  --green: #176b53;
  --soft: #eaf5ef;
  --amber: #87500b;
  --red: #b91c2c;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}
body { background: var(--paper); }
button { border-radius: 10px; font-weight: 600; transition: background .16s, border-color .16s; }
button:hover { border-color: #abb0bb; background: #f0f1f4; }
.primary { background: var(--brand-action); border-color: var(--brand-action); color: #fff; }
.primary:hover { background: #a61220; border-color: #a61220; color: #fff; }
input, select { border-color: #cdd0d7; border-radius: 9px; }
input[type=checkbox] { accent-color: var(--brand-action); }
a { color: #a81927; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #c71927; outline-offset: 3px;
}
h1 { font-size: 30px; font-weight: 750; letter-spacing: -.5px; }
h2 { font-size: 19px; font-weight: 700; }
.brand-lockup { display: flex; flex-direction: column; align-items: center; gap: 0; }
.brand-lockup img { display: block; width: 160px; height: 90px; object-fit: contain; }
.brand-company { color: #22252b; font-weight: 700; font-size: 15px; text-align: center; line-height: 1.7; }
.brand-company span { display: block; font-size: 11px; font-weight: 400; color: #686c75; margin-top: 5px; }
.sidebar { width: 248px; padding: 22px 18px; background: #202126; color: #f5f5f6; border-left: 1px solid #2d2f36; }
.sidebar .brand-lockup { background: #fff; border-radius: 12px; padding: 0 14px 18px; border-top: 3px solid var(--brand); }
.sidebar-caption { font-size: 10px; color: #a8aab3; margin: 28px 12px 13px; }
.sidebar nav { gap: 7px; }
.sidebar nav button { position: relative; display: flex; align-items: center; gap: 12px; padding: 13px 14px; min-height: 48px; color: #c6c8d0; font-weight: 500; }
.sidebar nav button svg { width: 19px; height: 19px; flex-shrink: 0; }
.sidebar nav button:hover { background: #2b2d34; color: #fff; }
.sidebar nav button[aria-current=page] { background: #3a252b; color: #fff; box-shadow: inset -3px 0 0 var(--brand); }
.sidebar nav button[aria-current=page] svg { color: #ff929b; }
.sidebar-bottom { border-top: 1px solid #3a3c45; padding-top: 20px; }
.sidebar-bottom p { color: #d2d4db; }
.sidebar-bottom button { font-weight: 400; color: #f1f2f4; border-color: #555863; padding: 8px 12px; font-size: 12px; }
.sidebar-bottom button:hover { background: #343640; border-color: #9295a0; }
.readonly { color: #a7dbbd; background: #253d32; border: 1px solid #3a5747; padding: 6px 10px; border-radius: 6px; }
.content { margin-right: 248px; padding: 32px 36px 48px; max-width: 1700px; }
.page-head { margin-bottom: 26px; border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.eyebrow { color: #727680; font-size: 11px; }
.head-actions button { white-space: nowrap; }
.filters { padding: 18px 20px; gap: 16px; margin-bottom: 18px; box-shadow: 0 2px 5px #1c233005; }
.filters label { font-size: 12px; }
#filterDescription { font-size: 11px; margin: 12px 2px 20px; }
.summary { background: #fff; border: 1px solid var(--line); border-right: 4px solid var(--brand); padding: 22px 24px; box-shadow: 0 3px 12px #1c233004; }
.summary h2 { margin-bottom: 10px; }
.summary p { font-size: 13px; line-height: 1.95; color: #505660; margin-bottom: 6px; }
.metrics { gap: 18px; grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr)); }
.metric, .panel, .breakdown, .coverage-card { border-color: var(--line); border-radius: 12px; box-shadow: 0 2px 8px #1c233004; }
.metric { padding: 24px; position: relative; border-top: 3px solid #32343b; }
.metric h3 { color: #4c515c; margin-bottom: 12px; padding-left: 105px; line-height: 1.8; }
.metric .value { font-size: 46px; color: #22252b; margin: 14px 0 4px; line-height: 1.4; }
.metric .meta { font-size: 12px; }
.metric .tag { position: absolute; left: 22px; top: 22px; }
.tag { font-weight: 500; }
.tag.warn { background: #fff1d7; color: #87500b; }
.tag.error { background: #fce9ec; color: #b91c2c; }
.bar-row meter { accent-color: #515663; height: 10px; }
.bar-row meter::-webkit-meter-bar { background: #eef0f4; border: 0; border-radius: 4px; }
.bar-row meter::-webkit-meter-optimum-value { background: #535966; border-radius: 4px; }
.bar-row meter::-moz-meter-bar { background: #535966; }
.section-heading { margin-top: 32px; }
#scopeBreakdown { margin-bottom: 28px; }
th { background: #f1f2f5; color: #555c67; font-weight: 600; }
tbody tr:hover { background: #fafafb; }
td { padding-top: 17px; padding-bottom: 17px; }
td button { font-size: 12px; font-weight: 500; }
.role-guide p { background: #edeef2; border: 1px solid #e2e4e9; }
dialog { box-shadow: 0 24px 80px #181a2733; }
dialog::backdrop { background: #11131bb3; backdrop-filter: blur(3px); }
#notice { background: #25272e; border: 1px solid #454852; box-shadow: 0 10px 30px #11131b24; line-height: 1.9; }
.login-layout { max-width: 1130px; gap: 100px; }
.welcome .brand-lockup { align-items: flex-start; }
.welcome .brand-company { text-align: right; }
.welcome .brand-lockup img { background: white; border-radius: 8px; width: 190px; height: 107px; }
.welcome .eyebrow { color: var(--brand-action); margin-top: 38px; }
.welcome h1 { font-size: 44px; margin-top: 12px; line-height: 1.7; }
.trust { border-top-color: #d7dae1; color: #5b616b; }
.login-card { box-shadow: 0 12px 48px #1e26300a; border-top: 4px solid var(--brand); }
@media(max-width:1100px) {
  .sidebar { width: 222px; padding: 18px 14px; }
  .content { margin-right: 222px; padding: 26px; }
  .login-layout { gap: 44px; }
}
@media(max-width:700px) {
  .sidebar { width: 100%; padding: 14px; }
  .sidebar .brand-lockup { flex-direction: row; justify-content: flex-start; gap: 15px; padding: 5px 14px; border-top-width: 2px; }
  .sidebar .brand-lockup img { width: 100px; height: 57px; }
  .sidebar .brand-company { font-size: 14px; text-align: right; }
  .sidebar .brand-company span { font-size: 10px; margin-top: 2px; }
  .sidebar-caption { display: none; }
  .sidebar nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; overflow: visible; margin-top: 12px; }
  .sidebar nav button { padding: 10px; min-height: 44px; gap: 8px; font-size: 12px; white-space: normal; }
  .sidebar nav button svg { width: 16px; height: 16px; }
  .sidebar-bottom { margin-top: 14px; padding-top: 12px; gap: 10px; }
  .sidebar-bottom p { flex: 1; min-width: 90px; font-size: 11px; }
  .sidebar-bottom button { padding: 7px 10px; min-height: 36px; }
  .content { margin: 0; padding: 24px 16px; }
  .page-head { gap: 16px; padding-bottom: 20px; }
  .page-head h1 { font-size: 27px; }
  .head-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .head-actions .primary { grid-column: 1/-1; }
  .filters { padding: 16px; }
  .metrics { grid-template-columns: 1fr; }
  .metric .value { font-size: 42px; }
  .summary { padding: 18px; }
  .summary p { font-size: 12px; }
  .login-layout { padding: 28px 20px; }
  .welcome h1 { font-size: 32px; }
  .welcome .brand-lockup { flex-direction: row; align-items: center; gap: 16px; }
  .welcome .brand-lockup img { width: 110px; height: 62px; }
}
@media(prefers-reduced-motion:reduce) { button { transition: none; } }
@media print { .content { margin: 0; padding: 0; } .summary,.metric,.panel,.breakdown { box-shadow:none; } }

/* Local fonts requested by the user; no external font tracking or redistribution. */
@font-face{font-family:APKPersian;src:local('B Mitra');unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF;font-display:swap}
@font-face{font-family:APKPersian;src:local('B Mitra Bold');font-weight:700;unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF;font-display:swap}
:root{font-family:APKPersian,'Times New Roman',serif;font-size:18px}
.metric .value,.number{font-family:'Times New Roman',APKPersian,serif}
.sidebar nav button{font-size:17px}.sidebar-caption,.eyebrow,.sidebar-bottom p,.chart-note,.footnote{font-size:15px}.sidebar nav button{padding:10px}.sidebar nav{gap:2px}
.sidebar .brand-lockup{padding-bottom:10px}.brand-company{font-size:20px}.brand-company span{font-size:15px}
.filters label,.summary p,.metric .meta,th,td,.coverage-card p{font-size:17px}.tag{font-size:14px}.sidebar-bottom button{font-size:16px}
.analytics-quality{padding:16px 20px;background:#fff2dc;border:1px solid #ebd8b3;border-radius:10px;color:#704818;line-height:1.9;margin-bottom:20px}
.analytics-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:24px}
.analytics-kpi{text-align:right;display:grid;gap:10px;padding:20px;border-top:3px solid #c71927;background:white}
.analytics-kpi strong{font-size:40px;line-height:1.2}.analytics-kpi small{font-size:15px;font-weight:400;color:var(--muted)}
.analytics-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:22px 0}.chart-wide{grid-column:1/-1}
.chart-note{color:var(--muted);line-height:1.8;margin-bottom:16px}.chart-bar{width:100%;display:grid;grid-template-columns:1fr auto;gap:8px 16px;padding:10px 0;margin:4px 0;border:0;border-radius:5px;background:transparent;text-align:right;font-size:17px;font-weight:400}
.chart-bar svg{width:100%;height:10px;grid-column:1/-1}.chart-track{fill:#edeef2}.chart-fill{fill:#626978}.chart-bar:hover .chart-fill{fill:#c71927}.bar-name{overflow-wrap:anywhere}.chart-bar b{font-size:20px}
#ttmTimeline>svg{display:block;width:100%;max-height:300px;direction:ltr}.chart-grid{stroke:#e3e5ea;stroke-width:1}.axis-text{fill:#5c6470;font-size:14px;font-family:APKPersian,'Times New Roman',serif}.series-created{stroke:#c71927;stroke-width:3}.series-resolved{stroke:#176b53;stroke-width:3;stroke-dasharray:7 4}.dot-created{fill:#c71927}.dot-resolved{fill:#176b53}.chart-legend{display:flex;gap:24px;flex-wrap:wrap}.legend-created{color:#a61220}.legend-resolved{color:#176b53}
#ttmProjects{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:24px}.project-chart{padding:16px;border:1px solid var(--line);border-radius:10px}.project-link{width:100%;font-family:'Times New Roman',APKPersian,serif;font-size:20px}
@media(max-width:1100px){.analytics-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.sidebar nav button{font-size:16px}}
@media(max-width:700px){.analytics-grid{grid-template-columns:1fr}.chart-wide{grid-column:auto}.analytics-kpi{padding:15px;font-size:16px}.sidebar nav button{font-size:16px}.sidebar-bottom p{font-size:15px}.summary p{font-size:17px}.sidebar .brand-company{font-size:18px}.sidebar .brand-company span{font-size:13px}}
/* The original assistant lives in the workspace and retains its own scroll. */
#assistantFrame{width:100%;height:calc(100dvh - 185px);min-height:560px;border:1px solid var(--line,#d9dde4);border-radius:16px;background:#f6f7f9;display:block}
.assistant-intro{margin:0 0 12px;color:#626978}.assistant-active .page-head{margin-bottom:10px}.assistant-active .content{padding-bottom:12px}
@media(max-width:760px){#assistantFrame{height:78dvh;min-height:540px}.assistant-active .content{padding-inline:10px}}
