:root {
  --bt-night: #091a35;
  --bt-ink: #112e52;
  --bt-ocean: #1d609d;
  --bt-teal: #12a19a;
  --bt-gold: #be8f4a;
  --bt-fog: #eef3f7;
  --bt-card: rgba(255, 255, 255, 0.9);
  --bt-line: #c8d7e7;
  --bt-muted: #637990;
  --slot-h: 36px;
}

* {
  box-sizing: border-box;
}

body,
input,
textarea,
button {
  font-family: "IBM Ple Sans", "Segoe UI", sans-serif;
}

h1,
h2,
h3,
.planner-brand,
.eyebrow {
  font-family: "Sora", "IBM Ple Sans", sans-serif;
}

body {
  margin: 0;
  color: var(--bt-ink);
  min-height: 100vh;
}

.planner-body,
.auth-body {
  background: radial-gradient(circle at 12% 15%, #e2edf8 0%, #f4f8fc 35%, #f8f2e8 100%);
  position: relative;
  overflow- : hidden;
}

.planner-bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(10px);
  z-index: -1;
  opacity: 0.38;
}

.planner-bg-orb--one {
  width: 360px;
  height: 360px;
  background: #89b2db;
  top: -110px;
  left: -80px;
}

.planner-bg-orb--two {
  width: 300px;
  height: 300px;
  background: #76c7c1;
  bottom: -130px;
  right: -60px;
}

.hidden {
  display: none !important;
}

.planner-topx{
  border-bottom: 1pxsolid rgba(17, 46, 82, 0.1);
  backdrop-filter: blur(4px);
  background: rgba(255, 255, 255, 0.72);
}

