:root {
  --navy: #313695;
  --navy-rgb: 49, 54, 149;
  --royal: #3b44ad;
  --royal-rgb: 59, 68, 173;
  --whatsapp: #25d366;
  --whatsapp-rgb: 37, 211, 102;
  --whatsapp-deep: #128c7e;
  --royal-deep: #353ba8;
  --gold: #d39961;
  --gold-rgb: 211, 153, 97;
  --gold-deep: #ae6d32;
  --gold-soft: rgba(211, 153, 97, 0.16);
  --cream: #d9cfbf;
  --paper: #d6def6;
  --sky: #cfd8f5;
  --ink: #231f31;
  --ink-soft: #655f76;
  --surface-blue: rgba(208, 218, 250, 0.84);
  --surface-warm: rgba(229, 214, 191, 0.84);
  --surface-deep: #1f255e;
  --surface-deep-rgb: 31, 37, 94;
  --border: rgba(var(--navy-rgb), 0.12);
  --shadow: 0 28px 90px rgba(var(--navy-rgb), 0.12);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(var(--royal-rgb), 0.48), transparent 28%),
    radial-gradient(circle at top right, rgba(var(--gold-rgb), 0.34), transparent 30%),
    linear-gradient(180deg, #182150 0%, #25327b 15%, #c8cfe9 15%, #dcd2c3 58%, #b5a492 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.18;
  pointer-events: none;
  z-index: -1;
}

body.admin-dashboard-body {
  background:
    radial-gradient(circle at top left, rgba(75, 88, 210, 0.28), transparent 28%),
    linear-gradient(180deg, #0e1437 0%, #171f52 100%);
  color: #e8ecff;
}

body.admin-dashboard-body::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.14;
}

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

img {
  max-width: 100%;
  display: block;
}

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

.page-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
}

.admin-page-main {
  width: 100%;
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: rgba(var(--surface-deep-rgb), 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-bar,
.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
}

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

.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(var(--royal-rgb), 0.24);
  box-shadow: 0 10px 30px rgba(var(--royal-rgb), 0.15);
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-title,
.hero h1,
.section-heading h1,
.section-heading h2,
.chat-topbar h3,
.featured-card h3,
.knowledge-card h3,
.hero-panel h2 {
  font-family: "Cormorant Garamond", serif;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
}

.brand-subtitle {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  flex-wrap: wrap;
}

.site-nav a,
.nav-auth {
  transition: color var(--transition);
}

.site-nav a:hover,
.nav-auth:hover {
  color: var(--royal);
}

.inline-form {
  margin: 0;
}

.nav-auth {
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.82);
}

.glass-card {
  background:
    linear-gradient(180deg, rgba(232, 237, 252, 0.9), rgba(215, 223, 245, 0.82)),
    linear-gradient(135deg, var(--surface-blue), var(--surface-warm));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(18px);
}

.hero,
.admin-grid,
.chat-layout,
.knowledge-section,
.insight-strip,
.admin-hero {
  margin-top: 28px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  padding-top: 24px;
}

.hero-copy,
.hero-panel,
.admin-hero,
.form-card,
.table-card,
.insight-strip {
  padding: 28px;
}

.hero-copy {
  position: relative;
  overflow: hidden;
}

.hero-copy,
.hero-panel,
.service-card,
.knowledge-card,
.featured-card,
.rail-card,
.detail-card,
.stat-card {
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.service-card:hover,
.knowledge-card:hover,
.featured-card:hover,
.rail-card:hover,
.detail-card:hover,
.admin-metric-card:hover,
.admin-panel-card:hover,
.admin-editor-card:hover,
.admin-table-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 34px 90px rgba(var(--surface-deep-rgb), 0.18);
}

.hero-copy::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -60px;
  top: -60px;
  border-radius: 50%;
  border: 18px solid rgba(var(--royal-rgb), 0.08);
}

.hero-copy::before,
.hero-panel::before,
.service-card::before,
.knowledge-card::before,
.featured-card::before,
.rail-card::before,
.insight-strip::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 0;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(var(--royal-rgb), 0.92), rgba(var(--gold-rgb), 0.85));
}

.hero-copy,
.hero-panel,
.service-card,
.knowledge-card,
.featured-card,
.rail-card,
.insight-strip {
  position: relative;
}

.service-card,
.knowledge-card,
.featured-card,
.rail-card,
.insight-strip {
  background:
    linear-gradient(180deg, rgba(235, 226, 210, 0.9), rgba(212, 222, 248, 0.84)),
    linear-gradient(135deg, rgba(var(--gold-rgb), 0.06), rgba(var(--royal-rgb), 0.08));
}

.eyebrow,
.panel-tag {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--royal);
  margin: 0 0 14px;
}

.hero h1,
.section-heading h1,
.section-heading h2,
.hero-panel h2 {
  margin: 0 0 12px;
  font-size: clamp(2.2rem, 4.5vw, 4.3rem);
  line-height: 0.95;
}

.section-heading h1,
.section-heading h2,
.hero-panel h2,
.chat-topbar h3 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.lead,
.section-heading p,
.hero-panel p,
.knowledge-card p,
.featured-card p,
.site-footer p {
  color: var(--ink-soft);
  line-height: 1.7;
}

.hero-copy {
  background:
    linear-gradient(155deg, rgba(var(--surface-deep-rgb), 0.97), rgba(var(--royal-rgb), 0.92)),
    radial-gradient(circle at top right, rgba(var(--gold-rgb), 0.18), transparent 42%);
  color: #ffffff;
}

.hero-copy .lead,
.hero-copy .eyebrow {
  color: rgba(255, 255, 255, 0.84);
}

.hero-copy h1 {
  color: #ffffff;
}

.hero-copy .feature-band span {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
}

.hero-copy .button-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
}

.hero-panel {
  background:
    linear-gradient(180deg, rgba(233, 220, 198, 0.92), rgba(211, 221, 248, 0.86)),
    linear-gradient(135deg, rgba(var(--gold-rgb), 0.1), rgba(var(--royal-rgb), 0.07));
}

.hero-actions,
.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.button,
.table-button,
.chip {
  border: 0;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background var(--transition),
    color var(--transition);
}

.button {
  padding: 14px 22px;
  font-weight: 700;
}

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

