/* Customer login and /my shell. Colours come from /theme.css. */

body.cu-body {
  font-family: var(--at-font);
  background: var(--at-canvas);
  color: var(--at-ink);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body.theme-skincare.cu-body {
  background: #fdf5e8;
  color: var(--at-secondary, #0a3366);
}

body.theme-medical.cu-body {
  background: #f4f9fc;
  color: var(--at-secondary, #031b4e);
}

body.theme-nourish.cu-body {
  background: var(--nv-cream, #f4f0e8);
  color: var(--nv-ink, var(--at-secondary));
}

.cu-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  min-width: 0;
}

.cu-brand img,
.cu-auth-logo {
  display: block;
  height: calc(2.25rem * var(--at-logo-scale, 1));
  width: auto;
  max-width: 9rem;
  object-fit: contain;
}

.cu-brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Logged-in bar ------------------------------------------------------- */

.cu-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 3.75rem;
  padding: 0.6rem 1.1rem;
  padding-top: calc(0.6rem + env(safe-area-inset-top));
  background: var(--at-surface);
  border-bottom: 1px solid var(--at-line);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--at-primary) 22%, transparent);
}

.cu-bar-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
  margin-inline-start: auto;
}

.cu-bar-nav a {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: var(--at-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.cu-bar-nav a.is-active {
  color: var(--at-secondary, var(--at-ink));
  background: color-mix(in srgb, var(--at-primary) 12%, #fff);
}

.cu-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-inline-start: auto;
}

.cu-bar-cta,
.cu-bar-out,
.cu-btn,
.cu-auth-book {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 0;
}

.cu-bar-cta,
.cu-btn,
.cu-auth-book {
  background: var(--at-primary);
  color: #fff;
}

.cu-bar-cta:hover,
.cu-btn:hover,
.cu-auth-book:hover,
.cu-body .btn-primary:hover {
  color: #fff;
  background: color-mix(in srgb, var(--at-primary) 85%, #000);
  border-color: transparent;
}

.cu-body .btn-primary {
  background: var(--at-primary);
  border-color: var(--at-primary);
  color: #fff;
}

.cu-body .form-control:focus,
.cu-body .form-select:focus {
  border-color: color-mix(in srgb, var(--at-primary) 55%, var(--at-line));
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--at-primary) 16%, transparent);
}

.cu-bar-out {
  background: transparent;
  color: var(--at-muted);
  border: 1px solid var(--at-line);
}

.cu-main {
  flex: 1;
}

.cu-wrap {
  width: min(72rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
}

.cu-pagehead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  margin-bottom: 1.5rem;
}

.cu-pagehead h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.4;
  color: var(--at-secondary, var(--at-ink));
}

.cu-pagehead p {
  margin: 0.25rem 0 0;
  color: var(--at-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.cu-section-title {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--at-secondary, var(--at-ink));
}

.cu-muted {
  color: var(--at-muted);
}

.cu-empty {
  display: grid;
  justify-items: center;
  gap: 0.85rem;
  padding: 2.25rem 1.25rem;
  text-align: center;
  background: var(--at-surface);
  border: 1px solid var(--at-line);
  border-radius: 1.15rem;
}

.cu-empty p {
  margin: 0;
  color: var(--at-muted);
}

.cu-panel,
.cu-appt,
.cu-past-card {
  background: var(--at-surface);
  border: 1px solid var(--at-line);
  border-radius: 1.15rem;
}

.cu-panel {
  padding: 1.15rem 1.2rem 1.25rem;
  overflow: hidden;
}

.cu-panel--form {
  max-width: 42rem;
}

.cu-panel--flush {
  padding: 0;
}

.cu-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cu-panel__head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--at-secondary, var(--at-ink));
}

.cu-panel__hint {
  margin: 0 0 0.9rem;
  color: var(--at-muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.cu-dl {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

.cu-dl > div {
  display: grid;
  gap: 0.2rem;
}

.cu-dl dt {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--at-muted);
}

.cu-dl dd {
  margin: 0;
  font-weight: 600;
}

.cu-dl__hint {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--at-muted);
}

.cu-dl--pay > div {
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem;
}

.cu-dl__strong {
  font-weight: 800;
  color: var(--at-primary);
}

.cu-note {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-radius: 0.85rem;
  font-size: 0.9rem;
  line-height: 1.65;
}

.cu-note--ok {
  background: color-mix(in srgb, #198754 12%, #fff);
  color: #0f5132;
}

.cu-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--at-line);
  background: transparent;
  color: var(--at-secondary, var(--at-ink));
  font-weight: 700;
  font-size: 0.86rem;
  text-decoration: none;
}

