:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #6b7487;
  --line: #e6e9f0;
  --surface: #ffffff;
  --canvas: #f4f6fa;
  --blue: #2667ff;
  --blue-dark: #174ed1;
  --green: #18a66a;
  --red: #d33c54;
  --amber: #c98413;
  --shadow: 0 20px 60px rgba(30, 46, 80, .08);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% -5%, rgba(38, 103, 255, .12), transparent 28rem),
    radial-gradient(circle at 95% 15%, rgba(75, 196, 165, .08), transparent 26rem),
    var(--canvas);
}

button, input { font: inherit; }
button { cursor: pointer; }

.shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0 80px;
}

.hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 20px;
  color: white;
  background: linear-gradient(145deg, #3678ff, #1852e0);
  box-shadow: 0 14px 28px rgba(38, 103, 255, .24);
}

.brand-mark svg { width: 38px; fill: currentColor; }
.brand-mark .mark-secondary { fill: #a8c4ff; }

.eyebrow {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: clamp(27px, 3.4vw, 38px); letter-spacing: -.04em; }
.subtitle { margin-bottom: 0; color: var(--muted); font-size: 14px; }

.user-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 13px 7px 7px;
  border: 1px solid rgba(38, 103, 255, .13);
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  font-size: 13px;
  font-weight: 650;
  backdrop-filter: blur(12px);
}

.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #477eff, #255de8);
}

.status-card {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 16px;
  padding: 14px 18px;
  border: 1px solid #dfe6f6;
  border-radius: 16px;
  background: rgba(255, 255, 255, .74);
  box-shadow: 0 8px 24px rgba(30, 46, 80, .04);
  backdrop-filter: blur(14px);
}

.status-card strong { display: block; margin-bottom: 2px; font-size: 13px; }
.status-card p { margin: 0; color: var(--muted); font-size: 12px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(24,166,106,.12); }
.status-dot.loading { background: var(--amber); box-shadow: 0 0 0 5px rgba(201,132,19,.12); animation: pulse 1.5s infinite; }
.status-dot.error { background: var(--red); box-shadow: 0 0 0 5px rgba(211,60,84,.12); }

.layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr); gap: 18px; }
.card { border: 1px solid rgba(225,229,238,.9); border-radius: 24px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); }
.form-card { padding: 30px; }
.upcoming-card { min-height: 420px; padding: 26px; }

