:root {
  --canvas: #f6f1e7;
  --ink: #18261e;
  --muted: #5d675f;
  --panel: rgba(255, 252, 246, 0.78);
  --panel-strong: rgba(255, 252, 246, 0.94);
  --line: rgba(24, 38, 30, 0.085);
  --shadow: 0 22px 54px rgba(16, 27, 21, 0.11);
  --shadow-soft: 0 12px 30px rgba(16, 27, 21, 0.08);
  --brand: #174b33;
  --brand-2: #c95c2f;
  --brand-3: #dcb95b;
  --good: #1f7a46;
  --warn: #aa6a18;
  --bad: #b13a2b;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --sans: "Aptos", "Segoe UI", "Trebuchet MS", sans-serif;
  --serif: "Iowan Old Style", "Georgia", serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
}

body {
  position: relative;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.backdrop {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.7;
  pointer-events: none;
}

.backdrop-a {
  width: 30rem;
  height: 30rem;
  top: -8rem;
  right: -8rem;
  background: radial-gradient(circle, rgba(201, 92, 47, 0.28), rgba(201, 92, 47, 0));
}

.backdrop-b {
  width: 34rem;
  height: 34rem;
  bottom: -10rem;
  left: -10rem;
  background: radial-gradient(circle, rgba(23, 75, 51, 0.2), rgba(23, 75, 51, 0));
}

.auth-layout,
.portal-shell {
  position: relative;
  z-index: 1;
}

.auth-layout {
  padding-top: 5.4rem;
}

.landing-screen .auth-layout {
  padding-top: 0;
}

.public-brand {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 26;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  padding: 0.7rem 1rem 0.7rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.84);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.public-brand-copy {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.public-brand-copy strong,
.public-brand-copy small {
  overflow-wrap: anywhere;
}

.public-brand-copy strong {
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.public-brand-copy small {
  color: var(--muted);
}

.auth-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding: 4rem;
}

.auth-copy h1,
.hero h1,
.portal-header h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.45rem, 4.8vw, 4.15rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  overflow-wrap: anywhere;
}

.lede {
  max-width: 46rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.feature-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.feature-ribbon span,
.pill,
.eyebrow,
.brand-logo-frame {
  border-radius: 999px;
}

.feature-ribbon span {
  padding: 0.6rem 0.9rem;
  background: rgba(255, 252, 246, 0.6);
  border: 1px solid rgba(24, 38, 30, 0.08);
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 0.8rem;
  padding: 0.32rem 0.72rem;
  background: rgba(23, 75, 51, 0.08);
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-card,
.data-panel,
.metric-card,
.app-topbar,
.top-nav,
.sidebar,
.portal-header,
.final-pack-card {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: var(--shadow);
}

.auth-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
}

.auth-card.wide {
  max-width: 42rem;
}

.auth-card h2 {
  margin: 0 0 0.6rem;
  font-size: 2rem;
}

.login-stage {
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(0, 1.08fr) minmax(23rem, 0.72fr);
  gap: clamp(1.2rem, 3vw, 3rem);
  min-height: calc(100vh - 5.4rem);
  padding: clamp(1.4rem, 4vw, 4.5rem);
  overflow: hidden;
}

.login-stage::before,
.login-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-stage::before {
  z-index: -2;
  background-image: url("/static/landing-agritech-bg.png");
  background-size: cover;
  background-position: center;
  opacity: 0.88;
  transform: scale(1.035);
}

.login-stage::after {
  z-index: -1;
  background:
    radial-gradient(circle at 73% 40%, rgba(255, 248, 228, 0.88), rgba(255, 248, 228, 0.5) 28%, transparent 55%),
    linear-gradient(90deg, rgba(9, 34, 24, 0.74), rgba(20, 57, 39, 0.52) 42%, rgba(249, 239, 217, 0.48)),
    linear-gradient(180deg, rgba(255, 252, 244, 0.1), rgba(10, 36, 25, 0.28));
}

.login-visual,
.login-card {
  position: relative;
  z-index: 1;
}

.login-visual {
  min-height: min(35rem, calc(100vh - 8rem));
  align-self: stretch;
  display: grid;
  align-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.4rem, 3vw, 2.6rem);
  border-radius: clamp(1.8rem, 4vw, 3.4rem);
  background:
    radial-gradient(circle at 12% 15%, rgba(255, 238, 184, 0.2), transparent 34%),
    linear-gradient(140deg, rgba(7, 39, 27, 0.76), rgba(11, 62, 40, 0.44));
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff8e8;
  overflow: hidden;
  box-shadow: 0 34px 90px rgba(5, 20, 14, 0.28);
  backdrop-filter: blur(14px);
}

.login-visual::before {
  content: "";
  position: absolute;
  inset: auto -8rem -12rem 8%;
  height: 18rem;
  border-radius: 50%;
  border-top: 1px solid rgba(255, 248, 232, 0.16);
  transform: rotate(-5deg);
}

.login-symbol-orbit {
  position: absolute;
  top: -5.5rem;
  right: -5.5rem;
  width: min(25rem, 55vw);
  aspect-ratio: 1;
  border-radius: 999px;
  border: 1px solid rgba(244, 210, 122, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 70px rgba(244, 210, 122, 0.1);
}

.login-symbol-orbit span {
  position: absolute;
  inset: 16%;
  border-radius: inherit;
  border: 1px dashed rgba(255, 255, 255, 0.16);
}

.login-symbol {
  position: absolute;
  right: 4rem;
  top: 5rem;
  width: min(13rem, 34vw);
  max-width: none;
  opacity: 0.18;
  filter: drop-shadow(0 28px 58px rgba(0, 0, 0, 0.26));
  transform: rotate(-8deg);
}

.login-visual-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  max-width: 44rem;
  align-self: center;
}

.login-visual-logo {
  width: min(18rem, 56vw);
  max-height: 6.4rem;
  object-fit: contain;
  justify-self: start;
  padding: 0.75rem 1rem;
  border-radius: 1.6rem;
  background: rgba(255, 252, 246, 0.9);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.16);
}

.login-visual-copy h1 {
  margin: 0;
  max-width: 11ch;
  font-family: var(--serif);
  font-size: clamp(4rem, 8.4vw, 8rem);
  line-height: 0.82;
  letter-spacing: -0.075em;
  color: #fff8e8;
  text-wrap: balance;
  text-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.login-visual-copy .lede {
  max-width: 38rem;
  margin: 0;
  color: rgba(255, 248, 232, 0.84);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
}

.login-capability-rail {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0.55rem;
  border-radius: 1.3rem;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.login-capability-rail span {
  display: grid;
  min-height: 3rem;
  place-items: center;
  padding: 0.65rem;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.1);
  color: #fff8e8;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

.login-card {
  width: min(100%, 31.5rem);
  justify-self: end;
  padding: clamp(1.45rem, 3vw, 2.3rem);
  border-radius: clamp(1.6rem, 3vw, 2.4rem);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.98), rgba(255, 252, 246, 0.72) 58%, rgba(255, 252, 246, 0.58)),
    linear-gradient(145deg, rgba(255, 252, 246, 0.94), rgba(238, 223, 192, 0.58));
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: 0 34px 90px rgba(10, 33, 23, 0.24);
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  width: 15rem;
  height: 15rem;
  right: -7rem;
  top: -7rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(220, 185, 91, 0.3), transparent 66%);
  pointer-events: none;
}

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

.login-card-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 1.1rem;
}

.login-card-logo {
  width: min(17rem, 78vw);
  max-height: 5.6rem;
  object-fit: contain;
  padding: 0.55rem 0.85rem;
  border-radius: 1.45rem;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(24, 38, 30, 0.06);
}

.login-card h2 {
  margin-bottom: 0.45rem;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.2vw, 3.1rem);
  line-height: 0.9;
  letter-spacing: -0.055em;
  color: #102c20;
}

.login-card .muted {
  margin-top: 0;
  line-height: 1.65;
}

.login-card .stack-form {
  gap: 0.9rem;
  margin-top: 1.35rem;
}

.login-card .stack-form span {
  color: rgba(24, 38, 30, 0.68);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.login-card .stack-form input {
  min-height: 3.45rem;
  padding: 1rem 1.05rem;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(24, 38, 30, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.login-card .stack-form input:focus {
  background: #fffdf7;
  border-color: rgba(23, 75, 51, 0.34);
  box-shadow: 0 0 0 4px rgba(23, 75, 51, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.login-submit {
  width: 100%;
  min-height: 3.45rem;
  margin-top: 0.25rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 224, 148, 0.62);
  box-shadow: 0 18px 42px rgba(23, 75, 51, 0.28), 0 0 0 6px rgba(220, 185, 91, 0.12);
}

.login-security-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 1rem;
  padding: 0.55rem;
  border-radius: 1.1rem;
  background: rgba(23, 75, 51, 0.07);
  border: 1px solid rgba(23, 75, 51, 0.08);
}

.login-security-strip span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: rgba(24, 38, 30, 0.74);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.login-security-strip span::before {
  content: "";
  flex: 0 0 auto;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: var(--good);
  box-shadow: 0 0 0 4px rgba(31, 122, 70, 0.09);
}

.login-card .auth-links {
  justify-content: center;
  gap: 0.45rem;
}

.login-card .auth-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.56rem 0.78rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(24, 38, 30, 0.08);
  color: #174b33;
  font-size: 0.82rem;
  box-shadow: 0 8px 18px rgba(16, 27, 21, 0.05);
}

.muted {
  color: var(--muted);
}

.stack-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}

.stack-form label {
  display: grid;
  gap: 0.45rem;
}

.stack-form span {
  font-size: 0.9rem;
  color: var(--muted);
}

.stack-form input {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.stack-form input:focus,
.stack-form select:focus,
.stack-form textarea:focus,
.workspace-form input:focus,
.workspace-form select:focus,
.workspace-form textarea:focus {
  outline: 2px solid rgba(23, 75, 51, 0.24);
  border-color: rgba(23, 75, 51, 0.24);
}

.stack-form select,
.stack-form textarea,
.workspace-form input,
.workspace-form select,
.workspace-form textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.stack-form input[type="file"],
.workspace-form input[type="file"] {
  padding: 0.7rem 0.8rem;
}

.stack-form input[type="file"]::file-selector-button,
.workspace-form input[type="file"]::file-selector-button {
  margin-right: 0.8rem;
  padding: 0.55rem 0.85rem;
  border: 0;
  border-radius: 999px;
  background: rgba(23, 75, 51, 0.12);
  color: var(--brand);
  font-weight: 700;
  cursor: pointer;
}

textarea {
  resize: vertical;
  min-height: 6rem;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--brand), #2a7d56);
  color: #fffdf8;
  box-shadow: 0 18px 36px rgba(23, 75, 51, 0.22);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink);
  border: 1px solid var(--line);
}

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

.auth-links,
.sidebar-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.auth-links a,
.ghost-link {
  color: var(--brand);
  font-weight: 600;
}

.topbar-menu-button,
.shell-menu-button,
.shell-scrim,
.sidebar-close {
  display: none;
}

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
  min-height: 100vh;
  padding: 1rem clamp(1rem, 2.2vw, 2rem) 2rem;
}

.app-topbar,
.top-nav,
.content {
  width: min(100%, 1500px);
  margin-inline: auto;
}

