:root {
  color-scheme: light;
  --portal-bg: #f3f6fb;
  --portal-surface: rgba(255, 255, 255, 0.94);
  --portal-surface-solid: #ffffff;
  --portal-border: #dce4ef;
  --portal-border-strong: #c8d3e1;
  --portal-text: #172033;
  --portal-muted: #68758a;
  --portal-muted-soft: #8a96a8;
  --portal-primary: #2563eb;
  --portal-primary-dark: #173f9f;
  --portal-primary-soft: #eaf1ff;
  --portal-cyan: #0891b2;
  --portal-success: #15803d;
  --portal-success-soft: #ecfdf3;
  --portal-warning: #c26a0a;
  --portal-warning-soft: #fff7e8;
  --portal-danger: #dc2626;
  --portal-danger-soft: #fff0f0;
  --portal-shadow-sm: 0 8px 24px rgba(30, 48, 77, 0.07);
  --portal-shadow: 0 22px 56px rgba(30, 48, 77, 0.12);
  --portal-radius-sm: 12px;
  --portal-radius: 18px;
  --portal-radius-lg: 26px;
  --portal-transition: 180ms ease;
  --portal-font: "Noto Sans TC", "Segoe UI", system-ui, -apple-system, sans-serif;
  --portal-mono: "JetBrains Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--portal-text);
  font-family: var(--portal-font);
  background:
    radial-gradient(circle at 8% -6%, rgba(37, 99, 235, 0.18), transparent 30rem),
    radial-gradient(circle at 94% 12%, rgba(8, 145, 178, 0.14), transparent 28rem),
    radial-gradient(circle at 48% 108%, rgba(99, 102, 241, 0.09), transparent 34rem),
    linear-gradient(180deg, #f8fbff 0%, #edf3fb 48%, #e9f0f8 100%);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

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

button {
  border: 0;
}

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

.portal-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle, rgba(30, 64, 175, 0.15) 1px, transparent 1.4px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.052) 1px, transparent 1px),
    linear-gradient(rgba(59, 130, 246, 0.052) 1px, transparent 1px),
    linear-gradient(125deg, transparent 18%, rgba(255, 255, 255, 0.52) 44%, transparent 68%);
  background-position: 0 0, 0 0, 0 0, center;
  background-size: 24px 24px, 96px 96px, 96px 96px, 100% 100%;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.42) 72%, transparent 100%);
}

.portal-background::before,
.portal-background::after {
  position: absolute;
  content: "";
  width: 34rem;
  height: 34rem;
  border-radius: 42% 58% 64% 36% / 47% 40% 60% 53%;
  filter: blur(18px);
  opacity: 0.72;
  animation: portal-ambient-drift 18s ease-in-out infinite alternate;
}

.portal-background::before {
  top: 8rem;
  left: -23rem;
  background: conic-gradient(from 120deg, rgba(37, 99, 235, 0.22), rgba(14, 165, 233, 0.08), rgba(99, 102, 241, 0.17), rgba(37, 99, 235, 0.22));
}

.portal-background::after {
  right: -22rem;
  bottom: -2rem;
  background: conic-gradient(from 300deg, rgba(8, 145, 178, 0.2), rgba(56, 189, 248, 0.08), rgba(37, 99, 235, 0.16), rgba(8, 145, 178, 0.2));
  animation-delay: -9s;
}

@keyframes portal-ambient-drift {
  0% {
    transform: translate3d(0, -16px, 0) rotate(-4deg) scale(0.96);
  }
  100% {
    transform: translate3d(38px, 26px, 0) rotate(8deg) scale(1.07);
  }
}

.portal-shell {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 20px;
}

.topbar {
  display: flex;
  align-items: center;
  min-height: 78px;
  padding: 14px 18px;
  border: 1px solid rgba(200, 211, 225, 0.82);
  border-radius: var(--portal-radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--portal-shadow-sm);
  backdrop-filter: blur(18px);
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 13px;
}