.button-primary {
  background: linear-gradient(135deg, var(--royal), var(--navy));
  color: #ffffff;
  box-shadow: 0 16px 36px rgba(var(--royal-rgb), 0.28);
}

.button-secondary {
  background: linear-gradient(180deg, rgba(231, 225, 212, 0.94), rgba(220, 228, 248, 0.92));
  color: var(--navy);
  border: 1px solid rgba(var(--gold-rgb), 0.24);
}

.feature-band {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.feature-band span,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(235, 240, 255, 0.82);
  border: 1px solid rgba(var(--navy-rgb), 0.1);
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 700;
}

.status-pill {
  background: var(--gold-soft);
}

.detail-stack,
.mini-stack {
  display: grid;
  gap: 14px;
}

.detail-card,
.resource-item,
.identity-card,
.notice-card,
.error-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(var(--navy-rgb), 0.12);
  background: linear-gradient(180deg, rgba(223, 230, 251, 0.84), rgba(233, 220, 195, 0.74));
}

.resource-item {
  display: grid;
  gap: 6px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.resource-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(var(--navy-rgb), 0.08);
}

.resource-item strong,
.detail-card strong,
.identity-card strong {
  color: var(--navy);
}

.resource-item span,
.resource-item small,
.identity-card small {
  color: var(--ink-soft);
}

.resource-item.static:hover {
  transform: none;
  box-shadow: none;
}

.bullet-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
  line-height: 1.65;
}

.service-hub {
  margin-top: 28px;
}

.service-grid,
.admin-overview-grid,
.chat-stage,
.auth-grid {
  display: grid;
  gap: 22px;
}

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

.service-card,
.rail-card {
  padding: 24px;
}

.chat-stage {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.6fr);
  align-items: start;
}

.assistant-rail {
  display: grid;
  gap: 18px;
}

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

.stat-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(var(--royal-rgb), 0.16), rgba(236, 224, 202, 0.82));
  border: 1px solid rgba(var(--royal-rgb), 0.12);
}

.stat-card strong {
  display: block;
  font-size: 1.7rem;
  margin-bottom: 8px;
  color: var(--navy);
}

.stat-card span {
  color: var(--ink-soft);
}

.featured-questions {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(var(--navy-rgb), 0.08);
}

.featured-questions h3 {
  margin: 0 0 14px;
  font-size: 1.1rem;
}

.featured-questions ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: var(--ink-soft);
}

.section-heading {
  margin-bottom: 18px;
  max-width: 820px;
}

.section-heading.compact {
  margin-bottom: 12px;
}

.chat-shell {
  padding: 22px;
  min-height: 680px;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 242, 251, 0.92)),
    linear-gradient(135deg, rgba(var(--royal-rgb), 0.02), rgba(var(--gold-rgb), 0.02));
}

.floating-chat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: grid;
  justify-items: end;
  gap: 16px;
  z-index: 45;
}

.chat-launcher-stack {
  display: grid;
  justify-items: end;
  transition:
    opacity var(--transition),
    transform var(--transition);
}

.chat-launcher-stack.is-hidden {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.chat-dock {
  position: relative;
  width: 68px;
  height: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  border-radius: 50%;
  overflow: visible;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 241, 250, 0.98));
  box-shadow:
    0 20px 40px rgba(var(--surface-deep-rgb), 0.22),
    0 8px 18px rgba(90, 118, 178, 0.14);
  transition:
    background var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
  animation: launcherBob 3.4s ease-in-out infinite;
}

.chat-dock:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow:
    0 24px 48px rgba(var(--surface-deep-rgb), 0.28),
    0 10px 22px rgba(90, 118, 178, 0.18);
}

.chat-dock.is-bot {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(230, 239, 255, 0.99));
  box-shadow:
    0 24px 54px rgba(var(--surface-deep-rgb), 0.28),
    0 12px 24px rgba(52, 82, 189, 0.2);
}

.chat-launcher-prompt {
  position: absolute;
  right: 84px;
  top: 50%;
  padding: 12px 16px;
  border-radius: 22px;
  background: rgba(var(--surface-deep-rgb), 0.96);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow:
    0 20px 44px rgba(var(--surface-deep-rgb), 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translate(10px, -50%);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.chat-launcher-prompt::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: rgba(var(--surface-deep-rgb), 0.96);
  transform: translateY(-50%) rotate(45deg);
}

.chat-dock.is-bot .chat-launcher-prompt {
  opacity: 1;
  transform: translate(0, -50%);
}

.chat-launcher-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(117, 143, 193, 0.28);
  box-shadow: 0 0 0 8px rgba(117, 143, 193, 0.08);
  animation: launcherRingPulse 2.9s ease-in-out infinite;
}

.chat-dock-badge,
.chat-avatar {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-dock-badge {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 14px 28px rgba(var(--surface-deep-rgb), 0.18),
    0 6px 14px rgba(var(--gold-rgb), 0.16);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.assistant-bot {
  --bot-shell-top: #f7fafc;
  --bot-shell-mid: #bfcce4;
  --bot-shell-bottom: #8b9fc3;
  --bot-accent: #83d8ff;
  --bot-accent-rgb: 131, 216, 255;
  --bot-shadow: rgba(19, 28, 62, 0.34);
  --bot-face-top: #162247;
  --bot-face-bottom: #0f1734;
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: center bottom;
}

.assistant-bot-shadow,
.assistant-bot-antenna,
.assistant-bot-helmet,
.assistant-bot-glow,
.assistant-bot-ear,
.assistant-bot-face,
.assistant-bot-brow,
.assistant-bot-eyes,
.assistant-bot-eye,
.assistant-bot-mouth,
.assistant-bot-neck,
.assistant-bot-shoulder {
  position: absolute;
  display: block;
}

.assistant-bot-shadow {
  left: 18%;
  right: 18%;
  bottom: 4%;
  height: 14%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(9, 13, 30, 0.28) 0%, rgba(9, 13, 30, 0) 72%);
  filter: blur(2px);
}

.assistant-bot-antenna {
  top: 5%;
  left: 50%;
  width: 10%;
  height: 22%;
  transform: translateX(-50%);
}

.assistant-bot-antenna::before,
.assistant-bot-antenna::after {
  content: "";
  position: absolute;
}

.assistant-bot-antenna::before {
  left: 50%;
  bottom: 0;
  width: 20%;
  height: 68%;
  border-radius: 999px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #8ca2c7, #eef6ff);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.assistant-bot-antenna::after {
  left: 50%;
  top: 0;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 35% 30%, #ffffff 0%, #c7efff 28%, #71cfff 64%, #2f80ff 100%);
  box-shadow:
    0 0 10px rgba(var(--bot-accent-rgb), 0.85),
    0 0 24px rgba(var(--bot-accent-rgb), 0.45);
}

.assistant-bot-helmet {
  inset: 15% 10% 10%;
  border-radius: 32% 32% 28% 28% / 28% 28% 34% 34%;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.38) 18%, transparent 35%),
    linear-gradient(180deg, var(--bot-shell-top) 0%, var(--bot-shell-mid) 46%, var(--bot-shell-bottom) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -8px 18px rgba(71, 93, 138, 0.35),
    0 16px 32px rgba(15, 21, 47, 0.28);
  animation: botFloat 5.2s ease-in-out infinite;
}

