:root {
  --sidebar-width: 196px;
  --bg: #edf5f1;
  --surface: #ffffff;
  --surface-soft: #f5faf7;
  --surface-tint: #eaf7f0;
  --text: #14251f;
  --muted: #667085;
  --muted-strong: #40584f;
  --line: #cddfd8;
  --line-soft: #e1eee8;
  --primary: #15936c;
  --primary-dark: #0b634f;
  --primary-soft: #e8f7ef;
  --blue: #0b8793;
  --blue-soft: #e4f6f7;
  --accent: #b66b12;
  --accent-soft: #fff4df;
  --danger: #b9382f;
  --danger-soft: #fff0ee;
  --success: #2f8f46;
  --success-soft: #e8f7ef;
  --shadow-sm: 0 2px 10px rgba(13, 76, 67, 0.06);
  --shadow-md: 0 14px 34px rgba(13, 76, 67, 0.12);
  --eco-deep: #052f2b;
  --eco-mid: #08624f;
  --eco-cyan: #0f828f;
  --eco-leaf: #5ea236;
  --eco-grid: rgba(34, 151, 115, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  background:
    linear-gradient(90deg, var(--eco-grid) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgba(34, 151, 115, 0.055) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(236, 249, 242, 0.92), rgba(255, 255, 255, 0) 260px),
    var(--bg);
  background-size: 44px 44px, 44px 44px, auto;
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

body.locked {
  display: block;
}

body.locked .sidebar,
body.locked .main {
  display: none;
}

button,
input,
select {
  font: inherit;
}

button {
  user-select: none;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
}

h2 {
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0;
}

.hidden {
  display: none;
}

.login-screen {
  width: 100%;
  min-height: 100vh;
  display: block;
  background:
    linear-gradient(90deg, var(--eco-grid) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgba(34, 151, 115, 0.055) 0 1px, transparent 1px 100%),
    #edf5f1;
  background-size: 44px 44px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(430px, 0.68fr);
}

.login-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 44px clamp(34px, 6vw, 78px);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(210, 255, 233, 0.13) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgba(210, 255, 233, 0.09) 0 1px, transparent 1px 100%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 34px),
    linear-gradient(135deg, var(--eco-deep) 0%, var(--eco-mid) 46%, var(--eco-cyan) 78%, var(--eco-leaf) 100%);
  background-size: 64px 64px, 64px 64px, auto, auto;
}

.login-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(0deg, rgba(5, 32, 28, 0.2), transparent);
  pointer-events: none;
}

.login-hero > * {
  position: relative;
  z-index: 1;
}

.login-hero-watermark {
  position: absolute;
  right: -92px;
  bottom: -76px;
  width: min(42vw, 430px);
  opacity: 0.14;
  filter: brightness(0) invert(1);
  z-index: 0;
}

.login-hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  font-size: 18px;
  font-weight: 700;
}

.login-hero-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
}

.login-hero-mark img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.login-hero-copy {
  max-width: 720px;
  display: grid;
  gap: 18px;
}

.login-eyebrow {
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  font-weight: 700;
}

.login-hero-copy h1 {
  max-width: 660px;
  color: #fff;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.08;
  font-weight: 800;
}

.login-lead {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.7;
}

.login-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 140px));
  gap: 14px;
  margin-top: 6px;
}

.login-highlights div {
  min-height: 82px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.login-highlights strong {
  font-size: 24px;
  line-height: 1.15;
}

.login-highlights span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.login-hero-footer {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.login-auth {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 28px;
  padding: 56px clamp(30px, 5vw, 72px) 32px;
  background:
    linear-gradient(90deg, rgba(34, 151, 115, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgba(34, 151, 115, 0.06) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(245, 253, 249, 0.96), rgba(255, 255, 255, 0.98));
  background-size: 42px 42px, 42px 42px, auto;
}

.login-auth::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(21, 147, 108, 0.09), transparent 34%),
    repeating-linear-gradient(135deg, rgba(13, 76, 67, 0.045) 0 1px, transparent 1px 28px);
  pointer-events: none;
}

.login-auth > * {
  position: relative;
  z-index: 1;
}

.login-language {
  position: absolute;
  top: 22px;
  right: 28px;
  color: var(--muted-strong);
  font-size: 13px;
}

.login-panel {
  width: min(390px, 100%);
  display: grid;
  gap: 0;
  padding: 26px;
  border: 1px solid rgba(166, 203, 189, 0.68);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(249, 253, 251, 0.98)),
    var(--surface);
  box-shadow: 0 18px 42px rgba(13, 76, 67, 0.13);
}

.login-card-brand {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
}

.login-card-brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  padding: 5px;
  border: 1px solid #d7e9e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(13, 76, 67, 0.1);
}

.login-panel h2 {
  color: var(--text);
  text-align: center;
  font-size: 20px;
  margin-bottom: 20px;
}

.login-mode {
  display: grid;
  place-items: center;
  min-height: 38px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
  color: #0b634f;
  font-size: 14px;
  font-weight: 700;
}

.login-mode::after {
  content: "";
  align-self: end;
  width: 76px;
  height: 2px;
  margin-top: -2px;
  background: linear-gradient(90deg, #15936c, #0b8793);
}

.login-panel label {
  padding: 0;
  margin-top: 16px;
  color: var(--muted-strong);
}

.login-panel input {
  min-height: 44px;
  border-radius: 6px;
  padding: 0 12px;
}

.login-captcha-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 16px;
}

.login-captcha-row label {
  min-width: 0;
}

