:root {
  --bg: #f4f6f5;
  --panel: #ffffff;
  --ink: #1f2a2a;
  --muted: #6a7573;
  --line: #dfe6e3;
  --accent: #176b5f;
  --accent-dark: color-mix(in srgb, var(--accent) 78%, black);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, white);
  --sidebar: #102522;
  --warn: #bb4d00;
  --warn-soft: #fff1e6;
  --shadow: 0 10px 30px rgba(24, 43, 38, .08);
}

.site-icp-footer {
  margin: 42px auto 0;
  padding: 18px 12px 4px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: rgba(75, 91, 88, .72);
  font-size: 13px;
  line-height: 1.7;
}

.site-icp-footer a {
  color: color-mix(in srgb, var(--accent) 78%, #16322e);
  text-decoration: none;
  font-weight: 700;
}

.site-icp-footer a:hover {
  text-decoration: underline;
}

.portal-body .site-icp-footer,
.module-body .site-icp-footer,
.guest-body .site-icp-footer {
  padding-bottom: 28px;
}

.login-body .site-icp-footer {
  color: rgba(247, 251, 249, .72);
  margin-top: 18px;
}

.login-body .site-icp-footer a {
  color: #f7fbf9;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  display: flex;
  min-height: 100vh;
}
.app-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 78% 8%, rgba(23,107,95,.08), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,.45), rgba(231,241,238,.28));
  z-index: -1;
}

.sidebar {
  width: 248px;
  background: var(--sidebar);
  color: #f7fbf9;
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  box-shadow: 18px 0 40px rgba(7, 28, 25, .12);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #e0f2ed;
  color: var(--accent-dark);
  font-weight: 800;
}
.brand strong { display: block; font-size: 16px; }
.brand span { display: block; margin-top: 4px; color: #b8c8c4; font-size: 12px; }

nav { display: grid; gap: 8px; }
nav a, .ghost-button {
  color: #dce8e5;
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
nav a.active, nav a:hover, .ghost-button:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.nav-count {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--accent-dark);
  font-size: 12px;
  line-height: 1;
}
.side-actions {
  margin-top: auto;
  display: grid;
  gap: 8px;
}
.user-card {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255,255,255,.12);
}
.user-card strong { display: block; }
.user-card span { display: block; margin-top: 5px; color: #b8c8c4; font-size: 12px; }
.ghost-button {
  width: 100%;
  display: block;
  border-color: rgba(255,255,255,.18);
}
.ghost-button.danger { color: #ffd5c2; }

.main {
  flex: 1;
  padding: 28px 30px 40px;
  min-width: 0;
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 22px;
  padding: 18px 20px;
  border: 1px solid rgba(223,230,227,.9);
  border-radius: 8px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 12px 36px rgba(24,43,38,.06);
  backdrop-filter: blur(16px);
}
h1, h2 { margin: 0; letter-spacing: 0; }
h1 { font-size: 26px; }
h2 { font-size: 17px; }
p { color: var(--muted); margin: 8px 0 0; }
.status-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
  white-space: nowrap;
}

.flash-wrap { display: grid; gap: 8px; margin-bottom: 16px; }
.flash {
  padding: 12px 14px;
  border: 1px solid #b9ded4;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 8px;
}

.readonly-field,
input[readonly].readonly-field {
  background: #eef6f3;
  color: var(--accent-dark);
  font-weight: 700;
  cursor: not-allowed;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.metric, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.metric { padding: 18px; }
.metric span { color: var(--muted); display: block; font-size: 13px; }
.metric strong { display: block; margin-top: 10px; font-size: 28px; }
.metric.warn { background: var(--warn-soft); border-color: #ffd5b8; }
.metric.warn strong { color: var(--warn); }

.ai-overview {
  margin-bottom: 16px;
  padding: 20px;
  border-top: 4px solid var(--accent);
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(241,248,247,.94));
  box-shadow: var(--shadow);
}
.ai-overview-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.ai-overview-head > div:first-child span {
  color: var(--accent);
  font-weight: 800;
}
.ai-overview-head h2 {
  margin-top: 6px;
  font-size: 22px;
}
.ai-score {
  min-width: 92px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.ai-score strong {
  font-size: 30px;
  line-height: 1;
}
.ai-score.good strong { color: #176b5f; }
.ai-score.watch strong { color: #a15c00; }
.ai-score.urgent strong { color: #b42318; }
.ai-score span {
  color: var(--muted);
  font-size: 13px;
}
.ai-summary-card {
  padding: 14px 0 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.ai-summary-card pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  line-height: 1.75;
  color: #233335;
}
.ai-suggestion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.ai-suggestion {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  background: #fff;
}
.ai-suggestion.watch { border-top-color: #c77700; }
.ai-suggestion.urgent { border-top-color: #b42318; }
.ai-suggestion.good { border-top-color: #176b5f; }
.ai-suggestion span {
  color: var(--muted);
  font-size: 13px;
}
.ai-suggestion h3 {
  margin: 4px 0 0;
  font-size: 16px;
}
.ai-suggestion p {
  line-height: 1.65;
}
.ai-suggestion ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: #415154;
  font-size: 13px;
  line-height: 1.55;
}
.ai-suggestion a {
  width: fit-content;
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}

.business-ai-panel {
  margin-bottom: 16px;
  border-left: 4px solid var(--accent);
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(240,248,246,.94));
}
.business-ai-panel .panel-head {
  align-items: flex-start;
}
.ai-kicker {
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}
.business-ai-source {
  max-width: 46%;
  text-align: right;
  line-height: 1.5;
}
.business-ai-panel pre {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  white-space: pre-wrap;
  word-break: break-word;
  color: #233335;
  font: inherit;
  line-height: 1.75;
}
.business-ai-panel.is-loading {
  position: relative;
}
.business-ai-panel.is-loading::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: aiLoading 1.2s ease-in-out infinite;
}
@keyframes aiLoading {
  0% { transform: scaleX(.1); opacity: .35; }
  50% { transform: scaleX(1); opacity: .9; }
  100% { transform: scaleX(.1); opacity: .35; }
}

.grid { display: grid; gap: 18px; margin-bottom: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.form-grid { grid-template-columns: minmax(320px, 360px) minmax(0, 1fr); align-items: start; }
.panel {
  padding: 18px;
  min-width: 0;
  border: 1px solid rgba(223,230,227,.92);
  border-radius: 8px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 16px 42px rgba(24,43,38,.075);
  backdrop-filter: blur(14px);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.panel-head a { color: var(--accent); text-decoration: none; font-weight: 700; }
.panel-head span { color: var(--muted); }

.list { display: grid; gap: 10px; }
.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.list-row span { color: var(--muted); display: block; margin-top: 4px; font-size: 12px; }
.negative { color: #b42318; }
.empty { color: var(--muted); padding: 20px 0; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
  white-space: nowrap;
}
.badge-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.pending-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.pending-grid div {
  background: #f6faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.pending-grid span { color: var(--muted); display: block; }
.pending-grid strong { display: block; margin-top: 8px; font-size: 26px; }

.bar-list { display: grid; gap: 12px; }
.bar-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 80px;
  gap: 12px;
  align-items: center;
}
.bar-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row div {
  height: 10px;
  border-radius: 999px;
  background: #edf2f0;
  overflow: hidden;
}
.bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}
.bar-row b { text-align: right; font-size: 13px; }

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
  text-align: left;
  vertical-align: middle;
}
th {
  color: var(--muted);
  font-weight: 700;
  background: rgba(247,250,249,.95);
  position: sticky;
  top: 0;
  z-index: 1;
}
tbody tr:hover td {
  background: rgba(242,248,246,.72);
}
.table-panel {
  overflow: hidden;
}
.table-panel table {
  min-width: 760px;
}
.table-panel {
  overflow-x: auto;
}
.import-panel {
  border-left: 4px solid var(--accent);
}
.alert-row td {
  background: var(--warn-soft);
}

button, .button {
  border: 0;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  padding: 10px 13px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transform: translateZ(0);
  transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s cubic-bezier(.2,.8,.2,1), background .28s ease, color .28s ease;
}
button:hover, .button:hover {
  background: var(--accent-dark);
  box-shadow: 0 12px 26px rgba(12, 95, 132, .18);
  transform: translateY(-1px);
}
button:active, .button:active {
  transform: translateY(0) scale(.985);
  box-shadow: none;
}
.button.secondary, button.secondary {
  background: #e8eeee;
  color: var(--ink);
}
.button.compact, button.compact {
  display: inline-block;
  padding: 6px 9px;
  font-size: 13px;
}
.link-danger {
  background: transparent;
  color: #b42318;
  border: 1px solid #ffd3cc;
  padding: 6px 9px;
}
.link-danger:hover {
  background: #fff1ee;
  color: #8c1d13;
}
.full { width: 100%; }

input, select, textarea {
  width: 100%;
  border: 1px solid #cbd7d3;
  border-radius: 8px;
  padding: 10px 11px;
  font: inherit;
  background: white;
  color: var(--ink);
}
input:disabled {
  background: #f4f6f5;
  color: var(--muted);
}
textarea { min-height: 74px; resize: vertical; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.field-hint {
  color: #6d7e84;
  font-size: 12px;
  line-height: 1.55;
}
.suggest-host {
  position: relative;
}
.suggest-box {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #c8d9de;
  border-radius: 8px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 18px 44px rgba(12, 48, 61, .16);
}
.suggest-box button {
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  text-align: left;
  font-weight: 500;
}
.suggest-box button:hover,
.suggest-box button:focus {
  background: var(--accent-soft);
  color: var(--accent-dark);
  box-shadow: none;
  transform: none;
}
.stack-form { display: grid; gap: 12px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.color-line {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}
.color-line input[type="color"] {
  height: 42px;
  padding: 4px;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
}
.toolbar input { max-width: 280px; }
.check {
  display: flex;
  align-items: center;
  grid-auto-flow: column;
  gap: 8px;
  white-space: nowrap;
}
.check input { width: auto; }
.inline-form { margin-top: 12px; }
.mini-form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.mini-form select { min-width: 90px; }
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.current-user-tag {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 6px 9px;
  border-radius: 8px;
  background: #eef5f3;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.asset-card-read {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
}
.asset-card-read div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #f8fbfa;
}
.asset-card-read span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}
.asset-card-read strong {
  display: block;
  font-size: 15px;
}
.asset-workbench {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.asset-workbench a {
  min-height: 178px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f8fbfa);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s cubic-bezier(.2,.8,.2,1), border-color .25s ease;
}
.asset-workbench a:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  box-shadow: 0 18px 44px rgba(24, 43, 38, .12);
}
.asset-workbench span {
  color: var(--accent);
  font-weight: 800;
}
.asset-workbench strong {
  display: block;
  font-size: 20px;
}
.asset-workbench p {
  margin: 0;
  line-height: 1.65;
  font-size: 13px;
}
.equipment-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}
.equipment-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.equipment-type-grid div {
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}
.equipment-type-grid strong {
  color: var(--ink);
  font-size: 18px;
}
.equipment-type-grid span,
.subtle-block {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.toolbar.equipment-status-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) 130px minmax(120px, .7fr) minmax(180px, 1fr) auto;
}
.equipment-status-form input,
.equipment-status-form select {
  max-width: none;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--sidebar);
}
.login-card {
  width: min(420px, 100%);
  background: var(--panel);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,.22);
}
.login-brand {
  color: var(--ink);
  margin-bottom: 22px;
}
.login-brand span { color: var(--muted); }
.login-note {
  font-size: 13px;
  line-height: 1.7;
}
.login-guest-link {
  margin-top: 12px;
  display: block;
}

.guest-body {
  display: block;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(247,251,252,.96), rgba(238,246,248,.98)),
    url("/static/facade-hero.jpg") center / cover fixed;
}
.guest-header {
  position: sticky;
}
.guest-logo {
  display: inline-flex;
  align-items: center;
}
.guest-main {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) clamp(18px, 4vw, 56px) 72px;
}
.guest-hero {
  max-width: 760px;
  margin-bottom: 28px;
}
.guest-hero span,
.guest-success span {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0;
}
.guest-hero h1,
.guest-success h1 {
  margin: 10px 0 0;
  font-size: clamp(42px, 8vw, 88px);
  line-height: 1;
}
.guest-hero p,
.guest-success p {
  max-width: 720px;
  margin-top: 18px;
  font-size: 17px;
  line-height: 1.9;
  color: #4c6066;
}
.guest-flash {
  max-width: 760px;
}
.guest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  align-items: start;
}
.guest-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(198,215,219,.82);
  border-radius: 8px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 48px rgba(18, 55, 68, .08);
  backdrop-filter: blur(18px);
}
.guest-card h2 {
  font-size: 22px;
}
.guest-equipment-card {
  grid-column: 1 / -1;
}
.guest-equipment-forms {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 18px;
  align-items: start;
}
.guest-equipment-forms h3 {
  margin: 0;
  font-size: 18px;
  color: var(--ink);
}
.guest-equipment-forms form {
  padding: 16px;
  border: 1px solid rgba(198,215,219,.72);
  border-radius: 8px;
  background: rgba(251,253,252,.78);
}
.guest-history-card {
  margin: 0 0 22px;
  padding: 20px;
  border: 1px solid rgba(198,215,219,.82);
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 18px 48px rgba(18, 55, 68, .08);
  backdrop-filter: blur(18px);
}
.guest-history-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}
.guest-history-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.guest-history-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(251,253,252,.94);
}
.guest-history-item.approved {
  border-color: rgba(23,107,95,.22);
  background: rgba(237,248,245,.92);
}
.guest-history-item.rejected {
  border-color: rgba(184,62,34,.24);
  background: rgba(255,247,244,.92);
}
.guest-history-result {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,.78);
}
.guest-history-result p {
  margin: 6px 0 0;
  color: var(--ink);
  line-height: 1.7;
}
.guest-history-result span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}
.guest-success {
  width: min(560px, calc(100% - 36px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  align-content: center;
  justify-items: start;
  padding: 48px 0;
}
.guest-success img {
  height: 58px;
  width: auto;
  margin-bottom: 28px;
}
.review-list {
  display: grid;
  gap: 14px;
}
.review-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}
.review-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}
.review-card-head strong {
  display: block;
  font-size: 17px;
}
.review-card-head span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}
.payload-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  margin: 14px 0;
}
.payload-list div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.payload-list dt {
  color: var(--muted);
  font-size: 12px;
}
.payload-list dd {
  margin: 5px 0 0;
  color: var(--ink);
  word-break: break-word;
}
.review-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.review-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.review-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.review-switch a {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}
.review-switch a.active,
.review-switch a:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.appearance-preview {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f8fbfa;
}
.preview-side {
  color: white;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 10px;
}
.preview-side .brand-mark {
  margin-bottom: 4px;
}
.preview-side span {
  color: rgba(255,255,255,.72);
  font-size: 12px;
}
.preview-main {
  padding: 22px;
  display: grid;
  align-content: start;
  gap: 14px;
}
.preview-main .status-pill {
  justify-self: start;
}
.preview-main h2 {
  font-size: 22px;
}
.preview-main p {
  margin: 0;
  line-height: 1.7;
}