.assistant-bot-glow {
  inset: 6% 8% auto;
  height: 20%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(var(--bot-accent-rgb), 0.85), rgba(var(--bot-accent-rgb), 0));
  opacity: 0.58;
  filter: blur(4px);
}

.assistant-bot-ear {
  top: 38%;
  width: 14%;
  height: 22%;
  border-radius: 999px;
  background:
    linear-gradient(180deg, #dfe9f8, #95a9c8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 6px 10px rgba(16, 22, 51, 0.16);
}

.assistant-bot-ear--left {
  left: -6%;
}

.assistant-bot-ear--right {
  right: -6%;
}

.assistant-bot-face {
  left: 15%;
  right: 15%;
  top: 26%;
  bottom: 20%;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(147, 228, 255, 0.22), transparent 44%),
    linear-gradient(180deg, var(--bot-face-top) 0%, var(--bot-face-bottom) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -10px 14px rgba(0, 0, 0, 0.24);
}

.assistant-bot-face::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 12%, rgba(255, 255, 255, 0.22) 32%, transparent 54%);
  opacity: 0.8;
}

.assistant-bot-brow {
  left: 19%;
  right: 19%;
  top: 16%;
  height: 14%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(138, 237, 255, 0.22), rgba(138, 237, 255, 0));
}

.assistant-bot-eyes {
  left: 18%;
  right: 18%;
  top: 34%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.assistant-bot-eye {
  position: relative;
  width: 26%;
  aspect-ratio: 1.45;
  border-radius: 999px;
  background:
    radial-gradient(circle at 40% 40%, #ffffff 0%, #a7ecff 28%, #79d6ff 55%, rgba(70, 120, 238, 0.88) 100%);
  box-shadow:
    0 0 10px rgba(var(--bot-accent-rgb), 0.8),
    0 0 16px rgba(var(--bot-accent-rgb), 0.42);
  animation: botBlink 6.8s ease-in-out infinite;
}

.assistant-bot-eye::after {
  content: "";
  position: absolute;
  top: 18%;
  left: 22%;
  width: 18%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
}

.assistant-bot-mouth {
  left: 31%;
  right: 31%;
  bottom: 18%;
  height: 10%;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(195, 245, 255, 0.92), rgba(97, 214, 255, 0.78) 55%, rgba(57, 148, 255, 0.65) 100%);
  box-shadow: 0 0 12px rgba(var(--bot-accent-rgb), 0.48);
  transform-origin: center;
}

.assistant-bot-neck {
  left: 40%;
  right: 40%;
  bottom: -3%;
  height: 11%;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(180deg, #eaf2fb, #93a6c7);
  box-shadow: inset 0 -1px 0 rgba(24, 38, 68, 0.18);
}

.assistant-bot-shoulder {
  bottom: -5%;
  width: 30%;
  height: 18%;
  border-radius: 999px 999px 18px 18px;
  background: linear-gradient(180deg, #cbd6ea, #8fa2c3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.assistant-bot-shoulder--left {
  left: 12%;
  transform: rotate(8deg);
}

.assistant-bot-shoulder--right {
  right: 12%;
  transform: rotate(-8deg);
}

.assistant-bot--badge {
  --bot-shell-top: #fefefe;
  --bot-shell-mid: #d1daf0;
  --bot-shell-bottom: #90a6d9;
}

.assistant-bot--badge .assistant-bot-shadow,
.assistant-bot--badge .assistant-bot-shoulder {
  display: none;
}

.assistant-bot--badge .assistant-bot-helmet {
  inset: 13% 11% 8%;
}

.assistant-bot--badge .assistant-bot-face {
  left: 17%;
  right: 17%;
  top: 28%;
  bottom: 18%;
}

.assistant-bot--badge .assistant-bot-ear {
  top: 39%;
  width: 12%;
  height: 20%;
}

.assistant-bot[data-bot-state="speaking"] .assistant-bot-helmet {
  animation-duration: 1.9s;
}

.assistant-bot[data-bot-state="speaking"] .assistant-bot-mouth {
  animation: botTalk 0.9s ease-in-out infinite;
}

.assistant-bot[data-bot-state="speaking"] .assistant-bot-glow,
.chat-dock.is-bot .assistant-bot--badge .assistant-bot-glow {
  opacity: 0.95;
  filter: blur(6px);
}

.assistant-bot[data-bot-state="speaking"] .assistant-bot-eye,
.chat-dock.is-bot .assistant-bot--badge .assistant-bot-eye {
  box-shadow:
    0 0 12px rgba(var(--bot-accent-rgb), 1),
    0 0 22px rgba(var(--bot-accent-rgb), 0.56);
}

.chat-dock-badge svg {
  width: 58%;
  height: 58%;
}

.chat-dock-badge-message {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.chat-dock-badge-bot {
  opacity: 0;
  transform: scale(0.72) rotate(-10deg);
  background: linear-gradient(135deg, rgb(72, 107, 220), rgb(42, 67, 157));
}

.chat-dock-badge-bot .assistant-bot {
  width: 78%;
  height: 78%;
}

.chat-dock.is-bot .chat-dock-badge-message {
  opacity: 0;
  transform: scale(0.72) rotate(10deg);
}

.chat-dock.is-bot .chat-dock-badge-bot {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.chat-avatar {
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 18px rgba(0, 0, 0, 0.16);
}

.chat-avatar .assistant-bot {
  transform: scale(1.02);
}

.chat-widget {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(460px, calc(100vw - 16px));
}

.chat-widget[hidden] {
  display: none !important;
}

.chat-widget.is-open {
  animation: widgetIn 220ms ease;
}

.compact-chat-shell {
  position: relative;
  min-height: min(620px, calc(100vh - 24px));
  height: min(88vh, 720px);
  max-height: calc(100vh - 24px);
  width: 100%;
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow:
    0 32px 90px rgba(var(--surface-deep-rgb), 0.3),
    0 8px 24px rgba(var(--surface-deep-rgb), 0.16);
  background:
    linear-gradient(180deg, rgba(17, 22, 58, 0.98) 0%, rgba(17, 22, 58, 0.98) 23%, rgba(229, 234, 250, 0.97) 23%, rgba(235, 224, 205, 0.96) 100%);
}

.compact-chat-shell .chat-messages {
  min-height: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.34));
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 8px 10px 16px 4px;
}

.chat-window-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-window-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  padding: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition:
    background var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

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

.chat-window-button[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.chat-window-button:hover {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.14);
}

.chat-window-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14);
}

.chat-window-button.is-close:hover {
  background: rgba(255, 95, 95, 0.22);
}

.suggestion-empty {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.5;
}

.chat-topbar {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-topbar h3 {
  margin: 0;
  font-size: clamp(1.12rem, 2vw, 1.32rem);
  line-height: 1.14;
  color: #ffffff;
}

.chat-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.chat-settings-panel {
  position: absolute;
  top: 76px;
  right: 16px;
  z-index: 20;
  width: min(320px, calc(100vw - 40px));
}

.chat-settings-panel[hidden] {
  display: none !important;
}

.chat-settings-card {
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 255, 0.94));
  border: 1px solid rgba(var(--navy-rgb), 0.12);
  box-shadow:
    0 22px 48px rgba(var(--surface-deep-rgb), 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.chat-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.chat-settings-row + .chat-settings-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(var(--navy-rgb), 0.08);
}

.chat-settings-title {
  margin: 0;
  color: var(--surface-deep);
  font-weight: 800;
}

.chat-settings-meta,
.chat-settings-note {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.5;
}

.chat-settings-note {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid rgba(var(--navy-rgb), 0.08);
}

.chat-settings-action {
  flex: none;
  min-width: 96px;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--royal), var(--navy));
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow:
    0 14px 26px rgba(var(--royal-rgb), 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    opacity var(--transition);
}

