/* ============================================
   ASKFY v2 - APP SHELL E COMPONENTES
   Carregado depois de components.css: o shell novo e os componentes "ax-"
   ficam aqui, e as telas legadas herdam cantos, cores e tipografia.
   ============================================ */

html { -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font-family);
  background: var(--canvas);
  color: var(--ink);
  letter-spacing: -0.005em;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-family); letter-spacing: -0.02em; color: var(--ink); }
a { color: var(--brand); }
::selection { background: var(--brand-100); }

/* ── Mascote ── */
.fy-mascot { display: inline-block; flex-shrink: 0; overflow: visible; }
.fy-mascot .fy-eye { transform-box: fill-box; transform-origin: center; animation: fyBlink 5s infinite; }
.fy-mascot .fy-antenna { transform-box: fill-box; transform-origin: center; animation: fyPulse 2.4s ease-in-out infinite; }
.fy-mascot .fy-hand { transform-box: fill-box; transform-origin: 20% 90%; animation: fyWave 1.6s ease-in-out infinite; }
.mascot-float { animation: fyFloat 4s ease-in-out infinite; }
@keyframes fyBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
@keyframes fyPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes fyWave { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-18deg); } 75% { transform: rotate(14deg); } }
@keyframes fyFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) {
  .fy-mascot *, .mascot-float { animation: none !important; }
}

/* ── Logo ── */
.ax-logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.04em; }
.ax-logo:hover { color: var(--ink); }
.ax-logo b { color: var(--brand); font-weight: 800; }

/* ============================================
   SHELL
   ============================================ */
.ax-side {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); z-index: var(--z-sticky);
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 20px 14px;
}
.ax-side-head { padding: 4px 10px 22px; }
.ax-side-cta { margin: 0 4px 18px; }
.ax-side nav { flex: 1; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.ax-side-label { font-size: 0.6875rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; padding: 16px 12px 6px; }
.ax-nav {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 0.875rem; transition: background var(--transition-fast), color var(--transition-fast);
}
.ax-nav i { width: 20px; text-align: center; font-size: 1rem; color: var(--ink-3); transition: color var(--transition-fast); }
.ax-nav:hover { background: var(--line-2); color: var(--ink); }
.ax-nav.active { background: var(--brand-50); color: var(--brand-600); }
.ax-nav.active i { color: var(--brand); }
.ax-side-foot { margin-top: 12px; }
.ax-plan-card {
  border-radius: 18px; padding: 16px; background: var(--ink); color: #fff; position: relative; overflow: hidden;
}
.ax-plan-card::after { content: ''; position: absolute; width: 120px; height: 120px; right: -40px; top: -50px; background: radial-gradient(circle, rgba(198,244,50,.35), transparent 70%); }
.ax-plan-card strong { display: block; font-size: 0.9375rem; margin-bottom: 2px; }
.ax-plan-card span { font-size: 0.75rem; color: rgba(255,255,255,.7); display: block; margin-bottom: 12px; }
.ax-plan-card .ax-btn { width: 100%; }

.ax-top {
  position: sticky; top: 0; z-index: calc(var(--z-sticky) - 1); height: var(--header-height);
  margin-left: var(--sidebar-width); padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(246,245,251,.82); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
}
.ax-top-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ax-top-title .crumbs { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-top-title .crumbs a { color: var(--ink-3); text-decoration: none; }
.ax-top-title .crumbs a:hover { color: var(--ink); }
.ax-top-title .crumbs strong { color: var(--ink); font-weight: 700; }
.ax-top-title .ax-logo { display: none; }
.ax-top-actions { display: flex; align-items: center; gap: 8px; }
.ax-icon-btn {
  width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); cursor: pointer; position: relative; text-decoration: none;
  transition: all var(--transition-fast);
}
.ax-icon-btn:hover { color: var(--ink); box-shadow: var(--shadow-sm); }
.ax-icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--detractor); border: 2px solid var(--surface); }
.ax-avatar {
  width: 42px; height: 42px; border-radius: 14px; background: var(--grad-brand); color: #fff; font-weight: 700; font-size: 0.875rem;
  display: inline-flex; align-items: center; justify-content: center; border: none; cursor: pointer;
}
.ax-menu { position: relative; }
.ax-menu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 8px; display: none; z-index: var(--z-dropdown);
}
.ax-menu.open .ax-menu-pop { display: block; animation: axPop .16s ease-out; }
.ax-menu-pop .who { padding: 10px 12px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.ax-menu-pop .who strong { display: block; font-size: 0.875rem; }
.ax-menu-pop .who span { font-size: 0.75rem; color: var(--ink-3); }
.ax-menu-pop a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-size: 0.875rem; font-weight: 500; }
.ax-menu-pop a:hover { background: var(--line-2); color: var(--ink); }
.ax-menu-pop a i { width: 16px; text-align: center; color: var(--ink-3); }
.ax-menu-pop a.danger { color: var(--detractor); }
@keyframes axPop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