.cu-ghost:hover {
  border-color: var(--at-primary);
  color: var(--at-primary);
  background: color-mix(in srgb, var(--at-primary) 8%, #fff);
}

.cu-ghost--danger {
  color: #b42318;
}

.cu-ghost--danger:hover {
  border-color: #b42318;
  color: #b42318;
  background: color-mix(in srgb, #b42318 8%, #fff);
}

.cu-appt {
  padding: 1.1rem 1.15rem 1.2rem;
}

.cu-appt__meta {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  font-size: 0.9rem;
  color: var(--at-muted);
}

.cu-appt__meta li + li {
  margin-top: 0.35rem;
}

.cu-table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: color-mix(in srgb, var(--at-primary) 6%, transparent);
}

.cu-table > :not(caption) > * > * {
  padding: 0.85rem 1rem;
  border-color: var(--at-line);
  background: transparent;
}

.cu-table thead th,
.cu-table tfoot th {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--at-muted);
  background: color-mix(in srgb, var(--at-primary) 6%, var(--at-surface));
}

.cu-body .form-control,
.cu-body .form-select {
  min-height: 2.85rem;
  border-radius: 0.85rem;
  border-color: var(--at-line);
}

.cu-body .badge.bg-primary {
  background: var(--at-primary) !important;
}

.cu-body .modal-content {
  border-radius: 1.1rem;
  border-color: var(--at-line);
}

.cu-appt .card-body,
.cu-body .cu-appt.card {
  border-radius: 1rem;
}

.cu-appt__foot,
.cu-past-card .cu-appt__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cu-past-cards {
  display: grid;
  gap: 0.75rem;
}

.cu-past-card {
  background: var(--at-surface);
  border: 1px solid var(--at-line);
  border-radius: 1rem;
  padding: 1rem 1.05rem;
}

.cu-body .card {
  background: var(--at-surface);
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius);
  box-shadow: none;
}

.cu-body .card-header {
  background: transparent;
  border-bottom-color: var(--at-line);
}

.cu-time {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--at-primary);
  font-variant-numeric: tabular-nums;
}

.cu-foot {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  color: var(--at-muted);
  font-size: 0.85rem;
}

.cu-foot a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.cu-dock {
  display: none;
}

/* Login --------------------------------------------------------------- */

.cu-auth-body {
  background:
    radial-gradient(48rem 22rem at 100% -10%, color-mix(in srgb, var(--at-primary) 14%, transparent), transparent 70%),
    var(--at-canvas);
}

body.theme-skincare.cu-auth-body {
  background:
    radial-gradient(48rem 22rem at 100% -10%, color-mix(in srgb, var(--at-primary) 16%, transparent), transparent 70%),
    #fdf5e8;
}

body.theme-medical.cu-auth-body {
  background:
    radial-gradient(48rem 22rem at 100% -10%, color-mix(in srgb, var(--at-primary) 16%, transparent), transparent 70%),
    #f4f9fc;
}

