:root {
  --theme-sidebar-start: #5b341d;
  --theme-sidebar-end: #3a2012;
  --theme-sidebar-accent: #8d552a;
  --theme-sidebar-text: #fff8f1;
  --theme-primary: var(--theme-sidebar-accent);
  --theme-primary-hover: color-mix(in srgb, var(--theme-primary) 84%, var(--theme-sidebar-end));
  --theme-background: #f7f1ea;
  --theme-surface: rgba(255, 251, 246, 0.92);
  --theme-border: #eadcc9;
  --theme-card: rgba(255, 253, 250, 0.94);
  --theme-card-hover: color-mix(in srgb, var(--theme-primary) 7%, #ffffff);
  --theme-text: #2f1b12;
  --theme-text-secondary: #7a5d49;
  --theme-success: #4f7d3b;
  --theme-warning: #b7791f;
  --theme-danger: #b9573f;
  --theme-input: rgba(255, 253, 250, 0.96);
  --theme-input-border: var(--theme-border);
  --theme-input-focus: color-mix(in srgb, var(--theme-primary) 72%, #ffffff);
  --theme-header: linear-gradient(135deg, var(--theme-sidebar-start), var(--theme-sidebar-end));
  --theme-header-text: var(--theme-sidebar-text);
  --theme-badge: color-mix(in srgb, var(--theme-primary) 14%, #ffffff);
  --theme-shadow: 0 18px 44px color-mix(in srgb, var(--theme-sidebar-end) 18%, transparent);
  --bg: var(--theme-background);
  --bg-soft: color-mix(in srgb, var(--theme-background) 82%, #ffffff);
  --surface: var(--theme-surface);
  --surface-strong: var(--theme-card);
  --sidebar: var(--theme-sidebar-start);
  --sidebar-strong: var(--theme-sidebar-end);
  --sidebar-accent: var(--theme-sidebar-accent);
  --line: var(--theme-border);
  --line-strong: color-mix(in srgb, var(--theme-primary) 42%, var(--theme-border));
  --text: var(--theme-text);
  --muted: var(--theme-text-secondary);
  --gold: var(--theme-primary);
  --gold-soft: #e4b075;
  --sage: #bfd3aa;
  --sage-text: #5a7a48;
  --danger-bg: #fbe4df;
  --danger-text: #b9573f;
  --shadow-lg: 0 28px 70px rgba(71, 38, 18, 0.13);
  --shadow-md: 0 18px 40px rgba(71, 38, 18, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at bottom left, rgba(183, 123, 62, 0.22) 0, rgba(183, 123, 62, 0) 28%),
    radial-gradient(circle at top right, rgba(205, 148, 86, 0.14) 0, rgba(205, 148, 86, 0) 26%),
    linear-gradient(135deg, #fcf9f5 0%, #f6efe6 45%, #efe4d4 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(circle at 12% 100%, rgba(181, 118, 57, 0.26), rgba(181, 118, 57, 0) 22%),
    radial-gradient(circle at 88% 100%, rgba(181, 118, 57, 0.24), rgba(181, 118, 57, 0) 18%);
  opacity: 0.9;
}

body::after {
  background:
    radial-gradient(circle at 0 12%, transparent 0 95px, rgba(194, 126, 61, 0.6) 96px 98px, transparent 99px),
    radial-gradient(circle at 100% 6%, transparent 0 120px, rgba(194, 126, 61, 0.4) 121px 123px, transparent 124px),
    radial-gradient(circle at 100% 92%, transparent 0 150px, rgba(194, 126, 61, 0.35) 151px 153px, transparent 154px);
  opacity: 0.55;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100vh;
  padding: 28px 22px;
  color: var(--theme-sidebar-text, #fff8f1) !important;
  background:
    linear-gradient(180deg, rgba(96, 58, 35, 0.98) 0%, rgba(56, 31, 18, 0.98) 100%);
  border-right: 1px solid rgba(255, 233, 212, 0.16);
  box-shadow: inset -1px 0 0 rgba(255, 244, 230, 0.06);
}

.brand-card {
  display: block;
  padding: 12px;
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255, 249, 240, 0.16), rgba(255, 244, 232, 0.08));
  border: 1px solid rgba(255, 227, 190, 0.2);
  box-shadow: var(--shadow-md);
}

.brand-image {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 18px;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.nav-link {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  text-align: left;
  color: color-mix(in srgb, var(--theme-sidebar-text, #fff8f1) 74%, transparent) !important;
  background: transparent;
  transition: background-color 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

.nav-link:hover {
  background: rgba(255, 243, 229, 0.08);
  color: var(--theme-sidebar-text, #fffaf5) !important;
  transform: translateX(2px);
}

.nav-link.active {
  color: var(--theme-sidebar-text, #fffaf5) !important;
  background: linear-gradient(135deg, rgba(197, 123, 45, 0.54), rgba(148, 81, 35, 0.65));
  box-shadow: inset 0 1px 0 rgba(255, 237, 214, 0.18);
}

.sidebar-footer {
  margin-top: auto;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 245, 233, 0.08);
  border: 1px solid rgba(255, 227, 190, 0.18);
}

.sidebar-label,
.sidebar-footer small {
  display: block;
  color: color-mix(in srgb, var(--theme-sidebar-text, #fff8f1) 66%, transparent) !important;
  font-size: 0.85rem;
}

.sidebar-footer strong {
  display: block;
  margin: 6px 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.45rem;
  color: var(--theme-sidebar-text, #fff9f4) !important;
}

.sidebar-logout-area {
  display: grid;
  padding: 0;
  background: transparent;
  border: 0;
}

.sidebar-logout-button {
  width: 100%;
  border: 1px solid rgba(255, 227, 190, 0.2);
  border-radius: 14px;
  padding: 13px 16px;
  background: rgba(255, 245, 233, 0.08);
  color: var(--theme-sidebar-text, #fff9f4) !important;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.sidebar-logout-button:hover {
  background: rgba(255, 245, 233, 0.14);
  border-color: rgba(255, 227, 190, 0.34);
  transform: translateY(-1px);
}

.main-shell {
  padding: 32px;
}

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

.eyebrow {
  display: inline-block;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
}

.topbar h2,
.panel h3,
.hero-panel h3,
.sector-column h4 {
  margin: 8px 0 0;
  color: #4d2c19;
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
}

.topbar h2 {
  font-size: clamp(2.1rem, 4vw, 3rem);
  line-height: 0.95;
}

.panel h3,
.hero-panel h3 {
  font-size: 1.9rem;
}

.subtitle,
.panel-copy,
.hero-panel p,
.journey-card p,
.rule-card p,
.stack-item span,
.client-card p,
.sector-column p,
.reservation-note,
.feedback-line,
.bar-row small {
  color: var(--muted);
  line-height: 1.6;
}

.topbar-actions,
.header-actions,
.hero-actions,
.form-actions,
.action-row,
.template-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search-field {
  min-width: 310px;
}

.search-field-date {
  min-width: 180px;
}

.auto-refresh-control {
  display: grid;
  align-content: center;
  min-height: 42px;
  padding: 6px 12px;
  border: 1px solid rgba(226, 205, 182, 0.9);
  border-radius: 12px;
  background: #fffaf4;
  color: #5a341d;
}

.auto-refresh-control span {
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.1;
}

.auto-refresh-control small {
  color: #8e735b;
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
}

.button,
.mini-action,
.link-button {
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.button:hover,
.mini-action:hover,
.link-button:hover {
  transform: translateY(-1px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 700;
}

.button-primary {
  color: #fffaf5;
  background: linear-gradient(135deg, #c67c31, #a85e1f);
  box-shadow: 0 12px 24px rgba(168, 94, 31, 0.2);
}

.button-secondary {
  color: #28411e;
  background: linear-gradient(135deg, #d8e8c6, #afc691);
}

.button-light,
.button-muted,
.mini-action {
  color: #5d3a22;
  background: rgba(255, 252, 247, 0.92);
  border: 1px solid var(--line);
}

.button-danger {
  color: var(--danger-text);
  background: var(--danger-bg);
}

.button-danger:hover {
  box-shadow: 0 10px 24px rgba(185, 87, 63, 0.14);
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 700;
  color: var(--muted);
}

.inline-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.button-primary:hover,
.button-secondary:hover {
  box-shadow: 0 14px 30px rgba(84, 43, 17, 0.18);
}

.as-link {
  width: fit-content;
}

.panel,
.hero-panel,
.stat-card,
.stack-item,
.summary-chip,
.journey-card,
.client-card,
.sector-column,
.rule-card,
.public-url-box,
.week-day,
.reservation-card {
  border: 1px solid rgba(226, 205, 182, 0.9);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
}

.hero-panel,
.panel,
.stat-card {
  border-radius: var(--radius-xl);
}

.panel,
.hero-panel {
  padding: 24px;
}

.hero-panel {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-header-wrap {
  flex-wrap: wrap;
}

.stats-grid,
.dashboard-grid,
.reports-grid,
.tables-grid,
.config-grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-grid,
.reports-grid,
.tables-grid,
.config-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reservation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  margin-top: 18px;
}

.client-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.journey-grid {
  display: grid;
  gap: 14px;
}

.sector-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 18px;
  align-items: start;
}

.stack-list,
.bars-list {
  display: grid;
  gap: 12px;
}

.stat-card {
  padding: 22px;
}

.stat-card span,
.summary-chip span,
.public-url-box span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.stat-card strong,
.summary-chip strong {
  display: block;
  margin-top: 10px;
  color: #4f2f1c;
  font-family: "Cormorant Garamond", serif;
  font-size: 2.35rem;
  line-height: 1;
}

.stat-card small {
  display: block;
  margin-top: 8px;
  color: #8f725c;
}

.stack-item {
  padding: 16px 18px;
  border-radius: 18px;
}

.stack-item strong {
  display: block;
  color: #4f2f1c;
}

.summary-chip {
  padding: 18px;
  border-radius: 20px;
}

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

.week-strip-wrap {
  overflow-x: auto;
  padding-bottom: 4px;
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(155px, 1fr));
  gap: 12px;
  min-width: 1120px;
}

.week-day {
  padding: 18px;
  border-radius: 18px;
  text-align: left;
}

.week-day small {
  color: var(--gold);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.week-day strong {
  display: block;
  margin: 10px 0 8px;
  color: #4f2f1c;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem;
}

.week-day span {
  color: var(--muted);
  font-size: 0.92rem;
}

.week-day.active {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, #fffaf4, #f7ecdf);
}

.week-day.today {
  outline: 2px solid rgba(191, 211, 170, 0.95);
  outline-offset: 1px;
}

.reservation-cards {
  display: grid;
  gap: 14px;
}

.reservation-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 220px;
  overflow: hidden;
  border-radius: 24px;
}

.reservation-time {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 18px 14px;
  background: linear-gradient(180deg, #f0e2d1, #faefe3);
  border-right: 1px solid var(--line);
}

.reservation-time strong {
  color: #6a3e1c;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  line-height: 1;
}

.reservation-time small {
  color: var(--muted);
}

.reservation-body {
  padding: 20px;
}

.reservation-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.reservation-topline strong {
  color: #4f2f1c;
  font-size: 1.05rem;
}

.reservation-meta,
.table-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  min-width: 0;
}

.reservation-meta span,
.table-meta span {
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  background: #f6ede2;
  color: #7b5b45;
  font-size: 0.83rem;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.reservation-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  border-left: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 251, 246, 0.84), rgba(246, 236, 224, 0.72));
}

.mini-action {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  font-weight: 700;
}

.mini-action.success {
  color: #39522d;
  background: #e6f0da;
  border-color: #cddfb7;
}

.mini-action.warning {
  color: #8f571d;
  background: #faecd6;
  border-color: #eed0a6;
}

.mini-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.status-badge,
.zone-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.status-badge.CONFIRMED {
  background: #edf4e4;
  color: var(--sage-text);
}

.status-badge.ARRIVED {
  background: #faebd7;
  color: #a16020;
}

.status-badge.NO_SHOW {
  background: #f9e0dc;
  color: #b55344;
}

.status-badge.CANCELED {
  background: #ece4dd;
  color: #8a7263;
}

.status-badge.WAITING,
.status-badge.STANDBY {
  background: #e7f3ee;
  color: #236650;
}

.status-badge.CALLED {
  background: #fff1d9;
  color: #935a14;
}

.status-badge.CUSTOMER_CONFIRMED {
  background: #e3f7df;
  color: #27632d;
}

.status-badge.SEATED {
  background: #e8eef8;
  color: #355882;
}

.status-badge.EXPIRED {
  background: #f5e7df;
  color: #8f5638;
}

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

.form-grid .span-2 {
  grid-column: 1 / -1;
}

.form-grid label,
.form-grid .form-field {
  display: grid;
  gap: 8px;
}

.form-grid span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.full-span {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 253, 250, 0.96);
  outline: none;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(228, 176, 117, 0.18);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.data-table thead th {
  padding: 14px 12px;
  color: var(--gold);
  text-align: left;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}

.data-table tbody td {
  padding: 16px 12px;
  border-bottom: 1px solid rgba(234, 220, 201, 0.85);
  vertical-align: top;
}

.link-button {
  padding: 0;
  color: var(--gold);
  background: transparent;
  font-weight: 800;
}

.feedback-line {
  min-height: 24px;
  margin-top: 12px;
}

.bar-row {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 251, 246, 0.76);
  border: 1px solid rgba(226, 205, 182, 0.8);
}

.bar-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #4f2f1c;
  font-weight: 700;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #ebdfd0;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #c9d9b0, #d68c3f);
}

.template-buttons {
  margin-bottom: 14px;
}

.sector-column,
.client-card,
.journey-card,
.rule-card,
.public-url-box {
  padding: 18px;
  min-width: 0;
  border-radius: 8px;
}

.sector-column h4 {
  max-width: 100%;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.table-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 16px;
  min-width: 0;
  border-radius: 8px;
  background: rgba(255, 251, 246, 0.72);
  border: 1px solid rgba(226, 205, 182, 0.7);
}

.table-item > div {
  min-width: 0;
}

.table-item .action-row {
  justify-content: flex-end;
}

.zone-badge.salao {
  color: #9b6224;
  background: #faecd8;
}

.zone-badge.kids {
  color: #62834f;
  background: #ecf4e3;
}

.zone-badge.varanda {
  color: #af6c33;
  background: #f5e5d9;
}

.zone-badge.vip {
  color: #6f4d36;
  background: #efe5db;
}

.auto-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
  gap: 20px;
}

.public-url-box code {
  display: block;
  margin-top: 8px;
  color: #9e5e20;
  font-size: 0.95rem;
  word-break: break-all;
}

.marketing-link-builder {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(226, 205, 182, 0.82);
  border-radius: 16px;
  background: #fffdf9;
}

.marketing-link-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.marketing-link-fields label {
  display: grid;
  gap: 6px;
}

.marketing-link-fields span {
  color: #7c604a;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.marketing-url-box code {
  white-space: normal;
  word-break: break-all;
}

@media (max-width: 760px) {
  .marketing-link-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1260px) {
  .stats-grid,
  .reservation-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .reports-grid,
  .tables-grid,
  .config-grid,
  .auto-layout,
  .client-grid {
    grid-template-columns: 1fr;
  }

  .reservation-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

@media (max-width: 820px) {
  .main-shell {
    padding: 18px;
  }

  .topbar,
  .hero-panel,
  .panel-header,
  .reservation-card {
    display: block;
  }

  .search-field {
    min-width: 0;
    width: 100%;
  }

.topbar-actions {
  width: 100%;
}

  .stats-grid,
  .reservation-summary,
  .sector-board,
  .client-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .reservation-card {
    grid-template-columns: 1fr;
  }

  .reservation-time {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .reservation-actions {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .sidebar-nav {
    grid-template-columns: 1fr;
  }

  .panel,
  .hero-panel,
  .stat-card {
    padding: 18px;
  }

  .button,
  .mini-action {
    width: 100%;
  }

  .auto-refresh-control {
    width: 100%;
  }

  .action-row,
  .topbar-actions,
  .header-actions,
  .hero-actions,
  .form-actions,
  .template-buttons {
    flex-direction: column;
  }

  .main-shell {
    padding: 14px;
  }
}

body {
  background: #ffffff;
}

body::before,
body::after {
  display: none;
}

.main-shell {
  background: #ffffff;
}

.panel,
.hero-panel,
.stat-card,
.stack-item,
.summary-chip,
.journey-card,
.client-card,
.sector-column,
.rule-card,
.public-url-box,
.week-day,
.reservation-card,
.bar-row,
.table-item {
  background: #ffffff;
  backdrop-filter: none;
}

.eyebrow {
  color: #9e6933;
}

.topbar h2,
.panel h3,
.hero-panel h3,
.sector-column h4,
.stat-card strong,
.summary-chip strong,
.reservation-time strong,
.stack-item strong,
.bar-head,
.client-card strong,
.table-item strong {
  color: #5a341d;
}

.subtitle,
.panel-copy,
.hero-panel p,
.journey-card p,
.rule-card p,
.stack-item span,
.client-card p,
.sector-column p,
.reservation-note,
.feedback-line,
.bar-row small,
.stat-card span,
.stat-card small,
.summary-chip span,
.public-url-box span,
.week-day span,
.week-day small {
  color: #7a5d49;
}

.reservation-topline strong,
.data-table td,
.reservation-body,
.reservation-meta span,
.table-meta span,
.dashboard-row,
.dashboard-row strong,
.dashboard-row span {
  color: #1f1f1f;
}

.dashboard-reservation-list {
  display: grid;
  gap: 8px;
}

.dashboard-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1.4fr) 100px 108px auto;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid #efe3d6;
  font-size: 0.98rem;
}

.dashboard-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.dashboard-row:first-child {
  padding-top: 4px;
}

.dashboard-time {
  font-weight: 700;
  color: #2b2b2b;
}

.dashboard-name {
  font-weight: 700;
}

.dashboard-table,
.dashboard-guests {
  color: #4d4d4d;
}

.dashboard-empty {
  padding: 18px;
  border: 1px solid #efe3d6;
  border-radius: 18px;
  color: #7a5d49;
}

.status-badge {
  border: 1px solid transparent;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}

.status-badge.CONFIRMED {
  background: #eef8e9;
  border-color: #cfe6bf;
  color: #477035;
}

.status-badge.ARRIVED {
  background: #fff4df;
  border-color: #f1d29d;
  color: #9a661f;
}

.status-badge.NO_SHOW,
.status-badge.CANCELED {
  background: #fde9e5;
  border-color: #efb7ab;
  color: #af4c3b;
}

.dashboard-table-map {
  position: relative;
  min-height: 390px;
  margin-top: 4px;
  border: 3px solid #cab9a5;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fdfaf6 100%);
  overflow: hidden;
}

.dashboard-table-map::before,
.dashboard-table-map::after {
  content: "";
  position: absolute;
  border: 3px solid #cab9a5;
  border-top: 0;
  border-radius: 0 0 18px 18px;
  width: 74px;
  height: 86px;
}

.dashboard-table-map::before {
  left: -3px;
  bottom: 22px;
}

.dashboard-table-map::after {
  left: -3px;
  top: 34px;
  height: 72px;
}

.map-divider {
  position: absolute;
  top: 0;
  width: 3px;
  height: 122px;
  background: #cab9a5;
}

.map-divider.divider-1 { left: 23%; }
.map-divider.divider-2 { left: 48%; }
.map-divider.divider-3 { left: 73%; }
.map-divider.map-divider-outside {
  left: 69%;
  top: 54px;
  height: calc(100% - 108px);
  background: #d9b894;
}

.map-door {
  position: absolute;
  width: 50px;
  height: 44px;
  border: 3px solid #cab9a5;
  border-top: 0;
  border-right: 0;
  border-radius: 0 0 0 40px;
  background: transparent;
}

.map-door.top-left {
  top: 12px;
  left: 0;
}

.map-door.top-middle {
  top: 58px;
  left: 25%;
}

.map-door.top-right {
  top: 58px;
  left: 75%;
}

.map-table {
  position: absolute;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 2px solid #d9ccbd;
  background: #efe6dc;
  color: #4a4036;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(85, 55, 33, 0.08);
}

.map-table::before,
.map-table::after,
.map-table .chair::before,
.map-table .chair::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 5px;
  background: currentColor;
  opacity: 0.22;
}

.map-table::before {
  top: -9px;
  left: 12px;
}

.map-table::after {
  top: -9px;
  right: 12px;
}

.map-table .chair::before {
  bottom: -9px;
  left: 12px;
}

.map-table .chair::after {
  bottom: -9px;
  right: 12px;
}

.map-table.available {
  background: #dceccf;
  border-color: #b8d5a0;
  color: #5a7d46;
}

.map-table.occupied {
  background: #ffd7a4;
  border-color: #f0b56d;
  color: #9d621d;
}

.map-table.reserved {
  background: #eee7de;
  border-color: #d4c6b6;
  color: #746353;
}

.map-table-kids {
  box-shadow: 0 0 0 3px rgba(201, 138, 69, 0.22);
}

.map-table-varanda {
  box-shadow: 0 0 0 3px rgba(129, 167, 203, 0.22);
}

.map-zone-label {
  position: absolute;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(201, 138, 69, 0.12);
  color: #8a5a26;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-zone-outside {
  background: rgba(115, 148, 181, 0.12);
  color: #5c7893;
}

.map-kids-label {
  position: absolute;
  left: 24px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(201, 138, 69, 0.14);
  color: #8a5a26;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-legend {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-top: 14px;
  color: #5a4a3e;
  font-size: 0.94rem;
}

.table-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 999px;
}

.legend-dot.available {
  background: #bfd9aa;
}

.legend-dot.occupied {
  background: #f0bc76;
}

.legend-dot.reserved {
  background: #ded6cc;
}

.dashboard-table-map {
  min-height: 0;
  padding: 18px;
  border: 2px solid #cab9a5;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f3ec 100%);
  overflow: hidden;
}

.dashboard-table-map::before,
.dashboard-table-map::after {
  content: none;
  display: none;
}

.map-divider,
.map-door,
.map-zone-label,
.map-kids-label {
  display: none !important;
}

.table-map-layout {
  display: grid;
  gap: 18px;
}

.table-map-layout-all {
  grid-template-columns: minmax(0, 1fr);
}

.table-map-expansion {
  display: grid;
  gap: 14px;
}

.table-map-annex-head,
.table-map-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.table-map-annex-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0 0 2px;
}

.table-map-annex-head strong {
  display: block;
  padding: 10px 12px;
  border: 1px solid #e8dccf;
  border-radius: 8px;
  background: #fffdf9;
  color: #5a341d;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-map-row {
  position: relative;
  padding-top: 32px;
}

.table-map-row-label {
  position: absolute;
  top: 0;
  left: 0;
  color: #8b725c;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-map-row-extra {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.table-map-row-complementary {
  grid-template-columns: 1fr;
}

.table-map-complementary-band {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e8dccf;
  border-radius: 8px;
  background: #fffaf3;
}

.table-map-complementary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #8b725c;
}

.table-map-complementary-head strong {
  color: #5a341d;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-map-complementary-head span {
  font-size: 0.82rem;
  font-weight: 700;
}

.table-map-complementary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.table-map-layout-single {
  grid-template-columns: minmax(0, 1fr);
}

.map-sector-shell {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid #e5d7c7;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.map-sector-shell-indoor {
  grid-area: indoor;
  background: linear-gradient(180deg, #fffefa 0%, #f7efe6 100%);
}

.map-sector-shell-kids {
  grid-area: kids;
  background: linear-gradient(180deg, #fffaf3 0%, #fff3df 100%);
}

.map-sector-shell-varanda {
  grid-area: varanda;
  background: linear-gradient(180deg, #fbfdff 0%, #edf4fb 100%);
  align-self: stretch;
}

.map-sector-shell-header,
.map-zone-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.map-sector-shell-header {
  margin-bottom: 16px;
}

.map-sector-shell-header p,
.map-zone-card-header p {
  margin: 6px 0 0;
  color: #7b6857;
}

.map-sector-shell-header p {
  max-width: 38ch;
  font-size: 0.92rem;
}

.map-zone-card-header p {
  font-size: 0.86rem;
}

.map-shell-chip,
.map-zone-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-shell-chip {
  background: rgba(201, 138, 69, 0.14);
  color: #8a5a26;
}

.map-shell-chip-kids {
  background: rgba(212, 168, 92, 0.18);
  color: #8c6123;
}

.map-shell-chip-varanda {
  background: rgba(115, 148, 181, 0.16);
  color: #5c7893;
}

.map-shell-total,
.map-zone-card-header strong {
  color: #8b7158;
  font-size: 0.84rem;
  white-space: nowrap;
}

.map-floor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.map-zone-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #e8dccf;
  background: #fffdf9;
}

.map-zone-card-indoor {
  background: #fffdf9;
}

.map-zone-card-kids {
  background: #fff8ee;
  border-color: #e8d4b7;
}

.map-zone-card-varanda {
  background: #f5f9fd;
  border-color: #d8e3ee;
}

.map-zone-card-full {
  min-height: 220px;
}

.map-zone-pill {
  background: #f6ede2;
  color: #6d4220;
}

.map-zone-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.map-zone-status span {
  min-width: 0;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 0.73rem;
  font-weight: 800;
  text-align: center;
  white-space: normal;
}

.map-zone-status .available {
  background: #edf5e7;
  color: #547244;
}

.map-zone-status .reserved {
  background: #fff1d9;
  color: #9a631d;
}

.map-zone-status .occupied {
  background: #f8ded7;
  color: #9b4f3b;
}

.map-zone-card-kids .map-zone-pill {
  background: #f6e7cb;
  color: #8c6123;
}

.map-zone-card-varanda .map-zone-pill {
  background: #e6f0f8;
  color: #5c7893;
}

.map-table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 14px;
  align-content: start;
}

.map-table-grid-dense {
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
}

.dashboard-table-map-compact {
  max-height: 360px;
  overflow: auto;
  padding: 14px;
}

.dashboard-table-map-compact .compact-table-map {
  display: grid;
  gap: 10px;
}

.compact-table-zone {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e8dccf;
  border-radius: 14px;
  background: #fffdf9;
}

.compact-table-zone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.compact-table-zone-head strong {
  color: #5a341d;
  font-size: 0.88rem;
}

.compact-table-zone-head span {
  color: #8b725c;
  font-size: 0.78rem;
  font-weight: 800;
}

.compact-table-dots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  gap: 7px;
}

.compact-table-dot {
  display: grid;
  place-items: center;
  min-width: 0;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid #d9ccbd;
  border-radius: 9px;
  color: #4a4036;
  background: #efe6dc;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: default;
}

.compact-table-dot.available {
  background: #edf5e7;
  border-color: #c8d8b8;
  color: #547244;
}

.compact-table-dot.reserved {
  background: #fff1d9;
  border-color: #e4bd82;
  color: #9a631d;
}

.compact-table-dot.occupied {
  background: #f8ded7;
  border-color: #dfad9f;
  color: #9b4f3b;
}

.map-zone-empty {
  display: grid;
  place-items: center;
  min-height: 118px;
  padding: 14px;
  text-align: center;
  border: 1px dashed #d9cbb9;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  color: #8b725c;
  font-size: 0.9rem;
}

.map-table {
  position: relative;
  justify-self: center;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  width: 80px;
  min-height: 74px;
  padding: 10px 8px;
  border-radius: 18px;
  border: 2px solid #d9ccbd;
  background: #efe6dc;
  color: #4a4036;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 10px 20px rgba(85, 55, 33, 0.08);
}

.map-table::before,
.map-table::after,
.map-table .chair::before,
.map-table .chair::after {
  width: 12px;
  height: 12px;
  border-radius: 5px;
}

.map-table::before {
  top: -8px;
  left: 13px;
}

.map-table::after {
  top: -8px;
  right: 13px;
}

.map-table .chair::before {
  bottom: -8px;
  left: 13px;
}

.map-table .chair::after {
  bottom: -8px;
  right: 13px;
}

.map-table-number {
  display: block;
  font-size: 1.08rem;
  line-height: 1;
}

.map-table-capacity {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  opacity: 0.74;
}

.table-legend {
  flex-wrap: wrap;
  row-gap: 10px;
}

@media (max-width: 980px) {
  .dashboard-row {
    grid-template-columns: 72px 1fr;
  }

  .dashboard-table,
  .dashboard-guests,
  .dashboard-row .status-badge {
    grid-column: 2;
  }

  .dashboard-table-map {
    padding: 14px;
  }

  .map-floor-grid {
    grid-template-columns: 1fr;
  }

  .map-sector-shell,
  .map-zone-card {
    padding: 14px;
  }

  .map-table-grid {
    grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
    gap: 12px;
  }

  .map-table {
    width: 72px;
    min-height: 68px;
  }
}

@media (max-width: 1180px) {
  .table-map-layout-all {
    grid-template-columns: 1fr;
  }

  .table-map-annex-head,
  .table-map-row {
    grid-template-columns: 1fr;
  }

  .table-map-annex-head {
    display: none;
  }

  .table-map-complementary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .map-sector-shell-header,
  .map-zone-card-header {
    flex-direction: column;
  }

  .map-shell-total,
  .map-zone-card-header strong {
    white-space: normal;
  }
}

body,
.app-shell,
.main-shell {
  background: #ffffff !important;
}

.sidebar {
  background: linear-gradient(180deg, #5b341d 0%, #3a2012 100%) !important;
  color: #ffffff !important;
}

.sidebar * {
  color: inherit;
}

.nav-link,
.sidebar-label,
.sidebar-footer small,
.sidebar-footer strong,
.brand-card h1,
.brand-card p {
  color: #ffffff !important;
}

.nav-link.active {
  background: linear-gradient(135deg, #8d552a 0%, #6a3d1f 100%) !important;
  color: #ffffff !important;
}

.brand-card,
.sidebar-footer:not(.sidebar-logout-area) {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

.brand-image {
  background: transparent !important;
}

.main-shell,
.panel,
.hero-panel,
.stat-card,
.summary-chip,
.stack-item,
.journey-card,
.client-card,
.sector-column,
.rule-card,
.public-url-box,
.week-day,
.reservation-card,
.bar-row,
.table-item {
  background: #ffffff !important;
}

.topbar h2,
.panel h3,
.hero-panel h3,
.sector-column h4,
.stat-card strong,
.summary-chip strong,
.reservation-time strong,
.stack-item strong,
.bar-head,
.client-card strong,
.table-item strong,
.data-table th,
.data-table strong {
  color: #5a341d !important;
}

.data-table td,
.reservation-body,
.reservation-topline strong,
.reservation-meta span,
.table-meta span,
.dashboard-row,
.dashboard-row strong,
.dashboard-row span,
.client-card p,
.stack-item span {
  color: #111111 !important;
}

.status-badge.CONFIRMED {
  background: #eef8e9 !important;
  border-color: #c7dfb6 !important;
  color: #3f6d2a !important;
}

.status-badge.ARRIVED {
  background: #fff2dc !important;
  border-color: #edcf98 !important;
  color: #9a661f !important;
}

.status-badge.NO_SHOW,
.status-badge.CANCELED {
  background: #fde9e5 !important;
  border-color: #efb7ab !important;
  color: #af4c3b !important;
}

#restaurant-config-form input:disabled,
#restaurant-config-form select:disabled,
#restaurant-config-form textarea:disabled {
  background: #f5efe8 !important;
  color: #8a7667 !important;
  cursor: not-allowed;
  opacity: 1;
}

#save-config-button:disabled,
#edit-config-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

#client-edit-form input:disabled {
  background: #f5efe8 !important;
  color: #8a7667 !important;
  cursor: not-allowed;
  opacity: 1;
}

#client-save-button:disabled,
#client-edit-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.hidden {
  display: none !important;
}

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

.reservation-composer-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 40;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(196, 167, 136, 0.72);
  box-shadow:
    0 40px 90px rgba(62, 34, 18, 0.22),
    0 0 0 100vmax rgba(37, 25, 17, 0.24);
}

.reservation-form-modern {
  margin-top: 8px;
}

.reservation-form-highlight {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8f0e6 0%, #fffaf4 100%);
  border: 1px solid #eadbc9;
}

.reservation-form-highlight strong {
  color: #6d4220;
}

.reservation-filter-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 8px 0 10px;
}

.reservation-filter-panel .summary-chip strong {
  font-size: 1.45rem;
}

.reservation-filter-panel .data-table {
  min-width: 880px;
}

.reservation-filter-panel .data-table tbody tr:hover {
  background: rgba(246, 237, 226, 0.55);
}

.reservation-filter-panel .data-table tbody td small {
  display: inline-block;
  margin-top: 4px;
  color: #846b57;
}

.client-management-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 18px;
}

.client-list-stack {
  gap: 14px;
}

.client-list-card {
  align-items: center;
  border-radius: 22px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.client-list-card:hover,
.client-list-card.is-selected {
  border-color: #d8b48d;
  box-shadow: 0 18px 34px rgba(84, 43, 17, 0.08);
  transform: translateY(-1px);
}

.client-list-main {
  display: grid;
  gap: 8px;
}

.client-edit-panel {
  position: sticky;
  top: 24px;
  align-self: start;
}

.client-edit-spotlight {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffaf4 0%, #f8f0e6 100%);
  border: 1px solid #eadbc9;
}

.client-edit-spotlight strong {
  color: #6d4220;
}

.client-edit-spotlight span {
  color: #7b6857;
}

.config-schedule-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(248, 240, 230, 0.7);
  border: 1px solid #eadbc9;
}

.config-section-head strong {
  color: #6d4220;
  font-size: 1rem;
}

.config-section-head p {
  margin-top: 4px;
  color: #7b6857;
  font-size: 0.82rem;
}

.weekly-hours-grid {
  display: grid;
  gap: 8px;
}

.weekly-hour-row {
  display: grid;
  grid-template-columns: minmax(96px, 0.82fr) 104px repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(226, 205, 182, 0.8);
}

.weekly-hour-row.is-closed {
  opacity: 0.78;
}

.weekly-hour-day {
  display: grid;
  gap: 2px;
}

.weekly-hour-day strong {
  color: #5a341d;
  font-size: 0.92rem;
  line-height: 1.1;
}

.weekly-hour-day span {
  color: #7b6857;
  font-size: 0.76rem;
  line-height: 1.1;
}

.weekly-hour-toggle {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  font-size: 0.8rem;
}

.weekly-hour-toggle input {
  width: 16px;
  min-height: 16px;
  padding: 0;
}

.config-schedule-card label span {
  font-size: 0.74rem;
}

.config-schedule-card input[type="time"] {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 0.84rem;
}

@media (max-width: 980px) {
  .client-management-grid,
  .reservation-filter-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .reservation-composer-panel {
    width: calc(100vw - 18px);
    max-height: calc(100vh - 18px);
  }

  .weekly-hour-row {
    grid-template-columns: 1fr;
  }
}

body.reservation-composer-open {
  overflow: hidden;
}

.reservation-workspace {
  gap: 18px;
}

.view.reservation-workspace.active {
  display: grid;
}

.reservation-workspace .panel {
  border-radius: 26px;
  border: 1px solid rgba(228, 214, 198, 0.88);
  box-shadow: 0 16px 36px rgba(82, 48, 22, 0.06);
}

.reservation-workspace .panel-copy {
  max-width: 56ch;
}

.reservation-workspace > .panel:first-child {
  background: linear-gradient(180deg, #fffdfa 0%, #fff8f1 100%);
}

.reservation-workspace .reservation-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.reservation-workspace .summary-chip {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(228, 214, 198, 0.88);
  background: linear-gradient(180deg, #ffffff 0%, #fff8f1 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.reservation-workspace .summary-chip span {
  color: #8e735b;
}

.reservation-grid-modern {
  gap: 18px;
}

.reservation-day-panel {
  background: linear-gradient(180deg, #ffffff 0%, #fffaf4 100%);
}

.reservation-workspace .reservation-cards {
  display: grid;
  gap: 14px;
}

.reservation-workspace .reservation-card {
  grid-template-columns: 128px minmax(0, 1fr) minmax(196px, 220px);
  gap: 0;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(226, 209, 189, 0.92);
  background: linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
  box-shadow: 0 12px 28px rgba(90, 54, 27, 0.05);
}

.reservation-workspace .reservation-time {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 100%;
  padding: 20px 18px;
  border-right: 1px solid rgba(228, 214, 198, 0.9);
  background: linear-gradient(180deg, #fff6ec 0%, #fffdf9 100%);
}

.reservation-workspace .reservation-time strong {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.reservation-workspace .reservation-time small {
  color: #9a8068;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.reservation-workspace .reservation-body {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
}

.reservation-workspace .reservation-topline {
  align-items: start;
}

.reservation-workspace .reservation-topline strong {
  font-size: 1.08rem;
  color: #3b2415;
}

.reservation-workspace .reservation-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reservation-workspace .reservation-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f8efe5;
  color: #6a4b34;
  font-size: 0.84rem;
}

.reservation-workspace .reservation-note {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff8f1;
  border: 1px dashed rgba(215, 182, 148, 0.82);
  color: #7a624e;
  line-height: 1.5;
}

.reservation-workspace .reservation-actions {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 18px;
  border-left: 1px solid rgba(228, 214, 198, 0.9);
  background: #fffdf9;
}

.reservation-workspace .reservation-actions .action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.reservation-workspace .mini-action {
  width: 100%;
  min-height: 42px;
  border-radius: 14px;
}

.reservation-composer-panel {
  width: min(860px, calc(100vw - 32px));
  border-radius: 28px;
  background: linear-gradient(180deg, #fffdfa 0%, #fff8f1 100%);
  backdrop-filter: blur(10px);
  box-shadow:
    0 34px 84px rgba(62, 34, 18, 0.18),
    0 0 0 100vmax rgba(37, 25, 17, 0.2);
}

.reservation-composer-panel .panel-header {
  align-items: start;
  gap: 18px;
}

.reservation-composer-panel .reservation-form-modern {
  gap: 18px;
}

.reservation-composer-panel .form-actions {
  justify-content: flex-end;
}

.reservation-list-panel {
  background: linear-gradient(180deg, #ffffff 0%, #fffaf4 100%);
}

.reservation-list-panel .panel-header {
  align-items: start;
}

.reservation-list-panel .header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px;
  border-radius: 20px;
  background: #fffdf9;
  border: 1px solid rgba(228, 214, 198, 0.88);
}

.reservation-list-panel .header-actions input {
  min-width: 170px;
  min-height: 46px;
}

.reservation-list-panel .table-wrap {
  border-radius: 22px;
  border: 1px solid rgba(228, 214, 198, 0.88);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.reservation-list-panel .data-table {
  min-width: 980px;
}

.reservation-list-panel .data-table thead th {
  padding-top: 18px;
  padding-bottom: 18px;
  background: #fffaf4;
  color: #8f724f;
  letter-spacing: 0.1em;
}

.reservation-list-panel .data-table tbody td {
  padding-top: 18px;
  padding-bottom: 18px;
}

.reservation-list-panel .data-table tbody tr:hover {
  background: #fff9f2;
}

.reservation-list-panel .data-table tbody td small {
  color: #8f7560;
}

@media (max-width: 1180px) {
  .reservation-workspace .reservation-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reservation-workspace .reservation-card {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .reservation-workspace .reservation-actions {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid rgba(228, 214, 198, 0.9);
  }
}

@media (max-width: 780px) {
  .reservation-list-panel .header-actions {
    display: grid;
  }

  .reservation-list-panel .header-actions input {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .reservation-workspace .reservation-summary {
    grid-template-columns: 1fr;
  }

  .reservation-workspace .reservation-card {
    grid-template-columns: 1fr;
  }

  .reservation-workspace .reservation-time {
    border-right: 0;
    border-bottom: 1px solid rgba(228, 214, 198, 0.9);
  }

  .reservation-workspace .reservation-actions .action-row {
    grid-template-columns: 1fr;
  }
}

.reservation-mode-toolbar {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.reservation-view-toggle {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 16px;
  background: #fffdf9;
  border: 1px solid rgba(228, 214, 198, 0.88);
}

.mode-toggle {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 12px;
  background: transparent;
  color: #8e735b;
  font-weight: 800;
}

.mode-toggle.active {
  background: linear-gradient(135deg, #c37a2c, #8b5227);
  color: #fff8f1;
  box-shadow: 0 12px 22px rgba(139, 82, 39, 0.18);
}

.reservation-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #8e735b;
  font-size: 0.86rem;
}

.reservation-calendar-panel {
  background: linear-gradient(180deg, #ffffff 0%, #fffaf4 100%);
  padding: 18px;
}

.reservation-week-calendar {
  overflow: auto;
  border: 1px solid rgba(228, 214, 198, 0.88);
  border-radius: 24px;
  background: #fffdf9;
}

.reservation-calendar-grid {
  min-width: 860px;
  display: grid;
  grid-template-columns: 76px repeat(7, minmax(112px, 1fr));
}

.reservation-calendar-head,
.reservation-calendar-time,
.reservation-calendar-cell {
  border-right: 1px solid rgba(234, 220, 201, 0.9);
  border-bottom: 1px solid rgba(234, 220, 201, 0.9);
}

.reservation-calendar-head {
  min-height: 66px;
  padding: 12px 10px;
  display: grid;
  align-content: center;
  gap: 4px;
  background: #fffaf4;
  color: #6a4b34;
}

.reservation-calendar-head strong {
  font-size: 0.92rem;
  color: #4f2f1c;
}

.reservation-calendar-head.is-selected {
  background: linear-gradient(180deg, #fff2de 0%, #fffaf4 100%);
}

.reservation-calendar-time {
  min-height: 78px;
  padding: 10px;
  background: #fffdf9;
  color: #8e735b;
  font-weight: 700;
  font-size: 0.85rem;
}

.reservation-calendar-cell {
  min-height: 78px;
  padding: 8px;
  background: #ffffff;
  display: grid;
  gap: 6px;
  align-content: start;
}

.reservation-calendar-event {
  width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #fff6ec;
  color: #4f2f1c;
  text-align: left;
  box-shadow: 0 10px 18px rgba(82, 48, 22, 0.05);
}

.reservation-calendar-event strong {
  display: block;
  font-size: 0.82rem;
}

.reservation-calendar-event small {
  display: block;
  margin-top: 3px;
  color: #8e735b;
  font-size: 0.74rem;
}

.reservation-calendar-event.CONFIRMED {
  border-color: rgba(191, 211, 170, 0.9);
  background: #f5faef;
}

.reservation-calendar-event.ARRIVED {
  border-color: rgba(217, 176, 110, 0.86);
  background: #fff3e3;
}

.reservation-calendar-event.NO_SHOW,
.reservation-calendar-event.CANCELED {
  border-color: rgba(198, 122, 87, 0.78);
  background: #fff0e8;
}

.reservation-row-clickable,
.reservation-card.is-clickable,
.map-table.is-editable {
  cursor: pointer;
}

.reservation-row-clickable:hover td {
  background: #fff9f2;
}

.reception-workspace {
  display: none;
  gap: 12px;
}

.reception-workspace.active,
[data-panel="recepcao"].active {
  display: grid !important;
}

.reception-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.reception-top h3 {
  margin: 0;
  color: #4f2f1c;
  font-size: 1.5rem;
}

.reception-top p {
  margin: 4px 0 0;
  color: #7a5d49;
}

.reception-sticky-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  gap: 10px;
  padding: 10px 0 12px;
  background: #ffffff;
}

.reception-search-field {
  display: block;
}

.reception-search-field input {
  width: 100%;
  min-height: 64px;
  border-radius: 8px;
  font-size: 1.04rem;
  font-weight: 700;
}

.reception-kpis,
.reception-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.reception-kpis span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #e8dccf;
  border-radius: 8px;
  background: #fffdf9;
  color: #7a5d49;
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.reception-kpis strong {
  color: #5a341d;
  font-size: 1rem;
}

.reception-tabs button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #e8dccf;
  border-radius: 8px;
  background: #fffdf9;
  color: #7a5d49;
  font-weight: 900;
  white-space: nowrap;
}

.reception-tabs button.active {
  border-color: #8b5227;
  background: #fff1df;
  color: #5a341d;
}

.reception-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.44fr);
  gap: 14px;
  align-items: start;
}

.recepcao-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reception-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.reception-pagination button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #e8dccf;
  border-radius: 8px;
  background: #fffdf9;
  color: #5a341d;
  font-weight: 900;
}

.reception-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.reception-pagination span {
  color: #7a5d49;
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
}

.recepcao-item {
  display: grid;
  gap: 7px;
  min-height: 84px;
  max-height: 100px;
  padding: 12px;
  border: 1px solid #e8dccf;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.recepcao-item:hover,
.recepcao-item.is-selected {
  transform: translateY(-1px);
  border-color: #d3b895;
  box-shadow: 0 10px 22px rgba(90, 54, 27, 0.07);
}

.recepcao-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.recepcao-item-header strong {
  min-width: 0;
  color: #4f2f1c;
  font-size: 0.98rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recepcao-item-meta {
  display: flex;
  gap: 12px;
  min-width: 0;
  color: #7a5d49;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
}

.recepcao-item-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.recepcao-item-action {
  margin-top: 1px;
}

.recepcao-primary-action {
  width: 100%;
  min-height: 34px;
  border-radius: 8px;
  background: #8b5227;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 900;
}

.reception-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.reception-status.is-confirmed {
  background: #edf5e7;
  color: #547244;
}

.reception-status.is-checked-in {
  background: #e6f0f8;
  color: #376b95;
}

.reception-status.is-occupied {
  background: #e8edf0;
  color: #384f5b;
}

.reception-status.is-waiting {
  background: #fff1d9;
  color: #9a631d;
}

.reception-status.is-no-show {
  background: #f8ded7;
  color: #9b4f3b;
}

.reception-status.is-canceled {
  background: #ece8e2;
  color: #756b61;
}

.reception-detail-panel {
  position: sticky;
  top: 130px;
}

.reception-detail-panel [data-reception-close-sheet] {
  display: none;
}

.reception-detail,
.reception-detail-empty,
.reception-empty {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #e8dccf;
  border-radius: 8px;
  background: #fffdf9;
}

.reception-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.reception-detail-head h3 {
  margin: 8px 0 0;
  color: #4f2f1c;
}

.reception-detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.reception-detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #efe4d8;
}

.reception-detail-list dt {
  color: #8b725c;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reception-detail-list dd {
  margin: 0;
  color: #4f2f1c;
  text-align: right;
  font-weight: 800;
}

.reception-detail-action .button,
.reception-detail-action .recepcao-primary-action {
  width: 100%;
  min-height: 44px;
}

.reception-bottom-sheet[hidden] {
  display: none;
}

.reception-bottom-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: end;
}

.reception-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(37, 25, 17, 0.42);
}

.reception-sheet-card {
  position: relative;
  z-index: 1;
  max-height: min(86dvh, 620px);
  overflow: auto;
  padding: 12px;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  background: #ffffff;
}

.reception-detail-handle {
  display: none;
  justify-self: center;
  width: 46px;
  height: 5px;
  border-radius: 999px;
  background: #d8cbbb;
}

@media (max-width: 1279px) {
  .reception-shell {
    grid-template-columns: 1fr;
  }

  .reception-detail-panel {
    display: none;
  }
}

@media (max-width: 768px) {
  body.reception-sheet-open {
    overflow: hidden;
  }

  body[data-active-view="recepcao"] {
    overflow-y: auto;
    background: #ffffff;
  }

  body[data-active-view="recepcao"] .app-shell {
    display: block;
    min-height: auto;
  }

  body[data-active-view="recepcao"] .sidebar,
  body[data-active-view="recepcao"] .sidebar-nav,
  body[data-active-view="recepcao"] .sidebar-footer,
  body[data-active-view="recepcao"] .topbar,
  body[data-active-view="recepcao"] .reception-top,
  body[data-active-view="recepcao"] .reception-kpis,
  body[data-active-view="recepcao"] .reception-tabs {
    display: none !important;
  }

  body[data-active-view="recepcao"] .main-shell {
    min-height: auto;
    padding: 10px;
    overflow: visible;
  }

  .sidebar-nav .nav-link:not([data-view="recepcao"]):not([data-view="mesas"]):not([data-view="reservas"]),
  .nav-group-secondary {
    display: none !important;
  }

  .reception-workspace {
    gap: 10px;
  }

  .reception-top p {
    display: none;
  }

  .reception-top h3 {
    font-size: 1.28rem;
  }

  .reception-sticky-bar {
    top: 0;
    margin: 0 -10px;
    padding: 8px 10px 10px;
    border-bottom: 1px solid #efe4d8;
  }

  .reception-search-field input {
    min-height: 64px;
    font-size: 1rem;
  }

  .reception-kpis {
    max-height: 44px;
    gap: 8px;
  }

  .reception-kpis span {
    min-height: 36px;
    padding: 0 10px;
  }

  .reception-tabs {
    overflow-x: auto;
    white-space: nowrap;
  }

  .reception-tabs button {
    min-height: 38px;
    padding: 0 12px;
  }

  .reception-pagination {
    position: sticky;
    bottom: 0;
    z-index: 15;
    margin: 8px -10px 0;
    padding: 10px;
    background: #ffffff;
    border-top: 1px solid #efe4d8;
  }

  .reception-pagination button {
    width: auto;
    min-width: 96px;
  }

  .recepcao-item {
    min-height: auto;
    max-height: 100px;
    padding: 12px;
  }

  .recepcao-item:hover,
  .recepcao-item.is-selected {
    transform: none;
  }

  .reception-detail-handle {
    display: block;
  }
}

.reservation-card.is-clickable:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(90, 54, 27, 0.08);
}

#open-reservation-composer {
  display: none !important;
}

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

.table-stage-panel .header-actions {
  gap: 10px;
}

#table-area-filter {
  min-height: 42px;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.table-composer-entry {
  display: none;
}

.table-composer-panel {
  display: block;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 45;
  width: min(520px, calc(100vw - 24px));
  height: 100dvh;
  max-height: 100dvh;
  overflow: auto;
  transform: none;
  border-radius: 0;
  border-top-left-radius: 18px;
  border-bottom-left-radius: 18px;
  border: 1px solid rgba(196, 167, 136, 0.72);
  border-right: 0;
  background: linear-gradient(180deg, #fffdfa 0%, #fff8f1 100%);
  box-shadow:
    -18px 0 54px rgba(62, 34, 18, 0.16),
    0 0 0 100vmax rgba(37, 25, 17, 0.18);
}

.table-composer-panel .panel-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: 14px;
  background: linear-gradient(180deg, #fffdfa 0%, rgba(255, 253, 250, 0.94) 100%);
  border-bottom: 1px solid rgba(226, 205, 182, 0.78);
}

body.table-composer-open {
  overflow: hidden;
}

.table-stage-panel .dashboard-table-map {
  border-radius: 28px;
}

.table-stage-panel .table-legend {
  margin-top: 14px;
}

.table-edit-cue {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #8a5a26;
  background: #f7ecdf;
  font-size: 0.78rem;
  font-weight: 800;
}

.sector-board {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 16px;
  align-items: start;
}

.sector-mini-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(228, 214, 198, 0.88);
  background: linear-gradient(180deg, #fffdf9 0%, #f9f2ea 100%);
  display: grid;
  gap: 6px;
}

.sector-mini-card strong {
  color: #4f2f1c;
}

.sector-mini-card span {
  color: #8e735b;
  font-size: 0.86rem;
}

.map-table.is-editable {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.map-table.is-editable:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 14px 26px rgba(82, 48, 22, 0.1);
  border-color: rgba(139, 82, 39, 0.24);
}

.table-item-selectable:focus-visible,
.map-table.is-editable:focus-visible {
  outline: 3px solid rgba(195, 122, 44, 0.32);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .table-composer-panel {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: min(86dvh, 760px);
    max-height: 86dvh;
    border-radius: 18px 18px 0 0;
    border-right: 1px solid rgba(196, 167, 136, 0.72);
    border-bottom: 0;
    box-shadow:
      0 -18px 48px rgba(62, 34, 18, 0.18),
      0 0 0 100vmax rgba(37, 25, 17, 0.18);
  }

  .table-composer-panel .form-actions {
    position: sticky;
    bottom: 0;
    padding-top: 12px;
    background: linear-gradient(0deg, #fff8f1 0%, rgba(255, 248, 241, 0.92) 100%);
    border-top: 1px solid rgba(226, 205, 182, 0.78);
  }
}

@media (max-width: 900px) {
  .reservation-mode-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Compact density overrides for the admin workspace */
.main-shell {
  padding: 22px 24px 24px;
}

.topbar {
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.topbar h2 {
  margin-top: 4px;
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  line-height: 1;
}

.panel h3,
.hero-panel h3 {
  margin-top: 4px;
  font-size: 1.5rem;
}

.eyebrow {
  font-size: 0.64rem;
  letter-spacing: 0.16em;
}

.subtitle,
.panel-copy,
.hero-panel p {
  margin: 4px 0 0;
  font-size: 0.93rem;
  line-height: 1.45;
}

.panel,
.hero-panel {
  padding: 18px 20px;
  border-radius: 24px;
}

.hero-panel {
  gap: 14px;
}

.panel-header {
  gap: 10px;
  margin-bottom: 12px;
}

.topbar-actions,
.header-actions,
.hero-actions,
.form-actions,
.action-row,
.template-buttons {
  gap: 8px;
}

.button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 0.92rem;
}

.search-field {
  min-width: 230px;
}

.search-field-date {
  min-width: 150px;
}

input,
select,
textarea {
  min-height: 40px;
  padding: 9px 12px;
}

.stats-grid,
.dashboard-grid,
.reports-grid,
.tables-grid,
.config-grid,
.reservation-grid,
.client-grid {
  gap: 14px;
  margin-top: 14px;
}

.stat-card {
  padding: 18px;
}

.week-strip-wrap {
  margin-top: 2px;
}

.week-day {
  padding: 12px 10px;
  border-radius: 18px;
}

.reservation-summary {
  gap: 10px;
  margin-top: 12px;
}

.summary-chip {
  padding: 14px 16px;
}

.reservation-mode-toolbar {
  margin-top: 12px;
  gap: 10px;
}

.reservation-view-toggle {
  gap: 6px;
  padding: 4px;
}

.mode-toggle {
  min-height: 34px;
  padding: 0 14px;
  font-size: 0.87rem;
}

.reservation-calendar-panel {
  padding: 14px 16px;
}

.reservation-calendar-grid {
  min-width: 760px;
  grid-template-columns: 64px repeat(7, minmax(98px, 1fr));
}

.reservation-calendar-head {
  min-height: 54px;
  padding: 8px 8px 9px;
}

.reservation-calendar-time,
.reservation-calendar-cell {
  min-height: 64px;
}

.reservation-calendar-time {
  padding: 8px;
}

.reservation-calendar-cell {
  padding: 6px;
  gap: 4px;
}

.reservation-calendar-event {
  padding: 6px 8px;
  border-radius: 10px;
}

.reservation-calendar-event strong {
  font-size: 0.78rem;
}

.reservation-calendar-event small {
  margin-top: 2px;
  font-size: 0.7rem;
}

.reservation-filter-panel .header-actions input,
.reservation-filter-panel .header-actions select,
.table-stage-panel .header-actions select,
.table-stage-panel .header-actions button,
.reservation-day-panel .header-actions input,
.reservation-day-panel .header-actions select {
  min-height: 38px;
}

@media (max-width: 1180px) {
  .main-shell {
    padding: 18px;
  }

  .topbar {
    margin-bottom: 14px;
  }

  .topbar h2 {
    font-size: 1.9rem;
  }

  .panel,
  .hero-panel {
    padding: 16px;
  }
}

/* Final compact operational density */
.topbar {
  gap: 12px;
  margin-bottom: 12px;
}

.topbar h2 {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
}

.subtitle,
.panel-copy,
.hero-panel p,
.stat-card small,
.summary-chip span {
  font-size: 0.86rem;
  line-height: 1.35;
}

.panel,
.hero-panel,
.stat-card {
  padding: 14px 16px;
  border-radius: 20px;
}

.panel h3,
.hero-panel h3 {
  font-size: 1.28rem;
}

.stats-grid,
.dashboard-grid,
.reports-grid,
.tables-grid,
.config-grid,
.reservation-grid,
.client-grid,
.sector-board {
  gap: 10px;
  margin-top: 10px;
}

.stat-card strong,
.summary-chip strong {
  font-size: 1.2rem;
}

.stack-item,
.sector-mini-card,
.client-list-card,
.reservation-workspace .reservation-note {
  padding: 12px 14px;
}

.reservation-workspace .reservation-card {
  grid-template-columns: 104px minmax(0, 1fr) 176px;
  border-radius: 18px;
}

.reservation-workspace .reservation-time,
.reservation-workspace .reservation-body,
.reservation-workspace .reservation-actions {
  padding: 14px;
}

.reservation-workspace .reservation-time strong {
  font-size: 1.1rem;
}

.reservation-workspace .reservation-meta span {
  min-height: 28px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.reservation-list-panel .panel-header,
.client-list-panel .panel-header,
.table-stage-panel .panel-header,
.panel-header.panel-header-wrap {
  margin-bottom: 10px;
}

.reservation-list-panel .header-actions,
.client-list-panel .header-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(150px, 0.8fr));
  gap: 8px;
  width: min(100%, 640px);
  padding: 8px;
  border-radius: 16px;
}

.reservation-list-panel .header-actions input,
.client-list-panel .header-actions input {
  min-width: 0;
  min-height: 38px;
}

.reservation-filter-meta {
  gap: 8px;
  margin: 6px 0 8px;
}

.reservation-filter-panel .summary-chip {
  padding: 10px 12px;
}

.reservation-mode-toolbar {
  margin-top: 8px;
}

.reservation-calendar-panel {
  padding: 10px 12px;
}

.reservation-calendar-grid {
  min-width: 700px;
}

.reservation-calendar-head {
  min-height: 48px;
}

.reservation-calendar-time,
.reservation-calendar-cell {
  min-height: 56px;
}

.reservation-calendar-event {
  padding: 5px 7px;
}

.dashboard-table-map,
.table-stage-panel .dashboard-table-map {
  min-height: 360px;
}

.table-legend {
  margin-top: 8px;
  font-size: 0.82rem;
}

.sector-mini-card span,
.table-meta span,
.client-list-main .table-meta span {
  font-size: 0.8rem;
}

.client-management-grid {
  grid-template-columns: 1fr;
}

.client-list-stack {
  gap: 10px;
}

.client-list-card {
  border-radius: 18px;
  padding: 12px 14px;
}

.client-edit-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 41;
  width: min(720px, calc(100vw - 28px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  transform: translate(-50%, -50%);
  border-radius: 26px;
  border: 1px solid rgba(196, 167, 136, 0.72);
  background: linear-gradient(180deg, #fffdfa 0%, #fff8f1 100%);
  box-shadow:
    0 34px 84px rgba(62, 34, 18, 0.18),
    0 0 0 100vmax rgba(37, 25, 17, 0.2);
}

.client-edit-panel.hidden {
  display: none !important;
}

body.client-composer-open {
  overflow: hidden;
}

.client-edit-spotlight {
  margin-bottom: 12px;
  padding: 12px 14px;
}

.client-edit-panel .form-actions {
  justify-content: flex-end;
}

.client-edit-panel input {
  min-height: 40px;
}

[data-panel="clientes"] {
  display: none;
}

[data-panel="clientes"].active {
  display: block;
}

[data-panel="clientes"] .client-list-panel {
  padding: 16px;
}

.client-list-panel .panel-header {
  align-items: center;
}

.client-list-panel .header-actions {
  width: min(100%, 720px);
  padding: 6px;
  border: 1px solid rgba(226, 205, 182, 0.76);
  border-radius: 14px;
  background: #fffaf4;
}

.client-list-panel .header-actions input {
  min-height: 34px;
  border-radius: 10px;
  font-size: 0.82rem;
}

.client-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.client-summary-chip {
  padding: 10px 12px;
  border: 1px solid #e8dccf;
  border-radius: 14px;
  background: #fffdf9;
}

.client-summary-chip span {
  display: block;
  color: #7c604a;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.client-summary-chip strong {
  display: block;
  margin-top: 4px;
  color: #4d2c19;
  font-size: 1.25rem;
  line-height: 1;
}

.client-table-list {
  display: grid;
  gap: 8px;
}

.client-record {
  display: grid;
  grid-template-columns: 42px minmax(170px, 1.2fr) minmax(160px, 1fr) minmax(110px, 0.6fr) 86px 120px auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(226, 205, 182, 0.82);
  border-radius: 14px;
  background: #fffdf9;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.client-import-preview {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(226, 205, 182, 0.82);
  border-radius: 14px;
  background: #fffdf9;
}

.client-import-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.client-import-preview-head div {
  display: grid;
  gap: 4px;
}

.client-import-preview-head span {
  color: #7c604a;
  font-size: 0.82rem;
}

.client-import-table-wrap {
  overflow: auto;
}

.client-import-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.client-import-table th,
.client-import-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #eadfce;
  text-align: left;
  font-size: 0.82rem;
}

.client-import-table th {
  color: #4d2c19;
  background: #f7efe5;
}

.client-record:hover,
.client-record.is-selected {
  border-color: #d8b48d;
  box-shadow: 0 10px 22px rgba(84, 43, 17, 0.08);
  transform: translateY(-1px);
}

.client-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #6d4220;
  background: #f5e7d6;
  font-size: 0.82rem;
  font-weight: 900;
}

.client-record-main,
.client-record-metric,
.client-record-last {
  display: grid;
  gap: 2px;
}

.client-record-main strong {
  color: #4d2c19;
  font-size: 0.95rem;
}

.client-record-main span,
.client-record-contact,
.client-record-metric span,
.client-record-last small {
  color: #7c604a;
  font-size: 0.78rem;
}

.client-record-contact {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-record-metric strong {
  color: #4d2c19;
  font-size: 1.1rem;
  line-height: 1;
}

.client-record-last span {
  color: #4d2c19;
  font-size: 0.86rem;
  font-weight: 800;
}

.client-spotlight-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (min-width: 981px) {
  .client-edit-panel {
    top: 0;
    right: 0;
    left: auto;
    width: min(500px, calc(100vw - 24px));
    height: 100dvh;
    max-height: 100dvh;
    transform: none;
    border-radius: 18px 0 0 18px;
    border-right: 0;
    box-shadow:
      -18px 0 54px rgba(62, 34, 18, 0.16),
      0 0 0 100vmax rgba(37, 25, 17, 0.18);
  }
}

@media (max-width: 980px) {
  .client-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-record {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .client-record-contact,
  .client-record-metric,
  .client-record-last {
    grid-column: 2 / -1;
  }
}

@media (max-width: 980px) {
  .reservation-list-panel .header-actions,
  .client-list-panel .header-actions {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .reservation-list-panel .header-actions input:first-child,
  .client-list-panel .header-actions input:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .reservation-list-panel .header-actions,
  .client-list-panel .header-actions {
    grid-template-columns: 1fr;
  }

  .client-edit-panel {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }
}

.reservation-workspace > .panel:first-child {
  padding: 12px 14px;
}

.reservation-workspace > .panel:first-child .panel-header {
  align-items: start;
  margin-bottom: 8px;
}

.reservation-workspace > .panel:first-child .header-actions {
  display: grid;
  grid-template-columns: repeat(3, auto) minmax(180px, 220px);
  gap: 6px;
  align-items: center;
}

.week-strip {
  gap: 8px;
}

.week-day {
  min-height: 72px;
  padding: 10px 8px;
}

.reservation-summary {
  margin-top: 8px;
}

.reservation-workspace .summary-chip {
  padding: 10px 12px;
}

.reservation-mode-toolbar {
  justify-content: flex-start;
}

.reservation-calendar-legend {
  margin-left: auto;
  font-size: 0.8rem;
}

.reservation-list-panel {
  padding: 12px 14px;
}

.reservation-list-panel .header-actions {
  grid-template-columns: minmax(240px, 1.4fr) repeat(2, minmax(150px, 0.8fr));
  width: min(100%, 620px);
  padding: 6px;
  border-radius: 14px;
}

.reservation-list-panel .panel-copy {
  max-width: 40ch;
}

.reservation-list-panel .data-table thead th {
  padding-top: 12px;
  padding-bottom: 12px;
}

.reservation-list-panel .data-table tbody td {
  padding-top: 12px;
  padding-bottom: 12px;
}

.reservation-workspace .reservation-actions {
  justify-items: stretch;
}

/* Extra compact density for reservation week strip and reservation list */
.week-strip {
  grid-template-columns: repeat(7, minmax(132px, 1fr));
  min-width: 960px;
  gap: 6px;
}

.week-day {
  min-height: 64px;
  padding: 8px 8px;
  border-radius: 14px;
}

.week-day small {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}

.week-day strong {
  margin: 6px 0 4px;
  font-size: 1.08rem;
  line-height: 1.05;
}

.week-day span {
  font-size: 0.8rem;
}

.reservation-summary {
  gap: 6px;
  margin-top: 6px;
}

.reservation-workspace .summary-chip {
  padding: 8px 10px;
}

.reservation-workspace .summary-chip span {
  font-size: 0.72rem;
}

.reservation-workspace .summary-chip strong {
  font-size: 1rem;
}

.reservation-list-panel {
  padding: 10px 12px;
}

.reservation-list-panel .panel-header {
  margin-bottom: 8px;
}

.reservation-list-panel .header-actions {
  grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(138px, 0.72fr));
  width: min(100%, 590px);
  gap: 6px;
  padding: 5px;
  border-radius: 12px;
}

.reservation-list-panel .header-actions input {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.83rem;
}

.reservation-filter-meta {
  gap: 6px;
  margin: 4px 0 6px;
}

.reservation-filter-panel .summary-chip {
  padding: 8px 10px;
}

.reservation-filter-panel .summary-chip strong {
  font-size: 1rem;
}

.reservation-list-panel .data-table {
  min-width: 920px;
}

.reservation-list-panel .data-table thead th {
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.reservation-list-panel .data-table tbody td {
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: 0.88rem;
  line-height: 1.28;
}

.reservation-list-panel .data-table tbody td small {
  margin-top: 2px;
  font-size: 0.76rem;
}

.reservation-workspace .reservation-actions .action-row-compact {
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.reservation-workspace .mini-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Final reservation layout pass: denser top area and stronger responsive buttons */
.reservation-workspace {
  gap: 14px;
}

.reservation-workspace > .panel:first-child {
  padding: 10px 12px;
  border-radius: 18px;
}

.reservation-workspace > .panel:first-child .panel-header {
  margin-bottom: 6px;
}

.reservation-workspace > .panel:first-child .panel-header h3 {
  font-size: 1.32rem;
}

.reservation-workspace > .panel:first-child .header-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, max-content)) minmax(148px, 184px);
  gap: 6px;
  align-items: center;
}

.reservation-workspace > .panel:first-child .header-actions .button,
.reservation-workspace > .panel:first-child .header-actions input {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.8rem;
  border-radius: 10px;
}

.reservation-workspace > .panel:first-child .header-actions .button {
  white-space: nowrap;
}

.week-strip {
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  min-width: 840px;
  gap: 5px;
}

.week-day {
  min-height: 56px;
  padding: 7px 8px;
  border-radius: 12px;
}

.week-day small {
  font-size: 0.64rem;
  letter-spacing: 0.08em;
}

.week-day strong {
  margin: 4px 0 2px;
  font-size: 0.98rem;
  line-height: 1;
}

.week-day span {
  font-size: 0.76rem;
}

.reservation-summary {
  gap: 6px;
  margin-top: 4px;
}

.reservation-workspace .summary-chip {
  padding: 7px 9px;
  border-radius: 14px;
}

.reservation-workspace .summary-chip span {
  font-size: 0.7rem;
}

.reservation-workspace .summary-chip strong {
  font-size: 0.96rem;
}

.reservation-mode-toolbar {
  margin-top: 6px;
  gap: 8px;
}

.reservation-calendar-legend {
  gap: 10px;
  font-size: 0.76rem;
}

.reservation-day-panel .panel-header {
  margin-bottom: 8px;
}

.reservation-day-panel .header-actions select {
  min-height: 34px;
  min-width: 168px;
  padding: 0 10px;
  font-size: 0.8rem;
}

.reservation-workspace .reservation-cards {
  gap: 10px;
}

.reservation-workspace .reservation-card {
  grid-template-columns: 92px minmax(0, 1fr) 154px;
  border-radius: 16px;
}

.reservation-workspace .reservation-time,
.reservation-workspace .reservation-body,
.reservation-workspace .reservation-actions {
  padding: 12px;
}

.reservation-workspace .reservation-time {
  gap: 5px;
}

.reservation-workspace .reservation-time strong {
  font-size: 1rem;
}

.reservation-workspace .reservation-time small {
  font-size: 0.72rem;
}

.reservation-workspace .reservation-body {
  gap: 8px;
}

.reservation-workspace .reservation-topline strong {
  font-size: 0.98rem;
}

.reservation-workspace .reservation-meta {
  gap: 6px;
}

.reservation-workspace .reservation-meta span {
  min-height: 24px;
  padding: 0 8px;
  font-size: 0.74rem;
}

.reservation-workspace .reservation-note {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  line-height: 1.35;
}

.reservation-workspace .reservation-actions {
  gap: 8px;
}

.reservation-workspace .reservation-actions .action-row,
.reservation-workspace .reservation-actions .action-row-compact {
  gap: 6px;
}

.reservation-workspace .mini-action {
  min-height: 34px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 0.78rem;
}

/* Light density polish across other admin screens */
.stats-grid,
.dashboard-grid,
.reports-grid,
.tables-grid,
.config-grid,
.client-management-grid {
  gap: 12px;
}

.stat-card {
  padding: 14px 16px;
}

.stat-card strong {
  font-size: 1.9rem;
}

[data-panel="dashboard"] .panel,
[data-panel="relatorios"] .panel,
[data-panel="mesas"] .panel,
[data-panel="clientes"] .panel,
[data-panel="configuracoes"] .panel {
  border-radius: 22px;
}

.chatbot-config-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 12px;
  margin-top: 12px;
}

.chatbot-guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.chatbot-guide-grid article {
  min-height: 104px;
  padding: 14px;
  border: 1px solid rgba(25, 33, 38, 0.1);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f4ef 100%);
  display: grid;
  gap: 8px;
  align-content: start;
}

.chatbot-guide-grid strong {
  color: #25313a;
  font-size: 0.95rem;
}

.chatbot-guide-grid span {
  color: #66737c;
  font-size: 0.82rem;
  line-height: 1.35;
}

.chatbot-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding: 6px;
  border: 1px solid rgba(25, 33, 38, 0.1);
  border-radius: 14px;
  background: #f7f4ef;
}

.chatbot-tab {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  background: transparent;
  color: #52616b;
  font-weight: 700;
}

.chatbot-tab.is-active {
  background: #ffffff;
  color: #256f5a;
  box-shadow: 0 10px 22px rgba(25, 33, 38, 0.08);
}

.chatbot-tab-panel {
  display: none;
}

.chatbot-tab-panel.is-active {
  display: block;
  grid-column: 1 / -1;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
}

.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #256f5a;
}

.chatbot-step-toggles {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

.chatbot-step-toggles .checkbox-field {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(25, 33, 38, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
}

.chatbot-dialog-editor {
  display: grid;
  gap: 10px;
}

.chatbot-dialog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.chatbot-dialog-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(25, 33, 38, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.chatbot-dialog-card textarea {
  min-height: 84px;
}

.chatbot-flow-preview {
  display: grid;
  gap: 10px;
}

.chatbot-status,
.chatbot-step {
  padding: 12px 14px;
  border: 1px solid rgba(25, 33, 38, 0.1);
  border-radius: 14px;
  background: #fff;
}

.chatbot-status {
  display: grid;
  gap: 4px;
}

.chatbot-status strong {
  color: #8a3d24;
}

.chatbot-status.enabled strong {
  color: #256f5a;
}

.chatbot-step {
  opacity: 0.64;
}

.chatbot-step.active {
  opacity: 1;
  border-color: rgba(37, 111, 90, 0.28);
  background: rgba(37, 111, 90, 0.07);
}

.chatbot-step strong {
  display: block;
  margin-bottom: 4px;
}

.chatbot-step p,
.chatbot-step small,
.chatbot-status span {
  margin: 0;
  color: #66737c;
  font-size: 0.86rem;
  line-height: 1.35;
}

.chatbot-step small {
  display: block;
  margin-top: 6px;
  color: #7d8991;
  font-size: 0.78rem;
}

#chatbot-config-form textarea {
  min-height: 112px;
}

#chatbot-config-form .chatbot-dialog-card textarea {
  min-height: 84px;
}

.chatbot-simulator-panel {
  margin-top: 12px;
}

.chatbot-simulator-shell {
  display: grid;
  gap: 12px;
}

.chatbot-simulator-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.chatbot-simulator-log {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 320px;
  max-height: 420px;
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(25, 33, 38, 0.1);
  border-radius: 16px;
  background: #f7f4ef;
}

.sim-message {
  max-width: min(76%, 680px);
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: normal;
}

.sim-message.user {
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  background: #256f5a;
  color: #fff;
}

.sim-message.bot {
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  background: #fff;
  color: #23313a;
  box-shadow: 0 8px 24px rgba(25, 33, 38, 0.08);
}

.sim-message small {
  display: block;
  margin-top: 6px;
  opacity: 0.72;
  font-size: 0.72rem;
}

.chatbot-simulator-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

[data-panel="autoatendimento"] > .chatbot-guide-grid,
[data-panel="autoatendimento"] > .chatbot-tabs,
[data-panel="autoatendimento"] > .chatbot-config-grid,
[data-panel="autoatendimento"] > .chatbot-simulator-panel {
  display: none !important;
}

.chatbot-builder-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border-color: color-mix(in srgb, var(--theme-primary) 20%, var(--theme-border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--theme-primary) 9%, #ffffff), #ffffff 58%);
}

.chatbot-builder-hero h3 {
  margin: 4px 0 8px;
  font-size: 1.55rem;
}

.chatbot-builder-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--theme-text-secondary);
  line-height: 1.55;
}

.chatbot-builder-actions,
.flow-toolbar-actions,
.phone-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.chatbot-product-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.chatbot-product-strip article,
.flow-template-grid article,
.flow-architecture-grid article,
.flow-preview-notes,
.flow-block-sidebar,
.flow-config-panel,
.flow-canvas-panel,
.whatsapp-preview-phone {
  border: 1px solid color-mix(in srgb, var(--theme-primary) 18%, var(--theme-border));
  border-radius: 14px;
  background: color-mix(in srgb, var(--theme-card) 92%, #ffffff);
  box-shadow: 0 16px 34px rgba(25, 33, 38, 0.06);
}

.chatbot-product-strip article {
  display: grid;
  gap: 3px;
  padding: 14px;
}

.chatbot-product-strip span,
.flow-panel-title span,
.flow-block-group > span,
.flow-node span,
.flow-node small,
.flow-canvas-toolbar span,
.flow-template-grid span,
.flow-architecture-grid span,
.flow-preview-notes p,
.rule-builder-card p {
  color: var(--theme-text-secondary);
  font-size: 0.82rem;
}

.flow-builder-shell {
  display: grid;
  grid-template-columns: 260px minmax(520px, 1fr) 300px;
  gap: 12px;
  min-height: 640px;
}

.flow-block-sidebar,
.flow-config-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
}

.flow-panel-title {
  display: grid;
  gap: 4px;
}

.flow-block-group {
  display: grid;
  gap: 8px;
}

.flow-block-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--theme-primary) 16%, var(--theme-border));
  border-radius: 12px;
  background: #ffffff;
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.flow-block-item:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--theme-primary) 38%, var(--theme-border));
  box-shadow: 0 12px 24px rgba(25, 33, 38, 0.08);
}

