:root {
  color-scheme: light;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  --ink: #19221f;
  --muted: #58655f;
  --line: #dce2dc;
  --paper: #fff;
  --canvas: #f5f6f2;
  --dark: #192622;
  --forest: #154f3e;
  --gold: #bc913d;
  --accent: #debb6b;
  --radius: 14px;
  --focus: #24806b;
  color: var(--ink);
  background: var(--canvas);
  font-size: 16px;
  line-height: 1.5;
  font-synthesis: none;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 300px;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.15;
  text-wrap: balance;
}
h1 {
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  letter-spacing: -0.055em;
}
h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  letter-spacing: -0.04em;
}
h3 {
  font-size: 1.05rem;
  letter-spacing: -0.025em;
}
a {
  color: var(--forest);
  text-underline-offset: 3px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.btn {
  cursor: pointer;
}
button:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.52;
  cursor: not-allowed;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
img,
svg {
  max-width: 100%;
}
button,
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.3;
  font-size: 0.89rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    border-color 0.15s,
    background 0.15s,
    color 0.15s;
}
button:hover:not(:disabled),
.btn:hover {
  border-color: #a5b4a9;
  background: #f0f3ee;
}
.primary,
.btn.primary,
button[type="submit"] {
  color: white;
  border-color: var(--dark);
  background: var(--dark);
}
.primary:hover:not(:disabled),
.btn.primary:hover,
button[type="submit"]:hover:not(:disabled) {
  background: #29493c;
  border-color: #29493c;
}
.secondary {
  background: white;
}
.danger {
  color: #8a3931;
  background: #fff4f1;
  border-color: #e9c9c5;
}
.danger:hover:not(:disabled) {
  background: #f8e0dc;
  border-color: #d69a93;
}
.icon-button {
  width: 40px;
  height: 40px;
  padding: 0.5rem;
}
.muted,
small,
.subtitle {
  color: var(--muted);
}
.eyebrow,
.overline {
  font-size: 0.74rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 750;
  font-size: 1.28rem;
  letter-spacing: -0.05em;
  text-decoration: none;
  white-space: nowrap;
}
.monogram,
.brand-mark {
  display: inline-grid;
  place-items: center;
  color: #f5d692;
  background: var(--dark);
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 0.68rem;
  font-weight: 750;
  letter-spacing: -0.08em;
}
.app,
.shell {
  min-height: 100svh;
}
.shell,
.app:has(> .sidebar) {
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  align-items: start;
}
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  padding: 1.6rem 1rem;
  position: sticky;
  top: 0;
  height: 100svh;
  overflow-y: auto;
  background: #fcfcf9;
  border-right: 1px solid var(--line);
  z-index: 2;
}
.sidebar .brand {
  margin: 0 0.5rem 0.9rem;
}
.sidebar nav,
.side-nav {
  display: grid;
  gap: 0.3rem;
}
.sidebar nav a,
.sidebar nav button,
.nav-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 0.72rem 0.9rem;
  gap: 0.7rem;
  border: 0;
  border-radius: 0.6rem;
  background: transparent;
  color: #415048;
  font-size: 0.91rem;
  font-weight: 550;
  text-decoration: none;
}
.sidebar nav .active,
.sidebar nav [aria-current="page"],
.nav-item.active,
.sidebar .nav-item.active:hover {
  background: var(--dark);
  color: #fff;
  box-shadow: 0 2px 4px #172c2110;
}
.side-footer {
  margin-top: auto;
  padding: 0.9rem 0.5rem 0;
  border-top: 1px solid var(--line);
}
.workspace,
.main,
main {
  min-width: 0;
}
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem clamp(1rem, 3vw, 3rem);
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  background: #fcfcf9;
}
.content,
.container {
  width: min(100%, 1530px);
  margin: 0 auto;
  padding: clamp(1rem, 2.7vw, 2.8rem);
}
.content > * + *,
.stack > * + * {
  margin-top: 1.35rem;
}
.page-head,
.panel-head,
.toolbar,
.actions,
.button-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.page-head,
.panel-head {
  justify-content: space-between;
  align-items: flex-end;
}
.page-head p,
.panel-head p {
  margin-top: 0.35rem;
  color: var(--muted);
}
.page-head .eyebrow {
  margin-bottom: 0.4rem;
}
.role-switch,
.tabs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.tabs {
  padding: 0.4rem 0 0.8rem;
  border-bottom: 1px solid var(--line);
}
.tab,
.tabs button,
.tabs a {
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0.5rem 0.92rem;
  min-height: 35px;
  background: transparent;
  color: #49564f;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.tabs .active,
.tabs [aria-selected="true"],
.tab.active {
  background: var(--dark);
  color: white;
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 220px;
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 3rem);
  background:
    radial-gradient(ellipse at 92% 145%, #5a6340 0, transparent 44%),
    linear-gradient(112deg, #18241f, #293b32);
  color: white;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 46%;
  aspect-ratio: 1;
  border: 1px solid #ffffff18;
  border-radius: 50%;
  right: -12%;
  bottom: -110%;
  box-shadow:
    0 0 0 35px #ffffff05,
    0 0 0 70px #ffffff06,
    0 0 0 105px #ffffff04,
    0 0 0 140px #ffffff05,
    0 0 0 175px #ffffff04;
}
.hero h1,
.hero h2 {
  font-size: clamp(1.8rem, 3.5vw, 3.1rem);
  color: #fff;
  letter-spacing: -0.055em;
  max-width: 19ch;
}
.hero p {
  margin: 0.55rem 0;
  color: #d0d9d2;
}
.hero .eyebrow,
.hero small {
  color: #e7c980;
}
.hero .actions {
  margin-top: 1.1rem;
}
.hero-copy {
  position: relative;
  z-index: 1;
}
.hero .btn,
.hero button {
  background: #ffffff0b;
  border-color: #ffffff61;
  color: white;
}
.hero .primary,
.hero button.primary {
  color: var(--dark);
  background: #f8f6e9;
  border-color: #f8f6e9;
}
.hero .btn:hover,
.hero button:hover {
  background: #f8f6e9;
  color: var(--dark);
}
.hero-art {
  width: clamp(145px, 20vw, 265px);
  min-height: 125px;
  flex-shrink: 0;
  position: relative;
  align-self: stretch;
  pointer-events: none;
}
.hero-art::before,
.hero-art::after {
  content: "";
  position: absolute;
  width: 76%;
  aspect-ratio: 1.58;
  border-radius: 13px;
  top: 50%;
  left: 45%;
  transform: translate(-57%, -51%) rotate(-13deg);
  box-shadow: 8px 17px 20px #0003;
}
.hero-art::before {
  background: repeating-linear-gradient(
    48deg,
    #d8bb7e,
    #d8bb7e 1px,
    #d2b278 1px,
    #d2b278 6px
  );
  transform: translate(-39%, -36%) rotate(7deg);
}
.hero-art::after {
  border: 1px solid #dacb98;
  background:
    linear-gradient(90deg, #c4ac72 0 56%, transparent 56%) 15% 79% / 51% 3px
      no-repeat,
    linear-gradient(90deg, #7b7051 0 90%, transparent 90%) 17% 88% / 46% 2px
      no-repeat,
    linear-gradient(110deg, #c6ad6c, #f2dc99 60%, #a78546) 15% 28% / 18% 21%
      no-repeat,
    repeating-radial-gradient(
      ellipse at 120% 165%,
      transparent 0 10px,
      #b69c5a3b 10px 11px,
      transparent 11px 16px
    ),
    linear-gradient(100deg, #2c352e, #455143);
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
  gap: 0.8rem;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
  min-height: 118px;
  padding: 1.15rem;
  border: 1px solid #d8dfd1;
  border-radius: 12px;
  background: #eef3e6;
}
.stat:nth-child(5n + 2) {
  background: #f2edf8;
  border-color: #e6ddef;
}
.stat:nth-child(5n + 3) {
  background: #eaf0f7;
  border-color: #d9e3ee;
}
.stat:nth-child(5n + 4) {
  background: #e5f3eb;
  border-color: #d6e8dd;
}
.stat:nth-child(5n + 5) {
  background: #faf1df;
  border-color: #eddebf;
}
.stat small,
.stat-label {
  font-size: 0.82rem;
  font-weight: 570;
  color: #48554c;
}
.stat strong,
.stat-value {
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.panel,
.card {
  padding: clamp(1rem, 2vw, 1.6rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel > * + * {
  margin-top: 1rem;
}
.toolbar {
  align-items: flex-end;
}
.toolbar input,
.toolbar select {
  width: auto;
  max-width: 100%;
}
.table-wrap {
  overflow: auto;
  max-width: 100%;
  overscroll-behavior-x: contain;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.88rem;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
th,
td {
  padding: 0.8rem 0.85rem;
  border-bottom: 1px solid #e7ebe6;
  white-space: nowrap;
  vertical-align: middle;
}
th {
  background: #f5f7f3;
  color: #546159;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  font-weight: 700;
}
tbody tr:hover {
  background: #f9fbf7;
}
tr:last-child td {
  border-bottom: 0;
}
td button {
  min-height: 32px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}
.badge,
.status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.23rem 0.58rem;
  border-radius: 5px;
  font-size: 0.75rem;
  line-height: 1.35;
  font-weight: 650;
  color: #41514a;
  background: #eaf0eb;
  white-space: nowrap;
}
.badge.approved,
.badge.active,
.badge.delivered,
.badge.credited,
.status.approved,
.status.active {
  background: #e0f2e6;
  color: #206143;
}
.badge.rejected,
.badge.failed,
.badge.inactive,
.status.rejected {
  background: #fae6e3;
  color: #914238;
}
.badge.pending,
.badge.paused,
.status.pending {
  background: #fff1d5;
  color: #79550c;
}
.badge.progress,
.badge.processing,
.status.progress {
  background: #e5edf9;
  color: #395b88;
}
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  max-width: 100%;
  min-height: 41px;
  border: 1px solid #c9d2ca;
  border-radius: 7px;
  background: white;
  padding: 0.5rem 0.7rem;
  color: var(--ink);
  font-size: 0.93rem;
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--forest);
}
textarea {
  resize: vertical;
  min-height: 84px;
}
input::placeholder,
textarea::placeholder {
  color: #77847b;
}
label,
.field {
  font-size: 0.87rem;
  font-weight: 580;
}
.field,
.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.field input,
.field select,
.field textarea,
.form-grid input,
.form-grid select {
  width: 100%;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.modal-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  background: #10201877;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.modal,
dialog {
  width: min(100%, 510px);
  max-height: 90svh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 2rem);
  color: var(--ink);
  background: #fff;
  box-shadow: 0 24px 75px #101e1626;
}
dialog::backdrop {
  background: #10201877;
}
.modal > * + *,
.modal form > * + * {
  margin-top: 1rem;
}
.notice,
.error {
  border-radius: 9px;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  background: #edf4ed;
  color: #35513b;
  border: 1px solid #cbdccf;
}
.error {
  background: #fcf0ee;
  color: #8a382f;
  border-color: #edd2cc;
}
.empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
}
.checkout {
  display: grid;
  align-content: start;
  justify-items: center;
  min-height: 85svh;
  padding: clamp(1rem, 4vw, 4rem);
  background:
    radial-gradient(circle at 25% 12%, #e7eade 0, transparent 38%), #f5f6f2;
}
.checkout-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  width: min(100%, 900px);
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 16px 48px #22312610;
  background: white;
}
.checkout-qr,
.checkout-detail {
  padding: clamp(1.3rem, 3.3vw, 2.5rem);
  min-width: 0;
}
.checkout-qr {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #241d32;
  color: #fff;
}
.checkout-qr small,
.checkout-qr p {
  color: #e1dce8;
}
.checkout-qr img,
.checkout-qr .qr {
  display: block;
  max-width: 100%;
  margin: 0 auto;
  border: 14px solid #fff;
  border-radius: 8px;
  background: white;
  image-rendering: pixelated;
}
.checkout-detail > * + * {
  margin-top: 1rem;
}
.checkout-detail input {
  width: 100%;
}
.checkout-detail .primary {
  width: 100%;
}
@media (max-width: 980px) {
  .shell,
  .app:has(> .sidebar) {
    grid-template-columns: 188px minmax(0, 1fr);
  }
  .sidebar {
    padding-inline: 0.65rem;
  }
  .stats {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }
}
@media (max-width: 740px) {
  .shell,
  .app:has(> .sidebar) {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 0.65rem;
    padding: 0.75rem 1rem;
  }
  .sidebar .brand {
    margin: 0;
  }
  .sidebar nav,
  .side-nav {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
  }
  .sidebar nav a,
  .sidebar nav button,
  .nav-item {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.45rem 0.7rem;
  }
  .side-footer {
    margin: 0;
    padding: 0;
    border: 0;
  }
  .hero {
    min-height: 175px;
  }
  .hero-art {
    width: 115px;
    min-height: 95px;
  }
  .topbar {
    padding: 0.65rem 1rem;
  }
  .checkout-card {
    grid-template-columns: 1fr;
    max-width: 540px;
  }
  .checkout-qr img,
  .checkout-qr .qr {
    max-height: 220px;
    width: auto;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .hero-art {
    display: none;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat {
    padding: 0.8rem;
    min-height: 96px;
  }
  .toolbar > *,
  .toolbar input,
  .toolbar select {
    max-width: 100%;
  }
  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .tabs > * {
    flex-shrink: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation-duration: 0.01ms !important;
  }
}