.login-captcha-btn {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid #bfd6cc;
  border-radius: 6px;
  background:
    linear-gradient(180deg, #ffffff, #f4fbf8);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.login-captcha-btn:hover {
  border-color: #15936c;
  background: #f0fbf6;
  box-shadow: 0 0 0 3px rgba(21, 147, 108, 0.1);
}

.login-captcha-btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.login-captcha-btn.is-verified {
  border-color: #15936c;
  background: #e8f7ef;
  color: #0b634f;
}

.login-captcha-btn span {
  color: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.login-captcha-btn strong {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #e4f6f7;
  color: #0b8793;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.login-captcha-btn.is-verified strong {
  background: #15936c;
  color: #fff;
}

.login-error {
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid #ffc9c1;
  border-radius: 6px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}

.login-panel .primary-btn {
  width: 100%;
  margin: 20px 0 0;
  min-height: 44px;
  border-radius: 4px;
  background: linear-gradient(135deg, #2f8ed8, #1f76c4);
  box-shadow: 0 10px 20px rgba(31, 118, 196, 0.22);
}

.login-form-note,
.login-auth-footer {
  color: var(--muted);
  font-size: 13px;
}

.login-form-note {
  margin-top: 16px;
  text-align: center;
}

.login-auth-footer {
  align-self: end;
  text-align: center;
}

.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  min-height: 0;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 0 8px 10px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background:
    linear-gradient(90deg, rgba(181, 255, 223, 0.07) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgba(181, 255, 223, 0.045) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, #062e2a 0%, #0a473c 52%, #253b2a 100%);
  background-size: 36px 36px, 36px 36px, auto;
  border-right: 0;
  box-shadow: 2px 0 8px rgba(16, 24, 40, 0.12);
  color: rgba(219, 219, 243, 0.95);
  z-index: 3;
}

.sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.brand {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 6px;
  min-height: 118px;
  padding: 10px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
}

.brand-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: #fff;
  padding: 4px;
  justify-self: center;
  box-shadow: none;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  display: block;
  object-fit: contain;
}

.brand-text {
  display: grid;
  gap: 3px;
  text-align: center;
}

.brand-text strong {
  color: #fff;
  font-size: 14px;
  line-height: 1.35;
}

.brand-text span {
  color: rgba(219, 219, 243, 0.72);
  font-size: 11px;
  line-height: 1.35;
}

.nav {
  display: grid;
  gap: 5px;
}

.nav-icon-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.nav-group {
  display: grid;
  gap: 3px;
}

.nav-group[hidden] {
  display: none;
}

.nav button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 4px;
  min-height: 34px;
  padding: 0 28px 0 10px;
  background: transparent;
  color: rgba(219, 219, 243, 0.9);
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.nav button::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid rgba(219, 219, 243, 0.62);
  transform: translateY(-50%);
}

.nav > button::before,
.nav-group-toggle::before {
  content: none;
}

.nav-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  color: rgba(219, 219, 243, 0.86);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: color 0.16s ease, transform 0.16s ease;
}

.nav button:hover .nav-icon,
.nav button.active .nav-icon,
.nav-group.active .nav-icon,
.nav-group.expanded .nav-icon {
  color: #fff;
}

.nav button.active .nav-icon {
  transform: scale(1.06);
}

.nav button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav button.active {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.nav button.active::before {
  background: #fff;
  border-color: #fff;
}

.nav-group-toggle::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid rgba(219, 219, 243, 0.72);
  border-bottom: 2px solid rgba(219, 219, 243, 0.72);
  transform: translateY(-50%) rotate(-45deg);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.nav-group.expanded .nav-group-toggle::after {
  transform: translateY(-65%) rotate(45deg);
}

.nav-group-toggle:hover::after,
.nav-group.active .nav-group-toggle::after,
.nav-group.expanded .nav-group-toggle::after {
  border-color: #fff;
}

.nav-group.active .nav-group-toggle,
.nav-group.expanded .nav-group-toggle {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-sub {
  display: none;
  gap: 4px;
  padding-left: 6px;
}

.nav-group.expanded .nav-sub {
  display: grid;
}

.nav-sub button {
  display: block;
  min-height: 32px;
  padding-left: 28px;
  padding-right: 8px;
  font-size: 13px;
}

.nav-sub button::before {
  content: "";
  left: 12px;
}

.main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-width);
  padding: 0 22px 26px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 92px;
  margin: 0 -22px 20px;
  padding: 16px 22px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(210, 255, 233, 0.14) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgba(210, 255, 233, 0.1) 0 1px, transparent 1px 100%),
    linear-gradient(135deg, var(--eco-deep) 0%, var(--eco-mid) 44%, var(--eco-cyan) 78%, var(--eco-leaf) 100%);
  background-size: 64px 64px, 64px 64px, auto;
  border-bottom: 1px solid rgba(164, 232, 201, 0.32);
  box-shadow: 0 12px 30px rgba(5, 60, 52, 0.16);
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(181, 255, 223, 0.18), transparent 30%),
    repeating-linear-gradient(135deg, rgba(219, 255, 239, 0.1) 0 1px, transparent 1px 28px);
  pointer-events: none;
}

.topbar::after {
  content: "";
  position: absolute;
  right: clamp(180px, 24vw, 420px);
  top: -52px;
  width: 190px;
  height: 190px;
  background: url("assets/sidebar-logo.png") center / contain no-repeat;
  filter: grayscale(1) brightness(0) invert(1);
  opacity: 0.055;
  pointer-events: none;
}

.topbar > * {
  position: relative;
  z-index: 1;
}

.topbar h1 {
  color: #fff;
  font-size: 24px;
  font-weight: 800;
}

.topbar p {
  width: fit-content;
  max-width: min(760px, 58vw);
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 0 10px;
  border: 1px solid rgba(189, 255, 224, 0.42);
  border-radius: 6px;
  background: rgba(230, 255, 242, 0.12);
  color: #d8fff0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.top-actions {
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.operator-box,
.user-box {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.operator-box input {
  width: 150px;
}

.user-box {
  min-width: 126px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(205, 255, 234, 0.3);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)),
    rgba(2, 43, 39, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 26px rgba(3, 41, 35, 0.16);
  backdrop-filter: blur(10px);
}

.topbar-user-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(177, 255, 220, 0.42);
  border-radius: 8px;
  background:
    radial-gradient(circle at 32% 20%, rgba(226, 255, 238, 0.8), rgba(41, 192, 135, 0.34) 38%, rgba(8, 96, 76, 0.22) 100%);
  color: #f2fff8;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 8px 18px rgba(4, 45, 39, 0.18);
}

.user-box[data-role="super-admin"] .topbar-user-icon {
  border-color: rgba(255, 231, 153, 0.58);
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 253, 218, 0.92), rgba(232, 181, 69, 0.44) 40%, rgba(12, 99, 74, 0.28) 100%);
  color: #fff8d6;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 8px 20px rgba(114, 79, 9, 0.22);
}

.user-box[data-role="finance"] .topbar-user-icon,
.user-box[data-role="warehouse"] .topbar-user-icon {
  background:
    radial-gradient(circle at 32% 20%, rgba(227, 255, 250, 0.84), rgba(43, 185, 198, 0.36) 38%, rgba(8, 90, 88, 0.24) 100%);
}

.topbar-user-icon svg,
.topbar-action-btn svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.user-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

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

.user-box strong {
  color: #fff;
  font-size: 14px;
}