.app-topbar {
  position: sticky;
  top: 0.8rem;
  z-index: 35;
  display: grid;
  grid-template-columns: minmax(15rem, 0.85fr) minmax(22rem, 1.2fr) minmax(13rem, auto) auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.72rem;
  border-radius: 1.45rem;
  box-shadow: var(--shadow-soft);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.topbar-brand p {
  display: inline-flex;
  margin: 0 0 0.18rem;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  background: rgba(23, 75, 51, 0.08);
  color: var(--brand);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar-brand h1 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.brand-logo-frame-app {
  width: 3.35rem;
  min-height: 3rem;
  padding: 0.45rem 0.68rem;
  border-radius: 1.05rem;
}

.brand-logo-app {
  max-height: 1.9rem;
}

.topbar-search {
  position: relative;
  min-width: 0;
  justify-self: stretch;
}

.topbar-search-field {
  min-height: 3.15rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem;
  border-radius: 999px;
  background:
    radial-gradient(circle at 12% 50%, rgba(220, 185, 91, 0.16), transparent 32%),
    rgba(255, 252, 246, 0.86);
  border: 1px solid rgba(24, 38, 30, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 14px 34px rgba(16, 27, 21, 0.08);
}

.topbar-search input {
  width: 100%;
  min-width: 0;
  min-height: 2.45rem;
  padding: 0.55rem 0.9rem 0.55rem 1rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.92rem;
}

.topbar-search input::placeholder {
  color: rgba(101, 113, 105, 0.76);
}

.topbar-search button {
  min-height: 2.45rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #143d2b, #24704f);
  color: #fffdf5;
  font-size: 0.82rem;
  font-weight: 800;
  text-shadow: 0 1px 1px rgba(5, 18, 12, 0.28);
  box-shadow: 0 14px 28px rgba(23, 75, 51, 0.24);
  cursor: pointer;
}

.topbar-search button:hover,
.topbar-search button:focus-visible {
  background: linear-gradient(135deg, #0f3021, #1e6245);
  color: #ffffff;
}

.topbar-search-results {
  position: absolute;
  z-index: 70;
  top: calc(100% + 0.55rem);
  left: 0;
  right: 0;
  max-height: min(28rem, calc(100vh - 9rem));
  overflow-y: auto;
  padding: 0.55rem;
  border-radius: 1.25rem;
  background: rgba(255, 252, 246, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 30px 80px rgba(16, 27, 21, 0.22);
  backdrop-filter: blur(18px);
  scrollbar-width: thin;
  scrollbar-color: rgba(24, 38, 30, 0.22) transparent;
}

.topbar-search-results[hidden] {
  display: none;
}

.live-search-list {
  display: grid;
  gap: 0.4rem;
}

.live-search-item {
  display: grid;
  gap: 0.16rem;
  padding: 0.72rem 0.78rem;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(24, 38, 30, 0.07);
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.live-search-item:hover,
.live-search-item:focus-visible {
  transform: translateY(-1px);
  background: rgba(23, 75, 51, 0.07);
  border-color: rgba(23, 75, 51, 0.18);
}

.live-search-item span {
  color: var(--brand);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.live-search-item strong {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.2;
}

.live-search-item small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.38;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.live-search-message {
  margin: 0;
  padding: 0.9rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.topbar-user {
  display: grid;
  gap: 0.03rem;
  min-width: 0;
  padding: 0.55rem 0.78rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(24, 38, 30, 0.07);
}

.topbar-user strong {
  font-size: 0.9rem;
}

.topbar-user span,
.topbar-user small {
  color: var(--muted);
  font-size: 0.76rem;
}

.topbar-user small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 16rem;
}

.topbar-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  min-width: 0;
}

.topbar-notification-menu {
  position: relative;
}

.topbar-notification-menu summary {
  min-height: 2.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.58rem 0.78rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.topbar-notification-menu summary::-webkit-details-marker {
  display: none;
}

.notification-dot {
  width: 0.68rem;
  height: 0.68rem;
  border-radius: 999px;
  background: rgba(24, 38, 30, 0.28);
  box-shadow: 0 0 0 4px rgba(24, 38, 30, 0.06);
}

.notification-dot.has-unread {
  background: var(--bad);
  box-shadow: 0 0 0 4px rgba(177, 58, 43, 0.12);
}

.notification-label {
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 800;
}

.notification-count {
  min-width: 1.35rem;
  min-height: 1.35rem;
  display: inline-grid;
  place-items: center;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--bad);
  color: #fff8e8;
  font-size: 0.72rem;
  font-weight: 900;
}

.notification-popover {
  position: absolute;
  z-index: 60;
  top: calc(100% + 0.65rem);
  right: 0;
  width: min(24rem, calc(100vw - 2rem));
  padding: 0.72rem;
  border-radius: 1.25rem;
  background: rgba(255, 252, 246, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 28px 70px rgba(16, 27, 21, 0.2);
  backdrop-filter: blur(18px);
}

.notification-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0.4rem 0.65rem;
}

.notification-popover-head a {
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 800;
}

.notification-preview-list {
  display: grid;
  gap: 0.48rem;
}

.notification-preview {
  display: grid;
  gap: 0.18rem;
  padding: 0.72rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(24, 38, 30, 0.07);
}

.notification-preview.unread {
  background: rgba(23, 75, 51, 0.08);
  border-color: rgba(23, 75, 51, 0.16);
}

.notification-preview span {
  color: var(--brand);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.notification-preview strong {
  font-size: 0.92rem;
}

.notification-preview small {
  color: var(--muted);
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.notification-empty {
  margin: 0;
  padding: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.topbar-client-link,
.topbar-profile-link {
  white-space: nowrap;
}

.topbar-signout,
.topbar-menu-button {
  min-height: 2.55rem;
  padding: 0.62rem 0.88rem;
  white-space: nowrap;
}

.top-nav {
  position: sticky;
  top: 5.35rem;
  z-index: 30;
  padding: 0.42rem;
  border-radius: 1.25rem;
  box-shadow: var(--shadow-soft);
}

.top-nav-track {
  display: flex;
  gap: 0.38rem;
  overflow-x: auto;
  padding-bottom: 0.05rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(24, 38, 30, 0.22) transparent;
}

.nav-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0.48rem 0.72rem;
  border-radius: 0.95rem;
  color: var(--muted);
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.nav-tab:hover,
.nav-tab.active {
  background: rgba(23, 75, 51, 0.08);
  color: var(--ink);
}

.nav-tab.active {
  box-shadow: inset 0 0 0 1px rgba(23, 75, 51, 0.08);
}

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

.nav-label {
  display: grid;
  gap: 0.02rem;
  min-width: 0;
}

.nav-label strong {
  font-size: 0.86rem;
  white-space: nowrap;
}

.nav-label small {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.1;
  white-space: nowrap;
  transition: max-height 0.18s ease, opacity 0.18s ease;
}

.nav-tab.active .nav-label small,
.nav-tab:hover .nav-label small,
.nav-tab:focus-visible .nav-label small {
  max-height: 1rem;
  opacity: 0.82;
}

.sidebar {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  border-radius: calc(var(--radius-lg) + 2px);
  padding: 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  box-shadow: var(--shadow-soft);
}

.brand-panel {
  display: flex;
  gap: 0.78rem;
  align-items: center;
  min-width: 0;
}

.brand-panel > div,
.nav-link > div,
.panel-header > div,
.portal-header > div {
  min-width: 0;
}

.brand-panel h1 {
  margin: 0;
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

.brand-logo-frame {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.25rem;
  min-height: 3.25rem;
  padding: 0.6rem 0.85rem;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(24, 38, 30, 0.08);
  box-shadow: 0 18px 40px rgba(16, 27, 21, 0.12);
}

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

.brand-logo-frame-public {
  width: 3.2rem;
  height: 3.2rem;
}

.brand-logo-public {
  max-height: 2rem;
}

.brand-logo-frame-sidebar {
  width: 3.8rem;
  min-height: 3.15rem;
  padding: 0.55rem 0.75rem;
  border-radius: 1.15rem;
}

.brand-logo-sidebar {
  max-height: 1.95rem;
}

.brand-mark {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1.2rem;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  color: white;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-logo-frame.brand-mark {
  width: 3.25rem;
  height: 3.25rem;
  padding: 0;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  border: 0;
  color: white;
  box-shadow: 0 18px 40px rgba(16, 27, 21, 0.16);
}

.user-card {
  display: grid;
  gap: 0.18rem;
  padding: 0.85rem;
  border-radius: 1.05rem;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(24, 38, 30, 0.08);
  min-width: 0;
}

.user-card strong {
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.user-card span,
.user-card small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.nav-stack {
  display: grid;
  gap: 0.28rem;
}

.nav-link {
  display: flex;
  gap: 0.72rem;
  align-items: center;
  padding: 0.68rem 0.72rem;
  border-radius: 1rem;
  color: var(--muted);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  min-width: 0;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(23, 75, 51, 0.08);
  color: var(--ink);
  transform: translateX(2px);
}

.nav-icon {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 0.72rem;
  display: grid;
  place-items: center;
  background: rgba(201, 92, 47, 0.12);
  color: var(--brand-2);
  font-size: 0.72rem;
  font-weight: 800;
}

.nav-link small {
  display: block;
  margin-top: 0.08rem;
  opacity: 0.78;
  overflow-wrap: anywhere;
}

.content {
  display: grid;
  gap: 1rem;
  padding: 0.45rem 0;
  min-width: 0;
}

.hero {
  padding: 1.45rem 1.6rem 0.15rem;
  min-width: 0;
}

.overview-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(21rem, 0.58fr);
  align-items: end;
  gap: 1rem;
}

.overview-search {
  display: grid;
  gap: 0.55rem;
  padding: 0.9rem;
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 92% 8%, rgba(220, 185, 91, 0.18), transparent 38%),
    rgba(255, 252, 246, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow-soft);
}

.overview-search label {
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.overview-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
}

.overview-search input {
  width: 100%;
  min-height: 3rem;
  padding: 0.82rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.overview-search p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.search-page-form {
  max-width: 48rem;
  margin-top: 1rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.85rem;
  padding: 0 1.6rem;
}

.metric-card {
  border-radius: var(--radius-md);
  padding: 0.95rem 1rem;
  min-width: 0;
  box-shadow: var(--shadow-soft);
}

.metric-card-link {
  display: block;
  position: relative;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.metric-card-link::after {
  content: "Open";
  position: absolute;
  right: 0.85rem;
  top: 0.85rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(23, 75, 51, 0.08);
  color: var(--brand);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-card-link:hover {
  transform: translateY(-2px);
  border-color: rgba(23, 75, 51, 0.22);
  box-shadow: 0 18px 38px rgba(16, 27, 21, 0.12);
}

.metric-card p,
.metric-card span {
  margin: 0;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin: 0.42rem 0 0.24rem;
  font-size: 1.7rem;
  line-height: 1;
  overflow-wrap: anywhere;
}

.tone-good strong { color: var(--good); }
.tone-warn strong { color: var(--warn); }
.tone-bad strong { color: var(--bad); }

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr));
  gap: 0.9rem;
  padding: 0 1.6rem 1.6rem;
  align-items: start;
}

.panel-grid.single {
  grid-template-columns: 1fr;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(520px, 1.28fr);
  gap: 0.9rem;
  padding: 0 1.6rem 1rem;
  align-items: start;
}

.workspace-stack {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
}

.backup-console-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 0.9rem;
  padding: 0 1.6rem 1rem;
  align-items: stretch;
}

.backup-command-panel {
  padding-bottom: 1rem;
}

.backup-command-form {
  display: grid;
  gap: 1rem;
  padding: 0 1.08rem;
}

.backup-command-form label {
  display: grid;
  gap: 0.45rem;
}

.backup-command-form label span {
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-settings-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
}

.backup-command-footer,
.backup-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.backup-command-footer p,
.backup-guardrail-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.danger-zone {
  background:
    radial-gradient(circle at 86% 14%, rgba(197, 110, 43, 0.14), transparent 36%),
    var(--panel);
}

.backup-guardrail-copy {
  display: grid;
  gap: 0.55rem;
  padding: 0.35rem 1.08rem 0;
}

.backup-guardrail-copy code {
  padding: 0.15rem 0.38rem;
  border-radius: 0.45rem;
  background: rgba(197, 110, 43, 0.1);
  color: var(--warn);
  font-weight: 800;
}

.backup-vault-section {
  padding-bottom: 1rem;
}

.backup-record-list {
  display: grid;
  gap: 0.82rem;
  padding: 0 1.08rem 1.08rem;
}

.backup-record-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 252, 246, 0.68);
}

.backup-record-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.backup-record-main h3,
.backup-record-main p {
  margin: 0;
}

.backup-record-main p {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.backup-record-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.72rem;
}

.backup-record-meta div {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.backup-record-meta small {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
}

.backup-record-meta strong {
  overflow-wrap: anywhere;
}

.restore-inline-form {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.restore-inline-form input {
  min-width: 13rem;
  padding: 0.78rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.danger-button {
  color: var(--warn);
  border-color: rgba(197, 110, 43, 0.28);
}

.command-strip {
  display: grid;
  gap: 1rem;
  padding: 0 1.6rem 1rem;
}

.order-command-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.95rem;
  padding: 1rem;
  background:
    radial-gradient(circle at 92% 12%, rgba(220, 185, 91, 0.22), transparent 36%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(242, 236, 222, 0.72));
  box-shadow: var(--shadow-soft);
}

.order-command-copy {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.order-command-copy span,
.order-modal-header span {
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.order-command-copy h2 {
  margin: 0;
  font-size: clamp(1.12rem, 1.8vw, 1.45rem);
}

.order-command-copy p,
.order-modal-header p,
.order-form-section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.order-command-button {
  flex: 0 0 auto;
}

.data-panel {
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-width: 0;
  box-shadow: var(--shadow-soft);
}

.form-panel,
.detail-panel {
  overflow: visible;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.08rem 0.62rem;
  min-width: 0;
}

.panel-header h2 {
  margin: 0;
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

.panel-header h3,
.panel-header span {
  overflow-wrap: anywhere;
}

.panel-header-tight {
  padding-top: 0;
}

.inline-action-form {
  margin: 0;
  display: inline-flex;
  justify-content: flex-end;
}

.table-action-button {
  min-height: 2.05rem;
  padding: 0.42rem 0.72rem;
}

.table-action-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.05rem;
  margin: 0;
  padding: 0.35rem 0.2rem;
  white-space: nowrap;
}

.table-action-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.38rem;
  min-width: 8.5rem;
}

.muted-note {
  color: var(--muted);
}

.panel-subtitle {
  margin: 0.25rem 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.panel-actions {
  padding: 0 1.08rem 1.08rem;
}

.workspace-form {
  display: grid;
  gap: 1rem;
  padding: 0 1.08rem 1.08rem;
}

.compact-form {
  padding-top: 0.2rem;
}

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

.form-grid label,
.item-row label,
.action-form label {
  display: grid;
  gap: 0.45rem;
}

.form-grid span,
.item-row span,
.action-form span,
.detail-grid small {
  color: var(--muted);
  font-size: 0.84rem;
}

.checkbox-card {
  display: flex !important;
  align-items: center;
  gap: 0.65rem;
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.68);
}

.checkbox-card input {
  width: auto !important;
  min-height: 0 !important;
}

.checkbox-card span {
  color: var(--ink);
  font-weight: 700;
}

.action-form input {
  width: 100%;
  min-height: 3rem;
  padding: 0.82rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.field-span-2 {
  grid-column: span 2;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.78rem;
  padding: 0 1.08rem 1.08rem;
}

.detail-grid strong {
  display: block;
  margin-top: 0.28rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.inner-divider {
  height: 1px;
  margin: 0 1.35rem 1.15rem;
  background: var(--line);
}

.toggle-row,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

.button-row form {
  margin: 0;
}

.toggle-row label {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.danger-button {
  color: var(--bad);
  border-color: rgba(177, 58, 43, 0.2);
  background: rgba(177, 58, 43, 0.08);
}

.is-hidden {
  display: none !important;
}

.lab-test-chip-row,
.lab-test-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.lab-test-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(23, 75, 51, 0.09);
  color: var(--brand);
  font-size: 0.86rem;
  font-weight: 800;
}

.lab-test-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lab-test-picker label {
  display: grid;
  gap: 0.45rem;
  min-height: 8rem;
  padding: 1rem;
  border: 1px solid rgba(24, 38, 30, 0.08);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 100% 0%, rgba(220, 185, 91, 0.18), transparent 34%),
    rgba(255, 255, 255, 0.68);
}

.lab-test-picker input {
  width: 1.05rem;
  height: 1.05rem;
}

.lab-test-picker span {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
}

.lab-test-picker small,
.lab-result-command p,
.lab-result-card p,
.lab-result-meta small {
  color: var(--muted);
  line-height: 1.45;
}

.lab-result-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.35rem 1.35rem;
}

.lab-result-command strong {
  display: block;
  margin-bottom: 0.25rem;
}

.lab-result-command p {
  margin: 0;
}

.lab-result-list {
  display: grid;
  gap: 0.8rem;
  padding: 0 1.35rem 1.35rem;
}

.lab-result-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 0.8fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid rgba(24, 38, 30, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.68);
}

.lab-result-type {
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lab-result-card h3 {
  margin: 0.2rem 0 0.1rem;
  font-size: 1.35rem;
}

.lab-result-meta {
  display: grid;
  gap: 0.4rem;
}

.lab-audit-panel {
  align-self: start;
}

.lab-audit-list {
  display: grid;
  gap: 0.8rem;
}

.lab-audit-card {
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.58);
  display: grid;
  gap: 0.55rem;
}

.lab-audit-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.lab-audit-card small,
.lab-audit-head span,
.lab-audit-diff span {
  color: var(--muted);
}

.lab-audit-diff {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.lab-audit-diff li {
  display: grid;
  grid-template-columns: minmax(8rem, 0.4fr) minmax(0, 1fr);
  gap: 0.75rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(27, 55, 41, 0.08);
}

.table-link {
  display: inline-flex;
  flex-direction: column;
  gap: 0.18rem;
  color: var(--brand);
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}

.table-link small {
  color: var(--muted);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.row-selected {
  background: rgba(23, 75, 51, 0.05);
}

.item-builder {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(23, 75, 51, 0.04);
  border: 1px solid rgba(23, 75, 51, 0.08);
}

.item-builder-head {
  align-items: end;
}

.item-builder-head > div {
  display: grid;
  gap: 0.25rem;
}

.item-row-stack {
  display: grid;
  gap: 0.75rem;
}

.item-row {
  display: grid;
  grid-template-columns: minmax(7rem, 0.5fr) minmax(0, 1.55fr) minmax(0, 0.7fr) minmax(0, 0.7fr);
  gap: 0.8rem;
  align-items: end;
  padding: 0.85rem;
  border: 1px solid rgba(24, 38, 30, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.64);
}

.item-row-meta {
  display: grid;
  gap: 0.45rem;
  align-content: end;
}

.item-row-meta strong {
  font-size: 0.92rem;
  color: var(--ink);
}

.logistics-command-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.logistics-command-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  min-height: 0;
  padding: 1.15rem;
}

.logistics-command-card .order-command-copy {
  gap: 0.42rem;
}

.logistics-command-card .order-command-copy h2 {
  font-size: clamp(1.28rem, 2vw, 1.65rem);
}

.logistics-command-card .order-command-copy p {
  max-width: 32rem;
}

.logistics-command-card .order-command-button {
  min-width: 9.5rem;
}

.logistics-command-card .inline-action-form {
  justify-content: flex-end;
}

.logistics-upload-row-stack {
  display: grid;
  gap: 0.85rem;
}

.logistics-upload-row {
  display: grid;
  grid-template-columns: minmax(7rem, 0.28fr) minmax(0, 1fr);
  gap: 0.9rem;
  padding: 0.95rem;
  border: 1px solid rgba(24, 38, 30, 0.08);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(250, 245, 234, 0.72)),
    rgba(255, 255, 255, 0.64);
}

.item-remove-button {
  min-height: 2.35rem;
  padding: 0.55rem 0.75rem;
}

.item-remove-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.lab-result-batch-section .order-form-section-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.lab-result-row-stack {
  display: grid;
  gap: 0.85rem;
}

.lab-result-row {
  display: grid;
  grid-template-columns: minmax(7rem, 0.28fr) minmax(0, 1fr);
  gap: 0.9rem;
  padding: 0.95rem;
  border: 1px solid rgba(24, 38, 30, 0.08);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(250, 245, 234, 0.72)),
    rgba(255, 255, 255, 0.64);
}

.lab-result-row-guidance {
  grid-column: 2;
  margin: -0.2rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.modal-open {
  overflow: hidden;
}

.order-modal {
  width: min(74rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.order-modal:not([open]) {
  display: none;
}

.order-modal::backdrop {
  background:
    radial-gradient(circle at 25% 15%, rgba(220, 185, 91, 0.2), transparent 30%),
    rgba(18, 28, 22, 0.58);
  backdrop-filter: blur(8px);
}

.order-modal-card {
  display: grid;
  max-height: calc(100dvh - 2rem);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 2rem;
  background: rgba(255, 251, 244, 0.98);
  box-shadow: 0 2rem 5rem rgba(24, 38, 30, 0.28);
}

.order-modal-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.5rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 85% 0%, rgba(201, 92, 47, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(245, 238, 224, 0.82));
}

.order-modal-header h2 {
  margin: 0.18rem 0 0.25rem;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.modal-close-button {
  min-height: 2.6rem;
  padding: 0.65rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-weight: 700;
}

.modal-close-button:hover {
  border-color: rgba(23, 75, 51, 0.22);
  background: rgba(255, 255, 255, 0.95);
}

.order-modal-notice {
  margin: 1rem 1.35rem 0;
}

.modal-order-form {
  gap: 0;
  padding: 0;
}

.order-modal-scroll {
  display: grid;
  gap: 1rem;
  max-height: calc(100dvh - 15rem);
  overflow: auto;
  padding: 1.15rem 1.35rem;
}

.order-form-section {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(24, 38, 30, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.62);
}

.order-form-section.item-builder {
  background: rgba(23, 75, 51, 0.045);
}

.order-form-section-head {
  display: grid;
  gap: 0.25rem;
}

.order-form-section-head h3 {
  margin: 0;
  font-size: 1.04rem;
}

.order-modal-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.35rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 251, 244, 0.94);
  backdrop-filter: blur(12px);
}

.action-stack {
  display: grid;
  gap: 0.85rem;
  padding: 0 1.35rem 1.35rem;
}

.action-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: end;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(24, 38, 30, 0.08);
  background: rgba(255, 255, 255, 0.58);
  min-width: 0;
}

.action-form p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.order-action-form {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 1rem;
}

.order-action-copy {
  min-width: 0;
}

.order-action-form strong {
  display: block;
  color: var(--bad);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.15;
}

.order-action-form.tone-good strong,
.order-action-form.tone-brand strong,
.order-action-form.tone-neutral strong {
  color: var(--brand);
}

.order-action-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 0.75rem;
  align-items: end;
  min-width: 0;
}

.order-action-controls .field-grow {
  min-width: 0;
}

.order-action-controls input {
  width: 100%;
}

.order-action-controls .ghost-button {
  min-width: max-content;
  white-space: nowrap;
}

.field-grow {
  min-width: 0;
}

.clickable-row {
  scroll-margin-top: 7rem;
}

.search-results-panel {
  overflow: visible;
}

.search-result-list {
  display: grid;
  gap: 0.72rem;
  padding: 0 1.08rem 1.08rem;
}

.search-result-card {
  display: grid;
  gap: 0.26rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(24, 38, 30, 0.08);
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.search-result-card:hover {
  transform: translateY(-1px);
  border-color: rgba(23, 75, 51, 0.22);
}

.search-result-card span {
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.search-result-card strong {
  font-size: 1.05rem;
}

.search-result-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.search-empty {
  padding: 1.25rem;
}

.manual-command,
.manual-filter-strip,
.manual-role-grid,
.manual-layout {
  padding-inline: 1.6rem;
}

.manual-command {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
  gap: 1rem;
  align-items: stretch;
}

.manual-search-panel,
.manual-stats-grid article,
.manual-role-card,
.manual-toc,
.manual-section-card {
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 92% 8%, rgba(220, 185, 91, 0.14), transparent 36%),
    rgba(255, 252, 246, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-soft);
}

.manual-search-panel {
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
}

.manual-search-panel label {
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.manual-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
}

.manual-search-row input {
  width: 100%;
  min-height: 3rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.manual-search-row button {
  min-height: 3rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fffdf5;
  font-weight: 800;
  cursor: pointer;
}

.manual-search-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.manual-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.manual-stats-grid article {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
}

.manual-stats-grid span {
  color: var(--muted);
  font-size: 0.78rem;
}

.manual-stats-grid strong {
  color: var(--brand);
  font-size: 1.8rem;
  line-height: 1;
}

.manual-filter-strip {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(24, 38, 30, 0.22) transparent;
}

.manual-filter-chip {
  flex: 0 0 auto;
  min-height: 2.55rem;
  padding: 0 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.72);
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.manual-filter-chip.active {
  background: var(--brand);
  color: #fffdf5;
  border-color: rgba(23, 75, 51, 0.3);
}

.manual-role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.85rem;
}

.manual-role-card {
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
}

.manual-role-card.active {
  border-color: rgba(23, 75, 51, 0.28);
  box-shadow: 0 18px 44px rgba(23, 75, 51, 0.12);
}

.manual-role-card span {
  color: var(--brand);
  font-weight: 900;
}

.manual-role-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.manual-role-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.manual-role-links a,
.manual-link-row a {
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  background: rgba(23, 75, 51, 0.08);
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
}

.manual-layout {
  display: grid;
  grid-template-columns: minmax(13rem, 0.25fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.manual-toc {
  position: sticky;
  top: 11rem;
  display: grid;
  gap: 0.25rem;
  max-height: calc(100vh - 12rem);
  overflow-y: auto;
  padding: 0.9rem;
}

.manual-toc strong {
  margin-bottom: 0.35rem;
  color: var(--ink);
}

.manual-toc a {
  padding: 0.55rem 0.65rem;
  border-radius: 0.8rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.manual-toc a:hover {
  background: rgba(23, 75, 51, 0.08);
  color: var(--brand);
}

.manual-section-stack {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.manual-section-card {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  scroll-margin-top: 9rem;
}

.manual-section-card[hidden],
.manual-toc a[hidden],
.manual-empty[hidden] {
  display: none;
}

.manual-section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.manual-section-head h2 {
  margin: 0.12rem 0 0.35rem;
  font-size: clamp(1.55rem, 2.6vw, 2.35rem);
  line-height: 0.98;
}

.manual-section-head p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.manual-role-pills,
.manual-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.manual-role-pills {
  justify-content: flex-end;
}

.manual-role-pills span {
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(201, 92, 47, 0.1);
  color: var(--brand-2);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.manual-screenshot {
  overflow: hidden;
  border-radius: 1.35rem;
  border: 1px solid rgba(24, 38, 30, 0.08);
  background: rgba(255, 255, 255, 0.62);
}

.manual-browser-bar {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid rgba(24, 38, 30, 0.08);
  background: rgba(255, 252, 246, 0.86);
}

.manual-browser-bar span {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  background: rgba(24, 38, 30, 0.18);
}

.manual-browser-bar strong {
  margin-left: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.manual-screen-frame {
  display: grid;
  grid-template-columns: minmax(8rem, 0.28fr) minmax(0, 1fr);
  min-height: 15rem;
  background:
    radial-gradient(circle at 82% 18%, rgba(220, 185, 91, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(243, 239, 227, 0.72), rgba(255, 252, 246, 0.96));
}

.manual-screen-sidebar {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  padding: 1rem;
  border-right: 1px solid rgba(24, 38, 30, 0.08);
}

.manual-screen-sidebar span {
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.manual-screen-sidebar i {
  display: block;
  height: 2.4rem;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(24, 38, 30, 0.06);
}

.manual-screen-body {
  display: grid;
  gap: 1rem;
  padding: 1.1rem;
}

.manual-screen-title {
  display: grid;
  gap: 0.35rem;
}

.manual-screen-title strong {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.manual-screen-title small {
  color: var(--muted);
  line-height: 1.45;
}

.manual-shot-marker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.manual-shot-marker-grid div {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  min-height: 3.3rem;
  padding: 0.65rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(24, 38, 30, 0.07);
}

.manual-shot-marker-grid b {
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--brand);
  color: #fffdf5;
  font-size: 0.8rem;
}

.manual-shot-marker-grid span {
  color: var(--ink);
  font-weight: 800;
}

.manual-step-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
  gap: 1rem;
}

.manual-steps,
.manual-faqs {
  min-width: 0;
}

.manual-steps h3,
.manual-faqs h3 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
}

.manual-steps ol {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.2rem;
}

.manual-steps li {
  color: var(--ink);
  line-height: 1.58;
}

.manual-faqs {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.manual-faqs details {
  padding: 0.75rem 0.85rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(24, 38, 30, 0.07);
}

.manual-faqs summary {
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.manual-faqs p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.manual-empty {
  padding: 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}

/* V2.2 calm workspace redesign: lighter chrome, tighter navigation, and less visual weight. */
body.app-shell {
  background:
    radial-gradient(circle at 100% 0%, rgba(220, 185, 91, 0.13), transparent 28rem),
    radial-gradient(circle at 0% 100%, rgba(23, 75, 51, 0.08), transparent 30rem),
    linear-gradient(180deg, #f7f3ea 0%, #f4efe4 100%);
}

.app-shell .backdrop {
  opacity: 0.34;
  filter: blur(22px);
}

.app-shell .shell {
  gap: 0.62rem;
  padding: 0.72rem clamp(0.85rem, 1.65vw, 1.45rem) 1.35rem;
}

.app-shell .app-topbar,
.app-shell .top-nav,
.app-shell .content {
  width: min(100%, 1640px);
}

.app-shell .app-topbar,
.app-shell .top-nav,
.app-shell .data-panel,
.app-shell .metric-card,
.app-shell .auth-card,
.app-shell .manual-search-panel,
.app-shell .manual-stats-grid article,
.app-shell .manual-role-card,
.app-shell .manual-toc,
.app-shell .manual-section-card,
.app-shell .order-command-card,
.app-shell .logistics-command-card,
.app-shell .backup-record-card {
  background: rgba(255, 253, 247, 0.9);
  border-color: rgba(33, 45, 38, 0.08);
  box-shadow: 0 10px 28px rgba(16, 27, 21, 0.055);
  backdrop-filter: blur(10px);
}

.app-shell .app-topbar {
  top: 0.55rem;
  grid-template-columns: minmax(12rem, 0.64fr) minmax(21rem, 1.1fr) minmax(8.5rem, auto) auto;
  gap: 0.55rem;
  padding: 0.48rem;
  border-radius: 1rem;
}

.app-shell .topbar-brand {
  gap: 0.58rem;
}

.app-shell .topbar-brand p {
  margin-bottom: 0.1rem;
  padding: 0;
  background: transparent;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
}

.app-shell .topbar-brand h1 {
  font-size: 0.96rem;
  font-weight: 850;
}

.app-shell .brand-logo-frame-app {
  width: 2.75rem;
  min-height: 2.55rem;
  padding: 0.38rem 0.5rem;
  border-radius: 0.78rem;
}

.app-shell .brand-logo-app {
  max-height: 1.62rem;
}

.app-shell .topbar-search-field {
  min-height: 2.45rem;
  padding: 0.18rem;
  border-radius: 0.78rem;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.app-shell .topbar-search input {
  min-height: 2.08rem;
  padding: 0.45rem 0.72rem;
  font-size: 0.84rem;
}

.app-shell .topbar-search button {
  min-height: 2.08rem;
  padding-inline: 0.78rem;
  border-radius: 0.66rem;
  font-size: 0.75rem;
  box-shadow: none;
}

.app-shell .topbar-user {
  gap: 0;
  padding: 0.42rem 0.58rem;
  border-radius: 0.78rem;
  background: rgba(246, 241, 231, 0.72);
}

.app-shell .topbar-user strong {
  font-size: 0.8rem;
}

.app-shell .topbar-user span {
  font-size: 0.68rem;
}

.app-shell .topbar-user small {
  display: none;
}

.app-shell .topbar-actions {
  gap: 0.35rem;
}

.app-shell .topbar-notification-menu summary,
.app-shell .topbar-signout,
.app-shell .topbar-menu-button,
.app-shell .ghost-link {
  min-height: 2.25rem;
  padding: 0.48rem 0.64rem;
  border-radius: 0.72rem;
  font-size: 0.8rem;
}

.app-shell .topbar-client-link {
  display: none;
}

.app-shell .notification-label {
  font-size: 0.78rem;
}

.app-shell .top-nav {
  top: 4.12rem;
  padding: 0.22rem;
  border-radius: 0.95rem;
  box-shadow: 0 8px 20px rgba(16, 27, 21, 0.045);
}

.app-shell .top-nav-track {
  gap: 0.18rem;
}

.app-shell .nav-tab {
  gap: 0.38rem;
  min-height: 2.18rem;
  padding: 0.32rem 0.52rem;
  border-radius: 0.72rem;
}

.app-shell .nav-icon {
  width: 1.64rem;
  height: 1.64rem;
  border-radius: 0.5rem;
  font-size: 0.62rem;
}

.app-shell .nav-label strong {
  font-size: 0.76rem;
  font-weight: 800;
}

.app-shell .nav-label small {
  display: none;
}

.app-shell .nav-tab.active {
  background: #173f2c;
  color: #fffdf5;
}

.app-shell .nav-tab.active .nav-icon {
  background: rgba(255, 255, 255, 0.16);
  color: #fffdf5;
}

.app-shell .nav-tab:hover:not(.active) {
  background: rgba(23, 75, 51, 0.07);
  transform: none;
}

.app-shell .content {
  gap: 0.72rem;
  padding-top: 0.2rem;
}

.app-shell .hero {
  padding: 1.05rem 1.25rem 0;
}

.app-shell .hero h1 {
  font-family: var(--sans);
  font-size: clamp(2rem, 3.25vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.app-shell .lede {
  max-width: 62rem;
  font-size: 0.98rem;
  line-height: 1.55;
}

.app-shell .eyebrow {
  margin-bottom: 0.55rem;
  padding: 0;
  background: transparent;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
}

.app-shell .card-grid,
.app-shell .panel-grid,
.app-shell .workspace-grid,
.app-shell .backup-console-grid,
.app-shell .command-strip,
.app-shell .manual-command,
.app-shell .manual-filter-strip,
.app-shell .manual-role-grid,
.app-shell .manual-layout {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.app-shell .card-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.65rem;
}

.app-shell .metric-card {
  min-height: 7rem;
  padding: 0.78rem 0.85rem;
  border-radius: 0.95rem;
}

.app-shell .metric-card p {
  font-size: 0.78rem;
}

.app-shell .metric-card strong {
  margin: 0.28rem 0 0.18rem;
  font-size: 1.45rem;
}

.app-shell .metric-card span {
  font-size: 0.82rem;
  line-height: 1.35;
}

.app-shell .metric-card-link::after {
  content: "->";
  top: 0.68rem;
  right: 0.7rem;
  padding: 0;
  background: transparent;
  font-size: 0.82rem;
}

.app-shell .metric-card-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(16, 27, 21, 0.075);
}

.app-shell .panel-grid {
  gap: 0.72rem;
  padding-bottom: 1.2rem;
}

.app-shell .workspace-grid {
  grid-template-columns: minmax(280px, 0.6fr) minmax(520px, 1.4fr);
  gap: 0.72rem;
}

.app-shell .workspace-stack,
.app-shell .command-strip {
  gap: 0.72rem;
}

.app-shell .data-panel {
  border-radius: 1rem;
}

.app-shell .panel-header {
  padding: 0.82rem 0.92rem 0.5rem;
}

.app-shell .panel-header h2 {
  font-size: 0.98rem;
}

.app-shell .table-shell {
  padding-bottom: 0.35rem;
}

.app-shell th {
  padding-top: 0.65rem;
  padding-bottom: 0.55rem;
  font-size: 0.64rem;
  letter-spacing: 0.1em;
}

.app-shell td {
  padding-top: 0.62rem;
  padding-bottom: 0.62rem;
  font-size: 0.82rem;
}

.app-shell .pill {
  padding: 0.24rem 0.48rem;
  font-size: 0.68rem;
}

.app-shell .command-strip .order-command-card,
.app-shell .logistics-command-card,
.app-shell .manual-section-card,
.app-shell .backup-record-card {
  border-radius: 1rem;
}

.app-shell input,
.app-shell select,
.app-shell textarea {
  border-color: rgba(33, 45, 38, 0.12);
}

.app-shell .primary-button,
.app-shell .ghost-button,
.app-shell .table-action-button,
.app-shell .order-command-button {
  border-radius: 0.72rem;
}

.table-shell {
  overflow-x: auto;
  padding: 0 0 0.55rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(24, 38, 30, 0.22) transparent;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 38rem;
}

table.compact {
  min-width: 34rem;
}

th,
td {
  padding: 0.72rem 1rem;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.88rem;
  overflow-wrap: break-word;
  word-break: normal;
}

th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  background: rgba(255, 252, 246, 0.82);
}

tbody tr {
  transition: background 0.14s ease;
}

tbody tr:hover {
  background: rgba(23, 75, 51, 0.035);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.26rem 0.56rem;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(24, 38, 30, 0.06);
  white-space: nowrap;
  overflow-wrap: normal;
}

.pill.tone-good {
  color: var(--good);
  background: rgba(31, 122, 70, 0.1);
}

.pill.tone-warn {
  color: var(--warn);
  background: rgba(170, 106, 24, 0.1);
}

.pill.tone-bad {
  color: var(--bad);
  background: rgba(177, 58, 43, 0.1);
}

.notice {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.notice-good {
  background: rgba(31, 122, 70, 0.11);
  color: var(--good);
}

.notice-bad {
  background: rgba(177, 58, 43, 0.1);
  color: var(--bad);
}

.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 1.5rem;
}

.portal-shell {
  padding: 2rem;
}

.portal-shell-client,
.portal-shell-validation {
  display: grid;
  gap: 1.15rem;
  max-width: 1200px;
  margin: 0 auto;
}

.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
}

.timeline-list {
  display: grid;
  gap: 0.9rem;
  padding: 0 1.35rem 1.35rem;
}

.timeline-item {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
}

.timeline-item strong,
.timeline-item span,
.timeline-item p {
  display: block;
  margin: 0;
}

.timeline-item span,
.timeline-item p {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.final-pack-card {
  margin: 0 1.35rem 1.35rem;
  padding: 1.2rem;
  border-radius: var(--radius-md);
}

.portal-layout,
.validation-layout {
  display: grid;
  gap: 1rem;
}

.portal-layout {
  grid-template-columns: minmax(280px, 0.88fr) minmax(0, 1.45fr);
  align-items: start;
}

.portal-rail,
.portal-main {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.portal-main {
  align-content: start;
}

.portal-rail .timeline-list {
  max-height: 54rem;
  overflow: auto;
  padding-right: 0.35rem;
}

.portal-card-list {
  display: grid;
  gap: 0.95rem;
  padding: 0 1.35rem 1.35rem;
}

.portal-card-list-compact {
  gap: 0.75rem;
}

.portal-entry-card {
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
}

.portal-entry-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.portal-entry-head strong,
.portal-entry-card strong {
  display: block;
  margin: 0;
  font-size: 1.05rem;
}

.portal-entry-head p,
.portal-entry-card p {
  margin: 0.22rem 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.portal-entry-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.portal-kv-grid,
.portal-kv-stack {
  margin: 0;
}

.portal-kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem 1rem;
}

.portal-kv-stack {
  display: grid;
  gap: 0;
}

.portal-kv-grid div,
.portal-kv-stack div {
  min-width: 0;
}

.portal-kv-grid dt,
.portal-kv-stack dt {
  margin: 0 0 0.2rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portal-kv-grid dd,
.portal-kv-stack dd {
  margin: 0;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.portal-kv-stack div + div {
  border-top: 1px solid var(--line);
  margin-top: 0.85rem;
  padding-top: 0.85rem;
}

.validation-layout {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: start;
}

.portal-shell-validation .portal-header h1 {
  font-size: clamp(2.4rem, 5.2vw, 4rem);
}

.portal-shell-validation .notice {
  margin-top: 0;
}

.portal-shell-validation .metric-card strong {
  font-size: clamp(2rem, 3.6vw, 3rem);
}

.portal-shell-validation .lede,
.portal-shell-client .lede {
  max-width: 60rem;
}

.landing-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  background: #efe6d4;
}

.landing-hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(135deg, #f4ebda, #d7c7aa);
}

.landing-hero-photo,
.landing-hero-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.landing-hero-photo {
  background-image: url("/static/landing-agritech-bg.png");
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
  filter: saturate(1.03) contrast(1.02);
  animation: heroBreath 14s ease-in-out infinite alternate;
}

.landing-hero-veil {
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 249, 235, 0.82), rgba(255, 249, 235, 0.48) 24%, rgba(255, 249, 235, 0.08) 44%, transparent 66%),
    linear-gradient(90deg, rgba(12, 35, 25, 0.14), rgba(255, 252, 244, 0.1) 38%, rgba(10, 31, 23, 0.24)),
    linear-gradient(180deg, rgba(248, 239, 220, 0.06), rgba(14, 45, 32, 0.3));
}

.landing-data-orbit,
.landing-seed-stream {
  position: absolute;
  pointer-events: none;
}

.landing-data-orbit {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(218, 176, 82, 0.15), 0 0 54px rgba(255, 224, 147, 0.16);
  opacity: 0.56;
  mix-blend-mode: screen;
}

.landing-data-orbit::before,
.landing-data-orbit::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: inherit;
  border: 1px dashed rgba(255, 255, 255, 0.24);
}

.landing-data-orbit::after {
  inset: 36%;
}

.landing-data-orbit-a {
  width: 24rem;
  height: 24rem;
  top: 9%;
  left: 34%;
  animation: slowSpin 28s linear infinite;
}

.landing-data-orbit-b {
  width: 18rem;
  height: 18rem;
  right: 11%;
  bottom: 14%;
  animation: slowSpin 34s linear infinite reverse;
}

.landing-seed-stream {
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.landing-seed-stream span,
.splash-seed-cloud span {
  position: absolute;
  width: 0.7rem;
  height: 1.05rem;
  border-radius: 70% 30% 65% 35%;
  background: linear-gradient(135deg, #f4d27a, #a66025 72%);
  box-shadow: 0 0 16px rgba(245, 199, 95, 0.38);
  transform: rotate(38deg);
}

.landing-seed-stream span:nth-child(1) { left: 17%; top: 14%; animation: seedDrift 9s ease-in-out infinite; }
.landing-seed-stream span:nth-child(2) { left: 43%; top: 18%; animation: seedDrift 10s 0.8s ease-in-out infinite; }
.landing-seed-stream span:nth-child(3) { right: 35%; top: 27%; animation: seedDrift 8s 1.4s ease-in-out infinite; }
.landing-seed-stream span:nth-child(4) { right: 23%; top: 18%; animation: seedDrift 11s 0.2s ease-in-out infinite; }
.landing-seed-stream span:nth-child(5) { right: 14%; top: 34%; animation: seedDrift 9s 2s ease-in-out infinite; }
.landing-seed-stream span:nth-child(6) { left: 31%; bottom: 24%; animation: seedDrift 12s 1s ease-in-out infinite; }
.landing-seed-stream span:nth-child(7) { right: 45%; bottom: 18%; animation: seedDrift 10s 1.7s ease-in-out infinite; }
.landing-seed-stream span:nth-child(8) { left: 11%; bottom: 16%; animation: seedDrift 13s 0.5s ease-in-out infinite; }
.landing-seed-stream span:nth-child(9) { right: 8%; bottom: 29%; animation: seedDrift 10s 2.4s ease-in-out infinite; }
.landing-seed-stream span:nth-child(10) { left: 52%; top: 9%; animation: seedDrift 14s 1.2s ease-in-out infinite; }
}

.landing-stage {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(15rem, 0.82fr) minmax(20rem, 1.05fr) minmax(15rem, 0.82fr);
  align-items: center;
  gap: clamp(1rem, 2.2vw, 1.8rem);
  padding: clamp(1.2rem, 3vw, 2.6rem);
}

.landing-copy {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: clamp(1rem, 2vw, 1.35rem);
  max-width: 44rem;
  justify-self: center;
  padding: clamp(1.35rem, 2.8vw, 2.4rem);
  border-radius: 2.8rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.54) 52%, rgba(255, 255, 255, 0.34)),
    linear-gradient(135deg, rgba(255, 252, 244, 0.72), rgba(240, 229, 204, 0.42));
  border: 1px solid rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(20px);
  box-shadow: 0 34px 90px rgba(15, 34, 24, 0.22);
}

.landing-brand {
  display: inline-flex;
  justify-content: center;
  width: 100%;
}

.brand-logo-frame-hero {
  width: min(19rem, 72vw);
  min-height: 7rem;
  padding: 0.9rem 1.25rem;
  border-radius: 2.25rem;
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.5) 62%),
    rgba(255, 252, 246, 0.72);
  box-shadow: 0 22px 54px rgba(24, 38, 30, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.62);
}

.landing-logo-full,
.brand-logo-hero {
  max-width: 100%;
  max-height: 6.2rem;
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(19, 43, 31, 0.1));
}

.brand-logo-frame-hero.brand-mark {
  width: 5rem;
  min-width: 5rem;
  height: 5rem;
  min-height: 5rem;
  border-radius: 1.6rem;
}

.landing-display {
  margin: 0;
  font-family: var(--serif);
  max-width: 10ch;
  font-size: clamp(4rem, 9.5vw, 8.4rem);
  line-height: 0.82;
  letter-spacing: -0.075em;
  color: #0d2b1f;
  text-wrap: balance;
  text-shadow: 0 18px 60px rgba(255, 245, 219, 0.62);
}

.landing-lede {
  margin: 0;
  max-width: 36rem;
  color: rgba(19, 39, 29, 0.82);
  font-size: clamp(1rem, 1.35vw, 1.16rem);
  line-height: 1.72;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

.landing-access {
  min-width: 13rem;
  padding: 1rem 2rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 225, 151, 0.72);
  box-shadow: 0 18px 42px rgba(15, 68, 45, 0.36), 0 0 0 6px rgba(255, 229, 168, 0.14);
}

.landing-proof-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  color: rgba(13, 43, 31, 0.72);
  font-size: 0.82rem;
}

.landing-proof-line span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.landing-proof-line span::before {
  content: "";
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: #c79535;
}

.landing-glass-card {
  position: relative;
  align-self: center;
  display: grid;
  gap: 0.8rem;
  max-width: 18rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 1.4rem;
  background: rgba(16, 43, 31, 0.46);
  color: #fff8e8;
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 70px rgba(7, 23, 16, 0.22);
  overflow: hidden;
}

.landing-glass-card > :not(.landing-symbol-watermark) {
  position: relative;
  z-index: 1;
}

.landing-glass-card-left {
  justify-self: end;
  margin-top: 12vh;
}

.landing-glass-card-right {
  justify-self: start;
  margin-bottom: 16vh;
}

.landing-glass-card strong {
  color: #fffdf7;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-glass-card p {
  margin: 0;
  color: rgba(255, 248, 232, 0.82);
  font-size: 0.86rem;
  line-height: 1.55;
}

.landing-symbol-watermark {
  position: absolute;
  right: -2.75rem;
  bottom: -3.5rem;
  width: 12rem;
  max-width: none;
  opacity: 0.12;
  filter: blur(0.1px) drop-shadow(0 14px 30px rgba(0, 0, 0, 0.16));
  transform: rotate(-8deg);
}

.landing-flow-line {
  display: grid;
  grid-template-columns: max-content 1fr max-content;
  align-items: center;
  gap: 0.6rem;
  color: rgba(255, 248, 232, 0.84);
  font-size: 0.78rem;
}

.landing-flow-line i {
  height: 1px;
  background: linear-gradient(90deg, rgba(244, 210, 122, 0.12), rgba(244, 210, 122, 0.76));
}

.landing-flow-line em {
  color: #f4d27a;
  font-style: normal;
}

.landing-qr-mark {
  width: 5.5rem;
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.35rem;
  padding: 0.45rem;
  border-radius: 1rem;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92) 50%, transparent 0) 0 0 / 0.8rem 0.8rem,
    rgba(255, 252, 246, 0.92);
}

.landing-qr-mark span {
  border-radius: 0.32rem;
  background: #123d2b;
}

.landing-feature-rail {
  position: absolute;
  z-index: 3;
  left: clamp(1rem, 4vw, 4rem);
  right: clamp(1rem, 4vw, 4rem);
  bottom: clamp(1rem, 3vw, 2.4rem);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0.55rem;
  border-radius: 1.4rem;
  background: rgba(7, 36, 25, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(16px);
  box-shadow: 0 22px 60px rgba(7, 23, 16, 0.22);
}

.landing-feature-rail div {
  display: grid;
  gap: 0.16rem;
  padding: 0.75rem 0.85rem;
  border-radius: 1rem;
  color: #fff8e8;
  background: rgba(255, 255, 255, 0.08);
}

.landing-feature-rail span {
  color: #f4d27a;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.landing-feature-rail strong {
  font-size: clamp(0.82rem, 1.1vw, 0.98rem);
}

.landing-splash {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 238, 190, 0.82), transparent 28%),
    radial-gradient(circle at 50% 60%, rgba(23, 75, 51, 0.16), transparent 36%),
    linear-gradient(145deg, rgba(255, 252, 244, 0.98), rgba(239, 224, 195, 0.98));
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.splash-active .landing-splash {
  opacity: 1;
  visibility: visible;
}

.landing-splash-core {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 1.15rem;
  justify-items: center;
  text-align: center;
}

.landing-splash-ring {
  position: relative;
  width: min(20rem, 68vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.48) 48%, rgba(255, 255, 255, 0) 72%);
  box-shadow: 0 28px 70px rgba(16, 27, 21, 0.18);
  animation: splashPulse 1.8s ease-in-out infinite;
}

.landing-splash-orbit {
  position: absolute;
  inset: 8%;
  border-radius: inherit;
  border: 1px solid rgba(202, 152, 57, 0.28);
  animation: slowSpin 3s linear infinite;
}

.landing-splash-orbit::before,
.landing-splash-orbit::after {
  content: "";
  position: absolute;
  inset: 13%;
  border-radius: inherit;
  border: 1px dashed rgba(23, 75, 51, 0.16);
}

.landing-splash-orbit::after {
  inset: 30%;
}

.brand-logo-frame-splash {
  width: min(12rem, 48vw);
  min-width: min(12rem, 48vw);
  min-height: min(12rem, 48vw);
  padding: 1.15rem;
  border-radius: 2.4rem;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.56) 66%),
    rgba(255, 252, 246, 0.9);
  box-shadow: 0 26px 62px rgba(19, 43, 31, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.landing-symbol-splash,
.brand-logo-splash {
  max-height: min(9rem, 36vw);
  object-fit: contain;
  filter: drop-shadow(0 16px 24px rgba(24, 64, 43, 0.16));
}

.brand-logo-frame-splash.brand-mark {
  width: 8rem;
  height: 8rem;
  padding: 0;
  border-radius: 2rem;
  font-size: 2rem;
}

.landing-splash-copy {
  display: grid;
  gap: 0.35rem;
  color: #123d2b;
}

.landing-splash-copy strong {
  font-family: var(--serif);
  max-width: 11ch;
  font-size: clamp(2.7rem, 7vw, 5rem);
  line-height: 0.88;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.landing-splash-copy span {
  color: rgba(18, 61, 43, 0.64);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.splash-field-line {
  position: absolute;
  left: -8%;
  right: -8%;
  height: 16rem;
  border-radius: 50%;
  border-top: 1px solid rgba(18, 61, 43, 0.08);
  transform: rotate(-8deg);
}

.splash-field-line-a {
  bottom: 10%;
}

.splash-field-line-b {
  bottom: 17%;
  transform: rotate(-5deg);
}

.splash-seed-cloud {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.splash-seed-cloud span:nth-child(1) { left: 12%; top: 32%; animation: seedOrbit 3s ease-in-out infinite; }
.splash-seed-cloud span:nth-child(2) { left: 18%; top: 52%; animation: seedOrbit 3s 0.25s ease-in-out infinite; }
.splash-seed-cloud span:nth-child(3) { left: 28%; top: 24%; animation: seedOrbit 3s 0.45s ease-in-out infinite; }
.splash-seed-cloud span:nth-child(4) { left: 34%; bottom: 22%; animation: seedOrbit 3s 0.7s ease-in-out infinite; }
.splash-seed-cloud span:nth-child(5) { left: 47%; top: 15%; animation: seedOrbit 3s 0.15s ease-in-out infinite; }
.splash-seed-cloud span:nth-child(6) { right: 43%; bottom: 17%; animation: seedOrbit 3s 0.5s ease-in-out infinite; }
.splash-seed-cloud span:nth-child(7) { right: 33%; top: 25%; animation: seedOrbit 3s 0.75s ease-in-out infinite; }
.splash-seed-cloud span:nth-child(8) { right: 26%; bottom: 25%; animation: seedOrbit 3s 0.1s ease-in-out infinite; }
.splash-seed-cloud span:nth-child(9) { right: 18%; top: 44%; animation: seedOrbit 3s 0.35s ease-in-out infinite; }
.splash-seed-cloud span:nth-child(10) { right: 12%; top: 27%; animation: seedOrbit 3s 0.6s ease-in-out infinite; }
.splash-seed-cloud span:nth-child(11) { left: 41%; top: 39%; animation: seedOrbit 3s 0.85s ease-in-out infinite; }
.splash-seed-cloud span:nth-child(12) { right: 42%; top: 49%; animation: seedOrbit 3s 0.95s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .landing-hero-photo,
  .landing-data-orbit,
  .landing-seed-stream span,
  .landing-splash-ring,
  .landing-splash-orbit,
  .splash-seed-cloud span {
    animation: none;
  }
}

.splash-active .landing-hero {
  filter: blur(12px);
  transform: scale(1.02);
  transition: filter 0.7s ease, transform 0.7s ease;
}

body:not(.splash-active) .landing-hero {
  filter: none;
  transform: none;
  transition: filter 0.7s ease, transform 0.7s ease;
}

@keyframes splashPulse {
  0%,
  100% {
    transform: scale(0.98);
    box-shadow: 0 28px 70px rgba(16, 27, 21, 0.18);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 34px 84px rgba(16, 27, 21, 0.24);
  }
}

@keyframes heroBreath {
  from {
    transform: scale(1.03) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.07) translate3d(-0.8rem, -0.35rem, 0);
  }
}

@keyframes slowSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes seedDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(38deg);
    opacity: 0.55;
  }
  50% {
    transform: translate3d(1.6rem, -1.1rem, 0) rotate(78deg);
    opacity: 0.95;
  }
}

@keyframes seedOrbit {
  0% {
    transform: translate3d(0, 0, 0) scale(0.75) rotate(24deg);
    opacity: 0;
  }
  32%,
  72% {
    opacity: 0.86;
  }
  100% {
    transform: translate3d(1.8rem, -1.2rem, 0) scale(1) rotate(92deg);
    opacity: 0;
  }
}

.compact th,
.compact td {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.timestamp {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.approval-table {
  min-width: 56rem;
}

.approval-table th:nth-child(1),
.approval-table td:nth-child(1) {
  min-width: 11rem;
}

.approval-table th:nth-child(2),
.approval-table td:nth-child(2) {
  min-width: 10rem;
}

.approval-table th:nth-child(6),
.approval-table td:nth-child(6) {
  min-width: 10.5rem;
}

.approval-type-link {
  overflow-wrap: normal;
  word-break: normal;
}

@media (max-width: 1100px) {
  .auth-stage {
    grid-template-columns: 1fr;
  }

  .login-stage {
    grid-template-columns: 1fr;
    min-height: calc(100vh - 5.4rem);
  }

  .login-card {
    justify-self: center;
  }

  .login-visual {
    min-height: auto;
  }

  .login-visual-copy h1 {
    max-width: 14ch;
  }

  .shell {
    grid-template-columns: 1fr;
    padding-top: 0.8rem;
  }

  .app-topbar {
    grid-template-columns: minmax(12rem, 1fr) auto;
  }

  .topbar-brand {
    order: 1;
  }

  .topbar-actions {
    order: 2;
  }

  .topbar-search {
    order: 3;
    grid-column: 1 / -1;
  }

  .topbar-user {
    display: none;
  }

  .top-nav {
    top: 5.15rem;
  }

  .overview-hero-grid {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .manual-command,
  .manual-layout,
  .manual-step-grid {
    grid-template-columns: 1fr;
  }

  .manual-toc {
    position: static;
    max-height: none;
  }

  .logistics-command-grid {
    grid-template-columns: 1fr;
  }

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

  .backup-console-grid {
    grid-template-columns: 1fr;
  }

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

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

  .lab-result-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

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

  .lab-result-row-guidance {
    grid-column: 1;
  }

  .lab-audit-diff li {
    grid-template-columns: 1fr;
  }

  .lab-result-command {
    align-items: stretch;
    flex-direction: column;
  }

  .shell-menu-icon {
    width: 1.1rem;
    height: 0.78rem;
    display: inline-block;
    position: relative;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
  }

  .shell-menu-icon::after {
    content: "";
    position: absolute;
    inset: 50% 0 auto;
    border-top: 2px solid currentColor;
    transform: translateY(-50%);
  }

  .landing-stage,
  .landing-hero {
    min-height: auto;
  }

  .landing-stage {
    align-items: center;
    padding-block: 7rem 2rem;
  }
}

@media (max-width: 720px) {
  .auth-layout {
    padding-top: 4.9rem;
  }

  .shell {
    gap: 0.75rem;
    padding: 0.75rem 0.75rem 1.25rem;
  }

  .app-topbar {
    top: 0.65rem;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    padding: 0.58rem;
    border-radius: 1.2rem;
  }

  .topbar-brand p {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
  }

  .topbar-brand h1 {
    font-size: 0.95rem;
  }

  .brand-logo-frame-app {
    width: 2.75rem;
    min-height: 2.55rem;
    padding: 0.38rem 0.55rem;
  }

  .topbar-client-link {
    display: none;
  }

  .topbar-search-field {
    min-height: 2.8rem;
  }

  .topbar-search input {
    min-height: 2.2rem;
    font-size: 0.84rem;
  }

  .topbar-search button {
    min-height: 2.2rem;
    padding-inline: 0.78rem;
    font-size: 0.76rem;
  }

  .topbar-search-results {
    max-height: min(22rem, calc(100vh - 10rem));
  }

  .topbar-notification-menu {
    display: none;
  }

  .topbar-menu-button {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.62);
    color: var(--ink);
  }

  .topbar-signout {
    min-height: 2.4rem;
    padding-inline: 0.72rem;
  }

  .top-nav {
    display: none;
    position: sticky;
    top: 4.75rem;
  }

  body.top-nav-open .top-nav {
    display: block;
  }

  .top-nav-track {
    flex-direction: column;
    overflow: visible;
  }

  .nav-tab {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-label small {
    max-height: 1rem;
    opacity: 0.78;
  }

  .auth-stage,
  .portal-shell,
  .shell,
  .hero,
  .card-grid,
  .command-strip,
  .panel-grid,
  .manual-command,
  .manual-filter-strip,
  .manual-role-grid,
  .manual-layout,
  .backup-console-grid,
  .workspace-grid {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .public-brand {
    top: 0.75rem;
    left: 0.75rem;
    max-width: calc(100vw - 1.5rem);
    padding-right: 0.85rem;
  }

  .auth-stage {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .login-stage {
    gap: 1rem;
    min-height: calc(100vh - 4.9rem);
    padding: 1rem;
  }

  .login-visual {
    padding: 1.25rem;
    border-radius: 1.7rem;
  }

  .login-visual-logo {
    width: min(13.5rem, 78vw);
    max-height: 5rem;
  }

  .login-visual-copy h1 {
    font-size: clamp(2.7rem, 16vw, 4rem);
    max-width: 11ch;
  }

  .login-symbol-orbit {
    width: 16rem;
    top: -6rem;
    right: -7rem;
  }

  .login-symbol {
    width: 8rem;
    right: 3.4rem;
    top: 5.7rem;
  }

  .login-capability-rail,
  .login-security-strip {
    grid-template-columns: 1fr;
  }

  .login-capability-rail span {
    min-height: 2.5rem;
  }

  .login-card {
    padding: 1.25rem;
    border-radius: 1.55rem;
  }

  .login-card-logo {
    width: min(14rem, 78vw);
  }

  .login-card .auth-links a {
    justify-content: center;
    width: 100%;
  }

  .backup-command-footer,
  .backup-actions,
  .restore-inline-form {
    align-items: stretch;
    flex-direction: column;
  }

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

  .restore-inline-form input,
  .backup-actions .ghost-button,
  .backup-command-footer .primary-button {
    width: 100%;
  }

  .auth-copy h1,
  .hero h1,
  .portal-header h1 {
    font-size: 2.3rem;
  }

  .overview-search {
    padding: 0.75rem;
  }

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

  .overview-search .primary-button,
  .search-page-form .primary-button {
    width: 100%;
  }

  .manual-search-row,
  .manual-section-head,
  .manual-screen-frame,
  .manual-shot-marker-grid {
    grid-template-columns: 1fr;
  }

  .manual-section-head {
    display: grid;
  }

  .manual-role-pills {
    justify-content: flex-start;
  }

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

  .manual-screen-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(24, 38, 30, 0.08);
  }

  th,
  td {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  table,
  table.compact {
    min-width: 34rem;
  }

  .approval-table {
    min-width: 48rem;
  }

  .portal-shell-client,
  .portal-shell-validation {
    gap: 1rem;
  }

  .portal-layout,
  .validation-layout {
    grid-template-columns: 1fr;
  }

  .portal-rail .timeline-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .portal-entry-head {
    flex-direction: column;
    align-items: start;
  }

  .portal-entry-actions {
    justify-content: flex-start;
  }

  .landing-stage {
    padding: 7rem 1rem 1.25rem;
  }

  .landing-copy {
    padding: 1.25rem;
    border-radius: 1.6rem;
  }

  .brand-logo-frame-hero {
    width: min(16rem, 82vw);
    min-width: 0;
    min-height: 5.8rem;
    padding: 0.75rem 1rem;
    border-radius: 1.6rem;
  }

  .landing-logo-full,
  .brand-logo-hero {
    max-height: 5.1rem;
  }

  .landing-access {
    width: 100%;
  }

  .landing-splash-ring {
    width: min(16rem, 78vw);
  }

  .brand-logo-frame-splash {
    width: min(9.2rem, 62vw);
    min-width: min(9.2rem, 62vw);
    min-height: min(9.2rem, 62vw);
    border-radius: 1.9rem;
  }

  .landing-symbol-splash,
  .brand-logo-splash {
    max-height: min(6.9rem, 48vw);
  }

  .landing-symbol-watermark {
    right: -2.4rem;
    bottom: -2.8rem;
    width: 9rem;
  }

  .order-command-card,
  .order-modal-header,
  .order-modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .logistics-command-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .order-command-button,
  .lab-result-command .primary-button,
  .inline-action-form,
  .inline-action-form .primary-button,
  .order-modal-actions .primary-button,
  .order-modal-actions .ghost-button {
    width: 100%;
  }

  .order-modal {
    width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
  }

  .order-modal-card {
    max-height: calc(100dvh - 1rem);
    border-radius: 1.35rem;
  }

  .order-modal-header {
    gap: 0.85rem;
    padding: 1.1rem;
  }

  .order-modal-scroll {
    max-height: calc(100dvh - 18rem);
    padding: 1rem;
  }

  .form-grid,
  .detail-grid,
  .lab-test-picker,
  .item-row,
  .logistics-upload-row,
  .lab-result-batch-section .order-form-section-head,
  .action-form,
  .order-action-controls {
    grid-template-columns: 1fr;
  }

  .field-span-2 {
    grid-column: span 1;
  }

  .order-action-controls .ghost-button {
    width: 100%;
  }
}

/* V2.3 Seed Operations Studio: dark command rail, flatter surfaces, calmer workspace. */
body.app-shell {
  --canvas: #f5f6ef;
  --panel: rgba(255, 255, 250, 0.96);
  --panel-strong: #fffefa;
  --line: rgba(32, 43, 36, 0.1);
  --shadow: 0 16px 42px rgba(21, 31, 25, 0.08);
  --shadow-soft: 0 8px 22px rgba(21, 31, 25, 0.055);
  background:
    linear-gradient(90deg, rgba(18, 58, 41, 0.045) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(18, 58, 41, 0.035) 0 1px, transparent 1px 100%),
    #f5f6ef;
  background-size: 42px 42px;
}

body.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 86% 8%, rgba(220, 185, 91, 0.14), transparent 24rem),
    radial-gradient(circle at 8% 92%, rgba(23, 75, 51, 0.09), transparent 22rem);
}

.app-shell .backdrop {
  display: none;
}

@media (min-width: 1021px) {
  .app-shell .shell {
    display: grid;
    grid-template-columns: 4.65rem minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0.82rem 1rem;
    min-height: 100vh;
    padding: 0.72rem 1rem 1.1rem 0.72rem;
  }

  .app-shell .top-nav {
    grid-column: 1;
    grid-row: 1 / span 2;
    position: sticky;
    top: 0.72rem;
    align-self: start;
    width: 4.65rem;
    height: calc(100vh - 1.44rem);
    padding: 0.5rem;
    border-radius: 1.22rem;
    background:
      radial-gradient(circle at 50% 0%, rgba(220, 185, 91, 0.2), transparent 8rem),
      linear-gradient(180deg, #123a29, #0d2a1e);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 70px rgba(13, 42, 30, 0.2);
    z-index: 45;
  }

  .app-shell .top-nav-track {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
    overflow-x: visible;
    overflow-y: auto;
    padding: 0;
    scrollbar-width: none;
  }

  .app-shell .top-nav-track::-webkit-scrollbar {
    display: none;
  }

  .app-shell .nav-tab {
    position: relative;
    width: 100%;
    min-height: 3.05rem;
    justify-content: center;
    padding: 0.42rem;
    border-radius: 0.9rem;
    color: rgba(255, 253, 245, 0.74);
  }

  .app-shell .nav-tab:hover,
  .app-shell .nav-tab.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fffdf5;
  }

  .app-shell .nav-tab.active {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  }

  .app-shell .nav-icon {
    width: 2.18rem;
    height: 2.18rem;
    border-radius: 0.72rem;
    background: rgba(255, 255, 255, 0.1);
    color: currentColor;
    font-size: 0.68rem;
    font-weight: 900;
  }

  .app-shell .nav-tab.active .nav-icon {
    background: #fffdf5;
    color: #123a29;
  }

  .app-shell .nav-label {
    position: absolute;
    left: calc(100% + 0.62rem);
    top: 50%;
    z-index: 85;
    min-width: 11.5rem;
    max-width: 16rem;
    padding: 0.58rem 0.68rem;
    border-radius: 0.85rem;
    background: #112d21;
    color: #fffdf5;
    box-shadow: 0 18px 42px rgba(13, 42, 30, 0.22);
    opacity: 0;
    pointer-events: none;
    transform: translate(-0.35rem, -50%);
    transition: opacity 0.14s ease, transform 0.14s ease;
  }

  .app-shell .nav-label::before {
    content: "";
    position: absolute;
    right: 100%;
    top: 50%;
    border: 0.42rem solid transparent;
    border-right-color: #112d21;
    transform: translateY(-50%);
  }

  .app-shell .nav-tab:hover .nav-label,
  .app-shell .nav-tab:focus-visible .nav-label {
    opacity: 1;
    transform: translate(0, -50%);
  }

  .app-shell .nav-label strong {
    font-size: 0.84rem;
  }

  .app-shell .nav-label small {
    display: block;
    max-height: none;
    margin-top: 0.16rem;
    color: rgba(255, 253, 245, 0.68);
    font-size: 0.72rem;
    opacity: 1;
  }

  .app-shell .app-topbar {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 0.72rem;
    display: grid;
    grid-template-columns: minmax(12rem, 0.65fr) minmax(24rem, 1.35fr) auto;
    align-items: center;
    gap: 0.72rem;
    width: 100%;
    padding: 0.58rem;
    border-radius: 1rem;
    background: rgba(255, 255, 250, 0.92);
    border: 1px solid rgba(32, 43, 36, 0.08);
    box-shadow: 0 12px 30px rgba(21, 31, 25, 0.07);
    backdrop-filter: blur(14px);
  }

  .app-shell .content {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
  }

  .app-shell .topbar-user {
    display: none;
  }
}

.app-shell .topbar-brand p {
  color: #657169;
}

.app-shell .topbar-brand h1 {
  color: #12221a;
}

.app-shell .brand-logo-frame-app {
  background: linear-gradient(135deg, #123a29, #b88728);
  border: 0;
  box-shadow: none;
}

.app-shell .topbar-search-field {
  min-height: 2.6rem;
  border-radius: 0.86rem;
  background: #f7f8f2;
  border: 1px solid rgba(32, 43, 36, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.app-shell .topbar-search button {
  min-height: 2.22rem;
  border-radius: 0.7rem;
  background: #123a29;
  box-shadow: none;
}

.app-shell .topbar-search button:hover,
.app-shell .topbar-search button:focus-visible {
  background: #0d2a1e;
}

.app-shell .topbar-search-results,
.app-shell .notification-popover {
  background: #fffefa;
  border: 1px solid rgba(32, 43, 36, 0.1);
  box-shadow: 0 24px 60px rgba(21, 31, 25, 0.13);
}

.app-shell .topbar-notification-menu summary,
.app-shell .topbar-signout,
.app-shell .topbar-menu-button,
.app-shell .ghost-link {
  border-radius: 0.72rem;
  background: transparent;
  border: 1px solid transparent;
  color: #26352d;
}

.app-shell .topbar-notification-menu summary:hover,
.app-shell .ghost-link:hover,
.app-shell .topbar-signout:hover {
  background: #f0f2ea;
  border-color: rgba(32, 43, 36, 0.08);
}

.app-shell .hero {
  padding: 1.18rem 1.35rem 0.2rem;
}

.app-shell .hero h1 {
  font-family: var(--sans);
  font-size: clamp(2rem, 3.15vw, 3.2rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.06em;
}

.app-shell .eyebrow {
  padding: 0;
  background: transparent;
  color: #76612b;
  letter-spacing: 0.18em;
}

.app-shell .lede {
  color: #607066;
}

.app-shell .card-grid,
.app-shell .panel-grid,
.app-shell .workspace-grid,
.app-shell .backup-console-grid,
.app-shell .command-strip,
.app-shell .manual-command,
.app-shell .manual-filter-strip,
.app-shell .manual-role-grid,
.app-shell .manual-layout {
  padding-left: 1.35rem;
  padding-right: 1.35rem;
}

.app-shell .metric-card,
.app-shell .data-panel,
.app-shell .manual-search-panel,
.app-shell .manual-stats-grid article,
.app-shell .manual-role-card,
.app-shell .manual-toc,
.app-shell .manual-section-card,
.app-shell .order-command-card,
.app-shell .logistics-command-card,
.app-shell .backup-record-card {
  background: #fffefa;
  border: 1px solid rgba(32, 43, 36, 0.09);
  box-shadow: 0 8px 22px rgba(21, 31, 25, 0.045);
  backdrop-filter: none;
}

.app-shell .card-grid {
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 0.72rem;
}

.app-shell .metric-card {
  border-radius: 0.9rem;
  min-height: 7rem;
  padding: 0.8rem 0.88rem;
}

.app-shell .metric-card p {
  font-size: 0.78rem;
  color: #657169;
}

.app-shell .metric-card strong {
  font-size: 1.52rem;
}

.app-shell .metric-card span {
  font-size: 0.82rem;
  line-height: 1.35;
}

.app-shell .metric-card-link::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  top: 0.88rem;
  right: 0.88rem;
  border-radius: 999px;
  background: #123a29;
}

.app-shell .data-panel {
  border-radius: 0.95rem;
}

.app-shell .panel-header {
  padding: 0.8rem 0.92rem 0.55rem;
  border-bottom: 1px solid rgba(32, 43, 36, 0.06);
}

.app-shell .panel-header h2 {
  font-size: 0.98rem;
  font-weight: 850;
}

.app-shell table {
  border-collapse: collapse;
}

.app-shell th {
  background: #f7f8f2;
  color: #6b756d;
  font-size: 0.64rem;
  letter-spacing: 0.12em;
}

.app-shell td {
  background: #fffefa;
  font-size: 0.82rem;
  border-top: 1px solid rgba(32, 43, 36, 0.06);
}

.app-shell .workspace-grid {
  gap: 0.82rem;
}

.app-shell .pill {
  border-radius: 0.55rem;
}

@media (max-width: 1020px) {
  .app-shell .top-nav {
    top: 5rem;
  }
}

/* V2.4 Command Deck: bottom module dock, open workspace canvas, no sidebar/top-nav crowding. */
body.app-shell {
  --canvas: #f2f0e7;
  --ink: #13231a;
  --muted: #647167;
  --panel: #fffdf7;
  --panel-strong: #fffefb;
  --line: rgba(32, 43, 36, 0.11);
  --brand: #123a29;
  --brand-2: #bd7a1e;
  --brand-3: #e0c36b;
  --shadow: 0 18px 55px rgba(19, 35, 26, 0.08);
  --shadow-soft: 0 8px 28px rgba(19, 35, 26, 0.055);
  background:
    radial-gradient(circle at 18% 12%, rgba(224, 195, 107, 0.18), transparent 26rem),
    radial-gradient(circle at 90% 18%, rgba(18, 58, 41, 0.09), transparent 28rem),
    linear-gradient(135deg, rgba(18, 58, 41, 0.035) 25%, transparent 25%) 0 0 / 44px 44px,
    #f2f0e7;
}

body.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 48%, rgba(18, 58, 41, 0.045) 48% 48.3%, transparent 48.3% 100%),
    linear-gradient(65deg, transparent 0 56%, rgba(189, 122, 30, 0.04) 56% 56.3%, transparent 56.3% 100%);
  background-size: 100% 100%, 100% 100%;
}

.app-shell .shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.92rem;
  min-height: 100vh;
  padding: 0.95rem clamp(1rem, 2.2vw, 2.3rem) 7.5rem;
}

.app-shell .app-topbar,
.app-shell .content {
  width: min(100%, 1680px);
  margin-inline: auto;
}

.app-shell .app-topbar {
  position: sticky;
  top: 0.8rem;
  z-index: 55;
  display: grid;
  grid-template-columns: minmax(12rem, 0.62fr) minmax(24rem, 1.25fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.68rem;
  border-radius: 1.35rem;
  background: rgba(255, 253, 247, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 24px 70px rgba(19, 35, 26, 0.1);
  backdrop-filter: blur(22px);
}

.app-shell .topbar-brand {
  gap: 0.68rem;
}

.app-shell .brand-logo-frame-app {
  width: 3.05rem;
  min-height: 3.05rem;
  padding: 0.46rem;
  border-radius: 1rem;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.28), transparent 30%),
    linear-gradient(135deg, #123a29, #b77a23);
}

.app-shell .topbar-brand p {
  margin: 0 0 0.06rem;
  padding: 0;
  background: transparent;
  color: var(--brand);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
}

.app-shell .topbar-brand h1 {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 900;
}

.app-shell .topbar-user,
.app-shell .topbar-client-link {
  display: none;
}

.app-shell .topbar-search-field {
  min-height: 2.82rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0.24rem;
  border-radius: 1rem;
  background: rgba(247, 248, 241, 0.95);
  border: 1px solid rgba(32, 43, 36, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.app-shell .topbar-search input {
  min-height: 2.34rem;
  font-size: 0.9rem;
}

.app-shell .topbar-search button {
  min-height: 2.34rem;
  padding-inline: 0.95rem;
  border-radius: 0.82rem;
  background: linear-gradient(135deg, #123a29, #1f6a49);
  color: #fffdf5;
  box-shadow: 0 10px 22px rgba(18, 58, 41, 0.18);
}

.app-shell .topbar-actions {
  gap: 0.42rem;
}

.app-shell .topbar-notification-menu summary,
.app-shell .ghost-link,
.app-shell .topbar-signout {
  min-height: 2.48rem;
  padding: 0.54rem 0.72rem;
  border-radius: 0.9rem;
  background: rgba(247, 248, 241, 0.76);
  border: 1px solid rgba(32, 43, 36, 0.08);
}

.app-shell .topbar-notification-menu summary:hover,
.app-shell .ghost-link:hover,
.app-shell .topbar-signout:hover {
  background: #fffefa;
  border-color: rgba(18, 58, 41, 0.16);
}

.app-shell .content {
  gap: 0.95rem;
}

@media (min-width: 1021px) {
  .app-shell .top-nav {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 1rem;
    top: auto;
    z-index: 80;
    width: min(calc(100vw - 2rem), 1180px);
    height: auto;
    transform: translateX(-50%);
    padding: 0.46rem;
    border-radius: 1.45rem;
    background:
      linear-gradient(135deg, rgba(255, 253, 247, 0.94), rgba(245, 246, 239, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow: 0 28px 70px rgba(19, 35, 26, 0.18);
    backdrop-filter: blur(24px);
  }

  .app-shell .top-nav-track {
    display: flex;
    flex-direction: row;
    gap: 0.32rem;
    overflow-x: auto;
    overflow-y: hidden;
    height: auto;
    padding: 0;
    scrollbar-width: none;
  }

  .app-shell .top-nav-track::-webkit-scrollbar {
    display: none;
  }

  .app-shell .nav-tab {
    position: relative;
    flex: 1 0 4.95rem;
    min-width: 4.95rem;
    max-width: 7.5rem;
    min-height: 3.55rem;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    align-content: center;
    gap: 0.22rem;
    padding: 0.42rem 0.46rem;
    border-radius: 1rem;
    color: #667368;
  }

  .app-shell .nav-tab:hover {
    background: rgba(18, 58, 41, 0.07);
    color: var(--ink);
    transform: translateY(-2px);
  }

  .app-shell .nav-tab.active {
    background:
      radial-gradient(circle at 50% 10%, rgba(224, 195, 107, 0.22), transparent 70%),
      #123a29;
    color: #fffdf5;
    box-shadow: 0 12px 28px rgba(18, 58, 41, 0.18);
  }

  .app-shell .nav-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.72rem;
    background: rgba(18, 58, 41, 0.08);
    color: currentColor;
    font-size: 0.62rem;
  }

  .app-shell .nav-tab.active .nav-icon {
    background: rgba(255, 255, 255, 0.16);
    color: #fffdf5;
  }

  .app-shell .nav-label {
    position: static;
    min-width: 0;
    max-width: 100%;
    padding: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    transform: none;
    color: currentColor;
    pointer-events: auto;
  }

  .app-shell .nav-label::before {
    display: none;
  }

  .app-shell .nav-label strong {
    max-width: 6.4rem;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.68rem;
    line-height: 1.05;
    text-align: center;
  }

  .app-shell .nav-label small {
    display: none;
  }
}

.app-shell .hero {
  position: relative;
  overflow: hidden;
  margin-inline: 1.35rem;
  padding: clamp(1.2rem, 2.6vw, 2rem);
  border-radius: 1.6rem;
  background:
    linear-gradient(120deg, rgba(255, 253, 247, 0.94), rgba(255, 253, 247, 0.62)),
    radial-gradient(circle at 94% 12%, rgba(224, 195, 107, 0.24), transparent 22rem);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 22px 70px rgba(19, 35, 26, 0.075);
}

.app-shell .hero::after {
  content: "";
  position: absolute;
  right: -3rem;
  bottom: -4rem;
  width: 16rem;
  height: 16rem;
  border-radius: 48% 52% 45% 55%;
  background:
    radial-gradient(circle at 35% 32%, rgba(255, 255, 255, 0.5), transparent 24%),
    linear-gradient(135deg, rgba(18, 58, 41, 0.12), rgba(189, 122, 30, 0.12));
  transform: rotate(-18deg);
}

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

.app-shell .hero h1 {
  font-family: var(--sans);
  font-size: clamp(2.25rem, 4vw, 4.35rem);
  font-weight: 950;
  letter-spacing: -0.075em;
}

.app-shell .lede {
  max-width: 58rem;
  font-size: 1rem;
  line-height: 1.58;
}

.app-shell .eyebrow {
  padding: 0.34rem 0.62rem;
  background: rgba(18, 58, 41, 0.08);
  color: var(--brand);
}

.app-shell .card-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.78rem;
  padding-top: 0.1rem;
}

.app-shell .metric-card {
  position: relative;
  overflow: hidden;
  min-height: 8.25rem;
  padding: 0.95rem;
  border-radius: 1.25rem;
  background:
    linear-gradient(180deg, #fffefa, #faf8ef);
  border: 1px solid rgba(32, 43, 36, 0.09);
  box-shadow: 0 14px 36px rgba(19, 35, 26, 0.065);
}

.app-shell .metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.28rem;
  background: linear-gradient(180deg, #123a29, #d4aa3d);
  opacity: 0.85;
}

.app-shell .metric-card p {
  color: #617066;
  font-size: 0.82rem;
}

.app-shell .metric-card strong {
  font-size: 1.9rem;
  letter-spacing: -0.04em;
}

.app-shell .metric-card span {
  max-width: 16rem;
  font-size: 0.84rem;
}

.app-shell .metric-card-link::after {
  content: "Open";
  width: auto;
  height: auto;
  top: 0.86rem;
  right: 0.86rem;
  padding: 0.24rem 0.48rem;
  border-radius: 999px;
  background: rgba(18, 58, 41, 0.08);
  color: var(--brand);
  font-size: 0.62rem;
}

.app-shell .panel-grid,
.app-shell .workspace-grid,
.app-shell .backup-console-grid,
.app-shell .manual-layout {
  gap: 0.95rem;
}

.app-shell .data-panel,
.app-shell .manual-section-card,
.app-shell .manual-search-panel,
.app-shell .manual-stats-grid article,
.app-shell .manual-role-card,
.app-shell .manual-toc,
.app-shell .order-command-card,
.app-shell .logistics-command-card,
.app-shell .backup-record-card {
  border-radius: 1.25rem;
  background: rgba(255, 253, 247, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 44px rgba(19, 35, 26, 0.06);
}

.app-shell .panel-header {
  padding: 0.95rem 1.05rem 0.66rem;
  border-bottom: 1px solid rgba(32, 43, 36, 0.075);
}

.app-shell .panel-header h2 {
  font-size: 1.02rem;
  font-weight: 900;
}

.app-shell th {
  background: #f2f4ec;
  color: #627166;
  font-size: 0.66rem;
}

.app-shell td {
  background: rgba(255, 253, 247, 0.92);
  font-size: 0.85rem;
}

.app-shell tbody tr:hover td {
  background: #f8f7ef;
}

@media (max-width: 1020px) {
  .app-shell .shell {
    padding-bottom: 1.5rem;
  }

  .app-shell .app-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .app-shell .topbar-search {
    grid-column: 1 / -1;
  }

  .app-shell .top-nav {
    position: sticky;
    top: 5rem;
    bottom: auto;
    transform: none;
  }
}

/* V2.5 Persona Workspace: role-first cockpit, focused work surface, no gimmick navigation. */
body.app-shell {
  --canvas: #f4f2ea;
  --ink: #12211a;
  --muted: #617069;
  --line: rgba(35, 48, 40, 0.1);
  --panel: #fffdf8;
  --panel-strong: #fffefa;
  --persona-accent: #174b33;
  --persona-accent-2: #c28a2c;
  --shadow: 0 18px 45px rgba(19, 33, 26, 0.075);
  --shadow-soft: 0 8px 24px rgba(19, 33, 26, 0.05);
  background:
    radial-gradient(circle at 88% 8%, rgba(194, 138, 44, 0.14), transparent 26rem),
    linear-gradient(180deg, #f7f5ee, #f0eee5);
  background-size: auto;
}

.persona-sales { --persona-accent: #235c7a; --persona-accent-2: #c28a2c; }
.persona-manager { --persona-accent: #174b33; --persona-accent-2: #9b6d2b; }
.persona-logistics { --persona-accent: #395f46; --persona-accent-2: #bd6c2a; }
.persona-packing { --persona-accent: #685332; --persona-accent-2: #c28a2c; }
.persona-laboratory,
.persona-lab_manager { --persona-accent: #2f5877; --persona-accent-2: #557d68; }
.persona-admin { --persona-accent: #253342; --persona-accent-2: #b8792a; }

body.app-shell::before {
  display: none;
}

.app-shell .backdrop {
  display: none;
}

@media (min-width: 1021px) {
  .app-shell .shell {
    display: grid;
    grid-template-columns: minmax(16rem, 18.5rem) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 1rem 1.15rem;
    min-height: 100vh;
    padding: 1rem 1.25rem 1.4rem 1rem;
  }

  .app-shell .app-topbar {
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: 1rem;
    z-index: 55;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    align-items: stretch;
    padding: 1rem;
    border-radius: 1.45rem;
    background:
      linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(250, 247, 238, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 18px 48px rgba(19, 33, 26, 0.09);
    backdrop-filter: blur(18px);
  }

  .app-shell .top-nav {
    grid-column: 1;
    grid-row: 2;
    position: sticky;
    top: 15.25rem;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    max-height: calc(100vh - 16.25rem);
    transform: none;
    padding: 0.9rem;
    border-radius: 1.45rem;
    background:
      radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.16), transparent 12rem),
      linear-gradient(180deg, var(--persona-accent), #10231a);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 48px rgba(19, 33, 26, 0.16);
    backdrop-filter: none;
    overflow: hidden;
  }

  .app-shell .content {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 100%;
    align-self: start;
  }
}

.app-shell .topbar-brand {
  gap: 0.72rem;
}

.app-shell .brand-logo-frame-app {
  width: 3.2rem;
  min-height: 3.2rem;
  padding: 0.45rem;
  border-radius: 1rem;
  background:
    radial-gradient(circle at 24% 16%, rgba(255, 255, 255, 0.25), transparent 34%),
    linear-gradient(135deg, var(--persona-accent), var(--persona-accent-2));
  box-shadow: 0 12px 30px rgba(19, 33, 26, 0.14);
}

.app-shell .topbar-brand p {
  margin: 0 0 0.08rem;
  padding: 0;
  background: transparent;
  color: var(--persona-accent);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
}

.app-shell .topbar-brand h1 {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.app-shell .topbar-user {
  display: grid;
  gap: 0.05rem;
  padding: 0.85rem;
  border-radius: 1rem;
  background:
    linear-gradient(135deg, rgba(23, 75, 51, 0.06), rgba(194, 138, 44, 0.08));
  border: 1px solid rgba(35, 48, 40, 0.08);
}

.app-shell .topbar-user strong {
  font-size: 0.95rem;
}

.app-shell .topbar-user span {
  color: var(--persona-accent);
  font-size: 0.78rem;
  font-weight: 850;
}

.app-shell .topbar-user small {
  display: block;
  max-width: 100%;
  font-size: 0.72rem;
}

.app-shell .topbar-search {
  width: 100%;
}

.app-shell .topbar-search-field {
  min-height: 2.72rem;
  border-radius: 0.95rem;
  background: #f6f5ee;
  border: 1px solid rgba(35, 48, 40, 0.1);
  box-shadow: none;
}

.app-shell .topbar-search input {
  min-height: 2.3rem;
  padding: 0.5rem 0.72rem;
  font-size: 0.84rem;
}

.app-shell .topbar-search button {
  min-height: 2.3rem;
  border-radius: 0.78rem;
  background: var(--persona-accent);
  color: #fffdf5;
  box-shadow: none;
}

.app-shell .topbar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.app-shell .topbar-actions form {
  margin: 0;
}

.app-shell .topbar-notification-menu,
.app-shell .topbar-actions form,
.app-shell .topbar-actions > a {
  min-width: 0;
}

.app-shell .topbar-notification-menu summary,
.app-shell .ghost-link,
.app-shell .topbar-signout {
  width: 100%;
  min-height: 2.42rem;
  justify-content: center;
  padding: 0.52rem 0.62rem;
  border-radius: 0.82rem;
  background: #fffefa;
  border: 1px solid rgba(35, 48, 40, 0.09);
  color: var(--ink);
  font-size: 0.78rem;
  box-shadow: none;
}

.app-shell .topbar-client-link {
  display: inline-flex;
}

.app-shell .top-nav-head {
  display: grid;
  gap: 0.1rem;
  padding: 0.15rem 0.2rem 0.8rem;
  color: #fffdf5;
}

.app-shell .top-nav-head span {
  color: rgba(255, 253, 245, 0.64);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.app-shell .top-nav-head strong {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.app-shell .top-nav-track {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.28rem;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 20rem);
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.app-shell .nav-tab {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 2.72rem;
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr);
  gap: 0.58rem;
  align-items: center;
  justify-items: stretch;
  padding: 0.44rem 0.52rem;
  border-radius: 0.9rem;
  color: rgba(255, 253, 245, 0.78);
}

.app-shell .nav-tab:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.09);
  color: #fffdf5;
}

.app-shell .nav-tab.active {
  background: #fffdf5;
  color: var(--persona-accent);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
}

.app-shell .nav-icon {
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.1);
  color: currentColor;
  font-size: 0.64rem;
}

.app-shell .nav-tab.active .nav-icon {
  background: rgba(23, 75, 51, 0.08);
  color: var(--persona-accent);
}

.app-shell .nav-label {
  position: static;
  min-width: 0;
  max-width: none;
  padding: 0;
  background: transparent;
  color: currentColor;
  box-shadow: none;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.app-shell .nav-label::before {
  display: none;
}

.app-shell .nav-label strong {
  max-width: none;
  text-align: left;
  font-size: 0.84rem;
  line-height: 1.1;
}

.app-shell .nav-label small {
  display: block;
  max-height: none;
  margin-top: 0.08rem;
  color: currentColor;
  font-size: 0.68rem;
  line-height: 1.1;
  opacity: 0.62;
}

.app-shell .hero {
  margin: 0;
  padding: 1.4rem 1.55rem 0.45rem;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.app-shell .hero::after {
  display: none;
}

.app-shell .hero h1 {
  font-family: var(--sans);
  font-size: clamp(2.25rem, 4.4vw, 4.8rem);
  font-weight: 950;
  letter-spacing: -0.08em;
}

.app-shell .eyebrow {
  margin-bottom: 0.6rem;
  padding: 0.28rem 0.58rem;
  background: rgba(23, 75, 51, 0.08);
  color: var(--persona-accent);
}

.app-shell .lede {
  max-width: 64rem;
  color: #66746a;
}

.app-shell .card-grid,
.app-shell .panel-grid,
.app-shell .workspace-grid,
.app-shell .backup-console-grid,
.app-shell .command-strip,
.app-shell .manual-command,
.app-shell .manual-filter-strip,
.app-shell .manual-role-grid,
.app-shell .manual-layout {
  padding-left: 1.55rem;
  padding-right: 1.55rem;
}

.app-shell .metric-card,
.app-shell .data-panel,
.app-shell .manual-section-card,
.app-shell .manual-search-panel,
.app-shell .manual-stats-grid article,
.app-shell .manual-role-card,
.app-shell .manual-toc,
.app-shell .order-command-card,
.app-shell .logistics-command-card,
.app-shell .backup-record-card {
  background: #fffefa;
  border: 1px solid rgba(35, 48, 40, 0.09);
  box-shadow: 0 12px 32px rgba(19, 33, 26, 0.055);
  backdrop-filter: none;
}

.app-shell .metric-card {
  min-height: 7.6rem;
  border-radius: 1.05rem;
}

.app-shell .metric-card::before {
  background: var(--persona-accent);
}

.app-shell .metric-card-link::after {
  background: rgba(23, 75, 51, 0.08);
  color: var(--persona-accent);
}

.app-shell .data-panel {
  border-radius: 1.05rem;
}

.app-shell .panel-header {
  padding: 0.92rem 1rem 0.66rem;
  background: linear-gradient(180deg, #fffefa, #faf8f0);
}

.app-shell th {
  background: #f3f3eb;
}

.app-shell td {
  background: #fffefa;
}

@media (max-width: 1020px) {
  .app-shell .shell {
    display: grid;
    grid-template-columns: 1fr;
    padding: 0.75rem 0.75rem 1.25rem;
  }

  .app-shell .app-topbar {
    position: sticky;
    top: 0.65rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.58rem;
  }

  .app-shell .topbar-search {
    grid-column: 1 / -1;
  }

  .app-shell .topbar-user,
  .app-shell .topbar-client-link,
  .app-shell .topbar-notification-menu {
    display: none;
  }

  .app-shell .topbar-actions {
    display: flex;
  }

  .app-shell .top-nav {
    position: sticky;
    top: 4.75rem;
    width: 100%;
    max-height: none;
    transform: none;
    padding: 0.42rem;
    background: rgba(255, 253, 247, 0.94);
    border-radius: 1.1rem;
  }

  .app-shell .top-nav-head {
    display: none;
  }

  .app-shell .top-nav-track {
    display: flex;
    flex-direction: column;
    max-height: none;
  }

  .app-shell .nav-tab {
    color: var(--ink);
  }

  .app-shell .nav-tab.active {
    background: var(--persona-accent);
    color: #fffdf5;
  }
}

/* V2.6 Agile Desk: professional ERP workbench, lower visual noise, stronger scanability. */
body.app-shell {
  --canvas: #f2f4f1;
  --ink: #18211b;
  --muted: #5f6b64;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --line: #dfe4dd;
  --shadow: 0 14px 34px rgba(27, 36, 30, 0.08);
  --shadow-soft: 0 8px 22px rgba(27, 36, 30, 0.055);
  --brand: #245f3f;
  --brand-2: #b86b28;
  --brand-3: #d0a84a;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 7px;
  background: var(--canvas);
}

body.app-shell .backdrop {
  display: none;
}

.app-shell .side-brand {
  display: none;
}

.app-shell .topbar-search button,
.app-shell .primary-button,
.app-shell .order-command-button {
  background: #245f3f;
  color: #ffffff;
  text-shadow: none;
  box-shadow: none;
}

.app-shell .topbar-search button:hover,
.app-shell .topbar-search button:focus-visible,
.app-shell .primary-button:hover,
.app-shell .primary-button:focus-visible,
.app-shell .order-command-button:hover,
.app-shell .order-command-button:focus-visible {
  background: #1b4a31;
  color: #ffffff;
}

.app-shell .ghost-button,
.app-shell .ghost-link,
.app-shell .table-action-button,
.app-shell .table-action-link {
  color: #245f3f;
}

@media (min-width: 1101px) {
  .app-shell .shell {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0;
    min-height: 100vh;
    padding: 0;
  }

  .app-shell .top-nav {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: 248px;
    height: 100vh;
    max-height: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 0.78rem;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: linear-gradient(180deg, #31332f 0%, #252a27 100%);
    color: #e7ece5;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: none;
  }

  .app-shell .side-brand {
    display: grid;
    grid-template-columns: 2.55rem minmax(0, 1fr);
    gap: 0.72rem;
    align-items: center;
    min-height: 3.7rem;
    padding: 0.38rem 0.48rem 0.82rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
  }

  .app-shell .side-brand-logo,
  .app-shell .side-brand-mark {
    width: 2.55rem;
    height: 2.55rem;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 0.55rem;
    background: #ffffff;
    color: #245f3f;
    font-weight: 900;
  }

  .app-shell .side-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.32rem;
  }

  .app-shell .side-brand strong,
  .app-shell .side-brand small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-shell .side-brand strong {
    font-size: 0.86rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
  }

  .app-shell .side-brand small {
    margin-top: 0.08rem;
    color: rgba(231, 236, 229, 0.68);
    font-size: 0.72rem;
  }

  .app-shell .top-nav-head {
    display: grid;
    gap: 0.1rem;
    padding: 0.62rem 0.62rem 0.22rem;
    color: rgba(231, 236, 229, 0.7);
    border: 0;
  }

  .app-shell .top-nav-head span {
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .app-shell .top-nav-head strong {
    color: #ffffff;
    font-size: 0.92rem;
  }

  .app-shell .top-nav-track {
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 0.14rem;
    max-height: none;
    height: auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.15rem 0.05rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
  }

  .app-shell .nav-tab {
    width: 100%;
    min-height: 2.62rem;
    display: grid;
    grid-template-columns: 1.86rem minmax(0, 1fr);
    gap: 0.58rem;
    align-items: center;
    padding: 0.44rem 0.58rem;
    border-radius: 0.38rem;
    color: rgba(231, 236, 229, 0.74);
    background: transparent;
    box-shadow: none;
    transform: none;
  }

  .app-shell .nav-tab:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    transform: none;
  }

  .app-shell .nav-tab.active {
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
    box-shadow: inset 3px 0 0 #d0a84a;
  }

  .app-shell .nav-icon {
    width: 1.78rem;
    height: 1.78rem;
    border-radius: 0.38rem;
    background: rgba(255, 255, 255, 0.1);
    color: currentColor;
    font-size: 0.64rem;
  }

  .app-shell .nav-tab.active .nav-icon {
    background: rgba(208, 168, 74, 0.18);
    color: #f6d783;
  }

  .app-shell .nav-label {
    position: static;
    display: grid;
    min-width: 0;
    max-width: none;
    padding: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    color: currentColor;
    pointer-events: auto;
    transform: none;
  }

  .app-shell .nav-label::before {
    display: none;
  }

  .app-shell .nav-label strong {
    font-size: 0.83rem;
    font-weight: 650;
    line-height: 1.12;
    text-align: left;
  }

  .app-shell .nav-label small {
    display: block;
    max-height: 1rem;
    margin-top: 0.03rem;
    color: rgba(231, 236, 229, 0.55);
    font-size: 0.66rem;
    line-height: 1.1;
    opacity: 1;
  }

  .app-shell .app-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    grid-column: 2;
    grid-row: 1;
    width: auto;
    max-width: none;
    min-height: 3.55rem;
    display: grid;
    grid-template-columns: minmax(22rem, 0.95fr) minmax(12rem, auto) auto;
    gap: 0.75rem;
    align-items: center;
    margin: 0;
    padding: 0.48rem 1.25rem;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: rgba(250, 251, 248, 0.96);
    box-shadow: none;
    backdrop-filter: blur(10px);
  }

  .app-shell .topbar-brand {
    display: none;
  }

  .app-shell .topbar-search {
    max-width: 46rem;
    justify-self: stretch;
  }

  .app-shell .topbar-search-field {
    min-height: 2.35rem;
    gap: 0.38rem;
    padding: 0.18rem;
    border-radius: 0.32rem;
    background: #ffffff;
    border: 1px solid #cfd7cf;
    box-shadow: none;
  }

  .app-shell .topbar-search input {
    min-height: 1.95rem;
    padding: 0.35rem 0.68rem;
    font-size: 0.86rem;
  }

  .app-shell .topbar-search button {
    min-height: 1.95rem;
    padding: 0 0.78rem;
    border-radius: 0.24rem;
    font-size: 0.76rem;
    font-weight: 750;
  }

  .app-shell .topbar-search-results {
    top: calc(100% + 0.3rem);
    border-radius: 0.48rem;
    background: #ffffff;
    border: 1px solid #cfd7cf;
    box-shadow: 0 18px 42px rgba(25, 32, 27, 0.15);
    backdrop-filter: none;
  }

  .app-shell .live-search-item {
    border-radius: 0.36rem;
    background: #ffffff;
  }

  .app-shell .topbar-user {
    min-height: 2.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 0.35rem;
    background: #ffffff;
    border: 1px solid #dfe4dd;
  }

  .app-shell .topbar-actions {
    gap: 0.35rem;
  }

  .app-shell .topbar-notification-menu summary,
  .app-shell .ghost-button,
  .app-shell .ghost-link {
    min-height: 2.15rem;
    padding: 0.42rem 0.62rem;
    border-radius: 0.3rem;
    background: #ffffff;
    border: 1px solid #dfe4dd;
    box-shadow: none;
    font-size: 0.82rem;
  }

  .app-shell .topbar-menu-button {
    display: none;
  }

  .app-shell .content {
    grid-column: 2;
    grid-row: 2;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 1.05rem 1.35rem 2.2rem;
    gap: 0.9rem;
  }

  .app-shell .hero {
    display: block;
    margin: 0 0 0.15rem;
    padding: 0.55rem 0 0.25rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .app-shell .hero::after {
    display: none;
  }

  .app-shell .hero h1 {
    font-family: var(--sans);
    font-size: clamp(2rem, 2.8vw, 3.2rem);
    font-weight: 760;
    line-height: 1.05;
    letter-spacing: -0.045em;
  }

  .app-shell .eyebrow {
    margin-bottom: 0.45rem;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #245f3f;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
  }

  .app-shell .lede {
    max-width: 68rem;
    margin-top: 0.55rem;
    color: #5f6b64;
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .app-shell .overview-hero-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .app-shell .overview-search {
    display: none;
  }

  .app-shell .card-grid,
  .app-shell .panel-grid,
  .app-shell .workspace-grid,
  .app-shell .backup-console-grid,
  .app-shell .command-strip,
  .app-shell .manual-command,
  .app-shell .manual-filter-strip,
  .app-shell .manual-role-grid,
  .app-shell .manual-layout {
    padding-left: 0;
    padding-right: 0;
  }

  .app-shell .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.72rem;
  }

  .app-shell .panel-grid,
  .app-shell .workspace-grid,
  .app-shell .backup-console-grid {
    gap: 0.78rem;
  }

  .app-shell .metric-card,
  .app-shell .data-panel,
  .app-shell .manual-section-card,
  .app-shell .manual-search-panel,
  .app-shell .manual-stats-grid article,
  .app-shell .manual-role-card,
  .app-shell .manual-toc,
  .app-shell .order-command-card,
  .app-shell .logistics-command-card,
  .app-shell .backup-record-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: none;
    backdrop-filter: none;
  }

  .app-shell .metric-card {
    min-height: 6.1rem;
    padding: 0.82rem 0.9rem;
  }

  .app-shell .metric-card::before {
    background: #245f3f;
  }

  .app-shell .metric-card p,
  .app-shell .metric-card span {
    font-size: 0.84rem;
  }

  .app-shell .metric-card strong {
    margin: 0.28rem 0 0.18rem;
    font-size: 1.55rem;
  }

  .app-shell .metric-card-link::after {
    top: 0.62rem;
    right: 0.62rem;
    padding: 0.18rem 0.42rem;
    border-radius: 0.32rem;
    background: #eef3ed;
    color: #245f3f;
    font-size: 0.62rem;
  }

  .app-shell .panel-header {
    padding: 0.72rem 0.82rem 0.58rem;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
  }

  .app-shell .panel-header h2 {
    font-size: 1rem;
  }

  .app-shell .workspace-form,
  .app-shell .panel-actions,
  .app-shell .backup-record-list,
  .app-shell .backup-command-form {
    padding-left: 0.82rem;
    padding-right: 0.82rem;
  }

  .app-shell .logistics-command-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.72rem;
  }

  .app-shell .logistics-command-card,
  .app-shell .order-command-card {
    align-items: start;
    min-height: 9rem;
    padding: 0.92rem;
    background: #ffffff;
  }

  .app-shell .logistics-command-card {
    grid-template-columns: 1fr;
    gap: 0.72rem;
  }

  .app-shell .logistics-command-card .order-command-copy h2,
  .app-shell .order-command-copy h2 {
    font-size: 1.15rem;
    line-height: 1.15;
  }

  .app-shell .logistics-command-card .order-command-copy p,
  .app-shell .order-command-copy p {
    max-width: none;
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .app-shell .logistics-command-card .inline-action-form,
  .app-shell .logistics-command-card .order-command-button {
    justify-self: start;
  }

  .app-shell .logistics-command-card .order-command-button,
  .app-shell .order-command-button {
    min-width: 0;
    min-height: 2.12rem;
    padding: 0.48rem 0.72rem;
    border-radius: 0.32rem;
    font-size: 0.8rem;
    white-space: normal;
  }

  .app-shell .table-shell {
    padding: 0;
  }

  .app-shell table {
    min-width: 36rem;
  }

  .app-shell th,
  .app-shell td {
    padding: 0.56rem 0.72rem;
    font-size: 0.82rem;
    border-top: 1px solid var(--line);
  }

  .app-shell th {
    background: #f6f7f4;
    color: #59645d;
    font-size: 0.66rem;
    letter-spacing: 0.1em;
  }

  .app-shell tbody tr:hover {
    background: #f7faf6;
  }

  .app-shell .table-action-stack {
    gap: 0.28rem;
    min-width: 0;
  }

  .app-shell .table-action-button,
  .app-shell .table-action-link {
    min-height: 1.82rem;
    padding: 0.28rem 0.48rem;
    border-radius: 0.28rem;
    font-size: 0.76rem;
  }

  .app-shell .pill {
    border-radius: 0.3rem;
    padding: 0.2rem 0.42rem;
    font-size: 0.68rem;
    font-weight: 750;
  }

  .app-shell input,
  .app-shell select,
  .app-shell textarea,
  .app-shell .action-form input,
  .app-shell .restore-inline-form input {
    border-radius: 0.32rem;
    background: #ffffff;
    border-color: #cfd7cf;
    box-shadow: none;
  }

  .app-shell .form-grid {
    gap: 0.72rem;
  }

  .app-shell .notification-popover {
    border-radius: 0.48rem;
    background: #ffffff;
    border: 1px solid #cfd7cf;
    box-shadow: 0 18px 42px rgba(25, 32, 27, 0.16);
    backdrop-filter: none;
  }

  .app-shell .notification-preview {
    border-radius: 0.36rem;
    background: #ffffff;
  }
}

@media (max-width: 1100px) {
  .app-shell .shell {
    padding: 0.72rem;
    gap: 0.62rem;
  }

  .app-shell .side-brand {
    display: none;
  }

  .app-shell .app-topbar {
    position: sticky;
    top: 0.45rem;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    padding: 0.58rem;
    border-radius: 0.7rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
  }

  .app-shell .topbar-brand {
    display: inline-flex;
  }

  .app-shell .topbar-search {
    grid-column: 1 / -1;
    order: 3;
  }

  .app-shell .topbar-search-field {
    min-height: 2.65rem;
    border-radius: 0.45rem;
    background: #ffffff;
    border-color: #cfd7cf;
    box-shadow: none;
  }

  .app-shell .topbar-search button {
    border-radius: 0.34rem;
  }

  .app-shell .topbar-user,
  .app-shell .topbar-client-link {
    display: none;
  }

  .app-shell .topbar-menu-button {
    display: inline-flex;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 0.42rem;
  }

  .app-shell .top-nav {
    position: sticky;
    top: 6.4rem;
    z-index: 34;
    width: 100%;
    max-height: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 0.7rem;
    background: #2d302d;
    border: 0;
    box-shadow: none;
    transition: max-height 0.18s ease, padding 0.18s ease;
  }

  body.top-nav-open.app-shell .top-nav {
    max-height: min(70vh, 34rem);
    padding: 0.5rem;
  }

  .app-shell .top-nav-head {
    display: none;
  }

  .app-shell .top-nav-track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem;
    max-height: min(64vh, 30rem);
    overflow-y: auto;
    padding: 0;
  }

  .app-shell .nav-tab {
    display: grid;
    grid-template-columns: 1.8rem minmax(0, 1fr);
    min-height: 2.55rem;
    padding: 0.42rem 0.52rem;
    border-radius: 0.42rem;
    color: rgba(255, 255, 255, 0.76);
  }

  .app-shell .nav-tab.active {
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
    box-shadow: inset 3px 0 0 #d0a84a;
  }

  .app-shell .nav-label small {
    display: none;
  }

  .app-shell .content {
    padding: 0.35rem 0 1.5rem;
    gap: 0.75rem;
  }

  .app-shell .hero {
    padding: 0.62rem 0.2rem 0.05rem;
  }

  .app-shell .hero h1 {
    font-family: var(--sans);
    font-size: clamp(2rem, 8vw, 3rem);
    font-weight: 760;
    letter-spacing: -0.05em;
  }

  .app-shell .overview-search {
    display: none;
  }

  .app-shell .card-grid,
  .app-shell .panel-grid,
  .app-shell .workspace-grid,
  .app-shell .backup-console-grid,
  .app-shell .command-strip,
  .app-shell .manual-command,
  .app-shell .manual-filter-strip,
  .app-shell .manual-role-grid,
  .app-shell .manual-layout {
    padding-left: 0;
    padding-right: 0;
  }

  .app-shell .metric-card,
  .app-shell .data-panel,
  .app-shell .manual-section-card,
  .app-shell .manual-search-panel,
  .app-shell .manual-stats-grid article,
  .app-shell .manual-role-card,
  .app-shell .manual-toc,
  .app-shell .order-command-card,
  .app-shell .logistics-command-card,
  .app-shell .backup-record-card {
    border-radius: 0.72rem;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: none;
  }

  .app-shell .logistics-command-grid {
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 0.65rem;
  }

  .app-shell .logistics-command-card {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
}

/* V2.6.1 Air Pass: loosen dense ERP sections without returning to oversized glass UI. */
@media (min-width: 1101px) {
  .app-shell .app-topbar {
    min-height: 4.15rem;
    grid-template-columns: minmax(28rem, 1fr) minmax(13rem, 17rem) auto;
    gap: 0.95rem;
    padding: 0.62rem 1.45rem;
  }

  .app-shell .topbar-search {
    max-width: 54rem;
  }

  .app-shell .topbar-search-field {
    min-height: 2.65rem;
  }

  .app-shell .topbar-search input {
    min-height: 2.22rem;
    padding-inline: 0.82rem;
    font-size: 0.9rem;
  }

  .app-shell .topbar-search button {
    min-height: 2.2rem;
    padding-inline: 0.92rem;
  }

  .app-shell .content {
    padding: 1.35rem 1.8rem 3rem;
    gap: 1.15rem;
  }

  .app-shell .hero {
    padding: 0.95rem 0 0.4rem;
  }

  .app-shell .hero h1 {
    font-size: clamp(2.2rem, 3vw, 3.45rem);
  }

  .app-shell .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
    gap: 0.95rem;
  }

  .app-shell .metric-card {
    min-height: 7.15rem;
    padding: 1rem 1.05rem;
  }

  .app-shell .metric-card strong {
    margin-top: 0.38rem;
    font-size: 1.72rem;
  }

  .app-shell .panel-grid,
  .app-shell .workspace-grid,
  .app-shell .backup-console-grid {
    gap: 1.05rem;
  }

  .app-shell .panel-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr));
  }

  .app-shell .workspace-grid {
    grid-template-columns: minmax(360px, 0.62fr) minmax(580px, 1.38fr);
    align-items: start;
  }

  .app-shell .data-panel,
  .app-shell .metric-card,
  .app-shell .order-command-card,
  .app-shell .logistics-command-card {
    border-color: #d7ded6;
  }

  .app-shell .panel-header {
    padding: 0.95rem 1rem 0.72rem;
  }

  .app-shell .detail-grid {
    gap: 1rem 1.15rem;
    padding: 0.95rem 1rem 1.15rem;
  }

  .app-shell .detail-grid strong {
    line-height: 1.45;
  }

  .app-shell .logistics-command-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .app-shell .logistics-command-card,
  .app-shell .order-command-card {
    min-height: 8.35rem;
    padding: 1.05rem;
  }

  .app-shell .logistics-command-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
  }

  .app-shell .logistics-command-card .order-command-copy h2,
  .app-shell .order-command-copy h2 {
    font-size: 1.24rem;
  }

  .app-shell .logistics-command-card .order-command-copy p,
  .app-shell .order-command-copy p {
    max-width: 34rem;
    line-height: 1.55;
  }

  .app-shell .logistics-command-card .inline-action-form,
  .app-shell .logistics-command-card .order-command-button {
    justify-self: end;
  }

  .app-shell .logistics-command-card .order-command-button,
  .app-shell .order-command-button,
  .app-shell .primary-button,
  .app-shell .ghost-button {
    min-height: 2.28rem;
    padding: 0.54rem 0.86rem;
  }

  .app-shell .table-shell {
    padding-bottom: 0.2rem;
  }

  .app-shell table {
    min-width: 44rem;
  }

  .app-shell table.compact {
    min-width: 48rem;
  }

  .app-shell th,
  .app-shell td {
    padding: 0.7rem 0.86rem;
    line-height: 1.45;
  }

  .app-shell td small {
    display: block;
    margin-top: 0.18rem;
    line-height: 1.3;
  }

  .app-shell .table-action-stack {
    gap: 0.42rem;
  }

  .app-shell .form-grid,
  .app-shell .item-row,
  .app-shell .logistics-upload-row {
    gap: 1rem;
  }

  .app-shell .form-grid {
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  }

  .app-shell .field-span-2 {
    grid-column: 1 / -1;
  }

  .app-shell .item-row {
    grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
    padding: 1rem;
  }

  .app-shell .logistics-upload-row {
    grid-template-columns: minmax(10rem, 0.35fr) minmax(18rem, 1fr);
    padding: 1rem;
  }

  .app-shell .workspace-form,
  .app-shell .order-form-section,
  .app-shell .order-modal-scroll {
    gap: 1.15rem;
  }

  .app-shell .order-modal {
    width: min(82rem, calc(100vw - 3rem));
  }

  .app-shell .order-modal-card {
    border-radius: 0.85rem;
  }

  .app-shell .order-modal-header {
    padding: 1.25rem 1.5rem 1rem;
    background: #ffffff;
  }

  .app-shell .order-modal-scroll {
    padding: 1.25rem 1.5rem;
  }
}

@media (min-width: 1101px) and (max-width: 1360px) {
  .app-shell .app-topbar {
    grid-template-columns: minmax(22rem, 1fr) auto;
  }

  .app-shell .topbar-user {
    display: none;
  }

  .app-shell .workspace-grid,
  .app-shell .panel-grid,
  .app-shell .logistics-command-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .app-shell .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    gap: 0.82rem;
  }

  .app-shell .metric-card {
    min-height: 6.9rem;
    padding: 0.95rem;
  }

  .app-shell .panel-grid,
  .app-shell .workspace-grid,
  .app-shell .logistics-command-grid {
    grid-template-columns: 1fr;
    gap: 0.82rem;
  }

  .app-shell .logistics-command-card,
  .app-shell .order-command-card {
    padding: 0.95rem;
  }

  .app-shell .detail-grid,
  .app-shell .form-grid,
  .app-shell .item-row,
  .app-shell .logistics-upload-row {
    grid-template-columns: 1fr;
    gap: 0.88rem;
  }

  .app-shell th,
  .app-shell td {
    padding: 0.68rem 0.78rem;
  }
}

/* V2.6.2 Table Fit: simple dashboards fit; document-heavy tables keep scroll protection. */
@media (min-width: 1101px) {
  .app-shell .panel-grid table:not(.compact),
  .app-shell .workspace-grid table:not(.compact) {
    min-width: 100%;
  }

  .app-shell .panel-grid table:not(.compact) th,
  .app-shell .panel-grid table:not(.compact) td,
  .app-shell .workspace-grid table:not(.compact) th,
  .app-shell .workspace-grid table:not(.compact) td {
    padding-inline: 0.76rem;
  }
}

/* V2.7 Minia Console: light admin dashboard rhythm inspired by Minia, adapted to SeedVault. */
body.app-shell {
  --canvas: #f5f7fb;
  --ink: #263238;
  --muted: #74788d;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --line: #e6e9f0;
  --shadow: 0 0.75rem 1.5rem rgba(18, 38, 63, 0.035);
  --shadow-soft: 0 0.35rem 1rem rgba(18, 38, 63, 0.035);
  --brand: #2f7d4a;
  --brand-2: #c99b2f;
  --brand-3: #4b63d8;
  --good: #34c38f;
  --warn: #f1b44c;
  --bad: #f46a6a;
  --radius-lg: 0.45rem;
  --radius-md: 0.35rem;
  --radius-sm: 0.25rem;
  background: var(--canvas);
  color: #263238;
}

@media (min-width: 1101px) {
  .app-shell .shell {
    grid-template-columns: 250px minmax(0, 1fr);
    background: #f5f7fb;
  }

  .app-shell .top-nav {
    width: 250px;
    padding: 0;
    gap: 0;
    background: #fbfbff;
    color: #545a6d;
    border-right: 1px solid #edf0f5;
    box-shadow: none;
  }

  .app-shell .side-brand {
    min-height: 70px;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.68rem;
    padding: 0 1.25rem;
    border-bottom: 1px solid #edf0f5;
    color: #263238;
  }

  .app-shell .side-brand-logo,
  .app-shell .side-brand-mark {
    width: 2rem;
    height: 2rem;
    border-radius: 0.42rem;
    background: #eef6f0;
    color: #2f7d4a;
    border: 1px solid #dceee2;
  }

  .app-shell .side-brand-logo img {
    padding: 0.25rem;
  }

  .app-shell .side-brand strong {
    color: #263238;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    text-transform: none;
  }

  .app-shell .side-brand small {
    color: #74788d;
    font-size: 0.72rem;
  }

  .app-shell .top-nav-head {
    padding: 1.25rem 1.25rem 0.6rem;
    color: #74788d;
  }

  .app-shell .top-nav-head span {
    color: #74788d;
    font-size: 0.66rem;
    letter-spacing: 0.08em;
  }

  .app-shell .top-nav-head strong {
    color: #263238;
    font-size: 0.76rem;
    font-weight: 600;
  }

  .app-shell .top-nav-track {
    gap: 0.1rem;
    padding: 0.15rem 0.72rem 1rem;
    scrollbar-color: rgba(84, 90, 109, 0.26) transparent;
  }

  .app-shell .nav-tab {
    min-height: 2.7rem;
    grid-template-columns: 1.55rem minmax(0, 1fr);
    gap: 0.68rem;
    padding: 0.52rem 0.65rem;
    border-radius: 0.32rem;
    color: #545a6d;
  }

  .app-shell .nav-tab:hover {
    background: #f2f4fa;
    color: #2f7d4a;
  }

  .app-shell .nav-tab.active {
    background: #eef6f0;
    color: #2f7d4a;
    box-shadow: none;
  }

  .app-shell .nav-icon {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 0;
    background: transparent;
    color: currentColor;
    font-size: 0.72rem;
  }

  .app-shell .nav-tab.active .nav-icon {
    background: transparent;
    color: #2f7d4a;
  }

  .app-shell .nav-label strong {
    color: currentColor;
    font-size: 0.86rem;
    font-weight: 500;
  }

  .app-shell .nav-label small {
    display: none;
  }

  .app-shell .app-topbar {
    min-height: 70px;
    margin-left: 0;
    grid-template-columns: minmax(24rem, 35rem) minmax(11rem, auto) auto;
    gap: 1rem;
    padding: 0 1.45rem;
    background: #ffffff;
    border-bottom: 1px solid #edf0f5;
    box-shadow: 0 0.25rem 0.75rem rgba(18, 38, 63, 0.03);
  }

  .app-shell .topbar-search {
    max-width: 35rem;
  }

  .app-shell .topbar-search-field {
    min-height: 2.38rem;
    padding: 0;
    border: 0;
    border-radius: 0.25rem;
    background: #f3f3f9;
  }

  .app-shell .topbar-search input {
    min-height: 2.38rem;
    padding: 0.45rem 0.9rem;
    color: #495057;
    font-size: 0.84rem;
  }

  .app-shell .topbar-search button {
    min-height: 2.38rem;
    min-width: 3.05rem;
    padding: 0 0.85rem;
    border-radius: 0.25rem;
    background: #2f7d4a;
    color: #ffffff;
    font-size: 0.78rem;
  }

  .app-shell .topbar-search-results {
    border-radius: 0.35rem;
    border-color: #e6e9f0;
    box-shadow: 0 0.75rem 1.5rem rgba(18, 38, 63, 0.12);
  }

  .app-shell .topbar-user {
    min-height: 3rem;
    padding: 0.45rem 0.75rem;
    border-color: #e6e9f0;
    border-radius: 0;
    background: #fafbff;
  }

  .app-shell .topbar-user strong {
    color: #263238;
    font-size: 0.84rem;
  }

  .app-shell .topbar-user span,
  .app-shell .topbar-user small {
    color: #74788d;
  }

  .app-shell .topbar-notification-menu summary,
  .app-shell .ghost-button,
  .app-shell .ghost-link {
    min-height: 2.38rem;
    border-radius: 0.25rem;
    background: #ffffff;
    border: 1px solid #e6e9f0;
    color: #2f7d4a;
    font-size: 0.82rem;
  }

  .app-shell .notification-dot {
    background: #ced4da;
    box-shadow: none;
  }

  .app-shell .notification-dot.has-unread {
    background: #f46a6a;
  }

  .app-shell .content {
    padding: 1.45rem 1.9rem 3rem;
    gap: 1.25rem;
  }

  .app-shell .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 1rem;
    padding: 0 0 0.15rem;
  }

  .app-shell .hero h1 {
    grid-column: 1;
    font-size: 1.28rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.35;
    color: #263238;
  }

  .app-shell .hero .eyebrow {
    grid-column: 1;
    margin: 0 0 0.2rem;
    color: #74788d;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
  }

  .app-shell .hero .lede {
    grid-column: 1 / -1;
    max-width: 64rem;
    margin: 0.15rem 0 0;
    color: #74788d;
    font-size: 0.9rem;
    line-height: 1.55;
  }

  .app-shell .notice {
    grid-column: 1 / -1;
    border-radius: 0.25rem;
  }

  .app-shell .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
    gap: 1.25rem;
  }

  .app-shell .metric-card,
  .app-shell .data-panel,
  .app-shell .manual-section-card,
  .app-shell .manual-search-panel,
  .app-shell .manual-stats-grid article,
  .app-shell .manual-role-card,
  .app-shell .manual-toc,
  .app-shell .order-command-card,
  .app-shell .logistics-command-card,
  .app-shell .backup-record-card {
    border: 1px solid #e6e9f0;
    border-radius: 0.35rem;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
  }

  .app-shell .metric-card {
    min-height: 8.15rem;
    padding: 1.25rem;
    border-left: 0;
  }

  .app-shell .metric-card::before {
    display: none;
  }

  .app-shell .metric-card p,
  .app-shell .metric-card span {
    color: #74788d;
    font-size: 0.86rem;
  }

  .app-shell .metric-card strong {
    margin: 0.55rem 0 0.48rem;
    color: #263238;
    font-size: 1.42rem;
    font-weight: 500;
  }

  .app-shell .metric-card-link::after {
    top: 1.05rem;
    right: 1.05rem;
    background: #eef6f0;
    color: #2f7d4a;
    border-radius: 0.25rem;
    font-size: 0.62rem;
  }

  .app-shell .tone-good strong { color: #2f7d4a; }
  .app-shell .tone-warn strong { color: #b0781a; }
  .app-shell .tone-bad strong { color: #c14949; }

  .app-shell .panel-grid,
  .app-shell .workspace-grid,
  .app-shell .logistics-command-grid,
  .app-shell .backup-console-grid {
    gap: 1.25rem;
  }

  .app-shell .panel-header {
    min-height: 3.5rem;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border-bottom: 1px solid #e6e9f0;
  }

  .app-shell .panel-header h2 {
    color: #263238;
    font-size: 1rem;
    font-weight: 600;
  }

  .app-shell .panel-header span {
    color: #74788d;
    font-size: 0.86rem;
  }

  .app-shell .detail-grid {
    padding: 1.1rem 1.25rem 1.25rem;
  }

  .app-shell .detail-grid small,
  .app-shell .form-grid span,
  .app-shell .item-row span,
  .app-shell .action-form span {
    color: #74788d;
    font-size: 0.8rem;
  }

  .app-shell .detail-grid strong {
    color: #263238;
    font-size: 0.94rem;
  }

  .app-shell .logistics-command-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell .logistics-command-card {
    min-height: 7.8rem;
    padding: 1.25rem;
  }

  .app-shell .order-command-copy span,
  .app-shell .order-modal-header span {
    color: #2f7d4a;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
  }

  .app-shell .logistics-command-card .order-command-copy h2,
  .app-shell .order-command-copy h2 {
    color: #263238;
    font-size: 1.1rem;
    font-weight: 600;
  }

  .app-shell .logistics-command-card .order-command-copy p,
  .app-shell .order-command-copy p {
    color: #74788d;
    font-size: 0.86rem;
  }

  .app-shell .primary-button,
  .app-shell .order-command-button {
    background: #2f7d4a;
    color: #ffffff;
    border-radius: 0.25rem;
    box-shadow: none;
  }

  .app-shell .primary-button:hover,
  .app-shell .order-command-button:hover,
  .app-shell .topbar-search button:hover {
    background: #286c40;
  }

  .app-shell .table-shell {
    background: #ffffff;
  }

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

  .app-shell th {
    background: #ffffff;
    color: #495057;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    border-top: 0;
    border-bottom: 1px solid #e6e9f0;
  }

  .app-shell td {
    color: #495057;
    border-top: 1px solid #eff2f7;
  }

  .app-shell tbody tr:hover {
    background: #f8f9fc;
  }

  .app-shell .pill {
    border-radius: 0.25rem;
    font-weight: 600;
  }

  .app-shell .pill.tone-good {
    color: #16794f;
    background: rgba(52, 195, 143, 0.16);
  }

  .app-shell .pill.tone-warn {
    color: #94620d;
    background: rgba(241, 180, 76, 0.18);
  }

  .app-shell .pill.tone-bad {
    color: #b13b3b;
    background: rgba(244, 106, 106, 0.16);
  }

  .app-shell .table-action-button,
  .app-shell .table-action-link {
    border-radius: 0.25rem;
    color: #2f7d4a;
  }

  .app-shell input,
  .app-shell select,
  .app-shell textarea,
  .app-shell .action-form input,
  .app-shell .restore-inline-form input {
    border-radius: 0.25rem;
    border-color: #ced4da;
    color: #495057;
  }

  .app-shell input:focus,
  .app-shell select:focus,
  .app-shell textarea:focus {
    outline: 0;
    border-color: #9bc8a9;
    box-shadow: 0 0 0 0.15rem rgba(47, 125, 74, 0.12);
  }

  .app-shell .order-modal-card,
  .app-shell .notification-popover,
  .app-shell .live-search-item,
  .app-shell .notification-preview {
    border-radius: 0.35rem;
  }
}

@media (min-width: 1101px) and (max-width: 1360px) {
  .app-shell .app-topbar {
    grid-template-columns: minmax(20rem, 1fr) auto;
  }

  .app-shell .topbar-user {
    display: none;
  }
}

@media (max-width: 1100px) {
  body.app-shell {
    background: #f5f7fb;
  }

  .app-shell .app-topbar,
  .app-shell .metric-card,
  .app-shell .data-panel,
  .app-shell .order-command-card,
  .app-shell .logistics-command-card {
    border-radius: 0.35rem;
    background: #ffffff;
    border-color: #e6e9f0;
  }

  .app-shell .hero h1 {
    font-size: clamp(1.55rem, 7vw, 2.2rem);
    font-weight: 600;
    letter-spacing: 0;
  }

  .app-shell .top-nav {
    background: #fbfbff;
    border: 1px solid #e6e9f0;
  }

  .app-shell .nav-tab {
    color: #545a6d;
  }

  .app-shell .nav-tab.active {
    background: #eef6f0;
    color: #2f7d4a;
    box-shadow: none;
  }
}

/* V2.8 SeedVal Flow: design language transferred from SeedVal OS. */
body.app-shell {
  --canvas: #f3f7f6;
  --ink: #1f2933;
  --muted: #66717f;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --line: #d9dee3;
  --soft-line: #e4e7eb;
  --surface-soft: #f8fafb;
  --focus: #e3f5ec;
  --brand: #176f6b;
  --brand-2: #8f6041;
  --brand-3: #176f6b;
  --good: #176f6b;
  --warn: #8a5a00;
  --bad: #9b1c1c;
  --radius-lg: 8px;
  --radius-md: 8px;
  --radius-sm: 6px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(23, 111, 107, 0.05), transparent 260px),
    var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

body.app-shell .backdrop {
  display: none;
}

@media (min-width: 1101px) {
  .app-shell .shell {
    grid-template-columns: 224px minmax(0, 1fr);
    background:
      linear-gradient(180deg, rgba(23, 111, 107, 0.05), transparent 260px),
      var(--canvas);
  }

  .app-shell .top-nav {
    width: 224px;
    padding: 0;
    gap: 0;
    background: rgba(255, 255, 255, 0.92);
    border-right: 1px solid var(--line);
    color: #344150;
    box-shadow: none;
    backdrop-filter: blur(16px);
  }

  .app-shell .side-brand {
    min-height: 72px;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 11px;
    padding: 0 14px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
  }

  .app-shell .side-brand-logo,
  .app-shell .side-brand-mark {
    width: 46px;
    height: 46px;
    border: 1px solid color-mix(in srgb, var(--brand) 38%, white);
    border-radius: 8px;
    background:
      radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.68), transparent 34%),
      linear-gradient(145deg, color-mix(in srgb, var(--brand) 84%, #133d40), color-mix(in srgb, var(--brand-2) 68%, #352821));
    box-shadow: 0 10px 24px rgba(31, 41, 51, 0.16);
  }

  .app-shell .side-brand-logo {
    background: #ffffff;
    box-shadow: none;
  }

  .app-shell .side-brand-logo img {
    padding: 5px;
    border-radius: 5px;
  }

  .app-shell .side-brand-mark {
    color: #ffffff;
    font-size: 13px;
    font-weight: 850;
  }

  .app-shell .side-brand strong {
    color: #14242a;
    font-size: 14px;
    font-weight: 820;
    letter-spacing: 0;
    line-height: 1.1;
    text-transform: none;
  }

  .app-shell .side-brand small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
  }

  .app-shell .top-nav-head {
    padding: 12px 20px 6px;
    color: var(--muted);
  }

  .app-shell .top-nav-head span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
  }

  .app-shell .top-nav-head strong {
    color: #14242a;
    font-size: 12px;
    font-weight: 650;
  }

  .app-shell .top-nav-track {
    gap: 4px;
    padding: 12px;
    scrollbar-color: rgba(102, 113, 127, 0.28) transparent;
  }

  .app-shell .nav-tab {
    min-height: 36px;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
    padding: 0 10px;
    border-radius: 6px;
    color: #344150;
    background: transparent;
  }

  .app-shell .nav-tab:hover,
  .app-shell .nav-tab.active {
    background: var(--focus);
    color: color-mix(in srgb, var(--brand) 72%, #111827);
    box-shadow: none;
  }

  .app-shell .nav-icon {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: currentColor;
    font-size: 11px;
    font-weight: 850;
  }

  .app-shell .nav-tab.active .nav-icon {
    background: transparent;
    color: currentColor;
  }

  .app-shell .nav-label strong {
    color: currentColor;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.15;
  }

  .app-shell .nav-label small {
    display: none;
  }

  .app-shell .app-topbar {
    min-height: 72px;
    grid-template-columns: minmax(220px, 520px) minmax(220px, auto) max-content;
    align-items: center;
    gap: 14px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--line);
    box-shadow: none;
    backdrop-filter: blur(16px);
  }

  .app-shell .topbar-search {
    max-width: 520px;
  }

  .app-shell .topbar-search-field {
    min-height: 36px;
    gap: 8px;
    padding: 0 0 0 10px;
    border: 1px solid #cbd2d9;
    border-radius: 6px;
    background: var(--panel);
    box-shadow: none;
  }

  .app-shell .topbar-search input {
    min-height: 34px;
    padding: 0;
    color: var(--ink);
    font-size: 13px;
  }

  .app-shell .topbar-search button {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 5px;
    background: var(--brand);
    color: #ffffff;
    font-size: 12px;
    font-weight: 750;
  }

  .app-shell .topbar-search-results {
    top: calc(100% + 8px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(31, 41, 51, 0.12);
  }

  .app-shell .live-search-item,
  .app-shell .notification-preview {
    border-radius: 6px;
  }

  .app-shell .topbar-user {
    min-height: 40px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .app-shell .topbar-user strong {
    color: #14242a;
    font-size: 13px;
    line-height: 1.1;
  }

  .app-shell .topbar-user span,
  .app-shell .topbar-user small {
    color: var(--muted);
    font-size: 12px;
  }

  .app-shell .topbar-actions {
    gap: 10px;
  }

  .app-shell .topbar-notification-menu summary,
  .app-shell .ghost-button,
  .app-shell .ghost-link {
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #344150;
    font-size: 13px;
    font-weight: 650;
  }

  .app-shell .topbar-notification-menu summary:hover,
  .app-shell .ghost-button:hover,
  .app-shell .ghost-link:hover {
    background: #eef2f4;
    color: var(--brand);
  }

  .app-shell .notification-label {
    color: currentColor;
    font-size: 13px;
  }

  .app-shell .notification-popover {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(31, 41, 51, 0.14);
  }

  .app-shell .content {
    padding: 20px;
    gap: 14px;
  }

  .app-shell .hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 0;
  }

  .app-shell .hero .eyebrow {
    width: 100%;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
  }

  .app-shell .hero h1 {
    margin: 0;
    color: var(--ink);
    font-size: 22px;
    font-weight: 750;
    line-height: 1.18;
    letter-spacing: 0;
  }

  .app-shell .hero .lede {
    width: 100%;
    max-width: 68rem;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
  }

  .app-shell .notice {
    width: 100%;
    border-radius: 6px;
  }

  .app-shell .card-grid,
  .app-shell .panel-grid,
  .app-shell .workspace-grid,
  .app-shell .logistics-command-grid,
  .app-shell .backup-console-grid,
  .app-shell .command-strip,
  .app-shell .manual-command,
  .app-shell .manual-filter-strip,
  .app-shell .manual-role-grid,
  .app-shell .manual-layout {
    gap: 14px;
    padding-left: 0;
    padding-right: 0;
  }

  .app-shell .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .app-shell .workspace-grid {
    grid-template-columns: minmax(320px, 0.62fr) minmax(520px, 1.38fr);
  }

  .app-shell .panel-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
  }

  .app-shell .metric-card,
  .app-shell .data-panel,
  .app-shell .manual-section-card,
  .app-shell .manual-search-panel,
  .app-shell .manual-stats-grid article,
  .app-shell .manual-role-card,
  .app-shell .manual-toc,
  .app-shell .order-command-card,
  .app-shell .logistics-command-card,
  .app-shell .backup-record-card,
  .app-shell .filterBar,
  .app-shell .table-shell {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 10px 24px rgba(31, 41, 51, 0.04);
  }

  .app-shell .metric-card {
    min-height: 112px;
    display: grid;
    gap: 4px;
    padding: 14px;
  }

  .app-shell .metric-card::before {
    display: none;
  }

  .app-shell .metric-card p,
  .app-shell .metric-card span {
    color: var(--muted);
    font-size: 12px;
  }

  .app-shell .metric-card strong {
    margin: 0;
    color: var(--ink);
    font-size: 30px;
    font-weight: 750;
    line-height: 1.05;
  }

  .app-shell .metric-card-link::after {
    top: 12px;
    right: 12px;
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--focus);
    color: color-mix(in srgb, var(--brand) 82%, #111827);
    font-size: 12px;
    letter-spacing: 0;
    text-transform: none;
  }

  .app-shell .tone-good strong,
  .app-shell .metric-card.tone-good strong {
    color: var(--brand);
  }

  .app-shell .tone-warn strong,
  .app-shell .metric-card.tone-warn strong {
    color: #8a5a00;
  }

  .app-shell .tone-bad strong,
  .app-shell .metric-card.tone-bad strong {
    color: #9b1c1c;
  }

  .app-shell .data-panel {
    overflow: hidden;
  }

  .app-shell .panel-header {
    min-height: auto;
    align-items: flex-start;
    padding: 14px;
    border-bottom: 1px solid var(--soft-line);
    background: var(--panel);
  }

  .app-shell .panel-header h2 {
    color: var(--ink);
    font-size: 15px;
    font-weight: 720;
  }

  .app-shell .panel-header span,
  .app-shell .panel-subtitle {
    color: var(--muted);
    font-size: 12px;
  }

  .app-shell .detail-grid {
    gap: 12px;
    padding: 14px;
  }

  .app-shell .detail-grid small,
  .app-shell .form-grid span,
  .app-shell .item-row span,
  .app-shell .action-form span {
    color: var(--muted);
    font-size: 12px;
  }

  .app-shell .detail-grid strong {
    color: var(--ink);
    font-size: 13px;
  }

  .app-shell .logistics-command-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell .order-command-card,
  .app-shell .logistics-command-card {
    min-height: 0;
    padding: 14px;
  }

  .app-shell .logistics-command-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .app-shell .order-command-copy span,
  .app-shell .order-modal-header span {
    color: var(--brand);
    font-size: 11px;
    letter-spacing: 0.08em;
  }

  .app-shell .order-command-copy h2,
  .app-shell .logistics-command-card .order-command-copy h2 {
    color: var(--ink);
    font-size: 15px;
    font-weight: 720;
  }

  .app-shell .order-command-copy p,
  .app-shell .logistics-command-card .order-command-copy p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
  }

  .app-shell .primary-button,
  .app-shell .order-command-button,
  .app-shell .table-action-button,
  .app-shell .modal-close-button,
  .app-shell .manual-filter-chip,
  .app-shell .tabs button,
  .app-shell .segmented button {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border: 1px solid #cbd2d9;
    border-radius: 6px;
    background: var(--panel);
    color: #344150;
    box-shadow: none;
    font-size: 13px;
    font-weight: 650;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  }

  .app-shell .primary-button,
  .app-shell .order-command-button {
    border-color: var(--brand);
    background: var(--brand);
    color: #ffffff;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 22%, transparent);
  }

  .app-shell .primary-button:hover,
  .app-shell .order-command-button:hover,
  .app-shell .topbar-search button:hover {
    background: color-mix(in srgb, var(--brand) 88%, #111827);
    color: #ffffff;
  }

  .app-shell .ghost-button:hover,
  .app-shell .table-action-button:hover,
  .app-shell .manual-filter-chip:hover {
    border-color: color-mix(in srgb, var(--brand) 36%, #cbd2d9);
    background: var(--surface-soft);
    color: var(--brand);
  }

  .app-shell .table-shell {
    overflow: auto;
    padding: 0;
  }

  .app-shell table {
    width: 100%;
    border-collapse: collapse;
    min-width: 100%;
  }

  .app-shell table.compact {
    min-width: 760px;
  }

  .app-shell th,
  .app-shell td {
    padding: 10px 12px;
    border-top: 0;
    border-bottom: 1px solid var(--soft-line);
    color: #344150;
    font-size: 13px;
    line-height: 1.35;
    vertical-align: middle;
  }

  .app-shell th {
    background: #f1f4f6;
    color: #4c5967;
    font-weight: 700;
    letter-spacing: 0.04em;
  }

  .app-shell tbody tr:hover td {
    background: var(--surface-soft);
  }

  .app-shell td small {
    color: var(--muted);
    font-size: 12px;
  }

  .app-shell .pill {
    min-height: 22px;
    align-items: center;
    padding: 0 8px;
    border-radius: 999px;
    background: #edf2f7;
    color: #4a5568;
    font-size: 12px;
    font-weight: 650;
    text-transform: capitalize;
  }

  .app-shell .pill.tone-good {
    background: var(--focus);
    color: color-mix(in srgb, var(--brand) 82%, #111827);
  }

  .app-shell .pill.tone-warn {
    background: #fff4d6;
    color: #8a5a00;
  }

  .app-shell .pill.tone-bad {
    background: #ffe5e1;
    color: #9b1c1c;
  }

  .app-shell input,
  .app-shell select,
  .app-shell textarea,
  .app-shell .action-form input,
  .app-shell .restore-inline-form input {
    min-height: 34px;
    border: 1px solid #cbd2d9;
    border-radius: 6px;
    background: #ffffff;
    color: var(--ink);
    font-size: 13px;
    box-shadow: none;
  }

  .app-shell input:focus,
  .app-shell select:focus,
  .app-shell textarea:focus {
    outline: 0;
    border-color: color-mix(in srgb, var(--brand) 42%, #cbd2d9);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent);
  }

  .app-shell .form-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
  }

  .app-shell .item-row,
  .app-shell .logistics-upload-row,
  .app-shell .order-form-section {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
  }

  .app-shell .item-row {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    padding: 12px;
  }

  .app-shell .logistics-upload-row {
    grid-template-columns: minmax(130px, 0.3fr) minmax(240px, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .app-shell .order-modal {
    width: min(78rem, calc(100vw - 2rem));
  }

  .app-shell .order-modal-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(31, 41, 51, 0.2);
  }

  .app-shell .order-modal-header {
    padding: 16px 18px;
    background: #ffffff;
  }

  .app-shell .order-modal-header h2 {
    color: var(--ink);
    font-size: 20px;
    font-weight: 750;
  }

  .app-shell .order-modal-scroll {
    gap: 14px;
    padding: 16px 18px;
  }
}

@media (min-width: 1101px) and (max-width: 1360px) {
  .app-shell .app-topbar {
    grid-template-columns: minmax(220px, 1fr) max-content;
  }

  .app-shell .topbar-user {
    display: none;
  }

  .app-shell .workspace-grid,
  .app-shell .panel-grid,
  .app-shell .logistics-command-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  body.app-shell {
    background:
      linear-gradient(180deg, rgba(23, 111, 107, 0.05), transparent 260px),
      #f3f7f6;
    font-size: 14px;
  }

  .app-shell .shell {
    padding: 10px;
    gap: 10px;
  }

  .app-shell .app-topbar,
  .app-shell .top-nav,
  .app-shell .metric-card,
  .app-shell .data-panel,
  .app-shell .order-command-card,
  .app-shell .logistics-command-card {
    border: 1px solid #d9dee3;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 24px rgba(31, 41, 51, 0.04);
  }

  .app-shell .topbar-search-field {
    border-radius: 6px;
    background: #ffffff;
  }

  .app-shell .top-nav {
    top: 6.3rem;
  }

  .app-shell .nav-tab {
    min-height: 36px;
    border-radius: 6px;
    color: #344150;
  }

  .app-shell .nav-tab.active,
  .app-shell .nav-tab:hover {
    background: #e3f5ec;
    color: #176f6b;
  }

  .app-shell .hero h1 {
    font-size: 22px;
    font-weight: 750;
    letter-spacing: 0;
  }

  .app-shell .hero .lede,
  .app-shell .metric-card p,
  .app-shell .metric-card span {
    font-size: 13px;
  }

  .app-shell .metric-card strong {
    font-size: 28px;
  }

  .app-shell .card-grid,
  .app-shell .panel-grid,
  .app-shell .workspace-grid,
  .app-shell .logistics-command-grid {
    gap: 12px;
  }

  .app-shell .logistics-command-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .app-shell table.compact {
    min-width: 720px;
  }
}