/* Conteudo (telas novas e legadas usam .app-main > .app-content) */
.app-main { margin-left: var(--sidebar-width); min-height: auto; display: block; }
.app-content { padding: 8px 28px 48px; max-width: var(--content-max-width); margin: 0 auto; width: 100%; }
.ax-page { padding: 8px 28px 48px; max-width: var(--content-max-width); margin: 0 auto; }

/* Barra inferior (mobile) */
.ax-tabbar { display: none; }

@media (max-width: 1023.98px) {
  .ax-side { width: var(--sidebar-collapsed-width); padding: 18px 10px; }
  .ax-side .ax-logo span, .ax-side .ax-side-label, .ax-side .ax-nav span, .ax-side-foot, .ax-side-cta span { display: none; }
  .ax-side-head { padding: 4px 0 18px; display: flex; justify-content: center; }
  .ax-nav { justify-content: center; padding: 12px; }
  .ax-side-cta .ax-btn { padding: 0; width: 52px; height: 48px; margin: 0 auto; display: flex; }
  .ax-top, .app-main { margin-left: var(--sidebar-collapsed-width); }
}

@media (max-width: 767.98px) {
  .ax-side { display: none; }
  .ax-top, .app-main { margin-left: 0; }
  .ax-top { padding: 0 16px; padding-top: env(safe-area-inset-top); height: calc(60px + env(safe-area-inset-top)); }
  .ax-top-title .crumbs { display: none; }
  .ax-top-title .ax-logo { display: inline-flex; }
  .ax-top .hide-mobile { display: none; }
  .app-content, .ax-page { padding: 4px 16px calc(var(--tabbar-height) + 36px + env(safe-area-inset-bottom)); }
  .ax-tabbar {
    display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: var(--z-sticky);
    height: var(--tabbar-height); background: rgba(18,14,43,.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-radius: 22px; padding: 0 6px; align-items: center; justify-content: space-around; box-shadow: 0 16px 32px -12px rgba(18,14,43,.5);
  }
  .ax-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: rgba(255,255,255,.55); text-decoration: none; font-size: 0.625rem; font-weight: 600; padding: 8px 0; }
  .ax-tab i { font-size: 1.05rem; }
  .ax-tab.active { color: #fff; }
  .ax-tab.active i { color: var(--lime); }
  .ax-tab-fab {
    width: 50px; height: 50px; border-radius: 17px; background: var(--lime); color: var(--ink); display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; text-decoration: none; margin-top: -2px; box-shadow: 0 8px 20px -6px rgba(198,244,50,.7);
  }
}

/* ============================================
   COMPONENTES
   ============================================ */
.ax-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 14px; border: 1px solid transparent;
  font-family: var(--font-family); font-weight: 700; font-size: 0.875rem; line-height: 1.2; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}