.chat-settings-action:hover {
  transform: translateY(-1px);
  box-shadow:
    0 16px 30px rgba(var(--royal-rgb), 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.chat-settings-action:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(var(--royal-rgb), 0.16),
    0 16px 30px rgba(var(--royal-rgb), 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.chat-settings-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.chat-toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.chat-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chat-toggle-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 56px;
  height: 32px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(var(--surface-deep-rgb), 0.16);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
  transition:
    background var(--transition),
    box-shadow var(--transition);
}

.chat-toggle-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(var(--surface-deep-rgb), 0.18);
  transition: transform var(--transition);
}

.chat-toggle input:checked + .chat-toggle-track {
  background: linear-gradient(145deg, var(--whatsapp), var(--whatsapp-deep));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 10px 24px rgba(var(--whatsapp-rgb), 0.24);
}

.chat-toggle input:checked + .chat-toggle-track .chat-toggle-thumb {
  transform: translateX(24px);
}

.chat-toggle input:focus-visible + .chat-toggle-track {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(var(--whatsapp-rgb), 0.16),
    inset 0 1px 3px rgba(0, 0, 0, 0.12);
}

.chat-toggle input:disabled + .chat-toggle-track {
  opacity: 0.52;
  cursor: not-allowed;
}

.chat-body-shell {
  flex: 1 1 auto;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.chat-subline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  line-height: 1.45;
}

.chat-status-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: #78d691;
  box-shadow: 0 0 0 5px rgba(120, 214, 145, 0.14);
}

.chat-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 0;
  min-height: 150px;
  padding: 4px 6px 18px 0;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--royal-rgb), 0.35) transparent;
}

.chat-messages::-webkit-scrollbar {
  width: 10px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(var(--royal-rgb), 0.26);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.message {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  line-height: 1.65;
  box-shadow: none;
  animation: rise 240ms ease;
}

.message.user {
  align-items: flex-end;
}

.message.bot {
  align-items: flex-start;
}

.message.first-message {
  align-items: flex-start;
}

.message.typing {
  animation: none;
}

.message-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-inline: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(var(--surface-deep-rgb), 0.52);
}

.message-bubble {
  width: fit-content;
  max-width: min(100%, 82%);
  padding: 14px 16px;
  border-radius: 22px;
  box-shadow: 0 14px 32px rgba(var(--surface-deep-rgb), 0.1);
  word-break: break-word;
}

.message-content {
  white-space: pre-wrap;
  font-size: 0.97rem;
  line-height: 1.72;
}

.message-content.is-speaking {
  color: rgba(var(--surface-deep-rgb), 0.92);
}

.spoken-token {
  display: inline;
  border-radius: 0.45em;
  padding: 0.02em 0.08em;
  transition:
    background-color 120ms ease,
    box-shadow 120ms ease,
    color 120ms ease;
}

.spoken-token.is-spoken {
  background: linear-gradient(180deg, rgba(var(--gold-rgb), 0.2), rgba(var(--gold-rgb), 0.1));
  box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb), 0.18);
  color: rgba(var(--surface-deep-rgb), 0.9);
}

.spoken-token.is-active {
  background: linear-gradient(180deg, rgba(var(--gold-rgb), 0.5), rgba(var(--gold-rgb), 0.26));
  box-shadow:
    0 0 0 1px rgba(var(--gold-rgb), 0.28),
    0 10px 22px rgba(var(--gold-rgb), 0.16);
  color: var(--surface-deep);
  font-weight: 700;
}