.portal-brand__mark {
  display: grid;
  place-items: center;
  min-width: 108px;
  height: 46px;
  padding: 0 13px;
  border-radius: 13px;
  background: linear-gradient(145deg, #1d4ed8 0%, #14377f 100%);
  box-shadow: 0 9px 20px rgba(29, 78, 216, 0.22);
}

.portal-brand__mark .ami-brand-3d {
  font-size: 19px;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.portal-brand__copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.portal-brand__copy strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-brand__copy span {
  color: var(--portal-muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.topbar__spacer {
  flex: 1;
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin-right: 12px;
  padding: 0 13px;
  border: 1px solid #cfe8d7;
  border-radius: 999px;
  color: #166534;
  background: var(--portal-success-soft);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.connection-pill__dot,
.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.13);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-left: 14px;
  border-left: 1px solid var(--portal-border);
}

.user-menu__avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(145deg, var(--portal-cyan), var(--portal-primary));
  font-family: var(--portal-mono);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 7px 16px rgba(37, 99, 235, 0.18);
}

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

.user-menu__copy span {
  color: var(--portal-muted);
  font-size: 10px;
  font-weight: 700;
}

.user-menu__copy strong {
  max-width: 170px;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--portal-border);
  border-radius: 12px;
  color: #526176;
  background: #ffffff;
  cursor: pointer;
  transition: color var(--portal-transition), border-color var(--portal-transition), background var(--portal-transition), transform var(--portal-transition);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.icon-button:hover {
  border-color: #fecaca;
  color: var(--portal-danger);
  background: var(--portal-danger-soft);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(270px, 0.78fr) minmax(350px, 0.95fr);
  align-items: center;
  gap: 22px;
  margin: 26px 0 34px;
  min-height: 272px;
  padding: 30px 32px;
  border: 1px solid rgba(103, 232, 249, 0.14);
  border-radius: 30px;
  color: #ffffff;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 78% 0%, rgba(14, 165, 233, 0.32), transparent 28rem),
    radial-gradient(circle at 8% 112%, rgba(37, 99, 235, 0.42), transparent 26rem),
    linear-gradient(135deg, #111c35 0%, #172b54 52%, #0d4562 100%);
  background-size: 34px 34px, 34px 34px, auto, auto, auto;
  box-shadow: 0 30px 70px rgba(23, 43, 84, 0.23);
  overflow: hidden;
}

.hero::before {
  position: absolute;
  top: -11rem;
  left: 34%;
  width: 25rem;
  height: 25rem;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.12);
  filter: blur(24px);
  content: "";
  pointer-events: none;
}

.hero::after {
  position: absolute;
  right: -6rem;
  bottom: -10rem;
  width: 24rem;
  height: 24rem;
  border: 4.8rem solid rgba(255, 255, 255, 0.035);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__visual {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 0;
  height: 230px;
  margin: 0 -34px;
  pointer-events: none;
}

.hero__visual::before,
.hero__visual::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.hero__visual::before {
  width: 210px;
  height: 210px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  box-shadow: 0 0 60px rgba(37, 99, 235, 0.22), inset 0 0 40px rgba(56, 189, 248, 0.08);
  animation: portal-core-orbit 12s linear infinite;
}

.hero__visual::after {
  width: 268px;
  height: 118px;
  border: 1px solid rgba(167, 139, 250, 0.16);
  transform: rotate(-10deg);
}

.hero__visual-glow {
  position: absolute;
  width: 240px;
  height: 110px;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.28);
  filter: blur(36px);
}

.hero__visual img {
  position: relative;
  z-index: 2;
  width: 440px;
  max-width: 145%;
  height: 250px;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.1) contrast(1.04) drop-shadow(0 22px 30px rgba(0, 0, 0, 0.24));
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(ellipse 72% 74% at center, #000 48%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 74% at center, #000 48%, transparent 100%);
}

@keyframes portal-core-orbit {
  to { transform: rotate(360deg); }
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  color: #8be9f7;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(34px, 3.7vw, 52px);
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: -0.055em;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.hero__description {
  max-width: 650px;
  margin: 16px 0 0;
  color: rgba(226, 232, 240, 0.78);
  font-size: 14px;
  line-height: 1.8;
}

.hero__time {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  color: rgba(226, 232, 240, 0.68);
  font-size: 12px;
  font-weight: 650;
}

.hero__time span + span {
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  font-family: var(--portal-mono);
  color: #dff8ff;
}

.hero-panel {
  position: relative;
  padding: 22px;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--portal-radius-lg);
  background: rgba(8, 20, 43, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 20px 42px rgba(4, 13, 29, 0.2);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.hero-panel::before {
  position: absolute;
  top: -85px;
  right: -75px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(103, 232, 249, 0.08);
  content: "";
}

.portal-robot-route {
  position: fixed;
  inset: 0;
  z-index: 12;
  overflow: hidden;
  pointer-events: none;
}

.portal-robot-runner {
  --robot-frame-height: clamp(430px, 64vh, 650px);
  --robot-frame-width: calc(var(--robot-frame-height) * 0.842105);
  position: absolute;
  left: 100%;
  bottom: 0;
  width: var(--robot-frame-width);
  height: var(--robot-frame-height);
  opacity: 0;
  will-change: transform, opacity;
  animation: portal-robot-traverse 27s linear 1.5s infinite;
}

.portal-robot-runner__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 12px 12px rgba(2, 12, 27, 0.2));
  backface-visibility: hidden;
  will-change: transform;
}

@keyframes portal-robot-traverse {
  0%, 5% {
    opacity: 0;
    transform: translate3d(40px, 0, 0);
  }
  8% {
    opacity: 0.96;
  }
  88% {
    opacity: 0.96;
  }
  94%, 100% {
    opacity: 0;
    transform: translate3d(calc(-100vw - var(--robot-frame-width) - 48px), 0, 0);
  }
}

.hero-panel__label {
  position: relative;
  display: block;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.module-search {
  position: relative;
  display: flex;
  align-items: center;
}

.module-search > svg {
  position: absolute;
  left: 15px;
  width: 19px;
  height: 19px;
  color: #7a8aa1;
  pointer-events: none;
}

.module-search input {
  width: 100%;
  height: 52px;
  padding: 0 46px 0 46px;
  border: 1px solid var(--portal-border-strong);
  border-radius: 15px;
  outline: 0;
  color: var(--portal-text);
  background: #ffffff;
  font-size: 14px;
  transition: border-color var(--portal-transition), box-shadow var(--portal-transition);
}

.module-search input::placeholder {
  color: #98a3b2;
}

.module-search input:focus {
  border-color: #8ab0ff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.11);
}

.module-search__shortcut {
  position: absolute;
  right: 12px;
  display: inline-grid;
  place-items: center;
  min-width: 43px;
  height: 26px;
  border: 1px solid var(--portal-border);
  border-bottom-width: 2px;
  border-radius: 7px;
  color: #7a8799;
  background: #f8fafc;
  font-family: var(--portal-mono);
  font-size: 11px;
}

.summary-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 13px;
}

.summary-item {
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.summary-item span {
  display: block;
  margin-bottom: 3px;
  color: rgba(226, 232, 240, 0.62);
  font-size: 10px;
  font-weight: 700;
}

.summary-item strong {
  display: block;
  font-size: 15px;
  font-weight: 850;
  color: #ffffff;
}

.summary-item strong.is-danger {
  color: #fda4af;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  align-items: start;
  gap: 22px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.section-heading__title {
  display: flex;
  align-items: center;
  gap: 11px;
}

.section-heading__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #d6e2ff;
  border-radius: 11px;
  color: var(--portal-primary);
  background: var(--portal-primary-soft);
}

.section-heading__icon svg {
  width: 18px;
  height: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.section-heading p {
  margin: 3px 0 0;
  color: var(--portal-muted);
  font-size: 12px;
}

.section-heading__count {
  padding: 6px 10px;
  border: 1px solid var(--portal-border);
  border-radius: 999px;
  color: #59677b;
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

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

.module-card {
  --card-accent: var(--portal-primary);
  --card-soft: var(--portal-primary-soft);
  position: relative;
  display: flex;
  min-height: 178px;
  padding: 19px;
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  background: linear-gradient(145deg, #ffffff 0%, #ffffff 72%, var(--card-soft) 150%);
  box-shadow: 0 8px 20px rgba(37, 53, 79, 0.045);
  overflow: hidden;
  transition: transform var(--portal-transition), border-color var(--portal-transition), box-shadow var(--portal-transition);
}

.module-card::before {
  position: absolute;
  right: -54px;
  bottom: -68px;
  width: 145px;
  height: 145px;
  border-radius: 50%;
  background: var(--card-soft);
  content: "";
  opacity: 0.7;
  transition: transform 260ms ease, opacity 260ms ease;
}

.module-card::after {
  position: absolute;
  top: 0;
  left: 19px;
  width: 34px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--card-accent);
  content: "";
  opacity: 0.72;
}

.module-card:hover {
  z-index: 1;
  border-color: color-mix(in srgb, var(--card-accent) 45%, var(--portal-border));
  box-shadow: 0 18px 38px rgba(37, 53, 79, 0.11);
  transform: translateY(-3px);
}

.module-card:hover::before {
  opacity: 1;
  transform: scale(1.14);
}

.module-card__content {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  flex-direction: column;
}

.module-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.module-card__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 13px;
  color: var(--card-accent);
  background: linear-gradient(145deg, #ffffff, var(--card-soft));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--card-accent) 13%, transparent);
  transition: transform var(--portal-transition), box-shadow var(--portal-transition);
}

.module-card:hover .module-card__icon {
  box-shadow: 0 11px 22px color-mix(in srgb, var(--card-accent) 20%, transparent);
  transform: translateY(-2px) rotate(-2deg);
}

.module-card__icon svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.1;
}

.module-card__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 25px;
  padding: 0 8px;
  border-radius: 999px;
  color: #47705a;
  background: #edf9f1;
  font-size: 10px;
  font-weight: 800;
}

.module-card__status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  content: "";
}

.module-card__status.is-alert {
  color: #b42318;
  background: #fff0f0;
}

.module-card__status.is-alert::before {
  background: #ef4444;
}

.module-card__status.is-locked {
  color: #59677b;
  background: #f1f5f9;
}

.module-card__status.is-locked::before {
  background: #94a3b8;
}

.module-card h3 {
  margin: 18px 0 4px;
  font-size: 16px;
  font-weight: 850;
  letter-spacing: -0.025em;
}

.module-card__subtitle {
  margin: 0;
  color: var(--portal-muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.55;
}

.module-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  color: var(--portal-muted-soft);
  font-size: 10px;
  font-weight: 700;
}

.module-card__action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--card-accent);
  font-size: 11px;
  font-weight: 800;
}

