:root {
  --bg: #fff8f3;
  --ink: #2c2026;
  --muted: #6f6268;
  --plum: #6f214d;
  --plum-dark: #572040;
  --rose: #e97975;
  --coral: #f2a178;
  --mint: #d9efe6;
  --line: #ecd8cd;
  --field: #ffffff;
  --focus: #176b61;
  --shadow: 0 22px 70px rgba(74, 38, 50, 0.13);
  --shadow-sm: 0 12px 34px rgba(74, 38, 50, 0.09);
}

* { box-sizing: border-box; }

/* The hidden attribute must win over component display rules (grid/flex). */
[hidden] { display: none !important; }

html {
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

body { margin: 0; min-height: 100vh; }

button, input, select, textarea { font: inherit; }

h1, h2, p { margin: 0; }

.eyebrow {
  color: var(--plum);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0;
  text-transform: uppercase;
}

label { display: grid; gap: 8px; }

label > span {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

label > span em {
  color: var(--muted);
  font-style: normal;
  font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
  background: var(--field);
  border: 1px solid #d9c6bf;
  border-radius: 8px;
  color: var(--ink);
  min-height: 48px;
  outline: 0;
  padding: 12px 14px;
  width: 100%;
}

input::placeholder { color: #b3a4a8; }

input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(23, 107, 97, 0.16);
}

/* Buttons */
button {
  background: var(--plum);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  min-height: 48px;
  padding: 13px 22px;
}
button:hover { background: var(--plum-dark); }
button:focus-visible { box-shadow: 0 0 0 3px rgba(23, 107, 97, 0.22); outline: 0; }
button:disabled { background: #9d8492; cursor: wait; }

.secondary-button { background: var(--mint); color: #14463c; }
.secondary-button:hover { background: #c7e6d8; }

.ghost-button { background: #f4e7e1; color: var(--ink); }
.ghost-button:hover { background: #ecd9d1; }

.link-button {
  background: none;
  color: var(--plum);
  font-size: 0.9rem;
  font-weight: 700;
  min-height: auto;
  padding: 0;
  text-decoration: underline;
}
.link-button:hover { background: none; color: var(--plum-dark); }

/* Status text */
.status {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
  margin: 0;
  min-height: 20px;
}
.status[data-state="success"] { color: #176b35; font-weight: 700; }
.status[data-state="error"] { color: #9a1f32; font-weight: 700; }

/* Loading shim (account page only) */
.boot {
  align-content: center;
  display: grid;
  gap: 16px;
  justify-items: center;
  min-height: 100vh;
  padding: 24px;
}
.boot p { color: var(--muted); }
.boot-dot {
  animation: pulse 1s ease-in-out infinite;
  background: var(--plum);
  border-radius: 50%;
  height: 16px;
  width: 16px;
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* ============ LOGIN PAGE ============ */
.auth-shell {
  align-items: center;
  display: grid;
  justify-items: center;
  min-height: 100vh;
  padding: clamp(18px, 4vw, 44px);
  position: relative;
}

.auth-home {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  left: clamp(18px, 4vw, 44px);
  position: absolute;
  text-decoration: none;
  top: clamp(18px, 4vw, 44px);
}
.auth-home:hover { color: var(--plum); }

.login-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 22px;
  max-width: 460px;
  padding: clamp(24px, 4vw, 38px);
  width: 100%;
}

.login-head { display: grid; gap: 8px; justify-items: start; }

.login-logo {
  height: 72px;
  margin-bottom: 6px;
  object-fit: contain;
  width: auto;
}

.login-head h1 {
  font-size: clamp(1.8rem, 5vw, 2.3rem);
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.login-head .lede {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.login-form { display: grid; gap: 16px; }

.name-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }

.step-hint { color: var(--muted); font-size: 0.96rem; line-height: 1.5; }
.step-hint strong { color: var(--ink); }

.login-secondary { display: flex; gap: 18px; }

.login-foot {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  padding-top: 18px;
}
.login-foot a { color: var(--plum); font-weight: 700; }

/* ============ ACCOUNT / DASHBOARD ============ */
.app-view {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(16px, 3vw, 36px);
  width: 100%;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: clamp(18px, 3vw, 26px);
}

.panel-head { margin-bottom: 16px; }
.panel-head h2 { font-size: 1.2rem; }

.panel-note {
  background: var(--mint);
  border-radius: 8px;
  color: #14463c;
  font-size: 0.9rem;
  line-height: 1.45;
  margin-bottom: 14px;
  padding: 10px 12px;
}

.topbar {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px clamp(18px, 3vw, 26px);
}

.brand {
  align-items: center;
  color: inherit;
  display: flex;
  gap: 14px;
  min-width: 0;
  text-decoration: none;
}

.topbar-logo {
  border: 1px solid var(--line);
  border-radius: 10px;
  height: 54px;
  object-fit: contain;
  padding: 4px;
  width: 54px;
}

.topbar h1 { font-size: clamp(1.3rem, 3vw, 1.65rem); line-height: 1.1; }

.notice {
  background: var(--mint);
  border: 1px solid #b8ded1;
  border-radius: 10px;
  color: #14463c;
  font-weight: 700;
  padding: 14px 16px;
}

.status-band {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(233, 121, 117, 0.16), transparent 55%),
    #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: clamp(18px, 3vw, 26px);
}

.status-band h2 { font-size: 1.6rem; text-transform: capitalize; }
.status-sub { color: var(--muted); font-size: 0.94rem; margin-top: 4px; }
.status-band button { flex: 0 0 auto; }
.status-band[data-status="active"] h2 { color: #176b35; }
.status-band[data-status="pending"] h2 { color: var(--plum); }
.status-band[data-status="paused"] h2,
.status-band[data-status="canceled"] h2 { color: #9a1f32; }

.dash-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
}
.dash-main, .dash-side { align-content: start; display: grid; gap: 18px; }

.sessions-list { display: grid; gap: 12px; }

.session-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px 16px;
}
.session-row .session-meta { display: grid; gap: 4px; min-width: 0; }
.session-row strong { font-size: 1.02rem; }
.session-row .session-when { color: var(--muted); font-size: 0.92rem; }
.session-row .session-live {
  background: var(--rose);
  border-radius: 999px;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  text-transform: uppercase;
  width: fit-content;
}
.session-row button { flex: 0 0 auto; min-height: 42px; padding: 10px 20px; }
.session-row button:disabled { background: #e7dcd7; color: #9d8e92; }

.empty-state { color: var(--muted); font-size: 0.96rem; line-height: 1.5; }

.meeting-panel iframe {
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 14px;
  min-height: 520px;
  width: 100%;
}

.billing-details { display: grid; gap: 12px; margin: 0 0 16px; }
.billing-details div {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 12px;
}
.billing-details div:last-child { border-bottom: 0; padding-bottom: 0; }
.billing-details dt { color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.billing-details dd { font-weight: 700; margin: 0; text-align: right; text-transform: capitalize; }

.profile-panel { display: grid; gap: 14px; }

/* Responsive */
@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .name-grid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .status-band { align-items: stretch; flex-direction: column; }
  .status-band button { width: 100%; }
  .meeting-panel iframe { min-height: 360px; }
}