body.theme-nourish.cu-auth-body {
  background:
    radial-gradient(48rem 22rem at 100% -10%, color-mix(in srgb, var(--at-accent, #c8945a) 18%, transparent), transparent 70%),
    var(--nv-cream, #f4f0e8);
}

.cu-auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: calc(0.85rem + env(safe-area-inset-top)) 1.1rem 0.85rem;
}

.cu-auth-home {
  color: var(--at-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.cu-auth {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem 1.5rem;
}

.cu-auth-frame {
  display: grid;
  width: min(56rem, 100%);
  margin: 0 auto;
  background: var(--at-surface);
  border: 1px solid var(--at-line);
  border-radius: 1.25rem;
  overflow: hidden;
}

.cu-auth-brand-panel {
  display: none;
  padding: 2.25rem 2rem;
  background: color-mix(in srgb, var(--at-primary) 8%, var(--at-surface));
}

.cu-auth-book {
  align-self: flex-start;
  margin-top: 0.25rem;
}

.cu-auth-logo {
  height: calc(3.25rem * var(--at-logo-scale, 1));
  max-width: 11rem;
  margin-bottom: 1.1rem;
}

.cu-auth-clinic {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.4;
}

.cu-auth-tagline {
  margin: 0 0 1.25rem;
  color: var(--at-muted);
  line-height: 1.7;
}

.cu-auth-card {
  padding: 1.5rem 1.25rem 1.35rem;
}

.cu-auth-card h1 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 0.4rem;
  color: var(--at-secondary, var(--at-ink));
}

.cu-auth-lead,
.cu-auth-hint {
  color: var(--at-muted);
  margin-bottom: 1.1rem;
  line-height: 1.7;
}

.cu-auth-note {
  margin: 0 0 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--at-radius-sm);
  background: color-mix(in srgb, var(--at-accent, #f5a623) 16%, #fff);
  color: var(--at-secondary, var(--at-ink));
  font-size: 0.85rem;
  line-height: 1.65;
}

.cu-auth-card .form-label {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.cu-input {
  min-height: 3rem;
  text-align: center;
  font-size: 1.05rem;
  border-radius: 0.85rem;
  direction: ltr;
}

.cu-input-code {
  letter-spacing: 0.35em;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.cu-btn {
  width: 100%;
  margin-top: 0.9rem;
}

.cu-resend {
  width: 100%;
  margin-top: 0.35rem;
  color: var(--at-muted);
  text-decoration: none;
}

.cu-auth-profile {
  margin-top: 0.9rem;
}

.cu-auth-profile .cu-input {
  direction: rtl;
  text-align: start;
}

.cu-auth-staff {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--at-muted);
}

.cu-auth-staff a {
  color: var(--at-primary);
  text-decoration: none;
  font-weight: 600;
}

.cu-auth-body .cu-foot {
  padding-bottom: calc(1.1rem + env(safe-area-inset-bottom));
}

@media (min-width: 768px) {
  .cu-auth-top {
    width: min(56rem, calc(100% - 2rem));
    margin: 0 auto;
    justify-content: flex-end;
    padding-inline: 0;
  }

  .cu-auth-top .cu-brand {
    display: none;
  }

  .cu-auth-frame {
    grid-template-columns: 1fr 1.15fr;
    min-height: 28rem;
  }

  .cu-auth-brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .cu-auth-card {
    padding: 2.25rem 2rem;
  }

  .cu-auth-card h1 {
    font-size: 1.6rem;
  }
}

@media (min-width: 992px) {
  .cu-bar-nav {
    display: flex;
  }

  .cu-bar-actions {
    margin-inline-start: 0;
  }

  .cu-wrap {
    padding-top: 2rem;
  }

  .cu-pagehead h1 {
    font-size: 1.7rem;
  }
}

@media (max-width: 991.98px) {
  .cu-bar-cta {
    display: none;
  }

  .cu-bar-out {
    min-width: 2.75rem;
    padding-inline: 0.75rem;
  }

  .cu-main {
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom));
  }

  .cu-body:not(.cu-auth-body) .cu-foot {
    display: none;
  }

  .cu-dock {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    background: var(--at-secondary, #1c2430);
    color: #fff;
    padding: 0.4rem 0.25rem calc(0.4rem + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.12);
  }

  .cu-dock a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.22rem;
    padding: 0.35rem 0.15rem;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 500;
  }

  .cu-dock a i,
  .cu-dock a i::before {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro" !important;
    font-weight: 900 !important;
    font-size: 1.12rem;
    line-height: 1;
    color: inherit !important;
    -webkit-text-fill-color: currentColor;
  }

  .cu-dock a.is-active {
    color: #fff;
    font-weight: 700;
  }

  .cu-dock a.is-active i,
  .cu-dock a.is-active i::before {
    color: var(--at-primary) !important;
    -webkit-text-fill-color: currentColor;
  }

  .cu-time {
    font-size: 1.25rem;
  }

  .cu-auth-top .cu-brand span {
    max-width: 11rem;
  }

  .cu-pagehead {
    margin-bottom: 1.15rem;
  }
}

@media (max-width: 767.98px) {
  .cu-wrap {
    width: calc(100% - 1.4rem);
    padding-top: 1.15rem;
  }
}