.portal-body,
.module-body {
  display: block;
  min-height: 100vh;
  background: #f7fbfc;
}
.portal-header,
.module-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 5vw, 72px);
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid #e2ebee;
}
.portal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(180%) blur(18px);
  transition: box-shadow .35s ease, background .35s ease, border-color .35s ease;
}
.portal-header.scrolled {
  background: rgba(255,255,255,.82);
  border-color: rgba(210,226,232,.7);
  box-shadow: 0 10px 30px rgba(18, 55, 68, .08);
}
.portal-header img,
.module-header img {
  height: 48px;
  width: auto;
  display: block;
}
.portal-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.portal-header nav a,
.module-header a {
  color: #25404a;
  text-decoration: none;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background .26s ease, color .26s ease, transform .26s cubic-bezier(.2,.8,.2,1);
}
.portal-header nav a:hover,
.module-header a:hover {
  background: #edf5f7;
  transform: translateY(-1px);
}
.module-header > div {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #25404a;
}
.portal-hero {
  position: relative;
  min-height: calc(100vh - 74px);
  display: flex;
  align-items: center;
  padding: clamp(48px, 8vw, 96px) clamp(22px, 7vw, 96px);
  background: #f7fbfc;
  overflow: hidden;
}
.portal-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/static/facade-hero.jpg");
  background-repeat: no-repeat;
  background-position: center 45%;
  background-size: cover;
  filter: saturate(1.12) contrast(1.12) brightness(1.04);
  transform: scale(1.02);
  animation: heroDrift 16s cubic-bezier(.2,.8,.2,1) both;
}
.portal-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 52% 43%, rgba(255,255,255,0) 0 24%, rgba(247,251,252,.06) 36%, rgba(247,251,252,.16) 58%, rgba(247,251,252,.24) 100%),
    linear-gradient(90deg, rgba(247,251,252,.96) 0%, rgba(247,251,252,.70) 28%, rgba(247,251,252,.12) 50%, rgba(247,251,252,.04) 100%);
}
.portal-copy span,
.module-intro span,
.module-card > span {
  color: #087db5;
  font-weight: 800;
  letter-spacing: 0;
}
.portal-copy {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(255,255,255,.58);
  background: rgba(255,255,255,.54);
  box-shadow: 0 28px 70px rgba(11, 55, 75, .12);
  backdrop-filter: blur(18px) saturate(150%);
}
.portal-copy h1,
.module-intro h1 {
  margin: 16px 0 0;
  color: #122b35;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 1.08;
}
.portal-copy p,
.module-intro p {
  max-width: 760px;
  margin-top: 18px;
  color: #4c6269;
  font-size: 18px;
  line-height: 1.8;
}
.portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.company-hero {
  align-items: flex-end;
  justify-content: flex-start;
  min-height: calc(100vh - 74px);
  padding: clamp(36px, 6vw, 78px) clamp(22px, 5vw, 72px) clamp(36px, 7vw, 86px);
}
.company-hero::before {
  background-position: center 38%;
  filter: saturate(1.18) contrast(1.08) brightness(1.03);
}
.company-hero::after {
  background:
    linear-gradient(90deg, rgba(247,251,252,.96) 0%, rgba(247,251,252,.72) 25%, rgba(247,251,252,.08) 41%, rgba(247,251,252,0) 100%),
    linear-gradient(0deg, rgba(247,251,252,.56) 0%, rgba(247,251,252,.08) 34%, rgba(247,251,252,0) 100%);
}
.company-copy {
  width: min(430px, 100%);
  padding: clamp(20px, 3vw, 32px);
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(10px) saturate(135%);
}
.company-copy h1 {
  font-size: clamp(42px, 5.5vw, 78px);
}
.company-copy p {
  max-width: 390px;
  font-size: clamp(15px, 1.45vw, 17px);
}
.company-intro {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 34px;
  align-items: end;
}
.company-highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #d8e6ea;
  border-left: 1px solid #d8e6ea;
}
.company-highlights div {
  min-height: 130px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 22px;
  border-right: 1px solid #d8e6ea;
  border-bottom: 1px solid #d8e6ea;
  background: #fff;
}
.company-highlights strong {
  color: #0b98d0;
  font-size: clamp(25px, 3vw, 42px);
  line-height: 1;
}
.company-highlights span {
  color: #536a72;
  font-weight: 700;
}
.business-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: #d8e6ea;
  border: 1px solid #d8e6ea;
}
.business-grid article {
  min-height: 310px;
  display: grid;
  align-content: space-between;
  gap: 20px;
  padding: clamp(22px, 3vw, 34px);
  background: #fff;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), background .35s ease, box-shadow .35s ease;
}
.business-grid article:hover {
  position: relative;
  z-index: 1;
  background: #fbfdfe;
  box-shadow: 0 18px 44px rgba(20, 61, 74, .1);
  transform: translateY(-3px);
}
.business-grid article span,
.vision-section span,
.service-principle span {
  color: #0b98d0;
  font-weight: 800;
}
.business-grid h3 {
  margin: 14px 0 0;
  color: #132c35;
  font-size: clamp(21px, 2vw, 28px);
}
.business-grid p {
  margin: 0;
  line-height: 1.85;
}
.advantage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.advantage-grid div {
  min-height: 190px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid #d9e8ec;
  background: linear-gradient(180deg, #fff, #f8fbfa);
  box-shadow: 0 16px 42px rgba(20, 61, 74, .07);
}
.advantage-grid strong {
  display: block;
  color: #132c35;
  font-size: 22px;
}
.advantage-grid p {
  line-height: 1.85;
}
.vision-section {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 1px;
  background: #d8e6ea;
  padding: 1px;
}
.vision-section > div {
  min-height: 340px;
  display: grid;
  align-content: center;
  padding: clamp(28px, 6vw, 72px);
  background: #102a34;
  color: #fff;
}
.vision-section h2 {
  margin-top: 14px;
  color: #fff;
  font-size: clamp(28px, 4vw, 48px);
}
.vision-section p {
  max-width: 840px;
  color: rgba(255,255,255,.76);
  line-height: 1.9;
  font-size: 16px;
}
.vision-section .service-principle {
  background: #fff;
  color: #132c35;
}
.service-principle strong {
  margin-top: 16px;
  color: #132c35;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: 0;
}
.service-principle p {
  color: #5f7278;
}
.portal-section {
  padding: clamp(42px, 7vw, 86px) clamp(22px, 7vw, 96px);
  background: #fff;
}
.portal-title {
  max-width: 860px;
  margin-bottom: 28px;
}
.portal-title span {
  color: #0b98d0;
  font-weight: 800;
}
.portal-title h2 {
  margin-top: 10px;
  color: #142f38;
  font-size: clamp(28px, 4vw, 46px);
}
.portal-title p {
  color: #5f7278;
  line-height: 1.8;
  font-size: 16px;
}
.intro-strip {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 34px;
  align-items: end;
}
.portal-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #d8e6ea;
  border-left: 1px solid #d8e6ea;
}
.portal-stats div {
  padding: 22px;
  border-right: 1px solid #d8e6ea;
  border-bottom: 1px solid #d8e6ea;
}
.portal-stats strong {
  display: block;
  color: #0b98d0;
  font-size: clamp(30px, 4vw, 46px);
}
.portal-stats span {
  display: block;
  margin-top: 8px;
  color: #536a72;
}
.portal-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.portal-matrix a {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  display: grid;
  align-content: space-between;
  gap: 20px;
  padding: clamp(26px, 4vw, 42px);
  color: inherit;
  text-decoration: none;
  border: 1px solid #d7e7ec;
  border-top: 5px solid #0b98d0;
  background: linear-gradient(90deg, rgba(255,255,255,.97), rgba(255,255,255,.84)), var(--card-image), #fff;
  background-position: center;
  background-size: cover;
  box-shadow: 0 18px 45px rgba(20, 61, 74, .08);
  transition: transform .55s cubic-bezier(.2,.8,.2,1), box-shadow .55s cubic-bezier(.2,.8,.2,1), border-color .35s ease;
}
.portal-matrix a:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 70px rgba(20, 61, 74, .14);
  border-color: #9bcddd;
}
.portal-matrix a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,.42) 45%, transparent 64%);
  transform: translateX(-110%);
  transition: transform .8s cubic-bezier(.2,.8,.2,1);
}
.portal-matrix a:hover::after {
  transform: translateX(110%);
}
.portal-matrix a + a {
  border-top-color: #7a5c2e;
}
.portal-matrix strong {
  color: #132c35;
  font-size: clamp(24px, 3vw, 36px);
}
.portal-matrix p {
  margin: 0;
  line-height: 1.8;
}
.portal-matrix span {
  color: #0b98d0;
  font-weight: 800;
}
.muted-section {
  background: #f4f8f9;
}
.scene-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: #d8e6ea;
  border: 1px solid #d8e6ea;
}
.scene-grid div {
  min-height: 170px;
  background: #fff;
  padding: 26px;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), background .35s ease;
}
.scene-grid div:hover {
  background: #fbfdfe;
  transform: translateY(-2px);
}
.scene-grid strong {
  display: block;
  color: #132c35;
  font-size: 20px;
}
.scene-grid p {
  line-height: 1.8;
}
.portal-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: #d8e6ea;
  padding: 1px;
}
.portal-band div {
  background: #fff;
  padding: clamp(24px, 5vw, 48px);
}
.portal-band span {
  color: #0b98d0;
  font-weight: 800;
}
.portal-band h2 {
  margin-top: 12px;
  color: #142f38;
  font-size: 22px;
}
.portal-band p {
  line-height: 1.8;
}
.portal-contact {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  padding: clamp(34px, 6vw, 72px) clamp(22px, 7vw, 96px);
  background: #102a34;
  color: #fff;
}
.portal-contact h2 {
  font-size: clamp(24px, 4vw, 42px);
}
.portal-contact p {
  color: rgba(255,255,255,.74);
}