.ax-btn:active { transform: scale(.97); }
.ax-btn:disabled, .ax-btn.is-loading { opacity: .6; pointer-events: none; }
.ax-btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.ax-btn-primary:hover { background: var(--brand-600); color: #fff; }
.ax-btn-dark { background: var(--ink); color: #fff; }
.ax-btn-dark:hover { background: #241e4d; color: #fff; }
.ax-btn-lime { background: var(--lime); color: var(--ink); }
.ax-btn-lime:hover { background: var(--lime-600); color: var(--ink); }
.ax-btn-white { background: #fff; color: var(--ink); border-color: var(--line); }
.ax-btn-white:hover { border-color: var(--brand-200); color: var(--brand-600); }
.ax-btn-ghost { background: transparent; color: var(--ink-2); }
.ax-btn-ghost:hover { background: var(--line-2); color: var(--ink); }
.ax-btn-soft { background: var(--brand-50); color: var(--brand-600); }
.ax-btn-soft:hover { background: var(--brand-100); color: var(--brand-700); }
.ax-btn-whats { background: #25D366; color: #fff; }
.ax-btn-whats:hover { background: #1EBE5A; color: #fff; }
.ax-btn-sm { padding: 8px 14px; font-size: 0.8125rem; border-radius: 11px; }
.ax-btn-lg { padding: 16px 28px; font-size: 1rem; border-radius: 16px; }
.ax-btn-block { width: 100%; }

.ax-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-2xl); box-shadow: var(--shadow-card); }
.ax-card-pad { padding: 22px; }
.ax-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ax-card-head h3 { font-size: 1rem; font-weight: 700; margin: 0; }
.ax-card-head a { font-size: 0.8125rem; font-weight: 600; text-decoration: none; }
.ax-muted { color: var(--ink-3); }
.ax-sub { color: var(--ink-2); font-size: 0.875rem; }

.ax-grid { display: grid; gap: 16px; }
.ax-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ax-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ax-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ax-grid-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
@media (max-width: 1023.98px) { .ax-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ax-grid-main, .ax-grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 575.98px) { .ax-grid-2 { grid-template-columns: 1fr; } .ax-grid { gap: 12px; } }

.ax-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 8px 0 22px; flex-wrap: wrap; }
.ax-page-head h1 { font-size: clamp(1.5rem, 3vw, 1.875rem); font-weight: 800; margin: 0 0 4px; }
.ax-page-head p { margin: 0; color: var(--ink-2); font-size: 0.9375rem; }

/* Saudacao com mascote */
.ax-hello {
  position: relative; overflow: hidden; border-radius: 28px; padding: 28px 30px; color: #fff; background: var(--grad-brand);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; box-shadow: var(--shadow-brand);
}
.ax-hello::before { content: ''; position: absolute; width: 280px; height: 280px; right: -60px; top: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%); }
.ax-hello::after { content: ''; position: absolute; width: 200px; height: 200px; left: 30%; bottom: -140px; border-radius: 50%; background: radial-gradient(circle, rgba(198,244,50,.28), transparent 70%); }
.ax-hello > * { position: relative; z-index: 1; }
.ax-hello h1 { color: #fff; font-size: clamp(1.375rem, 3vw, 1.875rem); font-weight: 800; margin: 0 0 6px; }
.ax-hello p { margin: 0 0 18px; color: rgba(255,255,255,.85); font-size: 0.9375rem; max-width: 460px; }
.ax-hello-art { width: 150px; height: 150px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, rgba(255,255,255,.95) 0%, rgba(255,255,255,.75) 55%, rgba(255,255,255,0) 72%); }
.ax-hello .fy-mascot { filter: drop-shadow(0 12px 18px rgba(18,14,43,.22)); }
@media (max-width: 575.98px) { .ax-hello { padding: 22px; border-radius: 24px; gap: 8px; } .ax-hello-art { width: 96px; height: 96px; } .ax-hello .fy-mascot { width: 76px; height: 76px; } .ax-hello p { margin-bottom: 14px; } }

/* KPI */
.ax-kpi { padding: 18px; }
.ax-kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ax-kpi-icon { width: 40px; height: 40px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.ax-kpi-label { font-size: 0.8125rem; color: var(--ink-3); font-weight: 600; }
.ax-kpi-value { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.ax-kpi-foot { font-size: 0.75rem; color: var(--ink-3); margin-top: 4px; }

/* Selos */
.ax-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.ax-pill-brand { background: var(--brand-50); color: var(--brand-600); }
.ax-pill-lime { background: var(--lime-50); color: #5D7A00; }
.ax-pill-promoter { background: var(--promoter-50); color: #0B8A59; }
.ax-pill-passive { background: var(--passive-50); color: #B66F00; }
.ax-pill-detractor { background: var(--detractor-50); color: #C62E3D; }
.ax-pill-dark { background: var(--ink); color: #fff; }

/* Medidor de NPS */
.ax-gauge { position: relative; width: 220px; max-width: 100%; margin: 0 auto; }
.ax-gauge svg { width: 100%; height: auto; display: block; }
.ax-gauge-val { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; }
.ax-gauge-val strong { display: block; font-size: 2.5rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.ax-gauge-val span { font-size: 0.75rem; color: var(--ink-3); font-weight: 600; }
.ax-split { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line-2); gap: 3px; }
.ax-split > div { height: 100%; border-radius: 999px; }
.ax-legend { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; }
.ax-legend div { flex: 1; text-align: center; }
.ax-legend strong { display: block; font-size: 1.125rem; font-weight: 800; }
.ax-legend span { font-size: 0.6875rem; color: var(--ink-3); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.ax-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* Listas */
.ax-list { display: flex; flex-direction: column; }
.ax-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-2); }
.ax-item:first-child { border-top: none; padding-top: 2px; }
.ax-score {
  width: 40px; height: 40px; border-radius: 13px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.9375rem;
}
.ax-score.promoter { background: var(--promoter-50); color: #0B8A59; }
.ax-score.passive { background: var(--passive-50); color: #B66F00; }
.ax-score.detractor { background: var(--detractor-50); color: #C62E3D; }
.ax-score.none { background: var(--line-2); color: var(--ink-3); }
.ax-item-body { flex: 1; min-width: 0; }
.ax-item-title { font-weight: 700; font-size: 0.875rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ax-item-text { font-size: 0.8125rem; color: var(--ink-2); margin-top: 3px; line-height: 1.5; overflow-wrap: anywhere; }
.ax-item-meta { font-size: 0.75rem; color: var(--ink-3); margin-top: 4px; }
.ax-item-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

/* Vazio */
.ax-empty { text-align: center; padding: 36px 20px; }
.ax-empty h3 { font-size: 1.0625rem; font-weight: 800; margin: 14px 0 6px; }
.ax-empty p { color: var(--ink-2); font-size: 0.875rem; max-width: 360px; margin: 0 auto 18px; }

/* Checklist de primeiros passos */
.ax-check { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; text-decoration: none; color: var(--ink); transition: background var(--transition-fast); }
.ax-check:hover { background: var(--line-2); color: var(--ink); }
.ax-check-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px dashed var(--brand-200); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.75rem; color: transparent; }
.ax-check.done .ax-check-dot { background: var(--promoter); border: none; color: #fff; }
.ax-check.done .ax-check-label { color: var(--ink-3); text-decoration: line-through; }
.ax-check-label { font-weight: 600; font-size: 0.875rem; flex: 1; }
.ax-check i.go { color: var(--ink-3); font-size: 0.75rem; }
.ax-progress { height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.ax-progress > div { height: 100%; background: var(--grad-brand); border-radius: 999px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.ax-progress.lime > div { background: var(--lime); }
.ax-unlimited { font-size: .75rem; font-weight: 700; color: var(--ink-3); display: flex; align-items: center; gap: 6px; min-height: 8px; }
.ax-unlimited i { color: var(--brand); }

/* Formularios */
.ax-field { margin-bottom: 16px; }
.ax-label { display: block; font-size: 0.8125rem; font-weight: 700; color: var(--ink); margin-bottom: 7px; }
.ax-hint { font-size: 0.75rem; color: var(--ink-3); margin-top: 6px; }
.ax-input {
  width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface);
  font-family: var(--font-family); font-size: 1rem; color: var(--ink); transition: border-color var(--transition-fast), box-shadow var(--transition-fast); outline: none;
}
.ax-input::placeholder { color: #B5B2C9; }
.ax-input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
textarea.ax-input { resize: vertical; min-height: 96px; }
.ax-input-wrap { position: relative; }
.ax-input-wrap .ax-input { padding-right: 48px; }
.ax-input-wrap button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: none; background: none; color: var(--ink-3); width: 36px; height: 36px; border-radius: 10px; cursor: pointer; }

/* Opcoes selecionaveis (wizard) */
.ax-options { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ax-option {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; border-radius: 18px; border: 1.5px solid var(--line);
  background: var(--surface); cursor: pointer; text-align: left; font-family: var(--font-family); transition: all var(--transition-fast); color: var(--ink);
}
.ax-option:hover { border-color: var(--brand-200); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ax-option.selected { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 4px var(--brand-50); }
.ax-option.selected::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 0.625rem; display: flex; align-items: center; justify-content: center; }
.ax-option-emoji { font-size: 1.75rem; line-height: 1; }
.ax-option-icon { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.ax-option strong { font-size: 0.9375rem; font-weight: 700; }
.ax-option small { font-size: 0.78rem; color: var(--ink-2); line-height: 1.45; }
.ax-options.wide { grid-template-columns: 1fr; }
.ax-options.wide .ax-option { flex-direction: row; align-items: center; }

/* Cores */
.ax-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.ax-swatch { width: 40px; height: 40px; border-radius: 13px; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; transition: transform var(--transition-fast); }
.ax-swatch:hover { transform: scale(1.08); }
.ax-swatch.selected { box-shadow: 0 0 0 2.5px var(--ink); }

/* Modal / bottom sheet */
.ax-modal { position: fixed; inset: 0; z-index: var(--z-modal); display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(18,14,43,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ax-modal.open { display: flex; animation: axFade .2s ease-out; }
.ax-modal-box { background: var(--surface); border-radius: 28px; width: 100%; max-width: 460px; max-height: calc(100vh - 40px); overflow-y: auto; padding: 28px; position: relative; box-shadow: var(--shadow-modal); animation: axRise .28s cubic-bezier(.2,.8,.2,1); }
.ax-modal-close { position: absolute; top: 16px; right: 16px; }
@keyframes axFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes axRise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (max-width: 575.98px) {
  .ax-modal { align-items: flex-end; padding: 0; }
  .ax-modal-box { border-radius: 28px 28px 0 0; max-width: none; padding: 26px 20px calc(24px + env(safe-area-inset-bottom)); max-height: 92vh; }
  .ax-modal-box::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: -12px auto 16px; }
}

/* Toast */
.ax-toasts { position: fixed; top: 20px; right: 20px; z-index: var(--z-toast); display: flex; flex-direction: column; gap: 8px; }
.ax-toast { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 0.875rem; font-weight: 600; box-shadow: var(--shadow-lg); animation: axRise .25s ease-out; max-width: 360px; }
.ax-toast i { color: var(--lime); }
.ax-toast.error i { color: #FF8C96; }
@media (max-width: 575.98px) { .ax-toasts { left: 16px; right: 16px; top: calc(12px + env(safe-area-inset-top)); } .ax-toast { max-width: none; } }

/* Abas segmentadas */
.ax-seg { display: inline-flex; background: var(--line-2); border-radius: 14px; padding: 4px; gap: 2px; }
.ax-seg button, .ax-seg a { border: none; background: none; padding: 8px 14px; border-radius: 11px; font-family: var(--font-family); font-size: 0.8125rem; font-weight: 700; color: var(--ink-3); cursor: pointer; text-decoration: none; }
.ax-seg .active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* Faixa de aviso */
.ax-banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 18px; margin-bottom: 18px; font-size: 0.875rem; }
.ax-banner .grow { flex: 1; min-width: 0; }
.ax-banner strong { display: block; font-size: 0.9rem; }
.ax-banner-lime { background: var(--lime-50); border: 1px solid #E4F5A8; }
.ax-banner-danger { background: var(--detractor-50); border: 1px solid #F9CDD2; }
.ax-banner-brand { background: var(--brand-50); border: 1px solid var(--brand-100); }
@media (max-width: 575.98px) { .ax-banner { flex-wrap: wrap; } .ax-banner .ax-btn { width: 100%; } }

/* Utilitarios */
.ax-row { display: flex; align-items: center; gap: 10px; }
.ax-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ax-wrap { flex-wrap: wrap; }
.ax-mt { margin-top: 16px; } .ax-mt-lg { margin-top: 24px; } .ax-mb { margin-bottom: 16px; } .ax-mb-lg { margin-bottom: 24px; }
.ax-hide-mobile { } @media (max-width: 767.98px) { .ax-hide-mobile { display: none !important; } }
.ax-only-mobile { display: none !important; } @media (max-width: 767.98px) { .ax-only-mobile { display: initial !important; } }
.ax-spin { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: axSpin .7s linear infinite; display: inline-block; }
@keyframes axSpin { to { transform: rotate(360deg); } }
.ax-skel { background: linear-gradient(90deg, var(--line-2) 25%, #fff 50%, var(--line-2) 75%); background-size: 200% 100%; animation: axSkel 1.2s infinite; border-radius: 10px; }
@keyframes axSkel { to { background-position: -200% 0; } }

/* ============================================
   AJUSTES DAS TELAS LEGADAS
   ============================================ */
.card { border-radius: var(--radius-2xl) !important; border-color: var(--line) !important; box-shadow: var(--shadow-card) !important; }
.card-header { background: transparent !important; border-bottom-color: var(--line-2) !important; }
.btn { border-radius: 12px; font-weight: 700; font-family: var(--font-family); }
.btn-primary { background: var(--brand) !important; border-color: var(--brand) !important; }
.btn-primary:hover { background: var(--brand-600) !important; border-color: var(--brand-600) !important; }
.form-input, .form-select, .form-control, .form-textarea { border-radius: 12px !important; border-color: var(--line) !important; font-family: var(--font-family); }
.form-input:focus, .form-select:focus, .form-control:focus, .form-textarea:focus { border-color: var(--brand) !important; box-shadow: 0 0 0 4px var(--brand-50) !important; }
.page-header h1 { font-weight: 800; letter-spacing: -0.025em; }
.stat-card { border-radius: var(--radius-2xl) !important; }
.modal-content { border-radius: 24px !important; border: none !important; }
.nav-tabs .nav-link.active, .nav-pills .nav-link.active { color: var(--brand) !important; }
.badge-primary { background: var(--brand-50) !important; color: var(--brand-600) !important; }
.toast-container { z-index: var(--z-toast); }
@media (max-width: 767.98px) {
  .page-header { flex-direction: column; align-items: flex-start !important; gap: 12px; }
  .table-container, .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
}
