
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  background:
    radial-gradient(
      circle at 20% -10%,
      rgba(79, 82, 197, 0.35) 0%,
      transparent 45%
    ),
    radial-gradient(
      circle at 80% 0%,
      rgba(126, 253, 199, 0.25) 0%,
      transparent 50%
    ),
    linear-gradient(180deg, #06030c 0%, #05030d 54%, #020109 100%);
  color: var(--ink);
  min-height: 100vh;
}

.app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 20px 32px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  background: linear-gradient(
    135deg,
    rgba(26, 30, 61, 0.92),
    rgba(20, 25, 48, 0.88)
  );
  border: 1px solid rgba(126, 253, 199, 0.18);
  box-shadow: var(--shadow-strong), var(--shadow-glow);
}


/* Hub entry cards - unified accent-based design */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.entry-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 140px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(126, 253, 199, 0.18);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(248, 253, 250, 0.96) 100%
  );
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-soft), var(--shadow-glow);
  transition:
    transform 200ms ease,
    border-color 200ms ease,
    background-color 200ms ease,
    box-shadow 200ms ease;
}

.entry-card:hover {
  transform: translateY(-3px);
  border-color: rgba(126, 253, 199, 0.32);
  box-shadow: var(--shadow-strong), 0 0 32px rgba(126, 253, 199, 0.12);
}

.entry-card.active {
  border-color: var(--accent);
  background: linear-gradient(180deg, #edf7f2 0%, #dcf0e7 100%);
}

.entry-card.subtle {
  border-color: rgba(126, 253, 199, 0.12);
  background: linear-gradient(
    180deg,
    rgba(250, 253, 251, 0.96) 0%,
    rgba(244, 250, 247, 0.94) 100%
  );
}

body[data-shell-page="hub"] .entry-card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(241, 249, 246, 0.94) 100%
  );
  border-color: rgba(126, 253, 199, 0.18);
  box-shadow:
    0 14px 30px rgba(126, 253, 199, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body[data-shell-page="hub"] .entry-card.active {
  border-color: rgba(126, 253, 199, 0.36);
  background: linear-gradient(180deg, #eef9f4 0%, #dff2ea 100%);
}

.entry-card strong {
  font-size: 16px;
  line-height: 1.25;
  color: var(--ink);
  font-weight: 600;
}

body[data-shell-page="hub"] .entry-card strong {
  color: rgba(126, 253, 199, 0.95);
}

.entry-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

body[data-shell-page="hub"] .entry-card span {
  color: rgba(126, 253, 199, 0.72);
}

.entry-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

body[data-shell-page="hub"] .entry-badge {
  background: rgba(126, 253, 199, 0.12);
  color: rgba(126, 253, 199, 0.88);
  border: 1px solid rgba(126, 253, 199, 0.18);
}

.status-cluster {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
}

body[data-shell-page="user"] .status-cluster {
  display: none;
}

body[data-shell-page="hub"] .status-cluster {
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid rgba(126, 253, 199, 0.12);
  justify-content: flex-start;
}

body[data-shell-page="unified"] .status-cluster {
  display: flex;
  flex-wrap: wrap;
}


/* Unified badge/pill system - consistent across all pages */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(126, 253, 199, 0.18);
  background: rgba(126, 253, 199, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  transition: background 160ms ease, border-color 160ms ease;
}

body[data-shell-page="hub"] .badge {
  background: rgba(126, 253, 199, 0.12);
  border-color: rgba(126, 253, 199, 0.24);
  color: rgba(126, 253, 199, 0.9);
}

body[data-shell-page="user"] .badge,
body[data-shell-page="admin"] .badge,
body[data-shell-page="unified"] .badge {
  padding: 5px 9px;
  font-size: 11px;
  background: rgba(126, 253, 199, 0.06);
  border-color: rgba(126, 253, 199, 0.14);
  color: rgba(126, 253, 199, 0.85);
}


/* Unified layout - glass panel system */
.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  background:
    radial-gradient(
      circle at top left,
      rgba(126, 253, 199, 0.06) 0,
      transparent 32%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.96) 0%,
      rgba(248, 253, 250, 0.94) 100%
    );
  border-radius: var(--radius-xl);
  padding: 16px;
  border: 1px solid rgba(126, 253, 199, 0.12);
  box-shadow: var(--shadow-strong);
}

