:root {
  color-scheme: light;
  --bg: #effcff;
  --surface: #fbfeff;
  --surface-strong: #ffffff;
  --soft-pink: #e4f8ff;
  --soft-mint: #ddfbf3;
  --soft-lavender: #eaf3ff;
  --soft-peach: #fff1cf;
  --ink: #203d48;
  --muted: #607b86;
  --line: #c9e6ee;
  --primary: #14a9bf;
  --primary-dark: #087f96;
  --aqua: #78e4ef;
  --coral: #ff9fc2;
  --sun: #ffd66b;
  --danger: #c05665;
  --disabled: #e1eff3;
  --shadow: 0 16px 36px rgba(20, 169, 191, .15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(120, 228, 239, .32) 0 18%, transparent 18% 100%),
    repeating-linear-gradient(160deg, rgba(255, 255, 255, .36) 0 18px, transparent 18px 48px),
    linear-gradient(135deg, var(--bg), #e8fbf5 54%, #eaf5ff);
  font-family: "Mali", "Noto Sans Thai", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(239, 252, 255, .86);
  backdrop-filter: blur(14px);
}

.page-loader[hidden] {
  display: none;
}

#home-preview[hidden],
#customer[hidden] {
  display: none;
}

.page-loader-card {
  display: grid;
  gap: 8px;
  justify-items: center;
  width: min(360px, 100%);
  padding: 24px;
  border: 1px solid rgba(20, 169, 191, .22);
  border-radius: 22px;
  text-align: center;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(221, 251, 243, .86)),
    var(--surface-strong);
  box-shadow: 0 24px 60px rgba(8, 127, 150, .18);
}

.page-loader-card strong {
  font-size: 1.08rem;
  line-height: 1.35;
}

.page-loader-card span:last-child {
  color: var(--muted);
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.55;
}

#pwa-update-banner {
  position: fixed;
  z-index: 1100;
  right: 14px;
  bottom: 14px;
  width: min(320px, calc(100vw - 28px));
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, .74);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: 0 18px 38px rgba(8, 127, 150, .26);
  font-weight: 900;
}

.loader-ring {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(20, 169, 191, .18);
  border-top-color: var(--primary);
  border-radius: 999px;
  animation: loader-spin .82s linear infinite;
}

@keyframes loader-spin {
  to {
    transform: rotate(360deg);
  }
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 14px 0 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 8px 0 14px;
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-cluster {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #72dfe9);
  box-shadow: 0 12px 22px rgba(20, 169, 191, .24);
  font-weight: 700;
}

.brand-mark.has-logo {
  background: #fff;
  border: 1px solid rgba(20, 169, 191, .18);
  color: transparent;
  padding: 0;
}

.brand-mark img,
.shop-logo-preview img,
.admin-shop-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.04rem;
}

.brand small {
  color: var(--muted);
  margin-top: 2px;
  font-size: .86rem;
}

.view-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
}

.tab-link {
  min-width: 100px;
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--muted);
  text-align: center;
  text-decoration: none;
  font-weight: 700;
}

.tab-link.active {
  color: #fff;
  background: var(--primary);
}

.owner-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--primary-dark);
  background: rgba(255, 255, 255, .82);
  font-weight: 700;
  text-decoration: none;
}

.topbar-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.owner-add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #65dce9);
  font-family: inherit;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .38),
    0 10px 20px rgba(20, 169, 191, .18);
}

.owner-add-button[hidden] {
  display: none;
}

.owner-add-button:hover {
  transform: translateY(-1px);
}

