@font-face {
  font-family: Vazirmatn;
  src: url(vazirmatn-arabic-wght-normal.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Vazirmatn;
  src: url(vazirmatn-latin-wght-normal.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF;
}
:root {
  --ink: #182e3b;
  --muted: #526574;
  --line: #d7e0e6;
  --ground: #f3f6f8;
  --paper: #fff;
  --accent: #304fc5;
  --accent-soft: #edf1ff;
  --good: #17624b;
  --warning: #795014;
  --warning-soft: #fff4df;
  --danger: #a12b36;
  --radius: 12px;
  --focus: #b66b07;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scrollbar-color: #aebcc7 #f3f6f8;
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font:
    15px/1.85 Vazirmatn,
    Tahoma,
    sans-serif;
  caret-color: var(--accent);
}
::selection {
  background: #dce4ff;
  color: #182e3b;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: var(--accent);
  text-underline-offset: 4px;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 9px 17px;
  min-height: 44px;
  font-weight: 600;
}
button:hover {
  background: #f0f3f7;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
button.primary:hover {
  background: #253da1;
}
.quiet {
  background: transparent;
}
.danger {
  color: var(--danger);
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  border: 1px solid #aebcc7;
  background: #fff;
  border-radius: 8px;
  padding: 9px 12px;
  min-height: 44px;
}
input::placeholder,
textarea::placeholder {
  color: #627381;
}
textarea {
  min-height: 100px;
  resize: vertical;
}
label {
  display: grid;
  gap: 6px;
  font-weight: 500;
}
label.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
}
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 27px;
  line-height: 1.55;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
h2 {
  font-size: 20px;
  line-height: 1.6;
  margin-bottom: 16px;
}
h3 {
  font-size: 16px;
  margin-bottom: 8px;
}
p {
  max-width: 75ch;
  margin-bottom: 12px;
}
small,
.small {
  font-size: 12px;
  line-height: 1.8;
}
.muted {
  color: var(--muted);
}
bdi,
.money {
  font-variant-numeric: tabular-nums;
  unicode-bidi: isolate;
}
.money {
  direction: ltr;
  display: inline-block;
  white-space: nowrap;
}
.skip {
  position: fixed;
  top: -100px;
  right: 16px;
  z-index: 100;
  background: #fff;
  padding: 12px;
}
.skip:focus {
  top: 8px;
}
.full {
  width: 100%;
}
.inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.stack > .row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.stack > .row:last-child {
  border: 0;
}
.loading {
  min-height: 100vh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 20px;
}
.wordmark {
  font:
    800 37px/1.1 Vazirmatn,
    sans-serif;
  letter-spacing: -0.04em;
  display: inline-flex;
  gap: 12px;
  align-items: center;
  direction: ltr;
}
.wordmark span {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  border-left: 1px solid currentColor;
  padding-left: 12px;
}
.signin {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: #fff;
}
.signin-story {
  background: #182e3b;
  color: #fff;
  padding: clamp(32px, 7vw, 110px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.signin-story h1 {
  font-size: clamp(38px, 4vw, 62px);
  margin: 56px 0 24px;
  font-weight: 700;
  line-height: 1.45;
}
.signin-story p {
  color: #d4e0e8;
  font-size: 17px;
}
.signin-story > small {
  color: #c2d1dc;
  margin-top: 12px;
}
.story-record {
  border-top: 1px solid #48606f;
  border-bottom: 1px solid #48606f;
  width: 100%;
  padding: 24px 0;
  margin: 24px 0 32px;
  display: grid;
  gap: 8px;
}
.story-record span,
.story-record small {
  color: #c2d1dc;
}
.story-record strong {
  font-size: 17px;
}
.light-button {
  background: #fff;
  color: var(--ink);
}
.signin-form {
  width: min(100%, 480px);
  padding: 60px 40px;
  margin: auto;
}
.signin-form h2 {
  font-size: 29px;
  margin-bottom: 10px;
}
.signin-form form {
  display: grid;
  gap: 20px;
  margin: 28px 0 18px;
}
.signin-foot {
  font-size: 13px;
  color: var(--muted);
  margin-top: 38px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.app-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #fff;
  border-left: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  margin: 0 10px 40px;
}
.brand img {
  width: 42px;
  height: 42px;
}
.brand .wordmark {
  font-size: 24px;
}
.brand .wordmark span {
  font-size: 12px;
  display: block;
  border: 0;
  padding: 0;
  letter-spacing: 0.12em;
}
.side-label {
  font-size: 12px;
  color: var(--muted);
  padding: 0 12px;
  margin-bottom: 12px;
}
.sidebar nav {
  display: grid;
  gap: 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  justify-content: flex-start;
  padding: 12px;
  color: var(--muted);
  width: 100%;
}
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
}
.side-user {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: #edf1f4;
  border-radius: 50%;
  font-weight: 700;
}
.side-user small {
  display: block;
  color: var(--muted);
}
.workarea {
  min-width: 0;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 32px;
  border-bottom: 1px solid var(--line);
  background: #ffffffed;
  position: sticky;
  top: 0;
  z-index: 5;
}
.toolbar .search {
  max-width: 360px;
  position: relative;
}
.toolbar input {
  background: var(--ground);
  border-color: transparent;
  font-size: 13px;
}
.toolbar .tools {
  display: flex;
  gap: 10px;
  align-items: center;
}
.toolbar .tools button {
  min-height: 40px;
  padding: 7px 13px;
  font-size: 13px;
}
.toolbar .crumb {
  font-size: 13px;
  color: var(--muted);
}
main.workspace {
  padding: 30px 34px 60px;
  max-width: 1540px;
  margin: auto;
}
.head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.head p {
  color: var(--muted);
  margin: 0;
}
.head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.surface {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 22px;
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: 22px;
  align-items: start;
}
.grid > .surface {
  height: 100%;
}
.notice {
  padding: 13px 16px;
  border: 1px solid #e7cfa0;
  border-radius: 8px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 13px;
}
.notice.info {
  background: #f0f4fb;
  border-color: #ced9e9;
  color: #324e73;
}
.notice.good {
  background: #edf7f2;
  color: var(--good);
  border-color: #bcdbcf;
}
.error {
  color: var(--danger);
  font-size: 13px;
}
.notice.error {
  background: #fff0f0;
  border-color: #edc5c8;
}
.tag {
  display: inline-flex;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  white-space: nowrap;
}
.tag.good {
  background: #edf7f2;
  color: var(--good);
  border-color: #bcdbcf;
}
.tag.warning {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: #e7cfa0;
}
.tag.info {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: #cdd8fb;
}
.demo-banner {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  background: #fff4df;
  color: #795014;
  padding: 9px 20px;
  font-size: 12px;
}
.demo-banner button {
  font-size: 12px;
  min-height: 32px;
  padding: 2px 10px;
  background: transparent;
  border-color: #d5bc91;
}
.demo-banner select {
  width: auto;
  min-height: 32px;
  padding: 2px 10px;
}
.next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid #cdd8fb;
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 22px;
}
.next p {
  font-size: 13px;
  color: #3f5277;
  margin: 5px 0 0;
}
.context {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 26px;
}
.context > div {
  padding: 20px 24px;
  border-left: 1px solid var(--line);
  display: grid;
  gap: 6px;
}
.context > div:last-child {
  border: 0;
}
.context small {
  color: var(--muted);
}
.context span {
  color: var(--muted);
  font-size: 13px;
}
.tabs {
  display: flex;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  overflow: auto;
  margin-bottom: 24px;
  scrollbar-width: thin;
}
.tabs button {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
  padding: 12px 5px 16px;
}
.tabs button.active {
  color: var(--accent);
  box-shadow: inset 0 -3px var(--accent);
}
.decision {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.decision:first-of-type {
  padding-top: 8px;
}
.decision:last-child {
  border-bottom: 0;
  padding-bottom: 4px;
}
.decision p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 13px;
}
.decision small {
  display: block;
}
.tablewrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th {
  text-align: right;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  padding: 12px;
  background: #f7f9fb;
}
td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
td small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.table-input {
  min-width: 90px;
  max-width: 130px;
}
tr:last-child td {
  border-bottom: 0;
}
.total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
  gap: 16px;
}
.total b {
  font-size: 21px;
}
.form-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
}
.form-foot small {
  color: var(--muted);
}
.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 12px;
}
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.filters input {
  max-width: 380px;
}
.filters button.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}
.empty h2 {
  color: var(--ink);
  margin-bottom: 10px;
}
.empty p {
  margin: 0 auto 20px;
}
.mini-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  margin-top: 20px;
}
.mini-stats b {
  color: var(--ink);
}
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}
.checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.checklist li:last-child {
  border: 0;
}
.checkmark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border: 1px solid #aebcc7;
  border-radius: 50%;
  color: var(--muted);
}
.checkmark.done {
  background: #e6f3ed;
  border-color: #96bca9;
  color: #17624b;
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.timeline li {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.timeline li:last-child {
  border: 0;
}
.timeline small {
  color: var(--muted);
}
.timeline p {
  margin-bottom: 4px;
}
.catalog-row {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.catalog-row:last-child {
  border: 0;
}
.catalog-row p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 13px;
}
.catalog-row h3 {
  margin: 0;
}
.catalog-row details {
  margin-top: 12px;
  font-size: 13px;
}
.catalog-row label {
  font-size: 12px;
}
.bottom-nav {
  display: none;
}
details {
  margin-top: 18px;
}
summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 13px;
  padding: 8px 0;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  max-width: calc(100% - 48px);
  padding: 13px 20px;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  z-index: 50;
  display: none;
  box-shadow: 0 8px 28px #00000024;
  font-size: 13px;
}
#toast.show {
  display: block;
  animation: feedback 0.22s ease-out;
}
@keyframes feedback {
  from {
    box-shadow: 0 1px 4px #00000010;
  }
  to {
    box-shadow: 0 8px 28px #00000024;
  }
}
.subheading {
  margin-top: 28px;
}
.progress-note {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 16px;
  color: var(--muted);
  font-size: 13px;
}
.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.path-line {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}
.path-line .icon {
  color: var(--accent);
}
.qa-result {
  white-space: pre-wrap;
  max-height: 500px;
  overflow: auto;
  font-size: 13px;
  direction: rtl;
}
.bar-empty {
  height: 1px;
  background: var(--line);
  margin: 25px 0;
}
.mono {
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 1500px) {
  main.workspace {
    padding: 42px 48px;
  }
  .app-shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }
}
@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .sidebar {
    padding: 24px 12px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .toolbar {
    padding: 16px 24px;
  }
  .toolbar .search {
    max-width: 240px;
  }
  main.workspace {
    padding: 24px;
  }
  .context > div {
    padding: 18px;
  }
  .signin-story {
    padding: 45px;
  }
  .signin-story h1 {
    font-size: 42px;
  }
}
@media (max-width: 700px) {
  body {
    font-size: 14px;
  }
  .signin {
    display: flex;
    flex-direction: column;
  }
  .signin-story {
    padding: 32px 24px;
  }
  .signin-story h1 {
    font-size: 34px;
    margin: 30px 0 16px;
  }
  .signin-story p {
    font-size: 14px;
  }
  .story-record {
    display: none;
  }
  .signin-story > small {
    font-size: 12px;
  }
  .signin-form {
    padding: 30px 24px;
  }
  .app-shell {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .toolbar {
    padding: 12px 16px;
    gap: 10px;
  }
  .toolbar .search {
    display: none;
  }
  .toolbar .tools {
    gap: 6px;
  }
  .toolbar .tools button {
    padding: 6px 10px;
    font-size: 12px;
  }
  .toolbar .crumb {
    font-size: 12px;
  }
  main.workspace {
    padding: 20px 16px 100px;
  }
  .head {
    margin-bottom: 22px;
    gap: 15px;
    flex-wrap: wrap;
  }
  h1 {
    font-size: 23px;
  }
  h2 {
    font-size: 18px;
  }
  .head p {
    font-size: 12px;
  }
  .head-actions {
    width: 100%;
  }
  .head-actions .primary {
    flex: 1;
  }
  .surface {
    padding: 20px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
  }
  .next {
    padding: 18px 16px;
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }
  .next button {
    width: 100%;
  }
  .context {
    grid-template-columns: 1fr;
    margin-bottom: 20px;
  }
  .context > div {
    padding: 15px 18px;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    grid-template-columns: 1fr auto;
  }
  .context > div small {
    grid-column: 1/-1;
  }
  .context > div b {
    text-align: left;
  }
  .tabs {
    gap: 16px;
    margin-bottom: 20px;
  }
  .tabs button {
    font-size: 12px;
  }
  .grid {
    gap: 0;
  }
  .decision {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
  }
  .decision .inline {
    width: 100%;
  }
  .decision .inline button {
    flex: 1;
  }
  .form-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .form-foot button {
    width: 100%;
  }
  .mobile-cards thead {
    display: none;
  }
  .mobile-cards table,
  .mobile-cards tbody,
  .mobile-cards tr,
  .mobile-cards td {
    display: block;
  }
  .mobile-cards tr {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .mobile-cards td {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border: 0;
    padding: 5px 0;
  }
  .mobile-cards td:before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    min-width: 82px;
  }
  .mobile-cards td small {
    max-width: 180px;
  }
  .mobile-cards td:first-child {
    font-weight: 600;
  }
  .catalog-row {
    grid-template-columns: 1fr 90px;
    gap: 14px;
  }
  .catalog-row h3 {
    font-size: 14px;
  }
  .catalog-row p {
    font-size: 12px;
  }
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 10;
    background: #fffffff5;
    border-top: 1px solid var(--line);
    padding: 8px 10px max(8px, env(safe-area-inset-bottom));
    gap: 4px;
  }
  .bottom-nav button {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
    align-items: center;
    padding: 6px 2px;
    border: 0;
    border-radius: 7px;
    min-height: 48px;
    color: var(--muted);
  }
  .bottom-nav button.active {
    background: var(--accent-soft);
    color: var(--accent);
  }
  .bottom-nav .icon {
    width: 18px;
    height: 18px;
  }
  .demo-banner {
    gap: 10px;
    padding: 8px 12px;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .demo-banner > span {
    font-size: 12px;
  }
  .demo-banner button,
  .demo-banner select {
    font-size: 12px;
  }
  .timeline li {
    grid-template-columns: 65px 1fr;
    gap: 12px;
  }
  .timeline small {
    font-size: 12px;
  }
  .total b {
    font-size: 18px;
  }
  .mini-stats {
    gap: 12px;
  }
  .row {
    gap: 12px;
  }
  .filters input {
    max-width: none;
  }
  .filters {
    gap: 6px;
  }
  .filters button {
    font-size: 12px;
    padding: 7px 12px;
  }
  #toast {
    bottom: 88px;
    left: 16px;
    right: 16px;
    max-width: none;
  }
  .toolbar .tools a {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
@media print {
  .sidebar,
  .toolbar,
  .bottom-nav,
  .head-actions,
  button,
  .next,
  .demo-banner,
  .tabs {
    display: none !important;
  }
  .app-shell {
    display: block;
  }
  body,
  main.workspace {
    background: #fff;
    padding: 0;
  }
  .surface {
    break-inside: avoid;
    border-color: #aaa;
  }
  .grid {
    display: block;
  }
  .surface {
    margin-bottom: 18px;
  }
  a {
    color: #000;
    text-decoration: none;
  }
}

/* Finish review: preserve hierarchy in the mobile case summary. */
@media (max-width: 700px) {
  .context > div small {
    grid-column: auto;
  }
  .context > div > span {
    grid-column: 1/-1;
  }
  .context > div > b {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
  }
  .context > div {
    align-items: center;
  }
  .surface .surface {
    border: 0;
    border-radius: 0;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
  }
}