.module-card__action svg {
  width: 14px;
  height: 14px;
  transition: transform var(--portal-transition);
}

.module-card:hover .module-card__action svg {
  transform: translateX(2px);
}

.module-card--featured {
  grid-column: span 2;
  min-height: 236px;
  border-color: transparent;
  color: #ffffff;
  background:
    radial-gradient(circle at 90% 4%, rgba(56, 189, 248, 0.34), transparent 15rem),
    linear-gradient(135deg, #173f9f 0%, #1d4ed8 55%, #087f9d 100%);
  box-shadow: 0 22px 44px rgba(29, 78, 216, 0.22);
}

.module-card--featured::before {
  position: absolute;
  right: -38px;
  bottom: -82px;
  width: 230px;
  height: 230px;
  border: 52px solid rgba(255, 255, 255, 0.055);
  background: transparent;
  border-radius: 50%;
  content: "";
}

.module-card--featured::after {
  background: #67e8f9;
}

.module-card--featured:hover {
  border-color: transparent;
  box-shadow: 0 28px 54px rgba(29, 78, 216, 0.28);
}

.module-card--featured .module-card__content {
  position: relative;
  z-index: 1;
}

.module-card--featured .module-card__icon {
  width: 50px;
  height: 50px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.17);
}

.module-card--featured:hover .module-card__icon {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24), 0 12px 28px rgba(8, 47, 73, 0.28);
}

.module-card--featured .module-card__icon svg {
  width: 25px;
  height: 25px;
}

.module-card--featured .module-card__status {
  color: #d1fae5;
  background: rgba(6, 95, 70, 0.46);
  box-shadow: inset 0 0 0 1px rgba(167, 243, 208, 0.18);
}

.module-card--featured h3 {
  margin-top: 25px;
  font-size: 25px;
}

.module-card--featured .module-card__subtitle {
  max-width: 510px;
  color: rgba(255, 255, 255, 0.77);
  font-size: 13px;
}

.module-card--featured .module-card__footer {
  color: rgba(255, 255, 255, 0.64);
}

.module-card--featured .module-card__action {
  color: #ffffff;
}

.module-card--danger {
  --card-accent: #dc2626;
  --card-soft: #fff0f0;
}

.module-card--orange {
  --card-accent: #c25e0a;
  --card-soft: #fff5e8;
}

.module-card--teal {
  --card-accent: #0f766e;
  --card-soft: #eafaf7;
}

.module-card--violet {
  --card-accent: #7c3aed;
  --card-soft: #f4efff;
}

.module-card--slate {
  --card-accent: #475569;
  --card-soft: #f1f5f9;
}

.module-card--disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.module-card--disabled:hover {
  border-color: var(--portal-border);
  box-shadow: 0 8px 20px rgba(37, 53, 79, 0.045);
  transform: none;
}

.module-card.is-filtered {
  display: none;
}

.module-empty {
  display: none;
  padding: 36px;
  border: 1px dashed var(--portal-border-strong);
  border-radius: var(--portal-radius);
  color: var(--portal-muted);
  background: rgba(255, 255, 255, 0.54);
  text-align: center;
  font-size: 13px;
}

.module-empty.is-visible {
  display: block;
}

.overview-column {
  display: grid;
  gap: 14px;
  padding-top: 50px;
}

.overview-card {
  position: relative;
  padding: 20px;
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  background: linear-gradient(150deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--portal-shadow-sm);
  overflow: hidden;
}

.overview-card:not(.notice-card)::before {
  position: absolute;
  top: 0;
  right: 20px;
  left: 20px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--portal-primary), var(--portal-cyan));
  content: "";
}

.overview-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.overview-card__header h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 850;
}

.overview-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #166534;
  background: var(--portal-success-soft);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.overview-card__badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  content: "";
}

.overview-card__period {
  padding: 5px 8px;
  border: 1px solid var(--portal-border);
  border-radius: 999px;
  color: #64748b;
  background: #f8fafc;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

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

.service-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.service-item__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  color: #55708f;
  background: #f1f5f9;
}

.service-item__icon svg {
  width: 16px;
  height: 16px;
}

.service-item__copy {
  display: grid;
  flex: 1;
  gap: 1px;
}

.service-item__copy strong {
  font-size: 12px;
}

.service-item__copy span {
  color: var(--portal-muted);
  font-size: 10px;
}

.service-item__state {
  color: var(--portal-success);
  font-size: 10px;
  font-weight: 800;
}

.notice-card {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(145deg, #172033, #253652);
  box-shadow: 0 16px 34px rgba(23, 32, 51, 0.18);
}

.notice-card::after {
  position: absolute;
  top: -52px;
  right: -55px;
  width: 140px;
  height: 140px;
  border: 28px solid rgba(255, 255, 255, 0.045);
  border-radius: 50%;
  content: "";
}

.notice-card__icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  margin-bottom: 18px;
  border-radius: 12px;
  color: #a5f3fc;
  background: rgba(103, 232, 249, 0.1);
}

.notice-card__icon svg {
  width: 19px;
  height: 19px;
}

.notice-card h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  font-size: 15px;
}

.notice-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  line-height: 1.75;
}

.distribution-card {
  padding-bottom: 18px;
}

.distribution-chart {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
}