.owner-action-menu {
  position: absolute;
  z-index: 82;
  top: calc(100% + 8px);
  right: 52px;
  display: grid;
  gap: 8px;
  width: min(220px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 22px 46px rgba(8, 127, 150, .18);
}

.owner-action-menu[hidden] {
  display: none;
}

.owner-action-menu button {
  min-height: 42px;
  border: 1px solid rgba(139, 218, 228, .78);
  border-radius: 13px;
  color: var(--ink);
  background: linear-gradient(135deg, #fff, #effcff);
  font-family: inherit;
  font-weight: 900;
  text-align: left;
  padding: 9px 12px;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.customer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(292px, .58fr);
  gap: 16px;
  align-items: start;
}

.home-preview {
  display: grid;
  gap: 16px;
}

.home-hero,
.home-shop-list {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow);
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: center;
  padding: 26px;
  overflow: hidden;
}

.home-copy {
  display: grid;
  gap: 14px;
}

.home-copy h1 {
  max-width: 680px;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-actions .primary-button,
.home-actions .secondary-button {
  width: auto;
  min-width: 170px;
  text-decoration: none;
}

.home-preview-card {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 22px;
  border: 1px solid rgba(20, 169, 191, .18);
  border-radius: 22px;
  text-align: center;
  background: linear-gradient(145deg, rgba(221, 251, 243, .82), rgba(234, 243, 255, .9));
}

.home-preview-card img {
  width: min(150px, 100%);
}

.home-preview-card strong {
  font-size: 1.08rem;
}

.home-preview-card span,
.home-shop-card p {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
}

.home-shop-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.home-shop-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(139, 218, 228, .7);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(239, 252, 255, .88));
}

.home-shop-card.muted {
  background: rgba(255, 255, 255, .74);
}

.home-shop-card h2,
.home-shop-card p {
  margin: 0;
}

.home-shop-card h2 {
  font-size: 1.05rem;
}

.owner-layout {
  display: grid;
  gap: 16px;
  align-items: start;
  position: relative;
}

.booking-panel,
.status-panel,
.owner-main,
.side-card,
.auth-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow);
}

.booking-panel,
.owner-main,
.auth-panel {
  padding: 24px;
}

.register-panel {
  max-width: 760px;
  margin: 34px auto 0;
}

.register-route-card {
  display: grid;
  gap: 4px;
  margin: 20px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(221, 251, 243, .72), rgba(234, 243, 255, .88));
}

.register-route-card span,
.register-route-card small {
  color: var(--muted);
}

.register-route-card strong {
  color: var(--primary-dark);
  font-size: 1.24rem;
  overflow-wrap: anywhere;
}

.register-form {
  margin-top: 18px;
}

.status-panel,
.side-card {
  padding: 18px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: .94rem;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 560px;
  font-size: 2.2rem;
  line-height: 1.18;
  font-weight: 700;
}

h2 {
  font-size: 1.08rem;
  font-weight: 700;
}

.owner-main h1 {
  font-size: 1.75rem;
}

.owner-header-panel {
  display: grid;
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.customer-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 14px;
  align-items: center;
  padding: 2px 0 4px;
}

.hero-copy {
  min-width: 0;
}

.mascot-card {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(221, 251, 243, .9), rgba(228, 248, 255, .95)),
    var(--surface-strong);
  box-shadow: 0 14px 30px rgba(20, 169, 191, .13);
}

.customer-mascot {
  min-height: 132px;
  overflow: hidden;
}

.mascot-card img {
  width: min(128px, 100%);
  height: auto;
  display: block;
}

.corner-mascot {
  width: 72px;
  height: auto;
  float: right;
  margin: -8px -4px 4px 10px;
}

.owner-mascot {
  width: 78px;
  height: auto;
  flex: 0 0 auto;
}

.lead {
  max-width: 520px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.booking-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 1rem;
  font-weight: 700;
}

legend span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
  font-size: .88rem;
}

.hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .92rem;
}

.service-options,
.time-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.choice {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 54px;
  padding: 12px;
  border: 2px solid transparent;
  border-radius: 17px;
  color: var(--ink);
  background: var(--surface-strong);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: left;
  font-weight: 700;
}

.choice .dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #b8d5e8;
  background: #fff;
}

.choice.active {
  border-color: var(--primary);
  background: var(--soft-pink);
  box-shadow: 0 12px 22px rgba(20, 169, 191, .16);
}

.choice.active .dot {
  border-color: var(--primary);
  background: radial-gradient(circle, #fff 0 34%, var(--primary) 38% 100%);
}

.choice:disabled {
  cursor: not-allowed;
  color: #718291;
  background: var(--disabled);
  box-shadow: inset 0 0 0 1px #c6d8e4;
  opacity: .86;
}

.choice:disabled .dot {
  background: #bfd2df;
  border-color: #adc6d6;
}

.choice small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
}

