/* Loader Looply: três pontos compactos, com o mesmo destaque. */
.loader {
  --color-1: #fff;
  --color-2: #fff;
  --size: .5px;
  display: inline-block;
  flex: 0 0 calc(76 * var(--size));
  width: calc(76 * var(--size));
  height: calc(76 * var(--size));
  border-radius: 0;
  background: radial-gradient(circle, var(--color-1) 0 calc(8 * var(--size)), transparent calc(8.5 * var(--size)));
  position: relative;
  overflow: visible;
}
.loader::before,
.loader::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  width: calc(16 * var(--size));
  height: calc(16 * var(--size));
  margin: calc(-8 * var(--size)) 0 0 calc(-8 * var(--size));
  background: var(--color-2);
  transform: rotate(0deg) translate(calc(30 * var(--size)));
  animation: looply-loader-rotate 1s ease infinite;
}
.loader::after { animation-delay: 0.5s; }
@keyframes looply-loader-rotate {
  100% { transform: rotate(360deg) translate(calc(30 * var(--size))); }
}
.button.is-loading .loader,
#loginSubmit .loader,
#registerSubmit .loader { --size: .36px; }
.session-loading-indicator .loader { --size: .38px; }
.button.is-loading {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-sizing: border-box !important;
  min-height: 0 !important;
  padding-block: 0 !important;
  overflow: hidden;
}
.button-loading-label { min-width: 0; flex: 0 1 auto; line-height: 1.2; }
.button.is-loading .loader { flex: 0 0 28px; width: 28px; height: 28px; }
body.session-loading .session-loading-indicator {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000 !important;
  display: grid !important;
  place-items: center !important;
  color: #fff !important;
  pointer-events: none !important;
}
body:not(.session-loading) .session-loading-indicator { display: none !important; }
body.session-loading::after {
  content: none !important;
  display: none !important;
  background: none !important;
  animation: none !important;
}

