:root {
  color-scheme: light;
  --theme-background: #d4e2f2;
  --theme-panel: #ffffff;
  --theme-border: #839bb9;
  --theme-text: #26384b;
  --theme-accent: #446c98;
  --theme-window-top: #f6fbff;
  --theme-window-bottom: #d5e2f4;
  --theme-menu-top: #ecf4fd;
  --theme-menu-bottom: #d8e5f6;
  --theme-ribbon-top: #e9f2fc;
  --theme-ribbon-bottom: #bdd2ea;
  --theme-sidebar-top: #dae6f7;
  --theme-sidebar-bottom: #bdd0e8;
  --theme-main-top: #dce8f7;
  --theme-main-bottom: #c7d8ed;
  --theme-status-top: #e6eef9;
  --theme-status-bottom: #ccd9ec;
  --theme-grid-line: #9fb4cb;
  --theme-grid-soft: #e4ecf8;
  --theme-grid-major-line: #4e7097;
  --theme-grid-half-hour-line: #b8cbe4;
  --theme-provider-top: #ffd27a;
  --theme-provider-bottom: #f3a22a;
  --theme-lane: #f6f8fb;
  --theme-lane-alt: #ebeef4;
  --theme-lane-off: #d9dfe8;
  --theme-quiet: #5a718a;
  --sidebar-width: 172px;
  --sidebar-resizer-width: 14px;
  --mini-month-width: 152px;
  --time-column-width: 59px;
  --slot-height: 22px;
  --radius-tight: 3px;
  --provider-column-width: 220px;
  --provider-count: 4;
  --employee-fit-count: 4;
  --visible-weekday-count: 6;
  --slot-count: 44;
  --ribbon-tool-width: 68px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: #eef5fd;
}

html,
body {
  margin: 0;
  width: 100%;
  max-width: 100vw;
  min-height: 100%;
  height: 100%;
  overflow-x: hidden;
  overscroll-behavior: none;
  position: relative;
}

body {
  overflow: hidden;
  overscroll-behavior: none;
  font-family: Tahoma, Verdana, "Segoe UI", sans-serif;
  font-size: 11px;
  line-height: 1.3;
  color: var(--theme-text);
  background: var(--theme-background);
}

body.is-scroll-locked {
  overflow: hidden;
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  color: #1f3144;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 211, 122, 0.34), transparent 36%),
    radial-gradient(circle at 18% 20%, rgba(104, 139, 178, 0.28), transparent 28%),
    linear-gradient(180deg, #eef5fd 0%, #c8d9ee 100%);
}

.boot-tool-rain {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.boot-tool {
  position: absolute;
  top: -76px;
  left: var(--tool-left, 50%);
  display: block;
  color: rgba(49, 76, 107, 0.36);
  opacity: 0.82;
  transform: translateY(-80px) rotate(var(--tool-rotate, 0deg));
  animation: boot-tool-fall var(--tool-duration, 6.5s) linear infinite;
  animation-delay: var(--tool-delay, 0s);
  filter: drop-shadow(0 10px 12px rgba(36, 58, 84, 0.12));
}

.boot-tool:nth-child(1) {
  --tool-left: 8%;
  --tool-delay: -0.4s;
  --tool-duration: 6.8s;
  --tool-rotate: -18deg;
}

.boot-tool:nth-child(2) {
  --tool-left: 23%;
  --tool-delay: -2.7s;
  --tool-duration: 7.6s;
  --tool-rotate: 12deg;
}

.boot-tool:nth-child(3) {
  --tool-left: 39%;
  --tool-delay: -1.3s;
  --tool-duration: 6.2s;
  --tool-rotate: 24deg;
}

.boot-tool:nth-child(4) {
  --tool-left: 56%;
  --tool-delay: -3.5s;
  --tool-duration: 7.2s;
  --tool-rotate: -10deg;
}

.boot-tool:nth-child(5) {
  --tool-left: 71%;
  --tool-delay: -4.8s;
  --tool-duration: 6.7s;
  --tool-rotate: 15deg;
}

.boot-tool:nth-child(6) {
  --tool-left: 86%;
  --tool-delay: -1.9s;
  --tool-duration: 7.9s;
  --tool-rotate: -26deg;
}

.boot-tool:nth-child(7) {
  --tool-left: 15%;
  --tool-delay: -5.4s;
  --tool-duration: 8.2s;
  --tool-rotate: 28deg;
}

.boot-tool:nth-child(8) {
  --tool-left: 78%;
  --tool-delay: -6.1s;
  --tool-duration: 7.1s;
  --tool-rotate: 8deg;
}

.boot-tool-scissors {
  width: 52px;
  height: 52px;
}

.boot-tool-scissors::before {
  content: "\2702";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 700 48px/1 "Segoe UI Symbol", "Apple Color Emoji", Tahoma, sans-serif;
}

.boot-tool-comb {
  width: 58px;
  height: 24px;
  border-top: 4px solid currentColor;
  border-left: 4px solid currentColor;
  border-radius: 5px 0 0 5px;
  background: repeating-linear-gradient(90deg, currentColor 0 3px, transparent 3px 8px) 7px 8px / calc(100% - 7px) 15px no-repeat;
}

.boot-tool-brush {
  width: 14px;
  height: 58px;
  border-radius: 999px;
  background: linear-gradient(180deg, #b47a31 0 45%, currentColor 45% 100%);
}

.boot-tool-brush::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -13px;
  width: 28px;
  height: 18px;
  border-radius: 4px 4px 14px 14px;
  background: linear-gradient(180deg, #d19642, #6f8eb2);
  transform: translateX(-50%);
}

.boot-tool-bowl {
  width: 48px;
  height: 26px;
  border: 3px solid currentColor;
  border-top: 0;
  border-radius: 0 0 28px 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(68, 108, 152, 0.28));
}

.boot-tool-bowl::before {
  content: "";
  position: absolute;
  left: 7px;
  top: -9px;
  width: 34px;
  height: 15px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, #ffd37a 0 28%, #d19642 29% 62%, #446c98 63% 100%);
  box-shadow: inset 0 0 0 2px rgba(49, 76, 107, 0.2);
}

@keyframes boot-tool-fall {
  0% {
    transform: translate3d(-10px, -90px, 0) rotate(var(--tool-rotate, 0deg));
  }

  50% {
    transform: translate3d(14px, 50vh, 0) rotate(calc(var(--tool-rotate, 0deg) + 95deg));
  }

  100% {
    transform: translate3d(-8px, calc(100vh + 100px), 0) rotate(calc(var(--tool-rotate, 0deg) + 190deg));
  }
}

.boot-card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: 30px 28px 26px;
  border: 1px solid rgba(99, 125, 154, 0.55);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(252, 255, 255, 0.94), rgba(226, 238, 250, 0.96));
  box-shadow: 0 28px 70px rgba(36, 58, 84, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.boot-mark {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  object-fit: contain;
  background: transparent;
  border: none;
  box-shadow: none;
}

.boot-copy {
  display: grid;
  gap: 7px;
}

.boot-kicker,
.boot-copy h1,
.boot-status-message {
  margin: 0;
}

.boot-kicker {
  color: #446c98;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.boot-copy h1 {
  color: #1d3043;
  font-size: clamp(1.45rem, 4.6vw, 2rem);
  line-height: 1.08;
}

.boot-status-message {
  color: #50677f;
  font-size: 0.94rem;
  line-height: 1.45;
}

.boot-progress {
  position: relative;
  height: 8px;
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid rgba(93, 119, 148, 0.36);
  border-radius: 999px;
  background: rgba(178, 200, 224, 0.42);
  contain: paint;
  isolation: isolate;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
}

.boot-progress span {
  position: absolute;
  inset: 1px auto 1px 1px;
  width: 40%;
  border-radius: inherit;
  background: linear-gradient(90deg, #446c98, #7aa0c8, #d19642);
  animation: boot-progress-sweep 1.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: transform;
}

@keyframes boot-progress-sweep {
  0% {
    transform: translate3d(-105%, 0, 0);
  }

  100% {
    transform: translate3d(255%, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .boot-tool-rain {
    display: none;
  }

  .boot-progress span {
    animation: none;
    transform: none;
    width: 100%;
  }
}

body.is-auth-locked {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(255, 211, 122, 0.35), transparent 65%),
    radial-gradient(ellipse 60% 45% at 50% 110%, rgba(104, 139, 178, 0.28), transparent 60%),
    radial-gradient(circle at 10% 20%, rgba(212, 226, 242, 0.5), transparent 40%),
    linear-gradient(180deg, #f8fbff 0%, #e8f1fc 50%, #d4e3f3 100%);
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.auth-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px 20px;
  box-sizing: border-box;
}

.auth-card {
  width: min(100%, 420px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 24px;
  box-shadow:
    0 20px 48px -12px rgba(25, 49, 74, 0.16),
    0 1px 3px rgba(25, 49, 74, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  padding: 38px 32px;
  box-sizing: border-box;
  text-align: center;
}

.auth-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.auth-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(68, 108, 152, 0.22));
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(243, 162, 42, 0.12);
  border: 1px solid rgba(243, 162, 42, 0.35);
  color: #a16207;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.auth-title {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #19314a;
  line-height: 1.15;
}

.auth-subtitle {
  margin: 4px 0 10px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #4b6380;
}

.auth-copy {
  margin: 0 0 18px;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.5;
}

.auth-helper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  margin: 0 0 20px;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.4;
}

.auth-helper-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: #64748b;
}

.auth-password-rules {
  margin: -2px 0 0;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.4;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-google-signin {
  display: flex;
  justify-content: center;
  min-height: 44px;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 8px 0 12px;
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.auth-divider span {
  padding: 0 12px;
}

.auth-secure-panel {
  display: grid;
  justify-items: stretch;
  gap: 8px;
  padding: 0;
}

.auth-secure-panel[hidden] {
  display: none !important;
}

.auth-passkey-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #dadce0;
  border-radius: 20px;
  background: #ffffff;
  color: #1f2937;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all 0.15s ease;
}

.auth-passkey-btn:hover {
  background: #f8fafc;
  border-color: #b0b7c3;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.auth-passkey-btn:active {
  background: #f1f5f9;
  transform: translateY(0);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.auth-btn-icon {
  width: 18px;
  height: 18px;
  color: #2563eb;
  flex-shrink: 0;
}

.auth-passkey-prompt {
  position: fixed;
  inset: 0;
  z-index: 230;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.auth-passkey-prompt[hidden] {
  display: none !important;
}

.auth-passkey-card {
  width: min(100%, 380px);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
  text-align: left;
}

.auth-passkey-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.auth-passkey-modal-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: #2563eb;
}

.auth-passkey-card h2 {
  margin: 0;
  color: #19314a;
  font-size: 1.2rem;
  font-weight: 700;
}

.auth-passkey-card p {
  margin: 0 0 16px;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.5;
}

.auth-passkey-status {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.86rem;
}

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

.auth-primary-btn {
  flex: 1;
  min-height: 40px;
  padding: 9px 16px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #356294 0%, #264a74 100%);
  color: #ffffff;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(38, 74, 116, 0.25);
  transition: all 0.15s ease;
}

.auth-primary-btn:hover {
  background: linear-gradient(180deg, #2c5481 0%, #1e3c5f 100%);
}

.auth-secondary-btn {
  flex: 1;
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #334155;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease;
}

.auth-secondary-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.auth-footnote {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.45;
}

.auth-aux-actions {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

.auth-subtle-link {
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: #4b6380;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-subtle-link:hover,
.auth-subtle-link:focus-visible {
  color: #19314a;
}

.auth-developer-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
  text-align: left;
}

.auth-developer-copy {
  margin: 0;
  color: #475569;
  font-size: 0.84rem;
  line-height: 1.45;
}

.auth-field {
  display: grid;
  gap: 6px;
}

.auth-field span {
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
}

.auth-field input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #1e293b;
  font: inherit;
  box-sizing: border-box;
}

.auth-field input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

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

.auth-status {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.86rem;
  text-align: left;
  line-height: 1.45;
}

.window-session {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  position: relative;
}

.account-menu-button {
  gap: 6px;
}

.account-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 150;
  display: grid;
  min-width: 178px;
  padding: 4px 0;
  border: 1px solid #89a0bf;
  border-radius: var(--radius-tight);
  background: linear-gradient(#fefefe, #edf3fa);
  box-shadow: 0 6px 16px rgba(36, 49, 65, 0.18);
}

.account-menu[hidden] {
  display: none !important;
}

.account-menu-item {
  min-height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.account-menu-item:hover,
.account-menu-item:focus-visible {
  background: rgba(81, 117, 161, 0.12);
}

.session-role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(90, 113, 138, 0.35);
  background: rgba(255, 255, 255, 0.72);
  color: #29425b;
  font-size: 0.78rem;
  font-weight: 700;
}

.session-role-badge.is-owner {
  background: rgba(255, 224, 159, 0.88);
  border-color: rgba(214, 148, 56, 0.5);
}

.session-role-badge.is-developer-access {
  background: rgba(243, 236, 215, 0.92);
  border-color: rgba(184, 151, 89, 0.48);
}

.session-email {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #36516b;
  font-size: 0.9rem;
}

.staff-accounts-modal-card {
  width: min(1080px, calc(100vw - 40px));
}

.staff-accounts-body {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 16px;
}

.staff-accounts-toolbar {
  margin-bottom: 10px;
}

.staff-accounts-list {
  display: grid;
  gap: 10px;
  min-height: 280px;
  max-height: 460px;
  overflow: auto;
  align-content: start;
}

.staff-account-row {
  width: 100%;
  border: 1px solid rgba(126, 152, 181, 0.5);
  border-radius: 14px;
  background: rgba(242, 247, 254, 0.95);
  padding: 12px;
  text-align: left;
  display: grid;
  gap: 8px;
  cursor: pointer;
}

.staff-account-row:hover,
.staff-account-row:focus-visible {
  border-color: rgba(214, 148, 56, 0.75);
  box-shadow: 0 0 0 2px rgba(240, 164, 58, 0.15);
}

.staff-account-row.is-selected {
  border-color: rgba(214, 148, 56, 0.9);
  background: rgba(255, 245, 223, 0.96);
}

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

.staff-account-email {
  font-weight: 700;
  color: #24384b;
}

.staff-account-name {
  color: #51687f;
  font-size: 0.92rem;
}

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

.staff-account-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(213, 226, 242, 0.85);
  color: #29425b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.staff-account-pill.is-owner {
  background: rgba(255, 221, 154, 0.94);
}

.staff-account-pill.is-disabled {
  background: rgba(228, 197, 197, 0.96);
  color: #6f2d2d;
}

.staff-account-pill.is-forced-change {
  background: rgba(235, 224, 185, 0.98);
  color: #6d5322;
}

.passkeys-modal-card {
  width: min(880px, calc(100vw - 40px));
}

.passkeys-modal-body {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .passkeys-modal-body {
    grid-template-columns: 1fr;
  }
}

.passkeys-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

#passkeys-enroll.toolbar-button {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
  font-weight: 600;
}

#passkeys-enroll.toolbar-button:hover {
  background: #1d4ed8;
}

.passkeys-status {
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(240, 164, 58, 0.15);
  border: 1px solid rgba(240, 164, 58, 0.4);
  color: #5c3c10;
  font-size: 0.88rem;
}

.passkeys-list {
  display: grid;
  gap: 10px;
  min-height: 220px;
  max-height: 480px;
  overflow-y: auto;
  align-content: start;
}

.passkey-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(126, 152, 181, 0.5);
  border-radius: 12px;
  background: rgba(242, 247, 254, 0.95);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.passkey-item-row:hover {
  border-color: rgba(214, 148, 56, 0.75);
  box-shadow: 0 0 0 2px rgba(240, 164, 58, 0.12);
}

.passkey-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.passkey-item-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.passkey-item-details {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.passkey-item-name {
  font-weight: 700;
  color: #24384b;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.passkey-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 0.82rem;
  color: #5b7189;
}

.passkey-meta-item {
  white-space: nowrap;
}

.passkey-meta-id {
  font-family: monospace;
  font-size: 0.78rem;
  opacity: 0.8;
}

.passkey-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.passkey-delete-button.is-danger {
  border-color: #ba7e7e;
  background: linear-gradient(#fff5f5, #eddcdc);
  color: #7b2626;
  font-weight: 600;
}

.passkey-delete-button.is-danger:hover {
  border-color: #a24b4b;
  background: #f7dada;
  color: #5c1616;
}

.passkeys-guide-panel {
  display: flex;
  flex-direction: column;
}

.passkeys-guide-content {
  display: grid;
  gap: 12px;
  font-size: 0.88rem;
  color: #3b5066;
  line-height: 1.45;
}

.passkeys-guide-intro {
  margin: 0;
}

.passkeys-guide-steps {
  display: grid;
  gap: 10px;
}

.passkeys-guide-step {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(126, 152, 181, 0.35);
}

.passkeys-guide-step p {
  margin: 4px 0 0;
  font-size: 0.85rem;
}

.passkeys-guide-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #24384b;
  color: #ffffff;
}

.settings-view-panel {
  max-width: 420px;
}

.settings-view-panel.section-panel {
  min-height: 0;
}

.settings-view-body {
  padding: 6px 8px;
}

.settings-form.app-form {
  padding: 0;
  gap: 6px;
}

.settings-form {
  display: grid;
  gap: 6px;
}

.settings-modal-card {
  width: min(520px, calc(100vw - 40px));
}

.settings-fieldset {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #a6b8ce;
  border-radius: var(--radius-tight);
  background: #ffffff;
}

.settings-fieldset legend {
  padding: 0 2px;
  color: #3d5b7e;
  font-size: 11px;
  font-weight: 700;
}

.settings-tax-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.settings-tax-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.settings-tax-field span {
  font-size: 11px;
  font-weight: 700;
  color: #4f6988;
  white-space: nowrap;
}

.settings-tax-field input[type="number"] {
  width: 5.5rem;
  min-height: 22px;
  padding: 1px 5px;
  font-size: 12px;
}

.settings-tax-note {
  flex: 1 1 10rem;
  min-width: 0;
  margin: 0;
  font-size: 10px;
  line-height: 1.25;
  color: #5e748d;
}

.settings-form-actions {
  gap: 4px;
  margin: 0;
  padding-top: 2px;
}

.settings-form-actions .toolbar-button {
  min-height: 22px;
  padding: 0 8px;
  font-size: 11px;
}

.weekday-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.weekday-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  min-height: 22px;
  padding: 2px 6px;
  border: 1px solid #9fb2ca;
  border-radius: 999px;
  background: #f5f8fc;
  color: #4a627a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.weekday-toggle:has(input:checked) {
  border-color: #4a7bb8;
  background: linear-gradient(#e8f2ff, #d4e6fb);
  color: #1f4f85;
  box-shadow: inset 0 0 0 1px rgba(74, 123, 184, 0.18);
}

.weekday-toggle:has(input:focus-visible) {
  outline: 2px solid #4a7bb8;
  outline-offset: 1px;
}

.weekday-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.weekday-toggle span {
  pointer-events: none;
}

/* Settings Online Booking */
.settings-online-booking-shell {
  display: grid;
  gap: 8px;
  padding: 4px 0;
}

.settings-online-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  color: #1a2a3a;
}

.settings-online-toggle-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.settings-subgroup {
  display: grid;
  gap: 4px;
}

.settings-subgroup-title {
  font-size: 11px;
  font-weight: 700;
  color: #4f6988;
}

.settings-checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.settings-checkbox-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: #f5f8fc;
  border: 1px solid #c2d0df;
  border-radius: var(--radius-tight);
  font-size: 11px;
  color: #2e4359;
  cursor: pointer;
  user-select: none;
}

.settings-checkbox-item:has(input:checked) {
  background: #e8f0fe;
  border-color: #628cc1;
  color: #1a3a60;
  font-weight: 600;
}

.settings-checkbox-item input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}

@media (max-width: 960px) {
  .staff-accounts-body {
    grid-template-columns: 1fr;
  }

  .window-session {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .session-email {
    max-width: 100%;
  }
}

body.is-resizing-sidebar {
  cursor: col-resize;
  user-select: none;
}

body.is-resizing-mini-calendar {
  cursor: row-resize;
  user-select: none;
}

body.is-resizing-schedule {
  cursor: col-resize;
  user-select: none;
}

body.is-mobile-timeblock-dragging {
  user-select: none;
}

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

button {
  border-radius: var(--radius-tight);
  cursor: pointer;
}

input,
select,
textarea {
  min-height: 24px;
  border: 1px solid #8da3be;
  border-radius: var(--radius-tight);
  background: #ffffff;
  padding: 3px 6px;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

h1,
h2,
h3,
h4,
p,
ol {
  margin: 0;
}

a {
  color: inherit;
}

#app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100svh;
  background: linear-gradient(var(--theme-window-top), var(--theme-background));
}

#topbar {
  min-width: 0;
  border-bottom: 1px solid var(--theme-border);
  background: linear-gradient(var(--theme-window-top), var(--theme-window-bottom));
}

.window-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 24px;
  padding: 0 8px;
  background: linear-gradient(#f6fbff, #d7e4f5);
  border-bottom: 1px solid rgba(115, 140, 170, 0.55);
}

.window-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.window-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: transparent url("assets/app-icons/lavish-booking-logo-ribbon-32.png") center / contain no-repeat;
  flex-shrink: 0;
}

#brand-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.runtime-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 999px;
  line-height: 1.3;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
  vertical-align: middle;
}

.runtime-badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.runtime-badge--desktop {
  background: linear-gradient(180deg, #1f4277 0%, #16325c 100%);
  color: #ffffff;
  border: 1px solid #0f2444;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.runtime-badge--desktop::before {
  background: #22c55e;
  box-shadow: 0 0 4px #22c55e;
}

.runtime-badge--web {
  background: rgba(80, 105, 135, 0.12);
  color: #3b506c;
  border: 1px solid rgba(80, 105, 135, 0.28);
}

.runtime-badge--web::before {
  background: #3b82f6;
}

.menu-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  min-height: 24px;
  padding: 1px 4px;
  background: linear-gradient(var(--theme-menu-top), var(--theme-menu-bottom));
  border-bottom: 1px solid rgba(120, 145, 176, 0.48);
}

.menu-button,
.toolbar-button,
.sidebar-button,
.drawer-button,
.tab-button,
.nav-button,
.section-button,
.quick-link,
.priority-item,
.ribbon-tool {
  border: 1px solid transparent;
  background: transparent;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.menu-button {
  min-height: 21px;
  padding: 0 4px;
  white-space: nowrap;
}

.menu-button.is-open,
.menu-button:hover,
.menu-button:focus-visible {
  border-color: rgba(115, 140, 170, 0.72);
  background: rgba(255, 255, 255, 0.5);
}

.menu-dropdown-root {
  position: fixed;
  z-index: 140;
  min-width: 212px;
  border: 1px solid #89a0bf;
  border-radius: var(--radius-tight);
  background: linear-gradient(#fefefe, #edf3fa);
  box-shadow: 0 6px 16px rgba(36, 49, 65, 0.18);
}

.menu-dropdown {
  display: grid;
  padding: 4px 0;
}

.menu-dropdown-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 24px;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
}

.menu-dropdown-item:hover,
.menu-dropdown-item:focus-visible {
  background: rgba(81, 117, 161, 0.12);
}

.menu-dropdown-note {
  color: #5c728d;
}

.menu-dropdown-separator {
  height: 1px;
  margin: 4px 0;
  background: #cdd8e7;
}

.menu-dropdown-theme-field {
  display: grid;
  gap: 4px;
  padding: 6px 10px 8px;
}

.menu-dropdown-theme-label {
  color: #405a76;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.menu-dropdown-theme-select {
  width: 100%;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid #b8c9dc;
  border-radius: var(--radius-tight);
  background: #ffffff;
  color: #243141;
  font-size: 12px;
}

.ribbon-bar {
  padding: 5px 8px 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--theme-border);
  background: linear-gradient(var(--theme-ribbon-top), var(--theme-ribbon-bottom));
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.ribbon-bar::-webkit-scrollbar {
  display: none;
}

.ribbon-strip {
  display: grid;
  grid-template-columns: repeat(9, minmax(84px, 1fr));
  align-items: start;
  gap: 6px;
  width: 100%;
  min-width: 100%;
}

.ribbon-tool {
  display: grid;
  grid-template-rows: 38px auto;
  justify-items: center;
  align-items: center;
  gap: 3px;
  padding: 4px 4px 4px;
  width: 100%;
  min-width: 0;
  flex: 1 1 0;
  min-height: 64px;
  text-align: center;
  color: #1a3654;
  border: 1px solid transparent;
  border-radius: var(--radius-tight);
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.05s ease;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
  --ribbon-icon-color: #2f6ea5;
}

.ribbon-tool:nth-child(6n + 2) {
  --ribbon-icon-color: #4f7f3f;
}

.ribbon-tool:nth-child(6n + 3) {
  --ribbon-icon-color: #8b5e9f;
}

.ribbon-tool:nth-child(6n + 4) {
  --ribbon-icon-color: #b46a2e;
}

.ribbon-tool:nth-child(6n + 5) {
  --ribbon-icon-color: #3b8177;
}

.ribbon-tool:nth-child(6n + 6) {
  --ribbon-icon-color: #9d4f62;
}

.ribbon-tool:hover,
.ribbon-tool:focus-visible {
  border-color: rgba(95, 123, 158, 0.45);
  background: rgba(255, 255, 255, 0.4);
}

.ribbon-tool:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.65);
}

.ribbon-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 7px;
  background: var(--ribbon-icon-color);
  box-shadow: inset 0 -1px 0 rgba(18, 35, 57, 0.25), 0 1px 2px rgba(37, 56, 78, 0.18);
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0;
}

.ribbon-icon::before {
  content: none;
}

.ribbon-icon-fallback {
  position: relative;
  z-index: 1;
  line-height: 1;
  transform: none;
}

.ribbon-icon-image {
  position: absolute;
  top: -2px;
  left: 0;
  z-index: 1;
  width: 34px;
  height: 34px;
  object-fit: contain;
  opacity: 0;
  filter: drop-shadow(0 1px 1px rgba(39, 58, 82, 0.18));
  pointer-events: none;
  display: none;
}

.ribbon-icon.has-loaded-image .ribbon-icon-fallback {
  opacity: 1;
}

.ribbon-icon.has-loaded-image .ribbon-icon-image {
  opacity: 1;
}

.ribbon-icon::after {
  content: none;
}

.ribbon-label {
  display: block;
  width: 100%;
  max-width: none;
  min-height: 16px;
  font-size: 12px;
  font-weight: 600;
  color: #1a3654;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  overflow-wrap: normal;
  padding-inline: 2px;
}

.ribbon-label.is-compact-label {
  font-size: 11.5px;
  line-height: 1.2;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, var(--sidebar-width)) var(--sidebar-resizer-width) minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--theme-border);
  background: linear-gradient(var(--theme-sidebar-top), var(--theme-sidebar-bottom));
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 22px;
  border-bottom: 1px solid var(--theme-border);
  background: linear-gradient(#eef5ff, #d2e1f4);
}

.sidebar-title {
  min-height: 22px;
  padding: 4px 8px;
  font-size: 18px;
  font-weight: 700;
  color: #405f86;
}

.sidebar-header-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding-right: 6px;
}

.sidebar-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  margin: 0;
  padding: 0;
  border: 1px solid #8ba2bf;
  border-radius: var(--radius-tight);
  background: linear-gradient(#fdfefe, #dbe6f6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  color: #244164;
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
  transition:
    border-color 120ms ease,
    background 120ms ease,
    color 120ms ease;
}

.sidebar-nav-btn:hover {
  border-color: #58779d;
  background: linear-gradient(#ffffff, #cce0f5);
  color: #0b1f38;
}

.sidebar-nav-btn:active {
  background: linear-gradient(#cce0f5, #b8d4f0);
}

.sidebar-nav-btn:focus-visible {
  outline: 2px solid #3c6382;
  outline-offset: 1px;
}

.sidebar-resizer {
  position: relative;
  display: grid;
  align-content: stretch;
  justify-items: center;
  width: var(--sidebar-resizer-width);
  min-width: var(--sidebar-resizer-width);
  border-right: 1px solid var(--theme-border);
  border-left: 1px solid rgba(255, 255, 255, 0.55);
  background: linear-gradient(#d7e5f6, #bfd3ee);
  cursor: col-resize;
}

.sidebar-resizer:hover,
.sidebar-resizer:focus-visible {
  background: linear-gradient(#dce9f8, #c8d9f0);
}

.sidebar-grip {
  width: 2px;
  height: 100%;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(81, 107, 139, 0.18) 0,
      rgba(81, 107, 139, 0.18) 3px,
      transparent 3px,
      transparent 7px
    );
}

.sidebar-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.mini-calendar-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--mini-month-width), var(--mini-month-width)));
  align-content: start;
  justify-content: center;
  flex: 0 0 var(--mini-calendar-height, 165px);
  height: var(--mini-calendar-height, 165px);
  min-height: 140px;
  max-height: var(--mini-calendar-height, 165px);
  gap: 5px;
  padding: 4px 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fbfcfd;
}

.mini-month {
  width: var(--mini-month-width);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.mini-month-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px 4px;
  border: 0;
  background: #c7e3ee;
  color: #111111;
  user-select: none;
}

.mini-month-title {
  flex: 1 1 auto;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2px;
}

.mini-month-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  width: 18px;
  height: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: #244164;
  cursor: pointer;
  line-height: 1;
  transition:
    background 120ms ease,
    color 120ms ease;
}

.mini-month-nav:hover {
  background: rgba(255, 255, 255, 0.65);
  color: #0b1f38;
}

.mini-month-nav:active {
  background: rgba(0, 0, 0, 0.08);
}

.mini-month-nav:focus-visible {
  outline: 1px solid #405f86;
  outline-offset: -1px;
}

.mini-month-nav svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  pointer-events: none;
}

.mini-month-weekdays,
.mini-month-grid {
  display: grid;
  grid-template-columns: repeat(var(--visible-weekday-count), minmax(0, 1fr));
  column-gap: 7px;
  border: 0;
  background: transparent;
}

.mini-month-weekdays {
  padding: 2px 4px 0;
  row-gap: 0;
}

.mini-month-grid {
  padding: 0 4px 2px;
  row-gap: 0;
  grid-auto-rows: 14px;
  min-height: 84px;
}

.mini-month-weekdays span {
  height: 14px;
  min-height: 14px;
  border: 0;
  color: #111111;
  font-family: "Monaco", "Andale Mono", "Consolas", "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 14px;
  text-align: center;
  -webkit-font-smoothing: none;
  text-rendering: geometricPrecision;
}

.mini-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: auto;
  min-width: 18px;
  height: 14px;
  min-height: 14px;
  margin: 0;
  padding: 0 2px;
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #222222;
  font-family: "Monaco", "Andale Mono", "Consolas", "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 14px;
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
  -webkit-font-smoothing: none;
  text-rendering: geometricPrecision;
  transition:
    background 120ms ease,
    color 180ms ease;
}

.mini-day.is-muted {
  color: #999999;
  background: transparent;
}

.mini-day.has-items::after {
  content: none;
}

.mini-day.is-today {
  background: rgba(255, 238, 140, 0.62);
  color: #1a1a1a;
  font-weight: 700;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(218, 165, 32, 0.45);
}

.mini-day.is-selected {
  width: 18px;
  min-width: 18px;
  height: 14px;
  min-height: 14px;
  padding: 0;
  background: #c98b00;
  color: #000000;
  font-weight: 700;
  border-radius: 0;
  box-shadow: none;
}

.mini-day:hover,
.mini-day:focus-visible {
  background: #edf6fb;
  outline: 0;
}

.mini-day.is-today:hover,
.mini-day.is-today:focus-visible {
  background: rgba(255, 230, 105, 0.88);
  outline: 0;
}

.mini-day.is-selected:hover,
.mini-day.is-selected:focus-visible {
  background: #c98b00;
  outline: 0;
}

