/* Purpose-ID: HOTEL-CSS-004 | Purpose: Style reusable panels, buttons, forms, tables, status and feedback components. */
/* 01. Shared action affordances */
.icon-button {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--color-text-subtle);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  touch-action: manipulation;
  transition: color var(--duration-fast) ease, border-color var(--duration-fast) ease, transform var(--duration-fast) ease, background var(--duration-fast) ease;
}

.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.icon-button:hover {
  color: var(--color-accent);
  background: var(--color-surface-subtle);
  border-color: var(--color-border-strong);
  transform: translateY(-1px);
}

.icon-button.back-to-top {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 35;
  width: 48px;
  height: 48px;
  color: var(--color-accent-strong);
  box-shadow: var(--shadow-panel);
  font-size: 1.5rem;
}

.back-to-top[hidden],
.copilot-open .back-to-top,
body:has(.agent-console.concierge-v2.is-transcript-open) .back-to-top,
body:has(dialog:modal) .back-to-top {
  display: none !important;
}

.back-to-top:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

@media print {
  .back-to-top { display: none !important; }
}

.flash {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 24px;
  padding: 14px 17px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: var(--shadow-panel);
  font-size: .84rem;
}

.flash > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: 900;
}

.flash-success > span {
  color: var(--color-accent-strong);
  background: var(--color-accent-soft);
}

.flash-error > span {
  color: var(--color-danger);
  background: var(--color-danger-soft);
}

/* 02. Hero and overview components */
.hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr);
  align-items: end;
  gap: 32px;
  min-height: 270px;
  padding: clamp(28px, 4vw, 50px);
  overflow: hidden;
  color: #edf9f3;
  background: radial-gradient(circle at 86% 5%, rgba(135,225,181,.22), transparent 27%), linear-gradient(125deg, #102f24, #174c38);
  border-radius: var(--radius-hero);
  box-shadow: var(--shadow-overlay);
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -170px;
  width: 390px;
  height: 390px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  box-shadow: 0 0 0 50px rgba(255,255,255,.025), 0 0 0 100px rgba(255,255,255,.018);
}

.hero-panel > * {
  position: relative;
  z-index: 2;
}

.hero-panel .eyebrow {
  color: #81d8ad;
}

.hero-panel h1 {
  margin-bottom: 17px;
  font-size: clamp(2rem, 4.2vw, 4rem);
  line-height: 1.02;
  letter-spacing: -.055em;
}

.hero-panel h1 em {
  color: #92e3ba;
  font-family: Georgia, serif;
  font-weight: 400;
}

.hero-panel p {
  max-width: 620px;
  margin-bottom: 0;
  color: #aac8bb;
  font-size: .9rem;
  line-height: 1.7;
}

.hero-agent {
  display: grid;
  grid-template-columns: 72px minmax(0,1fr) 42px;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  backdrop-filter: blur(12px);
}

.hero-agent small, .hero-agent strong {
  display: block;
}

.hero-agent small {
  color: #80bfa2;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.hero-agent strong {
  margin-top: 5px;
  font-size: .84rem;
}

.circle-link {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #123328;
  background: #a8ebca;
  border-radius: 50%;
  text-decoration: none;
  font-weight: 900;
}

.mini-orb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 72px;
  height: 72px;
  background: radial-gradient(circle at 35% 30%, #c5f5de, #3eaa78 55%, #164c39);
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(126,224,176,.08), inset 0 0 24px rgba(255,255,255,.25);
}

.mini-orb i {
  display: block;
  width: 4px;
  height: 18px;
  background: white;
  border-radius: 5px;
  animation: wave 1.2s ease-in-out infinite;
}

.mini-orb i:nth-child(2) {
  height: 28px;
  animation-delay: -.25s;
}

.mini-orb i:nth-child(3) {
  animation-delay: -.5s;
}

@keyframes wave {
  0%,100% {
    transform: scaleY(.5);
    opacity: .55;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 16px;
  margin: 22px 0;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 128px;
  padding: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel);
}

.metric-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-weight: 900;
}

.metric-icon.mint {
  color: var(--color-accent-strong);
  background: var(--color-accent-soft);
}

.metric-icon.blue {
  color: #356782;
  background: var(--color-info-soft);
}

.metric-icon.amber {
  color: var(--color-warning);
  background: var(--color-warning-soft);
}

.metric-icon.rose {
  color: var(--color-danger);
  background: var(--color-danger-soft);
}

.metric-card small, .metric-card strong, .metric-card p {
  display: block;
  margin: 0;
}

