@font-face {
  font-family: Vazirmatn;
  src: url(fonts/vazirmatn-400.woff2) format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Vazirmatn;
  src: url(fonts/vazirmatn-500.woff2) format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Vazirmatn;
  src: url(fonts/vazirmatn-600.woff2) format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Vazirmatn;
  src: url(fonts/vazirmatn-700.woff2) format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
:root {
  --ink: #19342f;
  --muted: #72807b;
  --green: #123c35;
  --green2: #22594e;
  --lime: #d9ef9a;
  --bg: #f3f5f4;
  --line: #e3e9e5;
  --white: #fff;
  --red: #a23b3b;
  --shadow: 0 12px 40px #18392f0b;
  font-family: Vazirmatn, Tahoma, Arial, sans-serif;
  color: var(--ink);
  font-size: 14px;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  line-height: 1.8;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
.button {
  border: 1px solid transparent;
  background: var(--green);
  color: #fff;
  border-radius: 9px;
  padding: 10px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.7;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
button:hover,
.button:hover {
  background: var(--green2);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #91b871;
  outline-offset: 3px;
}
.secondary {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}
.secondary:hover {
  background: #edf3ef;
}
.danger {
  color: var(--red);
}
.danger-button {
  background: var(--red);
}
.icon-button {
  background: transparent;
  color: inherit;
  font-size: 23px;
  line-height: 1;
  padding: 8px;
  border: 0;
  min-height: 40px;
  min-width: 40px;
}
.icon-button:hover {
  background: #ffffff18;
}
.text-button {
  padding: 4px 8px;
  background: transparent;
  color: var(--green);
  white-space: nowrap;
}
.text-button:hover {
  background: #eaf0ed;
}
.text-button.danger {
  color: var(--red);
}
a {
  color: var(--green);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.6px;
  line-height: 1.6;
  margin-bottom: 8px;
}
h2 {
  font-size: 21px;
  margin-bottom: 12px;
}
h3 {
  font-size: 17px;
  margin: 10px 0 3px;
}
p {
  color: var(--muted);
  margin-bottom: 18px;
}
small {
  font-size: 12px;
  color: var(--muted);
}
input:not([type="checkbox"]):not([type="file"]),
select,
textarea {
  width: 100%;
  border: 1px solid #d9e2dd;
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  outline: none;
  min-height: 45px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #66927c;
  box-shadow: 0 0 0 3px #3b75591a;
}
input[type="number"] {
  direction: ltr;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  flex-shrink: 0;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 14px;
  margin-bottom: 16px;
}
textarea {
  resize: vertical;
}
#sidebar {
  width: 242px;
  background: var(--green);
  color: #fff;
  position: fixed;
  right: 0;
  inset-block: 0;
  padding: 35px 22px 0;
  display: flex;
  flex-direction: column;
  z-index: 30;
}
.wordmark {
  font-size: 44px;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
  line-height: 1.2;
  display: block;
  width: fit-content;
}
.wordmark span {
  display: block;
  font:
    10px Arial,
    sans-serif;
  letter-spacing: 3px;
  margin-top: 10px;
}
.sidebar-sub {
  font-size: 12px;
  color: #acbfb8;
  margin: 20px 0 30px;
}
nav {
  overflow-y: auto;
  flex: 1;
  margin-inline: -10px;
  padding-inline: 5px;
}
.nav-item {
  background: transparent;
  width: 100%;
  justify-content: flex-start;
  font-weight: 400;
  padding: 12px 13px;
  border-radius: 8px;
  margin: 3px 0;
  color: #d4e1db;
  text-align: right;
  font-size: 14px;
}
.nav-item.active {
  background: var(--lime);
  color: var(--green);
  font-weight: 700;
}
.nav-item:hover:not(.active) {
  background: #ffffff10;
}
.nav-icon {
  font-size: 21px;
  width: 24px;
  display: inline-flex;
  justify-content: center;
  line-height: 1.2;
  margin-left: 6px;
}
.nav-caption {
  font-size: 11px;
  color: #91aaa0;
  margin: 25px 14px 12px;
}
.sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #ffffff17;
  padding: 21px 0;
  margin-top: 16px;
}
.sidebar-bottom strong {
  font-size: 13px;
}
.sidebar-bottom small {
  display: block;
  color: #9fb8ad;
}
.sidebar-bottom .icon-button {
  margin-right: auto;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff16;
  display: grid;
  place-items: center;
  color: var(--lime);
  font-size: 18px;
}
.workspace {
  margin-right: 242px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  min-height: 80px;
  background: #ffffffd9;
  border-bottom: 1px solid var(--line);
  padding: 18px 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 13px;
}
.topbar > div {
  display: flex;
  align-items: center;
  gap: 15px;
}
.topbar time {
  color: var(--muted);
  font-size: 12px;
}
.slash {
  color: #b7c3bd;
}
.notification {
  background: white;
  color: var(--ink);
  font-size: 12px;
  border: 1px solid var(--line);
  padding: 7px 12px;
}
.notification b {
  background: #eaf1e5;
  border-radius: 5px;
  min-width: 24px;
}
.notification:hover {
  background: #edf3ef;
}
#menu {
  display: none;
}
#content {
  padding: 35px 38px 45px;
  flex: 1;
  min-width: 0;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  margin-bottom: 26px;
}
.page-head p {
  margin: 0;
  font-size: 14px;
}
.eyebrow {
  font:
    10px Arial,
    sans-serif;
  letter-spacing: 2px;
  color: #86988b;
  margin-bottom: 12px;
  display: block;
}
.tools,
.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.tools {
  flex-shrink: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 19px 23px;
  box-shadow: var(--shadow);
}
.stat > span {
  font-size: 13px;
  color: var(--muted);
}
.stat strong {
  font-size: 30px;
  display: block;
  font-weight: 500;
  line-height: 1.7;
}
.stat small {
  font-size: 11px;
}
.stat.accent {
  background: #e5eedc;
  border-color: #d8e4cc;
}
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 20px;
}
.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.panel-toolbar > div {
  display: flex;
  gap: 14px;
  align-items: center;
}
.count {
  font-size: 11px;
  color: var(--muted);
  background: #f1f5f2;
  padding: 2px 9px;
  border-radius: 20px;
}
.search {
  max-width: 270px;
  min-height: 39px !important;
  font-size: 13px;
}
.table-wrap {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 13px;
}
th {
  font-size: 12px;
  color: #748379;
  font-weight: 500;
  padding: 16px 20px;
  background: #f9fbf9;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 17px 20px;
  border-bottom: 1px solid #edf1ee;
  white-space: nowrap;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #f8fbf7;
}
.row-num {
  width: 36px;
  color: #a4afa8;
  padding-left: 8px;
}
td:nth-child(2) {
  font-weight: 500;
}
.numeric {
  font-family: Vazirmatn, Tahoma, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  display: inline-block;
}
.final-number {
  color: var(--green);
  background: #eaf2e3;
  padding: 5px 10px;
  border-radius: 5px;
  font-weight: 700;
}
.panel-bottom {
  padding: 14px 24px;
  font-size: 11px;
  color: #7c8a81;
  border-top: 1px solid var(--line);
}
.badge {
  font-size: 11px;
  background: #eaf2e5;
  color: #386137;
  border-radius: 5px;
  padding: 4px 9px;
  display: inline-block;
  white-space: nowrap;
}
.badge.warning {
  background: #fff2db;
  color: #8a641b;
}
.empty {
  padding: 65px 25px;
  text-align: center;
}
.empty strong {
  font-size: 18px;
}
.empty p {
  margin-top: 10px;
  margin-bottom: 0;
}
.muted {
  color: var(--muted);
}
footer {
  display: flex;
  justify-content: space-between;
  color: #87958b;
  padding: 20px 38px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}
