:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #1d2733;
  --muted: #627084;
  --line: #d9dee7;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --blue: #1d4ed8;
  --warning: #b45309;
  --danger: #b91c1c;
  --shadow: 0 16px 40px rgba(29, 39, 51, 0.08);
  --brand-bg-image: url("/assets/brand/yuhe-anime-workbench-bg.png");
  --login-panel-image: url("/assets/brand/yuhe-login-panel-960.png");
}

* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(246, 247, 249, 0.94), rgba(246, 247, 249, 0.94)),
    var(--brand-bg-image) center / cover fixed;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0 248px, rgba(244, 247, 250, 0.92) 248px),
    var(--brand-bg-image) center / cover fixed;
}

.login-screen {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(90deg, rgba(8, 13, 27, 0.9), rgba(8, 13, 27, 0.34) 44%, rgba(8, 13, 27, 0.5)),
    var(--brand-bg-image) center / cover;
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

.login-screen::after {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(125, 211, 252, 0.18), transparent 10%),
    conic-gradient(from 0deg, transparent 0 12%, rgba(20, 184, 166, 0.2) 13%, transparent 18% 34%, rgba(245, 158, 11, 0.16) 35%, transparent 42% 64%, rgba(125, 211, 252, 0.16) 65%, transparent 72% 100%);
  filter: blur(18px);
  opacity: 0.5;
  animation: idlePortalSpin 22s linear infinite;
  pointer-events: none;
}

.login-fx-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.login-transition {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.login-transition.active {
  opacity: 1;
}

.login-transition[hidden] {
  display: none;
}

.login-transition canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.tunnel-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(44vw, 560px);
  aspect-ratio: 1;
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.28);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 9%, rgba(125, 211, 252, 0.6) 10% 22%, rgba(20, 184, 166, 0.18) 23% 42%, transparent 60%);
  filter: blur(0.2px);
  animation: tunnelPulse 3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.login-screen[hidden],
.app-shell[hidden] {
  display: none;
}

.login-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(350px, 1fr) minmax(400px, 0.9fr);
  width: min(1020px, calc(100vw - 56px));
  min-height: 560px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 34px 90px rgba(2, 6, 23, 0.42);
  backdrop-filter: blur(18px);
  transform-origin: 50% 48%;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(125, 211, 252, 0.7), transparent 16% 84%, rgba(245, 158, 11, 0.56)) top / 100% 1px no-repeat,
    linear-gradient(90deg, rgba(245, 158, 11, 0.46), transparent 18% 82%, rgba(125, 211, 252, 0.56)) bottom / 100% 1px no-repeat,
    linear-gradient(180deg, rgba(125, 211, 252, 0.55), transparent 24% 76%, rgba(245, 158, 11, 0.38)) left / 1px 100% no-repeat,
    linear-gradient(180deg, rgba(245, 158, 11, 0.38), transparent 24% 76%, rgba(125, 211, 252, 0.55)) right / 1px 100% no-repeat;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), inset 0 0 34px rgba(20, 184, 166, 0.08);
}

.login-card::after {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 2;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 6px;
  pointer-events: none;
}

.login-screen.is-transitioning .login-card {
  animation: loginCardWarp 2.2s cubic-bezier(0.78, 0, 0.22, 1) forwards;
}

.login-art {
  position: relative;
  min-height: 560px;
  background: #0f172a var(--login-panel-image) center / cover;
}

.login-art img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
}

.login-art-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.28)),
    linear-gradient(90deg, transparent 64%, rgba(255, 255, 255, 0.28));
}

.login-form-panel {
  position: relative;
  display: grid;
  align-content: center;
  padding: 44px 48px;
  color: #e5f7ff;
  background:
    linear-gradient(rgba(8, 13, 27, 0.82), rgba(8, 13, 27, 0.82)),
    var(--login-panel-image) 62% center / cover;
  box-shadow: inset 1px 0 0 rgba(125, 211, 252, 0.16);
}

.login-form-panel::before {
  content: "";
  position: absolute;
  inset: 18px 18px auto auto;
  width: 86px;
  height: 86px;
  border-top: 1px solid rgba(125, 211, 252, 0.56);
  border-right: 1px solid rgba(125, 211, 252, 0.56);
  box-shadow: 16px -16px 30px rgba(20, 184, 166, 0.16);
  pointer-events: none;
}

