:root {
  --app-bg: #f6f8fa;
  --app-panel: #ffffff;
  --app-text: #1f2328;
  --app-muted: #68707c;
  --app-line: #d0d7de;
  --app-line-strong: #b8c0cc;
  --toolbar-bg: #dde3eb;
  --toolbar-link: rgba(0, 0, 0, 0.75);
  --toolbar-hover: rgba(0, 0, 0, 0.08);
  --toolbar-active: rgba(0, 0, 0, 0.11);
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --app-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --content-width: 1180px;
  --content-wide-table-width: 1534px;
  --toolbar-height: 60px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--app-bg);
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--app-bg);
  color: var(--app-text);
  font-family: var(--app-font-family);
  font-size: 16px;
  line-height: 1.5;
}

a,
button {
  font: inherit;
}

.toolbar {
  position: fixed;
  z-index: 1000;
  top: 0;
  right: 0;
  left: 0;
  height: var(--toolbar-height);
  min-height: var(--toolbar-height);
  background: var(--toolbar-bg);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
  transform: translateZ(0);
  user-select: none;
}

.toolbar__inner {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 132px;
  align-items: center;
  gap: 24px;
  height: var(--toolbar-height);
  width: 100%;
  padding: 0 36px;
}

.toolbar__logo-link {
  display: flex;
  align-items: center;
  width: 180px;
  min-width: 0;
  text-decoration: none;
}

.toolbar__logo {
  display: block;
  width: 160px;
  height: 36px;
  object-fit: contain;
  transition: opacity 0.15s ease;
}

.toolbar__logo-link:hover .toolbar__logo,
.toolbar__logo-link:focus-visible .toolbar__logo {
  opacity: 0.85;
}

.toolbar__nav {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  overflow-x: auto;
  scrollbar-width: none;
}

.toolbar__nav::-webkit-scrollbar {
  display: none;
}

.toolbar__nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--toolbar-link);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.toolbar__nav-link + .toolbar__nav-link {
  margin-left: 12px;
}

.toolbar__nav-link + .toolbar__nav-link::before {
  position: absolute;
  left: -6px;
  width: 1px;
  height: 20px;
  background: rgba(15, 23, 42, 0.2);
  content: "";
}

.toolbar__nav-link:hover,
.toolbar__nav-link:focus-visible {
  background: var(--toolbar-hover);
  color: #000000;
  outline: none;
}

.toolbar__nav-link--active,
.toolbar__nav-link[aria-current="page"] {
  background: var(--toolbar-active);
  color: #000000;
}

.toolbar__nav-link--admin {
  color: #ff006e;
  font-weight: 700;
}

.toolbar__nav-link--admin:hover,
.toolbar__nav-link--admin:focus-visible {
  color: #ff4d9a;
}

.toolbar__nav-link--admin.toolbar__nav-link--active,
.toolbar__nav-link--admin[aria-current="page"] {
  color: #ff4d9a;
}

