:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --ink: #18212a;
  --muted: #66707a;
  --line: rgba(24, 33, 42, 0.11);
  --teal: #0f766e;
  --teal-dark: #115e59;
  --coral: #d95c43;
  --amber: #c28a18;
  --blue: #2563a8;
  --violet: #6554c0;
  --green-soft: #e6f4ef;
  --amber-soft: #fff2d6;
  --red-soft: #ffe7e1;
  --glass: rgba(255, 255, 255, 0.72);
  --shadow: 0 22px 70px rgba(20, 31, 40, 0.13);
  --soft-shadow: 0 12px 34px rgba(20, 31, 40, 0.09);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 12%, rgba(15, 118, 110, 0.18), transparent 28%),
    radial-gradient(circle at 86% 8%, rgba(37, 99, 168, 0.16), transparent 30%),
    radial-gradient(circle at 72% 78%, rgba(217, 92, 67, 0.13), transparent 28%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: -1;
}

body::before {
  inset: 0;
  background-image:
    linear-gradient(rgba(24, 33, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 33, 42, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 78%);
}

body::after {
  width: 480px;
  height: 480px;
  right: -180px;
  top: 16vh;
  border-radius: 999px;
  background: conic-gradient(from 120deg, rgba(15, 118, 110, 0.18), rgba(37, 99, 168, 0.14), rgba(217, 92, 67, 0.14), rgba(15, 118, 110, 0.18));
  filter: blur(46px);
  animation: ambientDrift 16s ease-in-out infinite alternate;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(320px, 480px);
  gap: 42px;
  align-items: center;
  width: min(1120px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 42px 0;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.login-brand img {
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 16px 24px rgba(15, 118, 110, 0.22));
}

.login-brand strong,
.login-brand span {
  display: block;
}

.login-brand strong {
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  line-height: 0.9;
  color: var(--ink);
}

.login-brand span,
.login-lead {
  color: var(--muted);
}

.login-panel {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.78));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 24px;
}

.login-panel h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
}

.login-panel .primary-btn {
  min-height: 46px;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.64);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(246, 250, 252, 0.66));
  backdrop-filter: blur(22px) saturate(1.18);
  display: flex;
  flex-direction: column;
  gap: 28px;
  box-shadow: 18px 0 60px rgba(20, 31, 40, 0.06);
}

.brand,
.user-chip,
.feature-content,
.panel-head,
.action-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
}

.brand img {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 12px 18px rgba(15, 118, 110, 0.18));
  animation: logoFloat 5s ease-in-out infinite;
}

.brand strong,
.user-chip strong {
  display: block;
}

.brand span,
.user-chip span,
.metric-card span,
.metric-card small,
.rep-card p,
.eyebrow {
  color: var(--muted);
}

.nav-list {
  display: grid;
  gap: 8px;
  overflow-y: auto;
  max-height: calc(100vh - 190px);
  padding-right: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-list::-webkit-scrollbar {
  display: none;
}

.nav-list .admin-only {
  display: none;
}

body[data-role="admin"] .nav-list .admin-only {
  display: grid;
}

.nav-item {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.nav-item::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  border-radius: 999px;
  background: var(--coral);
  transform: scaleY(0);
  transition: transform 180ms ease;
}

.nav-item.active,
.nav-item:hover {
  background: linear-gradient(135deg, var(--ink), #233545);
  color: #fff;
  box-shadow: 0 12px 28px rgba(24, 33, 42, 0.16);
  transform: translateX(3px);
}

.nav-item.active::before,
.nav-item:hover::before {
  transform: scaleY(1);
}

.nav-icon {
  font-size: 20px;
  text-align: center;
}

.rail-note {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(230, 244, 239, 0.94), rgba(231, 240, 255, 0.9));
  box-shadow: var(--soft-shadow);
}

.rail-note span,
.rail-note strong {
  display: block;
}

.workspace {
  padding: 28px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 0.95;
  background: linear-gradient(105deg, var(--ink), var(--teal-dark) 48%, var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
}

h3 {
  margin-bottom: 10px;
}

.user-chip {
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--glass);
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.user-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(20, 31, 40, 0.13);
}

.status-dot {
  position: relative;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #20a06b;
  box-shadow: 0 0 0 4px rgba(32, 160, 107, 0.14), 0 0 18px rgba(32, 160, 107, 0.34);
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 2px solid rgba(32, 160, 107, 0.48);
  border-radius: inherit;
  animation: verifiedPulse 1.55s ease-out infinite;
}

.status-dot.pending {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(194, 138, 24, 0.16);
}

.status-dot.pending::after {
  border-color: rgba(194, 138, 24, 0.42);
}

.access-gate {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(15, 118, 110, 0.24);
  background: var(--green-soft);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.access-gate.pending {
  border-color: rgba(194, 138, 24, 0.36);
  background: var(--amber-soft);
}

.access-gate button,
.ghost-btn,
.icon-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 8px 20px rgba(20, 31, 40, 0.07);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.access-gate button:hover,
.ghost-btn:hover,
.icon-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.34);
  background: #fff;
  box-shadow: 0 14px 34px rgba(20, 31, 40, 0.12);
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: pageIn 360ms ease both;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.metric-card,
.panel,
.content-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.metric-card::before,
.panel::before,
.content-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.11), transparent 34%, rgba(217, 92, 67, 0.08));
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.metric-card:hover,
.panel:hover,
.content-card:hover {
  transform: translateY(-4px);
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: 0 28px 80px rgba(20, 31, 40, 0.17);
}

