/* ==========================================================================
   PAINEL WEB DESKTOP ALUGA FESTA - DESIGN SYSTEM & STYLES (app.css)
   Padrão: Mint Frost & Deep Teal
   ========================================================================== */

:root {
  /* Brand Colors (Mint Frost Palette) */
  --primary: #66BFBF;
  --primary-hover: #52a8a8;
  --primary-strong: #1F4F50;
  --primary-dark: #143637;
  --primary-soft: #DDF7F7;
  --primary-surface: #F0FBFB;

  /* Neutrals */
  --bg: #F5FAFA;
  --surface: #FFFFFF;
  --surface-alt: #F8FCFC;
  --border: #DFEEEE;
  --border-subtle: #EAF3F3;
  --border-focus: #66BFBF;

  /* Typography */
  --text: #1F4F50;
  --text-secondary: #366566;
  --text-muted: #5E898A;
  --text-dim: #8BA8A9;

  /* Status Colors */
  --success: #16A34A;
  --success-bg: #DCFCE7;
  --warning: #D97706;
  --warning-bg: #FEF3C7;
  --danger: #DC2626;
  --danger-bg: #FEE2E2;
  --info: #0284C7;
  --info-bg: #E0F2FE;
  --purple: #7C3AED;
  --purple-bg: #EDE9FE;

  /* Layout */
  --sidebar-w: 260px;
  --topbar-h: 68px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(31, 79, 80, 0.05);
  --shadow-md: 0 4px 14px rgba(31, 79, 80, 0.07);
  --shadow-lg: 0 10px 30px rgba(31, 79, 80, 0.10);
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
  display: flex;
}

/* ==========================================================================
   SIDEBAR FIXA (Tema Oficial Deep Teal & Ribbon Mint)
   ========================================================================== */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  background: linear-gradient(180deg, #143637 0%, #1F4F50 55%, #143637 100%);
  border-right: 1px solid rgba(73, 163, 163, 0.35);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 100;
  box-shadow: 4px 0 20px rgba(20, 54, 55, 0.25);
}

.sidebar-header {
  height: var(--topbar-h);
  padding: 0 18px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(102, 191, 191, 0.35);
  box-sizing: border-box;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.brand-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text h1 {
  font-size: 16.5px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.brand-badge {
  display: inline-block;
  background: rgba(136, 212, 212, 0.18);
  color: #88D4D4;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  margin-top: 2px;
  border: 1px solid rgba(136, 212, 212, 0.3);
}

/* Navegação da Sidebar (Mais próxima do topo) */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #88D4D4;
  opacity: 0.85;
  padding: 8px 12px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, 0.78);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  user-select: none;
  border: 1px solid transparent;
  white-space: nowrap;
}

.nav-item .nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  color: rgba(136, 212, 212, 0.8);
  transition: var(--transition);
  flex-shrink: 0;
}

.nav-item:hover {
  background: rgba(102, 191, 191, 0.12);
  color: #FFFFFF;
}

.nav-item:hover i {
  color: #88D4D4;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(102, 191, 191, 0.25) 0%, rgba(102, 191, 191, 0.10) 100%);
  color: #FFFFFF;
  font-weight: 700;
  border-color: rgba(102, 191, 191, 0.4);
  box-shadow: 0 2px 8px rgba(20, 54, 55, 0.3);
}

.nav-item.active i {
  color: #88D4D4;
  text-shadow: 0 0 10px rgba(102, 191, 191, 0.6);
}

.nav-item .badge {
  margin-left: auto;
  background: var(--primary);
  color: #143637;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}

.nav-item .badge.warning {
  background: var(--warning);
  color: white;
}

/* Rodapé da Sidebar: Perfil Discreto */
.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid rgba(136, 212, 212, 0.15);
  background: rgba(15, 43, 44, 0.85);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
}