.login-form-panel::after {
  content: "";
  position: absolute;
  left: 26px;
  bottom: 24px;
  width: 112px;
  height: 1px;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.65), transparent);
  pointer-events: none;
}

.login-brand {
  color: #f8fafc;
  margin-bottom: 28px;
}

.login-form-panel h1 {
  margin-bottom: 24px;
  font-size: 29px;
  letter-spacing: 0;
  color: #f8fafc;
  text-shadow: 0 0 18px rgba(125, 211, 252, 0.28);
}

.login-form-panel label {
  margin-bottom: 16px;
  color: #dbeafe;
  letter-spacing: 0;
}

.login-form-panel input {
  min-height: 46px;
  border-color: rgba(125, 211, 252, 0.34);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.48));
  color: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 1px rgba(20, 184, 166, 0.06);
  font-weight: 700;
}

.login-form-panel input:focus {
  border-color: rgba(20, 184, 166, 0.72);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.18), 0 0 28px rgba(20, 184, 166, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.login-form-panel .primary-button {
  position: relative;
  min-height: 50px;
  margin-top: 2px;
  overflow: hidden;
  background:
    linear-gradient(135deg, #0f766e, #0e7490 55%, #1d4ed8);
  box-shadow: 0 16px 28px rgba(14, 116, 144, 0.22);
}

.login-form-panel .primary-button::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-120%) skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: transform 0.55s ease;
  pointer-events: none;
}

.login-form-panel .primary-button:hover {
  background:
    linear-gradient(135deg, #115e59, #0f667d 55%, #1e40af);
  transform: translateY(-1px);
}

.login-form-panel .primary-button:hover::before {
  transform: translateX(120%) skewX(-18deg);
}

.login-form-panel .muted-notice {
  border-color: rgba(125, 211, 252, 0.24);
  background: rgba(15, 23, 42, 0.58);
  color: #bad8f4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.login-brand div > span {
  color: #9ec6dc;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(14, 22, 39, 0.94), rgba(12, 18, 32, 0.99)),
    var(--brand-bg-image) left center / auto 100%;
  color: #f8fafc;
  padding: 24px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 14px 0 36px rgba(15, 23, 42, 0.1);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: #0f172a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 20px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.login-brand .brand-mark {
  border-color: rgba(15, 118, 110, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 10px 22px rgba(15, 23, 42, 0.12);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand strong,
.brand div > span {
  display: block;
}

.brand strong {
  line-height: 1.18;
}

.brand div > span {
  margin-top: 2px;
  color: #b9c3d1;
  font-size: 13px;
}

.login-brand div > span {
  color: var(--muted);
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-group-label {
  display: block;
  margin: 12px 0 2px;
  padding: 0 8px;
  color: rgba(203, 213, 225, 0.68);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
}

.nav-item {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  color: #dbe4f0;
  text-align: left;
  cursor: pointer;
}

.nav-item.active,
.nav-item:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.main {
  min-width: 0;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(245, 247, 250, 0.92), rgba(245, 247, 250, 0.88)),
    var(--brand-bg-image) center / cover fixed;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding: 18px 20px;
  border: 1px solid rgba(217, 222, 231, 0.76);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
}

.app-shell.app-entering {
  animation: appMaterialize 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes loginCardWarp {
  0% {
    opacity: 1;
    filter: blur(0);
    transform: perspective(900px) translateZ(0) scale(1) rotateX(0);
  }
  58% {
    opacity: 0.92;
    filter: blur(1px) saturate(1.18);
    transform: perspective(900px) translateZ(80px) scale(1.03) rotateX(2deg);
  }
  100% {
    opacity: 0;
    filter: blur(14px) saturate(1.45);
    transform: perspective(900px) translateZ(-360px) scale(0.16) rotateX(18deg);
  }
}

@keyframes tunnelPulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.18) rotate(0deg);
  }
  42% {
    opacity: 1;
  }
  100% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(2.8) rotate(35deg);
  }
}

