/* ══════════════════════════════════════════════════════════════════════
   TEMA VISUAL NEON PASTEL · AGÊNCIA EXPRESS BARÃO
   Padrão Barao_MKT: fundo #0b1020, cards #151a33, acentos #9fdcff / #c9a9ff / #ffadcb
   ══════════════════════════════════════════════════════════════════════ */
:root {
  --eb-bg: #0b1020;
  --eb-card: #151a33;
  --eb-card2: #0f1428;
  --eb-card-glass: rgba(21, 26, 51, 0.82);
  --eb-texto: #eef0fb;
  --eb-texto2: #c9cfe8;
  --eb-suave: #9aa2c4;
  --eb-azul: #9fdcff;
  --eb-lilas: #c9a9ff;
  --eb-rosa: #ffadcb;
  --eb-ok: #9ff5d0;
  --eb-warn: #f3eda1;
  --eb-laranja: #ffc6a3;
  --eb-linha: rgba(201, 169, 255, 0.16);
  --eb-brand: linear-gradient(120deg, #9fdcff 0%, #c9a9ff 45%, #ffadcb 100%);
  --eb-led: linear-gradient(120deg, rgba(159, 220, 255, 0.45), rgba(201, 169, 255, 0.22) 45%, rgba(255, 173, 203, 0.40));
  --eb-halo: 0 0 25px -10px rgba(201, 169, 255, 0.35), 0 0 2px rgba(159, 220, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --eb-sans: "Figtree", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --eb-mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --eb-banner-glass: rgba(21, 26, 51, 0.82);
  --eb-bg-glow1: rgba(201, 169, 255, 0.08);
  --eb-bg-glow2: rgba(159, 220, 255, 0.06);
  --eb-safe-top: env(safe-area-inset-top, 0px);
  --eb-safe-bottom: env(safe-area-inset-bottom, 0px);
  --eb-safe-left: env(safe-area-inset-left, 0px);
  --eb-safe-right: env(safe-area-inset-right, 0px);
  --eb-tabbar-height: calc(52px + var(--eb-safe-bottom));
}

/* ══════════════════════════════════════════════════════════════════════
   TEMA 2: AMETHYST / PLUM TWILIGHT (EXECUTIVE SLATE PURPLE)
   ══════════════════════════════════════════════════════════════════════ */
[data-eb-theme="plum"] {
  --eb-bg: #151829;
  --eb-card: #282438;
  --eb-card2: #1e1b2b;
  --eb-card-glass: linear-gradient(135deg, rgba(74, 60, 90, 0.65) 0%, rgba(35, 33, 54, 0.88) 100%);
  --eb-banner-glass: linear-gradient(135deg, rgba(92, 72, 110, 0.75) 0%, rgba(50, 42, 70, 0.88) 100%);
  --eb-navbar-bg: rgba(21, 24, 41, 0.94);
  --eb-texto: #f5f3fa;
  --eb-texto2: #d6cee3;
  --eb-suave: #aea5c2;
  --eb-azul: #6ed3ff;
  --eb-lilas: #d4a5ff;
  --eb-rosa: #ff9ec2;
  --eb-ok: #86efac;
  --eb-warn: #fde047;
  --eb-laranja: #fba988;
  --eb-linha: rgba(210, 180, 240, 0.22);
  --eb-brand: linear-gradient(120deg, #6ed3ff 0%, #d4a5ff 45%, #ff9ec2 100%);
  --eb-led: linear-gradient(120deg, rgba(110, 211, 255, 0.45), rgba(212, 165, 255, 0.3) 45%, rgba(255, 158, 194, 0.45));
  --eb-halo: 0 0 25px -8px rgba(180, 120, 220, 0.35), 0 0 2px rgba(180, 140, 220, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --eb-bg-glow1: rgba(180, 120, 210, 0.16);
  --eb-bg-glow2: rgba(80, 130, 200, 0.14);
}

body {
  background-color: var(--eb-bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, var(--eb-bg-glow1), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, var(--eb-bg-glow2), transparent 60%);
  background-attachment: fixed;
  color: var(--eb-texto);
  font-family: var(--eb-sans);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  transition: background-color 0.3s ease;
}

.banner-executivo {
  background: var(--eb-banner-glass) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Layout responsivo aproveitando Full HD sem desperdício */
.app-container {
  width: 100%;
  max-width: 1780px;
  margin: 0 auto;
  padding-left: 14px;
  padding-right: 14px;
}
@media (min-width: 1920px) {
  .app-container {
    padding-left: 24px;
    padding-right: 24px;
  }
}
@media (max-width: 1368px) {
  .app-container {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* ---- Navbar Horizontal Modernize ---- */
.eb-navbar {
  background: rgba(11, 16, 32, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--eb-linha);
  position: sticky;
  top: 0;
  z-index: 1020;
}

.brand-gradient {
  background: var(--eb-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.eb-nav-link {
  color: var(--eb-texto2) !important;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 6px 14px !important;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: none;
  background: transparent;
}

.eb-nav-link:hover {
  color: var(--eb-azul) !important;
  background: rgba(159, 220, 255, 0.08);
}

.eb-nav-link.active {
  color: #0b1020 !important;
  background: var(--eb-brand);
  box-shadow: 0 0 15px rgba(201, 169, 255, 0.4);
}

/* ---- Cards Glass & LED Glow ---- */
.eb-card {
  background: linear-gradient(135deg, rgba(21, 26, 51, 0.88) 0%, rgba(15, 20, 40, 0.76) 100%) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(201, 169, 255, 0.18);
  border-radius: 14px;
  position: relative;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.45), 0 0 15px -4px rgba(159, 220, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.eb-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(159, 220, 255, 0.6) 25%, rgba(201, 169, 255, 0.7) 50%, rgba(255, 173, 203, 0.6) 75%, transparent 100%);
  pointer-events: none;
}

.eb-card:hover {
  border-color: rgba(201, 169, 255, 0.35);
  box-shadow: 0 8px 30px -4px rgba(0, 0, 0, 0.6), 0 0 24px -2px rgba(201, 169, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Redução na altura dos cards para caber na tela sem rolagem */
.card-compact {
  padding: 12px 14px !important;
}
@media (min-width: 1400px) {
  .card-compact {
    padding: 14px 16px !important;
  }
}

/* Tooltip icon estilizado */
.eb-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(159, 220, 255, 0.15);
  color: var(--eb-azul);
  font-size: 0.72rem;
  cursor: pointer;
  vertical-align: middle;
  transition: all 0.2s ease;
  margin-left: 5px;
}
.eb-info-icon:hover {
  background: var(--eb-azul);
  color: #0b1020;
  transform: scale(1.15);
}

/* Hero KPIs & Títulos Padronizados dos Cards */
.kpi-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--eb-suave) !important;
  font-weight: 700;
  display: inline-block;
}

.kpi-val {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--eb-texto);
  letter-spacing: -0.02em;
  font-family: var(--eb-mono);
  transition: all 0.2s ease;
}

/* Cores Semânticas */
.txt-azul { color: var(--eb-azul) !important; }
.txt-lilas { color: var(--eb-lilas) !important; }
.txt-rosa { color: var(--eb-rosa) !important; }
.txt-ok { color: var(--eb-ok) !important; }
.txt-warn { color: var(--eb-warn) !important; }

.bg-ok-subtle { background: rgba(159, 245, 208, 0.15); color: var(--eb-ok); }
.bg-rosa-subtle { background: rgba(255, 173, 203, 0.15); color: var(--eb-rosa); }
.bg-lilas-subtle { background: rgba(201, 169, 255, 0.15); color: var(--eb-lilas); }
.bg-azul-subtle { background: rgba(159, 220, 255, 0.15); color: var(--eb-azul); }

/* Botões Estilizados */
.btn-eb-primary {
  background: var(--eb-brand);
  color: #0b1020;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  box-shadow: 0 4px 15px rgba(201, 169, 255, 0.3);
  transition: all 0.2s ease;
}

.btn-eb-primary:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(201, 169, 255, 0.5);
  color: #0b1020;
}

.btn-eb-outline {
  background: rgba(21, 26, 51, 0.6);
  border: 1px solid var(--eb-linha);
  color: var(--eb-texto);
  font-weight: 600;
  border-radius: 8px;
  padding: 6px 12px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-eb-outline:hover {
  background: rgba(201, 169, 255, 0.12);
  border-color: var(--eb-lilas);
  color: var(--eb-azul);
}


/* Padrao de Inputs Neon Glass */
.eb-input, input.eb-input {
  background-color: #0f1428 !important;
  border: 1px solid var(--eb-linha) !important;
  color: var(--eb-texto) !important;
  border-radius: 8px !important;
}
.eb-input:focus, input.eb-input:focus {
  background-color: #151a33 !important;
  border-color: var(--eb-lilas) !important;
  box-shadow: 0 0 10px rgba(201, 169, 255, 0.25) !important;
  color: #fff !important;
}

/* Select Fix: garante fundo escuro e opções legíveis */
select.eb-select, select.form-select, select option, .eb-select option {
  background-color: #151a33 !important;
  color: #eef0fb !important;
}

/* Modernize Widget Components */
.modernize-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.icon-box-blue { background: rgba(159, 220, 255, 0.14); color: var(--eb-azul); }
.icon-box-purple { background: rgba(201, 169, 255, 0.14); color: var(--eb-lilas); }
.icon-box-pink { background: rgba(255, 173, 203, 0.14); color: var(--eb-rosa); }
.icon-box-green { background: rgba(159, 245, 208, 0.14); color: var(--eb-ok); }
.icon-box-orange { background: rgba(254, 202, 87, 0.14); color: #feca57; }

.stat-pill-box {
  background: rgba(11, 16, 32, 0.6);
  border: 1px solid rgba(201, 169, 255, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}
.stat-pill-box:hover {
  background: rgba(11, 16, 32, 0.85);
  border-color: rgba(201, 169, 255, 0.3);
}

.modernize-list-item {
  padding: 8px 4px;
  border-bottom: 1px solid rgba(201, 169, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.15s ease;
}
.modernize-list-item:last-child {
  border-bottom: none;
}

/* ---- DRE Estreita Estilo Extrato Bancário (Exigência do Diretor) ---- */
.dre-extrato-card {
  max-width: 920px;
  margin: 0 auto;
  border: 1px solid rgba(201, 169, 255, 0.22);
  box-shadow: 0 10px 40px rgba(0,0,0,0.7);
}

/* Harmonização Visual de Tabelas com Tema Barão */
.table,
.table-eb,
[data-bs-theme=dark] .table,
[data-bs-theme=dark] .table-hover>tbody>tr:hover>*,
[data-bs-theme=dark] .table>:not(caption)>*>* {
  --bs-table-bg: transparent !important;
  --bs-table-color: var(--eb-texto) !important;
  background-color: transparent !important;
  border-color: var(--eb-linha) !important;
}

.table-eb th,
.table th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--eb-suave) !important;
  background: rgba(11, 16, 32, 0.4) !important;
  font-weight: 700;
  border-bottom: 1px solid var(--eb-linha) !important;
  padding: 8px 10px;
}

.table-eb td,
.table td {
  padding: 8px 10px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(201, 169, 255, 0.08) !important;
  font-size: 0.85rem;
  color: var(--eb-texto) !important;
}

.table-eb tr:hover td,
.table tr:hover td {
  background-color: rgba(201, 169, 255, 0.05) !important;
}

.badge-pareto-a {
  background: rgba(255, 173, 203, 0.18);
  color: var(--eb-rosa);
  border: 1px solid rgba(255, 173, 203, 0.35);
  font-weight: 700;
  font-size: 0.68rem;
}
.badge-pareto-b {
  background: rgba(159, 220, 255, 0.16);
  color: var(--eb-azul);
  border: 1px solid rgba(159, 220, 255, 0.3);
  font-weight: 600;
  font-size: 0.68rem;
}
.badge-pareto-c {
  background: rgba(201, 169, 255, 0.10);
  color: var(--eb-suave);
  border: 1px solid rgba(201, 169, 255, 0.18);
  font-size: 0.68rem;
}

.table-eb th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--eb-suave);
  font-weight: 700;
  border-bottom: 1px solid var(--eb-linha);
  padding: 8px 10px;
}

.table-eb td {
  padding: 8px 10px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(201, 169, 255, 0.08);
  font-size: 0.85rem;
}

.table-eb tr:hover td {
  background-color: rgba(201, 169, 255, 0.04);
}

.dre-subtotal td {
  background: rgba(159, 220, 255, 0.06);
  font-weight: 700;
  border-top: 1px solid rgba(159, 220, 255, 0.2);
  border-bottom: 1px solid rgba(159, 220, 255, 0.2);
}

.dre-resultado td {
  background: rgba(201, 169, 255, 0.12);
  font-weight: 800;
  border-top: 1px solid var(--eb-lilas);
  border-bottom: 1px solid var(--eb-lilas);
}

/* Modal Styling */
.modal-content-eb {
  background: var(--eb-card);
  border: 1px solid var(--eb-linha);
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
  border-radius: 16px;
  color: var(--eb-texto);
}

/* Stealth Lock Screen */
#lock-screen {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: radial-gradient(circle at 50% 38%, #181e3d 0%, #0b1020 70%, #060913 100%);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lock-card {
  width: 100%;
  max-width: 420px;
  background: rgba(21, 26, 51, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(201, 169, 255, 0.25);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(201, 169, 255, 0.18);
  padding: 32px 28px;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

/* Drag & Drop */
.upload-zone {
  border: 2px dashed rgba(201, 169, 255, 0.35);
  border-radius: 14px;
  padding: 30px 15px;
  text-align: center;
  background: rgba(21, 26, 51, 0.4);
  transition: all 0.2s ease;
  cursor: pointer;
}
.upload-zone:hover {
  border-color: var(--eb-azul);
  background: rgba(159, 220, 255, 0.08);
}

/* Badges de Confiança do Motor */
.badge-conf {
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 5px;
}
.badge-conf-manual { background: #3b204e; color: #ffadcb; border: 1px solid #7d3c8c; }
.badge-conf-alta { background: #12382c; color: #9ff5d0; border: 1px solid #236c53; }
.badge-conf-aprendido { background: #1b324d; color: #9fdcff; border: 1px solid #35639b; }
.badge-conf-baixa { background: #473815; color: #f3eda1; border: 1px solid #8c6e26; }
.badge-conf-par { background: #252b48; color: #c9a9ff; border: 1px solid #525a8e; }

/* Custom Tooltip Styling */
.tooltip .tooltip-inner {
  background-color: #0f1428;
  color: #eef0fb;
  border: 1px solid rgba(201, 169, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0,0,0,0.6);
  font-size: 0.75rem;
  line-height: 1.35;
}

/* ══════════════════════════════════════════════════════════════════════
   ADAPTAÇÃO NATIVA PARA IPHONE 15 PRO MAX & IOS (APPLE HIG STANDARDS)
   Desktop (>= 768px) permanece 100% inalterado!
   ══════════════════════════════════════════════════════════════════════ */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Bottom Tab Bar Nativa iOS (UITabBar) - Apenas em telas mobile */
.eb-bottom-tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(56px + env(safe-area-inset-bottom, 34px));
  padding-bottom: max(16px, env(safe-area-inset-bottom, 34px));
  background: rgba(11, 16, 32, 0.90);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border-top: 1px solid rgba(201, 169, 255, 0.16);
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.45);
  user-select: none;
  -webkit-user-select: none;
}

[data-eb-theme="plum"] .eb-bottom-tabbar {
  background: rgba(21, 24, 41, 0.92);
  border-top-color: rgba(210, 180, 240, 0.22);
}

.eb-tab-item {
  flex: 1;
  height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 4px 0 2px 0;
  color: var(--eb-suave);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}

.eb-tab-item i {
  font-size: 1.30rem;
  line-height: 1.2;
  margin-bottom: 2px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
}

.eb-tab-item:active {
  transform: scale(0.90);
  opacity: 0.85;
}

.eb-tab-item.active {
  color: var(--eb-azul);
}

[data-eb-theme="plum"] .eb-tab-item.active {
  color: var(--eb-lilas);
}

.eb-tab-item.active i {
  transform: translateY(-2px) scale(1.08);
  color: var(--eb-azul);
  text-shadow: 0 0 12px rgba(159, 220, 255, 0.65);
}

[data-eb-theme="plum"] .eb-tab-item.active i {
  color: var(--eb-lilas);
  text-shadow: 0 0 12px rgba(212, 165, 255, 0.65);
}

.eb-tab-item.active::after {
  content: "";
  position: absolute;
  top: 0;
  left: 28%;
  right: 28%;
  height: 2.5px;
  background: var(--eb-brand);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(159, 220, 255, 0.8);
}

.eb-tab-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 18px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ff5277;
  color: #fff;
  font-size: 0.60rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(255, 82, 119, 0.7);
}

/* Sub-barra de Filtros Rápidos Mobile (Horizontal Swipeable Capsule Bar) */
.mobile-sub-bar {
  display: none;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px 2px 4px 2px;
  gap: 8px;
  border-top: 1px solid rgba(201, 169, 255, 0.12);
  margin-top: 8px;
}
.mobile-sub-bar::-webkit-scrollbar {
  display: none;
}

.mobile-capsule {
  display: inline-flex;
  align-items: center;
  background: rgba(21, 26, 51, 0.75);
  border: 1px solid rgba(201, 169, 255, 0.20);
  border-radius: 20px;
  padding: 6px 13px;
  font-size: 0.76rem;
  color: var(--eb-texto2);
  font-weight: 600;
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.mobile-capsule:active {
  transform: scale(0.94);
  background: rgba(159, 220, 255, 0.15);
  color: var(--eb-azul);
  border-color: rgba(159, 220, 255, 0.4);
}

/* REGRAS ESPECÍFICAS PARA IPHONE 15 PRO MAX & TELAS MOBILE (< 768px) */
@media (max-width: 767.98px) {
  body {
    padding-bottom: calc(75px + env(safe-area-inset-bottom, 34px)) !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }

  .app-container {
    padding-left: max(12px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(12px, env(safe-area-inset-right, 0px)) !important;
  }

  /* Navbar no topo com Safe Area Inset para Dynamic Island (54px-59px) */
  .eb-navbar {
    padding-top: max(54px, env(safe-area-inset-top, 54px)) !important;
    padding-bottom: 8px !important;
    background: rgba(11, 16, 32, 0.92) !important;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(201, 169, 255, 0.14);
  }

  [data-eb-theme="plum"] .eb-navbar {
    background: rgba(21, 24, 41, 0.94) !important;
    border-bottom-color: rgba(210, 180, 240, 0.20);
  }

  /* Exibe a barra de abas inferior e a sub-barra de cápsulas */
  .eb-bottom-tabbar:not(.d-none) {
    display: flex !important;
  }
  .mobile-sub-bar:not(.d-none) {
    display: flex !important;
  }

  /* Botões rápidos do topo no mobile (touch targets amigáveis) */
  .eb-navbar .btn-eb-outline,
  .eb-navbar .btn-outline-danger {
    width: 34px;
    height: 34px;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 10px !important;
  }
  .eb-navbar .btn-eb-outline i,
  .eb-navbar .btn-outline-danger i {
    font-size: 1.05rem;
  }

  /* Cards com bordas arredondadas padrão Apple HIG (16px a 18px) */
  .eb-card {
    border-radius: 18px !important;
    padding: 14px 12px !important;
    margin-bottom: 12px !important;
    border: 1px solid rgba(201, 169, 255, 0.14) !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.30) !important;
  }

  .card-compact {
    padding: 12px 10px !important;
    border-radius: 16px !important;
  }

  /* Evita auto-zoom do Safari no iPhone ao focar em inputs */
  input, select, textarea {
    font-size: 16px !important;
  }

  /* Touch targets generosos (Apple HIG: mínimo 44px) */
  .btn, .eb-select, .form-control {
    touch-action: manipulation;
  }

  /* Banner executivo compacto e perfeitamente ajustado para iPhone */
  .banner-executivo {
    padding: 12px !important;
    border-radius: 18px !important;
  }
  .banner-executivo h1 {
    font-size: 0.90rem !important;
  }
  .banner-executivo .kpi-val {
    font-size: 1.25rem !important;
  }

  /* Lock screen no iPhone 15 Pro Max */
  #lock-screen {
    min-height: 100dvh;
    height: 100dvh;
    padding: max(24px, env(safe-area-inset-top, 54px)) 16px max(24px, env(safe-area-inset-bottom, 34px)) 16px;
  }
  .lock-card {
    padding: 24px 18px;
    border-radius: 22px;
    max-width: 100%;
  }

  /* Tabelas com rolagem horizontal suave no iPhone */
  .table-responsive {
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin;
    border-radius: 10px;
    margin-bottom: 0;
  }
  .table-eb {
    font-size: 0.78rem !important;
    min-width: 480px;
  }
  .table-eb th, .table-eb td {
    padding: 8px 6px !important;
  }

  /* Zona de Upload no iPhone */
  .upload-zone {
    padding: 24px 14px !important;
    border-radius: 16px !important;
  }
}

/* Perfil leitura: esconde controles de edição (o backend também recusa) */
.perfil-leitura .so-edicao { display: none !important; }
.th-ordena { cursor: pointer; user-select: none; white-space: nowrap; }
.th-ordena:focus-visible { outline: 2px solid var(--eb-azul); outline-offset: -2px; }
