:root {
  color-scheme: dark;
  --void: #020806;
  --void-soft: #04100a;
  --surface: #07130d;
  --surface-2: #0a1b12;
  --surface-3: #0d2418;
  --line: rgba(126, 242, 171, 0.13);
  --line-strong: rgba(126, 242, 171, 0.24);
  --green: #43e58c;
  --green-bright: #a7f3c7;
  --green-deep: #12b981;
  --text: #ecfdf5;
  --muted: #83a293;
  --muted-strong: #a4c3b2;
  --amber: #fbbf24;
  --red: #fb7185;
  --radius: 1.35rem;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --header-h: 68px;
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-color: rgba(67, 229, 140, 0.35) rgba(2, 8, 6, 0.9);
}

body {
  position: relative;
  background:
    radial-gradient(circle at 18% -10%, rgba(20, 125, 84, 0.22), transparent 34rem),
    radial-gradient(circle at 92% 8%, rgba(13, 87, 68, 0.24), transparent 28rem),
    linear-gradient(180deg, #020806 0%, #030b08 45%, #020705 100%);
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(90, 220, 150, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 220, 150, 0.025) 1px, transparent 1px);
  background-size: 92px 92px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 65%);
}

::selection {
  background: rgba(67, 229, 140, 0.35);
  color: #f4fff8;
}

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

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

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  transform: translateY(-160%);
  border-radius: 0.65rem;
  background: var(--green);
  color: #021008;
  padding: 0.6rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- Space scene ---------- */
.space-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.nebula {
  position: absolute;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.3;
  mix-blend-mode: screen;
}

.nebula-a {
  width: 44rem;
  height: 26rem;
  top: -14rem;
  right: -8rem;
  background: radial-gradient(circle, rgba(29, 197, 122, 0.42), transparent 68%);
  transform: rotate(-18deg);
}

.nebula-b {
  width: 34rem;
  height: 34rem;
  top: 28rem;
  left: -18rem;
  background: radial-gradient(circle, rgba(11, 104, 82, 0.36), transparent 68%);
}

.star-layer {
  position: absolute;
  inset: -80px;
  opacity: 0.75;
  animation: starDrift 160s linear infinite;
}

.star-layer-a {
  background-image:
    radial-gradient(1px 1px at 20px 30px, rgba(236, 255, 244, 0.85), transparent),
    radial-gradient(1px 1px at 90px 110px, rgba(154, 255, 195, 0.7), transparent),
    radial-gradient(1.2px 1.2px at 170px 50px, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 240px 180px, rgba(184, 255, 210, 0.6), transparent),
    radial-gradient(1.3px 1.3px at 320px 90px, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 380px 240px, rgba(167, 243, 199, 0.7), transparent);
  background-size: 430px 300px;
}

.star-layer-b {
  opacity: 0.45;
  background-image:
    radial-gradient(1.4px 1.4px at 50px 40px, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1px 1px at 130px 170px, rgba(159, 255, 198, 0.7), transparent),
    radial-gradient(1.1px 1.1px at 200px 80px, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(1px 1px at 300px 210px, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.6px 1.6px at 360px 130px, rgba(141, 255, 186, 0.55), transparent);
  background-size: 340px 280px;
  animation-duration: 240s;
  animation-direction: reverse;
}

.star-layer-c {
  opacity: 0.2;
  background-image:
    radial-gradient(1.5px 1.5px at 60px 100px, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1px 1px at 220px 50px, rgba(167, 243, 199, 0.8), transparent),
    radial-gradient(1.2px 1.2px at 330px 190px, rgba(255, 255, 255, 0.75), transparent);
  background-size: 520px 380px;
  animation-duration: 320s;
}

.horizon-glow {
  position: absolute;
  bottom: -24rem;
  left: 50%;
  width: 80rem;
  height: 42rem;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(27, 150, 100, 0.18), transparent 62%);
}

@keyframes starDrift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-140px, 90px, 0); }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(126, 242, 171, 0.09);
  background: rgba(2, 8, 6, 0.72);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  flex: 0 0 auto;
  border-radius: 0.92rem;
  border: 1px solid rgba(126, 242, 171, 0.18);
  background:
    radial-gradient(circle at 35% 20%, rgba(90, 234, 156, 0.22), transparent 65%),
    rgba(7, 23, 15, 0.9);
  box-shadow: inset 0 0 24px rgba(67, 229, 140, 0.06), 0 0 30px rgba(67, 229, 140, 0.06);
}

.brand-mark svg {
  width: 2.25rem;
  height: 2.25rem;
  transition: transform 0.5s ease;
}

.brand:hover .brand-mark svg {
  transform: rotate(-12deg) scale(1.04);
}

.brand-name {
  display: block;
  color: #f2fff7;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.brand-name span {
  color: var(--green);
}

.brand-sub {
  display: block;
  margin-top: 0.35rem;
  color: #6e9381;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.48rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 2.2rem;
  border-radius: 0.65rem;
  padding: 0 0.72rem;
  color: #9ab9a9;
  font-size: 0.78rem;
  font-weight: 500;
  transition: color 0.18s ease, background 0.18s ease;
}

.nav-link:hover {
  color: #e9fff2;
  background: rgba(126, 242, 171, 0.06);
}