.website-logo {
  display: inline-flex;
  align-items: center;
}

.website-subhero {
  min-height: 360px;
  padding: 140px 5vw 72px;
  display: grid;
  align-content: end;
  background:
    linear-gradient(90deg, rgba(245, 251, 252, .96), rgba(245, 251, 252, .72) 48%, rgba(245, 251, 252, .35)),
    url("/static/facade-hero.jpg") center / cover;
  border-bottom: 1px solid rgba(195, 216, 222, .58);
}

.website-subhero span {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.website-subhero h1 {
  margin: 14px 0 14px;
  color: var(--ink);
  font-size: clamp(44px, 6vw, 88px);
  line-height: .95;
}

.website-subhero p {
  max-width: 720px;
  color: #3f5f67;
  font-size: 18px;
  line-height: 1.9;
}

.service-subhero {
  background:
    linear-gradient(90deg, rgba(245, 251, 252, .96), rgba(245, 251, 252, .72) 48%, rgba(245, 251, 252, .32)),
    url("/static/admin-visual-bg.png") center / cover;
}

.recruit-subhero {
  background:
    linear-gradient(90deg, rgba(245, 251, 252, .98), rgba(245, 251, 252, .78) 48%, rgba(245, 251, 252, .36)),
    url("/static/portal-abstract.jpg") center / cover;
}

.website-business-grid article,
.website-capability-grid div,
.job-grid article,
.website-process div {
  border-radius: 8px;
  border: 1px solid rgba(205, 224, 229, .86);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 18px 52px rgba(11, 43, 54, .08);
}

.website-process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.website-process div {
  padding: 22px;
}

.website-process b {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  margin-bottom: 20px;
}

.website-process strong,
.website-capability-grid strong,
.job-grid h3 {
  display: block;
  color: var(--ink);
  font-size: 20px;
  margin-bottom: 10px;
}

.website-process p,
.website-capability-grid p,
.job-grid p {
  margin: 0;
  color: #527078;
  line-height: 1.8;
}

.website-capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.website-capability-grid div {
  padding: 24px;
}

.website-scene-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.website-scene-list span {
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(21, 130, 118, .18);
  background: rgba(255, 255, 255, .82);
  color: var(--accent-dark);
  font-weight: 800;
}

.job-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.job-grid article {
  padding: 24px;
}

.job-grid span {
  display: block;
  margin-top: 18px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}
.module-main {
  padding: clamp(28px, 6vw, 76px);
}
.module-intro {
  margin-bottom: 24px;
}
.module-ai-search {
  max-width: 1060px;
  margin: 0 0 30px;
}
.ai-search-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 10px;
}
.ai-search-title span {
  color: #087db5;
  font-weight: 800;
}
.ai-search-title p {
  margin: 0;
  font-size: 13px;
}
.ai-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: stretch;
  border: 1px solid #b9d5df;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(20, 61, 74, .1);
  overflow: hidden;
  transition: box-shadow .32s cubic-bezier(.2,.8,.2,1), border-color .32s ease, transform .32s cubic-bezier(.2,.8,.2,1);
}
.ai-search-form:focus-within {
  border-color: #0b98d0;
  box-shadow: 0 24px 68px rgba(11, 80, 110, .16);
  transform: translateY(-1px);
}
.ai-search-form input {
  height: 58px;
  border: 0;
  border-radius: 0;
  padding: 0 20px;
  font-size: 17px;
  outline: none;
}
.ai-search-form button {
  border-radius: 0;
  background: #0b98d0;
  font-size: 17px;
}
.ai-search-form button:hover {
  background: #087db5;
  box-shadow: none;
  transform: none;
}
.ai-search-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.ai-search-examples button {
  padding: 7px 10px;
  border: 1px solid #d4e3e7;
  border-radius: 8px;
  background: rgba(255,255,255,.72);
  color: #35515a;
  font-size: 13px;
  font-weight: 700;
}
.ai-search-examples button:hover {
  background: #fff;
  color: #087db5;
  box-shadow: 0 8px 20px rgba(20, 61, 74, .08);
}
.module-ai-result {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #d9e8ec;
  border-radius: 8px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 16px 40px rgba(20, 61, 74, .08);
}
.module-ai-result > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.module-ai-result strong {
  color: #132c35;
}
.module-ai-result span {
  color: var(--muted);
  font-size: 13px;
}
.module-ai-result pre {
  margin: 0;
  padding: 14px;
  border: 1px solid #e1eaed;
  border-radius: 8px;
  background: #fbfdfd;
  color: #20343b;
  font: 14px/1.85 "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  white-space: pre-wrap;
  word-break: break-word;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.module-card {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid #d9e8ec;
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.88)), var(--module-image), #fff;
  background-position: center;
  background-size: cover;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 18px 46px rgba(20, 61, 74, .08);
  transition: transform .55s cubic-bezier(.2,.8,.2,1), box-shadow .55s cubic-bezier(.2,.8,.2,1), border-color .35s ease;
}
.module-card:hover {
  transform: translateY(-7px);
  border-color: #9bcddd;
  box-shadow: 0 30px 76px rgba(20, 61, 74, .15);
}
.module-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,.45) 45%, transparent 64%);
  transform: translateX(-115%);
  transition: transform .85s cubic-bezier(.2,.8,.2,1);
}
.module-card:hover::after {
  transform: translateX(115%);
}
.module-card h2 {
  color: #132c35;
  font-size: clamp(26px, 4vw, 42px);
}
.module-card p {
  max-width: 620px;
  line-height: 1.8;
  font-size: 16px;
}
.module-card.assets {
  border-top: 5px solid #7a5c2e;
}
.module-card.office {
  border-top: 5px solid #0b98d0;
}
.module-card.equipment {
  border-top: 5px solid #176b5f;
  background:
    linear-gradient(90deg, rgba(255,255,255,.96), rgba(255,255,255,.80)),
    radial-gradient(circle at 82% 20%, rgba(23,107,95,.13), transparent 36%),
    linear-gradient(135deg, #f7fbfa, #eef6f3);
}
.module-metrics {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  align-items: end;
  gap: 8px 10px;
  padding-top: 18px;
  border-top: 1px solid #e2ecef;
}
.module-metrics b {
  color: #132c35;
  font-size: 36px;
  line-height: 1;
}
.module-metrics em {
  color: #687d84;
  font-style: normal;
  padding-bottom: 3px;
}
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .9s cubic-bezier(.2,.8,.2,1), transform .9s cubic-bezier(.2,.8,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ai-hero {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid #d9e8ec;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(246,250,251,.92)),
    linear-gradient(90deg, rgba(11,152,208,.12), rgba(23,107,95,.12));
  box-shadow: var(--shadow);
}
.ai-hero span {
  color: #0b6f8f;
  font-weight: 800;
}
.ai-hero h2 {
  margin-top: 10px;
  font-size: clamp(24px, 3vw, 38px);
  color: #132c35;
}
.ai-hero p {
  max-width: 760px;
  line-height: 1.7;
}
.ai-hero-metrics {
  min-width: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 18px;
  border: 1px solid #d9e8ec;
  border-radius: 8px;
  background: #fff;
}
.ai-hero-metrics strong {
  color: var(--accent-dark);
  font-size: 30px;
}
.ai-hero-metrics span {
  color: var(--muted);
  font-size: 13px;
}
.ai-layout {
  grid-template-columns: 360px minmax(0, 1fr);
}
.ai-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.ai-quick-actions a {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf9;
  color: var(--accent-dark);
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  transition: transform .28s cubic-bezier(.2,.8,.2,1), border-color .28s ease, background .28s ease;
}
.ai-quick-actions a:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: var(--accent-soft);
}
.ai-result-panel {
  min-height: 420px;
}
.ai-answer {
  min-height: 320px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--ink);
  font: 14px/1.85 "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  white-space: pre-wrap;
  word-break: break-word;
}
.ai-async-result.is-loading .ai-answer,
.module-ai-result.is-loading pre {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: linear-gradient(180deg, #fbfdfc, #f2faf8);
}
.ai-async-result.is-loading,
.module-ai-result.is-loading {
  position: relative;
}
.ai-async-result.is-loading::after,
.module-ai-result.is-loading::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: aiLoading 1.2s ease-in-out infinite;
}
.ai-empty {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.ai-empty div {
  min-height: 122px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}
.ai-empty strong {
  display: block;
  color: #132c35;
}
.ai-empty span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 13px;
}