.contact-fields {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
  font-size: .94rem;
}

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: #fff;
  padding: 12px 13px;
  outline-color: var(--primary);
}

.date-field {
  width: min(100%, 420px);
  margin-bottom: 10px;
}

.date-field input {
  min-height: 50px;
  text-align: center;
}

textarea {
  resize: vertical;
}

.notice,
.privacy-note {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--soft-mint);
}

.notice span,
.privacy-note span,
.empty-state {
  color: var(--muted);
}

.consent-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  line-height: 1.6;
}

.consent-field input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.consent-field a {
  color: var(--primary-dark);
  font-weight: 800;
}

.privacy-page {
  max-width: 760px;
  margin: 0 auto;
}

.privacy-panel {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 5vw, 36px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 20px 50px rgba(8, 127, 150, .12);
}

.privacy-panel h1 {
  margin: 0;
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  line-height: 1.15;
}

.privacy-section {
  display: grid;
  gap: 8px;
}

.privacy-section h2 {
  margin: 0;
  font-size: 1.08rem;
}

.privacy-section p,
.privacy-section li {
  color: var(--muted);
  line-height: 1.75;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  padding: 12px 16px;
  font-weight: 800;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #65dce9);
  box-shadow: 0 14px 26px rgba(20, 169, 191, .27);
}

.secondary-button {
  color: var(--ink);
  background: linear-gradient(135deg, var(--soft-mint), #f3fffb);
  border: 1px solid var(--line);
}

.ghost-button {
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
}

.danger-button {
  color: #fff;
  background: var(--danger);
}

.mini-calendar {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.mini-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
}

.mini-slot.busy {
  background: #e6eff6;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  white-space: nowrap;
  border-radius: 999px;
  padding: 5px 11px 6px;
  color: var(--primary-dark);
  background: #dff8ff;
  font-size: .82rem;
  font-weight: 800;
  line-height: 1;
}

.mini-slot.busy .status-pill {
  color: #637789;
  background: #d3e2ec;
}

.section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.section-head > div {
  min-width: 0;
}

.owner-header-panel {
  position: relative;
}

.owner-session {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 8px;
  flex: 1 1 340px;
  min-width: 0;
  max-width: 430px;
}

.owner-session span {
  display: grid;
  place-items: center;
  min-width: 0;
  flex: 1 1 auto;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: #fff;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.owner-session .secondary-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.notification-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 15px;
  color: var(--primary-dark);
  background: linear-gradient(135deg, #ffffff, #ddfbf3);
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow:
    inset 0 0 0 1px rgba(139, 218, 228, .9),
    0 8px 18px rgba(8, 127, 150, .08);
}

.notification-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-button strong {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: #f06f56;
  font-size: .72rem;
  line-height: 1;
  box-shadow: 0 0 0 3px #fff;
}

.notification-button strong[hidden] {
  display: none;
}

.notification-button[hidden] {
  display: none;
}

.notification-button:hover {
  transform: translateY(-1px);
}

.notification-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 22px 46px rgba(8, 127, 150, .18);
}

.notification-menu[hidden] {
  display: none;
}

.notification-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 10px;
}

.notification-menu-head span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}

.notification-list {
  display: grid;
  gap: 8px;
}