/* ---------- Status ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.15rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(8, 26, 17, 0.76);
  padding: 0 0.8rem;
  color: var(--muted-strong);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.status-dot {
  position: relative;
  width: 0.46rem;
  height: 0.46rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #7e9d8c;
}

.status-loading .status-dot {
  animation: statusPulse 1.1s ease-in-out infinite;
}

.status-running {
  border-color: rgba(67, 229, 140, 0.28);
  background: rgba(24, 92, 59, 0.24);
  color: #b9ffd1;
}

.status-running .status-dot {
  background: #4cf39a;
  box-shadow: 0 0 0 4px rgba(76, 243, 154, 0.1), 0 0 12px rgba(76, 243, 154, 0.8);
  animation: statusPulse 2.2s ease-in-out infinite;
}

.status-paused {
  border-color: rgba(251, 191, 36, 0.26);
  background: rgba(120, 82, 15, 0.16);
  color: #f9d77e;
}

.status-paused .status-dot {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.08);
}

.status-awaiting {
  border-color: rgba(251, 191, 36, 0.22);
  background: rgba(113, 77, 10, 0.13);
  color: #f1ce7a;
}

.status-awaiting .status-dot {
  background: #f5c451;
  animation: statusPulse 1.8s ease-in-out infinite;
}

.status-cooldown {
  border-color: rgba(251, 146, 60, 0.25);
  background: rgba(120, 62, 20, 0.16);
  color: #fdba74;
}

.status-cooldown .status-dot {
  background: #fb923c;
  animation: statusPulse 1.4s ease-in-out infinite;
}

.status-error {
  border-color: rgba(251, 113, 133, 0.26);
  background: rgba(118, 26, 42, 0.16);
  color: #ffb3c0;
}

.status-error .status-dot {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.08);
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
  height: 2.75rem;
  border-radius: 0.86rem;
  border: 1px solid transparent;
  padding: 0 1.05rem;
  font-size: 0.83rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease,
    box-shadow 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.btn-primary {
  border-color: rgba(167, 243, 199, 0.4);
  background: linear-gradient(135deg, #a7f3c7 0%, #52e79a 38%, #18c883 100%);
  color: #03140c;
  box-shadow: 0 8px 28px rgba(28, 204, 129, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 12px 34px rgba(28, 204, 129, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.btn-secondary {
  border-color: rgba(126, 242, 171, 0.22);
  background: rgba(17, 51, 34, 0.52);
  color: #d9fbe7;
}

.btn-secondary:hover:not(:disabled) {
  border-color: rgba(126, 242, 171, 0.4);
  background: rgba(27, 73, 49, 0.6);
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: #9bbaaa;
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(126, 242, 171, 0.06);
  color: #e6fff0;
}

.btn-danger {
  border-color: rgba(251, 113, 133, 0.28);
  background: rgba(138, 30, 49, 0.25);
  color: #ffc0ca;
}

.btn-danger:hover:not(:disabled) {
  border-color: rgba(251, 113, 133, 0.5);
  background: rgba(159, 35, 57, 0.35);
}

.btn-sm {
  height: 2.25rem;
  padding: 0 0.82rem;
  border-radius: 0.68rem;
  font-size: 0.76rem;
}

.btn-xs {
  height: 1.9rem;
  padding: 0 0.65rem;
  border-radius: 0.58rem;
  font-size: 0.7rem;
}

.btn.is-busy,
.btn[aria-busy="true"] {
  pointer-events: none;
  opacity: 0.68;
}

.icon {
  width: 1.02rem;
  height: 1.02rem;
  flex: 0 0 auto;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  border-radius: 0.7rem;
  border: 1px solid rgba(126, 242, 171, 0.13);
  background: rgba(8, 26, 17, 0.55);
  color: #92b3a2;
  cursor: pointer;
  transition: all 0.16s ease;
}

.icon-btn svg {
  width: 1.02rem;
  height: 1.02rem;
}

.icon-btn:hover:not(:disabled) {
  border-color: rgba(126, 242, 171, 0.3);
  background: rgba(20, 59, 39, 0.62);
  color: #dcffea;
}

.icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.icon-btn-danger:hover:not(:disabled) {
  border-color: rgba(251, 113, 133, 0.35);
  background: rgba(103, 25, 39, 0.4);
  color: #ffc2cc;
}

.spinner {
  display: inline-block;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  border: 1.5px solid rgba(126, 242, 171, 0.22);
  border-top-color: var(--green);
  animation: spin 0.8s linear infinite;
}

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

/* ---------- Connection banner ---------- */
.connection-banner {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.25rem;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 0.95rem;
  background: rgba(79, 52, 10, 0.22);
  padding: 0.7rem 0.85rem;
  color: #f4d38f;
  font-size: 0.78rem;
}

.connection-banner[hidden] {
  display: none;
}

.connection-banner p {
  flex: 1;
  margin: 0;
  line-height: 1.45;
}

.connection-banner strong {
  color: #ffe6ac;
}

.connection-icon {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  flex: 0 0 auto;
  border-radius: 0.55rem;
  background: rgba(251, 191, 36, 0.1);
}

.connection-icon svg {
  width: 1rem;
  height: 1rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 4.1rem 0 2.7rem;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #87b19b;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.eyebrow-line {
  display: inline-block;
  width: 1.6rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--green));
}

.eyebrow-danger {
  color: #d68b98;
}

.eyebrow-danger .eyebrow-line {
  background: linear-gradient(90deg, transparent, var(--red));
}

.hero-title {
  margin: 1.05rem 0 0;
  max-width: 12ch;
  color: #f3fff8;
  font-size: clamp(3.15rem, 7.2vw, 5.9rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.94;
}

.gradient-text {
  background: linear-gradient(100deg, #d8ffe5 0%, #6df0a7 40%, #23ce87 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 60px rgba(67, 229, 140, 0.16);
}

.hero-copy {
  max-width: 36rem;
  margin: 1.4rem 0 0;
  color: #93b4a2;
  font-size: 1rem;
  line-height: 1.75;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 1.9rem;
  border-radius: 999px;
  border: 1px solid rgba(126, 242, 171, 0.13);
  background: rgba(10, 31, 20, 0.58);
  padding: 0 0.72rem;
  color: #9ebda9;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.02em;
}

.tag-signal {
  border-color: rgba(126, 242, 171, 0.22);
  color: #bdf8d2;
}

.tag-dot {
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(67, 229, 140, 0.9);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #9cc3ad;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.16s ease;
}

.text-link:hover {
  color: var(--green-bright);
}

.text-link-icon {
  display: grid;
  place-items: center;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  border: 1px solid rgba(126, 242, 171, 0.25);
  color: var(--green);
  font-size: 0.85rem;
  line-height: 1;
}

/* ---------- Radar visual ---------- */
.radar-stage {
  position: relative;
  width: min(100%, 30rem);
  aspect-ratio: 1;
  margin-inline: auto;
  isolation: isolate;
  animation: radarFloat 9s ease-in-out infinite;
}

.radar-glow {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(56, 238, 145, 0.18), transparent 42%),
    radial-gradient(circle at 50% 50%, rgba(20, 104, 73, 0.28), transparent 68%);
  filter: blur(22px);
  z-index: -1;
}

.radar-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.radar-spin {
  transform-origin: 210px 210px;
  animation: radarSpin 34s linear infinite;
}

.radar-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
}

.radar-center strong {
  color: #f0fff5;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.08em;
  line-height: 1;
  text-shadow: 0 0 26px rgba(4, 20, 12, 0.8);
}

.radar-center span {
  margin-top: 0.4rem;
  color: #b2d6bf;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  line-height: 1.55;
  text-transform: uppercase;
}

.radar-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(126, 242, 171, 0.2);
  border-radius: 0.6rem;
  background: rgba(5, 18, 11, 0.82);
  backdrop-filter: blur(12px);
  padding: 0.5rem 0.65rem;
  color: #b9dfc7;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.24);
}

.radar-chip-top {
  top: 13%;
  right: 1%;
}

.radar-chip-bottom {
  bottom: 14%;
  left: 0;
}

.radar-chip-dot {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(67, 229, 140, 0.9);
  animation: statusPulse 2s ease-in-out infinite;
}

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

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