.toolbar__actions {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.toolbar__user-pill {
  display: inline-flex;
  min-width: 0;
  max-width: 88px;
  height: 36px;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  color: rgba(0, 0, 0, 0.72);
}

.toolbar__user-icon,
.toolbar__logout-button {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.toolbar__user-icon {
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.1);
}

.toolbar__user-icon svg,
.toolbar__logout-button svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toolbar__user-name {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar__logout-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(0, 0, 0, 0.7);
  cursor: pointer;
  padding: 0;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.toolbar__logout-button:hover,
.toolbar__logout-button:focus-visible {
  background: rgba(207, 34, 46, 0.1);
  color: #a40e26;
  outline: none;
}

.page {
  min-height: 100vh;
  padding-top: var(--toolbar-height);
}

.auth-page {
  min-height: 100vh;
}

.footer-placeholder {
  height: 800px;
}

.shell {
  width: min(var(--content-width), calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.shell--wide-table {
  width: min(var(--content-wide-table-width), calc(100% - 40px));
}

.shell--home {
  padding: 0;
}

.page-title {
  margin-bottom: 28px;
}

.page-title__eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.page-title h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
}

.page-title__meta {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--app-muted);
}

.table-panel {
  border: 1px solid var(--app-line);
  border-radius: 8px;
  background: var(--app-panel);
  padding: 18px;
}

.operators-offending-appointments,
.customers-appointments {
  margin-top: 18px;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  background: var(--app-panel);
  padding: 18px;
}

.operators-offending-appointments[hidden],
.customers-appointments[hidden] {
  display: none;
}

.operators-offending-appointments__header,
.customers-appointments__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.operators-offending-appointments__header h2,
.customers-appointments__header h2 {
  min-width: 0;
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
}

.operators-offending-appointments__close,
.customers-appointments__close {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--app-line);
  border-radius: 6px;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.operators-offending-appointments__close:hover,
.operators-offending-appointments__close:focus-visible,
.customers-appointments__close:hover,
.customers-appointments__close:focus-visible {
  border-color: rgba(37, 99, 235, 0.42);
  color: var(--accent);
  outline: none;
}

.my-table {
  --my-table-font-family: var(--app-font-family);
}

.table-inline-group {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.table-muted-text {
  color: var(--app-muted);
}

.table-action-btn {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(208, 215, 222, 0.95);
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}

.table-action-btn:hover,
.table-action-btn:focus-visible {
  border-color: rgba(37, 99, 235, 0.42);
  color: var(--accent);
  box-shadow: 0 7px 16px rgba(15, 23, 42, 0.13);
  outline: none;
}

.table-action-btn:active {
  transform: translateY(1px);
}

.table-action-btn:disabled {
  color: #94a3b8;
  opacity: 0.72;
  transform: none;
}

.table-action-btn[aria-busy="true"] {
  cursor: wait;
}

.table-action-btn--with-label {
  width: auto;
  min-width: 68px;
  padding: 0 10px;
}

.table-action-btn__label {
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.table-action-btn--delete {
  color: #dc2626;
}

.table-action-btn--delete:hover,
.table-action-btn--delete:focus-visible {
  border-color: rgba(220, 38, 38, 0.36);
  color: #b91c1c;
}

.customers-appointments-cell__count {
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.elenchi-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 14px;
}

.elenchi-field {
  display: grid;
  gap: 6px;
  min-width: 180px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.elenchi-select {
  min-height: 38px;
  border: 1px solid #b9c6d4;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 0 10px;
}

.elenchi-select:focus-visible {
  border-color: var(--accent);
  outline: 2px solid rgba(37, 99, 235, 0.16);
  outline-offset: 1px;
}

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

.elenchi-action {
  min-height: 38px;
  border: 1px solid var(--app-line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  padding: 0 14px;
}

.elenchi-action:hover,
.elenchi-action:focus-visible {
  border-color: rgba(37, 99, 235, 0.42);
  color: var(--accent);
  outline: none;
}

.elenchi-status {
  min-height: 20px;
  margin: 0 0 10px;
  color: var(--app-muted);
  font-size: 13px;
  font-weight: 700;
}

.table-color-pill {
  display: inline-flex;
  max-width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border: 1px solid rgba(15, 23, 42, 0.22);
  border-radius: 999px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 2px 7px rgba(15, 23, 42, 0.08);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
  vertical-align: middle;
}

.table-color-pill__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-number-select {
  min-width: 54px;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid #b9c6d4;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.table-number-select:focus-visible {
  border-color: #0f766e;
  outline: 2px solid rgba(15, 118, 110, 0.18);
  outline-offset: 1px;
}

.table-number-select:disabled {
  color: #94a3b8;
  cursor: wait;
}

@media (max-width: 760px) {
  .toolbar {
    height: auto;
    min-height: var(--toolbar-height);
  }

  .toolbar__inner {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 10px 14px;
    height: auto;
    min-height: var(--toolbar-height);
    padding: 10px 18px;
  }

  .toolbar__logo-link {
    width: 150px;
  }

  .toolbar__logo {
    width: 138px;
  }

  .toolbar__nav {
    justify-content: flex-end;
  }

  .toolbar__actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .page {
    padding-top: 108px;
  }
}