@keyframes heroDrift {
  from { transform: scale(1.065) translateY(10px); }
  to { transform: scale(1.02) translateY(0); }
}

@media (max-width: 980px) {
  body { display: block; }
  .sidebar {
    position: static;
    width: auto;
    height: auto;
  }
  nav { grid-template-columns: repeat(3, 1fr); }
  .metrics, .grid.two, .grid.form-grid, .ai-suggestion-grid { grid-template-columns: 1fr; }
  .equipment-grid { grid-template-columns: 1fr; }
  .equipment-status-form { grid-template-columns: 1fr; }
  .appearance-preview { grid-template-columns: 1fr; }
  .asset-card-read { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .asset-workbench { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-hero,
  .module-grid,
  .ai-layout,
  .company-intro,
  .business-grid,
  .advantage-grid,
  .vision-section,
  .guest-grid,
  .intro-strip,
  .portal-matrix,
  .scene-grid,
  .portal-stats,
  .portal-band,
  .website-process,
  .website-capability-grid,
  .job-grid {
    grid-template-columns: 1fr;
  }
  .topbar { display: block; }
  .ai-overview-head { display: grid; }
  .business-ai-panel .panel-head { display: grid; }
  .business-ai-source { max-width: none; text-align: left; }
  .ai-hero { display: grid; }
  .status-pill { display: inline-block; margin-top: 12px; }
  .payload-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-actions { grid-template-columns: 1fr; }
  .guest-history-form { grid-template-columns: 1fr; }
  .guest-equipment-forms { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 560px) {
  .main { padding: 18px; }
  nav { grid-template-columns: repeat(2, 1fr); }
  .metrics { grid-template-columns: 1fr 1fr; }
  .toolbar, .split { display: grid; grid-template-columns: 1fr; }
  .asset-card-read { grid-template-columns: 1fr; }
  .asset-workbench { grid-template-columns: 1fr; }
  .equipment-type-grid { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 82px minmax(0, 1fr) 64px; }
  .portal-header,
  .module-header,
  .portal-contact,
  .module-header > div {
    align-items: flex-start;
    flex-direction: column;
  }
  .module-metrics {
    grid-template-columns: auto 1fr;
  }
  .company-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .company-hero {
    align-items: flex-end;
    min-height: 760px;
  }
  .company-hero::before {
    background-position: 58% 34%;
  }
  .company-copy {
    width: min(430px, 100%);
  }
  .ai-search-title,
  .module-ai-result > div {
    align-items: flex-start;
    flex-direction: column;
  }
  .ai-search-form {
    grid-template-columns: minmax(0, 1fr) 86px;
  }
  .ai-search-form input {
    height: 52px;
    padding: 0 12px;
    font-size: 15px;
  }
  .ai-search-form button {
    font-size: 15px;
  }
  .company-highlights {
    grid-template-columns: 1fr;
  }
  .company-hero {
    min-height: 720px;
    padding: 28px 18px 34px;
  }
  .company-hero::after {
    background:
      linear-gradient(180deg, rgba(247,251,252,.08) 0%, rgba(247,251,252,.24) 42%, rgba(247,251,252,.78) 100%);
  }
  .company-copy {
    width: 100%;
  }
  .ai-empty,
  .ai-quick-actions,
  .payload-list,
  .review-form {
    grid-template-columns: 1fr;
  }
  .guest-main {
    padding: 28px 16px 48px;
  }
  .guest-hero h1,
  .guest-success h1 {
    font-size: 46px;
  }
}

/* 2026 full interface refresh */
:root {
  --bg: #eef5f7;
  --panel: rgba(255, 255, 255, .92);
  --ink: #102a33;
  --muted: #61747a;
  --line: #d5e3e7;
  --accent-dark: color-mix(in srgb, var(--accent) 76%, #061a20);
  --accent-soft: color-mix(in srgb, var(--accent) 11%, #ffffff);
  --blue: #0b98d0;
  --blue-dark: #0877a5;
  --gold: #a97628;
  --surface-glass: rgba(255, 255, 255, .78);
  --shadow: 0 18px 50px rgba(12, 48, 61, .10);
  --shadow-strong: 0 26px 78px rgba(12, 48, 61, .16);
}

body.app-body {
  background:
    linear-gradient(115deg, rgba(238, 245, 247, .98) 0%, rgba(246, 250, 251, .94) 46%, rgba(232, 242, 245, .94) 100%),
    url("/static/admin-visual-bg.png") right bottom / min(70vw, 1120px) auto no-repeat fixed;
}

.sidebar {
  width: 264px;
  border-right: 1px solid rgba(255, 255, 255, .12);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--sidebar) 88%, #0b98d0) 0%, var(--sidebar) 54%, #071618 100%);
  box-shadow: 18px 0 60px rgba(7, 22, 24, .18);
  overflow-y: auto;
}

.brand {
  min-height: 54px;
}

.brand-logo-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255,255,255,.92);
  padding: 5px;
  box-shadow: 0 10px 24px rgba(0,0,0,.14);
}

.brand strong {
  line-height: 1.2;
}

.sidebar nav a,
.ghost-button {
  position: relative;
  min-height: 42px;
  border-radius: 8px;
  transition: background .28s ease, color .28s ease, transform .28s cubic-bezier(.2,.8,.2,1), border-color .28s ease;
}

.sidebar nav a::before {
  content: "";
  width: 3px;
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  border-radius: 999px;
  background: transparent;
}

.sidebar nav a.active,
.sidebar nav a:hover {
  background: rgba(255,255,255,.13);
  transform: translateX(2px);
}

.sidebar nav a.active::before {
  background: #4fc3f7;
}

.main {
  position: relative;
  padding: clamp(22px, 3vw, 36px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  align-items: center;
  padding: 16px 18px;
  margin: -8px -8px 20px;
  border: 1px solid rgba(213, 227, 231, .72);
  border-radius: 8px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 12px 34px rgba(12, 48, 61, .08);
  backdrop-filter: blur(18px) saturate(160%);
}

.topbar h1 {
  font-size: clamp(24px, 2.7vw, 34px);
  line-height: 1.15;
}

.status-pill {
  border: 1px solid color-mix(in srgb, var(--accent) 18%, #ffffff);
  box-shadow: 0 8px 20px rgba(12, 48, 61, .06);
}

.metric,
.panel,
.guest-card,
.review-card,
.asset-workbench a,
.ai-hero,
.module-ai-result,
.login-card {
  border-color: rgba(203, 219, 224, .82);
  background: var(--surface-glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(150%);
}

.metric,
.panel {
  position: relative;
  overflow: hidden;
}

.metric::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), color-mix(in srgb, var(--accent) 70%, #ffffff), var(--gold));
  opacity: .75;
}

.metric {
  min-height: 132px;
  display: grid;
  align-content: center;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, border-color .35s ease;
}

.metric:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
}

.metric strong {
  color: #0f303a;
  font-size: clamp(28px, 3vw, 38px);
}

.metric.warn {
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,248,240,.88));
}

.panel {
  padding: clamp(16px, 2vw, 22px);
}

.panel-head h2 {
  color: #12313a;
  font-size: 18px;
}

.panel-head span,
.panel-head a {
  font-size: 13px;
}

.list-row,
.payload-list div,
.pending-grid div,
.equipment-type-grid div,
.ai-empty div,
.current-user-tag {
  border-color: rgba(211, 225, 229, .9);
  background: rgba(255,255,255,.72);
}

.list-row {
  transition: transform .28s cubic-bezier(.2,.8,.2,1), border-color .28s ease, background .28s ease;
}

.list-row:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
  background: #fff;
}

