:root {
  --bg: #eaf2fb;
  --card: rgba(255, 255, 255, 0.84);
  --line: #d4deec;
  --text: #111827;
  --muted: #5f6f84;
  --brand: #0a84ff;
  --brand-strong: #005fcb;
  --danger: #cf3e3e;
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow: 0 14px 34px rgba(17, 24, 39, 0.1);
  --font: "SF Pro Text", "PingFang SC", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(155deg, #e7f1fc 0%, #f7fbff 55%, #edf6ff 100%);
}

.bg-blur {
  position: fixed;
  border-radius: 999px;
  filter: blur(84px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.38;
}

.bg-blur.a {
  width: 34rem;
  height: 34rem;
  left: -8rem;
  top: -12rem;
  background: #8fc6ff;
}

.bg-blur.b {
  width: 30rem;
  height: 30rem;
  right: -10rem;
  bottom: -10rem;
  background: #ffd8bf;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1380px;
  margin: 0 auto;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.glass {
  background: var(--card);
  border: 1px solid rgba(212, 222, 236, 0.95);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.top-card {
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #62758d;
}

h1 {
  margin: 4px 0 0;
  font-size: clamp(30px, 2.8vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.sub {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.user-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-bar span {
  font-size: 13px;
  color: #344861;
}

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

.panel {
  padding: 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  min-height: 220px;
}

.panel h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.panel h4 {
  margin: 12px 0 8px;
  font-size: 15px;
}

.auth-card {
  padding: 12px;
}

.auth-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #43556d;
}

.field {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #ced9e9;
  background: #fff;
  padding: 10px 11px;
  font-size: 14px;
  color: #1d2939;
  font-family: var(--font);
}

textarea.field {
  resize: vertical;
}

.field:focus {
  outline: none;
  border-color: #7cb2ff;
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.12);
}

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

.btn {
  border: none;
  border-radius: 11px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  transition: transform 0.14s ease;
}

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

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 10px 20px rgba(10, 132, 255, 0.24);
}

.btn.ghost {
  color: #2f435d;
  background: #eef4fc;
  border: 1px solid #cfdbec;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.status {
  margin: 8px 0 0;
  min-height: 20px;
  font-size: 13px;
  color: #1f5f9f;
}

.project-list,
.session-list,
.transcript {
  display: grid;
  gap: 8px;
}

.project-item,
.session-item {
  border: 1px solid #d5dfed;
  background: #f9fbff;
  border-radius: 12px;
  padding: 9px 10px;
  cursor: pointer;
}

.project-item.active,
.session-item.active {
  border-color: #8ebcff;
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.11);
}

.empty {
  color: #708197;
  font-size: 13px;
}

.hidden {
  display: none !important;
}

.session-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.summary-box {
  margin: 8px 0 0;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #d5dfec;
  background: #fbfdff;
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: 14px;
}

.msg {
  border: 1px solid #d7e1ee;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.msg .role {
  font-size: 11px;
  color: #6d7d92;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.msg.user {
  background: #eaf4ff;
  border-color: #b9d5ff;
}

.msg.assistant {
  background: #ffffff;
}

.msg.system {
  background: #fff6ea;
  border-color: #f1d5ae;
}

.participant-shell {
  min-height: 100vh;
}

.meta-pill-row {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  border: 1px solid #d0dceb;
  background: #f1f6fc;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  color: #4a5d75;
}

.participant-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 10px;
}

.chat-panel {
  min-height: 74vh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.chat-scroll {
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.composer {
  margin-top: 10px;
  border-top: 1px solid #dbe4f0;
  padding-top: 10px;
}

.composer-hint {
  font-size: 12px;
  color: #5c6e86;
  margin-bottom: 8px;
}

.side-panel {
  min-height: 74vh;
}

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

.chip {
  border: 1px solid #cadef5;
  background: #eff5ff;
  color: #215086;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(13, 24, 38, 0.45);
  backdrop-filter: blur(4px);
  padding: 16px;
}

.overlay.visible {
  display: flex;
}

.overlay-card {
  width: min(640px, 96vw);
  padding: 18px;
}

.overlay-card h2 {
  margin: 6px 0 0;
  font-size: 30px;
  line-height: 1.2;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  visibility: hidden;
  z-index: 40;
  background: #fff;
  border: 1px solid #d7e1ee;
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 13px;
  transition: all 0.18s ease;
}

.toast.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .participant-layout {
    grid-template-columns: 1fr;
  }

  .side-panel {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .top-card {
    grid-template-columns: 1fr;
  }

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

  .actions {
    width: 100%;
  }

  .btn {
    flex: 1;
    min-width: 120px;
  }

  h1 {
    font-size: 32px;
  }
}