@keyframes appMaterialize {
  from {
    opacity: 0;
    filter: blur(12px);
    transform: scale(1.015);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
}

@keyframes idlePortalSpin {
  from {
    transform: rotate(0deg) scale(1);
  }
  to {
    transform: rotate(360deg) scale(1);
  }
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
  line-height: 1.2;
}

h2 {
  font-size: 17px;
  line-height: 1.3;
}

h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
}

.topbar p {
  margin-top: 8px;
  color: var(--muted);
}

.status-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 260px;
}

.topbar-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 280px;
}

.user-chip {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 12px;
}

.pill {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.pill.ready {
  border-color: rgba(15, 118, 110, 0.25);
  color: var(--accent-strong);
}

.pill.warn {
  border-color: rgba(180, 83, 9, 0.28);
  color: var(--warning);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

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

.workflow-home {
  display: grid;
  gap: 18px;
  max-width: 1320px;
  align-items: start;
}

.workflow-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  align-items: stretch;
  padding: 22px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 253, 250, 0.9)),
    var(--brand-bg-image) center / cover;
}

.workflow-hero-copy {
  max-width: 820px;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
}

.workflow-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.workflow-next-action {
  display: grid;
  align-content: center;
  gap: 10px;
  min-height: 178px;
  padding: 18px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.workflow-next-action span {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 850;
}

.workflow-next-action strong {
  font-size: 20px;
  line-height: 1.25;
}

.workflow-next-action p {
  color: var(--muted);
  line-height: 1.55;
}

.workflow-next-action button {
  justify-self: start;
}

.workflow-dashboard {
  min-height: 0;
  overflow: hidden;
}

.workflow-status-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
  padding: 0 18px 18px;
}

.workflow-status-grid .metric {
  background: rgba(255, 255, 255, 0.82);
  min-height: 110px;
}

.metric small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.workflow-panel {
  min-height: 0;
  overflow: hidden;
}

.workflow-loop {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  padding: 0 18px 18px;
}

.workflow-loop-card {
  display: grid;
  gap: 8px;
  min-height: 156px;
  padding: 14px;
  border: 1px solid rgba(217, 222, 231, 0.88);
  border-radius: 8px;
  background: rgba(251, 252, 254, 0.92);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.workflow-loop-card:hover {
  border-color: rgba(15, 118, 110, 0.34);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.workflow-loop-card strong {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
}

.workflow-loop-card span {
  font-weight: 850;
}

.workflow-loop-card b {
  font-size: 22px;
  line-height: 1;
}

.workflow-loop-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.workflow-loop-card.ok {
  border-color: rgba(15, 118, 110, 0.28);
  background: rgba(240, 253, 250, 0.88);
}

.workflow-loop-card.ok strong {
  background: #dff3ec;
  color: var(--accent-strong);
}

.workflow-loop-card.ready {
  border-color: rgba(29, 78, 216, 0.22);
  background: rgba(239, 246, 255, 0.88);
}

.workflow-loop-card.ready strong {
  background: #dbeafe;
  color: var(--blue);
}

.workflow-loop-card.warn {
  border-color: rgba(180, 83, 9, 0.28);
  background: rgba(255, 251, 235, 0.94);
}

.workflow-loop-card.warn strong {
  background: #fef3c7;
  color: var(--warning);
}

.workflow-command-panel {
  min-height: 0;
  overflow: hidden;
}

.workflow-command-list {
  display: grid;
  gap: 12px;
  padding: 0 18px 18px;
}

.workflow-command-card {
  padding: 14px;
  border: 1px solid rgba(217, 222, 231, 0.9);
  border-radius: 8px;
  background: rgba(251, 252, 254, 0.92);
}

.workflow-step-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(217, 222, 231, 0.9);
  border-radius: 8px;
  background: rgba(251, 252, 254, 0.92);
}

.workflow-step-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #dff3ec;
  color: var(--accent-strong);
  font-weight: 850;
}

.workflow-step-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.workflow-step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.reference-workspace {
  display: grid;
  gap: 18px;
  max-width: 1180px;
}

.tiktok-flow-panel {
  overflow: hidden;
}

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

