:root {
  --bb-bo-bg: #fffaf7;
  --bb-bo-surface: #ffffff;
  --bb-bo-cream: #f7efe8;
  --bb-bo-border: #ead8cf;
  --bb-bo-rose: #bd7d6d;
  --bb-bo-rose-dark: #946052;
  --bb-bo-danger: #9f4f46;
  --bb-bo-text: #172033;
  --bb-bo-muted: #68615c;
  --bb-bo-shadow: 0 18px 48px rgba(148, 96, 82, 0.11);
}

.backoffice-shell,
.auth-page {
  color: var(--bb-bo-text);
  font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.backoffice-shell {
  grid-template-columns: 260px minmax(0, 1fr);
  min-width: 0;
  width: 100%;
  max-width: 100%;
  background: var(--bb-bo-bg);
}

.backoffice-content {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.backoffice-shell .bb-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  padding: 24px;
}

.backoffice-shell .bb-confirm-modal.is-open {
  display: grid;
}

.backoffice-shell .bb-confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 32, 51, 0.48);
}

.backoffice-shell .bb-confirm-modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  padding: 28px;
  border: 1px solid var(--bb-bo-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--bb-bo-shadow);
  text-align: center;
}

.backoffice-shell .bb-confirm-modal-card h2 {
  margin-top: 0;
}

.backoffice-shell .bb-confirm-message {
  color: var(--bb-bo-muted);
}

.backoffice-shell .bb-confirm-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

.backoffice-shell .bb-confirm-cancel,
.backoffice-shell .bb-confirm-accept {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--bb-bo-border);
  border-radius: 8px;
  font: inherit;
  font-weight: 750;
}

.backoffice-shell .bb-confirm-cancel {
  background: #fff;
  color: var(--bb-bo-rose-dark);
}

.backoffice-shell .bb-confirm-cancel[hidden] {
  display: none;
}

.backoffice-shell .bb-confirm-accept {
  border-color: var(--bb-bo-rose-dark);
  background: var(--bb-bo-rose-dark);
  color: #fff;
}

.backoffice-shell .bb-confirm-accept.is-danger {
  border-color: var(--bb-bo-danger);
  background: var(--bb-bo-danger);
}

.bb-modal-open {
  overflow: hidden;
}

.bb-opening-hours-settings {
  display: grid;
  gap: 18px;
  margin-top: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--bb-bo-border);
}

.bb-opening-hours-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.bb-opening-hours-heading h2,
.bb-opening-hours-heading p {
  margin: 0;
}

.bb-opening-hours-heading p {
  margin-top: 6px;
}

.bb-opening-hours-days {
  display: grid;
  gap: 10px;
}

.bb-opening-hours-day {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(110px, 0.65fr) repeat(2, minmax(150px, 0.8fr));
  gap: 16px;
  align-items: start;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--bb-bo-border);
  border-radius: 8px;
}

.bb-opening-hours-day legend {
  float: left;
  width: 100%;
  padding: 10px 0 0;
  font-weight: 800;
}

.bb-opening-hours-open-toggle {
  margin-top: 10px;
}

.bb-opening-hours-time label {
  font-size: 0.85rem;
}

.bb-opening-hours-time input {
  min-width: 0;
}

.bb-opening-hours-day.is-closed .bb-opening-hours-time {
  opacity: 0.52;
}

.bb-opening-hours-settings.is-disabled .bb-opening-hours-days {
  opacity: 0.65;
}

.bb-holiday-settings {
  display: grid;
  gap: 16px;
  margin-top: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--bb-bo-border);
}

.bb-holiday-settings-heading h2,
.bb-holiday-settings-heading p {
  margin: 0;
}

.bb-holiday-settings-heading p {
  margin-top: 6px;
}

.bb-holiday-policy-options {
  display: grid;
  grid-template-columns: minmax(0, 400px);
  gap: 10px;
}

.bb-holiday-policy-option {
  min-height: 52px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--bb-bo-border);
  border-radius: 6px;
  background: var(--bb-bo-surface);
}

.bb-upcoming-holidays {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.bb-upcoming-holiday-list {
  display: grid;
}

.bb-upcoming-holiday-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--bb-bo-border);
}

.bb-upcoming-holiday-item:last-child {
  border-bottom: 0;
}