table {
  border-spacing: 0;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #466067;
  background: rgba(244, 249, 250, .96);
}

td {
  background: rgba(255,255,255,.48);
}

tbody tr {
  transition: background .22s ease;
}

tbody tr:hover td {
  background: #f7fbfc;
}

input,
select,
textarea {
  border-color: #c8d9de;
  background: rgba(255,255,255,.92);
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(11, 152, 208, .12);
}

button,
.button {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, var(--blue)));
  box-shadow: 0 10px 22px rgba(11, 116, 150, .14);
}

button:hover,
.button:hover {
  background: linear-gradient(135deg, var(--accent-dark), var(--blue-dark));
  box-shadow: 0 16px 34px rgba(11, 116, 150, .22);
}

button:focus-visible,
.button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(11, 152, 208, .28);
  outline-offset: 2px;
}

.button.secondary,
button.secondary {
  background: #eaf2f4;
  color: #15333c;
  box-shadow: none;
}

.link-danger {
  background: rgba(255, 247, 244, .9);
  box-shadow: none;
}

.toolbar {
  flex-wrap: wrap;
}

.toolbar input,
.toolbar select {
  min-height: 42px;
}

.login-body {
  background:
    linear-gradient(90deg, rgba(247,251,252,.96) 0%, rgba(247,251,252,.86) 44%, rgba(247,251,252,.28) 74%, rgba(247,251,252,.12) 100%),
    url("/static/admin-visual-bg.png") center / cover no-repeat;
}

