:root {
  color-scheme: light;
  --ink: #192d24;
  --green: #194b3d;
  --muted: #61716a;
  --line: #dce4dc;
  --terracotta: #bb502e;
  --mustard: #f5b055;
  --cream: #f4ecdf;
}

/* Alertas de apoio em tempo real, sem alterar os alertas de pedidos. */
.support-live-notification { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; margin: 12px 0; border: 1px solid #a8caba; border-radius: 12px; color: #203832; background: #e7f4ed; }
.support-live-notification > div { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.support-live-notification button { flex: 0 0 auto; margin: 0; }

/* Administração da plataforma, apoio e intervenção assistida. */
.admin-body { background: #f3f6f2; }
.admin-header { position: sticky; z-index: 50; top: 0; flex-wrap: nowrap; gap: 28px; padding: 14px max(22px, 4vw); box-shadow: 0 1px 0 #dce4dc; }
.admin-brand { display: grid; flex: 0 0 auto; line-height: 1; }
.admin-brand .platform-logo { width: 105px; }
.admin-brand small { margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.admin-main-nav { justify-content: center; gap: 5px; }
.admin-main-nav a { display: inline-flex; gap: 7px; align-items: center; padding: 9px 13px; border-radius: 9px; color: var(--muted); font-weight: 700; text-decoration: none; }
.admin-main-nav a:hover, .admin-main-nav a.is-active { color: var(--green); background: #eaf1e8; }
.admin-main-nav a span { display: grid; min-width: 20px; height: 20px; padding: 0 5px; place-items: center; border-radius: 99px; color: #fff; background: #c4483c; font-size: 11px; }
.admin-header-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.admin-header-actions form, .admin-header-actions button { margin: 0; }
.admin-main { max-width: 1240px; padding-top: 38px; }
.admin-page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 25px; }
.admin-page-heading .eyebrow, .admin-section-heading .eyebrow { margin: 0 0 5px; }
.admin-page-heading h1 { margin: 0 0 5px; }
.admin-page-heading p:last-child { margin: 0; color: var(--muted); }
.admin-summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.admin-summary-grid article { display: grid; gap: 5px; padding: 19px 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.admin-summary-grid span { color: var(--muted); font-size: 13px; }
.admin-summary-grid strong { font-size: 27px; letter-spacing: -.8px; }
.admin-live-support { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 13px 16px; margin: 15px 0; border: 1px solid #a8caba; border-radius: 12px; background: #e7f4ed; }
.admin-live-support span { font-size: 13px; }
.admin-section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin: 30px 0 12px; }
.admin-section-heading h2 { margin: 0; }
.admin-section-heading > span { color: var(--muted); font-size: 13px; }
.admin-client-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.admin-client-card { min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 5px 18px #20383208; }
.admin-client-card.is-suspended { opacity: .7; }
.admin-client-card-head { display: flex; justify-content: space-between; gap: 15px; }
.admin-client-card-head h2 { margin: 0 0 3px; font-size: 20px; }
.status-dot { color: var(--green); font-size: 13px; }
.status-dot::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #35a26d; }
.plan-badge, .report-plan-chip { align-self: flex-start; padding: 5px 9px; border-radius: 99px; color: #15553f; background: #e7f3ec; font-size: 12px; font-weight: 800; }
.admin-client-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; }
.admin-client-metrics div { display: grid; gap: 1px; padding: 11px; border-radius: 10px; background: #f5f7f3; }
.admin-client-metrics strong { font-size: 16px; }
.admin-client-metrics span { color: var(--muted); font-size: 11px; }
.admin-client-actions { display: flex; gap: 8px; }
.admin-client-actions .button { flex: 1; margin: 0; text-align: center; }
.admin-support-entry { padding-top: 13px; margin-top: 14px; border-top: 1px solid var(--line); }
.admin-support-entry summary { cursor: pointer; color: var(--green); font-size: 13px; font-weight: 800; }
.admin-support-entry form { margin-top: 10px; }
.admin-support-entry form > div { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 9px; }
.admin-support-entry form small { max-width: 58%; color: var(--muted); }
.admin-support-entry input[type='submit'] { width: auto; }
.admin-filter-tabs { gap: 6px; margin-bottom: 15px; overflow-x: auto; flex-wrap: nowrap; }
.admin-filter-tabs a { flex: 0 0 auto; padding: 8px 12px; border-radius: 99px; color: var(--muted); background: #fff; font-size: 13px; font-weight: 700; text-decoration: none; }
.admin-filter-tabs a.is-active { color: #fff; background: var(--green); }
.admin-ticket-list { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.admin-ticket-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 19px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.admin-ticket-row:last-child { border-bottom: 0; }
.admin-ticket-row:hover { background: #f8faf7; }
.admin-ticket-row > div { display: grid; min-width: 0; gap: 3px; }
.admin-ticket-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-ticket-row small { color: var(--muted); }
.ticket-priority { width: max-content; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.ticket-priority.is-urgent { color: #b53a30; }
.ticket-status { display: inline-flex; flex: 0 0 auto; align-items: center; min-height: 27px; padding: 4px 9px; border-radius: 99px; color: #365c4e; background: #e8f1ec; font-size: 11px; font-weight: 800; }
.ticket-status.status-waiting_establishment { color: #715316; background: #fff1c9; }
.ticket-status.status-resolved { color: #5f6965; background: #edf0ee; }
.ticket-status.status-open { color: #185b83; background: #e5f2fa; }
.admin-empty-state, .support-empty { padding: 45px 20px; text-align: center; }
.admin-empty-state p, .support-empty p { color: var(--muted); }
.admin-back-link { display: inline-block; margin: 0 0 15px; font-weight: 700; text-decoration: none; }
.admin-ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.admin-ticket-layout .panel { margin: 0; }
.ticket-title { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.ticket-title .eyebrow { margin: 0 0 4px; }
.ticket-title h1, .ticket-title h2 { margin: 0; font-size: 24px; }
.ticket-messages { display: grid; gap: 12px; padding: 20px 0; }
.ticket-message { max-width: 82%; padding: 13px 15px; border-radius: 14px 14px 14px 3px; background: #f0f3f0; }
.ticket-message.from-support { justify-self: end; border-radius: 14px 14px 3px 14px; background: #e2f1e9; }
.ticket-message > div { display: flex; gap: 12px; justify-content: space-between; margin-bottom: 5px; }
.ticket-message time { color: var(--muted); font-size: 11px; }
.ticket-message p { margin: 4px 0; }
.ticket-attachment { display: block; margin-top: 9px; }
.ticket-attachment img { display: block; max-width: 260px; max-height: 220px; border-radius: 9px; object-fit: contain; }
.ticket-reply-form { padding-top: 15px; border-top: 1px solid var(--line); }
.ticket-sidebar h2 { margin-top: 0; }
.ticket-sidebar hr { height: 1px; margin: 20px 0; border: 0; background: var(--line); }
.ticket-sidebar input[type='submit'] { width: 100%; }
.ticket-sidebar form small { display: block; margin-top: 7px; color: var(--muted); text-align: center; }
.admin-log-filter { max-width: 330px; margin-bottom: 13px; }
.admin-log-list { padding-top: 5px; padding-bottom: 5px; }
.admin-log-row { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.admin-log-row:last-child { border-bottom: 0; }
.admin-log-row > div { display: grid; grid-template-columns: auto 1fr; gap: 0 6px; }
.admin-log-row small { grid-column: 1 / -1; color: var(--muted); }
.admin-log-row time { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.support-mode-banner { display: flex; justify-content: space-between; gap: 20px; padding: 10px max(24px, 5vw); color: #164b39; background: #dff1e7; border-bottom: 1px solid #b7d8c6; }
.support-mode-banner small { color: #41685a; }
.support-page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 20px 0 12px; }
.support-page-heading .eyebrow { margin: 0; }
.support-page-heading h2 { margin: 3px 0 0; }
.support-ticket-list { display: grid; gap: 10px; }
.support-ticket-card { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 17px 19px; border: 1px solid var(--line); border-radius: 13px; color: inherit; background: #fff; text-decoration: none; }
.support-ticket-card > div { display: grid; min-width: 0; gap: 3px; }
.support-ticket-card > div > span { color: var(--green); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.support-ticket-card small { color: var(--muted); }
.support-ticket-form { max-width: 760px; }
.support-ticket-form h2 { margin-bottom: 4px; }
.support-ticket-form > p:not(.eyebrow) { color: var(--muted); }
.support-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.support-resolved-note { display: grid; gap: 3px; padding: 14px; border-radius: 11px; background: #f0f3f0; }
.support-resolved-note span { color: var(--muted); }
.report-plan-notice, .report-upgrade-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.report-plan-notice .eyebrow, .report-upgrade-card .eyebrow { margin: 0; }
.report-plan-notice h2, .report-upgrade-card h2 { margin: 4px 0; }
.report-plan-notice p:last-child, .report-upgrade-card p:last-child { margin: 0; color: var(--muted); }
.report-plan-notice > span, .report-upgrade-card > span { display: grid; flex: 0 0 auto; width: 74px; height: 74px; place-items: center; border-radius: 50%; color: var(--green); background: #e4f1e9; font-weight: 850; }
.report-period-switch .is-locked { display: inline-flex; align-items: center; justify-content: center; padding: 9px 12px; color: #8a948f; background: #edf0ed; font-size: 12px; font-weight: 700; }

@media (max-width: 760px) {
  .admin-header { position: static; display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 13px 15px 0; }
  .admin-main-nav { grid-column: 1 / -1; grid-row: 2; order: 3; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 30px); padding: 0 15px 10px; margin-left: -15px; }
  .admin-header-actions { grid-column: 2; grid-row: 1; }
  .admin-header-actions { gap: 5px; }
  .admin-header-actions button { padding: 7px 9px; font-size: 12px; }
  .admin-push-button { font-size: 0 !important; }
  .admin-push-button::after { content: 'Alertas'; font-size: 12px; }
  .admin-push-button:disabled::after { content: 'Ativos'; }
  .admin-main { padding: 24px 14px 70px; }
  .admin-page-heading { align-items: stretch; flex-direction: column; }
  .admin-page-heading .button { width: 100%; text-align: center; }
  .admin-summary-grid { grid-template-columns: 1fr; }
  .admin-client-grid { grid-template-columns: 1fr; }
  .admin-client-actions { flex-direction: column; }
  .admin-support-entry form > div { align-items: stretch; flex-direction: column; }
  .admin-support-entry form small { max-width: none; }
  .admin-support-entry input[type='submit'] { width: 100%; }
  .admin-ticket-layout { grid-template-columns: 1fr; }
  .ticket-sidebar { grid-row: 1; }
  .admin-ticket-row, .support-ticket-card { align-items: flex-start; flex-direction: column; }
  .ticket-message { max-width: 94%; }
  .admin-log-row { align-items: flex-start; flex-direction: column; gap: 4px; }
  .support-mode-banner { align-items: flex-start; flex-direction: column; gap: 2px; padding: 9px 15px; }
  .support-page-heading { align-items: stretch; flex-direction: column; }
  .support-page-heading .button { text-align: center; }
  .support-form-grid { grid-template-columns: 1fr; gap: 0; }
  .report-plan-notice, .report-upgrade-card { align-items: flex-start; }
  .report-plan-notice > span, .report-upgrade-card > span { width: auto; height: auto; padding: 7px 9px; border-radius: 99px; font-size: 11px; }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f8f5ef;
  color: var(--ink);
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

header {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  padding: 20px 5vw;
  border-bottom: 1px solid var(--line);
  background: white;
}

.brand {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
}

.brand span {
  color: var(--mustard);
}

.platform-brand-lockup { display: flex; align-items: center; gap: 14px; min-width: 0; }
.platform-brand-lockup > span { color: var(--muted); white-space: nowrap; }
.platform-logo { display: block; width: 124px; height: auto; flex: 0 0 auto; }

header > span:not(.brand) {
  position: relative;
  top: 1px;
}

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

nav {
  flex: 1;
}

header form {
  margin: 0;
}

header:not(.staff-header) form {
  margin-left: auto;
}

header form button.secondary {
  position: relative;
  top: 1px;
}

.staff-header { gap: 14px 20px; }
.staff-identity { display: flex; gap: 16px; align-items: center; min-width: 0; }
.staff-identity .platform-logo { width: 108px; }
.staff-identity > strong { line-height: 1.2; transform: translateY(1px); }
.staff-main-nav { display: flex; flex: 1; justify-content: space-between; gap: 18px; min-width: 0; }
.staff-nav-group { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.staff-main-nav a { padding: 8px 10px; border-radius: 8px; color: var(--green); text-decoration: none; white-space: nowrap; }
.staff-main-nav a:hover, .staff-main-nav a.is-active { background: #eaf1e8; }
.staff-main-nav a.is-active { font-weight: 750; }
.staff-nav-secondary { justify-content: flex-end; }
.staff-logout { margin: 0; white-space: nowrap; }

main {
  max-width: 1160px;
  padding: 32px 24px 80px;
  margin: auto;
}

h1 {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -1px;
  margin: 8px 0 22px;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 19px;
}

a {
  color: var(--green);
  text-underline-offset: 3px;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 700;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 18px;
  margin: 20px 0;
}

.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin: 18px 0;
  box-shadow: 0 4px 16px #20383204;
}

.grid .panel {
  margin: 0;
}

.product {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
}

.product-image {
  display: block;
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
}

.product input {
  width: 80px;
}

.login {
  max-width: 520px;
  margin: 8vh auto;
}

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

.line h2 {
  margin: 0;
}

label {
  display: block;
  margin: 14px 0 5px;
  font-weight: 600;
}

input,
textarea,
select {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid #a7b8ad;
  border-radius: 7px;
  max-width: 100%;
  width: 100%;
  background: #fff;
  color: var(--ink);
}

input[type="checkbox"] {
  width: auto;
}

textarea {
  min-height: 90px;
}

button,
input[type="submit"],
.button {
  display: inline-block;
  width: auto;
  font: inherit;
  font-weight: 650;
  background: var(--green);
  border: 1px solid var(--green);
  color: white;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  text-decoration: none;
  margin: 8px 0;
}

.secondary {
  background: white !important;
  color: var(--green) !important;
}

button:hover,
.button:hover,
input[type="submit"]:hover {
  filter: brightness(.94);
}

:focus-visible {
  outline: 3px solid #d99b4b;
  outline-offset: 3px;
}

.badge {
  display: inline-block;
  border-radius: 30px;
  background: #eaf1e8;
  padding: 5px 12px;
  font-size: 14px;
}

.flash {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 32px;
  max-height: 180px;
  overflow: hidden;
  padding: 5px 12px 5px 9px;
  margin: 6px 0;
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 8px;
  background: #edf7f1;
  color: var(--ink);
  box-shadow: 0 2px 7px #2038320d;
  animation: aviso-entrada .2s ease-out both;
}

.flash::before {
  display: grid;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: white;
  content: '✓';
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.flash.notice {
  animation: aviso-entrada .2s ease-out both, aviso-saida .3s ease-in 2.7s forwards;
}

.alert {
  border-color: #efb9ad;
  border-left-color: #c95142;
  background: #fff0eb;
}

.flash.alert::before {
  background: #c95142;
  content: '!';
}

.danger {
  color: #a33621;
}

.destructive,
button.destructive,
input[type="submit"].destructive {
  border-color: #c95142;
  background: white;
  color: #a33621;
}

.trash-button,
button.trash-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e8aaa0;
  border-radius: 10px;
  background: #fff4f1;
  color: #c43f2d;
  font-family: Arial, sans-serif;
  font-size: 23px;
  line-height: 1;
}

.trash-button:hover,
button.trash-button:hover {
  border-color: #c95142;
  background: #ffe5df;
  color: #a82e20;
}

.trash-button span {
  display: block;
  transform: translateY(-1px);
}

.trash-button-form {
  width: auto;
  margin: 0;
}

.order-status-voided {
  border-color: #e8aaa0;
  background: #fff0eb;
  color: #a33621;
}

.record-delete {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.record-delete > div {
  min-width: 0;
}

.record-delete strong,
.record-delete small {
  display: block;
}

.record-delete small {
  margin-top: 3px;
  color: var(--muted);
}

.record-delete form,
.record-delete button {
  flex: 0 0 auto;
  margin: 0;
}

.call {
  border-left: 5px solid #d99b4b;
}

.staff-page-intro { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 18px; }

/* Na página de pedidos, manter apenas o título principal e a ação. */
div[data-controller="staff-board"] > .eyebrow,
div[data-controller="staff-board"] .staff-page-intro p { display: none; }
div[data-controller="staff-board"] > h1 { margin-top: 0; }
div[data-controller="staff-board"] .staff-page-intro { justify-content: flex-start; margin-bottom: 14px; }
.staff-page-intro p { margin: 0; color: var(--muted); }
.staff-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0 28px; }
.staff-summary-card { display: flex; gap: 10px; align-items: baseline; padding: 16px 18px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.staff-summary-card strong { font-size: 28px; }
.staff-summary-card span { color: var(--muted); }
.staff-summary-alert { border-color: #e7bd65; background: #fff8e7; }
.staff-board-tabs { display: flex; gap: 8px; margin: 22px 0; overflow-x: auto; scrollbar-width: none; }
.staff-board-tabs::-webkit-scrollbar { display: none; }
.staff-board-tab { flex: 0 0 auto; margin: 0; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--green); }
.staff-board-tab span { display: inline-block; min-width: 20px; margin-left: 4px; padding: 1px 5px; border-radius: 999px; background: #eaf1e8; font-size: 12px; }
.staff-board-tab.is-active { background: var(--green); color: white; border-color: var(--green); }
.staff-board-tab.is-active span { background: #ffffff33; color: white; }
.staff-board-section { margin: 30px 0; }

/* No estado vazio não reservamos espaço para secções sem cartões.
   Assim que Turbo inserir um pedido ou chamada, a secção reaparece. */
.staff-board-section:has(.empty-list):not(:has(.empty-list > *)) { display: none; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.section-heading h2 { margin: 0 0 4px; }
.section-heading .eyebrow { margin-bottom: 4px; }
.staff-order-card { margin: 0; }
.staff-order-card[hidden] { display: none; }
.staff-order-card-heading, .staff-call-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.staff-order-card-heading h2, .staff-call-heading h3 { margin: 0; }
.staff-order-card-heading .eyebrow, .staff-call-heading .eyebrow { margin: 0 0 4px; }
.staff-order-meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 16px 0 10px; color: var(--muted); }
.staff-order-meta strong { margin-left: auto; color: var(--ink); font-size: 18px; }
.staff-order-items { margin: 10px 0 16px; padding-left: 20px; }
.staff-order-note { padding: 9px 12px; margin: 12px 0; border-left: 3px solid #d99b4b; background: #fff8e7; }
.staff-card-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.staff-card-actions form { margin: 0; }
.staff-card-actions .button, .staff-card-actions button { margin: 0; }
.order-status-pending { background: #fff0c9; color: #805a13; }
.order-status-accepted { background: #e1f1e7; color: #216044; }
.order-status-served { background: #e9eef4; color: #405b70; }
.staff-call-card { margin: 0; border-color: #e7bd65; background: #fffaf0; }
.call-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #f3b52b; color: white; font-weight: 800; }
.order-item-detail h2 { margin-top: 0; }
.order-decision-form { padding: 14px; margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; }
.order-decision-form legend { padding: 0 6px; color: var(--green); font-weight: 750; }
.order-advanced-fields { margin: 14px 0; padding: 10px 0; border-top: 1px solid var(--line); }
.order-advanced-fields summary { color: var(--green); font-weight: 650; cursor: pointer; }
.order-next-step { border-left: 4px solid var(--green); }
.danger-panel { border-left: 4px solid #b64b38; }
.table-warning { color: #805a13; }
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.settings-intro { max-width: 70ch; color: var(--muted); }
.settings-card h2 { margin-top: 0; }
.settings-section { margin: 14px 0; }
.settings-accordion > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; list-style: none; cursor: pointer; }
.settings-accordion > summary::-webkit-details-marker { display: none; }
.settings-accordion > summary::after { content: '⌄'; color: var(--green); font-size: 22px; line-height: 1; }
.settings-accordion:not([open]) > summary::after { content: '›'; }
.settings-accordion > summary > span { display: grid; gap: 4px; min-width: 0; }
.settings-accordion > summary .eyebrow { margin: 0; }
.settings-accordion > summary strong { font-size: 20px; }
.settings-accordion > summary small { flex: 0 0 auto; white-space: nowrap; }
.settings-accordion-content { padding-top: 14px; }
.settings-accordion-content > p:first-child { margin-top: 0; color: var(--muted); }
.settings-subsection { padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); }
.settings-subsection:first-child { padding-top: 0; margin-top: 0; border-top: 0; }
.settings-subsection h3 { margin: 0 0 5px; font-size: 17px; }
.settings-subsection p { margin: 6px 0; }
.qr {
  max-width: 240px;
}

.qr svg {
  width: 100%;
  height: auto;
}

small {
  color: var(--muted);
  font-size: 14px;
}

.empty-list:empty::after {
  content: 'Sem registos em curso.';
  color: var(--muted);
  padding: 12px 0;
}

.product-description {
  color: var(--muted);
  margin: 4px 0;
  max-width: 52ch;
}

.customer-menu-sticky {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 4px 0 6px;
  background: #f5f6f0;
  backdrop-filter: blur(8px);
  isolation: isolate;
}

.customer-menu-toolbar {
  display: block;
  padding: 6px 0;
  margin: 0;
}

.customer-menu-subcategory-bar {
  min-height: 4px;
}

.menu-root-tabs {
  display: flex;
  gap: 8px;
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.menu-root-tabs::-webkit-scrollbar { display: none; }

.menu-root-tab {
  flex: 0 0 auto;
  margin: 0;
  border-color: var(--line);
  background: white;
  color: var(--green);
  border-radius: 999px;
  white-space: nowrap;
}

.menu-root-tab.is-active,
.menu-root-tab:hover {
  background: var(--green);
  color: white;
}

.menu-subcategory-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 4px 0 8px;
  margin: 0;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.menu-subcategory-tabs::-webkit-scrollbar { display: none; }

.menu-subcategory-tab {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--green);
  white-space: nowrap;
  scroll-snap-align: start;
}

.menu-subcategory-tab.is-active,
.menu-subcategory-tab:hover {
  background: #eaf1e8;
  border-color: var(--green);
}

.customer-root-panel[hidden],
.customer-menu-section[hidden],
.menu-subcategory-tabs[hidden] { display: none; }

.menu-search {
  display: block;
  width: 100%;
  margin: 0;
}

.menu-search input { width: 100%; min-width: 150px; }

.customer-menu-section {
  scroll-margin-top: 76px;
}

.menu-category-title { margin: 26px 0 12px; }
.menu-category-title.level-1,
.menu-category-title.level-2,
.menu-category-title.level-3 { font-size: 19px; color: var(--green); }

.customer-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 18px;
}

.customer-product-card {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

.customer-product-media { background: #eaf1e8; }

.customer-product-media .product-image,
.product-image-placeholder {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.product-image-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #eaf1e8;
  font-size: 14px;
}

.customer-product-content { display: flex; flex-direction: column; padding: 14px 16px 16px; }
.customer-product-content > strong { display: block; font-size: 18px; line-height: 1.2; }
.customer-product-price { margin: 8px 0 12px; font-weight: 750; }
.customer-quantity-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.customer-product-action-slot { display: grid; min-height: 38px; margin-top: 4px; place-items: center; }
.customer-product-action-slot > * { grid-area: 1 / 1; }
.customer-add-button { width: 100%; margin: 0; }
.customer-remove-button { position: absolute; top: 4px; left: 4px; z-index: 5; display: grid; place-items: center; width: 38px; height: 38px; margin: 0; padding: 0 0 2px; border: 0; border-radius: 50%; background: #d94b45; color: white; font-size: 24px; font-weight: 800; line-height: 1; box-shadow: 0 2px 7px #20383233; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.customer-remove-button:hover { background: #b93631; }
.customer-product-card .quantity-value { display: grid; width: 100%; min-height: 38px; box-sizing: border-box; place-items: center; margin: 0; color: var(--green); font-size: 20px; line-height: 1; text-align: center; }
.customer-product-card [hidden], .customer-remove-button[hidden], .quantity-value[hidden] { display: none; }
.customer-product-card.is-added { border-color: var(--green); box-shadow: inset 0 0 0 2px var(--green); }
.menu-search-empty { padding: 18px; color: var(--muted); background: white; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.customer-cart-bar { position: sticky; bottom: 14px; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px; margin: 22px 0 0; background: #ffffffee; border: 1px solid var(--green); border-radius: 12px; box-shadow: 0 8px 24px #20383228; backdrop-filter: blur(8px); }
.customer-cart-bar span { display: flex; flex-direction: column; }
.customer-cart-bar button { margin: 0; white-space: nowrap; }
.customer-menu-toast { position: fixed; left: 16px; right: 16px; bottom: 84px; z-index: 60; width: max-content; box-sizing: border-box; margin-inline: auto; max-width: calc(100% - 32px); padding: 8px 12px; background: var(--ink); color: white; border-radius: 10px; box-shadow: 0 6px 20px #20383233; text-align: center; font-size: 13px; animation: aviso-entrada .2s ease-out both, aviso-saida .3s ease-in 1.5s forwards; }

.customer-branding-shell { min-height: 240px; }
.customer-branding-content[hidden],
.customer-branding-entry[hidden],
.customer-branding-loading[hidden] { display: none; }
.customer-branding-loading { min-height: min(62vh, 560px); display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; }
.customer-branding-loading strong { font-size: 24px; }
.customer-branding-loading p { margin: 0; color: var(--muted); }
.customer-branding-logo { display: block; width: auto; max-width: 100%; object-fit: contain; }
.customer-branding-logo-loading { width: clamp(78px, 24vw, 116px); height: clamp(78px, 24vw, 116px); margin: 0 auto 8px; border-radius: 22px; }
.customer-branding-dots { display: flex; justify-content: center; gap: 7px; margin-top: 8px; }
.customer-branding-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); opacity: .3; }
.customer-branding-dots i:nth-child(2) { opacity: .6; }
.customer-branding-dots i:nth-child(3) { opacity: 1; }
.customer-branding-entry { max-width: 560px; margin: 8vh auto 24px; padding: clamp(24px, 6vw, 48px); text-align: center; }
.customer-branding-logo-entry { width: clamp(84px, 24vw, 132px); height: clamp(84px, 24vw, 132px); margin: 0 auto 18px; border-radius: 24px; }
.customer-branding-entry .eyebrow { margin-bottom: 8px; }
.customer-branding-entry h1 { margin: 0 0 8px; }
.customer-branding-entry p:not(.eyebrow) { margin: 0 0 18px; color: var(--muted); }
.customer-branding-entry button { min-width: min(100%, 260px); }
.customer-establishment-header { position: relative; display: flex; align-items: center; min-height: 168px; overflow: hidden; padding: 24px 26px; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(120deg, #eaf1e8 0%, #f5f6f0 72%); box-shadow: 0 8px 22px #20383212; }
.customer-establishment-header::after { content: ''; position: absolute; z-index: 0; right: -12px; top: 50%; width: 210px; height: 210px; border-radius: 50%; background: #ffffff66; transform: translateY(-50%); pointer-events: none; }
.customer-establishment-watermark { position: absolute; z-index: 1; top: calc(50% - 10px); right: 22px; display: grid; width: 190px; height: 150px; place-items: center; transform: translateY(-50%); pointer-events: none; }
.customer-establishment-logo-background { display: block; width: 100%; height: 100%; object-fit: contain; opacity: 1; }
.customer-establishment-copy { position: relative; z-index: 2; max-width: 62%; }
.customer-establishment-header .eyebrow { margin: 0 0 3px; font-size: 10px; letter-spacing: 1.8px; }
.customer-establishment-name { display: block; max-width: 100%; overflow-wrap: anywhere; font-size: clamp(21px, 3vw, 28px); line-height: 1.08; }
.customer-menu-welcome { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; }

.branding-upload-row { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.branding-upload-row > div { min-width: 0; flex: 1; }
.branding-upload-row input[type="file"] { padding: 9px; }
.branding-upload-row small { display: block; margin-top: 7px; }
.branding-preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.branding-preview-card { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg, #f5f6f0); text-align: center; }
.branding-preview-card .eyebrow { margin: 0 0 10px; font-size: 10px; }
.branding-preview-card small { display: block; margin-top: 9px; font-size: 11px; }
.branding-preview-loading, .branding-preview-entry { display: grid; place-items: center; min-height: 150px; padding: 15px; border-radius: 11px; background: white; }
.branding-preview-loading { background: var(--green); color: white; }
.branding-preview-loading img { width: 94px; height: 94px; border-radius: 20px; background: white; }
.branding-preview-entry img { width: 104px; height: 104px; border-radius: 20px; }
.branding-preview-header { display: flex; align-items: center; gap: 8px; min-height: 150px; padding: 15px; border-radius: 11px; background: white; text-align: left; }
.branding-preview-header img { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; object-fit: contain; }
.branding-preview-header strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }

.payment-line {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0;
}

.payment-line small { display: block; }
.payment-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.payment-form label { margin: 0; }
.payment-form input[type="number"] { width: 72px; }
.payment-form input[type="submit"] { margin: 0; padding: 7px 10px; font-size: 14px; }

.table-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 18px;
  margin: 24px 0;
}

.table-card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 4px 16px #20383204;
}

.table-card:hover { border-color: var(--green); transform: translateY(-1px); }
.table-card h2, .table-card p { margin: 0 0 4px; }
.table-visual { width: 120px; min-width: 120px; height: 108px; }
.table-visual-surface { fill: #eaf1e8; stroke: var(--green); stroke-width: 3; }
.table-visual-leg { fill: #d99b4b; }
.table-visual-number { fill: var(--ink); font-size: 42px; font-weight: 800; }
.table-show-header { display: flex; gap: 24px; align-items: center; }
.table-show-header .table-visual { width: 170px; min-width: 170px; height: 140px; }
.table-show-header h2 { margin-top: 0; }
.unpaid-order ul { margin-bottom: 20px; }
.empty-state { text-align: center; }
.qr-preview { max-width: 560px; text-align: center; }
.qr-preview-image { display: block; width: min(480px, 100%); height: auto; margin: 0 auto 20px; }
.suggestions { margin: 20px 0; padding: 16px; background: #f5f6f0; box-shadow: none; overflow: visible; }
.suggestions-heading { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.suggestions-heading p { margin-top: 4px; }
.suggestions-intro { color: var(--muted); font-size: 14px; }
.suggestions-hint { align-self: center; color: var(--green); font-size: 13px; font-weight: 650; white-space: nowrap; }
.suggestions-carousel-shell { position: relative; }
.suggestion-carousel { display: flex; width: 100%; gap: 10px; min-width: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 6px 4px 11px; touch-action: pan-x; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.suggestion-carousel::-webkit-scrollbar { display: none; }
.suggestion-arrow { position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; margin: 0; padding: 0 0 3px; border: 1px solid #c9d8ca; border-radius: 50%; background: white; color: var(--green); font-size: 26px; line-height: 1; box-shadow: 0 2px 8px #20383222; transform: translateY(-50%); }
.suggestion-arrow-prev { left: 2px; }
.suggestion-arrow-next { right: 2px; }
.suggestion-arrow[hidden] { display: none; }
.suggestion-card { position: relative; flex: 0 0 min(160px, 42vw); box-sizing: border-box; overflow: hidden; padding: 0; margin: 0; background: white; border: 1px solid #d9e2d9; border-radius: 14px; cursor: pointer; scroll-snap-align: start; font-weight: 400; }
.suggestion-card input { position: absolute; opacity: 0; pointer-events: none; }
.suggestion-card.is-added { border-color: var(--green); box-shadow: inset 0 0 0 2px var(--green); }
.suggestion-card[hidden],
.suggestion-card-action[hidden],
.suggestion-quantity-value[hidden],
.suggestion-remove-button[hidden] { display: none; }
.suggestion-remove-button { position: absolute; top: 4px; left: 4px; z-index: 5; display: grid; place-items: center; width: 38px; height: 38px; margin: 0; padding: 0 0 2px; border: 0; border-radius: 50%; background: #d94b45; color: white; font-size: 24px; font-weight: 800; line-height: 1; box-shadow: 0 2px 7px #20383233; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.suggestion-remove-button:hover { background: #b93631; }
.suggestion-image { display: grid; place-items: center; height: 82px; background: #eaf1e8; color: #8da496; font-size: 30px; overflow: hidden; }
.suggestion-image img { width: 100%; height: 100%; object-fit: cover; }
.suggestion-card-content { display: grid; gap: 4px; padding: 8px; text-align: left; }
.suggestion-name { min-height: 32px; color: var(--ink); font-size: 14px; }
.suggestion-card-content > span { color: var(--ink); font-weight: 700; }
.suggestion-card-action-slot { display: grid; min-height: 28px; place-items: center; }
.suggestion-card-action-slot > * { grid-area: 1 / 1; }
.suggestion-card-action { display: grid; place-items: center; width: fit-content; padding: 4px 9px; border: 1px solid var(--green); border-radius: 999px; color: var(--green); font-style: normal; font-size: 12px; }
.suggestion-quantity-value { display: grid; min-height: 28px; place-items: center; color: var(--green); font-size: 18px; line-height: 1; text-align: center; }
.suggestion-dots { position: relative; width: 64px; height: 6px; margin: 2px auto 0; overflow: hidden; border-radius: 999px; background: #d8e4d8; }
.suggestion-dots::after { content: ''; position: absolute; top: 0; left: var(--suggestion-dot-left, 0%); width: 33%; height: 100%; border-radius: inherit; background: var(--green); transition: left 160ms ease; }
.order-note-panel { padding: 14px 16px; margin: 20px 0; border: 1px solid var(--line); border-radius: 12px; background: #f5f6f0; }
.order-note-panel label { margin-top: 0; }
.order-note-panel small { display: block; margin-top: 6px; }
.staff-popup { position: fixed; z-index: 20; right: 20px; bottom: 20px; max-width: min(420px, calc(100vw - 32px)); background: #fff; border: 1px solid #d99b4b; border-top: 3px solid #d99b4b; border-radius: 12px; padding: 12px 13px; box-shadow: 0 8px 22px #20383222; }
.staff-popup button { margin: 6px 0 0; padding: 8px 12px; }

@keyframes aviso-entrada {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes aviso-saida {
  to {
    opacity: 0;
    max-height: 0;
    min-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top-width: 0;
    border-bottom-width: 0;
    pointer-events: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flash,
  .customer-menu-toast,
  .staff-popup { animation: none; }
}
.push-status { color: var(--muted); min-height: 1.5em; }
.menu-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.menu-form-card { margin: 0; }
.menu-form-card h2 { margin-top: 0; }
.form-check { display: flex; gap: 8px; align-items: center; }
.form-check input { width: auto; }
.image-form-card { display: flex; flex-direction: column; }
.image-preview { display: grid; place-items: center; min-height: 190px; margin-bottom: 12px; border: 1px dashed #a7b8ad; border-radius: 12px; color: var(--muted); background: #f5f6f0; overflow: hidden; }
.image-preview img { display: block; width: 100%; height: 220px; object-fit: cover; }
.image-preview[hidden], .image-crop-stage[hidden], .image-crop-controls[hidden] { display: none; }
.image-crop-stage { position: relative; width: min(100%, 320px); aspect-ratio: 1; margin: 0 auto 12px; overflow: hidden; border: 1px solid #a7b8ad; border-radius: 12px; background: #eaf1e8; cursor: grab; touch-action: none; }
.image-crop-stage:active { cursor: grabbing; }
.image-crop-stage > img { position: absolute; top: 0; left: 0; display: block; max-width: none; opacity: 0; user-select: none; pointer-events: none; transform-origin: 0 0; }
.image-crop-grid { position: absolute; inset: 0; pointer-events: none; border: 1px solid #ffffffaa; background: linear-gradient(90deg, transparent 33.2%, #ffffff66 33.2% 33.8%, transparent 33.8% 66.2%, #ffffff66 66.2% 66.8%, transparent 66.8%), linear-gradient(0deg, transparent 33.2%, #ffffff66 33.2% 33.8%, transparent 33.8% 66.2%, #ffffff66 66.2% 66.8%, transparent 66.8%); }
.image-crop-controls { display: grid; gap: 8px; margin: 0 0 12px; }
.image-crop-controls label { display: flex; gap: 10px; align-items: center; color: var(--muted); font-weight: 650; }
.image-crop-controls input[type='range'] { flex: 1; min-width: 0; }
.image-crop-controls button { align-self: start; margin: 0; }
.image-crop-controls small { margin: 0; }
.menu-item-preview-modal[hidden] { display: none; }
.menu-item-preview-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 18px; }
.menu-item-preview-backdrop { position: absolute; inset: 0; background: #20383266; backdrop-filter: blur(3px); }
.menu-item-preview-dialog { position: relative; width: min(440px, 100%); max-height: min(720px, calc(100vh - 36px)); overflow-y: auto; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 18px 50px #20383244; }
.menu-item-preview-dialog h2 { margin: 0 0 16px; }
.menu-item-preview-close { position: absolute; top: 12px; right: 12px; margin: 0; padding: 6px 10px; }
.menu-item-preview-card { display: block; overflow: hidden; padding: 0; margin: 0; border-color: #d9e2d9; }
.menu-item-preview-media { position: relative; display: grid; flex: 0 0 190px; place-items: center; height: 190px; overflow: hidden; background: #eaf1e8; color: var(--muted); }
.menu-item-preview-media img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.menu-item-preview-media span { position: relative; z-index: 1; }
.menu-item-preview-content { position: relative; z-index: 1; padding: 14px 16px 16px; background: white; }
.menu-item-preview-content > strong { display: block; font-size: 18px; line-height: 1.2; }
.menu-item-preview-description { margin: 5px 0 8px; color: var(--muted); }
.menu-item-preview-price { margin: 8px 0 12px; font-weight: 750; }
.menu-item-preview-action { display: grid; place-items: center; min-height: 38px; border: 1px solid var(--green); border-radius: 8px; color: var(--green); font-weight: 700; }
.menu-item-preview-open { overflow: hidden; }
.menu-form-actions { position: sticky; bottom: 12px; z-index: 4; display: flex; gap: 10px; align-items: center; padding: 10px 0; }
.menu-form-actions input, .menu-form-actions .button { margin: 0; }
.recommendation-picker { border: 1px solid #a7b8ad; border-radius: 10px; background: #fff; overflow: hidden; }
.recommendation-picker-toolbar { display: flex; gap: 10px; align-items: center; padding: 10px; border-bottom: 1px solid var(--line); background: #f5f6f0; }
.recommendation-picker-toolbar input { flex: 1; min-width: 0; padding: 8px 10px; }
.recommendation-picker-toolbar span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.recommendation-picker-options { max-height: 250px; overflow-y: auto; }
.recommendation-option { display: flex; gap: 10px; align-items: center; margin: 0; padding: 10px 12px; border-bottom: 1px solid #edf1ed; cursor: pointer; font-weight: 400; }
.recommendation-option:last-child { border-bottom: 0; }
.recommendation-option:hover { background: #f5f6f0; }
.recommendation-option input { width: auto; accent-color: var(--green); }
.recommendation-option span { display: grid; gap: 2px; }
.recommendation-option small { color: var(--muted); font-size: 12px; }
.recommendation-option[hidden] { display: none; }
.category-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.category-title { display: flex; gap: 10px; align-items: center; min-width: 0; }
.category-heading h2 { margin: 0; }
.category-status { padding: 4px 9px; border-radius: 999px; background: #eaf1e8; color: var(--green); font-size: 12px; font-weight: 700; white-space: nowrap; }
.category-status.is-archived { background: #f7e5e5; color: #9b4040; }
.category-status.is-unavailable { background: #f5ead8; color: #8b5c1e; }
.category-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; align-items: center; }
.category-actions form { margin: 0; }
.compact-action { margin: 0; padding: 7px 10px; border-radius: 7px; font-size: 13px; }
.category-panel .line > div:last-child { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.category-panel .line > div:last-child form { margin: 0; }
.staff-category-details { margin-top: 14px; border-top: 1px solid var(--line); }
.staff-category-details summary { padding: 12px 0; color: var(--green); font-weight: 650; cursor: pointer; }
.staff-category-content { padding-top: 4px; }
.category-level-1 { border-left: 4px solid #eaf1e8; }
.menu-help { position: relative; display: flex; gap: 8px; align-items: flex-start; padding-right: 44px; color: var(--muted); }
.menu-help > div { display: grid; gap: 4px; }
.menu-help > div strong { color: var(--ink); }
.menu-help-close { position: absolute; top: 8px; right: 8px; display: grid; width: 28px; height: 28px; place-items: center; padding: 0; margin: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; }
.menu-help-close:hover { background: #eaf1e8; color: var(--ink); filter: none; }
.menu-help[hidden] { display: none; }
.menu-help strong { color: var(--ink); }
.staff-menu-status-tabs { display: flex; gap: 10px; margin: 20px 0; }
.staff-menu-status-tab { display: inline-flex; align-items: center; margin: 0; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--green); font-weight: 700; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.staff-menu-status-tab span { display: inline-block; min-width: 22px; margin-left: 5px; padding: 1px 6px; border-radius: 999px; background: #eaf1e8; font-size: 12px; }
.staff-menu-status-tab.is-active { background: var(--green); color: white; border-color: var(--green); }
.staff-menu-status-tab.is-active span { background: #ffffff33; color: white; }
.staff-menu-status-panel { min-height: 120px; }
.menu-records-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.menu-records-heading h2 { margin: 0 0 5px; }
.menu-records-heading p { margin: 0; color: var(--muted); }
.menu-records-heading form { width: auto; margin: 0; flex: 0 0 auto; }
.bulk-delete-button,
button.bulk-delete-button { display: inline-flex; align-items: center; gap: 8px; width: auto; margin: 0; padding: 10px 14px; border: 1px solid #e8aaa0; border-radius: 10px; background: #fff4f1; color: #c43f2d; white-space: nowrap; }
.bulk-delete-button:hover,
button.bulk-delete-button:hover { border-color: #c95142; background: #ffe5df; color: #a82e20; }
.bulk-delete-button span { font-family: Arial, sans-serif; font-size: 20px; line-height: 1; }
.uncategorized-products { padding-top: 4px; padding-bottom: 4px; }
.uncategorized-products .line:last-child { border-bottom: 0; }
.menu-empty-state { color: var(--muted); text-align: center; }

@media (max-width: 600px) {
  main {
    padding: 24px 16px 60px;
  }

  header {
    padding: 16px;
    gap: 12px;
  }

  .staff-header { align-items: center; }
  .staff-identity { flex: 1; gap: 12px; min-width: 0; }
  .staff-identity .platform-logo { width: 92px; }
  .staff-identity > strong { min-width: 0; overflow-wrap: anywhere; }
  .staff-main-nav { order: 3; flex-basis: 100%; width: 100%; gap: 8px; overflow-x: auto; justify-content: flex-start; padding-bottom: 2px; scrollbar-width: none; }
  .staff-main-nav { flex-wrap: nowrap; }
  .staff-main-nav::-webkit-scrollbar { display: none; }
  .staff-nav-group { flex-wrap: nowrap; flex: 0 0 auto; }
  .staff-nav-secondary { justify-content: flex-start; }
  .staff-main-nav a { padding: 8px 9px; font-size: 14px; }
  .staff-logout { margin-left: auto; }

  nav {
    flex-basis: 100%;
  }

  .panel {
    padding: 18px;
  }

  .line {
    align-items: flex-start;
  }

  .customer-menu-toolbar { padding: 4px 0 6px; }
  .customer-establishment-header { min-height: 142px; padding: 20px 18px; border-radius: 16px; }
  .customer-establishment-header::after { right: -32px; }
  .customer-establishment-watermark { right: 8px; width: 152px; height: 120px; }
  .customer-establishment-copy { max-width: 66%; }
  .customer-establishment-name { font-size: 21px; }
  .customer-menu-welcome { font-size: 13px; }
  .menu-subcategory-tabs { padding-bottom: 6px; }
  .customer-menu-grid { gap: 10px; }
  .customer-product-media .product-image,
  .product-image-placeholder { height: 112px; }
  .customer-product-content { padding: 10px; }
  .customer-product-content > strong { font-size: 16px; }
  .customer-product-content .product-description { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 13px; }
  .customer-product-price { margin: 6px 0 8px; }
  .customer-cart-bar { bottom: 8px; }
  .customer-menu-toast { bottom: 76px; }
  .staff-page-intro { align-items: flex-start; flex-direction: column; }
  .staff-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 18px; }
  .staff-summary-card { min-width: 0; min-height: 64px; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px; }
  .staff-summary-card strong { font-size: 24px; line-height: 1; }
  .staff-summary-card span { font-size: 11px; line-height: 1.2; }
  .staff-board-tabs { margin: 16px 0; }
  .staff-order-meta strong { margin-left: 0; }
  .staff-order-card-heading, .staff-call-heading { gap: 8px; }
  .staff-card-actions { display: grid; grid-template-columns: 1fr; }
  .staff-card-actions .button, .staff-card-actions button { width: 100%; text-align: center; }
  .table-actions { display: grid; grid-template-columns: 1fr; }
  .table-actions .button { text-align: center; }
  .menu-form-grid { grid-template-columns: 1fr; gap: 12px; }
  .category-heading { align-items: flex-start; flex-direction: column; }
  .category-title, .category-actions { width: 100%; }
  .category-actions { justify-content: flex-start; }
  .category-panel .line { align-items: flex-start; flex-direction: column; }
  .category-panel .line > div:last-child { width: 100%; justify-content: flex-start; }
  .menu-form-actions { bottom: 0; background: #f5f6f0ee; }
  .menu-form-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .menu-form-actions > button:first-child { grid-column: 1 / -1; }
  .menu-form-actions button,
  .menu-form-actions input,
  .menu-form-actions .button { width: 100%; min-width: 0; margin: 0; padding: 9px 8px; font-size: 14px; text-align: center; }
  .branding-upload-row { display: grid; align-items: stretch; }
  .branding-upload-row input[type="submit"] { width: 100%; }
  .branding-preview-grid { display: flex; overflow-x: auto; gap: 12px; padding: 2px 2px 8px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .branding-preview-grid::-webkit-scrollbar { display: none; }
  .branding-preview-card { flex: 0 0 min(270px, 84vw); scroll-snap-align: start; }
  .branding-preview-loading, .branding-preview-entry, .branding-preview-header { min-height: 118px; }
  .branding-preview-loading img { width: 64px; height: 64px; }
  .branding-preview-entry img { width: 70px; height: 70px; }
  .branding-preview-header { padding: 10px; }
  .menu-help { align-items: flex-start; flex-direction: column; }
  .staff-menu-status-tabs { overflow-x: auto; }
  .staff-menu-status-tab { flex: 0 0 auto; }
  .menu-records-heading { align-items: stretch; flex-direction: column; }
  .menu-records-heading form,
  .menu-records-heading .bulk-delete-button { width: 100%; }
  .menu-records-heading .bulk-delete-button { justify-content: center; }
}

/* Reports explorer: one question, one metric and one period at a time. */
.report-v2 .report-explorer { padding: 22px; }
.report-v2 .report-explorer h2 { margin: 2px 0 18px; }
.report-choice-grid, .report-choice-list, .report-period-switch { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.report-choice-grid::-webkit-scrollbar, .report-choice-list::-webkit-scrollbar, .report-period-switch::-webkit-scrollbar { display: none; }
.report-choice-grid a, .report-choice-list a, .report-period-switch a { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; color: var(--green); text-decoration: none; font-size: 13px; font-weight: 700; white-space: nowrap; }
.report-choice-grid a.is-active, .report-choice-list a.is-active, .report-period-switch a.is-active { color: #fff; background: var(--green); border-color: var(--green); }
.report-field-label { margin: 18px 0 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.report-choice-list a { padding: 7px 11px; font-size: 12px; }
.report-period-switch { padding-bottom: 2px; }
.report-period-switch a { padding: 8px 15px; }
.report-period-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 430px; margin: 20px auto 0; text-align: center; }
.report-period-nav strong { flex: 1; font-size: 18px; }
.report-arrow { display: grid; place-items: center; width: 32px; height: 32px; color: var(--green); border: 1px solid var(--line); border-radius: 50%; text-decoration: none; font-size: 25px; line-height: 1; }
.report-employee-filter { margin-top: 14px; }
.report-employee-filter select { width: 100%; max-width: 360px; margin: 0; }
.report-stat-grid-compact { margin-top: 16px; }
.report-focus-card { min-height: 330px; }
.report-compact-rows { display: grid; gap: 15px; margin-top: 16px; }
.report-compact-row-head { display: flex; justify-content: space-between; gap: 12px; }
.report-compact-row-head strong { white-space: nowrap; }
.report-compact-row .report-track { height: 9px; }

@media (max-width: 600px) {
  .report-v2 .report-heading { gap: 8px; }
  .report-v2 .report-heading h1 { font-size: 25px; }
  .report-v2 .report-export { align-self: center; }
  .report-v2 .report-explorer { padding: 14px; }
  .report-v2 .report-explorer h2 { font-size: 18px; margin-bottom: 13px; }
  .report-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .report-choice-grid a { text-align: center; padding: 8px 6px; }
  .report-choice-list a, .report-period-switch a { padding: 7px 10px; font-size: 11px; }
  .report-field-label { margin-top: 14px; }
  .report-period-nav { margin-top: 14px; }
  .report-period-nav strong { font-size: 16px; }
  .report-focus-card { min-height: 285px; }
  .report-v2 .report-chart { height: 175px; }
  .report-v2 .report-chart-bars { height: 143px; }
  .report-v2 .report-chart-day { min-width: 100%; }
  .report-v2 .report-chart-month { min-width: 670px; }
  .report-v2 .report-chart-year, .report-v2 .report-chart-lifetime { min-width: 100%; }
}


.unpaid-order > summary { list-style: none; cursor: pointer; }
.unpaid-order > summary::-webkit-details-marker { display: none; }
.unpaid-order > summary::after { content: '⌄'; float: right; color: var(--green); font-size: 22px; line-height: 1; }
.unpaid-order[open] > summary::after { content: '⌃'; }
.unpaid-order-summary { display: block; padding: 0; }
.unpaid-order-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.unpaid-order-heading h2, .unpaid-order-heading .eyebrow { margin: 0; }
.unpaid-order-heading .eyebrow { margin-bottom: 4px; }
.unpaid-order-total { display: grid; justify-items: end; gap: 3px; }
.unpaid-order-total strong { font-size: 18px; }
.unpaid-order-total small { color: var(--muted); }
.unpaid-order-content { padding-top: 14px; }
.payment-selection-help { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.payment-selection-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.payment-selection-row { margin: 0; }
.payment-selection-item { display: flex; width: 100%; min-width: 0; gap: 10px; align-items: center; justify-content: space-between; padding: 9px 10px; margin: 0; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); text-align: left; }
.payment-selection-item:hover, .payment-selection-row.is-selected .payment-selection-item { border-color: var(--green); background: #eaf1e8; }
.payment-selection-copy { min-width: 0; }
.payment-selection-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payment-selection-copy small { display: block; margin-top: 2px; color: var(--muted); }
.payment-selection-count { display: grid; flex: 0 0 auto; min-width: 42px; height: 28px; place-items: center; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; }
.payment-selection-row.is-selected .payment-selection-count { border-color: var(--green); background: var(--green); color: white; font-weight: 700; }
.payment-selection-row input[type="hidden"] { display: none; }
.payment-selection-static { padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-size: 13px; }
.payment-selection-footer { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line); }
.payment-selection-footer > div:first-child { display: grid; gap: 2px; }
.payment-selection-footer span { color: var(--muted); font-size: 13px; }
.payment-selection-actions { display: flex; gap: 6px; align-items: center; }
.payment-selection-actions select { width: auto; min-width: 100px; margin: 0; padding: 8px; }
.payment-selection-actions input[type="submit"] { margin: 0; padding: 8px 10px; }
.payment-selection-actions input[type="submit"]:disabled { opacity: .55; cursor: not-allowed; }

@media (max-width: 600px) {
  .unpaid-order-heading { gap: 8px; }
  .unpaid-order-total strong { font-size: 16px; }
  .payment-selection-footer { align-items: stretch; flex-direction: column; }
  .payment-selection-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
  .payment-selection-actions select, .payment-selection-actions input[type="submit"] { width: 100%; min-width: 0; }
}

/* Cartões compactos da gestão de mesas */
.table-admin-card {
  display: grid;
  gap: 12px;
}

.table-admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.table-admin-heading h2 {
  margin: 0;
}

.table-primary-action {
  width: 100%;
  margin: 0;
  text-align: center;
}

.table-admin-dropdowns {
  display: grid;
  gap: 8px;
}

.table-admin-details {
  border-top: 1px solid var(--line);
}

.table-admin-details > summary {
  padding: 10px 0 2px;
  color: var(--green);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.table-admin-details > summary::-webkit-details-marker {
  display: none;
}

.table-admin-details > summary::after {
  content: '⌄';
  float: right;
  font-size: 20px;
  line-height: 1;
}

.table-admin-details[open] > summary::after {
  content: '⌃';
}

.table-admin-details-content {
  display: grid;
  gap: 8px;
  padding-top: 10px;
}

.table-admin-details-content .button {
  width: 100%;
  margin: 0;
  text-align: center;
}

.table-admin-form {
  padding-top: 2px;
}

.table-admin-form label {
  margin-top: 8px;
}

.table-admin-form input[type="submit"] {
  width: 100%;
  margin: 12px 0 0;
}


/* Histórico compacto e filtrável */
.history-page {
  max-width: 900px;
  margin: 0 auto;
}

.history-heading h1 {
  margin-bottom: 6px;
}

.history-heading p {
  margin-top: 0;
  color: var(--muted);
}

.history-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.history-summary-card {
  display: grid;
  gap: 4px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.history-summary-card strong {
  font-size: 24px;
  line-height: 1.1;
}

.history-summary-card span {
  color: var(--muted);
  font-size: 13px;
}

.history-filters {
  padding: 16px;
  margin: 18px 0;
}

.history-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.history-filter-form > div {
  min-width: 170px;
  flex: 1;
}

.history-filter-form label {
  margin-top: 0;
}

.history-filter-form input,
.history-filter-form select {
  margin: 0;
}

.history-filter-form input[type="submit"],
.history-clear-filter {
  margin: 0;
  white-space: nowrap;
}

.history-filter-form .history-clear-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.history-order {
  padding: 0;
  margin: 0;
  overflow: hidden;
}

.history-order > summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.history-order > summary::-webkit-details-marker {
  display: none;
}

.history-order > summary::after {
  margin-left: auto;
  color: var(--green);
  content: '⌄';
  font-size: 21px;
  line-height: 1;
}

.history-order[open] > summary::after {
  content: '⌃';
}

.history-order-main {
  min-width: 0;
  flex: 1;
}

.history-order-main .eyebrow {
  margin: 0 0 3px;
}

.history-order-main h2 {
  margin: 0;
  font-size: 18px;
}

.history-order-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.history-order-total {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.history-order-statuses {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.payment-status-paid { color: #216044; background: #e1f1e7; }
.payment-status-partial { color: #805a13; background: #fff0c9; }
.payment-status-unpaid { color: #9b2f2f; background: #fce7e7; }

.history-order-total strong {
  font-size: 16px;
}

.history-order-total strong span,
.history-order-total small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.history-order-content {
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}

.history-order-note {
  padding: 9px 11px;
  margin: 12px 0;
  border-left: 3px solid #d99b4b;
  background: #fff8e7;
}

.history-order-items {
  display: grid;
  gap: 5px;
  margin: 12px 0 16px;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.history-order-open {
  display: block;
  margin: 0;
  text-align: center;
}

@media (max-width: 600px) {
  .history-summary-grid {
    gap: 8px;
  }

  .history-summary-card {
    padding: 11px 9px;
  }

  .history-summary-card strong {
    font-size: 20px;
  }

  .history-summary-card span {
    font-size: 11px;
    line-height: 1.2;
  }

  .history-filter-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .history-filter-form > div {
    min-width: 0;
  }

  .history-filter-form input[type="submit"],
  .history-clear-filter {
    width: 100%;
    text-align: center;
  }

  .history-order > summary {
    padding: 12px;
  }

  .history-order-total strong {
    font-size: 15px;
  }

  .history-order-content {
    padding: 0 12px 12px;
  }
}

.history-filters h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.history-quick-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
}

.history-quick-filters::-webkit-scrollbar {
  display: none;
}

.history-quick-filters a {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.history-quick-filters a.is-active {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.history-filter-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.history-filter-form > div {
  min-width: 0;
}

.history-filter-form label {
  margin-top: 0;
}

.history-filter-form input,
.history-filter-form select {
  margin: 0;
}

.history-filter-form input[type="submit"],
.history-clear-filter {
  width: 100%;
  margin: 0;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .history-filter-form {
    grid-template-columns: 1fr;
  }
}

/* Histórico: filtros compactos no telemóvel */
@media (max-width: 600px) {
  .history-page {
    max-width: 100%;
  }

  .history-heading p {
    max-width: 34ch;
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 1.35;
  }

  .history-filters {
    padding: 11px;
    margin: 12px 0;
  }

  .history-filters h2 {
    margin-bottom: 7px;
    font-size: 16px;
  }

  .history-quick-filters {
    gap: 5px;
    padding-bottom: 7px;
  }

  .history-quick-filters a {
    padding: 5px 8px;
    font-size: 11px;
  }

  .history-filter-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .history-filter-form > div {
    min-width: 0;
  }

  .history-filter-form > div:nth-of-type(3) {
    grid-column: 1 / -1;
  }

  .history-filter-form label {
    margin: 0 0 3px;
    font-size: 11px;
  }

  .history-filter-form input,
  .history-filter-form select {
    height: 36px;
    min-height: 36px;
    padding: 5px 7px;
    font-size: 13px;
  }

  .history-filter-form input[type="submit"],
  .history-clear-filter {
    width: 100%;
    min-height: 36px;
    height: 36px;
    padding: 5px 7px;
    margin: 0;
    font-size: 12px;
  }

  .history-filter-form input[type="submit"] {
    grid-column: 1;
  }

  .history-clear-filter {
    grid-column: 2;
  }
}

/* Constrain native Safari date controls to their grid columns. */
.history-filter-form input[type="datetime-local"] {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  -webkit-appearance: none;
  appearance: none;
  overflow: hidden;
}
.history-filter-form input[type="datetime-local"]::-webkit-date-and-time-value {
  min-width: 0;
  text-align: left;
}
.history-filter-form input[type="datetime-local"]::-webkit-datetime-edit {
  min-width: 0;
  padding: 0;
}
@media (max-width: 600px) {
  .history-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .history-filter-form input[type="datetime-local"] {
    width: 100%;
    min-width: 0;
    height: 36px;
    min-height: 36px;
    padding: 4px;
  }
}

/* Same centered date display and empty hint across native date pickers. */
.history-date-control { position: relative; min-width: 0; }
.history-date-display { display: none; }
.history-date-control.is-enhanced {
  border: 1px solid #a7b8ad;
  border-radius: 7px;
  background: white;
}
.history-date-control.is-enhanced input[type="datetime-local"] {
  opacity: 0;
  position: relative;
  z-index: 1;
  cursor: pointer;
  margin: 0;
  border: 0;
}
.history-date-control.is-enhanced .history-date-display {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  pointer-events: none;
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
}
.history-date-display.is-empty { color: var(--muted) !important; }
.history-date-control:focus-within {
  outline: 3px solid #d99b4b;
  outline-offset: 2px;
}
/* Desktop keyboard editing retains the native segmented field. */
@media (hover: hover) and (pointer: fine) {
  .history-date-control.is-enhanced:focus-within input { opacity: 1; }
  .history-date-control.is-enhanced:focus-within .history-date-display { visibility: hidden; }
}

/* Relatórios: estatísticas e caixa com layout responsivo. */
.report-dashboard { max-width: 1160px; }
.report-heading, .report-section-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.report-heading h1, .report-section-title h2 { margin-top: 0; }
.report-heading h1 { margin-bottom: 8px; }
.report-export { margin: 0; }
.report-tabs { display: flex; gap: 8px; margin: 16px 0 20px; border-bottom: 1px solid var(--line); }
.report-tabs a { padding: 10px 16px; color: var(--green); text-decoration: none; border-bottom: 3px solid transparent; font-weight: 700; }
.report-tabs a.is-active { background: #eaf1e8; border-bottom-color: var(--green); border-radius: 8px 8px 0 0; }
.report-card { margin: 0; }
.report-filter { padding: 20px; }
.report-section-title h2 { margin-bottom: 5px; }
.report-muted, .report-note, .report-period-label { color: var(--muted); font-size: 13px; }
.report-preset-list { display: flex; gap: 7px; overflow-x: auto; padding: 4px 12px 12px 0; scroll-padding-right: 12px; scrollbar-width: none; }
.report-preset-list::-webkit-scrollbar { display: none; }
.report-preset-list a { flex: 0 0 auto; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 13px; font-weight: 700; }
.report-preset-list a.is-active { color: white; border-color: var(--green); background: var(--green); }
.report-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; }
.report-form label, .cash-date-form label { margin: 0 0 4px; font-size: 12px; }
.report-form input, .report-form select, .cash-date-form input { margin: 0; min-width: 0; }
.report-form-actions { display: flex; gap: 8px; align-items: center; }
.report-form-actions input, .report-form-actions a { flex: 1; margin: 0; text-align: center; white-space: nowrap; }
.report-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.report-stat { display: flex; flex-direction: column; gap: 2px; padding: 15px 16px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.report-stat strong { font-size: 23px; }
.report-stat span { color: var(--muted); font-size: 12px; line-height: 1.25; }
.report-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 18px 0; }
.report-columns .report-card { min-width: 0; }
.report-chart-card { position: relative; overflow: hidden; }
.report-chart-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.report-chart-heading h2 { margin: 0 0 3px; }
.report-chart-kpis { display: flex; gap: 8px; }
.report-chart-kpis > span { min-width: 94px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #f8faf7; }
.report-chart-kpis small, .report-chart-kpis strong { display: block; }
.report-chart-kpis small { color: var(--muted); font-size: 10px; }
.report-chart-kpis strong { font-size: 15px; }
.report-chart-scroll { margin: 14px 0 0 48px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; scrollbar-color: #b5c8be transparent; }
.report-chart { display: flex; align-items: stretch; gap: 7px; height: 210px; min-width: 100%; padding: 10px 4px 0; border-bottom: 1px solid #b9c8bf; background: repeating-linear-gradient(to bottom, transparent 0, transparent 65px, #e7ece7 66px); }
.report-chart-column { display: flex; flex: 1 0 28px; min-width: 28px; flex-direction: column; justify-content: flex-end; gap: 7px; text-align: center; }
.report-chart-bars { display: flex; align-items: end; justify-content: center; gap: 2px; height: 174px; min-height: 0; }
.report-bar { display: block; width: 44%; min-height: 2px; border-radius: 5px 5px 1px 1px; background: var(--green); transition: filter .15s ease, transform .15s ease; }
.report-chart-column:focus { outline: none; }
.report-chart-column:focus .report-bar.current, .report-chart-column:hover .report-bar.current { filter: brightness(1.12); transform: scaleX(1.08); }
.report-bar.previous { background: #b5c8be; }
.report-chart-label { color: var(--muted); font-size: 9px; line-height: 1; white-space: nowrap; }
.report-chart-scale { position: absolute; left: 14px; top: 104px; display: flex; height: 175px; flex-direction: column; justify-content: space-between; color: var(--muted); font-size: 9px; }
.report-legend { display: flex; gap: 18px; margin: 12px 0 0 48px; color: var(--muted); font-size: 12px; }
.report-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 3px; background: var(--green); }
.report-legend i.previous { background: #b5c8be; }
.report-chart-empty { display: grid; place-items: center; min-height: 170px; margin-top: 14px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); text-align: center; }
.report-chart-empty strong { color: var(--ink); }
.report-chart-empty span { margin-top: -45px; font-size: 12px; }
.report-list { margin: 12px 0 0; padding: 0; list-style: none; }
.report-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.report-list li:last-child { border-bottom: 0; }
.report-bars-list { display: grid; gap: 14px; margin-top: 14px; }
.report-person-label { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.report-track { height: 8px; margin: 5px 0 3px; overflow: hidden; border-radius: 999px; background: #eaf1e8; }
.report-track i { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.report-person-row small { color: var(--muted); font-size: 11px; }
.cash-date-form { display: flex; align-items: end; gap: 10px; max-width: 520px; }
.cash-date-form > * { flex: 1; }
.cash-date-form input[type="submit"] { flex: 0 0 auto; margin: 0; }

/* Final report polish: visible values, solar-style picker and stable chart scale. */
.report-choice-grid a, .report-choice-list a { display: inline-flex; align-items: center; gap: 8px; }
.report-choice-grid a small, .report-choice-list a small { color: var(--muted); font-size: 11px; font-weight: 600; }
.report-choice-grid a.is-active small, .report-choice-list a.is-active small { color: rgba(255,255,255,.82); }
.report-choice-grid a { justify-content: space-between; }
.report-period-button { display: inline-flex; align-items: center; justify-content: center; min-width: 180px; padding: 8px 16px; border: 0; border-radius: 999px; color: var(--ink); background: transparent; font: inherit; cursor: pointer; }
.report-period-button:hover { background: #eef4ee; }
.report-chart-stage { position: relative; min-height: 220px; margin-top: 14px; padding-left: 42px; }
.report-chart-stage .report-chart-scale { position: absolute; left: 0; top: 10px; height: 174px; }
.report-chart-stage .report-chart-scroll { margin: 0; }
.report-chart-column { flex: 0 0 28px; min-width: 28px; }
.report-bar { width: 18px; }
.report-chart-day { min-width: 980px; }
.report-chart-month { min-width: 760px; }
.report-chart-year, .report-chart-lifetime { min-width: 100%; }
.report-chart-categorical { min-width: 100%; }
.report-chart-categorical .report-chart-column { flex: 0 0 88px; min-width: 88px; }
.report-chart-categorical .report-chart-label { display: block; max-width: 88px; overflow-wrap: anywhere; white-space: normal; line-height: 1.15; }
.report-chart-categorical .report-bar { width: 18px; }
.report-chart-tooltip { position: absolute; z-index: 5; pointer-events: none; padding: 10px 12px; border: 1px solid rgba(207, 224, 212, .9); border-radius: 12px; color: var(--ink); background: rgba(255, 255, 255, .92); box-shadow: 0 8px 24px rgba(24, 65, 48, .18); backdrop-filter: blur(8px); font-size: 12px; }
.report-chart-tooltip strong, .report-chart-tooltip span { display: block; }
.report-chart-tooltip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-chart-tooltip span { margin-top: 4px; color: var(--muted); }
.report-chart-tooltip i { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: var(--green); }
.report-chart-tooltip b { color: var(--ink); }
.report-chart-column.is-chart-selected .report-bar { filter: brightness(1.18); box-shadow: 0 0 0 3px rgba(31, 111, 84, .14); }

.report-period-dialog { position: fixed; z-index: 1000; left: 50%; bottom: 0; width: min(440px, 100%); max-width: 440px; max-height: 88vh; margin: 0; transform: translateX(-50%); overflow: auto; padding: 0; border: 0; border-radius: 26px 26px 0 0; color: var(--ink); background: #fff; box-shadow: 0 -12px 50px rgba(20, 61, 46, .25); }
.report-period-dialog::backdrop { background: rgba(17, 35, 28, .48); }
.report-period-sheet { padding: 22px 20px 18px; background: #fff; }
.report-period-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.report-calendar-toolbar { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; }
.report-calendar-toolbar strong { text-align: center; }
.report-period-dialog-head h2 { margin: 0; font-size: 20px; }
.report-dialog-close { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; color: var(--green); background: #edf4ee; font-size: 22px; line-height: 1; cursor: pointer; outline: none; }
.report-dialog-close:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.report-calendar-toolbar { margin: 22px 0 12px; }
.report-calendar-toolbar strong { font-size: 17px; }
.report-calendar-toolbar button { display: grid; place-items: center; justify-self: center; width: 34px; height: 34px; padding: 0 0 2px; border: 1px solid var(--line); border-radius: 50%; color: var(--green); background: white; font-size: 25px; line-height: 1; cursor: pointer; outline: none; }
.report-calendar-toolbar button:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.report-calendar-weekdays, .report-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center; }
.report-calendar-weekdays { margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.report-calendar-grid button, .report-calendar-grid span { min-height: 38px; }
.report-calendar-grid button { border: 0; border-radius: 50%; color: var(--ink); background: transparent; font: inherit; cursor: pointer; }
.report-calendar-grid button:hover { background: #eaf3ec; }
.report-calendar-grid button.is-selected { color: white; background: var(--green); font-weight: 700; }
.report-period-dialog-form { display: flex; flex-direction: row-reverse; gap: 10px; margin-top: 20px; }
.report-period-dialog-form button { flex: 1; margin: 0; }

@media (max-width: 600px) {
  .report-choice-grid a, .report-choice-list a { align-items: center; justify-content: center; flex-direction: column; gap: 1px; text-align: center; }
  .report-choice-grid a { min-height: 42px; padding: 6px 5px; font-size: 11px; }
  .report-choice-list a { min-height: 37px; padding: 5px 7px; font-size: 10px; }
  .report-choice-grid a small, .report-choice-list a small { font-size: 10px; }
  .report-chart-stage { min-height: 190px; padding-left: 35px; }
  .report-chart-stage .report-chart-scale { height: 143px; top: 10px; font-size: 9px; }
  .report-chart-day { min-width: 920px; }
  .report-chart-column { flex-basis: 24px; min-width: 24px; }
  .report-bar { width: 15px; }
  .report-chart-categorical { min-width: 100%; }
  .report-chart-categorical .report-chart-column { flex-basis: 86px; min-width: 86px; }
  .report-chart-categorical .report-chart-label { max-width: 86px; font-size: 10px; }
  .report-period-dialog { width: 100%; max-height: 86vh; }
  .report-period-nav { max-width: 270px; justify-content: center; gap: 8px; }
  .report-period-button { min-width: 0; width: 154px; padding: 6px 8px; font-size: 15px; }
  .report-period-button strong { display: block; width: 100%; text-align: center; white-space: nowrap; }
  .report-arrow { flex: 0 0 28px; width: 28px; height: 28px; font-size: 21px; }
}

@media (max-width: 850px) {
  .report-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-form-actions { grid-column: 1 / -1; }
  .report-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .report-dashboard { max-width: 100%; }
  .report-heading { align-items: flex-start; }
  .report-heading h1 { font-size: 28px; }
  .report-export { padding: 8px 10px; font-size: 12px; }
  .report-tabs { margin-top: 10px; }
  .report-tabs a { flex: 1; padding: 9px 8px; text-align: center; font-size: 13px; }
  .report-filter, .report-card { padding: 14px; }
  .report-section-title { align-items: flex-start; flex-direction: column; gap: 4px; }
  .report-section-title h2 { font-size: 19px; }
  .report-form { grid-template-columns: 1fr 1fr; gap: 8px; }
  .report-form label, .cash-date-form label { font-size: 11px; }
  .report-form input, .report-form select { height: 36px; padding: 5px 7px; font-size: 12px; }
  .report-custom-comparison { display: none; }
  .report-stat { padding: 11px 10px; }
  .report-stat strong { font-size: 18px; }
  .report-stat span { font-size: 10px; }
  .report-columns { grid-template-columns: 1fr; gap: 12px; margin: 12px 0; }
  .report-chart-heading { flex-direction: column; gap: 10px; }
  .report-chart-kpis { width: 100%; }
  .report-chart-kpis > span { flex: 1; min-width: 0; }
  .report-chart-scroll { margin-left: 37px; }
  .report-chart { height: 190px; }
  .report-chart-hour { min-width: 650px; }
  .report-chart-bars { height: 158px; }
  .report-chart-column { flex-basis: 25px; min-width: 25px; }
  .report-chart-hour .report-chart-column:not(:nth-child(3n + 1)) .report-chart-label { visibility: hidden; }
  .report-chart-label { font-size: 9px; }
  .report-chart-scale { left: 8px; top: 175px; height: 159px; }
  .report-legend { margin-left: 37px; font-size: 10px; }
  .report-period-label { font-size: 11px; }
  .cash-date-form { align-items: end; gap: 7px; }
  .cash-date-form input { height: 36px; padding: 5px 7px; font-size: 12px; }
  .cash-date-form input[type="submit"] { padding: 7px 10px; font-size: 12px; }
}

/* Caixa: resumo operacional e selector diário. */
.report-cash-period { padding: 16px 20px; }
.report-cash-period .eyebrow { margin-bottom: 10px; }
.report-arrow.is-disabled { opacity: .35; pointer-events: none; }
.report-cash-stat-grid { margin-top: 16px; }
.report-cash-status { background: #f8faf7; }
.report-cash-status .report-section-title { align-items: center; }
.report-cash-status .badge { flex: 0 0 auto; }
.report-cash-status p:not(.eyebrow) { margin: 12px 0 16px; color: var(--muted); }
.report-cash-close-button { width: 100%; margin: 0; }
.report-cash-pending-list { margin-top: 12px; }
.report-cash-pending-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.report-cash-pending-row:last-child { border-bottom: 0; padding-bottom: 0; }
.report-cash-pending-row strong, .report-cash-pending-row small { display: block; }
.report-cash-pending-row small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.report-cash-pending-row .button { flex: 0 0 auto; margin: 0; padding: 7px 10px; font-size: 11px; white-space: nowrap; }

@media (max-width: 600px) {
  .report-cash-period { padding: 13px 14px; }
  .report-cash-status .report-section-title { flex-direction: row; align-items: center; }
  .report-cash-pending-row { gap: 8px; }
}


/* Exportação agrupada: um botão abre PDF e CSV. */
.report-export-menu { position: relative; display: inline-block; }
.report-export-menu > summary { list-style: none; cursor: pointer; }
.report-export-menu > summary::-webkit-details-marker { display: none; }
.report-export-menu[open] > summary { color: #fff; background: var(--green); }
.report-export-options { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; min-width: 190px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 10px 28px rgba(24, 65, 48, .18); }
.report-export-options .button { margin: 0; padding: 8px 10px; text-align: center; font-size: 12px; }
@media (max-width: 600px) { .report-export-menu { width: auto; } .report-export-options { right: 0; min-width: 170px; } }


.report-calendar-toolbar button:disabled,
.report-calendar-grid button:disabled {
  opacity: .38;
  cursor: default;
}


/* Definições: navegação e gestão compacta da equipa. */
.settings-tabs {
  display: flex;
  gap: 6px;
  margin: 22px 0 18px;
  border-bottom: 1px solid var(--line);
}

.settings-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.settings-tabs a:hover,
.settings-tabs a.is-active {
  color: var(--green);
  background: #eef4ee;
  border-bottom-color: var(--green);
}

.team-page {
  max-width: 100%;
}

.team-page turbo-frame {
  display: block;
}

.team-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 22px 0 12px;
}

.team-page-heading .eyebrow,
.team-section-heading .eyebrow {
  margin: 0 0 5px;
}

.team-page-heading h2,
.team-section-heading h3,
.team-results-heading h3 {
  margin: 0;
}

.team-page-heading p:not(.eyebrow) {
  margin: 7px 0 0;
  color: var(--muted);
}

.team-create {
  margin: 14px 0 18px;
}

.team-create > summary {
  width: fit-content;
  margin: 0 0 0 auto;
  list-style: none;
}

.team-create > summary::-webkit-details-marker,
.team-member-editor > summary::-webkit-details-marker {
  display: none;
}

.team-create-panel {
  margin: 10px 0 0;
}

.team-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.team-section-heading > small {
  max-width: 300px;
  color: var(--muted);
  text-align: right;
}

.team-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}

.team-field {
  min-width: 0;
}

.team-field-wide {
  grid-column: 1 / -1;
}

.team-field label,
.team-filter-search label,
.team-filter-field label {
  margin: 0 0 5px;
}

.team-field small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.team-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.team-form-actions input {
  margin: 0;
}

.team-areas {
  padding: 14px;
  margin: 18px 0 0;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.team-areas legend {
  padding: 0 6px;
  font-weight: 700;
}

.team-area-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-area-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8faf7;
  font-size: 13px;
}

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

.team-summary-grid > div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.team-summary-grid strong {
  font-size: 23px;
  line-height: 1;
}

.team-summary-grid span {
  color: var(--muted);
  font-size: 12px;
}

.team-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 160px auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.team-filter-search,
.team-filter-field {
  min-width: 0;
}

.team-filter-actions {
  display: flex;
  gap: 7px;
}

.team-filter-actions input,
.team-filter-actions .button {
  margin: 0;
  white-space: nowrap;
}

.team-results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 10px;
}

.team-results-heading span {
  color: var(--muted);
  font-size: 12px;
}

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

.team-member-card {
  min-width: 0;
  margin: 0;
  padding: 18px;
}

.team-member-card.is-inactive {
  background: #fafafa;
}

.team-member-overview {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.team-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: #e7f1e8;
  color: var(--green);
  font-size: 14px;
  font-weight: 800;
}

.team-member-identity {
  min-width: 0;
}

.team-member-identity h3 {
  overflow: hidden;
  margin: 0;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-member-identity p {
  overflow: hidden;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-member-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.team-member-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.team-role-badge,
.team-status-badge {
  white-space: nowrap;
}

.team-status-badge.is-inactive {
  color: #7b433d;
  background: #fae9e6;
}

.team-member-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 0;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.team-member-meta span {
  min-width: 0;
}

.team-member-meta small,
.team-member-meta strong {
  display: block;
}

.team-member-meta small {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .7px;
}

.team-member-meta strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.team-member-editor {
  border-top: 1px solid var(--line);
}

.team-member-editor > summary {
  padding: 12px 0 0;
  color: var(--green);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.team-editor-content {
  padding-top: 15px;
}

.team-active-control {
  padding: 11px 12px;
  margin-bottom: 14px;
  border-radius: 9px;
  background: #f3f7f2;
}

.team-active-control label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.team-active-control small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.team-self-note,
.team-empty p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.team-member-delete {
  padding-top: 14px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

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

.history-order-actions form,
.history-order-actions .button,
.history-order-actions button {
  margin: 0;
}

.table-delete {
  padding-top: 13px;
  margin-top: 13px;
  border-top: 1px solid var(--line);
}

.team-empty {
  text-align: center;
}

@media (max-width: 760px) {
  .settings-tabs {
    margin-top: 18px;
  }

  .settings-tabs a {
    flex: 1;
    justify-content: center;
    padding: 0 10px;
  }

  .team-page-heading,
  .team-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .team-section-heading > small {
    text-align: left;
  }

  .team-create > summary {
    width: 100%;
    margin-left: 0;
    text-align: center;
  }

  .team-form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .team-field-wide {
    grid-column: auto;
  }

  .team-form-actions input {
    width: 100%;
  }

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

  .team-summary-grid > div {
    padding: 11px 12px;
  }

  .team-summary-grid strong {
    font-size: 20px;
  }

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

  .team-filter-search,
  .team-filter-actions {
    grid-column: 1 / -1;
  }

  .team-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .team-filter-actions input,
  .team-filter-actions .button {
    width: 100%;
    min-width: 0;
    text-align: center;
  }

  .team-member-list {
    grid-template-columns: 1fr;
  }

  .team-member-overview {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
  }

  .team-avatar {
    width: 40px;
    height: 40px;
  }

  .team-member-badges {
    justify-content: flex-start;
  }

  .team-member-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .team-member-meta {
    grid-template-columns: 1fr;
  }

  .record-delete {
    align-items: stretch;
    flex-direction: column;
  }

  .record-delete form,
  .record-delete button {
    width: 100%;
  }

  .record-delete .trash-button-form,
  .record-delete button.trash-button {
    width: 42px;
    align-self: flex-end;
  }
}
.service-status-card { border-left: 5px solid var(--green); }
.service-status-card.is-paused { border-left-color: #b45309; background: #fffaf0; }
.service-status-copy { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.service-status-copy h2 { margin: 4px 0 0; }
.service-status-card > p { color: var(--muted); }
.service-paused-notice { margin: 18px 0; }
.customer-service-paused .customer-product-card { pointer-events: none; opacity: .72; }
.customer-service-paused .customer-product-action-slot,
.customer-service-paused .customer-remove-button,
.customer-service-paused .customer-quantity-input,
.customer-service-paused .customer-cart-bar { display: none !important; }
.payment-history-item.is-voided > div { color: var(--muted); text-decoration: line-through; }
.payment-history-item.is-voided small { display: block; margin-top: 4px; text-decoration: none; }
.payment-void-control { margin-top: 8px; }
.payment-void-control form { display: grid; gap: 8px; padding-top: 10px; }
.service-paused-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 18px; color: #713f12; background: #fef3c7; border-bottom: 1px solid #f59e0b; }
.service-paused-banner form { margin: 0; }
.service-paused-banner button { padding: 7px 12px; }
.cash-reopen-control { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.cash-reopen-control form { display: grid; gap: 8px; margin-top: 10px; }

/* Staff orders: compact service board */
.staff-nav-toggle, .staff-mobile-context { display: none; }
.staff-nav-toggle svg { display: block; width: 20px; height: 20px; }
.staff-orders-board > h1 { margin: 0 0 16px; }
.staff-orders-board .staff-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 520px; gap: 10px; margin: 0 0 17px; }
.staff-orders-board .staff-summary-card { display: grid; place-content: center; justify-items: center; gap: 3px; min-width: 0; min-height: 84px; padding: 12px; border-radius: 14px; background: #fff; text-align: center; }
.staff-orders-board .staff-summary-card strong { font-size: 28px; line-height: 1; color: var(--green); }
.staff-orders-board .staff-summary-alert { border-color: var(--line); }
.staff-orders-board .staff-summary-alert strong { color: #aa6b16; }
.staff-orders-board .staff-summary-card span { font-size: 12px; line-height: 1.25; }
.staff-orders-board .staff-board-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; max-width: 600px; overflow: visible; border-bottom: 1px solid var(--line); margin: 0 0 14px; }
.staff-orders-board .staff-board-tab { width: 100%; min-width: 0; margin: 0 0 -1px; padding: 11px 4px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); font-size: 13px; white-space: nowrap; }
.staff-orders-board .staff-board-tab.is-active { border-color: var(--green); background: transparent; color: var(--green); }
.staff-orders-board .staff-board-section { margin: 0 0 12px; }
.staff-orders-board .grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 10px; margin: 0; }
.staff-orders-board .staff-order-card, .staff-orders-board .staff-call-card { padding: 16px; border-radius: 16px; }
.staff-orders-board .staff-order-card-heading h2 { font-size: 17px; line-height: 1.25; }
.staff-orders-board .staff-order-card-heading h2 span { font-size: 13px; font-weight: 500; color: var(--muted); }
.staff-orders-board .staff-order-meta { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.staff-orders-board .staff-order-content { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 17px 0 13px; }
.staff-orders-board .staff-order-content > strong { flex: none; color: var(--green); font-size: 15px; white-space: nowrap; }
.staff-orders-board .staff-order-items { list-style: none; min-width: 0; margin: 0; padding: 0; font-size: 13px; }
.staff-orders-board .staff-order-items li + li { margin-top: 5px; }
.staff-orders-board .staff-order-note { margin: 0 0 13px; padding: 9px 11px; border-radius: 8px; background: #f4f7f1; font-size: 12px; overflow-wrap: anywhere; }
.staff-orders-board .staff-card-actions { display: flex; flex-wrap: nowrap; gap: 8px; }
.staff-orders-board .staff-card-actions > .button { display: inline-flex; flex: 0 1 auto; align-items: center; justify-content: center; min-height: 42px; margin: 0; padding: 9px 10px; font-size: 13px; text-align: center; }
.staff-orders-board .staff-card-actions form { flex: 1; min-width: 0; }
.staff-orders-board .staff-card-actions button { width: 100%; min-height: 42px; margin: 0; font-size: 13px; white-space: normal; }

@media (max-width: 600px) {
  .staff-header { align-items: center; gap: 0 10px; padding: 11px 16px; }
  .staff-identity { flex: 1; min-width: 0; }
  .staff-identity .platform-logo { width: 112px; }
  .staff-identity > strong { display: none; }
  .staff-nav-toggle { display: grid; place-items: center; flex: none; width: 42px; height: 42px; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #f7faf7; color: var(--green); font-size: 20px; line-height: 1; }
  .staff-mobile-context { display: flex; order: 2; flex-basis: 100%; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding-top: 8px; font-size: 12px; }
  .staff-mobile-context strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .staff-service-indicator { display: inline-flex; align-items: center; gap: 5px; flex: none; color: var(--muted); font-size: 11px; white-space: nowrap; }
  .staff-service-indicator::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #398a61; }
  .staff-service-indicator.is-paused::before { background: #b45309; }
  .staff-main-nav { display: none; order: 3; flex: none; flex-basis: 100%; width: 100%; margin-top: 12px; padding: 12px 0 0; overflow: visible; border-top: 1px solid var(--line); }
  .staff-header.is-menu-open .staff-main-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .staff-main-nav .staff-nav-group { display: contents; }
  .staff-main-nav a { padding: 11px 12px; background: #f3f6f2; font-size: 13px; white-space: normal; }
  .staff-main-nav a.is-active { background: var(--green); color: #fff; }
  .staff-header > form { display: none; }
  .staff-header.is-menu-open > form { display: block; order: 4; flex-basis: 100%; margin-top: 10px; }
  .staff-header.is-menu-open .staff-logout { display: block; width: 100%; margin: 0; }
  .staff-orders-board .staff-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staff-orders-board .staff-summary-card { align-items: center; min-height: 84px; }
  .staff-orders-board .staff-card-actions { display: flex; grid-template-columns: none; }
  .staff-orders-board .staff-card-actions > .button { max-width: 46%; }
}

@media (max-width: 380px) {
  .staff-orders-board .staff-board-tab { font-size: 12px; }
  .staff-orders-board .staff-card-actions { flex-wrap: wrap; }
  .staff-orders-board .staff-card-actions > .button, .staff-orders-board .staff-card-actions form { flex: 1 1 100%; max-width: none; }
}

/* Mesas com consumo */
.active-tables { max-width: 720px; }
.active-tables > h1 { margin: 0 0 4px; }
.active-tables-intro { margin: 0 0 20px; color: var(--muted); }
.active-tables-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 520px; margin-bottom: 20px; }
.active-tables-stat { display: grid; place-content: center; justify-items: center; min-height: 84px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: white; text-align: center; }
.active-tables-stat strong { color: var(--green); font-size: 28px; line-height: 1; }
.active-tables-stat span { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.25; }
.active-tables-search-label { display: block; margin: 0 0 7px; color: var(--ink); font-size: 14px; font-weight: 700; }
.active-tables-search { display: block; width: 100%; max-width: 520px; height: 44px; margin: 0 0 19px; padding: 0 13px; border: 1px solid #c9d7cb; border-radius: 10px; background: white; color: var(--ink); font: inherit; }
.active-tables-search:focus { outline: 2px solid var(--green); outline-offset: 2px; }
.active-tables-list-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 9px; color: var(--muted); font-size: 12px; }
.active-tables-list-heading strong { color: var(--green); font-size: 13px; }
.active-tables-list { display: grid; gap: 9px; }
.active-table-card { display: block; padding: 14px 15px; border: 1px solid var(--line); border-radius: 14px; background: white; color: var(--ink); text-decoration: none; box-shadow: 0 4px 16px #20383204; }
.active-table-card:hover { border-color: var(--green); }
.active-table-card[hidden] { display: none; }
.active-table-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.active-table-card-top > strong { color: var(--ink); font-size: 18px; }
.active-table-amount b { color: var(--green); font-size: 18px; white-space: nowrap; }
.active-table-amount small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; text-align: right; }
.active-table-card-detail { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; color: var(--muted); font-size: 13px; }
.active-table-chevron { color: var(--green); font-size: 17px; font-weight: 700; }
.active-table-waiting { display: inline-block; margin-top: 9px; padding: 5px 8px; border-radius: 8px; background: #fff3d8; color: #825614; font-size: 12px; }
.active-tables-empty { padding: 18px 0; color: var(--muted); font-size: 13px; }
.active-tables-empty[hidden] { display: none; }

/* Menu do estabelecimento */
.staff-menu-page { max-width: 720px; }
.staff-menu-page > h1 { margin: 0 0 5px; }
.staff-menu-intro { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.staff-menu-page .menu-actions { display: flex; gap: 8px; margin: 0 0 20px; }
.staff-menu-page .menu-actions .button { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; margin: 0; font-size: 13px; }
.staff-menu-page .staff-menu-status-tabs { gap: 7px; margin: 0 0 18px; }
.staff-menu-page .staff-menu-status-tab { min-height: 39px; padding: 8px 12px; font-size: 12px; }
.staff-menu-list-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.staff-menu-list-heading strong { color: var(--green); font-size: 13px; }
.staff-menu-page .menu-category-card { padding: 0; margin: 0 0 10px; border-radius: 14px; box-shadow: 0 4px 16px #20383204; }
.staff-menu-page .staff-category-details { margin: 0; border: 0; }
.staff-menu-page .menu-category-summary { display: flex; align-items: center; gap: 10px; min-height: 65px; padding: 11px 14px; list-style: none; }
.staff-menu-page .menu-category-summary::-webkit-details-marker { display: none; }
.menu-category-title { flex: 1; min-width: 0; }
.menu-category-title strong { display: block; color: var(--ink); font-size: 17px; line-height: 1.25; }
.menu-category-title small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.menu-category-chevron { color: var(--green); font-size: 18px; transform: rotate(90deg); }
.staff-category-details[open] > .menu-category-summary .menu-category-chevron { transform: rotate(-90deg); }
.staff-menu-page .menu-category-content { padding: 0 14px 13px; }
.menu-category-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 45px; border-top: 1px solid #edf1ed; }
.menu-category-tools .category-status { padding: 0; background: none; font-size: 12px; white-space: normal; }
.menu-category-tools .category-status.is-available::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #398a61; vertical-align: middle; }
.menu-edit-link { flex: none; color: var(--green); font-size: 12px; font-weight: 700; text-decoration: none; }
.menu-edit-link:hover { text-decoration: underline; }
.menu-product-row { position: relative; display: flex; align-items: center; gap: 9px; min-height: 63px; padding: 10px 0; border-top: 1px solid #edf1ed; }
.menu-product-info { flex: 1; min-width: 0; }
.menu-product-info > strong { display: block; color: var(--ink); font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.menu-product-info small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.menu-product-info .product-description { margin: 2px 0; color: var(--muted); font-size: 12px; }
.menu-product-price { color: var(--green); font-size: 14px; white-space: nowrap; }
.menu-record-actions { padding-top: 9px; border-top: 1px solid #edf1ed; }
.menu-record-actions > summary { width: fit-content; padding: 3px 0; color: var(--green); font-size: 12px; font-weight: 700; cursor: pointer; }
.menu-record-actions-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 9px 0; }
.menu-record-actions-list form { margin: 0; }
.menu-product-actions { flex: none; padding: 0; border: 0; }
.menu-product-actions > summary { display: grid; place-items: center; width: 26px; height: 32px; padding: 0; font-size: 23px; line-height: 1; list-style: none; }
.menu-product-actions > summary::-webkit-details-marker { display: none; }
.menu-product-actions[open] .menu-record-actions-list { position: absolute; z-index: 5; top: calc(100% - 2px); right: 0; width: max-content; max-width: min(290px, 90vw); padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 8px 24px #20383224; }
.staff-menu-page .category-level-1 { margin: 10px 0 0; border-left: 4px solid #eaf1e8; }
@media (max-width: 600px) {
  .staff-menu-page .menu-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staff-menu-page .menu-actions .button { min-width: 0; padding: 9px 5px; text-align: center; }
  .staff-menu-page .staff-menu-status-tabs { margin: 0 -16px 18px; padding: 0 16px 3px; }
}

/* Gestão compacta de mesas e QR */
.staff-qr-tables { max-width: 720px; }
.staff-qr-tables > h1 { margin: 0 0 5px; }
.staff-qr-intro { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.staff-qr-overview { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 15px; margin-bottom: 13px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.staff-qr-overview strong { color: var(--green); font-size: 23px; line-height: 1.1; }
.staff-qr-overview span { display: block; color: var(--muted); font-size: 12px; }
.staff-qr-overview a { max-width: 160px; color: var(--green); font-size: 12px; font-weight: 700; text-align: right; text-decoration: none; }
.staff-qr-overview a:hover { text-decoration: underline; }
.staff-qr-create { margin-bottom: 19px; }
.staff-qr-create > summary { display: grid; place-items: center; min-height: 43px; border: 1px solid var(--green); border-radius: 9px; background: var(--green); color: white; font-size: 13px; font-weight: 700; list-style: none; cursor: pointer; }
.staff-qr-create > summary::-webkit-details-marker { display: none; }
.staff-qr-create[open] > summary { border-radius: 9px 9px 0 0; }
.staff-qr-create form { display: grid; gap: 8px; padding: 13px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; background: white; }
.staff-qr-create label { margin: 0; font-size: 12px; }
.staff-qr-create input[type='number'] { height: 42px; margin: 0; }
.staff-qr-create input[type='submit'] { min-height: 40px; margin: 0; }
.staff-qr-list-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.staff-qr-list-heading strong { color: var(--green); font-size: 14px; }
.staff-qr-list-heading span { color: var(--muted); font-size: 12px; }
.staff-qr-search { height: 42px; margin: 0 0 12px; }
.staff-qr-list { display: grid; gap: 10px; }
.staff-qr-card { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 4px 16px #20383204; }
.staff-qr-card[hidden], .staff-qr-empty[hidden] { display: none; }
.staff-qr-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.staff-qr-card-heading h2 { margin: 0; color: var(--ink); font-size: 18px; }
.staff-qr-card-heading .category-status { font-size: 11px; }
.staff-qr-card-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.staff-qr-card-actions .button { display: grid; place-items: center; min-width: 0; min-height: 40px; margin: 0; padding: 7px 5px; border-radius: 9px; font-size: 12px; text-align: center; }
.staff-qr-more { margin-top: 10px; padding-top: 8px; border-top: 1px solid #edf1ed; }
.staff-qr-more > summary { width: fit-content; color: var(--green); font-size: 12px; font-weight: 700; cursor: pointer; }
.staff-qr-more-content { padding-top: 12px; }
.staff-qr-edit-form { display: grid; gap: 8px; }
.staff-qr-edit-form label { margin: 0; }
.staff-qr-edit-form label:has(input[type='checkbox']) { display: flex; align-items: center; gap: 8px; }
.staff-qr-edit-form input { margin: 0; }
.staff-qr-more-content .record-delete { margin-top: 14px; }
.staff-qr-empty { padding: 14px 0; color: var(--muted); font-size: 13px; }


/* Histórico: consulta rápida mantendo os cartões expansíveis. */
.history-compact .history-heading p { margin: 4px 0 18px; }
.history-compact .history-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-bottom: 12px; }
.history-compact .history-search input { min-width: 0; min-height: 44px; margin: 0; }
.history-compact .history-search input[type="submit"] { width: auto; min-height: 44px; margin: 0; }
.history-compact .history-quick-filters { margin-bottom: 10px; }
.history-compact .history-more-filters { margin: 0 0 18px; border: 1px solid #b9ccbf; border-radius: 10px; background: white; overflow: hidden; }
.history-compact .history-more-filters > summary { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 9px 12px; list-style: none; color: var(--green); cursor: pointer; }
.history-compact .history-more-filters > summary::-webkit-details-marker { display: none; }
.history-compact .history-more-filters > summary span { display: grid; gap: 1px; }
.history-compact .history-more-filters > summary strong { font-size: 13px; }
.history-compact .history-more-filters > summary small { font-size: 11px; color: var(--muted); }
.history-compact .history-more-filters > summary::after { content: '⌄'; display: grid; place-items: center; width: 24px; height: 24px; font-size: 22px; line-height: 1; transition: transform .2s; }
.history-compact .history-more-filters[open] > summary::after { transform: rotate(180deg); }
.history-compact .history-filter-form { padding: 12px; border-top: 1px solid var(--line); }
.history-compact .history-filter-form > div:first-of-type { grid-column: 1 / -1; }
.history-compact .history-list-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 10px; }
.history-compact .history-list-heading strong { color: var(--green); font-size: 14px; }
.history-compact .history-list-heading span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.history-compact .history-order > summary { gap: 8px; }
.history-compact .history-order-main h2 { font-size: 16px; }
.history-compact .history-order-meta { gap: 4px 8px; font-size: 11px; }
.history-compact .history-order-total { gap: 4px; white-space: nowrap; }
.history-compact .history-order-total strong { font-size: 16px; }
.history-compact .history-order-total .badge { font-size: 11px; }
.history-compact .history-order-money { display: grid; grid-template-columns: 1fr auto; gap: 5px; padding: 10px 0; margin: 8px 0; border-top: 1px solid var(--line); font-size: 12px; }
.history-compact .history-order-money dt { color: var(--muted); }
.history-compact .history-order-money dd { margin: 0; font-weight: 700; }
.history-compact .payment-status-cancelled { color: #a34842; background: #f8eeee; }
.history-compact .history-more-button { display: block; width: 100%; margin: 12px 0; text-align: center; }
.history-compact turbo-frame { display: block; }
@media (max-width: 600px) {
  .history-compact .history-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-compact .history-filter-form > div:first-of-type { grid-column: 1 / -1; }
  .history-compact .history-filter-form > div:nth-of-type(3) { grid-column: auto; }
  .history-compact .history-search input[type="submit"] { padding-inline: 12px; }
  .history-compact .history-order-meta { display: block; }
  .history-compact .history-order-meta span + span::before { content: ' · '; }
}
@media (prefers-reduced-motion: reduce) {
  .history-compact .history-more-filters > summary::after { transition: none; }
}

/* Relatórios: hierarquia mobile e ações do Caixa com a paleta Bocato. */
.report-v2 .report-heading-intro { margin: 0; color: var(--muted); font-size: 13px; }
.report-v2 .report-first-label { margin-top: 0; }
.report-v2 .report-explorer { border-color: var(--line); }
.report-v2 .report-explorer .report-field-label { letter-spacing: .04em; text-transform: uppercase; font-size: 12px; }
.report-v2 .report-choice-grid a, .report-v2 .report-choice-list a { min-height: 42px; }
.report-v2 .report-choice-grid a.is-active, .report-v2 .report-choice-list a.is-active,
.report-v2 .report-period-switch a.is-active { background: var(--green); color: #fff; border-color: var(--green); }
.report-v2 .report-chart-kpis strong { font-variant-numeric: tabular-nums; }
.report-v2 .report-cash-close-button:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; border-color: var(--line); }
.report-v2 .report-cash-pending-row small { font-size: 13px; }
@media (max-width: 600px) {
  .report-v2 .report-heading { align-items: flex-start; }
  .report-v2 .report-heading h1 { font-size: 25px; }
  .report-v2 .report-export { min-width: 88px; }
  .report-v2 .report-choice-grid a { font-size: 13px; padding: 10px 7px; }
  .report-v2 .report-choice-list a, .report-v2 .report-period-switch a { font-size: 12px; min-height: 40px; }
  .report-v2 .report-choice-grid a small, .report-v2 .report-choice-list a small { font-size: 11px; }
  .report-v2 .report-stat span { font-size: 12px; }
  .report-v2 .report-stat strong { font-size: 19px; }
  .report-v2 .report-chart-label { font-size: 11px; }
  .report-v2 .report-chart-kpis { flex-wrap: wrap; }
}

/* Ecrã de Relatórios e Caixa: hierarquia da proposta aprovada. */
.report-v2 .report-period-panel { padding: 17px 20px; margin-bottom: 12px; background: #fff; }
.report-v2 .report-period-panel .report-field-label { margin: 0 0 10px; color: var(--muted); }
.report-v2 .report-period-panel .report-period-switch { margin-bottom: 0; }
.report-v2 .report-period-panel .report-period-nav { margin: 12px auto 0; }
.report-v2 .report-explorer { margin-bottom: 16px; background: #fff; }
.report-v2 .report-explorer h2 { margin-bottom: 12px; font-size: 19px; }
.report-v2 .report-explorer .report-first-label { margin: 0 0 8px; }
.report-v2 .report-explorer .report-choice-grid { margin-bottom: 4px; }
.report-v2 .report-explorer .report-choice-list { padding-bottom: 3px; }
.report-v2 .report-focus-card { border-color: var(--line); background: #fff; }
.report-v2 .report-focus-card .report-chart-heading h2 { color: var(--ink); }
.report-v2 .report-stat-grid-compact { margin: 12px 0 18px; }
.report-v2 .report-cash-period { margin-bottom: 12px; }
.report-v2 .report-cash-status { border: 1px solid #b8d6c5; border-left: 4px solid var(--green); background: #eaf3eb; }
.report-v2 .report-cash-status .badge { color: var(--green); background: #fff; }
.report-v2 .report-cash-summary { margin: 12px 0; }
.report-v2 .report-cash-summary .report-stat:nth-child(-n+2) { border-color: #c7dccc; background: #fff; }
.report-v2 .report-cash-summary .report-stat:nth-child(-n+2) strong { color: var(--green); }
.report-v2 .report-cash-pending-card { margin-bottom: 12px; }
.report-v2 .report-cash-pending-row small { color: var(--green); font-weight: 700; }
@media (max-width: 600px) {
  .report-v2 .report-heading { align-items: flex-start; }
  .report-v2 .report-heading h1 { font-size: 25px; }
  .report-v2 .report-period-panel { padding: 14px; }
  .report-v2 .report-period-panel .report-period-switch { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; overflow: visible; }
  .report-v2 .report-period-essential { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .report-v2 .report-period-switch a, .report-v2 .report-period-switch .is-locked { display: grid; place-items: center; min-width: 0; min-height: 40px; padding: 7px 3px; font-size: 12px; text-align: center; }
  .report-v2 .report-period-essential .is-locked { grid-column: 1 / -1; }
  .report-v2 .report-choice-grid a { min-height: 52px; }
  .report-v2 .report-choice-list a { min-height: 42px; font-size: 12px; }
  .report-v2 .report-chart-kpis strong { font-size: 17px; }
  .report-v2 .report-focus-card { min-height: 0; }
  .report-v2 .report-cash-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-v2 .report-cash-summary .report-stat:nth-child(-n+2) { min-height: 90px; }
  .report-v2 .report-cash-summary .report-stat:nth-child(-n+2) strong { font-size: 23px; }
}

/* Hierarquia visual dos relatórios: valor principal e Caixa de ação. */
.report-v2 .report-focus-card { padding: 20px; min-height: 0; }
.report-v2 .report-focus-card .report-chart-heading { display: block; }
.report-v2 .report-focus-card .report-chart-heading h2 { font-size: 19px; margin: 0 0 8px; }
.report-v2 .report-main-value { display: block; color: var(--green); font-size: clamp(29px, 5vw, 38px); font-weight: 800; letter-spacing: -.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.report-v2 .report-focus-card .report-period-label { display: block; margin-top: 5px; font-size: 13px; }
.report-v2 .report-focus-card .report-chart-stage { margin-top: 18px; }
.report-v2 .report-stat-grid-compact .report-stat { padding: 10px 13px; }
.report-v2 .report-stat-grid-compact .report-stat strong { font-size: 18px; }
.report-v2 .report-stat-grid-compact .report-stat span { font-size: 12px; }
.report-v2 .report-cash-primary { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin: 12px 0; }
.report-v2 .report-cash-figure { min-width: 0; padding: 17px 16px; border: 1px solid #c7dccc; border-radius: 13px; background: #fff; }
.report-v2 .report-cash-figure span { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }
.report-v2 .report-cash-figure strong { display: block; margin-top: 7px; color: var(--green); font-size: 26px; line-height: 1.12; font-variant-numeric: tabular-nums; }
.report-v2 .report-cash-secondary { display: flex; flex-wrap: wrap; gap: 7px 15px; margin: 10px 0; color: var(--muted); font-size: 12px; }
.report-v2 .report-cash-secondary strong { color: var(--ink); }
@media (max-width: 600px) {
  .report-v2 .report-focus-card { padding: 16px; }
  .report-v2 .report-focus-card .report-chart-heading h2 { font-size: 17px; }
  .report-v2 .report-main-value { font-size: 34px; }
  .report-v2 .report-stat-grid-compact { gap: 8px; }
  .report-v2 .report-cash-figure { padding: 14px 12px; }
  .report-v2 .report-cash-figure strong { font-size: 21px; }
}


/* Relatórios aprovados: composição compacta no telemóvel, com dados reais. */
.report-approved { color: var(--ink); }
.report-approved .report-heading { align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.report-approved .report-heading h1 { margin: 0; font-size: clamp(25px, 3vw, 29px); line-height: 1.12; letter-spacing: -.03em; }
.report-approved .report-heading-intro { margin-top: 5px; font-size: 12px; }
.report-approved .report-export { min-width: 0; padding: 8px 10px; border-radius: 9px; background: transparent; font-size: 12px; white-space: nowrap; }
.report-approved .report-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 0 18px; }
.report-approved .report-tabs a { border-radius: 0; padding: 10px 4px; color: var(--muted); background: transparent; text-align: center; font-size: 14px; }
.report-approved .report-tabs a.is-active { color: var(--green); background: transparent; border-bottom-color: var(--green); }
.report-approved .report-period-panel, .report-approved .report-explorer, .report-approved .report-cash-period { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.report-approved .report-period-panel { margin: 0 0 16px; }
.report-approved .report-field-label { margin: 11px 1px 7px !important; color: var(--muted); font-size: 11px !important; line-height: 1.3; font-weight: 700; letter-spacing: .075em !important; text-transform: uppercase; }
.report-approved .report-period-panel .report-field-label { margin-top: 0 !important; }
.report-approved .report-period-switch { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; overflow: visible; padding: 0; }
.report-approved .report-period-essential { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.report-approved .report-period-switch a, .report-approved .report-period-switch .is-locked { display: grid; place-items: center; min-width: 0; min-height: 36px; padding: 7px 3px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--green); text-align: center; font-size: 12px; white-space: normal; }
.report-approved .report-period-essential .is-locked { grid-column: 1 / -1; color: var(--muted); }
.report-approved .report-period-switch a.is-active, .report-approved .report-choice-grid a.is-active { color: #fff; background: var(--green); border-color: var(--green); }
.report-approved .report-period-nav { display: flex; justify-content: space-between; max-width: none; margin: 12px 0 0; gap: 8px; }
.report-approved .report-period-button { flex: 1; width: auto; min-width: 0; padding: 3px 4px; border-radius: 8px; font-size: 14px; }
.report-approved .report-period-button strong { width: auto; white-space: normal; }
.report-approved .report-arrow { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; background: #fff; font-size: 24px; }
.report-approved .report-explorer { margin-bottom: 15px; }
.report-approved .report-choice-grid { display: flex; gap: 7px; overflow-x: auto; padding: 0 0 4px; margin: 0 0 11px; }
.report-approved .report-choice-grid a { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; flex-direction: row; min-height: 34px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 20px; background: #fff; color: var(--green); font-size: 12px; }
.report-approved .report-choice-list { display: flex; flex-wrap: wrap; gap: 6px; overflow: visible; padding: 0; }
.report-approved .report-choice-list a { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; flex-direction: row; min-height: 32px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--green); font-size: 11px; white-space: normal; }
.report-approved .report-choice-list a.is-active { border-color: var(--green); background: #e9f2e9; color: var(--green); }
.report-approved .report-employee-filter { margin: 12px 0 0; }
.report-approved .report-employee-filter select { max-width: none; border-radius: 9px; background: #fff; }
.report-approved .report-focus-card { margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.report-approved .report-main-eyebrow { margin: 0; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .075em; text-transform: uppercase; }
.report-approved .report-main-value { display: block; margin-top: 7px; color: var(--ink); font-size: 35px; font-weight: 750; line-height: 1.1; letter-spacing: -.03em; }
.report-approved .report-period-label { display: block; margin-top: 3px; font-size: 12px; }
.report-approved .report-focus-card .report-chart-stage { min-height: 160px; margin-top: 18px; padding-left: 35px; }
.report-approved .report-chart-stage .report-chart-scale { top: 3px; height: 125px; }
.report-approved .report-chart { height: 150px; padding: 3px 3px 0; background: transparent; border-color: var(--line); gap: 8px; }
.report-approved .report-chart-bars { height: 126px; }
.report-approved .report-chart-column { gap: 7px; }
.report-approved .report-bar { width: min(100%, 30px); border-radius: 5px 5px 0 0; background: #2e7457; }
.report-approved .report-chart-label { font-size: 11px; }
.report-approved .report-legend { display: none; }
.report-approved .report-chart-empty { min-height: 130px; }
.report-approved .report-extra-numbers { margin: 14px 0 18px; }
.report-approved .report-extra-numbers > summary { color: var(--green); font-size: 12px; font-weight: 700; cursor: pointer; }
.report-approved .report-stat-grid-compact { margin: 10px 0 0; }
.report-approved .report-detail-card { margin-top: 17px; }
.report-approved .report-detail-card h2, .report-approved .report-cash-method-card h2 { margin: 0 1px 9px; font-size: 16px; }
.report-approved .report-detail-card .report-note { margin: 0 1px 9px; }
.report-approved .report-detail-card .report-compact-rows, .report-approved .report-cash-method-card .report-compact-rows { display: block; margin: 0; padding: 3px 14px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.report-approved .report-detail-card .report-compact-row, .report-approved .report-cash-method-card .report-compact-row { padding: 13px 0; border-bottom: 1px solid #e6ebe4; font-size: 13px; }
.report-approved .report-detail-card .report-compact-row:last-child, .report-approved .report-cash-method-card .report-compact-row:last-child { border: 0; }
.report-approved .report-detail-card .report-compact-row strong, .report-approved .report-cash-method-card .report-compact-row strong { font-size: 14px; }
.report-approved .report-detail-card .report-track, .report-approved .report-cash-method-card .report-track { display: none; }
.report-approved .report-cash-period { margin-bottom: 17px; }
.report-approved .report-cash-period .eyebrow { display: none; }
.report-approved .report-cash-period .report-period-nav { margin: 0; }
.report-approved .report-cash-status { margin: 0 0 13px; padding: 17px; border: 1px solid #d0e1d2; border-radius: 15px; background: #eaf3e9; }
.report-approved .report-cash-status .report-section-title { display: block; }
.report-approved .report-cash-status .report-section-title h2 { margin: 5px 0 6px; font-size: 20px; }
.report-approved .report-cash-status .badge { display: none; }
.report-approved .report-cash-status p:not(.eyebrow) { margin: 0; color: #506a59; font-size: 12px; line-height: 1.45; }
.report-approved .report-cash-primary { gap: 9px; margin: 0 0 12px; }
.report-approved .report-cash-figure { padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.report-approved .report-cash-figure span { font-size: 11px; }
.report-approved .report-cash-figure strong { margin-top: 6px; color: var(--ink); font-size: 21px; }
.report-approved .report-cash-pending-card, .report-approved .report-cash-method-card { margin: 17px 0 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.report-approved .report-list-heading { display: flex; align-items: baseline; justify-content: space-between; margin: 0 1px 9px; }
.report-approved .report-list-heading h2 { margin: 0; font-size: 16px; }
.report-approved .report-list-heading > span { color: var(--muted); font-size: 12px; }
.report-approved .report-cash-pending-list { margin: 0; padding: 3px 14px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.report-approved .report-cash-pending-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-bottom: 1px solid #e6ebe4; color: var(--ink); text-decoration: none; font-size: 13px; }
.report-approved .report-cash-pending-row:last-child { padding-bottom: 13px; border: 0; }
.report-approved .report-cash-pending-row strong { font-size: 14px; }
.report-approved .report-cash-method-card h2 { margin: 0 1px 9px; }
.report-approved .report-cash-secondary { margin: 13px 0; }
.report-approved .report-cash-action { margin-top: 13px; }
.report-approved .report-cash-close-button { width: 100%; min-height: 44px; border-radius: 10px; }
.report-approved .report-cash-close-button:disabled { background: #b5c2b7; border-color: #b5c2b7; color: #fff; }
@media (max-width: 600px) {
  .report-approved .report-heading h1 { font-size: 27px; }
  .report-approved .report-chart-day { min-width: 650px; }
  .report-approved .report-chart-month { min-width: 640px; }
  .report-approved .report-chart-year, .report-approved .report-chart-lifetime { min-width: 100%; }
  .report-approved .report-chart-categorical { min-width: 100%; }
  .report-approved .report-chart-column { flex: 1 0 23px; min-width: 23px; }
  .report-approved .report-chart-categorical .report-chart-column { flex: 0 0 85px; min-width: 85px; }
  .report-approved .report-chart-categorical .report-chart-label { font-size: 10px; }
  .report-approved .report-stat-grid-compact { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

.report-approved .report-detail-card { margin: 17px 0 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }


/* Calendários compactos de Relatórios e Caixa, centrados no ecrã. */
.report-period-dialog {
  top: 50%;
  inset-block-start: 50%;
  bottom: auto;
  left: 50%;
  height: fit-content;
  transform: translate(-50%, -50%);
  width: min(380px, calc(100% - 24px));
  max-width: 380px;
  max-height: calc(100dvh - 24px);
  border-radius: 18px;
}
.report-period-sheet { padding: 16px 18px 14px; }
.report-period-dialog-head h2 { font-size: 17px; }
.report-period-dialog-head .eyebrow { margin-bottom: 4px; font-size: 10px; }
.report-dialog-close { width: 30px; height: 30px; font-size: 19px; }
.report-calendar-toolbar { grid-template-columns: 34px minmax(0, 1fr) 34px; margin: 12px 0 8px; gap: 6px; }
.report-calendar-toolbar strong { font-size: 15px; }
.report-calendar-toolbar button { width: 32px; height: 32px; font-size: 22px; }
.report-calendar-weekdays, .report-calendar-grid { gap: 2px; }
.report-calendar-weekdays { margin-bottom: 3px; font-size: 10px; }
.report-calendar-grid button, .report-calendar-grid span { min-height: 34px; }
.report-calendar-grid button { width: 34px; height: 34px; justify-self: center; font-size: 12px; }
.report-period-dialog-form { margin-top: 13px; gap: 8px; }
.report-period-dialog-form button { min-height: 40px; padding: 8px 5px; font-size: 12px; white-space: nowrap; }
@media (max-width: 600px) {
  .report-period-dialog { top: 50%; inset-block-start: 50%; bottom: auto; width: calc(100% - 20px); max-width: 380px; max-height: calc(100dvh - 24px); }
  .report-period-sheet { padding-inline: 14px; }
  .report-period-dialog-form button { font-size: 11px; }
}


/* Definições do gerente: revisão visual aprovada (Geral, Equipa e Apoio). */
.settings-title{margin:4px 0 5px;font-size:clamp(29px,5vw,38px);line-height:1.12;letter-spacing:-.035em}
.settings-intro{max-width:62ch;margin:0;color:var(--muted);font-size:14px;line-height:1.45}
.settings-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:18px 0 16px;border:0}
.settings-tabs a{display:inline-flex;align-items:center;justify-content:center;min-width:0;min-height:42px;padding:0 10px;border:1px solid var(--line);border-radius:10px;background:#f3f6f2;color:var(--green);font-size:14px;font-weight:700;text-align:center;text-decoration:none}
.settings-tabs a:hover{border-color:#c9d7cc;background:#edf3ee;color:var(--green)}
.settings-tabs a.is-active{border-color:var(--green);background:var(--green);color:#fff}
.settings-section{margin:0 0 10px}
.settings-card{padding:18px;border-radius:14px;box-shadow:0 3px 12px #20383208}
.service-status-card{border:1px solid var(--line);background:#fff}
.service-status-card.is-paused{border:1px solid #ecd2a3;background:#fffaf0}
.service-status-copy{align-items:center}
.service-status-copy .eyebrow{margin:0 0 4px}
.service-status-copy h2{margin:0;font-size:20px}
.service-status-copy .badge{flex:0 0 auto;padding:5px 10px;background:#e3f3e7;color:#216044;font-size:12px;font-weight:750;white-space:nowrap}
.service-status-card.is-paused .service-status-copy .badge{background:#fff0cf;color:#875f17}
.service-status-card>p{margin:12px 0 8px;font-size:14px}
.service-status-card form{margin:0}
.service-status-action{width:100%;min-height:44px;margin:7px 0 0;border-radius:10px}
.settings-accordion>summary{min-height:50px}
.settings-accordion>summary>span{gap:3px}
.settings-accordion>summary .eyebrow{font-size:10px;letter-spacing:1.35px}
.settings-accordion>summary strong{font-size:16px;line-height:1.25}
.settings-accordion>summary small{max-width:42%;overflow:hidden;color:var(--muted);font-size:12px;text-overflow:ellipsis}
.settings-accordion>summary::after{flex:0 0 auto;margin-left:2px;font-size:21px}
.settings-accordion-content{padding-top:15px;border-top:1px solid #edf0eb;margin-top:10px}
.google-review-settings{border-top:1px solid var(--line)}
.google-review-settings-status{display:inline-flex;align-items:center;min-height:27px;padding:4px 9px;border-radius:99px;background:#fff3d9;color:#805a13!important;font-weight:750}
.google-review-settings-status.is-ready{background:#e1f1e7;color:#216044!important}
.google-review-settings-description{margin-top:0}
.team-page{display:grid;gap:12px}
.team-page-heading{margin:2px 0 0}
.team-page-heading h2{font-size:21px}
.team-page-heading p:not(.eyebrow){max-width:58ch;font-size:14px}
.team-create{margin:0 0 2px}
.team-create>summary{min-height:44px;border-radius:10px}
.team-create-panel{margin-top:10px}
.team-summary-grid{gap:8px;margin:0}
.team-summary-grid>div{justify-items:center;padding:12px 10px;border-radius:12px;text-align:center}
.team-summary-grid strong{color:var(--ink);font-size:21px}
.team-summary-grid span{font-size:11px}
.team-filters{gap:8px;padding:12px;margin:0;border-radius:13px;background:#fff}
.team-filters label{margin-top:0;font-size:12px}
.team-filters input,.team-filters select{min-height:40px;padding:8px 10px;border-radius:9px;font-size:13px}
.team-results-heading{margin-top:2px}
.team-member-list{gap:10px}
.team-member-card{padding:15px;border-radius:14px}
.team-avatar{width:42px;height:42px}
.team-member-identity h3{font-size:15px}
.team-member-identity p{font-size:12px}
.team-member-badges .badge{padding:4px 8px;font-size:11px}
.team-member-meta{margin-top:12px;padding-top:11px}
.team-member-meta small{font-size:10px}
.team-member-meta strong{font-size:12px}
.support-page-heading{align-items:flex-end;margin:2px 0 14px}
.support-page-heading h2{margin:3px 0 4px;font-size:21px}
.support-page-heading p:not(.eyebrow){max-width:58ch;margin:0;color:var(--muted);font-size:14px}
.support-page-heading .button{min-height:42px;margin:0;border-radius:10px}
.support-ticket-list{gap:10px}
.support-ticket-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:8px 12px;padding:16px 17px;border-radius:14px;box-shadow:0 3px 12px #20383206}
.support-ticket-card>div{grid-column:1;gap:4px}
.support-ticket-card>div>span{font-size:10px;letter-spacing:.7px}
.support-ticket-card>div>strong{font-size:15px;line-height:1.3}
.support-ticket-card small{font-size:11px}
.support-ticket-card>.ticket-status{grid-column:2;grid-row:1;align-self:start}
@media(max-width:760px){
.settings-title{font-size:29px}
.settings-tabs{gap:6px;margin:16px 0 15px}
.settings-tabs a{min-height:41px;padding:0 7px;font-size:13px}
.settings-card{padding:16px}
.service-status-copy{align-items:flex-start;gap:9px}
.service-status-copy h2{font-size:19px}
.service-status-copy .badge{margin-top:1px;font-size:11px}
.settings-accordion>summary small{max-width:38%;font-size:11px}
.team-page-heading,.support-page-heading{align-items:stretch;gap:8px}
.team-create>summary,.support-page-heading .button{width:100%;text-align:center}
.team-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.team-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
.team-filter-search,.team-filter-actions{grid-column:1/-1}
.team-filter-actions{display:grid;grid-template-columns:1fr 1fr}
.team-filter-actions input,.team-filter-actions .button{width:100%;min-width:0;margin:0}
.team-member-card{padding:14px}
}
@media(max-width:380px){
.settings-tabs a{font-size:12px}
.service-status-copy{flex-direction:column}
.settings-accordion>summary small{display:none}
}


/* Equipa compacta: dropdowns de utilizador aprovados. */
.team-page{gap:10px}
.team-create{margin:0}
.team-create>summary{width:100%;margin:0;min-height:46px;border-radius:10px;text-align:center}
.team-create-panel{margin-top:8px}
.team-summary-grid{gap:6px;margin:0}
.team-summary-grid>div{padding:10px 8px;border:1px solid var(--line);border-radius:12px;background:#fff}
.team-summary-grid strong{font-size:18px;line-height:1.1}
.team-summary-grid span{font-size:11px}
.team-filters{gap:8px;padding:10px;margin:0;border:1px solid var(--line);border-radius:12px;background:#fff}
.team-filters label{margin:0 0 4px;font-size:12px}
.team-filters input,.team-filters select{min-height:40px;border-radius:9px}
.team-filter-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.team-filter-actions input,.team-filter-actions .button{width:100%;margin:0}
.team-results-heading{margin-top:2px}
.team-member-list{display:grid;gap:8px}
.team-member-card{padding:0;overflow:hidden;border-radius:14px}
.team-member-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px;cursor:pointer;list-style:none}
.team-member-summary::-webkit-details-marker{display:none}
.team-member-summary-main{display:flex;align-items:center;gap:12px;min-width:0;flex:1}
.team-avatar{width:42px;height:42px;flex:0 0 42px}
.team-member-identity{min-width:0}
.team-member-identity h3{margin:0 0 2px;font-size:15px;line-height:1.2}
.team-member-identity p{margin:0;color:var(--muted);font-size:12px}
.team-member-badges{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.team-member-badges .badge{padding:4px 8px;font-size:11px}
.team-member-chevron{flex:0 0 auto;color:var(--green);font-size:22px;line-height:1;transition:transform .18s ease}
.team-member-card[open] .team-member-chevron{transform:rotate(180deg)}
.team-member-expanded{padding:0 14px 14px;border-top:1px solid #edf0eb}
.team-member-meta{display:grid;gap:10px;margin-top:12px;padding-top:0}
.team-member-meta span{display:grid;gap:2px}
.team-member-meta small{color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.05em}
.team-member-meta strong{font-size:13px;line-height:1.35}
.team-member-editor{margin-top:12px;border-top:1px solid #edf0eb;padding-top:12px}
.team-member-editor>summary{cursor:pointer;color:var(--green);font-weight:700;list-style:none}
.team-member-editor>summary::-webkit-details-marker{display:none}
.team-editor-content{margin-top:12px}
.team-delete-form{margin-top:12px}
.team-delete-button{width:100%;text-align:center}
@media(max-width:760px){
  .team-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .team-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .team-filter-search,.team-filter-actions{grid-column:1/-1}
}


/* Equipa: mais respiro vertical entre blocos. */
.team-page{
  gap:16px;
}

.team-create{
  margin:0 0 10px;
}

.team-create>summary{
  margin:0;
}

.team-summary-grid{
  gap:10px;
  margin:0 0 14px;
}

.team-filters{
  margin:0 0 14px;
}

.team-results-heading{
  margin:4px 0 9px;
}

.team-member-list{
  gap:10px;
}

@media(max-width:760px){
  .team-page{
    gap:14px;
  }

  .team-create{
    margin-bottom:10px;
  }

  .team-summary-grid{
    gap:9px;
    margin-bottom:13px;
  }

  .team-filters{
    margin-bottom:13px;
  }

  .team-results-heading{
    margin:4px 0 8px;
  }
}

/* Menu do cliente: quantidades sempre visíveis, com círculos de 30px. */
.customer-menu-sticky { background: #f8f5ef; }
.customer-menu .menu-search input { margin: 0 0 8px; border-radius: 12px; font-size: 16px; }
.customer-menu-grid { gap: 10px; }
.customer-product-card { border-radius: 14px; }
.customer-product-content { flex: 1; padding: 12px 10px; }
.customer-product-content > strong { min-height: 38px; font-size: 16px; overflow-wrap: anywhere; }
.customer-product-price { color: var(--green); }
.customer-product-action-slot { grid-template-columns: 44px 26px 44px; justify-content: center; align-items: center; min-height: 44px; margin-top: auto; }
.customer-product-action-slot > * { grid-area: auto; }
.customer-product-card .quantity-value { width: 26px; min-height: 44px; font-size: 17px; font-variant-numeric: tabular-nums; }
.customer-product-card .customer-quantity-button {
  appearance: none; position: static; display: block; z-index: auto;
  width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  box-sizing: border-box; padding: 0; margin: 0; border: 0; border-radius: 0;
  box-shadow: none; color: var(--green); touch-action: manipulation;
  background-color: transparent;
  background-image: linear-gradient(var(--green), var(--green)), radial-gradient(circle at center, #fff 14px, var(--line) 14px, var(--line) 15px, transparent 15px);
  background-size: 12px 2px, 32px 32px;
  background-position: center center; background-repeat: no-repeat;
}
.customer-product-card .customer-add-button {
  color: #fff; background-color: transparent;
  background-image: linear-gradient(#fff, #fff), linear-gradient(#fff, #fff), radial-gradient(circle at center, var(--green) 15px, transparent 15px);
  background-size: 12px 2px, 2px 12px, 32px 32px;
  background-position: center center; background-repeat: no-repeat;
}
.customer-product-card .customer-quantity-button:hover { background-color: transparent; }
.customer-product-card .customer-quantity-button:disabled { opacity: .3; }
.customer-product-card.is-added { box-shadow: inset 0 0 0 1px var(--green); }
.customer-cart-bar { background: #fff; border-color: var(--line); box-shadow: 0 4px 16px #20383212; }
.customer-cart-bar strong { font-size: 18px; color: var(--green); }
.customer-cart-bar small { color: var(--muted); }
.customer-cart-bar button { border-radius: 12px; min-height: 48px; }
@media (max-width: 600px) {
  .customer-product-media .product-image, .customer-product-media .product-image-placeholder { height: 92px; }
  .customer-product-content { padding: 12px 9px; }
  .customer-product-content > strong { font-size: 15px; min-height: 36px; }
}

.customer-menu .customer-cart-bar[hidden] { display: none; }

/* Centrar avisos sem depender do transform utilizado pelas animações. */
.app-flash-stack { position: fixed; z-index: 70; left: 16px; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.app-flash-stack .flash { width: fit-content; max-width: min(440px, 100%); box-sizing: border-box; margin: 0; justify-content: center; text-align: center; overflow-wrap: anywhere; pointer-events: auto; }
.customer-menu-toast { text-align: center; overflow-wrap: anywhere; pointer-events: none; }
#staff_notifications, #support_notifications { position: fixed; left: 16px; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); z-index: 65; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
#support_notifications { bottom: calc(148px + env(safe-area-inset-bottom, 0px)); }
#staff_notifications .staff-popup { position: static; width: min(420px, 100%); max-width: 100%; box-sizing: border-box; pointer-events: auto; overflow-wrap: anywhere; }
#support_notifications .support-live-notification { width: min(440px, 100%); max-width: 100%; box-sizing: border-box; margin: 0; pointer-events: auto; }
@media (max-width: 480px) { #support_notifications .support-live-notification { flex-wrap: wrap; } }

/* Pagamentos da mesa: ações distintas para seleção e saldo total do pedido. */
.unpaid-order .payment-selection-footer { display: block; }
.unpaid-order .payment-selection-footer > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.unpaid-order .payment-selection-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.unpaid-order .payment-selection-actions select { width: 100%; min-width: 0; min-height: 44px; font-size: 16px; }
.unpaid-order .payment-selection-actions button { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; margin: 0; padding: 11px 12px; border-radius: 9px; font-size: 14px; }
.unpaid-order .payment-selection-actions button span { color: inherit; font-size: inherit; }
.unpaid-order .payment-selected-button { background: var(--green); color: #fff; }
.unpaid-order .payment-selected-button:disabled { opacity: .45; cursor: not-allowed; }
.unpaid-order .payment-all-button { background: var(--mustard); border-color: var(--mustard); color: var(--green); }

/* Pedidos: os quatro filtros mostram os contadores sem cartões duplicados. */
.staff-orders-board .staff-board-tabs { gap: 6px; border: 0; margin: 0 0 18px; }
.staff-orders-board .staff-board-tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 74px; margin: 0; padding: 9px 2px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--green); white-space: nowrap; }
.staff-orders-board .staff-board-tab strong { font-size: 25px; line-height: 1.1; font-weight: 750; font-variant-numeric: tabular-nums; }
.staff-orders-board .staff-board-tab span { display: block; min-width: 0; margin: 0; padding: 0; border-radius: 0; background: transparent; color: inherit; font-size: 11px; font-weight: 600; }
.staff-orders-board .staff-board-tab.is-active { border-color: var(--green); background: var(--green); color: #fff; }
.staff-orders-board .staff-board-tab.is-active span { background: transparent; color: inherit; }
.staff-orders-board .staff-board-tab.has-attention::after { content: ''; position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--mustard); }

/* Pedidos do cliente agrupados por visita. */
.customer-visit-page .toolbar { gap: 8px; margin-bottom: 18px; }
.customer-visit-summary { padding: 14px; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 12px; background: #eaf1e8; }
.customer-visit-summary > div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.customer-visit-summary strong { font-size: 15px; }
.customer-visit-summary span { font-size: 11px; color: var(--green); }
.customer-visit-summary p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.customer-visit-page #my_orders .panel { margin: 0 0 10px; }
.customer-order-time { margin: 5px 0 11px; font-size: 11px; color: var(--muted); }
.customer-previous-visits { margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.customer-previous-visits > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 50px; padding: 15px; list-style: none; cursor: pointer; color: var(--green); font-size: 14px; font-weight: 650; }
.customer-previous-visits > summary::-webkit-details-marker { display: none; }
.customer-previous-visits summary small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 400; }
.customer-visit-chevron { font-size: 19px; }
.customer-previous-visits[open] .customer-visit-chevron { transform: rotate(180deg); }
.customer-previous-content { padding: 0 15px 15px; }
.customer-previous-content .panel { padding: 13px; margin: 0 0 10px; background: #f8faf7; border-radius: 10px; }
.customer-history-note { margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.customer-visit-empty { color: var(--muted); font-size: 14px; }

/* Centrar as páginas de gestão no computador mantendo a disposição móvel. */
@media (min-width: 761px) {
  .staff-orders-board, .active-tables, .staff-menu-page, .staff-qr-tables {
    width: 100%; max-width: 720px; margin-inline: auto;
  }
  .staff-orders-board .staff-board-tabs,
  .active-tables-summary, .active-tables-search { max-width: none; }
}

/* Distinguish serving an accepted order from accepting a new one. */
button.order-serve-button { background: #245b85; border-color: #245b85; color: #fff; }
button.order-serve-button:hover { background: #1c486a; border-color: #1c486a; color: #fff; }
button.order-serve-button:focus-visible { outline-color: #245b85; }

/* Almoço: mesmos produtos, preços e escolhas próprios. */
.lunch-management { max-width: 900px; margin: 0 auto; }
.lunch-settings { margin: 18px 0; padding: 22px; }
.lunch-settings h2 { margin-top: 0; }
.lunch-settings details summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
.lunch-toggle { display: flex; align-items: center; gap: 10px; font-weight: 700; margin: 12px 0; }
.lunch-toggle input, .lunch-days input, .lunch-option-row input[type=checkbox], .lunch-choice input { width: auto; margin: 0; accent-color: var(--green); }
.lunch-days { display: flex; flex-wrap: wrap; gap: 9px; margin: 12px 0; }
.lunch-days label { display: flex; align-items: center; gap: 6px; background: #edf3ed; border-radius: 9px; padding: 9px; }
.lunch-times { display: flex; gap: 16px; margin: 12px 0; }
.lunch-options-list { max-height: 330px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; margin-top: 12px; }
.lunch-option-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px; align-items: center; gap: 16px; padding: 12px; border-bottom: 1px solid var(--line); }
.lunch-option-row[hidden] { display: none; }
.lunch-option-row > label:first-child { display: flex; align-items: center; gap: 10px; }
.lunch-option-row small { display: block; color: var(--muted); font-size: 12px; }
.lunch-option-row input[type=number] { margin: 4px 0 0; }
.lunch-option-section { border-top: 1px solid var(--line); padding: 6px 0; }
.lunch-option-section summary small { float: right; color: var(--muted); font-weight: 400; }
.lunch-schedule { color: var(--muted); font-size: 13px; margin: 16px 0; }
.lunch-combo-card { background: var(--green); color: white; display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 22px; }
.lunch-combo-card[hidden] { display: none; }
.lunch-combo-card h2 { color: white; margin: 6px 0; font-size: 22px; }
.lunch-combo-card p { margin: 8px 0; }
.lunch-combo-card > strong { font-size: 25px; align-self: center; }
.lunch-combo-card button { grid-column: 1 / -1; background: #fff; color: var(--green); }
.lunch-combo-card .eyebrow { color: #deeadf; }
.lunch-dialog { border: 1px solid var(--line); border-radius: 20px; padding: 28px; width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); box-sizing: border-box; overflow-y: auto; color: var(--ink); }
.lunch-dialog::backdrop { background: rgb(20 40 32 / .45); }
.lunch-dialog h2 { padding-right: 26px; margin-top: 0; }
.lunch-dialog .lunch-close { position: absolute; top: 12px; right: 12px; background: transparent; border: 0; color: var(--ink); padding: 6px; font-size: 28px; width: 36px; height: 36px; display: grid; place-items: center; }
.lunch-choice-group { border: 0; border-top: 1px solid var(--line); padding: 16px 0 6px; margin: 18px 0 0; }
.lunch-choice-group legend { font-weight: 700; padding-right: 12px; }
.lunch-choice { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 9px; padding: 12px; margin-bottom: 8px; }
.lunch-choice:has(input:checked) { border-color: var(--green); background: #edf3ed; }
.lunch-choice small { margin-left: auto; white-space: nowrap; }
.lunch-add-combo { width: 100%; margin-top: 16px; }
.lunch-selected-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; padding: 16px; margin: 12px 0; }
.lunch-selected-row p { font-size: 13px; color: var(--muted); margin: 5px 0; }
.lunch-combo-controls { display: flex; align-items: center; gap: 12px; }
.lunch-combo-controls button { padding: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; }
.lunch-combo-controls button:last-child { background: transparent; color: var(--muted); border: 0; }
.lunch-order-choices { display: block; list-style: none; margin: 5px 0 0; padding: 0; color: var(--muted); font-size: 12px; font-weight: 400; }
.lunch-order-choices li { margin: 2px 0; }
@media (max-width: 480px) {
 .lunch-settings { padding: 16px; }
 .lunch-option-row { grid-template-columns: minmax(0, 1fr) 100px; gap: 8px; }
 .lunch-dialog { padding: 22px; }
}
.lunch-dialog .lunch-close:focus { outline: none; box-shadow: none; }
.lunch-dialog .lunch-close:focus-visible { box-shadow: inset 0 0 0 2px var(--green); }