.flow-block-item i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--theme-primary) 12%, #ffffff);
  color: var(--theme-primary-hover);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 900;
}

.flow-block-item small {
  grid-column: 2;
  color: var(--theme-text-secondary);
  font-size: 0.76rem;
}

.flow-canvas-panel {
  overflow: hidden;
}

.flow-canvas-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--theme-border);
}

.flow-canvas-toolbar > div:first-child > span:not(#flow-canvas-status) {
  display: none;
}

.flow-toolbar-actions button,
.phone-buttons button,
.quick-reply-editor button {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--theme-primary) 22%, var(--theme-border));
  border-radius: 10px;
  background: #ffffff;
  color: var(--theme-primary-hover);
  font-weight: 800;
}

.flow-canvas {
  position: relative;
  min-height: 580px;
  overflow: hidden;
  background:
    linear-gradient(color-mix(in srgb, var(--theme-primary) 7%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--theme-primary) 7%, transparent) 1px, transparent 1px),
    color-mix(in srgb, var(--theme-primary) 4%, #ffffff);
  background-size: 28px 28px;
}

.flow-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.flow-lines path.flow-connector {
  fill: none;
  stroke: color-mix(in srgb, var(--theme-primary) 48%, #9aa6af);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 10 10;
  animation: flow-dash 1.8s linear infinite;
}

.flow-lines marker path {
  fill: color-mix(in srgb, var(--theme-primary) 58%, #5b6770);
}

@keyframes flow-dash {
  to {
    stroke-dashoffset: -20;
  }
}

.flow-node {
  position: absolute;
  width: 178px;
  min-height: 102px;
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--theme-primary) 26%, var(--theme-border));
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 34px rgba(25, 33, 38, 0.1);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.flow-node::before {
  content: attr(data-flow-order);
  position: absolute;
  top: -12px;
  left: -10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--theme-primary);
  color: var(--theme-sidebar-text);
  font-size: 0.76rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(25, 33, 38, 0.12);
}