.bb-upcoming-holiday-item > div:first-child {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.bb-upcoming-holiday-item time,
.bb-upcoming-holiday-item strong {
  color: var(--bb-bo-text);
}

.bb-upcoming-holiday-action {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.bb-upcoming-holiday-action form {
  margin: 0;
}

.bb-backoffice-content,
.bb-bo-page {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.backoffice-content img,
.auth-page img {
  max-width: 100%;
  height: auto;
}

.backoffice-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(148, 96, 82, 0.18);
}

.backoffice-topbar strong {
  color: var(--bb-bo-text);
}

.backoffice-topbar .muted {
  display: block;
  margin-top: 4px;
}

.backoffice-shell .sidebar {
  border-right: 1px solid rgba(148, 96, 82, 0.18);
  background: #f1ebe7;
  color: #302b29;
}

.backoffice-shell .sidebar h2 {
  color: #3d3531;
}

.backoffice-shell .sidebar a {
  margin-bottom: 3px;
  padding: 10px 12px;
  color: #514844;
  border-radius: 12px;
  font-weight: 700;
}

.backoffice-shell .sidebar a:hover,
.backoffice-shell .sidebar a:focus {
  background: rgba(255, 255, 255, 0.78);
  color: var(--bb-bo-rose-dark);
  text-decoration: none;
}

.bb-backoffice-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  scrollbar-color: rgba(148, 96, 82, 0.32) transparent;
}

.sidebar-subtle {
  margin-top: 24px;
  opacity: 0.75;
  font-size: 14px;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 20%, rgba(243, 217, 210, 0.7), transparent 240px),
    linear-gradient(180deg, #fffaf7, #fff);
}

.auth-card {
  width: min(460px, 100%);
  padding: clamp(28px, 5vw, 42px);
  border: 1px solid var(--bb-bo-border);
  border-radius: 24px;
  background: var(--bb-bo-surface);
  box-shadow: 0 24px 70px rgba(148, 96, 82, 0.14);
  text-align: center;
}

.auth-card .brand {
  margin: 0 0 8px;
  color: var(--bb-bo-rose-dark);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-card h1 {
  margin: 0 0 24px;
  color: var(--bb-bo-text);
  font-size: clamp(28px, 6vw, 38px);
  letter-spacing: -0.03em;
}

.auth-card a,
.backoffice-content a:not(.button):not(.slot):not(.bb-backoffice-btn) {
  color: var(--bb-bo-rose-dark);
  font-weight: 750;
}

.auth-card a:hover,
.backoffice-content a:not(.button):not(.slot):not(.bb-backoffice-btn):hover {
  color: #7f5045;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.metric,
.detail-grid div,
.dashboard-section,
.backoffice-content .card,
.clinic-photo-card {
  border: 1px solid var(--bb-bo-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(148, 96, 82, 0.08);
}

.metric {
  padding: 16px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.dashboard-section {
  width: 100%;
  margin-top: 2rem;
  padding: clamp(18px, 3vw, 26px);
}

.dashboard-section h2 {
  margin-top: 0;
}

.bb-backoffice-dashboard {
  display: grid;
  gap: 18px;
}

.bb-backoffice-dashboard .page-title {
  margin-bottom: 2px;
}

.bb-backoffice-dashboard-filters {
  margin-bottom: 0;
  padding: 14px;
  border-radius: 14px;
  background: #fffdfb;
  box-shadow: none;
}

.bb-backoffice-dashboard-filters .bb-backoffice-field {
  min-width: 170px;
}

.bb-backoffice-dashboard-filters label {
  color: var(--bb-bo-muted);
  font-size: 13px;
  font-weight: 850;
}

.bb-backoffice-dashboard-filters select {
  min-height: 42px;
}

.bb-backoffice-dashboard-filter-submit {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  min-height: 42px;
  border-color: var(--bb-bo-rose-dark) !important;
  background: var(--bb-bo-rose-dark) !important;
  color: #fff !important;
  font-weight: 800;
}

.bb-backoffice-dashboard-filter-submit:hover,
.bb-backoffice-dashboard-filter-submit:focus-visible {
  border-color: #704247 !important;
  background: #704247 !important;
  color: #fff !important;
}

.bb-backoffice-dashboard-filters .bb-backoffice-btn-primary,
.bb-backoffice-dashboard-filters .bb-bo-btn-primary {
  min-height: 42px;
  border-color: var(--bb-bo-rose-dark);
  background: var(--bb-bo-rose-dark);
  box-shadow: 0 10px 22px rgba(148, 96, 82, 0.18);
}

.bb-backoffice-dashboard-filters .bb-backoffice-btn-primary:hover,
.bb-backoffice-dashboard-filters .bb-bo-btn-primary:hover {
  background: #7f5045;
}

.bb-backoffice-dashboard-section {
  margin-top: 0;
  padding: 18px;
  border-radius: 14px;
  box-shadow: none;
}

.bb-bo-reminder-status {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 5px;
  background: #f2f4f6;
  color: #555d67;
  font-size: 12px;
  font-weight: 750;
}

.bb-bo-reminder-status-sent {
  background: var(--bb-bo-positive-soft);
  color: var(--bb-bo-positive-text);
}

.bb-bo-reminder-status-no-email {
  background: #fff3df;
  color: #815d1f;
}

.bb-bo-email-preview {
  display: grid;
  gap: 18px;
}

.bb-bo-email-preview-meta,
.bb-bo-email-preview-body {
  max-width: 760px;
}

.bb-bo-email-preview-meta dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 16px;
  margin: 0;
}

.bb-bo-email-preview-meta dt {
  color: var(--bb-bo-muted);
  font-weight: 750;
}

.bb-bo-email-preview-meta dd {
  margin: 0;
  color: var(--bb-bo-text);
}

.bb-bo-email-preview-message {
  width: 100%;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--bb-bo-border);
  border-radius: 6px;
  background: #fff;
}

.bb-bo-email-preview-plain {
  overflow-x: auto;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--bb-bo-border);
  border-radius: 6px;
  background: #f7f8f9;
  color: var(--bb-bo-text);
  font: 13px/1.55 Consolas, monospace;
  white-space: pre-wrap;
}

.bb-backoffice-dashboard-section h2 {
  margin-bottom: 14px;
  color: var(--bb-bo-text);
  font-size: 20px;
  line-height: 1.2;
}

.bb-backoffice-dashboard-table-shell {
  width: 100%;
  overflow-x: auto;
}

.bb-backoffice-dashboard-table-shell table {
  border-radius: 14px;
  box-shadow: none;
}

.bb-backoffice-dashboard-table-shell th {
  background: #fff7f4;
  color: var(--bb-bo-rose-dark);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.bb-backoffice-dashboard-table-shell td {
  color: var(--bb-bo-text);
}

.bb-backoffice-dashboard-table-shell th:last-child,
.bb-backoffice-dashboard-table-shell td:last-child {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

.bb-backoffice-dashboard .table-actions {
  justify-content: flex-end;
  gap: 8px;
}

.bb-backoffice-dashboard-table-shell table a:not(.bb-backoffice-btn),
.bb-backoffice-dashboard-table-shell table .bb-backoffice-btn {
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid rgba(148, 96, 82, 0.28);
  border-radius: 999px;
  background: #fff !important;
  color: var(--bb-bo-rose-dark) !important;
  box-shadow: none;
  font-size: 13px;
  font-weight: 850;
}

.bb-backoffice-dashboard-table-shell table a:not(.bb-backoffice-btn):hover,
.bb-backoffice-dashboard-table-shell table .bb-backoffice-btn:hover {
  border-color: var(--bb-bo-rose);
  background: var(--bb-bo-cream) !important;
  color: var(--bb-bo-rose-dark) !important;
}

.bb-backoffice-dashboard .status {
  background: #fff4f1;
  color: var(--bb-bo-rose-dark);
  font-size: 12px;
}

.actions,
.bb-backoffice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.bb-backoffice-actions-start {
  justify-content: flex-start;
}

.bb-backoffice-actions form,
.table-actions form,
.backoffice-content table form {
  display: inline-flex;
  width: auto;
  margin: 0;
}

.actions h1 {
  margin: 0;
}

.actions > div {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.bb-backoffice-btn,
.backoffice-shell .button,
.backoffice-shell button,
.backoffice-shell input[type="submit"],
.auth-page button,
.auth-page input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: max-content;
  min-height: 42px;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--bb-bo-rose), var(--bb-bo-rose-dark));
  color: #fff !important;
  font: inherit;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(148, 96, 82, 0.22);
}

.bb-backoffice-btn:hover,
.backoffice-shell .button:hover,
.backoffice-shell button:hover,
.auth-page button:hover {
  background: linear-gradient(135deg, #aa6f61, #7f5045);
  color: #fff !important;
  text-decoration: none;
}

.bb-backoffice-btn:disabled,
.backoffice-shell button:disabled,
.auth-page button:disabled {
  border-color: rgba(148, 96, 82, 0.18);
  background: #e5d8d2 !important;
  color: #806a62 !important;
  cursor: not-allowed;
  opacity: 0.78;
  box-shadow: none;
}

.bb-backoffice-btn-secondary,
.bb-backoffice-btn-outline,
.backoffice-shell .bb-backoffice-btn-secondary,
.backoffice-shell .bb-backoffice-btn-outline,
.backoffice-shell .button.secondary,
.backoffice-shell button.secondary,
.backoffice-shell a.button.secondary {
  border-color: rgba(148, 96, 82, 0.28);
  background: #fff !important;
  color: var(--bb-bo-rose-dark) !important;
  box-shadow: none;
}

.bb-backoffice-btn-secondary:hover,
.bb-backoffice-btn-outline:hover,
.backoffice-shell .button.secondary:hover,
.backoffice-shell button.secondary:hover {
  border-color: var(--bb-bo-rose);
  background: var(--bb-bo-cream) !important;
  color: var(--bb-bo-rose-dark) !important;
}

.bb-backoffice-btn-danger,
.backoffice-shell .bb-backoffice-btn-danger,
.backoffice-shell .button.danger,
.backoffice-shell button.danger {
  border-color: var(--bb-bo-danger);
  background: var(--bb-bo-danger) !important;
  color: #fff !important;
  box-shadow: 0 12px 26px rgba(159, 79, 70, 0.18);
}

.bb-backoffice-btn-sm,
.backoffice-content table a,
.backoffice-content table button {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.backoffice-content table a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: max-content;
  border: 1px solid rgba(148, 96, 82, 0.28);
  background: #fff;
  color: var(--bb-bo-rose-dark) !important;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.backoffice-content table a:hover {
  border-color: var(--bb-bo-rose);
  background: var(--bb-bo-cream);
  color: var(--bb-bo-rose-dark) !important;
}

.backoffice-content table a[href*="deactivate"],
.backoffice-content table a[href*="delete"],
.backoffice-content table a[href*="cancel"] {
  border-color: rgba(159, 79, 70, 0.34);
  color: var(--bb-bo-danger) !important;
}

.backoffice-content table a.bb-backoffice-btn-danger {
  border-color: var(--bb-bo-danger);
  background: var(--bb-bo-danger) !important;
  color: #fff !important;
}

.backoffice-content table a.bb-backoffice-btn-danger:hover {
  border-color: #7f3f38;
  background: #7f3f38 !important;
  color: #fff !important;
}

.bb-backoffice-back-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.status {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff4f1;
  color: var(--bb-bo-rose-dark);
  font-size: 13px;
  font-weight: 800;
}

.backoffice-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--bb-bo-border);
  border-radius: 16px;
  background: #fff;
}

.backoffice-content th,
.backoffice-content td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 96, 82, 0.12);
  text-align: left;
  vertical-align: middle;
}

.backoffice-content th {
  background: #fff7f4;
  color: var(--bb-bo-rose-dark);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.backoffice-content tr:last-child td {
  border-bottom: 0;
}

.bb-backoffice-table-wrapper {
  display: block;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-radius: 16px;
  -webkit-overflow-scrolling: touch;
}

.bb-backoffice-table-wrapper:focus-visible,
.bb-backoffice-dashboard-table-shell:focus-visible {
  outline: 3px solid rgba(169, 104, 109, 0.3);
  outline-offset: 2px;
}

.bb-backoffice-table-wrapper table {
  min-width: 100%;
  overflow: visible;
}

.bb-backoffice-table-wrapper .bb-bo-table {
  width: 100%;
  border-collapse: separate;
}

.bb-client-type-fieldset {
  min-width: 0;
  margin: 22px 0;
  padding: 14px;
  border: 1px solid var(--bb-bo-border);
  border-radius: 8px;
}

.bb-client-type-fieldset legend {
  padding: 0 7px;
  color: var(--bb-bo-text);
  font-weight: 800;
}

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

.bb-client-type-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid var(--bb-bo-border);
  border-radius: 6px;
  background: var(--bb-bo-surface);
  color: var(--bb-bo-text);
  font-weight: 750;
  cursor: pointer;
}

.bb-client-type-option:hover,
.bb-client-type-option:has(input:checked) {
  border-color: var(--bb-bo-rose);
  background: var(--bb-bo-cream);
}

.bb-client-type-option:focus-within {
  outline: 3px solid rgba(169, 104, 109, 0.3);
  outline-offset: 2px;
}

.bb-client-type-option input[type="radio"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--bb-bo-rose-dark);
}

.bb-closure-introduction {
  max-width: 780px;
  margin: -4px 0 20px;
  color: var(--bb-bo-muted);
}

.bb-closure-introduction p {
  margin: 0;
}

.bb-closure-warning {
  margin-top: 10px !important;
  padding-left: 12px;
  border-left: 3px solid var(--bb-bo-rose);
  color: var(--bb-bo-rose-dark);
}

.bb-closure-conflicts {
  margin-top: 28px;
}

.bb-closure-conflicts h2 {
  margin-bottom: 14px;
}

.bb-closure-conflicts-table {
  min-width: 1120px;
}

.bb-table-nowrap {
  white-space: nowrap;
  overflow-wrap: normal !important;
}

.bb-table-email {
  min-width: 150px;
  word-break: normal;
  overflow-wrap: anywhere;
}

.bb-bo-history-table {
  width: 100%;
  min-width: 1020px !important;
  table-layout: fixed;
}

.bb-bo-history-col-date { width: 92px; }
.bb-bo-history-col-time { width: 62px; }
.bb-bo-history-col-client { width: 12%; }
.bb-bo-history-col-service { width: auto; }
.bb-bo-history-col-value { width: 78px; }
.bb-bo-history-col-phone { width: 108px; }
.bb-bo-history-col-email { width: 15%; }
.bb-bo-history-col-status { width: 150px; }
.bb-bo-history-col-actions { width: 66px; }