.metric-card small {
  color: var(--color-text-muted);
  font-size: .69rem;
  font-weight: 700;
}

.metric-card strong {
  margin-top: 4px;
  font-size: 1.8rem;
}

.metric-card p {
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: .65rem;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(280px,.42fr);
  gap: 18px;
}

/* 03. Surface components */
.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel);
}

/* 03.1. Machine-readable code preview: themed shell, code keeps its own scan-safe pixels. */
.code-preview {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: var(--space-4);
  overflow: hidden;
  background: color-mix(in srgb, var(--color-surface-subtle) 82%, var(--color-accent-soft));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--color-text) 5%, transparent);
}

.code-preview > img {
  display: block;
  width: min(100%, 170px);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: calc(var(--radius-control) - 2px);
}

.code-preview.code-preview-large > img {
  width: min(100%, 330px);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 25px 18px;
}

.panel-head .eyebrow {
  margin-bottom: 6px;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.16rem;
}

.text-link {
  color: var(--color-accent);
  font-size: .72rem;
  font-weight: 800;
  text-decoration: none;
}

.count-badge {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  color: var(--color-danger);
  background: var(--color-danger-soft);
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 900;
}

.activity-list {
  padding: 0 24px 18px;
}

.activity-item {
  display: grid;
  grid-template-columns: 40px minmax(0,1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 14px 0;
  border-top: 1px solid var(--color-border);
}

.activity-symbol {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--color-accent-strong);
  background: var(--color-accent-soft);
  border-radius: 12px;
  font-size: .72rem;
  font-weight: 900;
}

.activity-item strong, .activity-item small {
  display: block;
}

.activity-item strong {
  font-size: .78rem;
}

.activity-item small {
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: .64rem;
}

.activity-meta {
  text-align: right;
}

.activity-meta strong {
  font-size: .92rem;
}

.quiet-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 30px;
  text-align: center;
}

.quiet-state > span {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 13px;
  color: var(--color-accent-strong);
  background: var(--color-accent-soft);
  border-radius: 50%;
  font-weight: 900;
}

.quiet-state strong {
  font-size: .9rem;
}

.quiet-state p {
  max-width: 240px;
  margin: 7px 0 0;
  color: var(--color-text-muted);
  font-size: .7rem;
  line-height: 1.5;
}

.handoff-list {
  padding: 0 22px 20px;
}

.handoff-list article {
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 11px;
  padding: 14px 0;
  border-top: 1px solid var(--color-border);
}

.handoff-list article > span {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  background: var(--color-danger);
  border-radius: 50%;
}

.handoff-list strong {
  font-size: .76rem;
}

.handoff-list p {
  margin: 5px 0;
  color: var(--color-text-subtle);
  font-size: .69rem;
  line-height: 1.45;
}

.handoff-list small {
  color: var(--color-text-muted);
  font-size: .61rem;
}

.page-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.page-intro h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
  letter-spacing: -.055em;
}

.page-intro p {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--color-text-muted);
  font-size: .86rem;
  line-height: 1.7;
}

.main-content p {
  max-width: 75ch;
  line-height: 1.6;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.main-content .supporting-copy {
  margin: .75rem 0 1rem;
  color: var(--color-text-muted);
  font-size: .86rem;
}

/* 04. Controls and states: native hidden remains authoritative over display layouts. */
.app-body [hidden], .public-body [hidden] { display:none; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: var(--control-height);
  padding: 0 19px;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-control);
  cursor: pointer;
  font-size: var(--font-size-control);
  font-weight: 800;
  text-decoration: none;
  transition: .16s ease;
}

.button:disabled, .icon-button:disabled { opacity:var(--state-disabled-opacity); cursor:not-allowed; }
.button:focus-visible, .icon-button:focus-visible { outline:2px solid var(--color-focus); outline-offset:3px; }
.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-panel);
}