/* Keep the initial and refresh loader visually light on the branded screen. */
body.session-loading .session-loading-indicator .loader {
  --size: .34px;
}
/* Correções dos formulários e da navegação listadas em 19/10/2026. */
:root {
  --looply-field-radius: 12px;
  --text-field: var(--text-caption, .75rem);
  --looply-button-font-size: .75rem;
  --looply-button-line-height: 20px;
  --looply-button-height: 44px;
  --looply-dialog-padding: 24px;
  --looply-dialog-gap: 20px;
  --looply-dialog-button-font-size: .75rem;
}
/* Dialogs keep content above the action row, with room between each section. */
:root body .modal-backdrop .modal { padding: var(--looply-dialog-padding) !important; }
:root body .modal .modal-header { gap: 16px !important; margin-bottom: var(--looply-dialog-gap) !important; }
:root body .modal .modal-header h2 { margin: 0 !important; }
:root body :is(.modal-header, .portal-modal-header, .portal-popup-header-inline) :is(h2, h3) { white-space: normal !important; overflow-wrap: anywhere; line-height: 1.35 !important; }
/* Profile follows the booking portal's bottom-sheet presentation. */
:root body :is(#userProfileModal, #staffAccessModal) { align-items: flex-end !important; justify-content: center !important; padding: 0 !important; }
:root body :is(#userProfileModal, #staffAccessModal) .modal {
  width: min(640px, 100%) !important;
  max-width: 100% !important;
  max-height: 92dvh !important;
  margin: 0 !important;
  border-radius: 24px 24px 0 0 !important;
  padding-bottom: calc(var(--looply-dialog-padding) + env(safe-area-inset-bottom, 0px)) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  transform: none !important;
  translate: 0 100%;
  transition: translate 220ms ease, opacity 180ms ease !important;
}
:root body :is(#userProfileModal, #staffAccessModal).open .modal { translate: 0 0; animation: looply-profile-sheet-in 220ms ease-out; }
:root body #userProfileStatus:empty { display: none; }
:root body #userProfileModal .user-profile-photo { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; min-width:0; }
:root body #userProfileModal .user-profile-photo-picker { position:relative; display:block; width:88px; height:88px; padding:0; border:0; border-radius:50%; background:transparent; cursor:pointer; }
:root body #userProfileModal .user-profile-photo-picker:focus-visible { outline:2px solid var(--color-primary); outline-offset:4px; }
:root body #userProfileModal .user-profile-photo-picker:disabled { cursor:wait; opacity:.65; }
:root body #userProfileModal .user-profile-photo-preview { display:grid; place-items:center; width:88px; height:88px; overflow:hidden; border:1px solid var(--color-border); border-radius:50%; background:var(--color-primary-soft); color:var(--color-primary); }
:root body #userProfileModal .user-profile-photo-preview img { width:100%; height:100%; object-fit:cover; }
:root body #userProfileModal .user-profile-photo-preview :is(svg,i) { width:28px; height:28px; }
:root body #userProfileModal .user-profile-photo-edit { position:absolute; right:0; bottom:0; display:grid; place-items:center; width:28px; height:28px; border:3px solid #fff; border-radius:50%; background:var(--color-primary); color:#fff; }
:root body #userProfileModal .user-profile-photo-edit :is(i,svg,.material-symbols-outlined) { width:14px !important; height:14px !important; font-size:14px !important; line-height:14px !important; }
:root body #userProfileModal #userProfilePhotoHint { font-size:12px; line-height:20px; color:var(--color-muted); text-align:center; }
:root body #userProfileModal .profile-policy-link {
  display: block;
  width: 100%;
  text-align: center;
  justify-self: center;
  color: var(--color-primary);
  font-size: 12px;
  line-height: 20px;
  text-underline-offset: 3px;
}
:root body #userProfileModal .profile-policy-link:hover { color: var(--color-primary-strong); }
:root body #userProfileModal .profile-policy-link:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 4px; }
@keyframes looply-profile-sheet-in { from { translate: 0 100%; } to { translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { :root body :is(#userProfileModal, #staffAccessModal) .modal { animation: none !important; transition: none !important; } }
:root body .modal .form-grid { margin-top: 0 !important; column-gap: 20px !important; row-gap: var(--looply-dialog-gap) !important; }
:root body .modal .form-grid label { row-gap: 8px !important; }
:root body .modal > :is(.confirm-text, .modal-note) { margin: 0 !important; line-height: 1.6; }
:root body .modal .modal-actions { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; gap: 12px !important; margin-top: 24px !important; width: 100%; }
:root body .modal .form-grid .modal-actions { margin-top: 4px !important; }
:root body #confirmModal .modal-header { margin-bottom:16px !important; }
:root body #confirmModal #confirmTitle { font-size:18px !important; line-height:24px !important; font-weight:500 !important; }
:root body #confirmModal .confirm-text { font-size:14px !important; line-height:22px !important; }
:root body #confirmModal .modal-actions { gap:12px !important; margin-top:20px !important; }
:root body #confirmModal .modal-actions .button { font-size:12px !important; line-height:20px !important; font-weight:400 !important; }
:root body .modal .modal-actions > .button { flex: 1 1 0 !important; min-width: 0; }
:root body .portal-modal-header { padding: 20px 24px !important; gap: 16px !important; }
:root body :is(.portal-modal-body, .portal-popup-body) { padding: 24px !important; }
:root body .portal-popup-body { display: flex; flex-direction: column; gap: var(--looply-dialog-gap); }
:root body .portal-popup-body > :is(p, .portal-popup-header-inline) { margin: 0 !important; }
:root body .portal-modal-footer { gap: 12px !important; padding: 20px 24px !important; }
:root body .portal-popup-body > .portal-modal-footer { margin-top: 4px !important; padding: 0 !important; }
:root body .browser-notification-prompt { grid-template-columns: 42px minmax(0, 1fr) !important; align-items: start !important; column-gap: 14px !important; row-gap: 20px !important; padding: var(--looply-dialog-padding) !important; }
:root body .browser-notification-copy strong { white-space: normal !important; line-height: 1.4 !important; }
:root body .browser-notification-copy p { margin-top: 8px !important; line-height: 1.5 !important; }
:root body .browser-notification-actions { grid-column: 1 / -1 !important; display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; gap: 12px !important; width: 100% !important; }
:root body .browser-notification-actions .button { flex: 1 1 0 !important; min-width: 0 !important; }
:root body :is(.modal, .portal-modal, .browser-notification-prompt, .staff-password-dialog) :is(.button, .file-button, .portal-primary-button, .portal-secondary-button, .portal-payment-button, .portal-slot-button, .auth-link-button) {
  font-size: var(--looply-dialog-button-font-size) !important;
  line-height: 20px !important;
}
/* Action labels use 14/20px; icons and navigation retain their own scale. */
:root body :is(.button, .file-button, .portal-primary-button, .portal-secondary-button, .portal-payment-button, .portal-slot-button, .auth-link-button, .portal-resend-code-button, .action-menu-list button, .pagination-button, .staff-card button) {
  font-size: var(--looply-button-font-size) !important;
  line-height: var(--looply-button-line-height) !important;
  font-weight: 400 !important;
}
:root body :is(.button, .file-button, .portal-primary-button, .portal-secondary-button, .portal-payment-button, .portal-slot-button) :is(span, strong):not(.material-symbols-outlined):not(.appbar-plus-icon):not([data-lucide]) {
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: inherit !important;
}
:root body :is(.button:not(.floating-primary-action), .file-button, .portal-primary-button, .portal-secondary-button, .portal-payment-button, .portal-slot-button, .staff-card button) {
  min-height: var(--looply-button-height) !important;
  height: auto !important;
  padding: 10px 16px !important;
  box-sizing: border-box;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
:root body .auth-form .button { min-height: 48px !important; padding: 12px 16px !important; }
:root body .auth-form .button.is-loading {
  height: 48px !important;
  min-height: 48px !important;
  padding: 10px 16px !important;
}
:root body .agenda-slot-buttons .button { min-height: 40px !important; padding: 8px 12px !important; }
:root body :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]) {
  border-radius: var(--looply-field-radius);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
:root body :is(.password-field, .date-field, .money-field, .portal-date-control) {
  box-shadow: none !important;
  outline: none !important;
}
:root body :is(.password-field, .date-field) { border-radius: var(--looply-field-radius) !important; }
:is(.button, .portal-primary-button, .portal-secondary-button) { border-radius: var(--looply-field-radius) !important; }
.auth-policy-acceptance { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.5; }
.auth-policy-acceptance input { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; accent-color: #e0115f; }
.auth-policy-acceptance a { color: #b10d4b; text-decoration: underline; }

/* The registration consent uses the same compact native checkbox as WhatsApp consent. */
:root body .auth-form .auth-policy-acceptance { display:flex !important; grid-template-columns:none !important; align-items:flex-start !important; gap:10px !important; }
:root body .auth-form .auth-policy-acceptance::after { display:none !important; content:none !important; }
:root body .auth-form .auth-policy-acceptance input[type="checkbox"] {
  appearance:auto !important;
  flex:0 0 18px !important;
  width:18px !important;
  min-width:18px !important;
  height:18px !important;
  min-height:18px !important;
  margin:2px 0 0 !important;
  padding:0 !important;
  accent-color:#e0115f !important;
}
:root body .auth-form .auth-policy-acceptance > span { min-width:0 !important; }

/* The onboarding category action fills its form row at every viewport width. */
:root body #productCategoryModal #productCategoryForm .modal-actions {
  display:grid !important;
  grid-template-columns:minmax(0, 1fr) !important;
  width:100% !important;
}
:root body #productCategoryModal #productCategoryForm .modal-actions > .button {
  display:flex !important;
  width:100% !important;
  max-width:none !important;
}

/* Reuse the booking success animation in the one-time onboarding completion dialog. */
:root body #firstAppointmentCelebrationModal .celebration-illustration:has(iframe) {
  width:clamp(160px, 30vw, 220px) !important;
  height:clamp(160px, 30vw, 220px) !important;
  min-height:0 !important;
  margin:0 auto !important;
  overflow:hidden !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
}
:root body #firstAppointmentCelebrationModal .celebration-illustration iframe {
  display:block;
  width:100%;
  height:100%;
  border:0;
}
.auth-form[hidden] { display: none !important; }
.agenda-slot-hint { display: none !important; }
.agenda-schedule-block { position: absolute; inset-inline: 2px; z-index: 2; padding: 6px 10px; border: 1px solid #d5d5db; border-radius: 8px; background: repeating-linear-gradient(135deg, #f0f0f3, #f0f0f3 8px, #e9e9ee 8px, #e9e9ee 16px); color: #484851; overflow: hidden; font-size: 12px; }
.agenda-schedule-block strong, .agenda-schedule-block span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action-menu-list[popover] { inset: auto; margin: 0; overflow-y: auto !important; overscroll-behavior: contain; box-sizing: border-box; }
.action-menu-list[popover]:popover-open { display: block; }
.date-field .native-date-picker { top: 50% !important; right: 0 !important; transform: translateY(-50%); width: 44px !important; height: 44px !important; pointer-events: auto !important; z-index: 4 !important; cursor: pointer; }
.date-field .native-date-picker::-webkit-calendar-picker-indicator { width: 100%; height: 100%; cursor: pointer; }
@media (max-width: 760px), (pointer: coarse) {
  :root { --looply-dialog-padding: 20px; }
  :root body .portal-modal-header { padding: 20px !important; }
  :root body :is(.portal-modal-body, .portal-popup-body) { padding: 20px !important; }
  :root body .portal-modal-footer { padding: 20px !important; }
  .modal-backdrop .modal { max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; box-sizing: border-box; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid > *, .form-grid label, .auth-card { min-width: 0; }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions .button { flex: 1 1 auto; }
  :root body .agenda-slot-buttons .button { min-height: var(--looply-button-height) !important; }
}

/* Regular text for action controls, including tab labels. */
:root body button:not(.icon-button):not(.floating-primary-action),
:root body button :is(span, strong):not(.material-symbols-outlined):not([data-lucide]) { font-weight: 400 !important; }

.staff-access-content { display:grid; gap:20px; min-width:0; font-size:12px; line-height:1.65; }
.staff-access-content p { margin:0; }
.staff-access-person { display:flex; align-items:center; gap:12px; padding:16px; border-radius:12px; background:var(--color-primary-soft); }
.staff-access-person > :is(svg,i,.material-symbols-outlined) { color:var(--color-primary); flex-shrink:0; }
.staff-access-person p { font-size:14px; overflow-wrap:anywhere; }
.staff-access-person span, .staff-access-note, .staff-access-content label small { color:var(--color-muted); font-size:12px; }
.staff-password-result { display:grid; gap:8px; min-width:0; }
.staff-password-result[hidden] { display:none !important; }
.staff-password-result label { font-size:12px; line-height:20px; }
.staff-password-result textarea { box-sizing:border-box; min-height:48px; padding:12px; resize:none; font-family:var(--font-sans),Poppins,sans-serif !important; font-size:12px !important; font-weight:400 !important; line-height:20px !important; letter-spacing:normal; text-align:left; overflow-wrap:anywhere; }
.staff-password-result small { color:var(--color-muted); font-size:12px; line-height:20px; }
:root body #staffAccessModal .modal-actions { margin-top:0 !important; }
@media (max-width:380px) { :root body #staffAccessModal .modal-actions { flex-direction:column !important; } }

/* Título do cabeçalho e medidas estáveis da sidebar. */
:root body .top-controls #appbarTitle {
  font-size: 20px !important;
  line-height: 1.25 !important;
}

:root body .sidebar .brand,
:root body .app-shell.sidebar-collapsed .sidebar .brand {
  min-height: 48px !important;
  height: 48px !important;
  align-items: center !important;
}

:root body .sidebar .brand-mark,
:root body .app-shell.sidebar-collapsed .sidebar .brand-mark {
  height: 48px !important;
  min-height: 48px !important;
  align-items: center !important;
}

:root body .sidebar .brand-mark img {
  display: block !important;
  width: auto !important;
  height: 30px !important;
  max-width: none !important;
  object-fit: contain !important;
}

@media (min-width: 981px) {
  :root body .app-shell.sidebar-collapsed .sidebar .brand-mark {
    width: 36px !important;
    height: 48px !important;
    min-height: 48px !important;
    justify-content: flex-start !important;
  }

  :root body .app-shell.sidebar-collapsed .sidebar .brand-mark img {
    width: auto !important;
    height: 30px !important;
    margin: 0 !important;
  }

  :root body .app-shell.sidebar-collapsed .sidebar .nav-item,
  :root body .app-shell.sidebar-collapsed .sidebar .nav-item.active,
  :root body .app-shell.sidebar-collapsed .sidebar .nav-item.active:hover {
    height: 38px !important;
    min-height: 38px !important;
  }
}

@media (max-width: 980px), (pointer: coarse) {
  :root body .top-controls #appbarTitle {
    font-size: 18px !important;
    line-height: 1.25 !important;
  }

  :root body .sidebar .brand-mark {
    justify-content: center !important;
    height: 48px !important;
    min-height: 48px !important;
    overflow: hidden !important;
  }

  :root body .sidebar .brand-mark img {
    width: auto !important;
    height: 30px !important;
    max-width: none !important;
    margin-inline: auto !important;
  }
}

/* Ajuste apenas da marca na sidebar: tamanho legível também recolhida. */
:root body .sidebar .brand-mark img {
  width: 132px !important;
  height: auto !important;
  max-width: 100% !important;
}

@media (min-width: 981px) {
  :root body .app-shell.sidebar-collapsed .sidebar .brand-mark {
    width: 44px !important;
  }

  :root body .app-shell.sidebar-collapsed .sidebar .brand-mark img {
    width: auto !important;
    height: 44px !important;
    max-width: none !important;
  }
}

@media (max-width: 980px), (pointer: coarse) {
  :root body .sidebar .brand-mark img {
    width: 132px !important;
    height: auto !important;
    max-width: 100% !important;
  }
}

/* Escala única para a logo: mantém proporção em qualquer largura de sidebar. */
:root body .sidebar .brand-mark img,
:root body .app-shell.sidebar-collapsed .sidebar .brand-mark img {
  width: 104px !important;
  height: auto !important;
  max-width: none !important;
  object-fit: contain !important;
}

@media (min-width: 981px) {
  :root body .app-shell.sidebar-collapsed .sidebar .brand-mark {
    width: 36px !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
  }
}

/* Logo proporcional ao cabeçalho da sidebar aberta, em desktop e celular. */
:root body .sidebar .brand {
  justify-content: center !important;
}
:root body .sidebar .brand-mark:not(.app-shell.sidebar-collapsed .sidebar .brand-mark) {
  justify-content: center !important;
}
:root body .sidebar .brand-mark img {
  width: 88px !important;
  height: auto !important;
  max-width: 100% !important;
  margin-inline: auto !important;
}

/* Logo aberta ocupa a largura disponível, com limite responsivo. */
:root body .app-shell:not(.sidebar-collapsed) .sidebar .brand-mark img {
  width: min(176px, 100%) !important;
  max-width: 100% !important;
  height: auto !important;
  margin-inline: auto !important;
}

/* A marca fica à esquerda dentro de um bloco centralizado e proporcional. */
:root body .app-shell:not(.sidebar-collapsed) .sidebar .brand {
  justify-content: center !important;
}
:root body .app-shell:not(.sidebar-collapsed) .sidebar .brand-mark {
  width: 80% !important;
  margin-inline: auto !important;
  justify-content: flex-start !important;
}
:root body .app-shell:not(.sidebar-collapsed) .sidebar .brand-mark img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
}

/* A logo móvel não deve ser cortada pelo contêiner da sidebar. */
@media (max-width: 980px) {
  :root body .app-shell .sidebar .brand {
    width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }
  :root body .app-shell .sidebar .brand-mark {
    width: min(80%, 220px) !important;
    min-width: 0 !important;
    margin-inline: auto !important;
    overflow: visible !important;
    justify-content: flex-start !important;
  }
  :root body .app-shell .sidebar .brand-mark img {
    display: block !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }
}


/* Histórico ausente é informativo, não um retorno concluído/positivo. */
:root body .client-table-grid .status-pill.no-history {
  background: #f1f5f9 !important;
  color: #475569 !important;
}

:root body .client-table-grid .status-pill.no-history,
:root body .client-table-grid .status-pill.no-service {
  background: #f1f5f9 !important;
  color: #475569 !important;
}

/* Em telas estreitas, a tabela vira cartões em linhas para manter o status visível. */
@media (max-width: 720px) {
  :root body .client-table-grid {
    min-width: 0 !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px 12px !important;
  }
  :root body .management-table-header.client-table-grid {
    display: none !important;
  }
  :root body .management-table-row.client-table-grid {
    padding: 14px !important;
  }
  :root body .management-table-row.client-table-grid > strong {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
    overflow-wrap: anywhere !important;
  }
  :root body .management-table-row.client-table-grid > span:not(.status-pill) {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
    overflow-wrap: anywhere !important;
  }
  :root body .management-table-row.client-table-grid > .status-pill {
    grid-column: 1 !important;
    width: fit-content !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
  :root body .management-table-row.client-table-grid > .card-actions {
    grid-column: 2 !important;
    grid-row: auto !important;
  }
}


/* Badges de retorno com cores e ícones legíveis e consistentes. */
:root body .client-table-grid .status-pill {
  display: inline-flex !important;
  width: max-content !important;
  max-width: 100% !important;
  min-height: 30px !important;
  gap: 7px !important;
  padding: 5px 12px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 18px !important;
  white-space: nowrap !important;
}
:root body .client-table-grid .status-pill > i[data-lucide] {
  display: inline-flex !important;
  flex: 0 0 16px !important;
  width: 16px !important;
  height: 16px !important;
  align-items: center !important;
  justify-content: center !important;
}
:root body .client-table-grid .status-pill > i[data-lucide] svg {
  width: 16px !important;
  height: 16px !important;
}
:root body .client-table-grid .status-pill.ok {
  background: #dcfce7 !important;
  color: #15803d !important;
}
:root body .client-table-grid .status-pill.today {
  background: #fef3c7 !important;
  color: #b45309 !important;
}
:root body .client-table-grid .status-pill.late {
  background: #fee2e2 !important;
  color: #b91c1c !important;
}
:root body .client-table-grid .status-pill.no-history,
:root body .client-table-grid .status-pill.no-service {
  background: #f1f5f9 !important;
  color: #475569 !important;
}

/* Todas as paginações ficam agrupadas no centro da área. */
:root body .pagination {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  justify-items: center !important;
  gap: 12px !important;
  text-align: center !important;
}
:root body .pagination > p {
  width: 100% !important;
  text-align: center !important;
}
:root body .pagination-actions {
  width: 100% !important;
  justify-content: center !important;
}


/* Horários de atendimento com a mesma estrutura nos ajustes gerais e por dia. */
:root body .weekly-schedule-section {
  display: grid !important;
  gap: 12px !important;
  max-width: 820px !important;
}
:root body .weekly-apply-all-toggle {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-sizing: border-box !important;
}
:root body .weekly-apply-range {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) !important;
  align-items: end !important;
  gap: 10px !important;
  margin: 0 0 4px !important;
  padding: 14px !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-sizing: border-box !important;
}
:root body .weekly-apply-range label,
:root body .weekly-time-field {
  display: grid !important;
  min-width: 0 !important;
  gap: 6px !important;
  color: var(--color-text) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 18px !important;
}
:root body .weekly-schedule-list {
  display: grid !important;
  gap: 10px !important;
}
:root body .weekly-schedule-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 14px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 14px !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-sizing: border-box !important;
}
:root body .weekly-schedule-day-head {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 28px !important;
}
:root body .weekly-schedule-day-head strong {
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 20px !important;
}
:root body .weekly-time-fields {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) !important;
  align-items: end !important;
  gap: 10px !important;
  min-width: 0 !important;
}
:root body .weekly-time-field input,
:root body .weekly-apply-range input {
  width: 100% !important;
  min-width: 0 !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 12px !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  color: var(--color-text) !important;
  font-size: 15px !important;
}
:root body .weekly-time-field input:disabled {
  background: var(--color-bg-soft) !important;
  color: var(--color-muted) !important;
  opacity: 1 !important;
}
:root body .weekly-time-fields .weekly-range-separator,
:root body .weekly-apply-range .weekly-range-separator {
  display: grid !important;
  align-self: end !important;
  height: 48px !important;
  place-items: center !important;
  color: var(--color-muted) !important;
  font-size: 13px !important;
}
@media (max-width: 720px) {
  :root body .weekly-apply-range,
  :root body .weekly-time-fields {
    grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr) !important;
    gap: 8px !important;
  }
  :root body .weekly-schedule-section { gap: 10px !important; }
  :root body .weekly-schedule-row { padding: 12px !important; }
}