.bb-bo-history-table th,
.bb-bo-history-table td {
  min-width: 0;
  word-break: normal;
  hyphens: none;
}

.bb-bo-history-date,
.bb-bo-history-time,
.bb-bo-history-value,
.bb-bo-history-phone,
.bb-bo-history-actions {
  white-space: nowrap;
  overflow-wrap: normal;
}

.bb-bo-history-client,
.bb-bo-history-service,
.bb-bo-history-status {
  white-space: normal;
  overflow-wrap: normal;
}

.bb-bo-history-email {
  white-space: normal;
  overflow-wrap: anywhere;
}

.bb-bo-history-status .status {
  max-width: 100%;
  white-space: normal;
  line-height: 1.25;
}

.bb-bo-history-actions .table-actions {
  justify-content: flex-end;
}

.bb-bo-appointments-table {
  width: 100%;
  min-width: 1060px;
  table-layout: auto;
}

.bb-bo-appointment-col-date { width: 94px; }
.bb-bo-appointment-col-time { width: 64px; }
.bb-bo-appointment-col-service { width: 26%; }
.bb-bo-appointment-col-value { width: 80px; }
.bb-bo-appointment-col-deposit { width: 124px; }
.bb-bo-appointment-col-status { width: 108px; }
.bb-bo-appointment-col-actions { width: 72px; }

.bb-bo-appointment-date,
.bb-bo-appointment-time,
.bb-bo-appointment-value,
.bb-bo-appointment-deposit,
.bb-bo-appointment-status,
.bb-bo-appointment-actions,
.bb-bo-appointment-status .status {
  white-space: nowrap;
}

.backoffice-content .bb-bo-appointment-client,
.backoffice-content .bb-bo-appointment-professional,
.backoffice-content .bb-bo-appointment-service {
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.bb-bo-appointment-actions {
  text-align: right;
}

.bb-bo-completed-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 280px);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 18px;
}

.bb-bo-completed-controls .bb-bo-history-filters {
  max-width: none;
  margin-bottom: 0;
}

.backoffice-content .filters.bb-bo-completed-filters {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
}

.bb-bo-completed-filters .bb-bo-history-filter-clinic {
  grid-column: 1 / -1;
}

.bb-bo-completed-filters .bb-bo-history-filter-client,
.bb-bo-completed-filters .bb-bo-history-filter-professional,
.bb-bo-completed-filters .bb-bo-history-filter-service,
.bb-bo-completed-filters .bb-bo-history-filter-date-from,
.bb-bo-completed-filters .bb-bo-history-filter-date-to,
.bb-bo-completed-filters .bb-bo-history-filter-actions {
  grid-column: span 2;
}

.bb-bo-completed-filters .bb-bo-history-filter-actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-width: 0;
}

.bb-bo-completed-filters .bb-bo-history-filter-actions > * {
  width: auto;
  max-width: 100%;
}

.bb-bo-completed-total {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--bb-bo-border);
  border-left: 4px solid var(--bb-bo-rose);
  border-radius: 8px;
  background: #fff;
  color: var(--bb-bo-text);
}

.bb-bo-completed-total span {
  color: var(--bb-bo-muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.bb-bo-completed-total strong {
  color: var(--bb-bo-rose-dark);
  font-size: 24px;
  line-height: 1.15;
  white-space: nowrap;
}

.bb-bo-completed-table {
  min-width: 920px !important;
  table-layout: fixed;
}

.bb-bo-completed-col-date { width: 10%; }
.bb-bo-completed-col-time { width: 7%; }
.bb-bo-completed-col-client { width: 13%; }
.bb-bo-completed-col-professional { width: 13%; }
.bb-bo-completed-col-service { width: 24%; }
.bb-bo-completed-col-value { width: 10%; }
.bb-bo-completed-col-status { width: 15%; }
.bb-bo-completed-col-actions { width: 8%; }

.bb-bo-completed-table th,
.bb-bo-completed-table td {
  min-width: 0;
}

.bb-bo-completed-service,
.bb-bo-cancelled-service,
.bb-bo-cancelled-reason {
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

.bb-bo-money-value,
.bb-bo-completed-status,
.bb-bo-completed-actions,
.bb-bo-cancelled-status,
.bb-bo-cancelled-actions {
  white-space: nowrap;
}

.bb-bo-cancelled-table {
  min-width: 1120px !important;
}

.bb-bo-table th,
.bb-bo-table td {
  overflow-wrap: anywhere;
  vertical-align: middle;
}

.bb-bo-clients-table {
  width: 100%;
  min-width: 900px;
  table-layout: fixed;
}

.bb-bo-clients-table th,
.bb-bo-clients-table td {
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.bb-bo-clients-table th {
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
  font-size: 0.72rem;
  line-height: 1.25;
  letter-spacing: 0.03em;
}

.bb-bo-client-col-name { width: 12%; }
.bb-bo-client-col-email { width: 16%; }
.bb-bo-client-col-phone { width: 10%; }
.bb-bo-client-col-birth { width: 9%; }
.bb-bo-client-col-age { width: 5%; }
.bb-bo-client-col-deposit { width: 6%; }
.bb-bo-client-col-count { width: 10%; }
.bb-bo-client-col-last { width: 10%; }
.bb-bo-client-col-next { width: 11%; }
.bb-bo-client-col-actions { width: 11%; }

.bb-bo-clients-table .bb-bo-actions {
  flex-wrap: nowrap;
}

.bb-bo-professionals-table {
  width: 100%;
  min-width: 1120px !important;
}

.bb-bo-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.bb-bo-actions .bb-backoffice-btn {
  width: auto;
  max-width: max-content;
  white-space: nowrap;
}

.bb-bo-services-cell {
  width: 34%;
  max-width: 420px;
  white-space: normal;
  line-height: 1.45;
}

.bb-bo-professionals-table .table-actions-grid {
  max-width: none;
  flex-wrap: nowrap;
}

.bb-bo-professionals-search-field {
  width: min(100%, 680px);
}

.bb-bo-professionals-search-field > label {
  white-space: nowrap;
}

.bb-bo-professionals-search-field input {
  width: 100%;
  max-width: none;
}

.bb-bo-professionals-count {
  margin: 4px 0 10px !important;
  font-size: 0.9rem;
}

.backoffice-content .filters.bb-bo-professionals-search {
  grid-template-columns: minmax(0, 680px);
}

.bb-bo-warning-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--bb-bo-warning-border);
  border-radius: 6px;
  background: var(--bb-bo-warning-soft);
  color: var(--bb-bo-warning-text);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
}

.bb-bo-service-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 460px;
}

.bb-bo-service-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(189, 125, 109, 0.1);
  color: var(--bb-bo-rose-dark);
  font-size: 0.9rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.backoffice-content > table,
.backoffice-content > section > table,
.backoffice-content .card > table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.bb-backoffice-form,
.auth-card form,
.backoffice-content > form,
.backoffice-content .card > form {
  display: grid;
  gap: 16px;
  max-width: 820px;
}

.auth-card form {
  max-width: none;
  text-align: left;
}

.backoffice-content .filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 12px;
  align-items: end;
  width: 100%;
  max-width: 1400px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--bb-bo-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(148, 96, 82, 0.07);
}

.backoffice-content .filters > * {
  min-width: 0;
}

.backoffice-content .filters button,
.backoffice-content .filters .button {
  align-self: end;
}

.backoffice-content .filters input[type="date"] {
  width: 100%;
  max-width: 220px;
}

.bb-bo-cancelled-services-chart {
  margin: 24px 0;
}

.bb-bo-cancelled-services-chart h2 {
  margin-top: 0;
}

.bb-bo-horizontal-chart {
  display: grid;
  gap: 14px;
}

.bb-bo-horizontal-chart-row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(120px, 1fr) 44px;
  gap: 14px;
  align-items: center;
}

.bb-bo-horizontal-chart-label {
  color: var(--bb-bo-text, #302a28);
  font-weight: 700;
}

.bb-bo-horizontal-chart-track {
  display: block;
  height: 18px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bb-bo-cream, #f3e8e3);
}

.bb-bo-horizontal-chart-bar {
  display: block;
  height: 100%;
  min-width: 4px;
  max-width: 100%;
  border-radius: inherit;
  background: var(--bb-bo-rose-dark, #946052);
}

.bb-bo-horizontal-chart-value {
  color: var(--bb-bo-text, #302a28);
  text-align: right;
}

@media (max-width: 768px) {
  .bb-bo-payments-header,
  .bb-stripe-status-panel {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr);
  }

  .bb-bo-payments-header {
    flex-direction: column;
  }

  .bb-bo-payments-context {
    text-align: left;
  }

  .bb-stripe-actions,
  .bb-stripe-actions form,
  .bb-stripe-actions .bb-backoffice-btn {
    width: 100%;
  }

  .bb-opening-hours-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .bb-opening-hours-day {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
  }

  .bb-opening-hours-day legend,
  .bb-opening-hours-open-toggle {
    grid-column: 1 / -1;
  }

  .backoffice-shell .bb-confirm-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .backoffice-shell .bb-confirm-actions button {
    width: 100%;
  }

  .bb-bo-horizontal-chart-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 12px;
  }

  .bb-bo-horizontal-chart-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

.bb-backoffice-filter-actions {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  min-width: auto;
}

.backoffice-content .filters .bb-backoffice-filter-actions,
.backoffice-content .filters .bb-bo-availability-selection-summary,
.backoffice-content .filters .bb-bo-availability-confirm {
  grid-column: 1 / -1;
}

.bb-backoffice-field,
.backoffice-content form p {
  max-width: 520px;
}

.backoffice-content input,
.backoffice-content select,
.backoffice-content textarea,
.auth-card input,
.auth-card select,
.auth-card textarea {
  border-color: var(--bb-bo-border);
  border-radius: 14px;
  background: #fffdfb;
  color: var(--bb-bo-text);
}

.backoffice-content input:focus,
.backoffice-content select:focus,
.backoffice-content textarea:focus,
.auth-card input:focus {
  border-color: var(--bb-bo-rose);
  box-shadow: 0 0 0 4px rgba(189, 125, 109, 0.14);
  outline: none;
}

.backoffice-content input[type="checkbox"],
.auth-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--bb-bo-rose-dark);
}