.topbar .user-box,
.topbar .operator-box {
  color: #c7eadc;
}

.topbar .ghost-btn {
  border-color: rgba(205, 255, 234, 0.36);
  background: rgba(255, 255, 255, 0.12);
  color: #f0fff8;
  box-shadow: none;
}

.topbar .ghost-btn:hover {
  border-color: rgba(223, 255, 241, 0.62);
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.topbar-action-btn {
  min-width: 88px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 800;
  line-height: 1;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.topbar-action-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 10px 22px rgba(2, 46, 39, 0.22);
}

.topbar-action-btn:focus-visible {
  outline: 2px solid rgba(226, 255, 239, 0.86);
  outline-offset: 2px;
}

#logoutBtn {
  color: #fff5e6;
}

#logoutBtn:hover {
  border-color: rgba(255, 214, 158, 0.76);
  background:
    linear-gradient(180deg, rgba(255, 190, 104, 0.22), rgba(120, 56, 18, 0.16)),
    rgba(255, 255, 255, 0.12);
}

#refreshBtn {
  color: #e6fffb;
}

#refreshBtn:hover {
  border-color: rgba(134, 238, 230, 0.76);
  background:
    linear-gradient(180deg, rgba(118, 232, 220, 0.22), rgba(13, 124, 131, 0.16)),
    rgba(255, 255, 255, 0.12);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.grid {
  display: grid;
  gap: 16px;
  align-items: start;
}

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

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

.mt {
  margin-top: 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.daily-reports {
  margin-bottom: 16px;
}

.dashboard-shell {
  display: grid;
  gap: 16px;
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  gap: 18px;
  align-items: stretch;
  min-height: 172px;
  padding: 24px;
  border: 1px solid rgba(60, 188, 147, 0.38);
  border-radius: 8px;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 28px),
    linear-gradient(135deg, #073f38 0%, #0a755d 46%, #11859a 100%);
  box-shadow: 0 18px 42px rgba(7, 63, 56, 0.16);
  color: #fff;
}

.dashboard-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 100%);
  background-size: 72px 72px;
  opacity: 0.36;
  pointer-events: none;
}

.dashboard-hero > * {
  position: relative;
  z-index: 1;
}

.dashboard-hero-copy {
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 0;
}

.dashboard-eyebrow {
  width: fit-content;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(164, 232, 201, 0.52);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #dff9ec;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-hero h2 {
  color: #fff;
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: 0;
}

.dashboard-hero p {
  max-width: 620px;
  color: #d9fff0;
  font-size: 14px;
}

.dashboard-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-content: stretch;
}

.dashboard-hero-metrics div {
  display: grid;
  align-content: center;
  min-height: 96px;
  padding: 13px 12px;
  border: 1px solid rgba(205, 255, 234, 0.3);
  border-radius: 6px;
  background: rgba(2, 43, 39, 0.28);
}

.dashboard-hero-metrics span {
  color: #bfeedd;
  font-size: 12px;
}

.dashboard-hero-metrics strong {
  margin-top: 8px;
  color: #fff;
  font-size: 20px;
  line-height: 1.18;
  word-break: break-word;
}

.dashboard-stats {
  margin-bottom: 0;
}

.dashboard-stat-card {
  border-color: #d8ebe4;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 253, 250, 0.98)),
    var(--surface);
  box-shadow: 0 10px 24px rgba(13, 76, 67, 0.08);
}

.dashboard-stat-card::before {
  left: 0;
  right: 0;
  top: 0;
  bottom: auto;
  width: auto;
  height: 3px;
  background: var(--dashboard-tone, var(--primary));
}

.dashboard-stat-card::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 44px;
  height: 28px;
  border-right: 1px solid var(--dashboard-soft, #dff2e6);
  border-bottom: 1px solid var(--dashboard-soft, #dff2e6);
  opacity: 0.82;
  pointer-events: none;
}

.stat-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.stat-card-top em {
  flex: 0 0 auto;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--dashboard-soft, var(--primary-soft));
  color: var(--dashboard-tone, var(--primary));
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 22px;
  white-space: nowrap;
}

.dashboard-tone-green {
  --dashboard-tone: #15936c;
  --dashboard-soft: #e4f7ee;
}

.dashboard-tone-cyan {
  --dashboard-tone: #0b8793;
  --dashboard-soft: #e1f6f7;
}

.dashboard-tone-blue {
  --dashboard-tone: #256fbb;
  --dashboard-soft: #e6f0fb;
}

.dashboard-tone-amber {
  --dashboard-tone: #b87012;
  --dashboard-soft: #fff4df;
}

.dashboard-tone-red {
  --dashboard-tone: #c24536;
  --dashboard-soft: #fff0ee;
}

.dashboard-tone-violet {
  --dashboard-tone: #6d5bd0;
  --dashboard-soft: #f0edff;
}

.dashboard-visual-grid {
  align-items: stretch;
}

.dashboard-panel {
  border-color: #dbe9e4;
  box-shadow: 0 8px 22px rgba(13, 76, 67, 0.06);
}

.dashboard-panel .panel-header {
  background:
    linear-gradient(90deg, rgba(21, 147, 108, 0.08), rgba(11, 135, 147, 0.06)),
    #fbfefd;
}