.button-primary {
  color: var(--color-on-accent);
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.button-primary:hover {
  background: var(--color-accent-strong);
}

.button-dark {
  color: var(--color-on-accent);
  background: var(--color-accent-strong);
  border-color: var(--color-accent-strong);
}

.button-secondary {
  background: var(--color-surface);
}

.button-danger {
  color: var(--color-on-danger);
  background: var(--color-danger);
  border-color: var(--color-danger);
}

.button-ghost {
  color: var(--color-text-subtle);
  background: transparent;
  border-color: var(--color-border);
}

.button-ghost:hover {
  color: var(--color-text);
  background: var(--color-surface-subtle);
}

.button-passkey {
  justify-content: center;
  gap: .55rem;
}

.button-passkey .passkey-mark {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-weight: 900;
}

.passkey-status {
  min-height: 1.4rem;
  margin: .65rem 0 0;
  font-size: .88rem;
}

.passkey-status[data-state="error"] { color: var(--color-danger); }
.passkey-status[data-state="success"] { color: var(--color-accent-strong); }
.passkey-status[data-state="working"] { color: var(--color-text-muted); }

.button-full {
  width: 100%;
}

.button-small {
  min-height: var(--control-height-small);
  padding: 0 14px;
  font-size: var(--font-size-control);
}

.import-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.upload-card {
  position: relative;
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 0 14px;
  padding: 25px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel);
}

.upload-card.accent {
  border-top: 3px solid var(--color-accent);
}

.upload-step {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  color: var(--color-accent-strong);
  background: var(--color-accent-soft);
  border-radius: 14px;
  font-size: .72rem;
  font-weight: 900;
}

.upload-copy h2 {
  margin-bottom: 7px;
  font-size: 1.22rem;
}

.upload-copy p {
  margin-bottom: 0;
  color: var(--color-text-muted);
  font-size: .71rem;
  line-height: 1.5;
}

.upload-copy .eyebrow {
  margin-bottom: 5px;
}

.dropzone {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 160px;
  margin: 22px 0 16px;
  padding: 22px;
  text-align: center;
  background: var(--color-surface-subtle);
  border: 1.5px dashed var(--color-border-strong);
  border-radius: 17px;
  cursor: default;
  transition: .16s ease;
}

.dropzone-picker {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 112px;
  cursor: pointer;
}

.dropzone:hover, .dropzone.is-over {
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
}

.dropzone input {
  position: fixed;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.dropzone strong, .dropzone small {
  display: block;
}

.dropzone strong {
  margin-top: 8px;
  font-size: .77rem;
}

.dropzone small {
  margin-top: 5px;
  color: var(--color-text-muted);
  font-size: .63rem;
}

.upload-queue {
  display: grid;
  gap: 7px;
  width: 100%;
  margin-top: 14px;
}

.upload-queue:empty {
  display: none;
}

.upload-queue-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(70px,120px) auto 30px;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  text-align: left;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
}

.upload-queue-copy {
  min-width: 0;
}

.upload-queue-copy strong,
.upload-queue-copy small {
  display: block;
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-queue-copy strong {
  font-size: .67rem;
}

.upload-queue-copy small,
.upload-queue-status {
  color: var(--color-text-muted);
  font-size: .58rem;
}

.upload-queue-progress {
  height: 6px;
  overflow: hidden;
  background: var(--color-border);
  border-radius: 99px;
}

.upload-queue-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--color-accent);
  border-radius: inherit;
  transition: width .16s ease;
}

.upload-file-icon {
  color: var(--color-accent);
  font-size: 1rem;
  line-height: 1;
}

.upload-queue-row[data-state="waiting"] {
  grid-template-columns: minmax(0,1fr) auto 30px;
}

.upload-queue-row[data-state="waiting"] .upload-queue-progress {
  display: none;
}

.upload-queue-row[data-state="failed"] {
  border-color: var(--color-danger);
}

.upload-queue-row[data-state="failed"] .upload-queue-progress i {
  background: var(--color-danger);
}

.upload-queue-remove,
.upload-clear {
  color: var(--color-text-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.upload-queue-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1rem;
}

.upload-queue-remove:hover {
  color: var(--color-danger);
  background: var(--color-danger-soft);
}

.upload-clear {
  margin-top: 9px;
  font-size: .61rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.upload-clear:disabled,
.upload-queue-remove:disabled {
  cursor: not-allowed;
  opacity: .45;
}

@media (max-width: 640px) {
  .upload-queue-row {
    grid-template-columns: minmax(0,1fr) 30px;
  }
  .upload-queue-progress,
  .upload-queue-status {
    grid-column: 1 / -1;
  }
  .upload-queue-row[data-state="waiting"] .upload-queue-status {
    grid-column: 1;
  }
  .upload-queue-row[data-state="waiting"] .upload-queue-remove {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
  }
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  font-weight: 900;
}

/* 05. Form components */
.field {
  display: grid;
  gap: 7px;
}

.field > span {
  color: var(--color-text-subtle);
  font-size: .68rem;
  font-weight: 800;
}

.field input, .field select, .field textarea {
  width: 100%;
  min-height: 49px;
  padding: 0 14px;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: 12px;
  outline: none;
  transition: .15s ease;
}

.field textarea {
  padding-block: 12px;
  line-height: 1.5;
  resize: vertical;
}

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-accent) 13%, transparent);
}

