:root {
  --ink: #111827;
  --muted: #687789;
  --line: #d9e3ea;
  --paper: rgba(255, 255, 255, 0.88);
  --paper-solid: #ffffff;
  --mist: #edf4f7;
  --navy: #123a63;
  --blue: #1f78c8;
  --green: #089276;
  --rose: #b04a8f;
  --amber: #b36b00;
  --red: #b3261e;
  --shadow: 0 24px 70px rgba(18, 58, 99, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-size: 16px;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background:
    linear-gradient(120deg, rgba(176, 74, 143, 0.12), transparent 24rem),
    radial-gradient(circle at 92% 8%, rgba(31, 120, 200, 0.20), transparent 26rem),
    linear-gradient(135deg, #f6fbfd 0%, #dfeaf1 55%, #edf4f7 100%);
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(20px);
  pointer-events: none;
  z-index: -1;
}

.ambient-one {
  background: rgba(8, 146, 118, 0.16);
  height: 320px;
  left: -90px;
  top: 170px;
  width: 320px;
}

.ambient-two {
  background: rgba(176, 74, 143, 0.14);
  bottom: 90px;
  height: 260px;
  right: -80px;
  width: 260px;
}

button,
input {
  font: inherit;
}

button,
.ghost-link {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 0.68rem 1rem;
}

button {
  border: 0;
  background: var(--navy);
  color: white;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

button:hover {
  box-shadow: 0 14px 34px rgba(18, 58, 99, 0.22);
  transform: translateY(-1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.secondary {
  background: var(--blue);
}

.danger {
  background: #fff3f1;
  border: 1px solid #f0c7c2;
  color: var(--red);
}

.ghost,
.ghost-link {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  color: var(--navy);
  text-decoration: none;
}

.shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 20px 0 48px;
}

.hero,
.toolbar,
.card,
.meeting,
.quick-invite,
.calendar-panel,
.stat-card {
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 16px 20px;
}

.brand,
.session,
.actions,
.meeting-actions,
.meta-grid,
.extra-actions {
  align-items: center;
  display: flex;
  gap: 12px;
}

.brand {
  gap: 16px;
}

.logo-mark {
  align-items: center;
  background: white;
  border-radius: 18px;
  display: inline-flex;
  height: 82px;
  justify-content: center;
  padding: 10px;
  width: 176px;
}

.logo-mark img {
  max-height: 68px;
  max-width: 156px;
  object-fit: contain;
}

.eyebrow {
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  margin: 0 0 5px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.15rem, 4vw, 3.35rem);
  letter-spacing: -0.055em;
  line-height: 0.94;
  margin-bottom: 7px;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  letter-spacing: -0.045em;
  line-height: 1;
  margin-bottom: 10px;
}

h3 {
  font-size: 1.18rem;
  margin-bottom: 6px;
}

.hero-copy,
.muted,
.participants,
.meeting-url {
  color: var(--muted);
}

.hero-copy {
  font-size: 0.94rem;
  margin-bottom: 0;
}

.session {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 8px 10px 8px 14px;
  white-space: nowrap;
}

.live-dot {
  background: var(--green);
  border-radius: 999px;
  box-shadow: 0 0 0 6px rgba(8, 146, 118, 0.12);
  height: 10px;
  width: 10px;
}

.session.is-anonymous {
  color: var(--muted);
}

.session.is-anonymous .live-dot {
  background: #94a3b8;
  box-shadow: 0 0 0 5px rgba(148, 163, 184, 0.13);
}

.auth-layout {
  display: grid;
  gap: 22px;
  grid-template-columns: 1.08fr minmax(340px, 0.92fr);
  margin: 28px 0;
  width: 100%;
}

.auth-story {
  background: linear-gradient(145deg, rgba(18, 58, 99, 0.96), rgba(8, 146, 118, 0.86));
  border-radius: 28px;
  color: white;
  min-height: 330px;
  padding: 32px;
}

.auth-story h2 {
  max-width: 14ch;
}

.auth-story .eyebrow,
.auth-story p {
  color: rgba(255, 255, 255, 0.82);
}

.story-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.story-grid span {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0.62rem 0.82rem;
}

.card,
.quick-invite,
.calendar-panel {
  padding: 22px;
}

.auth-card {
  align-self: stretch;
  padding: 30px;
}

.auth-help {
  margin-bottom: 20px;
}

.form,
.extraordinary-form {
  display: grid;
  gap: 14px;
}

label {
  color: var(--muted);
  display: grid;
  font-weight: 800;
  gap: 8px;
}

input {
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  min-height: 46px;
  outline: none;
  padding: 0.9rem 1rem;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 5px rgba(31, 120, 200, 0.12);
}

.toolbar {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 22px;
}

.toolbar .muted {
  margin-bottom: 0;
}

.quick-invite {
  display: grid;
  gap: 18px;
  grid-template-columns: 0.75fr 1.25fr;
  margin-bottom: 16px;
}

.extraordinary-form {
  align-items: center;
  grid-template-columns: 1fr auto;
}

.banner {
  background: #e7f7f2;
  border: 1px solid #bfe7dc;
  border-radius: 18px;
  color: #0a6551;
  font-weight: 800;
  margin-bottom: 16px;
  padding: 14px 16px;
}

.banner.error {
  background: #fff0ee;
  border-color: #f2c5bf;
  color: var(--red);
}

.stats-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 16px;
}

.active-work {
  align-items: center;
  background: linear-gradient(135deg, rgba(8, 146, 118, 0.16), rgba(31, 120, 200, 0.14));
  border: 1px solid rgba(8, 146, 118, 0.28);
  border-radius: 26px;
  display: grid;
  gap: 18px;
  grid-template-columns: 0.65fr 1fr;
  margin-bottom: 16px;
  padding: 20px;
}

.active-work h3 {
  font-size: 1.45rem;
  letter-spacing: -0.04em;
  margin: 0;
}

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

.active-list a {
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 18px;
  color: var(--ink);
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  text-decoration: none;
}

.active-list strong {
  background: #dff4ee;
  border-radius: 999px;
  color: var(--green);
  flex: 0 0 auto;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  padding: 7px 10px;
  text-transform: uppercase;
}

.active-list span {
  font-weight: 800;
}

.running-line {
  background: #e7f7f2;
  border-radius: 16px;
  color: #0a6551;
  margin: 12px 0 0;
  padding: 10px 12px;
}

.stat-card {
  padding: 18px;
}

.stat-card span,
.stat-card small {
  color: var(--muted);
  display: block;
}

.stat-card strong {
  display: block;
  font-size: 1.9rem;
  letter-spacing: -0.05em;
  line-height: 1;
  margin: 8px 0;
}

.calendar-panel {
  margin-bottom: 16px;
}

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

.calendar-summary {
  background: var(--mist);
  border-radius: 999px;
  color: var(--navy);
  font-weight: 900;
  padding: 0.6rem 0.85rem;
}

.calendar-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekday {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.calendar-day {
  background: #f7fbfd;
  border: 1px solid #e3ebf0;
  border-radius: 18px;
  min-height: 82px;
  padding: 8px;
}

.calendar-day.empty {
  opacity: 0.35;
}

.calendar-day.today {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(8, 146, 118, 0.18);
}

.calendar-event {
  background: #eaf3fb;
  border-radius: 10px;
  color: var(--navy);
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  margin-top: 6px;
  overflow: hidden;
  padding: 0.35rem 0.45rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event.completed {
  background: #e4f6ef;
  color: var(--green);
}

.calendar-event.failed {
  background: #fff6df;
  color: var(--amber);
}

.meetings {
  display: grid;
  gap: 10px;
}

.meeting {
  overflow: hidden;
  padding: 15px 17px;
}

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

.meeting h3 {
  margin-bottom: 4px;
}

.meeting-url {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0;
  word-break: break-word;
}

.status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 0.36rem 0.62rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.status.scheduled,
.status.ready_to_join,
.status.discovered {
  background: #e8f2fb;
  color: var(--blue);
}

.status.completed {
  background: #e4f6ef;
  color: var(--green);
}

.status.failed {
  background: #fff6df;
  color: var(--amber);
}

.status.not_admitted {
  background: #fff6df;
  color: var(--amber);
}

.status.recording,
.status.joining,
.status.in_meeting,
.status.processing_fragments,
.status.transcribing,
.status.analyzing,
.status.generating_document,
.status.sending_email,
.status.waiting_admission {
  background: #fff6df;
  color: var(--amber);
}

.meta-grid {
  align-items: stretch;
  flex-wrap: wrap;
  margin: 10px 0;
}

.meta {
  background: var(--mist);
  border-radius: 14px;
  font-size: 0.82rem;
  min-width: 150px;
  padding: 8px 10px;
}

.meta.wide {
  min-width: 240px;
}

.meta strong {
  color: var(--ink);
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.participants {
  display: -webkit-box;
  font-size: 0.82rem;
  line-height: 1.35;
  margin-bottom: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.error-line {
  background: #fff7e6;
  border-radius: 14px;
  color: #7a4b00;
  padding: 10px 12px;
}

.result-line {
  background: #fff6df;
  border-radius: 14px;
  color: #7a4b00;
  padding: 10px 12px;
}

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

.meeting-actions button,
.meeting-actions .ghost-link {
  min-height: 36px;
  font-size: 0.86rem;
  padding: 0.5rem 0.8rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .auth-layout,
  .quick-invite,
  .stats-grid,
  .active-work {
    grid-template-columns: 1fr;
  }

  .extraordinary-form {
    grid-template-columns: 1fr;
  }

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

  .calendar-weekday {
    display: none;
  }
}

@media (max-width: 700px) {
  .shell {
    width: min(100% - 24px, 1240px);
    padding-top: 12px;
  }

  .hero,
  .toolbar,
  .meeting-head,
  .calendar-head {
    align-items: stretch;
    flex-direction: column;
  }

  .session {
    align-items: center;
    align-self: flex-start;
  }

  .brand {
    align-items: center;
  }

  button,
  .ghost-link {
    width: 100%;
  }

  .session button {
    width: auto;
  }

  .logo-mark {
    height: 68px;
    width: 140px;
  }

  .logo-mark img {
    max-height: 56px;
    max-width: 124px;
  }
}

@media (max-width: 480px) {
  .brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-story,
  .auth-card,
  .toolbar,
  .quick-invite,
  .calendar-panel {
    padding: 20px;
  }

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