.message-content a {
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.message.bot .message-content a {
  color: var(--navy);
}

.message.user .message-content a {
  color: rgba(255, 255, 255, 0.94);
}

.message.user .message-bubble {
  background: linear-gradient(135deg, rgba(var(--royal-rgb), 0.98), rgba(var(--surface-deep-rgb), 0.95));
  color: #ffffff;
  border-bottom-right-radius: 10px;
}

.message.bot .message-bubble {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 232, 214, 0.88));
  border: 1px solid rgba(var(--gold-rgb), 0.14);
  border-bottom-left-radius: 10px;
  color: var(--ink);
}

.message.first-message .message-bubble {
  max-width: 100%;
  background: rgba(var(--surface-deep-rgb), 0.05);
  border: 1px dashed rgba(var(--royal-rgb), 0.22);
  color: var(--navy);
  box-shadow: none;
}

.message.typing .message-bubble {
  width: auto;
  max-width: 170px;
  padding: 12px 16px;
}

.message.is-streaming .message-content::after {
  content: "";
  display: inline-block;
  width: 0.55ch;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: text-bottom;
  border-radius: 999px;
  background: rgba(var(--royal-rgb), 0.78);
  animation: caretBlink 1s steps(1, end) infinite;
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.typing-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(var(--royal-rgb), 0.45);
  animation: pulse 900ms infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
  animation-delay: 120ms;
}

.typing-dots span:nth-child(3) {
  animation-delay: 240ms;
}

.message-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.message-meta span,
.message-meta a {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-soft);
  background: rgba(var(--surface-deep-rgb), 0.06);
  padding: 6px 10px;
  border-radius: 999px;
}

.message.user .message-meta span,
.message.user .message-meta a {
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.14);
}

.suggestion-area {
  padding-top: 0;
  overflow: hidden;
}

.suggestion-label {
  margin: 0 0 10px;
  color: rgba(var(--surface-deep-rgb), 0.7);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.chip-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.chip {
  flex: none;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--navy);
  font-weight: 700;
  border: 1px solid rgba(var(--royal-rgb), 0.12);
  box-shadow: 0 8px 20px rgba(var(--surface-deep-rgb), 0.08);
}

.suggestion-area-top {
  margin-top: 0;
  padding: 0 0 2px;
  border-top: 0;
}

.composer-panel {
  flex: none;
  margin-top: 0;
  padding: 10px 12px 12px;
  border-radius: 20px 20px 28px 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 245, 252, 0.96)),
    radial-gradient(circle at top right, rgba(var(--whatsapp-rgb), 0.1), transparent 42%);
  border-top: 1px solid rgba(var(--surface-deep-rgb), 0.1);
  box-shadow: 0 -12px 28px rgba(var(--surface-deep-rgb), 0.08);
}

.chat-form {
  display: block;
}

