/* ============================================================
   MARÉ · app-operacao.css — operacao.html (Modo Operação / recepção)
   Usa as vars de tokens.css + componentes de app.css (btn, card, toast,
   demo-banner, site-header, type-toggle, form-field). Mobile-first,
   uma mão só: alvos de toque ≥48px, bottom-nav fixa.
   ============================================================ */

body.op-body { padding-bottom: 76px; background: var(--sand-100); }

/* ---------- topbar compacta (mesmo padrão visual do site-header) ---------- */
.op-topbar-info {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--lagoon-900); color: var(--aqua-200);
  font-size: .74rem; font-weight: 600; padding: 6px 12px; text-align: center;
}

/* ---------- barra de status de conexão ---------- */
.status-bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 10px; padding: 12px 16px; background: var(--white); border-bottom: 1px solid var(--sand-200);
}
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .82rem;
  padding: 8px 14px; border-radius: var(--radius-pill); transition: background .2s ease, color .2s ease;
}
.status-pill .status-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.status-pill.online { background: #EAF7F1; color: #127A5B; }
.status-pill.online .status-dot { background: #1FA37A; }
.status-pill.offline { background: #FFF3D9; color: #9A6A15; }
.status-pill.offline .status-dot { background: #E0A419; animation: status-pulse 1.3s ease-in-out infinite; }
@keyframes status-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .status-pill.offline .status-dot { animation: none; } }

.simulate-btn {
  border: 1.5px solid var(--sand-200); background: var(--white); color: var(--ink-600);
  font-family: var(--font-body); font-size: .76rem; font-weight: 700; padding: 10px 16px;
  border-radius: var(--radius-pill); cursor: pointer; min-height: 40px; white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s;
}
.simulate-btn:hover { border-color: var(--ink-600); }
.simulate-btn.active { border-color: var(--coral-500); color: var(--coral-600); background: #FDEEE4; }

/* ---------- faixa offline ---------- */
.offline-banner {
  display: none; align-items: flex-start; gap: 10px;
  background: #FFF3D9; color: #7A5210; padding: 14px 16px; font-size: .85rem;
  font-weight: 600; line-height: 1.45; border-bottom: 2px solid var(--gold-300);
}
.offline-banner.show { display: flex; animation: fade-in .25s ease; }
.offline-banner svg { flex-shrink: 0; margin-top: 1px; color: #C4881A; }

/* ---------- conteúdo principal ---------- */
.op-main { padding: 20px 16px 32px; max-width: 640px; margin: 0 auto; }
.op-view { display: none; }
.op-view.active { display: block; animation: fade-in .25s ease; }
.op-view-title { font-size: 1.25rem; margin-bottom: 4px; }
.op-view-sub { color: var(--ink-600); font-size: .88rem; margin: 0 0 18px; }

/* ---------- resumo de ocupação (Hoje) ---------- */
.occ-summary-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--white); border-radius: var(--radius-l); box-shadow: var(--shadow-1);
  padding: 20px 22px; margin-bottom: 20px;
}
.occ-summary-label { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-600); }
.occ-summary-value { font-family: var(--font-display); font-size: 2.1rem; color: var(--lagoon-900); margin-top: 2px; }
.occ-summary-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--sand-200); display: flex; align-items: center; justify-content: center; color: var(--teal-500); flex-shrink: 0; }

.op-subhead { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-600); margin: 22px 0 10px; }
.op-subhead:first-of-type { margin-top: 0; }