.dashboard-panel .panel-header h2::before {
  background: linear-gradient(180deg, #21a87b, #0b8793);
}

.dashboard-bars {
  display: grid;
  gap: 13px;
  padding: 16px;
}

.dashboard-bar-row {
  display: grid;
  gap: 8px;
}

.dashboard-bar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.dashboard-bar-label span {
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-bar-label strong {
  color: var(--text);
  font-size: 14px;
  text-align: right;
  word-break: break-word;
}

.dashboard-bar-track {
  height: 10px;
  overflow: hidden;
  border: 1px solid #d7e8e3;
  border-radius: 5px;
  background:
    repeating-linear-gradient(90deg, rgba(19, 104, 91, 0.08) 0 1px, transparent 1px 18px),
    #eef7f4;
}

.dashboard-bar-track span {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--dashboard-tone, #15936c), #7bd8bb);
}

.dashboard-shell .mini-summary {
  background: #f6fbf8;
}

.dashboard-shell .mini-summary div {
  border-color: #dcebe4;
  background: #ffffff;
}

.dashboard-shell .table-wrap {
  scrollbar-color: #9ad6c1 #eef7f4;
}

.dashboard-shell tbody tr:hover td {
  background: #f4fbf7;
}

.dashboard-risk-row td {
  background: #fff9ed;
}

.dashboard-watch-row td {
  background: #f7fbef;
}

.dashboard-shell {
  position: relative;
  isolation: isolate;
  gap: 18px;
}

.dashboard-shell::before {
  content: "";
  position: absolute;
  inset: -18px -14px auto;
  height: 360px;
  border-bottom: 1px solid rgba(119, 204, 168, 0.24);
  background:
    linear-gradient(90deg, rgba(34, 151, 115, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgba(34, 151, 115, 0.06) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(228, 249, 239, 0.88), rgba(246, 251, 248, 0));
  background-size: 42px 42px, 42px 42px, auto;
  pointer-events: none;
  z-index: -1;
}

.dashboard-hero {
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  min-height: 236px;
  padding: 26px;
  border-color: rgba(124, 223, 184, 0.44);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(135deg, #052f2b 0%, #08624f 42%, #0f828f 78%, #5ea236 100%);
  background-size: 64px 64px, 64px 64px, auto;
  box-shadow: 0 22px 50px rgba(5, 60, 52, 0.2);
}

.dashboard-hero::before {
  background:
    linear-gradient(110deg, rgba(181, 255, 223, 0.18), transparent 28%),
    repeating-linear-gradient(135deg, rgba(219, 255, 239, 0.1) 0 1px, transparent 1px 26px);
  opacity: 1;
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  left: clamp(220px, 36vw, 620px);
  top: -36px;
  width: 250px;
  height: 250px;
  background: url("assets/sidebar-logo.png") center / contain no-repeat;
  filter: grayscale(1) brightness(0) invert(1);
  opacity: 0.055;
  pointer-events: none;
}

.dashboard-eyebrow {
  border-color: rgba(189, 255, 224, 0.62);
  background: rgba(230, 255, 242, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.dashboard-hero h2 {
  max-width: 560px;
  font-size: 34px;
}

.dashboard-hero p {
  color: #d8fff0;
}

.dashboard-hero-side {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(110px, 1fr);
  gap: 12px;
  min-width: 0;
}

.dashboard-hero-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-hero-metrics div {
  min-height: 86px;
  border-color: rgba(205, 255, 234, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)),
    rgba(2, 43, 39, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.dashboard-eco-board {
  position: relative;
  min-height: 116px;
  overflow: hidden;
  border: 1px solid rgba(198, 255, 231, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(194, 255, 228, 0.1) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgba(194, 255, 228, 0.08) 0 1px, transparent 1px 100%),
    rgba(0, 37, 33, 0.2);
  background-size: 28px 28px;
}

.eco-link {
  position: absolute;
  left: 14%;
  right: 14%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(174, 255, 218, 0.74), transparent);
}

.eco-link-one {
  top: 38%;
}

.eco-link-two {
  top: 62%;
}

.eco-link-three {
  top: 50%;
  left: 26%;
  right: 26%;
  transform: rotate(-16deg);
}

.eco-node {
  position: absolute;
  display: grid;
  place-items: center;
  width: 68px;
  height: 30px;
  border: 1px solid rgba(207, 255, 235, 0.42);
  border-radius: 6px;
  background: rgba(9, 78, 67, 0.62);
  color: #ecfff6;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(0, 24, 22, 0.18);
}

.eco-node-buy {
  left: 8%;
  top: 18%;
}

.eco-node-stock {
  left: 38%;
  top: 44%;
}

.eco-node-make {
  right: 10%;
  top: 18%;
}

.eco-node-sale {
  right: 18%;
  bottom: 16%;
}

.dashboard-stat-card {
  min-height: 128px;
  padding: 18px 16px;
  border-color: rgba(160, 203, 187, 0.56);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 253, 249, 0.96)),
    var(--surface);
  box-shadow: 0 12px 30px rgba(12, 73, 64, 0.09);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.dashboard-stat-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--dashboard-tone, #15936c) 38%, #cfe5dc);
  box-shadow: 0 18px 36px rgba(12, 73, 64, 0.14);
}

.dashboard-stat-card::before {
  height: 4px;
  background: linear-gradient(90deg, var(--dashboard-tone, #15936c), color-mix(in srgb, var(--dashboard-tone, #15936c) 28%, #ffffff));
}

.dashboard-stat-card::after {
  width: 54px;
  height: 36px;
  border-color: color-mix(in srgb, var(--dashboard-tone, #15936c) 28%, #dceee7);
}

.dashboard-stat-card strong {
  margin-top: 10px;
  font-size: 24px;
}

.dashboard-panel {
  border-color: rgba(166, 203, 189, 0.6);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(249, 253, 251, 0.98)),
    var(--surface);
  box-shadow: 0 10px 26px rgba(13, 76, 67, 0.08);
}

.dashboard-panel .panel-header {
  min-height: 52px;
  background:
    linear-gradient(90deg, rgba(21, 147, 108, 0.12), rgba(11, 135, 147, 0.08)),
    #fbfefd;
}

.dashboard-panel .panel-header h2 {
  color: #133d35;
}

.dashboard-bars {
  gap: 15px;
}

.dashboard-bar-track {
  height: 12px;
  border-color: rgba(133, 192, 171, 0.62);
  background:
    repeating-linear-gradient(90deg, rgba(19, 104, 91, 0.12) 0 1px, transparent 1px 20px),
    linear-gradient(180deg, #f5fffa, #e7f5ef);
}

.dashboard-bar-track span {
  box-shadow: 0 0 12px color-mix(in srgb, var(--dashboard-tone, #15936c) 34%, transparent);
}

.dashboard-shell thead th {
  background: #eff8f4;
  color: #295147;
}

.panel-note {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.mini-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: #fbfcfe;
}

.mini-summary div {
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #fff;
}

.mini-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.mini-summary strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
}

.system-summary .panel {
  min-height: 168px;
}

.backup-info {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.backup-info div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-soft);
}

.backup-info span,
.backup-action p {
  color: var(--muted);
  font-size: 13px;
}

.backup-info strong {
  color: var(--text);
  font-size: 13px;
  text-align: right;
}

.storage-status {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
}

.storage-gauge {
  width: 126px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--surface) 0 58%, transparent 59%),
    conic-gradient(var(--storage-color) var(--storage-used), var(--line-soft) 0);
  border: 1px solid var(--line-soft);
}

.storage-gauge strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1.1;
}

.storage-gauge span {
  color: var(--muted);
  font-size: 12px;
}

.storage-details {
  display: grid;
  gap: 8px;
}

.storage-details div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-soft);
}

.storage-details span {
  color: var(--muted);
  font-size: 12px;
}

.storage-details strong {
  color: var(--text);
  font-size: 13px;
  text-align: right;
}

.backup-action {
  padding: 16px;
}

.compact-action {
  width: auto;
  min-width: 132px;
  margin: 16px 0 0;
  padding: 0 18px;
}

.backup-list-header {
  align-items: flex-start;
}

.backup-table-wrap table {
  min-width: 100%;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.success {
  background: var(--success-soft);
  color: var(--success);
}

.status-pill.neutral {
  background: var(--blue-soft);
  color: var(--blue);
}

.status-pill.warning {
  background: var(--accent-soft);
  color: var(--accent);
}

.status-pill.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.stat-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.stat-card {
  position: relative;
  min-height: 104px;
  overflow: hidden;
  padding: 17px 16px;
}

.stat-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary);
}

.stat-card:nth-child(2n)::before {
  background: var(--blue);
}

.stat-card:nth-child(3n)::before {
  background: var(--accent);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  margin-top: 12px;
  color: var(--text);
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: 0;
  word-break: break-word;
}

.panel {
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
}

.panel-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
}

.panel-header h2::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 99px;
  background: var(--primary);
}

