:root {
  color: #182026;
  background: #f6f7f8;
  font-family: Vazirmatn, IRANSans, 'Noto Sans Arabic', system-ui, sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}
html,
body,
#app {
  min-height: 100%;
  margin: 0;
}
body {
  min-width: 320px;
  background: #f6f7f8;
}
a {
  color: inherit;
}
button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
.skip-link {
  position: fixed;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  z-index: 20;
  padding: 10px 14px;
  background: #182026;
  color: #fff;
  transform: translateY(-150%);
}
.skip-link:focus {
  transform: translateY(0);
}
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  inset-block-start: 0;
  height: 100vh;
  padding: 24px 16px;
  border-inline-end: 1px solid #d9dee2;
  background: #fff;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.brand {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 18px;
  border-bottom: 1px solid #e7eaed;
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: #182026;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  border-radius: 6px;
  direction: ltr;
}
.brand strong,
.brand small {
  display: block;
}
.brand strong {
  font-size: 18px;
  direction: ltr;
  text-align: start;
}
.brand small {
  color: #69737b;
  font-size: 11px;
  line-height: 1.5;
}
nav {
  display: grid;
  gap: 4px;
  margin-top: 18px;
}
nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  color: #44515a;
  text-decoration: none;
  font-weight: 600;
}
nav a:hover {
  background: #f1f3f4;
  color: #182026;
}
nav a[aria-current='page'] {
  background: #e8f2ed;
  color: #145c3a;
  box-shadow: inset 3px 0 #20835a;
}
[dir='rtl'] nav a[aria-current='page'] {
  box-shadow: inset -3px 0 #20835a;
}
.sidebar-note {
  margin-top: auto;
  padding: 16px 8px 0;
  color: #707b83;
  font-size: 11px;
  line-height: 1.7;
}
.page {
  min-width: 0;
}
.topbar {
  height: 64px;
  padding: 0 28px;
  border-bottom: 1px solid #d9dee2;
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  inset-block-start: 0;
  z-index: 8;
}
.connection {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #56626b;
  font-size: 13px;
}
.connection span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #20835a;
}
.connection.offline span {
  background: #c33b3b;
}
.topbar-action {
  margin-inline-start: auto;
}
.menu-button {
  display: none;
}
.sidebar-close,
.menu-backdrop {
  display: none;
}
.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid #ccd2d7;
  background: #fff;
  color: #182026;
  border-radius: 6px;
  cursor: pointer;
}
main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px;
}
.page-intro {
  min-height: 146px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding: 8px 0 30px;
  border-bottom: 1px solid #d9dee2;
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  margin-bottom: 10px;
  font-size: 30px;
  line-height: 1.35;
  font-weight: 760;
}
h2 {
  margin-bottom: 14px;
  font-size: 18px;
  line-height: 1.5;
}
p {
  color: #56626b;
  line-height: 1.8;
}
.page-intro p {
  max-width: 700px;
  margin-bottom: 0;
}
.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 0 0 auto;
}
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.45;
}
.button.primary {
  background: #176b46;
  border-color: #176b46;
  color: #fff;
}
.button.primary:hover {
  background: #115637;
}
.button.secondary {
  background: #fff;
  border-color: #b9c1c7;
  color: #253039;
}
.button.secondary:hover {
  background: #f1f3f4;
}
.button:focus-visible,
nav a:focus-visible,
input:focus-visible,
select:focus-visible,
.tool-row:focus-visible {
  outline: 3px solid #2b72c4;
  outline-offset: 2px;
}
.band,
.form-band {
  padding: 28px 0;
  border-bottom: 1px solid #d9dee2;
}
.tool-list {
  border-top: 1px solid #d9dee2;
}
.tool-row {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 4px;
  border-bottom: 1px solid #e3e7ea;
  text-decoration: none;
}
.tool-row:hover {
  background: #fff;
}
.tool-row strong,
.tool-row small {
  display: block;
}
.tool-row small {
  margin-top: 3px;
  color: #20835a;
  font-size: 12px;
}
.row-action {
  color: #245d95;
  font-weight: 700;
}
.recent ol {
  list-style: none;
  padding: 0;
  margin: 0;
}
.recent li {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e3e7ea;
}
.recent time {
  color: #707b83;
  font-size: 12px;
}
.empty-state {
  padding: 24px;
  border: 1px dashed #b9c1c7;
  background: #fff;
  text-align: center;
}
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid #d9dee2;
}
.split article {
  min-height: 250px;
  padding: 30px 0;
}
.split article + article {
  padding-inline-start: 32px;
  border-inline-start: 1px solid #d9dee2;
}
.split article:first-child {
  padding-inline-end: 32px;
}
.split p {
  min-height: 88px;
}
.form-band form,
.form-band.settings {
  max-width: 720px;
  display: grid;
  gap: 10px;
}
label {
  font-weight: 700;
}
input,
select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #aeb7be;
  border-radius: 5px;
  background: #fff;
  color: #182026;
}
input[dir='ltr'] {
  text-align: left;
}
form small {
  margin-bottom: 12px;
  color: #69737b;
  line-height: 1.6;
}
form .button {
  width: fit-content;
  margin-top: 10px;
}
.checklist {
  display: grid;
  gap: 14px;
}
.checklist label {
  min-height: 44px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
  line-height: 1.7;
}
.checklist input {
  flex: 0 0 auto;
  width: 20px;
  min-height: 20px;
  margin-top: 3px;
}
.attestation {
  min-height: 44px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  line-height: 1.7;
}
.attestation input {
  width: 20px;
  min-height: 20px;
  flex: 0 0 auto;
  margin-top: 3px;
}
.checklist .button {
  width: fit-content;
  margin-top: 12px;
}
.setting-readout {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #d9dee2;
}
.settings .button {
  width: fit-content;
  margin-top: 12px;
}
.notice {
  position: fixed;
  inset-inline-end: 24px;
  inset-block-end: 24px;
  z-index: 12;
  max-width: min(420px, calc(100vw - 32px));
  min-height: 44px;
  padding: 12px 16px;
  border-radius: 6px;
  background: #253039;
  color: #fff;
  box-shadow: 0 8px 24px rgba(24, 32, 38, 0.18);
}
.notice:empty {
  display: none;
}
.notice.error {
  background: #8b2727;
}
.notice.success {
  background: #176b46;
}

