:root {
  --blue: #2554c7;
  --blue-dark: #18336f;
  --cyan: #0ba6c9;
  --green: #16a05d;
  --orange: #ff9f1c;
  --red: #ec4b4b;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f4f6f8;
  --card: #ffffff;
  --shadow: 0 12px 34px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  background: #eef2f6;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.mobile-shell {
  width: min(100%, 460px);
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: hidden;
  background: #f8fafc;
}

.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(155deg, rgba(37, 84, 199, 0.18), transparent 42%),
    linear-gradient(25deg, rgba(11, 166, 201, 0.16), transparent 46%),
    #f8fafc;
}

.boot-loader.is-done {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.24s ease;
}

.boot-loader-card {
  width: min(100%, 360px);
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.boot-loader-card h1,
.boot-loader-card p {
  margin: 0;
}

.boot-loader-card p {
  color: var(--muted);
}

.boot-loader-card small {
  color: var(--muted);
  line-height: 1.55;
}

.boot-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbeafe;
}

.boot-progress span {
  width: 12%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transition: width 0.25s ease;
  animation: boot-progress-pulse 1.4s ease-in-out infinite;
}

@keyframes boot-progress-pulse {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.18);
  }
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(155deg, rgba(37, 84, 199, 0.16), transparent 42%),
    linear-gradient(25deg, rgba(11, 166, 201, 0.16), transparent 46%),
    #f8fafc;
}

.login-card {
  width: 100%;
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.app-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--blue);
  color: #ffffff;
  font-weight: 800;
}

.login-card h1,
.mobile-header h1,
.section-head h2 {
  margin: 0;
}

.login-card p,
.login-card small,
.mobile-header p,
.service-note,
.client-note,
.mini-meta,
.metric-card span,
.status-card span {
  color: var(--muted);
}

.login-card label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

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

.login-card select,
.login-card input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: #ffffff;
}

.primary-action,
.secondary-action,
.ghost-action {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  text-decoration: none;
}

.primary-action {
  background: var(--blue);
  color: #ffffff;
}

.secondary-action {
  background: #edf3ff;
  color: var(--blue);
}

.ghost-action {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.availability-panel {
  grid-column: 1 / -1;
  min-width: 0;
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.06);
}

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

.availability-form label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.availability-form input,
.availability-form select {
  min-width: 0;
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--ink);
}

.availability-form .availability-note,
.availability-form button {
  grid-column: 1 / -1;
}

.availability-list {
  min-width: 0;
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.availability-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.availability-row strong {
  display: block;
  overflow-wrap: anywhere;
}

.availability-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.availability-row .ghost-action {
  min-height: 36px;
  padding: 0 12px;
}

.text-action {
  padding: 8px 0;
  background: transparent;
  color: var(--blue);
  font-weight: 800;
}

.app-view {
  min-height: 100vh;
  overflow-x: hidden;
  padding: env(safe-area-inset-top) 14px calc(88px + env(safe-area-inset-bottom));
}

.mobile-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -14px;
  padding: 14px;
  background: rgba(248, 250, 252, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.7);
  backdrop-filter: blur(12px);
}

.mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.compact-action {
  min-height: 40px;
  padding: 0 10px;
  border-radius: 12px;
  white-space: nowrap;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
}