/* ---------- Metrics ---------- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.65rem;
}

.metric-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  min-height: 8.7rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.05rem;
  background:
    linear-gradient(145deg, rgba(13, 38, 25, 0.76), rgba(4, 14, 9, 0.9));
  padding: 1.15rem;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
  border-color: rgba(126, 242, 171, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  border-radius: 0.72rem;
  border: 1px solid rgba(126, 242, 171, 0.15);
  background: rgba(46, 211, 130, 0.07);
  color: #7cebad;
}

.metric-icon svg {
  width: 1.08rem;
  height: 1.08rem;
}

.metric-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.metric-label {
  color: #8cad9b;
  font-size: 0.72rem;
  font-weight: 500;
}

.metric-value {
  margin-top: 0.35rem;
  color: #f0fff5;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.metric-value-sm {
  font-size: 1.46rem;
  letter-spacing: -0.03em;
  line-height: 1.14;
}

.metric-sub {
  margin-top: 0.55rem;
  overflow: hidden;
  color: #779885;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-orbit {
  position: absolute;
  right: -1.2rem;
  bottom: -2.6rem;
  width: 6.3rem;
  height: 6.3rem;
  border: 1px solid rgba(126, 242, 171, 0.08);
  border-radius: 50%;
}

.metric-orbit::after {
  content: "";
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: rgba(126, 242, 171, 0.24);
}

/* ---------- Sections and cards ---------- */
.section-block {
  margin-top: 4.25rem;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.section-heading-compact {
  align-items: center;
  margin-bottom: 0.8rem;
}

.section-title {
  margin: 0.52rem 0 0;
  color: #f0fff5;
  font-size: clamp(1.7rem, 2.5vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.section-copy {
  max-width: 43rem;
  margin: 0.55rem 0 0;
  color: #789887;
  font-size: 0.82rem;
  line-height: 1.6;
}

.glass-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(150deg, rgba(13, 36, 24, 0.78), rgba(4, 14, 9, 0.9));
  box-shadow: var(--shadow);
}

.glass-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167, 243, 199, 0.24), transparent);
  pointer-events: none;
}

/* ---------- Groups ---------- */
.table-head {
  display: grid;
  grid-template-columns: minmax(220px, 1.45fr) minmax(160px, 1fr) 108px 138px 8.2rem;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid rgba(126, 242, 171, 0.08);
  padding: 0.78rem 1.25rem;
  color: #638874;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.57rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.groups-list {
  min-height: 4.5rem;
}

.group-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.45fr) minmax(160px, 1fr) 108px 138px 8.2rem;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid rgba(126, 242, 171, 0.065);
  transition: background 0.16s ease;
}

.group-row:last-child {
  border-bottom: none;
}

.group-row:hover {
  background: rgba(126, 242, 171, 0.025);
}

.group-row.is-disabled {
  opacity: 0.68;
}

.group-main {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.72rem;
}

.group-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  flex: 0 0 auto;
  border: 1px solid rgba(126, 242, 171, 0.16);
  border-radius: 0.78rem;
  background:
    radial-gradient(circle at 34% 25%, rgba(167, 243, 199, 0.2), transparent 58%),
    rgba(8, 29, 18, 0.74);
  color: #7bebad;
}

.group-avatar::after {
  content: "";
  position: absolute;
  top: 0.28rem;
  right: 0.28rem;
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 7px rgba(67, 229, 140, 0.9);
}

.group-row.is-disabled .group-avatar::after {
  background: #6d8577;
  box-shadow: none;
}

.group-avatar svg {
  width: 1.2rem;
  height: 1.2rem;
}

.group-identity {
  min-width: 0;
}

.group-name-row {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.45rem;
}

.group-name {
  overflow: hidden;
  margin: 0;
  color: #e9fff2;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-count {
  flex: 0 0 auto;
  border: 1px solid rgba(126, 242, 171, 0.14);
  border-radius: 999px;
  background: rgba(67, 229, 140, 0.06);
  padding: 0.13rem 0.38rem;
  color: #8dd5aa;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.5rem;
  white-space: nowrap;
}

.group-id {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 0.3rem;
  margin-top: 0.32rem;
  border: 0;
  background: transparent;
  padding: 0;
  color: #658574;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.56rem;
  text-align: left;
  cursor: pointer;
  transition: color 0.16s ease;
}

.group-id:hover {
  color: #a4e9bf;
}

.group-id span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-id svg {
  width: 0.66rem;
  height: 0.66rem;
  flex: 0 0 auto;
  opacity: 0.65;
}

.group-webhook-col,
.group-interval-col,
.group-signal-col {
  min-width: 0;
}

.group-cell-label {
  display: none;
  margin-bottom: 0.28rem;
  color: #5d806c;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.52rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.group-webhook {
  display: block;
  overflow: hidden;
  color: #789786;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.61rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-interval {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(126, 242, 171, 0.11);
  border-radius: 0.42rem;
  background: rgba(8, 26, 17, 0.52);
  padding: 0.25rem 0.42rem;
  color: #93b7a3;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  white-space: nowrap;
}

.group-signal {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.group-status {
  color: #8db6a0;
  font-size: 0.65rem;
}

.group-row.is-disabled .group-status {
  color: #9b8d78;
}

.group-last {
  display: block;
  margin-top: 0.32rem;
  overflow: hidden;
  color: #5f806e;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.51rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-error {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.25rem;
  overflow: hidden;
  color: #e69ca7;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.51rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.33rem;
}

.group-actions .icon-btn {
  width: 2.15rem;
  height: 2.15rem;
}

.loading-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1.4rem 1.25rem;
  color: #779687;
  font-size: 0.76rem;
}

/* ---------- Switch ---------- */
.switch,
.mini-switch,
.switch-field {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  user-select: none;
}

.switch input,
.mini-switch input,
.switch-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  display: inline-block;
  width: 2.25rem;
  height: 1.24rem;
  flex: 0 0 auto;
  border: 1px solid rgba(126, 242, 171, 0.16);
  border-radius: 999px;
  background: rgba(8, 25, 16, 0.9);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.switch-thumb {
  position: absolute;
  top: 0.16rem;
  left: 0.16rem;
  width: 0.82rem;
  height: 0.82rem;
  border-radius: 50%;
  background: #6f8c7b;
  transition: transform 0.2s ease, background 0.2s ease;
}

.switch input:checked + .switch-track,
.mini-switch input:checked + .switch-track,
.switch-field input:checked + .switch-track {
  border-color: rgba(67, 229, 140, 0.5);
  background: rgba(36, 170, 103, 0.36);
  box-shadow: 0 0 14px rgba(67, 229, 140, 0.12);
}

.switch input:checked + .switch-track .switch-thumb,
.mini-switch input:checked + .switch-track .switch-thumb,
.switch-field input:checked + .switch-track .switch-thumb {
  transform: translateX(1rem);
  background: #c6ffdd;
}