.tiktok-flow-step {
  display: grid;
  gap: 8px;
  min-height: 148px;
  padding: 14px;
  border: 1px solid rgba(217, 222, 231, 0.92);
  border-radius: 8px;
  background: rgba(251, 252, 254, 0.94);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.tiktok-flow-step:hover {
  border-color: rgba(15, 118, 110, 0.32);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.tiktok-flow-step strong {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #dff3ec;
  color: var(--accent-strong);
}

.tiktok-flow-step span {
  font-weight: 850;
}

.tiktok-flow-step p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.reference-pool-panel {
  min-height: 320px;
}

.reference-pool-panel .empty-state {
  min-height: 320px;
}

.tool-panel,
.result-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(217, 222, 231, 0.82);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.tool-panel {
  padding: 18px;
}

.result-panel {
  min-height: 560px;
  overflow: hidden;
}

.workflow-home > .result-panel {
  min-height: 0;
}

.material-list,
.reference-list,
.comment-library-list,
.source-list,
.rule-list,
.audit-list,
.user-list {
  display: grid;
  gap: 12px;
  padding: 0 18px 18px;
}

.info-card,
.audit-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 14px;
}

.audit-item {
  display: grid;
  gap: 5px;
}

.audit-item span,
.audit-item code {
  color: var(--muted);
  font-size: 12px;
}

.governance-panel {
  overflow: auto;
}

.governance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 0 18px 18px;
}

.reference-toolbar {
  padding: 0 18px 14px;
}

.material-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(120px, 160px));
  gap: 8px;
  padding: 0 18px 14px;
}

.mini-list {
  display: grid;
  gap: 8px;
}

.mini-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.mini-item > div {
  min-width: 0;
}

.mini-item strong,
.mini-item span {
  display: block;
  overflow-wrap: anywhere;
}

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

.button-field {
  display: flex;
  align-items: end;
  min-height: 100%;
}

.button-field button {
  width: 100%;
}

.reference-card .section-title {
  align-items: flex-start;
}

.reference-summary-card {
  display: grid;
  gap: 12px;
}

.candidate-reference-section {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

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

.candidate-reference-card {
  display: grid;
  gap: 10px;
  border-style: dashed;
  background: rgba(248, 250, 252, 0.86);
}

.muted-score {
  border-color: var(--line);
  background: #f8fafc;
  color: var(--muted);
}

.compact-prompt {
  font-size: 13px;
}

.reference-summary-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.reference-summary-head h3 {
  margin-top: 4px;
  font-size: 15px;
}

.reference-summary-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.reference-kicker {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 750;
}

.reference-score {
  display: grid;
  place-items: center;
  min-width: 62px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  background: #eefbf7;
  color: var(--accent-strong);
}

.reference-score span {
  font-size: 11px;
}

.reference-score strong {
  margin-top: 2px;
  font-size: 18px;
}

.reference-summary-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0;
}

.daily-news-card {
  display: grid;
  gap: 12px;
}

.interaction-comment-card {
  display: grid;
  gap: 12px;
}

.small-chip {
  padding: 4px 7px;
  font-size: 11px;
}

.daily-news-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.daily-news-head h3 {
  margin-top: 4px;
  font-size: 16px;
  line-height: 1.35;
}

.daily-news-head p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.generated-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  margin-top: 9px;
  padding: 4px 9px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 999px;
  background: #ecfdf5;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.daily-region-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  background: #eefbf7;
  color: var(--accent-strong);
  font-weight: 850;
}

.daily-news-media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f7fb;
}

.daily-news-media img,
.daily-news-media video {
  display: block;
  width: 100%;
  max-height: 68vh;
}

.daily-news-media img {
  object-fit: cover;
}

.daily-news-media video {
  min-height: 280px;
  background: #020617;
  object-fit: contain;
}

.video-placeholder {
  min-height: 220px;
}

.video-placeholder img {
  filter: brightness(0.72);
}

.video-placeholder-overlay,
.video-status-overlay {
  position: absolute;
  inset: auto 16px 16px 16px;
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
}

.video-placeholder-overlay span,
.video-status-overlay {
  font-size: 13px;
  line-height: 1.45;
}

