:root {
  --ink: #17231d;
  --ink-soft: #4d5e55;
  --ink-faint: #7e8c84;
  --paper: #f4f6f2;
  --surface: #ffffff;
  --surface-soft: #f8faf7;
  --line: #dfe6df;
  --line-strong: #cbd6cc;
  --green: #1c664c;
  --green-dark: #124a36;
  --green-soft: #e8f1eb;
  --amber: #d99527;
  --amber-soft: #fbf1dc;
  --blue: #4779a6;
  --blue-soft: #eaf1f7;
  --red: #b84f45;
  --red-soft: #faeceb;
  --shadow: 0 8px 26px rgba(27, 50, 38, 0.06);
  --shadow-raised: 0 18px 54px rgba(17, 37, 27, 0.16);
  --radius: 8px;
  --sidebar: 232px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(28, 102, 76, 0.28);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

svg {
  display: block;
  flex: 0 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-block;
  flex: 0 0 40px;
  overflow: visible;
  filter: drop-shadow(0 5px 12px rgba(4, 30, 21, 0.16));
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  letter-spacing: 0.11em;
}

.brand-on-dark {
  color: #fff;
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(420px, 1.08fr) minmax(420px, 0.92fr);
}

.auth-story {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  overflow: hidden;
  padding: 48px 7vw 32px;
  background-color: #123f30;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-position: -1px -1px;
  background-size: 42px 42px;
  color: #fff;
}

.auth-story::after {
  position: absolute;
  right: -70px;
  bottom: 118px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(220, 180, 84, 0.36);
  border-radius: 50%;
  content: "";
}

.auth-story::before {
  position: absolute;
  right: 8px;
  bottom: 328px;
  width: 70px;
  height: 70px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  content: "";
}

.auth-story-content {
  position: relative;
  z-index: 1;
  max-width: 610px;
  margin: auto 0;
  padding: 70px 0 56px;
}

.eyebrow,
.auth-kicker {
  color: #d9b45e;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-story h1 {
  max-width: 580px;
  margin: 20px 0 24px;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: clamp(40px, 4.3vw, 66px);
  font-weight: 500;
  line-height: 1.17;
  letter-spacing: 0;
}

.auth-story-content > p {
  max-width: 500px;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1.85;
}

.auth-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.auth-points span {
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.auth-ledger {
  position: relative;
  z-index: 1;
  width: min(100%, 550px);
  margin-bottom: 44px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.ledger-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ledger-line span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.ledger-line strong {
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 500;
}

.auth-privacy {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.38);
  font-size: 11px;
}

.auth-action {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 56px clamp(28px, 6vw, 100px);
  background: #f7f8f5;
}

.auth-mobile-brand {
  display: none;
}

.auth-card {
  width: min(100%, 410px);
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card h2 {
  margin: 10px 0 8px;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 29px;
  font-weight: 600;
  letter-spacing: 0;
}

.auth-help {
  margin: 0 0 26px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.field > span:first-child,
.field-label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea,
.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field textarea,
.form-grid textarea {
  height: auto;
  min-height: 80px;
  padding-top: 11px;
  resize: vertical;
}

.field input::placeholder,
.form-grid input::placeholder,
.form-grid textarea::placeholder {
  color: #a6b0aa;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  border-color: rgba(28, 102, 76, 0.55);
  box-shadow: 0 0 0 3px rgba(28, 102, 76, 0.08);
  outline: none;
}

.password-wrap {
  position: relative;
  display: block;
}

.password-wrap input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute !important;
  top: 3px;
  right: 3px;
  color: var(--ink-faint) !important;
}

.form-error {
  min-height: 20px;
  margin: 2px 0 10px;
  color: var(--red);
  font-size: 12px;
  line-height: 1.5;
}

.auth-note {
  margin: 20px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.auth-footnote {
  position: absolute;
  right: 30px;
  bottom: 22px;
  margin: 0;
  color: #9aa59f;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.button {
  display: inline-flex;
  height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.button:active {
  transform: translateY(1px);
}

.button svg {
  width: 16px;
  height: 16px;
}

.button-primary {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.button-primary:hover {
  border-color: var(--green-dark);
  background: var(--green-dark);
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
}

.button-secondary:hover {
  border-color: #b1bfb4;
  background: var(--surface-soft);
}

.button-danger {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.button-danger:hover {
  border-color: #9c3c34;
  background: #9c3c34;
}

.button-ghost {
  color: var(--ink-soft);
}

.button-ghost:hover {
  background: var(--green-soft);
  color: var(--green-dark);
}

.button-block {
  width: 100%;
  height: 44px;
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.icon-button:hover {
  border-color: var(--line);
  background: var(--surface-soft);
}

.icon-button-ghost {
  color: rgba(255, 255, 255, 0.48);
}

.icon-button-ghost:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  padding: 24px 16px 18px;
  background: #153b2e;
  color: #fff;
}

.sidebar-brand {
  padding: 0 7px 24px;
}

.sidebar-brand .brand-copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.28;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.main-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  height: 42px;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.9);
}

.nav-item.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-item.is-active::before {
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: 0;
  width: 2px;
  border-radius: 2px;
  background: #dfb85e;
  content: "";
}

.nav-icon {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
}

.sidebar-bottom {
  margin-top: auto;
}

.rate-mini {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 5px 13px;
  padding: 11px 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.rate-mini-icon {
  color: #dfb85e;
}

.rate-mini-icon svg {
  width: 16px;
  height: 16px;
}

.rate-mini > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rate-mini small {
  color: rgba(255, 255, 255, 0.4);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.rate-mini strong {
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 550;
}

.profile-block {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 5px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.avatar {
  display: inline-grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 50%;
  background: #e7bd62;
  color: #2a2e22;
  font-size: 12px;
  font-weight: 700;
}

.profile-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}

.profile-copy strong {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy small {
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
}

.main-content {
  min-height: 100vh;
  margin-left: var(--sidebar);
}

.topbar {
  position: sticky;
  z-index: 15;
  top: 0;
  display: flex;
  height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(24px, 4vw, 54px);
  border-bottom: 1px solid rgba(208, 220, 210, 0.8);
  background: rgba(244, 246, 242, 0.94);
  backdrop-filter: blur(12px);
}

.page-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-kicker {
  margin: 0 0 3px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rate-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-faint);
  font-size: 11px;
}

.rate-pill svg {
  width: 13px;
  height: 13px;
  color: var(--green);
}

.rate-pill strong {
  color: var(--ink);
  font-weight: 650;
}

.language-pill {
  cursor: pointer;
  font-weight: 650;
}

.language-pill:hover {
  border-color: #b9c7bc;
  background: #fff;
}

.mobile-menu,
.mobile-profile {
  display: none;
}

.view-container {
  width: min(100%, 1510px);
  margin: 0 auto;
  padding: 36px clamp(24px, 4vw, 54px) 60px;
}

.view {
  animation: view-in 220ms ease both;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 24px;
}

.page-heading h2 {
  margin: 0 0 7px;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0;
}

.page-heading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.heading-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.button-split {
  display: flex;
  gap: 8px;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #edf1ec;
}

.segmented button {
  height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.segmented button.is-active {
  background: #fff;
  box-shadow: 0 1px 4px rgba(30, 50, 38, 0.09);
  color: var(--ink);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.search-field {
  display: flex;
  width: min(100%, 420px);
  height: 38px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.search-field:focus-within {
  border-color: rgba(28, 102, 76, 0.45);
  box-shadow: 0 0 0 3px rgba(28, 102, 76, 0.07);
}

.search-field svg {
  width: 16px;
  height: 16px;
  color: var(--ink-faint);
}

.search-field input {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  outline: 0;
}

.search-field input::placeholder {
  color: #96a39b;
}

.select-field {
  display: flex;
  height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-faint);
  font-size: 11px;
}

.select-field select,
.select-field input {
  min-width: 120px;
  max-width: 150px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  outline: 0;
}

.customer-country-field {
  min-width: 190px;
}

.customer-country-field input {
  min-width: 140px;
  max-width: 180px;
}

.date-range {
  display: flex;
  align-items: center;
  gap: 7px;
}

.status-filter-group {
  display: flex;
  align-items: center;
  gap: 7px;
}

.date-range label {
  display: flex;
  height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-faint);
  font-size: 10px;
}

.date-range input {
  width: 118px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  outline: 0;
}

.range-dash {
  color: var(--ink-faint);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.kpi-card {
  position: relative;
  min-width: 0;
  padding: 18px 18px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.kpi-card::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 46px;
  height: 3px;
  background: var(--kpi-color, var(--green));
  content: "";
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.kpi-top > span:first-child {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 550;
}

.kpi-icon {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 6px;
  background: var(--kpi-bg, var(--green-soft));
  color: var(--kpi-color, var(--green));
}

.kpi-icon svg {
  width: 14px;
  height: 14px;
}

.kpi-value {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 6px;
}

.kpi-value strong {
  overflow: hidden;
  font-family: "Avenir Next", var(--font);
  font-size: clamp(21px, 2vw, 28px);
  font-weight: 650;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-value small {
  color: var(--ink-faint);
  font-size: 11px;
}

.kpi-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 16px;
  color: var(--ink-faint);
  font-size: 10px;
}

.kpi-sub .positive {
  color: var(--green);
}

.kpi-sub .negative {
  color: var(--red);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  gap: 14px;
  margin-bottom: 14px;
}

.dashboard-grid-lower {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-grid-contacts {
  margin-top: 14px;
}

.activity-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid #f0f3ef;
}

.activity-summary strong {
  font-family: "Avenir Next", var(--font);
  font-size: 26px;
  font-weight: 650;
}

.activity-summary span {
  color: var(--ink-faint);
  font-size: 10px;
}

.activity-list {
  display: grid;
}

.activity-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 9px 18px;
  border-bottom: 1px solid #f0f3ef;
}

.activity-row:last-child {
  border-bottom: 0;
}

.activity-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 6px;
  background: var(--blue-soft);
  color: #335f86;
  font-size: 9px;
  font-weight: 700;
}

.activity-mark.supplier {
  background: var(--green-soft);
  color: var(--green-dark);
}

.activity-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.activity-copy strong,
.activity-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-copy strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.activity-copy small,
.activity-date {
  color: var(--ink-faint);
  font-size: 9px;
}

.activity-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  font-size: 10px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel-head {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 18px;
  border-bottom: 1px solid #edf1ec;
}

.panel-title {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.panel-title h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
}

.panel-title p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 10px;
}

.panel-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.panel-link svg {
  width: 13px;
  height: 13px;
}

.chart-wrap {
  position: relative;
  min-height: 270px;
  padding: 22px 20px 14px;
}

.chart-svg {
  width: 100%;
  height: 194px;
  overflow: visible;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px 16px;
  color: var(--ink-faint);
  font-size: 10px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--legend, var(--green));
}

.chart-empty,
.empty-state {
  display: grid;
  min-height: 220px;
  place-items: center;
  color: var(--ink-faint);
  font-size: 12px;
  text-align: center;
}

.chart-tooltip {
  position: absolute;
  z-index: 3;
  display: none;
  min-width: 122px;
  padding: 9px 10px;
  border: 1px solid #d7dfd8;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(23, 35, 29, 0.13);
  pointer-events: none;
}

.chart-tooltip strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
}

.chart-tooltip span {
  display: block;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.7;
}

.profit-panel {
  display: flex;
  flex-direction: column;
}

.profit-summary {
  padding: 22px 20px 16px;
}

.profit-main-label {
  margin: 0 0 5px;
  color: var(--ink-faint);
  font-size: 10px;
}

.profit-main-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 7px;
}

.profit-main-value strong {
  overflow: hidden;
  font-family: "Avenir Next", var(--font);
  font-size: 27px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-main-value span {
  color: var(--ink-faint);
  font-size: 11px;
}

.dual-value {
  color: var(--green);
  font-size: 11px;
  font-weight: 550;
}

.profit-breakdown {
  display: grid;
  gap: 0;
  margin-top: auto;
  padding: 0 20px 12px;
}

.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid #f0f3ef;
}

.breakdown-row span {
  color: var(--ink-soft);
  font-size: 11px;
}

.breakdown-row strong {
  font-size: 12px;
  font-weight: 600;
}

.breakdown-row.total {
  padding-bottom: 2px;
  color: var(--green-dark);
}

.breakdown-row.total strong {
  font-weight: 700;
}

.data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.data-table th {
  height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #f8faf7;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: left;
}

.data-table td {
  height: 60px;
  padding: 8px 14px;
  border-bottom: 1px solid #edf1ec;
  color: var(--ink-soft);
  font-size: 12px;
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: #fafbf9;
}

.data-table .cell-main {
  color: var(--ink);
  font-weight: 600;
}

.cell-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cell-stack small {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 400;
}

.product-description {
  display: -webkit-box;
  max-width: 340px;
  overflow: hidden;
  line-height: 1.45;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.money {
  font-family: "Avenir Next", var(--font);
  font-variant-numeric: tabular-nums;
}

.money-primary {
  color: var(--ink);
  font-weight: 650;
}

.money-secondary {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 10px;
}

.tag {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 600;
}

.tag.amber {
  background: var(--amber-soft);
  color: #8a5a0d;
}

.tag.blue {
  background: var(--blue-soft);
  color: #335f86;
}

.tag.gray {
  background: #eef1ee;
  color: var(--ink-soft);
}

.tag.red {
  background: var(--red-soft);
  color: var(--red);
}

.tier-list {
  display: flex;
  max-width: 280px;
  flex-wrap: wrap;
  gap: 4px;
  white-space: normal;
}

.tier-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  border: 1px solid #e3e9e3;
  border-radius: 4px;
  background: #fafbf9;
  color: var(--ink-soft);
  font-size: 9px;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.row-actions .icon-button {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  color: var(--ink-faint);
}

.row-actions .icon-button:hover {
  color: var(--green);
}

.row-actions .danger:hover {
  border-color: var(--red-soft);
  background: var(--red-soft);
  color: var(--red);
}

.table-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 11px;
}

.table-top p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 11px;
}

.table-top strong {
  color: var(--ink-soft);
  font-weight: 600;
}

.table-summary {
  display: flex;
  align-items: center;
  gap: 16px;
}

.table-summary span {
  color: var(--ink-faint);
  font-size: 10px;
}

.table-summary strong {
  margin-left: 4px;
  color: var(--ink);
  font-size: 11px;
}

.empty-card {
  display: grid;
  min-height: 260px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.52);
  text-align: center;
}

.empty-card-inner {
  max-width: 340px;
  padding: 30px;
}

.empty-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 7px;
  background: var(--green-soft);
  color: var(--green);
}

.empty-icon svg {
  width: 20px;
  height: 20px;
}

.empty-card h3 {
  margin: 0 0 7px;
  font-size: 14px;
}

.empty-card p {
  margin: 0 0 18px;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.7;
}

.finance-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.rate-caption {
  color: var(--ink-faint);
  font-size: 10px;
}

.finance-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.finance-kpi {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.finance-kpi span {
  display: block;
  margin-bottom: 9px;
  color: var(--ink-faint);
  font-size: 10px;
}

.finance-kpi strong {
  display: block;
  overflow: hidden;
  font-family: "Avenir Next", var(--font);
  font-size: 19px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-kpi small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--green);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 14px;
  margin-bottom: 14px;
}

.finance-grid-wide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.expense-bars {
  display: grid;
  gap: 15px;
  padding: 18px;
}

.expense-bar-row {
  display: grid;
  grid-template-columns: 72px 1fr 96px;
  align-items: center;
  gap: 12px;
}

.expense-bar-row span {
  color: var(--ink-soft);
  font-size: 10px;
}

.expense-bar-row strong {
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
  text-align: right;
}

.bar-track {
  height: 6px;
  overflow: hidden;
  border-radius: 2px;
  background: #eef2ed;
}

.bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--amber);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  align-items: start;
  gap: 14px;
}