.chat-input-shell {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-height: 58px;
  padding: 6px 6px 6px 10px;
  border: 1px solid rgba(var(--navy-rgb), 0.12);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 253, 0.96)),
    radial-gradient(circle at bottom left, rgba(var(--royal-rgb), 0.08), transparent 42%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 24px rgba(var(--surface-deep-rgb), 0.08);
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.chat-input-shell:focus-within {
  border-color: rgba(var(--whatsapp-rgb), 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 4px rgba(var(--whatsapp-rgb), 0.14),
    0 18px 36px rgba(var(--surface-deep-rgb), 0.12);
}

.chat-form.has-draft .chat-input-shell {
  border-color: rgba(var(--whatsapp-rgb), 0.22);
}

.chat-input-accent {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  flex: none;
  align-self: center;
  color: var(--whatsapp-deep);
  background: linear-gradient(180deg, rgba(var(--whatsapp-rgb), 0.18), rgba(var(--whatsapp-rgb), 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.chat-input-accent svg {
  width: 18px;
  height: 18px;
}

.chat-form textarea {
  min-width: 0;
  resize: none;
  overflow-y: auto;
  flex: 1 1 auto;
}

#messageInput {
  min-height: 44px;
  max-height: 144px;
  padding: 10px 0 8px 0;
  border: 0;
  border-radius: 0;
  line-height: 1.45;
  font-size: 0.98rem;
  background: transparent;
  box-shadow: none;
}

#messageInput:focus {
  border-color: transparent;
  box-shadow: none;
}

.chat-send-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 50%;
  align-self: flex-end;
  flex: none;
  background: linear-gradient(145deg, var(--whatsapp), var(--whatsapp-deep));
  box-shadow:
    0 16px 30px rgba(var(--whatsapp-rgb), 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.chat-voice-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  align-self: flex-end;
  flex: none;
  color: var(--surface-deep);
  background:
    linear-gradient(180deg, rgba(var(--royal-rgb), 0.1), rgba(var(--royal-rgb), 0.18));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 10px 22px rgba(var(--surface-deep-rgb), 0.08);
  cursor: pointer;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background var(--transition),
    color var(--transition);
}

.chat-voice-button:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 14px 24px rgba(var(--surface-deep-rgb), 0.12);
}

.chat-voice-button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(var(--royal-rgb), 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 14px 24px rgba(var(--surface-deep-rgb), 0.12);
}

.chat-voice-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}

.chat-voice-button[data-state="listening"] {
  color: #ffffff;
  background: linear-gradient(145deg, #ff7b54, #d64933);
  box-shadow:
    0 16px 30px rgba(214, 73, 51, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.chat-voice-button[data-state="listening"] .chat-voice-button-icon {
  animation: pulse 900ms infinite ease-in-out;
}

.chat-voice-button-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

.chat-voice-button-icon svg {
  width: 100%;
  height: 100%;
}

.chat-send-button:hover {
  box-shadow:
    0 18px 34px rgba(var(--whatsapp-rgb), 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.chat-send-button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(var(--whatsapp-rgb), 0.18),
    0 16px 30px rgba(var(--whatsapp-rgb), 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.chat-send-button:disabled {
  cursor: not-allowed;
  transform: none;
  background: linear-gradient(145deg, rgba(var(--surface-deep-rgb), 0.18), rgba(var(--surface-deep-rgb), 0.3));
  box-shadow: none;
}

.chat-send-button[data-state="busy"] {
  background: linear-gradient(145deg, var(--royal), var(--navy));
  box-shadow:
    0 18px 34px rgba(var(--royal-rgb), 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.chat-send-button[data-state="busy"]:disabled {
  cursor: progress;
  opacity: 1;
}

.chat-send-button[data-state="busy"] .chat-send-button-icon {
  animation: pulse 900ms infinite ease-in-out;
}

.chat-send-button-icon {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
}

.chat-send-button-icon svg {
  width: 100%;
  height: 100%;
}

textarea,
input[type="text"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="number"] {
  width: 100%;
  border: 1px solid rgba(var(--navy-rgb), 0.18);
  border-radius: 18px;
  padding: 14px 16px;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.95);
  transition: border-color var(--transition), box-shadow var(--transition);
}

textarea:focus,
input:focus {
  outline: none;
  border-color: rgba(var(--royal-rgb), 0.42);
  box-shadow: 0 0 0 4px rgba(var(--royal-rgb), 0.12);
}

textarea {
  resize: vertical;
  min-height: 60px;
  max-height: 180px;
}

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

.knowledge-card,
.featured-card {
  position: relative;
  padding: 24px;
  overflow: hidden;
}

.knowledge-card::after,
.featured-card::after {
  content: "";
  position: absolute;
  inset: auto -20px -35px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--royal-rgb), 0.12), transparent 70%);
}

.card-counter {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--royal);
  font-weight: 800;
}

.knowledge-card h3,
.featured-card h3 {
  margin: 0 0 10px;
  font-size: 1.9rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  margin-top: 18px;
  border-top: 1px solid rgba(var(--navy-rgb), 0.08);
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.card-footer a {
  color: var(--royal);
  font-weight: 700;
}

.insight-strip {
  margin-bottom: 40px;
}

.featured-card small {
  display: inline-block;
  margin-top: 16px;
  color: var(--ink-soft);
}

.admin-console {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
}

.admin-console.is-sidebar-collapsed {
  grid-template-columns: 92px minmax(0, 1fr);
}

.admin-console-sidebar {
  position: sticky;
  top: 0;
  display: grid;
  align-content: start;
  gap: 22px;
  min-height: 100vh;
  padding: 22px 14px 22px;
  background:
    linear-gradient(180deg, rgba(46, 56, 142, 0.98), rgba(28, 34, 95, 0.99)),
    radial-gradient(circle at top right, rgba(var(--gold-rgb), 0.14), transparent 30%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 18px 0 42px rgba(5, 8, 28, 0.16);
  z-index: 3;
}

.admin-console.is-sidebar-collapsed .admin-console-sidebar {
  padding-inline: 10px;
}

.admin-brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px 16px;
}

.admin-brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 26px rgba(8, 10, 34, 0.24);
  background: rgba(255, 255, 255, 0.1);
}

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

.admin-brand-copy {
  display: grid;
  gap: 4px;
}

.admin-brand-copy strong {
  font-size: 1.22rem;
  color: #ffffff;
}

.admin-brand-copy span {
  color: rgba(233, 238, 255, 0.74);
  font-size: 0.9rem;
}

.admin-console.is-sidebar-collapsed .admin-brand-block {
  justify-content: center;
  padding-inline: 0;
}

.admin-console.is-sidebar-collapsed .admin-brand-copy {
  display: none;
}

.admin-operator-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 18px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.admin-avatar-badge {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(9, 21, 66, 0.9), rgba(20, 33, 88, 0.98));
  box-shadow: 0 10px 20px rgba(7, 13, 36, 0.28);
}

.admin-operator-summary strong {
  display: block;
  color: #ffffff;
  font-size: 1.06rem;
}

.admin-operator-summary span,
.admin-operator-summary small {
  display: block;
  color: rgba(235, 239, 255, 0.78);
}

.admin-console.is-sidebar-collapsed .admin-operator-summary {
  grid-template-columns: 1fr;
  justify-items: center;
  padding-inline: 8px;
}

.admin-console.is-sidebar-collapsed .admin-operator-summary > div:last-child {
  display: none;
}

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

.admin-menu a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px;
  border-radius: 18px;
  color: rgba(240, 243, 255, 0.92);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.admin-menu a:hover,
.admin-menu a:focus-visible {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
}

.admin-menu a.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(var(--gold-rgb), 0.92), rgba(191, 141, 76, 0.9));
  box-shadow: 0 16px 28px rgba(38, 24, 8, 0.22);
}

.admin-menu-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.admin-menu a.is-active .admin-menu-icon {
  background: rgba(255, 255, 255, 0.18);
}

.admin-menu-icon svg {
  width: 17px;
  height: 17px;
}

.admin-console.is-sidebar-collapsed .admin-menu a {
  justify-content: center;
  padding-inline: 0;
}

.admin-console.is-sidebar-collapsed .admin-menu a > span:last-child {
  display: none;
}

.admin-console-main {
  min-width: 0;
  padding: 18px 18px 22px;
}

.admin-topbar {
  position: sticky;
  top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(60, 70, 167, 0.98), rgba(52, 61, 150, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 38px rgba(8, 11, 36, 0.18);
  backdrop-filter: blur(14px);
  z-index: 2;
}

.admin-topbar-left,
.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-icon-button {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  cursor: pointer;
}

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

.admin-time-chip,
.admin-action-pill,
.admin-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.admin-time-chip {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  border-radius: 16px;
}

.admin-time-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(231, 236, 255, 0.72);
}

.admin-time-chip strong {
  font-size: 0.96rem;
  line-height: 1.2;
}

.admin-action-pill {
  font-weight: 700;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

.admin-action-pill:hover,
.admin-action-pill:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.22);
}

.admin-action-pill.is-gold {
  background: linear-gradient(135deg, rgba(var(--gold-rgb), 0.96), rgba(188, 139, 74, 0.95));
  color: #1f2243;
  border-color: rgba(255, 255, 255, 0.18);
}

.admin-topbar-form {
  margin: 0;
}

.admin-user-pill {
  font-weight: 700;
}

.admin-user-pill-mark {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(6, 19, 65, 0.72);
}

.admin-surface {
  margin-top: 16px;
  padding: 22px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(237, 241, 255, 0.98), rgba(228, 234, 250, 0.98));
  border: 1px solid rgba(166, 179, 227, 0.42);
  box-shadow: 0 30px 60px rgba(7, 12, 40, 0.16);
  color: var(--ink);
}

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

.admin-surface-kicker {
  margin: 0 0 8px;
  font-weight: 800;
  color: var(--royal);
}

.admin-surface-head h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1.02;
}