.reference-quick-actions {
  align-items: center;
}

.reference-detail {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.reference-detail summary {
  cursor: pointer;
  color: #26374a;
  font-size: 13px;
  font-weight: 750;
}

.reference-detail[open] summary {
  margin-bottom: 12px;
}

.compact-options {
  margin: 2px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 10px;
}

.compact-options[open] {
  display: grid;
  gap: 10px;
}

.inline-field-button {
  align-self: end;
  min-height: 40px;
}

.reference-transcript {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 750;
}

.discovered-link-card h3 {
  overflow-wrap: anywhere;
}

.muted-candidate-card {
  background: #f8fafc;
}

.muted-candidate-card h3,
.muted-candidate-card p {
  color: var(--muted);
}

.option-panel,
.asset-link-box,
.localized-version-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.check-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #26374a;
  font-weight: 750;
}

.check-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.asset-link-box strong,
.asset-link-box span {
  display: block;
}

.asset-link-box span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

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

.localized-version-card .section-title {
  margin-bottom: 0;
}

.material-preview {
  width: 100%;
  max-height: 260px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
}

video.material-preview {
  display: block;
  background: #101827;
}

.text-preview {
  max-height: 180px;
  overflow: auto;
  padding: 12px;
  color: #253244;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.content-pack-card {
  border-color: rgba(37, 119, 108, 0.28);
  background:
    linear-gradient(135deg, rgba(235, 250, 246, 0.9), rgba(255, 255, 255, 0.92) 42%, rgba(243, 247, 255, 0.9)),
    var(--panel);
}

.content-pack-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
  border: 1px solid rgba(37, 119, 108, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 12px;
}

.content-pack-preview span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.content-pack-preview strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 14px;
}

.material-summary-box {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid rgba(37, 119, 108, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
  color: #253244;
  font-size: 13px;
  line-height: 1.55;
}

.feedback-list {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.feedback-card .prompt-box {
  background: rgba(255, 255, 255, 0.78);
}

.feedback-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.feedback-meta-row span {
  border: 1px solid rgba(37, 119, 108, 0.16);
  border-radius: 999px;
  background: rgba(237, 250, 246, 0.9);
  padding: 5px 9px;
  color: #285a54;
  font-size: 12px;
  font-weight: 700;
}

.metrics-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.padded-title {
  padding: 18px 18px 0;
}

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

.section-title .download-row {
  justify-content: flex-end;
}

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

label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: #324154;
  font-weight: 650;
  font-size: 13px;
}

.detail-field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #324154;
  font-size: 13px;
  font-weight: 650;
}

.field-header .secondary-button {
  flex: 0 0 auto;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink);
  padding: 10px 11px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

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

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 750;
}

.primary-button {
  width: 100%;
  margin-top: 4px;
  padding: 12px 14px;
  background: var(--accent);
  color: white;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.primary-button:disabled {
  cursor: wait;
  background: #90a4ae;
}

.secondary-button {
  padding: 8px 10px;
  background: #e8edf4;
  color: #26374a;
}

.tiny-button {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}

.button-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.button-row .primary-button {
  width: auto;
  margin-top: 0;
}

.stop-button {
  min-height: 45px;
  padding-inline: 14px;
  color: #991b1b;
  background: #fee2e2;
}

.stop-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.link-button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.link-button:hover {
  background: var(--accent-strong);
}

.danger-button {
  background: #fee2e2;
  color: #991b1b;
}

.form-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.context-tray {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.context-tray-head {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.context-tray-head strong {
  color: var(--ink);
}

.context-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.context-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 7px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  background: #ecfdf5;
  color: #115e59;
  font-size: 12px;
  font-weight: 700;
}

.context-chip button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.13);
  color: #115e59;
  cursor: pointer;
  line-height: 1;
}

.setup-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin: 12px 0 4px;
}