.admin-stack {
  display: grid;
  gap: 14px;
}

.settings-form {
  padding: 20px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid #eef1ed;
}

.settings-row:last-child {
  border-bottom: 0;
}

.settings-row span {
  color: var(--ink-soft);
  font-size: 11px;
}

.settings-row strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.export-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 16px;
}

.export-button {
  display: flex;
  min-height: 74px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfa;
  text-align: left;
  cursor: pointer;
}

.export-button:hover {
  border-color: #b8c6ba;
  background: var(--green-soft);
}

.export-button span {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.export-button small {
  color: var(--ink-faint);
  font-size: 9px;
}

.supplier-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.34fr) minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.supplier-directory {
  overflow: hidden;
}

.supplier-list {
  display: grid;
  max-height: 650px;
  overflow-y: auto;
}

.supplier-list-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 68px;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid #edf1ec;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.supplier-list-item:last-child {
  border-bottom: 0;
}

.supplier-list-item:hover {
  background: #fafbf9;
}

.supplier-list-item.is-active {
  background: var(--green-soft);
  box-shadow: inset 3px 0 0 var(--green);
}

.supplier-list-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #dbe4dd;
  border-radius: 6px;
  background: #f7f9f6;
  color: var(--green-dark);
  font-family: "Avenir Next", var(--font);
  font-size: 10px;
  font-weight: 700;
}

