/* =============================================================
   Rodizio PWA — CSS Centralizado v3.1
   Extraído e consolidado de: index.html, garcom.html,
   cozinha.html, previsao.html + novas classes v3
   ============================================================= */

/* ---------------------------------------------------------------
   CSS CUSTOM PROPERTIES
   --------------------------------------------------------------- */
:root {
  --bg-primary: #1a1a2e;
  --bg-card: #16213e;
  --bg-input: #0f3460;
  --text-primary: #eee;
  --text-secondary: #888;
  --text-muted: #555;
  --accent: #e94560;
  --success: #27ae60;
  --warning: #f39c12;
  --danger: #e74c3c;
  --blue: #3498db;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 20px;
}

/* ---------------------------------------------------------------
   DARK/LIGHT TOGGLE PREP
   --------------------------------------------------------------- */
[data-theme="light"] {
  --bg-primary: #f5f5f5;
  --bg-card: #ffffff;
  --bg-input: #e8e8e8;
  --text-primary: #222;
  --text-secondary: #666;
  --text-muted: #999;
  --accent: #e94560;
  --success: #27ae60;
  --warning: #f39c12;
  --danger: #e74c3c;
  --blue: #3498db;
}

/* ---------------------------------------------------------------
   BASE RESET & BODY
   --------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

/* ---------------------------------------------------------------
   HEADER
   --------------------------------------------------------------- */