/* ---------- itens de check-in/check-out ---------- */
.op-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: var(--white); border-radius: var(--radius-l); box-shadow: var(--shadow-1);
  padding: 16px 18px; margin-bottom: 12px; transition: opacity .3s ease;
}
.op-item.done { opacity: .55; }
.op-item .guest-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.op-item .guest-name { font-weight: 700; color: var(--lagoon-900); font-size: 1rem; }
.op-item .chale-tag { font-size: .8rem; color: var(--ink-600); }
.op-action-btn {
  min-height: 48px; min-width: 132px; border: none; border-radius: var(--radius-pill);
  background: var(--teal-500); color: var(--white); font-family: var(--font-body);
  font-weight: 700; font-size: .85rem; cursor: pointer; padding: 0 18px; flex-shrink: 0;
  transition: background .15s ease;
}
.op-action-btn:hover:not(:disabled) { background: var(--lagoon-700); }
.op-action-btn:disabled { background: #EAF7F1; color: #127A5B; cursor: default; }
.op-action-btn.checkout-btn { background: var(--coral-500); }
.op-action-btn.checkout-btn:hover:not(:disabled) { background: var(--coral-600); }

/* ---------- formulário nova reserva ---------- */
.op-select {
  width: 100%; padding: 13px 14px; border-radius: var(--radius-s); border: 1.5px solid var(--sand-200);
  font-family: var(--font-body); font-size: .95rem; background: var(--white); color: var(--ink-900);
  min-height: 48px; appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3e%3cpath fill='%234A6072' d='M6 8 0 0h12z'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 11px 8px;
}
.op-select:focus { outline: 2px solid var(--teal-500); outline-offset: 1px; border-color: var(--teal-500); }
.op-toggle-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.op-toggle-row > span { font-size: .8rem; font-weight: 600; color: var(--ink-600); }
.btn-block { width: 100%; justify-content: center; min-height: 52px; font-size: 1rem; }

/* ---------- fila offline ---------- */
.fila-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--white); border-radius: var(--radius-m); box-shadow: var(--shadow-1);
  padding: 14px 16px; margin-bottom: 10px;
  transition: opacity .35s ease, transform .35s ease;
}
.fila-item.removing { opacity: 0; transform: translateX(24px); }
@media (prefers-reduced-motion: reduce) { .fila-item { transition: none; } }
.fila-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fila-tipo { font-weight: 700; color: var(--lagoon-900); font-size: .88rem; }
.fila-desc { font-size: .78rem; color: var(--ink-600); overflow-wrap: anywhere; }
.fila-time { font-size: .7rem; color: var(--ink-600); }
.fila-status { font-size: .7rem; font-weight: 700; padding: 6px 11px; border-radius: var(--radius-pill); white-space: nowrap; flex-shrink: 0; }
.fila-status.pendente { background: #FADCCB; color: var(--coral-600); }
.fila-status.sincronizando { background: #FFF3D9; color: #9A6A15; }
.fila-status.sincronizado { background: #EAF7F1; color: #127A5B; }
.fila-empty { text-align: center; padding: 48px 20px; color: var(--ink-600); }
.fila-empty svg { color: #B9DFF5; margin-bottom: 14px; }
.fila-empty p { margin: 0; font-size: .92rem; font-weight: 600; }

/* ---------- rodapé simplificado ---------- */
.op-footer-strap {
  text-align: center; font-size: .78rem; color: var(--ink-600); padding: 20px 16px 8px;
}

/* ---------- bottom-nav fixa (sempre visível — ferramenta de trabalho) ---------- */
.op-bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  display: flex; background: var(--white); box-shadow: 0 -4px 18px rgba(6, 43, 44, .14);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.op-nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-height: 60px; border: none; background: transparent; color: var(--ink-600);
  font-family: var(--font-body); font-size: .68rem; font-weight: 700; cursor: pointer;
  position: relative; padding: 8px 4px;
}
.op-nav-btn svg { width: 22px; height: 22px; }
.op-nav-btn.active { color: var(--teal-500); }
.op-nav-btn .nav-badge {
  display: none; position: absolute; top: 5px; left: 50%; margin-left: 4px;
  background: var(--coral-500); color: var(--white); font-size: .62rem; font-weight: 800;
  min-width: 16px; height: 16px; border-radius: 50%; align-items: center; justify-content: center; padding: 0 3px;
}

@media (min-width: 720px) {
  .op-main { padding-top: 28px; }
}