.notification-item {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: linear-gradient(135deg, #fff, #f1feff);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.notification-item.warn {
  background: linear-gradient(135deg, #fff, #fff4d9);
}

.notification-item.good {
  background: linear-gradient(135deg, #fff, #ddfbf3);
}

.notification-item span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}

.notification-account {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(139, 218, 228, .62);
}

.notification-account span {
  display: block;
  min-width: 0;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--muted);
  background: #fff;
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.notification-account .secondary-button {
  width: 100%;
  min-height: 40px;
}

.connection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.connection-card {
  display: grid;
  gap: 4px;
  min-height: 96px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(231, 251, 255, .9));
}

.connection-card span {
  color: var(--primary-dark);
  font-size: .78rem;
  font-weight: 900;
}

.connection-card strong {
  color: var(--ink);
  font-size: .95rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.connection-card small {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.45;
}

.connection-card.connected {
  background: linear-gradient(145deg, #ecfffb, var(--soft-mint));
}

.connection-card.warning {
  background: linear-gradient(145deg, #fffaf0, var(--soft-peach));
}

.queue-list,
.service-list {
  display: grid;
  gap: 10px;
}

.owner-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stat-chip {
  display: grid;
  gap: 2px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #e7fbff 100%);
}

.stat-chip strong {
  color: var(--primary-dark);
  font-size: clamp(1.35rem, 6vw, 1.9rem);
  line-height: 1;
}

.stat-chip span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}

.queue-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.queue-card.confirmed {
  background: var(--soft-mint);
}

.queue-card.is-past {
  opacity: .72;
  background: linear-gradient(135deg, rgba(255, 255, 255, .86), rgba(225, 239, 243, .72));
}

.queue-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.queue-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.queue-meta span {
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--muted);
  background: var(--soft-lavender);
  font-size: .84rem;
}

.queue-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(139, 218, 228, .9);
  border-radius: 13px;
  color: var(--primary-dark);
  background: rgba(255, 255, 255, .86);
  font-family: inherit;
  font-size: .86rem;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.contact-button.call {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), #65dce9);
  box-shadow: 0 10px 18px rgba(20, 169, 191, .18);
}

.owner-side {
  display: grid;
  gap: 18px;
}

.owner-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .72);
}

.owner-tab {
  min-width: 0;
  min-height: 46px;
  border: 0;
  border-radius: 13px;
  padding: 10px 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: center;
  white-space: normal;
}

.owner-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #65dce9);
  box-shadow: 0 12px 24px rgba(20, 169, 191, .22);
}

.owner-tab:focus-visible {
  outline: 3px solid rgba(20, 169, 191, .34);
  outline-offset: 2px;
}

.owner-tab-panel {
  display: grid;
  gap: 14px;
}

.owner-tab-panel[hidden] {
  display: none;
}

.owner-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.owner-queue-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .85fr);
  gap: 16px;
  align-items: start;
}

.manual-card {
  position: sticky;
  top: 16px;
}

.owner-action-panel {
  width: min(680px, 100%);
}

.auth-panel {
  display: grid;
  gap: 18px;
  max-width: 680px;
  margin: 32px auto 0;
}

.auth-panel[hidden],
.owner-layout[hidden] {
  display: none;
}

.admin-dashboard[hidden] {
  display: none;
}

.admin-shell {
  width: min(1240px, calc(100% - 28px));
}

.admin-dashboard {
  display: grid;
  gap: 16px;
}

.admin-hero,
.admin-section,
.admin-shop-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
}

.admin-hero {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
}

.admin-session {
  min-width: min(100%, 260px);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.admin-stat-chip {
  min-height: 86px;
  background:
    linear-gradient(135deg, #ffffff, rgba(221, 251, 243, .76)),
    var(--surface-strong);
}

.admin-stat-chip.good strong {
  color: #16866d;
}

.admin-stat-chip.warn strong {
  color: #c97a14;
}

.admin-stat-chip.muted strong {
  color: #637789;
}

.admin-stat-chip.is-loading {
  opacity: .72;
}

.admin-section {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-attention {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr);
  gap: 14px;
  align-items: start;
  padding: 18px;
  border: 1px solid rgba(255, 196, 87, .48);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(255, 244, 218, .78)),
    var(--surface-strong);
  box-shadow: 0 18px 34px rgba(174, 112, 22, .1);
}

.admin-attention h2 {
  margin: 4px 0 0;
  font-size: 1.22rem;
  line-height: 1.25;
}

.admin-attention-list {
  display: grid;
  gap: 8px;
}

.admin-attention-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 196, 87, .46);
  border-radius: 16px;
  background: rgba(255, 255, 255, .78);
}

.admin-attention-item strong,
.admin-attention-item span {
  display: block;
}

.admin-attention-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.45;
}

.admin-attention-item .secondary-button {
  min-height: 40px;
  padding: 9px 12px;
  white-space: nowrap;
  text-decoration: none;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(244, 252, 255, .74);
}

.admin-search {
  display: grid;
  gap: 6px;
  color: var(--primary-dark);
  font-weight: 900;
}

.admin-search input {
  min-height: 44px;
}

.admin-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: #fff;
  font-weight: 900;
}

.filter-chip.is-active {
  color: #fff;
  border-color: transparent;
  background: var(--primary);
  box-shadow: 0 10px 22px rgba(20, 169, 191, .2);
}