@media (max-width: 800px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(288px, calc(100vw - 48px));
    transform: translateX(-105%);
    box-shadow: 12px 0 32px rgba(24, 32, 38, 0.2);
  }
  [dir='rtl'] .sidebar {
    inset: 0 0 0 auto;
    transform: translateX(105%);
    box-shadow: -12px 0 32px rgba(24, 32, 38, 0.2);
  }
  .sidebar.is-open {
    transform: translateX(0);
  }
  .sidebar-close {
    display: inline-grid;
    place-items: center;
    margin-inline-start: auto;
    flex: 0 0 auto;
  }
  .menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 9;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(24, 32, 38, 0.32);
  }
  .menu-button {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
  }
  .topbar {
    padding: 0 16px;
  }
  .connection {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .topbar-action {
    width: 44px;
    padding: 0;
    font-size: 0;
  }
  .topbar-action::after {
    content: '↗';
    font-size: 20px;
  }
  main {
    padding: 24px 18px;
  }
  .page-intro {
    display: block;
    min-height: 0;
    padding-bottom: 24px;
  }
  .intro-actions {
    margin-top: 22px;
  }
  .intro-actions .button {
    flex: 1 1 100%;
  }
  h1 {
    font-size: 25px;
  }
  .split {
    display: block;
  }
  .split article {
    min-height: 0;
    padding: 26px 0;
  }
  .split article + article {
    padding-inline-start: 0;
    border-inline-start: 0;
    border-top: 1px solid #d9dee2;
  }
  .split article:first-child {
    padding-inline-end: 0;
  }
  .split p {
    min-height: 0;
  }
  .recent li {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 0;
    gap: 4px;
  }
  .notice {
    inset-inline: 16px;
    inset-block-end: 16px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .sidebar {
    transition: transform 160ms ease;
  }
  .button,
  nav a,
  .tool-row {
    transition:
      background-color 120ms ease,
      color 120ms ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
