/* Riverbend Dental's own apps, in its own brand ("Bright and friendly", the direction it picked).
   A customer's app is never in Dawn: these are the sample's colors, with the coral darkened so
   white text on it and it as text both pass 4.5:1. */
.rb {
  --rb-accent: #b8432f;
  --rb-tint: #fde8e1;
  --rb-soft: #f3d6cc;
  --rb-ground: #fffaf6;
  --rb-card: #ffffff;
  --rb-ink: #2b1e1a;
  --rb-muted: #6b5a53;
  --rb-line: #eaded6;
  --rb-ok: #1d6b43;
  --rb-ok-tint: #e3f1e9;
  --rb-warn: #855600;
  --rb-warn-tint: #fdf0d5;
  color: var(--rb-ink);
  font-family: var(--font-sans);
}
.rb-logo {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 7px;
  background: var(--rb-accent);
  color: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: var(--weight-semibold);
}

/* The patient's phone */
.phone {
  --pw: 220px;
  --ph: 440px;
  position: relative;
  flex: none;
  width: var(--pw);
  height: var(--ph);
  padding: 7px;
  border-radius: 36px;
  border: var(--border) solid var(--line-strong);
  background: #101113;
}
.s-plan .phone {
  --pw: 196px;
  --ph: 388px;
}
.phone .scr {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 29px;
  background: var(--rb-ground);
  overflow: hidden;
}
.p-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  flex: none;
  padding: 0 18px;
  font-size: 12px;
  font-weight: var(--weight-semibold);
}
.p-island {
  width: 60px;
  height: 18px;
  border-radius: 999px;
  background: #101113;
}
.p-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 4px 14px 10px;
  border-bottom: 1px solid var(--rb-line);
  font-size: 14px;
  font-weight: var(--weight-semibold);
}
.p-name {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.p-screens {
  position: relative;
  flex: 1;
}
.p-screen {
  position: absolute;
  inset: 0;
  padding: 14px;
  opacity: 0;
  transform: translateX(18px);
  transition:
    opacity 260ms var(--ease-out),
    transform 260ms var(--ease-out);
}
.p-screen.show {
  opacity: 1;
  transform: none;
}
.p-screen.left {
  transform: translateX(-18px);
}
.p-k {
  margin: 0;
  color: var(--rb-muted);
  font-size: 12px;
}
.p-screen h4 {
  margin: 4px 0 12px;
  color: var(--rb-ink);
  font-size: 18px;
  font-weight: var(--weight-semibold);
  letter-spacing: -0.01em;
}
.p-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.p-slots span {
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--rb-line);
  background: var(--rb-card);
  font-size: 13px;
  font-weight: var(--weight-medium);
  transition:
    background 160ms,
    color 160ms,
    border-color 160ms;
}
.p-slots .taken {
  background: transparent;
  color: var(--rb-muted);
  text-decoration: line-through;
}
.p-slots .pressed {
  border-color: var(--rb-accent);
  background: var(--rb-accent);
  color: #fff;
}
.p-note {
  margin: 12px 0 0;
  color: var(--rb-muted);
  font-size: 12px;
  line-height: 1.45;
}
.p-sum {
  border: 1px solid var(--rb-line);
  border-radius: 14px;
  background: var(--rb-card);
  font-size: 13px;
}
.p-sum > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
}
.p-sum > div + div {
  border-top: 1px solid var(--rb-line);
}
.p-sum b {
  font-weight: var(--weight-semibold);
}
.p-btn {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 16px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--rb-accent);
  color: #fff;
  font-size: 14px;
  font-weight: var(--weight-semibold);
  transition: transform 120ms;
}
.p-btn.pressed {
  transform: scale(0.96);
}
.p-done {
  text-align: center;
}
.p-done p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}
.p-check {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin: 28px auto 12px;
  border-radius: 50%;
  background: var(--rb-accent);
  color: #fff;
}
.p-check svg {
  width: 26px;
  height: 26px;
}
.p-check path {
  stroke-width: 2.2;
}
.p-tap {
  position: absolute;
  z-index: 2;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 2px solid rgba(43, 30, 26, 0.4);
  background: rgba(43, 30, 26, 0.16);
  opacity: 0;
  pointer-events: none;
}
.p-tap.go {
  animation: rb-tap 520ms var(--ease-out);
}
@keyframes rb-tap {
  0% {
    opacity: 0;
    transform: scale(1.5);
  }
  35% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.85);
  }
}