.admin-result-count {
  grid-column: 1 / -1;
  margin: 0;
}

.admin-shop-list {
  display: grid;
  gap: 12px;
}

.admin-shop-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  box-shadow: none;
}

.admin-shop-card.needs-attention {
  border-color: rgba(255, 196, 87, .62);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(255, 250, 236, .88)),
    #fff;
}

.admin-shop-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.admin-shop-identity {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.admin-shop-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-size: .86rem;
}

.admin-shop-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-shop-top h3 {
  margin: 8px 0 2px;
  font-size: 1.16rem;
  line-height: 1.25;
}

.admin-shop-top p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  overflow-wrap: anywhere;
}

.admin-shop-tagline {
  color: var(--ink);
}

.status-pill.muted {
  color: #637789;
  background: #d9e6ef;
}

.status-pill.good {
  color: #0d6f5a;
  background: #dff8ef;
}

.status-pill.warn {
  color: #9b6414;
  background: #fff0c9;
}

.admin-shop-metrics,
.admin-shop-contact,
.admin-shop-actions {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.admin-shop-metrics span,
.admin-shop-contact span {
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: #fff;
  font-size: .88rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.admin-shop-metrics strong {
  color: var(--primary-dark);
}

.admin-shop-warning {
  padding: 10px 12px;
  border: 1px solid rgba(255, 196, 87, .5);
  border-radius: 14px;
  color: #8e5d11;
  background: rgba(255, 244, 218, .8);
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.45;
}

.admin-shop-contact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-shop-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-shop-actions .primary-button,
.admin-shop-actions .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}

.admin-dialog {
  width: min(460px, calc(100% - 30px));
}

.admin-dialog-card {
  text-align: left;
}

.admin-dialog-card .dialog-badge,
.admin-dialog-card h2,
.admin-dialog-card p {
  text-align: center;
}

.auth-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.compact-form,
.inline-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.shop-logo-editor {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .68);
}

.shop-logo-preview,
.admin-shop-logo {
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #72dfe9);
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(20, 169, 191, .18);
}

.shop-logo-preview {
  width: 72px;
  height: 72px;
  border-radius: 20px;
}

.shop-logo-preview.has-logo,
.admin-shop-logo.has-logo {
  background: #fff;
  color: transparent;
}

.shop-logo-actions {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.shop-logo-actions span {
  color: var(--muted);
  font-size: .88rem;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-actions .secondary-button,
.inline-actions .ghost-button {
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 14px;
}

.inline-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.service-list {
  gap: 0;
  margin-top: 10px;
}

.service-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 2px;
  border-bottom: 1px solid rgba(139, 218, 228, .58);
  background: transparent;
}

.service-item:first-child {
  margin-top: 8px;
}

.service-item:last-child {
  border-bottom: 0;
}

.service-item.off span {
  color: var(--danger);
}

.customer-item {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.customer-item span {
  display: grid;
  gap: 2px;
}

.customer-item small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.time-manager {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.schedule-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, .88fr);
  gap: 16px;
  align-items: start;
}

.shop-schedule-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.schedule-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, #fff, #f1feff);
}

.schedule-item div {
  display: grid;
  gap: 2px;
}

.schedule-item div:nth-child(2) {
  justify-items: end;
  text-align: right;
}

.schedule-item .contact-actions {
  grid-column: 1 / -1;
}

.schedule-item span {
  color: var(--muted);
  font-size: .88rem;
}

.schedule-item strong {
  color: var(--ink);
}

.booking-calendar {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.booking-calendar-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
}