.supplier-list-item.is-active .supplier-list-mark {
  border-color: #c9dccf;
  background: #fff;
}

.supplier-list-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.supplier-list-copy strong,
.supplier-list-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-list-copy strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
}

.supplier-list-copy small {
  color: var(--ink-faint);
  font-size: 9px;
}

.supplier-list-count {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  color: var(--ink-soft);
  font-family: "Avenir Next", var(--font);
  font-size: 13px;
  font-weight: 650;
}

.supplier-list-count small {
  color: var(--ink-faint);
  font-family: var(--font);
  font-size: 8px;
  font-weight: 400;
}

.supplier-detail {
  overflow: hidden;
}

.supplier-detail-head {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.supplier-detail-head > div:first-child {
  min-width: 0;
}

.supplier-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.supplier-title-row h3 {
  overflow: hidden;
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-detail-head p {
  margin: 5px 0 0;
  color: var(--ink-faint);
  font-size: 10px;
}

.supplier-detail-head .row-actions {
  flex: 0 0 auto;
}

.supplier-contact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.supplier-contact-grid > span {
  display: grid;
  min-width: 0;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 3px 7px;
  padding: 13px 14px;
  background: #fafbf9;
}

.supplier-contact-grid i {
  display: inline-grid;
  width: 20px;
  height: 20px;
  grid-row: 1 / 3;
  place-items: center;
  color: var(--green);
}

.supplier-contact-grid i svg {
  width: 14px;
  height: 14px;
}

.supplier-contact-grid small {
  color: var(--ink-faint);
  font-size: 8px;
}

.supplier-contact-grid strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-contact-grid strong.contact-link-list {
  display: flex;
  overflow: visible;
  flex-wrap: wrap;
  gap: 3px 8px;
  white-space: normal;
}

.contact-link {
  color: var(--green-dark);
  font-weight: 650;
  text-decoration: none;
  text-underline-offset: 2px;
}

.contact-link:hover,
.contact-link:focus-visible {
  text-decoration: underline;
}

.supplier-notes {
  margin: 0;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.7;
}

.supplier-products-head {
  display: flex;
  min-height: 65px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}

.supplier-products-head .panel-title h3 {
  font-size: 13px;
}

.supplier-products-table {
  border: 0;
  border-radius: 0;
}

.supplier-products-empty {
  display: grid;
  min-height: 210px;
  place-items: center;
  padding: 28px;
  color: var(--ink-faint);
  text-align: center;
}

.supplier-products-empty .empty-icon {
  margin-bottom: 10px;
}

.supplier-products-empty h4 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 13px;
}

.supplier-products-empty p {
  max-width: 300px;
  margin: 0;
  font-size: 10px;
  line-height: 1.7;
}

.customer-mark {
  border-color: #cbdbe7;
  background: var(--blue-soft);
  color: #315f84;
}

.customer-category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.customer-profile-block,
.bank-block {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.customer-profile-block > p {
  margin: 11px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.bank-block {
  background: #fafbf9;
}

.bank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.bank-grid > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
  padding: 11px 12px;
  background: #fff;
}

.bank-grid small {
  color: var(--ink-faint);
  font-size: 8px;
}

.bank-grid strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-family: "Avenir Next", var(--font);
  font-size: 10px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-attachments {
  min-height: 180px;
}

.attachment-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.attachment-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 62px;
  padding: 10px 16px;
  background: #fff;
}

.attachment-icon {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 6px;
  background: var(--amber-soft);
  color: #956414;
}

.attachment-icon svg {
  width: 16px;
  height: 16px;
}

.attachment-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.attachment-copy strong,
.attachment-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-copy strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.attachment-copy small {
  color: var(--ink-faint);
  font-size: 9px;
}

.order-status-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.status-tag.status-shipped,
.status-tag.status-in_transit {
  background: var(--blue-soft);
  color: #315f84;
}

.status-tag.status-completed,
.status-tag.status-fully_paid,
.status-tag.status-fully_prepaid {
  background: var(--green-soft);
  color: var(--green-dark);
}

.status-tag.status-cancelled {
  background: var(--red-soft);
  color: var(--red);
}

.status-tag.status-pending,
.status-tag.status-unpaid,
.status-tag.status-deposit_paid,
.status-tag.status-balance_pending {
  background: var(--amber-soft);
  color: #8a5a0d;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(14, 27, 20, 0.54);
  backdrop-filter: blur(3px);
  animation: fade-in 150ms ease both;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: min(100%, 720px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-raised);
  animation: modal-in 170ms ease both;
}

.modal.modal-small {
  width: min(100%, 460px);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(9px);
}

.modal-head h2 {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 650;
}

.modal-head p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 10px;
}

