/* Custom Modern Layout Design System - Non-Intrusive Polish */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --bg-primary: #FFFFFF;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --accent-color: #0866ff;
  --accent-hover: #0052cc;
  --text-primary: #050505;
  --text-secondary: #65676b;
  --text-muted: #8a8d91;
  --border-color: #e4e6eb;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.12);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Font Refinements */
body,
button,
input,
select,
textarea {
  font-family: var(--font-family);
}

/* Smooth Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Enhancements for Custom Form Inputs & Controls */
input.custom-input,
select.custom-select,
textarea.custom-textarea {
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  transition: var(--transition);
  outline: none;
  background-color: #fff;
  font-size: 14px;
}

input.custom-input:focus,
select.custom-select:focus,
textarea.custom-textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(8, 102, 255, 0.15);
}

/* Styling for Custom Action Buttons & Floating Panels */
#btn-pdf-download {
  transition: var(--transition) !important;
  box-shadow: var(--shadow-sm);
}

#btn-pdf-download:hover {
  background-color: var(--accent-hover) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

#btn-pdf-download:active {
  transform: translateY(0);
}

/* Dialog & Modal Polishing */
#modal-adicionar-fundos div[role="dialog"] {
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
}

/* Tooltip pop-up style */
.fb-tooltip-wrapper {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  cursor: pointer;
}

.fb-tooltip-popup {
  visibility: hidden;
  width: 220px;
  background-color: #1c1e21;
  color: #fff;
  text-align: left;
  border-radius: 8px;
  padding: 10px 12px;
  position: absolute;
  z-index: 10000;
  bottom: 150%;
  /* Position above the icon */
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-family: var(--font-family);
  font-size: 12px;
  line-height: 1.4;
  font-weight: normal;
  white-space: normal;
  pointer-events: none;
}

/* Arrow */
.fb-tooltip-popup::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #1c1e21 transparent transparent transparent;
}

.fb-tooltip-wrapper:hover .fb-tooltip-popup {
  visibility: visible;
  opacity: 1;
}

/* Fixed Header & Navigation Styles */
.x1gzqxud.x13dflua.xxziih7,
.x2lah0s.xmzvs34.xf159sx.x9f619.x6ikm8r.x10wlt62.x15yg21f {
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  background-color: #ffffff !important;
}

/* Left sidebar fixed */
._7o1x {
  position: sticky !important;
  top: 0 !important;
  height: 100vh !important;
  z-index: 1001 !important;
  background-color: #ffffff !important;
  border-right: 1px solid #e4e6eb !important;
}

/* Sub-header / Top Navigation Bar container */
._2ww1._7y7x {
  position: sticky !important;
  top: 0 !important;
  z-index: 999 !important;
  background-color: #ffffff !important;
}

/* Page Header (Atividade de pagamento) sticky */
.billing-page-header-sticky,
span[data-surface*="billing_hub:page_header"]>div {
  position: sticky !important;
  top: 0 !important;
  z-index: 950 !important;
  background-color: #FFFFFF !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

/* === BARRA DE PROMOÇÃO === */
.promo-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: #003B95;
  color: white;
  height: 44px;
  transition: all 0.3s ease;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.promo-bar.transparent {
  background: transparent !important;
  box-shadow: none !important;
}

.promo-bar.transparent .promo-content,
.promo-bar.transparent .container-page {
  opacity: 0;
  pointer-events: none;
}

.promo-bar .container-page {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  height: 100%;
  padding: 0 20px;
  white-space: nowrap;
  text-align: center;
  font-size: 11px;
  transition: opacity 0.3s ease;
}

@media (min-width: 640px) {
  .promo-bar .container-page {
    font-size: 14px;
  }
}

/* === Payment Settings Two-Column & Central de Ajuda (Quadrado Menor) === */
.x1cy8zhl.x78zum5.xl56j7k.x14bzwq1 {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  gap: 20px !important;
  width: 100% !important;
}

/* Left main column (Fundos, Formas de pagamento, Informações comerciais) */
.x78zum5.xdt5ytf.x1pwt7xx {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

/* Right column container */
.x78zum5.xdt5ytf.xxc7z9f.x1cvmir6 {
  width: 320px !important;
  max-width: 320px !important;
  min-width: 280px !important;
  flex: 0 0 320px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

/* Central de Ajuda Card (Quadrado Menor) */
span[data-surface*="lib:help_center"]>div,
div:has(> span[data-surface*="lib:help_center"]) {
  width: 100% !important;
  max-width: 320px !important;
  background-color: #ffffff !important;
  border: 1px solid #e4e6eb !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  box-sizing: border-box !important;
}

span[data-surface*="lib:help_center"] .x1ov1sdl {
  gap: 10px !important;
}

span[data-surface*="lib:help_center"] .x1ov1sdl a {
  font-size: 13px !important;
  line-height: 1.35 !important;
  color: #1877f2 !important;
  text-decoration: none !important;
}

span[data-surface*="lib:help_center"] .x1ov1sdl a:hover {
  text-decoration: underline !important;
}

span[data-surface*="lib:help_center"] svg {
  color: #65676b !important;
  flex-shrink: 0 !important;
}