.switch input:focus-visible + .switch-track,
.mini-switch input:focus-visible + .switch-track,
.switch-field input:focus-visible + .switch-track {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.switch input:disabled + .switch-track {
  opacity: 0.55;
  cursor: not-allowed;
}

.mini-switch {
  color: #7e9f8e;
  font-size: 0.64rem;
  white-space: nowrap;
}

.switch-field {
  min-height: 2.68rem;
  border: 1px solid rgba(126, 242, 171, 0.12);
  border-radius: 0.72rem;
  background: rgba(4, 15, 9, 0.72);
  padding: 0 0.7rem;
  color: #b0ccba;
  font-size: 0.76rem;
}

.switch-field .switch-track {
  width: 2rem;
  height: 1.12rem;
}

.switch-field .switch-thumb {
  width: 0.72rem;
  height: 0.72rem;
}

.switch-field input:checked + .switch-track .switch-thumb {
  transform: translateX(0.86rem);
}

/* ---------- Empty states ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.2rem 1.25rem;
  text-align: center;
}

.empty-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: 4.1rem;
  height: 4.1rem;
  margin-bottom: 1.1rem;
  border: 1px dashed rgba(126, 242, 171, 0.24);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(67, 229, 140, 0.1), transparent 65%);
  color: #7be1a7;
}

.empty-orbit::before {
  content: "";
  position: absolute;
  inset: 0.55rem;
  border: 1px solid rgba(126, 242, 171, 0.1);
  border-radius: 50%;
}

.empty-orbit svg {
  width: 1.55rem;
  height: 1.55rem;
}

.empty-title {
  margin: 0;
  color: #deffea;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.empty-copy {
  max-width: 29rem;
  margin: 0.45rem 0 1rem;
  color: #789787;
  font-size: 0.8rem;
  line-height: 1.65;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* ---------- Content grid / instances ---------- */
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.88fr);
  align-items: start;
  gap: 1.6rem;
  margin-top: 4.25rem;
}

.content-grid .section-block {
  margin-top: 0;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  border: 1px solid rgba(67, 229, 140, 0.24);
  border-radius: 999px;
  background: rgba(24, 98, 61, 0.2);
  padding: 0.26rem 0.45rem;
  color: #91efb9;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.51rem;
  letter-spacing: 0.06em;
}

.live-pill span {
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 7px rgba(67, 229, 140, 0.8);
  animation: statusPulse 2s ease-in-out infinite;
}

.mono-label {
  color: #5f806e;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.55rem;
  text-align: right;
}

.instances-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 0.85rem;
}

.instances-grid .loading-row,
.instances-grid .empty-state {
  grid-column: 1 / -1;
  border: 1px dashed rgba(126, 242, 171, 0.13);
  border-radius: 1rem;
  background: rgba(7, 21, 14, 0.35);
}

.instance-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(126, 242, 171, 0.11);
  border-radius: 1.05rem;
  background: linear-gradient(160deg, rgba(11, 32, 21, 0.9), rgba(4, 13, 9, 0.96));
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.instance-card:hover {
  transform: translateY(-2px);
  border-color: rgba(126, 242, 171, 0.25);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.26);
}

.instance-media {
  position: relative;
  height: 8.7rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 25%, rgba(68, 230, 142, 0.2), transparent 48%),
    linear-gradient(135deg, #0a2417, #06140d 70%);
}

.instance-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(2, 9, 5, 0.04) 22%, rgba(3, 13, 8, 0.84) 100%);
  pointer-events: none;
}

.instance-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.instance-card:hover .instance-image {
  transform: scale(1.035);
  opacity: 0.95;
}

.instance-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(167, 243, 199, 0.38);
}

.instance-fallback svg {
  width: 3.1rem;
  height: 3.1rem;
}

.live-badge,
.instance-type {
  position: absolute;
  z-index: 2;
  top: 0.65rem;
  border: 1px solid rgba(126, 242, 171, 0.2);
  border-radius: 0.38rem;
  background: rgba(3, 15, 9, 0.75);
  backdrop-filter: blur(8px);
  padding: 0.23rem 0.38rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.47rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.live-badge {
  left: 0.65rem;
  color: #a8f7c6;
}

.live-badge::before {
  content: "";
  display: inline-block;
  width: 0.28rem;
  height: 0.28rem;
  margin-right: 0.3rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px rgba(67, 229, 140, 0.8);
}

.instance-type {
  right: 0.65rem;
  max-width: 48%;
  overflow: hidden;
  color: #a6c9b4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.instance-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0.9rem 0.95rem 0.8rem;
}

.instance-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem;
}

.instance-name {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #e7fff0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.instance-copy {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 0.45rem;
  background: transparent;
  color: #5e8872;
  cursor: pointer;
  transition: all 0.16s ease;
}

.instance-copy:hover {
  border-color: rgba(126, 242, 171, 0.2);
  background: rgba(126, 242, 171, 0.06);
  color: #b7f7cd;
}

.instance-copy svg {
  width: 0.8rem;
  height: 0.8rem;
}

.instance-group {
  overflow: hidden;
  margin: 0.3rem 0 0;
  color: #719180;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.55rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-block {
  margin-top: 0.82rem;
}

.member-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: #6f917e;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.53rem;
}

.member-meta strong {
  color: #c9f4d9;
  font-size: 0.6rem;
  font-weight: 500;
}

.member-bar {
  height: 0.24rem;
  overflow: hidden;
  margin-top: 0.35rem;
  border-radius: 999px;
  background: rgba(126, 242, 171, 0.08);
}

.member-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #17b97b, #81eead);
  box-shadow: 0 0 10px rgba(67, 229, 140, 0.35);
  transition: width 0.4s ease;
}

.instance-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.75rem;
}

.instance-chip {
  border: 1px solid rgba(126, 242, 171, 0.09);
  border-radius: 0.34rem;
  background: rgba(126, 242, 171, 0.035);
  padding: 0.2rem 0.35rem;
  color: #7f9f8c;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.5rem;
  white-space: nowrap;
}

.instance-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin-top: 0.8rem;
  border-top: 1px solid rgba(126, 242, 171, 0.07);
  padding-top: 0.68rem;
}

.message-state {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #7c9d89;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.5rem;
  white-space: nowrap;
}

.message-state::before {
  content: "";
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: #789b86;
}

.message-state.state-sent {
  color: #85cf9f;
}

.message-state.state-sent::before {
  background: var(--green);
}

.message-state.state-pending {
  color: #d5b76c;
}

.message-state.state-pending::before {
  background: var(--amber);
  animation: statusPulse 1.6s ease-in-out infinite;
}

.message-state.state-failed {
  color: #df9aa6;
}

.message-state.state-failed::before {
  background: var(--red);
}