/* Campos de redes sociais com ícone integrado ao campo de texto. */
:root body .booking-social-grid {
  display: grid !important;
  grid-column: 1 / -1 !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px !important;
}
:root body .booking-social-field {
  display: grid !important;
  grid-template-columns: 24px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 0 !important;
  min-height: 48px !important;
  padding: 0 14px !important;
  border: 1px solid var(--color-border) !important;
  border-radius: var(--looply-field-radius, 12px) !important;
  background: #fff !important;
  box-sizing: border-box !important;
}
:root body .booking-social-field:focus-within {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px rgba(224, 17, 95, .12) !important;
}
:root body .booking-social-icon {
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  color: var(--color-muted) !important;
  flex: 0 0 auto !important;
}
:root body .booking-social-field input {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 46px !important;
  height: 46px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
:root body .booking-page-form .booking-social-field input:focus,
:root body .booking-page-form .booking-social-field input:focus-visible {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Em telas largas, organiza os dias em duas colunas sem apertar os horários. */
@media (min-width: 1100px) {
  :root body .weekly-schedule-section {
    max-width: none !important;
  }
  :root body .weekly-schedule-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: start !important;
    gap: 12px !important;
  }
}


/* O controle “Aplicar para todos” deve acompanhar o conteúdo do rótulo. */
:root body .weekly-apply-all-toggle {
  justify-self: start !important;
  width: max-content !important;
  max-width: 100% !important;
}

/* Mensagens: edição direta, explicações claras e fonte igual à interface. */
:root body .messages-main-panel > .panel-header p {
  max-width: 72ch;
}

:root body .message-template-form {
  margin-top: 20px;
}

:root body .message-template-scroll {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-height: none;
  padding-right: 0;
  overflow: visible;
}

:root body .message-template-field {
  display: grid;
  align-content: start;
  gap: 10px !important;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #ffffff;
}

:root body .message-template-field > span {
  display: grid;
  gap: 4px;
}

:root body .message-template-field strong {
  color: var(--color-text);
  font-size: var(--text-body);
  font-weight: 500 !important;
}

:root body .message-template-field small {
  color: var(--color-muted);
  font-size: var(--text-caption);
  font-weight: 400 !important;
  line-height: 1.5;
}

:root body .message-template-editor {
  min-height: 116px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--color-text);
  font-family: var(--font-sans) !important;
  font-size: var(--text-field) !important;
  font-weight: 400 !important;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  outline: none;
  cursor: text;
}