.modal-body {
  padding: 22px;
}

.modal-footer {
  position: sticky;
  z-index: 2;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(9px);
}

.modal-footer-actions {
  display: flex;
  gap: 8px;
}

.modal-note {
  color: var(--ink-faint);
  font-size: 10px;
}

.form-section {
  margin-bottom: 24px;
}

.form-section:last-child {
  margin-bottom: 0;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 13px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.form-section-title::before {
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: var(--green);
  content: "";
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-grid label,
.form-grid .form-field {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 6px;
}

.form-grid label > span:first-child,
.form-grid .form-field > span:first-child {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.category-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 5px;
}

.category-check {
  display: inline-flex !important;
  min-height: 32px;
  align-items: center;
  gap: 7px !important;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
}

.category-check input {
  width: 14px !important;
  height: 14px !important;
  margin: 0;
  accent-color: var(--green);
}

.category-check span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 550;
}

.field-hint {
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.5;
}

.currency-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
}

.currency-input input {
  border-radius: 6px 0 0 6px;
}

.currency-input select {
  border-left: 0;
  border-radius: 0 6px 6px 0;
  background: #f8faf7;
  font-size: 11px;
}

.conversion-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 12px;
  padding: 9px 11px;
  border: 1px solid #e5ebe5;
  border-radius: 5px;
  background: #f8faf7;
  color: var(--ink-faint);
  font-size: 10px;
}