.world-link {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  color: #7fae92;
  font-size: 0.56rem;
  font-weight: 500;
  transition: color 0.16s ease;
}

.world-link:hover {
  color: var(--green-bright);
}

.world-link svg {
  width: 0.67rem;
  height: 0.67rem;
}

/* ---------- Settings ---------- */
.station-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  border: 1px solid rgba(126, 242, 171, 0.14);
  border-radius: 999px;
  background: rgba(13, 43, 28, 0.52);
  padding: 0.28rem 0.48rem;
  color: #97bca6;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.51rem;
  white-space: nowrap;
}

.station-dot {
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: #6f8f7a;
}

.station-badge.is-ready {
  border-color: rgba(67, 229, 140, 0.24);
  color: #a7e8be;
}

.station-badge.is-ready .station-dot {
  background: var(--green);
  box-shadow: 0 0 7px rgba(67, 229, 140, 0.75);
}

.settings-card {
  padding: 1.15rem;
}

.settings-card::before {
  left: 20%;
  right: 20%;
}

.field-group {
  margin-bottom: 1rem;
}

.field-group:last-of-type {
  margin-bottom: 0;
}

.field-label {
  display: block;
  margin-bottom: 0.38rem;
  color: #c5e3d1;
  font-size: 0.71rem;
  font-weight: 500;
}

.field-optional {
  color: #5f806c;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.5rem;
  font-weight: 400;
}

.field-hint {
  margin: 0.33rem 0 0;
  color: #5f806e;
  font-size: 0.59rem;
  line-height: 1.5;
}

.field-hint code {
  border-radius: 0.2rem;
  background: rgba(126, 242, 171, 0.07);
  padding: 0.05rem 0.18rem;
  color: #9bd2b1;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.55rem;
}

.field-flag {
  flex: 0 0 auto;
  color: #a18b72;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.48rem;
  white-space: nowrap;
}

.field-flag.is-on {
  color: #83d8a2;
}

.input {
  width: 100%;
  height: 2.7rem;
  border: 1px solid rgba(126, 242, 171, 0.13);
  border-radius: 0.72rem;
  background: rgba(3, 13, 8, 0.66);
  padding: 0 0.7rem;
  color: #e7fff0;
  font-size: 0.78rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.input::placeholder {
  color: #476555;
}

.input:hover {
  border-color: rgba(126, 242, 171, 0.22);
}

.input:focus {
  outline: none;
  border-color: rgba(67, 229, 140, 0.55);
  background: rgba(4, 18, 10, 0.9);
  box-shadow: 0 0 0 3px rgba(67, 229, 140, 0.08);
}

.input:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.input[type="number"] {
  padding-right: 4.9rem;
  font-family: "JetBrains Mono", monospace;
}

.input-wrap,
.input-suffix-wrap {
  position: relative;
}

.input-with-action {
  padding-right: 2.35rem;
}

.reveal-btn {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  transform: translateY(-50%);
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: #608270;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease;
}

.reveal-btn:hover {
  background: rgba(126, 242, 171, 0.06);
  color: #b6eaca;
}

.reveal-btn svg {
  width: 0.92rem;
  height: 0.92rem;
}

.input-suffix {
  position: absolute;
  top: 50%;
  right: 0.7rem;
  transform: translateY(-50%);
  color: #5e806c;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.54rem;
  pointer-events: none;
}

.text-danger-link {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  padding: 0;
  color: #956e73;
  font-size: 0.55rem;
  cursor: pointer;
  transition: color 0.16s ease;
}

.text-danger-link:hover:not(:disabled) {
  color: #ffb0bc;
}

.text-danger-link:disabled {
  cursor: default;
  opacity: 0.4;
}

.form-error {
  margin-bottom: 0.8rem;
  border: 1px solid rgba(251, 113, 133, 0.22);
  border-radius: 0.58rem;
  background: rgba(108, 24, 40, 0.2);
  padding: 0.55rem 0.65rem;
  color: #ffb3bf;
  font-size: 0.67rem;
  line-height: 1.5;
}

.form-error[hidden] {
  display: none;
}

.settings-actions {
  display: flex;
  gap: 0.48rem;
  margin-top: 1.05rem;
}

.settings-actions .btn {
  height: 2.55rem;
}

.security-note {
  display: flex;
  align-items: flex-start;
  gap: 0.48rem;
  margin-top: 1rem;
  border: 1px solid rgba(126, 242, 171, 0.08);
  border-radius: 0.62rem;
  background: rgba(67, 229, 140, 0.025);
  padding: 0.55rem 0.62rem;
  color: #688b76;
  font-size: 0.55rem;
  line-height: 1.55;
}

.security-note svg {
  width: 0.9rem;
  height: 0.9rem;
  flex: 0 0 auto;
  margin-top: 0.06rem;
  color: #76bd91;
}

.security-note p {
  margin: 0;
}

/* ---------- Logs ---------- */
.log-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
}

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 0.14rem;
  border: 1px solid rgba(126, 242, 171, 0.11);
  border-radius: 0.62rem;
  background: rgba(4, 15, 9, 0.62);
  padding: 0.2rem;
}

.segmented-btn {
  height: 1.65rem;
  border: 1px solid transparent;
  border-radius: 0.42rem;
  background: transparent;
  padding: 0 0.5rem;
  color: #6a8b79;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.52rem;
  cursor: pointer;
  transition: all 0.16s ease;
}

.segmented-btn:hover {
  color: #b4dcc3;
}

.segmented-btn.is-active {
  border-color: rgba(126, 242, 171, 0.17);
  background: rgba(32, 93, 59, 0.45);
  color: #baf3cf;
}

.log-terminal {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(126, 242, 171, 0.13);
  border-radius: 1.05rem;
  background: #020a06;
  box-shadow: inset 0 1px 0 rgba(126, 242, 171, 0.045), 0 26px 70px rgba(0, 0, 0, 0.3);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(126, 242, 171, 0.08);
  background: rgba(7, 22, 14, 0.72);
  padding: 0.58rem 0.85rem;
}

.terminal-dots {
  display: flex;
  gap: 0.3rem;
}

.terminal-dots i {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #355543;
}

