:root {
  --bg: #fff8fb;
  --paper: #fff;
  --ink: #49323e;
  --muted: #806b76;
  --line: #f0dfe7;
  --rose: #ad456c;
  --pink: #fce8f0;
  --accent: #ad456c;
  --soft: #fce8f0;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14px/1.6 -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
a,
select {
  cursor: pointer;
}
button {
  border: 0;
  background: none;
  color: inherit;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 9px;
  transition: background 0.18s;
}
button:hover {
  background: #fbeef4;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #ad456c;
  outline-offset: 3px;
}
input,
select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #e8ceda;
  border-radius: 9px;
  background: white;
  color: var(--ink);
  min-height: 44px;
}
input:focus,
select:focus {
  outline: 2px solid #dca0b7;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 14px 0 6px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  font-weight: 600;
}
h2 {
  font-size: 17px;
}
h3 {
  font-size: 15px;
}
.muted,
small {
  color: var(--muted);
}
small {
  font-size: 12px;
}
.primary {
  background: var(--accent);
  color: white;
}
.primary:hover {
  background: #923556;
}
.secondary {
  background: white;
  border: 1px solid var(--line);
}
.rose {
  color: var(--rose);
  background: var(--pink);
}
.link {
  color: var(--rose);
  padding: 5px 8px;
  font-size: 13px;
}
.flex {
  display: flex;
  align-items: center;
  gap: 12px;
}
.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wrap {
  flex-wrap: wrap;
}
.stack {
  display: grid;
  gap: 18px;
}
.pill {
  display: inline-block;
  font-size: 11px;
  border-radius: 6px;
  padding: 3px 9px;
  background: var(--soft);
  color: var(--accent);
  white-space: nowrap;
}
.pill.pink {
  background: var(--pink);
  color: #985568;
}
.pill.amber {
  background: #faf0df;
  color: #906725;
}
.icon {
  width: 19px;
  height: 19px;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
#sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 228px;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 5px 34px;
}
.brand-symbol {
  background: var(--accent);
  color: #fff4f8;
  width: 42px;
  height: 48px;
  border-radius: 18px 18px 7px 7px;
  display: grid;
  place-items: center;
  font-family: serif;
  font-size: 28px;
}
.brand strong {
  font-family: serif;
  font-size: 20px;
  letter-spacing: 1px;
  white-space: nowrap;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 2px;
}
.nav-caption {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
  padding: 15px 16px;
}
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 16px;
  text-align: left;
  margin: 3px 0;
  color: #806b76;
}
.nav-item.active {
  background: var(--soft);
  color: #9b3b61;
  font-weight: 600;
}
.nav-item.active:after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: auto;
}
.side-bottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.avatar {
  width: 38px;
  height: 38px;
  background: #f3e4eb;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: #806b76;
  font-family: serif;
  flex-shrink: 0;
}
.shell {
  margin-left: 228px;
}
header {
  height: 82px;
  padding: 0 38px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
}
header .crumb {
  font-size: 12px;
  color: var(--muted);
}
main {
  padding: 30px 38px;
  max-width: 1600px;
  margin: auto;
  min-height: calc(100vh - 145px);
}
.page-title {
  margin-bottom: 24px;
}
.page-title p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 23px;
}
.hero {
  background: #fbe5ee;
  border-radius: 15px;
  padding: 28px 30px;
  position: relative;
  overflow: hidden;
  min-height: 174px;
  margin-bottom: 24px;
}
.hero h2 {
  font-size: 25px;
  font-family: serif;
  font-weight: 500;
  margin: 10px 0;
}
.hero p {
  font-size: 13px;
  color: #86596d;
}
.hero .eyebrow {
  font-size: 10px;
  letter-spacing: 3px;
  color: #98536f;
}
.hero-art {
  position: absolute;
  right: 40px;
  bottom: -30px;
  width: 230px;
  height: 230px;
  border: 1px solid #e9b9cc;
  border-radius: 50%;
}
.hero-art:before,
.hero-art:after {
  content: "";
  position: absolute;
  width: 95px;
  height: 150px;
  border-radius: 80px 80px 15px 15px;
  transform: rotate(-28deg);
  background: #e9b4c7;
  left: 40px;
  top: 20px;
  border: 8px solid #fbe5ee;
}
.hero-art:after {
  background: #c5688c;
  transform: rotate(25deg);
  left: 120px;
  top: 60px;
}
.hero-text {
  position: relative;
  z-index: 1;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.metric {
  padding: 20px 22px;
}
.metric .value {
  font-size: 29px;
  letter-spacing: -0.8px;
  font-weight: 550;
  margin: 9px 0;
}
.metric .value small {
  font-size: 14px;
  margin-right: 4px;
}
.metric .hint {
  font-size: 11px;
  color: var(--muted);
}
.metric-icon {
  color: var(--accent);
  background: var(--soft);
  padding: 7px;
  border-radius: 9px;
  line-height: 1;
}
.grid2 {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(290px, 1fr);
  gap: 22px;
}
.section-head {
  margin-bottom: 20px;
}
.chart {
  height: 180px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 0 10px;
}
.bar-pair {
  height: 100%;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  position: relative;
}
.bar {
  width: 16px;
  border-radius: 4px 4px 0 0;
  background: #b8517a;
  min-height: 2px;
}
.bar.alt {
  background: #e7b2c8;
}
.axis {
  display: flex;
  justify-content: space-around;
  color: var(--muted);
  font-size: 11px;
  margin: 10px 0 0;
}
.legend {
  font-size: 11px;
  display: flex;
  gap: 16px;
  color: var(--muted);
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b8517a;
  margin-right: 6px;
}
.dot.pink {
  background: #e7b2c8;
}
.appointment {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.appointment:last-child {
  border: 0;
}
.time {
  font-size: 14px;
  font-weight: 600;
  min-width: 44px;
}
.appointment .body {
  flex: 1;
}
.appointment p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.toolbar input,
.toolbar select {
  width: auto;
  max-width: 100%;
}
.seg {
  background: #f6eaf0;
  padding: 4px;
  border-radius: 9px;
  display: inline-flex;
}
.seg button {
  font-size: 12px;
  min-height: 32px;
  padding: 5px 14px;
}
.seg .selected {
  background: #fff;
  box-shadow: 0 1px 4px #00000009;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  background: #fff8fb;
  padding: 12px 14px;
}
td {
  padding: 16px 14px;
  border-bottom: 1px solid #f4e6ed;
  font-size: 13px;
}
tr:last-child td {
  border: 0;
}
.notice {
  background: #f6f1e7;
  border: 1px solid #ece4d3;
  border-radius: 10px;
  padding: 12px 16px;
  color: #806b47;
  font-size: 12px;
  margin-bottom: 20px;
}
.order-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 24px;
}
.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.product {
  text-align: left;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.swatch {
  height: 104px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: var(--swatch-bg, #f4eeeb);
}
.nail {
  width: 20px;
  height: 45px;
  border-radius: 14px 14px 7px 7px;
  background: var(--nail, #ab777b);
  box-shadow: inset -3px 0 5px #ffffff35;
  transform: rotate(-13deg);
}
.nail:nth-child(2) {
  height: 55px;
}
.nail:nth-child(3) {
  height: 50px;
}
.product-body {
  padding: 16px;
}
.product-body strong {
  font-size: 14px;
  display: block;
}
.price {
  color: var(--rose);
  font-weight: 600;
  font-size: 17px;
}
.cart-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.cart-row .between {
  margin-top: 6px;
}
.qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  gap: 10px;
}
.qty button {
  padding: 3px 12px;
  min-height: 34px;
}
.total {
  font-size: 27px;
  font-weight: 600;
}
.full {
  width: 100%;
}
.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}
.customer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.customer-card {
  cursor: pointer;
  text-align: left;
}
.customer-card:hover {
  border-color: #dca0b7;
}
.customer-card .avatar {
  width: 48px;
  height: 48px;
}
.customer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 20px;
}
.customer-bottom strong {
  font-size: 20px;
  display: block;
}
.customer-count { margin: -6px 0 18px; font-size: 13px; }
.customer-recency { margin: 12px 0 0; font-size: 12px; }
.customer-toolbar input { flex: 1; min-width: 180px; }
@media(max-width:760px) {
  .customer-toolbar { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .customer-toolbar input { grid-column: 1/-1; width: 100%; }
  .toolbar.customer-toolbar select { width: 100%; max-width: none; min-width: 0; padding: 12px 8px; font-size: 13px; }
}
.schedule {
  min-width: 760px;
}
.shift {
  width: 100%;
  min-height: 63px;
  background: var(--soft);
  color: #974263;
  font-size: 12px;
  padding: 9px;
}
.shift.off {
  background: #f6f0f3;
  color: #897783;
}
.schedule td {
  padding: 8px;
}
.schedule th {
  text-align: center;
}
.staff-card {
  background: var(--soft);
  padding: 20px;
  border-radius: 12px;
}
.rank {
  font-family: serif;
  font-size: 24px;
  color: #b7a1ad;
  margin-right: 10px;
}
.calendar-row {
  display: grid;
  grid-template-columns: 70px repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
  min-height: 90px;
}
.calendar-cell {
  padding: 10px;
  border-left: 1px solid var(--line);
}
.calendar-cell > button {
  width: 100%;
  text-align: left;
  background: var(--soft);
  border-left: 3px solid #c87798;
  border-radius: 6px;
  font-size: 12px;
}
.calendar-cell > button.free {
  background: none;
  color: #a18493;
  border-left: 0;
  text-align: center;
  height: 100%;
}
.calendar-time {
  font-size: 12px;
  color: var(--muted);
  padding: 12px;
}
.calendar-head {
  min-height: 48px;
  background: #fff8fb;
  text-align: center;
  align-items: center;
  font-size: 13px;
}
.calendar-mobile {
  display: none;
}
footer {
  padding: 18px 38px;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: #927d89;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
#mobile-nav {
  display: none;
}
dialog {
  border: 0;
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  width: min(540px, calc(100% - 28px));
  max-height: 88vh;
  max-height: 88dvh;
  color: var(--ink);
  box-shadow: 0 20px 100px #723c552b;
}
dialog::backdrop {
  background: #63344b55;
  backdrop-filter: blur(3px);
}
dialog[open] { display: flex; flex-direction: column; }
.dialog-head {
  margin: 0;
  padding: 24px 28px 16px;
  flex-shrink: 0;
  background: var(--paper);
  gap: 12px;
}
.dialog-head h2 { min-width: 0; overflow-wrap: anywhere; }
.dialog-head > button { flex-shrink: 0; }
.dialog-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 28px 28px; }
.dialog-head h2 {
  font-size: 22px;
}
.dialog-actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.error {
  color: #ae4656;
  font-size: 13px;
  margin-top: 12px;
}
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: #893956;
  color: white;
  padding: 14px 24px;
  border-radius: 10px;
  z-index: 100;
  display: none;
  box-shadow: 0 8px 30px #0002;
  max-width: 90vw;
}
.detail-balance {
  background: var(--soft);
  padding: 20px;
  border-radius: 12px;
  margin: 20px 0;
}
.detail-balance strong {
  font-size: 30px;
}
.mobile-only {
  display: none;
}
.head-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--rose);
}
@media (min-width: 1700px) {
  main {
    padding-top: 40px;
  }
}
@media (max-width: 1150px) {
  #sidebar {
    width: 190px;
    padding: 28px 12px;
  }
  .shell {
    margin-left: 190px;
  }
  main {
    padding: 25px;
  }
  .products {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 17px;
  }
  .metric .value {
    font-size: 25px;
  }
  .customer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  body {
    font-size: 14px;
  }
  #sidebar {
    display: none;
  }
  .shell {
    margin: 0;
  }
  header {
    height: 68px;
    padding: 0 20px;
  }
  header .crumb {
    display: none;
  }
  .head-actions {
    gap: 8px;
  }
  .head-actions .avatar {
    display: none;
  }
  main {
    padding: 22px 16px 20px;
  }
  h1 {
    font-size: 25px;
  }
  .page-title {
    align-items: flex-start;
    margin-bottom: 20px;
  }
  .page-title p {
    font-size: 12px;
    max-width: 230px;
  }
  .page-title > .primary {
    padding: 9px 12px;
    font-size: 12px;
  }
  .hero {
    padding: 24px 22px;
    min-height: 174px;
  }
  .hero h2 {
    font-size: 23px;
  }
  .hero-art {
    right: -85px;
    opacity: 0.6;
  }
  .hero p {
    max-width: 220px;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .metric {
    padding: 16px;
  }
  .metric .value {
    font-size: 27px;
  }
  .metric .hint {
    font-size: 10px;
  }
  .grid2,
  .order-grid {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 18px;
  }
  .customer-grid {
    grid-template-columns: 1fr;
  }
  .products {
    gap: 12px;
  }
  .product-body {
    padding: 12px;
  }
  .swatch {
    height: 90px;
  }
  .toolbar {
    gap: 8px;
  }
  .toolbar input {
    flex: 1;
    min-width: 120px;
  }
  .toolbar select {
    max-width: 150px;
  }
  .calendar-desktop {
    display: none;
  }
  .calendar-mobile {
    display: block;
  }
  #mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 5px 4px calc(5px + env(safe-area-inset-bottom));
    background: #ffffffed;
    border-top: 1px solid var(--line);
    z-index: 20;
    justify-content: space-around;
    backdrop-filter: blur(10px);
  }
  #mobile-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    padding: 5px 10px;
    color: #806b76;
    min-width: 50px;
  }
  #mobile-nav button.active {
    color: var(--accent);
    background: var(--soft);
  }
  footer {
    padding: 15px 20px 95px;
    display: block;
    font-size: 10px;
  }
  footer span {
    display: block;
    margin-top: 6px;
  }
  .mobile-only {
    display: block;
  }
  .desktop-only {
    display: none;
  }
  #toast {
    bottom: 90px;
  }
  .form-grid {
    gap: 0 10px;
  }
  input,
  select {
    font-size: 16px;
  }
  .schedule {
    min-width: 680px;
  }
  .total {
    font-size: 26px;
  }
  .section-head {
    flex-wrap: wrap;
  }
  .hero .primary {
    padding: 8px 12px;
    font-size: 12px;
  }
  dialog {
    padding: 0;
  }
  .dialog-head { padding: 18px 20px 12px; }
  .dialog-body { padding: 0 20px 20px; }
  .chart {
    height: 160px;
  }
  .notice {
    line-height: 1.7;
  }
  .order-grid > .card {
    margin-top: 2px;
  }
}
.grid2 > * {
  min-width: 0;
}
.grid2 .between > small {
  min-width: 0;
}
.grid2 .between > .link {
  flex-shrink: 0;
}
@media (max-width: 760px) {
  .grid2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .grid2 .between {
    flex-wrap: wrap;
  }
  .appointment .body {
    min-width: 0;
  }
  .appointment > .link {
    flex-shrink: 0;
  }
  .hero p {
    max-width: 200px;
  }
}
.auth-screen {
  max-width: 440px;
  margin: 8vh auto;
  padding: 30px;
}
.auth-screen h1 {
  margin: 20px 0 8px;
}
.auth-mode #sidebar,
.auth-mode #mobile-nav,
.auth-mode header,
.auth-mode footer {
  display: none;
}
.auth-mode .shell {
  margin: 0;
}
.checkline {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.8;
}
.checkline input {
  width: 18px;
  min-height: 20px;
  margin-top: 3px;
  flex-shrink: 0;
}
.sync-error {
  background: #f9e3e3;
  color: #9b3c3c;
}
.filter-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.filter-form label {
  margin: 0;
}
.filter-form input {
  max-width: 170px;
}
.login-error {
  color: #ad3e51;
}
.sync-note {
  font-size: 11px;
  color: var(--muted);
}
.card .btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.detail-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.nowrap {
  white-space: nowrap;
}
.order-grid > section {
  min-width: 0;
}
.table-wrap {
  max-width: 100%;
}
.balance-negative {
  color: #a04d60;
}
.balance-positive {
  color: #ad456c;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.summary-grid strong {
  display: block;
  font-size: 22px;
}
.blank-hero {
  padding: 50px 20px;
  text-align: center;
}
.blank-hero p {
  margin: 12px 0 20px;
}
.form-grid > div {
  min-width: 0;
}
.offline-banner {
  padding: 12px;
  background: #fff0df;
  color: #805c38;
  border-radius: 8px;
  margin-bottom: 20px;
}
.pending-banner {
  padding: 12px;
  background: #f8ece2;
  color: #805c38;
  margin-bottom: 16px;
  border-radius: 8px;
}
.order-grid .product-body {
  min-height: 120px;
}
.product small {
  display: block;
}
.stale {
  color: #9b563f;
}
.shell main {
  min-height: calc(100vh - 155px);
}
@media (max-width: 760px) {
  .auth-screen {
    margin: 4vh auto;
    padding: 20px;
  }
  .summary-grid {
    grid-template-columns: 1fr;
  }
  .page-title {
    flex-wrap: wrap;
  }
  .filter-form input {
    max-width: 100%;
  }
  .filter-form > label {
    flex: 1;
    min-width: 130px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric {
    min-width: 0;
  }
  .metric .value {
    font-size: 23px;
    overflow-wrap: anywhere;
  }
  .customer-card .between {
    flex-wrap: wrap;
  }
  .head-actions {
    max-width: 50%;
  }
  .head-actions .pill {
    white-space: normal;
  }
  header {
    gap: 8px;
  }
  .table-wrap table {
    font-size: 12px;
  }
  .brand-title {
    font-family: serif;
    font-size: 30px;
  }
  .order-grid .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
textarea {
  font: inherit;
  width: 100%;
  min-height: 90px;
  border: 1px solid #e8ceda;
  border-radius: 9px;
  padding: 11px 13px;
  resize: vertical;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.product-photo{display:block;width:100%;height:160px;object-fit:cover;background:#f4eeeb}.image-editor{border:1px dashed #e2bbcc;border-radius:12px;padding:12px}.image-editor input[type=file]{font-size:13px;padding:8px;border:0;background:#fff8fb}.image-editor .between{flex-wrap:wrap;gap:4px}#project-image-preview{min-height:110px;display:grid;place-items:center;color:#806b76;margin-bottom:10px}#project-image-preview img{display:block;max-width:100%;max-height:180px;border-radius:8px;object-fit:contain}@media(max-width:760px){.product-photo{height:120px}.image-editor small{font-size:11px}}
/* Single-store appointments, expenses and member passes. */
#sidebar{overflow-y:auto}.nav-item{flex-shrink:0}.home-shortcuts{margin:18px 0}.cash-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.quick-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:22px}.quick-links button{display:flex;align-items:center;gap:14px;text-align:left}.quick-links button span{margin-left:auto}.schedule-toolbar{flex-wrap:wrap;align-items:end}.schedule-toolbar label{margin:0;min-width:155px}.schedule-period{gap:8px;margin:20px 0}.schedule-period strong{font-size:14px}.week-board{display:grid;grid-template-columns:repeat(7,minmax(150px,1fr));gap:10px;overflow-x:auto;margin:18px 0;padding-bottom:12px}.staff-board{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:18px 0}.calendar-day{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px;min-height:220px;min-width:0}.calendar-day-head{display:flex;align-items:center;justify-content:space-between;gap:4px;border-bottom:1px solid var(--line);padding-bottom:10px;margin-bottom:10px}.calendar-day-head button{padding:6px}.booking-card{display:flex;flex-direction:column;gap:8px;width:100%;text-align:left;background:#fcecf3;border-left:3px solid #ae5e7f;border-radius:8px;padding:12px;margin-bottom:10px;white-space:normal;overflow-wrap:anywhere}.booking-card .between{gap:5px;flex-wrap:wrap}.booking-card small{font-size:12px}.booking-card.occupied{background:#f6efe3;border-left-color:#b8976b}.cancelled{opacity:.62}.expense-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:22px 0}.expense-card h2{margin:8px 0}.expense-card .between{gap:12px;align-items:start}.receipt-full{width:100%;height:auto;max-height:65vh;object-fit:contain}#receipt-preview img{max-width:100%;max-height:200px;display:block;margin:auto}.customer-passes{margin:22px 0;padding:20px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.pass-card{padding:18px;background:#fff2f7;border:1px solid #efd3df;border-radius:14px;margin:14px 0}.pass-card p{margin:10px 0}.pass-card .between{gap:10px;flex-wrap:wrap}.pass-projects{max-height:230px;overflow-y:auto;border:1px solid var(--line);padding:12px;border-radius:10px}.pass-projects .checkline{margin:8px 0}.cart-price{max-width:160px;margin:10px 0}.cart-row>label{margin:0 0 10px}.archive-fields{display:grid;grid-template-columns:minmax(110px,1fr) 2fr;gap:10px;margin:16px 0}.archive-fields dt{color:var(--muted)}.archive-fields dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.archive-toolbar{flex-wrap:wrap;gap:12px}.archive-toolbar input{max-width:340px}.archive-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:20px 0}.archive-cards button{text-align:left}.archive-cards p{margin:10px 0;overflow-wrap:anywhere}
@media(max-width:760px){.cash-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.quick-links{grid-template-columns:1fr 1fr}.quick-links button{padding:16px 10px;gap:8px}.quick-links strong{font-size:14px}.staff-board,.expense-list,.archive-cards{grid-template-columns:1fr}.week-board{grid-template-columns:repeat(7,180px)}.schedule-toolbar{gap:10px}.schedule-toolbar label{min-width:0;flex:1}.schedule-period strong{font-size:12px;text-align:center}.schedule-period button{font-size:12px;padding:8px}.page-title .btn-row{flex-wrap:wrap}.archive-fields{grid-template-columns:100px minmax(0,1fr)}.home-shortcuts{display:flex;gap:10px}.cart-price{max-width:140px}}
.archive-tabs{display:flex;flex-wrap:wrap;width:fit-content}
@media(max-width:760px){.schedule-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.schedule-toolbar .seg{grid-column:1/-1;justify-self:start}.schedule-toolbar label{width:100%;min-width:0}.schedule-toolbar input{font-size:14px;padding:12px 8px;min-width:0}}
.import-banner{padding:10px 14px;border:1px solid #efd3df;background:#fff0f6;color:#8c4d68;border-radius:10px;font-size:12px;margin-bottom:18px}.order-grid .toolbar .seg{flex-wrap:wrap}

/* Day appointments: one time axis with a column for each employee. */
.timeline-hint{font-size:12px;margin:16px 0 10px}
.timeline-scroll{overflow:auto;max-height:70vh;border:1px solid var(--line);border-radius:14px;background:var(--paper);margin-bottom:24px}
.timeline{display:grid;grid-template-columns:64px repeat(var(--staff-count),minmax(170px,1fr));min-width:calc(64px + var(--staff-count)*170px)}
.timeline-corner,.timeline-staff{position:sticky;top:0;z-index:3;padding:16px 8px;text-align:center;background:var(--pink);border-bottom:1px solid var(--line);font-weight:600}
.timeline-corner{left:0;z-index:5;font-size:12px}
.timeline-times{position:sticky;left:0;z-index:2;background:var(--paper);border-right:1px solid var(--line)}
.timeline-times span{position:absolute;left:0;right:0;padding:6px 8px;font-size:12px;color:var(--muted)}
.timeline-column{position:relative;border-right:1px solid var(--line)}
.timeline-slot{display:block;width:100%;height:44px;min-height:0;border-radius:0;border-bottom:1px dashed var(--line);padding:0 6px;text-align:left;font-size:12px;color:var(--accent)}
.timeline-slot:nth-child(even){border-bottom-style:solid}
.timeline-slot span{opacity:0}.timeline-slot:hover span,.timeline-slot:focus-visible span{opacity:1}
.timeline-slot:hover,.timeline-slot:focus-visible{background:var(--soft)}
.timeline-booking{position:absolute;left:5px;right:5px;min-height:0;overflow:hidden;padding:3px 7px;border-radius:6px;text-align:left;line-height:1.3;border-left:3px solid var(--accent);background:#f8dce8;color:#71334d;z-index:1}
.timeline-booking strong,.timeline-booking small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;color:inherit}
.timeline-booking:hover{background:#f2c8da}
.timeline-booking.occupied{background:repeating-linear-gradient(45deg,#f4edf1,#f4edf1 9px,#e9dce3 9px,#e9dce3 12px);border-color:#9b7a8c;color:#694e5b}
.timeline-booking.completed{border-color:#9b7a8c;background:#f3ecf0;color:#755c69}
.cancelled-bookings,.day-booking-list{margin:20px 0}.cancelled-bookings summary,.day-booking-list summary{margin-bottom:12px}
@media(max-width:760px){.timeline-scroll{max-height:65vh}.timeline{grid-template-columns:56px repeat(var(--staff-count),minmax(150px,1fr));min-width:calc(56px + var(--staff-count)*150px)}.timeline-hint{line-height:1.6}.timeline-slot span{opacity:.65;font-size:11px}.timeline-staff{padding:12px 6px}.timeline-times span{padding:6px 4px}}

.timeline-column{user-select:none;-webkit-user-select:none}
.timeline-slot{cursor:crosshair}
.timeline-selection{position:absolute;left:3px;right:3px;z-index:2;pointer-events:none;border:2px solid var(--accent);background:#efb5ce99;color:#71334d;font-size:12px;font-weight:600;line-height:18px;padding:0 5px;white-space:nowrap}
.timeline-selection.conflict{border-color:#b13e46;background:#f8c4c799;color:#8e2631}


.customer-picker{position:relative}
.customer-options{position:relative;margin-top:5px;max-height:240px;overflow-y:auto;overscroll-behavior:contain;border:1px solid var(--line);border-radius:10px;background:var(--paper);box-shadow:0 8px 24px #723c551a}
.customer-options button{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:48px;border-radius:0;text-align:left;border-bottom:1px solid var(--line)}
.customer-options strong{overflow-wrap:anywhere}.customer-options small{white-space:nowrap}
.customer-options button:hover,.customer-options [aria-selected=true]{background:var(--soft)}
.customer-picker-help{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:6px}.customer-picker-help .link{flex-shrink:0;font-size:12px;padding:6px}
.customer-search-empty{padding:14px;font-size:13px;color:var(--muted)}
@media(max-width:760px){.customer-picker-help{flex-wrap:wrap}.customer-options button{padding:10px}.customer-options strong{font-size:13px}}

#cancel-mobile-selection{margin-bottom:12px}
@media(pointer:coarse){.timeline-slot{touch-action:pan-x pan-y;cursor:pointer}}