:root body .message-template-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--color-muted);
  pointer-events: none;
}

:root body .message-template-editor:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(224, 17, 95, 0.12);
}

:root body .message-field-token {
  display: inline;
  padding: 0 2px;
  border-radius: 4px;
  background: var(--color-primary-soft);
  color: var(--color-primary-strong);
  font-weight: 500 !important;
}

:root body .message-field-picker {
  position: relative;
  justify-self: start;
}

:root body .message-field-picker > summary {
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-soft);
  color: var(--color-primary-strong);
  cursor: pointer;
  font-size: var(--text-caption);
  font-weight: 500;
  list-style: none;
}

:root body .message-field-picker > summary::-webkit-details-marker {
  display: none;
}

:root body .message-field-picker-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  display: grid;
  width: min(300px, calc(100vw - 64px));
  max-height: 260px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

:root body .message-field-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

:root body .message-field-option:hover,
:root body .message-field-option:focus-visible {
  background: var(--color-primary-soft);
  outline: none;
}

:root body .message-field-option code {
  flex: 0 0 auto;
  color: var(--color-primary-strong);
  font-family: var(--font-sans);
  font-size: var(--text-caption);
}

:root body .message-template-actions {
  justify-items: end;
}

:root body .message-template-actions .button {
  width: auto;
  min-width: 190px;
}