.metric-card:hover::before,
.panel:hover::before,
.content-card:hover::before {
  opacity: 1;
}

.metric-card {
  min-height: 132px;
  padding: 18px;
}

.metric-card strong {
  display: block;
  margin: 12px 0 4px;
  font-size: 2.4rem;
  color: var(--teal-dark);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.7fr);
  gap: 14px;
}

.advantage-panel {
  margin-top: 14px;
}

.advantage-grid,
.config-grid,
.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.advantage-grid article,
.config-grid article,
.module-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  padding: 14px;
}

.advantage-grid strong,
.advantage-grid span,
.config-grid strong,
.config-grid span {
  display: block;
}

.advantage-grid strong,
.config-grid strong {
  margin-bottom: 6px;
}

.advantage-grid span,
.config-grid span,
.module-card p {
  color: var(--muted);
  line-height: 1.45;
}

.module-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.module-card h3 {
  margin: 10px 0 8px;
}

.module-card p {
  margin-bottom: 0;
}

.module-list {
  margin-top: 14px;
}

.visit-workflow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.visit-step {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 14px;
  display: grid;
  gap: 5px;
  box-shadow: var(--soft-shadow);
}

.visit-step span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #e7f0ff;
  color: var(--blue);
  font-weight: 900;
}

.visit-step.active {
  border-color: rgba(15, 118, 110, 0.34);
  background: linear-gradient(135deg, var(--green-soft), #fff);
}

.visit-step.active span {
  background: var(--teal);
  color: #fff;
}

.visit-step small,
.visit-profile span,
.interest-list span,
.content-chips span,
.compact-list span {
  color: var(--muted);
}

.visit-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.2fr) minmax(280px, 0.8fr);
  gap: 14px;
  align-items: start;
}

.visit-planner {
  grid-row: span 2;
}

.visit-profile {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--green-soft);
  padding: 14px;
  margin-bottom: 14px;
}

.visit-profile strong,
.visit-profile span {
  display: block;
}

.visit-fields,
.visit-checks,
.interest-list,
.content-chips {
  display: grid;
  gap: 10px;
}

.visit-checks .checkbox {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  padding: 10px;
}

.interest-list div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.interest-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.interest-list strong,
.interest-list span {
  display: block;
}

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

.content-chips span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 10px;
  font-weight: 800;
}

.visit-next {
  grid-column: 1 / -1;
}

.panel {
  padding: 18px;
}

.panel-head {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  background: #e7f0ff;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.64);
}

.pill.amber {
  background: var(--amber-soft);
  color: #8a5f08;
}

.pill.green {
  background: var(--green-soft);
  color: var(--teal-dark);
}

.pill.red {
  background: var(--red-soft);
  color: #a73a26;
}

.feature-content {
  gap: 22px;
  align-items: stretch;
}

.feature-content img {
  width: min(42%, 300px);
  min-width: 210px;
  object-fit: contain;
  border-radius: 8px;
  background: #edf5f2;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.12);
  animation: cardGlow 7s ease-in-out infinite alternate;
}

.feature-content p,
.proof-panel p {
  color: var(--muted);
  line-height: 1.6;
}

.action-row {
  flex-wrap: wrap;
  gap: 10px;
}