.admin-surface-head p {
  margin: 0;
  max-width: 72ch;
  color: #61739a;
  line-height: 1.72;
}

.admin-metric-grid,
.admin-work-grid {
  display: grid;
  gap: 18px;
}

.admin-metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-metric-card,
.admin-panel-card,
.admin-editor-card,
.admin-table-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(170, 182, 229, 0.5);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 255, 0.98));
  box-shadow: 0 18px 36px rgba(23, 34, 92, 0.08);
}

.admin-metric-card {
  padding: 18px 18px 16px;
}

.admin-metric-card span {
  display: block;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6c7c9f;
}

.admin-metric-card strong {
  display: block;
  margin: 14px 0 8px;
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1;
  color: #20264b;
}

.admin-metric-card small {
  color: #7282a6;
  line-height: 1.5;
}

.admin-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.admin-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.admin-shortcut-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(170, 182, 229, 0.5);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 255, 0.98));
  box-shadow: 0 18px 36px rgba(23, 34, 92, 0.08);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.admin-shortcut-card:hover,
.admin-shortcut-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(var(--gold-rgb), 0.28);
  box-shadow: 0 22px 40px rgba(22, 33, 93, 0.12);
}

.admin-shortcut-label {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7685ab;
}

.admin-shortcut-card strong {
  color: #20264b;
  font-size: 1.18rem;
  line-height: 1.25;
}

.admin-shortcut-card p {
  margin: 0;
  color: #6f7fa4;
  line-height: 1.65;
}

.admin-panel-card,
.admin-editor-card,
.admin-table-card {
  padding: 22px;
}

.admin-work-grid {
  grid-template-columns: 360px minmax(0, 1fr);
  margin-top: 18px;
}

.admin-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  gap: 18px;
  margin-top: 18px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 22px;
  margin-bottom: 42px;
}

.admin-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.identity-card {
  min-width: 220px;
}

.activity-list,
.intent-bars {
  display: grid;
  gap: 12px;
}

.activity-item {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(239, 242, 251, 0.9);
  border: 1px solid rgba(171, 184, 227, 0.34);
}

.activity-item strong {
  color: var(--navy);
  font-size: 0.88rem;
}

.activity-item p,
.empty-state {
  margin: 8px 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.intent-row {
  display: grid;
  gap: 8px;
}

.intent-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.intent-copy strong {
  color: var(--navy);
}

.intent-copy span {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.intent-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(var(--navy-rgb), 0.08);
  overflow: hidden;
}

.intent-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--gold), var(--royal-deep));
}

.admin-form {
  display: grid;
  gap: 12px;
}

.admin-form label {
  font-size: 0.92rem;
  font-weight: 700;
}

.form-row {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 12px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.form-status {
  min-height: 24px;
  margin: 0;
  font-size: 0.92rem;
  color: var(--royal);
}

.table-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.table-wrap {
  overflow: auto;
  border-radius: 22px;
  border: 1px solid rgba(var(--navy-rgb), 0.08);
}

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

th,
td {
  text-align: left;
  padding: 16px;
  border-bottom: 1px solid rgba(var(--navy-rgb), 0.08);
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  background: rgba(241, 242, 251, 0.96);
  color: var(--navy);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.actions-cell {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table-button {
  padding: 10px 14px;
  background: rgba(var(--royal-rgb), 0.1);
  color: var(--navy);
  font-weight: 700;
}

.table-button.muted {
  background: rgba(var(--navy-rgb), 0.06);
  color: var(--ink-soft);
}

.site-footer {
  margin-top: 42px;
  padding: 28px 0 20px;
  background:
    linear-gradient(160deg, rgba(var(--surface-deep-rgb), 0.97), rgba(var(--royal-rgb), 0.92)),
    radial-gradient(circle at top right, rgba(var(--gold-rgb), 0.2), transparent 36%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #f4f5ff;
}

.footer-bar {
  align-items: stretch;
  gap: 28px;
  padding: 0 0 22px;
}

.footer-brand-block {
  flex: 1.2;
  min-width: 0;
  padding: 24px 26px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 42px rgba(10, 14, 42, 0.22);
}

.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: inherit;
  text-decoration: none;
}

.footer-brand-logo {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 14px 30px rgba(8, 10, 32, 0.28);
}

.footer-kicker {
  display: block;
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.footer-title {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.05;
  color: #ffffff;
}

.footer-copy {
  margin: 18px 0 0;
  max-width: 58ch;
  font-size: 0.96rem;
  color: rgba(255, 255, 255, 0.82);
}

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

.footer-card {
  padding: 22px 22px 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 38px rgba(10, 14, 42, 0.18);
}

.footer-heading {
  display: block;
  margin-bottom: 12px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.68);
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a,
.footer-links span {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  margin: 0;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.72);
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(var(--gold-rgb), 0.18);
  border: 1px solid rgba(var(--gold-rgb), 0.32);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.84rem;
  font-weight: 700;
}

@media (max-width: 1280px) {
  .admin-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .admin-panel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .admin-console {
    grid-template-columns: 1fr;
  }

  .admin-console.is-sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .admin-console-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(82vw, 290px);
    transform: translateX(-108%);
    transition: transform 180ms ease;
  }

  .admin-console.is-sidebar-open .admin-console-sidebar {
    transform: translateX(0);
  }

  .admin-console-main {
    padding: 12px;
  }

  .admin-editor-layout,
  .admin-work-grid {
    grid-template-columns: 1fr;
  }
}

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

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

@keyframes pulse {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  50% {
    transform: translateY(-2px);
    opacity: 1;
  }
}

@keyframes launcherBob {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  35% {
    transform: translateY(-4px) scale(1.02);
  }
  65% {
    transform: translateY(0) scale(1);
  }
}

@keyframes launcherRingPulse {
  0%,
  100% {
    box-shadow: 0 0 0 8px rgba(117, 143, 193, 0.08);
    opacity: 0.8;
  }
  50% {
    box-shadow: 0 0 0 14px rgba(117, 143, 193, 0.04);
    opacity: 1;
  }
}

@keyframes caretBlink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@keyframes botFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-3px) rotate(-1.25deg);
  }
}

@keyframes botBlink {
  0%,
  44%,
  52%,
  100% {
    transform: scaleY(1);
  }
  48%,
  50% {
    transform: scaleY(0.18);
  }
}