@media (max-width: 760px) {
  :root body .message-template-scroll {
    grid-template-columns: minmax(0, 1fr);
  }

  :root body .message-template-actions {
    justify-items: stretch;
  }

  :root body .message-template-actions .button {
    width: 100%;
  }

  :root body .message-template-actions .button {
    width: 100%;
  }
}

/* Settings permissions: concise cards with a clear desktop/mobile layout. */
:root body #configuracoes .notification-settings-panel,
:root body #configuracoes .sound-settings-panel {
  grid-column: auto;
  align-self: start;
}

:root body #configuracoes .notification-settings-panel {
  padding: 22px !important;
}

:root body #configuracoes .notification-settings-status-row {
  margin-top: 22px;
}

:root body #configuracoes .notification-settings-help {
  margin-top: 8px;
}

:root body #configuracoes .sound-settings-panel {
  min-height: 100%;
  padding: 22px;
}

/* Permission and sound preferences share the same header and compact control layout. */
:root body #configuracoes .notification-settings-panel,
:root body #configuracoes .sound-settings-panel {
  position: relative;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  align-items: center;
  column-gap: 24px;
  row-gap: 14px;
}

:root body #configuracoes .notification-settings-panel.active,
:root body #configuracoes .sound-settings-panel.active {
  display: grid;
}