.bb-backoffice-form-actions,
.auth-card .bb-backoffice-form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
}

.bb-backoffice-form-actions-start {
  justify-content: flex-start;
}

.bb-backoffice-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: flex-start;
}

.bb-backoffice-form-row > * {
  min-width: 0;
}

.bb-stripe-connect-card {
  display: grid;
  gap: 22px;
}

.bb-stripe-status-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--bb-bo-border);
  border-radius: 8px;
  background: var(--bb-bo-surface);
}

.bb-bo-payments-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.bb-bo-payments-header h1,
.bb-bo-stripe-card-header h2,
.bb-bo-stripe-state-copy h3 {
  margin: 0;
}

.bb-bo-payments-context {
  margin: 0 0 5px;
  color: var(--bb-bo-muted);
  overflow-wrap: anywhere;
  text-align: right;
}

.bb-bo-stripe-card-header p {
  margin: 6px 0 0;
}

.bb-bo-stripe-state-copy {
  display: grid;
  justify-items: start;
  gap: 10px;
  max-width: 760px;
}

.bb-bo-stripe-state-copy > p {
  margin: 0;
}

.bb-stripe-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid var(--bb-bo-border);
  border-radius: 999px;
  background: var(--bb-bo-surface);
  color: var(--bb-bo-rose-dark);
  font-size: 0.95rem;
  font-weight: 850;
}

.bb-stripe-status-badge.is-active {
  border-color: var(--bb-bo-positive-soft);
  background: var(--bb-bo-positive-soft);
  color: var(--bb-bo-positive-text);
}

.bb-stripe-status-badge.is-pending {
  background: var(--bb-bo-zebra);
  color: var(--bb-bo-rose-dark);
}

.bb-stripe-status-badge.is-restricted {
  background: var(--bb-bo-zebra);
  color: var(--bb-bo-danger);
}

.bb-stripe-status-badge.is-not-connected {
  background: var(--bb-bo-zebra);
  color: var(--bb-bo-muted);
}

.bb-stripe-status-details {
  width: 100%;
  margin: 4px 0 0;
}

.bb-stripe-actions {
  align-items: center;
  justify-content: flex-start;
  margin: 0;
}

.bb-stripe-actions form {
  margin: 0;
}

.bb-backoffice-field-short {
  max-width: 220px;
}

.bb-backoffice-field-medium {
  max-width: 420px;
}

.bb-backoffice-field-large {
  max-width: 680px;
}

.bb-backoffice-field-short input,
.bb-backoffice-field-short select {
  max-width: 220px;
}

.bb-backoffice-field-medium input,
.bb-backoffice-field-medium select {
  max-width: 420px;
}

.bb-backoffice-field-large textarea,
.bb-backoffice-field-large input {
  max-width: 680px;
}

.bb-backoffice-checkbox-inline {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  gap: 10px;
  align-items: center;
  color: var(--bb-bo-text);
  font-weight: 750;
}

.bb-backoffice-checkbox-inline input {
  flex: 0 0 auto;
}

.bb-backoffice-password-field {
  position: relative;
  display: block;
}

.bb-backoffice-password-field input {
  padding-right: 52px;
}

.bb-backoffice-password-toggle,
.backoffice-shell .bb-backoffice-password-toggle,
.auth-page .bb-backoffice-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent !important;
  color: var(--bb-bo-rose-dark) !important;
  box-shadow: none;
  transform: translateY(-50%);
}

.bb-backoffice-password-toggle:hover,
.bb-backoffice-password-toggle:focus-visible,
.backoffice-shell .bb-backoffice-password-toggle:hover,
.backoffice-shell .bb-backoffice-password-toggle:focus-visible {
  border-color: rgba(148, 96, 82, 0.22);
  background: rgba(189, 125, 109, 0.1) !important;
  color: #7f5045 !important;
  box-shadow: none;
  transform: translateY(-50%);
}

.bb-backoffice-password-toggle svg {
  display: block;
  width: 20px;
  height: 20px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 18px 0 24px;
}

.detail-grid div {
  padding: 14px;
}

.detail-grid span {
  display: block;
  color: var(--bb-bo-muted);
  font-size: 13px;
  margin-bottom: 6px;
}

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

.table-actions-grid {
  width: 100%;
  max-width: 360px;
}

.table-actions .bb-backoffice-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.bb-backoffice-number {
  white-space: nowrap;
}

.bb-bo-date-value {
  white-space: nowrap;
}

.bb-backoffice-checkbox-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.bb-bo-availability-service-field {
  min-width: 0;
}

.bb-bo-availability-service-field select {
  width: 100%;
  max-width: none;
  font-weight: 400;
}

.bb-bo-availability-empty-state {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 280px;
  padding: 40px 24px;
  text-align: center;
}

.bb-bo-availability-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border: 1px solid var(--bb-bo-border);
  border-radius: 50%;
  background: var(--bb-bo-surface-soft);
  color: var(--bb-bo-rose-dark);
}

.bb-bo-availability-empty-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bb-bo-availability-empty-state h2 {
  max-width: 640px;
  margin: 0 0 8px;
  color: var(--bb-bo-text);
  font-size: 20px;
  line-height: 1.3;
}

.bb-bo-availability-empty-state p {
  max-width: 660px;
  margin: 0;
  color: var(--bb-bo-muted);
  font-size: 14px;
  line-height: 1.55;
}

.bb-bo-service-picker-notice {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.4;
}

.bb-bo-service-picker-notice[hidden] {
  display: none;
}

.bb-bo-availability-selection-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding-top: 2px;
}

.bb-bo-availability-selection-summary[hidden] {
  display: none;
}

.backoffice-content .filters .bb-bo-availability-selection-summary p {
  margin: 0;
}

.bb-bo-availability-confirm {
  display: flex;
  justify-content: flex-start;
}

.bb-bo-availability-confirm[hidden] {
  display: none;
}

.bb-bo-availability-results {
  display: grid;
  gap: 24px;
}

.bb-bo-availability-result + .bb-bo-availability-result {
  padding-top: 20px;
  border-top: 1px solid var(--bb-bo-border);
}

.bb-bo-clinic-settings-form {
  width: 100%;
  max-width: none;
  gap: 24px;
}

.bb-bo-clinic-settings-form .bb-backoffice-field {
  max-width: none;
}

.bb-bo-settings-section {
  display: grid;
  gap: 16px;
}

.bb-bo-settings-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}

.bb-bo-settings-section-heading::after {
  flex: 1 1 auto;
  height: 1px;
  background: var(--bb-bo-border);
  content: "";
}

.bb-bo-settings-section-heading h2 {
  flex: 0 0 auto;
  margin: 0;
  color: var(--bb-bo-rose-dark);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.bb-bo-clinic-settings-form .bb-backoffice-form-row {
  align-items: start;
}

.bb-bo-clinic-settings-form .bb-backoffice-form-row > :only-child {
  grid-column: 1 / -1;
}

.bb-bo-clinic-settings-form .bb-backoffice-field small,
.bb-bo-settings-toggle > small {
  display: block;
  margin-top: 6px;
}

.bb-bo-settings-toggle {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--bb-bo-border);
  border-radius: 6px;
  background: var(--bb-bo-zebra);
}

.bb-bo-settings-toggle .bb-backoffice-checkbox-inline {
  width: 100%;
  margin: 0;
  font-weight: 500;
}

.bb-backoffice-checkbox-group {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.bb-backoffice-checkbox-group legend {
  margin-bottom: 8px;
  color: var(--bb-bo-text);
  font-weight: 850;
}

.bb-backoffice-checkbox-card {
  max-width: 720px;
  padding: 12px 14px;
  border: 1px solid var(--bb-bo-border);
  border-radius: 14px;
  background: #fffdfb;
  line-height: 1.4;
}

.bb-backoffice-checkbox-card input {
  flex: 0 0 auto;
  margin-top: 2px;
}

.availability-date-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.bb-backoffice-time-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.backoffice-shell .backoffice-availability a.bb-backoffice-time-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 94px;
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid rgba(148, 96, 82, 0.28);
  border-radius: 14px;
  background: #fff;
  color: var(--bb-bo-rose-dark) !important;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
  box-shadow: none;
}

.backoffice-shell .backoffice-availability a.bb-backoffice-time-slot:hover,
.backoffice-shell .backoffice-availability a.bb-backoffice-time-slot:focus-visible {
  border-color: rgba(148, 96, 82, 0.42);
  background: rgba(189, 125, 109, 0.1);
  color: #7f5045 !important;
  text-decoration: none;
}

.clinic-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

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

.clinic-photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  border-radius: 14px;
  object-fit: cover;
}