.primary-btn {
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  color: #fff;
  padding: 11px 16px;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(15, 118, 110, 0.24);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.primary-btn:hover {
  filter: saturate(1.08) brightness(0.98);
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(37, 99, 168, 0.26);
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  transition: transform 180ms ease;
}

.timeline div:hover {
  transform: translateX(4px);
}

.timeline time {
  color: var(--coral);
  font-weight: 900;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin: 4px 0 16px;
}

.section-title input {
  width: min(360px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
}

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

.content-card {
  min-height: 250px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.content-card .type {
  color: var(--coral);
  font-weight: 900;
}

.content-card p {
  color: var(--muted);
  line-height: 1.55;
}

.content-card footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.flow-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.flow-node {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 16px;
  font-weight: 900;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.flow-node:hover {
  transform: translateY(-3px);
  box-shadow: var(--soft-shadow);
}

.flow-node.active {
  border-color: var(--teal);
  background: linear-gradient(135deg, var(--green-soft), #e7f0ff);
  color: var(--teal-dark);
}

.proof-panel {
  max-width: 860px;
}

.algorithm-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1fr);
  gap: 14px;
  align-items: start;
}

.note-panel textarea {
  min-height: 118px;
}

.note-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.saved-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
}

.saved-note time {
  display: block;
  margin-bottom: 6px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
}

.saved-note p,
.empty-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.contact-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.role-switch {
  min-width: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--glass);
  padding: 8px 10px;
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.role-switch span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.role-switch select {
  border: 0;
  background: transparent;
  padding: 2px 0 0;
  font-weight: 800;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.product-admin-panel,
.company-config-panel,
.admin-grid > .panel:last-child {
  grid-column: 1 / -1;
}

.product-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.product-form button {
  min-height: 44px;
}

.product-list {
  display: grid;
  gap: 10px;
}

.product-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(220px, 0.9fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
}

.product-row strong,
.product-row span,
.product-row small {
  display: block;
}

.product-row span,
.product-row small {
  color: var(--muted);
}

.product-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-list div {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  padding: 12px;
}

.admin-list span {
  color: var(--muted);
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
  outline: 0;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.rep-card {
  text-align: center;
}

.rep-card img {
  width: min(180px, 70%);
  margin: 4px auto 12px;
}

.rep-card ul,
.checklist {
  text-align: left;
}

.rep-card li,
.check-item {
  margin-bottom: 10px;
}

.checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.check-item {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(20, 31, 40, 0.06);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.compliance-item {
  cursor: pointer;
}

.check-item:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: var(--soft-shadow);
}

.compliance-item:focus-visible {
  outline: 3px solid rgba(37, 99, 168, 0.28);
  outline-offset: 3px;
}

.check-mark {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  box-shadow: 0 0 0 5px rgba(15, 118, 110, 0.12);
}

.check-item strong {
  display: block;
  margin-bottom: 4px;
}

.check-item span {
  color: var(--muted);
  line-height: 1.45;
}

dialog {
  width: min(560px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  animation: dialogIn 220ms ease both;
}

dialog::backdrop {
  background: rgba(24, 33, 42, 0.36);
  backdrop-filter: blur(5px);
}

.verify-form {
  padding: 20px;
  display: grid;
  gap: 14px;
}

.detail-dialog {
  padding: 20px;
}

.detail-kicker {
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-lead {
  color: var(--muted);
  line-height: 1.65;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.detail-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(230, 244, 239, 0.78), rgba(231, 240, 255, 0.62));
  padding: 14px;
}

.detail-grid strong,
.detail-grid span {
  display: block;
}

.detail-grid strong {
  margin-bottom: 6px;
  color: var(--ink);
}

.detail-grid span {
  color: var(--muted);
  line-height: 1.45;
}

.admin-modal-actions {
  margin-top: 16px;
}

.admin-action-result {
  display: none;
  margin: 14px 0 0;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--teal-dark);
  padding: 12px;
  font-weight: 800;
}

.admin-action-result.visible {
  display: block;
}

.form-error {
  display: none;
  margin: 0;
  color: #a73a26;
  font-weight: 800;
}

.form-error.visible {
  display: block;
}

.icon-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 1.5rem;
}

.checkbox {
  grid-template-columns: 18px 1fr;
  align-items: start;
}

.checkbox input {
  width: auto;
  margin-top: 3px;
}

@keyframes ambientDrift {
  from {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
  to {
    transform: translate3d(-48px, 42px, 0) rotate(18deg) scale(1.08);
  }
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes verifiedPulse {
  0% {
    opacity: 0.9;
    transform: scale(0.7);
  }
  70% {
    opacity: 0;
    transform: scale(1.7);
  }
  100% {
    opacity: 0;
    transform: scale(1.7);
  }
}

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

@keyframes dialogIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cardGlow {
  from {
    filter: saturate(1);
  }
  to {
    filter: saturate(1.18) brightness(1.02);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 980px) {
  .login-screen {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 26px;
  }

  .login-brand {
    justify-content: center;
    text-align: left;
  }

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

  .rail {
    position: fixed;
    z-index: 10;
    inset: auto 0 0;
    height: auto;
    padding: 10px 12px;
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .brand,
  .rail-note {
    display: none;
  }

  .nav-list {
    grid-template-columns: repeat(6, minmax(48px, 1fr));
    max-height: 72vh;
  }

  .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 54px;
    gap: 2px;
    padding: 4px;
    font-size: 0.76rem;
  }

  .workspace {
    padding: 20px 16px 96px;
  }

  .topbar,
  .access-gate,
  .section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .metric-grid,
  .main-grid,
  .advantage-grid,
  .config-grid,
  .module-grid,
  .visit-workflow,
  .visit-grid,
  .admin-grid,
  .admin-list div,
  .product-form,
  .product-row,
  .content-grid,
  .flow-board,
  .algorithm-grid,
  .checklist,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .feature-content {
    flex-direction: column;
  }

  .feature-content img {
    width: 100%;
    min-width: 0;
    max-height: 220px;
  }
}

@media (max-width: 560px) {
  .login-screen {
    width: min(100% - 24px, 420px);
    padding: 24px 0;
  }

  .login-brand {
    justify-content: flex-start;
  }

  .login-brand img {
    width: 56px;
    height: 56px;
  }

  .user-chip {
    align-items: flex-start;
  }

  .nav-item span:last-child {
    display: none;
  }

  .nav-item {
    min-height: 48px;
  }

  h1 {
    font-size: 2.35rem;
  }

  .metric-card {
    min-height: 112px;
  }
}