:root body #configuracoes .notification-settings-panel:not(.active),
:root body #configuracoes .sound-settings-panel:not(.active) {
  display: none;
}

:root body #configuracoes .settings-preference-header {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

:root body #configuracoes .settings-preference-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

:root body #configuracoes .settings-preference-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

:root body #configuracoes .settings-preference-header h3 {
  margin: 0;
  font-size: var(--text-body);
  line-height: 1.25;
}

:root body #configuracoes .settings-preference-header p {
  margin: 5px 0 0;
  color: var(--color-muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

:root body #configuracoes .settings-preference-control {
  position: relative;
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 44px;
}

:root body #configuracoes .settings-help-button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: transparent;
  color: var(--color-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

:root body #configuracoes .settings-help-button:hover,
:root body #configuracoes .settings-help-button[aria-expanded="true"] {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

:root body #configuracoes .settings-help-button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

:root body #configuracoes .settings-preference-control .switch-control {
  cursor: pointer;
}

:root body #configuracoes .settings-preference-control .switch-control input:disabled + span {
  opacity: 0.6;
}

:root body #configuracoes .settings-preference-status {
  grid-column: 1;
  grid-row: 2;
  margin: 0 0 0 58px;
  color: var(--color-muted);
  font-size: var(--text-caption);
}

:root body #configuracoes .settings-preference-status[data-enabled="true"] {
  color: #147365;
}

:root body #configuracoes .settings-preference-status[hidden] {
  display: none !important;
}

:root body #configuracoes .settings-preference-details {
  position: absolute;
  top: 68px;
  right: 16px;
  z-index: 40;
  width: min(300px, calc(100vw - 48px));
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-muted);
  box-shadow: var(--shadow-soft);
  font-size: 0.75rem;
  line-height: 1.5;
}

:root body #configuracoes .settings-preference-details[hidden] {
  display: none !important;
}

@media (max-width: 600px) {
  :root body #configuracoes .notification-settings-panel,
  :root body #configuracoes .sound-settings-panel {
    column-gap: 12px;
    row-gap: 12px;
  }

  :root body #configuracoes .settings-preference-header { gap: 10px; }
  :root body #configuracoes .settings-preference-icon {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }
  :root body #configuracoes .settings-preference-status { margin-left: 50px; }
  :root body #configuracoes .settings-preference-details { top: 64px; right: 12px; }
}

@media (max-width: 1180px) {
  :root body #configuracoes .notification-settings-panel,
  :root body #configuracoes .sound-settings-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  :root body #configuracoes .notification-settings-panel,
  :root body #configuracoes .sound-settings-panel {
    padding: 18px !important;
  }
}

/* Appointment detail actions: one clear primary action and a stable status. */
:root body .appointment-detail-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
}

:root body .appointment-detail-actions > .button,
:root body .appointment-detail-actions > .appointment-cancelled-status {
  width: 100% !important;
  min-height: 56px;
}

:root body .appointment-cancel-button {
  min-height: 48px !important;
  padding-inline: 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--color-primary) !important;
  text-decoration: underline;
  text-underline-offset: 4px;
}

:root body .appointment-cancel-button:hover {
  background: transparent !important;
  color: var(--color-primary-strong) !important;
}