.setup-steps div {
  display: grid;
  gap: 7px;
  align-content: start;
  min-height: 88px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.setup-steps strong {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #dff6ee;
  color: var(--accent-strong);
  font-size: 12px;
}

.setup-steps span {
  color: #324154;
  font-size: 12px;
  line-height: 1.45;
}

.empty-state {
  display: grid;
  align-content: center;
  min-height: 560px;
  padding: 32px;
  color: var(--muted);
}

.empty-state h2 {
  margin-bottom: 8px;
  color: var(--ink);
}

.result-content {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 560px;
}

.result-copy {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.result-preview {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  background: #fbfcfd;
}

.preview-image {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

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

.metric {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.prompt-box,
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
  color: #253244;
  font-size: 13px;
  line-height: 1.5;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 750;
}

tr:last-child td {
  border-bottom: 0;
}

.status-text.completed,
.status-text.approved {
  color: var(--accent-strong);
}

.status-text.failed,
.status-text.blocked {
  color: var(--danger);
}

.status-text.running,
.status-text.needs_review,
.status-text.pending_review,
.status-text.needs_changes {
  color: var(--warning);
}

.acceptance-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.acceptance-status.done {
  background: #dff6ee;
  color: #0f5f4d;
}

.acceptance-status.doing {
  background: #fef3c7;
  color: #92400e;
}

.acceptance-status.todo,
.acceptance-status.deferred {
  background: #eef2f7;
  color: #475569;
}

.download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.download-row a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #e8edf4;
  color: #102a43;
  text-decoration: none;
  font-weight: 700;
}

.download-row a.link-button {
  background: var(--accent);
  color: white;
}

.download-row a.link-button:hover {
  background: var(--accent-strong);
}

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

.draft-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.draft-card .section-title {
  margin-bottom: 10px;
}

.stacked-form,
.inline-job-form,
.socialops-list {
  display: grid;
  gap: 12px;
}

.stacked-form {
  margin-top: 14px;
}

.inline-job-form {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.publish-target-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.publish-target-header h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.publish-target-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.publish-target-header span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #dff3ec;
  color: #116457;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.publish-account-picker {
  display: grid;
  gap: 10px;
}

.account-note-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.publish-target-group {
  display: grid;
  gap: 10px;
}

.publish-target-subtitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-size: 13px;
}

.publish-target-subtitle span {
  color: var(--muted);
  font-weight: 700;
}

.muted-target-group {
  opacity: 0.72;
}

.account-note-card {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 172px;
  padding: 14px 13px 12px;
  border: 1px solid #d8c27d;
  border-radius: 8px;
  background: #fff7d6;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.account-note-card:nth-child(3n + 2) {
  background: #eaf6ff;
  border-color: #abcce6;
}

.account-note-card:nth-child(3n) {
  background: #e9f7ee;
  border-color: #a7d6b6;
}

.account-note-card.phone-target {
  background: #f0f7ff;
  border-color: #aac7e8;
}

.account-note-card.disabled-target {
  cursor: default;
}

.account-note-card:not(.disabled-target):hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.account-note-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18), 0 12px 24px rgba(15, 23, 42, 0.12);
}

.account-note-card input {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.account-note-card.needs_login,
.account-note-card.paused {
  opacity: 0.82;
}

.note-pin {
  width: 22px;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.18);
}

.account-note-title {
  padding-right: 24px;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.35;
  color: var(--ink);
  word-break: break-word;
}