.login-card {
  width: min(440px, 100%);
  margin-right: min(52vw, 700px);
  border: 1px solid rgba(255,255,255,.74);
  background: rgba(255,255,255,.82);
}

.login-brand .brand-logo-mark {
  box-shadow: 0 10px 24px rgba(8, 83, 111, .13);
}

.login-note {
  color: #6b7f85;
}

.portal-body,
.module-body {
  background:
    linear-gradient(180deg, #f8fbfc 0%, #eef6f8 100%);
}

.portal-header,
.module-header {
  min-height: 80px;
  border-bottom-color: rgba(210, 226, 232, .76);
  box-shadow: 0 8px 28px rgba(12, 48, 61, .05);
}

.portal-header nav,
.module-header > div {
  gap: 8px;
}

.portal-header nav a,
.module-header a {
  border: 1px solid transparent;
}

.portal-header nav a:hover,
.module-header a:hover {
  border-color: #dbe9ed;
  background: rgba(237, 245, 247, .88);
}

.portal-hero {
  min-height: calc(100svh - 118px);
}

.company-hero {
  min-height: calc(100svh - 118px);
  align-items: flex-end;
}

.company-hero::before {
  background-position: center 36%;
  filter: saturate(1.14) contrast(1.08) brightness(1.04);
}

.company-hero::after {
  background:
    linear-gradient(90deg, rgba(248,251,252,.96) 0%, rgba(248,251,252,.82) 22%, rgba(248,251,252,.22) 39%, rgba(248,251,252,0) 58%),
    linear-gradient(0deg, rgba(248,251,252,.64) 0%, rgba(248,251,252,.16) 28%, rgba(248,251,252,0) 64%);
}

.portal-copy,
.company-copy {
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
}

.company-copy {
  width: min(520px, 100%);
}

.portal-copy h1,
.module-intro h1 {
  color: #102d37;
  text-shadow: 0 1px 0 rgba(255,255,255,.72);
}

.portal-copy p {
  color: #405961;
  text-shadow: 0 1px 0 rgba(255,255,255,.68);
}

.portal-actions .button,
.portal-contact .button {
  min-width: 120px;
}

.portal-section {
  position: relative;
}

.business-grid article,
.advantage-grid div,
.company-highlights div,
.portal-band div,
.scene-grid div {
  background: rgba(255,255,255,.88);
}

.vision-section > div {
  background:
    linear-gradient(135deg, #102a34, #0b3c4c);
}

.module-body {
  background:
    linear-gradient(90deg, rgba(248,251,252,.96) 0%, rgba(248,251,252,.90) 46%, rgba(248,251,252,.72) 100%),
    url("/static/admin-visual-bg.png") right top / min(72vw, 1220px) auto no-repeat fixed;
}

.module-main {
  padding-top: clamp(28px, 4vw, 58px);
}

.module-intro {
  max-width: 860px;
}

.module-intro h1 {
  font-size: clamp(46px, 6vw, 78px);
}

.module-ai-search {
  max-width: 1180px;
  padding: clamp(14px, 2vw, 18px);
  border: 1px solid rgba(208, 225, 230, .78);
  border-radius: 8px;
  background: rgba(255,255,255,.64);
  box-shadow: 0 18px 55px rgba(12, 48, 61, .08);
  backdrop-filter: blur(18px) saturate(150%);
}

.ai-search-form {
  border-radius: 8px;
  background: rgba(255,255,255,.96);
}

.ai-search-form input {
  height: 62px;
}

.ai-search-form button {
  min-width: 108px;
}

.module-grid {
  align-items: stretch;
}

.module-card {
  min-height: 390px;
  border-top-width: 4px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.82)),
    var(--module-image),
    #fff;
  background-position: center;
  background-size: cover;
}

.module-card.equipment {
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.80)),
    url("/static/admin-visual-bg.png") right center / cover no-repeat;
}

.module-card h2 {
  line-height: 1.15;
}

.module-card:hover,
.asset-workbench a:hover {
  transform: translateY(-6px);
}

.module-metrics {
  background: rgba(255,255,255,.52);
  border-top-color: rgba(213, 227, 231, .92);
}

.guest-body {
  background:
    linear-gradient(90deg, rgba(247,251,252,.96), rgba(247,251,252,.86) 48%, rgba(247,251,252,.62)),
    url("/static/admin-visual-bg.png") center / cover fixed;
}

.guest-hero {
  max-width: 860px;
}

.guest-card {
  min-height: 100%;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, border-color .35s ease;
}

.guest-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
  box-shadow: var(--shadow-strong);
}

.review-switch {
  padding: 8px;
  border: 1px solid rgba(211, 225, 229, .86);
  border-radius: 8px;
  background: rgba(255,255,255,.66);
  box-shadow: 0 12px 34px rgba(12,48,61,.06);
}

.review-switch a {
  border-color: transparent;
}

.review-card {
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease, border-color .3s ease;
}

.review-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
}

.ai-hero {
  background:
    linear-gradient(90deg, rgba(255,255,255,.94), rgba(255,255,255,.72)),
    url("/static/admin-visual-bg.png") right center / cover no-repeat;
}

.ai-result-panel {
  background: rgba(255,255,255,.84);
}

.ai-answer {
  background: rgba(250,253,253,.92);
}

.ui-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity .62s cubic-bezier(.2,.8,.2,1) var(--ui-delay, 0ms),
    transform .62s cubic-bezier(.2,.8,.2,1) var(--ui-delay, 0ms);
}

.ui-reveal.ui-visible {
  opacity: 1;
  transform: translateY(0);
}

.metric.ui-visible:hover,
.guest-card.ui-visible:hover {
  transform: translateY(-3px);
}

.review-card.ui-visible:hover {
  transform: translateY(-2px);
}

.asset-workbench a.ui-visible:hover {
  transform: translateY(-6px);
}

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

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

  .login-card {
    margin-right: 0;
  }
}

@media (max-width: 980px) {
  body.app-body {
    background:
      linear-gradient(180deg, rgba(238,245,247,.98), rgba(248,251,252,.94)),
      url("/static/admin-visual-bg.png") right bottom / 980px auto no-repeat;
  }

  .sidebar {
    width: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }

  .topbar {
    position: static;
    margin: 0 0 18px;
  }

  .portal-hero,
  .company-hero {
    min-height: auto;
    padding-top: 80px;
    padding-bottom: 72px;
  }

  .company-hero::after {
    background:
      linear-gradient(180deg, rgba(248,251,252,.28) 0%, rgba(248,251,252,.72) 46%, rgba(248,251,252,.94) 100%);
  }
}

@media (max-width: 700px) {
  .metrics,
  .module-grid,
  .business-grid {
    grid-template-columns: 1fr;
  }

  .main {
    padding: 16px;
  }

  .topbar {
    padding: 14px;
  }

  .module-ai-search {
    padding: 12px;
  }

  .ai-search-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-search-form button {
    min-height: 48px;
  }

  .login-body {
    padding: 18px;
    background:
      linear-gradient(180deg, rgba(247,251,252,.96), rgba(247,251,252,.84)),
      url("/static/admin-visual-bg.png") center / cover no-repeat;
  }

  .login-card {
    padding: 22px;
  }

  .portal-copy h1,
  .module-intro h1 {
    font-size: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ui-reveal {
    opacity: 1;
    transform: none;
  }

  .module-card:hover,
  .asset-workbench a:hover,
  .guest-card:hover,
  .review-card:hover,
  .metric:hover,
  .list-row:hover {
    transform: none;
  }
}
.ai-async-result,
.business-ai-panel,
.module-ai-result {
  overflow-anchor: none;
}

/* Layout refinement for equipment management and employee entry */
.equipment-summary-grid {
  align-items: stretch;
}

.equipment-summary-grid .panel {
  min-height: 100%;
}

.equipment-workbench {
  grid-template-columns: minmax(360px, .98fr) minmax(0, 1fr) minmax(0, 1fr);
  grid-auto-flow: dense;
  align-items: stretch;
  gap: 16px;
}

.equipment-workbench .panel {
  min-width: 0;
}

.equipment-add-card {
  display: grid;
  grid-row: span 2;
  min-height: 100%;
}

.equipment-add-card .stack-form {
  height: 100%;
  align-content: start;
}

.equipment-add-card .stack-form button {
  align-self: end;
}

.equipment-action-card {
  display: grid;
  align-content: start;
}

.equipment-action-card .panel-head {
  min-height: 32px;
}

.equipment-action-card textarea {
  min-height: 76px;
}

.equipment-add-card textarea {
  min-height: 92px;
}

.equipment-replace-card {
  grid-column: 2 / -1;
}

.equipment-workbench:not(:has(.equipment-add-card)) .equipment-replace-card {
  grid-column: 1 / -1;
}

.equipment-replace-card .stack-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.equipment-replace-card .stack-form > label,
.equipment-replace-card .stack-form > .split {
  min-width: 0;
}

.equipment-replace-card .stack-form > label:nth-last-of-type(1),
.equipment-replace-card .stack-form > button {
  grid-column: 1 / -1;
}

.equipment-status-panel,
.equipment-filter-panel {
  margin-bottom: 18px;
}

.equipment-status-panel .equipment-status-form {
  grid-template-columns: minmax(260px, 1.4fr) 150px minmax(170px, .9fr) minmax(220px, 1fr) auto;
}

.equipment-filter-panel .toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) minmax(150px, .5fr) minmax(150px, .5fr) auto auto;
  align-items: end;
}