:root body .appointment-cancelled-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-soft);
  color: var(--color-muted);
  cursor: default;
}

:root body .appointment-detail-menu {
  flex: 0 0 auto;
}

:root body .appointment-detail-menu .action-menu-list {
  min-width: 240px;
}

:root body #manualMessageText {
  font-family: var(--font-sans) !important;
  font-size: var(--text-field) !important;
  line-height: 1.5 !important;
}

:root body .whatsapp-recipient-consent {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 0;
  cursor: pointer;
}

:root body .whatsapp-recipient-consent .switch-control {
  flex: 0 0 40px;
  cursor: pointer;
}

:root body .whatsapp-recipient-consent .switch-control input:focus-visible + span {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

:root body .appointment-message-options {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 8px !important;
}

:root body .appointment-message-options #appointmentPredefinedMessage {
  width: 100%;
  justify-content: center;
}

:root body .appointment-message-options .appointment-message-manual-link {
  display: flex;
  align-self: center;
  width: auto;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-primary);
  font: inherit;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

:root body .appointment-message-options .appointment-message-manual-link:hover {
  background: transparent;
  color: var(--color-primary-strong);
}

:root body #manualMessageForm button[type="submit"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}


/* Preset booking and cancellation windows. */
:root body .booking-policy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
:root body .booking-policy-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
}
:root body .booking-policy-card > h4 {
  margin: 0;
  padding: 0;
  color: var(--color-text);
  font-size: var(--text-body);
  font-weight: 600;
  line-height: 1.4;
}
:root body .booking-policy-card > p {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-caption);
  line-height: 1.5;
}
:root body .booking-policy-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
:root body .booking-policy-option {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}
:root body .booking-policy-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
:root body .booking-policy-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-soft);
  color: var(--color-text);
  font-size: var(--text-caption);
  line-height: 1.3;
  text-align: center;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}
:root body .booking-policy-option input:checked + span {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}
:root body .booking-policy-option input:focus-visible + span {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
@media (max-width: 920px) {
  :root body .booking-policy-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  :root body .booking-policy-card { padding: 14px; }
  :root body .booking-policy-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* Escala final de tipografia, pop-ups e controles responsivos. */
:root body .toast {
  width: fit-content !important;
  max-width: min(360px, calc(100vw - 32px)) !important;
  padding: 10px 14px !important;
  font-size: 13px !important;
  line-height: 19px !important;
  overflow-wrap: anywhere !important;
}
:root body .top-controls #appbarTitle {
  font-size: 16px !important;
  line-height: 22px !important;
  font-weight: 600 !important;
}
:root body .notification-drawer-header #notificationTitle {
  min-height: 0 !important;
  font-size: 16px !important;
  line-height: 22px !important;
  font-weight: 600 !important;
}

/* Match the appbar rhythm while leaving room for the title and close control. */
:root body .notification-drawer-header {
  box-sizing: border-box !important;
  height: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  padding: 8px 24px !important;
  align-items: center !important;
}

@media (max-width: 720px) {
  :root body .notification-drawer-header {
    height: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
    padding: 8px 16px !important;
  }
}

:root body .notification-drawer-header [data-close-notifications] {
  box-sizing: border-box !important;
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  flex: 0 0 40px !important;
  display: grid !important;
  place-items: center !important;
}

/* Prevent accidental page-wide text selection on touch and drag; inputs remain selectable. */
:root body,
:root body * {
  -webkit-user-select: none !important;
  user-select: none !important;
}

:root body :is(input, textarea, [contenteditable="true"], [contenteditable=""]),
:root body :is(input, textarea, [contenteditable="true"], [contenteditable=""]) * {
  -webkit-user-select: text !important;
  user-select: text !important;
}

:root body #firstAppointmentCelebrationModal .celebration-message {
  max-width: 360px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

/* Keep the appointment archive tabular on phones; let the table scroll horizontally. */
:root body #appointmentArchiveList {
  overflow-x: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  scrollbar-width: thin !important;
}
:root body #appointmentArchiveList::-webkit-scrollbar {
  display: block !important;
  width: 6px !important;
  height: 6px !important;
}
:root body #appointmentArchiveList .appointment-archive-grid {
  display: grid !important;
  width: max(100%, 900px) !important;
  min-width: 900px !important;
  grid-template-columns: minmax(150px, 1.15fr) minmax(160px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(104px, 0.6fr) 44px !important;
  column-gap: 16px !important;
}
:root body #appointmentArchiveList .management-table-header {
  display: grid !important;
}
:root body #appointmentArchiveList .management-table-row > :is(strong, span) {
  grid-column: auto !important;
  grid-row: auto !important;
}
:root body #appointmentArchiveList .management-table-row > .icon-button {
  grid-column: auto !important;
  grid-row: auto !important;
  align-self: center !important;
}

/* Report data grids retain their columns and type scale on narrow screens. */
:root body #relatorios .report-data-list {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin !important;
}
:root body #relatorios .report-data-list-header,
:root body #relatorios .report-data-list > div[role="row"] {
  display: grid !important;
  width: max(100%, calc(var(--report-column-count, 3) * 144px + 48px)) !important;
  min-width: calc(var(--report-column-count, 3) * 144px + 48px) !important;
  grid-template-columns: repeat(var(--report-column-count, 3), minmax(144px, 1fr)) !important;
  align-items: center !important;
  gap: 16px !important;
  box-sizing: border-box !important;
}
:root body #relatorios .report-data-list-header span,
:root body #relatorios .report-data-list > div[role="row"] span {
  min-width: 0 !important;
  font-size: 12px !important;
  line-height: 18px !important;
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  text-overflow: ellipsis !important;
}