/* The clinic's console */
.rb-console {
  position: relative;
  min-width: 0;
  border-radius: 14px;
  border: 1px solid var(--rb-line);
  background: var(--rb-ground);
  font-size: 13px;
  overflow: hidden;
}
.rb-console.mini {
  flex: 1;
}
.rb-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rb-line);
  background: var(--rb-card);
}
.rb-top b {
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}
.rb-nav {
  display: flex;
  gap: 4px;
  margin-inline-start: 12px;
}
.rb-console.mini .rb-nav {
  margin-inline-start: auto;
}
.rb-nav span {
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--rb-muted);
}
.rb-nav .on {
  background: var(--rb-tint);
  color: var(--rb-ink);
  font-weight: var(--weight-medium);
}
.rb-h {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 14px 8px;
}
.rb-h b {
  font-size: 16px;
  font-weight: var(--weight-semibold);
}
.rb-h span {
  color: var(--rb-muted);
  font-size: 12px;
}
.rb-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.rb-list li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-top: 1px solid var(--rb-line);
}
.rb-list .tm {
  font-weight: var(--weight-semibold);
}
.rb-list .who {
  min-width: 0;
  color: var(--rb-muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rb-list .who b {
  display: block;
  color: var(--rb-ink);
  font-size: 13px;
  font-weight: var(--weight-semibold);
}
.rb-list .rb-new {
  display: none;
  background: var(--rb-tint);
}
.rb-list .rb-new.in {
  display: grid;
  animation: xp-in 400ms var(--ease-out) both;
}
.pill {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--rb-line);
  font-size: 12px;
  font-weight: var(--weight-medium);
  white-space: nowrap;
}
.pill.ok {
  border-color: transparent;
  background: var(--rb-ok-tint);
  color: var(--rb-ok);
}
.pill.warn {
  border-color: transparent;
  background: var(--rb-warn-tint);
  color: var(--rb-warn);
}
.pill.new {
  border-color: transparent;
  background: var(--rb-accent);
  color: #fff;
}

/* The console's numbers */
.rb-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 14px 0;
}
.rb-kpi {
  position: relative;
  padding: 10px 12px;
  border: 1px solid var(--rb-line);
  border-radius: 12px;
  background: var(--rb-card);
}
.rb-kpi > span {
  color: var(--rb-muted);
  font-size: 12px;
}
.rb-kpi b {
  display: block;
  margin-top: 2px;
  font-size: 26px;
  font-weight: var(--weight-semibold);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.rb-kpi em {
  position: absolute;
  top: 10px;
  right: 12px;
  color: var(--rb-ok);
  font-size: 12px;
  font-style: normal;
  font-weight: var(--weight-semibold);
  opacity: 0;
}
.rb-kpi em.go {
  animation: rb-delta 1600ms var(--ease-out);
}
@keyframes rb-delta {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  15%,
  70% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 0;
    transform: translateY(-4px);
  }
}
.rb-meter {
  display: block;
  height: 4px;
  margin-top: 6px;
  border-radius: 2px;
  background: var(--rb-line);
  overflow: hidden;
}
.rb-meter i {
  display: block;
  width: 70%;
  height: 100%;
  background: var(--rb-accent);
  transition: width 500ms var(--ease-out);
}
.rb-body {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: 10px;
  padding: 10px 14px 14px;
}
.rb-panel {
  min-width: 0;
  padding: 10px 12px 12px;
  border: 1px solid var(--rb-line);
  border-radius: 12px;
  background: var(--rb-card);
}
.rb-panel .ph {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--rb-muted);
  font-size: 12px;
  white-space: nowrap;
}
.rb-panel .ph b {
  color: var(--rb-ink);
  font-size: 13px;
  font-weight: var(--weight-semibold);
}