.bb-bo-photos-page {
  gap: 22px;
}

.bb-bo-photo-upload-panel,
.bb-bo-photo-gallery-panel {
  display: grid;
  gap: 20px;
}

.bb-bo-photo-section-header h2,
.bb-bo-photo-section-header p {
  margin: 0;
}

.bb-bo-photo-section-header p {
  margin-top: 5px;
}

.bb-bo-photo-upload-form {
  width: 100%;
  max-width: none;
}

.bb-bo-photo-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.backoffice-shell button.bb-bo-photo-dropzone {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: clamp(150px, 18vw, 190px);
  gap: 6px;
  padding: 24px;
  border: 1px dashed var(--bb-bo-border-strong);
  border-radius: 8px;
  background: var(--bb-bo-zebra);
  color: var(--bb-bo-text) !important;
  text-align: center;
}

.backoffice-shell button.bb-bo-photo-dropzone:hover,
.backoffice-shell button.bb-bo-photo-dropzone:focus-visible,
.backoffice-shell button.bb-bo-photo-dropzone.is-dragging {
  border-color: var(--bb-bo-rose-dark);
  background: var(--bb-bo-hover-neutral);
}

.bb-bo-photo-upload-icon {
  position: relative;
  width: 22px;
  height: 26px;
  color: var(--bb-bo-rose-dark);
}

.bb-bo-photo-upload-icon::before {
  position: absolute;
  top: 2px;
  left: 7px;
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.bb-bo-photo-upload-icon::after {
  position: absolute;
  top: 3px;
  left: 10px;
  width: 2px;
  height: 20px;
  background: currentColor;
  content: "";
}

.bb-bo-photo-dropzone small,
.bb-bo-photo-file-summary {
  color: var(--bb-bo-muted);
  font-weight: 400;
}

.bb-bo-photo-file-summary {
  min-height: 1.3em;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.bb-bo-photo-fields .bb-backoffice-field {
  max-width: none;
}

.bb-bo-photo-gallery-status {
  min-height: 1.4em;
  margin: -8px 0 0;
}

.bb-bo-photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.bb-bo-photo-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--bb-bo-border);
  border-radius: 8px;
  background: var(--bb-bo-surface);
  cursor: grab;
}

.bb-bo-photo-card.is-dragging {
  opacity: 0.55;
}

.bb-bo-photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
}

.bb-bo-photo-position {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--bb-bo-surface);
  color: var(--bb-bo-text);
  font-size: 12px;
  font-weight: 700;
}

.bb-bo-photo-move-actions {
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  gap: 4px;
}

.backoffice-shell button.bb-bo-photo-icon-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--bb-bo-border);
  border-radius: 50%;
  background: var(--bb-bo-surface);
  color: var(--bb-bo-text) !important;
}

.backoffice-shell button.bb-bo-photo-icon-button:hover:not(:disabled) {
  background: var(--bb-bo-hover-neutral);
}

.bb-bo-photo-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.bb-bo-photo-card-actions form,
.bb-bo-photo-card-actions button {
  width: 100%;
  margin: 0;
}

.bb-bo-photo-caption-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: end;
}

.bb-bo-photo-caption-form[hidden] {
  display: none;
}

.bb-bo-photo-caption-form label {
  grid-column: 1 / -1;
}

.errorlist {
  color: var(--bb-bo-danger);
}

/* BackOffice visual foundation: neutral work surfaces with the portal's rose accent. */
:root {
  --bb-bo-bg: #f4f5f7;
  --bb-bo-surface: #ffffff;
  --bb-bo-surface-soft: #f5efe8;
  --bb-bo-zebra: var(--bb-bo-surface-soft);
  --bb-bo-hover-neutral: var(--bb-bo-bg);
  --bb-bo-sidebar-bg: var(--bb-bo-zebra);
  --bb-bo-positive-soft: #e9f5ed;
  --bb-bo-positive-text: #2f6b43;
  --bb-bo-warning-soft: #fff8e7;
  --bb-bo-warning-border: #e4d09d;
  --bb-bo-warning-text: #765b18;
  --bb-bo-border: #dfe3e7;
  --bb-bo-border-strong: #cdd3d9;
  --bb-bo-rose: #a9686d;
  --bb-bo-rose-dark: #855056;
  --bb-bo-danger: #a64646;
  --bb-bo-text: #23272f;
  --bb-bo-muted: #68707b;
  --bb-bo-shadow: 0 1px 2px rgba(35, 39, 47, 0.06), 0 6px 18px rgba(35, 39, 47, 0.04);
}

.backoffice-shell {
  grid-template-columns: 248px minmax(0, 1fr);
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bb-bo-bg);
}

.backoffice-content {
  justify-self: center;
  width: 100%;
  max-width: 1800px;
  padding: 24px clamp(22px, 3vw, 40px) 42px;
}

.backoffice-shell .bb-backoffice-sidebar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-self: start;
  height: 100vh;
  height: 100dvh;
  padding: 0;
  overflow: hidden;
  border-right: 1px solid var(--bb-bo-border);
  background: var(--bb-bo-sidebar-bg);
  color: var(--bb-bo-text);
  box-shadow: 2px 0 12px rgba(35, 39, 47, 0.025);
}

.bb-sidebar-symbols {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.bb-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 76px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--bb-bo-border);
}

.bb-sidebar-brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--bb-bo-rose-dark);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 700;
}

.bb-sidebar-brand strong,
.bb-sidebar-brand small {
  display: block;
  letter-spacing: 0;
}

.bb-sidebar-brand strong {
  color: var(--bb-bo-text);
  font-family: Georgia, serif;
  font-size: 19px;
  line-height: 1.1;
}

.bb-sidebar-brand small {
  margin-top: 3px;
  color: var(--bb-bo-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.bb-sidebar-nav {
  flex: 1 1 auto;
  padding: 12px 10px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--bb-bo-border-strong) transparent;
}

.backoffice-shell .sidebar .bb-sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 39px;
  margin: 1px 0;
  padding: 8px 10px;
  border-radius: 6px;
  color: #505762;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.25;
  transition: background-color 160ms ease, color 160ms ease;
}

.bb-sidebar-link svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bb-sidebar-alert-badge {
  display: inline-flex;
  flex: 0 0 auto;
  min-width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--bb-bo-danger);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

.bb-sidebar-group {
  display: grid;
  min-width: 0;
}

.backoffice-shell .sidebar .bb-sidebar-group-toggle {
  display: flex;
  width: 100%;
  max-width: none;
  min-height: 39px;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  margin: 1px 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #505762 !important;
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.25;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.bb-sidebar-group-toggle > svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bb-sidebar-group-toggle .bb-sidebar-group-chevron {
  width: 16px;
  height: 16px;
  margin-left: auto;
  transition: transform 160ms ease;
}

.bb-sidebar-group.is-open .bb-sidebar-group-chevron {
  transform: rotate(90deg);
}

.backoffice-shell .sidebar .bb-sidebar-group-toggle:hover,
.backoffice-shell .sidebar .bb-sidebar-group-toggle:focus-visible {
  background: var(--bb-bo-hover-neutral);
  color: var(--bb-bo-text) !important;
  outline: none;
}

.backoffice-shell .sidebar .bb-sidebar-group.has-active-child .bb-sidebar-group-toggle {
  color: var(--bb-bo-rose-dark) !important;
  font-weight: 800;
}

.bb-sidebar-submenu {
  display: grid;
  min-width: 0;
  margin: 1px 0 5px 18px;
  padding-left: 10px;
  border-left: 1px solid var(--bb-bo-border);
}

.bb-sidebar-submenu[hidden] {
  display: none;
}

.backoffice-shell .sidebar .bb-sidebar-submenu .bb-sidebar-link {
  min-height: 36px;
  padding: 7px 9px;
  font-size: 13px;
}

.bb-sidebar-submenu .bb-sidebar-link svg {
  width: 16px;
  height: 16px;
}

.backoffice-shell .sidebar .bb-sidebar-link:hover,
.backoffice-shell .sidebar .bb-sidebar-link:focus-visible {
  background: var(--bb-bo-hover-neutral);
  color: var(--bb-bo-text);
  outline: none;
}

.backoffice-shell .sidebar .bb-sidebar-link.is-active {
  background: #f4e9ea;
  color: var(--bb-bo-rose-dark);
  font-weight: 800;
}

.backoffice-shell .sidebar .bb-sidebar-link.is-active::before {
  position: absolute;
  left: 0;
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--bb-bo-rose-dark);
  content: "";
}

.bb-sidebar-footer {
  flex: 0 0 auto;
  padding: 10px;
  border-top: 1px solid var(--bb-bo-border);
  background: #fbfbfc;
}

.backoffice-shell .sidebar .bb-sidebar-logout {
  color: #7d4646;
}

.backoffice-topbar {
  min-height: 64px;
  margin: -24px calc(clamp(22px, 3vw, 40px) * -1) 28px;
  padding: 12px clamp(22px, 3vw, 40px);
  border-bottom: 1px solid var(--bb-bo-border);
  background: rgba(255, 255, 255, 0.94);
}

.bb-topbar-context {
  min-width: 0;
}