.inline-header {
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}

.inline-header input {
  max-width: 240px;
}

.form-panel {
  padding-bottom: 16px;
  border-top: 3px solid var(--primary);
}

.form-panel .panel-header {
  background: #f7fcf4;
}

.inbound-register-panel {
  grid-column: 1 / -1;
  order: -1;
}

.inbound-register-panel .panel-header {
  background: #eef7f5;
}

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

.inbound-register-panel input[readonly] {
  background: #f6f8fb;
  color: var(--muted-strong);
}

.ocr-warning {
  margin: 10px 16px 0;
  padding: 9px 11px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
  font-weight: 700;
}

input.ocr-suspect-input {
  border-color: #f59e0b;
  background: #fffbeb;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.16);
}

form label {
  position: relative;
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 0 16px;
  color: var(--muted-strong);
  font-size: 13px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.checkbox-label input {
  width: 16px;
  min-height: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px;
}

.form-row label {
  padding: 0;
}

.file-drop-field {
  border: 1px dashed #9fb2c8;
  border-radius: 8px;
  background: #f8fbfc;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.file-drop-field::after {
  content: "点击选择 / 拖入文件";
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.file-drop-field.has-file::after {
  content: attr(data-file-name);
  color: var(--text);
  font-weight: 700;
}

.file-drop-field.drag-over {
  border-color: #0f766e;
  background: #edf8f5;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.file-drop-field input[type="file"] {
  min-height: auto;
  padding: 8px 0 0;
  border: 0;
  background: transparent;
}

.print-voucher + .print-voucher {
  margin-top: 8px;
}

.field-required-badge {
  position: absolute;
  top: 0;
  right: 16px;
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border: 1px solid #f4b8b0;
  border-radius: 4px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  pointer-events: none;
}

.form-row .field-required-badge,
.dialog-panel .field-required-badge,
.login-panel .field-required-badge,
.report-filter .field-required-badge {
  right: 0;
}

input,
select,
textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #aab7c7;
}

.search-select {
  position: relative;
}

.search-select-input {
  padding-right: 30px;
}

.search-select::after {
  content: "";
  position: absolute;
  top: 15px;
  right: 12px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
}

.native-select-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.search-select-list {
  position: absolute;
  z-index: 12;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.search-select-list button {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.search-select-list button:hover {
  background: var(--primary-soft);
}

.search-select-list button:last-child {
  border-bottom: 0;
}

.search-select-empty {
  padding: 9px 10px;
  color: var(--muted);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(24, 114, 102, 0.14);
}

input::placeholder {
  color: #98a2b3;
}

.ghost-btn,
.primary-btn,
.small-btn {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.ghost-btn {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted-strong);
}

.ghost-btn:hover {
  border-color: #b8c4d2;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.primary-btn {
  width: calc(100% - 32px);
  min-height: 38px;
  margin: 16px 16px 0;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(24, 114, 102, 0.18);
}

.primary-btn:hover {
  background: var(--primary-dark);
}

.form-ghost {
  width: calc(100% - 32px);
  margin: 10px 16px 0;
}

.voucher-preview {
  width: calc(100% - 32px);
  margin: 0 16px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-soft);
  overflow: hidden;
}

.voucher-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  padding: 10px;
}

.voucher-preview-card {
  position: relative;
  min-height: 128px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.voucher-preview-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.18);
}

.voucher-preview-card strong {
  display: block;
  padding: 7px 34px 6px 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.voucher-preview-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 1;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.92);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.voucher-preview-ocr {
  width: calc(100% - 16px);
  margin: 0 8px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  line-height: 28px;
}

.voucher-preview-ocr.active {
  border-color: rgba(22, 163, 74, 0.45);
  background: rgba(22, 163, 74, 0.1);
  color: var(--accent);
  font-weight: 700;
}

.voucher-preview-file {
  display: flex;
  align-items: center;
  min-height: 96px;
}

.voucher-preview-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  cursor: pointer;
  line-height: 24px;
  text-align: center;
}

.voucher-preview img {
  width: 100%;
  max-height: 220px;
  display: block;
  object-fit: contain;
  background: #fff;
}

.voucher-preview span {
  display: block;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
}

.ocr-text {
  width: calc(100% - 32px);
  min-height: 86px;
  margin: 10px 16px 0;
  padding: 8px 10px;
  line-height: 1.55;
  resize: vertical;
}

.small-btn {
  min-height: 30px;
  padding: 0 10px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
  white-space: nowrap;
}

.small-btn:hover {
  background: #d5ebe7;
}

.small-btn.secondary {
  background: var(--blue-soft);
  color: var(--blue);
}

.small-btn.secondary:hover {
  background: #d8e8fb;
}

.small-btn.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.small-btn.danger:hover {
  background: #ffdeda;
}

.small-btn.warning {
  background: #fff7ed;
  color: #9a3412;
}

.small-btn.warning:hover {
  background: #ffedd5;
}

.small-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 24, 40, 0.42);
}

.dialog-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.dialog-panel p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.dialog-panel label {
  padding: 0;
}