.equipment-table-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(420px, .65fr);
  align-items: start;
}

.equipment-table-grid .table-panel {
  min-width: 0;
}

.guest-body {
  background:
    linear-gradient(90deg, rgba(247,251,252,.985) 0%, rgba(247,251,252,.96) 54%, rgba(247,251,252,.88) 100%),
    url("/static/admin-visual-bg.png") right center / cover fixed;
}

.guest-main {
  width: min(1180px, calc(100% - 48px));
  padding: clamp(24px, 3.2vw, 44px) 0 64px;
}

.guest-hero {
  margin-bottom: 20px;
}

.guest-history-card {
  padding: 18px 20px;
}

.guest-history-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) 120px;
}

.guest-workbench {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.guest-workbench > .guest-card {
  grid-column: auto;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 22px;
}

.guest-issue-card {
  order: 1;
}

.guest-equipment-card {
  order: 2;
}

.guest-purchase-card {
  order: 3;
  grid-column: 1 / -1;
}

.guest-workbench .panel-head {
  gap: 10px;
  align-items: start;
  min-height: 48px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(203, 219, 224, .72);
}

.guest-workbench .panel-head span {
  max-width: 190px;
  text-align: right;
  line-height: 1.55;
}

.guest-workbench > .guest-card > .stack-form,
.guest-equipment-forms form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.guest-workbench > .guest-card > .stack-form > button,
.guest-equipment-forms form > button {
  margin-top: auto;
}

.guest-workbench label {
  min-width: 0;
}

.guest-workbench input,
.guest-workbench select,
.guest-workbench textarea {
  width: 100%;
}

.guest-workbench textarea {
  min-height: 96px;
}

.guest-equipment-card {
  grid-column: 1 / -1;
  min-height: auto;
}

.guest-equipment-card .panel-head span {
  max-width: none;
}

.guest-equipment-forms {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.guest-equipment-forms form {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(203, 219, 224, .78);
  border-radius: 8px;
  background: rgba(255, 255, 255, .74);
}

.guest-equipment-forms h3 {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(203, 219, 224, .72);
}

.guest-equipment-forms textarea {
  min-height: 110px;
}

@media (max-width: 1280px) {
  .equipment-workbench,
  .equipment-table-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .equipment-add-card {
    grid-row: auto;
  }

  .equipment-replace-card {
    grid-column: 1 / -1;
  }

  .equipment-status-panel .equipment-status-form,
  .equipment-filter-panel .toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guest-workbench > .guest-card {
    grid-column: auto;
  }

  .guest-equipment-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .equipment-workbench,
  .equipment-table-grid,
  .equipment-replace-card .stack-form,
  .guest-workbench,
  .guest-equipment-forms,
  .guest-history-form {
    grid-template-columns: 1fr;
  }

  .equipment-replace-card,
  .guest-workbench > .guest-card,
  .guest-equipment-card {
    grid-column: auto;
  }

  .guest-main {
    width: min(calc(100% - 28px), 680px);
    padding-top: 22px;
  }

  .guest-workbench .panel-head span {
    max-width: none;
    text-align: left;
  }
}

/* Inventory clarity and employee entry refinements */
.metric.danger,
.metric.warn {
  border-color: rgba(220, 38, 38, .28);
  background:
    linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,241,241,.92));
}

.metric.danger::before,
.metric.warn::before {
  background: linear-gradient(90deg, #dc2626, #fb7185);
  opacity: 1;
}

.metric.danger strong,
.metric.warn strong {
  color: #b91c1c;
}

.inventory-snapshot {
  margin-bottom: 16px;
}

.inventory-table-head {
  align-items: center;
  gap: 18px;
  min-height: 76px;
}

.inventory-table-head > div {
  min-width: 130px;
}

.table-toolbar {
  flex: 1;
  justify-content: flex-end;
  padding: 6px 0;
}

.table-toolbar input {
  width: min(360px, 36vw);
  max-width: none;
}

.inventory-table tr[hidden] {
  display: none;
}

.table-toolbar .button,
.table-toolbar button {
  min-height: 42px;
}

.inventory-table {
  min-width: 980px;
}

.inventory-table th:first-child,
.inventory-table td:first-child {
  min-width: 210px;
}

.inventory-name,
.inventory-flow,
.stock-mini {
  display: grid;
  gap: 5px;
}

.inventory-name strong {
  color: #102b33;
  font-size: 18px;
  line-height: 1.25;
}

.inventory-name span {
  font-size: 13px;
  font-weight: 700;
}

.inventory-name span,
.stock-mini,
.inventory-flow span,
.alert-note {
  color: var(--muted);
  font-size: 12px;
}

.stock-status {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 6px;
}

.stock-status strong {
  color: #0f766e;
  font-size: 24px;
  line-height: 1;
}

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

.stock-status.is-alert strong {
  color: #dc2626;
}

.inventory-location {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef7f6;
  color: #12313a;
  font-weight: 700;
}

.inventory-flow b {
  color: #12313a;
}

.alert-badge,
.ok-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.alert-badge {
  border: 1px solid rgba(220, 38, 38, .34);
  background: #fee2e2;
  color: #b91c1c;
  box-shadow: 0 8px 20px rgba(220, 38, 38, .08);
}

.ok-badge {
  border: 1px solid rgba(15, 118, 110, .22);
  background: #e7f7f4;
  color: #0f766e;
}

.alert-row td {
  border-bottom-color: rgba(248, 113, 113, .42);
  background: #fff5f5 !important;
}

.alert-row td:first-child {
  box-shadow: inset 4px 0 0 #dc2626;
}

.inventory-warning-row {
  border-color: rgba(220, 38, 38, .28);
  background: #fff5f5;
}

.inventory-warning-row strong,
.inventory-warning-row b {
  color: #b91c1c;
}

.guest-history-form {
  grid-template-columns: minmax(0, 1fr) 120px;
}

.guest-stock-pop {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(0, .8fr));
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(15, 118, 110, .2);
  border-radius: 8px;
  background: rgba(231, 247, 244, .88);
  color: #12313a;
  font-size: 13px;
}

.guest-stock-pop[hidden] {
  display: none;
}

.guest-stock-pop strong {
  color: #0f766e;
}

.guest-stock-pop span {
  color: #4f666d;
}

.guest-stock-pop b {
  color: #102b33;
}

.guest-stock-pop.is-alert {
  border-color: rgba(220, 38, 38, .34);
  background: #fff5f5;
}

.guest-stock-pop.is-alert strong,
.guest-stock-pop.is-alert b {
  color: #b91c1c;
}

.quantity-unit-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  align-items: center;
  gap: 8px;
}

.quantity-unit-wrap span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  border: 1px solid rgba(203, 219, 224, .9);
  border-radius: 8px;
  background: #f4faf9;
  color: #0f766e;
  font-weight: 900;
}

@media (max-width: 900px) {
  .inventory-table-head {
    align-items: stretch;
  }

  .inventory-table-head,
  .table-toolbar {
    display: grid;
    justify-content: stretch;
  }

  .table-toolbar input {
    width: 100%;
  }

  .guest-stock-pop {
    grid-template-columns: 1fr;
  }
}