.terminal-dots i:nth-child(1) { background: #3ca569; }
.terminal-dots i:nth-child(2) { background: #9d792f; }
.terminal-dots i:nth-child(3) { background: #723740; }

.terminal-title {
  color: #557865;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.55rem;
}

.terminal-meta {
  margin-left: auto;
  color: #456553;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.51rem;
}

.terminal-meta span {
  color: #7eaa8e;
}

.logs-feed {
  max-height: 23rem;
  overflow-y: auto;
  padding: 0.4rem 0.35rem 0.6rem;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(67, 229, 140, 0.24) transparent;
}

.logs-feed::-webkit-scrollbar,
.instance-body::-webkit-scrollbar {
  width: 6px;
}

.logs-feed::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: rgba(67, 229, 140, 0.24);
}

.log-line {
  display: grid;
  grid-template-columns: 5.3rem 3.9rem minmax(0, 1fr);
  align-items: start;
  gap: 0.55rem;
  border-left: 2px solid transparent;
  border-bottom: 1px solid rgba(126, 242, 171, 0.045);
  padding: 0.42rem 0.55rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.67rem;
  line-height: 1.55;
  transition: background 0.14s ease;
}

.log-line:last-child {
  border-bottom: none;
}

.log-line:hover {
  background: rgba(126, 242, 171, 0.025);
}

.log-time {
  color: #4a6d59;
  white-space: nowrap;
}

.log-level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.05rem;
  border-radius: 0.25rem;
  padding: 0 0.25rem;
  font-size: 0.48rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.log-level-info {
  background: rgba(67, 229, 140, 0.08);
  color: #73c895;
}

.log-level-warn {
  background: rgba(251, 191, 36, 0.09);
  color: #d5b66a;
}

.log-level-error {
  background: rgba(251, 113, 133, 0.1);
  color: #e79aa5;
}

.log-line-warn {
  border-left-color: rgba(251, 191, 36, 0.32);
}

.log-line-error {
  border-left-color: rgba(251, 113, 133, 0.4);
}

.log-message {
  color: #96b7a4;
  overflow-wrap: anywhere;
}

.log-line-warn .log-message {
  color: #cdbb8e;
}

.log-line-error .log-message {
  color: #dfacb4;
}

.terminal-empty {
  padding: 1.6rem 1rem;
  color: #4f705c;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  text-align: center;
}

.terminal-cursor {
  display: inline-block;
  width: 0.38rem;
  height: 0.75rem;
  margin-right: 0.15rem;
  vertical-align: -1px;
  background: #5be89c;
  animation: cursorBlink 1.1s step-end infinite;
}

@keyframes cursorBlink {
  0%, 45% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.new-logs-chip {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transform: translateX(-50%);
  border: 1px solid rgba(167, 243, 199, 0.4);
  border-radius: 999px;
  background: #70eda7;
  padding: 0.39rem 0.68rem;
  color: #03140c;
  font-size: 0.61rem;
  font-weight: 600;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.site-footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid rgba(126, 242, 171, 0.08);
  background: rgba(2, 9, 5, 0.42);
}

.footer-dot {
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 7px rgba(67, 229, 140, 0.7);
}

/* ---------- Dialogs ---------- */
.dialog {
  width: calc(100% - 2rem);
  max-width: 34rem;
  margin: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
}

.dialog::backdrop {
  background: rgba(1, 6, 4, 0.78);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.dialog-card {
  position: relative;
  width: 100%;
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  border: 1px solid rgba(126, 242, 171, 0.19);
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at 8% -5%, rgba(26, 124, 80, 0.2), transparent 45%),
    linear-gradient(155deg, #0a2015, #040f09 75%);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: dialogIn 0.2s ease both;
  scrollbar-width: thin;
  scrollbar-color: rgba(67, 229, 140, 0.24) transparent;
}

.dialog-card-sm {
  max-width: 30rem;
  margin-inline: auto;
}

.dialog-topline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(126, 242, 171, 0.85), transparent);
  pointer-events: none;
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem 1.3rem 0.65rem;
}

.dialog-title {
  margin: 0.55rem 0 0;
  color: #edfff3;
  font-size: 1.32rem;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.dialog-copy {
  margin: 0.38rem 0 0;
  color: #779988;
  font-size: 0.71rem;
  line-height: 1.55;
}

.dialog-body {
  display: grid;
  gap: 0.9rem;
  padding: 0.6rem 1.3rem 1rem;
}

.dialog-body .field-group {
  margin-bottom: 0;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.48rem;
  border-top: 1px solid rgba(126, 242, 171, 0.08);
  padding: 0.9rem 1.3rem 1.15rem;
}

.dialog-card-sm .dialog-footer {
  border-top: 0;
  padding-top: 0.4rem;
}

.dialog-card .icon-btn {
  width: 2rem;
  height: 2rem;
}

body:has(dialog[open]) {
  overflow: hidden;
}

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

/* ---------- Toasts ---------- */
.toast-region {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(23rem, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  border: 1px solid rgba(126, 242, 171, 0.17);
  border-radius: 0.75rem;
  background: rgba(6, 20, 12, 0.97);
  padding: 0.65rem 0.7rem;
  color: #c6e8d4;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  animation: toastIn 0.22s ease both;
}

.toast.is-leaving {
  animation: toastOut 0.18s ease both;
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(67, 229, 140, 0.1);
  color: #7de9a8;
  font-size: 0.7rem;
  font-weight: 700;
}

.toast-message {
  flex: 1;
  padding-top: 0.08rem;
  font-size: 0.68rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.toast-close {
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  border: 0;
  border-radius: 0.3rem;
  background: transparent;
  color: #648573;
  font-size: 0.85rem;
  cursor: pointer;
}

.toast-close:hover {
  color: #c4efd4;
}

.toast-error {
  border-color: rgba(251, 113, 133, 0.25);
}

.toast-error .toast-icon {
  background: rgba(251, 113, 133, 0.1);
  color: #ffb0bd;
}

.toast-warn {
  border-color: rgba(251, 191, 36, 0.22);
}

.toast-warn .toast-icon {
  background: rgba(251, 191, 36, 0.1);
  color: #f2d080;
}

.toast-info .toast-icon {
  background: rgba(96, 165, 250, 0.1);
  color: #9bc8ff;
}

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

@keyframes toastOut {
  to { opacity: 0; transform: translateY(5px); }
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .metric-card {
    min-height: 9.2rem;
  }
}

@media (max-width: 1180px) {
  .content-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 4rem;
  }

  .settings-card {
    max-width: 42rem;
  }
}

@media (max-width: 1024px) {
  .hero {
    padding-top: 3.2rem;
  }

  .radar-stage {
    width: min(100%, 26rem);
  }

  .hero-copy {
    max-width: 34rem;
  }
}

@media (max-width: 900px) {
  .table-head {
    display: none;
  }

  .group-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "main actions"
      "webhook webhook"
      "interval signal";
    gap: 0.7rem 0.8rem;
    padding: 0.9rem;
  }

  .group-main { grid-area: main; }
  .group-webhook-col { grid-area: webhook; }
  .group-interval-col { grid-area: interval; }
  .group-signal-col { grid-area: signal; }
  .group-actions { grid-area: actions; }

  .group-cell-label {
    display: block;
  }

  .group-webhook {
    border: 1px solid rgba(126, 242, 171, 0.08);
    border-radius: 0.45rem;
    background: rgba(4, 15, 9, 0.45);
    padding: 0.38rem 0.45rem;
  }

  .group-signal-col {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem 0.5rem;
    text-align: right;
  }

  .group-signal-col .group-cell-label {
    width: 100%;
    margin-bottom: 0;
  }

  .group-last,
  .group-error {
    width: 100%;
    margin-top: 0;
  }

  .group-interval-col {
    display: flex;
    align-items: center;
    gap: 0.45rem;
  }

  .group-interval-col .group-cell-label {
    margin: 0;
  }

  .content-grid {
    margin-top: 3.5rem;
  }
}

@media (max-width: 767px) {
  .hero {
    padding: 2.6rem 0 1.7rem;
  }

  .hero-title {
    font-size: clamp(2.8rem, 12vw, 4rem);
  }

  .hero-copy {
    font-size: 0.9rem;
    line-height: 1.68;
  }

  .radar-stage {
    width: min(100%, 22rem);
    margin-top: 1rem;
  }

  .radar-chip {
    font-size: 0.5rem;
    padding: 0.4rem 0.5rem;
  }

  .radar-chip-top {
    top: 9%;
    right: 0;
  }

  .radar-chip-bottom {
    bottom: 9%;
    left: 0;
  }

  .metrics-grid {
    gap: 0.6rem;
  }

  .metric-card {
    min-height: 7.8rem;
    padding: 0.9rem;
    gap: 0.6rem;
  }

  .metric-icon {
    width: 2rem;
    height: 2rem;
  }

  .metric-label {
    font-size: 0.64rem;
  }

  .metric-value {
    font-size: 1.7rem;
  }

  .metric-value-sm {
    font-size: 1.2rem;
  }

  .metric-sub {
    font-size: 0.5rem;
  }

  .section-block {
    margin-top: 3.2rem;
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .section-heading-compact {
    flex-direction: row;
    align-items: center;
  }

  .section-heading .btn-primary {
    align-self: stretch;
  }

  .section-heading-compact .btn-primary {
    align-self: auto;
  }

  .section-title {
    font-size: 1.72rem;
  }

  .section-copy {
    font-size: 0.75rem;
  }

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

  .instance-media {
    height: 9.2rem;
  }

  .log-toolbar {
    width: 100%;
    justify-content: flex-start;
  }

  .segmented {
    flex: 1;
  }

  .segmented-btn {
    flex: 1;
    padding: 0 0.35rem;
  }

  .terminal-meta {
    display: none;
  }

  .terminal-title {
    font-size: 0.5rem;
  }

  .logs-feed {
    max-height: 20rem;
  }

  .log-line {
    grid-template-columns: 4.4rem 3.2rem minmax(0, 1fr);
    gap: 0.4rem;
    padding: 0.4rem;
    font-size: 0.6rem;
  }

  .site-footer p {
    max-width: 100%;
  }

  .toast-region {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    width: auto;
  }

  .dialog {
    width: calc(100% - 1rem);
  }

  .dialog-header {
    padding-inline: 1rem;
  }

  .dialog-body {
    padding-inline: 1rem;
  }

  .dialog-footer {
    padding-inline: 1rem;
  }
}

@media (max-width: 600px) {
  .brand-sub {
    display: none;
  }

  .brand-mark {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.75rem;
  }

  .brand-mark svg {
    width: 1.95rem;
    height: 1.95rem;
  }

  .brand-name {
    font-size: 0.82rem;
    letter-spacing: 0.1em;
  }

  .status-pill {
    height: 2rem;
    padding: 0 0.6rem;
    font-size: 0.56rem;
  }

  .status-pill #worker-status-label {
    max-width: 7.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .btn-sm {
    height: 2rem;
    padding: 0 0.62rem;
    font-size: 0.68rem;
  }

  .btn-sm .icon {
    width: 0.85rem;
    height: 0.85rem;
  }

  .hero-title {
    letter-spacing: -0.06em;
  }

  .metric-card {
    min-height: 7.4rem;
    flex-direction: column;
    gap: 0.45rem;
  }

  .metric-value {
    font-size: 1.55rem;
  }

  .metric-value-sm {
    font-size: 1.05rem;
  }

  .metric-sub {
    margin-top: 0.35rem;
  }
}

@media (max-width: 430px) {
  .brand-name {
    font-size: 0.75rem;
  }

  #worker-toggle-label {
    display: none;
  }

  #worker-toggle {
    width: 2.15rem;
    padding: 0;
  }

  .status-pill {
    max-width: 8.5rem;
  }

  .hero-title {
    font-size: 2.75rem;
  }

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

  .metric-card {
    min-height: auto;
    flex-direction: row;
    align-items: flex-start;
  }

  .metric-value {
    font-size: 1.9rem;
  }

  .metric-value-sm {
    font-size: 1.35rem;
  }

  .group-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "main actions"
      "webhook webhook"
      "interval signal";
  }

  .group-actions .icon-btn {
    width: 2rem;
    height: 2rem;
  }

  .group-actions {
    gap: 0.25rem;
  }

  .section-heading-compact {
    align-items: flex-start;
  }

  .station-badge {
    margin-top: 0.25rem;
  }
}

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

  .star-layer {
    animation: none;
  }
}