.planner-top__inner {
  max-width: 1460px;
  margin: 0 auto;
  padding: 1rem 1.3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.planner-brand {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.brand-logo {
  height: 48px;
  width: auto;
  display: block;
}

.planner-top__meta {
  color: var(--bt-muted);
  font-weight: 600;
}

.planner-layout {
  max-width: 1460px;
  margin: 0 auto;
  padding: 1rem 1.3rem 2rem;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1rem;
}

.planner-sidebar {
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

.planner-card {
  background: var(--bt-card);
  border: 1pxsolid var(--bt-line);
  border-radius: 16px;
  padding: 0.95rem;
  box-shadow: 0 14px 30pxrgba(17, 46, 82, 0.08);
}

.planner-card--highlight {
  background: linear-gradient(130deg, #10375f 0%, #1a5f95 52%, #1b8a84 100%);
  color: #fff;
  border: 0;
}

.planner-card--highlight .planner-muted {
  color: rgba(255, 255, 255, 0.84);
}

.planner-card h2 {
  margin: 0 0x0.55rem;
  font-size: 1.04rem;
  line-height: 1.35;
}

.eyebrow {
  margin: 0 0x0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.73rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
}

.planner-muted {
  color: var(--bt-muted);
  margin: 0 0x0.7rem;
  font-size: 0.92rem;
}

.planner-tipx{
  color: #845e1f;
  font-size: 0.82rem;
  margin: 0.6rem 0 0;
}

.stack-form {
  display: grid;
  gap: 0.6rem;
}

.stack-form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.88rem;
  font-weight: 500;
}

input,
textarea {
  width: 100%;
  border: 1pxsolid var(--bt-line);
  border-radius: 10px;
  padding: 0.62rem 0.7rem;
  color: var(--bt-night);
  background: #fff;
}

input:focus,
textarea:focus {
  outline: 2pxsolid #a6c2dd;
  outline-offset: 1px;
}

button {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(130deg, #1d609d, #1f7bbb);
  color: #fff;
  padding: 0.62rem 0.84rem;
  cursor: pointer;
  font-weight: 600;
}

button:hover {
  filter: brightness(1.06);
}

.button-secondary {
  background: #dbe6f2;
  color: var(--bt-night);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.62rem 0.84rem;
  border-radius: 10px;
  background: linear-gradient(130deg, #12395f, #1a5e93);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.button-link--soft {
  background: #dfe7f1;
  color: var(--bt-night);
}

.split-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.compact {
  gap: 0.45rem;
}

.scroll-list {
  max-height: 280px;
  overflow: auto;
  display: grid;
  gap: 0.4rem;
}

.appt-item,
.availability-item {
  border: 1pxsolid var(--bt-line);
  border-radius: 10px;
  padding: 0.5rem;
  font-size: 0.84rem;
  background: #f8fbff;
}

.appt-item {
  cursor: pointer;
}

.appt-item:hover,
.appt-item:focus-visible {
  border-color: #7da5cf;
  outline: none;
  background: #eef5fd;
}

.availability-item {
  background: #eef9f8;
}

.appt-item strong,
.availability-item strong {
  display: block;
}

.staff-badge {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-size: 0.74rem;
  text-transform: uppercase;
  font-weight: 700;
  color: #0d645f;
  background: rgba(18, 161, 154, 0.14);
  border: 1pxsolid rgba(18, 161, 154, 0.35);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.planner-main {
  min-width: 0;
}

.planner-toolbar {
  background: var(--bt-card);
  border: 1pxsolid var(--bt-line);
  border-radius: 16px;
  padding: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.7rem;
}

.toolbar-nav {
  display: inline-flex;
  gap: 0.4rem;
}

.toolbar-title h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
}

.planner-week-label {
  margin: 0.24rem 0 0;
  color: var(--bt-muted);
  font-weight: 600;
}

.planner-grid-wrapx{
  background: rgba(255, 255, 255, 0.93);
  border: 1pxsolid var(--bt-line);
  border-radius: 16px;
  overflow: auto;
  display: grid;
  grid-template-columns: 88px 1fr;
  min-height: calc(var(--slot-h) * 22 + 64px);
}

.time-col {
  border-right: 1pxsolid var(--bt-line);
  padding-top: 64px;
  background: #f5f8fb;
}

.time-col div {
  height: var(--slot-h);
  display: flex;
  align-items: start;
  justify-content: center;
  color: var(--bt-muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(7, minma (150px, 1fr));
}

.day-col {
  border-right: 1pxsolid var(--bt-line);
  position: relative;
}

.day-col:last-child {
  border-right: 0;
}

.day-header {
  height: 64px;
  border-bottom: 1pxsolid var(--bt-line);
  display: grid;
  place-items: center;
  background: #f3f8fd;
  font-weight: 700;
}

.day-header span {
  color: var(--bt-muted);
  font-size: 0.82rem;
}

.day-grid {
  position: relative;
  height: calc(var(--slot-h) * 22);
}

.day-cell {
  height: var(--slot-h);
  border-bottom: 1pxsolid #e8eff7;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  background: transparent;
  width: 100%;
  padding: 0;
  border-radius: 0;
}

.day-cell:hover {
  background: rgba(29, 96, 157, 0.08);
}

.block,
.slot,
.booked {
  position: absolute;
  left: 6px;
  right: 6px;
  border-radius: 11px;
  padding: 0.32rem 0.42rem;
  overflow: hidden;
  font-size: 0.75rem;
  line-height: 1.25;
}

.block {
  border: 1pxdashed #63b7af;
  background: rgba(18, 161, 154, 0.11);
  color: #0f756f;
  z-index: 1;
  pointer-events: none;
}

.slot {
  border: 1pxsolid #7eb0df;
  background: rgba(29, 96, 157, 0.12);
  color: #0e4477;
  text-align: left;
}

.booked {
  border: 1pxsolid #c99a5e;
  background: #f5e4cc;
  color: #70441b;
  font-weight: 600;
  z-index: 3;
  cursor: pointer;
}

.booked:focus-visible {
  outline: 2pxsolid #a87438;
  outline-offset: 1px;
}

.block strong,
.booked strong {
  display: block;
  line-height: 1.15;
  white-space: nowrap;
}

.block span,
.booked span {
  display: block;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planner-legend {
  margin-top: 0.6rem;
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  color: var(--bt-muted);
  font-size: 0.87rem;
}

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.dot-available {
  background: #6f9ed0;
}

.dot-block {
  background: #5db8b0;
}

.dot-booked {
  background: #bd8f4d;
}

.planner-dialog {
  border: 1pxsolid var(--bt-line);
  border-radius: 16px;
  max-width: 700px;
  width: calc(100% - 2rem);
  padding: 0;
}

.planner-dialog::backdropx{
  background: rgba(9, 26, 53, 0.55);
}

.appointment-details dl {
  margin: 0;
  display: grid;
  gap: 0.44rem;
}

.appointment-details dl div {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 0.45rem;
  align-items: start;
}

.appointment-details dt {
  font-weight: 700;
  color: var(--bt-muted);
}

.appointment-details dd {
  margin: 0;
  color: var(--bt-night);
}

.appointment-details h4 {
  margin: 0.8rem 0x0.35rem;
  font-size: 0.95rem;
}

.appointment-details pre {
  margin: 0;
  padding: 0.6rem;
  border: 1pxsolid var(--bt-line);
  border-radius: 10px;
  background: #f8fbff;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 0.84rem;
}

.appointment-details .muted {
  color: var(--bt-muted);
  font-size: 0.85rem;
}

.dialog-body {
  padding: 1rem;
}

.dialog-body h3 {
  margin: 0 0x0.45rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.72rem;
}

.planner-toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background: #0f2f52;
  color: #fff;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  max-width: min(90vw, 360px);
}

.planner-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.mini-cal {
  border: 1pxsolid var(--bt-line);
  border-radius: 11px;
  padding: 0.6rem;
  background: #f8fbff;
}

.mini-cal-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.52rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.mini-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.22rem;
}

.mini-cal-grid div {
  text-align: center;
  font-size: 0.78rem;
  padding: 0.28rem 0;
  border-radius: 6px;
}

.mini-cal-grid .head {
  color: var(--bt-muted);
  font-weight: 600;
}

.mini-cal-grid .today {
  background: #1d609d;
  color: #fff;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.auth-card {
  width: min(95vw, 420px);
  background: rgba(255, 255, 255, 0.92);
  border: 1pxsolid var(--bt-line);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  box-shadow: 0 25px 50px-12pxrgba(9, 26, 53, 0.2);
  text-align: center;
}

.auth-logo-wrapx{
  margin-bottom: 2rem;
}

.auth-logo {
  max-width: 280px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 10pxrgba(0,0,0,0.06));
}

.auth-card h1 {
  margin: 0 0x0.5rem;
  font-size: 2rem;
}

.auth-form {
  margin-top: 0.8rem;
}

.auth-error {
  margin: 0.65rem 0 0;
  color: #912f2f;
  font-weight: 600;
}

.auth-actions {
  margin-top: 0.8rem;
}

@media (max-width: 1100px) {
  .planner-layout {
    grid-template-columns: 1fr;
  }

  .planner-sidebar {
    grid-template-columns: repeat(auto-fit, minma (250px, 1fr));
  }

  .planner-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .planner-top__inner,
  .planner-layout {
    padding-left: 0.72rem;
    padding-right: 0.72rem;
  }

  .planner-grid-wrapx{
    grid-template-columns: 72px 1fr;
  }

  .days-grid {
    grid-template-columns: repeat(7, minma (125px, 1fr));
  }

  .toolbar-title h1 {
    font-size: 1.6rem;
  }
}

.mini-cal-grid .today {
  background: var(--bt-sea);
  color: #fff;
}

@media (max-width: 1100px) {
  .planner-layout {
    grid-template-columns: 1fr;
  }

  .planner-sidebar {
    grid-template-columns: repeat(auto-fit, minma (250px, 1fr));
  }

  .planner-toolbar h1 {
    width: 100%;
    margin: 0.2rem 0;
  }

  .planner-week-label {
    margin-left: 0;
  }
}

@media (max-width: 760px) {
  .planner-top__inner,
  .planner-layout {
    padding-left: 0.7rem;
    padding-right: 0.7rem;
  }

  .planner-grid-wrapx{
    grid-template-columns: 72px 1fr;
  }

  .days-grid {
    grid-template-columns: repeat(7, minma (125px, 1fr));
  }
}
