:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --line: #e6ebf2;
  --text: #101828;
  --muted: #667085;
  --primary: #16b36b;
  --primary-dark: #079455;
  --side: #101828;
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
  --admin-shade-hue: 47;
  --admin-lamp-color: hsl(var(--admin-shade-hue) 92% 58%);
  --admin-lamp-border: hsl(var(--admin-shade-hue) 96% 70% / 0.74);
}

@property --admin-shade-hue {
  syntax: "<number>";
  inherits: true;
  initial-value: 47;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.is-hidden {
  display: none !important;
}

.login-screen {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 28px;
  color: #edf5ff;
  background:
    radial-gradient(circle at 42% 36%, hsl(var(--admin-shade-hue) 94% 60% / 0.2), transparent 31rem),
    radial-gradient(circle at 72% 74%, hsl(196 54% 34% / 0.14), transparent 24rem),
    #121921;
  transition: --admin-shade-hue 420ms ease;
  isolation: isolate;
}

.login-screen::before,
.login-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-screen::before {
  background:
    linear-gradient(120deg, transparent 0 34%, hsl(var(--admin-shade-hue) 88% 56% / 0.08) 44%, transparent 55%),
    radial-gradient(circle at 34% 58%, hsl(var(--admin-shade-hue) 92% 56% / 0.16), transparent 22rem);
  opacity: 0.9;
  z-index: -3;
}

.login-screen::after {
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.04), transparent 18%),
    radial-gradient(circle at 50% 95%, rgb(0 0 0 / 0.38), transparent 32rem);
  opacity: 0.7;
  z-index: -1;
}

.admin-login-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 34% 48%, hsl(var(--admin-shade-hue) 92% 52% / 0.28), transparent 19rem),
    radial-gradient(circle at 56% 48%, hsl(var(--admin-shade-hue) 90% 46% / 0.16), transparent 32rem);
  filter: blur(18px);
  pointer-events: none;
  z-index: -2;
}

.admin-login-stage {
  width: min(1080px, 100%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 5vw, 92px);
}

.admin-lamp-scene {
  width: min(390px, 42vw);
  min-width: 280px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 24px 38px rgb(0 0 0 / 0.28));
}

.admin-login-lamp {
  width: 100%;
  height: auto;
  overflow: visible;
  user-select: none;
}

.admin-lamp-glow {
  fill: var(--admin-lamp-color);
  filter: url(#adminSoftLampGlow);
  opacity: 0.34;
}

.admin-light-beam {
  fill: url(#adminLightGradient);
  filter: url(#adminHazeBlur);
  opacity: 0.72;
  mix-blend-mode: screen;
}

.admin-water-ripple {
  fill: none;
  stroke: hsl(var(--admin-shade-hue) 94% 72% / 0.18);
  stroke-linecap: round;
  stroke-width: 1;
  filter: url(#adminHazeBlur);
  mix-blend-mode: screen;
  opacity: 0.8;
}

.admin-ripple-two {
  opacity: 0.42;
}

.admin-ripple-three {
  opacity: 0.28;
}

.admin-floor-shadow {
  fill: rgb(0 0 0 / 0.34);
  filter: blur(1px);
}

.admin-hanging-wire {
  fill: none;
  stroke: rgb(229 239 249 / 0.56);
  stroke-linecap: round;
  stroke-width: 1.7;
}

.admin-wire-cap {
  fill: rgb(225 235 243 / 0.72);
  stroke: rgb(9 14 21 / 0.42);
  stroke-width: 0.8;
}

.admin-wire-pin {
  fill: rgb(229 239 249 / 0.8);
}

.admin-shade-shadow {
  fill: rgb(3 7 12 / 0.46);
  transform: translateY(3px);
}

.admin-minimal-shade {
  fill: url(#adminShadeGradient);
  stroke: hsl(var(--admin-shade-hue) 90% 78% / 0.66);
  stroke-width: 1.4;
  filter: drop-shadow(0 16px 26px rgb(0 0 0 / 0.32));
}

.admin-shade-highlight {
  fill: none;
  stroke: rgb(255 248 213 / 0.44);
  stroke-linecap: round;
  stroke-width: 1.5;
  filter: url(#adminFineGlow);
}

.admin-shade-side {
  fill: rgb(0 0 0 / 0.12);
}

.admin-shade-side-right {
  fill: rgb(255 255 255 / 0.07);
}

.admin-shade-rim {
  fill: none;
  stroke: rgb(255 249 220 / 0.86);
  stroke-linecap: round;
  stroke-width: 2.2;
}

.admin-minimal-lip {
  fill: none;
  stroke: hsl(var(--admin-shade-hue) 70% 18% / 0.72);
  stroke-width: 1.5;
}

.admin-eye-white {
  fill: #f6fbff;
  stroke: rgb(18 25 33 / 0.58);
  stroke-width: 0.9;
}

.admin-eye-pupil {
  fill: #1d2530;
}

.admin-pull-cord {
  fill: none;
  stroke: rgb(216 231 247 / 0.82);
  stroke-linecap: round;
  stroke-width: 2.3;
  filter: drop-shadow(0 0 5px hsl(var(--admin-shade-hue) 96% 68% / 0.36));
}

.admin-pull-cord-shadow {
  stroke: rgb(0 0 0 / 0.3);
  stroke-width: 5;
}

.admin-pull-tab {
  fill: hsl(var(--admin-shade-hue) 92% 52%);
  stroke: rgb(246 251 255 / 0.78);
  stroke-width: 1.5;
  filter:
    drop-shadow(0 8px 14px rgb(0 0 0 / 0.3))
    drop-shadow(0 0 14px hsl(var(--admin-shade-hue) 96% 64% / 0.62));
}

.admin-cord-bead {
  fill: #121921;
  opacity: 0.72;
}

.admin-pull-cord-handle {
  cursor: grab;
  outline: none;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 280ms cubic-bezier(.2, 1.5, .36, 1);
}

.admin-pull-cord-handle.is-pulling {
  cursor: grabbing;
  transition-duration: 80ms;
}

.admin-pull-cord-handle:focus-visible .admin-pull-tab {
  stroke: hsl(var(--admin-shade-hue) 96% 88%);
  filter:
    drop-shadow(0 8px 14px rgb(0 0 0 / 0.3))
    drop-shadow(0 0 20px hsl(var(--admin-shade-hue) 96% 64% / 0.82));
}

.admin-pull-cord,
.admin-pull-tab,
.admin-lamp-glow,
.admin-minimal-shade,
.admin-light-beam,
.admin-water-ripple,
.login-card,
.login-card::before,
.login-card::after,
.form-kicker,
.forgot-link,
.login-card .login-submit,
.login-divider {
  transition:
    fill 420ms ease,
    stroke 420ms ease,
    filter 420ms ease,
    background 420ms ease,
    background-color 420ms ease,
    border-color 420ms ease,
    box-shadow 420ms ease,
    color 420ms ease;
}

.login-card {
  position: relative;
  width: min(390px, 44vw);
  min-width: 320px;
  padding: 40px;
  border: 1px solid var(--admin-lamp-border);
  border-radius: 8px;
  color: #f4f9ff;
  background:
    linear-gradient(145deg, hsl(var(--admin-shade-hue) 70% 24% / 0.18), transparent 48%),
    linear-gradient(180deg, rgb(255 255 255 / 0.045), transparent 28%),
    hsl(212 28% 10% / 0.84);
  box-shadow:
    0 0 44px hsl(var(--admin-shade-hue) 94% 62% / 0.42),
    0 24px 60px rgb(0 0 0 / 0.42);
  backdrop-filter: blur(18px);
  animation: adminCardIn 680ms cubic-bezier(.16, 1.16, .38, 1) both;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid hsl(var(--admin-shade-hue) 92% 62% / 0.14);
  border-radius: 6px;
  pointer-events: none;
}

.login-card::after {
  content: "";
  position: absolute;
  top: -1px;
  right: 28px;
  width: 104px;
  height: 2px;
  background: linear-gradient(90deg, transparent, hsl(var(--admin-shade-hue) 96% 72%), transparent);
  box-shadow: 0 0 24px hsl(var(--admin-shade-hue) 96% 62% / 0.8);
}

.login-kicker {
  display: block;
  margin-bottom: 10px;
  color: #73f6ff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.form-kicker {
  margin: 0 0 8px;
  color: hsl(var(--admin-shade-hue) 94% 74% / 0.84);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.login-card h1 {
  margin: 0;
  font-size: 40px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0;
}

.login-card p {
  margin: 9px 0 26px;
  color: rgb(224 234 245 / 0.56);
  font-size: 13px;
  line-height: 1.6;
}

.login-field {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
  color: rgb(221 234 247 / 0.78);
  font-size: 14px;
}

.login-field span {
  font-weight: 800;
}

.login-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgb(193 211 230 / 0.16);
  border-radius: 8px;
  outline: none;
  padding: 0 15px;
  color: #f4f9ff;
  background: rgb(7 14 24 / 0.72);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.04);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.login-field input::placeholder {
  color: rgb(204 218 236 / 0.38);
}

.login-field input:focus {
  border-color: hsl(var(--admin-shade-hue) 94% 66%);
  background: rgb(8 15 25 / 0.9);
  box-shadow:
    0 0 0 3px hsl(var(--admin-shade-hue) 92% 62% / 0.18),
    0 0 24px hsl(var(--admin-shade-hue) 92% 62% / 0.22);
}

.form-options {
  display: flex;
  justify-content: flex-end;
  margin: 2px 0 18px;
  color: rgb(221 234 247 / 0.68);
  font-size: 13px;
}

.forgot-link {
  color: hsl(var(--admin-shade-hue) 92% 72%);
  text-shadow: 0 0 18px hsl(var(--admin-shade-hue) 92% 62% / 0.5);
  white-space: nowrap;
}

.login-card .login-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 6px;
  border: 0;
  border-radius: 8px;
  color: #0c131c;
  font-weight: 800;
  background: linear-gradient(135deg, hsl(var(--admin-shade-hue) 96% 76%), hsl(var(--admin-shade-hue) 86% 54%));
  box-shadow: 0 14px 30px hsl(var(--admin-shade-hue) 86% 48% / 0.4);
  transition: transform 160ms ease, filter 160ms ease;
}

.login-card .login-submit:hover {
  filter: brightness(1.06);
}

.login-card .login-submit:active {
  transform: translateY(1px);
}

.login-divider {
  width: 100%;
  height: 1px;
  margin-top: 22px;
  background: linear-gradient(90deg, transparent, hsl(var(--admin-shade-hue) 94% 72% / 0.4), transparent);
}

.console {
  min-width: 1200px;
}

@keyframes adminCardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 700px) {
  .login-screen {
    align-items: flex-start;
    padding: 18px 20px 28px;
    overflow: auto;
  }

  .admin-login-stage {
    gap: 8px;
  }

  .admin-lamp-scene {
    width: min(180px, 54vw);
    min-width: 0;
  }

  .login-card {
    width: min(390px, 92vw);
    min-width: 0;
    padding: 22px;
  }

  .login-card h1 {
    font-size: 30px;
  }

  .login-card p {
    margin-bottom: 18px;
    font-size: 12px;
  }

  .login-field {
    gap: 6px;
    margin-bottom: 12px;
    font-size: 13px;
  }

  .login-field input {
    min-height: 42px;
  }

  .form-options {
    margin-bottom: 12px;
    font-size: 12px;
  }

  .login-card .login-submit {
    min-height: 46px;
  }

  .login-divider {
    margin-top: 14px;
  }
}

.login-screen {
  color: #10243e;
  background:
    linear-gradient(90deg, rgb(24 98 179 / 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgb(24 98 179 / 0.06) 1px, transparent 1px),
    radial-gradient(circle at 26% 28%, rgb(75 151 255 / 0.24), transparent 24rem),
    radial-gradient(circle at 76% 18%, rgb(40 205 232 / 0.2), transparent 22rem),
    linear-gradient(135deg, #f8fbff 0%, #e8f3ff 52%, #f7fbff 100%);
  background-size: 56px 56px, 56px 56px, auto, auto, auto;
}

.login-screen::before {
  background:
    linear-gradient(118deg, transparent 0 32%, rgb(48 138 255 / 0.16) 46%, transparent 61%),
    radial-gradient(circle at 18% 84%, rgb(28 120 236 / 0.14), transparent 24rem);
  opacity: 1;
}

.login-screen::after {
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.72), transparent 34%),
    radial-gradient(circle at 50% 100%, rgb(34 91 167 / 0.1), transparent 34rem);
  opacity: 1;
}

.admin-login-glow {
  background:
    radial-gradient(circle at 38% 46%, rgb(28 122 255 / 0.28), transparent 18rem),
    radial-gradient(circle at 58% 50%, rgb(21 214 242 / 0.22), transparent 28rem);
  filter: blur(26px);
}

.admin-login-stage {
  width: min(1180px, 100%);
  gap: clamp(30px, 6vw, 110px);
}

.admin-login-orbit {
  position: relative;
  width: min(540px, 45vw);
  min-width: 340px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  perspective: 1100px;
  filter: drop-shadow(0 30px 48px rgb(31 86 151 / 0.18));
}

.admin-login-orbit::before,
.admin-login-orbit::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.admin-login-orbit::before {
  width: 76%;
  height: 24%;
  bottom: 16%;
  border: 1px solid rgb(61 142 245 / 0.22);
  background: radial-gradient(ellipse at center, rgb(44 136 255 / 0.12), transparent 66%);
  transform: rotateX(66deg);
}

.admin-login-orbit::after {
  width: 86%;
  height: 86%;
  border: 1px dashed rgb(42 128 238 / 0.2);
  box-shadow: inset 0 0 42px rgb(42 128 238 / 0.1);
  animation: adminCoreFloat 7s ease-in-out infinite;
}

.admin-platform-ring {
  position: absolute;
  bottom: 19%;
  width: 68%;
  height: 17%;
  border: 1px solid rgb(38 130 242 / 0.28);
  border-radius: 999px;
  background:
    radial-gradient(ellipse at center, rgb(34 132 255 / 0.22), transparent 62%),
    linear-gradient(90deg, transparent, rgb(34 132 255 / 0.24), transparent);
  box-shadow:
    0 20px 38px rgb(41 91 156 / 0.18),
    inset 0 0 22px rgb(42 147 255 / 0.18);
  transform: rotateX(66deg);
}

.admin-login-bridge {
  position: absolute;
  top: 44%;
  width: 28%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgb(45 130 244 / 0.72), transparent);
  box-shadow: 0 0 18px rgb(45 130 244 / 0.5);
}

.admin-login-bridge::before,
.admin-login-bridge::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #2a84f4;
  box-shadow: 0 0 18px rgb(42 132 244 / 0.72);
  transform: translateY(-50%);
}

.admin-login-bridge::before {
  left: 20%;
}

.admin-login-bridge::after {
  right: 14%;
}

.bridge-left {
  left: 5%;
  transform: rotate(20deg);
}

.bridge-right {
  right: 5%;
  transform: rotate(-20deg);
}

.admin-data-core {
  position: relative;
  width: 48%;
  height: 48%;
  transform-style: preserve-3d;
  animation: adminCoreFloat 5.8s ease-in-out infinite;
}

.admin-core-top,
.admin-core-layer {
  position: absolute;
  left: 50%;
  width: 68%;
  height: 22%;
  border: 1px solid rgb(50 132 238 / 0.3);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 0.86), rgb(175 214 255 / 0.34)),
    linear-gradient(90deg, rgb(37 122 245 / 0.12), transparent 62%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.92),
    0 16px 32px rgb(32 99 183 / 0.16);
  transform: translateX(-50%) rotateX(60deg) rotateZ(-45deg);
}