/* Final workflow polish: mobile shell, compact AI cards, clearer records */
.nav-toggle-input,
.mobile-appbar,
.nav-scrim,
.mobile-sidebar-head {
  display: none;
}

.metric.warn {
  border-color: rgba(245, 158, 11, .32);
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,247,237,.94));
}

.metric.warn::before {
  background: linear-gradient(90deg, #f59e0b, #fb923c);
  opacity: 1;
}

.metric.warn strong {
  color: #b45309;
}

.metric.danger {
  border-color: rgba(220, 38, 38, .3);
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,241,241,.94));
}

.metric.danger::before {
  background: linear-gradient(90deg, #dc2626, #fb7185);
  opacity: 1;
}

.metric.danger strong {
  color: #b91c1c;
}

.badge-ok {
  border-color: rgba(15, 118, 110, .22);
  background: #e7f7f4;
  color: #0f766e;
}

.badge-warn {
  border-color: rgba(245, 158, 11, .34);
  background: #fff7ed;
  color: #b45309;
}

.badge-danger {
  border-color: rgba(220, 38, 38, .34);
  background: #fee2e2;
  color: #b91c1c;
}

.business-ai-panel {
  padding: 0;
  overflow: hidden;
}

.business-ai-panel .ai-panel-details {
  display: block;
}

.ai-panel-details summary {
  cursor: pointer;
  list-style: none;
  margin: 0;
  padding: 18px 20px;
  border: 0;
}

.ai-panel-details summary::-webkit-details-marker,
.form-drawer > summary::-webkit-details-marker {
  display: none;
}

.business-ai-summary-meta {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.business-ai-summary-meta b,
.form-drawer > summary b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, .08);
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.business-ai-panel .business-ai-body {
  padding: 0 20px 18px;
}

.business-ai-panel pre {
  max-height: 240px;
  overflow: auto;
}

.form-drawer {
  padding: 0;
  overflow: hidden;
  align-self: start;
}

.form-drawer > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  color: #102b33;
  font-size: 18px;
  font-weight: 900;
}

.form-drawer[open] > summary {
  border-bottom: 1px solid rgba(203, 219, 224, .72);
}

.form-drawer[open] > summary b {
  background: #0f766e;
  color: #fff;
}

.form-drawer .drawer-body {
  padding: 18px 20px 20px;
}

.grid.form-grid > .form-drawer:not([open]),
.grid.form-grid > .form-drawer:not([open]) + .table-panel {
  grid-column: 1 / -1;
}

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

.equipment-workbench .form-drawer {
  display: block;
  min-height: auto;
}

.equipment-workbench .equipment-add-card,
.equipment-workbench .equipment-replace-card {
  grid-row: auto;
  grid-column: auto;
}

.equipment-workbench .form-drawer[open] {
  grid-column: span 2;
}

.equipment-workbench .form-drawer[open] .drawer-body {
  min-height: 0;
}

.equipment-add-card .stack-form,
.equipment-action-card .stack-form {
  height: auto;
}

.stock-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(76px, 1fr));
  gap: 8px;
  min-width: 260px;
}

.stock-card-grid span {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid rgba(203, 219, 224, .76);
  border-radius: 8px;
  background: rgba(255,255,255,.74);
}

.stock-card-grid b {
  color: #0f766e;
  font-size: 20px;
  line-height: 1;
}

.stock-card-grid em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  white-space: nowrap;
}

.stock-card-grid.is-alert span:first-child {
  border-color: rgba(220, 38, 38, .34);
  background: #fee2e2;
}

.stock-card-grid.is-alert span:first-child b {
  color: #b91c1c;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 138px;
  padding: 28px 18px;
  border: 1px dashed rgba(123, 145, 152, .35);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.74), rgba(246,250,250,.7));
  color: var(--muted);
  text-align: center;
}

.empty-state.compact {
  min-height: 86px;
  padding: 18px;
}

.empty-state strong {
  color: #18323a;
  font-size: 16px;
}

.empty-state span {
  max-width: 460px;
  line-height: 1.65;
}

body.guest-body {
  overflow-x: hidden;
}

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

  .equipment-workbench .form-drawer[open] {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  body.app-body {
    display: block;
    padding-top: 64px;
    overflow-x: hidden;
  }

  .mobile-appbar {
    position: fixed;
    z-index: 80;
    top: 0;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: auto 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(203, 219, 224, .86);
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(17, 44, 50, .08);
  }

  .mobile-appbar img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  .mobile-appbar strong {
    min-width: 0;
    color: #102b33;
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 13px;
    border-radius: 999px;
    background: #0f766e;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
  }

  .nav-scrim {
    position: fixed;
    z-index: 90;
    inset: 0;
    background: rgba(5, 18, 20, .44);
    backdrop-filter: blur(4px);
  }

  .nav-toggle-input:checked ~ .nav-scrim {
    display: block;
  }

  .sidebar {
    position: fixed !important;
    z-index: 100;
    top: 0;
    left: 0;
    width: min(320px, 86vw) !important;
    height: 100dvh !important;
    padding: 16px;
    border-right: 1px solid rgba(255,255,255,.14);
    border-bottom: 0;
    transform: translateX(-105%);
    transition: transform .28s cubic-bezier(.2,.8,.2,1);
    overflow-y: auto;
  }

  .nav-toggle-input:checked ~ .sidebar {
    transform: translateX(0);
  }

  .mobile-sidebar-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 42px;
    margin-bottom: 12px;
    color: rgba(255,255,255,.78);
    font-size: 13px;
    font-weight: 800;
  }

  .mobile-sidebar-head label {
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    color: #fff;
  }

  .sidebar nav {
    display: grid;
    grid-template-columns: 1fr !important;
  }

  .main {
    width: 100%;
    max-width: none;
    padding: 14px;
  }

  .topbar {
    padding: 16px;
  }

  .topbar h1 {
    font-size: clamp(26px, 8vw, 36px);
    line-height: 1.12;
  }

  .topbar p {
    font-size: 14px;
  }

  .business-ai-summary-meta {
    justify-items: start;
  }

  .business-ai-panel .panel-head,
  .ai-panel-details summary {
    display: grid;
    gap: 10px;
  }

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

@media (max-width: 900px) {
  .equipment-workbench,
  .equipment-table-grid,
  .guest-workbench,
  .guest-equipment-forms,
  .guest-history-form {
    grid-template-columns: 1fr;
  }

  .equipment-workbench .form-drawer[open],
  .equipment-replace-card,
  .guest-workbench > .guest-card,
  .guest-equipment-card {
    grid-column: auto;
  }

  .stock-card-grid {
    grid-template-columns: 1fr;
    min-width: 0;
  }
}

@media (max-width: 700px) {
  html,
  body.guest-body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .module-header,
  .portal-header.guest-header {
    padding: 12px 16px;
    gap: 12px;
  }

  .module-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .module-header > div {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .module-header img,
  .guest-logo img {
    max-width: 148px;
  }

  .module-header > div,
  .portal-header.guest-header nav {
    gap: 10px;
    font-size: 14px;
  }

  .module-main {
    padding: 18px 14px 42px;
  }

  .module-intro {
    margin-bottom: 16px;
  }

  .module-intro h1 {
    margin-top: 10px;
    font-size: 36px;
    line-height: 1.08;
  }

  .module-intro p {
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.65;
  }

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

  .module-card {
    min-height: 260px;
    padding: 22px;
  }

  .module-card h2 {
    font-size: 30px;
    line-height: 1.12;
  }

  .guest-main {
    width: calc(100% - 24px);
    max-width: 680px;
    overflow: hidden;
    padding-top: 18px;
  }

  .guest-main * {
    min-width: 0;
  }

  .guest-hero p {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .guest-hero h1 {
    font-size: 42px;
  }

  .guest-history-card,
  .guest-workbench > .guest-card {
    padding: 18px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .guest-grid,
  .guest-workbench,
  .guest-equipment-forms,
  .guest-history-form,
  .guest-workbench form,
  .guest-workbench label,
  .guest-workbench input,
  .guest-workbench select,
  .guest-workbench textarea,
  .guest-workbench button {
    max-width: 100%;
  }

  .guest-workbench .split {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .guest-workbench .panel-head {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .guest-history-form {
    grid-template-columns: 1fr !important;
  }

  .guest-history-form button {
    width: 100%;
  }

  .quantity-unit-wrap {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
  }

  .quantity-unit-wrap input {
    width: 100%;
  }

  .quantity-unit-wrap span {
    width: 100%;
  }
}