[hidden] {
  display: none !important;
}


/* Login VRChat */
.auth-view[hidden] {
  display: none !important;
}

.textarea {
  min-height: 6rem;
  resize: vertical;
  line-height: 1.45;
  font-family: inherit;
}

.text-link {
  margin-top: 0.35rem;
  background: none;
  border: 0;
  padding: 0;
  color: #6ee7b7;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.text-link:hover {
  color: #a7f3d0;
}

.text-link[hidden],
.settings-actions [hidden] {
  display: none !important;
}

.account-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(52, 211, 153, 0.3);
  background: rgba(16, 185, 129, 0.08);
  margin-bottom: 1rem;
}

.account-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(167, 243, 208, 0.75);
}

.account-name {
  font-size: 1.05rem;
  color: #ecfdf5;
  word-break: break-word;
}

/* ---------- Constructor de mensagem Discord ---------- */
.builder-group {
  border: 1px solid rgba(126, 242, 171, 0.12);
  border-radius: 0.9rem;
  background: rgba(3, 13, 8, 0.5);
  padding: 0.9rem;
  display: grid;
  gap: 0.75rem;
}

.builder-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.builder-header-text {
  flex: 1;
  min-width: 0;
}

.builder-header-text .field-label {
  margin-bottom: 0.2rem;
  color: #a7f3c7;
}

.builder-header .field-hint {
  margin-top: 0;
}

.embed-builder {
  display: grid;
  gap: 0.85rem;
  animation: builderIn 0.18s ease both;
}

@keyframes builderIn {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

.builder-switches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  border: 1px dashed rgba(126, 242, 171, 0.14);
  border-radius: 0.7rem;
  padding: 0.55rem 0.7rem;
}