.bb-topbar-eyebrow,
.bb-page-eyebrow {
  display: block;
  margin: 0 0 3px;
  color: var(--bb-bo-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bb-topbar-title {
  display: block;
  max-width: min(72vw, 900px);
  overflow: hidden;
  color: var(--bb-bo-text);
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backoffice-topbar .muted {
  margin-top: 2px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backoffice-content :is(h1, h2, h3, p, li, dd, td),
.backoffice-content .message,
.backoffice-content .errorlist {
  overflow-wrap: anywhere;
}

.backoffice-content :is(input, select, textarea, button),
.backoffice-content .bb-backoffice-btn,
.backoffice-content .button {
  max-width: 100%;
}

.bb-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.bb-page-header h1,
.bb-backoffice-dashboard .page-title {
  margin: 0;
  color: var(--bb-bo-text);
  font-size: clamp(25px, 3vw, 32px);
  line-height: 1.2;
  letter-spacing: 0;
}

.metric,
.detail-grid div,
.dashboard-section,
.backoffice-content .card,
.clinic-photo-card,
.backoffice-content .filters,
.bb-backoffice-checkbox-card {
  border-color: var(--bb-bo-border);
  border-radius: 8px;
  background: var(--bb-bo-surface);
  box-shadow: var(--bb-bo-shadow);
}

.dashboard-section,
.bb-backoffice-dashboard-section {
  margin-top: 0;
  padding: 20px;
  border-radius: 8px;
}

.bb-backoffice-dashboard {
  gap: 16px;
}

.bb-backoffice-dashboard-filters,
.backoffice-content .filters {
  gap: 12px;
  margin-bottom: 0;
  padding: 14px;
  border-radius: 8px;
  background: var(--bb-bo-surface);
  box-shadow: none;
}

.bb-backoffice-dashboard-section h2 {
  margin: 0 0 14px;
  font-size: 18px;
  letter-spacing: 0;
}

.bb-bo-birthday-section {
  border-left: 3px solid var(--bb-bo-rose);
}

.bb-bo-birthday-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bb-bo-birthday-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px solid var(--bb-bo-border);
}

.bb-bo-birthday-item:first-child {
  padding-top: 2px;
}

.bb-bo-birthday-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.bb-bo-birthday-indicator {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--bb-bo-rose);
}

.bb-bo-birthday-item-tomorrow .bb-bo-birthday-indicator {
  background: #b58a4f;
}

.bb-bo-birthday-item strong,
.bb-bo-birthday-item small {
  display: block;
}

.bb-bo-birthday-item strong {
  color: var(--bb-bo-text);
  font-size: 14px;
  line-height: 1.4;
}

.bb-bo-birthday-item small {
  margin-top: 3px;
  color: var(--bb-bo-muted);
  font-size: 12px;
}

.bb-backoffice-btn,
.bb-bo-btn,
.backoffice-shell .button,
.backoffice-shell button,
.backoffice-shell input[type="submit"],
.auth-page button,
.auth-page input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: max-content;
  min-height: 40px;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid var(--bb-bo-rose-dark);
  border-radius: 6px;
  background: var(--bb-bo-rose-dark);
  color: #fff !important;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.bb-backoffice-btn:hover,
.bb-bo-btn:hover,
.backoffice-shell .button:hover,
.backoffice-shell button:hover,
.auth-page button:hover {
  border-color: #704247;
  background: #704247;
  color: #fff !important;
  text-decoration: none;
  transform: none;
}

.bb-backoffice-btn-secondary,
.bb-backoffice-btn-outline,
.bb-bo-btn-secondary,
.backoffice-shell .bb-backoffice-btn-secondary,
.backoffice-shell .bb-backoffice-btn-outline,
.backoffice-shell .button.secondary,
.backoffice-shell button.secondary,
.backoffice-shell a.button.secondary {
  border-color: var(--bb-bo-border-strong);
  background: #fff !important;
  color: #4d5560 !important;
  box-shadow: none;
}

.bb-backoffice-btn-secondary:hover,
.bb-backoffice-btn-outline:hover,
.bb-bo-btn-secondary:hover,
.backoffice-shell button.bb-backoffice-btn-secondary:not(:disabled):hover,
.backoffice-shell button.bb-backoffice-btn-secondary:not(:disabled):focus,
.backoffice-shell button.bb-backoffice-btn-secondary:not(:disabled):focus-visible,
.backoffice-shell button.bb-backoffice-btn-secondary:not(:disabled):active,
.backoffice-shell .button.secondary:hover,
.backoffice-shell button.secondary:hover {
  border-color: #aeb5bd;
  background: #f2f4f6 !important;
  color: var(--bb-bo-text) !important;
}

.bb-backoffice-btn-sm,
.bb-bo-btn-sm,
.backoffice-content table a,
.backoffice-content table button {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 12.5px;
}

.backoffice-content table,
.bb-backoffice-dashboard-table-shell table {
  overflow: hidden;
  border-color: var(--bb-bo-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.backoffice-content th,
.bb-backoffice-dashboard-table-shell th {
  background: #f6f7f8;
  color: #555d67;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.backoffice-content th,
.backoffice-content td {
  padding: 11px 12px;
  border-bottom-color: #e8ebee;
}

.backoffice-content tbody tr:hover td {
  background: #fbfbfc;
}

.status {
  border-radius: 5px;
  background: #f3e8e9;
  color: var(--bb-bo-rose-dark);
}

.bb-bo-dashboard-appointments .bb-bo-appointments-table {
  min-width: 900px;
  table-layout: fixed;
}

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

.bb-backoffice-dashboard-section .bb-bo-dashboard-section-heading h2,
.bb-bo-dashboard-section-heading .muted {
  margin: 0;
}

.bb-bo-dashboard-section-heading .muted {
  margin-top: 4px;
}

.bb-bo-dashboard-section-actions,
.bb-bo-dashboard-period-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.bb-bo-dashboard-section-actions {
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bb-bo-dashboard-period-form label {
  color: var(--bb-bo-muted);
  font-size: 12px;
  font-weight: 750;
}

.bb-bo-dashboard-period-form select {
  min-width: 178px;
  min-height: 32px;
  padding-block: 5px;
}

.bb-bo-dashboard-appointments .bb-bo-appointment-col-date { width: 86px; }
.bb-bo-dashboard-appointments .bb-bo-appointment-col-time { width: 58px; }
.bb-bo-dashboard-appointments .bb-bo-appointment-col-client { width: 13%; }
.bb-bo-dashboard-appointments .bb-bo-appointment-col-professional { width: 14%; }
.bb-bo-dashboard-appointments .bb-bo-appointment-col-service { width: auto; }
.bb-bo-dashboard-appointments .bb-bo-appointment-col-value { width: 76px; }
.bb-bo-dashboard-appointments .bb-bo-appointment-col-deposit { width: 110px; }
.bb-bo-dashboard-appointments .bb-bo-appointment-col-status { width: 140px; }
.bb-bo-dashboard-appointments .bb-bo-appointment-col-actions { width: 64px; }

.backoffice-content .bb-bo-striped-list > tbody > tr:nth-child(odd),
.backoffice-content .bb-bo-striped-list > tbody > tr:nth-child(odd) > td {
  background: var(--bb-bo-surface);
}

.backoffice-content .bb-bo-striped-list > tbody > tr:nth-child(even),
.backoffice-content .bb-bo-striped-list > tbody > tr:nth-child(even) > td {
  background: var(--bb-bo-zebra);
}

.backoffice-content .bb-bo-striped-list > tbody > tr:hover,
.backoffice-content .bb-bo-striped-list > tbody > tr:hover > td {
  background: var(--bb-bo-hover-neutral);
}

.bb-bo-dashboard-appointments .bb-bo-dashboard-status {
  max-width: 100%;
  white-space: normal;
  line-height: 1.25;
}

.backoffice-content table .status.bb-bo-status-positive,
.backoffice-content .bb-bo-mobile-appointment-card .status.bb-bo-status-positive {
  background: var(--bb-bo-positive-soft);
  color: var(--bb-bo-positive-text);
}

.bb-bo-dashboard-appointments .bb-bo-dashboard-status-pending,
.bb-bo-dashboard-appointments .bb-bo-dashboard-status-rebook_pending,
.bb-bo-dashboard-appointments .bb-bo-dashboard-status-deposit_pending {
  background: #fff3df;
  color: #815d1f;
}

.bb-bo-dashboard-appointments .bb-bo-dashboard-status-cancelled_by_patient,
.bb-bo-dashboard-appointments .bb-bo-dashboard-status-cancelled_by_clinic,
.bb-bo-dashboard-appointments .bb-bo-dashboard-status-no_show {
  background: #fff1f1;
  color: #8c3434;
}

.backoffice-content input,
.backoffice-content select,
.backoffice-content textarea,
.auth-card input,
.auth-card select,
.auth-card textarea {
  border-color: var(--bb-bo-border-strong);
  border-radius: 6px;
  background: #fff;
}

.backoffice-content input:focus,
.backoffice-content select:focus,
.backoffice-content textarea:focus,
.auth-card input:focus {
  border-color: var(--bb-bo-rose);
  box-shadow: 0 0 0 3px rgba(169, 104, 109, 0.12);
}

.bb-backoffice-table-wrapper,
.bb-backoffice-dashboard-table-shell {
  border-radius: 8px;
}

.bb-backoffice-messages {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}

.bb-backoffice-messages .message {
  position: relative;
  margin: 0;
  padding: 12px 52px 12px 14px;
  border: 1px solid #b8d8c4;
  border-radius: 6px;
  background: #edf8f1;
  color: #28613d;
  box-shadow: none;
  transition: opacity 320ms ease, transform 320ms ease;
}

.bb-backoffice-messages .message.error {
  border-color: #e2baba;
  background: #fff1f1;
  color: #8c3434;
}

.bb-backoffice-messages .message.warning {
  border-color: var(--bb-bo-warning-border);
  background: var(--bb-bo-warning-soft);
  color: var(--bb-bo-warning-text);
}

.bb-backoffice-messages .message.bb-message-fade-out,
.bb-backoffice-messages .message.bb-bo-message--hiding,
.bb-bo-message--hiding {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 350ms ease, transform 350ms ease;
}

.bb-backoffice-messages .bb-message-close,
.backoffice-shell .bb-message-close,
.auth-page .bb-message-close {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent !important;
  color: currentColor !important;
  box-shadow: none;
  font-size: 22px;
  opacity: 0.72;
  transform: translateY(-50%);
}

.bb-backoffice-messages .bb-message-close:hover,
.backoffice-shell .bb-message-close:hover,
.auth-page .bb-message-close:hover {
  border: 0;
  background: rgba(35, 39, 47, 0.07) !important;
  color: currentColor !important;
  opacity: 1;
  transform: translateY(-50%);
}

.bb-backoffice-login-public-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px 18px;
  background: #f4f5f7;
}

.bb-public-page.bb-backoffice-login-public-page > .container {
  width: min(100%, 520px);
}

.bb-backoffice-login-public-page .auth-card.public-auth {
  width: 100%;
  margin: 0;
  padding: 34px;
  border: 1px solid var(--bb-bo-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(35, 39, 47, 0.09);
}

.bb-backoffice-login-public-page .bb-public-kicker {
  color: var(--bb-bo-rose-dark);
}

.bb-backoffice-login-public-page .public-auth h1 {
  margin-bottom: 24px;
  color: var(--bb-bo-text);
  font-size: clamp(25px, 6vw, 31px);
  letter-spacing: 0;
}

.bb-backoffice-login-public-page .public-auth button[type="submit"] {
  width: 100%;
  max-width: none;
  border-radius: 6px;
  background: var(--bb-bo-rose-dark);
  box-shadow: none;
}

.bb-backoffice-login-help {
  margin: 18px 0 0;
  font-size: 14px;
}

@media (max-width: 1180px) and (min-width: 1025px) {
  .backoffice-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .backoffice-content {
    padding-right: 22px;
    padding-left: 22px;
  }

  .backoffice-topbar {
    margin-right: -22px;
    margin-left: -22px;
    padding-right: 22px;
    padding-left: 22px;
  }

  .backoffice-shell .sidebar .bb-sidebar-link {
    font-size: 12.5px;
  }
}

@media (max-width: 640px) {
  .bb-backoffice-login-public-page .auth-card.public-auth {
    padding: 24px !important;
  }
}

/* Responsive BackOffice navigation and compact operational layouts. */
.bb-bo-mobile-header,
.bb-bo-mobile-overlay,
.bb-bo-mobile-appointment-list,
.bb-bo-mobile-pending-list,
.bb-bo-mobile-entity-list,
.bb-bo-mobile-waitlist-offers {
  display: none;
}

.backoffice-shell .bb-bo-menu-close {
  display: none;
}

@media (max-width: 1024px) {
  body.bb-bo-menu-open {
    overflow: hidden;
  }

  .backoffice-shell {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
  }

  .bb-bo-mobile-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(133, 80, 86, 0.18);
    background: #fffaf7;
    box-shadow: 0 2px 10px rgba(35, 39, 47, 0.06);
  }

  .backoffice-shell .bb-bo-menu-toggle,
  .backoffice-shell .bb-bo-menu-close {
    display: inline-grid;
    flex: 0 0 40px;
    place-items: center;
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border: 1px solid var(--bb-bo-border-strong);
    border-radius: 6px;
    background: #fff !important;
    color: var(--bb-bo-rose-dark) !important;
    box-shadow: none;
    font-size: 24px;
    line-height: 1;
  }

  .backoffice-shell .bb-bo-menu-toggle:hover,
  .backoffice-shell .bb-bo-menu-toggle:focus-visible,
  .backoffice-shell .bb-bo-menu-close:hover,
  .backoffice-shell .bb-bo-menu-close:focus-visible {
    border-color: var(--bb-bo-rose);
    background: #fff4f1 !important;
    color: var(--bb-bo-rose-dark) !important;
  }

  .bb-bo-mobile-brand {
    display: grid;
    gap: 1px;
    min-width: 0;
    color: var(--bb-bo-text);
    line-height: 1.1;
  }

  .bb-bo-mobile-brand strong {
    font-size: 16px;
  }

  .bb-bo-mobile-brand small {
    color: var(--bb-bo-muted);
    font-size: 11px;
  }

  .backoffice-shell .bb-backoffice-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1200;
    width: min(86vw, 320px);
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    border-right: 1px solid var(--bb-bo-border);
    border-bottom: 0;
    background: var(--bb-bo-sidebar-bg);
    box-shadow: 16px 0 40px rgba(35, 39, 47, 0.16);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 220ms ease, opacity 180ms ease, visibility 220ms;
  }

  .backoffice-shell .bb-backoffice-sidebar.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    visibility: visible;
  }

  .bb-bo-mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: block;
    background: rgba(35, 27, 29, 0.42);
  }

  .bb-bo-mobile-overlay[hidden] {
    display: none;
  }

  .backoffice-shell .bb-backoffice-sidebar .bb-sidebar-brand {
    position: sticky;
    top: 0;
    z-index: 1;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 40px;
    min-height: 68px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--bb-bo-border);
    background: var(--bb-bo-sidebar-bg);
  }

  .backoffice-shell .bb-backoffice-sidebar .bb-sidebar-nav {
    display: grid;
    gap: 3px;
    padding: 10px;
    overflow: visible;
  }

  .backoffice-shell .bb-backoffice-sidebar .bb-sidebar-link {
    flex: none;
    width: 100%;
    margin: 0;
  }

  .backoffice-shell .bb-backoffice-sidebar .bb-sidebar-link.is-active::before {
    display: block;
  }

  .backoffice-shell .bb-backoffice-sidebar .bb-sidebar-footer {
    display: grid;
    gap: 3px;
    padding: 10px;
  }

  .backoffice-content,
  .bb-backoffice-content,
  .bb-bo-page {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .backoffice-content {
    padding: 20px;
    overflow-x: hidden;
  }

  .backoffice-topbar {
    margin: -20px -20px 22px;
    padding: 12px 20px;
  }

  .backoffice-content .filters,
  .bb-backoffice-dashboard-filters,
  .bb-backoffice-availability-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 12px;
    width: 100%;
    max-width: 100%;
  }

  .backoffice-content .filters.bb-bo-completed-filters {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .bb-bo-completed-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .bb-bo-completed-total {
    width: 100%;
  }

  .backoffice-content .filters > *,
  .backoffice-content .filters > div,
  .backoffice-content .filters input,
  .backoffice-content .filters select,
  .backoffice-content .filters textarea,
  .backoffice-content .filters button,
  .backoffice-content .filters .button,
  .bb-backoffice-filter-actions,
  .bb-backoffice-dashboard-filters .bb-backoffice-field {
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
  }

  .bb-backoffice-filter-actions {
    display: flex;
    gap: 8px;
  }

  .backoffice-content .filters .bb-backoffice-filter-actions > * {
    flex: 0 1 auto;
    width: auto;
    max-width: 100%;
  }

  .bb-backoffice-form,
  .backoffice-content > form,
  .backoffice-content .card > form {
    width: 100%;
  }

  .backoffice-content .card,
  .backoffice-content .dashboard-section,
  .bb-backoffice-dashboard-section,
  .bb-bo-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .bb-backoffice-table-wrapper,
  .bb-bo-table-wrapper,
  .bb-backoffice-dashboard-table-shell {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .backoffice-content > table,
  .backoffice-content > section > table,
  .backoffice-content .card > table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .actions,
  .bb-backoffice-actions,
  .bb-bo-actions,
  .table-actions {
    min-width: 0;
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .backoffice-content {
    padding: 16px;
  }

  .bb-client-type-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .bb-holiday-policy-options,
  .bb-upcoming-holiday-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .bb-upcoming-holiday-item > div:first-child {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .bb-upcoming-holiday-action {
    align-items: flex-start;
    flex-direction: column;
  }

  .backoffice-topbar {
    flex-wrap: wrap;
    margin: -16px -16px 18px;
    padding: 10px 16px;
  }

  .backoffice-topbar .bb-topbar-context {
    min-width: 0;
  }

  .backoffice-topbar .muted {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .backoffice-content input,
  .backoffice-content select,
  .backoffice-content textarea,
  .auth-card input,
  .auth-card select,
  .auth-card textarea {
    font-size: 16px;
  }

  .backoffice-content .bb-backoffice-btn:not(.bb-backoffice-btn-sm),
  .backoffice-content .bb-bo-btn:not(.bb-bo-btn-sm),
  .backoffice-content .button,
  .backoffice-content button:not(.bb-backoffice-password-toggle):not(.bb-message-close) {
    min-height: 44px;
    font-size: 16px;
  }

  .bb-page-header,
  .actions,
  .bb-backoffice-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .actions > div,
  .actions > a,
  .actions .button,
  .bb-backoffice-actions > *,
  .bb-backoffice-form-actions > * {
    width: 100%;
    max-width: none;
  }

  .bb-bo-appointments-table-shell,
  .bb-bo-desktop-appointments-table {
    display: none !important;
  }

  .bb-bo-desktop-entity-table {
    display: none !important;
  }

  .bb-bo-mobile-entity-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .bb-bo-mobile-waitlist-offers {
    display: grid;
    gap: 12px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin-bottom: 20px;
  }

  .bb-bo-mobile-waitlist-offers > h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
  }

  .bb-bo-mobile-entity-card {
    display: grid;
    gap: 14px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 16px;
    overflow: hidden;
    border: 1px solid rgba(148, 96, 82, 0.16);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(35, 39, 47, 0.06);
    box-sizing: border-box;
    overflow-wrap: anywhere;
  }

  .bb-bo-mobile-entity-card * {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .bb-bo-mobile-entity-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .bb-bo-mobile-entity-heading h2 {
    margin: 0;
    color: var(--bb-bo-text);
    font-size: 16px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .bb-bo-mobile-state {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    border: 1px solid var(--bb-bo-border);
    border-radius: 999px;
    background: #f7f3f1;
    color: var(--bb-bo-muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
  }

  .bb-bo-mobile-state.is-active {
    border-color: rgba(47, 125, 87, 0.24);
    background: #eef8f2;
    color: #286b4b;
  }

  .bb-bo-mobile-state.is-inactive,
  .bb-bo-mobile-state.is-warning {
    border-color: rgba(148, 96, 82, 0.22);
    background: #fff4f1;
    color: var(--bb-bo-rose-dark);
  }

  .bb-bo-mobile-entity-meta {
    display: grid;
    gap: 9px;
    margin: 0;
  }

  .bb-bo-mobile-entity-meta > div {
    display: grid;
    grid-template-columns: minmax(92px, 0.36fr) minmax(0, 1fr);
    gap: 10px;
  }

  .bb-bo-mobile-entity-meta dt,
  .bb-bo-mobile-entity-meta dd {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
  }

  .bb-bo-mobile-entity-meta dt,
  .bb-bo-mobile-services > strong {
    color: var(--bb-bo-muted);
    font-weight: 750;
  }

  .bb-bo-mobile-entity-meta dd {
    color: var(--bb-bo-text);
    overflow-wrap: anywhere;
  }

  .bb-bo-mobile-services {
    display: grid;
    gap: 7px;
  }

  .bb-bo-mobile-services > strong {
    font-size: 13px;
  }

  .bb-bo-mobile-services .bb-bo-service-list {
    width: 100%;
    max-width: 100%;
  }

  .bb-bo-mobile-entity-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .bb-bo-mobile-entity-actions > *,
  .bb-bo-mobile-entity-actions form,
  .bb-bo-mobile-entity-actions a,
  .bb-bo-mobile-entity-actions button,
  .bb-bo-mobile-entity-actions .bb-backoffice-btn {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    justify-content: center;
    text-align: center;
  }

  .bb-bo-mobile-appointment-list,
  .bb-bo-mobile-pending-list {
    display: grid;
    gap: 10px;
    width: 100%;
  }

  .bb-bo-mobile-appointment-card {
    display: grid;
    gap: 9px;
    min-width: 0;
    padding: 14px 0;
    border-bottom: 1px solid var(--bb-bo-border);
  }

  .bb-bo-mobile-appointment-card:first-child {
    padding-top: 0;
  }

  .bb-bo-mobile-appointment-card:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .bb-bo-mobile-appointment-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  .bb-bo-mobile-appointment-heading time {
    color: var(--bb-bo-text);
    font-size: 14px;
    font-weight: 800;
  }

  .bb-bo-mobile-appointment-card h3 {
    margin: 0;
    color: var(--bb-bo-text);
    font-size: 16px;
    line-height: 1.3;
  }

  .bb-bo-mobile-appointment-card p {
    margin: 0;
    color: var(--bb-bo-muted);
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .bb-bo-mobile-appointment-card .bb-bo-mobile-appointment-service {
    color: var(--bb-bo-text);
    font-weight: 700;
  }

  .bb-bo-mobile-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-top: 3px;
  }

  .bb-bo-mobile-actions > *,
  .bb-bo-mobile-actions form,
  .bb-bo-mobile-actions button,
  .bb-bo-mobile-actions .button,
  .bb-bo-mobile-actions .bb-bo-btn,
  .bb-bo-mobile-actions .bb-backoffice-btn {
    width: 100%;
    max-width: none;
  }

  .bb-bo-appointment-detail form > button[type="submit"] {
    width: 100%;
    max-width: none;
  }

  .detail-grid,
  .metric-grid,
  .detail-list,
  .bb-bo-email-preview-meta dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-list dt {
    margin-top: 8px;
  }

  .detail-list dd {
    margin-left: 0;
    overflow-wrap: anywhere;
  }

  .bb-bo-mobile-card-table thead {
    display: none;
  }

  .bb-bo-mobile-card-table,
  .bb-bo-mobile-card-table tbody,
  .bb-bo-mobile-card-table tr,
  .bb-bo-mobile-card-table td {
    display: block;
    width: 100%;
  }

  .bb-bo-mobile-card-table tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--bb-bo-border);
  }

  .bb-bo-mobile-card-table td {
    display: grid;
    grid-template-columns: minmax(90px, 0.4fr) minmax(0, 1fr);
    gap: 10px;
    padding: 6px 0;
    border: 0;
    text-align: left !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  .bb-bo-mobile-card-table td::before {
    content: attr(data-label);
    color: var(--bb-bo-muted);
    font-size: 12px;
    font-weight: 750;
  }

  .bb-bo-mobile-card-table td[colspan]::before {
    content: none;
  }
}

@media (max-width: 640px) {
  .backoffice-content .filters,
  .bb-backoffice-dashboard-filters,
  .bb-backoffice-availability-filters,
  .bb-backoffice-form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .backoffice-content .filters.bb-bo-completed-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .bb-bo-completed-filters .bb-bo-history-filter-clinic,
  .bb-bo-completed-filters .bb-bo-history-filter-client,
  .bb-bo-completed-filters .bb-bo-history-filter-professional,
  .bb-bo-completed-filters .bb-bo-history-filter-service,
  .bb-bo-completed-filters .bb-bo-history-filter-date-from,
  .bb-bo-completed-filters .bb-bo-history-filter-date-to,
  .bb-bo-completed-filters .bb-bo-history-filter-actions {
    grid-column: 1;
  }

  .bb-bo-completed-filters .bb-bo-history-filter-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .bb-bo-completed-filters .bb-bo-history-filter-actions > * {
    width: 100%;
  }

  .bb-bo-availability-empty-state {
    min-height: 240px;
    padding: 32px 12px;
  }

  .backoffice-content .filters input[type="date"],
  .bb-backoffice-field-short,
  .bb-backoffice-field-medium,
  .bb-backoffice-field-large,
  .bb-backoffice-field-short input,
  .bb-backoffice-field-short select,
  .bb-backoffice-field-medium input,
  .bb-backoffice-field-medium select,
  .bb-backoffice-field-large input,
  .bb-backoffice-field-large textarea {
    width: 100%;
    max-width: none;
  }

  .bb-backoffice-filter-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .bb-bo-professionals-search-field > label {
    white-space: normal;
  }

  .bb-bo-mobile-entity-actions .bb-bo-warning-badge {
    width: fit-content;
    justify-self: start;
  }

  .backoffice-content .filters .bb-backoffice-filter-actions > * {
    width: 100%;
    max-width: none;
  }

  .clinic-photo-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .bb-bo-photo-gallery {
    grid-template-columns: minmax(0, 1fr);
  }

  .bb-opening-hours-day {
    grid-template-columns: minmax(0, 1fr);
  }

  .bb-opening-hours-day legend,
  .bb-opening-hours-open-toggle {
    grid-column: 1;
  }

  .backoffice-content {
    padding: 14px 12px 28px;
  }

  .backoffice-topbar {
    margin: -14px -12px 16px;
    padding: 10px 12px;
  }

  .backoffice-topbar .bb-backoffice-back-btn {
    width: 100%;
    max-width: none;
  }

  .backoffice-topbar .bb-topbar-context {
    width: 100%;
  }

  .backoffice-content .card,
  .backoffice-content .dashboard-section,
  .bb-backoffice-dashboard-section,
  .backoffice-content .filters {
    padding: 14px;
  }

  .bb-bo-mobile-entity-heading,
  .bb-bo-mobile-appointment-heading {
    flex-direction: column;
  }

  .bb-bo-dashboard-section-heading,
  .bb-bo-dashboard-section-actions {
    width: 100%;
  }

  .bb-bo-dashboard-section-heading {
    flex-wrap: wrap;
  }

  .bb-bo-dashboard-section-actions {
    justify-content: space-between;
  }

  .bb-bo-dashboard-period-form {
    flex: 1 1 190px;
  }

  .bb-bo-dashboard-period-form select {
    width: 100%;
    min-width: 0;
  }

  .bb-bo-mobile-state,
  .status {
    max-width: 100%;
    white-space: normal;
  }

  .bb-bo-mobile-entity-meta > div,
  .bb-bo-mobile-card-table td {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }
}

@media (max-height: 480px) and (max-width: 1024px) {
  .backoffice-shell .bb-backoffice-sidebar .bb-sidebar-brand {
    min-height: 58px;
    padding-block: 8px;
  }

  .backoffice-shell .bb-backoffice-sidebar .bb-sidebar-link {
    min-height: 36px;
    padding-block: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .backoffice-shell .bb-backoffice-sidebar {
    transition: none;
  }

  .bb-sidebar-group-toggle .bb-sidebar-group-chevron {
    transition: none;
  }
}