.flow-node::after {
  content: attr(data-flow-role);
  position: absolute;
  right: 10px;
  bottom: -13px;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--theme-primary) 20%, var(--theme-border));
  border-radius: 999px;
  background: #ffffff;
  color: var(--theme-primary-hover);
  font-size: 0.68rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(25, 33, 38, 0.08);
}

.flow-node.selected {
  outline: 4px solid color-mix(in srgb, var(--theme-primary) 18%, transparent);
  border-color: var(--theme-primary);
}

.flow-node strong {
  display: block;
  margin: 6px 0;
}

.node-message { border-top: 4px solid #2f7dd3; }
.node-number { border-top: 4px solid #8a5cf6; }
.node-date { border-top: 4px solid #0f9f6e; }
.node-rule { border-top: 4px solid #dc8a20; }
.node-choice { border-top: 4px solid #d04f7d; }
.node-confirm { border-top: 4px solid #256f5a; }

.flow-minimap {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  grid-template-columns: repeat(2, 28px);
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--theme-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
}

.flow-minimap i {
  height: 18px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--theme-primary) 34%, #dfe7e3);
}

.flow-config-panel label,
.quick-reply-editor,
.rule-builder-card {
  display: grid;
  gap: 7px;
}

.quick-reply-editor div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.flow-config-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.rule-builder-card {
  padding: 12px;
  border: 1px solid color-mix(in srgb, #dc8a20 35%, var(--theme-border));
  border-radius: 12px;
  background: color-mix(in srgb, #dc8a20 8%, #ffffff);
}

.flow-template-grid,
.flow-architecture-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.flow-template-grid article,
.flow-architecture-grid article {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.flow-preview-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 14px;
}

.whatsapp-preview-phone {
  overflow: hidden;
  max-width: 390px;
  background: #eef4ee;
}

.phone-topbar {
  padding: 14px 16px;
  background: #256f5a;
  color: #ffffff;
  font-weight: 900;
}

.phone-chat {
  display: flex;
  min-height: 520px;
  max-height: 520px;
  overflow: auto;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.flow-preview-notes {
  padding: 18px;
}

.flow-preview-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid color-mix(in srgb, var(--theme-primary) 16%, var(--theme-border));
  background: rgba(255, 255, 255, 0.82);
}

@media (max-width: 1280px) {
  .flow-builder-shell {
    grid-template-columns: 230px minmax(420px, 1fr);
  }

  .flow-config-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .chatbot-builder-hero,
  .flow-preview-layout {
    grid-template-columns: 1fr;
  }

  .chatbot-product-strip,
  .flow-template-grid,
  .flow-architecture-grid,
  .flow-builder-shell {
    grid-template-columns: 1fr;
  }

  .flow-canvas {
    min-height: 620px;
    overflow-x: auto;
  }
}

[data-panel="relatorios"] .header-actions,
.table-stage-panel .header-actions,
.client-list-panel .header-actions {
  gap: 6px;
}

[data-panel="relatorios"] .header-actions input,
.table-stage-panel .header-actions select,
.table-stage-panel .header-actions button,
.client-list-panel .header-actions input {
  min-height: 36px;
  font-size: 0.82rem;
}

[data-panel="relatorios"] {
  display: none;
  gap: 12px;
}

[data-panel="relatorios"].active {
  display: grid;
}

.report-filter-panel {
  padding: 12px 16px;
}

.report-filter-panel .panel-header {
  align-items: center;
  margin-bottom: 0;
}

.report-filter-panel h3 {
  margin-top: 4px;
  font-size: 1.25rem;
  line-height: 1.05;
}

.report-filter-panel .eyebrow {
  font-size: 0.66rem;
}

.report-filter-panel .header-actions {
  align-items: center;
  margin-left: auto;
}

.report-filter-panel input {
  width: 145px;
  min-height: 34px;
  padding: 6px 10px;
}

.report-kpi-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 0;
}

.report-kpi-grid .stat-card {
  display: grid;
  align-content: space-between;
  min-height: 128px;
  padding: 16px;
  border-radius: 18px;
}

.report-kpi-grid .stat-card span {
  color: #7c604a;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.report-kpi-grid .stat-card strong {
  margin-top: 8px;
  color: #4d2c19;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.report-kpi-grid .stat-card small {
  margin-top: 8px;
  color: #8c7460;
  font-size: 0.78rem;
  line-height: 1.35;
}

.report-chart-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 12px;
  margin-top: 0;
}

.report-chart-panel {
  padding: 18px;
  border-radius: 18px;
}

.report-chart-panel .panel-header {
  align-items: center;
  margin-bottom: 12px;
}

.report-chart-panel h3 {
  margin-top: 4px;
  font-size: 1.35rem;
}

.future-projection-panel {
  grid-column: 1 / -1;
}

.future-projection-layout {
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.future-projection-metric {
  min-height: 220px;
  padding: 18px;
  border: 1px solid #eadfce;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdf9 0%, #f7efe5 100%);
  display: grid;
  align-content: center;
  gap: 10px;
}

.future-projection-metric span {
  color: #7c604a;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.future-projection-metric strong {
  color: #4d2c19;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  line-height: 0.9;
}

.future-projection-metric small {
  color: #8c7460;
  font-size: 0.82rem;
  line-height: 1.35;
}

.line-chart {
  min-height: 220px;
  padding: 8px 10px 4px;
  border: 1px solid #eadfce;
  border-radius: 16px;
  background: #fffdf9;
}

.future-line-svg {
  display: block;
  width: 100%;
  height: 220px;
}

.line-chart-grid {
  stroke: #eadfce;
  stroke-width: 1;
}

.line-chart-axis {
  stroke: #d7c6b3;
  stroke-width: 1.4;
}

.line-chart-area {
  fill: rgba(155, 98, 36, 0.14);
}

.line-chart-path {
  fill: none;
  stroke: #9b6224;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.line-chart-dot {
  fill: #ffffff;
  stroke: #9b6224;
  stroke-width: 3;
}

.line-chart-x-label,
.line-chart-y-label {
  fill: #8c7460;
  font-size: 0.72rem;
  font-weight: 700;
}

.line-chart-x-label {
  text-anchor: middle;
}

.line-chart-y-label {
  text-anchor: end;
}

[data-panel="relatorios"] .bars-list {
  display: grid;
  gap: 8px;
}

[data-panel="relatorios"] .bar-row {
  gap: 7px;
  padding: 11px 12px;
  border-radius: 13px;
  background: #fffdf9;
}

[data-panel="relatorios"] .bar-head {
  align-items: center;
  color: #4d2c19;
  font-size: 0.86rem;
}

[data-panel="relatorios"] .bar-row small {
  color: #8c7460;
  font-size: 0.76rem;
}

[data-panel="relatorios"] .bar-track {
  height: 8px;
}

@media (max-width: 1180px) {
  .report-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-chart-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .report-filter-panel .panel-header {
    align-items: stretch;
  }

  .report-filter-panel .header-actions,
  .report-filter-panel input {
    width: 100%;
  }

  .report-kpi-grid {
    grid-template-columns: 1fr;
  }

  .future-projection-layout {
    grid-template-columns: 1fr;
  }
}

/* Executive editorial pass: sober typography, stronger metrics and cleaner scan paths. */
:root {
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;
  --font-display: "IBM Plex Sans", "Inter", "Segoe UI", Arial, sans-serif;
  --executive-ink: #231f1c;
  --executive-muted: #6f6257;
  --executive-accent: #9b6224;
  --executive-line: #e7ddd2;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-body);
  letter-spacing: 0;
}

.topbar h2,
.panel h3,
.hero-panel h3,
.sector-column h4,
.sidebar-footer strong,
.week-day strong,
.reservation-time strong,
.stat-card strong,
.summary-chip strong,
.client-summary-chip strong,
.client-record-metric strong,
.report-kpi-grid .stat-card strong {
  font-family: var(--font-display);
}

.topbar h2 {
  color: var(--executive-ink);
  font-size: clamp(1.65rem, 2.4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.08;
}

.panel h3,
.hero-panel h3 {
  color: var(--executive-ink);
  font-size: 1.24rem;
  font-weight: 700;
  line-height: 1.16;
}

.subtitle,
.panel-copy,
.hero-panel p,
.stack-item span,
.reservation-note,
.feedback-line,
.bar-row small,
.client-record-main span,
.client-record-contact,
.client-record-last small,
.stat-card small,
.summary-chip span {
  color: var(--executive-muted);
  line-height: 1.42;
}

.eyebrow,
.stat-card span,
.summary-chip span,
.client-summary-chip span,
.report-kpi-grid .stat-card span {
  color: var(--executive-accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-card,
.summary-chip,
.client-summary-chip,
.report-kpi-grid .stat-card {
  border-color: var(--executive-line);
  background: #fffdf9;
}

.stat-card strong,
.summary-chip strong,
.client-summary-chip strong,
.report-kpi-grid .stat-card strong,
.compact-table-zone-head span,
.map-shell-total,
.map-zone-card-header strong,
.dashboard-time,
.reservation-time strong,
.bar-head span:last-child {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.stat-card strong,
.report-kpi-grid .stat-card strong {
  color: var(--executive-ink);
  font-size: clamp(1.75rem, 2.4vw, 2.35rem);
  font-weight: 800;
}

.summary-chip strong,
.client-summary-chip strong {
  color: var(--executive-ink);
  font-size: 1.22rem;
  font-weight: 800;
}

.report-kpi-grid .stat-card,
.client-summary-chip,
.summary-chip {
  box-shadow: none;
}

.panel,
.hero-panel,
.stat-card,
.client-record,
.bar-row,
.compact-table-zone,
.report-chart-panel,
.report-filter-panel,
.client-list-panel {
  border-color: var(--executive-line);
}

.panel-header {
  align-items: center;
}

.bar-head,
.client-record-main strong,
.client-record-last span,
.compact-table-zone-head strong {
  color: var(--executive-ink);
  font-weight: 700;
}

[data-panel="relatorios"] .bar-row,
.client-record {
  background: #ffffff;
}

[data-panel="relatorios"] .bar-fill {
  background: linear-gradient(90deg, #6f8d5f, var(--executive-accent));
}

.client-record,
.dashboard-row,
.reservation-card,
.bar-row {
  text-wrap: pretty;
}

.table-item-selectable {
  position: relative;
  cursor: pointer;
  padding-left: 46px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.table-item-selectable:hover,
.table-item-selectable.is-selected {
  border-color: #d8b48d;
  box-shadow: 0 10px 22px rgba(84, 43, 17, 0.08);
  transform: translateY(-1px);
}

.table-select-check {
  position: absolute;
  top: 14px;
  left: 14px;
  display: grid;
  place-items: center;
}

.table-select-check input {
  width: 18px;
  height: 18px;
}

@media (max-width: 980px) {
  .chatbot-guide-grid,
  .chatbot-config-grid,
  .chatbot-step-toggles,
  .chatbot-dialog-grid,
  .chatbot-simulator-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .chatbot-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .reservation-workspace > .panel:first-child .header-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reservation-workspace > .panel:first-child .header-actions input {
    grid-column: 1 / -1;
  }

  .reservation-workspace .reservation-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .reservation-workspace .reservation-actions {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid rgba(228, 214, 198, 0.9);
  }
}

@media (max-width: 680px) {
  .reservation-workspace > .panel:first-child .header-actions {
    grid-template-columns: 1fr;
  }

  .week-strip {
    min-width: 760px;
  }

  .reservation-mode-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .reservation-calendar-legend {
    margin-left: 0;
    flex-wrap: wrap;
  }

  .reservation-workspace .reservation-card {
    grid-template-columns: 1fr;
  }

  .reservation-workspace .reservation-time {
    border-right: 0;
    border-bottom: 1px solid rgba(228, 214, 198, 0.9);
  }

  .reservation-workspace .reservation-actions .action-row,
  .reservation-workspace .reservation-actions .action-row-compact {
    grid-template-columns: 1fr;
  }
}
.topbar-actions [hidden],
.button[hidden],
.auto-refresh-control[hidden],
.auth-gate[hidden],
#auth-totp-field[hidden] {
  display: none !important;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f8f8f6;
}

body.auth-pending .app-shell,
body.auth-locked .app-shell {
  visibility: hidden;
  pointer-events: none;
}

.auth-card {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid #ded9d2;
  border-radius: 8px;
  padding: 28px;
  background: #ffffff;
  box-shadow: 0 18px 60px rgba(36, 30, 24, 0.1);
}

.auth-card h1 {
  margin: 0;
  color: #2d2723;
  font-family: var(--font-display, inherit);
  font-size: 1.8rem;
}

.auth-card p {
  margin: 0;
  color: #6f655d;
  line-height: 1.5;
}

.auth-card .eyebrow {
  color: #8d552a;
  letter-spacing: 0.18em;
}

.iam-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.iam-hero-panel,
.iam-audit-panel {
  grid-column: 1 / -1;
}

.iam-hero-panel {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.iam-hero-panel p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.iam-summary-strip,
.iam-role-list,
.iam-user-list,
.iam-audit-list {
  display: grid;
  gap: 10px;
}

.iam-summary-strip {
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  min-width: min(520px, 100%);
}

.iam-summary-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.iam-summary-card span,
.iam-role-card span,
.iam-user-card span,
.iam-audit-row span,
.iam-audit-row small {
  color: var(--muted);
  font-size: 0.82rem;
}

.iam-summary-card strong {
  display: block;
  margin-top: 4px;
  color: var(--accent-strong);
  font-family: var(--font-display, inherit);
  font-size: 1.55rem;
  line-height: 1;
}

.iam-role-card,
.iam-user-card,
.iam-audit-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.iam-role-card,
.iam-user-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.iam-role-card {
  display: grid;
  gap: 4px;
}

.iam-role-card strong,
.iam-user-card strong,
.iam-audit-row strong {
  color: var(--text);
}

.iam-audit-details {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 8px 0 0 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
}

.iam-audit-pagination,
.admin-pagination {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
}

.iam-audit-pagination > div,
.admin-pagination > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.iam-audit-page-button {
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.iam-audit-page-button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.iam-audit-page-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.iam-audit-page-ellipsis {
  display: inline-flex;
  align-items: center;
  height: 34px;
  color: var(--muted);
}

.iam-role-card.is-selected,
.iam-user-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(151, 91, 46, 0.12);
}

.iam-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.iam-permission-grid {
  display: grid;
  gap: 8px;
}

.iam-permission-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: #fbfaf8;
}

.iam-permission-row > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.iam-check,
.toggle-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.iam-check {
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  background: #ffffff;
  font-size: 0.82rem;
  color: var(--muted);
}

.iam-user-list {
  margin-top: 16px;
}

.iam-user-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
}

.iam-user-card small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.iam-audit-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.iam-audit-row {
  display: grid;
  gap: 4px;
}

@media (max-width: 980px) {
  .iam-layout,
  .iam-summary-strip,
  .iam-audit-list {
    grid-template-columns: 1fr;
  }

  .iam-hero-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .iam-permission-row {
    grid-template-columns: 1fr;
  }

  .admin-pagination,
  .iam-audit-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-pagination > div,
  .iam-audit-pagination > div {
    justify-content: flex-start;
  }
}

.iam-layout-separated {
  grid-template-columns: 1fr;
  gap: 16px;
}

.iam-layout-separated .iam-hero-panel,
.iam-layout-separated .iam-audit-panel {
  grid-column: auto;
}

.iam-tabs {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  background: #ffffff;
}

.iam-tab {
  min-width: 112px;
  border: 0;
  border-radius: 6px;
  padding: 10px 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.iam-tab.is-active {
  background: var(--accent-strong);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(74, 42, 24, 0.16);
}

.iam-screen {
  display: none;
}

.iam-screen.is-active {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.iam-screen[data-iam-screen-panel="audit"].is-active {
  grid-template-columns: 1fr;
}

.iam-directory-panel,
.iam-editor-panel {
  min-height: 100%;
}

.iam-directory-list {
  max-height: 620px;
  overflow: auto;
  padding-right: 2px;
}

.iam-form-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(260px, 1fr);
  gap: 14px;
}

.iam-role-card {
  position: relative;
  min-height: 94px;
  border-left: 4px solid transparent;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.iam-role-card:hover,
.iam-user-card:hover {
  transform: translateY(-1px);
  border-color: rgba(151, 91, 46, 0.38);
}

.iam-role-card.is-selected {
  border-left-color: var(--accent-strong);
}

.iam-role-card span {
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 8px;
  background: #fbfaf8;
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.iam-role-card strong {
  font-family: var(--font-display, inherit);
  font-size: 1.02rem;
  letter-spacing: 0;
}

.iam-editor-panel .panel-header {
  padding-bottom: 8px;
}

.iam-permission-grid {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  gap: 0;
  background: #ffffff;
}

.iam-permission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  background: #fbfaf8;
}

.iam-permission-actions .button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.78rem;
}

.iam-permission-row {
  grid-template-columns: minmax(118px, 0.55fr) minmax(0, 1.45fr);
  gap: 8px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
  padding: 8px 10px;
}

.iam-permission-row:last-child {
  border-bottom: 0;
}

.iam-permission-row > strong {
  color: var(--text);
  font-family: var(--font-display, inherit);
  font-size: 0.86rem;
}

.iam-check {
  border-radius: 6px;
  color: var(--text);
  min-height: 28px;
  padding: 5px 8px;
  font-size: 0.76rem;
}

.iam-check:has(input:checked) {
  border-color: rgba(151, 91, 46, 0.45);
  background: rgba(151, 91, 46, 0.08);
  color: var(--accent-strong);
  font-weight: 700;
}

.iam-user-form {
  margin-top: 4px;
}

.iam-user-card {
  min-height: 88px;
  border-left: 4px solid transparent;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.iam-user-card.is-selected {
  border-left-color: var(--accent-strong);
}

.iam-user-card > div {
  display: grid;
  gap: 4px;
}

.iam-user-card strong {
  font-family: var(--font-display, inherit);
}

.iam-audit-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.iam-audit-row {
  min-height: 110px;
  border-left: 4px solid rgba(151, 91, 46, 0.42);
  background: linear-gradient(180deg, #ffffff 0%, #fbfaf8 100%);
}

@media (max-width: 1180px) {
  .iam-screen.is-active,
  .iam-form-row {
    grid-template-columns: 1fr;
  }

  .iam-directory-list {
    max-height: none;
  }

  .iam-audit-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .iam-tabs {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
  }

  .iam-tab {
    width: 100%;
  }

  .iam-audit-list {
    grid-template-columns: 1fr;
  }
}

.sidebar {
  background: linear-gradient(180deg, var(--theme-sidebar-start, #5b341d) 0%, var(--theme-sidebar-end, #3a2012) 100%) !important;
}

.sidebar-nav {
  gap: 18px;
}

.sidebar-nav > button.nav-link {
  display: none;
}

.nav-group {
  display: grid;
  gap: 8px;
}

.nav-group-secondary {
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 244, 232, 0.14);
}

.nav-section-label {
  padding: 0 8px 2px;
  color: color-mix(in srgb, var(--theme-sidebar-text, #fff8f1) 52%, transparent) !important;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
}

.nav-link.active {
  background: linear-gradient(135deg, var(--theme-sidebar-accent, #8d552a) 0%, var(--theme-sidebar-start, #5b341d) 100%) !important;
}

.nav-icon {
  display: grid;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(255, 244, 232, 0.18);
  border-radius: 8px;
  color: var(--theme-sidebar-text, #fff9f4) !important;
  font-size: 0.95rem;
  line-height: 1;
}

.theme-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.theme-preview-panel {
  display: grid;
  gap: 18px;
  align-content: start;
}

.theme-form {
  display: grid;
  gap: 16px;
}

.theme-form-row,
.theme-color-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.theme-form-row {
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1fr);
}

.theme-fieldset {
  display: grid;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: #fffdf9;
}

.theme-fieldset > strong {
  color: var(--accent-strong);
  font-family: var(--font-display, inherit);
}

.theme-color-grid input[type="color"] {
  min-height: 44px;
  padding: 4px;
}

.theme-preview-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--preview-booking-background, #f7f1ea) 86%, #ffffff), var(--preview-booking-background, #f7f1ea));
}

.theme-admin-preview {
  display: grid;
  grid-template-columns: minmax(118px, 0.38fr) minmax(0, 1fr);
  min-height: 320px;
  background: #ffffff;
}

.theme-admin-preview-sidebar {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  color: var(--preview-sidebar-text, #fff8f1);
  background: linear-gradient(180deg, var(--preview-sidebar-start, #5b341d), var(--preview-sidebar-end, #3a2012));
}

.theme-admin-preview-sidebar img {
  width: 100%;
  max-height: 74px;
  object-fit: contain;
  padding: 8px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--preview-sidebar-text, #fff8f1) 12%, transparent);
}

.theme-admin-preview-sidebar span,
.theme-admin-preview-sidebar strong {
  min-height: 30px;
  padding: 8px 10px;
  border-radius: 8px;
}

.theme-admin-preview-sidebar strong {
  background: var(--preview-sidebar-accent, #8d552a);
  color: var(--preview-sidebar-text, #fff8f1);
}

.theme-admin-preview-sidebar span:not(.theme-admin-preview-label) {
  background: color-mix(in srgb, var(--preview-sidebar-text, #fff8f1) 12%, transparent);
}

.theme-admin-preview-label {
  min-height: auto !important;
  padding: 8px 0 2px !important;
  color: color-mix(in srgb, var(--preview-sidebar-text, #fff8f1) 62%, transparent);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.theme-admin-preview-content {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--preview-sidebar-accent, #8d552a) 12%, transparent), transparent 58%),
    #fffaf4;
}

.theme-admin-preview-topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--preview-sidebar-accent, #8d552a) 24%, #eadcc9);
  border-radius: 8px;
  background: #ffffff;
}

.theme-admin-preview-topbar span,
.theme-admin-preview-grid span {
  display: block;
  color: #7a5d49;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.theme-admin-preview-topbar strong {
  display: block;
  color: #2f1b12;
  font-size: 1.1rem;
}

.theme-admin-preview-topbar button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--preview-sidebar-accent, #8d552a);
  color: var(--preview-sidebar-text, #fff8f1);
  font-weight: 800;
}

.theme-admin-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.theme-admin-preview-grid article,
.theme-admin-preview-list {
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--preview-sidebar-accent, #8d552a) 20%, #eadcc9);
  border-radius: 8px;
  background: #ffffff;
}

.theme-admin-preview-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--preview-sidebar-accent, #8d552a);
  font-size: 1.4rem;
}

.theme-admin-preview-list {
  display: grid;
  gap: 8px;
}

.theme-admin-preview-list strong {
  color: #2f1b12;
}

.theme-admin-preview-list span {
  padding: 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--preview-sidebar-accent, #8d552a) 8%, #ffffff);
  color: #7a5d49;
}

.theme-booking-preview {
  min-height: 560px;
  padding: 20px;
}

.theme-preview-device {
  width: min(100%, 390px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--preview-booking-accent, #8b5227) 24%, rgba(255, 255, 255, 0.7));
  border-radius: 30px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--preview-booking-start, #603a23) 12%, transparent), color-mix(in srgb, var(--preview-booking-end, #341d11) 18%, transparent)),
    var(--preview-booking-bg-image, none) center / cover no-repeat,
    color-mix(in srgb, var(--preview-booking-background, #f7f1ea) 92%, #ffffff);
  box-shadow: 0 30px 70px color-mix(in srgb, var(--preview-booking-end, #341d11) 22%, transparent);
}

.theme-preview-hero {
  min-height: 132px;
  padding: 22px;
  color: var(--preview-booking-text, #fff8f1);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--preview-booking-start, #603a23) 94%, transparent), color-mix(in srgb, var(--preview-booking-end, #341d11) 94%, var(--preview-booking-accent, #8b5227)));
}

.theme-preview-brand-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.theme-preview-logo-wrap {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--preview-booking-background, #f7f1ea) 18%, #ffffff);
}

.theme-preview-logo-wrap img {
  max-width: 46px;
  max-height: 46px;
  object-fit: contain;
}

.theme-preview-brand-row span,
.theme-preview-entry > span,
.theme-preview-confirmation span {
  display: block;
  margin-bottom: 3px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.78;
}

.theme-preview-brand-row strong {
  display: block;
  max-width: 230px;
  color: var(--preview-booking-text, #fff8f1);
  font-family: var(--font-display, inherit);
  font-size: clamp(1rem, 4vw, 1.38rem);
  line-height: 1.05;
}

.theme-preview-entry,
.theme-preview-flow,
.theme-preview-confirmation {
  margin: -18px 16px 16px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--preview-booking-accent, #8b5227) 18%, #ffffff);
  border-radius: 8px;
  background: color-mix(in srgb, var(--preview-booking-background, #f7f1ea) 12%, #ffffff);
  color: #2f1b12;
  box-shadow: 0 18px 36px color-mix(in srgb, var(--preview-booking-end, #341d11) 12%, transparent);
}

.theme-preview-entry h4,
.theme-preview-flow h4 {
  margin: 0 0 12px;
  color: #2f1b12;
  font-family: var(--font-display, inherit);
  font-size: 1rem;
}

.theme-preview-entry-grid,
.theme-preview-people,
.theme-preview-times,
.theme-preview-sector {
  display: grid;
  gap: 8px;
}

.theme-preview-entry-grid {
  grid-template-columns: 1fr 1fr;
}

.theme-preview-entry-grid button,
.theme-preview-primary,
.theme-preview-people span,
.theme-preview-times span,
.theme-preview-sector span,
.theme-preview-flow label {
  border: 1px solid color-mix(in srgb, var(--preview-booking-accent, #8b5227) 24%, #ffffff);
  border-radius: 8px;
  background: color-mix(in srgb, var(--preview-booking-background, #f7f1ea) 22%, #ffffff);
  color: #2f1b12;
  font-weight: 800;
}

.theme-preview-entry-grid button,
.theme-preview-primary {
  min-height: 48px;
  cursor: default;
}

.theme-preview-entry-grid button:first-child,
.theme-preview-primary,
.theme-preview-people .is-active,
.theme-preview-times .is-active,
.theme-preview-sector .is-active {
  border-color: color-mix(in srgb, var(--preview-booking-accent, #8b5227) 38%, transparent);
  background: linear-gradient(135deg, var(--preview-booking-accent, #8b5227), var(--preview-booking-start, #603a23));
  color: var(--preview-booking-text, #fff8f1);
}

.theme-preview-flow {
  margin-top: 0;
}

.theme-preview-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.theme-preview-progress i {
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--preview-booking-accent, #8b5227) 24%, #ffffff);
}

.theme-preview-progress i:first-child,
.theme-preview-progress i:nth-child(2) {
  background: var(--preview-booking-accent, #8b5227);
}

.theme-preview-people {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 10px;
}

.theme-preview-people span,
.theme-preview-times span,
.theme-preview-sector span {
  padding: 10px 8px;
  text-align: center;
}

.theme-preview-flow label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
}

.theme-preview-flow label span {
  color: #7a5d49;
}

.theme-preview-times {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 12px;
}

.theme-preview-sector {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 14px;
}

.theme-preview-sector strong {
  grid-column: 1 / -1;
  color: #7a5d49;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.theme-preview-primary {
  width: 100%;
}

.theme-preview-confirmation {
  margin-top: 0;
  border-style: dashed;
}

.theme-preview-confirmation strong {
  display: block;
  color: var(--preview-booking-accent, #8b5227);
  font-family: var(--font-display, inherit);
}

@media (max-width: 980px) {
  .theme-layout,
  .theme-form-row,
  .theme-color-grid {
    grid-template-columns: 1fr;
  }

  .theme-admin-preview {
    grid-template-columns: 1fr;
  }

  .theme-admin-preview-sidebar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .theme-admin-preview-sidebar img,
  .theme-admin-preview-label {
    grid-column: 1 / -1;
  }

  .theme-admin-preview-grid {
    grid-template-columns: 1fr;
  }
}

.waitlist-workspace {
  display: none;
}

.waitlist-workspace.active {
  display: block;
}

.waitlist-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: #f8fff8;
  background:
    linear-gradient(135deg, rgba(26, 94, 76, 0.96), rgba(53, 65, 48, 0.96)),
    var(--theme-sidebar-start, #5b341d);
  box-shadow: var(--shadow-md);
}

.waitlist-hero h3 {
  margin: 6px 0 8px;
  color: #ffffff;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  letter-spacing: 0;
}

.waitlist-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
}

.waitlist-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.waitlist-settings-panel {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.waitlist-settings-panel label {
  display: grid;
  gap: 8px;
}

.waitlist-settings-panel label span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.waitlist-settings-panel small {
  align-self: center;
  color: var(--muted);
}

.waitlist-entry-composer-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 42;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(196, 167, 136, 0.72);
  box-shadow:
    0 40px 90px rgba(31, 61, 54, 0.22),
    0 0 0 100vmax rgba(18, 31, 28, 0.24);
}

body.waitlist-entry-composer-open {
  overflow: hidden;
}

.waitlist-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 18px;
  margin-bottom: 18px;
}

.waitlist-grid-wide {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
}

.waitlist-list {
  display: grid;
  gap: 12px;
}

.waitlist-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.waitlist-row.CALLED {
  border-color: #efca92;
  background: #fffaf0;
}

.waitlist-rank {
  display: grid;
  place-items: center;
  min-height: 72px;
  border-radius: 16px;
  color: #f8fff8;
  background: #1f6f5c;
}

.waitlist-rank strong {
  font-size: 1.35rem;
  line-height: 1;
}

.waitlist-rank span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 800;
}

.waitlist-main {
  min-width: 0;
}

.waitlist-title-line {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.waitlist-title-line strong {
  font-size: 1rem;
}

.waitlist-main p,
.waitlist-main small {
  display: block;
  margin: 6px 0 0;
  color: var(--muted);
}

.waitlist-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.waitlist-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  gap: 8px;
}

.waitlist-ready-soon {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.waitlist-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--theme-sidebar-accent, #8d552a) 34%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--theme-sidebar-start, #5b341d) 8%, #ffffff);
}

.waitlist-soon-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.waitlist-soon-item span {
  color: var(--muted);
  font-size: 0.88rem;
}

.waitlist-heatmap {
  min-height: 220px;
  display: flex;
  gap: 10px;
  align-items: end;
  overflow-x: auto;
  padding: 12px 4px 2px;
}

.heatmap-bar {
  min-width: 58px;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.74rem;
}

.heatmap-bar span {
  width: 28px;
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(180deg, #1f8a70, #f2a65a);
}

.heatmap-bar strong {
  color: var(--text);
}

.waitlist-bottlenecks {
  display: grid;
  gap: 10px;
}

.waitlist-entry-pagination,
.crm-pagination {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 2px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

@media (max-width: 1120px) {
  .waitlist-kpis,
  .waitlist-settings-panel,
  .waitlist-grid,
  .waitlist-grid-wide {
    grid-template-columns: 1fr;
  }

  .waitlist-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .waitlist-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .waitlist-hero {
    display: grid;
  }

  .waitlist-kpis {
    grid-template-columns: 1fr;
  }

  .waitlist-row {
    grid-template-columns: 1fr;
  }

  .waitlist-rank {
    min-height: 58px;
  }
}

.waitlist-dashboard {
  --wl-ink: #10231d;
  --wl-muted: #66756f;
  --wl-line: #dfe8e3;
  --wl-line-strong: #bfd1c8;
  --wl-surface: rgba(255, 255, 255, 0.92);
  --wl-soft: #f5f8f6;
  --wl-green: #0f5f4b;
  --wl-green-strong: #093b31;
  --wl-amber: #b7791f;
  --wl-blue: #2563eb;
  --wl-red: #dc2626;
  --wl-gray: #64748b;
  display: none;
  color: var(--wl-ink);
  font-family: "Inter", "IBM Plex Sans", "Segoe UI", sans-serif;
}

.waitlist-dashboard.active {
  display: block;
}

.waitlist-dashboard .panel {
  border: 1px solid var(--wl-line);
  border-radius: 18px;
  background: var(--wl-surface);
  box-shadow: 0 18px 45px rgba(15, 41, 32, 0.08);
}

.waitlist-dashboard .panel h3,
.waitlist-dashboard .waitlist-command-bar h3,
.waitlist-dashboard .waitlist-kpi-card strong {
  font-family: "Inter", "IBM Plex Sans", sans-serif;
  letter-spacing: 0;
}

.waitlist-command-bar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(360px, auto);
  gap: 16px;
  align-items: center;
  margin: -4px 0 16px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--theme-sidebar-accent, #8d552a) 42%, rgba(255, 255, 255, 0.2));
  border-radius: 20px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--theme-sidebar-start, #5b341d) 96%, transparent), color-mix(in srgb, var(--theme-sidebar-end, #3a2012) 92%, var(--theme-sidebar-accent, #8d552a))),
    var(--theme-sidebar-start, #5b341d);
  box-shadow: 0 22px 55px color-mix(in srgb, var(--theme-sidebar-end, #3a2012) 24%, transparent);
  backdrop-filter: blur(16px);
}

.waitlist-command-copy h3 {
  margin: 7px 0 5px;
  color: var(--theme-sidebar-text, #fff8f1) !important;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.05;
}

.waitlist-command-copy p {
  max-width: 720px;
  margin: 0;
  color: color-mix(in srgb, var(--theme-sidebar-text, #fff8f1) 72%, transparent);
  font-size: 0.92rem;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--theme-sidebar-text, #fff8f1);
  background: color-mix(in srgb, var(--theme-sidebar-text, #fff8f1) 12%, transparent);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.live-pill i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-sidebar-accent, #8d552a) 68%, #ffffff);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--theme-sidebar-accent, #8d552a) 70%, transparent);
  animation: waitlistPulse 1.7s ease-out infinite;
}

.waitlist-command-meta {
  display: grid;
  gap: 3px;
  min-width: 160px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--theme-sidebar-text, #fff8f1) 18%, transparent);
  border-radius: 14px;
  color: var(--theme-sidebar-text, #fff8f1);
  background: color-mix(in srgb, var(--theme-sidebar-text, #fff8f1) 11%, transparent);
}

.waitlist-command-meta span {
  font-size: 1.2rem;
  font-weight: 800;
}

.waitlist-command-meta small,
.waitlist-command-meta strong {
  color: color-mix(in srgb, var(--theme-sidebar-text, #fff8f1) 72%, transparent);
  font-size: 0.72rem;
}

.waitlist-command-actions {
  justify-content: flex-end;
}

.waitlist-dashboard .button {
  min-height: 40px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 800;
}

.waitlist-dashboard .button-primary {
  color: var(--theme-sidebar-text, #fff8f1);
  background: linear-gradient(135deg, var(--theme-sidebar-accent, #8d552a), var(--theme-sidebar-start, #5b341d));
  box-shadow: 0 14px 26px color-mix(in srgb, var(--theme-sidebar-end, #3a2012) 24%, transparent);
}

.waitlist-dashboard .button-secondary {
  color: var(--theme-sidebar-start, #5b341d);
  background: color-mix(in srgb, var(--theme-sidebar-text, #fff8f1) 88%, var(--theme-sidebar-accent, #8d552a));
}

.button-ghost {
  color: var(--theme-sidebar-text, #fff8f1);
  border: 1px solid color-mix(in srgb, var(--theme-sidebar-text, #fff8f1) 24%, transparent);
  background: color-mix(in srgb, var(--theme-sidebar-text, #fff8f1) 9%, transparent);
}

.waitlist-kpi-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(132px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.waitlist-kpi-card {
  position: relative;
  min-height: 112px;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--wl-line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 41, 32, 0.06);
}

.waitlist-kpi-card::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(15, 95, 75, 0.12), rgba(183, 121, 31, 0.22));
}

.waitlist-kpi-card span {
  display: block;
  color: var(--wl-muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.waitlist-kpi-card strong {
  display: block;
  margin-top: 12px;
  color: var(--wl-ink) !important;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1;
}

.waitlist-kpi-card small {
  display: block;
  margin-top: 9px;
  color: var(--wl-muted);
  font-size: 0.78rem;
}

.waitlist-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(320px, 0.72fr);
  gap: 16px;
  align-items: start;
}

.waitlist-section-head {
  margin-bottom: 12px;
}

.waitlist-toolbar {
  align-items: center;
}

.waitlist-toolbar select,
#waitlist-status-filter {
  border-color: color-mix(in srgb, var(--theme-sidebar-accent, #8d552a) 38%, var(--line));
  color: var(--theme-sidebar-start, #5b341d);
  background: color-mix(in srgb, var(--theme-sidebar-start, #5b341d) 6%, #ffffff);
}

.waitlist-toolbar select:focus,
#waitlist-status-filter:focus {
  border-color: var(--theme-sidebar-accent, #8d552a);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--theme-sidebar-accent, #8d552a) 18%, transparent);
}

.waitlist-tabs .mode-toggle {
  color: color-mix(in srgb, var(--theme-sidebar-start, #5b341d) 78%, var(--muted));
}

.waitlist-tabs .mode-toggle.active {
  color: var(--theme-sidebar-text, #fff8f1);
  background: linear-gradient(135deg, var(--theme-sidebar-accent, #8d552a), var(--theme-sidebar-start, #5b341d));
  box-shadow: 0 12px 22px color-mix(in srgb, var(--theme-sidebar-start, #5b341d) 20%, transparent);
}

.waitlist-best-call {
  display: inline-flex;
  align-items: center;
  max-width: 340px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #cbe4d8;
  border-radius: 999px;
  color: #0d5f4a;
  background: #edf9f3;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.waitlist-ticket-list {
  display: grid;
  gap: 10px;
  max-height: min(720px, calc(100vh - 330px));
  overflow: auto;
  padding-right: 4px;
}

.waitlist-ticket {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) minmax(150px, 0.24fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--wl-line);
  border-left: 4px solid var(--wl-amber);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 41, 32, 0.06);
  animation: waitlistTicketIn 0.28s ease both;
}

.waitlist-ticket.status-CALLED,
.waitlist-ticket.status-SEATED {
  border-left-color: #16a34a;
}

.waitlist-ticket.status-STANDBY {
  border-left-color: #2563eb;
}

.waitlist-ticket.status-NO_SHOW,
.waitlist-ticket.status-CANCELED,
.waitlist-ticket.status-EXPIRED {
  border-left-color: #94a3b8;
  opacity: 0.82;
}

.waitlist-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f5f4b, #1f8a70);
  font-weight: 900;
}

.waitlist-ticket-main {
  min-width: 0;
}

.waitlist-ticket-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.waitlist-ticket-title strong {
  color: var(--wl-ink);
  font-size: 0.96rem;
}

.waitlist-ticket-meta,
.waitlist-ticket-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 7px;
  color: var(--wl-muted);
  font-size: 0.78rem;
}

.waitlist-ticket-meta span,
.waitlist-ticket-foot span,
.waitlist-vip-badge,
.waitlist-score-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--wl-soft);
  color: var(--wl-muted);
  font-weight: 750;
}

.waitlist-vip-badge {
  color: #7c4a03;
  background: #fff4d6;
}

.waitlist-customer-confirmed,
.waitlist-confirmed-note {
  color: #0f5f4b;
  background: color-mix(in srgb, #0f5f4b 14%, #ffffff);
}

.waitlist-confirmed-note {
  display: inline-flex;
  width: fit-content;
  margin: 6px 0 0;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 0.78rem;
  font-weight: 750;
}

.waitlist-score-badge {
  color: #0d5f4a;
  background: #e7f8ef;
}

.waitlist-eta-block {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.waitlist-eta-block strong {
  color: var(--wl-ink);
  font-size: 0.92rem;
}

.eta-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eee9;
}

.eta-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #16a34a, #f59e0b);
}

.waitlist-ticket .waitlist-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(82px, 1fr));
  gap: 7px;
}

.waitlist-dashboard .mini-action {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 0.75rem;
}

.waitlist-empty-state {
  display: grid;
  place-items: center;
  min-height: 310px;
  padding: 28px;
  border: 1px dashed var(--wl-line-strong);
  border-radius: 18px;
  color: var(--wl-muted);
  background: linear-gradient(180deg, #ffffff, #f7fbf8);
  text-align: center;
}

.waitlist-empty-state strong {
  display: block;
  margin-top: 12px;
  color: var(--wl-ink);
  font-size: 1.1rem;
}

.waitlist-empty-illustration {
  display: grid;
  grid-template-columns: repeat(3, 32px);
  gap: 8px;
}

.waitlist-empty-illustration i {
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(180deg, #e6f4ed, #ffffff);
  border: 1px solid var(--wl-line);
}

.waitlist-ai-column {
  position: sticky;
  top: 96px;
}

.waitlist-ai-panel {
  display: grid;
  gap: 12px;
}

.waitlist-ai-insights {
  display: grid;
  gap: 9px;
}

.waitlist-intel-pagination {
  margin-top: 0;
  padding-top: 8px;
}

.waitlist-insight-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--wl-line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f7fbf8);
}

.waitlist-insight-card strong {
  color: var(--wl-ink);
  font-size: 0.9rem;
}

.waitlist-insight-card span {
  color: var(--wl-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.waitlist-ops-grid,
.waitlist-analytics-grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.waitlist-ops-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.8fr);
}

.waitlist-entry-composer-panel {
  position: fixed;
}

.waitlist-release-form {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.waitlist-release-form .span-2 {
  grid-column: span 4;
}

.waitlist-ready-soon {
  display: grid;
  gap: 9px;
}

.waitlist-soon-item {
  border-color: var(--wl-line);
  border-radius: 12px;
  background: #f8fbf9;
}

.waitlist-analytics-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.waitlist-analytics-card {
  min-height: 220px;
}

.waitlist-line-chart,
.waitlist-bar-chart,
.waitlist-mini-heatmap {
  min-height: 132px;
  margin-top: 14px;
}

.waitlist-line-chart {
  display: flex;
  align-items: end;
  gap: 8px;
}

.waitlist-line-chart span {
  flex: 1;
  min-width: 10px;
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(180deg, #0f5f4b, #b7791f);
}

.waitlist-bar-chart {
  display: grid;
  gap: 10px;
}

.waitlist-bar-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
  color: var(--wl-muted);
  font-size: 0.78rem;
}

.waitlist-bar-row i {
  height: 9px;
  border-radius: 999px;
  background: #e6eee9;
  overflow: hidden;
}

.waitlist-bar-row i::before {
  content: "";
  display: block;
  width: var(--value, 40%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f5f4b, #1f8a70);
}

.waitlist-mini-heatmap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
}

.waitlist-mini-heatmap span {
  min-height: 28px;
  border-radius: 8px;
  background: color-mix(in srgb, #0f5f4b var(--heat, 35%), #edf5f0);
}

.status-badge.WAITING {
  background: #fff7d6;
  color: #8a5a00;
}

.status-badge.STANDBY {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-badge.CALLED,
.status-badge.CUSTOMER_CONFIRMED,
.status-badge.SEATED {
  background: #dcfce7;
  color: #166534;
}

.status-badge.NO_SHOW,
.status-badge.CANCELED,
.status-badge.EXPIRED {
  background: #eef2f7;
  color: #64748b;
}

.waitlist-skeleton {
  position: relative;
  overflow: hidden;
  min-height: 76px;
  border-radius: 16px;
  background: #eef4f1;
}

.waitlist-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  animation: waitlistShimmer 1.4s infinite;
}

@keyframes waitlistPulse {
  100% {
    box-shadow: 0 0 0 12px rgba(52, 211, 153, 0);
  }
}

@keyframes waitlistTicketIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes waitlistShimmer {
  100% {
    transform: translateX(100%);
  }
}

@media (min-width: 1440px) {
  .waitlist-main-grid {
    grid-template-columns: minmax(0, 1.72fr) minmax(360px, 0.62fr);
  }
}

@media (max-width: 1280px) {
  .waitlist-command-bar {
    grid-template-columns: 1fr;
  }

  .waitlist-command-actions {
    justify-content: flex-start;
  }

  .waitlist-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .waitlist-main-grid,
  .waitlist-ops-grid {
    grid-template-columns: 1fr;
  }

  .waitlist-ai-column {
    position: static;
  }
}

@media (max-width: 920px) {
  .waitlist-kpi-grid,
  .waitlist-analytics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .waitlist-ticket {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .waitlist-eta-block,
  .waitlist-ticket .waitlist-actions {
    grid-column: 1 / -1;
  }

  .waitlist-release-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .waitlist-release-form .span-2 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .waitlist-command-bar {
    margin-inline: -4px;
    border-radius: 16px;
  }

  .waitlist-kpi-grid,
  .waitlist-analytics-grid,
  .waitlist-release-form {
    grid-template-columns: 1fr;
  }

  .waitlist-dashboard .button {
    width: 100%;
  }

  .waitlist-ticket-list {
    max-height: none;
  }

  .waitlist-ticket {
    grid-template-columns: 1fr;
  }

  .waitlist-avatar {
    width: 42px;
  }

  .waitlist-ticket .waitlist-actions {
    grid-template-columns: 1fr 1fr;
  }

  .waitlist-primary-action {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 30;
    width: auto !important;
    min-width: 166px;
    box-shadow: 0 18px 44px rgba(9, 59, 49, 0.28);
  }
}

.reports-premium {
  --rp-ink: #101828;
  --rp-muted: #667085;
  --rp-line: #e4e7ec;
  --rp-soft: #f8fafc;
  --rp-card: rgba(255, 255, 255, 0.94);
  --rp-green: #087443;
  --rp-blue: #175cd3;
  --rp-amber: #b54708;
  --rp-red: #b42318;
  --rp-violet: #6941c6;
  display: none;
  gap: 14px;
  color: var(--rp-ink);
  font-family: "Inter", "IBM Plex Sans", sans-serif;
}

.reports-premium.active {
  display: grid;
}

.reports-premium .panel {
  border: 1px solid var(--rp-line);
  border-radius: 18px;
  background: var(--rp-card);
  box-shadow: 0 18px 44px rgba(16, 24, 40, 0.07);
}

.reports-premium .panel h3,
.reports-command-bar h3,
.reports-kpi-card strong {
  font-family: "Inter", "IBM Plex Sans", sans-serif;
  letter-spacing: 0;
}

.reports-command-bar {
  position: sticky;
  top: 0;
  z-index: 14;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(228, 231, 236, 0.86);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(12, 18, 32, 0.96), rgba(24, 57, 94, 0.94)),
    #101828;
  box-shadow: 0 24px 54px rgba(16, 24, 40, 0.18);
  backdrop-filter: blur(16px);
}

.reports-command-bar h3 {
  margin: 8px 0 5px;
  color: #ffffff !important;
  font-size: clamp(1.38rem, 2.4vw, 2.05rem);
  line-height: 1.05;
}

.reports-command-bar p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
}

.reports-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #d1fadf;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.reports-live-badge i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #12b76a;
  animation: reportsPulse 1.7s infinite;
}

.reports-command-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.reports-command-actions label {
  display: grid;
  gap: 4px;
  min-width: 138px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.reports-command-actions input {
  min-height: 40px;
  border-color: rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.reports-command-actions .button {
  min-height: 40px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 850;
}

.reports-command-actions .button-primary {
  color: #0b2f1d;
  background: linear-gradient(135deg, #d1fadf, #6ce9a6);
  box-shadow: 0 14px 28px rgba(18, 183, 106, 0.18);
}

.reports-dashboard-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 6px;
  border: 1px solid var(--rp-line);
  border-radius: 14px;
  background: #ffffff;
}

.reports-dashboard-tabs .mode-toggle {
  min-width: max-content;
}

.reports-dashboard-tabs .mode-toggle.active {
  color: #ffffff;
  background: #101828;
}

.reports-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
}

.reports-kpi-card {
  position: relative;
  min-height: 132px;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--rp-line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.05);
}

.reports-kpi-card::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 54px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(23, 92, 211, 0.12), rgba(18, 183, 106, 0.2));
}

.reports-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.reports-kpi-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: #175cd3;
  background: #eff8ff;
  font-size: 0.92rem;
  font-weight: 900;
}

.reports-kpi-card span {
  color: var(--rp-muted);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.reports-kpi-card strong {
  display: block;
  margin-top: 14px;
  color: var(--rp-ink) !important;
  font-size: clamp(1.42rem, 2.2vw, 2.08rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.reports-kpi-card small {
  display: block;
  margin-top: 8px;
  color: var(--rp-muted);
  font-size: 0.76rem;
}

.reports-kpi-trend {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: #067647;
  background: #ecfdf3;
  font-size: 0.72rem;
  font-weight: 850;
}

.reports-kpi-trend.is-down {
  color: #b42318;
  background: #fef3f2;
}

.reports-spark {
  display: flex;
  align-items: end;
  gap: 3px;
  height: 24px;
  margin-top: 12px;
}

.reports-spark i {
  flex: 1;
  min-width: 5px;
  border-radius: 999px 999px 3px 3px;
  background: linear-gradient(180deg, #175cd3, #12b76a);
}

.reports-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(320px, 0.62fr);
  gap: 14px;
  align-items: start;
}

.reports-analytics-stack,
.reports-ai-insights,
.reports-ranking-list,
.reports-forecast,
.reports-loyalty-panel {
  display: grid;
  gap: 12px;
}

.report-hero-chart {
  min-height: 360px;
}

.reports-line-chart {
  min-height: 260px;
}

.reports-line-svg {
  display: block;
  width: 100%;
  height: 270px;
}

.reports-line-grid {
  stroke: #eef2f6;
  stroke-width: 1;
}

.reports-line-axis {
  stroke: #d0d5dd;
  stroke-width: 1.2;
}

.reports-line-area {
  fill: rgba(23, 92, 211, 0.11);
}

.reports-line-previous {
  fill: none;
  stroke: #98a2b3;
  stroke-dasharray: 7 7;
  stroke-width: 3;
}

.reports-line-current {
  fill: none;
  stroke: #175cd3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.reports-line-dot {
  fill: #ffffff;
  stroke: #175cd3;
  stroke-width: 3;
}

.reports-axis-label {
  fill: #667085;
  font-size: 0.68rem;
  font-weight: 700;
}

.reports-growth-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: #067647;
  background: #ecfdf3;
  font-size: 0.78rem;
  font-weight: 850;
}

.reports-growth-pill.is-down {
  color: #b42318;
  background: #fef3f2;
}

.reports-secondary-grid,
.reports-deep-grid {
  display: grid;
  gap: 14px;
}

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

.reports-deep-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-widget-card {
  min-height: 260px;
}

.reports-heatmap {
  display: grid;
  grid-template-columns: 56px repeat(4, minmax(42px, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.reports-heatmap span,
.reports-heatmap strong {
  display: grid;
  min-height: 34px;
  place-items: center;
  border-radius: 9px;
  font-size: 0.72rem;
}

.reports-heatmap strong {
  color: var(--rp-muted);
  background: #f8fafc;
}

.reports-heatmap span {
  color: #102a43;
  background: color-mix(in srgb, #175cd3 var(--heat, 28%), #f2f4f7);
  font-weight: 800;
}

.reports-funnel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.reports-funnel-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 54px;
  gap: 10px;
  align-items: center;
  color: var(--rp-muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.reports-funnel-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f6;
}

.reports-funnel-bar i {
  display: block;
  width: var(--value, 50%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #175cd3, #12b76a);
}

.reports-intelligence-column {
  position: sticky;
  top: 104px;
}

.reports-ai-card,
.reports-ranking-item,
.reports-forecast-item,
.reports-loyalty-item {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--rp-line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.reports-ai-card strong,
.reports-ranking-item strong,
.reports-forecast-item strong,
.reports-loyalty-item strong {
  color: var(--rp-ink);
  font-size: 0.9rem;
}

.reports-ai-card span,
.reports-ranking-item span,
.reports-forecast-item span,
.reports-loyalty-item span {
  color: var(--rp-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.reports-ai-card.warning {
  border-color: #fedf89;
  background: #fffcf5;
}

.reports-ai-card.danger {
  border-color: #fecdca;
  background: #fffbfa;
}

.reports-donut-layout {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 14px;
}

.reports-donut {
  width: 142px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: conic-gradient(var(--segments, #175cd3 0 70%, #e4e7ec 70% 100%));
  box-shadow: inset 0 0 0 28px #ffffff;
}

.reports-donut-legend {
  display: grid;
  gap: 8px;
}

.reports-donut-legend span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--rp-muted);
  font-size: 0.78rem;
}

.reports-donut-legend i {
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 999px;
  background: var(--dot);
}

.reports-ranking-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.reports-ranking-meter {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f6;
}

.reports-ranking-meter i {
  display: block;
  width: var(--value, 30%);
  height: 100%;
  background: linear-gradient(90deg, #6941c6, #175cd3);
}

.reports-drilldown-panel {
  overflow: hidden;
}

.reports-drilldown-table {
  overflow-x: auto;
}

.reports-drilldown-table table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.reports-drilldown-table th,
.reports-drilldown-table td {
  padding: 12px;
  border-bottom: 1px solid var(--rp-line);
  text-align: left;
  vertical-align: top;
}

.reports-drilldown-table th {
  color: var(--rp-muted);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.reports-empty-state {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 28px;
  border: 1px dashed #d0d5dd;
  border-radius: 16px;
  color: var(--rp-muted);
  background: #f8fafc;
  text-align: center;
}

.reports-empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--rp-ink);
  font-size: 1.08rem;
}

.reports-skeleton {
  position: relative;
  overflow: hidden;
  min-height: 96px;
  border-radius: 16px;
  background: #eef2f6;
}

.reports-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  animation: reportsShimmer 1.4s infinite;
}

@keyframes reportsPulse {
  100% {
    box-shadow: 0 0 0 12px rgba(18, 183, 106, 0);
  }
}

@keyframes reportsShimmer {
  100% {
    transform: translateX(100%);
  }
}

@media (max-width: 1380px) {
  .reports-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 1120px) {
  .reports-command-bar,
  .reports-main-grid,
  .reports-secondary-grid {
    grid-template-columns: 1fr;
  }

  .reports-command-actions {
    justify-content: flex-start;
  }

  .reports-intelligence-column {
    position: static;
  }
}

@media (max-width: 760px) {
  .reports-command-bar {
    margin-inline: -4px;
    border-radius: 16px;
  }

  .reports-command-actions,
  .reports-command-actions label,
  .reports-command-actions .button {
    width: 100%;
  }

  .reports-kpi-grid {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
  }

  .reports-kpi-card {
    min-width: 230px;
    scroll-snap-align: start;
  }

  .reports-deep-grid,
  .reports-donut-layout {
    grid-template-columns: 1fr;
  }

  .reports-heatmap {
    grid-template-columns: 42px repeat(4, minmax(34px, 1fr));
    gap: 5px;
  }

  .reports-funnel-row {
    grid-template-columns: 92px minmax(0, 1fr) 42px;
  }
}

.client-crm-premium {
  --crm-ink: #101828;
  --crm-muted: #667085;
  --crm-line: #e4e7ec;
  --crm-soft: #f8fafc;
  --crm-card: rgba(255, 255, 255, 0.94);
  --crm-green: #067647;
  --crm-blue: #175cd3;
  --crm-gold: #b54708;
  --crm-red: #b42318;
  --crm-gray: #667085;
  display: none;
  gap: 14px;
  color: var(--crm-ink);
  font-family: "Inter", "IBM Plex Sans", sans-serif;
}

.client-crm-premium.active {
  display: grid;
}

.client-crm-premium .panel {
  border: 1px solid var(--crm-line);
  border-radius: 18px;
  background: var(--crm-card);
  box-shadow: 0 18px 44px rgba(16, 24, 40, 0.07);
}

.client-crm-command-bar {
  position: sticky;
  top: 0;
  z-index: 14;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(420px, auto);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--theme-sidebar-accent, #8d552a) 42%, rgba(255, 255, 255, 0.2));
  border-radius: 20px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--theme-sidebar-start, #5b341d) 96%, transparent), color-mix(in srgb, var(--theme-sidebar-end, #3a2012) 92%, var(--theme-sidebar-accent, #8d552a))),
    var(--theme-sidebar-start, #5b341d);
  box-shadow: 0 24px 54px color-mix(in srgb, var(--theme-sidebar-end, #3a2012) 24%, transparent);
  backdrop-filter: blur(16px);
}

.client-crm-command-bar h3 {
  margin: 8px 0 5px;
  color: var(--theme-sidebar-text, #fff8f1) !important;
  font-family: "Inter", "IBM Plex Sans", sans-serif;
  font-size: clamp(1.38rem, 2.4vw, 2.05rem);
  line-height: 1.05;
}

.client-crm-command-bar p {
  margin: 0;
  color: color-mix(in srgb, var(--theme-sidebar-text, #fff8f1) 70%, transparent);
  font-size: 0.9rem;
}

.client-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--theme-sidebar-text, #fff8f1);
  background: color-mix(in srgb, var(--theme-sidebar-text, #fff8f1) 12%, transparent);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.client-live-badge i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-sidebar-accent, #8d552a) 68%, #ffffff);
  animation: clientPulse 1.7s infinite;
}

.client-crm-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.client-crm-actions input {
  width: auto;
  min-width: 142px;
  min-height: 40px;
  border-color: color-mix(in srgb, var(--theme-sidebar-accent, #8d552a) 42%, rgba(255, 255, 255, 0.18));
  border-radius: 10px;
  color: var(--theme-sidebar-text, #fff8f1);
  background: color-mix(in srgb, var(--theme-sidebar-start, #5b341d) 28%, transparent);
}

.client-crm-actions input[type="search"] {
  min-width: 260px;
}

.client-crm-actions input::placeholder {
  color: color-mix(in srgb, var(--theme-sidebar-text, #fff8f1) 62%, transparent);
}

.client-crm-actions .button {
  min-height: 40px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 850;
}

.client-crm-actions .button-primary {
  color: var(--theme-sidebar-text, #fff8f1);
  background: linear-gradient(135deg, var(--theme-sidebar-accent, #8d552a), var(--theme-sidebar-start, #5b341d));
  box-shadow: 0 14px 28px color-mix(in srgb, var(--theme-sidebar-start, #5b341d) 24%, transparent);
}

.client-crm-actions .button-secondary {
  color: var(--theme-sidebar-start, #5b341d);
  background: color-mix(in srgb, var(--theme-sidebar-accent, #8d552a) 18%, #fffdfa);
}

.client-crm-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 0;
}

.client-crm-kpis .client-summary-chip {
  position: relative;
  min-height: 122px;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--crm-line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.05);
}

.client-crm-kpis .client-summary-chip::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 54px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(105, 65, 198, 0.14), rgba(18, 183, 106, 0.2));
}

.client-crm-kpis .client-summary-chip span {
  color: var(--crm-muted);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.client-crm-kpis .client-summary-chip strong {
  margin-top: 12px;
  color: var(--crm-ink);
  font-family: "Inter", "IBM Plex Sans", sans-serif;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
}

.client-kpi-detail,
.client-kpi-trend {
  display: block;
  margin-top: 8px;
  color: var(--crm-muted);
  font-size: 0.76rem;
}

.client-kpi-trend {
  width: fit-content;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #067647;
  background: #ecfdf3;
  font-weight: 850;
}

.client-kpi-trend.is-down {
  color: #b42318;
  background: #fef3f2;
}

.client-segment-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--theme-sidebar-accent, #8d552a) 34%, var(--crm-line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--theme-sidebar-start, #5b341d) 7%, #ffffff);
}

.client-segment-bar .mode-toggle {
  min-width: max-content;
}

.client-segment-bar .mode-toggle.active {
  color: var(--theme-sidebar-text, #fff8f1);
  background: linear-gradient(135deg, var(--theme-sidebar-accent, #8d552a), var(--theme-sidebar-start, #5b341d));
}

.client-crm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(320px, 0.62fr);
  gap: 14px;
  align-items: start;
}

.client-crm-list-panel {
  min-width: 0;
}

.client-crm-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: #175cd3;
  background: #eff8ff;
  font-size: 0.78rem;
  font-weight: 850;
}

.client-crm-sidebar {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 14px;
}

.client-crm-insights,
.client-crm-analytics {
  display: grid;
  gap: 10px;
}

.client-insight-card,
.client-analytics-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--crm-line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.client-insight-card strong,
.client-analytics-card strong {
  color: var(--crm-ink);
  font-size: 0.9rem;
}

.client-insight-card span,
.client-analytics-card span {
  color: var(--crm-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.client-insight-card.warning {
  border-color: #fedf89;
  background: #fffcf5;
}

.client-insight-card.danger {
  border-color: #fecdca;
  background: #fffbfa;
}

.client-table-list.crm-card-list {
  display: grid;
  gap: 10px;
  max-height: min(760px, calc(100vh - 340px));
  overflow: auto;
  padding-right: 4px;
}

.crm-customer-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1.1fr) minmax(160px, 0.64fr) minmax(136px, 0.46fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--crm-line);
  border-left: 4px solid #98a2b3;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.05);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.crm-customer-card:hover,
.crm-customer-card.is-selected {
  border-color: #a4bcfd;
  box-shadow: 0 16px 34px rgba(23, 92, 211, 0.11);
  transform: translateY(-1px);
}

.crm-customer-card.segment-VIP {
  border-left-color: #d97706;
}

.crm-customer-card.segment-RECURRENT {
  border-left-color: #12b76a;
}

.crm-customer-card.segment-NEW {
  border-left-color: #175cd3;
}

.crm-customer-card.segment-RISK {
  border-left-color: #f04438;
}

.crm-customer-card.segment-INACTIVE {
  border-left-color: #98a2b3;
}

.crm-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #6941c6, #175cd3);
  font-size: 0.82rem;
  font-weight: 900;
}

.crm-customer-main,
.crm-customer-value,
.crm-customer-score {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.crm-customer-main strong {
  color: var(--crm-ink);
  font-size: 0.98rem;
}

.crm-customer-main span,
.crm-customer-meta,
.crm-customer-value span,
.crm-customer-score span {
  color: var(--crm-muted);
  font-size: 0.78rem;
}

.crm-customer-meta,
.crm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crm-customer-meta span,
.crm-tag,
.crm-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f2f4f7;
  color: var(--crm-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.crm-status-badge.VIP {
  color: #92400e;
  background: #fef3c7;
}

.crm-status-badge.RECURRENT {
  color: #067647;
  background: #ecfdf3;
}

.crm-status-badge.NEW {
  color: #175cd3;
  background: #eff8ff;
}

.crm-status-badge.RISK {
  color: #b42318;
  background: #fef3f2;
}

.crm-status-badge.INACTIVE {
  color: #667085;
  background: #f2f4f7;
}

.crm-customer-value strong,
.crm-customer-score strong {
  color: var(--crm-ink);
  font-size: 1.08rem;
  line-height: 1;
}

.crm-score-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f6;
}

.crm-score-track i {
  display: block;
  width: var(--score, 40%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f79009, #12b76a);
}

.crm-card-actions {
  display: grid;
  gap: 7px;
}

.client-empty-crm {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 28px;
  border: 1px dashed #d0d5dd;
  border-radius: 16px;
  color: var(--crm-muted);
  background: #f8fafc;
  text-align: center;
}

.client-empty-crm strong {
  display: block;
  margin-bottom: 6px;
  color: var(--crm-ink);
  font-size: 1.08rem;
}

.client-profile-drawer .client-edit-spotlight {
  display: grid;
  gap: 12px;
}

.crm-profile-hero {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.crm-profile-metrics,
.crm-profile-timeline {
  display: grid;
  gap: 8px;
}

.crm-profile-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-profile-metric,
.crm-timeline-item {
  padding: 10px;
  border: 1px solid var(--crm-line);
  border-radius: 12px;
  background: #ffffff;
}

.crm-profile-metric span,
.crm-timeline-item span {
  color: var(--crm-muted);
  font-size: 0.74rem;
}

.crm-profile-metric strong,
.crm-timeline-item strong {
  display: block;
  margin-top: 4px;
  color: var(--crm-ink);
  font-size: 0.9rem;
}

@keyframes clientPulse {
  100% {
    box-shadow: 0 0 0 12px rgba(18, 183, 106, 0);
  }
}

@media (max-width: 1280px) {
  .client-crm-command-bar,
  .client-crm-layout {
    grid-template-columns: 1fr;
  }

  .client-crm-actions {
    justify-content: flex-start;
  }

  .client-crm-sidebar {
    position: static;
  }

  .client-crm-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .client-crm-kpis {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
  }

  .client-crm-kpis .client-summary-chip {
    min-width: 230px;
    scroll-snap-align: start;
  }

  .crm-customer-card {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .crm-customer-value,
  .crm-customer-score,
  .crm-card-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .client-crm-command-bar {
    margin-inline: -4px;
    border-radius: 16px;
  }

  .client-crm-actions,
  .client-crm-actions input,
  .client-crm-actions .button {
    width: 100%;
  }

  .client-table-list.crm-card-list {
    max-height: none;
  }

  .crm-customer-card {
    grid-template-columns: 1fr;
  }
}

/* ReservaX Design System token bridge
   Final layer: normalizes legacy screens to white-label SaaS theme tokens. */
:where(.sidebar) {
  background: linear-gradient(to bottom, var(--theme-sidebar-start), var(--theme-sidebar-end)) !important;
  color: var(--theme-sidebar-text) !important;
}

:where(.nav-link, .sidebar-logout-button) {
  color: color-mix(in srgb, var(--theme-sidebar-text) 78%, transparent) !important;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

:where(.nav-link:hover, .sidebar-logout-button:hover) {
  background: color-mix(in srgb, var(--theme-sidebar-text) 13%, transparent) !important;
  color: var(--theme-sidebar-text) !important;
}

:where(.nav-link.active) {
  background: var(--theme-sidebar-accent) !important;
  color: var(--theme-sidebar-text) !important;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--theme-sidebar-accent) 28%, transparent), inset 0 1px 0 color-mix(in srgb, var(--theme-sidebar-text) 18%, transparent) !important;
}

@media (min-width: 1081px) {
  .sidebar {
    max-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
  }

  .brand-card,
  .sidebar-footer {
    flex-shrink: 0;
  }

  .sidebar-nav {
    flex: 1 0 auto;
    min-height: 0;
    align-content: start;
  }
}

@media (min-width: 1081px) and (max-height: 760px) {
  .sidebar {
    gap: 14px;
    padding: 18px 16px;
  }

  .brand-card {
    padding: 8px;
    border-radius: 18px;
  }

  .brand-image {
    max-height: 96px;
    object-fit: contain;
  }

  .sidebar-nav {
    gap: 12px;
  }

  .nav-group {
    gap: 6px;
  }

  .nav-group-secondary {
    margin-top: 2px;
    padding-top: 10px;
  }

  .nav-link {
    min-height: 40px;
    padding: 10px 12px;
  }

  .nav-icon {
    flex-basis: 24px;
    width: 24px;
    height: 24px;
  }

  .sidebar-logout-button {
    padding: 10px 12px;
  }
}

:where(body) {
  color: var(--theme-text);
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--theme-primary) 13%, transparent), transparent 28rem),
    linear-gradient(135deg, var(--theme-background), color-mix(in srgb, var(--theme-background) 72%, #ffffff));
}

:where(.topbar, .hero-panel, .waitlist-command-bar, .client-crm-command-bar, .reports-command-bar, .panel-header-emphasis) {
  border: 1px solid color-mix(in srgb, var(--theme-primary) 32%, var(--theme-border)) !important;
  background: var(--theme-header) !important;
  color: var(--theme-header-text) !important;
  box-shadow: var(--theme-shadow) !important;
}

:where(.topbar h2, .topbar p, .hero-panel h3, .hero-panel p, .waitlist-command-bar h3, .waitlist-command-bar p, .client-crm-command-bar h3, .client-crm-command-bar p, .reports-command-bar h3, .reports-command-bar p) {
  color: var(--theme-header-text) !important;
}

:where(.panel, .stat-card, .summary-chip, .stack-item, .reservation-card, .table-card, .sector-column, .crm-customer-card, .client-summary-chip, .waitlist-kpi-card, .waitlist-ticket, .report-kpi-card, .theme-preview-card, .client-insight-card, .client-analytics-card) {
  border-color: var(--theme-border) !important;
  background: var(--theme-card) !important;
  color: var(--theme-text) !important;
  box-shadow: var(--theme-shadow);
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

:where(.panel:hover, .stat-card:hover, .summary-chip:hover, .stack-item:hover, .reservation-card:hover, .table-card:hover, .sector-column:hover, .crm-customer-card:hover, .waitlist-ticket:hover, .report-kpi-card:hover) {
  border-color: color-mix(in srgb, var(--theme-primary) 48%, var(--theme-border)) !important;
  background: var(--theme-card-hover) !important;
  box-shadow: 0 22px 52px color-mix(in srgb, var(--theme-sidebar-end) 16%, transparent);
}

:where(button, .button, .mini-action, .mode-toggle) {
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease, filter 180ms ease;
}

:where(.button-primary, button[type="submit"]:not(.button-light):not(.button-danger), .mini-action.success) {
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-primary-hover)) !important;
  color: var(--theme-sidebar-text) !important;
  box-shadow: 0 12px 26px color-mix(in srgb, var(--theme-primary) 24%, transparent) !important;
}

:where(.button-primary:hover, button[type="submit"]:hover, .mini-action.success:hover) {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

:where(.button-secondary, .button-light, .button-muted, .mini-action, .mode-toggle) {
  border: 1px solid color-mix(in srgb, var(--theme-primary) 24%, var(--theme-border)) !important;
  background: color-mix(in srgb, var(--theme-primary) 10%, var(--theme-card)) !important;
  color: var(--theme-primary-hover) !important;
}

:where(.button-secondary:hover, .button-light:hover, .button-muted:hover, .mini-action:hover, .mode-toggle:hover) {
  background: color-mix(in srgb, var(--theme-primary) 16%, var(--theme-card)) !important;
  transform: translateY(-1px);
}

:where(.button-danger, .mini-action.warning) {
  background: color-mix(in srgb, var(--theme-danger) 14%, #ffffff) !important;
  color: var(--theme-danger) !important;
  border-color: color-mix(in srgb, var(--theme-danger) 28%, var(--theme-border)) !important;
}

:where(.button-ghost, .outline-button) {
  background: transparent !important;
  color: var(--theme-primary) !important;
  border: 1px solid color-mix(in srgb, var(--theme-primary) 34%, var(--theme-border)) !important;
}

:where(button:disabled, .button:disabled, .mini-action:disabled, input:disabled, select:disabled, textarea:disabled) {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none !important;
  box-shadow: none !important;
}

:where(input, select, textarea, .search-field) {
  border-color: var(--theme-input-border) !important;
  background: var(--theme-input) !important;
  color: var(--theme-text) !important;
}

:where(input:hover, select:hover, textarea:hover) {
  border-color: color-mix(in srgb, var(--theme-primary) 42%, var(--theme-input-border)) !important;
}

:where(input:focus, select:focus, textarea:focus) {
  border-color: var(--theme-input-focus) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--theme-primary) 18%, transparent) !important;
}

:where(input::placeholder, textarea::placeholder) {
  color: color-mix(in srgb, var(--theme-text-secondary) 72%, transparent);
}

:where(.client-crm-actions input) {
  border-color: color-mix(in srgb, var(--theme-sidebar-text) 18%, var(--theme-primary)) !important;
  background: color-mix(in srgb, var(--theme-sidebar-text) 10%, transparent) !important;
  color: var(--theme-sidebar-text) !important;
}

:where(.reservation-view-toggle, .client-segment-bar, .waitlist-tabs, .reports-dashboard-tabs, .header-actions, .reservation-filter-panel) {
  border-color: color-mix(in srgb, var(--theme-primary) 26%, var(--theme-border)) !important;
  background: color-mix(in srgb, var(--theme-primary) 7%, var(--theme-card)) !important;
}

:where(.mode-toggle.active, .client-segment-bar .mode-toggle.active, .waitlist-tabs .mode-toggle.active, .reports-dashboard-tabs .mode-toggle.active) {
  background: var(--theme-primary) !important;
  color: var(--theme-sidebar-text) !important;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--theme-primary) 22%, transparent) !important;
}

:where(table, .data-table, .reservation-table) {
  color: var(--theme-text);
}

:where(th, .table-head) {
  color: var(--theme-text-secondary) !important;
  background: color-mix(in srgb, var(--theme-primary) 7%, var(--theme-card)) !important;
}

:where(td, th) {
  border-color: var(--theme-border) !important;
}

:where(.status-badge, .crm-status-badge, .crm-tag, .client-crm-pill, .waitlist-vip-badge, .waitlist-score-badge, .live-pill, .client-live-badge) {
  border-color: color-mix(in srgb, var(--theme-primary) 24%, var(--theme-border)) !important;
  background: var(--theme-badge) !important;
  color: var(--theme-primary-hover) !important;
}

:where(.status-badge.ARRIVED, .status-badge.SEATED, .crm-status-badge.RECURRENT) {
  background: color-mix(in srgb, var(--theme-success) 14%, #ffffff) !important;
  color: var(--theme-success) !important;
}

:where(.status-badge.NO_SHOW, .status-badge.CANCELED, .crm-status-badge.RISK, .mini-action.warning) {
  background: color-mix(in srgb, var(--theme-danger) 13%, #ffffff) !important;
  color: var(--theme-danger) !important;
}

:where(.status-badge.WAITING, .status-badge.STANDBY, .crm-status-badge.NEW) {
  background: color-mix(in srgb, var(--theme-warning) 14%, #ffffff) !important;
  color: var(--theme-warning) !important;
}

:where(.eta-fill, .crm-score-track i, .bar-fill, .progress-fill) {
  background: linear-gradient(90deg, var(--theme-primary), var(--theme-success)) !important;
}

/* Screen header cleanup: Clientes, Fila and Relatorios already have their own
   command bars, so the global topbar must not duplicate title/search/actions. */
body[data-active-view="clientes"] .topbar,
body[data-active-view="fila"] .topbar,
body[data-active-view="relatorios"] .topbar {
  display: none !important;
}

body[data-active-view="clientes"] .main-shell,
body[data-active-view="fila"] .main-shell,
body[data-active-view="relatorios"] .main-shell {
  gap: 18px;
}

.topbar,
.hero-panel,
.waitlist-command-bar,
.client-crm-command-bar,
.reports-command-bar {
  border: 1px solid color-mix(in srgb, var(--theme-sidebar-accent) 30%, transparent) !important;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--theme-sidebar-start) 96%, #000000), color-mix(in srgb, var(--theme-sidebar-end) 90%, var(--theme-sidebar-accent))) !important;
  color: var(--theme-sidebar-text) !important;
}

.topbar .eyebrow,
.hero-panel .eyebrow,
.waitlist-command-bar .eyebrow,
.client-crm-command-bar .eyebrow,
.reports-command-bar .eyebrow,
.topbar h2,
.topbar p,
.hero-panel h3,
.hero-panel p,
.waitlist-command-bar h3,
.waitlist-command-bar p,
.client-crm-command-bar h3,
.client-crm-command-bar p,
.reports-command-bar h3,
.reports-command-bar p {
  color: var(--theme-sidebar-text) !important;
  text-shadow: 0 1px 0 color-mix(in srgb, var(--theme-sidebar-end) 30%, transparent);
}

.topbar .subtitle,
.waitlist-command-copy p,
.client-crm-command-bar p,
.reports-command-bar p {
  opacity: 0.82;
}

.client-crm-command-bar,
.waitlist-command-bar,
.reports-command-bar {
  align-items: center !important;
  gap: 18px !important;
  margin-bottom: 18px !important;
  min-height: auto !important;
  padding: 18px !important;
  border-radius: 18px !important;
}

.client-crm-command-bar {
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) minmax(420px, auto) !important;
}

.waitlist-command-bar {
  display: grid !important;
  grid-template-columns: minmax(280px, 1fr) auto minmax(420px, auto) !important;
}

.reports-command-bar {
  display: grid !important;
  grid-template-columns: minmax(280px, 1fr) minmax(420px, auto) !important;
}

.client-crm-command-bar h3,
.waitlist-command-copy h3,
.reports-command-bar h3 {
  margin: 6px 0 4px !important;
  font-size: clamp(1.55rem, 1.8vw, 2rem) !important;
  line-height: 1.05 !important;
}

.client-live-badge,
.live-pill,
.reports-live-badge {
  background: color-mix(in srgb, var(--theme-sidebar-text) 14%, transparent) !important;
  border-color: color-mix(in srgb, var(--theme-sidebar-text) 18%, transparent) !important;
  color: var(--theme-sidebar-text) !important;
}

.client-crm-actions,
.waitlist-command-actions,
.reports-command-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  min-width: 0;
}

.reports-command-actions label {
  display: grid !important;
  gap: 4px !important;
  color: color-mix(in srgb, var(--theme-sidebar-text) 82%, transparent) !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

.client-crm-actions input,
.reports-command-actions input,
.reports-command-actions select,
.topbar-actions input,
.topbar-actions select,
.waitlist-command-actions input {
  min-height: 42px !important;
  border-radius: 10px !important;
  border-color: color-mix(in srgb, var(--theme-sidebar-text) 34%, transparent) !important;
  background: color-mix(in srgb, var(--theme-sidebar-text) 92%, #ffffff) !important;
  color: var(--theme-text) !important;
  box-shadow: none !important;
}

.client-crm-actions input::placeholder,
.reports-command-actions input::placeholder,
.topbar-actions input::placeholder {
  color: color-mix(in srgb, var(--theme-text-secondary) 78%, transparent) !important;
}

.client-crm-actions .button,
.waitlist-command-actions .button,
.reports-command-actions .button,
.topbar-actions .button {
  min-height: 42px !important;
  border-radius: 10px !important;
  white-space: nowrap !important;
}

.client-crm-actions .button-light,
.client-crm-actions .button-secondary,
.waitlist-command-actions .button-light,
.waitlist-command-actions .button-secondary,
.waitlist-command-actions .button-ghost,
.reports-command-actions .button-light {
  background: color-mix(in srgb, var(--theme-sidebar-text) 90%, #ffffff) !important;
  border-color: color-mix(in srgb, var(--theme-sidebar-text) 42%, transparent) !important;
  color: var(--theme-primary-hover) !important;
}

.client-crm-actions .button-light:hover,
.client-crm-actions .button-secondary:hover,
.waitlist-command-actions .button-light:hover,
.waitlist-command-actions .button-secondary:hover,
.waitlist-command-actions .button-ghost:hover,
.reports-command-actions .button-light:hover {
  background: var(--theme-sidebar-text) !important;
}

.waitlist-command-meta {
  background: color-mix(in srgb, var(--theme-sidebar-text) 12%, transparent) !important;
  border: 1px solid color-mix(in srgb, var(--theme-sidebar-text) 18%, transparent) !important;
  color: var(--theme-sidebar-text) !important;
  box-shadow: none !important;
}

.waitlist-command-meta span,
.waitlist-command-meta small,
.waitlist-command-meta strong {
  color: var(--theme-sidebar-text) !important;
}

.reports-dashboard-tabs,
.client-segment-bar,
.waitlist-tabs {
  background: var(--theme-surface) !important;
  border: 1px solid var(--theme-border) !important;
  box-shadow: var(--theme-shadow);
}

@media (max-width: 1180px) {
  .client-crm-command-bar,
  .waitlist-command-bar,
  .reports-command-bar {
    grid-template-columns: 1fr !important;
  }

  .client-crm-actions,
  .waitlist-command-actions,
  .reports-command-actions {
    justify-content: flex-start !important;
  }
}

@media (max-width: 720px) {
  .client-crm-actions input,
  .client-crm-actions .button,
  .waitlist-command-actions .button,
  .reports-command-actions input,
  .reports-command-actions .button {
    width: 100% !important;
  }
}

/* Command bar standardization for the remaining admin screens. */
body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .topbar {
  display: grid !important;
  grid-template-columns: minmax(280px, 1fr) minmax(520px, auto) !important;
  align-items: center !important;
  gap: 18px !important;
  min-height: auto !important;
  margin: 0 0 18px !important;
  padding: 18px !important;
  border-radius: 18px !important;
  overflow: hidden !important;
}

body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .topbar h2 {
  margin: 6px 0 4px !important;
  color: var(--theme-sidebar-text) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: clamp(1.55rem, 1.8vw, 2rem) !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
  letter-spacing: 0 !important;
}

body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .topbar .eyebrow {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 24px !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  border: 1px solid color-mix(in srgb, var(--theme-sidebar-text) 18%, transparent) !important;
  background: color-mix(in srgb, var(--theme-sidebar-text) 13%, transparent) !important;
  color: var(--theme-sidebar-text) !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.05em !important;
}

body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .topbar .subtitle {
  max-width: 760px !important;
  margin: 0 !important;
  color: var(--theme-sidebar-text) !important;
  opacity: 0.82 !important;
  line-height: 1.35 !important;
}

body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .topbar-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
  width: auto !important;
}

body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .topbar-actions .search-field {
  min-width: 0 !important;
  width: auto !important;
}

body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .topbar-actions .search-field input {
  width: 230px !important;
}

body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .topbar-actions .search-field-date input {
  width: 150px !important;
}

body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .topbar-actions input,
body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .topbar-actions select,
body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .topbar-actions .button,
body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .auto-refresh-control {
  min-height: 42px !important;
  border-radius: 10px !important;
}

body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .topbar-actions input,
body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .topbar-actions select {
  border: 1px solid color-mix(in srgb, var(--theme-sidebar-text) 34%, transparent) !important;
  background: color-mix(in srgb, var(--theme-sidebar-text) 92%, #ffffff) !important;
  color: var(--theme-text) !important;
  box-shadow: none !important;
}

body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .topbar-actions .button-light,
body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .topbar-actions .button-muted {
  background: color-mix(in srgb, var(--theme-sidebar-text) 90%, #ffffff) !important;
  border-color: color-mix(in srgb, var(--theme-sidebar-text) 42%, transparent) !important;
  color: var(--theme-primary-hover) !important;
}

body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .topbar-actions .button-primary {
  background: color-mix(in srgb, var(--theme-sidebar-text) 92%, #ffffff) !important;
  border: 1px solid color-mix(in srgb, var(--theme-sidebar-text) 42%, transparent) !important;
  color: var(--theme-primary-hover) !important;
  box-shadow: none !important;
}

body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .auto-refresh-control {
  min-width: 132px !important;
  padding: 6px 12px !important;
  border: 1px solid color-mix(in srgb, var(--theme-sidebar-text) 24%, transparent) !important;
  background: color-mix(in srgb, var(--theme-sidebar-text) 12%, transparent) !important;
  color: var(--theme-sidebar-text) !important;
  box-shadow: none !important;
}

body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .auto-refresh-control span,
body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .auto-refresh-control small {
  color: var(--theme-sidebar-text) !important;
}

body[data-active-view="dashboard"] .view[data-panel="dashboard"] > .hero-panel {
  display: none !important;
}

body[data-active-view="dashboard"] .topbar {
  margin-bottom: 24px !important;
}

body[data-active-view="dashboard"] .stats-grid {
  margin-top: 0 !important;
}

@media (max-width: 1320px) {
  body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .topbar {
    grid-template-columns: 1fr !important;
  }

  body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .topbar-actions {
    justify-content: flex-start !important;
  }
}

@media (max-width: 720px) {
  body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .topbar-actions .search-field,
  body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .topbar-actions .search-field input,
  body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .topbar-actions .button,
  body:not([data-active-view="clientes"]):not([data-active-view="fila"]):not([data-active-view="relatorios"]) .auto-refresh-control {
    width: 100% !important;
  }
}

/* Exact action sizing for Clientes and Relatorios to match the global header. */
.client-crm-actions,
.reports-command-actions {
  align-items: center !important;
  gap: 10px !important;
}

.client-crm-actions input,
.reports-command-actions input,
.reports-command-actions .button,
.client-crm-actions .button {
  box-sizing: border-box !important;
  height: 42px !important;
  min-height: 42px !important;
  border-radius: 10px !important;
  font-size: 0.86rem !important;
  line-height: 1 !important;
}

.client-crm-actions input,
.reports-command-actions input {
  padding: 0 12px !important;
}

.client-crm-actions .button,
.reports-command-actions .button {
  padding: 0 16px !important;
}

.client-crm-actions #client-search {
  width: 234px !important;
  min-width: 234px !important;
}

.client-crm-actions #client-date-from,
.client-crm-actions #client-date-to {
  width: 152px !important;
  min-width: 152px !important;
}

.client-crm-actions #client-import-model-button {
  width: 74px !important;
  min-width: 74px !important;
}

.client-crm-actions #client-import-button {
  width: 84px !important;
  min-width: 84px !important;
}

.reports-command-actions label {
  display: block !important;
  height: 42px !important;
  margin: 0 !important;
}

.reports-command-actions label > span {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.reports-command-actions #report-date-from,
.reports-command-actions #report-date-to {
  width: 140px !important;
  min-width: 140px !important;
}

.reports-command-actions #reports-compare-period {
  width: 142px !important;
  min-width: 142px !important;
}

.reports-command-actions #reports-share-dashboard {
  width: 122px !important;
  min-width: 122px !important;
}

.reports-command-actions #reports-refresh-live {
  width: 152px !important;
  min-width: 152px !important;
}

.reports-command-actions #reports-refresh-live {
  background: color-mix(in srgb, var(--theme-sidebar-text) 92%, #ffffff) !important;
  border: 1px solid color-mix(in srgb, var(--theme-sidebar-text) 42%, transparent) !important;
  color: var(--theme-primary-hover) !important;
  box-shadow: none !important;
}

@media (max-width: 1180px) {
  .client-crm-actions #client-search,
  .client-crm-actions #client-date-from,
  .client-crm-actions #client-date-to,
  .client-crm-actions #client-import-model-button,
  .client-crm-actions #client-import-button,
  .reports-command-actions label,
  .reports-command-actions #report-date-from,
  .reports-command-actions #report-date-to,
  .reports-command-actions #reports-compare-period,
  .reports-command-actions #reports-share-dashboard,
  .reports-command-actions #reports-refresh-live {
    width: auto !important;
    min-width: 0 !important;
  }
}

/* Date filters: Clientes and Relatorios must match the global date filter exactly. */
#global-date-filter,
#client-date-from,
#client-date-to,
#report-date-from,
#report-date-to {
  appearance: auto !important;
  box-sizing: border-box !important;
  width: 150px !important;
  min-width: 150px !important;
  max-width: 150px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 12px !important;
  border: 1px solid color-mix(in srgb, var(--theme-sidebar-text) 34%, transparent) !important;
  border-radius: 0 !important;
  background: color-mix(in srgb, var(--theme-sidebar-text) 92%, #ffffff) !important;
  color: var(--theme-text) !important;
  box-shadow: none !important;
  font: 700 0.86rem/1 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

#global-date-filter:hover,
#client-date-from:hover,
#client-date-to:hover,
#report-date-from:hover,
#report-date-to:hover {
  border-color: color-mix(in srgb, var(--theme-sidebar-text) 48%, transparent) !important;
}

#global-date-filter:focus,
#client-date-from:focus,
#client-date-to:focus,
#report-date-from:focus,
#report-date-to:focus {
  border-color: color-mix(in srgb, var(--theme-sidebar-text) 56%, var(--theme-primary)) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-sidebar-text) 18%, transparent) !important;
  outline: none !important;
}

.reports-command-actions label:has(#report-date-from),
.reports-command-actions label:has(#report-date-to) {
  display: inline-flex !important;
  align-items: center !important;
  width: 150px !important;
  min-width: 150px !important;
  height: 42px !important;
}

/* Keep date filters visually identical to the global date input: rectangular. */
#global-date-filter,
#client-date-from,
#client-date-to,
#report-date-from,
#report-date-to {
  border-radius: 0 !important;
}

.reports-command-actions label:has(#report-date-from) > span,
.reports-command-actions label:has(#report-date-to) > span {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

@media (max-width: 720px) {
  #global-date-filter,
  #client-date-from,
  #client-date-to,
  #report-date-from,
  #report-date-to,
  .reports-command-actions label:has(#report-date-from),
  .reports-command-actions label:has(#report-date-to) {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }
}

/* Administrative screens do not use customer/date global filters. */
body[data-active-view="autoatendimento"] .topbar-actions .search-field,
body[data-active-view="autoatendimento"] .topbar-actions .search-field-date,
body[data-active-view="whatsapp"] .topbar-actions .search-field,
body[data-active-view="whatsapp"] .topbar-actions .search-field-date,
body[data-active-view="chatbot"] .topbar-actions .search-field,
body[data-active-view="chatbot"] .topbar-actions .search-field-date,
body[data-active-view="temas"] .topbar-actions .search-field,
body[data-active-view="temas"] .topbar-actions .search-field-date,
body[data-active-view="iam"] .topbar-actions .search-field,
body[data-active-view="iam"] .topbar-actions .search-field-date,
body[data-active-view="configuracoes"] .topbar-actions .search-field,
body[data-active-view="configuracoes"] .topbar-actions .search-field-date {
  display: none !important;
}

.whatsapp-inbox-hero {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.whatsapp-inbox-layout {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(300px, 380px) minmax(420px, 1fr);
}

.whatsapp-thread-panel,
.whatsapp-chat-panel {
  min-height: 620px;
}

.whatsapp-inbox-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.whatsapp-thread {
  background: var(--theme-card, #fff);
  border: 1px solid var(--theme-border, #eadfd5);
  border-radius: 14px;
  color: var(--theme-text, #2f1b12);
  cursor: pointer;
  padding: 14px;
  text-align: left;
}

.whatsapp-thread.is-selected {
  border-color: var(--theme-primary, #8d552a);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-primary, #8d552a) 18%, transparent);
}

.whatsapp-thread div {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.whatsapp-thread small,
.whatsapp-chat-header p {
  color: var(--theme-muted, #775f51);
}

.whatsapp-thread p {
  margin: 8px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-badge.WAITING_HUMAN {
  background: #fff2d8;
  color: #9a5b00;
}

.status-badge.BOT {
  background: #e8f0ff;
  color: #194f9e;
}

.status-badge.HUMAN {
  background: #dcf7e7;
  color: #11613d;
}

.status-badge.CLOSED {
  background: #ece8e5;
  color: #67584f;
}

.whatsapp-chat-header {
  border-bottom: 1px solid var(--theme-border, #eadfd5);
  margin-bottom: 14px;
  padding-bottom: 14px;
}

.whatsapp-chat-header h3,
.whatsapp-chat-header p {
  margin: 4px 0 0;
}

.whatsapp-chat-messages {
  background: #f7f3ef;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 400px;
  overflow-y: auto;
  padding: 16px;
}

.whatsapp-message {
  background: #fff;
  border-radius: 14px 14px 14px 4px;
  max-width: 76%;
  padding: 10px 12px;
}

.whatsapp-message.outbound {
  align-self: flex-end;
  background: #e2f5e7;
  border-radius: 14px 14px 4px 14px;
}

.whatsapp-message.system {
  align-self: center;
  background: #eee8e2;
  font-size: 0.86rem;
  text-align: center;
}

.whatsapp-message small {
  color: #776558;
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.whatsapp-message p {
  margin: 0;
  white-space: pre-wrap;
}

.whatsapp-chat-actions,
.whatsapp-reply-form {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.whatsapp-chat-actions[hidden],
.whatsapp-reply-form[hidden],
.whatsapp-chat-actions [hidden] {
  display: none;
}

.whatsapp-reply-form input {
  flex: 1;
}

.whatsapp-empty {
  color: var(--theme-muted, #775f51);
  padding: 22px 10px;
  text-align: center;
}

@media (max-width: 1000px) {
  .whatsapp-inbox-layout {
    grid-template-columns: 1fr;
  }

  .whatsapp-thread-panel,
  .whatsapp-chat-panel {
    min-height: 0;
  }
}

/* Omnichannel service console */
body[data-active-view="whatsapp"] {
  background: #f4f7fc;
}

body[data-active-view="whatsapp"] .button-primary {
  background: #2365c4 !important;
  border-color: #2365c4 !important;
  color: #fff !important;
}

body[data-active-view="whatsapp"] .button-primary:hover {
  background: #1958b7 !important;
  border-color: #1958b7 !important;
}

body[data-active-view="whatsapp"] .button-light {
  background: #fff !important;
  border-color: #dce5f1 !important;
  color: #334761 !important;
}

[data-panel="whatsapp"].active {
  color: #142238;
}

[data-panel="whatsapp"] .eyebrow {
  color: #526a8d;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

[data-panel="whatsapp"] .button-primary {
  background: #2566c2;
  border-color: #2566c2;
  color: #fff;
}

[data-panel="whatsapp"] .button-primary:hover {
  background: #174fa4;
  border-color: #174fa4;
}

[data-panel="whatsapp"] .button-light {
  background: #fff;
  border-color: #d6e0ef;
  color: #344b69;
}

.whatsapp-command-header {
  align-items: center;
  background: #fff;
  border: 1px solid #e1e8f3;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(15, 31, 55, 0.04);
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 20px 24px;
}

.whatsapp-command-header h3 {
  color: #142238;
  font-size: 1.38rem;
  margin: 4px 0;
}

.whatsapp-command-header p {
  color: #63748d;
  margin: 0;
}

.whatsapp-command-actions {
  align-items: center;
  display: flex;
  gap: 12px;
}

.whatsapp-sound-toggle {
  align-items: center;
  color: #52627b;
  display: flex;
  font-size: 0.85rem;
  gap: 7px;
}

.whatsapp-kpis {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  margin-bottom: 16px;
}

.whatsapp-kpi {
  background: #fff;
  border: 1px solid #e1e8f3;
  border-radius: 14px;
  min-height: 78px;
  padding: 14px 16px;
}

.whatsapp-kpi span {
  color: #667892;
  display: block;
  font-size: 0.78rem;
  margin-bottom: 8px;
}

.whatsapp-kpi strong {
  color: #17283f;
  font-size: 1.48rem;
}

.whatsapp-kpi.waiting {
  border-left: 4px solid #ef534f;
}

.whatsapp-kpi.bot {
  border-left: 4px solid #2d72d9;
}

.whatsapp-kpi.human {
  border-left: 4px solid #18a572;
}

.whatsapp-console-layout {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(300px, 338px) minmax(470px, 1fr) minmax(275px, 318px);
  min-height: calc(100vh - 315px);
}

.whatsapp-sidebar,
.whatsapp-conversation,
.whatsapp-context-card {
  background: #fff;
  border: 1px solid #e1e8f3;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(15, 31, 55, 0.04);
}

.whatsapp-sidebar {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px 12px 12px;
}

.whatsapp-sidebar-title {
  padding: 0 8px 12px;
}

.whatsapp-sidebar-title h3 {
  color: #142238;
  margin: 5px 0 0;
}

.whatsapp-queues {
  border-bottom: 1px solid #e7edf6;
  display: grid;
  gap: 3px;
  padding-bottom: 12px;
}

.whatsapp-queues button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: #435570;
  cursor: pointer;
  display: flex;
  font-weight: 550;
  justify-content: space-between;
  padding: 9px 10px;
}

.whatsapp-queues button:hover,
.whatsapp-queues button.active {
  background: #edf4ff;
  color: #1958b7;
}

.whatsapp-queues b {
  background: #edf1f7;
  border-radius: 10px;
  font-size: 0.72rem;
  min-width: 24px;
  padding: 3px 7px;
}

.whatsapp-queues button.alert b {
  background: #feebeb;
  color: #d83c38;
}

.whatsapp-search {
  margin: 13px 4px 4px;
}

.whatsapp-search input {
  background: #f6f8fc;
  border: 1px solid #dce5f1;
  border-radius: 10px;
  font-size: 0.86rem;
  padding: 10px 12px;
  width: 100%;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  height: 1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.whatsapp-inbox-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  overflow-y: auto;
}

.whatsapp-thread {
  align-items: flex-start;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #142238;
  display: grid;
  gap: 9px;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  padding: 11px 9px;
  position: relative;
  text-align: left;
  transition: background 150ms ease, border-color 150ms ease;
}

.whatsapp-thread:hover,
.whatsapp-thread.is-selected {
  background: #f2f7ff;
  border-color: #d7e4fa;
  box-shadow: none;
}

.whatsapp-thread.needs-agent {
  background: #fff8f7;
  border-color: #ffd8d6;
}

.whatsapp-thread.needs-agent::before {
  background: #ee4f4a;
  border-radius: 2px;
  bottom: 9px;
  content: "";
  left: 0;
  position: absolute;
  top: 9px;
  width: 3px;
}

.whatsapp-avatar {
  align-items: center;
  background: #e7f1ff;
  border-radius: 50%;
  color: #2365c4;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 750;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.whatsapp-avatar.large {
  font-size: 0.92rem;
  height: 46px;
  width: 46px;
}

.whatsapp-thread-copy {
  display: block;
  min-width: 0;
}

.whatsapp-thread-head {
  align-items: baseline;
  display: flex;
  gap: 5px;
  justify-content: space-between;
}

.whatsapp-thread-head strong {
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.whatsapp-thread-head time {
  color: #8291a8;
  font-size: 0.72rem;
}

.whatsapp-thread-meta,
.whatsapp-thread-foot {
  color: #60738d;
  display: block;
  font-size: 0.72rem;
  margin-top: 3px;
}

.whatsapp-thread-preview {
  color: #334761;
  display: block;
  font-size: 0.8rem;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.whatsapp-unread {
  align-items: center;
  background: #2365c4;
  border-radius: 14px;
  color: #fff;
  display: flex;
  font-size: 0.7rem;
  height: 20px;
  justify-content: center;
  min-width: 20px;
}

.priority-urgent .whatsapp-avatar,
.priority-high .whatsapp-avatar {
  background: #feebeb;
  color: #d83c38;
}

.whatsapp-conversation {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.whatsapp-console-tabs {
  background: #f8faff;
  border-bottom: 1px solid #e1e8f3;
  display: flex;
  gap: 4px;
  min-height: 50px;
  overflow-x: auto;
  padding: 8px 10px 0;
}

.whatsapp-console-tabs button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px 10px 0 0;
  color: #566b88;
  display: inline-flex;
  gap: 8px;
  max-width: 195px;
  padding: 9px 12px;
}

.whatsapp-console-tabs button.active {
  background: #fff;
  border-color: #e1e8f3;
  border-bottom-color: #fff;
  color: #142238;
}

.whatsapp-console-tabs button.alert {
  animation: whatsappPulse 1.6s ease infinite;
  color: #d83c38;
}

.whatsapp-console-tabs strong {
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.whatsapp-console-tabs small {
  font-size: 0.69rem;
  white-space: nowrap;
}

.whatsapp-console-tabs b {
  background: #ee4f4a;
  border-radius: 11px;
  color: #fff;
  font-size: 0.68rem;
  padding: 2px 6px;
}

@keyframes whatsappPulse {
  0%, 100% { background: #fff; }
  50% { background: #fff0f0; }
}

.whatsapp-chat-header {
  align-items: center;
  border-bottom: 1px solid #e7edf6;
  display: flex;
  justify-content: space-between;
  margin: 0;
  min-height: 82px;
  padding: 16px 20px;
}

.whatsapp-chat-person {
  align-items: center;
  display: flex;
  gap: 12px;
}

.whatsapp-chat-person h3 {
  color: #142238;
  margin: 2px 0;
}

.whatsapp-chat-person p {
  color: #60738d;
  font-size: 0.82rem;
  margin: 0;
}

.priority-badge {
  background: #eff3f9;
  border-radius: 16px;
  color: #526581;
  font-size: 0.73rem;
  font-weight: 650;
  padding: 6px 10px;
}

.priority-badge.high,
.priority-badge.urgent {
  background: #feebeb;
  color: #d83c38;
}

.whatsapp-chat-messages {
  background: #f7f9fc;
  border-radius: 0;
  flex: 1;
  gap: 13px;
  height: auto;
  min-height: 340px;
  padding: 20px;
}

.whatsapp-message {
  border: 1px solid #e2e9f3;
  box-shadow: 0 1px 2px rgba(15, 31, 55, 0.03);
  color: #17283f;
  max-width: 74%;
  padding: 11px 13px;
}

.whatsapp-message.outbound {
  background: #e9f3ff;
  border-color: #d0e3fd;
}

.whatsapp-message.system {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #6c7f99;
}

.whatsapp-message.internal_note {
  align-self: center;
  background: #fff7df;
  border: 1px dashed #ebc453;
  max-width: 86%;
}

.whatsapp-message small {
  color: #62758f;
}

.whatsapp-chat-actions {
  border-top: 1px solid #e7edf6;
  flex-wrap: wrap;
  margin: 0;
  padding: 12px 18px;
}

.whatsapp-composer {
  border-top: 1px solid #e7edf6;
  padding: 12px 18px 16px;
}

.whatsapp-composer[hidden] {
  display: none;
}

.whatsapp-compose-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
}

.whatsapp-compose-tabs button {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #60738d;
  font-weight: 600;
  padding: 7px 12px;
}

.whatsapp-compose-tabs button.is-active {
  background: #edf4ff;
  color: #1958b7;
}

.whatsapp-compose-tabs button:disabled {
  opacity: 0.45;
}

.whatsapp-quick-replies {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  overflow-x: auto;
}

.whatsapp-quick-replies button,
.tool-pill {
  background: #f3f6fb;
  border: 1px solid #dde6f2;
  border-radius: 16px;
  color: #4d607c;
  font-size: 0.74rem;
  padding: 6px 10px;
  white-space: nowrap;
}

.whatsapp-compose-hint {
  color: #8594a8;
  font-size: 0.76rem;
  padding: 5px 0;
}

.whatsapp-reply-form {
  border: 1px solid #dce5f1;
  border-radius: 12px;
  display: block;
  margin: 0;
  overflow: hidden;
}

.whatsapp-reply-form textarea {
  border: 0;
  color: #142238;
  font-family: inherit;
  min-height: 62px;
  padding: 12px;
  resize: vertical;
  width: 100%;
}

.whatsapp-compose-toolbar {
  align-items: center;
  background: #fbfcff;
  border-top: 1px solid #edf1f7;
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
}

.whatsapp-compose-toolbar div {
  display: flex;
  gap: 5px;
}

.tool-pill:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.whatsapp-context {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.whatsapp-context-card {
  padding: 14px 15px;
}

.whatsapp-context-card h3 {
  color: #142238;
  font-size: 1rem;
  margin: 3px 0 0;
}

#whatsapp-priority {
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  font-size: 0.76rem;
  padding: 6px;
}

.customer-profile {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 14px 0;
}

.customer-profile small,
.whatsapp-muted {
  color: #71839c;
  font-size: 0.8rem;
}

.context-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 13px;
}

.context-tags span {
  background: #edf4ff;
  border-radius: 13px;
  color: #2462bc;
  font-size: 0.7rem;
  padding: 5px 9px;
}

.context-tags .danger {
  background: #feebeb;
  color: #d83c38;
}

.whatsapp-customer-context dl {
  border-top: 1px solid #edf1f7;
  margin: 0;
}

.whatsapp-customer-context dl div {
  display: flex;
  font-size: 0.78rem;
  justify-content: space-between;
  padding-top: 9px;
}

.whatsapp-customer-context dt {
  color: #75859d;
}

.whatsapp-customer-context dd {
  color: #21344e;
  font-weight: 550;
  margin: 0;
}

.context-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 14px;
}

.context-actions button {
  background: #fff;
  border: 1px solid #dce5f1;
  border-radius: 8px;
  color: #3e5676;
  font-size: 0.73rem;
  padding: 7px 8px;
}

.whatsapp-sla {
  margin-top: 11px;
}

.sla-indicator {
  border-left: 4px solid #19a672;
  margin-bottom: 10px;
  padding-left: 11px;
}

.sla-indicator.warning {
  border-color: #e8a228;
}

.sla-indicator.danger {
  border-color: #ee4f4a;
}

.sla-indicator strong {
  color: #142238;
  display: block;
  font-size: 1.25rem;
}

.sla-indicator span,
.sla-row {
  color: #667892;
  font-size: 0.76rem;
}

.sla-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

.sla-row strong {
  color: #223750;
}

.ai-summary {
  background: #eef5ff;
  border-radius: 11px;
  color: #264264;
  margin-top: 11px;
  padding: 11px;
}

.ai-summary.alert {
  background: #fff2ee;
}

.ai-summary p {
  font-size: 0.78rem;
  margin: 6px 0 10px;
}

.ai-summary small {
  color: #66809e;
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.ai-summary blockquote {
  border-left: 2px solid #397ad5;
  font-size: 0.77rem;
  margin: 0;
  padding-left: 8px;
}

.whatsapp-timeline {
  margin-top: 12px;
  max-height: 280px;
  overflow-y: auto;
}

.whatsapp-timeline article {
  border-left: 2px solid #dbe5f2;
  margin-left: 5px;
  padding: 0 0 13px 13px;
}

.whatsapp-timeline article.internal_note {
  border-color: #ebc453;
}

.whatsapp-timeline time {
  color: #8595aa;
  display: block;
  font-size: 0.67rem;
}

.whatsapp-timeline strong {
  color: #21344e;
  display: block;
  font-size: 0.77rem;
}

.whatsapp-timeline p {
  color: #61738d;
  font-size: 0.72rem;
  margin: 3px 0 0;
}

.whatsapp-empty.rich {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 7px;
  justify-content: center;
  min-height: 130px;
}

.whatsapp-empty.rich strong {
  color: #334761;
}

.whatsapp-empty.rich span {
  color: #7a8ba2;
  font-size: 0.82rem;
}

.whatsapp-toast-region {
  bottom: 22px;
  display: grid;
  gap: 8px;
  position: fixed;
  right: 22px;
  z-index: 40;
}

.whatsapp-toast {
  background: #162a46;
  border-radius: 11px;
  box-shadow: 0 10px 32px rgba(10, 24, 45, 0.2);
  color: #fff;
  font-size: 0.85rem;
  padding: 13px 16px;
}

body[data-active-view="whatsapp"] .content-area {
  background: #f3f6fb;
}

.whatsapp-command-header,
.whatsapp-kpi,
.whatsapp-sidebar,
.whatsapp-conversation,
.whatsapp-context-card {
  box-shadow: 0 4px 18px rgba(20, 36, 61, 0.055);
}

.whatsapp-console-layout {
  align-items: stretch;
  gap: 16px;
  height: calc(100dvh - 206px);
  min-height: 620px;
}

.whatsapp-sidebar {
  background: #f9fbff;
  border-color: #d9e3f2;
  height: 100%;
  min-height: 0;
}

.whatsapp-conversation {
  border-color: #d5e0ef;
  box-shadow: 0 8px 28px rgba(20, 36, 61, 0.075);
  height: 100%;
  min-height: 0;
}

.whatsapp-inbox-list {
  flex: 1;
  min-height: 0;
}

.whatsapp-context {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding-right: 3px;
}

.whatsapp-queues button span {
  align-items: center;
  display: flex;
  gap: 9px;
}

.whatsapp-queues button span i {
  align-items: center;
  background: #edf2f9;
  border-radius: 7px;
  display: inline-flex;
  font-size: 0.72rem;
  font-style: normal;
  height: 23px;
  justify-content: center;
  width: 23px;
}

.whatsapp-queues button.active span i {
  background: #dfeaff;
}

.whatsapp-queues button.alert {
  background: #fff3f1;
  color: #c93431;
}

.whatsapp-queues button.alert span i,
.whatsapp-queues button.alert b {
  animation: whatsappPulse 1.6s ease infinite;
  background: #ffdedd;
}

.whatsapp-search input:focus {
  background: #fff;
  border-color: #2365c4;
  box-shadow: 0 0 0 3px rgba(35, 101, 196, 0.12);
  outline: 0;
}

.whatsapp-thread {
  min-height: 105px;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.whatsapp-thread:hover {
  box-shadow: 0 5px 16px rgba(35, 55, 82, 0.08);
  transform: translateY(-1px);
}

.whatsapp-thread.needs-agent {
  animation: whatsappWaitingCard 2.4s ease-in-out infinite;
}

.whatsapp-skeleton {
  animation: whatsappSkeleton 1.25s ease-in-out infinite;
  background: linear-gradient(90deg, #edf2f8, #f8faff, #edf2f8);
  background-size: 220% 100%;
  border-radius: 12px;
  height: 94px;
}

@keyframes whatsappSkeleton {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@keyframes whatsappWaitingCard {
  0%, 100% { box-shadow: 0 0 0 0 rgba(238, 79, 74, 0); }
  50% { box-shadow: 0 0 0 2px rgba(238, 79, 74, 0.16); }
}

.status-dot {
  border-radius: 50%;
  display: inline-block;
  height: 7px;
  margin-right: 3px;
  width: 7px;
}

.status-dot.bot { background: #2d72d9; }
.status-dot.waiting_human { background: #ee4f4a; }
.status-dot.human { background: #18a572; }
.status-dot.paused { background: #e8a228; }
.status-dot.closed { background: #8a99ad; }

.whatsapp-thread-foot mark {
  background: #fde5e3;
  border-radius: 5px;
  color: #c93431;
  font-size: 0.67rem;
  font-weight: 700;
  margin-right: 6px;
  padding: 2px 5px;
}

.whatsapp-tab {
  align-items: stretch;
  border-top: 2px solid transparent;
  display: flex;
  position: relative;
}

.whatsapp-tab.priority-high,
.whatsapp-tab.priority-urgent {
  border-top-color: #ee4f4a;
}

.whatsapp-tab.alert {
  animation: whatsappPulse 1.6s ease infinite;
}

.whatsapp-console-tabs .whatsapp-tab > button:first-child {
  border-radius: 10px 0 0 0;
}

.whatsapp-console-tabs .whatsapp-tab > button:first-child.active {
  background: #fff;
  border: 1px solid #e1e8f3;
  border-bottom-color: #fff;
  color: #142238;
}

.whatsapp-console-tabs .whatsapp-tab-close {
  background: transparent;
  border: 0;
  border-radius: 0 10px 0 0;
  color: #8291a8;
  font-size: 1rem;
  padding: 6px;
}

.whatsapp-console-tabs .whatsapp-tab-close:hover {
  background: #e9eff8;
  color: #243852;
}

.whatsapp-console-tabs em {
  background: #fde5e3;
  border-radius: 10px;
  color: #c93431;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 700;
  padding: 2px 5px;
}

.whatsapp-chat-header {
  background: #fff;
  min-height: 112px;
}

.chat-header-badges {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.status-badge-chat {
  border-radius: 16px;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 6px 10px;
}

.status-badge-chat.bot { background: #e8f1ff; color: #205eb8; }
.status-badge-chat.waiting_human { background: #fde5e3; color: #c93431; }
.status-badge-chat.human { background: #daf5ea; color: #08784e; }
.status-badge-chat.paused { background: #fff1d4; color: #a76400; }
.status-badge-chat.closed { background: #eef2f6; color: #586b84; }

.chat-header-metrics {
  display: flex;
  gap: 20px;
}

.chat-header-metrics span {
  color: #71839c;
  display: flex;
  flex-direction: column;
  font-size: 0.7rem;
  gap: 3px;
}

.chat-header-metrics strong {
  color: #1c314b;
  font-size: 0.78rem;
  max-width: 110px;
}

.whatsapp-chat-messages {
  min-height: 0;
  overflow-y: auto;
  gap: 10px;
  padding: 22px 30px;
}

.whatsapp-message {
  border-radius: 4px 16px 16px 16px;
  max-width: min(74%, 620px);
  padding: 12px 15px;
}

.whatsapp-message.outbound {
  border-radius: 16px 4px 16px 16px;
}

.whatsapp-message.internal_note {
  border-radius: 12px;
}

.whatsapp-date-separator {
  align-items: center;
  color: #8090a5;
  display: flex;
  font-size: 0.7rem;
  gap: 10px;
  justify-content: center;
  margin: 4px 0;
}

.whatsapp-date-separator::before,
.whatsapp-date-separator::after {
  background: #dfe7f2;
  content: "";
  height: 1px;
  max-width: 96px;
  width: 100%;
}

.whatsapp-system-event {
  align-items: center;
  color: #73859c;
  display: flex;
  font-size: 0.73rem;
  gap: 8px;
  justify-content: center;
  margin: 3px 0;
}

.whatsapp-system-event span {
  background: #edf2f8;
  border-radius: 16px;
  padding: 5px 11px;
}

.whatsapp-system-event time {
  font-size: 0.68rem;
}

.whatsapp-chat-actions {
  background: #f8faff;
  border-top: 1px solid #dfe7f2;
  display: block;
  flex: 0 0 auto;
  padding: 14px 20px;
}

.whatsapp-actions-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 11px;
}

.whatsapp-actions-heading strong {
  color: #3a506d;
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  margin-top: 4px;
}

.whatsapp-mode-badge {
  background: #e9f3ff;
  border-radius: 18px;
  color: #2462bc;
  font-size: 0.71rem;
  font-weight: 700;
  padding: 6px 10px;
}

.whatsapp-mode-badge.human { background: #dcf5ea; color: #08784e; }
.whatsapp-mode-badge.closed { background: #edf2f7; color: #64758b; }

.whatsapp-actions-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.whatsapp-actions-buttons .button {
  min-height: 40px;
  padding: 0 13px;
}

[data-panel="whatsapp"] .button-transfer {
  background: #ebf2ff;
  border: 1px solid #aecaf6;
  color: #1958b7;
}

[data-panel="whatsapp"] .button-danger {
  background: #fff0ee !important;
  border: 1px solid #f0c0bc !important;
  color: #bc312c !important;
}

[data-panel="whatsapp"] .button-utility {
  background: #fff;
  border: 1px solid #dae4f1;
  color: #526581;
}

.whatsapp-composer {
  background: #fff;
  border-top: 1px solid #dfe7f2;
  flex: 0 0 auto;
  padding: 16px 20px 18px;
}

.whatsapp-compose-tabs {
  border-bottom: 1px solid #dfe7f2;
  gap: 0;
  margin-bottom: 12px;
}

.whatsapp-compose-tabs button {
  border-radius: 0;
  padding: 9px 15px 12px;
}

.whatsapp-compose-tabs button.is-active {
  background: transparent;
  border-bottom: 3px solid #2365c4;
}

.whatsapp-composer.is-note .whatsapp-compose-tabs button.is-active {
  border-bottom-color: #c88712;
  color: #a76400;
}

.whatsapp-compose-notice {
  align-items: center;
  background: #eaf3ff;
  border: 1px solid #d5e5fc;
  border-radius: 9px;
  color: #385678;
  display: flex;
  font-size: 0.76rem;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px 11px;
}

.whatsapp-compose-notice strong {
  color: #1958b7;
}

.whatsapp-composer.is-note .whatsapp-compose-notice {
  background: #fff6dd;
  border-color: #edd18a;
}

.whatsapp-composer.is-note .whatsapp-compose-notice strong {
  color: #a76400;
}

.whatsapp-reply-form.is-note {
  background: #fffdf5;
  border-color: #e9cf88;
}

.whatsapp-send.is-note,
#whatsapp-send.is-note {
  background: #b67812 !important;
  border-color: #b67812 !important;
}

.tool-pill:disabled {
  background: #eef1f6;
  border-color: #e3e8ef;
  color: #9ba8b8;
  opacity: 1;
}

.whatsapp-context-card {
  background: #fff;
  overflow: hidden;
  padding: 0;
}

.whatsapp-context-card summary {
  align-items: center;
  border-bottom: 1px solid transparent;
  color: #1d334d;
  cursor: pointer;
  display: flex;
  font-size: 0.86rem;
  font-weight: 700;
  gap: 9px;
  list-style: none;
  padding: 13px 15px;
}

.whatsapp-context-card summary::-webkit-details-marker {
  display: none;
}

.whatsapp-context-card summary::after {
  color: #8796aa;
  content: "+";
  margin-left: auto;
}

.whatsapp-context-card[open] summary {
  border-color: #edf1f7;
}

.whatsapp-context-card[open] summary::after {
  content: "−";
}

.whatsapp-context-card summary span {
  align-items: center;
  background: #edf4ff;
  border-radius: 7px;
  color: #2462bc;
  display: inline-flex;
  height: 25px;
  justify-content: center;
  width: 25px;
}

.whatsapp-context-card > div,
.whatsapp-context-card > label {
  margin-left: 15px;
  margin-right: 15px;
}

.whatsapp-priority-control {
  align-items: center;
  color: #71839c;
  display: flex;
  font-size: 0.73rem;
  font-weight: 600;
  justify-content: space-between;
  margin-top: 11px;
}

.sla-indicator b {
  border-radius: 12px;
  display: inline-block;
  font-size: 0.67rem;
  margin-top: 7px;
  padding: 4px 8px;
}

.sla-indicator.ok b { background: #dcf5ea; color: #08784e; }
.sla-indicator.warning b { background: #fff1d4; color: #a76400; }
.sla-indicator.danger b { background: #fde5e3; color: #c93431; }

.ai-summary dl {
  border-bottom: 1px solid #d9e6f7;
  font-size: 0.73rem;
  margin: 9px 0;
  padding-bottom: 6px;
}

.ai-summary dl div {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 5px;
}

.ai-summary dt { color: #687e99; }
.ai-summary dd { color: #243c59; font-weight: 600; margin: 0; text-align: right; }

.ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.ai-actions button {
  background: #fff;
  border: 1px solid #cbdcf4;
  border-radius: 7px;
  color: #205eb8;
  font-size: 0.69rem;
  padding: 6px 8px;
}

.ai-actions button:disabled {
  color: #97a7ba;
  cursor: not-allowed;
}

.whatsapp-history {
  margin-bottom: 13px;
  margin-top: 10px;
}

.whatsapp-history article {
  border-bottom: 1px solid #edf1f7;
  display: flex;
  flex-direction: column;
  font-size: 0.76rem;
  gap: 3px;
  padding: 7px 0;
}

.whatsapp-history article span {
  color: #71839c;
}

.whatsapp-context-card .context-tags {
  margin-bottom: 13px;
  margin-top: 12px;
}

.whatsapp-confirm-modal {
  align-items: center;
  background: rgba(18, 31, 49, 0.45);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 90;
}

.whatsapp-confirm-modal[hidden] {
  display: none;
}

.whatsapp-confirm-dialog {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 22px 60px rgba(10, 24, 45, 0.24);
  display: grid;
  gap: 12px;
  max-width: 450px;
  padding: 24px;
  width: 100%;
}

.whatsapp-confirm-dialog h3,
.whatsapp-confirm-dialog p {
  margin: 0;
}

.whatsapp-confirm-dialog p {
  color: #61738d;
  font-size: 0.88rem;
}

.whatsapp-confirm-dialog label {
  color: #425873;
  display: grid;
  font-size: 0.78rem;
  font-weight: 600;
  gap: 6px;
}

.whatsapp-confirm-dialog select,
.whatsapp-confirm-dialog textarea {
  border: 1px solid #d6e0ef;
  border-radius: 9px;
  font: inherit;
  padding: 9px;
}

.whatsapp-confirm-dialog textarea {
  min-height: 72px;
  resize: vertical;
}

.export-dialog {
  max-width: 520px;
}

.export-date-range {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.export-date-range input {
  border: 1px solid #d6e0ef;
  border-radius: 9px;
  font: inherit;
  padding: 9px;
}

.export-format-options {
  border: 1px solid #d6e0ef;
  border-radius: 9px;
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 12px;
}

.export-format-options legend {
  color: #425873;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0 4px;
}

.export-format-options label {
  align-items: center;
  display: inline-flex;
  gap: 7px;
}

.whatsapp-confirm-actions {
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  margin-top: 4px;
}

[data-panel="whatsapp"] :where(button, input, textarea, select):focus-visible {
  box-shadow: 0 0 0 3px rgba(35, 101, 196, 0.18);
  outline: 2px solid #2365c4;
  outline-offset: 1px;
}

@media (max-width: 1260px) {
  .whatsapp-console-layout {
    height: auto;
    grid-template-columns: minmax(285px, 325px) 1fr;
    min-height: 0;
  }

  .whatsapp-context {
    grid-column: 1 / -1;
    display: grid;
    height: auto;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
  }

  .whatsapp-timeline-card {
    grid-column: span 3;
  }

  .chat-header-metrics {
    gap: 11px;
  }
}

@media (max-width: 820px) {
  .whatsapp-command-header,
  .whatsapp-command-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .whatsapp-kpis {
    grid-template-columns: repeat(2, 1fr);
  }

  .whatsapp-console-layout {
    display: block;
    height: auto;
  }

  .whatsapp-sidebar,
  .whatsapp-conversation,
  .whatsapp-context {
    margin-bottom: 12px;
  }

  .whatsapp-context {
    display: block;
    overflow: visible;
  }

  .whatsapp-context-card {
    margin-bottom: 10px;
  }

  .whatsapp-chat-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .chat-header-metrics {
    flex-wrap: wrap;
  }

  .whatsapp-chat-messages {
    padding: 16px;
  }

  .whatsapp-message {
    max-width: 90%;
  }

  .whatsapp-actions-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

/* Compact operational mode: keep the reply composer visible without browser zoom. */
body[data-active-view="whatsapp"] .topbar {
  display: none !important;
}

body[data-active-view="whatsapp"] .main-shell {
  gap: 8px;
  padding: 10px 12px 12px;
}

.whatsapp-command-header {
  border-radius: 11px;
  margin-bottom: 7px;
  min-height: 42px;
  padding: 7px 12px;
}

.whatsapp-command-header .eyebrow,
.whatsapp-command-header p {
  display: none;
}

.whatsapp-command-header h3 {
  font-size: 0.98rem;
  line-height: 1.2;
  margin: 0;
}

.whatsapp-command-actions {
  gap: 8px;
}

.whatsapp-command-actions .button {
  min-height: 31px;
  padding: 0 11px;
}

.whatsapp-sound-toggle {
  font-size: 0.73rem;
}

.whatsapp-kpis {
  gap: 6px;
  margin-bottom: 7px;
}

.whatsapp-kpi {
  align-items: center;
  border-radius: 9px;
  display: flex;
  justify-content: space-between;
  min-height: 40px;
  padding: 5px 9px;
}

.whatsapp-kpi span {
  font-size: 0.68rem;
  margin: 0 5px 0 0;
}

.whatsapp-kpi strong {
  font-size: 1.02rem;
}

.whatsapp-console-layout {
  gap: 7px;
  grid-template-columns: minmax(205px, 238px) minmax(0, 1fr);
  height: calc(100dvh - 126px);
  min-height: 500px;
}

.whatsapp-sidebar {
  border-radius: 11px;
  padding: 8px 6px 6px;
}

.whatsapp-sidebar-title {
  padding: 0 5px 5px;
}

.whatsapp-sidebar-title .eyebrow {
  font-size: 0.58rem;
}

.whatsapp-sidebar-title h3 {
  font-size: 0.88rem;
  margin-top: 2px;
}

.whatsapp-queues {
  gap: 1px;
  padding-bottom: 5px;
}

.whatsapp-queues button {
  border-radius: 7px;
  font-size: 0.75rem;
  min-height: 27px;
  padding: 3px 5px;
}

.whatsapp-queues button span {
  gap: 5px;
}

.whatsapp-queues button span i {
  border-radius: 5px;
  font-size: 0.62rem;
  height: 18px;
  width: 18px;
}

.whatsapp-queues b {
  font-size: 0.64rem;
  min-width: 18px;
  padding: 2px 5px;
}

.whatsapp-search {
  margin: 6px 2px 3px;
}

.whatsapp-search input {
  border-radius: 7px;
  font-size: 0.73rem;
  padding: 7px 8px;
}

.whatsapp-inbox-list {
  gap: 3px;
  margin-top: 4px;
}

.whatsapp-thread {
  border-radius: 8px;
  gap: 5px;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  min-height: 0;
  padding: 6px 5px;
}

.whatsapp-thread.needs-agent::before {
  bottom: 5px;
  top: 5px;
}

.whatsapp-thread .whatsapp-avatar {
  font-size: 0.6rem;
  height: 27px;
  width: 27px;
}

.whatsapp-thread-head strong {
  font-size: 0.75rem;
}

.whatsapp-thread-head time,
.whatsapp-thread-meta,
.whatsapp-thread-foot {
  font-size: 0.63rem;
  line-height: 1.25;
  margin-top: 1px;
}

.whatsapp-thread-preview {
  font-size: 0.68rem;
  line-height: 1.25;
  margin-top: 2px;
}

.whatsapp-thread-foot mark {
  font-size: 0.58rem;
  margin-right: 3px;
  padding: 1px 3px;
}

.whatsapp-unread {
  font-size: 0.6rem;
  height: 17px;
  min-width: 17px;
}

.whatsapp-conversation {
  border-radius: 11px;
}

.whatsapp-console-tabs {
  min-height: 33px;
  padding: 3px 7px 0;
}

.whatsapp-console-tabs .whatsapp-tab > button:first-child {
  padding: 4px 8px;
}

.whatsapp-console-tabs strong {
  font-size: 0.7rem;
}

.whatsapp-console-tabs small {
  font-size: 0.6rem;
}

.whatsapp-chat-header {
  min-height: 62px;
  padding: 7px 11px;
}

.whatsapp-chat-person {
  gap: 8px;
}

.whatsapp-chat-person .whatsapp-avatar.large {
  font-size: 0.7rem;
  height: 34px;
  width: 34px;
}

.whatsapp-chat-person h3 {
  font-size: 0.88rem;
}

.whatsapp-chat-person p,
.chat-header-metrics span {
  font-size: 0.62rem;
}

.chat-header-badges {
  gap: 4px;
  margin-top: 3px;
}

.status-badge-chat,
.priority-badge {
  font-size: 0.6rem;
  padding: 3px 7px;
}

.chat-header-metrics {
  gap: 12px;
}

.chat-header-metrics strong {
  font-size: 0.67rem;
}

.whatsapp-chat-messages {
  gap: 6px;
  padding: 9px 13px;
}

.whatsapp-message {
  font-size: 0.78rem;
  padding: 7px 10px;
}

.whatsapp-system-event span {
  font-size: 0.62rem;
  padding: 3px 8px;
}

.whatsapp-chat-actions {
  padding: 5px 10px;
}

.whatsapp-actions-heading {
  margin-bottom: 4px;
}

.whatsapp-actions-heading strong {
  display: none;
}

.whatsapp-mode-badge {
  font-size: 0.6rem;
  padding: 3px 7px;
}

.whatsapp-actions-buttons {
  gap: 4px;
}

.whatsapp-actions-buttons .button {
  font-size: 0.67rem;
  min-height: 29px;
  padding: 0 8px;
}

.whatsapp-composer {
  padding: 5px 10px 7px;
}

.whatsapp-compose-tabs {
  margin-bottom: 4px;
}

.whatsapp-compose-tabs button {
  font-size: 0.72rem;
  padding: 5px 10px 6px;
}

.whatsapp-compose-notice {
  border-radius: 6px;
  font-size: 0.64rem;
  gap: 6px;
  margin-bottom: 4px;
  padding: 4px 7px;
}

.whatsapp-quick-replies {
  gap: 4px;
  margin-bottom: 4px;
}

.whatsapp-quick-replies button {
  font-size: 0.62rem;
  padding: 3px 6px;
}

#whatsapp-reply-message {
  min-height: 38px;
  padding: 7px 9px;
}

.whatsapp-compose-toolbar {
  margin-top: 4px;
}

.whatsapp-compose-toolbar .tool-pill,
.whatsapp-compose-toolbar .button {
  font-size: 0.66rem;
  min-height: 29px;
  padding: 0 8px;
}

.whatsapp-details-modal {
  align-items: center;
  background: rgba(18, 31, 49, 0.5);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 88;
}

.whatsapp-details-modal[hidden] {
  display: none;
}

.whatsapp-details-dialog {
  background: #f3f6fb;
  border-radius: 15px;
  box-shadow: 0 22px 60px rgba(10, 24, 45, 0.25);
  display: flex;
  flex-direction: column;
  max-height: min(90dvh, 770px);
  overflow: hidden;
  padding: 12px;
  width: min(860px, calc(100vw - 32px));
}

.whatsapp-details-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.whatsapp-details-header h3 {
  color: #142238;
  font-size: 1.05rem;
  margin: 3px 0 0;
}

.whatsapp-details-dialog .whatsapp-context {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: auto;
  overflow-y: auto;
  padding: 1px;
}

.whatsapp-details-dialog .whatsapp-context-card {
  border-radius: 10px;
  min-width: 0;
}

.whatsapp-details-dialog .whatsapp-timeline-card {
  grid-column: span 2;
}

@media (max-width: 1260px) and (min-width: 821px) {
  .whatsapp-console-layout {
    grid-template-columns: minmax(195px, 222px) minmax(0, 1fr);
    height: calc(100dvh - 126px);
    min-height: 480px;
  }
}

@media (max-width: 820px) {
  body[data-active-view="whatsapp"] .main-shell {
    padding: 8px;
  }

  .whatsapp-command-header {
    align-items: center;
    flex-direction: row;
    gap: 7px;
  }

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

  .whatsapp-console-layout {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
  }

  .whatsapp-sidebar {
    max-height: 310px;
  }

  .whatsapp-conversation {
    height: calc(100dvh - 125px);
    min-height: 560px;
  }

  .whatsapp-chat-header {
    flex-direction: row;
    gap: 8px;
  }

  .chat-header-metrics {
    display: none;
  }

  .whatsapp-details-dialog .whatsapp-context {
    display: block;
  }

  .whatsapp-details-dialog .whatsapp-context-card {
    margin-bottom: 7px;
  }
}

/* Visible context rail and denser inbox workspace. */
.whatsapp-console-layout {
  grid-template-columns: minmax(184px, 212px) minmax(0, 1fr) minmax(206px, 240px);
}

.whatsapp-inbox-list {
  align-content: start;
  grid-auto-rows: max-content;
}

.whatsapp-thread {
  align-self: start;
}

.whatsapp-chat-messages {
  flex: 0 1 clamp(190px, 34dvh, 300px);
  height: clamp(190px, 34dvh, 300px);
}

.whatsapp-context-rail {
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: calc(100dvh - 126px);
  overflow-y: auto;
  padding: 0 2px 0 0;
}

.whatsapp-context-rail .whatsapp-details-header {
  display: none;
}

.whatsapp-context-rail .whatsapp-context-card {
  border-radius: 9px;
  box-shadow: none;
}

.whatsapp-context-rail .whatsapp-context-card summary {
  font-size: 0.7rem;
  gap: 6px;
  padding: 7px 8px;
}

.whatsapp-context-rail .whatsapp-context-card summary span {
  border-radius: 5px;
  font-size: 0.65rem;
  height: 18px;
  width: 18px;
}

.whatsapp-context-rail .whatsapp-context-card > div,
.whatsapp-context-rail .whatsapp-context-card > label {
  margin-left: 8px;
  margin-right: 8px;
}

.whatsapp-context-rail .whatsapp-avatar.large {
  height: 34px;
  width: 34px;
}

.whatsapp-context-rail .customer-profile {
  margin-bottom: 8px;
  margin-top: 7px;
}

.whatsapp-context-rail .customer-profile strong,
.whatsapp-context-rail .sla-indicator strong {
  font-size: 0.82rem;
}

.whatsapp-context-rail :where(dl, .sla-row, .context-actions, .whatsapp-history, .whatsapp-timeline, .ai-summary) {
  font-size: 0.66rem;
}

.whatsapp-context-rail .whatsapp-timeline {
  max-height: 122px;
  overflow-y: auto;
}

@media (min-width: 1261px) {
  #whatsapp-details-open {
    display: none;
  }
}

@media (max-width: 1260px) {
  .whatsapp-console-layout {
    grid-template-columns: minmax(190px, 218px) minmax(0, 1fr);
  }

  .whatsapp-context-rail {
    background: #f3f6fb;
    border-left: 1px solid #d9e3f2;
    box-shadow: -16px 0 34px rgba(15, 31, 55, 0.18);
    height: 100dvh;
    max-width: min(360px, calc(100vw - 34px));
    overflow-y: auto;
    padding: 12px 9px;
    position: fixed;
    right: 0;
    top: 0;
    transform: translateX(102%);
    transition: transform 180ms ease;
    width: 100%;
    z-index: 89;
  }

  .whatsapp-context-rail.is-open {
    transform: translateX(0);
  }

  .whatsapp-context-rail .whatsapp-details-header {
    display: flex;
    flex: 0 0 auto;
    margin-bottom: 4px;
  }
}

@media (max-width: 820px) {
  .whatsapp-chat-messages {
    flex-basis: clamp(180px, 31dvh, 260px);
    height: clamp(180px, 31dvh, 260px);
  }
}

html.reception-mobile-mode body .topbar,
html.reception-mobile-mode body .topbar-actions,
html.reception-mobile-mode body .reception-top,
html.reception-mobile-mode body .reception-kpis,
html.reception-mobile-mode body .reception-tabs,
html.reception-mobile-mode body .sidebar-nav,
html.reception-mobile-mode body .sidebar-footer,
body[data-active-view="recepcao"] .topbar,
body[data-active-view="recepcao"] .topbar-actions,
body[data-active-view="recepcao"] .reception-top,
body[data-active-view="recepcao"] .reception-kpis,
body[data-active-view="recepcao"] .reception-tabs,
body[data-active-view="recepcao"] .sidebar-nav,
body[data-active-view="recepcao"] .sidebar-footer {
  display: none !important;
}

html.reception-mobile-mode body,
html.reception-mobile-mode body .app-shell,
html.reception-mobile-mode body .main-shell,
body[data-active-view="recepcao"],
body[data-active-view="recepcao"] .app-shell,
body[data-active-view="recepcao"] .main-shell {
  height: auto !important;
  min-height: auto !important;
  overflow: visible !important;
}

body[data-active-view="recepcao"] {
  overflow-y: auto !important;
}

html.reception-mobile-mode body .app-shell,
body[data-active-view="recepcao"] .app-shell {
  display: block !important;
}

html.reception-mobile-mode body .sidebar,
body[data-active-view="recepcao"] .sidebar {
  position: sticky !important;
  top: 0 !important;
  z-index: 50 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 10px !important;
  border-right: 0 !important;
  border-bottom: 1px solid #efe4d8 !important;
  background: #ffffff !important;
  box-shadow: 0 8px 18px rgba(90, 54, 27, 0.06) !important;
}

html.reception-mobile-mode body .brand-card,
body[data-active-view="recepcao"] .brand-card {
  width: min(148px, 48vw) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html.reception-mobile-mode body .brand-image,
body[data-active-view="recepcao"] .brand-image {
  width: 100% !important;
  max-width: 148px !important;
  border-radius: 0 !important;
}

@media (max-width: 1024px) {
  body.reception-mobile-mode,
  body.reception-mobile-mode .app-shell,
  body.reception-mobile-mode .main-shell {
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  body.reception-mobile-mode {
    overflow-y: auto !important;
    background: #ffffff !important;
  }

  body.reception-mobile-mode .app-shell {
    display: block !important;
  }

  body.reception-mobile-mode .topbar,
  body.reception-mobile-mode .topbar-actions,
  body.reception-mobile-mode .reception-top,
  body.reception-mobile-mode .reception-kpis,
  body.reception-mobile-mode .reception-tabs {
    display: none !important;
  }

  body.reception-mobile-mode .main-shell {
    padding: 0 10px 10px !important;
  }

  body.reception-mobile-mode .reception-workspace {
    gap: 8px !important;
  }

  body.reception-mobile-mode .reception-sticky-bar {
    top: 0 !important;
    margin: 0 -10px !important;
    padding: 10px !important;
    background: #ffffff !important;
    border-bottom: 1px solid #efe4d8 !important;
  }
}

/* Reception mobile final refinement */
.reception-header-copy {
  display: none;
}

.reception-back-button {
  display: none;
}

html.reception-mobile-mode body .sidebar,
body[data-active-view="recepcao"] .sidebar {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px !important;
  align-items: center !important;
  justify-content: initial !important;
  min-height: 96px !important;
  max-height: 110px !important;
  padding: 10px 12px !important;
}

html.reception-mobile-mode body .brand-card,
body[data-active-view="recepcao"] .brand-card {
  width: auto !important;
}

html.reception-mobile-mode body .brand-image,
body[data-active-view="recepcao"] .brand-image {
  width: auto !important;
  height: 42px !important;
  max-width: 92px !important;
}

html.reception-mobile-mode body .reception-header-copy,
body[data-active-view="recepcao"] .reception-header-copy {
  display: grid !important;
  gap: 1px;
  min-width: 0;
}

html.reception-mobile-mode body .reception-back-button:not([hidden]),
body[data-active-view="recepcao"] .reception-back-button:not([hidden]) {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  justify-self: end;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #e3d3c4;
  border-radius: 999px;
  background: #fff8ef;
  color: #5a341d;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(90, 54, 27, 0.08);
}

html.reception-mobile-mode body .reception-back-button:hover,
body[data-active-view="recepcao"] .reception-back-button:hover {
  background: #8b5227;
  color: #ffffff;
}

.reception-header-copy strong {
  color: #2f1b12;
  font-size: 1rem;
  line-height: 1.05;
}

.reception-header-copy span {
  color: #7a5d49;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.05;
}

html.reception-mobile-mode body .sidebar-nav,
body[data-active-view="recepcao"] .sidebar-nav {
  display: none !important;
  gap: 6px !important;
  overflow-x: auto;
  justify-self: end;
}

html.reception-mobile-mode body .nav-group,
body[data-active-view="recepcao"] .nav-group {
  display: contents !important;
}

html.reception-mobile-mode body .nav-section-label,
html.reception-mobile-mode body .nav-group-secondary,
html.reception-mobile-mode body .nav-link:not([data-view="recepcao"]):not([data-view="reservas"]):not([data-view="mesas"]),
body[data-active-view="recepcao"] .nav-section-label,
body[data-active-view="recepcao"] .nav-group-secondary,
body[data-active-view="recepcao"] .nav-link:not([data-view="recepcao"]):not([data-view="reservas"]):not([data-view="mesas"]) {
  display: none !important;
}

html.reception-mobile-mode body .nav-link,
body[data-active-view="recepcao"] .nav-link {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  color: #5a341d !important;
  background: #fff8ef;
  white-space: nowrap;
}

html.reception-mobile-mode body .nav-link .nav-icon,
body[data-active-view="recepcao"] .nav-link .nav-icon {
  display: none;
}

html.reception-mobile-mode body .nav-link.active,
body[data-active-view="recepcao"] .nav-link.active {
  color: #ffffff !important;
  background: #8b5227 !important;
}

html.reception-mobile-mode body .reception-top,
body[data-active-view="recepcao"] .reception-top {
  display: none !important;
}

html.reception-mobile-mode body .reception-kpis,
html.reception-mobile-mode body .reception-tabs,
body[data-active-view="recepcao"] .reception-kpis,
body[data-active-view="recepcao"] .reception-tabs {
  display: flex !important;
}

html.reception-mobile-mode body .reception-sticky-bar,
body[data-active-view="recepcao"] .reception-sticky-bar {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  gap: 8px !important;
  margin: 0 -10px !important;
  padding: 12px !important;
  background: var(--surface-strong, #ffffff) !important;
  border-bottom: 1px solid var(--line, #e8dccf) !important;
}

.reception-search-field {
  position: relative;
}

.reception-search-field::before {
  content: "";
  position: absolute;
  top: calc(50% - 8px);
  left: 16px;
  z-index: 1;
  width: 13px;
  height: 13px;
  border: 2px solid #7a5d49;
  border-radius: 50%;
}

.reception-search-field::after {
  content: "";
  position: absolute;
  top: calc(50% + 5px);
  left: 29px;
  z-index: 1;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: #7a5d49;
  transform: rotate(45deg);
}

.reception-search-field input {
  min-height: 56px !important;
  padding-left: 44px !important;
  border-radius: 8px !important;
  font-size: 1rem !important;
}

.reception-kpis span {
  min-height: 40px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  background: #fffdf9 !important;
}

.reception-tabs button {
  min-height: 38px !important;
  border-radius: 999px !important;
}

.reception-shell {
  gap: 12px !important;
}

.recepcao-list {
  gap: 8px !important;
}

.recepcao-item {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) minmax(112px, 0.34fr);
  gap: 10px !important;
  align-items: center;
  min-height: 104px !important;
  max-height: 120px !important;
  padding: 12px !important;
  border-radius: 8px !important;
}

.recepcao-item:active {
  transform: scale(0.98);
}

.recepcao-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f2e5d8;
  color: #5a341d;
  font-weight: 900;
}

.recepcao-item-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.recepcao-item-header span {
  color: #7a5d49;
  font-size: 0.84rem;
  font-weight: 900;
}

.recepcao-item-meta {
  gap: 6px !important;
  align-items: center;
}

.table-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 193, 7, 0.15);
  color: #8a6200;
  font-weight: 900;
}

.table-state-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.table-state-badge.is-free {
  background: #edf5e7;
  color: #547244;
}

.table-state-badge.is-occupied {
  background: #e8edf0;
  color: #384f5b;
}

.reception-status {
  width: max-content;
  border-radius: 999px !important;
}

.reception-status::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
}

.recepcao-primary-action {
  min-height: 38px !important;
  border-radius: 999px !important;
}

.reception-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  background: #8b5227;
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(90, 54, 27, 0.22);
}

body[data-active-view="recepcao"] .main-shell,
html.reception-mobile-mode body .main-shell {
  padding-bottom: 82px !important;
}

@media (min-width: 1280px) {
  .reception-fab {
    display: none;
  }
}

@media (max-width: 768px) {
  html.reception-mobile-mode body .sidebar,
  body[data-active-view="recepcao"] .sidebar {
    grid-template-columns: auto minmax(0, 1fr);
    max-height: none !important;
  }

  html.reception-mobile-mode body .sidebar-nav,
  body[data-active-view="recepcao"] .sidebar-nav {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .recepcao-item {
    grid-template-columns: 42px minmax(0, 1fr);
    max-height: 120px !important;
  }

  .recepcao-item-action {
    grid-column: 2;
  }
}

/* Reception operational mobile pass */
body[data-active-view="recepcao"],
html.reception-mobile-mode body {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --primary: #8b5e3c;
  --primary-dark: #5a3823;
  --text: #2d2d2d;
  --text-secondary: #5f5b56;
  --border: #e3d3c6;
  --success: #1b7a3e;
  --warning: #c78500;
  --danger: #d62d2d;
  --info: #0066cc;
  background: var(--bg) !important;
  color: var(--text) !important;
}

body[data-active-view="recepcao"] .reception-kpis,
html.reception-mobile-mode body .reception-kpis {
  display: none !important;
}

body[data-active-view="recepcao"] .sidebar,
html.reception-mobile-mode body .sidebar {
  min-height: 82px !important;
  max-height: 96px !important;
  background: var(--surface) !important;
}

body[data-active-view="recepcao"] .brand-image,
html.reception-mobile-mode body .brand-image {
  height: 36px !important;
  max-width: 78px !important;
}

body[data-active-view="recepcao"] .reception-header-copy strong,
html.reception-mobile-mode body .reception-header-copy strong {
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 800;
}

body[data-active-view="recepcao"] .reception-header-copy span,
html.reception-mobile-mode body .reception-header-copy span {
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 700;
}

body[data-active-view="recepcao"] .reception-sticky-bar,
html.reception-mobile-mode body .reception-sticky-bar {
  padding: 10px 12px 12px !important;
  background: var(--bg) !important;
  border-bottom: 1px solid var(--border) !important;
}

body[data-active-view="recepcao"] .reception-search-field input,
html.reception-mobile-mode body .reception-search-field input {
  min-height: 52px !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  font-weight: 700;
}

body[data-active-view="recepcao"] .reception-tabs,
html.reception-mobile-mode body .reception-tabs {
  gap: 8px !important;
  padding-bottom: 2px;
  scrollbar-width: none;
}

body[data-active-view="recepcao"] .reception-tabs::-webkit-scrollbar,
html.reception-mobile-mode body .reception-tabs::-webkit-scrollbar {
  display: none;
}

body[data-active-view="recepcao"] .reception-tabs button,
html.reception-mobile-mode body .reception-tabs button {
  min-height: 38px !important;
  padding: 0 14px !important;
  border: 1px solid #d9c8b8 !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: var(--primary-dark) !important;
  font-weight: 700 !important;
}

body[data-active-view="recepcao"] .reception-tabs button.active,
html.reception-mobile-mode body .reception-tabs button.active {
  border-color: var(--primary) !important;
  background: var(--primary) !important;
  color: #ffffff !important;
}

body[data-active-view="recepcao"] .recepcao-list,
html.reception-mobile-mode body .recepcao-list {
  gap: 8px !important;
}

body[data-active-view="recepcao"] .recepcao-item,
html.reception-mobile-mode body .recepcao-item {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 16px !important;
  border: 1px solid var(--border) !important;
  border-left: 5px solid var(--primary) !important;
  border-radius: 14px !important;
  background: var(--surface) !important;
  box-shadow: 0 8px 22px rgba(90, 56, 35, 0.08);
}

body[data-active-view="recepcao"] .recepcao-item.is-confirmed,
html.reception-mobile-mode body .recepcao-item.is-confirmed {
  border-left-color: var(--success) !important;
}

body[data-active-view="recepcao"] .recepcao-item.is-checked-in,
html.reception-mobile-mode body .recepcao-item.is-checked-in {
  border-left-color: var(--info) !important;
}

body[data-active-view="recepcao"] .recepcao-item.is-waiting,
html.reception-mobile-mode body .recepcao-item.is-waiting {
  border-left-color: var(--warning) !important;
}

body[data-active-view="recepcao"] .recepcao-item.is-no-show,
html.reception-mobile-mode body .recepcao-item.is-no-show {
  border-left-color: var(--danger) !important;
}

.recepcao-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.recepcao-table-title {
  color: var(--primary);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
}

.recepcao-customer-name {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body[data-active-view="recepcao"] .recepcao-item-meta,
html.reception-mobile-mode body .recepcao-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px !important;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 700;
  white-space: normal;
}

.recepcao-meta-pill,
.recepcao-zone-label {
  color: var(--text-secondary);
}

.recepcao-zone-label {
  font-size: 0.9rem;
  font-weight: 700;
}

body[data-active-view="recepcao"] .reception-status,
html.reception-mobile-mode body .reception-status {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px !important;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

body[data-active-view="recepcao"] .reception-status.is-confirmed,
html.reception-mobile-mode body .reception-status.is-confirmed {
  background: #e8f7ec !important;
  color: var(--success) !important;
}

body[data-active-view="recepcao"] .reception-status.is-checked-in,
html.reception-mobile-mode body .reception-status.is-checked-in {
  background: #ddf2ff !important;
  color: var(--info) !important;
}

body[data-active-view="recepcao"] .reception-status.is-no-show,
html.reception-mobile-mode body .reception-status.is-no-show {
  background: #ffe6e6 !important;
  color: var(--danger) !important;
}

body[data-active-view="recepcao"] .reception-status.is-waiting,
html.reception-mobile-mode body .reception-status.is-waiting {
  background: #fff4d6 !important;
  color: var(--warning) !important;
}

body[data-active-view="recepcao"] .recepcao-primary-action,
html.reception-mobile-mode body .recepcao-primary-action {
  min-height: 48px !important;
  border-radius: 12px !important;
  background: var(--primary) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

body[data-active-view="recepcao"] .reception-sheet-card,
html.reception-mobile-mode body .reception-sheet-card {
  min-height: 70dvh;
  max-height: 90dvh;
  padding: 16px 16px 88px;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  background: var(--bg);
}

body[data-active-view="recepcao"] .reception-detail,
html.reception-mobile-mode body .reception-detail {
  gap: 24px;
  padding: 0;
  border: 0;
  background: transparent;
}

body[data-active-view="recepcao"] .reception-detail-head,
html.reception-mobile-mode body .reception-detail-head {
  align-items: flex-start;
}

body[data-active-view="recepcao"] .reception-detail-head h3,
html.reception-mobile-mode body .reception-detail-head h3 {
  margin: 6px 0 8px;
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1.15;
}

body[data-active-view="recepcao"] .reception-detail-head > div > span:first-child,
html.reception-mobile-mode body .reception-detail-head > div > span:first-child {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

body[data-active-view="recepcao"] .reception-detail-list,
html.reception-mobile-mode body .reception-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.reception-quick-card {
  display: grid;
  gap: 6px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.reception-quick-card span {
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.reception-quick-card strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  text-overflow: ellipsis;
}

body[data-active-view="recepcao"] .reception-detail-action,
html.reception-mobile-mode body .reception-detail-action {
  position: sticky;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 -16px -88px;
  padding: 12px 16px 18px;
  background: rgba(246, 243, 238, 0.96);
  border-top: 1px solid var(--border);
}

body[data-active-view="recepcao"] .reception-detail-action .button,
body[data-active-view="recepcao"] .reception-detail-action .recepcao-primary-action,
html.reception-mobile-mode body .reception-detail-action .button,
html.reception-mobile-mode body .reception-detail-action .recepcao-primary-action {
  min-height: 48px !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
}

.reception-secondary-action {
  color: var(--primary-dark) !important;
  background: #ffffff !important;
  border: 1px solid var(--border) !important;
}

@media (max-width: 380px) {
  body[data-active-view="recepcao"] .reception-detail-list,
  html.reception-mobile-mode body .reception-detail-list,
  body[data-active-view="recepcao"] .reception-detail-action,
  html.reception-mobile-mode body .reception-detail-action {
    grid-template-columns: 1fr;
  }

  .recepcao-table-title {
    font-size: 19px;
  }

  .recepcao-customer-name {
    font-size: 17px;
  }
}

html.reception-mobile-mode body[data-active-view="recepcao"] .reception-sticky-bar > .reception-tabs,
html.reception-mobile-mode body .reception-sticky-bar > .reception-tabs,
body[data-active-view="recepcao"] .reception-sticky-bar > .reception-tabs {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

html.reception-mobile-mode body .sidebar > .sidebar-nav,
body[data-active-view="recepcao"] .sidebar > .sidebar-nav {
  display: none !important;
}

body[data-active-view="recepcao"] .reception-sticky-bar > .reception-tabs,
html.reception-mobile-mode body .reception-sticky-bar > .reception-tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 0 18px 4px 0 !important;
  scroll-padding-right: 18px;
  -webkit-overflow-scrolling: touch;
}

body[data-active-view="recepcao"] .reception-tabs button,
html.reception-mobile-mode body .reception-tabs button {
  flex: 0 0 auto !important;
  min-height: 36px !important;
  padding: 0 12px !important;
  font-size: 0.88rem !important;
  line-height: 1 !important;
}

body[data-active-view="recepcao"] .main-shell,
html.reception-mobile-mode body .main-shell {
  padding-bottom: 14px !important;
}

body[data-active-view="recepcao"] .reception-fab,
html.reception-mobile-mode body .reception-fab {
  display: none !important;
}

@media (max-width: 390px) {
  body[data-active-view="recepcao"] .reception-tabs button,
  html.reception-mobile-mode body .reception-tabs button {
    padding: 0 10px !important;
    font-size: 0.82rem !important;
  }
}

body[data-active-view="recepcao"] .reception-sticky-bar,
html.reception-mobile-mode body .reception-sticky-bar {
  gap: 8px !important;
  padding-bottom: 10px !important;
}

body[data-active-view="recepcao"] .reception-sticky-bar > .reception-tabs,
html.reception-mobile-mode body .reception-sticky-bar > .reception-tabs {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
  padding: 0 !important;
}

body[data-active-view="recepcao"] .reception-tabs button,
html.reception-mobile-mode body .reception-tabs button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 36px !important;
  padding: 0 8px !important;
  font-size: clamp(0.76rem, 2.9vw, 0.88rem) !important;
  text-align: center;
}

body[data-active-view="recepcao"] #reception-feedback:empty,
html.reception-mobile-mode body #reception-feedback:empty {
  display: none !important;
}

@media (max-width: 360px) {
  body[data-active-view="recepcao"] .reception-sticky-bar > .reception-tabs,
  html.reception-mobile-mode body .reception-sticky-bar > .reception-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

body[data-active-view="recepcao"] .reception-sticky-bar > .reception-filters,
html.reception-mobile-mode body .reception-sticky-bar > .reception-filters {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body[data-active-view="recepcao"] .reception-filters button,
html.reception-mobile-mode body .reception-filters button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 36px !important;
  padding: 0 8px !important;
  border: 1px solid #d9c8b8 !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: var(--primary-dark, #5a3823) !important;
  font-size: clamp(0.76rem, 2.9vw, 0.88rem) !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-align: center;
  white-space: nowrap;
}

body[data-active-view="recepcao"] .reception-filters button.active,
html.reception-mobile-mode body .reception-filters button.active {
  border-color: var(--primary, #8b5e3c) !important;
  background: var(--primary, #8b5e3c) !important;
  color: #ffffff !important;
}

@media (max-width: 360px) {
  body[data-active-view="recepcao"] .reception-sticky-bar > .reception-filters,
  html.reception-mobile-mode body .reception-sticky-bar > .reception-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
