@font-face {
  font-family: Vazir;
  src: url("/static/fonts/Vazir-Regular-UI.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Vazir;
  src: url("/static/fonts/Vazir-Bold-UI.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Vazir;
  src: url("/static/fonts/Vazir-Black-UI.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}
:root {
  font-family: Vazir, Tahoma, sans-serif;
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #fff;
  --ink: #20393c;
  --muted: #62767c;
  --border: #e1e8e8;
  --green: #17675d;
  --soft: #e8f3ef;
  --amber: #986322;
  --amber-bg: #fff4df;
  --red: #b34343;
  --shadow: 0 8px 32px #173c3b07;
  --nav: #153f40;
  --field: #fff;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #112629;
  --panel: #193337;
  --ink: #eef4f1;
  --muted: #b0c4c4;
  --border: #315054;
  --green: #86cfb8;
  --soft: #254b44;
  --amber: #f0c889;
  --amber-bg: #4a3c26;
  --red: #ffaaaa;
  --shadow: none;
  --nav: #102b2e;
  --field: #142c30;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.8;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #b98d49;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3,
strong {
  font-weight: 900;
}
h1 {
  font-size: 32px;
  line-height: 1.6;
}
h2 {
  font-size: 24px;
}
h3 {
  font-size: 19px;
}
small {
  font-size: 14px;
}
.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.primary,
.secondary,
.quiet,
.danger {
  border: 0;
  border-radius: 12px;
  padding: 11px 20px;
  font-weight: 700;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.primary {
  background: #17675d;
  color: #fff;
}
.primary:hover {
  background: #12564e;
}
.secondary {
  background: var(--soft);
  color: var(--green);
}
.quiet {
  background: transparent;
  color: var(--muted);
}
.quiet:hover {
  background: var(--soft);
  color: var(--green);
}
.danger {
  background: #b3434312;
  color: var(--red);
}
.icon-button {
  border: 1px solid var(--border);
  border-radius: 11px;
  width: 44px;
  height: 44px;
  background: var(--panel);
  color: var(--ink);
  font-size: 24px;
}
.error {
  color: var(--red);
  white-space: pre-line;
}
.error:empty {
  display: none;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  max-width: 1250px;
  margin: auto;
  padding: 56px;
  gap: 70px;
  align-items: center;
}
.login-art img {
  width: 100%;
  border-radius: 28px;
}
.login-art h1 {
  margin-top: 28px;
}
.login-art p {
  color: var(--muted);
  font-size: 19px;
  margin-top: 10px;
}
.login-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow);
}
.brand-mark {
  width: 58px;
  height: 58px;
  margin-bottom: 20px;
}
.login-card h2 {
  font-size: 32px;
  margin: 4px 0 12px;
}
.login-card > p {
  color: var(--muted);
  margin-bottom: 22px;
}
.login-card .primary {
  width: 100%;
  margin-top: 12px;
}
.login-card > small {
  display: block;
  margin-top: 24px;
  color: var(--muted);
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 17px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--field);
  color: var(--ink);
  border-radius: 11px;
  min-height: 48px;
  padding: 10px 12px;
  font-weight: 400;
}
textarea {
  resize: vertical;
  min-height: 90px;
}
input::placeholder {
  color: var(--muted);
}
.sidebar {
  position: fixed;
  inset: 0 0 0 auto;
  width: 250px;
  background: var(--nav);
  color: #f4f7f5;
  padding: 30px 20px;
  z-index: 20;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 4px 28px;
  border-bottom: 1px solid #ffffff18;
  font-size: 24px;
  font-weight: 900;
}
.brand img {
  width: 48px;
  height: 48px;
}
.brand small {
  display: block;
  color: #b1cbc8;
  font-weight: 400;
  font-size: 13px;
}
.company {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 25px 4px;
}
.company-icon {
  display: grid;
  place-items: center;
  background: #ffffff13;
  border: 1px solid #ffffff20;
  border-radius: 12px;
  width: 42px;
  height: 42px;
  font-size: 22px;
}
.company strong {
  display: block;
  font-size: 15px;
}
.company small {
  color: #b1cbc8;
}
.sidebar nav {
  display: grid;
  gap: 7px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  font-weight: 700;
  color: #c5d8d4;
  font-size: 15px;
}
.nav-item svg {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
}
.nav-item.active {
  background: #ffffff12;
  color: #f7ddb0;
}
.nav-item:hover {
  background: #ffffff09;
}
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid #ffffff18;
  padding-top: 18px;
  display: grid;
  gap: 4px;
}
.sidebar-bottom button {
  color: #c5d8d4;
  justify-content: flex-start;
  padding: 8px 12px;
}
.sidebar-bottom small {
  color: #96b4af;
  font-size: 12px;
  padding: 12px;
}
.workspace-body {
  margin-right: 250px;
}
.topbar {
  height: 98px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: var(--panel);
  gap: 12px;
}
.topbar strong {
  font-size: 20px;
  display: block;
}
.topbar-end {
  display: flex;
  align-items: center;
  gap: 18px;
}
.topbar time {
  font-size: 14px;
  color: var(--muted);
}
.avatar {
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--green);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-weight: 900;
}
.topbar #menu-toggle {
  display: none;
}
main {
  max-width: 1600px;
  margin: auto;
  padding: 32px 40px;
  min-height: calc(100vh - 160px);
}
footer {
  padding: 12px 40px 22px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
}
.hero {
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  background: var(--panel);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 220px;
}
.hero-copy {
  padding: 30px 32px;
}
.hero-copy h1 {
  font-size: 30px;
  margin: 8px 0;
}
.hero-copy p {
  color: var(--muted);
  max-width: 380px;
}
.hero-art {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: center;
}
.hello {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  color: var(--green);
  font-weight: 700;
  font-size: 14px;
}
.hello span {
  height: 7px;
  width: 7px;
  border-radius: 50%;
  background: var(--green);
}
.action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 30px;
}
.action-tile {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 22px;
  text-align: right;
  color: var(--ink);
  min-height: 112px;
  box-shadow: var(--shadow);
  transition:
    transform 0.15s,
    border-color 0.15s;
}
.action-tile:hover {
  transform: translateY(-3px);
  border-color: #8ab9a6;
}
.action-tile.featured {
  background: #17675d;
  color: #fff;
  border-color: #17675d;
}
.tile-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--green);
  border-radius: 15px;
  flex-shrink: 0;
}
.tile-icon svg {
  width: 26px;
  height: 26px;
}
.action-tile.featured .tile-icon {
  background: #ffffff18;
  color: #fff;
}
.action-tile strong {
  display: block;
  font-size: 20px;
}
.action-tile small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}
.action-tile.featured small {
  color: #dbebe6;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}
.section-head p {
  color: var(--muted);
  font-size: 15px;
  margin-top: 4px;
}
.head-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}
.metric {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 18px 20px;
}
.metric span {
  font-size: 14px;
  color: var(--muted);
}
.metric strong {
  font-size: 25px;
  display: block;
  margin-top: 8px;
  white-space: nowrap;
}
.metric small {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}
.metric .positive {
  color: var(--green);
}
.metric .negative {
  color: var(--red);
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.search {
  max-width: 320px;
  min-width: 200px;
}
.tabs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.tab {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  background: var(--panel);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.tab.selected {
  background: var(--soft);
  color: var(--green);
  border-color: var(--soft);
}
.tab b {
  margin-right: 9px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: right;
  white-space: nowrap;
}
th {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
td {
  padding: 16px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
tr:last-child td {
  border-bottom: 0;
}
td strong {
  font-size: 16px;
}
td small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.badge.draft {
  background: var(--amber-bg);
  color: var(--amber);
}
.badge.cancelled {
  color: var(--red);
  background: #b3434310;
}
.empty {
  padding: 45px 20px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 15px;
  color: var(--muted);
}
.empty svg {
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  color: var(--green);
}
.empty h3 {
  color: var(--ink);
  margin-bottom: 6px;
}
.empty .primary {
  margin-top: 18px;
}
.contract-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.contract-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
}
.contract-card .route {
  margin: 12px 0;
  color: var(--muted);
}
.contract-card progress {
  width: 100%;
  height: 7px;
  accent-color: #398879;
  margin: 16px 0 8px;
}
.contract-card .split {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
}
.contract-card .head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.card-money {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 18px;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}
.card-money strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
}
.notice {
  background: var(--soft);
  color: var(--green);
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 20px;
}
.warning {
  background: var(--amber-bg);
  color: var(--amber);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.span-2 {
  grid-column: 1/-1;
}
.hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}
.form-summary {
  padding: 16px;
  background: var(--soft);
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 15px;
}
.form-summary strong {
  font-size: 21px;
}
.check-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  margin: 0;
  font-weight: 400;
}
.check-row input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--green);
}
.check-row span {
  flex: 1;
}
.check-list {
  max-height: 300px;
  overflow: auto;
  margin-bottom: 20px;
}
.subheading {
  margin: 20px 0 12px;
}
.row-actions {
  display: flex;
  gap: 6px;
}
.row-actions button {
  padding: 6px 10px;
  min-height: 36px;
  font-size: 13px;
}
.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.review-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}
.review-row:last-child {
  border: 0;
}
.review-row strong {
  background: var(--amber-bg);
  color: var(--amber);
  border-radius: 9px;
  padding: 3px 12px;
}
dialog {
  width: min(670px, calc(100vw - 32px));
  max-height: 90dvh;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 0;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 30px 100px #0003;
}
dialog::backdrop {
  background: #092b3370;
  backdrop-filter: blur(4px);
}
dialog form {
  padding: 26px;
}
dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
dialog header h2 {
  font-size: 24px;
}
.dialog-footer {
  display: flex;
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 25px;
  z-index: 100;
  background: #173f40;
  color: #fff;
  border: 1px solid #ffffff30;
  border-radius: 12px;
  padding: 14px 24px;
  box-shadow: 0 8px 30px #0002;
  max-width: calc(100vw - 40px);
  display: none;
}
#toast.visible {
  display: block;
}
.print-sheet {
  padding: 30px;
  background: var(--panel);
}
.print-sheet h1 {
  font-size: 25px;
}
.print-sheet .totals {
  margin-top: 22px;
  padding: 16px;
  border-top: 2px solid var(--border);
}
.loading {
  text-align: center;
  padding: 80px;
  color: var(--muted);
}
@media (min-width: 1600px) {
  main {
    padding-top: 38px;
  }
  .hero-art {
    height: 270px;
  }
  .action-tile {
    min-height: 125px;
  }
}
@media (max-width: 1180px) {
  .sidebar {
    width: 220px;
    padding: 24px 15px;
  }
  .workspace-body {
    margin-right: 220px;
  }
  .topbar {
    padding: 0 25px;
  }
  main {
    padding: 24px;
  }
  .action-tile {
    padding: 17px;
    gap: 11px;
  }
  .action-tile strong {
    font-size: 18px;
  }
  .tile-icon {
    width: 42px;
    height: 42px;
  }
  .hero-copy {
    padding: 24px;
  }
  .hero-copy h1 {
    font-size: 26px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .topbar-end {
    gap: 10px;
  }
  .contract-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 850px) {
  .sidebar {
    transform: translateX(100%);
    transition: transform 0.2s;
    width: 250px;
    box-shadow: 0 0 0 100vmax #0000;
    pointer-events: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: -100vw 0 0 100vw #10262980;
    pointer-events: auto;
  }
  .workspace-body {
    margin-right: 0;
  }
  .topbar #menu-toggle {
    display: block;
  }
  .topbar {
    height: 82px;
    justify-content: flex-start;
  }
  .topbar-end {
    margin-right: auto;
  }
  .topbar time {
    display: none;
  }
  .topbar strong {
    font-size: 18px;
  }
  .hero-art {
    height: 220px;
  }
  .login-screen {
    gap: 35px;
    padding: 35px;
  }
  .login-card {
    padding: 28px;
  }
  .login-art h1 {
    font-size: 26px;
  }
  .report-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  main {
    padding: 18px 15px;
  }
  .topbar {
    padding: 0 15px;
  }
  .topbar .eyebrow {
    font-size: 12px;
  }
  .topbar-end .quiet {
    font-size: 13px;
    padding: 8px;
  }
  .avatar {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    position: relative;
    min-height: 180px;
  }
  .hero-copy {
    padding: 24px;
    z-index: 1;
    max-width: 100%;
  }
  .hero-copy h1 {
    font-size: 27px;
  }
  .hero-copy p {
    font-size: 14px;
    max-width: 240px;
  }
  .hero-art {
    position: absolute;
    width: 72%;
    left: -9%;
    bottom: 0;
    height: 100%;
    opacity: 0.15;
    object-position: center;
  }
  .action-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0 25px;
  }
  .action-tile {
    display: block;
    padding: 17px 14px;
    min-height: 145px;
  }
  .tile-icon {
    height: 40px;
    width: 40px;
    margin-bottom: 10px;
    border-radius: 12px;
  }
  .tile-icon svg {
    width: 23px;
    height: 23px;
  }
  .action-tile strong {
    font-size: 18px;
  }
  .action-tile small {
    font-size: 12px;
  }
  .section-head {
    align-items: flex-start;
  }
  .section-head h2 {
    font-size: 22px;
  }
  .section-head p {
    font-size: 14px;
  }
  .head-actions .primary,
  .head-actions .secondary {
    padding: 9px 12px;
    font-size: 14px;
  }
  .panel {
    padding: 17px;
  }
  .toolbar {
    display: block;
  }
  .search {
    max-width: none;
    margin-top: 14px;
  }
  .tabs {
    gap: 6px;
  }
  .tab {
    padding: 7px 10px;
    font-size: 13px;
  }
  .metric {
    padding: 15px;
  }
  .metric strong {
    font-size: 21px;
  }
  .metrics {
    gap: 10px;
  }
  .metric span {
    font-size: 13px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .span-2 {
    grid-column: auto;
  }
  dialog form {
    padding: 21px;
  }
  dialog header h2 {
    font-size: 22px;
  }
  footer {
    padding: 12px 17px;
    font-size: 12px;
  }
  footer span {
    display: none;
  }
  .login-screen {
    display: block;
    padding: 25px 18px;
  }
  .login-art {
    display: none;
  }
  .login-card {
    margin: 30px auto;
    max-width: 440px;
  }
  .contract-card {
    padding: 18px;
  }
  .notice {
    font-size: 13px;
  }
  .row-actions {
    flex-wrap: wrap;
  }
  td {
    padding: 13px 10px;
  }
  .card-money strong {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.trip-cards {
  display: none;
}
.trip-card {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.trip-card:last-child {
  border: 0;
}
.trip-card-head,
.trip-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.trip-card h3 {
  margin-top: 14px;
  font-size: 20px;
}
.trip-card > p {
  margin-top: 5px;
}
.trip-card-foot {
  margin-top: 15px;
}
.trip-card-foot .secondary {
  font-size: 14px;
  min-height: 40px;
  padding: 8px 12px;
}
@media (max-width: 560px) {
  .trip-table {
    display: none;
  }
  .trip-cards {
    display: block;
  }
}
@media print {
  .sidebar,
  .topbar,
  footer,
  .section-head,
  .no-print,
  #toast,
  dialog {
    display: none !important;
  }
  .workspace-body {
    margin: 0;
  }
  main {
    padding: 0;
  }
  .panel {
    border: 0;
    box-shadow: none;
  }
  .print-sheet {
    color: #000;
    background: #fff;
  }
  body {
    background: #fff;
    color: #000;
  }
  .print-sheet table {
    white-space: normal;
  }
  .print-sheet th,
  .print-sheet td {
    font-size: 12px;
    padding: 8px;
    border-color: #ddd;
  }
}