.purchase-change-panel {
  width: min(980px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.purchase-change-panel .form-row {
  padding: 0;
}

.purchase-change-panel .file-drop-field {
  margin-top: 0;
}

.purchase-change-files {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #dcebe4;
  border-radius: 8px;
  background: #f7fcfa;
  color: var(--muted-strong);
  font-size: 12px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.feedback-dialog {
  z-index: 1300;
}

.feedback-panel {
  width: min(400px, 100%);
  justify-items: start;
}

.feedback-panel h2 {
  font-size: 18px;
}

.feedback-panel p {
  margin: 0;
  white-space: pre-line;
  word-break: break-word;
}

.file-action {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.file-action:hover {
  background: #ffe7b8;
}

.file-action input {
  display: none;
}

.archive-link {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.archive-link:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.row-note {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.company-invoice {
  margin-bottom: 16px;
}

.invoice-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

.invoice-info-grid div {
  min-height: 68px;
  padding: 12px 16px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.invoice-info-grid div:nth-child(3n) {
  border-right: 0;
}

.invoice-info-grid dt {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
}

.invoice-info-grid dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
  word-break: break-word;
}

.invoice-copy-box {
  width: calc(100% - 32px);
  min-height: 128px;
  margin: 14px 16px 16px;
  padding: 10px 12px;
  border: 1px solid #cbe7bd;
  border-radius: 6px;
  background: #f7fcf4;
  color: var(--text);
  line-height: 1.65;
  resize: vertical;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  max-height: min(72vh, calc(100vh - 220px));
  overflow: auto;
  background: var(--surface);
}

.compact-table {
  max-height: min(52vh, calc(100vh - 280px));
}

.compact-table table {
  min-width: 100%;
}

.compact-table th,
.compact-table td {
  padding: 8px 10px;
}

.wide-table table {
  min-width: 100%;
}

.report-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.report-titlebar {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.report-titlebar h2 {
  font-size: 18px;
  font-weight: 700;
}

.report-title-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.report-filter {
  display: grid;
  grid-template-columns: repeat(6, minmax(132px, 1fr));
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: #fff;
}

.panel > .report-filter {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.report-filter label {
  margin: 0;
  padding: 0;
  gap: 4px;
  font-size: 12px;
}

.report-filter input,
.report-filter select {
  min-height: 32px;
  border-radius: 4px;
}

.report-filter .search-select-input {
  min-height: 32px;
}

.report-checkbox {
  min-height: 32px;
  align-self: end;
  padding: 0 4px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: #fbfcfe;
}

.report-reset-btn {
  min-height: 32px;
  align-self: end;
  padding: 0 12px;
}

.report-condition {
  min-height: 36px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.5;
}

.report-table-wrap {
  width: 100%;
  max-width: 100%;
  max-height: min(76vh, calc(100vh - 240px));
  overflow: auto;
  background: #fff;
}

.report-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.supplier-statement-table {
  min-width: max(1120px, 100%);
}

.purchase-statement-table {
  min-width: max(1980px, 100%);
}

.customer-finance-statement-table {
  min-width: max(1510px, 100%);
}

.customer-finance-statement-condition {
  min-width: max(1510px, 100%);
  border-right: 1px solid #9fb2c4;
  white-space: nowrap;
}

.receivable-summary-table {
  min-width: max(1320px, 100%);
}

.receivable-summary-condition {
  min-width: max(1320px, 100%);
  border-right: 1px solid #9fb2c4;
  white-space: nowrap;
}

.customer-finance-statement-table th:nth-child(1),
.customer-finance-statement-table td:nth-child(1) {
  min-width: 58px;
  text-align: center;
}

.customer-finance-statement-table th:nth-child(2),
.customer-finance-statement-table td:nth-child(2),
.customer-finance-statement-table th:nth-child(4),
.customer-finance-statement-table td:nth-child(4) {
  min-width: 140px;
}

.customer-finance-statement-table th:nth-child(3),
.customer-finance-statement-table td:nth-child(3) {
  min-width: 96px;
}

.customer-finance-statement-table th:nth-child(5),
.customer-finance-statement-table td:nth-child(5),
.customer-finance-statement-table th:nth-child(14),
.customer-finance-statement-table td:nth-child(14) {
  min-width: 170px;
}

.customer-finance-statement-table th:nth-child(n+6):nth-child(-n+13),
.customer-finance-statement-table td:nth-child(n+6):nth-child(-n+13) {
  min-width: 92px;
}

.report-table th,
.report-table td {
  height: 34px;
  padding: 7px 9px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: #fff;
  font-size: 12px;
}

.report-table th {
  top: 0;
  z-index: 2;
  background: #f1f5f9;
  color: var(--muted-strong);
  text-align: center;
}

.report-table th:first-child,
.report-table td:first-child {
  border-left: 1px solid var(--line-soft);
}

.supplier-statement-table th,
.supplier-statement-table td,
.purchase-statement-table th,
.purchase-statement-table td,
.customer-finance-statement-table th,
.customer-finance-statement-table td,
.receivable-summary-table th,
.receivable-summary-table td {
  border-color: #9fb2c4;
}

.supplier-statement-table th,
.purchase-statement-table th,
.customer-finance-statement-table th,
.receivable-summary-table th {
  border-top: 1px solid #9fb2c4;
}

.supplier-statement-table tbody tr:last-child td,
.purchase-statement-table tbody tr:last-child td,
.customer-finance-statement-table tbody tr:last-child td,
.receivable-summary-table tbody tr:last-child td {
  border-bottom: 1px solid #9fb2c4;
}

.report-table .numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.report-table tbody tr:hover td {
  background: #f8fbff;
}

.report-drill-row {
  cursor: pointer;
}

.report-drill-row:hover td:first-child {
  color: var(--blue);
}

.table-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.report-table .summary-total-row td {
  position: sticky;
  top: 34px;
  z-index: 1;
  background: #fff7e6;
  color: #3f2d12;
  font-weight: 700;
}

table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  white-space: nowrap;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted-strong);
  font-weight: 700;
  background: var(--surface-soft);
}

td {
  color: #273444;
}

tbody tr {
  transition: background 0.12s ease;
}

tbody tr:hover {
  background: #f7fbfb;
}

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

.summary-total-row td {
  background: #f7fcf4;
  color: var(--text);
  font-weight: 700;
}

.summary-detail-row td {
  background: #fbfcfe;
  color: var(--muted-strong);
  white-space: normal;
  line-height: 1.7;
}

.document-panel {
  width: min(960px, calc(100vw - 32px));
}

.document-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.document-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #fbfcfe;
}

.document-meta div {
  display: grid;
  gap: 4px;
}

.document-meta span {
  color: var(--muted);
  font-size: 12px;
}

.document-meta strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.document-vouchers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--line-soft);
  background: #fbfcfe;
}

.payment-ledger-panel {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.payment-ledger-wrap {
  max-height: min(58vh, 520px);
  margin-top: 10px;
  border: 1px solid #aeb9c6;
}

.payment-ledger-table {
  min-width: 820px;
  border-collapse: collapse;
}

.payment-ledger-table th,
.payment-ledger-table td {
  height: 32px;
  padding: 6px 10px;
  border: 1px solid #b7b7b7;
  background: #fff;
  font-size: 13px;
}

.payment-ledger-table th {
  background: #315d99;
  color: #fff;
  text-align: center;
  font-weight: 700;
}

.payment-ledger-table td:nth-child(1) {
  width: 112px;
  text-align: center;
  white-space: nowrap;
}

.payment-ledger-table td:nth-child(2) {
  width: 110px;
  text-align: center;
  white-space: nowrap;
}

.payment-ledger-table td:nth-child(3) {
  min-width: 280px;
  text-align: center;
}

.payment-ledger-table .numeric {
  width: 130px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.payment-ledger-current-row td {
  background: #fffdf2;
  font-weight: 700;
}

.payment-ledger-ending-row td {
  background: #e8f3df;
  font-weight: 700;
}

.payment-order-table .report-drill-row {
  cursor: pointer;
}

.voucher-thumb,
.voucher-file-card {
  min-width: 0;
  min-height: 132px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #fff;
}

.voucher-thumb {
  display: grid;
  gap: 8px;
  padding: 8px;
  text-align: left;
  cursor: zoom-in;
}

.voucher-thumb:hover {
  border-color: #9ec7e5;
  background: #f7fbff;
}

.voucher-thumb img {
  width: 100%;
  height: 92px;
  display: block;
  object-fit: contain;
  border-radius: 4px;
  background: #eef3f8;
}

.voucher-thumb span,
.voucher-file-card span {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.voucher-file-card {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 12px;
}

.image-preview-panel {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
}

.image-preview-body {
  display: grid;
  place-items: center;
  padding: 16px;
  background: #f6f8fb;
}

.image-preview-body img {
  max-width: 100%;
  max-height: calc(100vh - 148px);
  display: block;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.document-remark {
  min-height: 32px;
  margin-top: 10px;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.6;
}

.tag {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

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

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

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

.message {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1200;
  width: min(380px, calc(100vw - 40px));
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #badbd5;
  background: var(--primary-soft);
  color: var(--primary-dark);
  box-shadow: var(--shadow-md);
  line-height: 1.5;
  white-space: pre-line;
  word-break: break-word;
  pointer-events: none;
}

.message.error {
  border-color: #ffc9c1;
  background: var(--danger-soft);
  color: var(--danger);
}

.login-panel .primary-btn,
.primary-btn {
  background: linear-gradient(135deg, #15936c, #0b8793);
  box-shadow: 0 10px 22px rgba(11, 99, 79, 0.2);
}

.login-panel .primary-btn:hover,
.primary-btn:hover {
  background: linear-gradient(135deg, #0b634f, #086d76);
}

.nav button.active {
  background: linear-gradient(135deg, #15936c, #4e9a36);
  box-shadow: inset 0 0 0 1px rgba(223, 255, 241, 0.12), 0 8px 18px rgba(0, 24, 22, 0.16);
}

.nav button:hover,
.nav-group.active .nav-group-toggle,
.nav-group.expanded .nav-group-toggle {
  background: rgba(213, 255, 236, 0.1);
}

.brand {
  min-height: 122px;
  border-bottom-color: rgba(205, 255, 234, 0.14);
}

.brand-mark {
  border: 1px solid rgba(205, 255, 234, 0.24);
  box-shadow: 0 12px 26px rgba(0, 24, 22, 0.2);
}

.stat-card:not(.dashboard-stat-card),
.panel:not(.dashboard-panel),
.report-shell {
  border-color: rgba(166, 203, 189, 0.62);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(249, 253, 251, 0.98)),
    var(--surface);
  box-shadow: 0 10px 26px rgba(13, 76, 67, 0.075);
}

.stat-card:not(.dashboard-stat-card)::before {
  left: 0;
  right: 0;
  top: 0;
  bottom: auto;
  width: auto;
  height: 4px;
  background: linear-gradient(90deg, #15936c, #0b8793);
}

.stat-card:not(.dashboard-stat-card) strong {
  color: #123d34;
}

.panel-header,
.report-titlebar {
  min-height: 52px;
  background:
    linear-gradient(90deg, rgba(21, 147, 108, 0.12), rgba(11, 135, 147, 0.08)),
    #fbfefd;
  border-bottom-color: #dcebe4;
}

.panel-header h2 {
  color: #133d35;
}

.panel-header h2::before {
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, #21a87b, #0b8793);
}

.panel-note {
  color: #527066;
}

.panel-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
}

.inline-select select {
  min-height: 32px;
  min-width: 150px;
  padding: 5px 28px 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

.form-panel {
  border-top: 0;
}

.form-panel .panel-header,
.inbound-register-panel .panel-header {
  background:
    linear-gradient(90deg, rgba(21, 147, 108, 0.14), rgba(11, 135, 147, 0.08)),
    #f7fdf9;
}

input,
select,
textarea {
  border-color: #bfd6cc;
  background: #ffffff;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #88bda7;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #15936c;
  box-shadow: 0 0 0 3px rgba(21, 147, 108, 0.14);
}

input::placeholder {
  color: #91a39b;
}

.field-required-badge {
  border-color: #efb4aa;
}

.ghost-btn {
  border-color: #bfd6cc;
  background: #ffffff;
  color: #40584f;
}

.ghost-btn:hover {
  border-color: #15936c;
  background: #f1fbf6;
  color: #0b634f;
}

.small-btn {
  background: #e5f6ee;
  color: #0b634f;
}

.small-btn:hover {
  background: #d2efe2;
}

.small-btn.secondary,
.archive-link:hover {
  background: #e4f6f7;
  color: #0b8793;
}

.file-action {
  background: #fff4df;
}

.search-select-list {
  border-color: #bdd7cc;
  box-shadow: 0 14px 34px rgba(13, 76, 67, 0.12);
}

.search-select-list button:hover {
  background: #edf9f3;
}

.table-wrap,
.report-table-wrap {
  scrollbar-color: #90cfb7 #eef7f4;
}

th {
  background:
    linear-gradient(180deg, #f3fbf7, #edf8f4);
  color: #2b554b;
}

td {
  color: #243a34;
}

tbody tr:hover,
tbody tr:hover td,
.report-table tbody tr:hover td {
  background: #f3fbf7;
}

.summary-total-row td,
.report-table .summary-total-row td {
  background: #edf9f0;
  color: #123d34;
}

.summary-detail-row td {
  background: #f7fbf9;
}

.report-shell {
  border-radius: 8px;
}

.report-titlebar h2 {
  color: #123d34;
}

.report-filter {
  border-bottom-color: #dcebe4;
  background:
    linear-gradient(90deg, rgba(21, 147, 108, 0.07), rgba(11, 135, 147, 0.04)),
    #ffffff;
}

.report-filter label {
  color: #40584f;
  font-weight: 700;
}

.report-checkbox {
  border-color: #bdd7cc;
  background: #f7fcfa;
}

.report-condition {
  border-bottom-color: #dcebe4;
  background: #f7fcfa;
  color: #40584f;
}

.report-table th {
  background:
    linear-gradient(180deg, #eff9f4, #e5f3ee);
  color: #2b554b;
}

.report-table td {
  color: #253d36;
}

.table-link {
  color: #0b8793;
}

.report-drill-row:hover td:first-child {
  color: #0b8793;
}

.dialog-backdrop {
  background: rgba(5, 47, 43, 0.48);
}

.dialog-panel {
  border: 1px solid rgba(166, 203, 189, 0.68);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(249, 253, 251, 0.99)),
    var(--surface);
  box-shadow: 0 20px 52px rgba(5, 47, 43, 0.2);
}

.document-meta,
.document-vouchers,
.image-preview-body,
.mini-summary,
.backup-info div,
.storage-details div {
  border-color: #dcebe4;
  background: #f7fcfa;
}

.voucher-thumb,
.voucher-file-card {
  border-color: #d7e9e1;
}

.voucher-thumb:hover {
  border-color: #0b8793;
  background: #f1fbfa;
}

.message {
  border-color: #a9d9c7;
  background: #e8f7ef;
  color: #0b634f;
}

@media (max-width: 768px) {
  .message {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 22px;
}

.login-screen.hidden,
.hidden {
  display: none;
}

@media (max-width: 1280px) {
  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-side {
    grid-template-rows: auto;
  }

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

  .storage-panel {
    grid-column: 1 / -1;
  }

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

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

  .invoice-info-grid div:nth-child(3n) {
    border-right: 1px solid var(--line-soft);
  }

  .invoice-info-grid div:nth-child(2n) {
    border-right: 0;
  }

  .report-filter {
    grid-template-columns: repeat(3, minmax(132px, 1fr));
  }
}

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

@media (max-width: 1080px) {
  .two,
  .three {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  body {
    display: block;
  }

  .sidebar {
    width: 100%;
    height: auto;
    min-height: auto;
    position: static;
    padding: 14px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

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

  .brand {
    margin-bottom: 12px;
  }

  .nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  .nav button {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    display: flex;
    align-items: center;
    padding-top: 7px;
    padding-right: 10px;
    padding-bottom: 7px;
    line-height: 1.25;
  }

  .nav-group {
    display: contents;
  }

  .nav-group[hidden] {
    display: none;
  }

  .nav-sub {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
    border: 1px solid rgba(160, 235, 203, 0.18);
    border-radius: 8px;
    background: rgba(2, 43, 39, 0.18);
  }

  .nav-sub button {
    min-height: 34px;
    padding-left: 28px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 12px;
  }

  .nav-sub button::before {
    left: 12px;
  }

  .main {
    margin-left: 0;
    padding: 0 14px 18px;
  }

  .topbar {
    position: static;
    display: grid;
    margin: 0 -14px 16px;
    padding: 14px;
    min-height: 110px;
  }

  .topbar p {
    width: 100%;
    max-width: 100%;
    min-height: 0;
    display: block;
    padding-top: 6px;
    padding-bottom: 6px;
    overflow-wrap: anywhere;
  }

  .top-actions {
    justify-content: stretch;
  }

  .top-actions > * {
    flex: 1 1 auto;
  }

  .user-box {
    min-width: 180px;
  }

  .topbar-action-btn {
    flex: 1 1 104px;
  }

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

  .dashboard-hero {
    padding: 20px;
  }

  .dashboard-hero h2 {
    font-size: 26px;
  }

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

  .dashboard-eco-board {
    min-height: 104px;
  }

  .invoice-info-grid {
    grid-template-columns: 1fr;
  }

  .invoice-info-grid div,
  .invoice-info-grid div:nth-child(2n),
  .invoice-info-grid div:nth-child(3n) {
    border-right: 0;
  }

  .table-wrap,
  .report-table-wrap,
  .compact-table {
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-hero,
  .login-auth {
    min-height: auto;
  }

  .login-hero {
    padding: 28px 20px 30px;
  }

  .login-hero-copy h1 {
    font-size: 34px;
  }

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

  .login-auth {
    padding: 48px 20px 28px;
  }

  .login-language {
    top: 16px;
    right: 18px;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 21px;
  }

  .top-actions {
    gap: 8px;
  }

  .user-box {
    flex: 1 1 100%;
    min-width: 0;
  }

  .topbar-action-btn {
    min-width: 0;
    flex: 1 1 calc(50% - 4px);
  }

  .login-hero-copy h1 {
    font-size: 30px;
  }

  .login-lead {
    font-size: 15px;
  }

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

  .nav button {
    padding-left: 28px;
    font-size: 13px;
  }

  .nav button::before {
    left: 11px;
  }

  .nav-group-toggle::after {
    right: 11px;
  }

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

  .form-row {
    grid-template-columns: 1fr;
  }

  .report-filter {
    grid-template-columns: 1fr;
  }

  .document-meta {
    grid-template-columns: 1fr;
  }

  .storage-status {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .storage-details {
    width: 100%;
  }

  .dashboard-hero {
    padding: 18px 16px;
  }

  .dashboard-hero::after,
  .topbar::after,
  .dashboard-eco-board {
    display: none;
  }

  .dashboard-hero h2 {
    font-size: 24px;
  }

  .dashboard-bar-label {
    align-items: flex-start;
    display: grid;
  }

  .form-row.four-fields {
    grid-template-columns: 1fr;
  }

  .inline-header input {
    max-width: none;
  }

  .login-highlights {
    grid-template-columns: 1fr;
  }

  .login-captcha-row {
    grid-template-columns: 1fr;
  }

}