.avatar-button {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 16px;
  background: linear-gradient(135deg, #243b6b, #7c879f);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 800;
}

.status-strip,
.metrics-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.password-panel {
  display: grid;
  gap: 12px;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

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

.status-card,
.metric-card,
.appointment-card,
.current-card,
.step-card,
.client-card,
.stock-card,
.work-card,
.performance-card,
.profile-card,
.checkin-card,
.workday-card,
.compliance-card,
.my-dashboard-card,
.account-card,
.schedule-card,
.schedule-store-section {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.status-card,
.metric-card {
  min-height: 72px;
  display: grid;
  gap: 4px;
  padding: 12px;
  text-align: left;
}

.metric-card.is-clickable,
.workbench-tile.is-clickable,
.appointment-open {
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.metric-card.is-clickable:active,
.workbench-tile.is-clickable:active,
.appointment-open:active {
  transform: scale(0.985);
}

.status-card strong,
.metric-card strong {
  font-size: 1.18rem;
}

.metric-card small {
  color: var(--muted);
}

.today-workbench {
  display: grid;
  gap: 10px;
  margin: 12px 0 4px;
}

.workbench-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(37, 84, 199, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(37, 84, 199, 0.13), transparent 58%),
    #ffffff;
}

.workbench-hero.bd {
  border-color: rgba(11, 166, 201, 0.22);
  background:
    linear-gradient(135deg, rgba(11, 166, 201, 0.16), transparent 60%),
    #ffffff;
}

.workbench-hero h2,
.workbench-hero p {
  margin: 0;
}

.workbench-hero h2 {
  margin-bottom: 5px;
  font-size: 1.12rem;
}

.workbench-hero p,
.workbench-tile small {
  color: var(--muted);
  line-height: 1.45;
}

.workbench-badge {
  width: 62px;
  min-height: 62px;
  display: grid;
  place-items: center;
  padding: 7px;
  border-radius: 16px;
  background: var(--blue);
  color: #ffffff;
  text-align: center;
}

.workbench-badge span {
  font-size: 0.68rem;
  font-weight: 800;
}

.workbench-badge strong {
  font-size: 1.02rem;
}

.workbench-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
}

.workbench-actions button {
  min-height: 40px;
  padding: 0 8px;
  border-radius: 12px;
  font-size: 0.86rem;
  white-space: nowrap;
}

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

.workbench-tile {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.workbench-tile.is-clickable {
  border-color: rgba(37, 84, 199, 0.24);
  box-shadow: 0 8px 20px rgba(37, 84, 199, 0.06);
}

.workbench-tile span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.workbench-tile strong {
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.workbench-tile.ok {
  border-color: rgba(22, 160, 93, 0.24);
  background: #f3fbf6;
}

.workbench-tile.warn {
  border-color: rgba(255, 159, 28, 0.28);
  background: #fffaf0;
}

.workbench-tile.danger {
  border-color: rgba(236, 75, 75, 0.24);
  background: #fff5f5;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 10px;
}

.section-head h2 {
  font-size: 1rem;
}

.section-head span {
  color: var(--muted);
  font-size: 0.9rem;
}

.queue-list,
.service-steps,
#clientPanel,
#performancePanel,
#performancePanel .live-session-list,
#checkinPanel,
#workdayFlow,
.compliance-grid,
.my-dashboard-grid,
.account-list,
.schedule-summary,
.store-schedule-table {
  display: grid;
  gap: 10px;
}

.appointment-card {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.appointment-card.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(37, 84, 199, 0.08);
}

.card-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

button.card-main,
button.customer-top {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.appointment-open {
  border-radius: 12px;
}

.appointment-open:focus-visible {
  outline: 2px solid rgba(37, 84, 199, 0.42);
  outline-offset: 3px;
}

.card-main strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1.02rem;
}

.price {
  font-weight: 800;
  white-space: nowrap;
}

.tag-row,
.action-row,
.mini-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  background: #eef2ff;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
}

.tag.ok {
  background: #e7f8ef;
  color: var(--green);
}

.tag.warn {
  background: #fff6df;
  color: #b36b00;
}

.tag.danger {
  background: #ffecec;
  color: var(--red);
}

.action-row button {
  flex: 1 1 96px;
}

.current-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(37, 84, 199, 0.08), transparent 52%),
    #ffffff;
}

.customer-top {
  display: flex;
  gap: 12px;
}

.customer-top.compact {
  align-items: center;
}

.customer-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  background: var(--blue-dark);
  color: #ffffff;
  font-weight: 800;
}

