@font-face {
  font-family: Outfit;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/outfit-latin-variable.woff2") format("woff2");
}
:root {
  color-scheme: light;
  --bg: #f9fafb;
  --panel: #fff;
  --raised: #f2f4f7;
  --line: #e4e7ec;
  --text: #1d2939;
  --muted: #667085;
  --accent: #805436;
  --primary: #8b5e3c;
  --primary-hover: #744a2e;
  --soft: #f5eee8;
  --soft-line: #e7d8c9;
  --green: #805436;
  --red: #b42318;
  --error-bg: #fff3f1;
  --error-line: #f3c7c0;
  --chart-in: #a77b55;
  --chart-out: #9ca3af;
  --hero: linear-gradient(120deg, #faf8f5, #f2ebe3 62%, #f1f2f4);
  --shadow: 0 16px 40px -28px #10182845;
  --radius: 22px;
  font-family: Outfit, sans-serif;
  font-size: 14px;
  font-synthesis: none;
}
:root.dark {
  color-scheme: dark;
  --bg: #17181b;
  --panel: #1e2024;
  --raised: #292c31;
  --line: #35383f;
  --text: #f2f4f7;
  --muted: #a4a8b0;
  --accent: #dfb58e;
  --primary: #8b5e3c;
  --primary-hover: #a16e48;
  --soft: #332b26;
  --soft-line: #504034;
  --green: #dfb58e;
  --red: #f5a99c;
  --error-bg: #352724;
  --error-line: #694139;
  --chart-in: #c99a71;
  --chart-out: #89919e;
  --hero: linear-gradient(120deg, #242426, #312923 62%, #25272b);
  --shadow: 0 16px 40px -28px #0008;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  flex-shrink: 0;
}
button svg {
  pointer-events: none;
}
.app-shell {
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  height: 100dvh;
  border-right: 1px solid var(--line);
  background: var(--panel);
  padding: 28px 20px 20px;
  display: flex;
  flex-direction: column;
  z-index: 50;
  overflow-y: auto;
  transition: width 0.25s ease;
}
.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  margin-bottom: 34px;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.8px;
  white-space: nowrap;
}
.brand img {
  width: 36px;
  height: 36px;
}
.brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 1.7px;
  color: var(--muted);
  margin-top: 1px;
  font-weight: 500;
}
.sidebar-close,
.mobile-brand,
.nav-backdrop {
  display: none;
}
.nav-label {
  font-size: 11px;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin: 0 12px 12px;
  font-weight: 500;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  transition:
    background 0.15s,
    color 0.15s;
}
nav a > [data-icon] {
  display: inline-flex;
  color: var(--muted);
}
nav a:hover {
  background: var(--raised);
}
nav a.active {
  background: var(--soft);
  color: var(--accent);
}
nav a.active > [data-icon] {
  color: var(--accent);
}
.account {
  display: flex;
  align-items: center;
  gap: 11px;
  border-top: 1px solid var(--line);
  padding: 20px 4px 0;
  margin-top: auto;
  min-height: 65px;
}
.avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  background: var(--soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.account strong {
  font-size: 13px;
  font-weight: 500;
  display: block;
}
.account small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.main-shell {
  margin-left: 260px;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.25s ease;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 80px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.header-start,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.breadcrumb span {
  margin: 0 10px;
  color: var(--muted);
}
.breadcrumb strong {
  color: var(--text);
  font-weight: 500;
}
.today {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.mode-badge {
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  white-space: nowrap;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--panel);
  font-size: 13px;
  font-weight: 500;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.15s;
}
.button:hover {
  background: var(--raised);
}
.button:active {
  transform: translateY(1px);
}
.button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.button.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.button.ghost {
  background: transparent;
}
.button.ghost:hover {
  background: var(--raised);
}
.button.danger {
  color: var(--red);
  background: var(--error-bg);
  border-color: var(--error-line);
}
.button.small {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 12px;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 7px;
}
.icon-button:hover {
  background: var(--raised);
  color: var(--text);
}
.sidebar-close {
  display: none;
}
.sidebar-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
}
.theme-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.sun-icon {
  display: none;
}
.dark .sun-icon {
  display: block;
}
.dark .moon-icon {
  display: none;
}
main {
  width: 100%;
  max-width: 1536px;
  min-width: 0;
  margin: 0 auto;
  padding: 24px;
  flex: 1;
  animation: enter 0.2s ease-out;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.page-heading h1 {
  font-size: 24px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin: 0 0 6px;
}
.page-heading p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}
.page-heading .eyebrow {
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--accent);
  margin-bottom: 9px;
  font-weight: 500;
}
.heading-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
.dashboard-page .page-heading {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--hero);
  padding: 24px;
  box-shadow: var(--shadow);
}
.dashboard-page .eyebrow {
  display: inline-flex;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  background: var(--panel);
  padding: 4px 10px;
}
.dashboard-page .page-heading h1 {
  font-size: 22px;
}
.notice {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 16px;
  border: 1px solid var(--soft-line);
  background: var(--soft);
  color: var(--accent);
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 12px;
  line-height: 1.7;
}
.notice .text-link {
  margin-left: auto;
  white-space: nowrap;
}
.text-link {
  background: none;
  border: 0;
  padding: 4px 0;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
}
.text-link:hover {
  text-decoration: underline;
}
.section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.section-top h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  margin: 0;
}
.section-top p {
  font-size: 12px;
  color: var(--muted);
  margin: 5px 0 0;
}
.period-control {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}
.period-control input {
  width: 145px;
  font-size: 12px;
  padding: 8px 10px;
}
.period-control button {
  min-height: 38px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 24px;
}
.stat {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  padding: 20px;
  box-shadow: var(--shadow);
}
.stat-label {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
  min-height: 40px;
}
.stat-label svg {
  box-sizing: content-box;
  padding: 10px;
  background: var(--raised);
  border-radius: 12px;
  width: 20px;
  height: 20px;
  color: var(--accent);
}
.stat-value {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.7px;
  line-height: 1.3;
  margin: 7px 0 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat-value small {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  margin-left: 4px;
  color: var(--muted);
}
.stat-foot {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}
.positive,
.warm,
.low-text {
  color: var(--accent);
}
.analytics {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 24px;
  margin-bottom: 24px;
}
.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.legend {
  display: flex;
  gap: 15px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}
.legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.legend i {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 2px;
  background: var(--chart-in);
}
.legend i.out {
  background: var(--chart-out);
}
.chart {
  display: block;
  width: 100%;
  height: 240px;
  stroke: none;
  overflow: visible;
}
.chart text {
  font:
    11px Outfit,
    sans-serif;
  fill: var(--muted);
  stroke: none;
}
.chart .grid {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 3 6;
}
.chart rect {
  stroke: none;
}
.chart-note {
  color: var(--muted);
  font-size: 11px;
  margin: 12px 0 0;
}
.stock-list {
  display: grid;
  gap: 23px;
  margin-top: 26px;
}
.stock-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 13px;
}
.stock-head strong {
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.stock-hint {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}
.stock-progress {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--raised);
}
.stock-progress::-webkit-progress-bar {
  background: var(--raised);
  border-radius: 999px;
}
.stock-progress::-webkit-progress-value {
  background: var(--chart-in);
  border-radius: 999px;
}
.stock-progress.low::-webkit-progress-value {
  background: var(--chart-out);
}
.stock-progress::-moz-progress-bar {
  background: var(--chart-in);
}
.stock-progress.low::-moz-progress-bar {
  background: var(--chart-out);
}
.table-section {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.table-section > .section-top {
  padding: 22px 24px 0;
}
.table-wrap {
  position: relative;
  overflow: auto;
  max-width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}
th {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.4px;
  color: var(--muted);
  background: var(--bg);
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
}
td {
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: var(--bg);
}
td strong {
  font-size: 13px;
  font-weight: 500;
}
td small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}
.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--muted);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-weight: 500;
}
.badge.warm {
  background: var(--soft);
  color: var(--accent);
}
.badge.muted {
  background: var(--raised);
  color: var(--muted);
}
.badge svg {
  width: 12px;
  height: 12px;
}
.table-footer {
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  white-space: normal;
  line-height: 1.7;
}
.empty {
  padding: 45px 20px;
  text-align: center;
  color: var(--muted);
  line-height: 1.8;
  white-space: normal;
}
.empty strong {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 7px;
}
.empty svg {
  width: 30px;
  height: 30px;
  color: var(--accent);
  margin-bottom: 10px;
}
.empty .button {
  margin-top: 14px;
}
.material-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.material-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  padding: 24px;
  box-shadow: var(--shadow);
}
.material-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 24px;
}
.material-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--raised);
  color: var(--accent);
  margin-bottom: 16px;
}
.material-card h2 {
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 5px;
}
.material-card p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}
.material-volume {
  font-size: 36px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.material-volume small {
  font-size: 14px;
  color: var(--muted);
  font-weight: 400;
}
.material-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.material-bottom strong {
  color: var(--text);
  font-weight: 500;
}
.filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.search {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.search svg {
  position: absolute;
  top: 13px;
  left: 13px;
  width: 18px;
  color: var(--muted);
}
.search input {
  width: 100%;
  padding-left: 40px;
}
.filters select {
  min-width: 145px;
}
.wrap-cell {
  white-space: normal;
  min-width: 140px;
  max-width: 320px;
  overflow-wrap: anywhere;
  line-height: 1.7;
}
.spaced {
  margin-top: 24px;
}
input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 11px 13px;
  font-size: 14px;
  min-width: 0;
  width: auto;
  min-height: 44px;
  box-shadow: 0 1px 2px #10182804;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 2px solid var(--soft-line);
  outline-offset: 1px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.field.full {
  grid-column: 1/-1;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-weight: 400;
}
.field small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.6;
}
.field textarea {
  resize: vertical;
  min-height: 85px;
}
.form-error {
  font-size: 13px;
  color: var(--red);
  line-height: 1.7;
  margin: 16px 0 0;
}
.form-error:empty {
  display: none;
}
.form-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 18px;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: var(--soft);
  margin-top: 24px;
}
.form-summary span {
  font-size: 13px;
  color: var(--muted);
}
.form-summary strong {
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
dialog {
  padding: 0;
  width: min(590px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 24px 60px #10182830;
}
dialog::backdrop {
  background: #10182866;
  backdrop-filter: blur(4px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 28px 28px 22px;
}
.modal-head h2 {
  font-size: 22px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.4px;
  margin: 0 0 8px;
}
.modal-head p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}
.modal-body {
  padding: 0 28px 28px;
}
.detail-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 23px;
  margin: 6px 0 24px;
}
.detail-list dt {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.detail-list dd {
  font-size: 14px;
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.detail-list .full {
  grid-column: 1/-1;
}
.report-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
}
.report-summary {
  display: grid;
}
.report-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.report-row:last-child {
  border-bottom: 0;
}
.report-row strong {
  font-size: 17px;
  color: var(--text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.report-info {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}
.report-info > svg {
  width: 35px;
  height: 35px;
  color: var(--accent);
  margin-bottom: 18px;
}
.report-info h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px;
}
.report-info .button {
  margin-top: 18px;
  width: 100%;
}
.document-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.payment-history {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 10px;
}
.payment-history h3 {
  font-size: 15px;
  font-weight: 500;
}
.payment-entry {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.payment-entry strong {
  font-size: 14px;
  font-weight: 500;
}
.payment-entry small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
.payment-entry p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin: 8px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.main-shell > footer {
  max-width: 1488px;
  width: calc(100% - 48px);
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin: 8px auto 0;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.footer-dot {
  margin: 0 7px;
}
.loading {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 15px);
  max-width: calc(100vw - 32px);
  background: var(--text);
  color: var(--panel);
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 13px;
  line-height: 1.6;
  box-shadow: 0 5px 25px #0002;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 100;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.skip {
  position: fixed;
  left: 15px;
  top: -100px;
  z-index: 110;
  padding: 12px;
  background: var(--primary);
  color: #fff;
}
.skip:focus {
  top: 10px;
}
.hidden {
  display: none !important;
}
.sr-only {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.error-panel {
  max-width: 550px;
  margin: 80px auto;
  padding: 30px;
  line-height: 1.8;
  color: var(--muted);
}
.error-panel h1 {
  color: var(--text);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.print-document {
  background: #fffdf9;
  color: #25291f;
  max-width: 960px;
  margin: 0 auto;
  padding: 44px;
  border-radius: 12px;
}
.doc-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 2px solid #a77b55;
  padding-bottom: 27px;
}
.doc-header h2 {
  font-size: 22px;
  letter-spacing: 1px;
  margin: 0 0 10px;
  font-weight: 650;
}
.doc-header p {
  font-size: 12px;
  color: #5f6657;
  line-height: 1.6;
  margin: 7px 0;
}
.doc-header > div:last-child {
  text-align: right;
  font-size: 12px;
}
.doc-status {
  display: inline-block;
  border: 1px solid #a77b55;
  color: #5a4a28;
  padding: 7px 10px;
  font-size: 10px;
  margin-top: 5px;
  font-weight: 600;
}
.doc-address {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 30px;
  margin: 32px 0;
}
.print-document small {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #626b57;
}
.doc-address h3 {
  font-size: 16px;
  margin: 10px 0;
  font-weight: 550;
}
.doc-address p {
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  margin: 5px 0;
}
.doc-table {
  overflow: auto;
}
.print-document table {
  color: #25291f;
  white-space: normal;
}
.print-document th {
  background: #efeee4;
  color: #575e4e;
  border-color: #d8d6c8;
}
.print-document td {
  border-color: #d8d6c8;
}
.print-document tbody tr:hover {
  background: none;
}
.doc-totals {
  display: flex;
  justify-content: flex-end;
  padding: 20px 0;
}
.doc-totals > div {
  width: min(100%, 320px);
}
.doc-totals p {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  font-size: 12px;
}
.doc-totals strong {
  font-size: 14px;
  font-weight: 600;
}
.doc-totals p:last-child {
  padding-top: 14px;
  border-top: 1px solid #ccc8b7;
}
.doc-notes {
  font-size: 12px;
  line-height: 1.7;
}
.doc-notes p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.doc-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  text-align: center;
  margin: 45px 0 25px;
  font-size: 11px;
}
.doc-signatures span {
  display: block;
  margin-top: 60px;
}
.doc-footer {
  border-top: 1px solid #ccc8b7;
  color: #626b57;
  font-size: 9px;
  padding: 15px 0 0;
  margin: 0;
  display: block;
  overflow-wrap: anywhere;
}
@media (min-width: 1024px) {
  .sidebar-collapsed:not(.sidebar-hovered) .sidebar {
    width: 82px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .sidebar-collapsed:not(.sidebar-hovered) .main-shell {
    margin-left: 82px;
  }
  .sidebar-collapsed:not(.sidebar-hovered) .brand-row {
    justify-content: center;
  }
  .sidebar-collapsed:not(.sidebar-hovered) .brand > span,
  .sidebar-collapsed:not(.sidebar-hovered) .nav-text,
  .sidebar-collapsed:not(.sidebar-hovered) .nav-label,
  .sidebar-collapsed:not(.sidebar-hovered) .account > div {
    display: none;
  }
  .sidebar-collapsed:not(.sidebar-hovered) nav a {
    justify-content: center;
    padding: 10px;
  }
  .sidebar-collapsed:not(.sidebar-hovered) .account {
    justify-content: center;
  }
}
@media (max-width: 1279px) {
  .today {
    display: none;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .analytics {
    grid-template-columns: 1fr;
  }
  .stock-list {
    grid-template-columns: 1fr 1fr;
  }
  .report-grid {
    grid-template-columns: 1fr;
  }
  .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .heading-actions {
    flex-wrap: wrap;
  }
  .topbar-right {
    gap: 10px;
  }
}
@media (max-width: 1023px) {
  .main-shell {
    margin-left: 0;
  }
  .sidebar {
    inset: auto 0 0;
    width: 100%;
    height: 72px;
    padding: 7px 12px;
    border-right: 0;
    border-top: 1px solid var(--line);
    background: var(--panel);
    z-index: 50;
    overflow: visible;
  }
  .sidebar .brand-row,
  .sidebar .nav-label,
  .sidebar .account {
    display: none;
  }
  .sidebar nav {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    gap: 5px;
    height: 100%;
  }
  .sidebar nav a {
    flex: 1;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 5px 8px;
    font-size: 10px;
    font-weight: 400;
  }
  .sidebar nav a svg {
    width: 21px;
    height: 21px;
  }
  .sidebar-toggle {
    width: 40px;
    height: 40px;
  }
  .topbar {
    min-height: 72px;
    padding: 12px 20px;
  }
  .theme-toggle {
    width: 40px;
    height: 40px;
  }
  .main-shell > footer {
    margin-bottom: 72px;
  }
  #toast {
    bottom: 90px;
  }
  .mobile-menu-open body {
    overflow: hidden;
  }
  .mobile-menu-open .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    border: 0;
    background: #10182866;
    z-index: 60;
    backdrop-filter: blur(2px);
  }
  .mobile-menu-open .sidebar {
    inset: 0 auto 0 0;
    width: 260px;
    height: 100dvh;
    padding: 25px 20px 20px;
    z-index: 70;
    border: 0;
    border-right: 1px solid var(--line);
    box-shadow: 12px 0 50px #0002;
    overflow-y: auto;
  }
  .mobile-menu-open .sidebar .brand-row {
    display: flex;
    margin-bottom: 32px;
  }
  .mobile-menu-open .brand {
    font-size: 21px;
    gap: 8px;
  }
  .mobile-menu-open .brand img {
    width: 31px;
    height: 31px;
  }
  .mobile-menu-open .brand small {
    font-size: 7px;
  }
  .mobile-menu-open .sidebar-close {
    display: inline-grid;
    width: 30px;
    height: 30px;
    padding: 5px;
  }
  .mobile-menu-open .sidebar .nav-label {
    display: block;
  }
  .mobile-menu-open .sidebar nav {
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    height: auto;
  }
  .mobile-menu-open .sidebar nav a {
    flex: none;
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 500;
    min-height: 40px;
  }
  .mobile-menu-open .sidebar .account {
    display: flex;
    margin-top: auto;
  }
}
@media (max-width: 767px) {
  main {
    padding: 20px 16px;
  }
  .topbar {
    padding: 12px 16px;
    gap: 10px;
  }
  .header-start {
    gap: 10px;
  }
  .breadcrumb {
    display: none;
  }
  .mode-badge {
    font-size: 9px;
    letter-spacing: 0.4px;
    padding: 5px 8px;
  }
  .mobile-brand {
    display: block;
    line-height: 0;
  }
  .topbar-right {
    gap: 7px;
  }
  .topbar-right .button {
    font-size: 12px;
    padding: 8px 12px;
    min-height: 38px;
  }
  .topbar-right .button svg {
    display: none;
  }
  .theme-toggle,
  .topbar-right .icon-button {
    width: 36px;
    height: 36px;
  }
  .page-heading {
    gap: 16px;
    margin-bottom: 20px;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .dashboard-page .page-heading {
    padding: 20px;
    border-radius: 20px;
  }
  .dashboard-page .page-heading h1 {
    font-size: 21px;
  }
  .heading-actions {
    width: 100%;
  }
  .heading-actions .button {
    flex: 1;
    padding: 10px 12px;
    gap: 6px;
    font-size: 12px;
    white-space: nowrap;
  }
  .notice {
    font-size: 11px;
    padding: 12px;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .notice > span {
    flex: 1;
    min-width: 220px;
  }
  .notice .text-link {
    margin-left: 30px;
    font-size: 11px;
  }
  .period-control {
    gap: 8px;
  }
  .period-control input {
    width: 130px;
    font-size: 11px;
    min-height: 38px;
  }
  .period-control label {
    font-size: 11px;
  }
  .stats {
    gap: 12px;
    margin: 20px 0;
  }
  .stat {
    padding: 16px;
    border-radius: 18px;
  }
  .stat-label {
    font-size: 11px;
    letter-spacing: 0.4px;
    gap: 8px;
  }
  .stat-label svg {
    width: 17px;
    height: 17px;
    padding: 8px;
    border-radius: 10px;
  }
  .stat-value {
    font-size: 25px;
    margin: 9px 0;
  }
  .stat-value small {
    font-size: 12px;
  }
  .stat-foot {
    font-size: 11px;
  }
  .analytics {
    gap: 20px;
    margin-bottom: 20px;
  }
  .panel {
    padding: 20px 16px;
    border-radius: 20px;
  }
  .legend {
    font-size: 10px;
    gap: 10px;
  }
  .chart {
    height: 210px;
  }
  .stock-list {
    grid-template-columns: 1fr;
    gap: 23px;
  }
  .stock-head {
    font-size: 13px;
  }
  .stock-hint {
    font-size: 11px;
  }
  .material-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .material-card {
    padding: 22px;
    border-radius: 20px;
  }
  .section-top h2 {
    font-size: 15px;
  }
  .section-top p {
    font-size: 11px;
  }
  .table-section {
    border-radius: 20px;
  }
  .table-section > .section-top {
    padding: 20px 16px 0;
  }
  .table-footer {
    font-size: 10px;
    padding: 14px 16px;
    flex-wrap: wrap;
  }
  .table-footer .button {
    font-size: 11px;
  }
  th,
  td {
    padding-left: 16px;
    padding-right: 16px;
  }
  .filters {
    gap: 10px;
  }
  .filters .search {
    flex-basis: 100%;
  }
  .filters select {
    min-width: 0;
    flex: 1;
    font-size: 12px;
  }
  .form-grid {
    gap: 17px;
  }
  .field.full-mobile {
    grid-column: 1/-1;
  }
  .field {
    font-size: 12px;
  }
  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
  }
  .modal-head {
    padding: 24px 22px 20px;
  }
  .modal-head h2 {
    font-size: 21px;
  }
  .modal-head p {
    font-size: 12px;
  }
  .modal-body {
    padding: 0 22px 24px;
  }
  .form-actions .button {
    flex: 1;
  }
  .form-summary {
    padding: 15px;
  }
  .form-summary strong {
    font-size: 21px;
  }
  .report-row {
    font-size: 12px;
  }
  .report-row strong {
    font-size: 15px;
  }
  .document-actions .button {
    flex: 1;
  }
  .main-shell > footer {
    width: calc(100% - 32px);
    font-size: 10px;
    flex-wrap: wrap;
    padding: 18px 0;
  }
  .print-document {
    padding: 22px 16px;
  }
  .doc-header {
    flex-direction: column;
    gap: 12px;
  }
  .doc-header > div:last-child {
    text-align: left;
  }
  .doc-address {
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 25px 0;
  }
  .doc-signatures {
    font-size: 10px;
    gap: 10px;
  }
  .print-document th,
  .print-document td {
    padding: 12px 8px;
    font-size: 10px;
  }
  .document-page .page-heading h1 {
    font-size: 23px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  :root {
    color-scheme: only light !important;
    background: #fff !important;
  }
  html,
  body {
    background: #fff !important;
    color: #111 !important;
    font-size: 11pt;
    color-scheme: light;
  }
  .sidebar,
  .topbar,
  .main-shell > footer,
  .no-print,
  #toast,
  dialog,
  .skip,
  .nav-backdrop {
    display: none !important;
  }
  .app-shell,
  .main-shell {
    display: block !important;
    min-height: 0;
    margin: 0 !important;
    background: #fff !important;
  }
  main {
    margin: 0 !important;
    padding: 0 !important;
  }
  .print-document {
    padding: 0 !important;
    max-width: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: #111;
    background: #fff;
  }
  .doc-table {
    overflow: visible;
  }
  .print-document table {
    width: 100%;
  }
  .doc-header,
  .doc-address,
  .doc-signatures,
  .doc-totals,
  .doc-notes {
    break-inside: avoid;
  }
  .doc-footer {
    display: block !important;
    margin: 0;
  }
  .document-page {
    animation: none !important;
  }
  .doc-status {
    color: #111;
  }
  .doc-header h2 {
    font-size: 18pt;
  }
  @page {
    size: A4;
    margin: 18mm;
    background: white;
  }
}