@keyframes botTalk {
  0%,
  100% {
    transform: scaleX(1) scaleY(0.7);
    opacity: 0.84;
  }
  25% {
    transform: scaleX(0.92) scaleY(1.7);
    opacity: 1;
  }
  50% {
    transform: scaleX(1.08) scaleY(0.95);
    opacity: 0.92;
  }
  75% {
    transform: scaleX(0.88) scaleY(1.45);
    opacity: 1;
  }
}

.auth-shell {
  min-height: calc(100vh - 220px);
  display: grid;
  place-items: center;
  padding: 28px 0 40px;
}

.auth-grid {
  width: min(1040px, 100%);
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
}

.auth-copy,
.auth-panel {
  padding: 30px;
}

.auth-input-group {
  position: relative;
}

.auth-input-group input.auth-input {
  padding-left: 52px;
}

.auth-input-group input.auth-input-password {
  padding-right: 56px;
}

.auth-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(var(--royal-rgb), 0.82);
  pointer-events: none;
}

.auth-input-icon svg {
  width: 100%;
  height: 100%;
}

.auth-input-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(var(--royal-rgb), 0.78);
  cursor: pointer;
  transition:
    color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
}

.auth-input-toggle:hover {
  background: rgba(var(--royal-rgb), 0.08);
  color: var(--royal);
}

.auth-input-toggle:focus-visible {
  outline: none;
  background: rgba(var(--royal-rgb), 0.1);
  box-shadow: 0 0 0 4px rgba(var(--royal-rgb), 0.12);
}

.auth-input-toggle svg {
  width: 18px;
  height: 18px;
}

.auth-input-toggle-closed {
  display: none;
}

.auth-input-toggle.is-active .auth-input-toggle-open {
  display: none;
}

.auth-input-toggle.is-active .auth-input-toggle-closed {
  display: block;
}

.auth-panel-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.auth-panel-mark-ring {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(var(--royal-rgb), 0.14), rgba(var(--gold-rgb), 0.18));
  border: 1px solid rgba(var(--royal-rgb), 0.14);
  box-shadow: 0 18px 34px rgba(var(--navy-rgb), 0.12);
}

.auth-panel-mark-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: cover;
}

.auth-panel-mark-badge {
  position: absolute;
  right: -8px;
  bottom: -6px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(var(--gold-rgb), 0.98), rgba(186, 136, 71, 0.95));
  color: #1f234e;
  box-shadow: 0 12px 24px rgba(64, 45, 18, 0.24);
}

.auth-panel-mark-badge svg {
  width: 18px;
  height: 18px;
}

.notice-card {
  color: var(--gold-deep);
  background: rgba(var(--gold-rgb), 0.14);
  border-color: rgba(var(--gold-rgb), 0.28);
  margin-bottom: 16px;
  line-height: 1.6;
}

.error-card {
  color: #a4372c;
  background: rgba(208, 73, 55, 0.1);
  border-color: rgba(208, 73, 55, 0.2);
  margin-bottom: 16px;
}

@media (max-width: 1040px) {
  .hero,
  .service-grid,
  .admin-overview-grid,
  .admin-grid,
  .chat-stage,
  .auth-grid,
  .knowledge-grid,
  .featured-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100vw - 20px, 1180px);
  }

  .header-bar,
  .footer-bar,
  .site-nav,
  .table-header,
  .admin-topbar,
  .admin-topbar-left,
  .admin-topbar-right,
  .admin-hero-top,
  .intent-copy,
  .form-row {
    flex-direction: column;
    align-items: stretch;
    grid-template-columns: 1fr;
  }

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

  .admin-metric-grid {
    grid-template-columns: 1fr;
  }

  .admin-shortcut-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid,
  .footer-bottom {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .footer-brand-block,
  .footer-card {
    padding: 20px;
  }

  .admin-surface,
  .admin-panel-card,
  .admin-editor-card,
  .admin-table-card {
    padding: 18px;
  }

  .hero-copy,
  .hero-panel,
  .admin-hero,
  .service-card,
  .rail-card,
  .form-card,
  .table-card,
  .insight-strip,
  .auth-copy,
  .auth-panel,
  .chat-shell {
    padding: 20px;
  }

  .message-bubble {
    max-width: 100%;
  }

  .compact-chat-shell {
    height: min(78vh, 680px);
    max-height: calc(100vh - 16px);
  }

  .floating-chat {
    right: 12px;
    bottom: 12px;
  }

  .chat-widget {
    width: min(calc(100vw - 24px), 420px);
  }

  .compact-chat-shell .chat-topbar {
    flex-direction: row;
    align-items: flex-start;
  }

  .compact-chat-shell .chat-input-shell {
    min-height: 56px;
  }

  .chat-launcher-stack {
  }

  .chat-dock {
    width: 72px;
    height: 72px;
  }

  .chat-launcher-prompt {
    right: 88px;
    padding: 10px 14px;
    font-size: 0.84rem;
  }

  .chat-avatar {
    width: 42px;
    height: 42px;
  }

  .chat-settings-panel {
    top: 72px;
    right: 14px;
    width: min(300px, calc(100vw - 34px));
  }

}

@media (max-width: 520px) {
  .chat-window-actions {
    gap: 6px;
  }

  .chat-window-button {
    width: 34px;
    height: 34px;
  }

  .chat-input-shell {
    gap: 10px;
    padding: 6px;
  }

  .chat-input-accent {
    width: 34px;
    height: 34px;
  }

  .chat-send-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .chat-voice-button {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
  }

  .chat-settings-panel {
    top: 68px;
    right: 10px;
    width: min(284px, calc(100vw - 26px));
  }

  .chat-settings-row {
    align-items: flex-start;
  }
}

@media (max-height: 720px) {
  .suggestion-area-top {
    display: none;
  }

  .chat-body-shell {
    gap: 0;
  }

  .chat-subline {
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-dock,
  .chat-launcher-ring,
  .assistant-bot-helmet,
  .assistant-bot-eye,
  .assistant-bot-mouth {
    animation: none;
  }

  .chat-launcher-prompt,
  .chat-dock-badge,
  .chat-voice-button,
  .chat-toggle-thumb,
  .chat-toggle-track {
    transition: none;
  }
}