.field.compact {
  grid-column: 1 / -1;
  margin-bottom: 14px;
}

.field-help {
  margin: 0;
  color: var(--color-text-muted);
  font-size: .67rem;
  line-height: 1.5;
}

.upload-card > .button {
  grid-column: 1 / -1;
}

.guest-table-panel {
  overflow: hidden;
}

/* 06. Tables and empty states */
.table-head {
  align-items: end;
}

.table-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 240px;
  min-height: 40px;
  padding: 0 12px;
  color: var(--color-text-muted);
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}

.search-field input {
  width: 100%;
  color: var(--color-text);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: .71rem;
}

.table-wrap {
  overflow: auto;
  border-top: 1px solid var(--color-border);
}

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

.data-table th {
  padding: 12px 17px;
  color: var(--color-text-muted);
  background: var(--color-surface-subtle);
  font-size: .61rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
}

.data-table td {
  padding: 14px 17px;
  border-top: 1px solid var(--color-border);
  font-size: .7rem;
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: color-mix(in srgb, var(--color-accent-soft) 35%, transparent);
}

.data-table small {
  color: var(--color-text-muted);
  font-size: .61rem;
}

.data-table code {
  padding: 5px 7px;
  color: var(--color-text-subtle);
  background: var(--color-surface-subtle);
  border-radius: 7px;
  font: .65rem ui-monospace, monospace;
}

.guest-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.guest-cell > span {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  color: var(--color-accent-strong);
  background: var(--color-accent-soft);
  border-radius: 10px;
  font-size: .66rem;
  font-weight: 900;
}

.guest-cell strong, .guest-cell small {
  display: block;
}

.room-number {
  font-size: .86rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 27px;
  padding: 0 9px;
  border-radius: 99px;
  font-size: .61rem;
  font-weight: 850;
  text-transform: capitalize;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-matched {
  color: var(--color-accent-strong);
  background: var(--color-accent-soft);
}

.status-matched::before {
  background: var(--color-accent);
}

.status-unmatched {
  color: var(--color-danger);
  background: var(--color-danger-soft);
}

.status-unmatched::before {
  background: var(--color-danger);
}

.status-ambiguous {
  color: var(--color-warning);
  background: var(--color-warning-soft);
}

.status-ambiguous::before {
  background: var(--color-warning);
}

.status-orphan_voided {
  color: var(--color-text-muted);
  background: var(--color-surface-subtle);
}

.status-orphan_voided::before {
  background: var(--color-text-muted);
}

.score {
  display: inline-block;
  width: 54px;
  height: 5px;
  margin-right: 6px;
  overflow: hidden;
  background: var(--color-border);
  border-radius: 5px;
  vertical-align: middle;
}

.score i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--color-accent);
  border-radius: inherit;
}

.score-10 i {
  width:10%
}

.score-20 i {
  width:20%
}

.score-30 i {
  width:30%
}

.score-40 i {
  width:40%
}

.score-50 i {
  width:50%
}

.score-60 i {
  width:60%
}

.score-70 i {
  width:70%
}

.score-80 i {
  width:80%
}

.score-90 i {
  width:90%
}

.score-100 i {
  width:100%
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 40px;
  text-align: center;
}

.empty-state > span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 15px;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border-radius: 18px;
  font-size: 1.4rem;
}

.empty-state h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.empty-state p {
  max-width: 430px;
  margin-bottom: 18px;
  color: var(--color-text-muted);
  font-size: .72rem;
  line-height: 1.6;
}

.compact-empty {
  min-height: 230px;
  border-top: 1px solid var(--color-border);
}

/* 07. Feedback: one global toast stack, four semantic states. */
/* EVERBOOKING_UNIFIED_TOP_TOAST_V1_START */
.app-toast {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-surface) 94%, transparent);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-overlay);
  width: 100%;
  min-width: 0;
  margin: 0;
  animation: unified-toast-in var(--duration-normal) var(--ease-standard) both;
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.app-toast-marker {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  color: var(--color-text);
  background: var(--color-surface-subtle);
  border-radius: 50%;
  font-weight: 900;
}