.distribution-chart__donut {
  position: relative;
  display: grid;
  place-items: center;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: conic-gradient(#3b82f6 0 22%, #8b5cf6 22% 55%, #14b8a6 55% 77%, #f59e0b 77% 100%);
  box-shadow: 0 12px 26px rgba(79, 70, 229, 0.16);
}

.distribution-chart__donut::after {
  position: absolute;
  inset: 18px;
  border: 1px solid #eef2f7;
  border-radius: 50%;
  background: #ffffff;
  content: "";
}

.distribution-chart__donut span {
  position: relative;
  z-index: 1;
  display: grid;
  color: var(--portal-muted);
  font-size: 9px;
  text-align: center;
}

.distribution-chart__donut strong {
  color: var(--portal-text);
  font-size: 18px;
  line-height: 1.1;
}

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

.distribution-legend li {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: var(--portal-muted);
  font-size: 9px;
}

.distribution-legend strong {
  color: #6b7890;
  font-family: var(--portal-mono);
  font-size: 9px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.11);
}

.legend-dot--blue { background: #3b82f6; }
.legend-dot--violet { background: #8b5cf6; }
.legend-dot--cyan { background: #14b8a6; }
.legend-dot--orange { background: #f59e0b; }

.activity-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-list li {
  position: relative;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: start;
  gap: 9px;
  min-height: 50px;
}

.activity-list li:not(:last-child)::before {
  position: absolute;
  top: 12px;
  bottom: -2px;
  left: 3px;
  width: 1px;
  background: #dce4ef;
  content: "";
}

.activity-list__dot {
  position: relative;
  z-index: 1;
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.16);
}

.activity-list__dot--violet { background: #8b5cf6; }
.activity-list__dot--cyan { background: #06b6d4; }
.activity-list__dot--green { background: #22c55e; }

.activity-list__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.activity-list__copy strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-list__copy span,
.activity-list time {
  color: var(--portal-muted);
  font-size: 9px;
}

.activity-list time {
  white-space: nowrap;
}

.portal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding: 15px 2px 0;
  border-top: 1px solid rgba(200, 211, 225, 0.82);
  color: var(--portal-muted);
  font-size: 10px;
}

.portal-footer strong {
  color: #46556b;
}

.portal-footer__version {
  font-family: var(--portal-mono);
}

.transition-loader,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(12px);
}

.transition-loader[hidden],
.modal-backdrop[hidden] {
  display: none;
}

.loader-panel {
  width: min(400px, 100%);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  color: #ffffff;
  background: #172033;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
  text-align: center;
}

.loader-panel__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 17px;
  border-radius: 16px;
  color: #a5f3fc;
  background: rgba(103, 232, 249, 0.09);
}

.loader-panel__icon svg {
  width: 24px;
  height: 24px;
}

.loader-panel h2 {
  margin: 0 0 7px;
  font-size: 17px;
}

.loader-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.loader-progress {
  height: 5px;
  margin-top: 21px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.loader-progress__bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #67e8f9);
}

.transition-loader.is-active .loader-progress__bar {
  animation: portal-progress 500ms ease-out forwards;
}

@keyframes portal-progress {
  to { width: 100%; }
}

.modal-card {
  width: min(430px, 100%);
  padding: 26px;
  border: 1px solid var(--portal-border);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.modal-card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 14px;
  color: var(--portal-danger);
  background: var(--portal-danger-soft);
}

.modal-card__icon svg {
  width: 21px;
  height: 21px;
}

.modal-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 850;
}

.modal-card p {
  margin: 0;
  color: var(--portal-muted);
  font-size: 13px;
  line-height: 1.65;
}

.modal-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.button {
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid var(--portal-border);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform var(--portal-transition), background var(--portal-transition), border-color var(--portal-transition);
}

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

.button--secondary {
  color: #526176;
  background: #ffffff;
}

.button--secondary:hover {
  border-color: var(--portal-border-strong);
  background: #f8fafc;
}

.button--danger {
  border-color: var(--portal-danger);
  color: #ffffff;
  background: var(--portal-danger);
}

.button--danger:hover {
  background: #b91c1c;
}

.ami-credit {
  position: fixed;
  right: 10px;
  bottom: 6px;
  z-index: 20;
  padding: 2px 8px;
  border: 1px solid rgba(200, 211, 225, 0.72);
  border-radius: 6px;
  color: rgba(23, 32, 51, 0.46);
  background: rgba(255, 255, 255, 0.76);
  font-size: 10px;
  letter-spacing: 0.02em;
  pointer-events: none;
  user-select: none;
}

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

:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 3px;
}

/* Desktop dashboard is a single fixed workspace. Content rows share the
   remaining viewport height instead of relying on hidden overflow alone. */
@media (min-width: 901px) {
  html,
  body {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .portal-shell {
    display: grid;
    height: 100dvh;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
  }

  .portal-shell > main {
    display: grid;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .workspace,
  .module-section,
  .module-grid,
  .overview-column {
    min-height: 0;
  }

  .workspace {
    height: 100%;
    overflow: hidden;
  }

  .module-section {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .module-grid {
    grid-template-rows: repeat(3, clamp(76px, 15vh, 132px));
    align-content: start;
    overflow: hidden;
  }

  .module-card {
    min-height: 0;
  }

  .overview-column {
    height: 100%;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    overflow: hidden;
  }

  .overview-card {
    min-height: 0;
  }

  .ami-credit {
    display: none;
  }
}

@media (min-width: 1181px) {
  .portal-shell {
    min-height: 100dvh;
    padding: 12px 0 8px;
  }

  .topbar {
    min-height: 64px;
    padding: 9px 16px;
  }

  .portal-brand__mark {
    height: 42px;
  }

  .hero {
    min-height: 206px;
    margin: 14px 0 16px;
    padding: 20px 26px;
    gap: 16px;
    border-radius: 26px;
  }

  .hero__visual {
    height: 174px;
  }

  .hero__visual img {
    width: 360px;
    height: 192px;
  }

  .hero__eyebrow {
    margin-bottom: 8px;
  }

  .hero h1 {
    font-size: clamp(34px, 3.2vw, 44px);
  }

  .hero__description {
    margin-top: 9px;
    line-height: 1.58;
  }

  .hero__time {
    margin-top: 12px;
  }

  .hero-panel {
    padding: 15px;
    border-radius: 20px;
  }

  .hero-panel__label {
    margin-bottom: 7px;
  }

  .module-search input {
    height: 44px;
  }

  .summary-grid {
    gap: 8px;
    margin-top: 9px;
  }

  .summary-item {
    padding: 8px 10px;
  }

  .workspace {
    gap: 16px;
  }

  .section-heading {
    margin-bottom: 10px;
  }

  .module-grid {
    gap: 10px;
  }

  .module-card {
    min-height: 142px;
    padding: 14px;
  }

  .module-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .module-card__icon svg {
    width: 18px;
    height: 18px;
  }

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

  .module-card__footer {
    padding-top: 8px;
  }

  .overview-column {
    gap: 10px;
    padding-top: 46px;
  }

  .overview-card {
    padding: 14px;
  }

  .overview-card__header {
    margin-bottom: 10px;
  }

  .service-list {
    gap: 8px;
  }

  .service-item__icon {
    width: 30px;
    height: 30px;
  }

  .distribution-card {
    padding-bottom: 14px;
  }

  .distribution-chart {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
  }

  .distribution-chart__donut {
    width: 78px;
    height: 78px;
  }

  .distribution-chart__donut::after {
    inset: 14px;
  }

  .activity-list li {
    min-height: 38px;
  }

  .portal-footer {
    margin-top: 10px;
    padding-top: 8px;
  }
}

@media (min-width: 1181px) and (max-height: 860px) {
  .portal-shell {
    padding-top: 8px;
  }

  .topbar {
    min-height: 54px;
    padding-block: 6px;
  }

  .portal-brand__mark {
    height: 38px;
  }

  .hero {
    min-height: 164px;
    margin: 8px 0 10px;
    padding: 13px 22px;
  }

  .hero__visual {
    height: 142px;
  }

  .hero__visual img {
    width: 304px;
    height: 164px;
  }

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

  .hero__description {
    display: -webkit-box;
    margin-top: 6px;
    overflow: hidden;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .hero__time {
    margin-top: 7px;
  }

  .hero-panel {
    padding: 11px;
  }

  .module-search input {
    height: 38px;
  }

  .summary-grid {
    margin-top: 6px;
  }

  .summary-item {
    padding: 5px 8px;
  }

  .section-heading {
    margin-bottom: 7px;
  }

  .section-heading__icon {
    width: 32px;
    height: 32px;
  }

  .module-grid {
    gap: 8px;
  }

  .module-card {
    min-height: 112px;
    padding: 10px;
  }

  .module-card__icon {
    width: 32px;
    height: 32px;
  }

  .module-card h3 {
    margin: 6px 0 2px;
    font-size: 15px;
  }

  .module-card__subtitle {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .module-card__footer {
    padding-top: 4px;
  }

  .overview-column {
    gap: 8px;
    padding-top: 39px;
  }

  .overview-card {
    padding: 10px;
  }

  .overview-card__header {
    margin-bottom: 7px;
  }

  .service-list {
    gap: 5px;
  }

  .service-item__icon {
    width: 26px;
    height: 26px;
  }

  .service-item__copy span {
    display: none;
  }

  .distribution-chart {
    grid-template-columns: 66px minmax(0, 1fr);
  }

  .distribution-chart__donut {
    width: 62px;
    height: 62px;
  }

  .distribution-chart__donut::after {
    inset: 12px;
  }

  .distribution-legend {
    gap: 4px;
  }

  .activity-list li {
    min-height: 31px;
  }

  .activity-list__copy span {
    display: none;
  }

  .portal-footer {
    margin-top: 6px;
    padding-top: 5px;
  }

}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.85fr);
    gap: 26px;
  }

  .hero__visual {
    position: absolute;
    top: 12px;
    left: 31%;
    width: 34%;
    margin: 0;
    opacity: 0.48;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr) 288px;
  }

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

@media (min-width: 901px) and (max-width: 1180px) {
  .portal-shell {
    width: calc(100% - 20px);
    min-height: 100dvh;
    padding: 6px 0 0;
  }

  .topbar {
    min-height: 46px;
    padding: 5px 10px;
  }

  .portal-brand {
    gap: 9px;
  }

  .portal-brand__mark {
    min-width: 88px;
    height: 34px;
    border-radius: 10px;
  }

  .portal-brand__mark .ami-brand-3d {
    font-size: 16px;
  }

  .connection-pill {
    min-height: 31px;
  }

  .user-menu__avatar {
    width: 31px;
    height: 31px;
  }

  .icon-button {
    width: 32px;
    height: 32px;
  }

  .hero {
    min-height: 112px;
    margin: 6px 0;
    padding: 10px 14px;
    gap: 12px;
    border-radius: 20px;
  }

  .hero__visual {
    display: none;
  }

  .hero__eyebrow {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero__description {
    display: -webkit-box;
    margin-top: 4px;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }

  .hero__time {
    gap: 8px;
    margin-top: 5px;
    font-size: 10px;
  }

  .hero-panel {
    padding: 8px;
    border-radius: 15px;
  }

  .hero-panel__label {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .module-search input {
    height: 34px;
    padding-inline: 38px;
    border-radius: 10px;
    font-size: 11px;
  }

  .module-search > svg {
    left: 12px;
    width: 16px;
    height: 16px;
  }

  .module-search__shortcut {
    right: 8px;
    min-width: 36px;
    height: 22px;
    font-size: 9px;
  }

  .summary-grid {
    gap: 5px;
    margin-top: 5px;
  }

  .summary-item {
    padding: 4px 6px;
    border-radius: 9px;
  }

  .summary-item span {
    display: none;
  }

  .summary-item strong {
    font-size: 13px;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 8px;
  }

  .section-heading {
    margin-bottom: 5px;
  }

  .section-heading__title {
    gap: 7px;
  }

  .section-heading__icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  .section-heading h2 {
    font-size: 16px;
  }

  .section-heading p {
    display: none;
  }

  .section-heading__count {
    padding: 4px 7px;
    font-size: 9px;
  }

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

  .module-card {
    min-height: 78px;
    padding: 7px;
    border-radius: 11px;
  }

  .module-card__icon {
    width: 27px;
    height: 27px;
    border-radius: 8px;
  }

  .module-card__icon svg {
    width: 15px;
    height: 15px;
  }

  .module-card__status {
    min-height: 19px;
    padding-inline: 6px;
    font-size: 8px;
  }

  .module-card h3 {
    margin: 3px 0 0;
    font-size: 13px;
  }

  .module-card__subtitle {
    display: none;
  }

  .module-card__footer {
    padding-top: 2px;
    font-size: 8px;
  }

  .module-card__footer > :first-child {
    display: none;
  }

  .module-card__action {
    margin-left: auto;
    font-size: 9px;
  }

  .overview-column {
    gap: 5px;
    padding-top: 0;
  }

  .overview-card {
    padding: 7px;
    border-radius: 11px;
  }

  .overview-card__header {
    margin-bottom: 4px;
  }

  .overview-card__header h2 {
    font-size: 11px;
  }

  .overview-card__badge,
  .overview-card__period {
    padding: 3px 5px;
    font-size: 7px;
  }

  .service-list {
    gap: 3px;
  }

  .service-item {
    gap: 6px;
  }

  .service-item__icon {
    width: 20px;
    height: 20px;
    border-radius: 6px;
  }

  .service-item__icon svg {
    width: 12px;
    height: 12px;
  }

  .service-item__copy strong,
  .service-item__state {
    font-size: 8px;
  }

  .service-item__copy span {
    display: none;
  }

  .distribution-card {
    padding-bottom: 7px;
  }

  .distribution-chart {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 6px;
  }

  .distribution-chart__donut {
    width: 48px;
    height: 48px;
  }

  .distribution-chart__donut::after {
    inset: 9px;
  }

  .distribution-chart__donut span,
  .distribution-legend li,
  .distribution-legend strong {
    font-size: 7px;
  }

  .distribution-chart__donut strong {
    font-size: 11px;
  }

  .distribution-legend {
    gap: 2px;
  }

  .activity-list li {
    grid-template-columns: 7px minmax(0, 1fr) auto;
    gap: 5px;
    min-height: 20px;
  }

  .activity-list__dot {
    width: 6px;
    height: 6px;
    margin-top: 2px;
  }

  .activity-list__copy strong,
  .activity-list__copy span,
  .activity-list time {
    font-size: 7px;
  }

  .activity-list__copy span {
    display: none;
  }

  .activity-list li:last-child {
    display: none;
  }

  .portal-footer {
    margin-top: 0;
    padding-top: 2px;
    font-size: 8px;
  }

  .portal-robot-runner { --robot-frame-height: clamp(390px, 60vh, 520px); }
}

@media (max-width: 900px) {
  .portal-robot-runner { --robot-frame-height: clamp(330px, 54vh, 440px); }

  .portal-shell {
    width: min(100% - 32px, 760px);
    padding-top: 16px;
  }

  .portal-brand__copy,
  .connection-pill span {
    display: none;
  }

  .connection-pill {
    width: 38px;
    justify-content: center;
    padding: 0;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 36px;
  }

  .hero-panel {
    width: 100%;
  }

  .hero__visual {
    display: none;
  }

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

  .overview-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .portal-robot-runner { --robot-frame-height: clamp(280px, 48vh, 360px); }

  .portal-shell {
    width: min(100% - 22px, 520px);
    padding-bottom: 28px;
  }

  .topbar {
    min-height: 68px;
    padding: 11px;
  }

  .portal-brand__mark {
    min-width: 84px;
    height: 42px;
    padding: 0 9px;
  }

  .portal-brand__mark .ami-brand-3d {
    font-size: 15px;
  }

  .connection-pill {
    display: none;
  }

  .user-menu {
    gap: 7px;
    padding-left: 10px;
  }

  .user-menu__avatar,
  .user-menu__copy {
    display: none;
  }

  .hero {
    margin: 18px 0 28px;
    padding: 30px 20px 22px;
    border-radius: 23px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero__description {
    font-size: 14px;
  }

  .hero__time {
    flex-wrap: wrap;
  }

  .hero-panel {
    padding: 17px;
    border-radius: 20px;
  }

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

  .summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
  }

  .summary-item span {
    margin: 0;
  }

  .module-grid,
  .overview-column {
    grid-template-columns: minmax(0, 1fr);
  }

  .module-card--featured {
    grid-column: auto;
    min-height: 230px;
  }

  .section-heading {
    align-items: center;
  }

  .section-heading p {
    display: none;
  }

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

  .ami-credit {
    position: static;
    width: max-content;
    max-width: 100%;
    margin: 18px auto 6px;
  }

  .modal-card__actions {
    flex-direction: column-reverse;
  }

  .button {
    width: 100%;
  }
}

/* Wide but short desktop windows (for example a maximized browser at 125%
   display scaling) keep every card visible by compacting the cards themselves. */
@media (min-width: 901px) and (max-height: 760px) {
  .portal-shell {
    padding: 6px 0 0;
  }

  .topbar {
    min-height: 46px;
    padding: 5px 10px;
  }

  .portal-brand {
    gap: 9px;
  }

  .portal-brand__mark {
    min-width: 88px;
    height: 34px;
    border-radius: 10px;
  }

  .portal-brand__mark .ami-brand-3d {
    font-size: 16px;
  }

  .connection-pill {
    min-height: 31px;
  }

  .user-menu__avatar {
    width: 31px;
    height: 31px;
  }

  .icon-button {
    width: 32px;
    height: 32px;
  }

  .hero {
    min-height: clamp(100px, 22vh, 132px);
    margin: 6px 0;
    padding: 10px 14px;
    gap: 12px;
    border-radius: 20px;
  }

  .hero__visual {
    height: clamp(88px, 19vh, 114px);
  }

  .hero__visual img {
    width: clamp(188px, 18vw, 236px);
    height: auto;
  }

  .hero__eyebrow {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .hero h1 {
    font-size: clamp(26px, 4.6vh, 32px);
  }

  .hero__description {
    display: -webkit-box;
    margin-top: 4px;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .hero__time {
    gap: 8px;
    margin-top: 5px;
    font-size: 10px;
  }

  .hero-panel {
    padding: 8px;
    border-radius: 15px;
  }

  .hero-panel__label {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .module-search input {
    height: 34px;
    padding-inline: 38px;
    border-radius: 10px;
    font-size: 11px;
  }

  .summary-grid {
    gap: 5px;
    margin-top: 5px;
  }

  .summary-item {
    padding: 4px 6px;
    border-radius: 9px;
  }

  .summary-item strong {
    font-size: 13px;
  }

  .workspace {
    gap: 8px;
  }

  .section-heading {
    margin-bottom: 5px;
  }

  .section-heading__title {
    gap: 7px;
  }

  .section-heading__icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  .section-heading h2 {
    font-size: 16px;
  }

  .section-heading p {
    display: none;
  }

  .section-heading__count {
    padding: 4px 7px;
    font-size: 9px;
  }

  .module-grid {
    gap: 6px;
  }

  .module-card {
    min-height: 0;
    padding: 7px;
    border-radius: 11px;
  }

  .module-card__icon {
    width: 27px;
    height: 27px;
    border-radius: 8px;
  }

  .module-card__icon svg {
    width: 15px;
    height: 15px;
  }

  .module-card__status {
    min-height: 19px;
    padding-inline: 6px;
    font-size: 8px;
  }

  .module-card h3 {
    margin: 3px 0 0;
    font-size: 13px;
  }

  .module-card__subtitle {
    overflow: hidden;
    font-size: 9px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .module-card__footer {
    padding-top: 2px;
    font-size: 8px;
  }

  .module-card__footer > :first-child {
    display: none;
  }

  .module-card__action {
    margin-left: auto;
    font-size: 9px;
  }

  .overview-column {
    gap: 5px;
    padding-top: 0;
  }

  .overview-card {
    min-height: 0;
    padding: 7px;
    border-radius: 11px;
  }

  .overview-card__header {
    margin-bottom: 4px;
  }

  .overview-card__header h2 {
    font-size: 11px;
  }

  .overview-card__badge,
  .overview-card__period {
    padding: 3px 5px;
    font-size: 7px;
  }

  .service-list {
    gap: 3px;
  }

  .service-item {
    gap: 6px;
  }

  .service-item__icon {
    width: 20px;
    height: 20px;
    border-radius: 6px;
  }

  .service-item__copy strong,
  .service-item__state {
    font-size: 8px;
  }

  .service-item__copy span {
    display: none;
  }

  .distribution-card {
    padding-bottom: 7px;
  }

  .distribution-chart {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 6px;
  }

  .distribution-chart__donut {
    width: 48px;
    height: 48px;
  }

  .distribution-chart__donut::after {
    inset: 9px;
  }

  .distribution-chart__donut span,
  .distribution-legend li,
  .distribution-legend strong {
    font-size: 7px;
  }

  .distribution-chart__donut strong {
    font-size: 11px;
  }

  .distribution-legend {
    gap: 2px;
  }

  .activity-list li {
    grid-template-columns: 7px minmax(0, 1fr) auto;
    gap: 5px;
    min-height: 20px;
  }

  .activity-list__copy strong,
  .activity-list__copy span,
  .activity-list time {
    font-size: 7px;
  }

  .activity-list__copy span {
    display: none;
  }

  .portal-footer {
    margin-top: 0;
    padding-top: 2px;
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-robot-runner {
    display: none !important;
  }

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

/* --------------------------------------------------------------------------
   Reference-layout contract (2026-08-04)
   The dashboard keeps the 1600 × 1000 design proportions. A short viewport
   scrolls vertically; it never compresses or scales the complete interface.
   -------------------------------------------------------------------------- */

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  display: block;
  height: auto;
  background: #eef4ff;
}

.portal-shell {
  display: block;
  width: min(1600px, calc(100vw - 32px));
  height: auto;
  min-height: 1000px;
  margin: 0 auto;
  padding: 16px 24px 20px;
  overflow: visible;
  box-sizing: border-box;
  transform: none;
  zoom: 1;
}

.portal-shell > main {
  display: block;
  min-height: auto;
}

.topbar {
  min-height: 68px;
  padding: 0 18px;
  border-radius: 20px;
  box-sizing: border-box;
}

.hero {
  display: grid;
  grid-template-columns:
    minmax(360px, 1.05fr)
    minmax(330px, 0.8fr)
    minmax(440px, 1fr);
  width: 100%;
  height: clamp(260px, 17vw, 285px);
  min-height: 260px;
  margin: 12px 0 0;
  padding: 28px 30px;
  gap: 18px;
  border-radius: 27px;
  box-sizing: border-box;
}

.hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(54px, 3.3vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero__description {
  display: block;
  max-width: 580px;
  margin: 22px 0 0;
  overflow: visible;
  font-size: 16px;
  line-height: 1.8;
  -webkit-line-clamp: unset;
}

.hero__time {
  margin-top: 18px;
  font-size: 13px;
}

.hero__visual {
  position: relative;
  top: auto;
  left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  min-width: 0;
  margin: 0;
  opacity: 1;
}

.hero__visual img,
.hero__visual video {
  width: min(100%, 390px);
  height: auto;
  object-fit: contain;
}

.hero-panel {
  align-self: center;
  min-height: 190px;
  padding: 18px;
  border-radius: 22px;
  box-sizing: border-box;
}

.hero-panel__label {
  margin-bottom: 10px;
  font-size: 12px;
}

.module-search input {
  height: 48px;
  padding-inline: 44px 70px;
  border-radius: 13px;
  font-size: 14px;
}

.summary-grid {
  gap: 10px;
  margin-top: 12px;
}

.summary-item {
  padding: 10px 12px;
  border-radius: 13px;
}

.summary-item span {
  display: block;
}

.summary-item strong {
  font-size: 17px;
}

.workspace {
  display: grid;
  height: auto;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 22px;
  overflow: visible;
}

.module-section {
  display: block;
  width: auto;
  min-height: 0;
}

.section-heading {
  min-height: 72px;
  margin: 0;
  padding: 18px 8px 12px;
  box-sizing: border-box;
}

.section-heading__title {
  gap: 12px;
}

.section-heading__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.section-heading h2 {
  font-size: 22px;
}

.section-heading p {
  display: block;
  font-size: 13px;
}

.section-heading__count {
  padding: 7px 11px;
  font-size: 11px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: none;
  align-content: normal;
  gap: 16px;
  overflow: visible;
}

.module-card {
  min-height: 185px;
  padding: 22px 24px;
  border-radius: 22px;
  box-sizing: border-box;
}

.module-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.module-card__icon svg {
  width: 24px;
  height: 24px;
}

.module-card__status {
  min-height: 25px;
  padding-inline: 8px;
  font-size: 10px;
}

.module-card h3 {
  margin: 18px 0 8px;
  font-size: 20px;
  line-height: 1.3;
}

.module-card__subtitle,
.module-card p {
  display: block;
  margin: 0;
  overflow: visible;
  font-size: 14px;
  line-height: 1.65;
  text-overflow: clip;
  white-space: normal;
}

.module-card__footer {
  padding-top: 16px;
  font-size: 11px;
}

.module-card__footer > :first-child {
  display: inline;
}

.module-card__action {
  margin-left: 0;
  font-size: 12px;
}

.overview-column {
  display: flex;
  height: auto;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  grid-template-rows: none;
  gap: 16px;
  padding-top: 0;
  overflow: visible;
}

.overview-card {
  height: auto;
  padding: 20px;
  border-radius: 22px;
}

.overview-column > .overview-card:first-child {
  min-height: 220px;
}

.distribution-card {
  min-height: 205px;
  padding-bottom: 20px;
}

.activity-card {
  min-height: 250px;
}

.overview-card__header {
  margin-bottom: 16px;
}

.overview-card__header h2 {
  font-size: 16px;
}

.service-list {
  gap: 12px;
}

.service-item {
  gap: 10px;
}

.service-item__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.service-item__copy strong,
.service-item__state {
  font-size: 12px;
}

.service-item__copy span {
  display: block;
}

.distribution-chart {
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
}

.distribution-chart__donut {
  width: 88px;
  height: 88px;
}

.activity-list li {
  min-height: 38px;
}

.activity-list__copy strong,
.activity-list__copy span,
.activity-list time {
  font-size: 10px;
}

.activity-list__copy span {
  display: block;
}

.portal-footer {
  margin-top: 16px;
  padding-top: 10px;
  font-size: 10px;
}

.ami-credit {
  display: none;
}

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

  .workspace {
    grid-template-columns: minmax(0, 1fr) 330px;
  }

  .module-card {
    min-height: 175px;
  }
}

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

  .hero__visual {
    display: none;
  }

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

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

@media (max-width: 760px) {
  .portal-shell {
    width: calc(100vw - 16px);
    min-height: auto;
    padding: 8px;
  }

  .hero,
  .module-grid,
  .overview-column {
    grid-template-columns: 1fr;
  }

  .hero {
    height: auto;
    min-height: auto;
  }

  .hero h1 {
    font-size: 38px;
  }
}

/* --------------------------------------------------------------------------
   Short desktop viewport (2026-08-04)
   The latest dashboard requirement is a complete, non-scrolling desktop view.
   Components are reflowed individually; the page is never scaled or zoomed.
   -------------------------------------------------------------------------- */

@media (min-width: 1051px) and (max-height: 850px) {
  html,
  body {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body {
    height: 100dvh;
  }

  .portal-shell {
    display: grid;
    grid-template-rows: 54px minmax(0, 1fr) 16px;
    width: min(1600px, calc(100vw - 24px));
    height: 100dvh;
    min-height: 0;
    padding: 8px 12px 6px;
    overflow: hidden;
  }

  .topbar {
    height: 54px;
    min-height: 54px;
    padding: 0 14px;
    border-radius: 16px;
  }

  .portal-shell > main {
    display: grid;
    grid-template-rows: 158px minmax(0, 1fr);
    gap: 8px;
    min-height: 0;
    overflow: hidden;
  }

  .hero {
    height: 150px;
    min-height: 150px;
    margin-top: 8px;
    padding: 14px 18px;
    gap: 12px;
    border-radius: 20px;
  }

  .hero h1 {
    font-size: clamp(34px, 2.55vw, 46px);
  }

  .hero__eyebrow {
    margin-bottom: 8px;
    font-size: 11px;
  }

  .hero__description {
    display: -webkit-box;
    max-width: 560px;
    margin-top: 8px;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .hero__time {
    margin-top: 8px;
    font-size: 11px;
  }

  .hero__visual img,
  .hero__visual video {
    width: min(100%, 235px);
    max-height: 136px;
  }

  .hero-panel {
    min-height: 124px;
    padding: 9px 11px;
    border-radius: 16px;
  }

  .hero-panel__label {
    margin-bottom: 5px;
    font-size: 10px;
  }

  .module-search input {
    height: 36px;
    padding-inline: 38px 60px;
    font-size: 12px;
  }

  .summary-grid {
    gap: 7px;
    margin-top: 7px;
  }

  .summary-item {
    min-height: 43px;
    padding: 5px 8px;
  }

  .summary-item span {
    font-size: 9px;
  }

  .summary-item strong {
    font-size: 15px;
  }

  .workspace {
    height: 100%;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: stretch;
    gap: 12px;
    overflow: hidden;
  }

  .module-section {
    display: grid;
    grid-template-rows: 40px minmax(0, 1fr);
    min-height: 0;
  }

  .section-heading {
    min-height: 40px;
    padding: 3px 6px;
    align-items: center;
  }

  .section-heading__icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .section-heading h2 {
    font-size: 18px;
  }

  .section-heading p {
    margin-top: 1px;
    font-size: 10px;
  }

  .section-heading__count {
    padding: 4px 8px;
    font-size: 9px;
  }

  .module-grid {
    height: 100%;
    min-height: 0;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 10px;
    overflow: hidden;
  }

  .module-card {
    min-height: 0;
    padding: 12px 14px;
    border-radius: 17px;
  }

  .module-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .module-card__icon svg {
    width: 19px;
    height: 19px;
  }

  .module-card__status {
    min-height: 20px;
    padding-inline: 7px;
    font-size: 9px;
  }

  .module-card h3 {
    margin: 8px 0 4px;
    font-size: 16px;
    line-height: 1.2;
  }

  .module-card__subtitle,
  .module-card p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .module-card__footer {
    padding-top: 7px;
    font-size: 9px;
  }

  .module-card__action {
    font-size: 10px;
  }

  .overview-column {
    display: grid;
    height: 100%;
    min-height: 0;
    grid-template-rows: minmax(0, 0.96fr) minmax(0, 1.1fr) minmax(0, 0.94fr);
    gap: 8px;
    overflow: hidden;
  }

  .overview-card,
  .overview-column > .overview-card:first-child,
  .distribution-card,
  .activity-card {
    height: auto;
    min-height: 0;
    padding: 9px 11px;
    border-radius: 15px;
    overflow: hidden;
  }

  .overview-card__header {
    margin-bottom: 5px;
  }

  .overview-card__header h2 {
    font-size: 13px;
  }

  .overview-card__badge,
  .overview-card__period {
    padding: 3px 6px;
    font-size: 8px;
  }

  .service-list {
    gap: 2px;
  }

  .service-item {
    gap: 6px;
  }

  .service-item__icon {
    width: 20px;
    height: 20px;
    border-radius: 7px;
  }

  .service-item__icon svg {
    width: 13px;
    height: 13px;
  }

  .service-item__copy strong,
  .service-item__state {
    font-size: 9px;
  }

  .service-item__copy span {
    display: none;
  }

  .distribution-chart {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 8px;
  }

  .distribution-chart__donut {
    width: 60px;
    height: 60px;
  }

  .distribution-chart__donut::after {
    inset: 11px;
  }

  .distribution-chart__donut strong {
    font-size: 13px;
  }

  .distribution-chart__donut span {
    font-size: 7px;
  }

  .distribution-legend {
    gap: 3px;
  }

  .distribution-legend li {
    grid-template-columns: 6px minmax(0, 1fr) auto;
    gap: 5px;
    font-size: 7px;
    line-height: 1.2;
  }

  .distribution-legend strong {
    font-size: 7px;
  }

  .legend-dot {
    width: 5px;
    height: 5px;
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.11);
  }

  .activity-list {
    gap: 1px;
  }

  .activity-list li {
    min-height: 18px;
  }

  .activity-list__copy strong,
  .activity-list time {
    font-size: 8px;
  }

  .activity-list__copy span {
    display: none;
  }

  .portal-footer {
    min-height: 16px;
    margin: 0;
    padding: 3px 2px 0;
    font-size: 8px;
  }
}