.booking-calendar-head strong {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.calendar-month-button {
  display: grid;
  place-items: center;
  min-width: 38px;
  min-height: 38px;
  border: 1px solid rgba(139, 218, 228, .78);
  border-radius: 14px;
  color: var(--primary-dark);
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 8px 18px rgba(20, 169, 191, .1);
  font-family: inherit;
  font-size: 1.34rem;
  font-weight: 900;
  line-height: 1;
}

.booking-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.booking-calendar-weekdays span {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.booking-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-day {
  display: grid;
  gap: 2px;
  min-height: 62px;
  padding: 7px 5px;
  border: 1px solid rgba(139, 218, 228, .74);
  border-radius: 13px;
  color: var(--ink);
  background: linear-gradient(145deg, #fff, #e9fbff);
  font-family: inherit;
  text-align: center;
}

.calendar-day span,
.calendar-day small,
.calendar-day em {
  color: var(--muted);
  font-size: .64rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.15;
}

.calendar-day strong {
  color: var(--primary-dark);
  font-size: 1.08rem;
  line-height: 1;
}

.calendar-day.placeholder {
  visibility: hidden;
  pointer-events: none;
}

.calendar-day.available {
  background: linear-gradient(145deg, rgba(255, 255, 255, .9), rgba(235, 251, 255, .92));
}

.calendar-day.has-booking {
  border-color: rgba(20, 169, 191, .52);
  background: linear-gradient(145deg, #d8fbff, #ddfbf3);
}

.calendar-day.full,
.calendar-day.busy {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(145deg, var(--primary-dark), var(--primary));
}

.calendar-day.closed {
  border-color: transparent;
  color: #f4feff;
  background: #607b86;
}

.calendar-day.full span,
.calendar-day.full small,
.calendar-day.full em,
.calendar-day.full strong,
.calendar-day.closed span,
.calendar-day.closed small,
.calendar-day.closed em,
.calendar-day.closed strong {
  color: #f4feff;
}

.calendar-day.today {
  box-shadow: inset 0 0 0 2px rgba(20, 169, 191, .32);
}

.calendar-day.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), #65dce9);
  box-shadow: 0 14px 26px rgba(20, 169, 191, .22);
}

.calendar-day.is-active span,
.calendar-day.is-active small,
.calendar-day.is-active em,
.calendar-day.is-active strong {
  color: #fff;
}

.calendar-day-detail {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .74);
}

.calendar-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.calendar-detail-head span {
  color: var(--primary-dark);
  font-size: .82rem;
  font-weight: 900;
}

.calendar-detail-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 10px;
  padding: 9px 0;
  border-top: 1px solid rgba(139, 218, 228, .52);
}

.calendar-detail-item strong {
  color: var(--primary-dark);
}

.calendar-detail-item small {
  grid-column: 2;
  color: var(--muted);
  font-size: .82rem;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: linear-gradient(135deg, #e5fbff, #f5fffc);
}

.switch-row input {
  width: 22px;
  height: 22px;
  accent-color: var(--primary);
}

.time-slot-list {
  display: grid;
  gap: 8px;
}

.time-slot-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.time-slot-item.off {
  background: var(--disabled);
}

.time-slot-item strong,
.time-slot-item small {
  display: block;
}

.time-slot-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: .82rem;
}

.slot-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.slot-form button {
  grid-column: 1 / -1;
}

.icon-button {
  min-width: 40px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: var(--soft-peach);
  font-weight: 800;
}

.icon-button.toggle-on {
  color: var(--ink);
  border-color: rgba(245, 205, 96, .7);
  background: var(--soft-peach);
}

.icon-button.toggle-off {
  color: #fff;
  border-color: rgba(240, 111, 86, .34);
  background: linear-gradient(135deg, #f06f56, #ff8b7a);
}

.form-error {
  margin: 8px 0 0;
  color: var(--danger);
  font-weight: 700;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(20px);
  z-index: 20;
  max-width: min(520px, calc(100% - 28px));
  padding: 13px 16px;
  border-radius: 999px;
  color: #fff;
  background: var(--primary-dark);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.booking-dialog,
.owner-dialog {
  width: min(390px, calc(100% - 30px));
  padding: 0;
  border: 0;
  border-radius: 24px;
  color: var(--ink);
  background: transparent;
}

.booking-dialog::backdrop,
.owner-dialog::backdrop {
  background: rgba(32, 61, 72, .34);
  backdrop-filter: blur(6px);
}

.booking-dialog-card,
.owner-dialog-card {
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  text-align: center;
  background:
    radial-gradient(circle at 20% 16%, rgba(255, 214, 107, .35), transparent 34%),
    linear-gradient(145deg, #ffffff, var(--soft-pink) 54%, var(--soft-mint));
  box-shadow: 0 24px 60px rgba(8, 127, 150, .24);
}

.dialog-badge {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 2px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--aqua));
  font-weight: 900;
  box-shadow: 0 14px 26px rgba(20, 169, 191, .28);
}

.booking-dialog h2,
.owner-dialog h2 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.2;
}

