: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: 50%; bottom: 84px; z-index: 10; transform: translateX(-50%); max-width: calc(100vw - 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; }