.user-card:hover {
  background: rgba(102, 191, 191, 0.12);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(102, 191, 191, 0.25);
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.user-role {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  margin-top: 2px;
}

.btn-icon-subtle {
  background: none;
  border: none;
  color: rgba(136, 212, 212, 0.8);
  font-size: 15px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: var(--transition);
}

.btn-icon-subtle:hover {
  background: rgba(220, 38, 38, 0.2);
  color: #F87171;
}

/* ==========================================================================
   ÁREA PRINCIPAL (MAIN CONTENT)
   ========================================================================== */
.main-wrapper {
  flex: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ==========================================================================
   TOPBAR / CABEÇALHO SUPERIOR (Tema Oficial Deep Teal & Ribbon Mint)
   ========================================================================== */
.topbar {
  height: var(--topbar-h);
  background: linear-gradient(90deg, #143637 0%, #1F4F50 40%, #2A6768 80%, #388081 100%);
  border-bottom: 1px solid rgba(102, 191, 191, 0.35);
  box-shadow: 0 4px 18px rgba(20, 54, 55, 0.22);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.page-title-group h2 {
  font-size: 19px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.3px;
  text-shadow: 0 2px 8px rgba(20, 54, 55, 0.45);
}

.page-title-group p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Mesma geometria e acabamento para os dois selos do cabeçalho. */
.topbar-business-card,
.topbar-version-badge {
  box-sizing: border-box;
  height: 42px;
  flex-shrink: 0;
}

/* Card do Negócio / Loja & Logomarca (canto ajustado à direita) */
.topbar-business-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 5px 4px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(102, 191, 191, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: var(--transition);
  user-select: none;
  cursor: pointer;
}

.topbar-business-card:hover {
  border-color: #88D4D4;
  background: rgba(102, 191, 191, 0.20);
  transform: translateY(-1px);
}

.topbar-business-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #FFFFFF;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.status-dot-mini {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #88D4D4;
  box-shadow: 0 0 8px #66BFBF;
  display: inline-block;
  flex-shrink: 0;
  animation: pulseDot 2s infinite ease-in-out;
}

.topbar-business-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  color: #88D4D4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.topbar-business-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Badge de Versão do Painel */
.topbar-version-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(102, 191, 191, 0.35);
  padding: 4px 5px 4px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  color: #FFFFFF;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  user-select: none;
}

.topbar-version-badge .version-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  letter-spacing: 0;
  font-weight: 700;
}

.topbar-version-badge .version-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 32px;
  background: rgba(255, 255, 255, 0.15);
  color: #88D4D4;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
}

/* Status de Conexão */
.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-pill.online {
  background: var(--success-bg);
  color: var(--success);
  border-color: rgba(22, 163, 74, 0.2);
}

.status-pill.demo {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: rgba(217, 119, 6, 0.25);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 191, 191, 0.35);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background: var(--primary-surface);
  border-color: var(--primary);
  color: var(--primary-strong);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* ==========================================================================
   CONTEÚDO ROLÁVEL (VIEWS)
   ========================================================================== */
.content-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 60px;
}

.view-panel {
  display: none;
  animation: fadeIn 0.2s ease-out;
}

.view-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   KPIS & STAT CARDS
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.kpi-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: rgba(102, 191, 191, 0.4);
}

.kpi-info p {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.kpi-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary-strong);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.kpi-sub {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dim);
  margin-top: 4px;
}

.kpi-sub.highlight {
  color: var(--danger);
  font-weight: 700;
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.kpi-icon.teal { background: var(--primary-soft); color: var(--primary-strong); }
.kpi-icon.orange { background: var(--warning-bg); color: var(--warning); }
.kpi-icon.blue { background: var(--info-bg); color: var(--info); }
.kpi-icon.purple { background: var(--purple-bg); color: var(--purple); }

/* ==========================================================================
   GRID DE DUAS COLUNAS OPERACIONAL
   ========================================================================== */
.two-col-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.card-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-strong);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header i {
  color: var(--primary);
}

.card-body {
  padding: 16px 20px;
}

/* ==========================================================================
   CARDS DE PEDIDOS NA LISTA RÁPIDA
   ========================================================================== */
.quick-order-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-order-item {
  padding: 14px 16px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.quick-order-item:hover {
  background: var(--primary-surface);
  border-color: rgba(102, 191, 191, 0.4);
  transform: translateX(2px);
}

.qorder-meta {
  flex: 1;
  min-width: 0;
}

.qorder-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.qorder-id {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary-strong);
  background: var(--primary-soft);
  padding: 2px 7px;
  border-radius: 6px;
}