.mini-calendar-resizer {
  position: relative;
  flex: 0 0 8px;
  min-height: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.62);
  border-bottom: 1px solid #8fa7c6;
  background:
    linear-gradient(#d9e8f8, #bed2ec);
  cursor: row-resize;
  user-select: none;
  touch-action: none;
}

.mini-calendar-resizer::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 50%;
  width: 36px;
  height: 2px;
  transform: translateX(-50%);
  background:
    repeating-linear-gradient(
      to right,
      rgba(67, 91, 119, 0.42) 0,
      rgba(67, 91, 119, 0.42) 4px,
      transparent 4px,
      transparent 7px
    );
}

.mini-calendar-resizer:hover,
.mini-calendar-resizer:focus-visible,
body.is-resizing-mini-calendar .mini-calendar-resizer {
  background: linear-gradient(#e3eefb, #cadbf0);
  outline: 0;
}

.sidebar-box {
  margin: 0 0 5px;
  border-top: 1px solid #9fb5d1;
  border-bottom: 1px solid #879fc1;
  background: linear-gradient(#dbeafe, #c0d4ef);
}

.box-title {
  padding: 5px 7px 4px;
  border-bottom: 1px solid #9cb4d5;
  background: linear-gradient(#d6e6fb, #bed2ed);
  font-weight: 700;
  color: #4d6c91;
}

.sidebar-disclosure {
  position: relative;
  display: block;
  padding-right: 22px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.sidebar-disclosure::-webkit-details-marker {
  display: none;
}

.sidebar-disclosure::after {
  content: "\25BE";
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  font-size: 10px;
  color: #547396;
}

.quick-box[open] > .sidebar-disclosure::after {
  content: "\25B4";
}

.recent-box[open] > .sidebar-disclosure::after {
  content: "\25B4";
}

.jump-buttons {
  display: flex;
  gap: 4px;
  padding: 5px 6px 4px;
}

.sidebar-button,
.tab-button,
.nav-button,
.drawer-button,
.toolbar-button,
.section-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border: 1px solid #8ba2bf;
  border-radius: var(--radius-tight);
  background: linear-gradient(#fdfefe, #dbe6f6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
  transition: background 0.1s ease, border-color 0.1s ease, transform 0.05s ease;
}

.sidebar-button:hover,
.sidebar-button:focus-visible,
.tab-button:hover,
.tab-button:focus-visible,
.nav-button:hover,
.nav-button:focus-visible,
.drawer-button:hover,
.drawer-button:focus-visible,
.toolbar-button:hover,
.toolbar-button:focus-visible,
.section-button:hover,
.section-button:focus-visible {
  border-color: #58779d;
}

.sidebar-button:active:not(:disabled),
.tab-button:active:not(:disabled),
.nav-button:active:not(:disabled),
.drawer-button:active:not(:disabled),
.toolbar-button:active:not(:disabled),
.section-button:active:not(:disabled) {
  transform: scale(0.98);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

.sidebar-button:disabled,
.tab-button:disabled,
.nav-button:disabled,
.drawer-button:disabled,
.toolbar-button:disabled,
.section-button:disabled {
  opacity: 0.55;
  cursor: default;
}

.priority-box,
.quick-links {
  display: grid;
}

.priority-item,
.quick-link {
  display: grid;
  width: 100%;
  gap: 3px;
  padding: 5px 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 0;
  text-align: left;
  touch-action: manipulation;
  cursor: pointer;
  transition: background 0.08s ease, transform 0.05s ease;
}

.priority-item:first-of-type,
.quick-link:first-of-type {
  border-top: 0;
}

.priority-item {
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: start;
}

.priority-item:hover,
.priority-item:focus-visible,
.quick-link:hover,
.quick-link:focus-visible {
  background: rgba(255, 255, 255, 0.42);
}

.priority-item:active,
.quick-link:active {
  background: rgba(255, 255, 255, 0.65);
  transform: scale(0.99);
}

.priority-dot {
  width: 10px;
  height: 10px;
  margin-top: 1px;
  border: 1px solid #7d96b4;
  border-radius: 50%;
  background: linear-gradient(#ffffff, #dce5f3);
}

.priority-text strong,
.quick-link strong {
  display: block;
  font-size: 11px;
}

.priority-text span,
.quick-link span {
  display: block;
  color: #4d6787;
}

.quick-links {
  max-height: 168px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sidebar-field {
  display: grid;
  gap: 4px;
  padding: 6px 6px 5px;
}

.sidebar-field span {
  font-weight: 700;
  color: #4f6988;
}

.recent-box .jump-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.recent-box {
  margin-top: auto;
}

.main-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  background: linear-gradient(var(--theme-main-top), var(--theme-main-bottom));
}

.main-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
  padding: 3px 8px 2px;
  border-bottom: 1px solid var(--theme-border);
  background: linear-gradient(#ebf3ff, #d3e2f6);
}

.calendar-title {
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
  color: #3c5d84;
}

.banner-subtitle {
  margin-top: 1px;
  color: var(--theme-quiet);
}

.banner-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.view-tabs {
  display: flex;
  gap: 4px;
}

.tab-button.is-active,
.section-button.is-active {
  border-color: #5b789f;
  background: linear-gradient(#ffffff, #e6edf8);
  font-weight: 700;
}

.date-navigator {
  display: flex;
  gap: 4px;
}

.date-jump-buttons {
  display: flex;
  gap: 4px;
}

.global-toolbar,
.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 8px;
  border-bottom: 1px solid var(--theme-border);
  background: linear-gradient(#e7f0fc, #d1e0f4);
}

.global-toolbar {
  flex-wrap: wrap;
}

body[data-schedule-mode="availability"] .view-tabs,
body[data-schedule-mode="availability"] .toolbar-field.schedule-only {
  display: none;
}

.section-switcher,
.toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.section-button {
  min-width: 78px;
}

.toolbar-field {
  display: flex;
  align-items: center;
  gap: 4px;
}

.toolbar-field span {
  font-weight: 700;
  color: #58708e;
}

.toolbar-field select {
  min-width: 92px;
}

.toolbar-button.is-danger {
  border-color: #9b6f6f;
  background: linear-gradient(#fff7f7, #eed9d9);
  color: #6c2c2c;
}

.section-copy {
  color: var(--theme-quiet);
}

.search-field {
  min-width: min(340px, 100%);
}

.search-field input {
  width: 100%;
}

.lookup-modal-card {
  width: min(880px, calc(100vw - 32px));
}

.client-info-modal-card {
  width: min(560px, calc(100vw - 32px));
  max-height: min(85svh, 720px);
  display: flex;
  flex-direction: column;
}

.client-info-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 14px;
  overflow-y: auto;
}

.client-info-search-bar {
  display: flex;
  flex-direction: column;
}

.client-info-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1.5px solid #91abd0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.client-info-search-icon {
  font-size: 14px;
  color: #6482a5;
  user-select: none;
}

.client-info-search-field input {
  width: 100%;
  border: 0;
  outline: none;
  font-size: 13px;
  background: transparent;
}

.client-info-picker-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 90px;
  overflow-y: auto;
  padding: 2px 0;
}

.client-info-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid #b2c7e0;
  border-radius: 16px;
  background: #edf4fd;
  font-size: 11px;
  color: #2a4c73;
  cursor: pointer;
  transition: all 0.15s ease;
}

.client-info-chip:hover {
  background: #dbe9fa;
  border-color: #8daed5;
}

.client-info-chip.is-active {
  background: #2a619e;
  border-color: #1e4b7e;
  color: #ffffff;
  font-weight: 700;
}

.client-info-card-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid #c2d5eb;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.client-info-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-info-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #376597, #1f4269);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(31, 66, 105, 0.25);
  flex-shrink: 0;
}

.client-info-titles {
  min-width: 0;
}

.client-info-name {
  font-size: 16px;
  margin: 0;
  color: #132a45;
}

.client-info-id {
  font-size: 11px;
  color: #6481a3;
  font-family: monospace;
}

.client-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
  padding: 10px;
  border: 1px solid #dce7f4;
  border-radius: 6px;
  background: #ffffff;
  font-size: 12px;
}

.client-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.client-info-item-wide {
  grid-column: 1 / -1;
}

.client-info-label {
  font-size: 10px;
  font-weight: 700;
  color: #6a85a4;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.client-info-value {
  color: #1a3556;
}

.client-info-notes {
  margin: 0;
  padding: 6px 8px;
  border-radius: 4px;
  background: #f1f6fc;
  font-size: 11px;
  color: #38516d;
  line-height: 1.4;
}

.client-info-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.commitments-modal-card {
  width: min(720px, calc(100vw - 32px));
}

.commitments-body {
  min-height: 260px;
  max-height: calc(100svh - 220px);
  overflow: auto;
  padding: 12px;
}

.commitments-list {
  display: grid;
  gap: 10px;
}

.commitments-list .priority-item {
  gap: 6px;
  padding: 10px;
  border: 1px solid #ced9e8;
  border-radius: var(--radius-tight);
  background: linear-gradient(#ffffff, #f3f7fc);
}

.commitments-list .priority-item:first-of-type {
  border-top: 1px solid #ced9e8;
}

.lookup-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.lookup-field {
  display: grid;
  gap: 4px;
}

.lookup-field span {
  font-weight: 700;
  color: #4f6988;
}

.lookup-field input {
  width: 100%;
}

.lookup-results {
  min-height: 280px;
  max-height: calc(100svh - 220px);
  overflow: auto;
  border: 1px solid #c8d5e5;
  border-radius: var(--radius-tight);
  background: rgba(255, 255, 255, 0.84);
}

.lookup-results-shell {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.lookup-intro {
  padding: 8px 10px;
  border: 1px solid #d0dbe9;
  border-radius: var(--radius-tight);
  background: linear-gradient(#f7fbff, #edf4fc);
  color: #5b728c;
}

.lookup-group {
  display: grid;
  gap: 6px;
}

.lookup-group-heading {
  color: #456385;
  font-weight: 700;
}

.lookup-group-list {
  display: grid;
  border: 1px solid #d4deec;
  border-radius: var(--radius-tight);
  overflow: hidden;
  background: #ffffff;
}

.lookup-result-button {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-bottom: 1px solid #dbe4ef;
  background: transparent;
  text-align: left;
}

.lookup-group-list .lookup-result-button:last-child {
  border-bottom: 0;
}

.lookup-result-button:hover,
.lookup-result-button:focus-visible {
  background: rgba(80, 118, 162, 0.08);
}

.lookup-result-button strong {
  font-size: 12px;
}

.lookup-result-meta,
.lookup-result-note {
  color: #5b728c;
}

.view-host {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.app-view {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.section-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
}

.board-wrapper {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.employee-schedule-view {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  height: 100%;
  min-height: 0;
  padding: 10px;
  overflow: hidden;
  background: linear-gradient(#e8f2fb, #cbddec);
}

.employee-schedule-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #8ea9c5;
  border-radius: var(--radius-tight);
  background: linear-gradient(#f8fbff, #d9e6f2);
}

.employee-schedule-title {
  margin: 1px 0 0;
  color: #243d58;
  font-size: 18px;
  line-height: 1.2;
}

.employee-schedule-summary {
  margin: 3px 0 0;
  color: #58728f;
  font-size: 12px;
}

.form-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #2d4863;
  font-size: 12px;
  font-weight: 800;
}

.form-section-heading small {
  color: #6a7f96;
  font-size: 11px;
  font-weight: 700;
}

.availability-provider-section {
  display: grid;
  gap: 7px;
}

.availability-recurring-form {
  gap: 8px;
}

.availability-recurring-setup {
  display: grid;
  grid-template-columns: minmax(410px, 0.95fr) minmax(360px, 1.05fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
}

.availability-recurring-controls {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.availability-recurring-every-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.availability-provider-list,
.availability-recurring-weekdays {
  display: grid;
  gap: 6px;
}

.availability-provider-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.availability-provider-option,
.availability-weekday-option,
.availability-end-option,
.availability-overwrite-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #aabbd0;
  border-radius: var(--radius-tight);
  background: linear-gradient(#f8fbff, #e5eef8);
  color: #283f57;
  font-size: 12px;
  font-weight: 700;
}

.availability-provider-option span,
.availability-weekday-option span,
.availability-end-option span,
.availability-overwrite-toggle span {
  min-width: 0;
}

.availability-provider-option input,
.availability-weekday-option input,
.availability-end-option input,
.availability-overwrite-toggle input {
  flex: 0 0 auto;
}

.availability-recurring-weekdays {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.availability-recurring-fieldset {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 7px 9px;
  border: 1px solid #b9c8d8;
  border-radius: var(--radius-tight);
  background: #edf4fb;
}

.availability-recurring-fieldset legend {
  padding: 0 4px;
  color: #2d4863;
  font-size: 12px;
  font-weight: 800;
}

.availability-recurring-preview-section {
  display: grid;
  gap: 6px;
  align-self: stretch;
  min-height: 0;
}

.availability-recurring-preview,
.availability-recurring-conflicts {
  max-height: 124px;
  overflow: auto;
  padding: 7px;
  border: 1px solid #b9c8d8;
  border-radius: var(--radius-tight);
  background: #f8fbff;
}

.availability-recurring-conflicts {
  max-height: 116px;
  border-color: #d79878;
  background: #fff1e8;
  color: #744125;
  font-size: 12px;
  line-height: 1.35;
}

.availability-recurring-date-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
  color: #2d4660;
  font-size: 12px;
  font-weight: 700;
}

.availability-overwrite-toggle {
  border-color: #d79878;
  background: linear-gradient(#fff8f2, #ffe2cf);
  color: #6d3a20;
}

.availability-range-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.availability-grid {
  display: grid;
  grid-template-columns: minmax(150px, 190px) repeat(var(--availability-date-count), minmax(126px, 150px));
  grid-auto-rows: minmax(70px, auto);
  align-content: start;
  min-width: 100%;
  min-height: 0;
  overflow: auto;
  border: 1px solid #7893b2;
  border-radius: var(--radius-tight);
  background: #dce8f4;
}

.availability-header,
.availability-stylist-cell,
.availability-cell {
  border-right: 1px solid #9eb0c4;
  border-bottom: 1px solid #9eb0c4;
}

.availability-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  align-content: center;
  min-height: 44px;
  padding: 6px 8px;
  background: linear-gradient(#eef5fc, #c6d8ea);
  color: #27445f;
  text-align: center;
}

.availability-stylist-header {
  left: 0;
  z-index: 8;
  text-align: left;
}

.availability-date-header strong,
.availability-date-header span {
  display: block;
  line-height: 1.15;
}

.availability-date-header span {
  color: #5e7894;
  font-size: 11px;
}

.availability-stylist-cell {
  position: sticky;
  left: 0;
  z-index: 4;
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 70px;
  padding: 8px 10px;
  background: linear-gradient(#f5f9fd, #d3e1ef);
  color: #263e55;
}

.availability-stylist-cell strong,
.availability-cell strong {
  font-size: 13px;
  line-height: 1.15;
}

.availability-stylist-cell span,
.availability-cell span,
.availability-cell small {
  font-size: 11px;
  line-height: 1.25;
}

.availability-stylist-cell span {
  color: #607890;
}

.availability-cell {
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 70px;
  padding: 7px 8px;
  border-top: 0;
  border-left: 0;
  border-radius: 0;
  color: #20344a;
  font: inherit;
  text-align: left;
}

.availability-cell:hover,
.availability-cell:focus-visible {
  filter: brightness(0.98);
  outline: 2px solid rgba(54, 105, 169, 0.34);
  outline-offset: -2px;
}

.availability-status-none {
  background: linear-gradient(#f7f7f7, #e0e2e6);
}

.availability-status-working {
  background: linear-gradient(#dff3cf, #a9d98d);
}

.availability-status-off_regular {
  background: linear-gradient(#f4c6bf, #dc8276);
}

.availability-status-off_illness {
  background: linear-gradient(#f7dfb9, #e5aa5f);
}

.availability-status-off_personal_business {
  background: linear-gradient(#f5e9af, #dbc95d);
}

.availability-status-off_vacation {
  background: linear-gradient(#c9e3f6, #86b9df);
}

.availability-status-off_other {
  background: linear-gradient(#ddd4ec, #a993ce);
}

.availability-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid #8ea9c5;
  border-radius: var(--radius-tight);
  background: linear-gradient(#f8fbff, #dce8f3);
}

.availability-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #344c64;
  font-size: 11px;
  font-weight: 700;
}

.availability-swatch {
  display: inline-block;
  width: 16px;
  height: 12px;
  border: 1px solid rgba(45, 60, 78, 0.28);
  border-radius: 2px;
}

.mobile-schedule-shell {
  display: none;
}

.mobile-app-shell {
  display: none;
}

.mobile-bottom-sheet {
  position: fixed;
  inset: 0;
  z-index: 125;
}

.mobile-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(18, 30, 44, 0.38);
}

.mobile-sheet-card {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(82svh, 680px);
  border: 1px solid #7590ad;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(#f8fbff, #e1ecf9);
  box-shadow: 0 -18px 40px rgba(24, 42, 64, 0.28);
  overflow: hidden;
}

.mobile-sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid #97acc6;
  background: linear-gradient(#eff6ff, #d9e6f7);
}

.mobile-sheet-eyebrow,
.mobile-schedule-kicker {
  color: #536f90;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mobile-sheet-header h2,
.mobile-schedule-title {
  margin: 2px 0 0;
  color: #22384f;
  font-size: 18px;
  line-height: 1.15;
}

.mobile-sheet-summary,
.mobile-schedule-summary {
  margin: 4px 0 0;
  color: #5a718c;
  font-size: 12px;
}

.mobile-calendar-list,
.mobile-action-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  padding: 12px;
  overflow: auto;
}

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

.mobile-sheet-action,
.mobile-command-button,
.mobile-chip,
.mobile-provider-button,
.mobile-slot-button,
.mobile-schedule-item,
.mobile-date-card,
.mobile-edge-button,
.mobile-inline-button {
  min-height: 44px;
  border: 1px solid #91a7c2;
  border-radius: 7px;
  background: linear-gradient(#ffffff, #e6eef8);
  color: #26384b;
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.mobile-sheet-action {
  display: grid;
  gap: 3px;
  padding: 10px;
}

.mobile-sheet-action span,
.mobile-provider-button span,
.mobile-schedule-item span,
.mobile-date-card span {
  color: #60778f;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.3;
}

.mobile-sheet-action.is-active,
.mobile-chip.is-active,
.mobile-provider-button.is-active,
.mobile-command-button.is-active,
.mobile-date-card.is-selected {
  border-color: #527aa9;
  background: linear-gradient(#dcecff, #bdd7f2);
}

.mobile-sheet-action.is-danger {
  border-color: #a45b5b;
  background: linear-gradient(#fff4f0, #f4c9c0);
  color: #7b2f2f;
}

.board-main {
  display: grid;
  grid-template-columns: var(--time-column-width) minmax(0, 1fr);
  width: max-content;
  min-width: 100%;
  min-height: 100%;
  align-content: start;
}

.time-column {
  display: grid;
  grid-template-rows: 38px auto;
  align-content: start;
  position: sticky;
  left: 0;
  z-index: 25;
  border-right: 1px solid #8eb1d1;
  background: linear-gradient(#c7dcf4, #96b6db);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.68);
}

.time-column.is-week {
  grid-template-rows: 62px auto;
}

.time-header {
  position: sticky;
  top: 0;
  z-index: 35;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 38px;
  padding: 4px 4px 3px;
  border-bottom: 1px solid #8eb1d1;
  background: linear-gradient(#d2e4f8, #abc5e3);
}

.time-column.is-week .time-header {
  min-height: 62px;
}

.time-rail {
  position: relative;
  display: grid;
  grid-template-rows: repeat(var(--slot-count), var(--slot-height));
  background: linear-gradient(#cadcf2, #8eb1d6);
}

.time-rail > .time-rail-current-time {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 4;
  grid-row: auto;
  grid-column: auto;
  pointer-events: none;
}

.time-slot {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: var(--slot-height);
  padding-right: 6px;
  color: #5a7ca3;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  overflow: visible;
}

.time-slot::after {
  content: "";
  position: absolute;
  top: 0;
  right: 2px;
  width: 15px;
  border-top: 1px solid var(--theme-grid-half-hour-line);
  pointer-events: none;
}

.time-slot.is-minor {
  color: transparent;
}

.time-slot.is-half-hour {
  color: transparent;
}

.time-slot.is-major::after {
  content: none;
}

.time-slot.is-half-hour::after {
  width: 16px;
  border-top-width: 1px;
  border-top-color: var(--theme-grid-half-hour-line);
}

.time-slot span {
  position: absolute;
  top: 0;
  right: 6px;
  display: inline-block;
  z-index: 1;
  transform: translateY(-50%);
}

.time-slot.is-major span::before,
.time-slot.is-major span::after {
  content: "";
  position: absolute;
  top: 50%;
  border-top: 2px solid var(--theme-grid-major-line);
  transform: translateY(-50%);
  pointer-events: none;
}

.time-slot.is-major span::before {
  right: calc(100% + 3px);
  width: 8px;
}

.time-slot.is-major span::after {
  left: calc(100% + 3px);
  width: 4px;
}

.time-slot.is-first-slot span {
  transform: translateY(-35%);
}

.time-slot span.time-slot-end-label {
  top: auto;
  bottom: 0;
  transform: translateY(50%);
}

.time-slot span.time-slot-end-label::before,
.time-slot span.time-slot-end-label::after {
  content: "";
  position: absolute;
  top: 50%;
  border-top: 2px solid var(--theme-grid-major-line);
  transform: translateY(-50%);
  pointer-events: none;
}

.time-slot span.time-slot-end-label::before {
  right: calc(100% + 3px);
  width: 8px;
}

.time-slot span.time-slot-end-label::after {
  left: calc(100% + 3px);
  width: 4px;
}

.schedule-current-time {
  position: relative;
  z-index: 16;
  min-height: 0;
  overflow: visible;
  pointer-events: none;
}

.schedule-current-time::before {
  content: "";
  position: absolute;
  top: var(--current-time-offset, 0%);
  left: 4px;
  right: 2px;
  z-index: 2;
  height: 2px;
  transform: translateY(-50%);
  background: #ffd84d;
  box-shadow:
    0 0 0 1px rgba(126, 86, 0, 0.34),
    0 0 9px rgba(255, 216, 77, 0.48);
}

.schedule-current-time::after {
  content: "";
  position: absolute;
  top: calc(var(--current-time-offset, 0%) - 84px);
  left: 4px;
  right: 2px;
  z-index: 1;
  height: 84px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 216, 77, 0),
    rgba(255, 216, 77, 0.16) 42%,
    rgba(255, 216, 77, 0.38)
  );
  transform: none;
  box-shadow: none;
}

.board-scroll {
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: none;
  scroll-padding-left: var(--time-column-width);
  scroll-snap-type: x proximity;
}

.board-grid {
  position: relative;
  display: grid;
  grid-template-rows: 38px auto;
  align-content: start;
  width: calc(var(--provider-count) * var(--provider-column-width));
  min-width: calc(var(--provider-count) * var(--provider-column-width));
}

.board-grid.is-week {
  grid-template-rows: 62px auto;
}

.provider-row,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(var(--provider-count), minmax(0, var(--provider-column-width)));
  width: calc(var(--provider-count) * var(--provider-column-width));
  min-width: calc(var(--provider-count) * var(--provider-column-width));
}

.provider-row {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid #8fa7c6;
  background: linear-gradient(#dfeafb, #c5d7ef);
}

.provider-row.is-week {
  grid-template-rows: 26px 36px;
}

.schedule-day-header {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 8px;
  border-left: 1px solid #e89c27;
  border-right: 1px solid #e89c27;
  border-bottom: 1px solid #a86c18;
  background: linear-gradient(var(--theme-provider-top), var(--theme-provider-bottom));
  color: #6b4200;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.provider-header {
  position: relative;
  min-height: 38px;
  padding: 0 6px;
  border-left: 1px solid #e89c27;
  border-right: 1px solid #e89c27;
  background: linear-gradient(#dce8f8, #c6d7ee);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  text-align: center;
}

.provider-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 22px;
  border-bottom: 1px solid #b56c00;
  background: linear-gradient(var(--theme-provider-top), var(--theme-provider-bottom));
}

.provider-day {
  position: absolute;
  top: 3px;
  left: 5px;
  z-index: 1;
  color: #6b4200;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
}

.provider-name {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 3px;
  z-index: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  color: #2f4f71;
  line-height: 1.05;
}

.provider-caption {
  position: absolute;
  top: 3px;
  left: 24px;
  right: 5px;
  z-index: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  color: #6b4200;
  line-height: 1;
  text-align: right;
}

.provider-row.is-week .provider-header {
  min-height: 36px;
  border-top: 0;
  background: linear-gradient(#dce8f8, #c6d7ee);
}

.provider-row.is-week .provider-header::before,
.provider-row.is-week .provider-day,
.provider-row.is-week .provider-caption {
  display: none;
}

.provider-row.is-week .provider-name {
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}

.calendar-grid {
  position: relative;
  grid-template-rows: repeat(var(--slot-count), var(--slot-height));
  height: max-content;
  min-height: 0;
  background: linear-gradient(#d9e7fa, #c1d4ee);
}

.schedule-empty-state {
  align-self: start;
  margin: 12px;
}

.schedule-divider-layer {
  position: absolute;
  inset: 0;
  z-index: 18;
  pointer-events: none;
}

.schedule-divider-layer.is-previewing::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--divider-preview-left, 0);
  z-index: 2;
  width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(#58b7ff, #1e73d8);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.72),
    0 0 14px rgba(39, 126, 220, 0.36);
  pointer-events: none;
}

.schedule-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--divider-index) * var(--provider-column-width));
  width: 28px;
  padding: 0;
  transform: translateX(-50%);
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: col-resize;
  pointer-events: auto;
  touch-action: none;
}

.schedule-divider::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  transform: translateX(-50%);
  background: linear-gradient(#f7c556, #d68c18);
  box-shadow:
    0 0 0 1px rgba(255, 220, 136, 0.2),
    0 0 10px rgba(214, 140, 24, 0.14);
}

.schedule-divider-handle {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 14px;
  height: 28px;
  transform: translateX(-50%);
  border: 1px solid #b87915;
  border-radius: 999px;
  background:
    linear-gradient(#fff7d7, #f0b34b);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 1px 2px rgba(78, 52, 8, 0.18);
}

.schedule-divider-handle::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(117, 76, 7, 0.68) 0,
      rgba(117, 76, 7, 0.68) 1px,
      transparent 1px,
      transparent 3px
    );
}

.schedule-divider:hover .schedule-divider-handle,
.schedule-divider:focus-visible .schedule-divider-handle,
.schedule-divider.is-active .schedule-divider-handle {
  background: linear-gradient(#fffbe7, #f4bd57);
}

.schedule-divider.is-visible-edge-left .schedule-divider-handle {
  left: calc(50% + 3px);
}

.schedule-divider.is-visible-edge-right .schedule-divider-handle {
  left: calc(50% - 3px);
}

.schedule-divider.is-active::before {
  background: linear-gradient(#ffde7f, #e59a22);
  box-shadow:
    0 0 0 1px rgba(255, 232, 167, 0.35),
    0 0 12px rgba(214, 140, 24, 0.24);
}

.lane-background {
  z-index: 0;
  border-left: 1px solid #ea9e29;
  border-right: 1px solid #ea9e29;
}

.lane-background.tone-standard {
  background: var(--theme-lane);
}

.lane-background.tone-alt {
  background: var(--theme-lane-alt);
}

.lane-background.tone-off {
  background: var(--theme-lane-off);
}

.slot-cell {
  z-index: 1;
  width: 100%;
  min-height: var(--slot-height);
  padding: 0;
  border-top: 1px solid var(--theme-grid-half-hour-line);
  border-left: 1px solid rgba(136, 160, 189, 0.16);
  border-right: 1px solid rgba(136, 160, 189, 0.16);
  border-bottom: 0;
  border-radius: 0;
  background: transparent;
  transition:
    background 140ms ease,
    box-shadow 140ms ease;
}

.slot-cell.is-major {
  border-top: 2px solid var(--theme-grid-major-line);
}

.slot-cell.is-half-hour {
  border-top-width: 1px;
  border-top-color: var(--theme-grid-half-hour-line);
}

.slot-cell.is-day-end {
  border-bottom: 2px solid var(--theme-grid-major-line);
}

.slot-cell:hover,
.slot-cell:focus-visible {
  background: rgba(77, 116, 163, 0.06);
  box-shadow: inset 0 0 0 1px rgba(77, 116, 163, 0.2), inset -4px 0 0 rgba(45, 106, 79, 0.5);
}

.slot-cell.is-range-selected {
  background: rgba(82, 137, 213, 0.22);
  box-shadow: inset 0 0 0 1px rgba(43, 109, 196, 0.5), inset -6px 0 0 rgba(43, 109, 196, 0.75);
}

.slot-cell.is-appointment-selected {
  position: relative;
  background: #2d6a4f !important;
  box-shadow: inset 0 0 0 1.5px #1b4332, 0 0 8px rgba(45, 106, 79, 0.42) !important;
  color: #ffffff !important;
}

.slot-cell.is-appointment-selected::after {
  content: "+";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.schedule-off-block {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 0;
  margin: 1px 2px;
  padding: 3px 4px;
  overflow: hidden;
  border: 1px solid rgba(135, 150, 170, 0.42);
  border-radius: 4px;
  background: rgba(198, 207, 218, 0.78);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  color: transparent;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.1;
  pointer-events: none;
  text-align: center;
}

.schedule-off-block span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-block {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  margin: 0 0 1px 2px;
  padding: 4px 5px;
  overflow: hidden;
  border: 1px solid;
  border-radius: var(--radius-tight);
  cursor: grab;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  width: calc(100% - 12px);
  view-transition-class: schedule-appointment-block;
  transition:
    width 0.26s cubic-bezier(0.2, 0.9, 0.3, 1),
    margin-left 0.26s cubic-bezier(0.2, 0.9, 0.3, 1),
    box-shadow 0.18s ease,
    transform 0.15s ease,
    opacity 0.2s ease;
}

.schedule-block.is-overlapping,
.schedule-buffer-block.is-overlapping {
  --overlap-gap: 3px;
  --schedule-lane-reserve-right: 10px;
  --overlap-available-width: calc(100% - 2px - var(--schedule-lane-reserve-right));
  --overlap-width: calc(
    (var(--overlap-available-width) - (var(--appointment-overlap-count) - 1) * var(--overlap-gap)) / var(--appointment-overlap-count)
  );
  z-index: calc(4 + var(--appointment-overlap-index));
  justify-self: start;
  align-self: stretch;
  width: var(--overlap-width);
  margin-right: 0;
  margin-left: calc(
    2px + var(--appointment-overlap-index) * (var(--overlap-width) + var(--overlap-gap))
  );
}

.schedule-block.is-double-book-target {
  box-shadow: 0 0 0 2px #2d6a4f, inset 0 0 0 1px rgba(255, 255, 255, 0.65), 0 3px 10px rgba(45, 106, 79, 0.35);
  transform: scale(0.985);
  filter: brightness(1.04);
}

.schedule-block.is-dragging {
  opacity: 0.66;
  cursor: grabbing;
  outline: 2px solid rgba(27, 90, 168, 0.42);
  outline-offset: 1px;
}

:root {
  view-transition-name: none;
}

::view-transition {
  pointer-events: none;
}

::view-transition-group(.schedule-appointment-block) {
  animation-duration: 0.28s;
  animation-timing-function: cubic-bezier(0.2, 0.9, 0.3, 1);
}

::view-transition-old(.schedule-appointment-block),
::view-transition-new(.schedule-appointment-block) {
  animation-duration: 0.28s;
  animation-timing-function: cubic-bezier(0.2, 0.9, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
  .schedule-block,
  .schedule-buffer-block {
    transition: none !important;
  }
}

body.is-dragging-appointment .schedule-block,
body.is-dragging-time-block .schedule-block {
  cursor: grabbing;
}

.schedule-block:hover,
.schedule-block:focus-visible {
  filter: brightness(0.98);
}

.schedule-block.tone-blue {
  border-color: #7d99d1;
  background: linear-gradient(#b8c8f6, #93adea);
}

.schedule-block.tone-lime {
  border-color: #b1c73b;
  background: linear-gradient(#e8ef79, #b8da48);
}

.schedule-block.tone-green {
  border-color: #2f7a3d;
  background: linear-gradient(#7fd18d, #45a858);
  color: #0f2a14;
}

.schedule-block.tone-paper {
  border-color: #9fa3aa;
  background: linear-gradient(#f2f2f2, #d7d7d7);
}

.schedule-block.tone-red {
  border-color: #7f0303;
  background: linear-gradient(#b20e0e, #920707);
  color: #ffffff;
}

.schedule-block.tone-muted {
  border-color: #808080;
  background: linear-gradient(#c0c0c0, #acacac);
  color: #ffffff;
}

.schedule-time-block {
  border-color: #5a0202;
  background: linear-gradient(#a30c0c, #720505);
  color: #ffffff;
  cursor: grab;
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.schedule-time-block .block-title,
.schedule-time-block .block-line {
  max-width: 100%;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.schedule-time-block:hover,
.schedule-time-block:focus-visible {
  filter: brightness(0.97);
}

.schedule-time-block.is-multi-selected {
  outline: 3px solid #ffd000 !important;
  outline-offset: 1px !important;
  box-shadow: 0 0 14px rgba(255, 208, 0, 0.85), inset 0 0 0 1px rgba(255, 255, 255, 0.8) !important;
  filter: brightness(1.18) saturate(1.1) !important;
  z-index: 15 !important;
}

.schedule-buffer-block {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0 0 1px 2px;
  padding: 3px 5px;
  overflow: hidden;
  border: 1px dashed #7f95ab;
  border-radius: var(--radius-tight);
  background: repeating-linear-gradient(
    135deg,
    rgba(232, 238, 246, 0.86),
    rgba(232, 238, 246, 0.86) 5px,
    rgba(207, 218, 231, 0.86) 5px,
    rgba(207, 218, 231, 0.86) 10px
  );
  color: #40566f;
  font-size: 11px;
  line-height: 1.1;
  text-align: left;
  pointer-events: auto;
  width: calc(100% - 12px);
  view-transition-class: schedule-appointment-block;
  transition:
    width 0.26s cubic-bezier(0.2, 0.9, 0.3, 1),
    margin-left 0.26s cubic-bezier(0.2, 0.9, 0.3, 1),
    opacity 0.2s ease;
}

.schedule-buffer-block strong {
  font-size: 11px;
}

.block-title {
  display: block;
  font-weight: 700;
}

.block-line {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-block.is-stacked-first {
  border-bottom-left-radius: 2px;
  border-bottom-right-radius: 2px;
  margin-bottom: 0;
}

.schedule-block.is-stacked-middle {
  border-radius: 2px;
  margin-top: 0;
  margin-bottom: 0;
}

.schedule-block.is-stacked-last {
  border-top-left-radius: 2px;
  border-top-right-radius: 2px;
  margin-top: 0;
}

.schedule-context-menu {
  position: fixed;
  z-index: 1500;
  width: 222px;
  min-width: 222px;
  max-width: 222px;
  padding: 3px 0;
  overflow: hidden;
  resize: none;
  border: 1px solid #6f95c4;
  border-radius: 2px;
  background: #f7f7f7;
  box-shadow: 2px 3px 8px rgba(28, 45, 66, 0.28);
  color: #001f7a;
  font-size: 12px;
  line-height: 1.2;
  user-select: none;
}

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

.schedule-context-menu-item {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 27px;
  padding: 2px 8px 2px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #001f7a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.schedule-context-menu-item:hover:not(:disabled),
.schedule-context-menu-item:focus-visible:not(:disabled) {
  background: linear-gradient(#fff7b8, #f5c138);
  color: #151000;
  outline: 1px solid #d7a113;
  outline-offset: -1px;
}

.schedule-context-menu-item.is-highlighted:not(:disabled) {
  background: linear-gradient(#fff1a4, #f3c038);
  color: #201600;
}

.schedule-context-menu-item:disabled {
  color: #8c8c8c;
  cursor: default;
}

.schedule-context-menu-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #a7b5c7;
  background: linear-gradient(#ffffff, #dfeafa);
  color: #31557f;
  font-size: 9px;
  font-weight: 700;
}

.schedule-context-menu-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.schedule-context-menu-item:disabled .schedule-context-menu-icon {
  opacity: 0.45;
  filter: grayscale(1);
}

.schedule-context-menu-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-context-menu-separator {
  height: 1px;
  margin: 4px 0 4px 34px;
  background: #c8c8c8;
}

.clients-layout,
.tickets-layout,
.employees-layout,
.reports-layout,
.help-layout {
  display: grid;
  gap: 10px;
  min-height: 0;
  padding: 10px;
}

.clients-layout {
  grid-template-columns: 360px minmax(0, 1fr);
  height: 100%;
  align-content: start;
  overflow: auto;
}

.tickets-layout {
  grid-template-columns: 360px minmax(0, 1fr);
  height: 100%;
  align-content: start;
  overflow: auto;
}

.tickets-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tickets-filter-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid #9cb2cb;
  border-radius: var(--radius-tight);
  background: #dfe8f5;
}

.tickets-filter-tab {
  padding: 4px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  color: #3b5a80;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tickets-filter-tab:hover {
  background: rgba(255, 255, 255, 0.55);
}

.tickets-filter-tab.is-active {
  background: #ffffff;
  color: #17385f;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.ticket-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-height: 0;
  height: 100%;
  background: #ffffff;
}

.ticket-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #d3deec;
  border-left: 3px solid transparent;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ticket-row:nth-child(even) {
  background: #f7faff;
}

.ticket-row:hover,
.ticket-row:focus-visible {
  background: #eaf2fc;
}

.ticket-row.is-active {
  background: #deecfc !important;
  border-left-color: #2864a6;
}

.ticket-status-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ticket-status-pill.is-status-pending {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.ticket-status-pill.is-status-accepted {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.ticket-status-pill.is-status-rejected {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.ticket-status-pill.is-large {
  font-size: 12px;
  padding: 4px 12px;
}

.ticket-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ticket-client-name {
  font-size: 13px;
  font-weight: 700;
  color: #193452;
}

.ticket-price {
  font-size: 12px;
  font-weight: 700;
  color: #2b5684;
}

.ticket-row-meta {
  font-size: 11px;
  color: #4a6380;
}

.ticket-row-timing {
  font-size: 11px;
  color: #6a829e;
}

.ticket-detail-workspace {
  overflow-y: auto;
  min-height: 0;
  height: 100%;
  padding: 14px;
}

.ticket-detail-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ticket-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #cfdceb;
}

.ticket-detail-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: #557294;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ticket-detail-heading {
  font-size: 18px;
  margin: 2px 0 0;
  color: #173252;
}

.ticket-hero-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #bad0e7;
  border-radius: var(--radius-tight);
  background: linear-gradient(135deg, #f0f6ff, #e2edfb);
}

.ticket-hero-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ticket-hero-label {
  font-size: 10px;
  font-weight: 700;
  color: #587394;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ticket-hero-value {
  font-size: 13px;
  font-weight: 700;
  color: #17375d;
}

.ticket-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #d4e0ee;
}

.ticket-btn-accept {
  background: linear-gradient(#38a169, #276749) !important;
  color: #ffffff !important;
  border-color: #22543d !important;
  font-weight: 700 !important;
}

.ticket-btn-accept:hover {
  background: linear-gradient(#2f855a, #1c4532) !important;
}

.ticket-btn-decline {
  background: linear-gradient(#e53e3e, #9b2c2c) !important;
  color: #ffffff !important;
  border-color: #742a2a !important;
  font-weight: 700 !important;
}

.ticket-btn-decline:hover {
  background: linear-gradient(#c53030, #742a2a) !important;
}

.ticket-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.ticket-card {
  border: 1px solid #c8d8ea;
  border-radius: var(--radius-tight);
  background: #ffffff;
  overflow: hidden;
}

.ticket-card-title {
  padding: 6px 10px;
  border-bottom: 1px solid #dce6f2;
  background: #eef4fc;
  font-size: 11px;
  font-weight: 700;
  color: #3b5c82;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ticket-card-body {
  padding: 10px;
  display: grid;
  gap: 6px;
  font-size: 12px;
}

.ticket-field {
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.ticket-field-label {
  font-weight: 600;
  color: #556e8b;
  min-width: 60px;
}

.ticket-field-full {
  flex-direction: column;
  gap: 2px;
}

.employees-layout {
  grid-template-columns: minmax(0, 1fr);
  height: 100%;
  align-content: start;
  overflow: auto;
}

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

.help-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: 100%;
}

.section-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 200px;
  border: 1px solid #8fa4bf;
  border-radius: var(--radius-tight);
  background: linear-gradient(#fdfefe, #eef3fa);
  overflow: hidden;
}

.section-panel-wide {
  grid-column: 1 / -1;
}

.panel-caption {
  padding: 6px 8px;
  border-bottom: 1px solid #9cb2cb;
  background: linear-gradient(#eef4fd, #dbe6f5);
  font-weight: 700;
  color: #456385;
}

.panel-body {
  min-height: 0;
  overflow: auto;
  background: rgba(255, 255, 255, 0.72);
}

.empty-state {
  padding: 12px;
  color: #5d748d;
}

.client-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-height: 0;
  height: 100%;
  background: #ffffff;
}

.client-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid #d3deec;
  border-left: 3px solid transparent;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.client-row:nth-child(even) {
  background: #f7faff;
}

.client-row:hover,
.client-row:focus-visible {
  background: #eaf2fc;
}

.client-row.is-active {
  background: #deecfc !important;
  border-left-color: #2864a6;
}

.client-row-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.client-row-name {
  font-size: 13px;
  font-weight: 700;
  color: #193452;
}

.client-id-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: #e1ebf6;
  color: #35587f;
  font-family: monospace;
}

.client-row-contact {
  font-size: 11px;
  color: #4b6480;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-row-address {
  font-size: 11px;
  color: #5c7490;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-row-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
  font-size: 11px;
}

.client-row-stylist {
  font-weight: 600;
  color: #23588f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-row-meta {
  color: #69829f;
  font-size: 10px;
  flex-shrink: 0;
}

.client-row-match {
  color: #496b91;
  font-weight: 700;
  font-size: 11px;
}

.employee-list {
  display: grid;
  align-content: start;
}

.employee-row {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid #d3deec;
  border-radius: 0;
  background: transparent;
  text-align: left;
}

.employee-row:hover,
.employee-row:focus-visible {
  background: rgba(80, 118, 162, 0.08);
}

.employee-row.is-active {
  background: rgba(78, 117, 161, 0.15);
}

.employee-row strong {
  font-size: 12px;
}

.employee-row span {
  color: #5b728c;
}

.employee-row-match {
  color: #496b91;
  font-weight: 700;
}

/* Client Merge Selection */
.client-row.is-merge-selectable {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 8px;
}

.client-merge-checkbox {
  width: 16px;
  height: 16px;
  border: 1.5px solid #9bb0c7;
  border-radius: 4px;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s, border-color 0.15s;
}

.client-row.is-merge-selected {
  background: #edf4fc !important;
  border-left: 3px solid #3b6da4;
}

.client-row.is-merge-selected .client-merge-checkbox {
  background: #3b6da4;
  border-color: #3b6da4;
}

.client-row.is-merge-selected .client-merge-checkbox::after {
  content: "";
  width: 4px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-0.5px, -1px);
}

.client-detail-shell,
.employee-detail-shell {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.client-detail-shell {
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.detail-header h3 {
  font-size: 16px;
}

.detail-header p {
  margin-top: 3px;
  color: #5e748d;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

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

.client-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.employee-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body[data-view="employees"] .section-shell {
  min-height: 0;
}

body[data-view="employees"] .section-toolbar {
  gap: 8px;
  padding: 4px 8px;
  background: #edf3fa;
}

body[data-view="employees"] .toolbar-field {
  gap: 6px;
}

body[data-view="employees"] .search-field input {
  min-height: 26px;
}

body[data-view="employees"] .toolbar-button,
body[data-view="employees"] .drawer-button {
  min-height: 24px;
  padding: 0 8px;
}

body[data-view="employees"] #plan-fab {
  display: none;
}

body[data-view="employees"] .employee-form .form-actions {
  position: relative;
  z-index: 1;
}

.employee-sidebar-shell {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.employee-sidebar-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid #d4deea;
  background: #eef4fb;
}

.employee-sidebar-tab {
  min-height: 28px;
  border: 1px solid #b8c9dc;
  border-radius: var(--radius-tight);
  background: #ffffff;
  color: #405a76;
  font-size: 12px;
  font-weight: 700;
}

.employee-sidebar-tab.is-active {
  border-color: #57769d;
  background: linear-gradient(#628cc1, #436c9d);
  color: #ffffff;
}

.employee-sidebar-box {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  margin: 8px;
}

.employee-sidebar-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
}

.employee-sidebar-row {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-bottom: 1px solid #e0e8f1;
  background: transparent;
  color: inherit;
  text-align: left;
}

.employee-sidebar-row.is-active {
  background: #ddeafb;
}

.employee-sidebar-row strong {
  font-size: 12px;
}

.employee-sidebar-row span {
  color: #51687f;
  font-size: 11px;
}

.employee-undo-button {
  min-width: 34px;
  padding: 0 10px;
  font-size: 18px;
  line-height: 1;
}

body[data-view="employees"] .employees-layout {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "detail";
  gap: 8px;
  padding: 8px;
  overflow: hidden;
}

body[data-view="employees"] .employees-layout > .section-panel:nth-child(1) {
  grid-area: detail;
}

body[data-view="employees"] .section-panel {
  min-height: 0;
  border-color: #c2d0df;
  background: #f8fbff;
}

body[data-view="employees"] .panel-caption {
  padding: 4px 7px;
  border-bottom-color: #d4deea;
  background: #eef4fb;
  color: #405a76;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}

body[data-view="employees"] .employee-detail-panel {
  grid-template-rows: auto minmax(0, 1fr);
}

.employee-detail-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.employee-detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 7px 8px;
  border-bottom: 1px solid #d4deea;
  background: #f4f8fd;
}

.employee-detail-tab {
  min-height: 24px;
  padding: 0 10px;
  border: 1px solid #b8c9dc;
  border-radius: var(--radius-tight);
  background: #ffffff;
  color: #405a76;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--transition-speed), border-color var(--transition-speed), color var(--transition-speed);
}

.employee-detail-tab:hover:not(.is-active) {
  border-color: #9cb1c9;
  background: #f0f4f9;
  color: #2b415a;
}

.employee-detail-tab:focus-visible {
  outline: 2px solid #57769d;
  outline-offset: 1px;
}

.employee-detail-tab.is-active {
  border-color: #57769d;
  background: linear-gradient(#628cc1, #436c9d);
  color: #ffffff;
  cursor: default;
}

body[data-view="employees"] .employee-list,
body[data-view="employees"] .employee-detail,
body[data-view="employees"] .employee-form {
  min-height: 0;
  overflow: auto;
  background: #f8fbff;
}

body[data-view="employees"] .employee-row {
  gap: 1px;
  min-height: 56px;
  padding: 6px 8px;
  border-bottom-color: #e0e8f1;
  line-height: 1.2;
}

body[data-view="employees"] .employee-row.is-active {
  background: #ddeafb;
}

body[data-view="employees"] .employee-row strong {
  font-size: 13px;
}

body[data-view="employees"] .employee-row span {
  color: #51687f;
  font-size: 11px;
}

body[data-view="employees"] .employee-detail-shell {
  gap: 8px;
  padding: 8px;
}

body[data-view="employees"] .detail-header {
  align-items: center;
  gap: 8px;
}

body[data-view="employees"] .detail-header h3 {
  font-size: 17px;
  line-height: 1.1;
}

body[data-view="employees"] .detail-header p {
  margin-top: 2px;
  font-size: 12px;
}

body[data-view="employees"] .detail-actions {
  gap: 5px;
}

body[data-view="employees"] .employee-summary-grid {
  gap: 6px;
}

body[data-view="employees"] .metric-card {
  padding: 7px 8px;
  border-color: #c6d4e2;
  background: #ffffff;
}

body[data-view="employees"] .metric-card strong {
  color: #49647f;
  font-size: 11px;
}

body[data-view="employees"] .metric-value {
  margin-top: 3px;
  font-size: 18px;
}

body[data-view="employees"] .metric-note {
  margin-top: 2px;
  font-size: 11px;
}

body[data-view="employees"] .client-section-grid {
  gap: 7px;
}

/* Employee Detail Workspace & Options */
.employee-options-workspace {
  display: grid;
  gap: 10px;
}

.employee-option-card,
.employee-placeholder-card {
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid #d4deea;
  border-radius: var(--radius-standard);
  box-shadow: 0 1px 2px rgba(18, 38, 63, 0.04);
}

.employee-option-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.employee-option-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.employee-option-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #1a2a3a;
}

.desktop-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.desktop-status-pill.is-active {
  background: #e6f4ea;
  color: #137333;
  border: 1px solid #a8dab5;
}

.desktop-status-pill.is-inactive {
  background: #f1f3f4;
  color: #5f6368;
  border: 1px solid #dadce0;
}

.employee-option-desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #4a5d73;
}

/* Desktop Toggle Switch */
.desktop-toggle-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.desktop-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.desktop-toggle-track {
  width: 38px;
  height: 20px;
  background: #cbd5e1;
  border-radius: 9999px;
  transition: background-color 0.18s ease;
  display: inline-block;
  position: relative;
}

.desktop-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.18s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.desktop-toggle-input:checked + .desktop-toggle-track {
  background: #2e7d32;
}

.desktop-toggle-input:checked + .desktop-toggle-track .desktop-toggle-thumb {
  transform: translateX(18px);
}

.desktop-toggle-input:focus-visible + .desktop-toggle-track {
  outline: 2px solid #57769d;
  outline-offset: 2px;
}

.employee-placeholder-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
  background: #eef3f9;
  color: #3b5a7a;
  border: 1px solid #d4deea;
  margin-bottom: 6px;
}

.employee-form-actions {
  display: grid;
  gap: 8px;
}

.employee-editor-warning {
  margin: 0;
  font-size: 12px;
  color: #5a7088;
}

.form-actions-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

body[data-view="employees"] .client-section {
  gap: 5px;
  padding: 7px 8px;
  border-color: #d5dfeb;
  background: #ffffff;
}

body[data-view="employees"] .detail-grid {
  gap: 5px 8px;
}

body[data-view="employees"] .employee-form.app-form {
  gap: 7px;
  padding: 8px;
}

body[data-view="employees"] .employee-form .detail-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 8px;
}

body[data-view="employees"] .employee-form.app-form {
  max-width: 680px;
  width: 100%;
  margin: 16px auto;
  padding: 24px 28px;
  background: #ffffff;
  border: 1px solid #cad8e8;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(25, 45, 75, 0.06);
  gap: 16px;
  box-sizing: border-box;
}

body[data-view="employees"] .employee-form .detail-form-grid {
  gap: 12px 14px;
}

body[data-view="employees"] .employee-form .form-field {
  gap: 4px;
}

body[data-view="employees"] .employee-form .form-field span {
  font-size: 12.5px;
  font-weight: 600;
  color: #2b435d;
}

body[data-view="employees"] .employee-form input,
body[data-view="employees"] .employee-form select {
  min-height: 38px;
  padding: 7px 12px;
  font-size: 13.5px;
  border-radius: 6px;
  border: 1px solid #9bb2cb;
  background: #ffffff;
  color: #19314a;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body[data-view="employees"] .employee-form input:focus,
body[data-view="employees"] .employee-form select:focus,
body[data-view="employees"] .employee-form textarea:focus {
  border-color: #3b689a;
  box-shadow: 0 0 0 2px rgba(59, 104, 154, 0.2);
  outline: none;
}

body[data-view="employees"] .employee-form textarea {
  min-height: 84px;
  font-size: 13.5px;
  line-height: 1.45;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #9bb2cb;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body[data-view="employees"] .employee-schedule-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #c2d3e5;
  border-radius: 6px;
  background: #f4f8fd;
  color: #243b53;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

body[data-view="employees"] .employee-schedule-toggle:hover {
  background: #ebf3fc;
  border-color: #9cb5cf;
}

body[data-view="employees"] .employee-schedule-toggle input {
  width: 17px;
  height: 17px;
  cursor: pointer;
}

body[data-view="employees"] .employee-schedule-toggle span {
  min-width: 0;
  overflow-wrap: anywhere;
}

body[data-view="employees"] .employee-form .form-help {
  font-size: 12px;
  line-height: 1.4;
}

body[data-view="employees"] .employee-form .form-actions {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid #e0e8f2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body[data-view="employees"] .employee-form .form-actions-buttons {
  display: flex;
  gap: 10px;
}

body[data-view="employees"] .employee-form .toolbar-button,
body[data-view="employees"] .employee-form .drawer-button {
  min-height: 36px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
}

body[data-view="employees"] .employee-form #employee-save {
  background: linear-gradient(#4d79ab, #2e598b);
  border-color: #24476f;
  color: #ffffff;
  font-weight: 700;
}

body[data-view="employees"] .employee-form #employee-save:hover {
  background: linear-gradient(#5a88bd, #36669c);
}

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

.client-section {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #cfdae8;
  border-radius: var(--radius-tight);
  background: linear-gradient(#ffffff, #f1f6fc);
}

.client-section-wide {
  grid-column: 1 / -1;
}

.client-section h4 {
  color: #365477;
  font-size: 13px;
}

.client-section-body {
  gap: 8px 10px;
}

.detail-field {
  padding: 6px 7px;
  border: 1px solid #d1dbe8;
  border-radius: var(--radius-tight);
  background: #ffffff;
}

.detail-field strong,
.history-heading {
  display: block;
  margin-bottom: 3px;
  color: #476688;
}

.history-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.history-table,
.report-table {
  min-height: 0;
}

.client-roadmap-shell {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.roadmap-summary {
  padding: 9px 10px;
  border: 1px solid #c8d5e5;
  border-radius: var(--radius-tight);
  background: linear-gradient(#ffffff, #f0f5fc);
}

.roadmap-summary strong {
  display: block;
  color: #365477;
}

.roadmap-summary p {
  margin-top: 4px;
  color: #5d738c;
  line-height: 1.4;
}

.roadmap-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.roadmap-group {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid #cfdae8;
  border-radius: var(--radius-tight);
  background: #ffffff;
}

.roadmap-group h3 {
  font-size: 13px;
  color: #355375;
}

.roadmap-group p {
  color: #5e748d;
  line-height: 1.4;
}

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

.roadmap-plan-button {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 8px 9px;
  border: 1px solid #d1dbe8;
  border-radius: var(--radius-tight);
  background: linear-gradient(#fbfdff, #eef4fb);
  text-align: left;
}

.roadmap-plan-button:hover,
.roadmap-plan-button:focus-visible {
  border-color: #8aa3c1;
  background: linear-gradient(#ffffff, #e7eef9);
}

.roadmap-plan-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.roadmap-plan-title-block {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.roadmap-plan-title-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.roadmap-plan-title-line strong {
  color: #24394f;
}

.roadmap-plan-number {
  color: #516b89;
  font-weight: 700;
}

.roadmap-plan-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.roadmap-plan-open {
  color: #476688;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.roadmap-plan-description {
  color: #60758e;
  line-height: 1.35;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 10px 0;
}

.metric-card {
  padding: 10px;
  border: 1px solid #8fa4bf;
  border-radius: var(--radius-tight);
  background: linear-gradient(#ffffff, #edf3fb);
}

.metric-card strong {
  display: block;
  color: #4d6888;
}

.metric-value {
  display: block;
  margin-top: 6px;
  font-size: 21px;
  font-weight: 700;
  color: #24394f;
}

.metric-note {
  display: block;
  margin-top: 4px;
  color: #667b92;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.data-table th,
.data-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #d3deec;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef4fd;
  color: #456385;
}

.data-table td.is-numeric {
  text-align: right;
}

.table-action {
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid #8ba2bf;
  border-radius: var(--radius-tight);
  background: linear-gradient(#fdfefe, #dbe6f6);
}

.help-copy,
.help-list,
.help-actions {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px;
}

.help-copy p {
  line-height: 1.45;
}

.help-list div {
  padding: 7px 8px;
  border: 1px solid #d1dbe8;
  border-radius: var(--radius-tight);
  background: #ffffff;
}

.help-actions {
  grid-auto-rows: min-content;
}

.clock-modal-card {
  width: min(440px, calc(100vw - 24px));
}

.clock-modal-card.clock-out-card {
  width: min(500px, calc(100vw - 24px));
}

.intake-modal-card {
  width: min(640px, calc(100vw - 32px));
}

.client-modal-card,
.employee-modal-card {
  width: min(640px, calc(100vw - 32px));
}

.import-modal-card {
  width: min(860px, calc(100vw - 32px));
}

.import-shell {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.import-stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.import-step {
  padding: 8px 10px;
  border: 1px solid #bed0e4;
  border-radius: var(--radius-tight);
  background: linear-gradient(#ffffff, #eef4fb);
  color: #5a738f;
  font-weight: 700;
  text-align: center;
}

.import-step.is-active {
  border-color: #7d9bbe;
  background: linear-gradient(#fdfefe, #dce9f8);
  color: #355476;
}

.import-step.is-complete {
  border-color: #94b17b;
  background: linear-gradient(#fbfffb, #e5f0df);
  color: #41613d;
}

.import-modal-body {
  min-height: 260px;
  max-height: calc(100svh - 280px);
  overflow: auto;
}

.import-panel-list {
  display: grid;
  gap: 10px;
}

.import-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #cfdae8;
  border-radius: var(--radius-tight);
  background: linear-gradient(#ffffff, #f1f6fc);
}

.import-panel h4 {
  color: #365477;
  font-size: 13px;
}

.import-panel p {
  margin: 0;
  color: #5d738c;
  line-height: 1.4;
}

.import-panel-danger {
  border-color: #c58f8f;
  background: linear-gradient(#fffdfd, #f8eaea);
}

.import-upload-field input[type="file"] {
  padding: 6px 0;
}

.import-source-summary {
  padding: 8px 10px;
  border: 1px dashed #c3d2e4;
  border-radius: var(--radius-tight);
  background: #ffffff;
  color: #5d738c;
}

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

.import-mapping-row {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.import-mapping-row span {
  font-weight: 700;
  color: #4f6988;
}

.import-actions {
  padding-top: 2px;
}

.import-issue-list,
.import-operation-list,
.client-context-list {
  display: grid;
  gap: 8px;
}

.import-issue-item,
.import-operation-item {
  padding: 8px 10px;
  border: 1px solid #cfdae8;
  border-radius: var(--radius-tight);
  background: #ffffff;
}

.import-operation-item.tone-create {
  border-color: #91b57d;
  background: linear-gradient(#fdfffb, #edf7e8);
}

.import-operation-item.tone-update {
  border-color: #89a5c4;
  background: linear-gradient(#fcfdff, #ebf1f9);
}

.import-operation-item.tone-skip {
  border-color: #c3cfdd;
  background: linear-gradient(#ffffff, #f4f6f9);
}

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

/* Clock In Hero Badge */
.clock-hero-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #1d3655, #294c77);
  border-radius: 6px;
  color: #ffffff;
  text-align: center;
  margin-bottom: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 3px 8px rgba(18, 36, 60, 0.18);
}

.clock-hero-time {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.clock-hero-date {
  font-size: 11.5px;
  font-weight: 600;
  color: #b7d1f1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.clock-in-submit-btn,
.clock-out-submit-btn {
  background: linear-gradient(#4d79ab, #2e598b) !important;
  border-color: #24476f !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

.clock-in-submit-btn:hover,
.clock-out-submit-btn:hover {
  background: linear-gradient(#5a88bd, #36669c) !important;
}

/* Clock Out Shift Stats Summary */
.clock-out-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  background: #f0f4fa;
  border: 1px solid #c5d4e6;
  border-radius: 6px;
  padding: 10px;
}

.clock-stat-tile {
  display: grid;
  gap: 2px;
  background: #ffffff;
  border: 1px solid #d0ddec;
  border-radius: 4px;
  padding: 6px 10px;
}

.clock-stat-tile.highlight-tile {
  background: linear-gradient(#f0f6ff, #e1eeff);
  border-color: #92b7e2;
}

.clock-stat-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4e6b8c;
}

.clock-stat-value {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  min-height: auto !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #17304b !important;
  box-shadow: none !important;
}

.inline-note {
  margin: 0;
  color: #5e748d;
}

.status-bar {
  min-height: 21px;
  padding: 3px 8px;
  border-top: 1px solid #8ca4c4;
  background: linear-gradient(var(--theme-status-top), var(--theme-status-bottom));
  color: #4b688d;
}

#plan-fab {
  position: fixed;
  right: 12px;
  bottom: 10px;
  z-index: 120;
  min-height: 31px;
  padding: 0 14px;
  border: 1px solid #57769d;
  border-radius: var(--radius-tight);
  background: linear-gradient(#628cc1, #436c9d);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

#plan-fab:hover,
#plan-fab:focus-visible,
#plan-fab.is-active {
  background: linear-gradient(#557ead, #3b618e);
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  background: rgba(20, 32, 48, 0.28);
  transition: opacity 0.15s ease;
}

.overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.plans-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 48px;
  z-index: 110;
  display: flex;
  flex-direction: column;
  width: min(440px, 100vw);
  border-left: 1px solid var(--theme-border);
  background: linear-gradient(#eef4fd, #d8e5f7);
  transform: translateX(100%);
  transition: transform 0.15s ease;
}

.plans-drawer.is-open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid #8ea6c5;
  background: linear-gradient(#eef5ff, #d6e3f5);
}

.drawer-eyebrow {
  font-weight: 700;
  text-transform: uppercase;
  color: #4b688e;
}

.drawer-header h2 {
  margin-top: 3px;
  font-size: 18px;
}

.drawer-header p {
  margin-top: 4px;
  line-height: 1.35;
}

.drawer-header-tools {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.plan-count {
  min-height: 22px;
  padding: 4px 10px 0;
  border: 1px solid #8ca4c4;
  border-radius: var(--radius-tight);
  background: linear-gradient(#ffffff, #dfe9f8);
  font-weight: 700;
}

.plan-list {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
}

.plan-item {
  position: relative;
  padding: 10px 12px;
  border-bottom: 1px solid #a6bad4;
  background: rgba(255, 255, 255, 0.38);
}

.plan-item:nth-child(even) {
  background: rgba(255, 255, 255, 0.56);
}

.plan-item.is-highlighted {
  background: rgba(255, 219, 150, 0.58);
}

.plan-item-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding-right: 88px;
}

.plan-number {
  min-width: 34px;
  padding: 3px 0;
  border: 1px solid #86a2c2;
  border-radius: var(--radius-tight);
  background: linear-gradient(#ffffff, #dfe9f8);
  color: #355b85;
  text-align: center;
  font-weight: 700;
}

.plan-title-block {
  min-width: 0;
}

.plan-title-block h3 {
  font-size: 13px;
}

.plan-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.tag {
  padding: 2px 6px;
  border: 1px solid #8ca3c2;
  border-radius: var(--radius-tight);
  background: linear-gradient(#ffffff, #e3edf9);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.plan-description {
  margin: 6px 0 0 42px;
  line-height: 1.4;
}

.plan-notes-button {
  position: absolute;
  top: 10px;
  right: 12px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #7f9dbc;
  border-radius: var(--radius-tight);
  background: linear-gradient(#ffffff, #e3edf9);
  color: #355b85;
  font-size: 11px;
  font-weight: 700;
}

.plan-notes-button:hover,
.plan-notes-button:focus-visible {
  background: linear-gradient(#f7fbff, #d8e6f7);
}

.plan-notes-modal-card {
  width: min(740px, calc(100vw - 32px));
  border: 1px solid rgba(203, 213, 225, 0.85);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
}

.plan-notes-modal-card .app-modal-header {
  padding: 16px 20px 14px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  align-items: flex-start;
}

.plan-notes-modal-card .drawer-eyebrow {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.plan-notes-modal-card .app-modal-header h2 {
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.plan-notes-modal-card .app-modal-header p {
  color: #64748b;
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.4;
}

.plan-notes-modal-card .app-modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  font-size: 18px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.plan-notes-modal-card .app-modal-close-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.plan-notes-body {
  min-height: 260px;
  max-height: calc(100svh - 220px);
  overflow: auto;
  padding: 16px 20px;
  background: #f8fafc;
}

.plan-note-timeline {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.plan-note-year-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plan-note-year-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.plan-note-year-header::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.plan-note-year-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.plan-note-month-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-note-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.plan-note-month-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 750;
  color: #334155;
  letter-spacing: -0.01em;
}

.plan-note-month-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 2px 8px;
}

.plan-note-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-note-entry {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(203, 213, 225, 0.85);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.05);
}

.plan-note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.plan-note-date {
  color: #0f172a;
  font-size: 13px;
  font-weight: 750;
}

.plan-note-model-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.plan-note-model-tag.is-unknown {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 600;
}

.plan-note-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.plan-note-block strong {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.plan-note-block p {
  margin: 0;
  color: #1e293b;
  font-size: 13px;
  line-height: 1.5;
}

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  align-items: center;
  justify-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.app-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.app-modal.is-open.is-minimized {
  pointer-events: none;
}

.app-modal.is-open.is-minimized .app-modal-card {
  pointer-events: auto;
}

.app-modal.is-open.is-minimized .app-modal-backdrop {
  opacity: 0;
  pointer-events: none;
}

.app-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 27, 40, 0.42);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.app-modal-card {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100svh - 40px);
  border: 1px solid #7d97b6;
  border-radius: 6px;
  background: linear-gradient(#fdfefe, #edf4fb);
  box-shadow: 0 16px 42px rgba(17, 27, 40, 0.28), 0 3px 8px rgba(17, 27, 40, 0.12);
  font-size: 13px;
  overflow: hidden;
}

.app-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px 9px;
  border-bottom: 1px solid #94aec8;
  background: linear-gradient(#eef5ff, #d8e4f7);
}

.app-modal-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: #19314a;
  letter-spacing: -0.01em;
}

.app-modal-window-controls {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
  align-items: center;
  align-self: center;
  margin-left: auto;
}

.app-modal-minimize-btn,
.app-modal-close-btn {
  display: inline-grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 1px solid #849ebd;
  border-radius: 4px;
  background: linear-gradient(#ffffff, #dce8f6);
  color: #264364;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.app-modal-minimize-btn {
  width: 32px;
  min-width: 32px;
  height: 26px;
  font-size: 18px;
}

.app-modal-close-btn {
  width: 26px;
  min-width: 26px;
  height: 26px;
  font-size: 19px;
}

.app-modal-minimize-btn:hover {
  background: linear-gradient(#ffffff, #cbdeef);
  border-color: #6585ab;
}

.app-modal-close-btn:hover {
  background: linear-gradient(#fde8e8, #f5bcbc);
  border-color: #cb5a5a;
  color: #921c1c;
}

.app-modal-minimize-btn:focus-visible,
.app-modal-close-btn:focus-visible {
  outline: 2px solid #4f7fb8;
  outline-offset: 1px;
}

.app-modal-card.is-minimized {
  height: auto !important;
  min-height: 0 !important;
  max-height: none;
}

.app-modal-card.is-minimized > :not(.app-modal-header) {
  display: none !important;
}

.modal-summary {
  margin: 4px 0 0;
  color: #536e8d;
  font-size: 12px;
  line-height: 1.35;
}

.app-form {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
}

/* Modal Form Ergonomics & Legibility */
.app-modal-card input,
.app-modal-card select {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid #8ea5c0;
  border-radius: 4px;
  background: #ffffff;
  color: #1a3048;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.app-modal-card input:focus,
.app-modal-card select:focus,
.app-modal-card textarea:focus {
  border-color: #38679b;
  box-shadow: 0 0 0 2px rgba(56, 103, 155, 0.22);
  outline: none;
}

.app-modal-card textarea {
  font-size: 13px;
  line-height: 1.45;
  padding: 8px 10px;
  border: 1px solid #8ea5c0;
  border-radius: 4px;
  background: #ffffff;
  color: #1a3048;
  min-height: 72px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.app-modal-card .form-field {
  gap: 4px;
}

.app-modal-card .form-field span {
  font-size: 12px;
  font-weight: 700;
  color: #36506d;
}

.app-modal-card .form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid #d4e1ef;
}

.app-modal-card .form-actions button,
.app-modal-card .form-actions .toolbar-button,
.app-modal-card .form-actions .drawer-button {
  min-height: 35px;
  padding: 6px 18px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 4px;
}

.client-context-banner {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d7c07b;
  border-radius: var(--radius-tight);
  background: linear-gradient(#fffbe9, #f6edd0);
}

.client-context-banner strong {
  color: #6f5200;
}

.storage-cutover-counts,
.appointment-slot-summary,
.appointment-selected-client {
  padding: 10px;
  border: 1px solid #d0dbe9;
  border-radius: var(--radius-tight);
  background: linear-gradient(#f7fbff, #edf4fc);
}

/* ==========================================================================
   Screen 1: Client Picker Modal
   ========================================================================== */

.client-picker-card {
  width: min(840px, calc(100vw - 32px));
  height: min(640px, calc(100svh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #fdfdfd;
  border-radius: var(--radius-tight, 6px);
  box-shadow: 0 16px 40px rgba(17, 27, 40, 0.28);
  border: 1px solid #7f9dbc;
  overflow: hidden;
}

.client-picker-header {
  padding: 8px 14px;
  background: linear-gradient(#eef5ff, #d8e4f7);
  border-bottom: 1px solid #98aec8;
}

.client-picker-slot-info {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: #486581;
  font-weight: 500;
}

.client-picker-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  background: #f8fafc;
}

.client-picker-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #ffffff;
  border-bottom: 1px solid #d9e2ec;
  flex-wrap: wrap;
}

.client-picker-search-wrap {
  position: relative;
  flex: 1 1 280px;
  min-width: 220px;
  display: flex;
  align-items: center;
}

.client-picker-search-icon {
  position: absolute;
  left: 10px;
  font-size: 13px;
  pointer-events: none;
  opacity: 0.6;
}

.client-picker-search-input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  font-size: 13px;
  border: 1px solid #bcccdc;
  border-radius: var(--radius-tight, 4px);
  background: #f8fafc;
  color: #102a43;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.client-picker-search-input:focus {
  background: #ffffff;
  border-color: #334e68;
  box-shadow: 0 0 0 2px rgba(51, 78, 104, 0.18);
}

.client-picker-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.client-picker-new-btn {
  background: #0b69a3;
  color: #ffffff;
  font-weight: 600;
  border-radius: var(--radius-tight, 4px);
  padding: 6px 14px;
}

.client-picker-new-btn:hover {
  background: #085383;
}

.client-picker-walk-in-btn {
  border-radius: var(--radius-tight, 4px);
  padding: 6px 12px;
}

.client-picker-table-wrapper {
  min-height: 0;
  overflow-y: auto;
  overflow-x: auto;
  background: #ffffff;
}

.client-picker-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
}

.client-picker-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #edf2f7;
  border-bottom: 2px solid #cbd5e1;
}

.client-picker-table th {
  padding: 8px 12px;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #334e68;
  white-space: nowrap;
  user-select: none;
  border-bottom: 1px solid #cbd5e1;
}

.client-picker-table th[data-client-sort] {
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.client-picker-table th[data-client-sort]:hover {
  background: #e2e8f0;
  color: #0b69a3;
}

.client-picker-table th.is-sorted {
  color: #0b69a3;
  background: #e1ecf8;
}

.sort-indicator {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
  opacity: 0.75;
}

.client-picker-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
  color: #102a43;
}

.client-picker-row {
  cursor: pointer;
  transition: background 0.1s ease;
}

.client-picker-row:hover {
  background: #f0f7ff;
}

.client-picker-row.is-highlighted {
  background: #e3effd;
  box-shadow: inset 3px 0 0 #0b69a3;
}

.client-picker-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.client-picker-monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #d9e2ec;
  color: #334e68;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.client-picker-row.is-highlighted .client-picker-monogram,
.client-picker-row:hover .client-picker-monogram {
  background: #0b69a3;
  color: #ffffff;
}

.client-picker-name-strong {
  font-weight: 600;
  color: #102a43;
}

.client-picker-visit-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 7px;
  background: #f0f4f8;
  border: 1px solid #d9e2ec;
  border-radius: 10px;
  color: #486581;
}

.client-picker-select-btn {
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: var(--radius-tight, 4px);
}

.client-picker-empty-cell {
  padding: 40px 20px;
  text-align: center;
}

.client-picker-empty-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #627d98;
}

.client-picker-empty-content p {
  margin: 0;
  font-size: 14px;
}

.client-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #f1f5f9;
  border-top: 1px solid #cbd5e1;
}

.client-picker-status {
  font-size: 12px;
  color: #627d98;
}

/* ==========================================================================
   Screen 2: Appointment Creation & Details Modal
   ========================================================================== */

.appointment-modal-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  position: fixed;
  top: var(--appointment-popout-top, 12px);
  left: var(--appointment-popout-left, 12px);
  width: var(--appointment-popout-width, min(980px, calc(100vw - 24px)));
  height: var(--appointment-popout-height, min(680px, calc(100svh - 32px)));
  min-width: min(860px, calc(100vw - 24px));
  min-height: min(480px, calc(100svh - 32px));
  max-width: calc(100vw - 24px);
  max-height: calc(100svh - 24px);
  background: #ffffff;
  border-radius: var(--radius-tight, 6px);
  box-shadow: 0 16px 40px rgba(17, 27, 40, 0.28);
  border: 1px solid #7f9dbc;
  overflow: hidden;
}

.appointment-modal-card .app-modal-header {
  align-items: center;
  padding: 6px 12px;
  cursor: move;
  user-select: none;
  background: linear-gradient(#eef5ff, #d8e4f7);
  border-bottom: 1px solid #98aec8;
}

.appointment-modal-card .drawer-eyebrow {
  font-size: 9.5px;
  line-height: 1.1;
  color: #486581;
}

.appointment-modal-card .app-modal-header h2 {
  margin-top: 1px;
  font-size: 15px;
  line-height: 1.15;
  color: #102a43;
}

.appointment-modal-card .appointment-worksheet-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  background: #f8fafc;
  padding: 10px 12px;
  gap: 8px;
  box-sizing: border-box;
}

.appointment-form-alert {
  padding: 8px 12px;
  background: #fef2f2;
  border: 1px solid #f87171;
  border-radius: var(--radius-tight, 6px);
  color: #991b1b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(239, 68, 68, 0.1);
}

.appointment-form-alert[hidden] {
  display: none !important;
}

/* Clean Selected Client Card */
.appointment-selected-client-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-tight, 6px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.client-card-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0b69a3, #1886cc);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(11, 105, 163, 0.25);
}

.client-card-details {
  flex: 1;
  min-width: 0;
}

.client-card-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.client-card-name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #102a43;
  line-height: 1.2;
}

.client-card-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  background: #e2e8f0;
  border-radius: 10px;
  color: #486581;
}

.client-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
  color: #486581;
  flex-wrap: wrap;
}

.client-card-meta-dot {
  opacity: 0.5;
}

.appointment-change-client-btn {
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-tight, 4px);
}

/* Appointment Slot Toolbar */
.appointment-slot-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-tight, 6px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.appointment-slot-toolbar .form-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  color: #486581;
}

.appointment-slot-toolbar input,
.appointment-slot-toolbar select {
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid #94a3b8;
  border-radius: var(--radius-tight, 4px);
  background: #fff;
  font-size: 12px;
  color: #1e293b;
}

.appointment-slot-toolbar #appointment-date {
  width: 135px;
}

.appointment-slot-toolbar #appointment-start {
  width: 90px;
}

.appointment-slot-toolbar #appointment-provider {
  min-width: 140px;
}

.appointment-slot-toolbar #appointment-status {
  min-width: 120px;
}

/* Appointment Lines Panel (Color-coded ticket table container) */
.appointment-lines-panel {
  position: relative;
  margin-top: 2px;
}

.appointment-lines-panel .ticket-lines-toolbar {
  margin-bottom: 4px;
}

.appointment-lines-panel .ticket-table-scroll {
  /* Header (~2 rows of text) + 10 rows at the appointment row height. */
  min-height: min(calc(30px + 10 * 29px + 4px), 42vh);
  max-height: 42vh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.appointment-lines-panel .ticket-table-hint {
  margin-top: 3px;
  font-size: 10.5px;
}

/* ==========================================================================
   Appointment Bottom 3-Column Grid
   ========================================================================== */
.appointment-bottom-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr 1.2fr;
  gap: 12px;
  /* In the flex-column worksheet body this pushes the grid to the bottom of
     the pop-up when there is spare space, without overlapping the ledger. */
  margin-top: auto;
  align-items: stretch;
}

@media (max-width: 860px) {
  .appointment-bottom-grid {
    grid-template-columns: 1fr;
  }
}

.appointment-grid-col {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-tight, 6px);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Column 1: Metadata & Comments (2 Columns Split) */
.appointment-meta-col {
  padding: 8px 10px;
}

.appointment-meta-2col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.appointment-meta-subcol {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.appointment-meta-subcol .form-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  font-weight: 700;
  color: #486581;
}

.appointment-meta-subcol select,
.appointment-meta-subcol input {
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid #94a3b8;
  border-radius: var(--radius-tight, 4px);
  font-size: 11.5px;
  color: #1e293b;
  background: #ffffff;
  width: 100%;
  box-sizing: border-box;
}

.form-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.btn-meta-edit {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 1px 6px;
  border-radius: 4px;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  cursor: pointer;
  line-height: 1.3;
  transition: all 0.12s ease;
}

.btn-meta-edit:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.appointment-no-show-rate-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  padding: 5px 8px;
  background: #f1f5f9;
  border-radius: var(--radius-tight, 4px);
  border: 1px solid #e2e8f0;
  font-size: 11px;
}

.appointment-no-show-rate-box .rate-label {
  font-weight: 600;
  color: #486581;
}

.appointment-no-show-rate-box .rate-value {
  font-weight: 700;
  color: #0b69a3;
  font-size: 12px;
  background: #e0f2fe;
  padding: 1px 6px;
  border-radius: 10px;
}

/* Mobile Service Cards (Photo #2 Design) */
.appointment-mobile-services-panel {
  display: none;
}

.mobile-service-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  gap: 8px;
}

.mobile-service-card-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.mobile-service-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.mobile-service-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.mobile-service-title {
  font-weight: 700;
  font-size: 12px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-service-sub {
  font-size: 10.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.mobile-service-card-side {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.mobile-service-pricing {
  text-align: right;
}

.mobile-service-price {
  font-weight: 700;
  font-size: 12px;
  color: #0f172a;
}

.mobile-service-stylist {
  font-size: 10px;
  color: #64748b;
}

.mobile-service-remove-btn {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  border: 1px solid #fee2e2;
  background: #fef2f2;
  color: #ef4444;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.12s ease;
}

.mobile-service-remove-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

.mobile-services-empty {
  padding: 8px 10px;
  text-align: center;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  font-size: 11.5px;
}

.appointment-mobile-services-actions {
  display: flex;
  gap: 6px;
  margin-top: 3px;
}

.mobile-service-add-btn {
  flex: 1;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  border: 1px dashed #93c5fd;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.mobile-service-add-btn:hover {
  background: #dbeafe;
  border-color: #3b82f6;
}

.mobile-product-add-btn {
  color: #059669;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.mobile-product-add-btn:hover {
  background: #d1fae5;
  border-color: #10b981;
}

/* Created By Options Manager Modal */
.created-by-modal-card {
  width: min(92vw, 420px);
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

.created-by-modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.created-by-modal-desc {
  font-size: 12px;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

.created-by-add-row {
  display: flex;
  gap: 8px;
}

.created-by-add-row input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12.5px;
}

.created-by-list-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
}

.created-by-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  color: #486581;
}

.created-by-options-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.created-by-option-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  color: #1e293b;
}

.created-by-item-remove-btn {
  border: none;
  background: transparent;
  color: #ef4444;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}

.created-by-item-remove-btn:hover {
  background: #fee2e2;
}

.created-by-form-actions {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
}

/* Column 2: Totals & Tip */
.appointment-totals-col {
  justify-content: space-between;
  gap: 6px;
  background: #f8fafc;
}

.appointment-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: #334e68;
}

.appointment-total-row strong {
  font-weight: 700;
  color: #102a43;
}

.appointment-tip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.appointment-tip-input-wrap {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #94a3b8;
  border-radius: var(--radius-tight, 4px);
  padding: 0 6px;
  width: 90px;
}

.appointment-tip-input-wrap .currency-prefix {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.appointment-tip-input-wrap input.ticket-tip-input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 3px 2px;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  color: #102a43;
  outline: none;
}

.appointment-main-total-row {
  border-top: 2px solid #cbd5e1;
  padding-top: 8px;
  margin-top: 4px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.appointment-main-total-row .main-total-label {
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #102a43;
}

.appointment-grand-total-big {
  font-size: 26px !important;
  font-weight: 800 !important;
  color: #0b69a3 !important;
  line-height: 1;
}

/* Column 3: Actions Stack & Sub-Actions */
.appointment-actions-col {
  position: relative;
  justify-content: space-between;
  gap: 10px;
}

.appointment-tender-field-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 2px;
}

.appointment-tender-label {
  font-size: 11px;
  font-weight: 700;
  color: #3f556d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.appointment-tender-select {
  width: 100%;
  height: 32px;
  padding: 4px 8px;
  border: 1px solid #9bb3cc;
  border-radius: var(--radius-tight, 5px);
  background: #ffffff;
  color: #1e293b;
  font-size: 12px;
  font-weight: 600;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
  cursor: pointer;
}

.appointment-tender-select:focus {
  border-color: #2b6cb0;
  outline: 2px solid rgba(43, 108, 176, 0.2);
}

.appointment-primary-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.appointment-action-btn {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  border-radius: var(--radius-tight, 5px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.appointment-btn-schedule-open {
  background: linear-gradient(#ffffff, #f1f5f9);
  border: 1px solid #94a3b8;
  color: #102a43;
}

.appointment-btn-schedule-open:hover {
  background: linear-gradient(#f8fafc, #e2e8f0);
  border-color: #64748b;
}

.appointment-btn-checkout-close {
  background: linear-gradient(#059669, #047857) !important;
  border-color: #065f46 !important;
  color: #ffffff !important;
}

.appointment-btn-checkout-close:hover {
  background: linear-gradient(#047857, #065f46) !important;
}

/* 4 Individual sub-action buttons */
.appointment-sub-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.appointment-sub-btn {
  padding: 7px 8px;
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius-tight, 4px);
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334e68;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.appointment-sub-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.appointment-sub-btn.danger {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

.appointment-sub-btn.danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

/* More Side Pop-Out Flyout Menu */
.appointment-more-flyout {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  width: 220px;
  background: #ffffff;
  border: 1px solid #94a3b8;
  border-radius: var(--radius-tight, 6px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
  z-index: 100;
  padding: 6px 0;
  display: flex;
  flex-direction: column;
}

.appointment-more-flyout .flyout-header {
  padding: 6px 12px 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}

.appointment-more-flyout .flyout-menu-list {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}

.appointment-more-flyout .flyout-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border: none;
  background: transparent;
  width: 100%;
  font-size: 12.5px;
  font-weight: 500;
  color: #1e293b;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s ease;
}

.appointment-more-flyout .flyout-menu-item:hover {
  background: #f1f5f9;
  color: #0b69a3;
}

.appointment-more-flyout .flyout-item-icon {
  font-size: 14px;
  opacity: 0.7;
  width: 16px;
  text-align: center;
}

.appointment-more-flyout .flyout-footer {
  padding: 4px 12px 2px;
  font-size: 10.5px;
  color: #94a3b8;
  border-top: 1px solid #f1f5f9;
  font-style: italic;
}

.checkout-modal-card {
  /* Default size when opened, then freely resizable by dragging the bottom-right grip.
     The min-* values are the smallest the worksheet can get while still holding the
     two-column header, table, and totals without clustering; max-* keep it on-screen. */
  width: min(1120px, calc(100vw - 24px));
  height: min(800px, calc(100svh - 40px));
  min-width: min(680px, calc(100vw - 24px));
  min-height: min(420px, calc(100svh - 40px));
  max-width: calc(100vw - 24px);
  max-height: calc(100svh - 24px);
  resize: both;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.checkout-form {
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  overflow-x: hidden;
  overflow-y: auto;
}

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}

/* The Appointment Tickets sidebar is not part of the drawn ticket worksheet.
   Keep the element in the DOM (both runtimes require #checkout-ticket-list) but
   remove it from the visual layout; ticket selection now happens via the compact
   #checkout-ticket-selector dropdown. */
.checkout-ticket-panel {
  display: none;
}

.checkout-ticket-panel,
.checkout-working-panel {
  min-width: 0;
}

.checkout-ticket-selector-row {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 10px;
}

.checkout-ticket-selector-field {
  display: grid;
  gap: 4px;
  width: min(420px, 100%);
}

.checkout-ticket-selector-field span {
  color: #5b7088;
  font-size: 11px;
  font-weight: 800;
}

.checkout-ticket-selector-field select {
  min-height: 32px;
  border: 1px solid #a9bbcf;
  border-radius: var(--radius-tight);
  background: #ffffff;
  color: #263c54;
  font: inherit;
}

.checkout-ticket-list {
  display: grid;
  gap: 6px;
  max-height: min(520px, calc(100svh - 190px));
  overflow: auto;
  padding-right: 2px;
}

.checkout-ticket-button {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 62px;
  padding: 8px;
  border: 1px solid #9eb2ca;
  border-radius: var(--radius-tight);
  background: linear-gradient(#ffffff, #e9f1fb);
  color: #263c54;
  text-align: left;
}

.checkout-ticket-button:hover,
.checkout-ticket-button:focus-visible {
  background: linear-gradient(#ffffff, #dce8f7);
}

.checkout-ticket-button.is-selected {
  border-color: #c47e2a;
  background: linear-gradient(#fff8e8, #f2d9a6);
}

.checkout-ticket-button strong,
.checkout-ticket-button span {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.checkout-ticket-button span {
  color: #5f748f;
  font-size: 11px;
}

.checkout-ticket-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid #c4d1df;
  border-radius: var(--radius-tight);
  background: linear-gradient(#ffffff, #edf4fc);
}

.checkout-ticket-heading h3 {
  margin: 2px 0 0;
  color: #24384f;
  font-size: 16px;
}

.ticket-detail {
  position: relative;
  min-width: 0;
}

.ticket-top-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.9fr) minmax(310px, 1.1fr);
  gap: 12px;
}

.ticket-info-panel,
.ticket-client-panel,
.ticket-lines-panel {
  min-width: 0;
  padding: 10px;
  border: 1px solid #c4d1df;
  border-radius: var(--radius-tight);
  background: #ffffff;
}

.ticket-client-name {
  font-size: 24px;
  line-height: 1.15;
}

.ticket-info-grid {
  display: grid;
  gap: 6px;
  margin: 7px 0 0;
}

.ticket-info-row {
  display: grid;
  grid-template-columns: minmax(86px, 0.7fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.ticket-info-row dt {
  color: #5b7088;
  font-size: 11px;
  font-weight: 700;
}

.ticket-info-row dd {
  min-width: 0;
  margin: 0;
  color: #263c54;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.ticket-info-row-editable label {
  color: #5b7088;
  font-size: 11px;
  font-weight: 700;
}

.ticket-info-input {
  width: 100%;
  min-width: 0;
  padding: 4px 6px;
  border: 1px solid #c1d1e4;
  border-radius: var(--radius-tight);
  background: #fff;
  color: #263c54;
  font-size: 12px;
}

.ticket-info-select {
  padding-right: 22px;
}

.ticket-info-id {
  font-weight: 800;
}

.ticket-status-cell,
.ticket-reminder-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.ticket-status-select,
.ticket-date-input,
.ticket-cell-input,
.ticket-search-field select,
.ticket-search-field input {
  min-width: 0;
  border: 1px solid #a9bbcf;
  border-radius: var(--radius-tight);
  background: #ffffff;
  color: #263c54;
  font: inherit;
}

.ticket-status-select,
.ticket-date-input {
  min-height: 30px;
  padding: 5px 7px;
}

.ticket-reminder-status,
.ticket-resend-toggle {
  color: #50677f;
  font-size: 11px;
  font-weight: 700;
}

.ticket-resend-toggle {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.ticket-client-name {
  margin: 4px 0 0;
  color: #24384f;
  font-size: 17px;
}

.ticket-client-contact {
  min-height: 17px;
  margin-top: 3px;
  color: #5b7088;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.ticket-client-actions,
.ticket-lines-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.ticket-client-actions {
  margin-top: 9px;
}

.ticket-lines-panel {
  margin-top: 10px;
}

.ticket-lines-toolbar {
  justify-content: space-between;
  margin-bottom: 8px;
}

.ticket-lines-toolbar-title {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.ticket-fit-all-button {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid #a9bbcf;
  border-radius: var(--radius-tight);
  background: linear-gradient(#ffffff, #e9f1fb);
  color: #345a83;
  font-size: 13px;
  line-height: 1;
}

.ticket-fit-all-button:hover,
.ticket-fit-all-button:focus-visible {
  border-color: #c47e2a;
  background: linear-gradient(#fff8e8, #f2d9a6);
}

.ticket-table-scroll {
  max-width: 100%;
  overflow: auto;
  border: 2px solid #b8c6d8;
  border-radius: var(--radius-tight);
  background: #ffffff;
}

.ticket-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  table-layout: fixed;
  color: #263c54;
  font-size: 11px;
  --ticket-row-height: 19px;
}

.ticket-table.is-column-fitted {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.ticket-table th,
.ticket-table td {
  height: var(--ticket-row-height);
  padding: 2px 4px;
  border: 1px solid #c7d3e1;
  vertical-align: middle;
}

.ticket-table th {
  position: relative;
  background: linear-gradient(#e9f1fb, #dce8f7);
  color: #38536f;
  font-size: 10px;
  font-weight: 800;
  text-align: left;
  overflow: hidden;
}

.ticket-col-resize-handle {
  position: absolute;
  top: 0;
  right: -3px;
  z-index: 2;
  width: 7px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}

.ticket-col-resize-handle::after {
  content: "";
  position: absolute;
  top: 18%;
  right: 3px;
  bottom: 18%;
  width: 1px;
  background: #8fa5bf;
}

body.is-resizing-ticket-col {
  cursor: col-resize;
  user-select: none;
}

.ticket-table tr:last-child td {
  border-bottom: 0;
}

.ticket-table th:last-child,
.ticket-table td:last-child {
  border-right: 0;
}

.ticket-col-employee {
  width: 118px;
}

.ticket-table tr.ticket-line-row > td,
.ticket-table tr.ticket-line-filler > td {
  height: var(--ticket-row-height);
  max-height: var(--ticket-row-height);
  padding: 0;
  overflow: hidden;
  line-height: 1;
}

.ticket-line-row td.ticket-cell-editable {
  padding: 0;
}

.ticket-table tr.ticket-line-row > td.ticket-cell-total,
.ticket-table tr.ticket-line-row > td.ticket-cell-tax {
  padding: 0 4px;
  font-size: 10px;
  line-height: var(--ticket-row-height);
}

.ticket-table tr.ticket-line-row input:not([type="checkbox"]),
.ticket-table tr.ticket-line-row select,
.ticket-cell-inline {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 0;
  height: var(--ticket-row-height);
  max-height: var(--ticket-row-height);
  margin: 0;
  padding: 0 3px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 10px;
  line-height: var(--ticket-row-height);
  color: #263c54;
}

/* Appointment modal ledger only: fixed 28px rows (30% thinner than the ~40px
   rows that appeared once a service line was added). Scoped so the checkout
   ledger keeps its own sizing. Uses background-color (not the background
   shorthand) so .ticket-cell-inline-select keeps its dropdown arrow. */
.appointment-lines-table {
  --ticket-row-height: 28px;
}

.appointment-lines-table th {
  white-space: nowrap;
}

.appointment-lines-table tr.ticket-line-row > td,
.appointment-lines-table tr.ticket-line-filler > td {
  line-height: var(--ticket-row-height);
}

.appointment-lines-table tr.ticket-line-row input:not([type="checkbox"]),
.appointment-lines-table tr.ticket-line-row select,
.appointment-lines-table tr.ticket-line-filler input:not([type="checkbox"]),
.appointment-lines-table .ticket-cell-inline {
  min-height: 0;
  height: var(--ticket-row-height);
  max-height: var(--ticket-row-height);
  margin: 0;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background-color: transparent;
  line-height: var(--ticket-row-height);
}

.appointment-lines-table tr.ticket-line-row select.ticket-cell-inline-select {
  padding-right: 14px;
}

.appointment-lines-table input:focus,
.appointment-lines-table select:focus {
  background-color: #fff8e8;
  border: 0;
  box-shadow: none;
  outline: 2px solid #5b8ec4;
  outline-offset: -2px;
}

.appointment-lines-table .ticket-cell-tax-checkbox {
  width: 11px;
  height: 11px;
  min-height: 0;
  max-height: 11px;
  margin: 0 auto;
  padding: 0;
  display: block;
}

.ticket-cell-inline-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 14px;
  cursor: pointer;
  background-color: transparent;
  background-image:
    linear-gradient(45deg, transparent 50%, #38536f 50%),
    linear-gradient(135deg, #38536f 50%, transparent 50%);
  background-position:
    calc(100% - 8px) calc(50% - 1px),
    calc(100% - 5px) calc(50% - 1px);
  background-size: 3px 3px, 3px 3px;
  background-repeat: no-repeat;
}

.ticket-line-row td.ticket-cell-editable:focus-within {
  outline: 2px solid #5b8ec4;
  outline-offset: -2px;
  background: #fff;
}

.ticket-line-context-menu {
  position: fixed;
  z-index: 1500;
  display: grid;
  min-width: 124px;
  padding: 2px 0;
  overflow: hidden;
  border: 1px solid #6f95c4;
  border-radius: 2px;
  background: #f7f7f7;
  box-shadow: 2px 3px 8px rgba(28, 45, 66, 0.28);
  color: #001f7a;
  font-size: 12px;
  line-height: 1.2;
  user-select: none;
}

.ticket-line-context-menu[hidden] {
  display: none;
}

.ticket-line-context-menu-item {
  width: 100%;
  padding: 7px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ticket-line-context-menu-item:hover,
.ticket-line-context-menu-item:focus-visible {
  background: linear-gradient(#fff7b8, #f5c138);
  color: #151000;
  outline: 1px solid #d7a113;
  outline-offset: -1px;
}

.ticket-col-start {
  width: 78px;
}

.ticket-table th.ticket-col-id,
.ticket-table td.ticket-col-id {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  padding-left: 5px;
  padding-right: 5px;
  text-align: center;
}

.ticket-col-id .ticket-cell-id-input {
  padding-left: 5px;
  padding-right: 5px;
}

.ticket-table th.ticket-col-mins,
.ticket-table td.ticket-col-mins {
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  padding-left: 5px;
  padding-right: 5px;
  text-align: center;
}

.ticket-table th.ticket-col-type,
.ticket-table td.ticket-col-type {
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  padding-left: 4px;
  padding-right: 4px;
  text-align: center;
}

.ticket-col-mins .ticket-cell-mins {
  padding-left: 5px;
  padding-right: 5px;
  text-align: center;
}

.ticket-table th.ticket-col-price,
.ticket-table td.ticket-col-price {
  width: 64px;
  min-width: 64px;
  max-width: 64px;
  padding-left: 5px;
  padding-right: 5px;
  text-align: right;
}

.ticket-col-price .ticket-cell-price {
  padding-left: 5px;
  padding-right: 5px;
  text-align: right;
}

.ticket-table th.ticket-col-qty-prch,
.ticket-table td.ticket-col-qty-prch,
.ticket-table th.ticket-col-qty-used,
.ticket-table td.ticket-col-qty-used {
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  padding-left: 5px;
  padding-right: 5px;
  text-align: center;
}

.ticket-col-qty-prch .ticket-cell-qty-prch,
.ticket-col-qty-used .ticket-cell-qty-used {
  padding-left: 5px;
  padding-right: 5px;
  text-align: center;
}

.ticket-table th.ticket-col-discount,
.ticket-table td.ticket-col-discount {
  width: 52px;
  min-width: 52px;
  max-width: 52px;
  padding-left: 5px;
  padding-right: 5px;
  text-align: right;
}

.ticket-col-discount .ticket-cell-discount {
  padding-left: 5px;
  padding-right: 5px;
  text-align: right;
}

.ticket-table tbody tr > td.ticket-col-start,
.ticket-table tbody tr > td:nth-child(2) {
  background: #e8f4e8;
}

.ticket-line-row td.ticket-col-start:focus-within {
  background: #f3faf3;
}

.ticket-table tbody tr > td.ticket-col-id,
.ticket-table tbody tr > td:nth-child(3) {
  background: #ede8f4;
}

.ticket-line-row td.ticket-col-id:focus-within {
  background: #f5f1fa;
}

.ticket-table tbody tr > td.ticket-col-mins,
.ticket-table tbody tr > td:nth-child(4) {
  background: #fde8d6;
}

.ticket-line-row td.ticket-col-mins:focus-within,
.ticket-line-row td:nth-child(4):focus-within {
  background: #fff3e8;
}

.ticket-table tbody tr > td.ticket-col-price,
.ticket-table tbody tr > td:nth-child(7),
.ticket-line-row td:has(.ticket-cell-price) {
  background: #dff5f5;
}

.ticket-line-row td.ticket-col-price:focus-within,
.ticket-line-row td:has(.ticket-cell-price):focus-within {
  background: #ecfafa;
}

.ticket-table tbody tr > td.ticket-col-qty-prch,
.ticket-table tbody tr > td:nth-child(10) {
  background: #e8f4e8;
}

.ticket-line-row td.ticket-col-qty-prch:focus-within {
  background: #f3faf3;
}

.ticket-table tbody tr > td.ticket-col-qty-used,
.ticket-table tbody tr > td:nth-child(11) {
  background: #fce8e8;
}

.ticket-line-row td.ticket-col-qty-used:focus-within {
  background: #fdf3f3;
}

.ticket-table tbody tr > td:nth-child(13),
.ticket-table tbody tr > td.ticket-cell-total {
  background: #fdf8e3;
}

.ticket-col-desc {
  width: 230px;
}

.ticket-col-num {
  width: 76px;
  text-align: right;
}

.ticket-col-actions {
  width: 42px;
  text-align: center;
}

.ticket-cell-input {
  width: 100%;
  min-height: 28px;
  padding: 4px 5px;
}

.ticket-cell-compact {
  min-height: 24px;
  height: 24px;
  padding: 2px 4px;
  font-size: 11px;
}

.ticket-cell-select {
  width: 100%;
  min-height: 12px;
  padding: 1px 14px 1px 3px;
  font-size: 10px;
}

.ticket-cell-start,
.ticket-cell-employee-select {
  text-align: left;
}

.ticket-cell-start {
  text-align: center;
}

.ticket-col-type .ticket-cell-type-select {
  padding-left: 4px;
  padding-right: 14px;
  text-align: center;
  background-position:
    calc(100% - 7px) calc(50% - 2px),
    calc(100% - 4px) calc(50% - 2px);
}

.ticket-cell-num {
  text-align: right;
}

.ticket-cell-id-input {
  color: #19446b;
  font-weight: 700;
  text-align: center;
}

.ticket-cell-id:hover,
.ticket-cell-id:focus-within {
  outline: 2px solid #c47e2a;
  outline-offset: -2px;
  background: #fff8e8;
}

.ticket-cell-tax {
  text-align: center;
}

.ticket-cell-tax-checkbox {
  width: 11px;
  height: 11px;
  min-height: 0;
  margin: 0 auto;
  display: block;
  accent-color: #1e73d8;
}

.ticket-table tr.ticket-line-row .ticket-cell-tax {
  text-align: center;
}

.ticket-cell-total {
  font-weight: 700;
}

.ticket-line-remove,
.ticket-search-close {
  display: inline-grid;
  place-items: center;
  border: 1px solid #a9bbcf;
  border-radius: var(--radius-tight);
  background: linear-gradient(#ffffff, #e9f1fb);
  color: #345a83;
  font-weight: 800;
}

.ticket-line-remove {
  width: 26px;
  height: 26px;
}

.ticket-line-remove:hover,
.ticket-line-remove:focus-visible,
.ticket-search-close:hover,
.ticket-search-close:focus-visible {
  border-color: #c47e2a;
  background: linear-gradient(#fff8e8, #f2d9a6);
}

.ticket-empty-row {
  cursor: pointer;
  height: 23px;
  color: #5b7088;
  text-align: center;
}

.ticket-line-filler td {
  height: var(--ticket-row-height);
  padding: 0;
  overflow: hidden;
  line-height: 1;
  background: #fcfdff;
}

.ticket-line-filler td.ticket-col-start,
.ticket-line-filler td:nth-child(2) {
  background: #e8f4e8;
}

.ticket-line-filler td.ticket-col-id,
.ticket-line-filler td:nth-child(3) {
  background: #ede8f4;
}

.ticket-line-filler td.ticket-col-mins,
.ticket-line-filler td:nth-child(4) {
  background: #fde8d6;
}

.ticket-line-filler td.ticket-col-price,
.ticket-line-filler td:nth-child(7) {
  background: #dff5f5;
}

.ticket-line-filler td.ticket-col-qty-prch,
.ticket-line-filler td:nth-child(10) {
  background: #e8f4e8;
}

.ticket-line-filler td.ticket-col-qty-used,
.ticket-line-filler td:nth-child(11) {
  background: #fce8e8;
}

.ticket-line-filler td.ticket-col-total,
.ticket-line-filler td:nth-child(13) {
  background: #fdf8e3;
}

.ticket-filler-id-cell {
  padding: 0;
  cursor: text;
}

.ticket-filler-id-input {
  color: #5b7088;
  font-weight: 700;
  text-align: center;
}

.ticket-line-filler .ticket-filler-id-input:focus {
  background: #fff8e8;
}

.ticket-bottom-placeholder {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 220px;
  margin-top: 12px;
  border: 2px solid #c7d3e1;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.ticket-bottom-cell {
  min-width: 0;
  border-right: 1px solid #c7d3e1;
  padding: 10px;
  color: #9aa9bc;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ticket-bottom-cell:last-child {
  border-right: 0;
}

.ticket-bottom-cell-totals {
  padding: 0;
  color: inherit;
  text-transform: none;
  letter-spacing: normal;
}

.ticket-bottom-cell-totals .appointment-ticket-totals {
  height: 100%;
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background: linear-gradient(#f8fbff, #edf4fb);
}

.ticket-bottom-cell-totals .checkout-grand-total strong {
  font-size: 16px;
}

.ticket-table-hint {
  margin: 7px 0 0;
  color: #5b7088;
  font-size: 11px;
}

.ticket-search-popover {
  position: absolute;
  z-index: 30;
  width: min(360px, calc(100% - 16px));
  max-height: 320px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid #8fa5bf;
  border-radius: var(--radius-tight);
  background: #f8fbff;
  box-shadow: 0 16px 32px rgba(38, 60, 84, 0.18);
}

.ticket-search-header,
.ticket-search-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.ticket-search-close {
  width: 28px;
  height: 28px;
}

.ticket-search-controls,
.ticket-search-popover-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex-shrink: 0;
}

.ticket-search-field {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: #50677f;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.ticket-search-field select,
.ticket-search-field input {
  min-height: 30px;
  padding: 5px 7px;
  font-size: 12px;
  font-weight: 500;
}

.ticket-search-list,
.ticket-search-popover-list {
  display: grid;
  gap: 4px;
  min-height: 0;
  max-height: 150px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
  flex: 1 1 auto;
}

.ticket-search-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 6px 7px;
  border: 1px solid #b8c6d8;
  border-radius: var(--radius-tight);
  background: #ffffff;
  color: #263c54;
  text-align: left;
}

.ticket-search-item:hover,
.ticket-search-item:focus-visible {
  border-color: #c47e2a;
  background: #fff8e8;
}

.ticket-search-code {
  color: #19446b;
  font-weight: 800;
}

.ticket-search-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ticket-search-price {
  color: #426f2d;
  font-weight: 800;
  text-align: right;
}

.ticket-search-empty {
  margin: 0;
  padding: 10px;
  color: #5b7088;
  text-align: center;
}

.checkout-status-pill {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid #87a0be;
  border-radius: var(--radius-tight);
  background: linear-gradient(#ffffff, #dce8f7);
  color: #345a83;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.checkout-status-pill.is-closed {
  border-color: #799966;
  background: linear-gradient(#f5fff1, #dcefd2);
  color: #426f2d;
}

.checkout-ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.checkout-ticket-meta span {
  padding: 3px 7px;
  border: 1px solid #b2c2d5;
  border-radius: var(--radius-tight);
  background: #f8fbff;
  color: #50677f;
  font-size: 11px;
  font-weight: 700;
}

.checkout-lines,
.checkout-totals {
  display: grid;
  gap: 6px;
  padding: 9px;
  border: 1px solid #b9c8d9;
  border-radius: var(--radius-tight);
  background: linear-gradient(#f8fbff, #edf4fb);
}

.checkout-line,
.checkout-totals > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.checkout-line span,
.checkout-totals span {
  color: #5b7088;
  font-size: 12px;
}

.checkout-line strong,
.checkout-totals strong {
  color: #263c54;
  text-align: right;
}

.checkout-payment-grid {
  margin-top: 10px;
}

.checkout-totals {
  margin-top: 10px;
}

.checkout-grand-total {
  padding-top: 6px;
  border-top: 1px solid #b7c5d6;
}

.checkout-grand-total strong {
  color: #19446b;
  font-size: 18px;
}

.checkout-note-field {
  margin-top: 10px;
}

.checkout-actions {
  margin-top: 10px;
}

.service-catalog-modal-card {
  width: min(980px, calc(100vw - 32px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.service-catalog-body {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  max-height: calc(100svh - 120px);
  padding: 12px;
  overflow: auto;
}

.service-catalog-picker,
.service-catalog-form {
  min-width: 0;
}

.service-catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.service-catalog-search-field input {
  width: 100%;
}

.service-catalog-list {
  display: grid;
  gap: 3px;
  max-height: min(560px, calc(100svh - 190px));
  overflow: auto;
  padding-right: 2px;
}

.service-catalog-row {
  display: grid;
  gap: 1px;
  width: 100%;
  min-height: 36px;
  padding: 4px 6px;
  border: 1px solid #9eb2ca;
  border-radius: var(--radius-tight);
  background: linear-gradient(#ffffff, #e9f1fb);
  color: #263c54;
  text-align: left;
  line-height: 1.1;
}

.service-catalog-row:hover,
.service-catalog-row:focus-visible {
  background: linear-gradient(#ffffff, #dce8f7);
}

.service-catalog-row.is-active {
  border-color: #c47e2a;
  background: linear-gradient(#fff8e8, #f2d9a6);
}

.service-catalog-row strong,
.service-catalog-row span {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.service-catalog-row span {
  color: #5f748f;
  font-size: 10px;
}

.service-catalog-row strong {
  font-size: 12px;
}

.service-catalog-row-match {
  justify-self: start;
  padding: 1px 5px;
  border: 1px solid #b2c2d5;
  border-radius: var(--radius-tight);
  background: #f8fbff;
  color: #50677f;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.service-catalog-row-match {
  text-transform: none;
}

.service-catalog-form {
  gap: 10px;
  padding: 0;
}

.service-summary,
.service-provider-panel {
  padding: 10px;
  border: 1px solid #c4d1df;
  border-radius: var(--radius-tight);
  background: linear-gradient(#ffffff, #edf4fc);
  color: #50677f;
  font-size: 12px;
  line-height: 1.35;
}

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

.service-provider-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.service-provider-option {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #b8c8da;
  border-radius: var(--radius-tight);
  background: #f8fbff;
  color: #263c54;
  font-size: 12px;
  font-weight: 700;
}

.service-provider-option input {
  flex: 0 0 auto;
}

.service-provider-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.service-description-field textarea {
  min-height: 72px;
}

.service-actions {
  justify-content: space-between;
}

.appointment-modal-card .app-modal-header button {
  cursor: pointer;
}

.appointment-modal-card.is-minimized {
  min-height: 0 !important;
}

.appointment-modal-card.is-minimized .appointment-modal-resize {
  display: none;
}

.appointment-modal-card.is-measuring-min-fit {
  width: max-content !important;
  height: max-content !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
}

.appointment-modal-card.is-measuring-min-fit #appointment-form {
  overflow: visible !important;
}

.appointment-modal-card.is-measuring-min-fit .ticket-table-scroll {
  overflow: visible;
  width: max-content;
  max-width: none;
}

.appointment-modal-card.is-measuring-min-fit .ticket-bottom-placeholder,
.appointment-modal-card.is-measuring-min-fit .appointment-worksheet-placeholder {
  min-height: 0 !important;
}

.appointment-modal-card .appointment-modal-resize-handle {
  position: absolute;
  z-index: 20;
  user-select: none;
  touch-action: none;
}

.appointment-modal-card .resize-edge-n {
  top: 0;
  left: 14px;
  right: 14px;
  height: 8px;
  cursor: ns-resize;
}

.appointment-modal-card .resize-edge-s {
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 8px;
  cursor: ns-resize;
}

.appointment-modal-card .resize-edge-e {
  top: 14px;
  bottom: 14px;
  right: 0;
  width: 8px;
  cursor: ew-resize;
}

.appointment-modal-card .resize-edge-w {
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 8px;
  cursor: ew-resize;
}

.appointment-modal-card .resize-corner-nw {
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  cursor: nwse-resize;
}

.appointment-modal-card .resize-corner-ne {
  top: 0;
  right: 0;
  width: 14px;
  height: 14px;
  cursor: nesw-resize;
}

.appointment-modal-card .resize-corner-sw {
  bottom: 0;
  left: 0;
  width: 14px;
  height: 14px;
  cursor: nesw-resize;
}

.appointment-modal-card .resize-corner-se {
  bottom: 0;
  right: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
}

.appointment-modal-resize {
  position: absolute;
  right: 3px;
  bottom: 3px;
  z-index: 25;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background:
    linear-gradient(135deg, transparent 0 46%, rgba(61, 91, 130, 0.48) 47% 53%, transparent 54%),
    linear-gradient(135deg, transparent 0 62%, rgba(61, 91, 130, 0.48) 63% 69%, transparent 70%);
  cursor: nwse-resize;
}

body.is-moving-appointment-popout,
body.is-moving-appointment-popout * {
  cursor: move;
}

body.is-resizing-appointment-popout,
body.is-resizing-appointment-popout * {
  cursor: nwse-resize;
}

body.is-resizing-appointment-popout[data-resize-edge="e"],
body.is-resizing-appointment-popout[data-resize-edge="w"],
body.is-resizing-appointment-popout[data-resize-edge="e"] *,
body.is-resizing-appointment-popout[data-resize-edge="w"] * {
  cursor: ew-resize !important;
}

body.is-resizing-appointment-popout[data-resize-edge="n"],
body.is-resizing-appointment-popout[data-resize-edge="s"],
body.is-resizing-appointment-popout[data-resize-edge="n"] *,
body.is-resizing-appointment-popout[data-resize-edge="s"] * {
  cursor: ns-resize !important;
}

body.is-resizing-appointment-popout[data-resize-edge="nw"],
body.is-resizing-appointment-popout[data-resize-edge="se"],
body.is-resizing-appointment-popout[data-resize-edge="nw"] *,
body.is-resizing-appointment-popout[data-resize-edge="se"] * {
  cursor: nwse-resize !important;
}

body.is-resizing-appointment-popout[data-resize-edge="ne"],
body.is-resizing-appointment-popout[data-resize-edge="sw"],
body.is-resizing-appointment-popout[data-resize-edge="ne"] *,
body.is-resizing-appointment-popout[data-resize-edge="sw"] * {
  cursor: nesw-resize !important;
}

#appointment-form {
  gap: 12px;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px 12px 12px;
}

.appointment-worksheet-body {
  display: grid;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.appointment-worksheet-top {
  align-items: start;
}

#appointment-form.is-editing-appointment .appointment-worksheet-top,
#appointment-form.is-client-selected .appointment-worksheet-top {
  grid-template-columns: minmax(0, 188px) minmax(0, 1fr);
  justify-content: stretch;
  width: 100%;
  max-width: 100%;
  padding-bottom: 10px;
  border-bottom: 1px solid #1a1a1a;
}

.appointment-info-panel,
.appointment-client-panel {
  display: grid;
  gap: 8px;
  align-content: start;
}

.appointment-info-panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.appointment-info-panel > .panel-caption {
  padding: 0 0 4px;
  border: 0;
  background: transparent;
}

.appointment-info-panel .appointment-slot-grid .ticket-info-row-editable {
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
}

.appointment-info-panel .ticket-info-row-editable label {
  font-size: 10px;
}

.appointment-info-panel .appointment-slot-summary {
  padding: 0;
  border: 0;
  background: transparent;
}

.appointment-client-panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#appointment-form.is-editing-appointment .appointment-client-panel,
#appointment-form.is-client-selected .appointment-client-panel {
  justify-self: end;
  width: min(260px, 100%);
  max-width: 260px;
}

.appointment-client-panel > .panel-caption {
  padding: 0 0 4px;
  border: 0;
  background: transparent;
}

#appointment-form.is-client-selected .appointment-client-panel .appointment-selected-client,
#appointment-form.is-editing-appointment .appointment-client-panel .appointment-selected-client {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.appointment-client-panel .appointment-lookup-shell {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.appointment-ledger-panel {
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.appointment-slot-summary {
  display: none;
}

.appointment-slot-grid {
  margin-top: 0;
}

.appointment-slot-grid #appointment-date {
  width: 128px;
  max-width: 100%;
  justify-self: start;
}

.appointment-slot-grid #appointment-start {
  width: 72px;
  max-width: 100%;
  justify-self: start;
}

.appointment-ledger-toolbar {
  justify-content: flex-end;
}

.ticket-bottom-cell-actions {
  display: grid;
  place-items: center;
  padding: 12px;
  color: inherit;
  text-transform: none;
  letter-spacing: normal;
}

.appointment-action-buttons {
  display: grid;
  gap: 6px;
  width: min(132px, 100%);
}

.appointment-action-buttons-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.appointment-schedule-close-button,
.appointment-cancel-button,
.appointment-no-show-button {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 700;
}

.appointment-schedule-close-button {
  font-size: 12px;
  padding-inline: 14px;
}

.appointment-worksheet-lower {
  display: grid;
  gap: 10px;
}

.appointment-worksheet-lower .appointment-buffer-panel {
  margin-top: 0;
}

.appointment-worksheet-lower .appointment-buffer-caption {
  padding: 0;
  border: 0;
  background: transparent;
  color: #5b7088;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.appointment-worksheet-lower .appointment-buffer-grid {
  border: 1px solid #c4d1df;
  border-radius: var(--radius-tight);
  background: #fcfdff;
}

.appointment-worksheet-placeholder {
  min-height: 120px;
}

#appointment-form:not(.is-editing-appointment):not(.is-client-selected) .appointment-info-panel,
#appointment-form:not(.is-editing-appointment):not(.is-client-selected) .appointment-worksheet-lower,
#appointment-form:not(.is-editing-appointment):not(.is-client-selected) .appointment-worksheet-placeholder {
  display: none;
}

#appointment-form:not(.is-editing-appointment):not(.is-client-selected) .appointment-worksheet-top {
  grid-template-columns: minmax(0, 1fr);
}

#appointment-form.is-editing-appointment .appointment-info-panel,
#appointment-form.is-client-selected .appointment-info-panel,
#appointment-form.is-editing-appointment .appointment-slot-summary,
#appointment-form.is-client-selected .appointment-slot-summary {
  display: grid;
}

#appointment-form.is-editing-appointment .appointment-worksheet-placeholder,
#appointment-form.is-client-selected .appointment-worksheet-placeholder {
  display: grid;
}

#appointment-form .appointment-worksheet-lower,
#appointment-form .appointment-worksheet-lower-fields {
  display: none !important;
}

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

.storage-cutover-card {
  width: min(620px, calc(100vw - 20px));
}

.time-block-modal-card {
  width: min(500px, calc(100vw - 24px));
}

.availability-modal-card {
  width: min(520px, calc(100vw - 24px));
}

.availability-recurring-modal-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(980px, calc(100vw - 32px));
  max-height: min(86svh, 760px);
}

.availability-recurring-modal-card .app-form {
  overflow: auto;
}

.time-block-form {
  gap: 9px;
}

.time-block-form .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.time-block-confirm-popover {
  position: fixed;
  inset: auto 24px 24px auto;
  z-index: 1200;
  width: min(420px, calc(100vw - 32px));
}

.time-block-confirm-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #c6d2df;
  border-radius: var(--radius-card);
  background: #f8fafc;
  box-shadow: 0 18px 38px rgb(15 23 42 / 24%);
}

.time-block-confirm-card h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #263548;
}

.time-block-confirm-summary {
  margin: 0;
  color: #4d5c6e;
  font-size: 0.88rem;
}

.time-block-confirm-details {
  padding: 9px 10px;
  border: 1px solid #d7c6a8;
  border-radius: var(--radius-tight);
  background: #fff8ea;
  color: #4d3a1f;
  font-weight: 700;
}

.time-block-confirm-actions {
  justify-content: flex-end;
  margin-top: 2px;
}

.appointment-slot-summary {
  display: grid;
  gap: 5px;
  padding: 6px;
}

.appointment-slot-summary > .panel-caption {
  padding: 4px 6px;
}

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

.appointment-slot-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 7px;
  border: 1px solid #d6e1ef;
  border-radius: var(--radius-tight);
  background: rgba(255, 255, 255, 0.72);
}

.appointment-slot-summary-item span {
  color: #58708d;
  font-weight: 700;
}

.appointment-lookup-shell {
  display: grid;
  gap: 6px;
}

.appointment-lookup-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: end;
}

.appointment-lookup-field,
.appointment-limit-field {
  margin: 0;
}

.appointment-limit-field {
  min-width: 108px;
}

.appointment-client-results {
  min-height: 220px;
  max-height: 330px;
  overflow-y: auto;
  border: 1px solid #a8bdd8;
  border-radius: var(--radius-tight);
  background: rgba(255, 255, 255, 0.36);
}

.appointment-selected-meta,
.lookup-result-meta {
  color: #5b728c;
  line-height: 1.35;
}

.appointment-selected-label,
.appointment-ticket-caption {
  color: #516d90;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.appointment-clear-client {
  justify-self: start;
}

.appointment-client-change-back {
  justify-self: start;
  min-height: 24px;
  padding: 2px 10px;
}

.appointment-new-client-fields {
  display: grid;
  gap: 6px;
  padding: 7px;
  border: 1px solid #d7c07b;
  border-radius: var(--radius-tight);
  background: linear-gradient(#fffbe9, #f6edd0);
}

.appointment-modal-card .lookup-results-shell,
.appointment-modal-card .lookup-intro {
  padding: 6px 8px;
}

.appointment-modal-card .lookup-results-shell {
  gap: 6px;
}

.appointment-modal-card .lookup-result-button {
  padding: 5px 8px;
}

.appointment-client-list {
  display: grid;
}

.appointment-client-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.75fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  padding: 3px 8px;
  border: 0;
  border-bottom: 1px solid rgba(112, 139, 174, 0.2);
  border-radius: 0;
  text-align: left;
}

.appointment-client-row:nth-child(odd) {
  background: rgba(232, 242, 253, 0.92);
}

.appointment-client-row:nth-child(even) {
  background: rgba(246, 250, 255, 0.96);
}

.appointment-client-row:hover,
.appointment-client-row:focus-visible,
.appointment-client-row.is-selected {
  background: rgba(216, 232, 251, 1);
}

.appointment-client-row strong {
  overflow: hidden;
  color: #213b5c;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-client-row .lookup-result-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-no-show-badge {
  min-width: 82px;
  padding: 2px 6px;
  border: 1px solid rgba(89, 111, 87, 0.18);
  border-radius: var(--radius-tight);
  background: var(--no-show-rate-bg, #e5f4dc);
  color: #33452f;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.appointment-modal-card .form-grid {
  gap: 6px 8px;
}

.appointment-modal-card .form-field {
  gap: 2px;
}

.appointment-modal-card textarea {
  min-height: 62px;
}

.appointment-ticket-caption {
  display: none;
}

#appointment-form.appointment-creation-form:not(.is-editing-appointment):not(.is-client-selected) .appointment-slot-summary,
#appointment-form.appointment-creation-form:not(.is-editing-appointment):not(.is-client-selected) .appointment-selected-client,
#appointment-form.appointment-creation-form:not(.is-editing-appointment):not(.is-client-selected) .appointment-clear-client,
#appointment-form.appointment-creation-form:not(.is-editing-appointment) .client-context-banner,
#appointment-form.appointment-creation-form:not(.is-editing-appointment) .appointment-ticket-caption,
#appointment-form.appointment-creation-form:not(.is-editing-appointment) .appointment-service-grid,
#appointment-form.appointment-creation-form:not(.is-editing-appointment) .appointment-buffer-panel,
#appointment-form.appointment-creation-form:not(.is-editing-appointment) .appointment-notes-field {
  display: none;
}

#appointment-form.appointment-creation-form:not(.is-editing-appointment) .appointment-lookup-shell {
  min-height: 0;
}

#appointment-form.appointment-creation-form:not(.is-editing-appointment) .appointment-client-results {
  min-height: min(330px, 44vh);
  max-height: min(430px, 52vh);
}

#appointment-form.is-client-selected .appointment-new-client-fields {
  display: none;
}

#appointment-form.is-client-selected .appointment-selected-client {
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid #c4d1df;
  border-radius: var(--radius-tight);
  background: rgba(255, 255, 255, 0.82);
}

.appointment-form-controls {
  display: none !important;
}

.appointment-ticket-actions {
  justify-content: space-between;
  align-items: center;
}

.appointment-ticket-actions-left,
.appointment-ticket-actions-right {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#appointment-form.is-client-selected .appointment-selected-client strong,
#appointment-form.is-editing-appointment .appointment-selected-client strong {
  color: #24384f;
  font-size: 16px;
  line-height: 1.15;
}

#appointment-form.is-client-selected .appointment-selected-meta {
  font-size: 11px;
}

#appointment-form.is-client-selected .appointment-clear-client {
  min-height: 22px;
  padding: 1px 8px;
  justify-self: start;
}

#appointment-form .appointment-ticket-caption,
#appointment-form .appointment-service-grid,
#appointment-form #appointment-client-context {
  display: none !important;
}

#appointment-form.is-client-selected .appointment-lookup-header,
#appointment-form.is-client-selected .appointment-client-results {
  display: none !important;
}

.appointment-buffer-panel {
  display: grid;
  gap: 0;
  margin-top: -3px;
}

.appointment-buffer-panel .panel-caption {
  padding: 4px 6px;
  border: 1px solid #9fb5d0;
  border-bottom: 0;
  border-radius: var(--radius-tight) var(--radius-tight) 0 0;
  background: linear-gradient(#f4f8fd, #e0ebf8);
  color: #36536f;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.appointment-buffer-grid {
  display: grid;
  grid-template-columns: 0.72fr 0.72fr minmax(0, 1.7fr);
  gap: 5px;
  padding: 6px;
  border: 1px solid #9fb5d0;
  border-radius: 0 0 var(--radius-tight) var(--radius-tight);
  background: #edf4fc;
}

.appointment-buffer-grid .inline-note {
  align-self: center;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid #c1d1e4;
  border-radius: var(--radius-tight);
  background: rgba(255, 255, 255, 0.56);
  color: #50677f;
  font-size: 11px;
}

#appointment-form.is-client-selected .appointment-notes-field textarea {
  min-height: 52px;
}

.client-context-item {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border: 1px solid rgba(140, 112, 25, 0.18);
  border-radius: var(--radius-tight);
  background: rgba(255, 255, 255, 0.66);
}

.client-context-label {
  color: #785b06;
  font-weight: 700;
}

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

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

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

.form-field {
  display: grid;
  gap: 4px;
}

.form-field span {
  font-weight: 700;
  color: #4f6988;
}

.form-help {
  margin: 0;
  color: #5e748d;
  line-height: 1.45;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

:focus-visible {
  outline: 1px solid #315f93;
  outline-offset: 1px;
}

body[data-view="clients"] .schedule-only,
body[data-view="employees"] .schedule-only,
body[data-view="reports"] .schedule-only,
body[data-view="settings"] .schedule-only,
body[data-view="log"] .schedule-only,
body[data-view="help"] .schedule-only {
  display: none;
}

body[data-view="settings"] .workspace {
  grid-template-columns: minmax(0, 1fr);
}

body[data-view="settings"] .sidebar,
body[data-view="settings"] .sidebar-resizer {
  display: none;
}

@media (max-width: 1240px) {
  .roadmap-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-grid,
  .client-summary-grid,
  .employee-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  .roadmap-groups,
  .clients-layout,
  .tickets-layout,
  .reports-layout,
  .help-layout {
    grid-template-columns: 1fr;
  }

  .employees-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "detail";
    gap: 8px;
    padding: 8px;
    overflow: hidden;
  }

  .employees-layout > .section-panel:nth-child(1) {
    grid-area: detail;
  }

  .employees-layout .section-panel {
    min-height: 0;
  }

  .employees-layout .panel-caption {
    padding: 4px 8px;
  }

  .employees-layout .employee-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .employees-layout .employee-detail-shell {
    gap: 7px;
    padding: 8px;
    min-height: 0;
    overflow: auto;
  }

  .employees-layout .employee-form.app-form {
    padding: 16px 20px;
    margin: 12px auto;
    max-width: 640px;
    gap: 12px;
  }

  .employees-layout .detail-form-grid {
    gap: 10px 12px;
  }

  body[data-view="employees"] .employee-form .detail-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-panel-wide {
    grid-column: auto;
  }

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

  .client-section-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  body {
    overflow: auto;
    overflow-x: hidden;
  }

  .availability-recurring-setup {
    grid-template-columns: 1fr;
  }

  #app-shell {
    height: auto;
    min-height: 100svh;
  }

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

  .main-shell,
  .view-host,
  .app-view,
  .status-bar {
    max-width: 100%;
    overflow-x: hidden;
  }

  .sidebar {
    display: none;
  }

  .sidebar-resizer,
  .mini-calendar-resizer {
    display: none;
  }

  .menu-bar {
    overflow-x: auto;
  }

  .ribbon-bar {
    max-height: 64px;
    padding-block: 3px;
    overflow-y: hidden;
  }

  .ribbon-strip {
    display: flex;
    width: max-content;
    min-width: 0;
    gap: 5px;
  }

  .ribbon-tool {
    flex: 0 0 62px;
    width: 62px;
    min-width: 62px;
    min-height: 58px;
    padding: 2px 2px 3px;
  }

  .ribbon-icon {
    width: 34px;
    height: 30px;
  }

  .ribbon-label {
    min-height: 18px;
    font-size: 11px;
  }

  .ribbon-label.is-compact-label {
    font-size: 11px;
  }

  .mini-calendar-stack {
    flex: 0 1 auto;
    max-height: none;
    min-height: 0;
  }

  .view-host {
    min-height: 70svh;
  }

  body[data-view="schedule"] {
    background: #ffffff;
  }

  body[data-view="schedule"] #app-shell,
  body[data-view="schedule"] .workspace,
  body[data-view="schedule"] .main-shell,
  body[data-view="schedule"] .view-host,
  body[data-view="schedule"] .app-view {
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }

  body[data-view="schedule"] .topbar,
  body[data-view="schedule"] .main-banner,
  body[data-view="schedule"] .global-toolbar,
  body[data-view="schedule"] .status-bar {
    display: none;
  }

  body[data-view="schedule"] .board-wrapper,
  body[data-view="schedule"] .employee-schedule-view,
  body[data-view="schedule"] #plan-fab {
    display: none;
  }

  body[data-view="schedule"] .mobile-schedule-shell {
    display: flex;
    flex-direction: column;
  }

  body[data-mobile-tab] {
    background: #ffffff;
  }

  body[data-mobile-tab] #app-shell,
  body[data-mobile-tab] .workspace,
  body[data-mobile-tab] .main-shell {
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body[data-mobile-tab] .topbar,
  body[data-mobile-tab] .main-banner,
  body[data-mobile-tab] .global-toolbar,
  body[data-mobile-tab] .status-bar,
  body[data-mobile-tab] #plan-fab {
    display: none;
  }

  body:not([data-mobile-tab="schedule"]) .view-host {
    display: none;
  }

  body:not([data-mobile-tab="schedule"]) .mobile-schedule-shell {
    display: none;
  }

  .mobile-schedule-shell {
    --mobile-purple: #21133d;
    --mobile-coral: #ec665c;
    --mobile-grid-line: #d7d9de;
    --mobile-card-blue: #c3e1f2;
    --mobile-card-border: #9bc7df;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100svh;
    max-width: 100%;
    padding: 0 0 calc(68px + env(safe-area-inset-bottom));
    overflow: hidden;
    overscroll-behavior: none;
    color: #111111;
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, sans-serif;
    font-size: 16px;
  }

  .mobile-app-shell {
    --mobile-purple: #21133d;
    --mobile-coral: #ec665c;
    --mobile-page-bg: #f4f3f8;
    display: block;
    color: #111111;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, sans-serif;
    font-size: 16px;
  }

  .mobile-app-shell[hidden] {
    display: none;
  }

  .mobile-tab-panel {
    display: none;
  }

  .mobile-app-shell.has-panel .mobile-tab-panel {
    position: fixed;
    inset: 0;
    z-index: 96;
    display: block;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
    background: var(--mobile-page-bg);
  }

  .mobile-page {
    position: relative;
    min-height: 100svh;
    padding: calc(18px + env(safe-area-inset-top)) 18px calc(92px + env(safe-area-inset-bottom));
    background: var(--mobile-page-bg);
  }

  .mobile-requests-page {
    background: #ffffff;
  }

  .mobile-requests-header,
  .mobile-clients-header,
  .mobile-centered-header {
    display: grid;
    align-items: center;
    gap: 12px;
  }

  .mobile-requests-header {
    grid-template-columns: minmax(0, 1fr) 48px;
    padding: 10px 0 38px;
  }

  .mobile-clients-header {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 8px 0 12px;
  }

  .mobile-centered-header {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    padding: 28px 0 24px;
  }

  .mobile-centered-header h2 {
    grid-column: 2;
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
  }

  .mobile-centered-header .mobile-page-icon-button {
    grid-column: 3;
  }

  .mobile-page-icon-button,
  .mobile-text-button {
    min-width: 0;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: var(--mobile-purple);
    font: inherit;
    font-size: 1.05rem;
    cursor: pointer;
  }

  .mobile-page-icon-button {
    display: grid;
    place-items: center;
    justify-self: end;
    width: 44px;
    padding: 0;
  }

  .mobile-page-icon-button .mobile-nav-icon {
    width: 34px;
    height: 34px;
  }

  .mobile-text-button {
    padding: 0 6px;
    white-space: nowrap;
  }

  .mobile-segmented-control {
    display: grid;
    min-height: 42px;
    padding: 3px;
    border-radius: 9px;
    background: #dedee3;
    color: var(--mobile-purple);
    overflow: hidden;
  }

  .mobile-requests-segments {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mobile-clients-segments {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 0 14px;
  }

  .mobile-message-segments {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(100%, 310px);
    margin: 0 auto 20px;
  }

  .mobile-segment-button {
    min-width: 0;
    min-height: 36px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--mobile-purple);
    font: inherit;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
  }

  .mobile-segment-button.is-active {
    border-radius: 8px;
    background: #ffffff;
    color: var(--mobile-coral);
    box-shadow: 0 1px 5px rgba(23, 18, 35, 0.16);
  }

  .mobile-search-field {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    min-width: 0;
    min-height: 48px;
    padding: 0 14px;
    border: 0;
    border-radius: 9px;
    background: #dedfe3;
    color: var(--mobile-purple);
  }

  .mobile-search-field .mobile-nav-icon {
    width: 27px;
    height: 27px;
  }

  .mobile-search-field input {
    min-width: 0;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: #111111;
    font: inherit;
    font-size: 1.35rem;
    outline: 0;
  }

  .mobile-search-field input::placeholder {
    color: #8f9095;
    opacity: 1;
  }

  .mobile-request-list,
  .mobile-client-list,
  .mobile-message-list,
  .mobile-more-list {
    display: grid;
    min-width: 0;
  }

  .mobile-request-list {
    gap: 0;
  }

  .mobile-request-controls {
    display: grid;
    gap: 10px;
    margin: -18px 0 18px;
    padding: 12px;
    border-radius: 8px;
    background: #f1f1f4;
  }

  .mobile-request-control-group {
    display: grid;
    gap: 6px;
    min-width: 0;
  }

  .mobile-request-control-label {
    color: #6c6c72;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
  }

  .mobile-request-chip-row {
    display: flex;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .mobile-request-chip-row::-webkit-scrollbar {
    display: none;
  }

  .mobile-request-chip {
    flex: 0 0 auto;
    min-width: 0;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #d7d7de;
    border-radius: 8px;
    background: #ffffff;
    color: var(--mobile-purple);
    font: inherit;
    font-size: 0.94rem;
    font-weight: 600;
    cursor: pointer;
  }

  .mobile-request-chip.is-active {
    border-color: rgba(236, 102, 92, 0.5);
    background: #fff7f6;
    color: var(--mobile-coral);
  }

  .mobile-booking-options {
    display: grid;
    gap: 14px;
    padding-bottom: 14px;
  }

  .mobile-booking-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 0 rgba(28, 20, 46, 0.08);
  }

  .mobile-booking-card-header {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  .mobile-booking-card-header strong {
    color: #111111;
    font-size: 1.18rem;
    font-weight: 600;
    line-height: 1.05;
  }

  .mobile-booking-card-header span {
    color: #6f7078;
    font-size: 0.98rem;
    line-height: 1.15;
  }

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

  .mobile-weekday-option-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mobile-option-toggle {
    display: grid;
    gap: 4px;
    min-width: 0;
    min-height: 54px;
    padding: 10px 12px;
    border: 1px solid #dddde3;
    border-radius: 8px;
    background: #f4f4f7;
    color: var(--mobile-purple);
    font: inherit;
    text-align: left;
  }

  .mobile-option-toggle strong,
  .mobile-option-toggle span {
    overflow: hidden;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-option-toggle strong {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.05;
  }

  .mobile-option-toggle span {
    color: #767680;
    font-size: 0.86rem;
    line-height: 1.05;
  }

  .mobile-option-toggle.is-active {
    border-color: rgba(236, 102, 92, 0.58);
    background: #fff7f6;
    color: var(--mobile-coral);
  }

  .mobile-year-divider {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    margin: 0 0 12px 66px;
    color: #89898e;
    font-size: 1.15rem;
    line-height: 1;
  }

  .mobile-year-divider::before,
  .mobile-year-divider::after {
    content: "";
    height: 1px;
    background: #96969a;
  }

  .mobile-request-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    margin-bottom: 9px;
  }

  .mobile-request-date {
    display: grid;
    justify-items: end;
    padding-top: 12px;
    color: #111111;
    line-height: 1.05;
  }

  .mobile-request-date strong,
  .mobile-request-date span {
    font-size: 1rem;
    font-weight: 400;
  }

  .mobile-request-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    min-width: 0;
    min-height: 62px;
    padding: 10px 42px 10px 12px;
    border: 0;
    border-radius: 4px;
    background: #e8e8ea;
    color: #38383d;
    font: inherit;
    text-align: left;
  }

  .mobile-request-card.has-status {
    min-height: 78px;
  }

  .mobile-request-card strong,
  .mobile-request-card span:not(.mobile-nav-icon) {
    overflow: hidden;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-request-card strong {
    grid-column: 1 / -1;
    font-size: 1.22rem;
    font-weight: 600;
    line-height: 1.05;
  }

  .mobile-request-card span {
    color: #4c4c50;
    font-size: 1.05rem;
    line-height: 1.05;
  }

  .mobile-request-provider {
    justify-self: end;
  }

  .mobile-request-status {
    grid-column: 1 / -1;
    justify-self: start;
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f4f4f7;
    color: #5c5c64;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
  }

  .mobile-request-status.is-pending {
    background: #fff7f6;
    color: var(--mobile-coral);
  }

  .mobile-request-status.is-accepted {
    background: #edf7f1;
    color: #236a45;
  }

  .mobile-request-status.is-declined {
    background: #f4eeee;
    color: #8a3b3b;
  }

  .mobile-request-card-icon {
    position: absolute;
    top: 14px;
    right: 12px;
    width: 23px;
    height: 23px;
    color: #000000;
  }

  .mobile-client-list,
  .mobile-message-list {
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
  }

  .mobile-client-profile-page {
    display: grid;
    align-content: start;
    gap: 12px;
    padding-bottom: calc(120px + env(safe-area-inset-bottom));
  }

  .mobile-client-profile-header {
    position: sticky;
    top: 0;
    z-index: 4;
    margin: -18px 0 0;
    padding: calc(18px + env(safe-area-inset-top)) 0 10px;
    background: var(--mobile-page-bg);
  }

  .mobile-client-profile-header .mobile-text-button {
    color: var(--mobile-coral);
    font-size: 1.18rem;
    font-weight: 600;
  }

  .mobile-client-profile-hero,
  .mobile-client-profile-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid #e1e1e6;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(23, 18, 35, 0.05);
  }

  .mobile-client-profile-hero {
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    background: linear-gradient(135deg, #fff8f6, #ffffff 68%);
  }

  .mobile-client-profile-avatar {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--mobile-coral);
    color: #ffffff;
    font-size: 1.55rem;
    font-weight: 700;
  }

  .mobile-client-profile-hero-text {
    min-width: 0;
  }

  .mobile-client-profile-hero h1 {
    margin: 0;
    overflow: hidden;
    color: var(--mobile-purple);
    font-size: 1.45rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-client-profile-hero p {
    margin: 5px 0 0;
    color: #6f7078;
    font-size: 0.86rem;
    line-height: 1.35;
  }

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

  .mobile-client-profile-action {
    min-height: 46px;
    padding: 8px 10px;
    border: 1px solid #d7d7de;
    border-radius: 11px;
    background: #ffffff;
    color: var(--mobile-purple);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
  }

  .mobile-client-profile-action.is-primary {
    grid-column: 1 / -1;
    border-color: var(--mobile-coral);
    background: var(--mobile-coral);
    color: #ffffff;
  }

  .mobile-client-profile-action.is-featured-active {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #b45309;
  }

  .mobile-client-profile-card-heading {
    margin: 0;
    color: var(--mobile-purple);
    font-size: 1.05rem;
    font-weight: 700;
  }

  .mobile-client-profile-grid,
  .mobile-client-profile-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .mobile-client-profile-value,
  .mobile-client-profile-stat {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 10px;
    border-radius: 10px;
    background: #f7f7f9;
  }

  .mobile-client-profile-value.is-wide {
    grid-column: 1 / -1;
  }

  .mobile-client-profile-label,
  .mobile-client-profile-stat span {
    color: #777884;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .mobile-client-profile-value-text,
  .mobile-client-profile-stat strong {
    overflow-wrap: anywhere;
    color: #23232a;
    font-size: 0.92rem;
    line-height: 1.3;
  }

  .mobile-client-profile-value-text[href] {
    color: var(--mobile-coral);
    text-decoration: none;
  }

  .mobile-client-profile-note-list,
  .mobile-client-profile-appointment-list {
    display: grid;
    gap: 8px;
  }

  .mobile-client-profile-note {
    display: grid;
    gap: 4px;
    padding: 10px;
    border-radius: 10px;
    background: #f7f7f9;
  }

  .mobile-client-profile-note strong {
    color: var(--mobile-purple);
    font-size: 0.84rem;
  }

  .mobile-client-profile-note p {
    margin: 0;
    color: #484952;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre-wrap;
  }

  .mobile-client-profile-appointment {
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid #dedee4;
    border-radius: 10px;
    background: #ffffff;
    color: var(--mobile-purple);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
  }

  .mobile-client-list.is-merge-selecting {
    border: 1px solid #d8d8df;
  }

  .mobile-client-row,
  .mobile-message-row {
    display: grid;
    align-items: center;
    width: 100%;
    min-width: 0;
    min-height: 76px;
    border: 0;
    border-bottom: 1px solid #dedee2;
    border-radius: 0;
    background: #ffffff;
    color: #111111;
    font: inherit;
    text-align: left;
  }

  .mobile-client-row {
    grid-template-columns: 72px minmax(0, 1fr);
    padding: 10px 14px 10px 12px;
  }

  .mobile-client-row.is-merge-selectable {
    grid-template-columns: 34px 58px minmax(0, 1fr);
    min-height: 70px;
    padding-left: 10px;
  }

  .mobile-client-row.is-merge-selected {
    background: #f6f8ff;
  }

  .mobile-merge-checkbox {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 1.5px solid #9b9ca6;
    border-radius: 6px;
    background: #ffffff;
  }

  .mobile-client-row.is-merge-selected .mobile-merge-checkbox {
    border-color: var(--mobile-coral);
    background: var(--mobile-coral);
  }

  .mobile-client-row.is-merge-selected .mobile-merge-checkbox::after {
    content: "";
    width: 6px;
    height: 11px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
  }

  .mobile-text-button.is-active {
    color: var(--mobile-coral);
    font-weight: 700;
  }

  .mobile-client-merge-page {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background: #f8fafc;
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .mobile-merge-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .mobile-merge-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
  }

  .mobile-merge-hero {
    padding: 16px 16px 12px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
  }

  .mobile-merge-hero h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px;
  }

  .mobile-merge-hero p {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
    margin: 0;
  }

  .mobile-merge-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
  }

  .mobile-merge-client-card {
    display: block;
    width: 100%;
    text-align: left;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  }

  .mobile-merge-client-card:active {
    transform: scale(0.99);
  }

  .mobile-merge-client-card.is-primary {
    border-color: #2563eb;
    background: #f0f7ff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.15);
  }

  .mobile-merge-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
  }

  .mobile-merge-radio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    background: #ffffff;
    flex-shrink: 0;
    transition: all 0.15s ease;
  }

  .mobile-merge-radio.is-checked {
    border-color: #2563eb;
    background: #2563eb;
  }

  .mobile-merge-radio.is-checked::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
  }

  .mobile-merge-name-block {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
  }

  .mobile-merge-name-block strong {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-merge-primary-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 2px 8px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 700;
  }

  .mobile-merge-secondary-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 600;
  }

  .mobile-merge-details-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
  }

  .mobile-merge-client-card.is-primary .mobile-merge-details-grid {
    border-top-color: #e2e8f0;
  }

  .mobile-merge-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.85rem;
    gap: 12px;
  }

  .mobile-merge-detail-label {
    color: #64748b;
    font-weight: 500;
    flex-shrink: 0;
  }

  .mobile-merge-detail-value {
    color: #0f172a;
    font-weight: 600;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-merge-actions {
    padding: 8px 16px 16px;
    margin-top: auto;
  }

  .mobile-merge-confirm-btn {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 18px;
    background: #0f172a;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 14px;
    border: 0;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
    transition: background 0.15s ease, transform 0.1s ease;
  }

  .mobile-merge-confirm-btn:active {
    background: #1e293b;
    transform: scale(0.99);
  }

  .mobile-merge-confirm-btn:disabled {
    cursor: default;
    opacity: 0.55;
  }

  .mobile-message-row {
    grid-template-columns: 74px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 12px 14px 12px 12px;
  }

  .mobile-client-row:last-child,
  .mobile-message-row:last-child {
    border-bottom: 0;
  }

  .mobile-avatar {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1.5px solid #e26b66;
    border-radius: 50%;
    color: #e26b66;
    font-size: 1.42rem;
    font-weight: 400;
    line-height: 1;
  }

  .mobile-row-text {
    display: grid;
    min-width: 0;
    gap: 5px;
  }

  .mobile-row-text strong,
  .mobile-row-text span {
    overflow: hidden;
    min-width: 0;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-row-text strong {
    color: #080808;
    font-size: 1.38rem;
    font-weight: 700;
  }

  .mobile-row-text span {
    color: #111111;
    font-size: 1.02rem;
    font-weight: 400;
  }

  .mobile-row-text strong .mobile-client-star {
    color: #f59e0b;
    font-size: 0.9em;
    vertical-align: middle;
    margin-left: 4px;
    display: inline-block;
  }

  .mobile-row-text strong .mobile-client-biz-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
  }

  .mobile-row-date {
    align-self: center;
    color: #111111;
    font-size: 0.98rem;
    white-space: nowrap;
  }

  .mobile-texting-notice-banner {
    display: grid;
    gap: 14px;
    padding: 16px;
    margin: 4px 0 16px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #ded9e8;
    box-shadow: 0 3px 12px rgba(33, 19, 61, 0.04);
    font-size: 0.82rem;
  }

  .mobile-texting-notice-banner.in-thread {
    margin: 12px 0;
  }

  .mobile-texting-notice-banner .notice-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f0edf7;
    color: var(--mobile-purple, #21133d);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .mobile-texting-notice-banner .notice-copy {
    margin: 0;
    color: #475569;
    font-weight: 500;
    font-size: 0.75rem;
    line-height: 1.45;
  }

  .mobile-texting-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-texting-progress-header h3 {
    margin: 6px 0 0;
    color: var(--mobile-purple, #21133d);
    font-size: 1rem;
    font-weight: 750;
  }

  .mobile-texting-progress-status {
    display: grid;
    gap: 2px;
    flex-shrink: 0;
    text-align: right;
  }

  .mobile-texting-progress-status strong {
    color: var(--mobile-coral, #ec665c);
    font-size: 1.8rem;
    line-height: 1;
    letter-spacing: -0.04em;
  }

  .mobile-texting-progress-status > span {
    color: #64748b;
    font-size: 0.66rem;
    font-weight: 600;
  }

  .mobile-texting-progress-stages {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }

  .mobile-texting-progress-stage {
    display: grid;
    gap: 7px;
    min-width: 0;
  }

  .mobile-texting-progress-track {
    display: block;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #edeaf2;
  }

  .mobile-texting-progress-track > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--mobile-coral, #ec665c);
  }

  .mobile-texting-progress-label {
    color: #64748b;
    font-size: clamp(0.58rem, 2.6vw, 0.64rem);
    font-weight: 600;
    text-align: center;
  }

  .mobile-texting-progress-stage.is-current .mobile-texting-progress-label {
    color: var(--mobile-purple, #21133d);
    font-weight: 750;
  }

  .mobile-row-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-message-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--mobile-coral, #ea580c);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
  }

  .mobile-thread-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .mobile-thread-back-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    border: 0;
    background: transparent;
    color: var(--mobile-coral, #ea580c);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
  }

  .mobile-thread-back-button .back-arrow {
    font-size: 1.4rem;
    line-height: 1;
  }

  .mobile-thread-contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .mobile-thread-contact-info .mobile-avatar {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
    margin-bottom: 2px;
  }

  .mobile-thread-contact-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
  }

  .mobile-thread-contact-sub {
    font-size: 0.76rem;
    color: #64748b;
  }

  .mobile-thread-profile-button {
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
  }

  .mobile-chat-container {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 14px calc(72px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .mobile-chat-bubble-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }

  .mobile-chat-bubble-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .mobile-chat-time {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 500;
  }

  .mobile-chat-status-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.04em;
    background: #f1f5f9;
    color: #475569;
  }

  .mobile-chat-status-badge.is-confirmed {
    background: #ecfdf5;
    color: #047857;
  }

  .mobile-chat-status-badge.is-completed {
    background: #eff6ff;
    color: #1d4ed8;
  }

  .mobile-chat-status-badge.is-cancelled {
    background: #fef2f2;
    color: #b91c1c;
  }

  .mobile-chat-status-badge.is-requested,
  .mobile-chat-status-badge.is-pending {
    background: #fffbeb;
    color: #b45309;
  }

  .mobile-chat-message-text {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.45;
    color: #1e293b;
  }

  .mobile-chat-service-info {
    font-size: 0.8rem;
    color: #64748b;
    background: #f8fafc;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #edf2f7;
  }

  .mobile-chat-action-btn {
    align-self: flex-start;
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #2563eb;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
  }

  .mobile-chat-action-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
  }

  .mobile-chat-footer-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 105;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  }

  .mobile-chat-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 4px 6px 4px 14px;
  }

  .mobile-chat-input {
    flex: 1;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 0.84rem;
    color: #64748b;
    outline: none;
  }

  .mobile-chat-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 0;
    background: #cbd5e1;
    color: #ffffff;
    cursor: not-allowed;
    flex-shrink: 0;
  }

  .mobile-page-fab {
    position: fixed;
    right: 18px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    z-index: 104;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 50%;
    background: var(--mobile-coral);
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(100, 42, 39, 0.3);
  }

  .mobile-page-fab .mobile-nav-icon {
    width: 31px;
    height: 31px;
  }

  .mobile-more-page {
    display: grid;
    align-content: start;
    gap: 22px;
    padding-inline: 18px;
  }

  .mobile-more-header {
    display: flex;
    justify-content: flex-end;
    min-height: 42px;
  }

  .mobile-more-header .mobile-text-button {
    color: #141020;
    font-size: 1.35rem;
  }

  .mobile-more-list {
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
  }

  .mobile-more-row {
    position: relative;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 28px;
    align-items: center;
    min-height: 48px;
    padding: 0 16px 0 18px;
    border: 0;
    border-bottom: 1px solid #dedee2;
    background: #ffffff;
    color: #111111;
    font: inherit;
    text-align: left;
  }

  .mobile-more-row:last-child {
    border-bottom: 0;
  }

  .mobile-more-row .mobile-nav-icon {
    width: 27px;
    height: 27px;
    color: #56575b;
  }

  .mobile-more-row span:not(.mobile-nav-icon) {
    overflow: hidden;
    min-width: 0;
    font-size: 1.34rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-more-row::after {
    content: "›";
    justify-self: end;
    color: #bebfc4;
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
  }

  .mobile-more-footer {
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 2px 0 0;
    color: #3d3d42;
    font-style: italic;
    text-align: center;
  }

  .mobile-more-footer p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.28;
  }

  .mobile-more-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
    margin: 22px 0 32px;
    font-style: normal;
  }

  .mobile-more-links .mobile-text-button {
    min-height: 28px;
    padding: 0;
    color: var(--mobile-coral);
    text-decoration: underline;
  }

  .mobile-logout-button {
    width: 100%;
    min-height: 66px;
    border: 0;
    border-radius: 8px;
    background: #ffffff;
    color: var(--mobile-coral);
    font: inherit;
    font-size: 1.35rem;
    font-style: normal;
  }

  .mobile-empty-state {
    min-height: 86px;
    padding: 28px 18px;
    border-radius: 8px;
    background: #ffffff;
    color: #5f6068;
    font-size: 1rem;
    text-align: center;
  }

  .mobile-employees-header .mobile-text-button {
    color: var(--mobile-coral);
    font-size: 1.2rem;
    font-weight: 600;
  }

  .mobile-employee-editor-page {
    display: grid;
    align-content: start;
    gap: 16px;
    padding-bottom: calc(120px + env(safe-area-inset-bottom));
  }

  .mobile-editor-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 4px 0 6px;
  }

  .mobile-editor-header .mobile-text-button {
    padding: 0;
    color: var(--mobile-coral);
    font-size: 1.18rem;
    font-weight: 600;
  }

  .mobile-editor-header h2 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    text-align: right;
  }

  /* Mobile Employee Page Picker (Green Circle Area) */
  .mobile-employee-page-picker {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
    padding: 3px;
    border-radius: 10px;
    background: #dedee3;
    user-select: none;
    margin-bottom: 2px;
  }

  .mobile-employee-page-picker .mobile-segment-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 3px 2px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    color: var(--mobile-purple);
    transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
  }

  .mobile-employee-page-picker .mobile-segment-button .seg-line-1 {
    font-size: 0.70rem;
    font-weight: 500;
    opacity: 0.8;
  }

  .mobile-employee-page-picker .mobile-segment-button .seg-line-2 {
    font-size: 0.80rem;
    font-weight: 700;
  }

  .mobile-employee-page-picker .mobile-segment-button.is-active {
    background: #ffffff;
    color: var(--mobile-coral);
    box-shadow: 0 1px 4px rgba(23, 18, 35, 0.16);
  }

  .mobile-employee-page-picker .mobile-segment-button.is-active .seg-line-1 {
    opacity: 1;
    color: var(--mobile-coral);
  }

  .mobile-editor-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
  }

  .mobile-editor-notice.is-error {
    background: #fde8e8;
    color: #c0392b;
    border: 1px solid #f8b4b4;
  }

  .mobile-editor-notice.is-warning {
    background: #fff8e6;
    color: #9c6800;
    border: 1px solid #f3d18c;
  }

  .mobile-editor-notice.is-success {
    background: #e4f7ed;
    color: #12793e;
    border: 1px solid #a7e3c1;
  }

  /* Animated Pages Viewport & Track */
  .mobile-employee-pages-viewport {
    width: 100%;
    overflow: hidden;
    transition: height 240ms cubic-bezier(0.25, 1, 0.5, 1);
  }

  .mobile-employee-page-track {
    display: flex;
    width: 400%;
    transition: transform 280ms cubic-bezier(0.25, 1, 0.5, 1);
    align-items: flex-start;
  }

  .mobile-employee-page-panel {
    width: 25%;
    flex: 0 0 25%;
    min-width: 0;
    box-sizing: border-box;
    padding-inline: 1px;
  }

  /* Tightened / Shrunk Employee Info Form for Page 1 */
  .mobile-employee-form {
    display: grid;
    gap: 9px;
  }

  .mobile-employee-form .mobile-field {
    display: grid;
    gap: 3px;
  }

  .mobile-employee-form .mobile-field-label {
    color: var(--mobile-purple);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: -0.01em;
  }

  .mobile-employee-form .mobile-field input,
  .mobile-employee-form .mobile-field select {
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid #ccd0d8;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #ffffff;
  }

  .mobile-employee-form .mobile-field textarea {
    min-height: 60px;
    padding: 6px 10px;
    border: 1px solid #ccd0d8;
    border-radius: 8px;
    font-size: 0.93rem;
    line-height: 1.35;
    background: #ffffff;
    resize: vertical;
  }

  .mobile-checkbox-field {
    display: flex !important;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid #ccd0d8;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
  }

  .mobile-checkbox-field input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    min-height: 20px !important;
    margin: 0;
    accent-color: #2d6a4f;
    cursor: pointer;
  }

  .mobile-checkbox-field span {
    font-size: 0.95rem;
    font-weight: 600;
    color: #222222;
  }

  .mobile-form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }

  /* Page 2: Employee Options - Active Employee Toggle Card */
  .mobile-option-card {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid #dcdde3;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(23, 18, 35, 0.05);
  }

  .mobile-option-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-option-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .mobile-option-title {
    margin: 0;
    color: var(--mobile-purple);
    font-size: 1.05rem;
    font-weight: 700;
  }

  .mobile-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: background 180ms ease, color 180ms ease;
  }

  .mobile-status-pill.is-active {
    background: #e4f7ed;
    color: #12793e;
  }

  .mobile-status-pill.is-inactive {
    background: #f1f1f4;
    color: #727480;
  }

  .mobile-option-desc {
    margin: 0;
    color: #5d606f;
    font-size: 0.88rem;
    line-height: 1.4;
  }

  .mobile-option-block-notice {
    margin: 0;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fff8e6;
    border: 1px solid #f3d18c;
    color: #9c6800;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
  }

  /* iOS-style toggle switch check button */
  .mobile-toggle-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
  }

  .mobile-toggle-track {
    width: 50px;
    height: 30px;
    border-radius: 999px;
    background: #d1d1d6;
    transition: background 220ms ease;
    display: flex;
    align-items: center;
    padding: 2px;
    box-sizing: border-box;
  }

  .mobile-toggle-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.22);
    transition: transform 220ms cubic-bezier(0.2, 0.9, 0.3, 1);
  }

  .mobile-toggle-input:checked + .mobile-toggle-track {
    background: var(--mobile-coral);
  }

  .mobile-toggle-input:checked + .mobile-toggle-track .mobile-toggle-thumb {
    transform: translateX(20px);
  }

  .mobile-toggle-input:focus-visible + .mobile-toggle-track {
    outline: 2px solid var(--mobile-purple);
    outline-offset: 2px;
  }

  /* Placeholders for Pages 3 & 4 */
  .mobile-section-placeholder-card {
    display: grid;
    gap: 8px;
    padding: 20px 16px;
    border: 1px dashed #ccd0d8;
    border-radius: 12px;
    background: #ffffff;
    text-align: center;
  }

  .mobile-placeholder-badge {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f0edf8;
    color: var(--mobile-purple);
    font-size: 0.76rem;
    font-weight: 700;
  }

  .mobile-section-placeholder-card h3 {
    margin: 0;
    color: var(--mobile-purple);
    font-size: 1.02rem;
    font-weight: 700;
  }

  .mobile-section-placeholder-card p {
    margin: 0;
    color: #6d7080;
    font-size: 0.86rem;
    line-height: 1.4;
  }

  .mobile-form {
    display: grid;
    gap: 14px;
  }

  .mobile-field {
    display: grid;
    gap: 6px;
  }

  .mobile-field-label {
    color: var(--mobile-purple);
    font-size: 1.02rem;
    font-weight: 700;
  }

  .mobile-field input,
  .mobile-field select,
  .mobile-field textarea {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid #ccd0d8;
    border-radius: 10px;
    background: #ffffff;
    color: #111111;
    font: inherit;
    font-size: 1.05rem;
  }

  .mobile-field textarea {
    min-height: 110px;
    line-height: 1.4;
    resize: vertical;
  }

  .mobile-field input:focus,
  .mobile-field select:focus,
  .mobile-field textarea:focus {
    border-color: var(--mobile-coral);
    outline: 2px solid var(--mobile-coral);
    outline-offset: 1px;
  }

  .mobile-form-actions {
    position: relative;
    z-index: 10;
    display: grid;
    gap: 10px;
    margin-top: 4px;
  }

  .mobile-primary-button {
    min-height: 52px;
    border: 0;
    border-radius: 12px;
    background: var(--mobile-coral);
    color: #ffffff;
    font: inherit;
    font-size: 1.12rem;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform 120ms ease, opacity 120ms ease, filter 120ms ease;
  }

  .mobile-primary-button[aria-disabled="true"] {
    opacity: 0.65;
  }

  .mobile-primary-button:active:not(:disabled) {
    transform: scale(0.98);
    filter: brightness(0.95);
  }

  .mobile-danger-button {
    min-height: 50px;
    border: 1.5px solid #d9534f;
    border-radius: 12px;
    background: #ffffff;
    color: #c0392b;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform 120ms ease, opacity 120ms ease, filter 120ms ease;
  }

  .mobile-danger-button:active:not(:disabled) {
    transform: scale(0.98);
    background: #fff5f5;
  }

  .mobile-primary-button:disabled,
  .mobile-danger-button:disabled,
  .mobile-page-fab:disabled,
  .mobile-text-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .mobile-form-note {
    margin: 0;
    color: #6a6b73;
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .mobile-schedule-shell > .mobile-command-bar {
    display: none;
  }

  .mobile-schedule-hero {
    flex: 0 0 auto;
    position: sticky;
    top: 0;
    z-index: 80;
    display: grid;
    gap: 6px;
    padding: calc(12px + env(safe-area-inset-top)) 18px 6px;
    border-bottom: 1px solid #e0e1e6;
    background: #ffffff;
    box-shadow: 0 1px 8px rgba(30, 24, 46, 0.08);
    overscroll-behavior: none;
  }

  .mobile-date-toolbar {
    display: grid;
    grid-template-columns: 28px max-content 28px minmax(8px, 1fr) 32px 32px 32px;
    gap: 4px;
    align-items: center;
  }

  .mobile-date-toolbar-spacer {
    min-width: 0;
  }

  .mobile-date-title-button,
  .mobile-date-nav,
  .mobile-icon-button,
  .mobile-calendar-arrow {
    min-width: 0;
    min-height: 34px;
    border: 0;
    background: transparent;
    color: var(--mobile-purple);
    font: inherit;
    cursor: pointer;
  }

  .mobile-date-title-button {
    overflow: hidden;
    padding: 0 2px;
    color: var(--mobile-purple);
    font-size: 1.65rem;
    font-weight: 400;
    line-height: 1.05;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-date-nav,
  .mobile-icon-button,
  .mobile-calendar-arrow {
    display: grid;
    place-items: center;
  }

  .mobile-nav-icon {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    color: currentColor;
  }

  .mobile-nav-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.25;
  }

  .mobile-schedule-mode {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-self: center;
    width: min(58vw, 280px);
    max-width: 100%;
    min-height: 36px;
    padding: 3px;
    border-radius: 10px;
    background: linear-gradient(180deg, #f0f0f3, #e3e3e7);
    color: #000000;
  }

  .mobile-chip {
    min-height: 30px;
    border: 0;
    border-right: 1px solid #c9cbd2;
    border-radius: 0;
    background: transparent;
    color: #000000;
    font: inherit;
    font-size: 0.98rem;
    font-weight: 500;
    text-align: center;
  }

  .mobile-chip:last-child {
    border-right: 0;
  }

  .mobile-chip.is-active {
    border-right-color: transparent;
    border-radius: 8px;
    background: #ffffff;
    color: var(--mobile-coral);
    box-shadow: 0 2px 8px rgba(30, 24, 46, 0.18);
  }

  .mobile-day-marker {
    display: grid;
    justify-items: center;
    gap: 0;
    color: var(--mobile-coral);
    font-size: 0.92rem;
    line-height: 1;
  }

  .mobile-day-marker strong {
    font-size: 1rem;
    font-weight: 500;
  }

  .mobile-move-banner {
    flex: 0 0 auto;
    z-index: 65;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    padding: 10px 14px;
    border-bottom: 1px solid #dec683;
    background: #fff2c5;
    color: #5b430f;
    font-size: 0.88rem;
    font-weight: 700;
  }

  .mobile-inline-button {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #c9a64d;
    border-radius: 8px;
    background: #fffdf7;
    color: #5b430f;
    font: inherit;
  }

  .mobile-provider-strip,
  .mobile-edge-button {
    display: none;
  }

  .mobile-schedule-content {
    flex: 1 1 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: none;
    overscroll-behavior-x: none;
    overscroll-behavior-y: none;
    touch-action: pan-x pan-y;
    background: #ffffff;
  }

  .mobile-day-board {
    position: relative;
    display: grid;
    grid-template-columns: 56px repeat(var(--mobile-provider-count), minmax(128px, 1fr));
    grid-template-rows: 34px repeat(var(--mobile-slot-count), var(--mobile-slot-height, 18px));
    width: max(100%, calc(56px + (var(--mobile-provider-count) * 128px)));
    min-height: 100%;
    background: #ffffff;
  }

  .mobile-time-rail-current-time {
    position: sticky;
    left: 0;
    z-index: 30;
  }

  .mobile-grid-corner,
  .mobile-provider-header {
    position: sticky;
    top: 0;
    z-index: 35;
    display: grid;
    place-items: center;
    min-width: 0;
    border-right: 1px solid var(--mobile-grid-line);
    border-bottom: 1px solid var(--mobile-grid-line);
    background: #ffffff;
    color: #222222;
    font-size: 0.84rem;
    font-weight: 700;
  }

  .mobile-grid-corner {
    left: 0;
    z-index: 40;
  }

  .mobile-grid-time {
    position: sticky;
    left: 0;
    z-index: 25;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 2px 6px 0 2px;
    border-right: 1px solid var(--mobile-grid-line);
    background: #ffffff;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.01em;
  }

  .mobile-grid-slot {
    min-height: 0;
    border: 0;
    border-right: 1px solid #eceef2;
    border-top: 1px solid #edf0f4;
    border-radius: 0;
    background: transparent;
    color: transparent;
    font: inherit;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }

  body.is-mobile-timeblock-dragging .mobile-grid-slot {
    touch-action: none;
  }

  .mobile-grid-slot.is-hour-start {
    border-top: 2px solid #9aa2ad;
  }

  .mobile-grid-slot.is-day-end {
    border-bottom: 2px solid #9aa2ad;
  }

  .mobile-grid-slot.is-quarter-start {
    border-top-color: #e3e7ee;
  }

  .mobile-grid-time-end {
    align-items: flex-end;
    padding-top: 0;
    padding-bottom: 2px;
    border-top: 0;
    border-bottom: 1px solid var(--mobile-grid-line);
  }

  .mobile-schedule-off-block {
    z-index: 12;
    display: grid;
    place-items: center;
    min-height: 0;
    margin: 1px 2px;
    padding: 2px 3px;
    overflow: hidden;
    border: 1px solid rgba(135, 150, 170, 0.42);
    border-radius: 4px;
    background: rgba(198, 207, 218, 0.78);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    color: transparent;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.05;
    pointer-events: none;
    text-align: center;
  }

  .mobile-schedule-off-block span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-grid-slot.is-mobile-timeblock-preview {
    background: rgba(45, 106, 79, 0.32) !important;
    box-shadow: inset 0 0 0 1.5px #2d6a4f !important;
  }

  .mobile-grid-slot.is-mobile-timeblock-anchor {
    background: #2d6a4f !important;
    box-shadow: inset 0 0 0 2px #1b4332 !important;
  }

  body.is-mobile-timeblock-dragging .mobile-schedule-content {
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
  }

  .mobile-week-board,
  .mobile-month-board {
    min-width: max-content;
  }

  .mobile-week-corner,
  .mobile-month-corner {
    top: 0;
  }

  .mobile-week-day-header,
  .mobile-month-day-header {
    position: sticky;
    top: 0;
    z-index: 38;
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 28px;
    padding: 0 4px;
    border: 0;
    border-right: 1px solid var(--mobile-grid-line);
    border-bottom: 1px solid var(--mobile-grid-line);
    background: #ffffff;
    color: #222222;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
  }

  .mobile-week-day-header.is-selected,
  .mobile-month-day-header.is-selected {
    color: var(--mobile-coral);
  }

  .mobile-week-board .mobile-provider-header,
  .mobile-month-board .mobile-provider-header {
    top: 28px;
  }

  .mobile-grid-slot:hover,
  .mobile-grid-slot:focus-visible {
    background: rgba(45, 106, 79, 0.08);
  }

  .mobile-grid-slot:active {
    background: rgba(45, 106, 79, 0.22) !important;
  }

  .mobile-grid-slot.is-holding-slot {
    position: relative;
    background: rgba(45, 106, 79, 0.28) !important;
    box-shadow: inset 0 0 0 2px #2d6a4f !important;
    animation: pulse-holding-slot 0.4s ease-in-out infinite alternate;
  }

  @keyframes pulse-holding-slot {
    from {
      background: rgba(45, 106, 79, 0.22);
    }
    to {
      background: rgba(45, 106, 79, 0.48);
    }
  }

  .mobile-grid-slot.is-slot-selected {
    position: relative;
    background: #2d6a4f !important;
    box-shadow: inset 0 0 0 1.5px #1b4332 !important;
    color: #ffffff !important;
  }

  .mobile-grid-slot.is-slot-selected::after {
    content: "+";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  }

  .mobile-grid-slot.is-appointment-drop-target {
    background: rgba(45, 106, 79, 0.18) !important;
    box-shadow: inset 0 0 0 1px rgba(45, 106, 79, 0.45) !important;
    transition: background 0.08s ease, box-shadow 0.08s ease;
  }

  .mobile-grid-slot.is-appointment-drop-target-start {
    background: rgba(45, 106, 79, 0.28) !important;
    box-shadow: inset 0 2.5px 0 0 #2d6a4f, inset 0 0 0 1px rgba(45, 106, 79, 0.65) !important;
  }

  .mobile-schedule-item {
    display: grid;
    align-content: start;
    gap: 3px;
    width: calc(100% - 12px);
    min-width: 0;
    min-height: 0;
    margin: 1px 0 1px 2px;
    padding: 8px 8px 6px;
    border: 1px solid var(--mobile-card-border);
    border-radius: 4px;
    background: var(--mobile-card-blue);
    color: #41444a;
    font: inherit;
    text-align: left;
    overflow: hidden;
    touch-action: pan-x pan-y;
    user-select: none;
    -webkit-user-select: none;
    view-transition-class: schedule-appointment-block;
    transition:
      width 0.26s cubic-bezier(0.2, 0.9, 0.3, 1),
      margin-left 0.26s cubic-bezier(0.2, 0.9, 0.3, 1),
      box-shadow 0.18s ease,
      transform 0.15s ease,
      opacity 0.2s ease;
  }

  .mobile-day-board .mobile-schedule-item.tone-blue {
    border-color: #7d99d1;
    background: linear-gradient(#b8c8f6, #93adea);
    color: #1a2c3d;
  }

  .mobile-day-board .mobile-schedule-item.tone-blue span {
    color: #27425c;
  }

  .mobile-day-board .mobile-schedule-item.tone-green {
    border-color: #2f7a3d;
    background: linear-gradient(#7fd18d, #45a858);
    color: #0f2a14;
  }

  .mobile-day-board .mobile-schedule-item.tone-green strong {
    color: #0b220f;
  }

  .mobile-day-board .mobile-schedule-item.tone-green span {
    color: #12391a;
  }

  .mobile-day-board .mobile-schedule-item.tone-muted {
    border-color: #808080;
    background: linear-gradient(#c0c0c0, #acacac);
    color: #ffffff;
  }

  .mobile-day-board .mobile-schedule-item.tone-muted strong {
    color: #ffffff;
  }

  .mobile-day-board .mobile-schedule-item.tone-muted span {
    color: #f0f0f0;
  }

  .mobile-day-board .mobile-schedule-item.tone-red {
    border-color: #7f0303;
    background: linear-gradient(#b20e0e, #920707);
    color: #ffffff;
  }

  .mobile-day-board .mobile-schedule-item.tone-red strong {
    color: #ffffff;
  }

  .mobile-day-board .mobile-schedule-item.tone-red span {
    color: #fce8e8;
  }

  .mobile-day-board .mobile-schedule-item.tone-lime {
    border-color: #b1c73b;
    background: linear-gradient(#e8ef79, #b8da48);
    color: #2b3506;
  }

  .mobile-day-board .mobile-schedule-item.tone-lime span {
    color: #3b470b;
  }

  .mobile-day-board .mobile-schedule-item.tone-paper {
    border-color: #9fa3aa;
    background: linear-gradient(#f2f2f2, #d7d7d7);
    color: #2b2e34;
  }

  .mobile-schedule-item.is-overlapping,
  .mobile-schedule-buffer.is-overlapping {
    --overlap-gap: 3px;
    --schedule-lane-reserve-right: 10px;
    --overlap-available-width: calc(100% - 2px - var(--schedule-lane-reserve-right));
    --overlap-width: calc(
      (var(--overlap-available-width) - (var(--appointment-overlap-count) - 1) * var(--overlap-gap)) / var(--appointment-overlap-count)
    );
    z-index: calc(20 + var(--appointment-overlap-index));
    justify-self: start;
    width: var(--overlap-width);
    margin-left: calc(
      2px + var(--appointment-overlap-index) * (var(--overlap-width) + var(--overlap-gap))
    );
  }

  .mobile-schedule-item.is-holding-appointment {
    position: relative;
    box-shadow: 0 0 0 2px #2d6a4f, 0 4px 12px rgba(45, 106, 79, 0.35) !important;
    animation: pulse-holding-appointment 0.4s ease-in-out infinite alternate;
  }

  @keyframes pulse-holding-appointment {
    from {
      transform: scale(1);
      filter: brightness(1);
    }
    to {
      transform: scale(1.02);
      filter: brightness(1.08);
    }
  }

  .mobile-schedule-item.is-dragging {
    opacity: 0.35;
    pointer-events: none;
  }

  .mobile-schedule-item.is-double-book-target {
    box-shadow: 0 0 0 2px #2d6a4f, inset 0 0 0 1px rgba(255, 255, 255, 0.65), 0 3px 10px rgba(45, 106, 79, 0.35) !important;
    transform: scale(0.985);
    filter: brightness(1.04);
  }

  .mobile-appointment-drag-avatar {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    width: 140px;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1.5px solid #2d6a4f;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(45, 106, 79, 0.2);
    display: flex;
    flex-direction: column;
    gap: 1px;
    transform: scale(1.02);
    will-change: left, top;
  }

  .mobile-appointment-drag-avatar strong {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.15;
    color: #1c2e24;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-appointment-drag-avatar span {
    font-size: 0.72rem;
    line-height: 1.1;
    color: #4a5d52;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-appointment-drag-avatar.tone-green {
    border-color: #2f7a3d;
  }

  .mobile-appointment-drag-avatar.tone-muted {
    border-color: #808080;
  }

  .mobile-appointment-drag-avatar.tone-red {
    border-color: #7f0303;
  }

  .mobile-appointment-drag-avatar.tone-blue {
    border-color: #7d99d1;
  }

  body.is-mobile-appointment-dragging {
    user-select: none !important;
    -webkit-user-select: none !important;
  }

  .mobile-grid-entry {
    z-index: 20;
  }

  .mobile-schedule-buffer {
    z-index: 12;
    display: flex;
    align-items: center;
    min-width: 0;
    width: calc(100% - 12px);
    margin: 1px 0 1px 2px;
    padding: 4px 6px;
    overflow: hidden;
    border: 1px dashed #a5adb7;
    border-radius: 4px;
    background: repeating-linear-gradient(
      135deg,
      rgba(235, 239, 244, 0.92),
      rgba(235, 239, 244, 0.92) 6px,
      rgba(210, 219, 230, 0.92) 6px,
      rgba(210, 219, 230, 0.92) 12px
    );
    color: #4b5c70;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
    view-transition-class: schedule-appointment-block;
    transition:
      width 0.26s cubic-bezier(0.2, 0.9, 0.3, 1),
      margin-left 0.26s cubic-bezier(0.2, 0.9, 0.3, 1);
  }

  .mobile-schedule-item strong {
    overflow: hidden;
    font-size: clamp(1rem, 4.3vw, 1.2rem);
    font-weight: 700;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-schedule-item span {
    overflow: hidden;
    color: #42464c;
    font-size: clamp(0.9rem, 3.7vw, 1.05rem);
    font-weight: 400;
    line-height: 1.12;
    text-overflow: ellipsis;
  }

  .mobile-schedule-item.is-time-block {
    border-color: #b7b7b7;
    background:
      repeating-linear-gradient(135deg, rgba(160, 160, 160, 0.22) 0 8px, rgba(255, 255, 255, 0.58) 8px 18px),
      #f6f6f6;
  }

  .mobile-agenda,
  .mobile-date-list {
    display: grid;
    gap: 0;
    padding: 18px;
    background: #f6f7fb;
  }

  .mobile-date-card,
  .mobile-agenda .mobile-schedule-item {
    display: grid;
    gap: 3px;
    width: 100%;
    min-height: 72px;
    padding: 14px 16px;
    border: 0;
    border-bottom: 1px solid #d5d6dc;
    border-radius: 0;
    background: #ffffff;
    color: #111111;
    font: inherit;
    text-align: left;
  }

  .mobile-date-card:first-child,
  .mobile-agenda .mobile-schedule-item:first-child {
    border-radius: 12px 12px 0 0;
  }

  .mobile-date-card:last-child,
  .mobile-agenda .mobile-schedule-item:last-child {
    border-bottom: 0;
    border-radius: 0 0 12px 12px;
  }

  .mobile-agenda .mobile-schedule-item.tone-green {
    border-left: 4px solid #2f7a3d;
  }

  .mobile-agenda .mobile-schedule-item.tone-muted {
    border-left: 4px solid #808080;
  }

  .mobile-agenda .mobile-schedule-item.tone-red {
    border-left: 4px solid #7f0303;
  }

  .mobile-agenda .mobile-schedule-item.tone-blue {
    border-left: 4px solid #7d99d1;
  }

  .mobile-date-card.is-selected {
    color: var(--mobile-coral);
  }

  .mobile-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
    padding: 18px;
    background: #ffffff;
  }

  .mobile-month-day {
    justify-items: center;
    min-height: 54px;
    padding: 5px 2px;
    text-align: center;
  }

  .mobile-month-day strong {
    font-size: 1rem;
    line-height: 1.1;
  }

  .mobile-month-day span {
    font-size: 0.74rem;
    line-height: 1.1;
  }

  .mobile-date-card:disabled {
    opacity: 0.42;
  }

  .mobile-date-dots {
    color: var(--mobile-coral);
    min-height: 12px;
    letter-spacing: 0;
  }

  .mobile-bottom-sheet {
    position: fixed;
    inset: 0;
    z-index: 125;
    pointer-events: none;
    visibility: hidden;
  }

  .mobile-bottom-sheet.is-open {
    pointer-events: auto;
    visibility: visible;
  }

  .mobile-sheet-backdrop {
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.24s ease;
  }

  .mobile-bottom-sheet.is-open .mobile-sheet-backdrop {
    opacity: 1;
  }

  .mobile-sheet-card {
    border: 0;
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
    will-change: transform, opacity;
  }

  #mobile-calendar-sheet .mobile-sheet-card {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -46%) scale(0.96);
    opacity: 0;
    width: min(calc(100vw - 32px), 360px);
    max-height: min(90svh, 620px);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  }

  #mobile-calendar-sheet.is-open .mobile-sheet-card {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }

  #mobile-calendar-sheet .mobile-sheet-header {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 0;
    background: var(--mobile-purple);
    color: #ffffff;
  }

  #mobile-calendar-sheet .mobile-sheet-header > div {
    grid-column: 2;
    min-width: 0;
  }

  #mobile-calendar-sheet .mobile-sheet-eyebrow,
  #mobile-action-sheet .mobile-sheet-eyebrow,
  #mobile-action-sheet .mobile-sheet-summary {
    display: none;
  }

  .mobile-sheet-header h2 {
    margin: 0;
    color: inherit;
    font-size: clamp(1.55rem, 6vw, 2rem);
    font-weight: 400;
    line-height: 1.1;
  }

  .mobile-sheet-header .drawer-button {
    min-height: 36px;
    border: 0;
    background: transparent;
    color: currentColor;
    font: inherit;
  }

  #mobile-calendar-sheet .mobile-sheet-header h2 {
    overflow: hidden;
    font-size: clamp(1rem, 4.2vw, 1.22rem);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #mobile-calendar-sheet .mobile-sheet-header .drawer-button {
    grid-column: 1;
    grid-row: 1;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    background: transparent;
    box-shadow: none;
    font-size: 0;
  }

  #mobile-calendar-sheet .mobile-sheet-header .drawer-button::before {
    content: "<";
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1;
  }

  .mobile-calendar-list {
    display: grid;
    gap: 0;
    min-height: 0;
    padding: 0;
    overflow: auto;
  }

  .mobile-calendar-month-row,
  .mobile-calendar-week-count {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    align-items: center;
    min-height: 56px;
    padding: 0 18px;
    color: #000000;
    font-size: clamp(1.25rem, 5vw, 1.55rem);
    text-align: center;
  }

  .mobile-calendar-weekdays,
  .mobile-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    text-align: center;
  }

  .mobile-calendar-weekdays {
    padding: 10px 14px 4px;
    color: #444444;
    font-size: 0.95rem;
    font-weight: 600;
  }

  .mobile-calendar-grid {
    gap: 4px 2px;
    padding: 6px 12px 10px;
  }

  .mobile-calendar-day {
    aspect-ratio: 1;
    max-width: 40px;
    justify-self: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #111111;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 500;
  }

  .mobile-calendar-day.is-today {
    background: rgba(255, 238, 140, 0.62);
    color: #111111;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(218, 165, 32, 0.45);
  }

  .mobile-calendar-day.is-selected {
    background: var(--mobile-coral);
    color: #ffffff;
  }

  .mobile-calendar-day.is-today.is-selected {
    background: var(--mobile-coral);
    color: #ffffff;
    box-shadow: none;
  }

  .mobile-calendar-day.is-muted {
    color: transparent;
    pointer-events: none;
  }

  .mobile-calendar-week-count {
    grid-template-columns: repeat(9, minmax(0, 0.75fr)) minmax(42px, 1.35fr);
    min-height: 38px;
    padding: 0 12px;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    color: #666666;
    font-size: 0.82rem;
  }

  .mobile-calendar-week-btn {
    border: 0;
    background: transparent;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 8px;
    padding: 6px 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
    touch-action: manipulation;
  }

  .mobile-calendar-week-btn:active {
    background: var(--mobile-coral);
    color: #ffffff;
    transform: scale(0.92);
  }

  .mobile-calendar-select {
    justify-self: center;
    width: calc(100% - 32px);
    max-width: 310px;
    min-height: 48px;
    margin: 12px 16px 16px;
    border: 0;
    border-radius: 12px;
    background: var(--mobile-coral);
    color: #ffffff;
    font: inherit;
    font-size: 1.15rem;
    font-weight: 600;
  }

  #mobile-action-sheet .mobile-sheet-card {
    top: auto;
    right: 12px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    left: auto;
    width: min(290px, calc(100vw - 24px));
    max-height: min(76svh, 490px);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(33, 19, 61, 0.12);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(24, 18, 42, 0.28), 0 3px 10px rgba(24, 18, 42, 0.08);
    overflow: hidden;
    transform: translateX(calc(100% + 24px)) scale(0.96);
    opacity: 0;
    transition: transform 0.26s cubic-bezier(0.32, 0, 0.67, 0), opacity 0.2s ease;
  }

  #mobile-action-sheet.is-open .mobile-sheet-card {
    transform: translateX(0) scale(1);
    opacity: 1;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
  }

  #mobile-action-sheet .mobile-sheet-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px;
    align-items: start;
    gap: 10px;
    padding: 12px 14px 10px;
    border-bottom: 1px solid #edf0f5;
    background: #ffffff;
    color: var(--mobile-purple);
    flex-shrink: 0;
  }

  #mobile-action-sheet .mobile-sheet-header > div {
    grid-column: 1;
    min-width: 0;
  }

  #mobile-action-sheet .mobile-sheet-eyebrow {
    color: var(--mobile-coral);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 2px;
  }

  #mobile-action-sheet .mobile-sheet-header h2 {
    overflow: hidden;
    color: var(--mobile-purple);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
  }

  #mobile-action-sheet .mobile-sheet-summary {
    overflow: hidden;
    color: #626e82;
    font-size: 0.76rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 3px 0 0;
  }

  #mobile-action-sheet .mobile-sheet-header .drawer-button {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    width: 28px;
    min-width: 28px;
    min-height: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1f3f7;
    color: #556070;
    font-size: 0;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
  }

  #mobile-action-sheet .mobile-sheet-header .drawer-button::before {
    content: "×";
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 28px;
    display: block;
    text-align: center;
  }

  #mobile-action-sheet .mobile-sheet-header .drawer-button:active {
    background: #e2e6ef;
    color: var(--mobile-purple);
  }

  #mobile-timeblock-name-sheet .mobile-sheet-card {
    top: 50%;
    right: auto;
    bottom: auto;
    left: 50%;
    grid-template-rows: auto auto;
    width: min(calc(100vw - 48px), 420px);
    max-height: none;
    border: 1px solid rgba(33, 19, 61, 0.14);
    border-radius: 16px;
    box-shadow: 0 20px 52px rgba(0, 0, 0, 0.34);
    transform: translate(-50%, -50%);
  }

  #mobile-timeblock-name-sheet .mobile-sheet-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    padding: 14px 14px 6px;
    border-bottom: 0;
    background: #ffffff;
    color: var(--mobile-purple);
  }

  #mobile-timeblock-name-sheet .mobile-sheet-header > div {
    min-width: 0;
  }

  #mobile-timeblock-name-sheet .mobile-sheet-eyebrow {
    display: none;
  }

  #mobile-timeblock-name-sheet .mobile-sheet-header h2 {
    color: var(--mobile-purple);
    font-size: 1.12rem;
    font-weight: 600;
  }

  #mobile-timeblock-name-sheet .mobile-sheet-summary {
    color: #5f6470;
    font-size: 0.8rem;
    line-height: 1.3;
  }

  #mobile-timeblock-name-sheet .drawer-button {
    min-height: 30px;
    border: 0;
    background: transparent;
    color: var(--mobile-purple);
    font: inherit;
    font-weight: 700;
  }

  .mobile-timeblock-name-form {
    display: grid;
    gap: 12px;
    padding: 4px 14px 14px;
  }

  .mobile-timeblock-name-form .form-field span {
    color: #202020;
    font-size: 0.9rem;
  }

  .mobile-timeblock-name-form input {
    min-height: 38px;
    border-color: #c9ccd4;
    border-radius: 7px;
    color: #111111;
    font-size: 1rem;
  }

  .mobile-timeblock-name-form .form-actions {
    justify-content: stretch;
    gap: 8px;
  }

  .mobile-timeblock-name-form .form-actions button {
    flex: 1 1 0;
    min-height: 38px;
    font-size: 0.92rem;
    white-space: nowrap;
  }

  #mobile-action-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
  }

  .mobile-sheet-grid {
    display: grid;
    gap: 0;
  }

  .mobile-sheet-section-label {
    padding: 12px 2px 6px;
    color: #1e1b2e;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .mobile-sheet-action {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 14px;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 1px;
    align-items: center;
    min-height: 42px;
    padding: 6px 10px;
    border: 1px solid #e8ecf2;
    border-radius: 10px;
    background: #ffffff;
    color: #252b37;
    font: inherit;
    font-size: 0.88rem;
    text-align: left;
    box-shadow: 0 1px 3px rgba(33, 19, 61, 0.04);
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  }

  .mobile-sheet-action:active {
    transform: scale(0.985);
    background: #f2f5f9;
  }

  .mobile-sheet-action::before {
    content: attr(data-mobile-icon);
    display: block;
    align-self: center;
    justify-self: center;
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 26px;
    height: 26px;
    border: 1px solid rgba(236, 102, 92, 0.22);
    border-radius: 8px;
    background: #fff3f1;
    color: var(--mobile-coral);
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 24px;
    text-align: center;
  }

  .mobile-sheet-action::after {
    content: "›";
    grid-column: 3;
    grid-row: 1 / span 2;
    justify-self: end;
    color: #9aa5b5;
    font-size: 1.15rem;
    line-height: 1;
  }

  .mobile-sheet-action[data-mobile-label="Only Working Employees"]::before,
  .mobile-sheet-action[data-mobile-label="Show Only Working Employees"]::before {
    display: none;
  }

  .mobile-sheet-action[data-mobile-label="Only Working Employees"]::after,
  .mobile-sheet-action[data-mobile-label="Show Only Working Employees"]::after {
    content: "";
    display: block;
    grid-column: 3;
    justify-self: end;
    width: 44px;
    height: 24px;
    border: 2px solid var(--mobile-coral);
    border-radius: 999px;
    background:
      radial-gradient(circle at calc(100% - 12px) 50%, #ffffff 0 9px, transparent 10px),
      var(--mobile-coral);
  }

  .mobile-sheet-action strong {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    overflow: hidden;
    color: #232733;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-sheet-action:not(:has(span)) strong {
    grid-row: 1 / span 2;
    align-self: center;
  }

  .mobile-sheet-action[data-action^="mobile-provider:"] strong,
  .mobile-sheet-action[data-mobile-label="Change Employee Order"] strong,
  .mobile-sheet-action[data-mobile-label="Change Start and End Times"] strong {
    grid-column: 2;
  }

  .mobile-sheet-action span {
    grid-column: 2;
    grid-row: 2;
    color: #68768a;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-sheet-action.is-active {
    border-color: rgba(236, 102, 92, 0.42);
    background: #fff7f6;
    box-shadow: 0 2px 8px rgba(236, 102, 92, 0.12);
  }

  .mobile-sheet-action.is-active strong {
    color: var(--mobile-purple);
  }

  .mobile-sheet-action.is-active span {
    color: var(--mobile-coral);
  }

  .mobile-sheet-action.is-danger {
    border-color: rgba(220, 53, 69, 0.22);
    background: #fff8f8;
  }

  .mobile-sheet-action.is-danger::before {
    border-color: rgba(220, 53, 69, 0.25);
    background: #ffebee;
    color: #dc3545;
  }

  .mobile-sheet-action.is-danger strong {
    color: #dc3545;
  }

  .mobile-command-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 106;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 6px 4px max(6px, env(safe-area-inset-bottom));
    border-top: 1px solid #dedfe4;
    background: #ffffff;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
  }

  .mobile-command-button {
    display: grid;
    grid-template-rows: 26px auto;
    justify-items: center;
    gap: 2px;
    min-width: 0;
    min-height: 48px;
    padding: 0 2px;
    border: 0;
    background: transparent;
    color: var(--mobile-purple);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    text-align: center;
  }

  .mobile-command-button .mobile-nav-icon {
    width: 25px;
    height: 25px;
  }

  .mobile-command-button.is-active {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    color: var(--mobile-coral);
  }

  .mobile-schedule-fab {
    display: none !important;
  }

  #plan-fab {
    bottom: 68px;
  }

  .provider-row,
  .calendar-grid {
    grid-template-columns: repeat(var(--provider-count), minmax(0, var(--provider-column-width)));
    width: calc(var(--provider-count) * var(--provider-column-width));
    min-width: calc(var(--provider-count) * var(--provider-column-width));
  }

  .plans-drawer {
    width: 100vw;
    top: 0;
    bottom: calc(64px + env(safe-area-inset-bottom));
    z-index: 125;
    background: #f8fafc;
  }

  .plans-drawer .drawer-header {
    padding: 16px 18px 14px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  .plans-drawer .drawer-eyebrow {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
  }

  .plans-drawer .drawer-header h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin: 0 0 4px;
  }

  .plans-drawer .drawer-header p {
    font-size: 0.88rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
  }

  .plans-drawer .drawer-header-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
  }

  .plans-drawer .plan-count {
    padding: 4px 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
    font-size: 0.82rem;
    border: 1px solid #bfdbfe;
  }

  .plans-drawer .plan-list {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #f8fafc;
  }

  .plans-drawer .plan-item {
    position: relative;
    padding: 18px;
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: 18px;
    background: #ffffff !important;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  }

  .plans-drawer .plan-item:nth-child(even) {
    background: #ffffff !important;
  }

  .plans-drawer .plan-item.is-highlighted {
    background: #fffbeb !important;
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25), 0 6px 20px -2px rgba(245, 158, 11, 0.15);
  }

  .plans-drawer .plan-item-header {
    order: 1;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-right: 0;
  }

  .plans-drawer .plan-number {
    min-width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    flex-shrink: 0;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid rgba(191, 219, 254, 0.8);
    color: #1d4ed8;
  }

  .plans-drawer .plan-title-block {
    flex: 1;
    min-width: 0;
  }

  .plans-drawer .plan-title-block h3 {
    font-size: 15.5px;
    font-weight: 750;
    line-height: 1.3;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.01em;
  }

  .plans-drawer .plan-meta {
    margin-top: 8px;
    gap: 6px;
  }

  .plans-drawer .tag {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid transparent;
  }

  .plans-drawer .tag.tag-launch {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
  }

  .plans-drawer .tag.tag-foundation {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
  }

  .plans-drawer .tag.tag-later {
    background: #f8fafc;
    color: #64748b;
    border-color: #e2e8f0;
  }

  .plans-drawer .tag:not(.tag-launch):not(.tag-foundation):not(.tag-later) {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
  }

  .plans-drawer .plan-description {
    order: 2;
    margin: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: #475569;
  }

  .plans-drawer .plan-notes-button {
    order: 3;
    position: static;
    align-self: flex-start;
    min-height: 36px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.15s ease;
  }

  .plans-drawer .plan-notes-button:hover,
  .plans-drawer .plan-notes-button:active {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
  }

  #plan-notes-modal {
    align-items: end;
    justify-items: stretch;
  }

  #plan-notes-modal .plan-notes-modal-card {
    inset: auto 0 0 0;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    max-height: min(88svh, 680px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-top: 1px solid #e2e8f0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.25);
    background: #ffffff;
  }

  .plan-notes-modal-card .app-modal-header {
    padding: 14px 16px 12px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
  }

  .plan-notes-modal-card .app-modal-header h2 {
    font-size: 1.15rem;
    color: #0f172a;
    font-weight: 800;
  }

  .plan-notes-modal-card .app-modal-close-btn {
    width: 32px;
    height: 32px;
    font-size: 19px;
  }

  .plan-notes-body {
    max-height: calc(88svh - 85px);
    padding: 14px 16px max(24px, env(safe-area-inset-bottom));
  }

  #time-block-modal {
    align-items: end;
    justify-items: stretch;
  }

  .time-block-modal-card {
    inset: auto 0 0 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: 100vw;
    max-width: 100vw;
    max-height: min(90svh, 760px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -10px 36px rgba(17, 27, 40, 0.22);
  }

  .time-block-modal-card .app-modal-header {
    align-items: center;
    padding: 12px 14px 10px;
  }

  .time-block-modal-card .app-modal-header h2 {
    font-size: 1.15rem;
  }

  .time-block-modal-card .app-modal-header .drawer-button {
    min-height: 36px;
    padding-inline: 12px;
  }

  .time-block-modal-card .app-form {
    overflow: auto;
    gap: 14px;
    padding: 12px 14px max(14px, env(safe-area-inset-bottom));
  }

  .time-block-form .form-grid,
  .time-block-form .detail-form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .time-block-form .form-field {
    gap: 6px;
  }

  .time-block-form .form-field span {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5f6f84;
  }

  .time-block-form .form-field select,
  .time-block-form .form-field input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 16px;
  }

  .time-block-form #time-block-summary {
    padding: 10px 12px;
    border: 1px solid #d3deec;
    border-radius: 8px;
    background: #f3f7fc;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.4;
    color: #2f4158;
  }

  .time-block-modal-card .form-actions {
    position: sticky;
    right: 0;
    bottom: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid #d1ddeb;
    background: linear-gradient(#f8fbff, #edf4fc);
  }

  .time-block-modal-card .form-actions .toolbar-button {
    width: 100%;
    min-height: 46px;
    font-size: 1rem;
    font-weight: 700;
  }

  .time-block-confirm-popover {
    inset: auto 0 0 0;
    width: 100vw;
    padding: 0 12px calc(12px + env(safe-area-inset-bottom));
  }

  .time-block-confirm-card {
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -10px 36px rgba(17, 27, 40, 0.22);
  }

  .time-block-confirm-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .time-block-confirm-actions .toolbar-button,
  .time-block-confirm-actions .drawer-button {
    width: 100%;
    min-height: 44px;
    font-size: 1rem;
    font-weight: 700;
  }
}

@media (max-width: 720px) {
  .main-banner,
  .global-toolbar,
  .section-toolbar,
  .detail-header {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  .toolbar-right,
  .section-switcher,
  .detail-actions {
    align-self: stretch;
    width: auto;
    min-width: 0;
  }

  .employee-schedule-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .availability-range-buttons {
    justify-content: flex-start;
  }

  .appointment-lookup-header,
  .appointment-slot-summary-grid {
    grid-template-columns: 1fr;
  }

  #appointment-form.is-editing-appointment .appointment-service-grid,
  #appointment-form.is-client-selected .appointment-service-grid,
  .appointment-buffer-grid {
    grid-template-columns: 1fr;
  }

  .appointment-worksheet-placeholder {
    min-height: 0;
  }

  .toolbar-field {
    width: auto;
    justify-content: space-between;
  }

  .form-grid,
  .detail-grid,
  .metric-grid,
  .client-summary-grid,
  .import-stepper,
  .import-mapping-row {
    grid-template-columns: 1fr;
  }

  .time-block-form .form-grid,
  .time-block-form .detail-form-grid {
    grid-template-columns: 1fr;
  }

  .app-modal-card {
    width: calc(100vw - 18px);
  }

  /* Mobilized Modern Bottom Sheets */
  #client-modal,
  #lookup-modal,
  #backbar-ticket-modal,
  #appointment-modal,
  #service-catalog-modal,
  #time-block-modal,
  #availability-modal,
  #availability-recurring-modal,
  #passkeys-modal,
  #client-picker-modal {
    align-items: end;
    justify-items: stretch;
  }

  .client-modal-card,
  .lookup-modal-card,
  .backbar-ticket-card,
  .appointment-modal-card,
  .service-catalog-modal-card,
  .time-block-modal-card,
  .availability-modal-card,
  .availability-recurring-modal-card,
  .passkeys-modal-card,
  .client-picker-card {
    inset: auto 0 0 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    max-height: min(92svh, 820px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-top: 1px solid #e2e8f0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.25);
    background: #ffffff;
  }

  .client-modal-card,
  .lookup-modal-card,
  .backbar-ticket-card,
  .appointment-modal-card,
  .passkeys-modal-card {
    top: auto;
    left: 0;
    height: min(92svh, 820px);
    min-width: 0;
    min-height: 0;
  }

  .client-modal-card .app-modal-header,
  .lookup-modal-card .app-modal-header,
  .backbar-ticket-card .app-modal-header,
  .appointment-modal-card .app-modal-header {
    padding: 14px 16px 12px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
  }

  .client-modal-card .drawer-eyebrow,
  .lookup-modal-card .drawer-eyebrow,
  .backbar-ticket-card .drawer-eyebrow,
  .appointment-modal-card .drawer-eyebrow {
    color: var(--mobile-coral, #ec665c);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
  }

  .client-modal-card .app-modal-header h2,
  .lookup-modal-card .app-modal-header h2,
  .backbar-ticket-card .app-modal-header h2,
  .appointment-modal-card .app-modal-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--mobile-purple, #21133d);
    margin: 0;
    letter-spacing: -0.01em;
  }

  .client-modal-card .app-modal-header .drawer-button,
  .lookup-modal-card .app-modal-header .drawer-button,
  .backbar-ticket-card .app-modal-header .drawer-button,
  .appointment-modal-card .app-modal-header .drawer-button,
  .appointment-modal-card .app-modal-header .app-modal-close-btn {
    width: 32px;
    min-width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
  }

  .client-modal-card .app-modal-header .drawer-button::after,
  .lookup-modal-card .app-modal-header .drawer-button::after,
  .backbar-ticket-card .app-modal-header .drawer-button::after,
  .appointment-modal-card .app-modal-header .drawer-button::after,
  .appointment-modal-card .app-modal-header .app-modal-close-btn::after {
    content: "×";
    font-size: 20px;
    line-height: 1;
    font-weight: 600;
  }

  /* Mobilized Edit Client Form Cards */
  .client-modal-card .app-form {
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px 16px calc(24px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
  }

  .client-modal-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  }

  .client-modal-section-title {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mobile-coral, #ec665c);
    margin-bottom: 12px;
  }

  .client-modal-card .form-field span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
  }

  .client-modal-card input,
  .client-modal-card select {
    width: 100%;
    min-height: 42px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    font-size: 0.95rem;
    padding: 8px 12px;
    color: #0f172a;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }

  .client-modal-card textarea {
    width: 100%;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    font-size: 0.95rem;
    padding: 10px 12px;
    color: #0f172a;
  }

  .client-modal-card input:focus,
  .client-modal-card select:focus,
  .client-modal-card textarea:focus {
    border-color: var(--mobile-coral, #ec665c);
    outline: none;
    box-shadow: 0 0 0 3px rgba(236, 102, 92, 0.15);
  }

  .client-modal-card .client-form-notes-field {
    margin-top: 12px;
  }

  .client-modal-card .form-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    margin-inline: -16px;
    margin-bottom: -16px;
    padding: 12px 16px max(14px, env(safe-area-inset-bottom));
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
  }

  .client-modal-card .form-actions button[type="submit"] {
    background: var(--mobile-coral, #ec665c);
    color: #ffffff;
    border: 0;
    border-radius: 12px;
    min-height: 48px;
    font-size: 0.95rem;
    font-weight: 700;
  }

  .client-modal-card .form-actions button.is-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1.5px solid #fecaca;
    border-radius: 12px;
    min-height: 48px;
    font-size: 0.95rem;
    font-weight: 600;
  }

  .client-modal-card .form-actions button:only-child {
    grid-column: 1 / -1;
  }

  /* Mobilized Global Lookup Modal */
  .lookup-modal-card .lookup-panel {
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px 16px calc(24px + env(safe-area-inset-bottom));
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .lookup-modal-card .lookup-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 0;
  }

  .lookup-modal-card .lookup-field span {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mobile-coral, #ec665c);
  }

  .lookup-modal-card #lookup-search {
    width: 100%;
    height: 44px;
    border-radius: 999px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    font-size: 0.95rem;
    padding: 8px 16px;
    color: #0f172a;
  }

  .lookup-modal-card #lookup-search:focus {
    border-color: var(--mobile-coral, #ec665c);
    outline: none;
    box-shadow: 0 0 0 3px rgba(236, 102, 92, 0.15);
  }

  .lookup-modal-card .lookup-intro {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.4;
  }

  .lookup-modal-card .lookup-group {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  }

  .lookup-modal-card .lookup-group-title {
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mobile-purple, #21133d);
    margin-bottom: 8px;
  }

  .lookup-modal-card .lookup-result-item {
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 0;
    padding: 10px 0;
  }

  .lookup-modal-card .lookup-result-item:last-child {
    border-bottom: 0;
  }

  /* Mobilized Back-Bar Product Ticket Modal */
  .backbar-ticket-card .backbar-ticket-body {
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px 16px calc(24px + env(safe-area-inset-bottom));
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .backbar-ticket-card .backbar-meta-row {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
  }

  .backbar-ticket-card .backbar-entry-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    background: #e2e8f0;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 10px;
  }

  .backbar-ticket-card .backbar-tab-btn {
    height: 36px;
    border-radius: 8px;
    border: 0;
    background: transparent;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
  }

  .backbar-ticket-card .backbar-tab-btn.is-active {
    background: #ffffff;
    color: var(--mobile-purple, #21133d);
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  }

  .backbar-rapid-scan-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 10px;
  }

  .backbar-rapid-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--mobile-purple, #21133d);
    cursor: pointer;
  }

  .backbar-rapid-toggle-label input {
    accent-color: var(--mobile-coral, #ec665c);
    width: 18px;
    height: 18px;
  }

  .backbar-rapid-hint {
    font-size: 0.75rem;
    color: #64748b;
  }

  .backbar-rapid-feed {
    background: #ffffff;
    border: 2px solid var(--mobile-coral, #ec665c);
    border-radius: 14px;
    padding: 10px 14px;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(236, 102, 92, 0.12);
  }

  .backbar-rapid-feed.is-pulse {
    animation: backbarFeedPulse 0.4s ease;
  }

  @keyframes backbarFeedPulse {
    0% { transform: scale(0.98); background: #fef2f2; }
    50% { transform: scale(1.02); background: #fff5f5; }
    100% { transform: scale(1); background: #ffffff; }
  }

  .backbar-rapid-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mobile-coral, #ec665c);
    margin-bottom: 4px;
  }

  .backbar-rapid-feed-price {
    font-size: 0.92rem;
    font-weight: 800;
    color: #059669;
  }

  .backbar-rapid-feed-body {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
  }

  .backbar-rapid-feed-body strong {
    font-size: 0.95rem;
    color: var(--mobile-purple, #21133d);
  }

  .backbar-rapid-feed-qty {
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
  }

  /* Mobilized Passkeys Modal */
  .passkeys-modal-card .app-modal-header {
    padding: 14px 16px 12px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
  }

  .passkeys-modal-card .drawer-eyebrow {
    color: var(--mobile-coral, #e26b66);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
  }

  .passkeys-modal-card #passkeys-modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 2px;
  }

  .passkeys-modal-card #passkeys-modal-description {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0;
    line-height: 1.35;
  }

  .passkeys-modal-card #passkeys-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    cursor: pointer;
    flex-shrink: 0;
  }

  .passkeys-modal-card #passkeys-close::after {
    content: "×";
    font-size: 20px;
    line-height: 1;
    font-weight: 600;
  }

  .passkeys-modal-card .passkeys-modal-body {
    grid-template-columns: 1fr;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px 16px calc(24px + env(safe-area-inset-bottom));
    gap: 14px;
    background: #f8fafc;
  }

  .passkeys-modal-card .passkeys-panel,
  .passkeys-modal-card .passkeys-guide-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  }

  .passkeys-modal-card .panel-caption {
    background: transparent;
    border: 0;
    padding: 0 0 10px;
    font-size: 0.82rem;
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .passkeys-modal-card .passkeys-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
  }

  .passkeys-modal-card .passkeys-toolbar .toolbar-button {
    min-height: 44px;
    padding-inline: 14px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    text-align: center;
  }

  .passkeys-modal-card #passkeys-enroll {
    background: #0f172a;
    color: #ffffff;
    border: 0;
  }

  .passkeys-modal-card #passkeys-enroll:hover,
  .passkeys-modal-card #passkeys-enroll:active {
    background: #1e293b;
  }

  .passkeys-modal-card #passkeys-refresh {
    background: #ffffff;
    color: #0f172a;
    border: 1.5px solid #cbd5e1;
  }

  .passkey-item-row {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
  }

  .passkeys-guide-accordion {
    border: 0;
    background: transparent;
  }

  .passkeys-guide-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0 10px;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
    user-select: none;
    list-style: none;
  }

  .passkeys-guide-summary::-webkit-details-marker {
    display: none;
  }

  .passkeys-guide-summary .accordion-chevron {
    transition: transform 0.2s ease;
    font-size: 1.1rem;
    color: #64748b;
  }

  .passkeys-guide-accordion[open] .accordion-chevron {
    transform: rotate(180deg);
  }

  .passkeys-guide-accordion .passkeys-guide-content {
    padding: 12px 0 0;
  }

  .passkeys-guide-step {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
    margin-top: 8px;
  }

  .passkeys-guide-badge.badge-account {
    background: #0f172a;
    color: #ffffff;
  }

  .passkeys-guide-badge.badge-apple {
    background: #475569;
    color: #ffffff;
  }

  .passkeys-guide-badge.badge-chrome {
    background: #0284c7;
    color: #ffffff;
  }

  .passkeys-guide-badge.badge-windows {
    background: #0d9488;
    color: #ffffff;
  }

  /* Mobilized Select Client Modal */
  #client-picker-modal .client-picker-card {
    height: min(88svh, 680px);
    max-height: 88svh;
  }

  .client-picker-header {
    padding: 14px 16px 12px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
  }

  #client-picker-eyebrow {
    color: var(--mobile-coral, #e26b66);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
  }

  #client-picker-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 2px;
  }

  #client-picker-slot-info {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0;
  }

  .client-picker-header .app-modal-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    cursor: pointer;
    flex-shrink: 0;
  }

  .client-picker-toolbar {
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 10px;
  }

  .client-picker-search-wrap {
    width: 100%;
    min-width: 100%;
    flex: 0 0 auto;
  }

  .client-picker-search-input {
    width: 100%;
    height: 42px;
    border-radius: 999px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    font-size: 0.95rem;
    padding: 8px 14px 8px 36px;
  }

  .client-picker-search-icon {
    left: 12px;
    font-size: 15px;
  }

  .client-picker-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .client-picker-new-btn {
    width: 100%;
    height: 42px;
    border-radius: 12px;
    background: var(--mobile-coral, #e26b66);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .client-picker-walk-in-btn {
    width: 100%;
    height: 42px;
    border-radius: 12px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    color: #1e293b;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .client-picker-table-wrapper {
    background: #ffffff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .client-picker-table thead {
    display: none !important;
  }

  .client-picker-table,
  .client-picker-table tbody {
    display: block;
    width: 100%;
  }

  .client-picker-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name action"
      "meta action";
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
    row-gap: 2px;
    min-height: 68px;
  }

  .client-picker-row:active,
  .client-picker-row.is-highlighted {
    background: #f8fafc;
  }

  .client-picker-row .client-col-name {
    grid-area: name;
    padding: 0;
    border: 0;
  }

  .client-picker-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .client-picker-monogram {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fef2f2;
    border: 1.5px solid #e26b66;
    color: #e26b66;
    font-size: 1.1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .client-picker-name-strong {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
  }

  .client-picker-row .client-col-phone {
    grid-area: meta;
    padding: 0 0 0 54px;
    border: 0;
    font-size: 0.85rem;
    color: #64748b;
  }

  .client-picker-row .client-col-email {
    display: none;
  }

  .client-picker-row .client-col-visit {
    display: none;
  }

  .client-picker-row .client-col-action {
    grid-area: action;
    padding: 0;
    border: 0;
  }

  .client-picker-select-btn {
    border-radius: 999px;
    background: #0f172a;
    color: #ffffff;
    font-weight: 600;
    padding: 8px 16px;
    font-size: 0.85rem;
    border: 0;
  }

  .client-picker-footer {
    padding: 12px 16px max(14px, env(safe-area-inset-bottom));
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
  }

  .client-picker-status {
    font-size: 0.82rem;
    color: #64748b;
  }

  .app-modal-minimize-btn {
    display: none !important;
  }

  .appointment-modal-card .app-modal-header {
    cursor: default;
  }

  .appointment-modal-resize,
  .appointment-modal-resize-handle {
    display: none !important;
  }

  .appointment-desktop-ledger,
  .appointment-desktop-hint,
  .appointment-ledger-toolbar {
    display: none !important;
  }

  .appointment-mobile-services-panel {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 2px;
  }

  #created-by-modal {
    align-items: center;
    justify-content: center;
  }

  .created-by-modal-card {
    width: min(92vw, 420px);
    max-height: 85svh;
  }

  .appointment-modal-card .app-form,
  .checkout-modal-card .app-form,
  .service-catalog-modal-card .app-form,
  .time-block-modal-card .app-form,
  .availability-modal-card .app-form,
  .availability-recurring-modal-card .app-form {
    overflow: auto;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .appointment-modal-card .form-actions,
  .checkout-modal-card .form-actions,
  .service-catalog-modal-card .form-actions,
  .time-block-modal-card .form-actions,
  .availability-modal-card .form-actions,
  .availability-recurring-modal-card .form-actions {
    position: sticky;
    right: 0;
    bottom: 0;
    left: 0;
    padding-top: 8px;
    border-top: 1px solid #d1ddeb;
    background: linear-gradient(#f8fbff, #edf4fc);
  }

  .appointment-modal-card .form-actions .toolbar-button,
  .checkout-modal-card .form-actions .toolbar-button,
  .service-catalog-modal-card .form-actions .toolbar-button,
  .time-block-modal-card .form-actions .toolbar-button,
  .availability-modal-card .form-actions .toolbar-button,
  .availability-recurring-modal-card .form-actions .toolbar-button {
    min-height: 44px;
  }

  .checkout-modal-card {
    width: calc(100vw - 16px);
    min-width: 0;
    min-height: 0;
    height: auto;
    max-width: none;
    max-height: calc(100svh - 16px);
    resize: none;
  }

  .checkout-form {
    max-height: calc(100svh - 92px);
  }

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

  .checkout-ticket-list {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    max-height: 164px;
  }

  .checkout-ticket-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .ticket-top-grid,
  .ticket-search-controls {
    grid-template-columns: 1fr;
  }

  .checkout-ticket-selector-field {
    width: 100%;
  }

  .ticket-bottom-placeholder {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 0;
  }

  .ticket-info-row {
    grid-template-columns: minmax(74px, 0.55fr) minmax(0, 1fr);
  }

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

  .ticket-lines-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .ticket-lines-toolbar .toolbar-button,
  .ticket-client-actions .drawer-button {
    width: 100%;
  }

  .ticket-search-popover {
    position: fixed;
    top: auto !important;
    right: 8px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 8px !important;
    width: auto;
    max-height: min(70svh, 460px);
  }

  .service-catalog-body {
    grid-template-columns: 1fr;
    max-height: calc(100svh - 92px);
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .service-catalog-toolbar,
  .service-form-grid,
  .service-provider-list {
    grid-template-columns: 1fr;
  }

  .service-catalog-list {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    max-height: 176px;
  }

  .availability-provider-list {
    grid-template-columns: 1fr;
  }

  .availability-recurring-setup,
  .availability-recurring-every-row,
  .availability-recurring-date-list {
    grid-template-columns: 1fr;
  }

  .availability-recurring-weekdays {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .drawer-header {
    flex-direction: column;
  }

  .drawer-header-tools {
    width: 100%;
    grid-template-columns: 1fr auto;
    justify-items: stretch;
    align-items: center;
  }

  .plan-description {
    margin-left: 0;
  }

  .plan-item {
    padding-top: 40px;
  }

  .plan-item-header {
    padding-right: 0;
  }
}

/* ==========================================================================
   Milestone 3: Visual Local-Mode Indicators & Badging
   ========================================================================== */

/* Global dimmed and desaturated styling in local mode */
body.is-local-mode {
  --theme-accent: #6b7280;
  --theme-provider-top: #d1d5db;
  --theme-provider-bottom: #9ca3af;
}

body.is-local-mode .topbar,
body.is-local-mode .ribbon-bar,
body.is-local-mode .window-bar {
  filter: grayscale(35%) contrast(95%);
}

body.is-local-mode .window-brand {
  opacity: 0.88;
}

/* Persistent offline / local mode status banner */
#local-mode-banner,
.local-mode-banner {
  position: sticky;
  top: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 8px 16px;
  box-sizing: border-box;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  border-bottom: 2px solid #f59e0b;
  color: #92400e;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

#local-mode-banner[hidden],
.local-mode-banner[hidden] {
  display: none !important;
}

.local-banner-icon {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.local-banner-text {
  font-size: 12px;
  letter-spacing: 0.01em;
}

.local-banner-text strong {
  font-weight: 700;
  color: #78350f;
}

/* (Local Mode Only) badge on headers and views */
.local-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  margin-left: 8px;
  border-radius: 4px;
  border: 1px solid #d97706;
  background-color: #fef3c7;
  color: #92400e;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  vertical-align: middle;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.local-mode-badge::before {
  content: "⚠️";
  font-size: 11px;
  line-height: 1;
}

/* ==========================================================================
   Milestone 1/3: Staff Sign-In Downtime Advisory Alert
   ========================================================================== */

.auth-downtime-alert {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  text-align: left;
  font-size: 0.85rem;
  line-height: 1.45;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
}

.auth-downtime-alert[hidden] {
  display: none !important;
}

.auth-downtime-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.88rem;
  color: #b45309;
}

.auth-downtime-summary {
  margin: 0;
  color: #92400e;
  font-size: 0.84rem;
  word-break: break-word;
}

.auth-downtime-warning {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(254, 243, 199, 0.6);
  border-left: 3px solid #f59e0b;
  color: #78350f;
  font-size: 0.82rem;
  line-height: 1.45;
}

.auth-downtime-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

/* ==========================================================================
   Ticket Opener & Back-Bar Product Ticket Modals
   ========================================================================== */

.ticket-opener-card {
  max-width: 480px;
  width: 92vw;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22);
}

.ticket-opener-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px;
}

.ticket-opener-card-button {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.ticket-opener-card-button:hover,
.ticket-opener-card-button:focus-visible {
  border-color: #3b82f6;
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
}

.ticket-opener-card-button:active {
  transform: translateY(0);
  background: #eff6ff;
}

.ticket-opener-icon-wrap {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.ticket-opener-icon-wrap.service-icon {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  color: #0369a1;
}

.ticket-opener-icon-wrap.backbar-icon {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #b45309;
}

.ticket-opener-info {
  flex: 1;
  min-width: 0;
}

.ticket-opener-name {
  font-size: 1.12rem;
  font-weight: 700;
  color: #0f172a;
}

.ticket-opener-desc {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 3px;
  line-height: 1.35;
}

.ticket-opener-arrow {
  font-size: 1.35rem;
  color: #94a3b8;
  padding-left: 6px;
  transition: transform 0.18s ease, color 0.18s ease;
}

.ticket-opener-card-button:hover .ticket-opener-arrow {
  color: #2563eb;
  transform: translateX(3px);
}

.ticket-opener-actions {
  display: flex;
  justify-content: flex-end;
  padding: 12px 20px 18px;
  border-top: 1px solid #edf2f7;
}

/* Back-Bar Ticket Modal */
.backbar-ticket-card {
  max-width: 620px;
  width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.24);
  overflow: hidden;
}

.backbar-ticket-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.backbar-meta-row {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.backbar-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.backbar-field span,
.backbar-date-display span {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.backbar-select {
  height: 38px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 0 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
}

.backbar-date-display {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.backbar-date-display strong {
  font-size: 0.92rem;
  color: #334155;
}

.backbar-entry-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
}

.backbar-entry-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 8px;
}

.backbar-tab-btn {
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.backbar-tab-btn:hover {
  color: #1e293b;
  background: #e2e8f0;
}

.backbar-tab-btn.is-active {
  color: #ffffff;
  background: #2563eb;
}

.backbar-tab-content {
  position: relative;
}

.backbar-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.backbar-input-icon {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  font-size: 0.9rem;
  pointer-events: none;
}

#backbar-search-input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 34px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.88rem;
  box-sizing: border-box;
}

#backbar-search-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.backbar-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 220px;
  overflow-y: auto;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.15);
  margin-top: 4px;
}

.backbar-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: none;
  text-align: left;
  cursor: pointer;
}

.backbar-search-item:hover,
.backbar-search-item:focus-visible {
  background: #eff6ff;
}

.backbar-search-empty {
  padding: 14px 12px;
  font-size: 0.8rem;
  color: #64748b;
  text-align: center;
}

.backbar-brand-chip {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e0f2fe;
  color: #0284c7;
  text-transform: uppercase;
}

.backbar-item-meta {
  display: flex;
  gap: 8px;
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 2px;
}

.backbar-barcode-chip {
  font-family: monospace;
  background: #f1f5f9;
  padding: 1px 4px;
  border-radius: 3px;
}

.backbar-cost-tag {
  color: #059669;
  font-weight: 700;
}

.backbar-add-action {
  font-size: 0.78rem;
  font-weight: 700;
  color: #2563eb;
  padding: 4px 10px;
  border-radius: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.backbar-barcode-entry-row {
  display: flex;
  gap: 8px;
}

#backbar-barcode-input {
  flex: 1;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.9rem;
  font-family: monospace;
}

.backbar-feedback-note {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

.backbar-feedback-note.is-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.backbar-feedback-note.is-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.backbar-scanner-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.backbar-camera-viewfinder {
  position: relative;
  width: 100%;
  height: 180px;
  background: #0f172a;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#backbar-scanner-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.backbar-scanner-laser {
  position: absolute;
  top: 50%;
  left: 8%;
  right: 8%;
  height: 2px;
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  animation: backbar-laser-sweep 1.8s ease-in-out infinite alternate;
}

@keyframes backbar-laser-sweep {
  0% { transform: translateY(-40px); opacity: 0.4; }
  100% { transform: translateY(40px); opacity: 1; }
}

.backbar-scanner-overlay-text {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
  text-align: center;
}

.backbar-scanner-controls {
  display: flex;
  justify-content: center;
}

.backbar-quick-test-bar {
  margin-top: 4px;
}

.quick-test-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  display: block;
  margin-bottom: 4px;
}

.quick-test-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.backbar-test-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.74rem;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.backbar-test-chip:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.backbar-test-chip code {
  font-size: 0.68rem;
  background: #f1f5f9;
  padding: 1px 3px;
  border-radius: 3px;
  color: #64748b;
}

.backbar-ledger-container {
  flex: 1;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}

.backbar-ledger-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}

.backbar-ledger-header h3 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
}

.backbar-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  background: #e2e8f0;
  color: #475569;
}

.backbar-items-table-wrapper {
  flex: 1;
  overflow-y: auto;
  max-height: 220px;
}

.backbar-empty-ledger {
  padding: 28px 16px;
  text-align: center;
  color: #64748b;
}

.backbar-empty-icon {
  font-size: 2.2rem;
  margin-bottom: 6px;
}

.backbar-empty-hint {
  font-size: 0.76rem;
  color: #94a3b8;
  margin-top: 4px;
}

.backbar-items-list {
  display: flex;
  flex-direction: column;
}

.backbar-ledger-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  gap: 12px;
}

.backbar-ledger-item:last-child {
  border-bottom: none;
}

.backbar-ledger-item-main {
  flex: 1;
  min-width: 0;
}

.backbar-ledger-item-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: #0f172a;
}

.backbar-ledger-item-sub {
  display: flex;
  gap: 8px;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 3px;
}

.backbar-barcode-text {
  font-family: monospace;
}

.backbar-unit-cost {
  color: #047857;
  font-weight: 600;
}

.backbar-ledger-item-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.backbar-stepper {
  display: flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}

.backbar-stepper-btn {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: none;
  background: #f1f5f9;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  color: #334155;
  transition: background 0.15s ease;
}

.backbar-stepper-btn:hover {
  background: #e2e8f0;
}

.backbar-stepper-val {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #0f172a;
}

.backbar-line-total {
  min-width: 58px;
  text-align: right;
  font-weight: 800;
  font-size: 0.9rem;
  color: #0f172a;
}

.backbar-item-remove-btn {
  border: none;
  background: none;
  color: #94a3b8;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s ease;
}

.backbar-item-remove-btn:hover {
  color: #ef4444;
}

.backbar-ticket-summary-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.backbar-summary-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: #64748b;
}

.summary-val {
  font-size: 1.28rem;
  font-weight: 800;
  color: #059669;
}

.backbar-ticket-actions {
  display: flex;
  gap: 10px;
}

/* ==========================================================================
   Developer Interactive Size Picker Overlay
   ========================================================================== */
.dev-size-picker-badge {
  position: fixed;
  z-index: 100000;
  min-width: 270px;
  max-width: 350px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f1f5f9;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  padding: 10px 12px;
  user-select: none;
  touch-action: none;
}
.dev-size-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 6px;
  cursor: grab;
}
.dev-size-picker-title {
  font-weight: 700;
  font-size: 11px;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 5px;
}
.dev-size-picker-target-tag {
  font-family: monospace;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  color: #fde047;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dev-size-picker-close {
  background: transparent;
  border: 0;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.dev-size-picker-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.dev-size-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.dev-size-picker-label {
  font-weight: 600;
  color: #cbd5e1;
  font-size: 10.5px;
  width: 75px;
  flex-shrink: 0;
}
.dev-size-picker-slider-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.dev-size-picker-slider {
  flex: 1;
  height: 4px;
  cursor: pointer;
  accent-color: #38bdf8;
}
.dev-size-picker-val {
  font-family: monospace;
  font-size: 11px;
  color: #38bdf8;
  font-weight: 700;
  min-width: 44px;
  text-align: right;
}
.dev-size-picker-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  cursor: pointer;
}
.dev-size-picker-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
}
.dev-size-picker-css {
  margin-top: 8px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-family: monospace;
  font-size: 10px;
  color: #86efac;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  word-break: break-all;
}
.dev-size-picker-copy {
  background: #0284c7;
  border: 0;
  color: #fff;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 9.5px;
  cursor: pointer;
  font-weight: 600;
  flex-shrink: 0;
}
.dev-size-picker-copy:hover {
  background: #0369a1;
}
.dev-size-picker-highlight {
  outline: 2px dashed #38bdf8 !important;
  outline-offset: 1px !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5) !important;
}