header {
  background: var(--bg-card);
  padding: var(--spacing-md) var(--spacing-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.back {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}

.back:active {
  background: rgba(255,255,255,0.1);
}

.loja-tag {
  font-size: 11px;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.08);
  padding: 2px 8px;
  border-radius: 10px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------------------------------------------------------------
   SYNC STATUS DOT
   --------------------------------------------------------------- */
.sync-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.sync-dot.online {
  background: #27ae60;
  animation: pulse 2s infinite;
}

.sync-dot.offline {
  background: #e74c3c;
}

.sync-dot.pending {
  background: #f39c12;
  animation: pulse 1s infinite;
}

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

/* ---------------------------------------------------------------
   BADGES
   --------------------------------------------------------------- */
.badge-live {
  background: #e94560;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-poll {
  background: #0f3460;
  color: #888;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
}

.badge-supervisao {
  background: rgba(243,156,18,0.2);
  color: #f39c12;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

.badge-autonomo {
  background: rgba(39,174,96,0.2);
  color: #27ae60;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Velocidade badges */
.vel-normal {
  background: rgba(39,174,96,0.15);
  color: #27ae60;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

.vel-lento {
  background: rgba(243,156,18,0.15);
  color: #f39c12;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

.vel-critico {
  background: rgba(231,76,60,0.15);
  color: #e74c3c;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

/* ---------------------------------------------------------------
   KPI ROW & CARDS
   --------------------------------------------------------------- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-lg);
}

.kpi-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--spacing-md) var(--spacing-sm);
  text-align: center;
}

.kpi-card .valor {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.kpi-card .label {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: var(--spacing-xs);
}

/* ---------------------------------------------------------------
   CARDS
   --------------------------------------------------------------- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin: 0 var(--spacing-lg) var(--spacing-md);
}

.card h2 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* ---------------------------------------------------------------
   FORMS
   --------------------------------------------------------------- */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-group label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

input,
select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(233,69,96,0.2);
}

input::placeholder {
  color: var(--text-muted);
}

/* ---------------------------------------------------------------
   PREFERENCES GRID
   --------------------------------------------------------------- */
.pref-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pref-btn {
  background: var(--bg-input);
  border: 2px solid transparent;
  border-radius: 10px;
  color: #eee;
  padding: 10px 6px;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}

.pref-btn.active {
  border-color: var(--accent);
  background: rgba(233,69,96,0.15);
}

/* ---------------------------------------------------------------
   RESTRICTION CHIPS
   --------------------------------------------------------------- */
.rest-chip {
  display: inline-block;
  background: var(--bg-input);
  border: 2px solid transparent;
  border-radius: 20px;
  color: #888;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  margin: 4px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.rest-chip.active {
  border-color: var(--accent);
  color: #eee;
  background: rgba(233,69,96,0.1);
}

/* ---------------------------------------------------------------
   BUTTONS
   --------------------------------------------------------------- */
.btn-primary {
  width: 100%;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}

.btn-primary:active {
  opacity: 0.85;
}

.btn-ok {
  width: 100%;
  background: var(--bg-card);
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  color: #eee;
  font-size: 15px;
  font-weight: 600;
  padding: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.btn-ok:active {
  background: rgba(255,255,255,0.05);
}

.btn-ok.destaque {
  border-color: var(--success);
  color: var(--success);
  background: rgba(39,174,96,0.1);
}

/* ---------------------------------------------------------------
   MESA ITEMS
   --------------------------------------------------------------- */
.mesa-item {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}

.mesa-item:active {
  border-color: rgba(255,255,255,0.1);
}

.mesa-item.inativa {
  opacity: 0.4;
  cursor: default;
}

.mesa-info .num {
  font-size: 18px;
  font-weight: 700;
  color: #eee;
}

.mesa-info .det {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

.mesa-fechar {
  margin-left: auto;
  background: rgba(231,76,60,0.15);
  border: 1px solid rgba(231,76,60,0.3);
  border-radius: 8px;
  color: #e74c3c;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  font-family: inherit;
}

/* ---------------------------------------------------------------
   TEMPO COLORS
   --------------------------------------------------------------- */
.tempo-verde {
  color: #27ae60;
}

.tempo-amarelo {
  color: #f39c12;
}

.tempo-vermelho {
  color: #e74c3c;
}

/* ---------------------------------------------------------------
   FILA ITEMS
   --------------------------------------------------------------- */
.fila-item {
  background: var(--bg-card);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 4px solid transparent;
}

.fila-item.destaque {
  border-left-color: var(--accent);
  background: rgba(233,69,96,0.05);
}

.fila-item.salgada {
  border-left-color: var(--blue);
}

.fila-item.doce {
  border-left-color: var(--warning);
}

.fila-ordem {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 28px;
  text-align: center;
}

.fila-info .sabor {
  font-size: 15px;
  font-weight: 600;
  color: #eee;
}

.fila-info .tipo {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

/* ---------------------------------------------------------------
   HISTORICO ITEMS
   --------------------------------------------------------------- */
.hist-item {
  background: var(--bg-card);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* ---------------------------------------------------------------
   EFICIENCIA BAR
   --------------------------------------------------------------- */
.eficiencia-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}

.eficiencia-bar .fill {
  height: 100%;
  background: var(--success);
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* ---------------------------------------------------------------
   PREVISAO INLINE
   --------------------------------------------------------------- */
.previsao-inline {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

/* ---------------------------------------------------------------
   SECTION TITLE
   --------------------------------------------------------------- */
.section-title {
  font-size: 13px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 16px 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title .count {
  background: #e94560;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
}

/* ---------------------------------------------------------------
   OVERLAY / MODAL (bottom sheet)
   --------------------------------------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}

.overlay.hidden {
  display: none;
}

.overlay-content {
  background: var(--bg-card);
  border-radius: 16px 16px 0 0;
  padding: 20px 16px 32px;
  width: 100%;
  max-width: 480px;
  animation: slideUp 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* ---------------------------------------------------------------
   NOVA MESA BUTTON
   --------------------------------------------------------------- */
.btn-nova-mesa {
  width: 100%;
  background: transparent;
  border: 2px dashed rgba(255,255,255,0.2);
  border-radius: 12px;
  color: #888;
  font-size: 15px;
  font-weight: 600;
  padding: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}

.btn-nova-mesa:active {
  border-color: #e94560;
  color: #e94560;
}

/* ---------------------------------------------------------------
   RESUMO BAR (fixed bottom)
   --------------------------------------------------------------- */
.resumo-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  padding: 10px 16px 20px;
  display: flex;
  justify-content: space-around;
  border-top: 1px solid rgba(255,255,255,0.06);
  z-index: 90;
}

.resumo-bar .item {
  text-align: center;
}

.resumo-bar .valor {
  font-size: 18px;
  font-weight: 700;
  color: #eee;
}

.resumo-bar .label {
  font-size: 10px;
  color: #888;
  margin-top: 2px;
}

/* ---------------------------------------------------------------
   FAB REFRESH (fixed bottom right)
   --------------------------------------------------------------- */
.fab-refresh {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(233,69,96,0.4);
  z-index: 95;
  transition: transform 0.15s;
}

.fab-refresh:active {
  transform: scale(0.92);
}

/* ---------------------------------------------------------------
   SETUP / ONBOARDING
   --------------------------------------------------------------- */
.setup-container {
  max-width: 420px;
  margin: 0 auto;
  padding: 32px 16px 40px;
}

.setup-logo {
  font-size: 48px;
  text-align: center;
  margin-bottom: 8px;
}

.setup-subtitle {
  font-size: 14px;
  color: #888;
  text-align: center;
  margin-bottom: 28px;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.role-card {
  background: var(--bg-card);
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 18px 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.role-card.active {
  border-color: var(--accent);
  background: rgba(233,69,96,0.1);
}

.role-card .icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.role-card .name {
  font-size: 14px;
  font-weight: 700;
  color: #eee;
  margin-bottom: 4px;
}

.role-card .desc {
  font-size: 11px;
  color: #888;
  line-height: 1.4;
}

/* ---------------------------------------------------------------
   GEAR MENU
   --------------------------------------------------------------- */
.gear-btn {
  background: none;
  border: none;
  color: #888;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}

.gear-btn:active {
  background: rgba(255,255,255,0.08);
}

.gear-menu {
  position: absolute;
  top: 52px;
  right: 12px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 150;
  overflow: hidden;
}

.gear-menu.hidden {
  display: none;
}

.gear-menu-item {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: #eee;
  font-size: 14px;
  font-family: inherit;
  padding: 12px 16px;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.gear-menu-item:last-child {
  border-bottom: none;
}

.gear-menu-item:active {
  background: rgba(255,255,255,0.05);
}

/* ---------------------------------------------------------------
   SPACER
   --------------------------------------------------------------- */
.spacer {
  height: 80px;
}

/* ---------------------------------------------------------------
   DASHBOARD — HEALTH GRID
   --------------------------------------------------------------- */
.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.health-card {
  background: var(--bg-input);
  border-radius: 10px;
  padding: 12px;
  border-left: 4px solid transparent;
}

.health-card.green {
  border-left-color: var(--success);
}

.health-card.yellow {
  border-left-color: var(--warning);
}

.health-card.red {
  border-left-color: var(--danger);
}

/* Ratio visual (salgada vs doce) */
.ratio-visual {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 8px;
}

.ratio-salg {
  background: var(--blue);
  transition: width 0.4s ease;
}

.ratio-doce {
  background: var(--warning);
  flex: 1;
}

/* ---------------------------------------------------------------
   TABLES
   --------------------------------------------------------------- */
.tabela {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tabela th {
  color: #888;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.tabela td {
  padding: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: #eee;
}

.tabela .hora-col {
  color: #888;
  font-size: 12px;
}

.tabela .num {
  font-weight: 700;
  text-align: right;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.compare-table th {
  color: #888;
  font-size: 11px;
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.compare-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: #eee;
}

.compare-table .best {
  color: #27ae60;
  font-weight: 700;
}

.compare-table .worst {
  color: #e74c3c;
  font-weight: 700;
}

.compare-table .outlier {
  color: #f39c12;
  font-style: italic;
}

/* ---------------------------------------------------------------
   RANKING
   --------------------------------------------------------------- */
.ranking {
  display: flex;
  gap: 12px;
}

.ranking-col {
  flex: 1;
}

.ranking-item {
  background: var(--bg-input);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.ranking-pos {
  font-size: 16px;
  font-weight: 700;
  color: #999;
  min-width: 24px;
  text-align: center;
}

/* ---------------------------------------------------------------
   INSIGHT BOX
   --------------------------------------------------------------- */
.insight-box {
  background: rgba(233,69,96,0.08);
  border: 1px solid rgba(233,69,96,0.25);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: #eee;
  line-height: 1.6;
}

/* ---------------------------------------------------------------
   VIEW TOGGLE
   --------------------------------------------------------------- */
.view-toggle {
  display: flex;
  background: var(--bg-input);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
}

.view-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #888;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.view-btn.active {
  background: var(--accent);
  color: #fff;
}

/* ---------------------------------------------------------------
   VERSION
   --------------------------------------------------------------- */
.version {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 16px;
}

/* ---------------------------------------------------------------
   OFFLINE BANNER
   --------------------------------------------------------------- */
.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--danger);
  color: #fff;
  text-align: center;
  padding: 8px;
  font-size: 13px;
  font-weight: 600;
  z-index: 999;
  display: none;
}

.offline-banner.visible {
  display: block;
}

/* ---------------------------------------------------------------
   CONNECTION INDICATOR
   --------------------------------------------------------------- */
.conn-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--warning);
  color: #fff;
  text-align: center;
  padding: 6px;
  font-size: 12px;
  z-index: 998;
  display: none;
}

.conn-indicator.visible {
  display: block;
}

/* ---------------------------------------------------------------
   TOAST NOTIFICATIONS
   --------------------------------------------------------------- */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
}

.toast.success {
  background: var(--success);
  color: #fff;
}

.toast.error {
  background: var(--danger);
  color: #fff;
}

.toast.warning {
  background: var(--warning);
  color: #fff;
}

/* ---------------------------------------------------------------
   TURNO PROGRESS BAR
   --------------------------------------------------------------- */
.turno-bar {
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}

.turno-bar .fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* ---------------------------------------------------------------
   HIDDEN UTILITY
   --------------------------------------------------------------- */
.hidden {
  display: none !important;
}

/* ---------------------------------------------------------------
   MEDIA QUERIES — LANDSCAPE / TV
   --------------------------------------------------------------- */
@media (min-width: 768px) {
  .kpi-row {
    grid-template-columns: repeat(5, 1fr);
  }

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

  .card {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 1024px) {
  body {
    max-width: 1200px;
    margin: 0 auto;
  }
}

@media (orientation: landscape) and (min-width: 900px) {
  .kpi-row {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (orientation: landscape) and (min-height: 400px) {
  .kpi-row {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }
}

/* ---------------------------------------------------------------
   SAFE AREA (iPhone notch)
   --------------------------------------------------------------- */
@supports (padding: env(safe-area-inset-bottom)) {
  .resumo-bar {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
}

/* ---------------------------------------------------------------
   REDUCED MOTION
   --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------
   LOADING SKELETON
   --------------------------------------------------------------- */
.skeleton {
  background: linear-gradient(90deg, #16213e 25%, #1a2744 50%, #16213e 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s infinite;
  border-radius: var(--radius-sm);
  min-height: 20px;
}

@keyframes skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------------------------------------------------------------
   ERROR STATE
   --------------------------------------------------------------- */
.error-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--danger);
}

.error-state .icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.error-state .msg {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---------------------------------------------------------------
   PRINT STYLESHEET
   --------------------------------------------------------------- */
@media print {
  body {
    background: #fff;
    color: #000;
  }

  .sync-dot,
  .offline-banner,
  .fab-refresh,
  .resumo-bar {
    display: none !important;
  }
}