.admin-core-top {
  top: 10%;
  z-index: 4;
}

.admin-core-top span,
.admin-core-layer i,
.admin-core-layer b {
  position: absolute;
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f7ef2, #1fd7e8);
  box-shadow: 0 0 16px rgb(31 126 242 / 0.52);
}

.admin-core-top span {
  left: 18%;
  top: 42%;
  width: 56%;
  height: 4px;
}

.admin-core-layer i {
  left: 17%;
  top: 35%;
  width: 34%;
  height: 4px;
}

.admin-core-layer b {
  right: 17%;
  top: 35%;
  width: 10%;
  height: 10px;
}

.layer-one {
  top: 30%;
  z-index: 3;
}

.layer-two {
  top: 48%;
  z-index: 2;
  opacity: 0.86;
}

.layer-three {
  top: 66%;
  z-index: 1;
  opacity: 0.72;
}

.admin-energy-line {
  position: absolute;
  left: 50%;
  top: 20%;
  width: 2px;
  height: 66%;
  background: linear-gradient(180deg, transparent, #1f7ef2, #1bd6e8, transparent);
  box-shadow: 0 0 18px rgb(31 126 242 / 0.72);
  transform: translateX(-50%);
  animation: adminEnergyFlow 2.8s ease-in-out infinite;
}

.admin-floating-panel {
  position: absolute;
  width: 118px;
  height: 72px;
  border: 1px solid rgb(49 129 236 / 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.86), rgb(232 244 255 / 0.58)),
    linear-gradient(120deg, rgb(37 126 245 / 0.14), transparent);
  box-shadow: 0 18px 34px rgb(31 86 151 / 0.16);
  backdrop-filter: blur(12px);
  animation: adminPanelIn 720ms cubic-bezier(.16, 1.16, .38, 1) both;
}

.admin-floating-panel span,
.admin-floating-panel strong,
.admin-floating-panel em {
  position: absolute;
  left: 16px;
  right: 16px;
  display: block;
  border-radius: 999px;
  background: rgb(44 123 230 / 0.18);
}