/* User/Admin/Unified: unified glass shell */
body[data-shell-page="user"] .layout,
body[data-shell-page="admin"] .layout,
body[data-shell-page="unified"] .layout {
  background:
    radial-gradient(
      circle at top left,
      rgba(126, 253, 199, 0.08) 0,
      transparent 28%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(244, 250, 247, 0.96) 100%
    );
  border: 1px solid rgba(126, 253, 199, 0.14);
  box-shadow: var(--shadow-soft), var(--shadow-glow);
}

body[data-shell-page="hub"] .layout {
  background:
    radial-gradient(
      circle at top left,
      rgba(126, 253, 199, 0.12) 0,
      transparent 32%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(126, 253, 199, 0.06) 0,
      transparent 28%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(248, 253, 250, 0.96) 100%
    );
  border: 1px solid rgba(126, 253, 199, 0.16);
}

.layout-chat {
  grid-template-columns: 220px minmax(0, 1fr) minmax(
      260px,
      320px
    );
}

.layout-chat-inline-detail {
  grid-template-columns: 220px minmax(0, 1fr);
}

.layout-single {

/* ── Visual consistency: unified accent-based design across all shell pages ── */

body[data-shell-page="user"] .eyebrow,
body[data-shell-page="admin"] .eyebrow,
body[data-shell-page="unified"] .eyebrow {
  color: rgba(126, 253, 199, 0.72);
}

body[data-shell-page="user"] h1,
body[data-shell-page="admin"] h1,
body[data-shell-page="unified"] h1 {
  color: var(--ink);
}

body[data-shell-page="user"] .panel-kicker,
body[data-shell-page="admin"] .panel-kicker,
body[data-shell-page="unified"] .panel-kicker {
  color: rgba(126, 253, 199, 0.68);
}

body[data-shell-page="user"] .panel-shell-title,
body[data-shell-page="admin"] .panel-shell-title,
body[data-shell-page="unified"] .panel-shell-title {
  color: var(--ink);
}

body[data-shell-page="user"] .hero-note,
body[data-shell-page="admin"] .hero-note,
body[data-shell-page="unified"] .hero-note {
  color: rgba(126, 253, 199, 0.72);
}

/* Badge contrast - unified accent style */
body[data-shell-page="user"] .badge,
body[data-shell-page="admin"] .badge,
body[data-shell-page="unified"] .badge {
  background: rgba(126, 253, 199, 0.06);
  border-color: rgba(126, 253, 199, 0.14);
  color: rgba(126, 253, 199, 0.85);
}

/* Pill contrast - unified accent style */
body[data-shell-page="user"] .pill,
body[data-shell-page="admin"] .pill,
body[data-shell-page="unified"] .pill {
  background: rgba(255, 252, 247, 0.92);
  border-color: rgba(217, 204, 183, 0.64);
  color: rgba(99, 83, 63, 0.88);
}

body[data-shell-page="user"] .stage-chip,
body[data-shell-page="admin"] .stage-chip,
body[data-shell-page="unified"] .stage-chip {
  background: rgba(255, 250, 241, 0.92);
  border-color: rgba(217, 204, 183, 0.56);
  color: rgba(99, 83, 63, 0.84);
}

/* Panel spacing uniform */
body[data-shell-page="user"] .panel-shell-header,
body[data-shell-page="admin"] .panel-shell-header,
body[data-shell-page="unified"] .panel-shell-header {
  padding: 14px 16px 10px;
  gap: 12px;
}

body[data-shell-page="user"] .conversation-stage,
body[data-shell-page="admin"] .conversation-stage,
body[data-shell-page="unified"] .conversation-stage {
  padding: 14px 16px 12px;
  margin: 0 0 10px;
}

/* Composer visual hierarchy */
body[data-shell-page="user"] .composer,
body[data-shell-page="admin"] .composer,
body[data-shell-page="unified"] .composer {
  margin: 12px 14px 14px;
  padding: 12px 14px 14px;
  border-radius: 18px;
}

/* Detail-card visual hierarchy - unified accent style */
body[data-shell-page="admin"] .chat-detail-card-shell,
body[data-shell-page="unified"] .chat-detail-card-shell {
  border-radius: 16px;
  border: 1px solid rgba(126, 253, 199, 0.14);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(248, 253, 250, 0.94) 100%
  );
  box-shadow: var(--shadow-soft);
}