.color-input {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  width: 1.6rem;
  height: 1.6rem;
  transform: translateY(-50%);
  border: 1px solid rgba(126, 242, 171, 0.25);
  border-radius: 0.45rem;
  background: transparent;
  padding: 0.08rem;
  cursor: pointer;
}

.color-input::-webkit-color-swatch-wrapper { padding: 0; }
.color-input::-webkit-color-swatch { border: 0; border-radius: 0.3rem; }

.var-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.4rem;
}

.var-chip {
  border: 1px solid rgba(126, 242, 171, 0.2);
  border-radius: 999px;
  background: rgba(18, 46, 30, 0.55);
  padding: 0.16rem 0.5rem;
  color: #9be3b6;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.var-chip:hover {
  border-color: rgba(67, 229, 140, 0.6);
  color: #d7ffe6;
  background: rgba(67, 229, 140, 0.12);
}

.var-chip:active { transform: translateY(1px); }

.embed-fields-group { margin-bottom: 0; }

.embed-fields-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}

.embed-fields-head .field-label { margin-bottom: 0; }

.embed-fields {
  display: grid;
  gap: 0.45rem;
}

.embed-field-empty {
  border: 1px dashed rgba(126, 242, 171, 0.16);
  border-radius: 0.7rem;
  padding: 0.7rem;
  color: #5f806e;
  font-size: 0.62rem;
  text-align: center;
}

.embed-field-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(126, 242, 171, 0.1);
  border-radius: 0.7rem;
  background: rgba(3, 13, 8, 0.55);
  padding: 0.45rem 0.55rem;
  transition: border-color 0.15s ease;
}

.embed-field-row:focus-within {
  border-color: rgba(67, 229, 140, 0.4);
}

.embed-field-row.is-off {
  opacity: 0.45;
}

.embed-field-rail,
.embed-field-side {
  display: flex;
  align-items: center;
  gap: 0.18rem;
}

.embed-field-inputs {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.embed-field-name {
  height: 2.05rem;
  font-size: 0.7rem;
  font-weight: 600;
}

.embed-field-value {
  height: 2.05rem;
  font-size: 0.68rem;
  font-family: "JetBrains Mono", monospace;
}

.embed-row-btn {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border: 1px solid rgba(126, 242, 171, 0.16);
  border-radius: 0.42rem;
  background: rgba(10, 27, 18, 0.7);
  color: #7fb89a;
  font-size: 0.72rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.embed-row-btn:hover:not(:disabled) {
  border-color: rgba(67, 229, 140, 0.5);
  color: #d7ffe6;
}

.embed-row-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.embed-row-remove:hover:not(:disabled) {
  border-color: rgba(248, 113, 113, 0.55);
  color: #fca5a5;
}

.embed-check {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  cursor: pointer;
  margin-left: 0.1rem;
  white-space: nowrap;
}

.embed-check input { display: none; }

.embed-check span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.53rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(126, 242, 171, 0.16);
  border-radius: 0.35rem;
  padding: 0.14rem 0.3rem;
  background: transparent;
  color: #5f806e;
}

.embed-check input:checked + span {
  border-color: rgba(67, 229, 140, 0.45);
  background: rgba(67, 229, 140, 0.12);
  color: #7de9a8;
}

/* ---------- Pré-visualização Discord ---------- */
.discord-preview-wrap {
  border-top: 1px dashed rgba(126, 242, 171, 0.14);
  padding-top: 0.7rem;
  display: grid;
  gap: 0.45rem;
}

.preview-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #6f9483;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.preview-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: rgba(67, 229, 140, 0.7);
  box-shadow: 0 0 8px rgba(67, 229, 140, 0.5);
}

.discord-preview {
  display: flex;
  gap: 0.7rem;
  border-radius: 0.6rem;
  background: #313338;
  padding: 0.75rem 0.8rem;
  min-height: 3.4rem;
}

.disc-avatar {
  flex: 0 0 auto;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 45%, #5eea9c 0 38%, #0e9b6b 38% 62%, #07130d 62%),
    #0b2216;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.06);
}

.disc-msg {
  flex: 1;
  min-width: 0;
}

.disc-user {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #f2f3f5;
  font-size: 0.78rem;
  font-weight: 600;
}

.disc-content {
  margin-top: 0.15rem;
  color: #dbdee1;
  font-size: 0.72rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.disc-content code,
.disc-embed-desc code,
.disc-field-value code {
  background: #2b2d31;
  border: 1px solid #1e1f22;
  border-radius: 0.2rem;
  padding: 0 0.22rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  color: #dbdee1;
}

.disc-embed {
  margin-top: 0.35rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 0.7rem;
}

.disc-embed-inner {
  border-left: 4px solid #36d399;
  border-radius: 0.5rem;
  background: #2b2d31;
  padding: 0.55rem 0.7rem 0.6rem;
  display: grid;
  gap: 0.4rem;
  align-content: start;
}

.disc-embed[hidden],
.disc-content[hidden],
#preview-embed-media[hidden],
#preview-embed-thumb[hidden],
#preview-embed-title[hidden],
#preview-embed-description[hidden],
#preview-embed-fields[hidden] {
  display: none;
}

.disc-embed-title {
  color: #00a8fc;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.disc-embed-title a {
  color: inherit;
  text-decoration: none;
}

.disc-embed-title a:hover { text-decoration: underline; }

.disc-embed-desc {
  color: #dbdee1;
  font-size: 0.7rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.disc-embed-fields {
  display: grid;
  grid-template-columns: 100%;
  gap: 0.45rem 1rem;
}

.disc-field.is-inline { width: 50%; display: inline-block; vertical-align: top; }

.disc-field + .disc-field:not(.is-inline) { clear: both; }

.disc-field-name {
  display: block;
  color: #f2f3f5;
  font-size: 0.66rem;
  font-weight: 700;
  margin-bottom: 0.12rem;
  overflow-wrap: anywhere;
}

.disc-field-value {
  display: block;
  color: #dbdee1;
  font-size: 0.68rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.disc-embed-media {
  margin-top: 0.15rem;
  width: 100%;
  max-width: 18rem;
}

.disc-embed-media img {
  width: 100%;
  border-radius: 0.4rem;
  display: block;
}

.disc-embed-thumb {
  align-self: start;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 0.4rem;
  object-fit: cover;
}

.disc-embed-footer {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #949ba4;
  font-size: 0.6rem;
  line-height: 1.35;
}

.disc-stamp::before {
  content: "•";
  margin-right: 0.45rem;
  color: #6d6f78;
}

@media (max-width: 640px) {
  .embed-field-row {
    grid-template-columns: 1fr;
  }
  .embed-field-side {
    justify-content: flex-end;
  }
  .disc-field.is-inline { width: 100%; display: block; }
}