.admin-floating-panel span {
  top: 16px;
  height: 8px;
  width: 52px;
  background: linear-gradient(90deg, #287ff0, #1bd6e8);
}

.admin-floating-panel strong {
  top: 34px;
  height: 5px;
}

.admin-floating-panel em {
  top: 47px;
  height: 5px;
  right: 36px;
}

.panel-one {
  left: 7%;
  top: 18%;
}

.panel-two {
  right: 6%;
  bottom: 24%;
  animation-delay: 120ms;
}

.admin-login-panel.login-card {
  width: min(400px, 42vw);
  min-width: 340px;
  padding: 42px;
  border: 1px solid rgb(141 182 233 / 0.36);
  border-radius: 18px;
  color: #10243e;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.96), rgb(244 250 255 / 0.88)),
    linear-gradient(145deg, rgb(37 126 245 / 0.1), transparent 48%);
  box-shadow:
    0 24px 70px rgb(45 92 153 / 0.16),
    inset 0 1px 0 rgb(255 255 255 / 0.96);
  backdrop-filter: blur(18px);
}

.admin-login-panel.login-card::before {
  inset: 12px;
  border-color: rgb(39 127 240 / 0.12);
  border-radius: 14px;
}

.admin-login-panel.login-card::after {
  background: linear-gradient(90deg, transparent, #287ff0, #1bd6e8, transparent);
  box-shadow: 0 0 22px rgb(40 127 240 / 0.46);
}

.admin-login-panel .form-kicker {
  color: #287ff0;
}

.admin-login-panel.login-card h1 {
  color: #10243e;
  font-size: 36px;
}

.admin-login-panel.login-card p {
  color: #5b708d;
}

.admin-login-panel .login-field {
  color: #213953;
}

.admin-login-panel .login-field input {
  color: #10243e;
  border-color: #d7e4f3;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgb(20 51 88 / 0.04);
}

.admin-login-panel .login-field input::placeholder {
  color: #91a3ba;
}

.admin-login-panel .login-field input:focus {
  border-color: #287ff0;
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgb(40 127 240 / 0.12),
    0 12px 24px rgb(40 127 240 / 0.1);
}

.admin-login-panel .forgot-link {
  color: #287ff0;
  text-shadow: none;
}

.admin-login-panel.login-card .login-submit {
  color: #ffffff;
  background: linear-gradient(135deg, #287ff0, #16c8e3);
  box-shadow: 0 18px 34px rgb(40 127 240 / 0.28);
}

.admin-login-panel .login-divider {
  background: linear-gradient(90deg, transparent, rgb(40 127 240 / 0.32), transparent);
}

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

@keyframes adminEnergyFlow {
  0%,
  100% {
    opacity: 0.42;
    transform: translateX(-50%) scaleY(0.72);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) scaleY(1);
  }
}

@keyframes adminPanelIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 820px) {
  .login-screen {
    padding: 24px 18px 30px;
  }

  .admin-login-stage {
    gap: 12px;
  }

  .admin-login-orbit {
    width: min(360px, 86vw);
    min-width: 0;
  }

  .admin-floating-panel {
    width: 92px;
    height: 58px;
  }

  .admin-login-panel.login-card {
    width: min(400px, 92vw);
    min-width: 0;
    padding: 26px;
  }

  .admin-login-panel.login-card h1 {
    font-size: 30px;
  }
}

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

button {
  cursor: pointer;
}

.console {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  background:
    radial-gradient(circle at 22% 0%, rgba(0, 229, 255, 0.14), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(49, 255, 182, 0.08), transparent 26%),
    linear-gradient(145deg, #020713 0%, #071626 48%, #03101f 100%);
}

.sidebar {
  height: 100vh;
  padding: 20px 16px;
  border-right: 1px solid rgba(113, 223, 255, 0.13);
  background: rgba(4, 17, 31, 0.88);
  color: #fff;
  position: sticky;
  top: 0;
  box-shadow: 18px 0 60px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.tenant-box {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  padding: 14px;
  border-radius: 8px;
  background: #1d2939;
}

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

.tenant-box span {
  color: #98a2b3;
  font-size: 12px;
}

.tenant-box strong {
  margin-top: 4px;
}

.tenant-box button {
  width: 100%;
  height: 32px;
  margin-top: 12px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: #344054;
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--primary);
  font-weight: 900;
}

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

.logo-row span,
.side-title {
  color: #98a2b3;
  font-size: 12px;
}

.create-button {
  width: 100%;
  height: 38px;
  margin: 14px 0 8px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
  font-weight: 800;
}

.platform-panel {
  margin: 18px 0;
  padding: 12px;
  border-radius: 8px;
  background: #1d2939;
}

.platform-nav {
  width: 100%;
  height: 34px;
  margin-top: 8px;
  border: 0;
  border-radius: 7px;
  color: #cbd5e1;
  background: transparent;
  text-align: left;
  padding: 0 10px;
  font-weight: 800;
}

.platform-nav.active,
.platform-nav:hover {
  color: #fff;
  background: #344054;
}

.side-title {
  margin-bottom: 10px;
}

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

.agent-item {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  color: #cbd5e1;
  background: transparent;
  text-align: left;
}

.agent-item.active,
.agent-item:hover {
  color: #fff;
  background: #1d2939;
}

.agent-item strong,
.agent-item span {
  display: block;
}

.agent-item span {
  margin-top: 4px;
  color: #98a2b3;
  font-size: 12px;
}

.workspace {
  min-width: 0;
  padding: 22px 28px;
  color: #e8fbff;
}

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #e8fbff;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 17px;
}

p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.top-actions {
  display: flex;
  gap: 10px;
}

.tenant-switcher {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}

.primary-button,
.ghost-button {
  height: 36px;
  padding: 0 15px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-button {
  border: 0;
  color: #fff;
  background: var(--primary);
}

.ghost-button {
  border: 1px solid var(--line);
  color: #344054;
  background: #fff;
}

.editor-shell {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
}

.tenant-manager {
  margin-top: 18px;
}

.platform-dashboard {
  display: grid;
  gap: 18px;
}

.platform-hero,
.platform-card,
.tenant-stat {
  border: 1px solid rgba(124, 241, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(11, 32, 54, 0.86), rgba(4, 18, 34, 0.9)),
    rgba(4, 18, 34, 0.84);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
}

.platform-hero {
  min-height: 132px;
  padding: 28px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  position: relative;
}

.platform-hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(77, 232, 255, 0.16);
  border-radius: 50%;
  box-shadow: inset 0 0 80px rgba(0, 229, 255, 0.1);
}

.platform-hero h2 {
  color: #f3fdff;
  font-size: 30px;
}

.platform-hero p,
.platform-card p {
  color: rgba(213, 243, 255, 0.66);
}

.platform-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tenant-panel {
  padding: 22px;
}

.tenant-stats {
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.tenant-stat {
  padding: 16px;
  border-radius: 12px;
}

.tenant-stat span,
.tenant-stat strong {
  display: block;
}

.tenant-stat span {
  color: rgba(213, 243, 255, 0.62);
  font-size: 12px;
}

.tenant-stat strong {
  margin-top: 8px;
  color: #f4fdff;
  font-size: 24px;
}

.tenant-stat em {
  display: block;
  margin-top: 8px;
  color: rgba(213, 243, 255, 0.48);
  font-size: 12px;
  font-style: normal;
}

.tenant-stat.warning strong {
  color: #ffd166;
}

.tenant-stat.danger strong {
  color: #ff7a90;
}

.tenant-tip {
  margin-top: 14px;
}

.platform-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.platform-card {
  padding: 22px;
  border-radius: 14px;
}

.platform-status-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.status-cell {
  min-height: 86px;
  padding: 14px;
  border: 1px solid rgba(124, 241, 255, 0.12);
  border-radius: 12px;
  background: rgba(2, 13, 26, 0.45);
}

.status-cell span,
.status-cell strong {
  display: block;
}

.status-cell span {
  color: rgba(213, 243, 255, 0.62);
  font-size: 12px;
}

.status-cell strong {
  margin-top: 12px;
  color: #54f5ff;
  font-size: 26px;
}

.platform-trend {
  height: 230px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.platform-bar {
  min-width: 0;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 7px;
  text-align: center;
}

.platform-bar-track {
  display: flex;
  align-items: flex-end;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(2, 13, 26, 0.58);
  border: 1px solid rgba(124, 241, 255, 0.12);
}

.platform-bar-track span {
  width: 100%;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, #38f4ff, #31ffb6);
  box-shadow: 0 0 20px rgba(49, 243, 255, 0.28);
}

.platform-bar strong {
  color: #dffbff;
  font-size: 12px;
}

.platform-bar em {
  color: rgba(213, 243, 255, 0.48);
  font-size: 12px;
  font-style: normal;
}

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

.platform-task {
  padding: 14px;
  border: 1px solid rgba(124, 241, 255, 0.12);
  border-radius: 12px;
  background: rgba(2, 13, 26, 0.45);
}

.platform-task strong,
.platform-task span {
  display: block;
}

.platform-task strong {
  color: #f4fdff;
}

.platform-task span {
  margin-top: 6px;
  color: rgba(213, 243, 255, 0.58);
  font-size: 12px;
}

.platform-task.warning {
  border-color: rgba(255, 209, 102, 0.32);
}

.platform-task.danger {
  border-color: rgba(255, 122, 144, 0.32);
}

.platform-filters {
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 160px 160px;
  gap: 10px;
}

.platform-filters input,
.platform-filters select {
  height: 38px;
  min-width: 0;
  border: 1px solid rgba(113, 223, 255, 0.22);
  border-radius: 10px;
  padding: 0 12px;
  color: #ecfbff;
  background: rgba(2, 13, 26, 0.55);
  outline: none;
}

.platform-table-wrap {
  border-color: rgba(124, 241, 255, 0.14);
}

.platform-table th {
  color: rgba(213, 243, 255, 0.62);
  background: rgba(2, 13, 26, 0.58);
}

.platform-table td {
  color: #e8fbff;
  border-color: rgba(124, 241, 255, 0.1);
}

.platform-table code {
  color: #73f6ff;
}

.platform-table .table-input {
  border-color: rgba(113, 223, 255, 0.2);
  color: #ecfbff;
  background: rgba(2, 13, 26, 0.48);
}

.platform-table .table-status {
  color: #041827;
  background: linear-gradient(135deg, #38f4ff, #31ffb6);
}

.platform-table .table-status.is-warning {
  background: #ffd166;
}

.platform-table .text-button {
  color: #73f6ff;
}

.platform-table small {
  display: block;
  margin-top: 6px;
  color: rgba(213, 243, 255, 0.44);
}

.editor-panel,
.preview-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.tabs {
  min-height: 54px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tab {
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  color: #475467;
  background: transparent;
  font-weight: 700;
}

.tab.active {
  color: var(--primary-dark);
  background: #eafaf1;
}

.tab-panel {
  display: none;
  padding: 22px;
}

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

.section-head {
  margin-bottom: 20px;
}

.section-head.inline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.field span {
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
}

.field textarea {
  resize: vertical;
  line-height: 1.6;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.check-field input {
  width: 16px;
  height: 16px;
}

.tip-box {
  padding: 12px 14px;
  border-radius: 8px;
  color: #175cd3;
  background: #eff6ff;
  font-size: 13px;
}

.item-list,
.tool-list {
  display: grid;
  gap: 10px;
}

.subsection-title {
  margin: 18px 0 10px;
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.component-heading {
  margin-top: 26px;
}

.panel-subhead {
  margin: 4px 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fbfcfe;
}

.panel-subhead strong,
.panel-subhead span {
  display: block;
}

.panel-subhead strong {
  margin-bottom: 4px;
  color: var(--text);
  font-size: 14px;
}

.panel-subhead span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

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

.mode-admin-item,
.recommend-admin-item,
.prompt-template-item,
.account-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px auto;
  align-items: center;
  gap: 12px;
  background: #fbfcfe;
}

.mode-admin-fields,
.recommend-admin-fields {
  display: grid;
  gap: 8px;
}

.mode-admin-fields {
  grid-template-columns: minmax(120px, 0.7fr) minmax(180px, 1.2fr) minmax(200px, 1.5fr);
}

.recommend-admin-fields {
  grid-template-columns: minmax(120px, 0.7fr) minmax(150px, 1fr) minmax(220px, 1.4fr);
}

.prompt-template-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px auto auto;
  align-items: center;
  gap: 12px;
}

.prompt-template-list,
.rank-list {
  display: grid;
  gap: 10px;
}

.prompt-template-fields,
.account-fields {
  display: grid;
  gap: 8px;
}

.prompt-template-fields {
  grid-template-columns: minmax(120px, 0.7fr) minmax(140px, 0.8fr) minmax(240px, 1.5fr);
}

.account-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
}

.account-fields {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.account-meta {
  grid-column: 1;
  color: var(--muted);
  font-size: 12px;
}

.mode-admin-fields input,
.mode-admin-fields textarea,
.recommend-admin-fields input,
.prompt-template-fields input,
.prompt-template-fields textarea,
.account-fields input,
.account-fields select,
.filter-row select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}

.mode-admin-fields input,
.recommend-admin-fields input,
.prompt-template-fields input,
.account-fields input,
.account-fields select,
.filter-row select {
  height: 34px;
}

.mode-admin-fields textarea,
.prompt-template-fields textarea {
  grid-column: 1 / -1;
  min-height: 68px;
  padding: 9px 10px;
  resize: vertical;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -6px 0 14px;
}

.list-item,
.tool-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fbfcfe;
}

.knowledge-editor {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.knowledge-fields {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(110px, 0.6fr) minmax(180px, 1fr) 42px auto;
  align-items: center;
  gap: 10px;
}

.knowledge-fields input,
.knowledge-content {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}

.knowledge-fields input {
  height: 34px;
}

.knowledge-content {
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.6;
}

.knowledge-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.knowledge-index-status {
  min-width: 180px;
  display: grid;
  gap: 4px;
}

.knowledge-index-pill {
  width: fit-content;
  padding: 2px 8px;
  border: 1px solid #b7d4ff;
  border-radius: 999px;
  background: #eef6ff;
  color: #1e5aa8;
  font-size: 12px;
  line-height: 1.5;
}

.knowledge-index-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.knowledge-index-error {
  color: #b42318;
  font-size: 12px;
}

.knowledge-hybrid-panel {
  display: grid;
  gap: 12px;
}

.knowledge-hybrid-controls input {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
}

.knowledge-hybrid-result {
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
  color: var(--muted);
  font-size: 13px;
}

.knowledge-hybrid-hit {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.knowledge-hybrid-hit:last-child {
  border-bottom: 0;
}

.knowledge-hybrid-hit-head,
.knowledge-score-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.knowledge-hybrid-hit-head {
  justify-content: space-between;
  color: var(--text);
}

.knowledge-hybrid-hit-head span,
.knowledge-score-grid span {
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef1f6;
  color: #4b5563;
  font-size: 12px;
}

.knowledge-citation {
  color: #526070;
  font-size: 12px;
}

.knowledge-hybrid-hit p {
  margin: 0;
  color: #273142;
  line-height: 1.6;
}

.rag-eval-template {
  display: grid;
  gap: 12px;
}

.rag-eval-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.rag-eval-item {
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
}

.rag-eval-item strong {
  color: var(--text);
  font-size: 14px;
}

.rag-eval-item span {
  color: #273142;
  font-size: 13px;
  line-height: 1.5;
}

.rag-eval-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

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

.risk-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.risk-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.risk-card h3 {
  margin: 0;
  font-size: 14px;
}

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

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

.risk-row.stacked {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 42px auto;
}

.risk-row input {
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}

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

.list-item span,
.tool-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.switch {
  position: relative;
  width: 42px;
  height: 24px;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e1;
}

.slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #fff;
  transition: 0.2s;
}

.switch input:checked + .slider {
  background: var(--primary);
}

.switch input:checked + .slider::before {
  transform: translateX(18px);
}

.publish-card {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.publish-card div {
  padding: 14px;
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.publish-card div:last-child {
  border-bottom: 0;
}

.publish-card strong {
  color: #344054;
  font-size: 13px;
}

.publish-card input {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}

.customer-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}

.data-table th {
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
}

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

.table-status {
  padding: 4px 8px;
  border-radius: 999px;
  color: #175cd3;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 800;
}

.table-input {
  width: 100%;
  min-width: 120px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 9px;
  background: #fff;
}

.text-button {
  border: 0;
  color: var(--primary-dark);
  background: transparent;
  font-weight: 900;
}

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

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
}

.rank-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.rank-item strong {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--primary);
  font-size: 12px;
}

.rank-item span {
  font-weight: 800;
}

.rank-item em,
.data-table small {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.usage-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.usage-card span,
.usage-card strong {
  display: block;
}

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

.usage-card strong {
  margin-top: 8px;
  font-size: 24px;
}

.token-chart {
  height: 260px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  background: #fbfcfe;
}

.token-bar {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  text-align: center;
}

.token-track {
  display: flex;
  align-items: flex-end;
  border-radius: 8px;
  overflow: hidden;
  background: #eef2f7;
}

.token-track span {
  width: 100%;
  border-radius: 8px 8px 0 0;
  background: var(--primary);
}

.token-bar em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.publish-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.preview-panel {
  padding: 18px;
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.status-dot {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: #eafaf1;
  font-size: 12px;
  font-weight: 800;
}

.phone {
  height: 650px;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, #d9c6f2 0%, #f4effb 38%, #fff 100%);
  border: 8px solid #111827;
}

.mini-home {
  padding: 0 14px 10px;
}

.mini-banner {
  height: 78px;
  padding: 14px;
  border-radius: 18px;
  display: flex;
  align-items: flex-end;
  color: #231b31;
  background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(217,198,242,0.72));
  box-shadow: 0 8px 18px rgba(84, 58, 126, 0.12);
  font-weight: 900;
}

.mini-components {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mini-component {
  min-height: 70px;
  padding: 10px;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 30px 1fr;
  column-gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255,255,255,0.86);
}

.mini-component i {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #8d60ca, #7446af);
  font-style: normal;
  font-weight: 900;
}

.mini-component strong,
.mini-component span {
  display: block;
  grid-column: 2;
}

.mini-component strong {
  font-size: 12px;
}

.mini-component span {
  margin-top: -12px;
  color: #7b6a8c;
  font-size: 10px;
}

.phone-top {
  padding: 26px 18px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.bot-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #8b5fcb, #a987df);
  font-weight: 900;
}

.phone-top strong,
.phone-top span {
  display: block;
}

.phone-top strong {
  font-size: 17px;
}

.phone-top span {
  margin-top: 4px;
  color: #6b5a7d;
  font-size: 12px;
}

.chat-window {
  flex: 1;
  padding: 14px;
  overflow: auto;
}

.message {
  max-width: 260px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 8px 18px 18px 18px;
  color: #241a32;
  background: rgba(255, 255, 255, 0.88);
  line-height: 1.55;
  font-size: 13px;
}

.message.user {
  margin-left: auto;
  border-radius: 18px 8px 18px 18px;
  color: #fff;
  background: linear-gradient(145deg, #8d60ca, #7446af);
}

.question-list {
  padding: 0 14px 10px;
  display: grid;
  gap: 8px;
}

.question-chip {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  color: #fff;
  background: linear-gradient(145deg, #8d60ca, #7446af);
  text-align: left;
  font-size: 12px;
}

.chat-input {
  padding: 12px;
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.74);
  border-top: 1px solid rgba(126, 85, 183, 0.12);
}

.chat-input input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
}

.chat-input button {
  width: 58px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--primary);
  font-weight: 800;
}

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  background: #111827;
  opacity: 0;
  transform: translateY(12px);
  transition: 0.2s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Platform console: white enterprise SaaS surface with deep-sea accents */
.console {
  background:
    radial-gradient(circle at 18% 0%, rgba(48, 94, 255, 0.1), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(0, 180, 216, 0.12), transparent 28%),
    linear-gradient(180deg, #f7faff 0%, #eef5ff 100%);
}

.sidebar {
  border-right: 1px solid rgba(24, 54, 93, 0.1);
  background: linear-gradient(180deg, #10243f 0%, #07182e 100%);
  box-shadow: 18px 0 44px rgba(8, 25, 47, 0.12);
}

.workspace {
  color: #132238;
}

.topbar {
  min-height: 72px;
  height: auto;
  padding: 10px 0 18px;
  color: #132238;
}

.topbar h1 {
  color: #132238;
}

.account-pill,
.top-search {
  height: 38px;
  border: 1px solid rgba(24, 54, 93, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
}

.account-pill {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: #31506f;
  font-size: 13px;
  font-weight: 800;
}

.top-search {
  width: 240px;
  padding: 0 15px;
  color: #132238;
  outline: none;
}

.platform-dashboard {
  color: #132238;
}

.platform-hero,
.platform-card,
.tenant-stat {
  border: 1px solid rgba(24, 54, 93, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 48px rgba(18, 46, 84, 0.09);
  backdrop-filter: blur(14px);
}

.platform-hero {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.92)),
    radial-gradient(circle at 92% 22%, rgba(76, 81, 255, 0.16), transparent 32%);
}

.platform-hero h2 {
  color: #10243f;
}

.platform-hero p,
.platform-card p {
  color: #64748b;
}

.platform-metrics {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
}

.tenant-stat {
  min-height: 118px;
}

.tenant-stat span {
  color: #64748b;
}

.tenant-stat strong {
  color: #10243f;
  font-size: 26px;
}

.tenant-stat em {
  color: #7b8aa0;
}

.tenant-stat.warning strong {
  color: #8a5a00;
}

.tenant-stat.danger strong {
  color: #c2415b;
}

.platform-grid {
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
}

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

.platform-card {
  border-radius: 20px;
}

.platform-chart-card .platform-trend {
  height: 280px;
}

.platform-bar-track {
  border-color: #dbe7f5;
  background: #edf4fb;
}

.platform-bar-track span {
  background: linear-gradient(180deg, #4f46e5, #05a6c9);
  box-shadow: none;
}

.platform-bar strong {
  color: #10243f;
}

.platform-bar em {
  color: #64748b;
}

.platform-status-list {
  display: grid;
  gap: 12px;
}

.status-row {
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #e3ecf6;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fbff;
}

.status-row span {
  color: #64748b;
  font-size: 13px;
}

.status-row strong {
  color: #10243f;
}

.platform-filters {
  grid-template-columns: minmax(280px, 1fr) 160px 160px;
}

.platform-filters input,
.platform-filters select,
.platform-table .table-input {
  border-color: #dbe7f5;
  color: #132238;
  background: #fff;
}

.platform-table-wrap {
  border-color: #e3ecf6;
  border-radius: 16px;
}

.platform-table th {
  color: #64748b;
  background: #f7faff;
}

.platform-table td {
  color: #132238;
  border-color: #edf2f7;
  vertical-align: top;
}

.platform-table code {
  color: #4f46e5;
}

.platform-table small {
  color: #718096;
}

.platform-table .table-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  white-space: nowrap;
  word-break: keep-all;
  color: #065f46;
  background: #dff8ef;
}

.platform-table .table-status.is-warning {
  color: #7c4a03;
  background: #fff3ce;
}

.plan-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  padding: 4px 9px;
  border-radius: 999px;
  color: #4338ca;
  background: #ecebff;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  word-break: keep-all;
}

.platform-table .text-button {
  margin: 0 6px 6px 0;
  color: #2856c8;
}

.platform-table .danger-action {
  color: #c2415b;
}

.module-actions,
.settings-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.settings-links {
  margin-top: 14px;
}

.settings-links a {
  padding: 9px 12px;
  border: 1px solid #dbe7f5;
  border-radius: 999px;
  color: #2856c8;
  background: #f8fbff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid #dbe7f5;
  border-radius: 999px;
  color: #2856c8;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.h5-delivery-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.h5-delivery-summary div {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e3ecf6;
  border-radius: 16px;
  background: #f8fbff;
}

.h5-delivery-summary span,
.h5-delivery-card label span,
.h5-card-head span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.h5-delivery-summary strong {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  color: #10243f;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.h5-delivery-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e3ecf6;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.h5-delivery-card.is-paused {
  background: #f8fafc;
  opacity: 0.72;
}

.h5-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.h5-card-head strong {
  display: block;
  color: #10243f;
  font-size: 16px;
}

.h5-card-head em {
  align-self: flex-start;
  padding: 5px 9px;
  border-radius: 999px;
  color: #2856c8;
  background: #eef4ff;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.h5-delivery-card.is-paused .h5-card-head em {
  color: #8a4b12;
  background: #fff7ed;
}

.h5-delivery-card label {
  display: grid;
  gap: 6px;
}

.h5-delivery-card input {
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #dbe7f5;
  border-radius: 12px;
  color: #475569;
  background: #fff;
  font-size: 12px;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(7, 24, 46, 0.38);
  backdrop-filter: blur(8px);
}

.tenant-modal,
.usage-drawer {
  border: 1px solid rgba(24, 54, 93, 0.1);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(8, 25, 47, 0.22);
}

.tenant-modal {
  width: min(760px, calc(100vw - 48px));
  padding: 24px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  color: #31506f;
  background: #edf4fb;
  font-size: 22px;
}

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

.modal-grid .wide {
  grid-column: 1 / -1;
}

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

.usage-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  width: 420px;
  height: 100vh;
  padding: 24px;
  border-radius: 22px 0 0 22px;
}

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

.drawer-stats div,
.drawer-list div {
  padding: 14px;
  border: 1px solid #e3ecf6;
  border-radius: 14px;
  background: #f8fbff;
}

.drawer-stats span,
.drawer-list span {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.drawer-stats strong,
.drawer-list strong {
  display: block;
  margin-top: 8px;
  color: #10243f;
}

.drawer-list {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

/* Customer standard template page */
.customer-template-mode .sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(24, 54, 93, 0.08);
  background: rgba(255, 255, 255, 0.96);
  color: #10243f;
  box-shadow: 18px 0 44px rgba(18, 46, 84, 0.08);
}

.customer-template-mode .customer-side-nav {
  margin-top: 24px;
  padding: 4px 0;
  display: grid;
  gap: 6px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.customer-template-mode .customer-side-nav.is-hidden {
  display: none;
}

.customer-template-mode .tenant-box {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  margin-top: auto;
  background: #f4f7fb;
  color: #10243f;
  box-shadow: inset 0 0 0 1px rgba(24, 54, 93, 0.08);
}

.customer-template-mode .tenant-box span {
  color: #64748b;
}

.customer-template-mode .tenant-box button {
  background: #e8eef7;
  color: #10243f;
}

.customer-template-mode .logo-row span {
  color: #64748b;
}

.customer-template-mode .editor-shell {
  display: block;
}

.customer-main,
.customer-card,
.customer-stat {
  border: 1px solid rgba(24, 54, 93, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 48px rgba(18, 46, 84, 0.08);
}

.customer-nav {
  height: 38px;
  border: 0;
  border-radius: 12px;
  padding: 0 12px;
  color: #31506f;
  background: transparent;
  text-align: left;
  font-weight: 900;
}

.customer-nav.active,
.customer-nav:hover {
  color: #fff;
  background: linear-gradient(135deg, #315cff, #08a4c8);
}

.customer-main {
  padding: 22px;
}

.customer-page-head {
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.customer-page-head h2 {
  color: #10243f;
  font-size: 24px;
}

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

.customer-stat {
  padding: 16px;
}

.customer-stat span,
.customer-stat strong {
  display: block;
}

.customer-stat span {
  color: #64748b;
  font-size: 12px;
}

.customer-stat strong {
  margin-top: 8px;
  color: #10243f;
  font-size: 22px;
}

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

.customer-grid.two {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.customer-card {
  padding: 18px;
}

.customer-card h3 {
  margin: 0 0 14px;
  color: #10243f;
}

.status-side {
  grid-row: span 2;
}

.mini-bars {
  height: 180px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.mini-bars div {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  text-align: center;
}

.mini-bars span {
  align-self: end;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, #315cff, #08a4c8);
}

.mini-bars em,
.mini-row span,
.material-card span,
.material-card em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.rank-line,
.mini-row,
.module-row {
  min-height: 42px;
  padding: 10px;
  border: 1px solid #e3ecf6;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fbff;
}

.mini-row,
.module-row {
  margin-top: 8px;
}

.empty-mini-row {
  justify-content: center;
  border-style: dashed;
  color: #64748b;
}

.module-row input {
  min-width: 0;
  flex: 1;
  height: 34px;
  border: 1px solid #dbe7f5;
  border-radius: 9px;
  padding: 0 9px;
}

.big-rate {
  color: #315cff;
  font-size: 54px;
  font-weight: 950;
}

.avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.avatar-upload-preview {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, #315cff, #08a4c8);
  font-weight: 950;
  box-shadow: 0 10px 24px rgba(49, 92, 255, 0.16);
}

.avatar-upload-preview img,
.miniapp-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.theme-card-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.theme-card-option {
  min-height: 58px;
  border: 1px solid #dbe7f5;
  border-radius: 16px;
  background: #fff;
  display: grid;
  place-items: center;
  gap: 4px;
  color: #31506f;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.theme-card-option i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(16, 36, 63, 0.08);
}

.theme-card-option.active {
  border-color: #315cff;
  box-shadow: 0 0 0 3px rgba(49, 92, 255, 0.12);
  color: #1d4ed8;
}

.prompt-config-box {
  padding: 18px;
  border: 1px solid #dbe7f5;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.prompt-config-textarea {
  width: 100%;
  min-height: 420px;
  border: 1px solid #e3ecf6;
  border-radius: 16px;
  padding: 18px;
  color: #10243f;
  background: #fff;
  resize: vertical;
  line-height: 1.75;
  font-weight: 800;
}

.prompt-config-textarea::placeholder {
  color: #94a3b8;
  font-weight: 800;
}

.miniapp-preview {
  width: min(100%, 390px);
  min-height: 640px;
  margin: 18px auto 0;
  border-radius: 36px;
  overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--preview-primary) 18%, #ffffff) 0%, #f7f4fc 36%, #ffffff 100%);
  border: 10px solid #10243f;
  box-shadow: 0 22px 54px rgba(16, 36, 63, 0.18);
  color: #20172d;
  display: flex;
  flex-direction: column;
}

.miniapp-topbar {
  padding: 34px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.miniapp-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.miniapp-brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--preview-primary), color-mix(in srgb, var(--preview-primary) 35%, #ffffff));
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--preview-primary) 22%, transparent);
}

.miniapp-brand strong,
.miniapp-brand span {
  display: block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.miniapp-brand strong {
  font-size: 18px;
  font-weight: 950;
}

.miniapp-brand span {
  margin-top: 3px;
  color: #6c617b;
  font-size: 12px;
  font-weight: 750;
}

.miniapp-settings {
  width: 42px;
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(92, 79, 112, 0.16);
}

.miniapp-settings i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--preview-primary);
}

.h5-decor-grid {
  display: grid;
  grid-template-columns: minmax(520px, 0.78fr) minmax(760px, 1.22fr);
  gap: 18px;
  align-items: start;
}

.h5-decor-editor,
.h5-preview-stack {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.h5-preview-stack > .customer-card {
  min-width: 0;
  overflow: hidden;
}

.h5-slot-editor {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px solid #e4edf8;
}

.h5-slot-editor h4 {
  margin: 0;
  color: #152238;
  font-size: 14px;
  font-weight: 950;
}

.h5-inherit-summary {
  margin: 12px 0 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.h5-inherit-summary div {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fbff, #f6f1fb);
  border: 1px solid #e4edf8;
}

.h5-inherit-summary span,
.h5-inherit-summary strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h5-inherit-summary span {
  color: #66758f;
  font-size: 12px;
  font-weight: 800;
}

.h5-inherit-summary strong {
  margin-top: 5px;
  color: #152238;
  font-size: 13px;
  font-weight: 950;
}

.h5-image-field {
  align-self: stretch;
}

.h5-image-preview {
  margin-top: 8px;
  display: grid;
  place-items: center;
  min-height: 96px;
  border-radius: 12px;
  border: 1px dashed #cbdaf0;
  background: #f8fbff;
  overflow: hidden;
}

.h5-image-preview img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.h5-image-preview em {
  color: #7b8ba3;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.h5-material-picker {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.h5-material-picker > span {
  color: #7b8ba3;
  font-size: 12px;
  font-weight: 800;
}

.h5-material-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #516078;
  font-size: 12px;
  font-weight: 900;
}

.h5-material-picker-head em {
  color: #8b98ad;
  font-style: normal;
  font-weight: 700;
}

.h5-material-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: 190px;
  overflow: auto;
  padding-right: 2px;
}

.h5-material-options button {
  min-width: 0;
  border: 1px solid #d7e3f4;
  border-radius: 10px;
  background: #ffffff;
  padding: 5px;
  display: grid;
  gap: 5px;
  color: #4c5d75;
  font-size: 11px;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}

.h5-material-options button.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 18%, transparent);
}

.h5-material-options img {
  width: 100%;
  aspect-ratio: 1.5 / 1;
  object-fit: cover;
  border-radius: 7px;
  background: #eef4fb;
}

.h5-material-options span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h5-live-preview {
  --primary: var(--preview-primary, #7652a8);
  --theme-color: var(--preview-primary, #7652a8);
  --soft-theme: color-mix(in srgb, var(--preview-primary, #7652a8) 12%, #ffffff);
  --primary-gradient: linear-gradient(145deg, color-mix(in srgb, var(--preview-primary, #7652a8) 86%, #ffffff), color-mix(in srgb, var(--preview-primary, #7652a8) 68%, #2dd4bf));
  --user-gradient: linear-gradient(145deg, color-mix(in srgb, var(--preview-primary, #7652a8) 86%, #ffffff), color-mix(in srgb, var(--preview-primary, #7652a8) 94%, #111827));
  --send-gradient: linear-gradient(135deg, #52d8d2 0%, var(--preview-primary, #7652a8) 100%);
  --page-bg: linear-gradient(180deg, color-mix(in srgb, var(--preview-primary, #7652a8) 18%, #ffffff) 0%, #f7f4fc 36%, #ffffff 100%);
  --text-main: #20172d;
  --text-body: #241a32;
  --text-muted: #6c617b;
  --line: #e8def3;
  --soft-bg: #fbf9fe;
  --premium-ink: #121826;
  --premium-body: #273244;
  --premium-muted: #697287;
  --premium-accent: var(--desktop-accent);
  --premium-accent-2: var(--desktop-accent-2);
  overflow: hidden;
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

.h5-live-preview *,
.h5-live-preview *::before,
.h5-live-preview *::after {
  box-sizing: border-box;
}

.h5-live-preview button,
.h5-live-preview textarea,
.h5-live-preview select,
.h5-live-preview input {
  font: inherit;
}

.h5-live-preview button {
  border: 0;
  cursor: default;
}

.h5-live-preview .is-hidden {
  display: none !important;
}

.h5-live-preview .webim-shell {
  width: min(100%, 460px);
  height: 560px;
  min-height: 560px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  position: relative;
  background: var(--page-bg);
  box-shadow: 0 18px 44px rgba(56, 36, 84, 0.12);
}

.h5-live-preview .webim-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.9), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 32%);
}

.h5-live-preview .webim-topbar {
  position: relative;
  z-index: 3;
  padding: 18px 15px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.h5-live-preview .brand {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
}

.h5-live-preview .brand-icon-wrap,
.h5-live-preview .brand-mark,
.h5-live-preview .brand-logo-image {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 14px;
}

.h5-live-preview .brand-icon-wrap {
  margin-right: 10px;
  position: relative;
}

.h5-live-preview .brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--primary-gradient);
  border: 1px solid rgba(92, 61, 145, 0.18);
  box-shadow: 0 4px 9px rgba(94, 61, 149, 0.18);
  font-size: 12px;
  font-weight: 900;
}

.h5-live-preview .brand-logo-image {
  object-fit: cover;
}

.h5-live-preview .brand-copy {
  min-width: 0;
  flex: 1;
}

.h5-live-preview .brand-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.h5-live-preview .brand-title {
  flex: 0 1 auto;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-main);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
}

.h5-live-preview .online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 7px;
  background: #34c982;
  box-shadow: 0 0 0 4px rgba(52, 201, 130, 0.14);
}

.h5-live-preview .brand-subtitle {
  max-width: 280px;
  margin: 3px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.35;
}

.h5-live-preview .view-switch {
  height: 34px;
  padding: 3px;
  border-radius: 999px;
  display: inline-flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(225, 216, 239, 0.9);
  box-shadow: 0 4px 10px rgba(86, 60, 124, 0.08);
}

.h5-live-preview .view-switch-button {
  min-width: 58px;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #776981;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.h5-live-preview .view-switch-button-active {
  color: #ffffff;
  background: linear-gradient(135deg, #3e8fdc 0%, var(--primary) 100%);
  box-shadow: 0 3px 8px rgba(82, 104, 188, 0.24);
}

.h5-live-preview .icon-button {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  flex: 0 0 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 4px 10px rgba(86, 60, 124, 0.1);
}

.h5-live-preview .settings-capsule {
  width: 54px;
}

.h5-live-preview .more-icon,
.h5-live-preview .more-icon::before,
.h5-live-preview .more-icon::after {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  display: block;
}

.h5-live-preview .more-icon {
  position: relative;
}

.h5-live-preview .more-icon::before,
.h5-live-preview .more-icon::after {
  content: "";
  position: absolute;
  top: 0;
}

.h5-live-preview .more-icon::before {
  left: -9px;
}

.h5-live-preview .more-icon::after {
  right: -9px;
}

.h5-live-preview .webim-layout {
  position: relative;
  z-index: 2;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.h5-live-preview .agent-panel,
.h5-live-preview .chat-panel,
.h5-live-preview .insight-panel {
  min-width: 0;
  min-height: 0;
}

.h5-live-preview .agent-panel {
  display: contents;
}

.h5-live-preview .chat-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.h5-live-preview .insight-panel {
  display: none;
}

.h5-live-preview .hero-banner,
.h5-live-preview .hero-card {
  margin: 0 12px 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 4px 9px rgba(84, 58, 126, 0.08);
}

.h5-live-preview .hero-banner {
  position: relative;
  overflow: hidden;
}

.h5-live-preview .hero-carousel {
  position: relative;
}

.h5-live-preview .banner-slide {
  min-height: 168px;
  padding: 16px;
}

.h5-live-preview .banner-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.h5-live-preview .hero-logo,
.h5-live-preview .hero-micro-copy {
  margin: 0;
}

.h5-live-preview .hero-logo {
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.h5-live-preview .hero-micro-copy {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.h5-live-preview .hero-badge {
  max-width: 136px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--primary);
  background: #f6f1fb;
  border: 1px solid #e4d8f1;
  font-size: 12px;
  font-weight: 700;
}

.h5-live-preview .mode-quick-row,
.h5-live-preview .quick-question-row {
  margin-top: 10px;
  display: flex;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
}

.h5-live-preview .mode-quick-chip,
.h5-live-preview .quick-question-chip {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  flex: 0 0 auto;
  color: var(--primary);
  background: #ffffff;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
}

.h5-live-preview .mode-quick-chip-active {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 0 0 2px var(--soft-theme);
}

.h5-live-preview .banner-opening {
  margin: 12px 0 0;
  color: #171020;
  font-size: 21px;
  line-height: 1.24;
  font-weight: 900;
}

.h5-live-preview .banner-opening-translation {
  margin: 5px 0 0;
  color: #7b7088;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
}

.h5-live-preview .hero-search {
  width: 100%;
  height: 38px;
  padding: 0 7px 0 10px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  color: #746883;
  background: var(--soft-bg);
  border: 1px solid #e6dcf1;
  font-size: 13px;
  text-align: left;
}

.h5-live-preview .hero-search span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h5-live-preview .hero-search-icon,
.h5-live-preview .search-icon,
.h5-live-preview .history-search-icon {
  position: relative;
  width: 13px;
  height: 13px;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
  flex: 0 0 13px;
}

.h5-live-preview .hero-search-icon::after,
.h5-live-preview .search-icon::after,
.h5-live-preview .history-search-icon::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -3px;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(45deg);
}

.h5-live-preview .hero-wave {
  width: 28px;
  height: 24px;
  margin-left: auto;
  border-radius: 10px;
  background: var(--primary-gradient);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
}

.h5-live-preview .hero-wave::before {
  content: "";
  width: 4px;
  height: 14px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: -7px 0 0 rgba(255, 255, 255, 0.86), 7px 0 0 rgba(255, 255, 255, 0.92);
}

.h5-live-preview .recommend-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.h5-live-preview .recommend-item {
  min-height: 54px;
  padding: 9px 10px;
  border-radius: 14px;
  background: var(--soft-bg);
  border: 1px solid var(--line);
  text-align: left;
}

.h5-live-preview .recommend-item-title,
.h5-live-preview .recommend-item-subtitle {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.h5-live-preview .recommend-item-title {
  color: color-mix(in srgb, var(--primary) 86%, #111827);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 900;
}

.h5-live-preview .recommend-item-subtitle {
  margin-top: 4px;
  color: #71647f;
  font-size: 11px;
  line-height: 1.25;
}

.h5-live-preview .hero-carousel-dots {
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.h5-live-preview .hero-carousel-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #d8cfe6;
}

.h5-live-preview .hero-carousel-dots span.is-active,
.h5-live-preview .hero-carousel-dots span:first-child {
  width: 18px;
  background: var(--primary);
}

.h5-live-preview .banner-toggle {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-width: 44px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #e4d8f1;
  font-size: 12px;
  font-weight: 900;
}

.h5-live-preview .announcement {
  margin-top: 0;
  padding: 10px;
  border-radius: 14px;
  display: grid;
  gap: 4px;
  background: #fff;
}

.h5-live-preview .announcement strong {
  color: #1b1326;
  font-size: 13px;
  line-height: 1.35;
}

.h5-live-preview .announcement span {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.h5-live-preview .chat {
  min-height: 0;
  overflow: auto;
  padding: 8px 12px 12px;
  background: transparent;
}

.h5-live-preview .message-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 14px;
}

.h5-live-preview .message-row-user {
  justify-content: flex-end;
}

.h5-live-preview .message-stack {
  max-width: 78%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.h5-live-preview .message-stack-user {
  align-items: flex-end;
}

.h5-live-preview .avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  flex: 0 0 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 11px;
  font-weight: 900;
}

.h5-live-preview .avatar-ai {
  margin-right: 8px;
  color: #ffffff;
  background: var(--primary-gradient);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 6px rgba(92, 58, 141, 0.14);
}

.h5-live-preview .avatar-user {
  margin-left: 8px;
  color: #ffffff;
  background: linear-gradient(145deg, #5fc7c2 0%, #2b97a1 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.h5-live-preview .bubble {
  max-width: 100%;
  padding: 11px 13px;
  font-size: 15px;
  line-height: 1.62;
  word-break: break-word;
  white-space: pre-wrap;
}

.h5-live-preview .bubble-user {
  color: #ffffff;
  background: var(--user-gradient);
  border-radius: 15px 5px 15px 15px;
  box-shadow: 0 4px 10px rgba(92, 58, 141, 0.18);
}

.h5-live-preview .bubble-ai {
  color: var(--text-body);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 5px 15px 15px 15px;
  box-shadow: 0 4px 10px rgba(75, 53, 110, 0.08);
}

.h5-live-preview .follow-up-questions {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.h5-live-preview .follow-up-questions button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.h5-live-preview .composer-panel {
  position: relative;
  z-index: 2;
  padding: 8px 11px 10px;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--line);
  box-shadow: 0 -2px 6px rgba(87, 59, 130, 0.06);
}

.h5-live-preview .tool-row {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.h5-live-preview .tool-chip,
.h5-live-preview .tool-button {
  min-width: 0;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  color: var(--primary);
  background: #ffffff;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 850;
}

.h5-live-preview .image-icon,
.h5-live-preview .file-button-icon {
  width: 13px;
  height: 13px;
  margin-right: 6px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.h5-live-preview .file-button-icon {
  border-radius: 3px;
}

.h5-live-preview .history-search-wrap {
  min-width: 118px;
  flex: 1 1 150px;
}

.h5-live-preview .history-search-box {
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  color: #6b5d78;
  background: #ffffff;
  border: 1px solid var(--line);
}

.h5-live-preview .history-search-box input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text-body);
  background: transparent;
  font-size: 12px;
}

.h5-live-preview .composer {
  min-height: 50px;
  padding: 0 6px 0 13px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.h5-live-preview .composer-input {
  min-width: 0;
  flex: 1;
  height: 24px;
  resize: none;
  border: 0;
  outline: 0;
  color: var(--text-body);
  background: transparent;
  font-size: 16px;
  line-height: 24px;
}

.h5-live-preview .send-button {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  flex: 0 0 38px;
  color: #ffffff;
  background: color-mix(in srgb, var(--primary) 28%, #cbd5e1);
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
}

.h5-live-preview .insight-card {
  padding: 15px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid #dfe8f3;
  box-shadow: none;
}

.h5-live-preview .insight-card + .insight-card {
  margin-top: 12px;
}

.h5-live-preview .insight-kicker {
  margin: 0 0 7px;
  color: var(--premium-accent);
  font-size: 11px;
  font-weight: 900;
}

.h5-live-preview .insight-card h2 {
  margin: 0;
  color: var(--premium-ink);
  font-size: 17px;
  line-height: 1.36;
}

.h5-live-preview .insight-copy {
  margin: 6px 0 0;
  color: var(--premium-muted);
  font-size: 13px;
  line-height: 1.55;
}

.h5-live-preview .enterprise-info-list {
  display: grid;
  gap: 0;
}

.h5-live-preview .enterprise-info-item {
  padding: 10px 0;
  border-top: 1px solid #dfe8f3;
}

.h5-live-preview .enterprise-info-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.h5-live-preview .enterprise-info-item span,
.h5-live-preview .enterprise-info-item strong {
  display: block;
}

.h5-live-preview .enterprise-info-item span {
  color: #77849a;
  font-size: 12px;
  font-weight: 750;
}

.h5-live-preview .enterprise-info-item strong {
  margin-top: 4px;
  color: #172033;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.h5-live-preview .desktop-showcase-card {
  margin-top: 12px;
  min-height: 220px;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid #dfe8f3;
  box-shadow: none;
}

.h5-live-preview .desktop-showcase-image {
  position: absolute;
  inset: 0;
  background-color: #f3f7fc;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.h5-live-preview .desktop-showcase-image[data-scale-mode="aspectFit"] {
  background-size: contain;
}

.h5-live-preview .desktop-showcase-image[data-scale-mode="widthFix"] {
  background-size: 100% auto;
}

.h5-live-preview .desktop-showcase-copy {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 12px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.58));
  backdrop-filter: blur(10px);
}

.h5-live-preview .desktop-showcase-copy strong,
.h5-live-preview .desktop-showcase-copy span {
  display: block;
}

.h5-live-preview .desktop-showcase-copy strong {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 900;
}

.h5-live-preview .desktop-showcase-copy span {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.h5-live-preview .desktop-qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.h5-live-preview .desktop-qr-card .insight-kicker {
  align-self: flex-start;
}

.h5-live-preview .desktop-qr-image {
  width: 154px;
  aspect-ratio: 1;
  margin: 4px auto 12px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: var(--premium-accent);
  background-color: #ffffff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border: 1px solid #dfe8f3;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.075);
  font-size: 18px;
  font-weight: 950;
}

.h5-live-preview .desktop-qr-card strong {
  color: var(--premium-ink);
  font-size: 15px;
  line-height: 1.36;
  font-weight: 900;
}

.h5-live-preview .desktop-qr-card span {
  margin-top: 6px;
  color: var(--premium-muted);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 750;
}

.h5-live-preview-mobile {
  display: flex;
  justify-content: center;
  padding: 16px 0 8px;
  overflow: auto;
}

.h5-live-preview-mobile .webim-shell {
  width: 460px;
  height: 820px;
  min-height: 820px;
  flex: 0 0 460px;
  border: 8px solid #12233f;
  border-radius: 30px;
}

.h5-live-preview-mobile .view-switch {
  display: none;
}

.h5-live-preview-desktop {
  padding-top: 12px;
  overflow: auto;
  overscroll-behavior: contain;
}

.h5-live-preview [data-view="desktop"] {
  width: 1440px;
  height: 900px;
  min-height: 900px;
  max-width: none;
  border-radius: 22px;
  color: #172033;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 255, 0.96)),
    #f6f8fc;
  border: 1px solid #e7edf7;
  box-shadow: 0 22px 60px rgba(22, 34, 66, 0.14);
}

.h5-live-preview [data-view="desktop"]::before {
  background:
    radial-gradient(circle at 74% 0%, rgba(92, 148, 255, 0.16), transparent 28%),
    radial-gradient(circle at 8% 18%, rgba(128, 92, 255, 0.12), transparent 24%);
}

.h5-live-preview [data-view="desktop"] .webim-topbar {
  height: 66px;
  padding: 0 20px;
  border-bottom: 1px solid #e9eef7;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.h5-live-preview [data-view="desktop"] .brand-icon-wrap,
.h5-live-preview [data-view="desktop"] .brand-mark,
.h5-live-preview [data-view="desktop"] .brand-logo-image {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 12px;
}

.h5-live-preview [data-view="desktop"] .brand-mark {
  background: linear-gradient(135deg, #2f7df6 0%, #7a5cff 100%);
  box-shadow: 0 8px 20px rgba(48, 112, 236, 0.2);
}

.h5-live-preview [data-view="desktop"] .brand-title {
  color: #121826;
  font-size: 16px;
  font-weight: 850;
}

.h5-live-preview [data-view="desktop"] .brand-subtitle {
  color: #77849a;
  font-size: 12px;
}

.h5-live-preview [data-view="desktop"] .view-switch {
  margin-left: auto;
  height: 36px;
  padding: 4px;
  background: #f3f6fb;
  border: 1px solid #e4eaf5;
  box-shadow: none;
}

.h5-live-preview [data-view="desktop"] .view-switch-button {
  min-width: 66px;
  height: 28px;
  color: #6f7b91;
}

.h5-live-preview [data-view="desktop"] .view-switch-button-active {
  color: #ffffff;
  background: #1f6fff;
  box-shadow: 0 8px 18px rgba(31, 111, 255, 0.22);
}

.h5-live-preview [data-view="desktop"] .icon-button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #2d65d8;
  background: #eef4ff;
  border-color: #dce8ff;
  box-shadow: none;
}

.h5-live-preview [data-view="desktop"] .webim-layout {
  grid-template-columns: 304px minmax(580px, 1fr) 288px;
  grid-template-rows: minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(247, 249, 252, 0.92), rgba(242, 246, 251, 0.98)),
    #f4f7fb;
}

.h5-live-preview [data-view="desktop"] .agent-panel,
.h5-live-preview [data-view="desktop"] .insight-panel,
.h5-live-preview [data-view="desktop"] .chat-panel {
  display: block;
  overflow: auto;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(219, 228, 240, 0.92);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.055);
}

.h5-live-preview [data-view="desktop"] .agent-panel,
.h5-live-preview [data-view="desktop"] .insight-panel {
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 253, 0.94)),
    #ffffff;
}

.h5-live-preview [data-view="desktop"] .hero-banner,
.h5-live-preview [data-view="desktop"] .hero-card {
  margin: 0;
  border-radius: 14px;
  background: #ffffff;
  border: 0;
  box-shadow: none;
}

.h5-live-preview [data-view="desktop"] .webim-hero {
  min-height: 178px;
  border: 1px solid rgba(219, 228, 240, 0.86);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.94), transparent 32%),
    linear-gradient(145deg, rgba(241, 247, 255, 0.96), rgba(246, 244, 255, 0.88));
}

.h5-live-preview [data-view="desktop"] .banner-slide {
  min-height: 160px;
  padding: 16px;
}

.h5-live-preview [data-view="desktop"] .hero-logo {
  color: var(--premium-accent);
  font-size: 12px;
}

.h5-live-preview [data-view="desktop"] .hero-micro-copy,
.h5-live-preview [data-view="desktop"] .banner-opening-translation {
  color: #6f7e96;
}

.h5-live-preview [data-view="desktop"] .hero-badge {
  color: #2369e8;
  background: #ffffff;
  border-color: #dbe8ff;
}

.h5-live-preview [data-view="desktop"] .banner-opening {
  color: #111827;
  font-size: 24px;
  line-height: 1.28;
}

.h5-live-preview [data-view="desktop"] .webim-start {
  margin-top: 10px;
}

.h5-live-preview [data-view="desktop"] .chat-panel {
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  background: rgba(255, 255, 255, 0.96);
  border-color: #dce6f2;
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.075);
}

.h5-live-preview [data-view="desktop"] .chat {
  padding: 26px 30px 24px;
  background:
    radial-gradient(circle at 86% 6%, rgba(99, 91, 255, 0.055), transparent 24%),
    linear-gradient(180deg, rgba(252, 253, 255, 0.98), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.h5-live-preview [data-view="desktop"] .message-row {
  margin-bottom: 18px;
}

.h5-live-preview [data-view="desktop"] .avatar {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  border-radius: 10px;
  font-size: 10px;
}

.h5-live-preview [data-view="desktop"] .message-stack {
  max-width: 70%;
}

.h5-live-preview [data-view="desktop"] .bubble {
  padding: 13px 15px;
  color: var(--premium-body);
  font-size: 14px;
  line-height: 1.72;
}

.h5-live-preview [data-view="desktop"] .bubble-ai {
  border-radius: 4px 14px 14px 14px;
  background: #ffffff;
  border: 1px solid #e4ebf5;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.055);
}

.h5-live-preview [data-view="desktop"] .bubble-user {
  color: #ffffff;
  border-radius: 14px 4px 14px 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 42%),
    linear-gradient(135deg, var(--premium-accent), var(--premium-accent-2));
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.22);
}

.h5-live-preview [data-view="desktop"] .composer-panel {
  padding: 12px 18px 16px;
  background:
    linear-gradient(180deg, rgba(248, 250, 253, 0.92), rgba(255, 255, 255, 0.98));
  border-top: 1px solid #e4ebf5;
}

.h5-live-preview [data-view="desktop"] .tool-row {
  gap: 7px;
  margin-bottom: 9px;
}

.h5-live-preview [data-view="desktop"] .tool-chip,
.h5-live-preview [data-view="desktop"] .tool-button {
  color: var(--premium-accent);
  background: rgba(255, 255, 255, 0.74);
  border-color: #d8e5f5;
  box-shadow: none;
}

.h5-live-preview [data-view="desktop"] .composer {
  min-height: 56px;
  border-radius: 14px;
  border-color: #d9e3f1;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.075);
}

.h5-live-preview [data-view="desktop"] .send-button {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #d5dbe7;
}

.h5-live-preview [data-theme="black"] {
  --text-main: #f6f2ff;
  --text-body: #eee8f8;
  --text-muted: #b9afc9;
  --page-bg: linear-gradient(180deg, #22202c 0%, #16141d 56%, #111018 100%);
}

.h5-live-preview [data-theme="black"] .webim-hero,
.h5-live-preview [data-theme="black"] .hero-card,
.h5-live-preview [data-theme="black"] .bubble-ai,
.h5-live-preview [data-theme="black"] .composer-panel,
.h5-live-preview [data-theme="black"] .composer,
.h5-live-preview [data-theme="black"] .insight-card {
  background: rgba(31, 28, 40, 0.94);
  border-color: rgba(118, 109, 138, 0.34);
}

.h5-mobile-preview {
  width: min(100%, 360px);
  min-height: 520px;
  margin: 16px auto 0;
  padding: 18px;
  border-radius: 30px;
  color: #172033;
  background: linear-gradient(180deg, color-mix(in srgb, var(--preview-primary) 16%, #ffffff), #ffffff 62%);
  border: 8px solid #12233f;
  box-shadow: 0 18px 42px rgba(18, 35, 63, 0.16);
}

.h5-preview-top {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.h5-preview-top strong {
  font-size: 18px;
  font-weight: 950;
}

.h5-preview-top span,
.h5-preview-hero small,
.h5-desktop-side span {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.h5-preview-hero {
  min-height: 180px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.h5-preview-hero p {
  margin: 18px 0 8px;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 900;
}

.h5-banner-preview {
  min-height: 150px;
  margin-top: 14px;
}

.h5-preview-composer {
  margin-top: 18px;
  padding: 13px 14px;
  border-radius: 16px;
  color: #64748b;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.32);
  font-weight: 850;
}

.h5-desktop-preview {
  min-height: 380px;
  margin-top: 16px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(120px, 0.72fr) minmax(180px, 1.4fr) minmax(130px, 0.78fr);
  gap: 12px;
  border-radius: 24px;
  color: #172033;
  background: linear-gradient(135deg, color-mix(in srgb, var(--preview-primary) 13%, #f8fbff), #f7f2ff);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.h5-desktop-side,
.h5-desktop-chat {
  min-width: 0;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.h5-desktop-side strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 950;
}

.h5-desktop-side p {
  margin: 16px 0 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 800;
}

.h5-desktop-side div {
  padding: 10px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.h5-desktop-side .h5-preview-media-slot,
.h5-desktop-side .h5-preview-qr-slot {
  margin-top: 14px;
  padding: 12px;
  min-height: 118px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eef5ff, #f8fbff);
  border: 1px solid rgba(37, 99, 235, 0.16);
}

.h5-preview-media-slot {
  display: flex;
  align-items: flex-end;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.h5-preview-media-slot.scale-aspectFit {
  background-size: contain;
}

.h5-preview-media-slot.scale-widthFix {
  background-size: 100% auto;
}

.h5-preview-media-slot.has-image {
  color: #ffffff;
  box-shadow: inset 0 -70px 70px rgba(15, 23, 42, 0.38);
}

.h5-preview-media-slot > div {
  width: 100%;
  padding: 34px 0 0;
  border: 0;
}

.h5-preview-media-slot b,
.h5-preview-qr-slot b {
  display: block;
  color: inherit;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 950;
}

.h5-preview-media-slot span,
.h5-preview-qr-slot span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.45;
}

.h5-preview-qr-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.h5-preview-qr-image {
  width: 82px;
  height: 82px;
  margin-bottom: 10px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #2563eb;
  background: #ffffff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border: 1px dashed rgba(37, 99, 235, 0.28);
  font-size: 18px;
  font-weight: 950;
}

.h5-preview-qr-image.has-image {
  border-style: solid;
}

.h5-desktop-side b {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.h5-desktop-chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.h5-preview-bubble {
  max-width: 76%;
  padding: 11px 13px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.h5-preview-bubble.user {
  align-self: flex-end;
  color: #fff;
  background: linear-gradient(135deg, var(--preview-primary), #2563eb);
}

.h5-preview-bubble.ai {
  align-self: flex-start;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.h5-preview-input {
  margin-top: auto;
  padding: 12px;
  border-radius: 14px;
  color: #64748b;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  font-size: 12px;
  font-weight: 850;
}

.carousel-workbench {
  margin-bottom: 18px;
}

.carousel-workbench-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

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

.carousel-slide-tab {
  min-height: 82px;
  padding: 12px;
  border: 1px solid #dde7f4;
  border-radius: 14px;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 4px 10px;
  text-align: left;
  background: #f8fbff;
  color: #12233f;
  cursor: pointer;
}

.carousel-slide-tab span {
  grid-row: span 2;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #e7eef9;
  color: #315cff;
  font-weight: 950;
}

.carousel-slide-tab strong,
.carousel-slide-tab small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.carousel-slide-tab strong {
  font-size: 14px;
  font-weight: 950;
}

.carousel-slide-tab small {
  color: #66758f;
  font-size: 12px;
  font-weight: 750;
}

.carousel-slide-tab.active {
  border-color: rgba(49, 92, 255, 0.34);
  background: linear-gradient(135deg, #edf4ff, #f4fbf7);
  box-shadow: 0 12px 28px rgba(39, 82, 165, 0.1);
}

.carousel-editor-panel {
  min-height: 520px;
  padding: 16px;
  border: 1px solid #dde7f4;
  border-radius: 16px;
  background: #ffffff;
}

.carousel-editor-head {
  margin-bottom: 14px;
}

.carousel-editor-head.with-action {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.carousel-editor-head h4 {
  margin: 0;
  color: #12233f;
  font-size: 17px;
  font-weight: 950;
}

.carousel-editor-head p {
  margin: 5px 0 0;
  color: #66758f;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 750;
}

.switch-row {
  min-height: 44px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #e4ebf5;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #12233f;
  background: #f8fbff;
  font-size: 13px;
  font-weight: 850;
}

.upload-row.compact {
  margin: -4px 0 12px;
}

.carousel-inline-list {
  display: grid;
  gap: 12px;
}

.carousel-inline-item {
  padding: 12px;
  border: 1px solid #e4ebf5;
  border-radius: 14px;
  background: #fbfdff;
}

.carousel-phone-preview {
  min-height: 520px;
  padding: 14px;
  border: 1px solid rgba(49, 92, 255, 0.16);
  border-radius: 28px;
  background: linear-gradient(180deg, #f7fbff, #f1f5f9);
  box-shadow: 0 18px 42px rgba(15, 35, 70, 0.12);
}

.carousel-phone-top {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.carousel-phone-top strong,
.carousel-phone-top span {
  display: block;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.carousel-phone-top strong {
  color: #12233f;
  font-size: 16px;
  font-weight: 950;
}

.carousel-phone-top span {
  margin-top: 3px;
  color: #66758f;
  font-size: 11px;
  font-weight: 750;
}

.carousel-phone-top em {
  padding: 5px 9px;
  border-radius: 999px;
  color: #0f766e;
  background: #dcfce7;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

.carousel-preview-stage {
  min-height: 370px;
  margin-top: 12px;
  padding: 16px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(15, 35, 70, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.preview-banner-image {
  min-height: 330px;
  border-radius: 22px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--preview-primary) 72%, #ffffff), #0f766e);
  background-size: cover;
  background-position: center;
}

.preview-banner-image > div {
  width: 100%;
  padding: 18px;
  color: #fff;
  background: linear-gradient(180deg, rgba(8, 18, 38, 0), rgba(8, 18, 38, 0.72));
}

.preview-banner-image strong,
.preview-banner-image span {
  display: block;
  overflow-wrap: anywhere;
}

.preview-banner-image strong {
  font-size: 22px;
  line-height: 1.18;
  font-weight: 950;
}

.preview-banner-image span {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 750;
}

.preview-banner-image button {
  margin-top: 12px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  color: #12233f;
  background: #ffffff;
  font-weight: 950;
}

.preview-mode-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.preview-mode-head span,
.preview-section-title {
  color: #66758f;
  font-size: 12px;
  font-weight: 850;
}

.preview-mode-head strong {
  display: block;
  margin-top: 5px;
  color: #12233f;
  font-size: 22px;
  font-weight: 950;
}

.preview-mode-head em {
  align-self: start;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--preview-primary);
  background: color-mix(in srgb, var(--preview-primary) 9%, #ffffff);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.preview-mode-subtitle {
  margin-top: 8px;
  color: #66758f;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
}

.preview-chip-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-chip-row span {
  padding: 8px 10px;
  border-radius: 999px;
  color: #42526b;
  background: #eef4fb;
  font-size: 12px;
  font-weight: 850;
}

.preview-chip-row span.active {
  color: #fff;
  background: linear-gradient(135deg, var(--preview-primary), #0f766e);
}

.carousel-preview-mode p {
  margin: 20px 0 0;
  color: #12233f;
  font-size: 17px;
  line-height: 1.55;
  font-weight: 900;
}

.carousel-preview-mode small {
  display: block;
  margin-top: 12px;
  color: #66758f;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 750;
}

.preview-search {
  min-height: 48px;
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  color: #66758f;
  background: #f4f8fc;
  border: 1px solid #e2eaf4;
  font-size: 13px;
  font-weight: 850;
}

.preview-stats {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.preview-stats b {
  min-height: 62px;
  padding: 10px;
  border-radius: 16px;
  display: grid;
  align-content: center;
  color: #12233f;
  background: #f8fbff;
  font-size: 17px;
  font-weight: 950;
}

.preview-stats small {
  margin-top: 4px;
  color: #66758f;
  font-size: 10px;
  font-weight: 750;
}

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

.preview-rec-grid div {
  min-height: 88px;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(145deg, #ffffff, #eff6ff);
  border: 1px solid #dbe8f7;
}

.preview-rec-grid strong,
.preview-rec-grid span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-rec-grid strong {
  color: #12233f;
  font-size: 14px;
  font-weight: 950;
  white-space: nowrap;
}

.preview-rec-grid span {
  margin-top: 7px;
  color: #66758f;
  font-size: 12px;
  line-height: 1.35;
}

.carousel-preview-dots {
  height: 28px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 6px;
}

.carousel-preview-dots i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--preview-primary) 22%, white);
}

.carousel-preview-dots i.active {
  width: 18px;
  background: var(--preview-primary);
}

@media (max-width: 1500px) {
  .h5-decor-grid {
    grid-template-columns: 1fr;
  }

  .h5-preview-stack {
    max-width: 100%;
  }
}

@media (max-width: 1280px) {
  .h5-desktop-preview {
    grid-template-columns: 1fr;
  }

  .carousel-workbench-grid {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .carousel-workbench-grid [data-carousel-preview-shell] {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .carousel-workbench-grid {
    grid-template-columns: 1fr;
  }

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

.miniapp-hero,
.miniapp-recommend,
.miniapp-chat {
  margin: 0 14px 12px;
  border: 1px solid rgba(124, 85, 181, 0.13);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 26px rgba(89, 64, 131, 0.08);
}

.miniapp-hero {
  padding: 16px;
}

.miniapp-hero-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.miniapp-hero-head span,
.miniapp-section-title,
.miniapp-composer-panel small {
  color: #7a6f88;
  font-size: 12px;
  font-weight: 850;
}

.miniapp-hero-head strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  font-weight: 950;
}

.miniapp-hero-head em {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--preview-primary);
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--preview-primary) 16%, #ffffff);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.miniapp-mode-row {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  overflow: hidden;
}

.miniapp-mode-row span {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: #5d526e;
  background: #f5f1fb;
  font-size: 12px;
  font-weight: 850;
}

.miniapp-mode-row .active {
  color: #fff;
  background: linear-gradient(135deg, var(--preview-primary), #08a4c8);
}

.miniapp-hero p {
  margin: 14px 0 0;
  color: #342a42;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 850;
}

.miniapp-recommend {
  padding: 14px;
}

.miniapp-recommend-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.miniapp-recommend-grid div {
  min-height: 58px;
  padding: 10px;
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff, color-mix(in srgb, var(--preview-primary) 8%, #ffffff));
  border: 1px solid rgba(124, 85, 181, 0.1);
}

.miniapp-recommend-grid strong,
.miniapp-recommend-grid span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.miniapp-recommend-grid strong {
  color: #2c203a;
  font-size: 13px;
  font-weight: 950;
}

.miniapp-recommend-grid span {
  margin-top: 5px;
  color: #7a6f88;
  font-size: 11px;
  font-weight: 750;
}

.miniapp-chat {
  flex: 1;
  padding: 10px 12px;
  display: grid;
  align-content: start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.52);
}

.miniapp-message {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.miniapp-message b {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--preview-primary);
  color: #fff;
  font-size: 11px;
}

.miniapp-message p {
  max-width: 240px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 16px;
  color: #2d2438;
  background: #fff;
  box-shadow: 0 6px 16px rgba(89, 64, 131, 0.08);
  font-size: 13px;
  line-height: 1.45;
}

.miniapp-message.user {
  justify-content: flex-end;
}

.miniapp-message.user p {
  color: #fff;
  background: linear-gradient(135deg, var(--preview-primary), #08a4c8);
}

.miniapp-message.user b {
  background: #efe8f8;
  color: #4a3c5b;
}

.miniapp-composer-panel {
  padding: 8px 14px 16px;
  background: rgba(255, 255, 255, 0.84);
  border-top: 1px solid rgba(124, 85, 181, 0.08);
}

.miniapp-tools {
  min-height: 24px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.miniapp-tools span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #5b4a70;
  background: #f6f0fb;
  font-size: 11px;
  font-weight: 850;
}

.miniapp-composer {
  margin-top: 8px;
  min-height: 46px;
  padding: 8px 8px 8px 14px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid rgba(124, 85, 181, 0.12);
}

.miniapp-composer span {
  min-width: 0;
  flex: 1;
  color: #8a8096;
  font-size: 13px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.miniapp-composer button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--preview-primary);
  font-size: 18px;
  font-weight: 950;
}

.miniapp-composer-panel small {
  display: block;
  margin-top: 8px;
  text-align: center;
}

.upload-row,
.material-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.drop-zone {
  margin-bottom: 14px;
  padding: 28px;
  border: 1px dashed #9bb4d3;
  border-radius: 18px;
  color: #31506f;
  background: #f8fbff;
  text-align: center;
  font-weight: 900;
}

.drop-zone.is-dragging {
  border-color: #12b981;
  background: #ecfdf5;
  color: #047857;
  box-shadow: inset 0 0 0 2px rgba(18, 185, 129, 0.16);
}

.muted-action {
  color: #64748b;
  font-weight: 900;
}

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

.material-card {
  padding: 14px;
  border: 1px solid #e3ecf6;
  border-radius: 16px;
  background: #fff;
}

.material-card.is-hidden,
.empty-state.is-hidden {
  display: none;
}

.material-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.material-tabs .ghost-button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #315cff, #08a4c8);
}

.add-group-button {
  border-style: dashed;
}

.material-card strong,
.material-card span,
.material-card em {
  display: block;
  margin-top: 8px;
}

.material-thumb {
  height: 112px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #315cff, #7c3aed);
  font-weight: 950;
  font-size: 22px;
  overflow: hidden;
}

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

.material-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 120px;
  border: 1px dashed #b8cff1;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #64748b;
  font-weight: 900;
  background: #f8fbff;
}

.material-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
}

.material-preview-modal.show {
  display: flex;
}

.admin-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.44);
}

.admin-detail-modal.show {
  display: flex;
}

.admin-detail-panel {
  width: min(860px, 92vw);
  max-height: 86vh;
  overflow: auto;
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

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

.detail-row-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-row-list div,
.chat-session-item,
.detail-section,
.detail-table {
  border: 1px solid #e3ecf6;
  border-radius: 14px;
  background: #f8fbff;
}

.detail-row-list div {
  padding: 12px;
}

.detail-row-list span,
.chat-session-item span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.detail-row-list strong {
  display: block;
  margin-top: 6px;
  color: #10243f;
}

.detail-section {
  padding: 14px;
}

.detail-section h4 {
  margin: 0 0 10px;
  color: #10243f;
}

.detail-section p {
  margin: 8px 0 0;
  color: #334155;
  line-height: 1.7;
}

.chat-session-detail {
  display: grid;
  gap: 10px;
}

.chat-session-item {
  padding: 12px;
}

.chat-session-item p {
  margin: 7px 0 0;
  color: #10243f;
  line-height: 1.7;
}

.chat-session-item.is-user {
  background: #eef6ff;
}

.detail-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.detail-table th,
.detail-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #e3ecf6;
  color: #10243f;
  text-align: left;
  vertical-align: top;
}

.detail-table th {
  color: #475569;
  background: #eef6ff;
  font-size: 12px;
}

.material-preview-panel {
  width: min(720px, 92vw);
  max-height: 86vh;
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.material-preview-body {
  min-height: 280px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f5f8fc;
}

.material-preview-body img {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  display: block;
}

@media (max-width: 1400px) {
  .customer-stats,
  .material-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