.profile-card,
.checkin-card,
.workday-card,
.compliance-card,
.my-dashboard-card,
.account-card,
.schedule-card,
.schedule-store-section {
  display: grid;
  gap: 12px;
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 20px;
  background: linear-gradient(135deg, #243b6b, #7c879f);
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  overflow: hidden;
}

.profile-avatar.has-image {
  background: #e5e7eb;
}

.profile-avatar.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.checkin-state {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: var(--soft);
}

.checkin-state strong {
  font-size: 1.08rem;
}

.checkin-state.ok {
  background: #e7f8ef;
}

.checkin-state.warn {
  background: #fff6df;
}

.profile-hero {
  margin-top: 12px;
  background:
    linear-gradient(135deg, rgba(37, 84, 199, 0.12), transparent 52%),
    #ffffff;
}

.profile-kpis,
.my-dashboard-grid,
.compliance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profile-kpi,
.dashboard-tile,
.compliance-item,
.account-item,
.workday-step {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 10px;
  border-radius: 14px;
  background: var(--soft);
}

.profile-kpi span,
.dashboard-tile span,
.compliance-item span,
.account-item span,
.workday-step span {
  color: var(--muted);
  font-size: 0.78rem;
}

.profile-kpi strong,
.dashboard-tile strong,
.compliance-item strong,
.account-item strong,
.workday-step strong {
  font-size: 1rem;
}

.workday-step {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
}

.workday-index {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e5e7eb;
  color: var(--muted);
  font-weight: 800;
}

.workday-step.ok .workday-index,
.compliance-item.ok {
  background: #e7f8ef;
}

.workday-step.warn .workday-index,
.compliance-item.warn {
  background: #fff6df;
}

.workday-step.ok .workday-index {
  color: var(--green);
}

.workday-step.warn .workday-index {
  color: #b36b00;
}

.compliance-item button {
  justify-self: start;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 10px;
}

.upload-thumb {
  width: 58px;
  height: 58px;
  display: block;
  border: 1px solid rgba(37, 84, 199, 0.16);
  border-radius: 12px;
  object-fit: cover;
  background: #ffffff;
}

.upload-thumb-button,
.work-preview-button {
  padding: 0;
  border: 0;
  background: transparent;
}

.mobile-file-input {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  opacity: 0.01;
  pointer-events: none;
}

.upload-thumb-button {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 12px;
}

.upload-thumb-button:focus-visible,
.work-preview-button:focus-visible {
  outline: 3px solid rgba(37, 84, 199, 0.35);
  outline-offset: 2px;
}

.hygiene-area-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.hygiene-area-panel.ok {
  border-color: rgba(22, 160, 93, 0.28);
  background: #f3fbf6;
}

.hygiene-area-panel.warn {
  border-color: rgba(255, 159, 28, 0.3);
  background: #fffaf0;
}

.hygiene-area-head,
.hygiene-area-item {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hygiene-area-head span,
.hygiene-area-item span {
  color: var(--muted);
  font-size: 0.78rem;
}

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

.hygiene-area-item {
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.hygiene-area-item > div {
  min-width: 0;
  flex: 1;
}

.hygiene-area-item.ok {
  background: #e7f8ef;
}

.hygiene-area-item.warn {
  background: #fff6df;
}

.hygiene-area-item button {
  min-height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

.hygiene-area-item button:disabled {
  opacity: 0.72;
  cursor: default;
}

.bd-metric {
  border-color: rgba(11, 166, 201, 0.22);
  background:
    linear-gradient(135deg, rgba(11, 166, 201, 0.12), transparent 58%),
    #ffffff;
}

.bd-field-summary,
.bd-efficiency-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.bd-field-summary div,
.bd-efficiency-card div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 14px;
  background: #edfaff;
}

.bd-field-summary span,
.bd-efficiency-card span {
  color: var(--muted);
  font-size: 0.76rem;
}

.bd-field-summary strong,
.bd-efficiency-card strong {
  overflow-wrap: anywhere;
}

.bd-efficiency-card {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bd-visit-card {
  border-color: rgba(11, 166, 201, 0.24);
}

.bd-visit-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.bd-place-card {
  border-color: rgba(11, 166, 201, 0.22);
  background: #f1fbfd;
}

.bd-upload-card {
  grid-column: 1 / -1;
  min-height: 110px;
  border-color: rgba(11, 166, 201, 0.32);
  background:
    linear-gradient(135deg, rgba(11, 166, 201, 0.16), transparent 62%),
    #ffffff;
}

.account-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.service-note {
  line-height: 1.55;
}

.step-card,
.client-card,
.stock-card,
.performance-card,
.profile-card,
.checkin-card,
.workday-card,
.compliance-card,
.my-dashboard-card,
.account-card,
.schedule-card,
.schedule-store-section {
  padding: 12px;
}

.step-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
}

.step-index {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e5e7eb;
  color: var(--muted);
  font-weight: 800;
}

.step-card.done .step-index {
  background: var(--blue);
  color: #ffffff;
}

.client-card {
  display: grid;
  gap: 12px;
}

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

.mini-item {
  min-height: 66px;
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 12px;
  background: var(--soft);
}

.mini-item strong {
  font-size: 1.05rem;
}

.stock-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.upload-card {
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.upload-card span {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
}

.upload-card strong {
  font-size: 0.96rem;
}

.staff-profile-card {
  display: grid;
  gap: 12px;
}

.staff-profile-form {
  display: grid;
  gap: 10px;
}

.staff-profile-form label {
  display: grid;
  gap: 6px;
}

.staff-profile-form label span,
.profile-photo-section > strong {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.staff-profile-form input,
.staff-profile-form select,
.staff-profile-form textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 10px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.staff-profile-form textarea {
  resize: vertical;
  line-height: 1.5;
}

.staff-profile-form .check-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.staff-profile-form .check-line input {
  width: 18px;
  min-height: 18px;
  margin-top: 1px;
}

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

.profile-category-field {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.profile-category-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.profile-category-field select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  background: #f8fafc;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.profile-category-field small {
  color: var(--muted);
  line-height: 1.45;
}

.profile-upload-hint {
  padding: 9px 10px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.06);
  color: #475569;
  font-size: 0.78rem;
  line-height: 1.45;
}

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

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

.profile-photo-tile {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  border-radius: 12px;
  background: #e5e7eb;
  color: #ffffff;
  display: grid;
  align-content: stretch;
  border: 1px solid transparent;
}

.profile-photo-tile.is-avatar {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.profile-photo-preview {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
}

.profile-photo-preview img {
  width: 100%;
  height: 100%;
  min-height: 112px;
  object-fit: cover;
  display: block;
}

.profile-photo-preview span {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  padding: 4px 6px;
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.72);
  font-size: 0.68rem;
}

.profile-photo-category {
  position: absolute;
  top: 6px;
  left: 6px;
  max-width: calc(100% - 12px);
  padding: 4px 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(37, 84, 199, 0.86);
  color: #ffffff;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-photo-tile.can-set-avatar .profile-photo-preview span {
  bottom: 40px;
}

.profile-avatar-set {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  min-height: 28px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 800;
}

.profile-photo-tile.is-avatar .profile-avatar-set {
  background: #1d4ed8;
  color: #ffffff;
}

.profile-photo-empty {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: var(--soft);
  font-size: 0.82rem;
}

.upload-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.upload-stat {
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.upload-stat span {
  color: var(--muted);
  font-size: 0.72rem;
}

.upload-stat strong {
  color: var(--ink);
  font-size: 1.08rem;
}

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

.work-card {
  min-height: 128px;
  display: grid;
  align-content: end;
  gap: 5px;
  padding: 12px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.34)),
    var(--tone, #6f98c9);
  color: #ffffff;
}

.work-card.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.62));
  pointer-events: none;
}

.work-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-preview-button {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.work-card-body {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 5px;
  pointer-events: none;
}

.work-card.just-added {
  outline: 3px solid rgba(255, 159, 28, 0.86);
  box-shadow: 0 0 0 5px rgba(255, 159, 28, 0.16);
}

.work-card span {
  opacity: 0.82;
  font-size: 0.78rem;
}

.work-card small {
  opacity: 0.9;
  font-weight: 800;
}

.performance-card {
  display: grid;
  gap: 10px;
}

.live-card {
  border-color: #cfe0ff;
  background:
    linear-gradient(135deg, rgba(37, 84, 199, 0.08), rgba(20, 191, 166, 0.07)),
    #ffffff;
}

.live-card.is-active {
  border-color: rgba(255, 159, 28, 0.62);
  box-shadow: 0 0 0 3px rgba(255, 159, 28, 0.12);
}

.live-metrics,
.live-start-row,
.live-manual-form,
.live-end-form {
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 8px;
}

#tab-live,
.live-card {
  min-width: 0;
  max-width: 100%;
}

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

.live-metrics div {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.live-metrics span,
.live-session-row span,
.live-active-box span {
  color: var(--muted);
  font-size: 0.78rem;
}

.live-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.02rem;
}

.live-start-row,
.live-end-form {
  grid-template-columns: minmax(0, 1fr);
}

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

.live-manual-form .wide {
  grid-column: 1 / -1;
}

.live-start-row label,
.live-manual-form label,
.live-end-form label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.live-start-row input,
.live-start-row select,
.live-manual-form input,
.live-manual-form select,
.live-end-form input {
  min-width: 0;
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.live-start-row > button,
.live-manual-form > button,
.live-end-form > button {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}

.live-active-box,
.live-session-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(37, 84, 199, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.live-active-box {
  display: grid;
}

.live-session-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.live-session-row > div:last-child {
  justify-items: end;
}

.compact-head {
  margin-top: 6px;
}

.performance-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.schedule-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.schedule-month-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.schedule-month-tools .icon-action {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 900;
}

.schedule-month-tools span {
  min-width: 86px;
  text-align: center;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 900;
}

.schedule-store-head,
.schedule-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.schedule-store-head {
  min-width: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.schedule-store-head strong,
.schedule-store-head span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.schedule-row {
  min-height: 58px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.schedule-row:last-child {
  border-bottom: 0;
}

.support-tag {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
}

.schedule-day-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.schedule-day-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  min-height: 68px;
  border-bottom: 1px solid var(--line);
}

.schedule-day-row:last-child {
  border-bottom: 0;
}

.schedule-date-cell {
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 10px;
  border-right: 1px solid var(--line);
  background: #fbfcfd;
}

.schedule-date-cell strong {
  font-size: 1rem;
}

.schedule-date-cell span {
  color: var(--muted);
  font-size: 0.78rem;
}

.schedule-shift-list {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px;
  overflow-x: auto;
}

.schedule-shift-chip {
  min-width: 70px;
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #eaf2ff;
  color: #315180;
}

.schedule-shift-chip.rest {
  background: #f0f1f3;
  color: #6b7280;
}

.schedule-shift-chip.support {
  background: #fff6df;
  color: #9a6200;
}

.schedule-shift-chip strong {
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
}

.schedule-shift-chip span {
  font-size: 0.76rem;
  font-weight: 800;
}

.personal-schedule-mini {
  grid-column: 1 / -1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.personal-schedule-cell {
  min-width: 0;
  width: 100%;
  min-height: 52px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 5px 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #f3f4f6;
  color: #6b7280;
  font-family: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

.personal-schedule-cell:active {
  transform: scale(0.97);
}

.personal-schedule-cell b,
.personal-schedule-cell em,
.personal-schedule-cell small {
  line-height: 1;
}

.personal-schedule-cell b {
  font-size: 0.7rem;
}

.personal-schedule-cell em {
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 900;
}

.personal-schedule-cell small {
  color: currentColor;
  font-size: 0.58rem;
  opacity: 0.75;
}

.personal-schedule-cell.full {
  background: #dcfce7;
  color: #15803d;
}

.personal-schedule-cell.early {
  background: #dbeafe;
  color: #1d4ed8;
}

.personal-schedule-cell.middle {
  background: #fef3c7;
  color: #b45309;
}

.personal-schedule-cell.late {
  background: #ede9fe;
  color: #6d28d9;
}

.personal-schedule-cell.rest,
.personal-schedule-cell.empty,
.personal-schedule-cell.unscheduled {
  background: #f3f4f6;
  color: #6b7280;
}

.personal-schedule-cell.support {
  border-color: #f59e0b;
}

.schedule-matrix {
  --schedule-cell-size: 28px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.schedule-matrix-head,
.schedule-matrix-row {
  width: fit-content;
  min-width: 100%;
  display: grid;
  grid-template-columns: 44px max-content;
  align-items: stretch;
}

.schedule-matrix-head {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.schedule-matrix-row {
  border-bottom: 1px solid #eef2f7;
}

.schedule-matrix-row:last-child {
  border-bottom: 0;
}

.schedule-matrix-date-head,
.schedule-matrix-date {
  position: sticky;
  left: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  min-height: 32px;
  padding: 4px 3px;
  border-right: 1px solid var(--line);
  background: #fbfcfd;
  text-align: center;
}

.schedule-matrix-date-head {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.schedule-matrix-date strong {
  font-size: 0.72rem;
  line-height: 1.05;
}

.schedule-matrix-date small {
  color: var(--blue);
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
}

.schedule-matrix-date span {
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.05;
}

.schedule-matrix-staff-heads,
.schedule-matrix-cells {
  display: grid;
  grid-template-columns: repeat(var(--schedule-staff-count), var(--schedule-cell-size));
  gap: 4px;
  align-items: center;
  min-width: max-content;
  padding: 5px 6px;
}

.schedule-matrix-staff,
.schedule-matrix-staff-heads span,
.schedule-matrix-cell {
  width: var(--schedule-cell-size);
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.schedule-matrix-staff {
  padding: 0;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.schedule-matrix-staff:active {
  transform: scale(0.96);
}

.schedule-matrix-staff,
.schedule-matrix-staff-heads span {
  background: #eef2ff;
  color: var(--blue);
}

.schedule-matrix-cell {
  border: 1px solid transparent;
  background: #f3f4f6;
  color: #6b7280;
}

.schedule-matrix-cell.full {
  background: #dcfce7;
  color: #15803d;
}

.schedule-matrix-cell.early {
  background: #dbeafe;
  color: #1d4ed8;
}

.schedule-matrix-cell.middle {
  background: #fef3c7;
  color: #b45309;
}

.schedule-matrix-cell.late {
  background: #ede9fe;
  color: #6d28d9;
}

.schedule-matrix-cell.rest,
.schedule-matrix-cell.empty {
  background: #f3f4f6;
  color: #6b7280;
}

.schedule-matrix-cell.support {
  border-color: #f59e0b;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.18);
}

.schedule-editor {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
}

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

.schedule-editor-card {
  width: min(100%, 460px);
  padding: 16px;
  border-radius: 20px 20px 16px 16px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.schedule-editor-form {
  display: grid;
  gap: 12px;
}

.schedule-editor-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.schedule-editor-form select {
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

.bottom-tabs {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  width: min(100%, 460px);
  height: calc(64px + env(safe-area-inset-bottom));
  min-height: calc(64px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: 48px;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -10px 24px rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(12px);
  contain: layout paint;
}

.bottom-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  padding: 0 2px;
  overflow: hidden;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  word-break: keep-all;
  -webkit-tap-highlight-color: transparent;
}

.bottom-tabs button.active {
  background: var(--blue);
  color: #ffffff;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  left: 18px;
  z-index: 30;
  width: min(420px, calc(100% - 36px));
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.92);
  color: #ffffff;
  text-align: center;
  box-shadow: var(--shadow);
}

.permission-sheet {
  position: fixed;
  inset: 0;
  z-index: 76;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(3px);
}

.permission-card {
  width: min(100%, 430px);
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.24);
}

.permission-message {
  margin: 0;
  color: #334155;
  font-size: 0.88rem;
  line-height: 1.65;
}

.permission-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px 14px 12px 30px;
  border-radius: 16px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.55;
}

.app-update-banner {
  position: fixed;
  right: 12px;
  bottom: calc(78px + env(safe-area-inset-bottom));
  left: 12px;
  z-index: 75;
  width: min(436px, calc(100% - 24px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0 auto;
  padding: 12px;
  border: 1px solid rgba(37, 84, 199, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 38px rgba(17, 24, 39, 0.18);
}

.app-update-banner strong,
.app-update-banner span {
  display: block;
}

.app-update-banner strong {
  font-size: 0.9rem;
}

.app-update-banner span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.app-update-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.app-update-actions .primary-action,
.app-update-actions .ghost-action {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
}

.busy-card {
  width: min(320px, 100%);
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 22px 18px;
  border-radius: 18px;
  background: #ffffff;
  color: var(--ink);
  text-align: center;
  box-shadow: var(--shadow);
}

.busy-card small {
  color: var(--muted);
  line-height: 1.55;
}

.busy-spinner {
  width: 34px;
  height: 34px;
  border: 4px solid #dbeafe;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: busy-spin 0.8s linear infinite;
}

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

.beauty-editor {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.58);
}

.beauty-card {
  width: min(100%, 460px);
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.beauty-canvas {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  background: #111827;
  object-fit: contain;
}

.beauty-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.beauty-presets button {
  min-height: 38px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 800;
}

.beauty-presets button.active {
  background: var(--blue);
  color: #ffffff;
}

.beauty-slider {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.beauty-slider span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.beauty-slider input {
  width: 100%;
  accent-color: var(--blue);
}

.mobile-preview {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.76);
}

.appointment-detail-sheet {
  position: fixed;
  inset: 0;
  z-index: 72;
  display: grid;
  align-items: end;
  padding: 14px;
  background: rgba(15, 23, 42, 0.68);
}

.appointment-detail-card {
  width: min(100%, 440px);
  max-height: calc(100vh - 34px);
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.appointment-detail-body {
  min-height: 0;
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: 12px;
}

.detail-customer-card,
.detail-note-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

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

.detail-grid div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.detail-grid span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.detail-grid strong,
.detail-note-card p {
  margin: 0;
  overflow-wrap: anywhere;
}

.detail-note-card p {
  color: var(--muted);
  line-height: 1.55;
}

.detail-actions {
  position: sticky;
  bottom: 0;
  padding-top: 4px;
  background: linear-gradient(180deg, rgba(255,255,255,0.72), #ffffff 34%);
}

.mobile-preview-card {
  width: min(100%, 440px);
  max-height: calc(100vh - 32px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.mobile-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.mobile-preview-head div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.mobile-preview-head strong,
.mobile-preview-head small {
  overflow-wrap: anywhere;
}

.mobile-preview-head small {
  color: var(--muted);
}

.mobile-preview-head .ghost-action {
  min-height: 36px;
  padding: 0 12px;
}

.mobile-preview-body {
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 10px;
  background: #0f172a;
}

.mobile-preview-body img {
  max-width: 100%;
  max-height: calc(100vh - 126px);
  object-fit: contain;
}

@media (min-width: 720px) {
  .mobile-shell {
    margin-top: 20px;
    margin-bottom: 20px;
    min-height: calc(100vh - 40px);
    border: 1px solid var(--line);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
  }

  .bottom-tabs {
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0 0 28px 28px;
  }
}

/* 商用级员工端 UI 规范层：只覆盖视觉，不改变业务交互。 */
:root {
  --blue: #2f5be7;
  --blue-dark: #111c3d;
  --cyan: #13b8a6;
  --green: #18a058;
  --orange: #f59e0b;
  --red: #e5484d;
  --ink: #101828;
  --muted: #667085;
  --line: #d9e2ef;
  --soft: #f3f6fb;
  --card: #ffffff;
  --surface: #f6f8fb;
  --surface-strong: #eef3f9;
  --shadow: 0 18px 42px rgba(16, 24, 40, 0.12);
  --shadow-card: 0 10px 28px rgba(16, 24, 40, 0.08);
  --shadow-soft: 0 6px 18px rgba(16, 24, 40, 0.06);
}

html,
body {
  background: var(--surface-strong);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.mobile-shell {
  background:
    linear-gradient(180deg, #fbfcff 0, var(--surface) 220px),
    var(--surface);
}

.login-card {
  width: min(100%, 360px);
  border: 1px solid rgba(217, 226, 239, 0.95);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.app-view {
  padding: env(safe-area-inset-top) 14px calc(92px + env(safe-area-inset-bottom));
}

.mobile-header {
  margin: 0 -14px 2px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid rgba(217, 226, 239, 0.78);
  background: rgba(250, 252, 255, 0.92);
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
}

.mobile-header > div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.mobile-header h1 {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #0b1220;
  font-size: 1.72rem;
  line-height: 1.08;
  font-weight: 900;
}

.mobile-header p {
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  color: #697586;
  font-size: 0.9rem;
  line-height: 1.42;
}

.eyebrow {
  width: fit-content;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(47, 91, 231, 0.1);
  color: #2748bb;
  font-size: 0.72rem;
  letter-spacing: 0;
}

.status-strip,
.metrics-row,
.today-workbench {
  gap: 10px;
}

.status-card,
.metric-card,
.appointment-card,
.current-card,
.step-card,
.client-card,
.stock-card,
.work-card,
.performance-card,
.profile-card,
.checkin-card,
.workday-card,
.compliance-card,
.my-dashboard-card,
.account-card,
.schedule-card,
.schedule-store-section,
.staff-profile-card,
.password-panel {
  border-color: rgba(217, 226, 239, 0.95);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-card);
}

.status-card,
.metric-card {
  min-height: 78px;
  padding: 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.96));
}

.status-card strong,
.metric-card strong {
  color: #0b1220;
  font-size: 1.2rem;
  line-height: 1.18;
  font-weight: 900;
}

.metric-card small,
.status-card span,
.metric-card span {
  color: #667085;
  line-height: 1.35;
}

.metric-card.is-clickable,
.workbench-tile.is-clickable,
.appointment-open {
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.metric-card.is-clickable:active,
.workbench-tile.is-clickable:active,
.appointment-open:active,
.upload-card:active,
.primary-action:active,
.secondary-action:active,
.ghost-action:active {
  transform: scale(0.985);
}

.workbench-hero {
  min-height: 126px;
  padding: 16px;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background:
    linear-gradient(135deg, #101a3a 0%, #2f5be7 64%, #13b8a6 100%);
  color: #ffffff;
  box-shadow: 0 18px 38px rgba(47, 91, 231, 0.24);
}

.workbench-hero.bd {
  background:
    linear-gradient(135deg, #092f35 0%, #0f766e 58%, #2f5be7 100%);
  box-shadow: 0 18px 38px rgba(19, 184, 166, 0.2);
}

.workbench-hero .eyebrow {
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.94);
}

.workbench-hero h2 {
  margin-top: 4px;
  color: #ffffff;
  font-size: 1.3rem;
  line-height: 1.22;
  font-weight: 900;
}

.workbench-hero p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
}

.workbench-badge {
  width: 66px;
  min-height: 66px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.workbench-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.workbench-actions button {
  min-width: 0;
  min-height: 42px;
  padding: 0 8px;
  overflow: hidden;
  border-radius: 12px;
  text-overflow: ellipsis;
}

.workbench-grid {
  gap: 9px;
}

.workbench-tile {
  min-height: 92px;
  padding: 12px;
  border-color: rgba(217, 226, 239, 0.95);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.workbench-tile span {
  color: #697586;
  font-size: 0.74rem;
}

.workbench-tile strong {
  color: #0b1220;
  font-size: 1.08rem;
  line-height: 1.22;
}

.workbench-tile small {
  display: -webkit-box;
  overflow: hidden;
  color: #667085;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.workbench-tile.ok {
  border-color: rgba(24, 160, 88, 0.22);
  background: #f2fbf6;
}

.workbench-tile.warn {
  border-color: rgba(245, 158, 11, 0.24);
  background: #fff8eb;
}

.workbench-tile.danger {
  border-color: rgba(229, 72, 77, 0.24);
  background: #fff4f4;
}

.section-head {
  margin: 20px 0 10px;
}

.tab-panel {
  padding-bottom: 18px;
}

.section-head h2 {
  color: #101828;
  font-size: 1.03rem;
  line-height: 1.25;
  font-weight: 900;
}

.section-head span {
  color: #667085;
  font-size: 0.84rem;
}

.primary-action,
.secondary-action,
.ghost-action,
.text-action,
.icon-action {
  -webkit-tap-highlight-color: transparent;
}

.primary-action,
.secondary-action,
.ghost-action {
  min-height: 46px;
  border-radius: 12px;
  font-weight: 900;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.primary-action {
  background: #2f5be7;
  box-shadow: 0 10px 22px rgba(47, 91, 231, 0.22);
}

.secondary-action {
  background: #eaf1ff;
  color: #264fcf;
}

.ghost-action {
  border-color: rgba(217, 226, 239, 1);
  background: #ffffff;
  color: #344054;
}

.text-action {
  color: #2f5be7;
}

.tag {
  min-height: 26px;
  background: #edf2ff;
  color: #2f5be7;
}

.tag.ok {
  background: #e9f8f0;
  color: #11824a;
}

.tag.warn {
  background: #fff4d6;
  color: #a15c00;
}

.tag.danger {
  background: #ffe8e8;
  color: #c92c34;
}

.customer-avatar,
.profile-avatar,
.avatar-button {
  background: linear-gradient(135deg, #111c3d, #2f5be7);
}

.current-card {
  padding: 16px;
  border-color: rgba(47, 91, 231, 0.16);
  background:
    linear-gradient(145deg, rgba(47, 91, 231, 0.08), transparent 48%),
    #ffffff;
}

.appointment-card {
  padding: 13px;
}

.appointment-card.active {
  border-color: rgba(47, 91, 231, 0.55);
  box-shadow: 0 0 0 3px rgba(47, 91, 231, 0.1), var(--shadow-card);
}

.card-main strong,
.customer-top strong {
  color: #101828;
  line-height: 1.3;
}

.mini-meta,
.service-note,
.client-note {
  color: #667085;
}

.profile-hero {
  margin-top: 14px;
  border-color: rgba(47, 91, 231, 0.16);
  background:
    linear-gradient(135deg, rgba(47, 91, 231, 0.1), transparent 56%),
    #ffffff;
}

.profile-kpi,
.dashboard-tile,
.compliance-item,
.account-item,
.workday-step,
.mini-item,
.detail-grid div {
  border: 1px solid rgba(217, 226, 239, 0.8);
  border-radius: 12px;
  background: #f8fafd;
}

.workday-step {
  min-height: 66px;
}

.workday-index {
  background: #e8edf5;
}

.compliance-grid,
.my-dashboard-grid,
.profile-kpis {
  gap: 9px;
}

.hygiene-area-panel {
  padding: 13px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.62);
}

.hygiene-area-item {
  min-height: 72px;
  border: 1px solid rgba(217, 226, 239, 0.76);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
}

.upload-grid {
  gap: 9px;
}

.upload-card {
  position: relative;
  min-height: 98px;
  padding: 12px;
  border-color: rgba(217, 226, 239, 0.95);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.upload-card::before {
  content: "作";
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  border-radius: 10px;
  background: #eef3ff;
  color: #2f5be7;
  font-size: 0.78rem;
  font-weight: 900;
}

.upload-card[data-upload-type="appearance"]::before {
  content: "形";
}

.upload-card[data-upload-type="hygiene"]::before {
  content: "卫";
  background: #e9f8f0;
  color: #11824a;
}

.upload-card[data-upload-type="review"]::before {
  content: "评";
  background: #fff4d6;
  color: #a15c00;
}

.upload-card[data-upload-type="bd_visit"]::before {
  content: "外";
  background: #e6fbf8;
  color: #0f766e;
}

.upload-card span {
  color: #667085;
  font-size: 0.74rem;
}

.upload-card strong {
  color: #101828;
  font-size: 0.98rem;
}

.upload-summary {
  gap: 7px;
}

.upload-stat {
  min-height: 62px;
  border-color: rgba(217, 226, 239, 0.95);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.work-grid {
  gap: 10px;
}

.work-card {
  min-height: 168px;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  box-shadow: var(--shadow-card);
}

.work-card-body {
  gap: 4px;
}

.work-card-body strong {
  line-height: 1.28;
}

.staff-profile-form input,
.staff-profile-form select,
.staff-profile-form textarea,
.login-card select,
.login-card input,
.schedule-editor-form select,
.live-start-row input,
.live-start-row select,
.live-manual-form input,
.live-manual-form select,
.live-end-form input,
.availability-form input,
.availability-form select {
  border-color: #d9e2ef;
  border-radius: 12px;
  background: #ffffff;
  color: #101828;
  outline: 0;
}

.staff-profile-form input:focus,
.staff-profile-form select:focus,
.staff-profile-form textarea:focus,
.login-card select:focus,
.login-card input:focus,
.schedule-editor-form select:focus,
.live-start-row input:focus,
.live-start-row select:focus,
.live-manual-form input:focus,
.live-manual-form select:focus,
.live-end-form input:focus,
.availability-form input:focus,
.availability-form select:focus {
  border-color: rgba(47, 91, 231, 0.62);
  box-shadow: 0 0 0 3px rgba(47, 91, 231, 0.12);
}

.personal-schedule-mini {
  gap: 5px;
  padding: 10px;
  border-color: rgba(217, 226, 239, 0.95);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}

.personal-schedule-cell {
  min-height: 56px;
  border-radius: 10px;
}

.personal-schedule-cell b {
  font-size: 0.72rem;
}

.personal-schedule-cell em {
  font-size: 0.84rem;
}

.schedule-store-section {
  overflow: hidden;
}

.schedule-store-head {
  padding: 2px 2px 10px;
}

.schedule-matrix {
  --schedule-cell-size: 30px;
  border-color: rgba(217, 226, 239, 0.95);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.schedule-matrix-head {
  background: #f5f8fc;
}

.schedule-matrix-date-head,
.schedule-matrix-date {
  background: #f9fbfe;
}

.schedule-matrix-staff,
.schedule-matrix-cell {
  border-radius: 9px;
}

.schedule-matrix-staff {
  background: #eaf1ff;
  color: #264fcf;
}

.schedule-matrix-cell {
  font-size: 0.74rem;
}

.live-card {
  border-color: rgba(47, 91, 231, 0.16);
}

.live-metrics div,
.live-active-box,
.live-session-row {
  border-color: rgba(217, 226, 239, 0.8);
  border-radius: 12px;
  background: #ffffff;
}

.bottom-tabs {
  height: calc(74px + env(safe-area-inset-bottom));
  min-height: calc(74px + env(safe-area-inset-bottom));
  grid-auto-rows: 58px;
  gap: 2px;
  padding: 7px 8px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(217, 226, 239, 0.9);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -16px 34px rgba(16, 24, 40, 0.1);
}

.bottom-tabs button {
  height: 58px;
  min-height: 58px;
  max-height: 58px;
  flex-direction: column;
  gap: 3px;
  padding: 5px 1px;
  border-radius: 13px;
  color: #667085;
  font-size: 0.68rem;
  line-height: 1;
}

.tab-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #eef2f7;
  color: #475467;
  font-size: 0.72rem;
  font-weight: 900;
}

.tab-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-tabs button.active {
  background: #2f5be7;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(47, 91, 231, 0.24);
}

.bottom-tabs button.active .tab-icon {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.toast {
  bottom: calc(96px + env(safe-area-inset-bottom));
  border-radius: 14px;
  background: rgba(16, 24, 40, 0.94);
  box-shadow: 0 16px 34px rgba(16, 24, 40, 0.22);
}

.busy-card,
.permission-card,
.beauty-card,
.schedule-editor-card,
.appointment-detail-card,
.mobile-preview-card {
  border: 1px solid rgba(217, 226, 239, 0.9);
  border-radius: 18px;
  box-shadow: 0 26px 70px rgba(16, 24, 40, 0.24);
}

@media (max-width: 374px) {
  .app-view {
    padding-right: 10px;
    padding-left: 10px;
  }

  .mobile-header {
    margin-right: -10px;
    margin-left: -10px;
    padding-right: 12px;
    padding-left: 12px;
  }

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

  .bottom-tabs {
    padding-right: 4px;
    padding-left: 4px;
  }

  .bottom-tabs button {
    font-size: 0.64rem;
  }

  .tab-icon {
    width: 20px;
    height: 20px;
    border-radius: 8px;
  }
}

@media (min-width: 720px) {
  .bottom-tabs {
    height: calc(76px + env(safe-area-inset-bottom));
    min-height: calc(76px + env(safe-area-inset-bottom));
  }
}