dialog {
  border: 0;
  border-radius: 16px;
  padding: 28px;
  width: min(820px, calc(100% - 32px));
  max-height: 90vh;
  color: var(--ink);
  box-shadow: 0 28px 100px #081d3440;
}
dialog::backdrop {
  background: #0d272c88;
  backdrop-filter: blur(4px);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
}
.modal-head h2 {
  margin: 0;
}
.modal-head .icon-button:hover {
  background: #edf3ef;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.wide {
  grid-column: 1/-1;
}
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.recipe-editor {
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 10px;
  margin-bottom: 20px;
}
.recipe-editor p {
  font-size: 12px;
}
.recipe-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.recipe-row {
  display: grid;
  grid-template-columns: 1fr 110px 20px;
  align-items: center;
  margin: 0;
  border-bottom: 1px solid #edf1ee;
  padding: 8px 0;
  gap: 12px;
}
.recipe-row:last-child {
  border: 0;
}
.recipe-input {
  min-height: 36px !important;
  padding: 5px 10px !important;
}
.recipe-row span {
  font-size: 13px;
}
.error-text {
  color: var(--red);
  font-size: 13px;
}
.request-card {
  padding: 24px;
}
.request-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
}
.compact th,
.compact td {
  padding: 10px 14px;
  white-space: normal;
}
.compact td {
  max-width: 280px;
  overflow-wrap: anywhere;
}
.review-response {
  padding: 12px;
  background: #f3f6f0;
  border-right: 3px solid #94ae7c;
  margin: 15px 0 0;
}
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.exchange-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.padded {
  padding: 28px;
}
.section-number {
  font:
    28px Arial,
    sans-serif;
  color: #b2c6a1;
  display: block;
  margin-bottom: 18px;
}
.help-list {
  font-size: 13px;
  color: var(--muted);
  padding-right: 20px;
  margin-top: 25px;
  line-height: 2.4;
}
.upload-zone {
  border: 1px dashed #a8b9ad;
  background: #f6f9f3;
  border-radius: 10px;
  text-align: center;
  padding: 25px;
  margin: 20px 0;
}
.upload-zone input {
  max-width: 100%;
  margin: 10px auto;
}
.notice {
  background: #f8f5e9;
  color: #796b39;
  padding: 12px 16px;
  border-radius: 7px;
  font-size: 12px;
}
.preset-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 20px 0;
  flex-wrap: wrap;
}
.check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}
.permission-group {
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 12px;
  overflow: hidden;
}
.permission-group summary {
  padding: 12px 18px;
  background: #f8faf7;
  cursor: pointer;
  font-weight: 700;
}
.permission-ops {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 15px;
  border-bottom: 1px solid var(--line);
}
.permission-ops .check {
  font-size: 12px;
  margin: 0;
}
details:not(.permission-group) summary {
  padding: 15px 0;
  cursor: pointer;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f4f7f2;
  padding: 20px;
  font: 12px/1.7 monospace;
}
.audit-item {
  padding: 5px 22px;
}
.audit-item summary {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13px;
}
.audit-item time {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
}
.settings-panel {
  max-width: 950px;
}
.formula-list {
  padding: 12px 20px;
  background: #f7f9f6;
  border-radius: 8px;
  margin: 20px 0;
}
.formula-list p {
  font-size: 13px;
  color: var(--ink);
  margin: 8px 0;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 25px;
  z-index: 100;
  background: var(--green);
  color: #fff;
  padding: 14px 24px;
  border-radius: 10px;
  max-width: min(440px, calc(100% - 40px));
  box-shadow: 0 10px 40px #0002;
  display: none;
}
#toast.show {
  display: block;
}
#toast.error {
  background: #963f3f;
}
.loading {
  padding: 25vh 30px;
  text-align: center;
}
.auth-body {
  min-height: 100vh;
  background: #edf1ed;
  display: grid;
  place-items: center;
  padding: 40px;
}
.auth-body #app {
  width: min(100%, 1050px);
}
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
  min-height: 640px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 35px 100px #1d382a13;
}
.auth-intro {
  background: var(--green);
  color: white;
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-intro .eyebrow {
  font-family: Vazirmatn, Tahoma, Arial;
  letter-spacing: 0;
  color: #a7bfa9;
  font-size: 12px;
  margin-bottom: 20px;
}
.auth-intro h1 {
  font-size: 34px;
  line-height: 1.9;
  font-weight: 500;
}
.auth-intro p {
  color: #b3c6ba;
  line-height: 2.2;
}
.auth-intro small {
  color: #9bb3a5;
}
.auth-card {
  background: white;
  padding: 60px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
}
.auth-card > p {
  font-size: 13px;
}
.auth-card h2 {
  font-size: 24px;
}
.auth-card form {
  margin-top: 20px;
}
.auth-card form > button {
  width: 100%;
  margin-top: 8px;
  padding: 13px;
}
.auth-card label {
  font-size: 13px;
}
.auth-foot {
  font-size: 11px;
  color: #9ba69e;
  margin-top: 40px;
  text-align: center;
}
.auth-body > main.auth-card {
  max-width: 500px;
  border-radius: 15px;
}
.auth-card .wordmark {
  margin-bottom: 30px;
}
@media (min-width: 1450px) {
  #content {
    padding: 42px 50px;
  }
  .topbar {
    padding-inline: 50px;
  }
}
@media (max-width: 1150px) {
  #sidebar {
    width: 218px;
    padding-inline: 18px;
  }
  .workspace {
    margin-right: 218px;
  }
  #content {
    padding: 28px 24px;
  }
  .topbar {
    padding: 18px 24px;
  }
  .topbar time {
    display: none;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 16px;
  }
  .page-head {
    align-items: flex-start;
  }
  .tools {
    max-width: 250px;
  }
  h1 {
    font-size: 25px;
  }
  .topbar > div {
    gap: 10px;
  }
  .exchange-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 800px) {
  #sidebar {
    transform: translateX(100%);
    transition: transform 0.2s;
    width: 242px;
  }
  #sidebar.open {
    transform: translateX(0);
    box-shadow: -15px 0 70px #19352c22;
  }
  .workspace {
    margin-right: 0;
  }
  #menu {
    display: inline-flex;
  }
  .topbar {
    min-height: 70px;
    padding: 12px 16px;
  }
  .topbar > div > span,
  .topbar .slash {
    display: none;
  }
  .topbar-actions {
    gap: 5px;
  }
  .notification {
    font-size: 11px;
    padding: 6px 8px;
  }
  #content {
    padding: 25px 16px;
  }
  .page-head {
    flex-direction: column;
    gap: 15px;
  }
  .page-head .tools {
    max-width: none;
  }
  .page-head p {
    font-size: 13px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stat strong {
    font-size: 25px;
  }
  .stat > span {
    font-size: 12px;
  }
  .panel-toolbar {
    padding: 15px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .search {
    max-width: none;
  }
  .panel-toolbar strong {
    font-size: 14px;
  }
  td {
    padding: 15px 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .wide {
    grid-column: auto;
  }
  .request-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .request-card,
  .padded {
    padding: 20px;
  }
  .tools button,
  .tools .button {
    font-size: 12px;
    padding: 9px 12px;
  }
  .audit-item summary {
    gap: 8px;
    flex-wrap: wrap;
  }
  .audit-item time {
    width: 100%;
    margin: 0;
  }
  .auth-body {
    padding: 18px;
  }
  .auth-layout {
    grid-template-columns: 1fr;
    min-height: auto;
    max-width: 500px;
    margin: auto;
  }
  .auth-intro {
    padding: 30px;
    min-height: 220px;
  }
  .auth-intro h1 {
    font-size: 24px;
    line-height: 1.7;
    margin-top: 25px;
  }
  .auth-intro .eyebrow,
  .auth-intro p,
  .auth-intro small {
    display: none;
  }
  .auth-intro .wordmark {
    font-size: 35px;
  }
  .auth-card {
    padding: 35px 28px;
  }
  .auth-foot {
    margin-top: 25px;
  }
  dialog {
    padding: 20px;
  }
  .recipe-row {
    grid-template-columns: 1fr 80px 16px;
    font-size: 12px;
  }
  .recipe-row span {
    font-size: 12px;
  }
  .recipe-heading {
    align-items: flex-start;
    gap: 10px;
  }
  .recipe-heading strong {
    font-size: 13px;
  }
  footer {
    padding: 18px 16px;
    gap: 15px;
    font-size: 10px;
  }
  .permission-ops {
    gap: 10px;
  }
  .permission-ops .check {
    font-size: 11px;
  }
  .panel-bottom {
    padding: 13px 16px;
  }
  .preset-buttons {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.pricing-table th:last-child,
.pricing-table td:last-child {
  position: sticky;
  left: 0;
  background: #f5f9ef;
  box-shadow: 4px 0 8px #163a2d08;
  border-right: 1px solid #dce7d3;
}
.pricing-table th:last-child {
  color: #375236;
}
.pricing-table td:last-child {
  z-index: 1;
}
/* Release 1.1: resilient layouts and management surfaces. */
[hidden] {
  display: none !important;
}
button,
.button {
  overflow-wrap: anywhere;
  max-width: 100%;
}
.workspace,
#content,
.page-head > div,
.panel,
.stat,
.request-head > div,
.tools,
form,
label,
.form-grid > * {
  min-width: 0;
}
p,
h1,
h2,
h3,
small,
strong,
summary,
label {
  overflow-wrap: anywhere;
}
.stats {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}
.stat strong {
  font-size: clamp(23px, 2.5vw, 32px);
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.stat {
  min-height: 135px;
  height: auto;
}
.sidebar-bottom > div {
  min-width: 0;
  flex: 1;
}
.sidebar-bottom strong {
  display: block;
  max-width: 100%;
  white-space: normal;
  line-height: 1.65;
}
.sidebar-bottom .avatar,
.sidebar-bottom .icon-button {
  flex-shrink: 0;
}
.page-head .tools {
  flex-shrink: 1;
}
.page-head h1 {
  font-size: clamp(23px, 2.2vw, 30px);
}
.page-head .eyebrow {
  font-family: inherit;
  letter-spacing: 0;
  font-size: 12px;
}
.topbar > div {
  min-width: 0;
}
.topbar strong {
  overflow-wrap: anywhere;
}
.topbar-actions {
  flex-shrink: 0;
}
.notification {
  white-space: normal;
}
.stats small,
.panel-bottom {
  font-size: 12px;
}
.badge {
  white-space: normal;
  line-height: 1.8;
}
.count {
  white-space: nowrap;
}
td,
th {
  font-size: 14px;
}
th {
  font-size: 13px;
}
.numeric {
  font-variant-numeric: tabular-nums;
  line-height: 1.9;
}
.data-table .name-cell {
  white-space: normal;
  min-width: 200px;
  max-width: 320px;
  overflow-wrap: anywhere;
}
.data-table .value-cell {
  min-width: 120px;
}
.data-table .actions-cell {
  min-width: 160px;
}
.row-actions {
  gap: 4px;
  flex-wrap: nowrap;
}
.data-table .row-num {
  min-width: 45px;
}
.pricing-table th:last-child,
.pricing-table td:last-child {
  position: static;
  background: inherit;
  box-shadow: none;
  border-right: 0;
}
.pricing-table [data-field="final"] {
  position: sticky;
  left: 0;
  background: #f1f7e9;
  box-shadow: 5px 0 10px #183d2410;
  border-right: 1px solid #dce7d3;
  z-index: 2;
  min-width: 180px;
  max-width: 235px;
}
.pricing-table [data-field="final"] .numeric {
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 205px;
}
.pricing-table th[data-field="final"] {
  color: #254d32;
}
.report-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.report-controls > span {
  margin-right: auto;
  font-size: 12px;
  color: var(--muted);
}
.report-controls button {
  font-size: 13px;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 22px;
  gap: 12px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.pagination > span {
  font-size: 13px;
  color: var(--muted);
}
.pagination > div {
  display: flex;
  gap: 8px;
}
.pagination button {
  padding: 6px 17px;
  font-size: 13px;
}
.column-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}
.record-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.detail-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fbf8;
  height: auto;
}
.detail-card > span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
.detail-value {
  font-size: 18px;
  line-height: 1.9;
  white-space: normal;
  overflow-wrap: anywhere;
}
.detail-value .numeric {
  display: block;
  max-width: 100%;
  font-size: clamp(14px, 2vw, 23px);
  white-space: normal;
  overflow-wrap: anywhere;
}
.detail-value.highlight {
  color: var(--green);
  font-weight: 700;
}
.detail-card.wide {
  grid-column: 1/-1;
}
.final-number {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.user-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.user-toolbar {
  padding: 12px 0 20px;
  border: 0;
}
.user-toolbar h2 {
  margin: 0;
}
.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: 20px;
}
.user-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-shadow: var(--shadow);
}
.user-card.inactive {
  background: #fafbf9;
}
.user-card-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.user-card-head > div {
  flex: 1;
  min-width: 0;
}
.user-card-head .badge {
  flex-shrink: 0;
}
.user-avatar {
  width: 45px;
  height: 45px;
  flex-shrink: 0;
  border-radius: 13px;
  background: #e8efdf;
  color: #426138;
  display: grid;
  place-items: center;
  font-size: 21px;
}
.user-card h3 {
  margin: 0 0 4px;
  line-height: 1.9;
}
.username {
  font:
    13px/1.8 Arial,
    sans-serif;
  color: var(--muted);
  overflow-wrap: anywhere;
  display: block;
  text-align: right;
}
.user-role {
  font-size: 13px;
  margin: 20px 0 12px;
}
.access-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 24px;
}
.access-chips span {
  font-size: 12px;
  padding: 4px 10px;
  background: #f1f5ef;
  border: 1px solid #e6ece0;
  border-radius: 6px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.user-card-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.user-card-actions button {
  font-size: 13px;
}
.editor-step {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 10px 0 20px;
}
.editor-step > span {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #eaf1e2;
  color: #375c35;
  font-size: 13px;
}
.editor-step h3 {
  margin: 0;
}
.account-switches {
  padding-top: 8px;
}
.preset-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.preset-buttons button {
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  padding: 15px 13px;
  min-width: 0;
  white-space: normal;
}
.preset-buttons small {
  font-size: 12px;
  font-weight: 400;
}
.access-preview {
  background: #edf4e6;
  border: 1px solid #dde9d1;
  padding: 17px 20px;
  border-radius: 10px;
  margin: 20px 0;
}
.access-preview strong {
  display: block;
}
.access-preview p {
  margin: 7px 0;
  color: #506044;
  font-size: 13px;
}
.access-preview > span {
  font-size: 12px;
  color: #637455;
}
.permission-group summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.permission-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.permission-bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
}
.permission-bulk > span {
  font-size: 12px;
  color: var(--muted);
  margin-left: 7px;
}
.permission-bulk button {
  font-size: 12px;
}
.permission-table {
  table-layout: fixed;
}
.permission-table th:first-child {
  width: 54%;
}
.permission-table td {
  max-width: none;
}
.permission-table td:not(:first-child) {
  text-align: center;
}
.permission-table .check {
  justify-content: center;
  margin: 0;
  min-height: 32px;
}
.permission-table .muted {
  font-size: 12px;
}
.permission-ops .check {
  font-size: 13px;
  line-height: 1.8;
}
.check span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.check input {
  margin: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sticky-actions {
  position: sticky;
  bottom: -28px;
  background: #fff;
  padding-bottom: 20px;
  z-index: 5;
  box-shadow: 0 -8px 14px #ffffffdf;
  margin-inline: -4px;
  padding-inline: 4px;
}
.modal-head {
  background: #fff;
}
.filter-tabs {
  flex-wrap: wrap;
}
.filter-tabs button {
  font-size: 13px;
}
.request-card p,
.audit-detail p {
  overflow-wrap: anywhere;
}
.request-record-name {
  color: var(--ink);
  font-weight: 600;
  margin: 8px 0;
}
.request-head .tools {
  flex-shrink: 1;
}
.compact {
  table-layout: fixed;
}
.compact th,
.compact td {
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: normal;
}
.audit-item summary {
  flex-wrap: wrap;
}
.audit-item summary > span {
  min-width: 0;
  flex-basis: 35%;
  overflow-wrap: anywhere;
}
.audit-item summary time {
  white-space: normal;
}
.audit-detail {
  padding-bottom: 15px;
}
.audit-detail:empty {
  padding: 0;
}
.recipe-row {
  grid-template-columns: minmax(0, 1fr) 110px 20px;
}
.recipe-row > span {
  overflow-wrap: anywhere;
}
.form-actions {
  flex-wrap: wrap;
}
.form-actions button {
  max-width: 100%;
  white-space: normal;
}
.panel-toolbar .search {
  min-width: 0;
}
.table-wrap:focus-visible {
  outline: 2px solid #8ca67e;
  outline-offset: -2px;
}
#menu-shade {
  display: none;
}
#print-area {
  display: none;
}
@media (max-width: 800px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .user-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat {
    padding: 18px;
    min-height: 132px;
  }
  .stat strong {
    font-size: 27px;
  }
  .user-grid {
    grid-template-columns: 1fr;
  }
  .user-card {
    padding: 20px;
  }
  .record-detail {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .detail-card {
    padding: 15px;
  }
  .detail-value {
    font-size: 16px;
  }
  .detail-value .numeric {
    font-size: 16px;
  }
  .preset-buttons {
    grid-template-columns: 1fr;
  }
  .preset-buttons button {
    padding: 12px 15px;
  }
  .permission-group summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
  .permission-ops {
    gap: 12px;
  }
  .permission-table th:first-child {
    width: 48%;
  }
  .permission-table th,
  .permission-table td {
    padding: 10px 8px;
    font-size: 13px;
  }
  .sticky-actions {
    bottom: -20px;
    padding-bottom: 16px;
  }
  .sticky-actions > button:first-child {
    flex: 1;
  }
  .report-controls {
    padding: 10px 13px;
    gap: 7px;
  }
  .report-controls > span {
    width: 100%;
    margin: 0;
  }
  .pricing-table [data-field="final"] {
    min-width: 140px;
    max-width: 180px;
  }
  .pricing-table [data-field="final"] .numeric {
    font-size: 13px;
    max-width: 155px;
  }
  .topbar {
    gap: 8px;
  }
  .topbar > div {
    gap: 8px;
  }
  .topbar strong {
    font-size: 12px;
  }
  .topbar-actions {
    max-width: 142px;
  }
  .notification {
    font-size: 11px;
    gap: 5px;
    padding: 6px 8px;
  }
  .data-table .name-cell {
    min-width: 165px;
    max-width: 260px;
  }
  .filter-tabs {
    gap: 7px;
  }
  .filter-tabs button {
    font-size: 12px;
    padding: 8px 12px;
  }
  .pagination {
    padding: 12px 15px;
  }
  .audit-item {
    padding-inline: 15px;
  }
  .audit-item summary > span {
    flex-basis: 100%;
  }
  .audit-item summary strong {
    font-size: 14px;
  }
  .user-toolbar {
    align-items: flex-start;
  }
  #sidebar.open ~ .workspace #menu-shade {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 20;
    border: 0;
    border-radius: 0;
    background: #0c2b2855;
    backdrop-filter: blur(2px);
    padding: 0;
    width: 100%;
    max-width: none;
  }
  .recipe-row {
    grid-template-columns: minmax(0, 1fr) 85px 18px;
  }
  .column-options {
    grid-template-columns: 1fr;
  }
  .permission-ops .check {
    font-size: 12px;
  }
}
@media (max-width: 360px) {
  .record-detail {
    grid-template-columns: 1fr;
  }
  .stat {
    padding: 14px;
  }
  .stat strong {
    font-size: 24px;
  }
  .topbar strong {
    max-width: 130px;
  }
  .user-card-actions {
    flex-direction: column;
  }
  .user-card-actions button {
    width: 100%;
  }
  .form-actions {
    gap: 8px;
  }
}
@media print {
  @page {
    size: A4 landscape;
    margin: 12mm;
  }
  body {
    background: white;
    color: black;
    font-size: 10pt;
  }
  #app,
  #toast,
  dialog,
  #menu-shade {
    display: none !important;
  }
  #print-area {
    display: block !important;
  }
  #print-area header {
    margin-bottom: 20px;
    border-bottom: 2px solid #244c3c;
    padding-bottom: 12px;
  }
  #print-area h1 {
    font-size: 20pt;
  }
  #print-area p {
    color: #333;
    font-size: 10pt;
  }
  #print-area table {
    table-layout: fixed;
    width: 100%;
    font-size: 9pt;
  }
  #print-area th,
  #print-area td {
    font-size: 9pt;
    padding: 8px 5px;
    min-width: 0 !important;
    max-width: none !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    background: white !important;
    color: black !important;
    position: static !important;
    box-shadow: none !important;
    border: 1px solid #ccc;
  }
  #print-area .numeric {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 9pt;
  }
  #print-area .final-number {
    padding: 0;
    background: none;
  }
  #print-area tr {
    break-inside: avoid;
  }
  #print-area thead {
    display: table-header-group;
  }
}

.detail-card.money-wide {
  grid-column: 1/-1;
}
.detail-value .numeric {
  white-space: nowrap;
  overflow-wrap: normal;
  max-width: 100%;
  direction: ltr;
  text-align: right;
}
.detail-value .numeric.fit-18 {
  font-size: 18px;
}
.detail-value .numeric.fit-16 {
  font-size: 16px;
}
.detail-value .numeric.fit-14 {
  font-size: 14px;
}
.detail-value .numeric.fit-12 {
  font-size: 12px;
}
.detail-value .numeric.fit-11 {
  font-size: 11px;
}
.modal-head {
  position: sticky;
  top: -28px;
  z-index: 6;
  padding-top: 10px;
  box-shadow: 0 3px 10px #ffffffc9;
}
@media (max-width: 800px) {
  .modal-head {
    top: -20px;
  }
}
