:root {
  color-scheme: light;

  --espresso: #6a463f;
  --espresso-dark: #4f332e;
  --rose: #df8d98;
  --peach: #ff9f8a;

  --paper-solid: #fffaf8;
  --ink: #342522;
  --muted: #8d7771;
  --line: rgba(106, 70, 63, 0.11);

  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;

  color: var(--ink);

  background:
    linear-gradient(
      135deg,
      #f1e5e1 0%,
      #f8f3f0 46%,
      #fffdfb 100%
    );
}

body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  content: "";

  background:
    radial-gradient(
      circle at 7% 17%,
      rgba(106, 70, 63, 0.13),
      transparent 31rem
    ),
    radial-gradient(
      circle at 94% 78%,
      rgba(255, 159, 138, 0.16),
      transparent 34rem
    ),
    radial-gradient(
      circle at 67% 8%,
      rgba(223, 141, 152, 0.10),
      transparent 25rem
    );
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  position: relative;
  z-index: 1;

  width: min(
    1540px,
    calc(100% - 36px)
  );

  margin: 18px auto 54px;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 18px;

  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;

  min-height: 74px;
  padding: 10px 14px 10px 12px;

  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 24px;

  background: rgba(255, 250, 248, 0.76);

  box-shadow:
    0 22px 55px rgba(93, 59, 52, 0.10),
    0 4px 14px rgba(93, 59, 52, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);

  backdrop-filter: blur(24px) saturate(125%);
  -webkit-backdrop-filter: blur(24px) saturate(125%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-symbol {
  display: grid;
  place-items: center;

  width: 50px;
  height: 50px;

  border-radius: 16px;
  color: #ffffff;

  background:
    linear-gradient(
      145deg,
      var(--espresso),
      var(--espresso-dark)
    );

  box-shadow:
    0 12px 24px rgba(106, 70, 63, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);

  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-copy strong {
  font-size: 15px;
  letter-spacing: 0.4px;
}

.brand-copy small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.35px;
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-link {
  padding: 12px 16px;
  border-radius: 14px;

  color: #846d67;
  background: transparent;

  font-size: 14px;
  font-weight: 600;
  cursor: pointer;

  transition:
    color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.nav-link:hover {
  color: var(--espresso);
  background: rgba(106, 70, 63, 0.06);
  transform: translateY(-1px);
}

.nav-link.active {
  color: #ffffff;

  background:
    linear-gradient(
      135deg,
      var(--espresso),
      #795149
    );

  box-shadow:
    0 9px 22px rgba(106, 70, 63, 0.18);
}

.topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 10px 13px;
  border: 1px solid rgba(106, 70, 63, 0.08);
  border-radius: 14px;

  color: #765e58;
  background: rgba(255, 255, 255, 0.50);

  font-size: 12px;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;
  background: var(--rose);

  box-shadow:
    0 0 0 5px rgba(223, 141, 152, 0.12);
}

#current-time {
  color: #a18d87;
}

.main-content {
  padding: 28px 14px 0;
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;

  padding: 0 10px 18px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin: 0;
  font-size: clamp(29px, 3vw, 37px);
  line-height: 1;
  letter-spacing: -1.4px;
}

.heading-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.refresh-button,
.soft-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 43px;
  padding: 0 17px;
  border-radius: 14px;

  font-size: 12px;
  font-weight: 700;
  cursor: pointer;

  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.refresh-button {
  border: 1px solid rgba(223, 141, 152, 0.18);
  color: #985f68;
  background: rgba(223, 141, 152, 0.10);
}

.refresh-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.soft-button {
  border: 1px solid rgba(106, 70, 63, 0.10);
  color: var(--espresso);
  background: rgba(255, 250, 248, 0.74);
}

.primary-button {
  color: #ffffff;

  background:
    linear-gradient(
      135deg,
      var(--espresso),
      #7c5048 70%,
      #8e5d53
    );

  box-shadow:
    0 14px 28px rgba(106, 70, 63, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.refresh-button:hover,
.soft-button:hover,
.primary-button:hover {
  transform: translateY(-2px);
}

.date-panel {
  padding: 20px;

  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 26px;

  background: rgba(255, 250, 248, 0.70);

  box-shadow:
    0 22px 65px rgba(106, 70, 63, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);

  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.date-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;

  padding: 0 1px 14px;
}

.selected-date {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.selected-date-label {
  color: var(--muted);
  font-size: 11px;
}

.selected-date strong {
  font-size: 20px;
  letter-spacing: -0.4px;
}

.quick-jump-form {
  display: flex;
  align-items: center;
  gap: 6px;

  min-height: 40px;
  padding: 5px 6px 5px 12px;

  border: 1px solid rgba(106, 70, 63, 0.09);
  border-radius: 13px;

  color: #806963;
  background: rgba(255, 255, 255, 0.64);

  font-size: 11px;
}

.quick-jump-year {
  color: var(--muted);
}

.quick-jump-form input {
  height: 29px;

  border: 1px solid rgba(106, 70, 63, 0.10);
  border-radius: 8px;
  outline: none;

  color: var(--espresso);
  background: rgba(255, 255, 255, 0.92);

  text-align: center;
  font-weight: 700;
}

.quick-jump-form input:focus {
  border-color: rgba(223, 141, 152, 0.65);

  box-shadow:
    0 0 0 3px rgba(223, 141, 152, 0.11);
}

.month-input {
  width: 48px;
}

.day-input {
  width: 62px;
}

.day-input::placeholder {
  color: #b6a4a0;
  font-weight: 500;
}

.search-date-button {
  min-height: 29px;
  padding: 0 12px;

  border-radius: 8px;
  color: #ffffff;
  background: var(--espresso);

  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.date-navigation-row {
  display: flex;
  justify-content: center;
  padding: 0 0 14px;
}

.date-navigation {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 6px;
  border: 1px solid rgba(106, 70, 63, 0.07);
  border-radius: 15px;

  background: rgba(255, 255, 255, 0.43);
}

.week-button,
.day-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 35px;
  padding: 0 13px;

  border: 1px solid rgba(106, 70, 63, 0.08);
  border-radius: 10px;

  color: #755c56;
  background: rgba(255, 255, 255, 0.68);

  font-size: 11px;
  font-weight: 700;

  transition:
    transform 160ms ease,
    background 160ms ease;
}

.week-button {
  color: var(--espresso);
  background: rgba(106, 70, 63, 0.07);
}

.week-button:hover,
.day-button:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.quick-date-strip {
  display: grid;

  grid-template-columns:
    repeat(
      14,
      minmax(72px, 1fr)
    );

  gap: 8px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.quick-date {
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-width: 72px;
  min-height: 80px;
  padding: 9px 7px;

  border: 1px solid rgba(106, 70, 63, 0.07);
  border-radius: 16px;

  background: rgba(255, 255, 255, 0.52);

  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.quick-date:hover {
  z-index: 2;
  transform: translateY(-3px);

  background: rgba(255, 255, 255, 0.88);

  box-shadow:
    0 14px 28px rgba(106, 70, 63, 0.10);
}

.quick-date.selected {
  color: #ffffff;

  background:
    linear-gradient(
      150deg,
      var(--espresso),
      #7c5048
    );

  box-shadow:
    0 15px 30px rgba(106, 70, 63, 0.24);
}

.quick-date.weekend:not(.selected) {
  background:
    linear-gradient(
      150deg,
      rgba(223, 141, 152, 0.15),
      rgba(255, 159, 138, 0.12)
    );
}

.quick-date-week,
.quick-date-month {
  color: var(--muted);
  font-size: 10px;
}

.quick-date strong {
  margin: 3px 0;
  font-size: 20px;
  line-height: 1;
}

.quick-date.selected .quick-date-week,
.quick-date.selected .quick-date-month {
  color: rgba(255, 255, 255, 0.72);
}

.quick-date em {
  position: absolute;
  top: 6px;
  right: 6px;

  padding: 2px 5px;
  border-radius: 6px;

  color: var(--espresso);
  background: var(--peach);

  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.book-section {
  margin-top: 22px;
  padding: 22px;

  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 28px;

  background: rgba(255, 252, 250, 0.78);

  box-shadow:
    0 28px 80px rgba(93, 59, 52, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);

  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.book-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;

  padding: 3px 3px 20px;
}

.book-toolbar h2 {
  margin-bottom: 7px;
  font-size: 23px;
  letter-spacing: -0.7px;
}

.book-toolbar p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
}

.book-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.book-badges span {
  padding: 7px 10px;

  border: 1px solid rgba(106, 70, 63, 0.08);
  border-radius: 999px;

  color: #816a64;
  background: rgba(255, 255, 255, 0.60);

  font-size: 10px;
  font-weight: 700;
}

.appointment-book {
  overflow: hidden;

  border: 1px solid rgba(106, 70, 63, 0.12);
  border-radius: 22px;

  background:
    linear-gradient(
      90deg,
      rgba(223, 141, 152, 0.055) 0,
      rgba(223, 141, 152, 0.055) 98px,
      transparent 98px
    ),
    var(--paper-solid);

  box-shadow:
    0 18px 42px rgba(106, 70, 63, 0.07);
}

.book-header,
.appointment-row {
  display: grid;

  grid-template-columns:
    98px
    minmax(300px, 1fr)
    92px
    66px
    100px
    190px;

  align-items: center;
}

.book-header {
  min-height: 46px;
  padding: 0 14px;

  color: #8c746e;

  background:
    linear-gradient(
      90deg,
      rgba(106, 70, 63, 0.07),
      rgba(223, 141, 152, 0.055),
      rgba(255, 159, 138, 0.045)
    );

  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.appointment-row {
  position: relative;

  min-height: 76px;
  padding: 0 14px;

  border-top: 1px solid var(--line);

  transition:
    background 180ms ease,
    box-shadow 180ms ease;
}

.appointment-row::before {
  position: absolute;
  left: 97px;
  top: 0;
  bottom: 0;

  width: 1px;
  content: "";

  background: rgba(223, 141, 152, 0.16);
}

.appointment-row:hover {
  z-index: 2;

  background:
    linear-gradient(
      90deg,
      rgba(223, 141, 152, 0.075),
      rgba(255, 255, 255, 0.90)
    );

  box-shadow:
    0 13px 30px rgba(106, 70, 63, 0.08);
}

.slot-time {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slot-time strong {
  color: var(--espresso);
  font-size: 16px;
}

.slot-time span {
  color: #aa938d;
  font-size: 9px;
}

.empty-reservation {
  display: flex;
  align-items: center;
  gap: 12px;

  min-width: 0;
  padding: 0 22px;
}

.empty-mark {
  flex: 0 0 auto;

  width: 9px;
  height: 9px;

  border: 2px solid rgba(106, 70, 63, 0.25);
  border-radius: 50%;
}

.empty-reservation div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.empty-reservation strong {
  color: #725b55;
  font-size: 13px;
}

.empty-reservation small {
  overflow: hidden;

  color: #a28d87;
  font-size: 10px;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-cell {
  color: #8e7973;
  font-size: 11px;
}

.muted-cell {
  color: #b9a8a3;
}

.o-indicator {
  display: grid;
  place-items: center;

  width: 26px;
  height: 26px;

  border: 1px solid rgba(106, 70, 63, 0.14);
  border-radius: 50%;

  color: #b19c96;
  background: rgba(255, 255, 255, 0.54);

  font-size: 9px;
  font-weight: 800;
}

.free-status {
  display: inline-flex;
  padding: 6px 9px;

  border-radius: 999px;

  color: #8a6f68;
  background: rgba(106, 70, 63, 0.07);

  font-size: 9px;
  font-weight: 800;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.row-primary-action,
.row-secondary-action {
  min-height: 34px;
  padding: 0 11px;

  border-radius: 10px;

  font-size: 10px;
  font-weight: 800;
  cursor: pointer;

  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.row-primary-action {
  color: #ffffff;
  background: var(--espresso);

  box-shadow:
    0 8px 16px rgba(106, 70, 63, 0.16);
}

.row-secondary-action {
  border: 1px solid rgba(223, 141, 152, 0.16);
  color: #a5626c;
  background: rgba(223, 141, 152, 0.10);
}

.row-primary-action:hover,
.row-secondary-action:hover {
  transform: translateY(-1px);
}

.book-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;

  padding: 17px 5px 2px;

  color: var(--muted);
  font-size: 10px;
}

.book-footer strong {
  color: var(--espresso);
}

.preview-toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 28px;

  padding: 13px 18px;

  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: 14px;

  color: #ffffff;
  background: rgba(79, 51, 46, 0.92);

  box-shadow:
    0 18px 40px rgba(79, 51, 46, 0.25);

  font-size: 12px;
  font-weight: 700;

  opacity: 0;
  pointer-events: none;

  transform: translate(-50%, 18px);

  transition:
    opacity 180ms ease,
    transform 180ms ease;

  backdrop-filter: blur(14px);
}

.preview-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: auto 1fr;
  }

  .topbar-status {
    display: none;
  }

  .date-panel-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-jump-form {
    align-self: flex-end;
  }

  .book-header,
  .appointment-row {
    grid-template-columns:
      92px
      minmax(260px, 1fr)
      76px
      58px
      88px
      150px;
  }

  .appointment-row::before {
    left: 91px;
  }

  .row-secondary-action {
    display: none;
  }
}

@media (max-width: 900px) {
  .app-shell {
    width: min(
      100% - 22px,
      1540px
    );

    margin-top: 11px;
  }

  .topbar {
    position: relative;
    top: 0;

    display: flex;
    flex-wrap: wrap;
  }

  .topnav {
    width: 100%;
    justify-content: flex-start;

    overflow-x: auto;
    padding-top: 4px;
  }

  .nav-link {
    flex: 0 0 auto;
  }

  .page-heading,
  .book-toolbar,
  .book-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .heading-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .refresh-button,
  .soft-button,
  .primary-button {
    flex: 1;
  }

  .date-navigation {
    max-width: 100%;
    overflow-x: auto;
  }

  .week-button,
  .day-button {
    flex: 0 0 auto;
  }

  .quick-jump-form {
    width: 100%;
    align-self: stretch;
  }

  .quick-date-strip {
    grid-template-columns:
      repeat(
        14,
        minmax(76px, 76px)
      );
  }

  .appointment-book {
    overflow-x: auto;
  }

  .book-header,
  .appointment-row {
    min-width: 850px;
  }

  .book-badges {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .main-content {
    padding-top: 24px;
  }

  .page-heading {
    padding-right: 0;
    padding-left: 0;
  }

  h1 {
    font-size: 32px;
  }

  .date-panel,
  .book-section {
    padding: 15px;
    border-radius: 22px;
  }

  .brand-copy {
    display: none;
  }

  .quick-jump-year {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