/* The week, slot by slot */
.rb-cal {
  display: grid;
  grid-template-columns: 34px repeat(5, minmax(0, 1fr));
  gap: 3px;
}
.rb-cal .d {
  padding-bottom: 2px;
  color: var(--rb-muted);
  font-size: 12px;
  text-align: center;
}
.rb-cal .t {
  padding-inline-end: 4px;
  color: var(--rb-muted);
  font-size: 12px;
  line-height: 24px;
  text-align: end;
}
.rb-cal .c {
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--rb-tint);
  color: var(--rb-ink);
  font-size: 12px;
  line-height: 24px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rb-cal .c.free {
  border: 1px dashed var(--rb-line);
  background: transparent;
}
.rb-cal .c.new {
  background: var(--rb-accent);
  color: #fff;
  animation: rb-pop 520ms var(--ease-out);
}
.rb-cal .c.just {
  box-shadow:
    0 0 0 2px var(--rb-card),
    0 0 0 4px var(--rb-accent);
}
@keyframes rb-pop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  60% {
    transform: scale(1.08);
  }
}

/* Booked money, by week */
.rb-bars {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 196px;
}
.rb-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  height: 100%;
  min-width: 0;
}
.rb-bar b {
  font-size: 12px;
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}
.rb-bar i {
  display: block;
  width: 100%;
  max-height: calc(100% - 40px);
  border-radius: 6px 6px 2px 2px;
  background: var(--rb-soft);
  transition: height 600ms var(--ease-out);
}
.rb-bar.now i {
  background: var(--rb-accent);
}
.rb-bar span {
  color: var(--rb-muted);
  font-size: 12px;
  white-space: nowrap;
}

/* A new booking, as the front desk sees it, at the right of the console's top bar */
.rb-toast {
  position: absolute;
  top: 7px;
  right: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 380px);
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  background: var(--rb-ink);
  color: #fff;
  font-size: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 300ms var(--ease-out),
    transform 300ms var(--ease-out);
}
.rb-toast.in {
  opacity: 1;
  transform: none;
}
.rb-toast b {
  font-size: 12px;
  font-weight: var(--weight-semibold);
}
.rb-toast span {
  overflow: hidden;
  text-overflow: ellipsis;
  color: #eadfd9;
}

@media (max-width: 1080px) {
  .rb-chart-panel {
    display: none;
  }
  .rb-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .s-plan .phone {
    --pw: 168px;
    --ph: 324px;
  }
  .s-plan .p-check {
    width: 44px;
    height: 44px;
    margin: 16px auto 8px;
  }
  .s-plan .p-done p {
    font-size: 12px;
  }
  .s-earn .phone {
    --pw: 168px;
    --ph: 344px;
    padding: 5px;
    border-radius: 28px;
  }
  .s-earn .phone .scr {
    border-radius: 23px;
  }
  .s-earn .p-top {
    padding: 2px 10px 8px;
    font-size: 12px;
  }
  .s-earn .p-status {
    padding: 0 12px;
  }
  .s-earn .p-island {
    width: 40px;
  }
  .s-earn .p-screen {
    padding: 10px;
  }
  .s-earn .p-screen h4 {
    font-size: 15px;
    margin-bottom: 8px;
  }
  .s-earn .p-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .s-earn .p-slots span {
    height: 32px;
    font-size: 12px;
  }
  .s-earn .p-sum > div {
    padding: 8px;
    font-size: 12px;
  }
  .s-earn .p-btn {
    left: 10px;
    right: 10px;
    height: 40px;
    font-size: 13px;
  }
  .s-earn .p-check {
    width: 44px;
    height: 44px;
    margin-top: 20px;
  }
  .s-earn .p-done p {
    font-size: 12px;
  }
  .rb-console.full .rb-nav,
  .rb-console.full .rb-cal-panel {
    display: none;
  }
  .rb-console.full .rb-top b {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .rb-kpis {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 10px 10px 0;
  }
  .rb-kpi b {
    font-size: 22px;
  }
  .rb-body {
    padding: 8px 10px 10px;
  }
  .rb-kpi em {
    position: static;
    display: block;
    margin-top: 2px;
  }
  .rb-toast {
    left: 40px;
    right: 6px;
    max-width: none;
  }
  .rb-toast span {
    display: none;
  }
}

/* The chart's week names: whole on a wide screen, short in a phone's narrow column */
.rb-bar .short {
  display: none;
}
@media (max-width: 720px) {
  .rb-console.full .rb-chart-panel {
    display: block;
  }
  .rb-chart-panel .ph span {
    display: none;
  }
  .rb-bars {
    height: 132px;
    gap: 8px;
  }
  .rb-bar:not(.now) b {
    visibility: hidden;
  }
  .rb-bar .long {
    display: none;
  }
  .rb-bar .short {
    display: inline;
  }
}
