:root {
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  color-scheme: light;
  --bg: #f2f2f7; --card: #fff; --sheet: #fff; --side: #fafafd;
  --navOn: #eaf2ff; --field: #f5f5f9; --fieldF: #fff; --hover: #edf2fa;
  --line: #e5e5eb; --line2: #d9dce5; --edge: #fff;
  --ink: #191d27; --ink2: #3d4350; --mute: #696f7b;
  --amber: #e4b04f; --amber2: #cd9635; --amberT: #916720;
  --amberGlow: #e4b04f19; --amberGlow2: #e4b04f2b;
  --teal: #21824b; --coral: #965c05; --sky: #0669d7; --violet: #795ac0; --zap: #21824b;
  --action: #086cdb; --danger: #bd3439; --attention-bg: #fff5e4;
  --sh: 0 2px 9px #15223805; --sh2: 0 12px 42px #18283b14;
  --scrim: #15223845; --glare: #ffffff40;
}
:root[data-tema="escuro"] {
  color-scheme: dark;
  --bg: #101216; --card: #1b1e24; --sheet: #20232a; --side: #14171b;
  --navOn: #243345; --field: #252931; --fieldF: #2b3039; --hover: #272d36;
  --line: #30343d; --line2: #414753; --edge: #ffffff09;
  --ink: #f1f3f6; --ink2: #c8cdd6; --mute: #a1a8b6;
  --amber: #e7b653; --amber2: #d3a040; --amberT: #e7b653;
  --teal: #63d398; --coral: #edb55f; --sky: #7ebaff; --violet: #bea2ed; --zap: #63d398;
  --action: #75b5ff; --danger: #ff999e; --attention-bg: #372c1a;
  --sh: 0 2px 8px #00000012; --sh2: 0 12px 42px #00000040;
  --scrim: #05070a80; --glare: #ffffff08;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tema]) {
    color-scheme: dark;
    --bg: #101216; --card: #1b1e24; --sheet: #20232a; --side: #14171b;
    --navOn: #243345; --field: #252931; --fieldF: #2b3039; --hover: #272d36;
    --line: #30343d; --line2: #414753; --edge: #ffffff09;
    --ink: #f1f3f6; --ink2: #c8cdd6; --mute: #a1a8b6;
    --teal: #63d398; --coral: #edb55f; --sky: #7ebaff; --action: #75b5ff;
  }
}
html, body { font-family: var(--font-system) !important; transition: background-color 140ms, color 140ms !important; }
button, input, select, textarea { font-family: var(--font-system) !important; }
button, a, label { touch-action: manipulation; }
button { -webkit-user-select: none; user-select: none; }
button:disabled { cursor: default; opacity: .5; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--action) !important; outline-offset: 3px;
}
[style*="backdrop-filter"] { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
[style*="box-shadow"] { box-shadow: var(--sh) !important; }
[style*="transition:"] { transition-duration: 150ms !important; }
button[style*="linear-gradient(180deg,var(--amber)"] {
  background: #086cdb !important; color: #fff !important; box-shadow: none !important;
}
[style*="bfPulse"], [style*="bfFloat"], [style*="bfShine"] { animation: none !important; }
span[style*="bfShine"] { display: none; }
[style*="bfUp"], [style*="bfPage"], [style*="bfCard"], [style*="bfLoginIn"],
[style*="bfAppIn"], [style*="bfSideIn"], [style*="bfDockIn"], [style*="bfSheet"],
[style*="bfFade"], [style*="bfBar"], [style*="bfToast"] {
  animation-duration: 160ms !important; animation-delay: 0ms !important;
  animation-timing-function: ease-out !important;
}
@keyframes bfUp { from { opacity: .7; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes bfPage { from { opacity: .7; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes bfCard { from { opacity: .8; } to { opacity: 1; } }
@keyframes bfLoginIn { from { opacity: .8; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes bfAppIn { from { opacity: .8; } to { opacity: 1; } }
@keyframes bfSideIn { from { opacity: .8; } to { opacity: 1; } }
@keyframes bfDockIn { from { opacity: .8; } to { opacity: 1; } }
@keyframes bfFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bfBar { from { opacity: .6; transform: scaleY(.98); } to { opacity: 1; transform: scaleY(1); } }
@keyframes bfSpin { to { transform: rotate(360deg); } }
@keyframes bfDot { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
@keyframes bfScan { from { top: 0; } to { top: 100%; } }
@keyframes bfSheet { from { opacity: .7; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes bfToast { from { opacity: .7; transform: translate(-50%, 4px); } to { opacity: 1; transform: translate(-50%, 0); } }
.bf-ambient { display: none; }
.bf-auth { width: min(440px, 100%) !important; border-radius: 28px !important; padding: 32px !important; }
.bf-sidebar { width: 240px !important; gap: 24px !important; }
.bf-sidebar nav > div { box-shadow: none !important; }
.bf-sidebar nav > div:nth-child(2) { background: var(--action) !important; }
.bf-sidebar nav button { color: var(--mute); }
.bf-header { align-items: center !important; }
.bf-header h1 { font-size: clamp(28px, 3.5vw, 38px) !important; letter-spacing: -.035em !important; line-height: 1.12 !important; }
.bf-header-actions { display: flex; align-items: center; gap: 9px; flex: none; }
.bf-icon-button, .bf-avatar-button { width: 44px; height: 44px; border: 1px solid var(--line); background: var(--card); color: var(--action); border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0; flex: none; }
.bf-avatar-button { overflow: hidden; background: var(--navOn); }
.bf-avatar-button img, .bf-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bf-profile-link { min-width: 0; flex: 1; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; }
.bf-profile-link .bf-avatar { width: 36px; height: 36px; }
.bf-profile-copy { min-width: 0; display: grid; gap: 3px; }
.bf-profile-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.bf-profile-copy small { color: var(--mute); font-size: 12px; }
.bf-avatar { width: 84px; height: 84px; border-radius: 50%; background: var(--navOn); color: var(--action); display: grid; place-items: center; flex: none; overflow: hidden; }
.bf-dock { left: 0 !important; right: 0 !important; bottom: 0 !important; height: calc(68px + env(safe-area-inset-bottom)) !important; padding: 5px 5px calc(5px + env(safe-area-inset-bottom)) !important; border-radius: 0 !important; border-left: 0 !important; border-right: 0 !important; border-bottom: 0 !important; box-shadow: none !important; }
.bf-dock > div { display: none; }
.bf-dock button { font-size: 10.5px !important; gap: 4px !important; }
.bf-kpis > div > div[style*="radial-gradient"] { display: none; }
.bf-kpis > div { padding: 20px !important; }
.bf-kpis > div:nth-child(1) > div:nth-child(4) { color: var(--teal); }
.bf-settings { display: grid; gap: 18px; max-width: 760px; }
.bf-settings-card { padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; }
.bf-settings-card h2 { margin: 0 0 6px; font-size: 21px; font-weight: 700; letter-spacing: -.025em; }
.bf-settings-card p { margin: 0; color: var(--mute); font-size: 14px; line-height: 1.5; }
.bf-photo-editor { display: flex; gap: 20px; align-items: center; margin: 22px 0; }
.bf-photo-actions { display: grid; gap: 9px; justify-items: start; }
.bf-file-label { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 12px; color: var(--action); background: var(--navOn); font-weight: 600; font-size: 14px; cursor: pointer; overflow: hidden; }
.bf-file-label input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.bf-file-label:focus-within { outline: 3px solid var(--action); outline-offset: 3px; }
.bf-link-button { border: 0; padding: 8px 0; background: none; color: var(--action); font-size: 14px; cursor: pointer; min-height: 44px; }
.bf-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bf-settings label.bf-field { display: grid; gap: 8px; font-size: 14px; font-weight: 600; }
.bf-settings input:not([type="file"]) { width: 100%; min-width: 0; height: 48px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 12px; background: var(--field); color: var(--ink); font-size: 16px; }
.bf-settings fieldset { border: 0; margin: 22px 0 0; padding: 0; }
.bf-settings legend { font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.bf-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; padding: 5px; border-radius: 14px; background: var(--field); }
.bf-choice { min-height: 44px; padding: 8px 6px; border: 0; border-radius: 10px; background: transparent; color: var(--mute); font-size: 14px; font-weight: 600; cursor: pointer; }
.bf-choice.is-selected { background: var(--card); color: var(--action); box-shadow: 0 1px 5px #0000000a; }
.bf-settings .bf-help { margin-top: 9px; font-size: 12px; }
.bf-settings-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.bf-button { min-height: 48px; border-radius: 14px; padding: 0 20px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); font-weight: 600; font-size: 15px; cursor: pointer; }
.bf-button-primary { background: #086cdb; color: #fff; border-color: #086cdb; }
.bf-button-danger { color: var(--danger); }
.bf-settings-message { padding: 12px 15px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.bf-settings-error { background: var(--attention-bg); color: var(--coral); }
.bf-settings-success { color: var(--teal); background: color-mix(in srgb, var(--teal) 10%, var(--card)); }
.bf-cache-notice { margin-bottom: 18px; }
.bf-account { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.bf-account p { overflow-wrap: anywhere; }
:root[data-movimento="reduzido"] *, :root[data-movimento="reduzido"] *::before, :root[data-movimento="reduzido"] *::after { animation: none !important; transition: none !important; }
:root[data-movimento="reduzido"] [data-tilt] { transform: none !important; }
@media (max-width: 859px), (pointer: coarse) {
  [data-tilt] { transform: none !important; }
  [style*="filter:"] { filter: none !important; }
  [style*="bfUp"], [style*="bfCard"], [style*="bfBar"] { animation: none !important; }
  button { min-height: 44px; }
  input, select, textarea { font-size: 16px !important; }
  .bf-header { margin-bottom: 22px !important; gap: 12px !important; }
  .bf-header h1 { font-size: 29px !important; }
  .bf-main { padding: max(24px, env(safe-area-inset-top)) 18px calc(104px + env(safe-area-inset-bottom)) !important; }
  .bf-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .bf-kpis > div { padding: 16px !important; border-radius: 18px !important; }
  .bf-kpis > div > div[style*="font-size:30px"] { font-size: clamp(22px, 5.5vw, 28px) !important; overflow-wrap: anywhere; }
  .bf-kpis > div > div[style*="font-size:13px"] { font-size: 12px !important; line-height: 1.4; }
  .bf-settings { gap: 14px; }
  .bf-settings-card { padding: 20px; }
  .bf-form-grid { grid-template-columns: 1fr; gap: 16px; }
  .bf-photo-editor { gap: 16px; }
  .bf-settings-actions .bf-button-primary { flex: 1; }
  .bf-account { align-items: flex-start; flex-direction: column; gap: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-tilt] { transform: none !important; }
}
@media (max-width: 360px) { .bf-choice { font-size: 12.5px; padding-inline: 4px; } }