.app-toast.is-success .app-toast-marker { color: var(--color-accent-strong); background: var(--color-accent-soft); }
.app-toast.is-error .app-toast-marker { color: var(--color-danger); background: var(--color-danger-soft); }
.app-toast.is-warning .app-toast-marker { color: var(--color-warning); background: var(--color-warning-soft); }
.app-toast.is-info { border-color: var(--color-border-strong); }
.app-toast.is-warning { border-color: var(--color-warning); }

.app-toast-copy {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: var(--font-size-sm);
  font-weight: 700;
  line-height: 1.45;
}

.app-toast-close {
  width: var(--control-height-small);
  height: var(--control-height-small);
  color: var(--color-text-muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.app-toast-close:hover {
  color: var(--color-text);
  background: var(--color-surface-subtle);
}


/* One feedback position for the complete app bundle: viewport top + horizontal centre. */
.toast-region {
  /* Reset native popover box defaults; this global layer owns positioning. */
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  position: fixed;
  z-index: var(--z-toast);
  top: calc(max(10px, env(safe-area-inset-top)) + 6px);
  right: auto;
  bottom: auto;
  left: 50%;
  width: min(560px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  transform: translateX(-50%);
  align-content: start;
  justify-items: stretch;
  display: grid;
  gap: 10px;
  overflow: visible;
  pointer-events: none;
}

.app-toast.is-success {
  border-color: color-mix(in srgb, var(--color-accent) 34%, var(--color-border));
}

.app-toast.is-error {
  border-color: color-mix(in srgb, var(--color-danger) 42%, var(--color-border));
}


.app-toast.is-leaving {
  animation: unified-toast-out var(--duration-fast, 160ms) ease-in both;
}

/* Progressive fallback until toast.js promotes the server flash into the shared stack. */
.main-content > .flash {
  position: fixed;
  z-index: var(--z-toast);
  top: calc(max(10px, env(safe-area-inset-top)) + 6px);
  left: 50%;
  width: min(560px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  margin: 0;
  transform: translateX(-50%);
  box-shadow: var(--shadow-overlay);
}

@keyframes unified-toast-in {
  from { opacity: 0; transform: translateY(-12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes unified-toast-out {
  to { opacity: 0; transform: translateY(-8px) scale(.985); }
}

@media (max-width: 640px) {
  .toast-region,
  .main-content > .flash {
    top: calc(max(8px, env(safe-area-inset-top)) + 4px);
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }

  .app-toast {
    gap: 9px;
    padding: 12px;
    border-radius: 14px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .app-toast,
  .app-toast.is-leaving {
    animation-duration: 1ms;
  }
}
/* EVERBOOKING_UNIFIED_TOP_TOAST_V1_END */

/* 08. Shared voice sphere, based on the existing green mini-orb. Audio level comes only from live stream samples. */
.hotel-agent-dialog .voice-orb{--orb-size:88px;--orb-level:0;display:flex;align-items:center;justify-content:center;gap:7%;flex:none;width:var(--orb-size);height:var(--orb-size);border-radius:50%;background:radial-gradient(circle at 35% 30%,var(--color-accent-soft),var(--color-accent) 55%,var(--color-accent-strong));box-shadow:0 0 0 10px color-mix(in srgb,var(--color-accent) 9%,transparent),inset 0 0 26px color-mix(in srgb,var(--color-surface) 30%,transparent);transform:scale(calc(1 + var(--orb-level)*.09));transition:transform 65ms linear}
.hotel-agent-dialog .voice-orb i{display:block;width:5%;height:22%;border-radius:999px;background:var(--color-surface);transform:scaleY(calc(1 + var(--orb-level)*1.8))}
.hotel-agent-dialog .voice-orb i:nth-child(2){height:34%}
.hotel-agent-dialog .voice-orb[data-voice-state="preparing"]{animation:voice-orb-process 3s ease-in-out infinite}
.hotel-agent-dialog .voice-orb[data-voice-state="error"]{outline:3px solid var(--color-danger);outline-offset:9px}
.hotel-agent-dialog .copilot-chat>.voice-orb{margin:22px auto;--orb-size:86px}
.hotel-agent-dialog .copilot-appearance>.voice-orb{margin:32px auto;--orb-size:140px}
.hotel-agent-dialog .hotel-agent-stage>.voice-orb{--orb-size:64px;margin:8px}
.hotel-agent-dialog .copilot-chat>.voice-orb{display:none}
@keyframes voice-orb-process{50%{filter:brightness(1.12);box-shadow:0 0 0 15px color-mix(in srgb,var(--color-accent) 12%,transparent)}}
@media(prefers-reduced-motion:reduce){.hotel-agent-dialog .voice-orb[data-voice-state]{animation:none;transform:none;transition:none}.hotel-agent-dialog .voice-orb i{transform:none}}

/* 09. Safe structured analysis results */
.safe-result { line-height: 1.65; overflow-wrap: anywhere; }
.safe-result > :first-child { margin-top: 0; }
.safe-result > :last-child { margin-bottom: 0; }
.safe-result h3, .safe-result h4 { margin: 1em 0 .4em; font-size: 1.05rem; }
.safe-result p, .safe-result ul, .safe-result ol { margin: .6em 0; }
.safe-result .table-wrap { max-width: 100%; overflow: auto; }
.safe-result td, .safe-result th { white-space: normal; }

/* 10. Shared in-app confirmation/prompt dialog; browser alert/confirm/prompt are not used by hotel UI actions. */
.app-dialog{width:min(560px,calc(100vw - 28px));max-width:560px;max-height:calc(100dvh - 28px);margin:auto;padding:0;color:var(--color-text);background:transparent;border:0}
.app-dialog::backdrop{background:color-mix(in srgb,#000 68%,transparent);backdrop-filter:blur(4px)}
.app-dialog-shell{overflow:hidden;border:1px solid var(--color-border-strong);border-radius:var(--radius-panel,18px);background:var(--color-surface);box-shadow:0 24px 80px rgba(0,0,0,.45)}
.app-dialog-shell>header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:1.2rem 1.25rem;border-bottom:1px solid var(--color-border)}
.app-dialog-shell h2{margin:.25rem 0 0;font-size:1.25rem;line-height:1.25}
.app-dialog-shell .dialog-close{width:42px;height:42px;flex:none;border:1px solid var(--color-border);border-radius:12px;background:var(--color-surface);color:var(--color-text);font-size:1.35rem;cursor:pointer}
.app-dialog-body{display:grid;gap:1rem;padding:1.2rem 1.25rem}
.app-dialog-body>p{margin:0;line-height:1.55;color:var(--color-text-muted)}
.app-dialog-body>[data-app-dialog-meta]{padding:.75rem .9rem;border:1px solid var(--color-border);border-radius:11px;background:var(--color-surface-subtle);font-weight:700;overflow-wrap:anywhere}
.app-dialog-body .field{margin:0}
.app-dialog-body input{width:100%;min-height:46px;padding:.7rem .8rem;border:1px solid var(--color-border-strong);border-radius:10px;background:var(--color-surface-subtle);color:var(--color-text);font:inherit}
.app-dialog-shell>footer{display:flex;justify-content:flex-end;gap:.65rem;padding:0 1.25rem 1.25rem}
html.has-app-dialog,body.has-app-dialog{overflow:hidden}
@media(max-width:600px){.app-dialog{width:calc(100vw - 16px)}.app-dialog-shell>footer{display:grid;grid-template-columns:1fr}.app-dialog-shell>footer .button{width:100%}}

/* HOTEL-PRIVACY-LINKS · shared legal navigation */
.privacy-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.privacy-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  color: var(--color-text-subtle);
  background: color-mix(in srgb, var(--color-surface) 90%, var(--color-accent-soft));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-round);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--color-text) 3%, transparent);
  font-size: .7rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--duration-fast) ease, background var(--duration-fast) ease, border-color var(--duration-fast) ease, transform var(--duration-fast) ease;
}
.privacy-links a::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  background: var(--color-accent);
  border-radius: 50%;
  opacity: .72;
}
.privacy-links a:hover {
  color: var(--color-text);
  background: var(--color-accent-soft);
  border-color: color-mix(in srgb, var(--color-accent) 38%, var(--color-border));
  transform: translateY(-1px);
}
.privacy-links a:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}
.privacy-links--sidebar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 6px;
  background: color-mix(in srgb, var(--shell-sidebar-surface) 88%, transparent);
  border: 1px solid var(--shell-sidebar-border);
  border-radius: 14px;
}
.privacy-links--sidebar a {
  min-width: 0;
  min-height: 30px;
  padding: 0 6px;
  overflow: hidden;
  color: var(--shell-sidebar-muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
  box-shadow: none;
  font-size: .62rem;
  text-overflow: ellipsis;
}
.privacy-links--sidebar a::before { display: none; }
.privacy-links--sidebar a:hover {
  color: var(--shell-sidebar-text);
  background: var(--shell-sidebar-hover);
  transform: none;
}
.privacy-links--public {
  gap: 7px;
  padding-top: 4px;
}