.card-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.card-heading > div { display: flex; align-items: center; gap: 11px; }
.card-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.card-heading.compact { margin-bottom: 22px; }
.step { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; color: var(--blue); background: #edf3ff; font-size: 11px; font-weight: 800; }
.timezone { padding: 6px 9px; border-radius: 8px; color: #727b8d; background: #f3f5f8; font-size: 11px; font-weight: 650; }

fieldset { margin: 0; padding: 0; border: 0; }
fieldset:disabled { opacity: .54; }
.field { position: relative; display: flex; flex-direction: column; gap: 9px; }
.field > span { font-size: 13px; font-weight: 700; }
.field small { position: absolute; right: 13px; bottom: 13px; color: #9ba3b2; font-size: 11px; }
.field input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: #fbfcfe;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input:focus { border-color: #87a9ff; background: white; box-shadow: 0 0 0 4px rgba(38,103,255,.09); }
.field-wide input { padding-right: 60px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }

.duration-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 20px 0 26px; }
.duration-row > span { flex: 0 0 auto; color: var(--muted); font-size: 12px; font-weight: 650; }
.chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.chip { padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: white; font-size: 11px; font-weight: 650; }
.chip:hover, .chip.active { border-color: #a7bfff; color: var(--blue); background: #f0f5ff; }

.option-list { overflow: hidden; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 14px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 16px; cursor: pointer; }
.switch-row + .switch-row { border-top: 1px solid var(--line); }
.switch-row span { display: flex; flex-direction: column; gap: 3px; }
.switch-row strong { font-size: 13px; }
.switch-row small { color: var(--muted); font-size: 11px; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row i { position: relative; flex: 0 0 auto; width: 40px; height: 23px; border-radius: 999px; background: #d6dbe4; transition: .2s; }
.switch-row i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.16); transition: .2s; }
.switch-row input:checked + i { background: var(--blue); }
.switch-row input:checked + i::after { transform: translateX(17px); }

.primary-button, .secondary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  border-radius: 13px;
  font-weight: 750;
  text-decoration: none;
}
.primary-button { border: 0; color: white; background: linear-gradient(135deg, #3475ff, #1b55df); box-shadow: 0 10px 22px rgba(38,103,255,.22); }
.primary-button:hover { background: linear-gradient(135deg, #2d6bf1, #174ed1); }
.primary-button:disabled { cursor: wait; opacity: .65; }
.primary-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.secondary-button { border: 1px solid var(--line); color: var(--ink); background: white; }
.text-button { padding: 5px; border: 0; color: var(--blue); background: transparent; font-size: 12px; font-weight: 700; }
.text-button:disabled { color: #a8afbc; cursor: default; }

.form-message { margin: 0 0 14px; padding: 11px 13px; border-radius: 10px; color: #a3263c; background: #fff0f2; font-size: 12px; line-height: 1.5; }
.form-message.info { color: #74510c; background: #fff7df; }

.meeting-list { display: flex; flex-direction: column; gap: 10px; }
.empty-state { display: grid; place-items: center; min-height: 280px; color: #9ca4b3; text-align: center; }
.empty-state span { align-self: end; display: grid; place-items: center; width: 44px; height: 44px; border: 1px dashed #cad0db; border-radius: 14px; font-size: 24px; }
.empty-state p { align-self: start; margin-top: 12px; font-size: 12px; line-height: 1.7; }
.meeting-item { padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfe; }
.meeting-item h3 { overflow: hidden; margin: 0 0 8px; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.meeting-item p { margin: 0 0 10px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.meeting-item footer { display: flex; align-items: center; justify-content: space-between; }
.meeting-item code { color: var(--blue); font-family: inherit; font-size: 11px; font-weight: 750; }
.meeting-item a { color: var(--blue); font-size: 11px; font-weight: 700; text-decoration: none; }

.dialog { width: min(460px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 24px; color: var(--ink); background: transparent; box-shadow: 0 30px 80px rgba(11,22,48,.24); }
.dialog::backdrop { background: rgba(13,22,40,.48); backdrop-filter: blur(5px); }
.dialog-panel { position: relative; margin: 0; padding: 32px; border-radius: 24px; background: white; }
.dialog-close { position: absolute; top: 14px; right: 16px; width: 32px; height: 32px; border: 0; border-radius: 50%; color: var(--muted); background: #f3f5f8; font-size: 22px; line-height: 1; }
.dialog-kicker { display: block; margin-bottom: 8px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.dialog h2 { margin-bottom: 22px; font-size: 23px; letter-spacing: -.03em; }
.summary-list { margin: 0 0 26px; }
.summary-list div { display: grid; grid-template-columns: 70px 1fr; padding: 11px 0; border-bottom: 1px solid var(--line); }
.summary-list dt { color: var(--muted); font-size: 12px; }
.summary-list dd { margin: 0; text-align: right; font-size: 12px; font-weight: 650; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; }
.dialog-actions.stacked { grid-template-columns: 1fr; }

.success-panel { text-align: center; }
.success-icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 15px; border-radius: 18px; color: white; background: linear-gradient(145deg, #31c884, #169b64); box-shadow: 0 12px 25px rgba(24,166,106,.2); font-size: 25px; }
.meeting-code-block { margin: 0 0 14px; padding: 17px; border: 1px solid #dfe7fa; border-radius: 15px; background: #f6f9ff; }
.meeting-code-block span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.meeting-code-block strong { color: var(--blue-dark); font-size: 26px; letter-spacing: .08em; }
.success-time, .password-line { color: var(--muted); font-size: 12px; }
.password-line { padding: 8px; border-radius: 8px; background: #fff7df; }
.link-button { min-height: 46px; }
.done-button { margin-top: 17px; }

@keyframes pulse { 50% { opacity: .55; } }

@media (max-width: 820px) {
  .shell { width: min(100% - 28px, 620px); padding: 30px 0 48px; }
  .hero { grid-template-columns: auto 1fr; }
  .user-pill { grid-column: 1 / -1; justify-self: start; }
  .layout { grid-template-columns: 1fr; }
  .upcoming-card { min-height: auto; }
  .empty-state { min-height: 170px; }
}

@media (max-width: 520px) {
  .shell { width: min(100% - 20px, 480px); padding-top: 22px; }
  .brand-mark { width: 52px; height: 52px; border-radius: 17px; }
  .brand-mark svg { width: 32px; }
  .hero { gap: 13px; margin-bottom: 20px; }
  .subtitle { font-size: 12px; line-height: 1.5; }
  .form-card, .upcoming-card { padding: 21px 18px; border-radius: 20px; }
  .field-grid { grid-template-columns: 1fr; }
  .duration-row { align-items: flex-start; flex-direction: column; }
  .chips { justify-content: flex-start; }
  .card-heading { margin-bottom: 22px; }
  .timezone { display: none; }
  .dialog-panel { padding: 27px 20px; }
}