.account-note-meta,
.account-note-line,
.account-note-foot {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.account-note-line {
  color: #334155;
}

.account-note-foot {
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid rgba(15, 23, 42, 0.12);
}

.account-note-foot strong {
  color: #9f1239;
}

.socialops-section {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.mini-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.compact-list {
  margin: 0;
  padding-left: 20px;
}

.compact-list li {
  margin-bottom: 8px;
}

.concept-card {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.concept-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.concept-card-title span {
  color: var(--muted);
  font-size: 12px;
}

.concept-section {
  margin-bottom: 0;
}

.task-dialog {
  width: min(1080px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
}

.task-dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
}

.task-dialog-shell {
  display: grid;
  max-height: calc(100vh - 38px);
}

.task-dialog-header {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.task-dialog-header > div {
  min-width: 0;
}

.task-dialog-header span {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.task-detail-body {
  overflow: auto;
  padding: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: start;
}

.detail-metrics {
  grid-template-columns: repeat(4, 1fr);
}

.detail-side {
  display: grid;
  gap: 16px;
}

.detail-side h3 {
  margin-bottom: 8px;
}

.asset-card {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.asset-card strong,
.asset-card span {
  display: block;
  overflow-wrap: anywhere;
}

.asset-card span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.detail-asset-image {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.compact-empty {
  min-height: 220px;
}

.routing-layout {
  max-width: 980px;
}

.duoplus-layout {
  display: grid;
  gap: 18px;
  max-width: 1180px;
}

.settings-layout {
  display: grid;
  gap: 18px;
  max-width: 1180px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 18px;
  align-items: start;
}

.source-result-panel {
  min-height: 420px;
  overflow: auto;
}

.source-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 18px;
  padding-bottom: 18px;
}

.duoplus-layout .result-panel {
  min-height: 420px;
}

.duoplus-layout .empty-state {
  min-height: 420px;
}

.duoplus-metrics {
  grid-template-columns: repeat(4, 1fr);
}

.inline-table {
  box-shadow: none;
}

.notice-box {
  margin-top: 12px;
  border: 1px solid rgba(180, 83, 9, 0.28);
  border-radius: 8px;
  background: #fffbeb;
  color: #7c2d12;
  padding: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.muted-notice {
  border-color: var(--line);
  background: #f8fafc;
  color: var(--muted);
}

.flow-hint-card {
  display: grid;
  gap: 4px;
  margin: 8px 0 14px;
  padding: 12px;
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.92), rgba(239, 246, 255, 0.9));
  color: #134e4a;
  font-size: 13px;
  line-height: 1.5;
}

.flow-hint-card strong {
  color: #0f766e;
  font-size: 14px;
}

.result-next-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  background: #f0fdfa;
}

.result-next-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.guide-card {
  display: grid;
  gap: 10px;
  margin: 6px 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.guide-card a {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 180px;
}

.compact-actions {
  justify-content: flex-end;
  min-width: 0;
}

.muted-line {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.phone-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8edf4;
  color: #26374a;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.phone-status.running {
  background: #dff6ee;
  color: #0f5f4d;
}

.phone-status.stopped,
.phone-status.no_proxy {
  background: #eef2f7;
  color: #475569;
}

.phone-status.starting,
.phone-status.configuring,
.phone-status.renewing {
  background: #fef3c7;
  color: #92400e;
}

.phone-status.failed,
.phone-status.expired {
  background: #fee2e2;
  color: #991b1b;
}

@media (max-width: 980px) {
  .login-card {
    grid-template-columns: 1fr;
    width: min(560px, calc(100vw - 32px));
  }

  .login-art,
  .login-art img {
    min-height: 240px;
    max-height: 300px;
  }

  .login-art-shade {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.02), rgba(2, 6, 23, 0.18));
  }

  .login-form-panel {
    padding: 28px;
  }

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
  }

  .brand {
    margin-bottom: 0;
  }

  .nav {
    grid-template-columns: repeat(3, auto);
  }

  .main {
    padding: 18px;
  }

  .topbar,
  .workspace-grid,
  .workflow-home,
  .tiktok-flow-grid,
  .result-content {
    grid-template-columns: 1fr;
    display: grid;
  }

  .status-pills {
    justify-content: flex-start;
    min-width: 0;
  }

  .result-copy {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .duoplus-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .detail-grid,
  .detail-metrics {
    grid-template-columns: 1fr;
  }

  .setup-steps {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 620px) {
  .login-screen {
    padding: 16px;
  }

  .login-form-panel {
    padding: 24px 20px;
  }

  .login-form-panel h1 {
    font-size: 24px;
  }

  .field-row,
  .meta-grid,
  .material-toolbar {
    grid-template-columns: 1fr;
  }

  .sidebar {
    align-items: stretch;
    flex-direction: column;
  }

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

  .setup-steps {
    grid-template-columns: 1fr;
  }

  .workflow-step-card {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .workflow-step-card > button,
  .workflow-step-card > .action-row {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-fx-canvas,
  .login-transition {
    display: none;
  }

  .login-screen.is-transitioning .login-card,
  .app-shell.app-entering,
  .tunnel-core {
    animation: none;
  }
}
