:root {
  --ink: #0b172a;
  --ink-soft: #1d2b45;
  --muted: #69758c;
  --line: rgba(11, 23, 42, 0.11);
  --line-strong: rgba(11, 23, 42, 0.2);
  --paper: #f6f4ef;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-solid: #fffdf9;
  --teal: #13b8a6;
  --teal-dark: #0d8d80;
  --teal-soft: #d9f8f3;
  --coral: #ef6a4c;
  --coral-soft: #ffe4dc;
  --amber: #f3ae3d;
  --shadow: 0 24px 60px rgba(15, 29, 52, 0.11);
  --shadow-soft: 0 12px 30px rgba(15, 29, 52, 0.07);
  --radius: 22px;
  --radius-sm: 13px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  background-image: linear-gradient(rgba(11, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

a {
  color: inherit;
}

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

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

::selection {
  color: var(--ink);
  background: var(--teal-soft);
}

.page-glow {
  position: fixed;
  z-index: -2;
  width: 42rem;
  height: 42rem;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.38;
  pointer-events: none;
}

.page-glow-a {
  top: -18rem;
  right: -10rem;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.65), transparent 68%);
}

.page-glow-b {
  bottom: -24rem;
  left: -16rem;
  background: radial-gradient(circle, rgba(243, 174, 61, 0.34), transparent 68%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  margin: 18px auto 0;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: rgba(246, 244, 239, 0.76);
  box-shadow: 0 8px 30px rgba(15, 29, 52, 0.06);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  color: var(--teal-soft);
  background: var(--ink);
  border-radius: 13px;
  place-items: center;
  font-weight: 800;
  letter-spacing: -0.04em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 17px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a,
.nav-link {
  padding: 8px 14px;
  color: var(--muted);
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 160ms ease, background 160ms ease;
}

.site-nav a:hover,
.nav-link:hover {
  color: var(--ink);
  background: rgba(11, 23, 42, 0.05);
}

.site-nav .nav-admin {
  color: var(--ink);
  background: white;
  box-shadow: inset 0 0 0 1px var(--line);
}

.public-shell,
.admin-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 80px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(320px, 0.78fr);
  gap: clamp(40px, 7vw, 100px);
  align-items: center;
  min-height: 480px;
  padding: 38px 0 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.eyebrow::before {
  width: 20px;
  height: 2px;
  content: "";
  background: currentColor;
}

.hero h1 {
  max-width: 720px;
  margin: 20px 0 22px;
  font-size: clamp(46px, 7.2vw, 88px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.hero h1 span {
  position: relative;
  z-index: 0;
  color: var(--teal-dark);
}

.hero h1 span::after {
  position: absolute;
  right: 2%;
  bottom: 7%;
  left: 2%;
  z-index: -1;
  height: 17%;
  content: "";
  background: linear-gradient(90deg, rgba(243, 174, 61, 0.6), rgba(94, 234, 212, 0.7));
  border-radius: 4px;
  transform: rotate(-1.5deg);
}

.hero-copy > p {
  max-width: 580px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 20px;
  border: 0;
  border-radius: 12px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, color 150ms ease;
}

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

.button:active {
  transform: translateY(0);
}

.button:focus-visible,
.text-button:focus-visible,
.copy-button:focus-visible,
.icon-button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.site-nav a:focus-visible {
  outline: 3px solid rgba(19, 184, 166, 0.35);
  outline-offset: 2px;
}

.button-primary {
  color: #f5fffd;
  background: var(--ink);
  box-shadow: 0 12px 28px rgba(11, 23, 42, 0.22);
}

.button-primary:hover {
  background: #10213a;
  box-shadow: 0 15px 34px rgba(11, 23, 42, 0.27);
}

.button-secondary {
  color: var(--ink);
  background: var(--teal-soft);
  box-shadow: inset 0 0 0 1px rgba(19, 184, 166, 0.2);
}

.button-secondary:hover {
  background: #c9f4ed;
}

.button-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: inset 0 0 0 1px var(--line);
}

.button-ghost:hover {
  background: white;
}

.button-small {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 13px;
}

.button-wide {
  width: 100%;
}

.button:disabled {
  cursor: wait;
  opacity: 0.6;
  transform: none;
}

.hero-card {
  position: relative;
  padding: 24px;
  color: #f4fbfa;
  background: linear-gradient(145deg, #101f37 0%, #0b172a 70%);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-card::after {
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 250px;
  height: 250px;
  content: "";
  background: radial-gradient(circle, rgba(94, 234, 212, 0.3), transparent 68%);
}

.hero-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 18px;
  color: #b9c7d8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #5eead4;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(94, 234, 212, 0.12);
  animation: pulse 2.2s infinite;
}

.hero-card-tag {
  margin-left: auto;
  padding: 3px 9px;
  color: #5eead4;
  background: rgba(94, 234, 212, 0.09);
  border-radius: 99px;
  font-size: 10px;
}

.flow-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.flow-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 15px;
  transition: background 160ms ease;
}

.flow-list li:hover {
  background: rgba(255, 255, 255, 0.05);
}

.flow-list > li > span {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  color: #5eead4;
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-radius: 12px;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
}

.flow-list div {
  display: flex;
  flex-direction: column;
}

.flow-list strong {
  font-size: 14px;
}

.flow-list small {
  margin-top: 2px;
  color: #92a3b9;
  font-size: 12px;
}

.notice-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 10px 0 72px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.notice-strip > div {
  display: flex;
  flex-direction: column;
  padding: 20px 24px;
}

.notice-strip > div + div {
  border-left: 1px solid var(--line);
}

.notice-strip strong {
  font-size: 13px;
}

.notice-strip span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.section-block {
  margin-top: 76px;
}

.compact-section {
  margin-top: 58px;
}

.section-heading,
.panel-heading,
.dashboard-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h2,
.panel-heading h2 {
  margin: 7px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.section-heading > p,
.panel-heading > p,
.dashboard-heading > p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.required {
  color: var(--coral);
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.62fr);
  gap: 24px;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.form-panel {
  padding: clamp(24px, 4vw, 42px);
}

.form-aside {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 108px;
}

.edit-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -8px 0 24px;
  padding: 14px 16px;
  background: var(--teal-soft);
  border: 1px solid rgba(19, 184, 166, 0.24);
  border-radius: var(--radius-sm);
}

.edit-banner div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.edit-banner strong {
  font-size: 13px;
}

.edit-banner span {
  color: var(--teal-dark);
  font-family: var(--font-mono);
  font-size: 11px;
}

.text-button {
  padding: 4px;
  color: var(--teal-dark);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.field-group {
  margin: 0;
  padding: 0;
  border: 0;
}

.field-group legend {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
  padding: 5px;
  background: rgba(11, 23, 42, 0.045);
  border-radius: 13px;
}

.segmented label {
  position: relative;
  cursor: pointer;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: block;
  padding: 9px 14px;
  color: var(--muted);
  border-radius: 9px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.segmented input:checked + span {
  color: var(--ink);
  background: white;
  box-shadow: 0 4px 14px rgba(15, 29, 52, 0.09);
}

.segmented input:focus-visible + span {
  outline: 3px solid rgba(19, 184, 166, 0.3);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.field > span {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.field > span em {
  margin-left: 4px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.field input,
.field textarea,
.field select,
.filters input,
.filters select {
  width: 100%;
  padding: 12px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  outline: 0;
  transition: border 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.field input::placeholder,
.field textarea::placeholder,
.filters input::placeholder {
  color: #a3acbb;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.filters input:focus,
.filters select:focus {
  background: white;
  border-color: rgba(19, 184, 166, 0.68);
  box-shadow: 0 0 0 4px rgba(19, 184, 166, 0.11);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field-hint {
  align-self: flex-end;
  margin-top: -4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.turnstile-container {
  margin: 2px 0 16px;
}

.form-message {
  margin: 4px 0 16px;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}

.form-message-error {
  color: #9b321e;
  background: var(--coral-soft);
  border: 1px solid rgba(239, 106, 76, 0.22);
}

.form-message-success {
  color: #08645b;
  background: var(--teal-soft);
  border: 1px solid rgba(19, 184, 166, 0.24);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.form-actions-note {
  color: var(--muted);
  font-size: 11px;
}

.success-card {
  padding: 26px;
  background: linear-gradient(160deg, #ffffff 0%, #f0fffc 100%);
  border-color: rgba(19, 184, 166, 0.25);
  animation: rise 300ms ease both;
}

.success-icon {
  display: grid;
  width: 46px;
  height: 46px;
  color: white;
  background: var(--teal-dark);
  border-radius: 50%;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(13, 141, 128, 0.26);
}

.success-card h3 {
  margin: 16px 0 4px;
  font-size: 23px;
  letter-spacing: -0.03em;
}

.success-card > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
}

.secret-block {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.secret-block > span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.secret-block strong {
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: 13px;
}

.secret-block strong.mono {
  font-size: 12px;
}

.copy-button {
  padding: 4px 7px;
  color: var(--teal-dark);
  background: transparent;
  border: 1px solid rgba(19, 184, 166, 0.22);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
}

.success-card .button {
  margin-top: 14px;
}

.tiny-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.aside-card {
  padding: 26px;
}

.aside-card h3 {
  margin: 12px 0 8px;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.aside-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.check-list {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: 11px;
}

.check-list li::before {
  position: absolute;
  top: 0.2em;
  left: 0;
  color: var(--teal-dark);
  content: "✓";
  font-weight: 800;
}

.saved-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.saved-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 15px;
}

.saved-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.saved-card strong {
  font-family: var(--font-mono);
  font-size: 12px;
}

.saved-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.saved-card-actions {
  display: flex;
  gap: 8px;
}

.saved-card-actions .button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 11px;
}

.lookup-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 16px;
  align-items: end;
  padding: 26px;
}

.lookup-form .field {
  margin: 0;
}

.lookup-form .form-message {
  grid-column: 1 / -1;
  margin: 0;
}

.lookup-submit {
  min-height: 47px;
  white-space: nowrap;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 42px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.site-footer div {
  display: flex;
  flex-direction: column;
}

.site-footer strong {
  color: var(--ink);
  font-size: 12px;
}

.site-footer p {
  margin: 0;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  max-width: min(380px, calc(100vw - 48px));
  padding: 12px 16px;
  color: white;
  background: var(--ink);
  border-radius: 11px;
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 600;
  animation: rise 200ms ease both;
}

.toast.toast-error {
  background: #a43c27;
}

/* Admin */
.admin-page {
  min-height: 100vh;
}

.admin-header {
  position: static;
}

.header-actions,
.dashboard-actions,
.receive-actions,
.filters,
.pagination > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-shell {
  padding-top: 48px;
}

.login-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(40px, 8vw, 120px);
  align-items: center;
  min-height: 66vh;
}

.login-copy h1,
.dashboard-heading h1 {
  margin: 16px 0 14px;
  font-size: clamp(44px, 7vw, 74px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.dashboard-heading h1 {
  font-size: clamp(36px, 5vw, 58px);
}

.login-copy > p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.security-note {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 30px;
  padding: 14px 16px;
  background: rgba(243, 174, 61, 0.12);
  border: 1px solid rgba(243, 174, 61, 0.26);
  border-radius: 12px;
}

.security-note span {
  color: #8d5a09;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.security-note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.login-card {
  padding: 30px;
  background: white;
}

.login-card .field {
  margin-bottom: 16px;
}

.login-card .form-message {
  margin: 14px 0 0;
}

.dashboard-view {
  animation: rise 260ms ease both;
}

.dashboard-heading {
  align-items: flex-end;
  margin-bottom: 28px;
}

.dashboard-heading h1 {
  margin-bottom: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 1.35fr;
  gap: 12px;
  margin-bottom: 22px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  min-height: 136px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 17px;
  box-shadow: var(--shadow-soft);
}

.stat-card > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.stat-card > strong {
  margin-top: auto;
  font-size: 42px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.stat-card > small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.stat-card-dark {
  color: white;
  background: linear-gradient(145deg, #12243f, #0b172a);
  border-color: transparent;
}

.stat-card-dark > span,
.stat-card-dark > small {
  color: #95a6bc;
}

.value-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: auto 0 2px;
}

.value-chips span {
  padding: 4px 7px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.value-chips small {
  color: var(--muted);
  font-size: 10px;
}

.receive-panel,
.list-panel {
  padding: 26px;
  margin-top: 20px;
}

.panel-heading {
  align-items: flex-end;
  margin-bottom: 20px;
}

.panel-heading h2 {
  font-size: 26px;
}

.receive-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
}

.receive-input-area {
  padding: 18px;
  background: rgba(11, 23, 42, 0.035);
  border-radius: 15px;
}

.receive-input-area .field {
  margin-bottom: 12px;
}

.receive-input-area textarea {
  min-height: 122px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
}

.file-button {
  position: relative;
  overflow: hidden;
}

.file-button input {
  position: absolute;
  inset: 0;
  width: 100%;
  cursor: pointer;
  opacity: 0;
}

.ocr-status {
  margin: 10px 0 0;
  padding: 9px 11px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}

.receive-result-area {
  min-height: 210px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 30px;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 15px;
  text-align: center;
}

.empty-state strong {
  color: var(--ink-soft);
  font-size: 13px;
}

.empty-state p {
  margin: 4px 0 0;
  font-size: 11px;
}

.empty-icon {
  display: grid;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: 50%;
  place-items: center;
  font-size: 21px;
}

.match-results {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.match-group {
  padding: 13px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.match-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.match-group-head strong {
  font-family: var(--font-mono);
  font-size: 11px;
}

.match-group-head span {
  color: var(--muted);
  font-size: 10px;
}

.match-report {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.match-report:first-of-type {
  border-top: 0;
}

.match-report input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal-dark);
}

.match-report-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.match-report-copy strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-report-copy small {
  color: var(--muted);
  font-size: 10px;
}

.match-unmatched {
  padding: 11px 13px;
  color: #8d5a09;
  background: rgba(243, 174, 61, 0.12);
  border: 1px solid rgba(243, 174, 61, 0.22);
  border-radius: 10px;
  font-size: 11px;
}

.match-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.match-footer span {
  color: var(--muted);
  font-size: 10px;
}

.list-heading {
  gap: 20px;
}

.filters {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.filters input {
  width: 250px;
  padding: 9px 12px;
  font-size: 12px;
}

.filters select {
  width: 130px;
  padding: 9px 12px;
  font-size: 12px;
}

.table-wrap {
  position: relative;
  overflow-x: auto;
}

.reports-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.reports-table th {
  padding: 11px 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-align: left;
  white-space: nowrap;
}

.reports-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.reports-table tbody tr {
  cursor: pointer;
  transition: background 140ms ease;
}

.reports-table tbody tr:hover {
  background: rgba(19, 184, 166, 0.045);
}

.report-no {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.cell-stack {
  display: flex;
  max-width: 230px;
  flex-direction: column;
  gap: 2px;
}

.cell-stack strong {
  font-size: 12px;
}

.cell-stack small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-mono {
  font-family: var(--font-mono);
  font-size: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge::before {
  width: 5px;
  height: 5px;
  content: "";
  background: currentColor;
  border-radius: 50%;
}

.badge-submitted {
  color: #9a620c;
  background: #fff0cf;
}

.badge-received {
  color: #08645b;
  background: var(--teal-soft);
}

.table-empty {
  border: 0;
  border-radius: 0;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 16px;
  color: var(--muted);
  font-size: 11px;
}

.pagination .button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.detail-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(86vh, 900px);
  padding: 0;
  color: var(--ink);
  background: var(--panel-solid);
  border: 0;
  border-radius: 22px;
  box-shadow: 0 30px 100px rgba(11, 23, 42, 0.3);
  overflow: hidden;
}

.detail-dialog::backdrop {
  background: rgba(6, 14, 27, 0.56);
  backdrop-filter: blur(4px);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid var(--line);
}

.dialog-head h2 {
  margin: 6px 0 0;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--muted);
  background: rgba(11, 23, 42, 0.05);
  border: 0;
  border-radius: 50%;
  place-items: center;
  font-size: 22px;
  line-height: 1;
}

.dialog-body {
  max-height: calc(86vh - 92px);
  padding: 22px 26px 28px;
  overflow: auto;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  margin-bottom: 20px;
}

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

.detail-item.wide {
  grid-column: 1 / -1;
}

.detail-item span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-item strong,
.detail-item pre {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 600;
  white-space: pre-wrap;
}

.detail-item pre {
  padding: 10px;
  background: rgba(11, 23, 42, 0.035);
  border-radius: 8px;
  font-family: inherit;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.history-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(11, 23, 42, 0.03);
  border-radius: 8px;
  font-size: 10px;
}

.history-list strong {
  font-size: 10px;
}

.history-list span {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(94, 234, 212, 0.12); }
  50% { box-shadow: 0 0 0 9px rgba(94, 234, 212, 0.03); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    min-height: auto;
  }

  .hero-card {
    max-width: 560px;
  }

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

  .form-aside {
    position: static;
    grid-template-columns: 1fr 1fr;
  }

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

  .stat-card-values {
    grid-column: 1 / -1;
    min-height: 100px;
  }

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

  .login-view {
    grid-template-columns: 1fr;
    gap: 30px;
    min-height: auto;
  }

  .login-card {
    max-width: 460px;
  }
}

@media (max-width: 700px) {
  html {
    scroll-padding-top: 82px;
  }

  .site-header,
  .public-shell,
  .admin-shell,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .site-header {
    margin-top: 10px;
    padding: 9px 10px;
    border-radius: 14px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .brand-copy small {
    display: none;
  }

  .site-nav a {
    padding: 7px 9px;
    font-size: 12px;
  }

  .site-nav a:first-child {
    display: none;
  }

  .public-shell,
  .admin-shell {
    padding-top: 40px;
  }

  .hero {
    padding-top: 18px;
  }

  .hero h1 {
    font-size: clamp(43px, 13vw, 66px);
  }

  .hero-copy > p {
    font-size: 15px;
  }

  .notice-strip {
    grid-template-columns: 1fr;
    margin-bottom: 52px;
  }

  .notice-strip > div {
    padding: 14px 16px;
  }

  .notice-strip > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .section-heading,
  .panel-heading,
  .dashboard-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .section-heading > p,
  .panel-heading > p {
    text-align: left;
  }

  .form-panel,
  .receive-panel,
  .list-panel {
    padding: 20px 16px;
    border-radius: 17px;
  }

  .form-row,
  .field-row,
  .value-row,
  .lookup-form,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

  .lookup-form {
    padding: 20px 16px;
  }

  .form-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .dashboard-actions,
  .header-actions {
    flex-wrap: wrap;
  }

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

  .stat-card {
    min-height: 116px;
    padding: 16px;
  }

  .stat-card > strong {
    font-size: 34px;
  }

  .stat-card-values {
    grid-column: 1 / -1;
  }

  .list-heading {
    gap: 14px;
  }

  .filters {
    width: 100%;
    justify-content: stretch;
  }

  .filters input {
    width: 100%;
    flex: 1 1 100%;
  }

  .filters select {
    width: 100%;
  }

  .receive-actions {
    flex-wrap: wrap;
  }

  .reports-table th:nth-child(2),
  .reports-table td:nth-child(2),
  .reports-table th:nth-child(6),
  .reports-table td:nth-child(6) {
    display: none;
  }

  .reports-table td {
    padding: 12px 8px;
  }

  .detail-dialog {
    width: calc(100vw - 16px);
    max-height: 92vh;
  }

  .dialog-head,
  .dialog-body {
    padding-right: 18px;
    padding-left: 18px;
  }

  .match-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-width: none;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .site-nav a {
    padding: 6px 7px;
    font-size: 11px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .stat-card {
    min-height: 106px;
    padding: 14px;
  }

  .stat-card-dark {
    grid-column: 1 / -1;
  }

  .stat-card > strong {
    font-size: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