.qorder-customer {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qorder-sub {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
}

.qorder-sub span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.qorder-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ==========================================================================
   STATUS BADGES
   ========================================================================== */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-status.confirmed { background: var(--success-bg); color: var(--success); }
.badge-status.awaiting_separation { background: var(--warning-bg); color: var(--warning); }
.badge-status.dispatched { background: var(--info-bg); color: var(--info); }
.badge-status.returned { background: var(--primary-soft); color: var(--primary-strong); }
.badge-status.signed { background: var(--success-bg); color: var(--success); }
.badge-status.awaiting_signature { background: var(--warning-bg); color: var(--warning); }
.badge-status.pre_reservation { background: var(--purple-bg); color: var(--purple); }

/* ==========================================================================
   TABELAS PROFISSIONAIS DE DADOS
   ========================================================================== */
.table-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  min-width: 280px;
}

.search-input-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 14px;
}

.search-input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  font-family: inherit;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(102, 191, 191, 0.15);
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
}

.filter-pill {
  padding: 6px 13px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.filter-pill:hover {
  border-color: var(--primary);
  color: var(--primary-strong);
}

.filter-pill.active {
  background: var(--primary-strong);
  color: white;
  border-color: var(--primary-strong);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.data-table th {
  background: var(--surface-alt);
  padding: 12px 18px;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: var(--primary-surface);
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* ==========================================================================
   MODAIS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 54, 55, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-window {
  background: var(--surface);
  border-radius: var(--radius-xl);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary-strong);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: var(--surface-alt);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary-strong);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 191, 191, 0.15);
}

/* Remove setas/spinners e impede controle indesejado de rolagem em campos numéricos */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--primary-strong);
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: slideToast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideToast {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   OVERLAY DE AUTENTICAÇÃO REAL (LOGIN / REGISTRO)
   ========================================================================== */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 54, 55, 0.75);
  backdrop-filter: blur(8px);
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-overlay.active {
  display: flex;
}

.auth-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  max-width: 440px;
  width: 100%;
  padding: 32px 28px;
  box-shadow: 0 20px 50px rgba(20, 54, 55, 0.25);
  border: 1px solid var(--border);
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.auth-tab-btn {
  flex: 1;
  padding: 8px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition);
}

.auth-tab-btn.active {
  color: var(--primary-strong);
  background: var(--primary-soft);
}

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: white;
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  margin-top: 12px;
}

.btn-google:hover {
  background: var(--surface-alt);
  border-color: var(--primary);
}

.btn-apple {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #000000;
  border: 1px solid #000000;
  padding: 10px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13.5px;
  color: #ffffff;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
}

.btn-apple:hover {
  background: #1f2937;
  border-color: #1f2937;
}

/* ==========================================================================
   SELETOR DE ITENS DINÂMICOS NA NOVA LOCAÇÃO
   ========================================================================== */
.order-items-container {
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 14px;
}

.order-item-row {
  display: grid;
  grid-template-columns: 2fr 75px 95px 36px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  background: var(--surface-alt);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* ==========================================================================
   AGENDA & CALENDÁRIO
   ========================================================================== */
.agenda-day-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.agenda-day-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.agenda-day-card.selected {
  background: var(--primary-soft);
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Responsividade Básica */
@media (max-width: 1080px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   BALÃO FLUTUANTE DE NOVA VERSÃO DISPONÍVEL (UPDATE NOTICE)
   Tema Oficial: Deep Teal & Ribbon Mint
   ========================================================================== */
#app-update-notice {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99999;
  display: none;
  align-items: center;
  gap: 14px;
  width: min(500px, calc(100vw - 32px));
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(20, 54, 55, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(102, 191, 191, 0.35);
  color: #fff;
  box-shadow: 0 20px 45px rgba(20, 54, 55, 0.5), 0 0 25px rgba(102, 191, 191, 0.25);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

#app-update-notice.show-animated {
  display: flex !important;
  animation: alugaFestaUpdateSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes alugaFestaUpdateSlideUp {
  0% { transform: translateY(120%) scale(0.95); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes swPulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

