:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  color: #17302d;
  background: #f4f6f3;
  font-size: 14px;
  --green: #174b3d;
  --muted: #6f7d76;
  --line: #dde4df;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
select {
  cursor: pointer;
}
button {
  border: 1px solid var(--line);
  background: white;
  padding: 10px 15px;
  border-radius: 8px;
  color: inherit;
  font-weight: 600;
}
button:hover {
  background: #edf3ed;
}
button.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid #b49343;
  outline-offset: 2px;
}
input,
select,
textarea {
  border: 1px solid #cbd6ce;
  border-radius: 7px;
  padding: 10px;
  background: #fff;
  color: #193c32;
  width: 100%;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  font-weight: 650;
  color: #54685d;
}
h1 {
  font-weight: 600;
  font-size: 30px;
  letter-spacing: -1px;
  margin: 8px 0 10px;
}
h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px;
}
p {
  line-height: 1.65;
}
small,
.muted {
  color: var(--muted);
}
.app {
  display: grid;
  grid-template-columns: 235px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #102f28;
  color: #d7e5dc;
  padding: 29px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}
.brand {
  font-size: 23px;
  letter-spacing: 2px;
  color: #fff;
  font-weight: 700;
  padding: 0 12px;
}
.brand small {
  display: block;
  letter-spacing: 3px;
  font-size: 9px;
  color: #b3c6b8;
  margin-top: 7px;
}
.nav-section {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.7px;
  color: #96b3a3;
  margin: 25px 12px 10px;
}
.nav {
  display: block;
  color: #c7d8cf;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 7px;
  font-size: 12px;
  margin: 2px 0;
}
.nav:hover,
.nav.selected {
  background: #284e40;
  color: white;
}
.sidebar-footer {
  margin: 28px 12px 10px;
  font-size: 11px;
  color: #a0b7aa;
  line-height: 1.8;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 78px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  background: #fff;
  gap: 20px;
}
.topbar select {
  width: 220px;
  font-size: 12px;
}
.topbar .user {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 12px;
}
.avatar {
  height: 32px;
  width: 32px;
  border-radius: 50%;
  background: #e6eddf;
  display: grid;
  place-items: center;
  color: var(--green);
  font-weight: 700;
}
.content {
  max-width: 1600px;
  padding: 30px 36px 50px;
  margin: auto;
}
.eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #76816d;
  font-weight: 700;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.heading p {
  margin: 0;
  color: var(--muted);
}
.badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-radius: 20px;
  padding: 6px 10px;
  background: #e8efe7;
  color: #31573c;
  white-space: nowrap;
}
.badge.pending,
.badge.draft {
  background: #f8efda;
  color: #856026;
}
.badge.rejected,
.badge.reversed {
  background: #fae8e1;
  color: #a34a30;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 17px;
  margin-bottom: 25px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 23px;
}
.card .value {
  font-size: 29px;
  letter-spacing: -1px;
  margin: 14px 0 8px;
  font-weight: 600;
}
.card .caption {
  font-size: 11px;
  color: var(--muted);
}
.grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 22px;
}
.panel-head {
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.panel-head h2 {
  margin: 0;
}
.panel-body {
  padding: 0 24px 24px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #788779;
  background: #f7f9f6;
  text-align: start;
  font-weight: 600;
  padding: 13px 20px;
  white-space: nowrap;
}
td {
  padding: 15px 20px;
  border-top: 1px solid #edf0eb;
  max-width: 360px;
  overflow-wrap: anywhere;
}
td button.link {
  padding: 0;
  border: 0;
  background: none;
  text-align: start;
  color: var(--green);
}
.toolbar {
  display: flex;
  gap: 12px;
  padding: 16px 23px;
  border-top: 1px solid var(--line);
}
.toolbar input {
  max-width: 330px;
}
.empty {
  padding: 45px;
  text-align: center;
  color: var(--muted);
  line-height: 1.8;
}
.notice {
  background: #f8f1df;
  color: #725b2a;
  padding: 12px 16px;
  font-size: 12px;
  border-radius: 8px;
  margin-bottom: 22px;
  line-height: 1.6;
}
.bar-row {
  display: grid;
  grid-template-columns: 100px 1fr 95px;
  gap: 12px;
  align-items: center;
  margin: 18px 0;
  font-size: 12px;
}
.bar {
  height: 9px;
  background: #edf1e9;
  border-radius: 4px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: #87a084;
  border-radius: 4px;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-art {
  background: #123c31;
  color: #eef4ed;
  padding: 10vw 6vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-art h1 {
  font-size: 48px;
  max-width: 490px;
  line-height: 1.15;
  margin-top: 50px;
}
.login-art p {
  max-width: 450px;
  color: #bfd0c4;
}
.login-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 35px;
}
.login-form form {
  width: 350px;
  display: grid;
  gap: 20px;
}
.login-form h1 {
  margin-bottom: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 25px;
  justify-content: flex-end;
}
.line-list {
  display: grid;
  gap: 9px;
}
.line-row {
  display: flex;
  gap: 8px;
  align-items: end;
}
.line-row label {
  flex: 1;
  min-width: 80px;
}
.line-row label:first-child {
  flex: 2;
}
.line-row input,
.line-row select {
  font-size: 12px;
}
.field-display {
  border-bottom: 1px solid #e6ece5;
  padding: 10px 0;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  font-size: 12px;
}
.field-display strong {
  overflow-wrap: anywhere;
  max-width: 65%;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 28px;
  width: min(880px, 95vw);
  max-height: 90vh;
  color: #17302d;
}
dialog::backdrop {
  background: #0c271b85;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.dialog-head h2 {
  margin: 0;
}
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.error {
  color: #a6362b;
  font-size: 13px;
}
.report-select {
  max-width: 300px;
}
#toast {
  position: fixed;
  bottom: 25px;
  inset-inline-end: 25px;
  background: #143c31;
  color: white;
  padding: 14px 24px;
  border-radius: 8px;
  display: none;
  max-width: 500px;
  z-index: 5;
}
.mobile-title {
  display: none;
}
.money {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.subtle {
  font-size: 11px;
  color: #758372;
}
.status-count {
  font-size: 11px;
  color: #758372;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
}
.lang {
  padding: 8px;
  font-size: 12px;
}
.actions-note {
  margin: 14px 0;
  font-size: 12px;
  color: #6f7d76;
}
.pending-card {
  padding: 15px 0;
  border-bottom: 1px solid #edf0e8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
@media (max-width: 1100px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .content {
    padding: 25px;
  }
  .app {
    grid-template-columns: 205px 1fr;
  }
  .topbar {
    padding: 0 25px;
  }
  .line-row {
    flex-wrap: wrap;
  }
}
@media (max-width: 720px) {
  .app {
    display: block;
  }
  .sidebar {
    position: relative;
    height: auto;
    padding: 18px;
  }
  .brand {
    font-size: 18px;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    gap: 5px;
    margin-top: 15px;
  }
  .nav {
    white-space: nowrap;
  }
  .nav-section,
  .sidebar-footer {
    display: none;
  }
  .topbar {
    padding: 12px 18px;
    height: auto;
    flex-wrap: wrap;
  }
  .topbar select {
    width: 180px;
  }
  .content {
    padding: 20px 15px;
  }
  .cards {
    gap: 10px;
  }
  .card {
    padding: 17px;
  }
  .card .value {
    font-size: 24px;
  }
  .heading {
    align-items: start;
  }
  h1 {
    font-size: 26px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .wide {
    grid-column: auto;
  }
  .login {
    display: block;
  }
  .login-art {
    padding: 30px;
  }
  .login-art h1 {
    font-size: 30px;
    margin-top: 25px;
  }
  .login-art p {
    display: none;
  }
  .login-form {
    padding: 30px;
  }
  .user .username {
    display: none;
  }
}
@media print {
  .sidebar,
  .topbar,
  .toolbar,
  button,
  .notice {
    display: none !important;
  }
  .app {
    display: block;
  }
  .content {
    padding: 0;
  }
  .panel {
    border: 0;
  }
  .cards {
    display: block;
  }
  .card {
    display: inline-block;
    width: 24%;
  }
  body {
    background: white;
  }
}
html[lang="ar"] {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 15px;
}
html[lang="ar"] .nav {
  font-size: 13px;
  line-height: 1.7;
}
html[lang="ar"] .notice {
  font-size: 13px;
  line-height: 1.9;
}
html[lang="ar"] label {
  font-size: 13px;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  min-width: 0;
}
legend {
  font-size: 12px;
  font-weight: 600;
  padding: 0 5px;
}
.record-ref {
  font-size: 11px;
  color: var(--muted);
}
.onboarding-content {
  display: block;
  max-width: 680px;
  line-height: 1.8;
}
.onboarding-content button {
  margin-inline-end: 12px;
  margin-top: 12px;
}
.attachment-drop {
  border: 2px dashed var(--line);
  border-radius: 10px;
  padding: 18px;
  margin: 10px 0;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
}
.attachment-drop:focus {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-color: var(--accent);
}