.conversion-line strong {
  color: var(--ink-soft);
  font-weight: 600;
}

.tier-editor {
  border: 1px solid var(--line);
  border-radius: 6px;
}

.tier-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8faf7;
}

.tier-editor-head span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
}

.tier-editor-head small {
  color: var(--ink-faint);
  font-size: 9px;
}

.tier-rows {
  display: grid;
  gap: 7px;
  padding: 10px;
}

.tier-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 32px;
  align-items: center;
  gap: 7px;
}

.tier-row input {
  height: 36px;
}

.sale-items-field {
  gap: 9px !important;
}

.sale-items-head {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sale-items-head .button {
  height: 34px;
  padding: 0 11px;
  font-size: 10px;
}

.sale-items-head .button [data-icon] {
  display: inline-grid;
  width: 14px;
  height: 14px;
  place-items: center;
}

.sale-items-head .button svg {
  width: 14px;
  height: 14px;
}

.sale-items {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.sale-item-row {
  display: grid;
  grid-template-columns:
    minmax(190px, 2.2fr)
    minmax(82px, 0.62fr)
    minmax(104px, 0.8fr)
    minmax(110px, 0.9fr)
    34px;
  align-items: end;
  gap: 9px;
  padding: 10px;
}

.sale-item-row + .sale-item-row {
  border-top: 1px solid var(--line);
}

.sale-item-row > label {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.sale-item-row > label > span {
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 600;
}

.sale-item-row input,
.sale-item-row select {
  height: 38px;
}

.sale-item-product select {
  min-width: 0;
}

.sale-item-amount {
  display: grid;
  min-width: 0;
  height: 38px;
  align-content: center;
  justify-items: end;
  gap: 2px;
  padding: 0 9px;
  border: 1px solid #e4ebe4;
  border-radius: 5px;
  background: #fff;
}

.sale-item-amount small {
  color: var(--ink-faint);
  font-size: 8px;
  line-height: 1;
}

.sale-item-amount strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--ink-soft);
  font-family: "Avenir Next", var(--font);
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sale-item-row > .icon-button {
  margin-bottom: 2px;
}

.tier-empty {
  padding: 17px;
  color: var(--ink-faint);
  font-size: 10px;
  text-align: center;
}

.link-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.link-button svg {
  width: 13px;
  height: 13px;
}

.calc-box {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.calc-item {
  padding: 12px;
  background: #f9fbf8;
}

.calc-item span {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-faint);
  font-size: 9px;
}

.calc-item strong {
  display: block;
  color: var(--ink);
  font-family: "Avenir Next", var(--font);
  font-size: 14px;
  font-weight: 650;
}

.calc-item small {
  display: block;
  margin-top: 2px;
  color: var(--green);
  font-size: 9px;
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 11px;
}

.toggle-line input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.toast-root {
  position: fixed;
  z-index: 200;
  right: 22px;
  bottom: 22px;
  display: grid;
  width: min(360px, calc(100vw - 44px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid #d6e1d8;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(18, 41, 28, 0.16);
  color: var(--ink);
  font-size: 11px;
  line-height: 1.55;
  animation: toast-in 180ms ease both;
}

.toast svg {
  width: 15px;
  height: 15px;
  color: var(--green);
}

.toast.error {
  border-color: #efd4d2;
}

.toast.error svg {
  color: var(--red);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.confirm-box {
  width: min(100%, 400px);
  padding: 24px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-raised);
}

.confirm-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  margin-bottom: 15px;
  place-items: center;
  border-radius: 7px;
  background: var(--red-soft);
  color: var(--red);
}

.confirm-icon svg {
  width: 18px;
  height: 18px;
}

.confirm-box h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.confirm-box p {
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.loading-region {
  display: grid;
  gap: 14px;
}

.skeleton {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.skeleton::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(231, 237, 231, 0.72), transparent);
  content: "";
  transform: translateX(-100%);
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

.skeleton-kpis {
  height: 126px;
}

.skeleton-panel {
  height: 340px;
}

.skeleton-table {
  height: 360px;
}

.recent-list {
  display: grid;
}

.recent-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 0.6fr);
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid #edf1ec;
}

.recent-row:last-child {
  border-bottom: 0;
}

.recent-main {
  min-width: 0;
}

.recent-main strong,
.recent-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-main strong {
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.recent-main small {
  color: var(--ink-faint);
  font-size: 9px;
}

.recent-amount {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}

.country-list {
  padding: 12px 18px 16px;
}

.country-row {
  display: grid;
  grid-template-columns: minmax(74px, 0.7fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
}

.country-label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.country-label span {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-label small {
  color: var(--ink-faint);
  font-size: 8px;
}

.country-value {
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
  text-align: right;
}

.ratio-track {
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: #eef2ed;
}

.ratio-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--blue);
}

.page-footer-note {
  margin-top: 14px;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.6;
  text-align: right;
}

@media (max-width: 1180px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .supplier-layout {
    grid-template-columns: 1fr;
  }

  .supplier-list {
    max-height: 280px;
  }
}

@media (max-width: 960px) {
  :root {
    --sidebar: 0px;
  }

  .sidebar {
    inset: auto 0 0;
    width: 100%;
    height: 66px;
    flex-direction: row;
    align-items: stretch;
    padding: 7px max(10px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .sidebar-brand,
  .sidebar-bottom {
    display: none;
  }

  .main-nav {
    width: 100%;
    flex-direction: row;
    justify-content: space-around;
    gap: 3px;
  }

  .nav-item {
    width: auto;
    min-width: 0;
    height: 52px;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 0 5px;
    border-radius: 5px;
    font-size: 9px;
    text-align: center;
  }

  .nav-item.is-active::before {
    top: auto;
    right: 18px;
    bottom: 0;
    left: 18px;
    width: auto;
    height: 2px;
  }

  .nav-icon svg {
    width: 17px;
    height: 17px;
  }

  .main-content {
    padding-bottom: 70px;
  }

  .topbar {
    height: 62px;
    padding: 0 20px;
  }

  .mobile-menu {
    display: none;
  }

  .mobile-profile {
    display: flex;
    align-items: center;
    gap: 2px;
  }

  .mobile-profile .avatar {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 10px;
  }

  .mobile-profile .icon-button {
    color: var(--ink-faint);
  }

  .view-container {
    padding: 26px 20px 40px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .finance-grid {
    grid-template-columns: 1fr;
  }

  .auth-screen {
    grid-template-columns: 1fr;
  }

  .auth-story {
    display: none;
  }

  .auth-action {
    min-height: 100vh;
    padding: 90px 24px 70px;
  }

  .auth-mobile-brand {
    position: absolute;
    top: 28px;
    left: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--green-dark);
  }

  .auth-mobile-brand .brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    filter: drop-shadow(0 4px 10px rgba(16, 68, 49, 0.12));
  }

  .auth-mobile-brand .brand-copy small {
    color: var(--ink-faint);
  }
}

@media (max-width: 760px) {
  .auth-card {
    padding: 26px 22px;
  }

  .topbar-actions {
    gap: 5px;
  }

  .rate-pill {
    display: none;
  }

  .language-pill {
    display: inline-flex !important;
    padding: 6px 9px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .page-heading h2 {
    font-size: 25px;
  }

  .heading-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .heading-actions .segmented {
    flex: 1;
  }

  .heading-actions .button {
    flex: 1;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .status-filter-group {
    width: 100%;
  }

  .customer-filter-group {
    flex-wrap: wrap;
  }

  .status-filter-group .select-field {
    flex: 1;
  }

  .bank-grid {
    grid-template-columns: 1fr;
  }

  .search-field {
    width: 100%;
  }

  .select-field {
    width: 100%;
    justify-content: space-between;
  }

  .select-field select {
    max-width: none;
  }

  .date-range {
    width: 100%;
  }

  .date-range label {
    flex: 1;
  }

  .date-range input {
    width: 100%;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .kpi-card {
    padding: 15px;
  }

  .kpi-value strong {
    font-size: 21px;
  }

  .dashboard-grid-lower,
  .finance-grid-wide {
    grid-template-columns: 1fr;
  }

  .supplier-contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .supplier-detail-head,
  .supplier-products-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .supplier-detail-head .row-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .finance-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .finance-filter-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .finance-filter-row .segmented {
    width: 100%;
  }

  .finance-filter-row .segmented button {
    flex: 1;
  }

  .form-grid,
  .form-grid.three,
  .form-grid.four {
    grid-template-columns: 1fr;
  }

  .form-grid .full {
    grid-column: auto;
  }

  .sale-items-field {
    grid-column: 1 / -1;
  }

  .sale-item-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px;
    align-items: end;
  }

  .sale-item-product {
    grid-column: 1 / -1;
  }

  .sale-item-amount {
    grid-column: 1 / 3;
  }

  .sale-item-row > .icon-button {
    grid-column: 3;
    grid-row: 2;
    align-self: end;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 92vh;
    border-radius: 8px 8px 0 0;
  }

  .modal-small {
    margin-bottom: 0;
  }

  .modal-body {
    padding: 18px;
  }

  .modal-footer {
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  }

  .modal-note {
    display: none;
  }

  .button-split {
    width: 100%;
  }

  .button-split .button {
    flex: 1;
  }

  .export-grid {
    grid-template-columns: 1fr;
  }

  .recent-row {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr);
  }

  .recent-row .tag {
    display: none;
  }

  .toast-root {
    right: 14px;
    bottom: 80px;
    width: calc(100vw - 28px);
  }

  .auth-footnote {
    right: 24px;
    bottom: 18px;
  }
}

@media (max-width: 440px) {
  .view-container {
    padding: 22px 14px 36px;
  }

  .topbar {
    padding: 0 14px;
  }

  .topbar h1 {
    font-size: 15px;
  }

  .page-heading {
    margin-bottom: 19px;
  }

  .heading-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .heading-actions .segmented {
    grid-column: 1 / -1;
  }

  .kpi-card {
    padding: 13px;
  }

  .kpi-top {
    margin-bottom: 10px;
  }

  .kpi-value strong {
    font-size: 18px;
  }

  .panel-head {
    padding: 0 14px;
  }

  .chart-wrap {
    padding-right: 13px;
    padding-left: 13px;
  }

  .profit-summary,
  .profit-breakdown {
    padding-right: 14px;
    padding-left: 14px;
  }

  .recent-row {
    padding: 11px 14px;
  }

  .table-summary {
    display: none;
  }

  .finance-kpi {
    padding: 12px;
  }

  .finance-kpi strong {
    font-size: 16px;
  }

  .tier-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 30px;
  }

  .calc-box {
    grid-template-columns: 1fr;
  }

  .calc-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 6px;
  }

  .calc-item span {
    margin: 0;
  }

  .calc-item small {
    grid-column: 1 / -1;
  }

  .auth-action {
    place-items: start center;
    padding-top: 104px;
  }

  .auth-card h2 {
    font-size: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
