/* Layouts of the pages outside the Studio: log in, sign up, verify, trial ended.
   Components come from ui/components.css; colors only from ui/theme.css. */

/* ---- Log in, sign up, verify: brand panel and form side by side ----------- */

.od-auth {
  display: flex;
  flex-wrap: wrap;
  min-height: 100vh;
  background: var(--color-panel);
  font-size: var(--text-lg);
}

.od-auth__brand {
  position: relative;
  flex: 1 1 460px;
  min-width: 0;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-6);
  padding: 32px 40px 40px;
  overflow: hidden;
  background: var(--color-stage);
}

.od-auth__wordmark {
  position: relative;
  font-size: 24px;
}

.od-auth__wave {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  max-width: none;
  height: 300px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 3;
}

.od-auth__wave path {
  vector-effect: non-scaling-stroke;
}

.od-auth__pitch {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.od-auth__tagline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.od-auth__lede {
  max-width: 420px;
  color: var(--color-muted);
  font-size: 16px;
}

.od-auth__main {
  flex: 1 1 460px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.od-auth__box {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.od-auth__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.od-auth__title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.od-auth__title h1 {
  font-size: 34px;
  letter-spacing: -0.02em;
}

.od-auth__title p {
  color: var(--color-muted);
}

.od-auth__title strong {
  color: var(--color-text);
  font-weight: 600;
}

.od-auth .od-label--strong {
  font-weight: 500;
}

.od-auth .od-label small {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--color-muted);
}

.od-auth .od-input {
  height: 46px;
  padding: 0 12px;
}

.od-auth__submit {
  height: 48px;
  margin-top: 4px;
}

/* The six-character code: big, mono, spaced out */
.od-auth__code {
  height: 60px !important;
  text-align: center;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: .3em;
  text-transform: uppercase;
}

.od-auth__aside {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--color-muted);
}

.od-auth__switch {
  color: var(--color-muted);
}

.od-auth__switch a {
  font-weight: 600;
}

/* Where the two halves no longer fit side by side, the brand panel becomes a
   short band above the form instead of a second full-height row */
@media (max-width: 919px) {
  .od-auth {
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .od-auth__brand {
    flex: none;
    min-height: 220px;
  }

  .od-auth__main {
    flex: 1 1 auto;
    align-items: flex-start;
  }
}

@media (max-width: 700px) {
  .od-auth__brand {
    min-height: 200px;
    padding: 24px;
  }

  /* Too little room: it would run through the heading */
  .od-auth__wave {
    display: none;
  }

  .od-auth__tagline {
    font-size: 40px;
  }

  .od-auth__main {
    padding: 32px 16px 48px;
  }
}

/* ---- Trial ended ---------------------------------------------------------- */

.od-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: var(--text-lg);
  line-height: 1.5;
}

.od-page__bar {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 8px 16px;
  background: var(--color-panel);
  border-bottom: 1px solid var(--color-line);
}

.od-page__who {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  color: var(--color-muted);
}

.od-page__who span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.od-ended {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 48px;
  padding: 64px 24px;
}

.od-ended__intro {
  flex: 1 1 400px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.od-ended__intro h1 {
  font-size: 52px;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.od-ended__intro > p {
  max-width: 440px;
  font-size: 16px;
  color: var(--color-muted);
}

.od-ended__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.od-ended__actions .od-btn {
  height: 48px;
  padding: 0 20px;
}

.od-ended__history {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: var(--space-4);
}

.od-ended__history h2 {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
}

.od-feedback-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 14px 16px;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
}

.od-feedback-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-md);
  color: var(--color-muted);
}

.od-feedback-item__rating {
  margin-left: auto;
  font-family: var(--font-display);
}

.od-feedback-item audio {
  width: 100%;
}

.od-ended__form {
  flex: 1 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-xl);
}

.od-ended__form h2 {
  font-size: 24px;
}

.od-ended__fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.od-ended__form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.od-ended__form legend {
  padding: 0;
  margin-bottom: 6px;
  color: var(--color-muted);
}

.od-ended__send {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.od-ended__send .od-btn {
  height: 44px;
  padding: 0 20px;
}

.od-ended__send span {
  color: var(--color-muted);
  font-size: var(--text-md);
}

.od-ended__thanks {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.od-ended__thanks > .od-icon {
  width: 40px;
  height: 40px;
  color: var(--color-good);
  stroke-width: 2;
}

.od-ended__thanks h2 {
  font-size: 26px;
}

.od-ended__thanks p {
  color: var(--color-muted);
}

@media (max-width: 700px) {
  .od-ended {
    gap: 32px;
    padding: 32px 16px 48px;
  }

  .od-ended__intro h1 {
    font-size: 38px;
  }

  .od-ended__form {
    padding: var(--space-4);
  }
}

/* ---- Admin ---------------------------------------------------------------- */

.od-admin__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.od-admin__tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.od-admin {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 32px 24px 56px;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* Four numbers in one box, split by hairlines */
.od-admin__stats {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 1px;
  background: var(--color-line);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.od-admin__stats > div {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
  padding: 18px 20px;
  background: var(--color-panel);
}

.od-admin__stats dt {
  color: var(--color-muted);
}

.od-admin__stats dd {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.od-admin__users {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.od-admin__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.od-admin__head h1 {
  font-size: var(--text-2xl);
  letter-spacing: -0.02em;
}

.od-admin__filters {
  gap: 2px;
  padding: 3px;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
}

.od-admin__filters .od-chip {
  border-radius: var(--radius-sm);
}

.od-admin__table {
  min-width: 1080px;
}

.od-admin__table td {
  height: 58px;
}

.od-admin__name {
  font-weight: 600;
}

.od-admin__muted {
  color: var(--color-muted);
}

.od-admin__date {
  font-family: var(--font-display);
  font-size: 12.5px;
  white-space: nowrap;
}

.od-admin__left {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-good);
}

/* Trial status: a dot and a word in the same color */
.od-admin__trial {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
  color: var(--color-muted);
  white-space: nowrap;
}

.od-admin__trial::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: var(--radius-full);
  background: currentColor;
}

.od-admin__trial--active { color: var(--color-good); }
.od-admin__trial--expired { color: var(--color-bad); }

.od-admin__off { color: var(--color-bad); }
.od-admin__on { color: var(--color-good); }

.od-admin__table td:last-child {
  width: 140px;
}

.od-admin__empty {
  padding: 32px;
  text-align: center;
  color: var(--color-muted);
}

.od-admin__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--text-md);
}

.od-admin__pages {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.od-admin__pages .od-chip {
  justify-content: center;
  min-width: 38px;
  height: 38px;
  border: 1px solid var(--color-line);
}

.od-admin__pages .od-chip[aria-current="page"] {
  border-color: transparent;
}

.od-admin__loading {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-muted);
}

/* Feedback in the drawer */
.od-feedback-item--raised {
  background: var(--color-raised);
}

.od-feedback-item.is-unread {
  border-color: var(--color-accent);
}

.od-feedback-item__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

@media (max-width: 700px) {
  .od-admin {
    padding: 20px 16px 40px;
  }

  .od-admin__stats dd {
    font-size: 30px;
  }

  .od-admin__tag {
    display: none;
  }
}