/* Client rows use the same horizontal table behavior as the service list. */
:root body #clientes #clientList {
  width: 100% !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}
:root body #clientes #clientList .client-table-grid {
  display: grid !important;
  box-sizing: border-box !important;
  width: max(100%, 900px) !important;
  min-width: 900px !important;
  grid-template-columns: minmax(180px, 1.25fr) minmax(160px, 1fr) minmax(120px, .7fr) minmax(150px, .8fr) 196px !important;
  align-items: center !important;
  gap: 16px !important;
}
:root body #clientes #clientList .management-table-header.client-table-grid {
  display: grid !important;
}
:root body #clientes #clientList .management-table-row.client-table-grid {
  min-height: 76px !important;
  padding: 8px 16px !important;
}
:root body #clientes #clientList .management-table-row.client-table-grid > :is(strong, span, .card-actions) {
  grid-column: auto !important;
  grid-row: auto !important;
}
:root body #clientes #clientList .management-table-row.client-table-grid > :is(strong, span) {
  min-width: 0 !important;
  overflow: hidden !important;
  overflow-wrap: normal !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
:root body .notification-item strong,
:root body .notification-empty strong {
  font-size: 14px !important;
  line-height: 20px !important;
  font-weight: 600 !important;
}
:root body .notification-item p,
:root body .notification-empty p {
  font-size: 12px !important;
  line-height: 18px !important;
}
:root body .notification-item {
  grid-template-columns: 32px minmax(0, 1fr) !important;
}
:root body .notification-item > span {
  width: 32px !important;
  height: 32px !important;
  color: var(--color-primary) !important;
}
:root body .notification-item > span :is(svg, [data-lucide], .material-symbols-outlined) {
  width: 18px !important;
  height: 18px !important;
}

/* Ações únicas ocupam toda a largura do conteúdo em todos os pop-ups. */
:root body .modal .modal-actions > .button:only-child {
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* Acesso profissional aparece como pop-up focado, com ações equilibradas. */
:root body #staffAccessModal {
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
}
:root body #staffAccessModal .staff-access-popup {
  width: min(480px, calc(100vw - 32px)) !important;
  max-width: 480px !important;
  max-height: min(84dvh, 680px) !important;
  padding: 24px !important;
  border-radius: 18px !important;
}
:root body #staffAccessModal.open .staff-access-popup {
  transform: none !important;
  translate: 0 0 !important;
  animation: looply-staff-popup-in 160ms ease-out !important;
}
@keyframes looply-staff-popup-in {
  from { opacity: 0; scale: .98; }
  to { opacity: 1; scale: 1; }
}
:root body #staffAccessModal .staff-access-content {
  gap: 14px !important;
  font-size: 13px !important;
  line-height: 20px !important;
}
:root body #staffAccessModal .staff-access-person {
  padding: 0 !important;
  background: transparent;
}
.staff-access-avatar { display:grid; place-items:center; width:56px; height:56px; flex:0 0 56px; overflow:hidden; border-radius:50%; background:var(--color-primary-soft); color:var(--color-primary) !important; font-size:16px !important; }
.staff-access-avatar img { width:100%; height:100%; object-fit:cover; }
.staff-access-person > div { min-width:0; }
:root body #staffAccessModal .staff-access-content .modal-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
}
:root body #staffAccessModal .staff-revoke-button {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--color-primary) !important;
  text-decoration: underline;
  text-underline-offset: 4px;
}
:root body #staffAccessModal .staff-revoke-button:hover,
:root body #staffAccessModal .staff-revoke-button:focus-visible {
  background: transparent !important;
  color: var(--color-primary-strong) !important;
}

/* A ação de visualizar no extrato segue o padrão neutro dos menus de opções. */
:root body .statement-table-row > .icon-button {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  border-color: transparent !important;
  background: transparent !important;
  color: var(--color-muted) !important;
}
:root body .statement-table-row > .icon-button:hover,
:root body .statement-table-row > .icon-button:focus-visible {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--color-muted) !important;
}
:root body .statement-table-row > .icon-button :is(svg, [data-lucide]) {
  color: currentColor !important;
  stroke: currentColor !important;
}

/* Triggers de três pontos mantêm a mesma área de toque em todas as listas. */
:root body .action-menu > [data-toggle-action-menu],
:root body .action-menu .icon-button {
  box-sizing: border-box !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  border-color: transparent !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: var(--color-muted) !important;
}
:root body .action-menu > [data-toggle-action-menu]:hover,
:root body .action-menu > [data-toggle-action-menu]:focus-visible,
:root body .action-menu .icon-button:hover,
:root body .action-menu .icon-button:focus-visible {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--color-muted) !important;
}
:root body :is(#clientList, #serviceList, #productMovementList, #professionalList, .commission-table) .management-table-row .action-menu .icon-button {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
}

/* Horários não podem impor largura mínima aos cartões no mobile. */
:root body .weekly-schedule-row,
:root body .weekly-time-fields,
:root body .weekly-time-field {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
:root body .weekly-time-field input {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
:root body .weekly-apply-all-toggle {
  font-size: 13px !important;
  line-height: 20px !important;
}
@media (max-width: 560px) {
  :root body #staffAccessModal .staff-access-popup { padding: 20px 16px !important; }
  :root body #staffAccessModal .staff-access-content .modal-actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  :root body .weekly-time-fields {
    grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr) !important;
    gap: 6px !important;
  }
  :root body .weekly-time-field input { padding-inline: 8px !important; }
}