.booking-dialog p,
.owner-dialog p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.dialog-summary {
  padding: 12px 14px;
  border: 1px solid rgba(20, 169, 191, .24);
  border-radius: 18px;
  color: var(--primary-dark);
  background: rgba(255, 255, 255, .72);
  font-weight: 800;
  line-height: 1.45;
}

.booking-dialog .primary-button {
  width: 100%;
  margin-top: 2px;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 2px;
}

.dialog-actions.confirming {
  grid-template-columns: 1fr 1fr;
}

.owner-dialog .primary-button,
.owner-dialog .secondary-button,
.owner-dialog .danger-button {
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .loader-ring {
    animation: none;
    border-color: rgba(20, 169, 191, .28);
    border-top-color: var(--primary);
  }
}

@media (max-width: 900px) {
  .customer-grid,
  .owner-layout,
  .home-hero {
    grid-template-columns: 1fr;
  }

  .home-preview-card {
    justify-self: stretch;
  }

  .admin-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-attention,
  .admin-toolbar {
    grid-template-columns: 1fr;
  }

  .admin-shop-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  h1 {
    font-size: 1.9rem;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 15px;
  }

  .app-shell {
    width: min(100% - 16px, 460px);
    padding-top: 8px;
  }

  .topbar {
    align-items: center;
    flex-direction: row;
    gap: 8px;
    padding: 6px 0 10px;
  }

  .brand {
    min-width: 0;
  }

  .brand-cluster {
    gap: 7px;
    min-width: 0;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
  }

  .brand strong {
    font-size: .96rem;
  }

  .brand small {
    font-size: .78rem;
  }

  .topbar-actions {
    flex: 0 0 auto;
    gap: 6px;
  }

  .owner-link {
    min-height: 38px;
    padding: 7px 10px;
    font-size: .82rem;
    white-space: nowrap;
  }

  .owner-add-button {
    width: 40px;
    height: 40px;
    min-height: 40px;
    border-radius: 14px;
    font-size: 1.32rem;
  }

  .owner-action-menu {
    top: calc(100% + 7px);
    right: 46px;
    width: min(210px, calc(100vw - 16px));
  }

  .admin-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .owner-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    overflow: hidden;
    gap: 4px;
    padding: 4px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 8px 18px rgba(8, 127, 150, .08);
  }

  .owner-tab {
    min-width: 0;
    width: 100%;
    min-height: 42px;
    padding: 7px 4px;
    border-radius: 12px;
    font-size: .8rem;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
  }

  .owner-tab:active {
    transform: translateY(1px) scale(.99);
  }

  .owner-tab.is-active {
    border: 1px solid rgba(255, 255, 255, .72);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .48),
      0 10px 20px rgba(20, 169, 191, .22);
  }

  .owner-tab-panel {
    gap: 10px;
  }

  .owner-panel-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .owner-queue-workspace {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .schedule-workspace {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .booking-calendar {
    gap: 7px;
    margin-top: 8px;
  }

  .booking-calendar-head {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 6px;
  }

  .booking-calendar-head strong {
    font-size: .92rem;
  }

  .calendar-month-button {
    min-width: 34px;
    min-height: 34px;
    border-radius: 12px;
    font-size: 1.16rem;
  }

  .booking-calendar-weekdays {
    gap: 4px;
  }

  .booking-calendar-weekdays span {
    font-size: .58rem;
  }

  .booking-calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
  }

  .calendar-day {
    min-height: 48px;
    padding: 5px 2px;
    border-radius: 10px;
  }

  .calendar-day strong {
    font-size: .9rem;
  }

  .calendar-day span,
  .calendar-day small,
  .calendar-day em {
    font-size: .52rem;
    line-height: 1.08;
  }

  .calendar-day-detail {
    padding: 9px;
    border-radius: 14px;
  }

  .manual-card {
    position: static;
  }

  .view-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .tab-link {
    min-width: 0;
  }

  .booking-panel,
  .owner-main,
  .status-panel,
  .side-card,
  .auth-panel,
  .home-hero,
  .home-shop-list {
    width: 100%;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 12px 26px rgba(8, 127, 150, .1);
  }

  .home-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .home-actions .primary-button,
  .home-actions .secondary-button {
    width: 100%;
    min-width: 0;
  }

  .home-shop-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .home-shop-card .owner-link {
    grid-column: 1 / -1;
    width: 100%;
  }

  .queue-card {
    width: 100%;
    padding: 11px;
    border-radius: 16px;
  }

  .owner-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
  }

  .stat-chip {
    min-height: 54px;
    padding: 9px 8px;
    border-radius: 15px;
  }

  .stat-chip strong {
    font-size: 1.35rem;
  }

  .stat-chip span {
    font-size: .74rem;
    line-height: 1.25;
  }

  .admin-hero,
  .admin-section,
  .admin-shop-card {
    border-radius: 18px;
    padding: 14px;
  }

  .admin-hero,
  .admin-section-head,
  .admin-shop-top {
    display: grid;
  }

  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-shop-metrics,
  .admin-shop-contact,
  .admin-shop-actions {
    grid-template-columns: 1fr;
  }

  .admin-filter-group {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-attention-item {
    grid-template-columns: 1fr;
  }

  .customer-hero {
    grid-template-columns: minmax(0, 1fr) 94px;
    gap: 10px;
    align-items: start;
  }

  .customer-mascot {
    min-height: 94px;
    border-radius: 22px;
  }

  .mascot-card img {
    width: 94px;
  }

  .corner-mascot {
    width: 58px;
    margin: -6px -4px 2px 8px;
  }

  .owner-mascot {
    display: none;
  }

  .queue-actions,
  .inline-form,
  .slot-form,
  .auth-actions {
    grid-template-columns: 1fr;
  }

  .owner-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .stat-chip {
    min-height: 50px;
    padding: 8px 6px;
    border-radius: 14px;
  }

  .stat-chip strong {
    font-size: 1.22rem;
  }

  .stat-chip span {
    font-size: .68rem;
  }

  .connection-grid {
    grid-template-columns: 1fr;
  }

  .slot-form button {
    grid-column: auto;
  }

  .service-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choice {
    min-height: 50px;
    padding: 10px;
    border-radius: 15px;
  }

  h1 {
    font-size: 1.55rem;
  }

  .owner-main h1 {
    font-size: 1.35rem;
  }

  .owner-header-panel {
    padding: 0;
  }

  .lead {
    font-size: .94rem;
  }

  .booking-form {
    gap: 14px;
    margin-top: 18px;
  }

  .queue-top,
  .section-head {
    display: grid;
  }

  .section-head {
    width: 100%;
    justify-content: stretch;
    justify-items: stretch;
  }

  .owner-session {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    justify-self: end;
    justify-items: center;
    width: min(100%, 324px);
    max-width: 324px;
    gap: 8px;
  }

  .owner-session span {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 42px;
    padding-inline: 12px;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .owner-session .secondary-button {
    width: 100%;
    min-width: 0;
    padding-inline: 10px;
  }

  .notification-button {
    width: 40px;
    height: 40px;
    min-height: 40px;
    min-width: 0;
    justify-self: end;
    border-radius: 14px;
  }

  .notification-menu {
    top: calc(100% + 7px);
    right: 0;
    transform: none;
    width: min(320px, calc(100vw - 16px));
  }

  .notification-account span {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .contact-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-actions .contact-button:only-child {
    grid-column: 1 / -1;
  }

  .primary-button,
  .secondary-button,
  .danger-button {
    min-height: 46px;
  }
}

.primary-button:disabled,
.secondary-button:disabled,
.danger-button:disabled {
  cursor: not-allowed;
  opacity: .56;
}

@media (max-width: 420px) {
  .service-options {
    grid-template-columns: 1fr;
  }

  .owner-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .stat-chip {
    min-height: 50px;
    padding: 8px 6px;
    border-radius: 14px;
  }

  .stat-chip strong {
    font-size: 1.22rem;
  }

  .stat-chip span {
    font-size: .68rem;
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }

  .customer-hero {
    grid-template-columns: 1fr;
  }

  .customer-mascot {
    display: none;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .tab-link {
    padding: 9px 10px;
  }
}
