:root {
  --ff-navy: #061a37;
  --ff-navy-2: #032b49;
  --ff-green: #07865f;
  --ff-green-dark: #005139;
  --ff-blue: #0c48ad;
  --ff-text: #152234;
  --ff-muted: #65758b;
  --ff-border: #e3e9ef;
  --ff-bg: #f6f8fa;
  --ff-danger: #db3b43;
}

.franchise-finance-view {
  background: var(--ff-bg);
  margin: -28px;
  min-height: calc(100vh - 84px);
}

.ff-page {
  color: var(--ff-text);
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 1500px;
  padding: 24px;
}

.ff-page *,
.ff-page *::before,
.ff-page *::after { box-sizing: border-box; }
.ff-page button,
.ff-page input,
.ff-page select,
.ff-page textarea { font: inherit; }
.ff-page button,
.ff-page select,
.ff-page input[type="checkbox"] { cursor: pointer; }
.ff-page button:focus-visible,
.ff-page input:focus-visible,
.ff-page select:focus-visible,
.ff-page textarea:focus-visible { outline: 3px solid #42a5ff66; outline-offset: 2px; }
.ff-page h1,
.ff-page h2,
.ff-page h3,
.ff-page p { margin: 0; }
.ff-page h2 { font-size: 16px; font-weight: 850; }

.ff-page-head {
  align-items: center;
  background: #fff;
  border: 1px solid var(--ff-border);
  border-radius: 16px;
  display: grid;
  gap: 24px;
  grid-template-columns: 240px 1fr auto 54px;
  min-height: 96px;
  padding: 18px 22px;
}

.ff-page-head > img { max-height: 58px; max-width: 215px; width: 100%; object-fit: contain; object-position: left center; }
.ff-greeting h1 { font-size: 24px; letter-spacing: -.5px; }
.ff-greeting p { color: var(--ff-muted); font-size: 13px; margin-top: 4px; }
.ff-greeting > span { background: #eef8f4; border-radius: 8px; color: #245545; display: inline-flex; font-size: 11px; margin-top: 7px; padding: 5px 9px; }
.ff-period { align-items: end; display: flex; gap: 8px; }
.ff-period label { color: var(--ff-muted); display: grid; font-size: 11px; font-weight: 700; gap: 5px; }
.ff-period select,
.ff-period input { background: #fff; border: 1px solid var(--ff-border); border-radius: 9px; color: var(--ff-text); height: 44px; min-width: 145px; padding: 0 12px; }
.ff-date-input { position: relative; }
.ff-date-input svg { pointer-events: none; position: absolute; right: 12px; top: 13px; width: 17px; }
.ff-date-input input { padding-right: 38px; }
.ff-custom-period { display: flex; gap: 8px; }
.ff-custom-period input { min-width: 130px; }
.ff-notifications { align-items: center; background: #fff; border: 1px solid var(--ff-border); border-radius: 50%; display: flex; height: 52px; justify-content: center; position: relative; width: 52px; }
.ff-notifications svg { width: 21px; }
.ff-notifications strong { align-items: center; background: #e72535; border: 2px solid #fff; border-radius: 50%; color: #fff; display: flex; font-size: 10px; height: 20px; justify-content: center; position: absolute; right: -2px; top: -2px; width: 20px; }

.ff-main-cards { display: grid; gap: 12px; grid-template-columns: 1.18fr .92fr .92fr; }
.ff-main-card { border-radius: 14px; box-shadow: 0 10px 24px #0c244115; color: #fff; min-height: 188px; overflow: hidden; padding: 25px 25px 20px 72px; position: relative; }
.ff-main-card.sold { background: linear-gradient(125deg, #041429, #051c34 66%, #002e42); }
.ff-main-card.available { background: linear-gradient(125deg, #003f31, #006548 65%, #004b36); }
.ff-main-card.provisioned { background: linear-gradient(125deg, #092965, #0844a4 65%, #0053c8); }
.ff-card-icon { align-items: center; background: #ffffff18; border: 1px solid #ffffff21; border-radius: 50%; display: flex; height: 44px; justify-content: center; left: 20px; position: absolute; top: 23px; width: 44px; }
.ff-card-icon svg { width: 23px; }
.ff-main-card span { font-size: 12px; font-weight: 850; text-transform: uppercase; }
.ff-main-card strong { display: block; font-size: clamp(24px, 2.2vw, 34px); letter-spacing: -.8px; margin-top: 11px; }
.ff-main-card p { color: #ffffffc9; font-size: 12px; line-height: 1.45; margin-top: 4px; }
.ff-main-card > svg { bottom: 30px; color: #08b488; opacity: .85; position: absolute; right: 20px; width: 32%; }
.ff-main-card small { background: #0c826c70; border-radius: 7px; bottom: 17px; font-size: 10px; left: 20px; padding: 7px 10px; position: absolute; }
.ff-main-card small.negative { background: #d4384855; }
.ff-main-card button { align-items: center; background: #ffffff0a; border: 1px solid #ffffff7a; border-radius: 8px; bottom: 20px; color: #fff; display: flex; font-size: 11px; font-weight: 750; gap: 12px; height: 40px; left: 20px; padding: 0 15px; position: absolute; }
.ff-main-card button svg { width: 16px; }
.ff-main-card.provisioned::after { bottom: 15px; color: #ffffff18; content: "⌛"; font-size: 84px; position: absolute; right: 25px; transform: rotate(-7deg); }

.ff-panel { background: #fff; border: 1px solid var(--ff-border); border-radius: 14px; box-shadow: 0 5px 20px #17324d08; }
.ff-evolution { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr); min-height: 320px; overflow: hidden; }
.ff-chart-side { min-width: 0; padding: 22px 20px 10px; }
.ff-chart-side h2 { margin-bottom: 12px; text-transform: uppercase; }
.ff-chart-wrap { max-width: 100%; overflow-x: auto; }
.ff-chart { height: 240px; min-width: 600px; width: 100%; }
.ff-chart-grid { stroke: #e8edf1; stroke-width: 1; }
.ff-chart-line { fill: none; stroke: var(--ff-green); stroke-linecap: round; stroke-linejoin: round; stroke-width: 3.5; }
.ff-chart-point circle { fill: var(--ff-green); stroke: #fff; stroke-width: 3; }
.ff-chart-point text { fill: var(--ff-muted); font-size: 10px; }
.ff-evolution aside { border-left: 1px solid var(--ff-border); display: grid; grid-template-rows: repeat(4, 1fr); padding: 14px 22px; }
.ff-evolution aside > div { align-items: center; border-bottom: 1px solid #edf1f4; display: flex; gap: 13px; }
.ff-evolution aside > div:last-child { border: 0; }
.ff-evolution aside > div > span { align-items: center; background: #ebf8f4; border-radius: 8px; color: var(--ff-green); display: flex; height: 35px; justify-content: center; width: 35px; }
.ff-evolution aside svg { width: 18px; }
.ff-evolution aside p { color: #435063; font-size: 11px; }
.ff-evolution aside strong { color: var(--ff-green); display: block; font-size: 15px; margin-top: 5px; }

.ff-receivables { overflow: hidden; }
.ff-receivables > header { padding: 18px 20px 0; }
.ff-receivables > header h2,
.ff-adjustments header h2,
.ff-rescue header h2,
.ff-requests > header h2 { align-items: center; display: flex; gap: 9px; text-transform: uppercase; }
.ff-receivables > header h2 svg,
.ff-adjustments header h2 svg,
.ff-rescue header h2 svg,
.ff-requests > header h2 svg { color: var(--ff-green); width: 19px; }
.ff-receivables nav,
.ff-requests nav { display: flex; gap: 20px; margin-top: 10px; overflow-x: auto; }
.ff-receivables nav button,
.ff-requests nav button { background: none; border: 0; border-bottom: 2px solid transparent; color: #58687d; font-size: 12px; min-height: 40px; padding: 0 2px; white-space: nowrap; }
.ff-receivables nav button span { color: #8b97a7; }
.ff-receivables nav button.active,
.ff-requests nav button.active { border-color: var(--ff-green); color: var(--ff-green); font-weight: 800; }
.ff-desktop-table { overflow-x: auto; }
.ff-desktop-table table { border-collapse: collapse; min-width: 880px; width: 100%; }
.ff-desktop-table th { background: #fafbfd; border-bottom: 1px solid var(--ff-border); border-top: 1px solid var(--ff-border); color: #344054; font-size: 9px; letter-spacing: .2px; padding: 11px 13px; text-align: left; text-transform: uppercase; }
.ff-desktop-table td { border-bottom: 1px solid #edf1f4; color: #263448; font-size: 11px; padding: 11px 13px; vertical-align: middle; }
.ff-desktop-table td small { color: var(--ff-muted); display: block; margin-top: 3px; }
.ff-desktop-table tbody tr:hover { background: #fbfdfc; }
.ff-desktop-table input[type="checkbox"],
.ff-record-card input[type="checkbox"] { accent-color: var(--ff-green); height: 17px; width: 17px; }
.ff-money-positive { color: var(--ff-green)!important; }
.ff-status { background: #eef1f4; border-radius: 999px; color: #526172; display: inline-flex; font-size: 10px; font-weight: 750; padding: 5px 10px; white-space: nowrap; }
.ff-status.disponivel,
.ff-status.paga,
.ff-status.pago,
.ff-status.ativo,
.ff-status.aprovada { background: #e9f8f1; color: #087b59; }
.ff-status.provisionado,
.ff-status.solicitada,
.ff-status.solicitado,
.ff-status.em-analise,
.ff-status.em-pagamento,
.ff-status.reservado { background: #eaf1ff; color: #1456b8; }
.ff-status.bloqueado,
.ff-status.rejeitada,
.ff-status.cancelado,
.ff-status.cancelada,
.ff-status.inativo { background: #ffeaec; color: #bd2632; }
.ff-status.pendente { background: #fff3d9; color: #936303; }
.ff-icon-button { align-items: center; background: none; border: 0; color: #637287; display: inline-flex; height: 36px; justify-content: center; width: 36px; }
.ff-icon-button svg { width: 16px; }
.ff-receivables > footer { align-items: center; display: flex; font-size: 11px; justify-content: space-between; min-height: 46px; padding: 8px 20px; }
.ff-receivables > footer strong { color: var(--ff-green); font-size: 15px; margin-left: 10px; }
.ff-mobile-records { display: none; }

.ff-payout-grid { display: grid; gap: 14px; grid-template-columns: minmax(280px, 1.2fr) minmax(310px, .95fr) minmax(190px, .48fr); }
.ff-adjustments,
.ff-rescue,
.ff-security { padding: 20px; }
.ff-adjustments header p,
.ff-rescue header p { color: var(--ff-muted); font-size: 10px; margin: 5px 0 14px 27px; }
.ff-adjustment-total { background: #fff5ec; border: 1px solid #f7dfcd; border-radius: 10px; margin: 13px 0; padding: 13px 15px; }
.ff-adjustment-total span { display: block; font-size: 10px; }
.ff-adjustment-total strong { color: var(--ff-danger); display: block; font-size: 19px; margin-top: 6px; }
.ff-adjustment-list { display: grid; }
.ff-adjustment-list button { align-items: center; background: none; border: 0; border-bottom: 1px solid #edf0f3; display: grid; font-size: 9px; gap: 7px; grid-template-columns: 64px 1fr 1fr auto; min-height: 31px; padding: 4px 6px; text-align: left; }
.ff-adjustment-list button em { color: var(--ff-muted); font-style: normal; }
.ff-adjustment-list button b { color: var(--ff-danger); }
.ff-link-button { background: none; border: 0; color: #275d9b; display: flex; font-size: 10px; gap: 6px; margin: 11px auto 0; }
.ff-link-button svg { width: 14px; }
.ff-rescue dl,
.ff-modal dl { display: grid; margin: 0; }
.ff-rescue dl > div,
.ff-modal dl > div { align-items: center; display: flex; font-size: 11px; justify-content: space-between; padding: 8px 0; }
.ff-rescue dd,
.ff-modal dd { font-weight: 750; margin: 0; text-align: right; }
.ff-rescue .negative,
.ff-rule-list .negative { color: var(--ff-danger); }
.ff-rescue dl .total { border-top: 1px solid #dce3e9; color: var(--ff-green); font-size: 14px; margin-top: 4px; padding: 15px 0; }
.ff-rescue dl .total dd { font-size: 21px; }
.ff-upload { align-content: center; align-items: center; border: 1.5px dashed #b9c5d0; border-radius: 10px; display: grid; justify-items: center; min-height: 113px; padding: 12px; position: relative; text-align: center; }
.ff-upload > input { inset: 0; opacity: 0; position: absolute; width: 100%; }
.ff-upload svg { color: #23364d; height: 28px; width: 28px; }
.ff-upload strong { font-size: 11px; margin-top: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ff-upload span { color: var(--ff-muted); font-size: 9px; margin-top: 3px; }
.ff-upload button { background: none; border: 0; color: #1e5a9b; font-size: 10px; margin-top: 4px; position: relative; z-index: 2; }
.ff-upload-progress { background: #e8edf0; border-radius: 3px; height: 4px; margin-top: 7px; overflow: hidden; width: 80%; }
.ff-upload-progress i { background: var(--ff-green); display: block; height: 100%; transition: width .15s; }
.ff-primary,
.ff-secondary { align-items: center; border-radius: 9px; display: inline-flex; font-weight: 800; gap: 8px; justify-content: center; min-height: 44px; padding: 0 16px; }
.ff-primary { background: linear-gradient(90deg, #078257, #06a56c); border: 0; color: #fff; }
.ff-secondary { background: #fff; border: 1px solid #ccd6df; color: #304056; }
.ff-primary:disabled { cursor: not-allowed; opacity: .45; }
.ff-submit-rescue { margin-top: 9px; width: 100%; }
.ff-inline-error { color: var(--ff-danger); font-size: 10px; margin: 0 0 8px!important; }
.ff-security header { align-items: center; display: flex; gap: 8px; }
.ff-security header > svg { color: var(--ff-green); flex: 0 0 auto; height: 30px; width: 30px; }
.ff-security h2 { font-size: 12px; text-transform: none; }
.ff-security ol { display: grid; gap: 16px; list-style: none; margin: 22px 0 0; padding: 0; }
.ff-security li { align-items: center; color: #344255; display: flex; font-size: 10px; gap: 8px; line-height: 1.35; }
.ff-security li svg { background: #1aab75; border-radius: 5px; color: #fff; padding: 3px; width: 17px; }

.ff-requests { overflow: hidden; }
.ff-requests > header { padding: 18px 20px 0; }
.ff-doc-button { align-items: center; background: none; border: 0; color: #32465f; display: inline-flex; font-size: 10px; gap: 6px; max-width: 170px; overflow: hidden; padding: 0; text-overflow: ellipsis; white-space: nowrap; }
.ff-doc-button svg { flex: 0 0 auto; width: 14px; }
.ff-banner { align-items: center; background: linear-gradient(100deg, #051830, #00293a 60%, #00664b); border-radius: 13px; color: #fff; display: flex; gap: 20px; min-height: 72px; overflow: hidden; padding: 15px 28px; position: relative; }
.ff-banner > svg { border: 2px solid #fff; border-radius: 50%; height: 38px; padding: 7px; width: 38px; }
.ff-banner strong { display: block; font-size: 14px; }
.ff-banner span { color: #ffffffc2; display: block; font-size: 10px; margin-top: 4px; }
.ff-banner > svg:last-child { border: 0; border-radius: 0; bottom: 0; color: #0bb884; height: 60px; left: auto; opacity: .75; padding: 0; position: absolute; right: 35px; width: 260px; }
.ff-partial-warning { align-items: center; background: #fff8e8; border: 1px solid #f3d79b; border-radius: 10px; color: #795a13; display: flex; font-size: 11px; gap: 8px; padding: 10px 13px; }
.ff-partial-warning svg { width: 17px; }

.ff-empty,
.ff-state-card { align-items: center; color: var(--ff-muted); display: flex; flex-direction: column; justify-content: center; min-height: 190px; padding: 24px; text-align: center; }
.ff-empty.compact { min-height: 95px; }
.ff-empty svg,
.ff-state-card > svg { color: #9babba; height: 38px; margin-bottom: 9px; width: 38px; }
.ff-empty strong,
.ff-state-card h2 { color: #314055; font-size: 15px; }
.ff-empty span,
.ff-state-card p { font-size: 11px; margin-top: 6px; max-width: 480px; }
.ff-state-card { background: #fff; border: 1px solid var(--ff-border); border-radius: 16px; margin: 60px auto; max-width: 640px; min-height: 330px; }
.ff-state-card .ff-primary { margin-top: 18px; }
.ff-skeleton { display: grid; gap: 16px; padding: 24px; }
.ff-skeleton * { animation: ff-pulse 1.3s infinite ease-in-out; background: #e9eef2; border-radius: 13px; display: block; }
.ff-skeleton-head { height: 92px; }
.ff-skeleton-kpis { background: none; display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.ff-skeleton-kpis i { height: 185px; }
.ff-skeleton-chart { height: 310px; }
.ff-skeleton-table { height: 360px; }
@keyframes ff-pulse { 50% { opacity: .48; } }

.ff-admin { gap: 16px; }
.ff-admin-head { align-items: center; background: linear-gradient(115deg, #061a37, #07395c); border-radius: 15px; color: #fff; display: flex; justify-content: space-between; padding: 25px 28px; }
.ff-admin-head span { color: #62d9ae; font-size: 11px; font-weight: 850; text-transform: uppercase; }
.ff-admin-head h1 { font-size: 27px; margin: 5px 0; }
.ff-admin-head p { color: #d6e2ed; font-size: 12px; }
.ff-admin-tabs { background: #fff; border: 1px solid var(--ff-border); border-radius: 12px; display: flex; gap: 5px; overflow-x: auto; padding: 7px; }
.ff-admin-tabs button { align-items: center; background: none; border: 0; border-radius: 8px; color: var(--ff-muted); display: flex; flex: 1; font-size: 11px; font-weight: 700; gap: 7px; justify-content: center; min-height: 42px; min-width: 125px; padding: 0 12px; }
.ff-admin-tabs button.active { background: #eaf7f2; color: var(--ff-green); }
.ff-admin-tabs svg { width: 17px; }
.ff-admin-kpis { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); }
.ff-admin-kpis article { align-items: center; background: #fff; border: 1px solid var(--ff-border); border-radius: 13px; display: grid; grid-template-columns: 42px 1fr; padding: 17px; }
.ff-admin-kpis svg { background: #eaf7f2; border-radius: 10px; color: var(--ff-green); grid-row: 1 / 3; height: 38px; padding: 9px; width: 38px; }
.ff-admin-kpis span { color: var(--ff-muted); font-size: 10px; }
.ff-admin-kpis strong { font-size: 19px; }
.ff-panel-heading { align-items: center; display: flex; justify-content: space-between; padding: 19px 20px; }
.ff-panel-heading h2 { font-size: 17px; }
.ff-panel-heading p { color: var(--ff-muted); font-size: 10px; margin-top: 4px; }
.ff-admin-card-list { display: grid; gap: 12px; padding: 0 20px 20px; }
.ff-admin-card-list > article { border: 1px solid var(--ff-border); border-radius: 11px; padding: 15px; }
.ff-admin-card-list article > header { align-items: center; display: flex; justify-content: space-between; }
.ff-admin-card-list header span { color: var(--ff-muted); display: block; font-size: 10px; margin-top: 3px; }
.ff-admin-card-list dl { display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); margin: 14px 0; }
.ff-admin-card-list dl > div { background: #f7f9fa; border-radius: 8px; padding: 9px; }
.ff-admin-card-list dt { color: var(--ff-muted); font-size: 9px; }
.ff-admin-card-list dd { font-size: 13px; font-weight: 800; margin: 4px 0 0; }
.ff-admin-actions { align-items: center; display: flex; gap: 8px; }
.ff-admin-actions .ff-secondary { font-size: 10px; min-height: 38px; position: relative; }
.ff-admin-actions label input { inset: 0; opacity: 0; position: absolute; }
.ff-admin-actions select,
.ff-desktop-table select { background: #fff; border: 1px solid #ccd6df; border-radius: 8px; height: 38px; margin-left: auto; padding: 0 10px; }
.ff-admin-form-grid { display: grid; gap: 14px; grid-template-columns: minmax(320px, .8fr) minmax(420px, 1.2fr); }
.ff-admin-form { display: grid; gap: 12px; padding: 20px; }
.ff-admin-form .ff-panel-heading { padding: 0 0 5px; }
.ff-admin-form label { color: #405166; display: grid; font-size: 10px; font-weight: 750; gap: 5px; }
.ff-admin-form input,
.ff-admin-form select,
.ff-admin-form textarea { background: #fff; border: 1px solid #ccd6df; border-radius: 8px; min-height: 42px; padding: 8px 10px; }
.ff-admin-form textarea { min-height: 78px; resize: vertical; }
.ff-form-row { display: grid; gap: 9px; grid-template-columns: 1fr 1fr; }
.ff-revenue-source { border: 0; margin: 0; padding: 0; }
.ff-revenue-source legend { color: #405166; font-size: 10px; font-weight: 750; margin-bottom: 7px; }
.ff-revenue-source > div { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.ff-revenue-source label { cursor: pointer; display: block; }
.ff-revenue-source input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.ff-revenue-source label > span { align-items: center; background: #fff; border: 1px solid #ccd6df; border-radius: 10px; display: grid; gap: 2px; grid-template-columns: 28px 1fr; min-height: 62px; padding: 9px 10px; }
.ff-revenue-source label > span svg { color: #176bd6; grid-row: 1 / 3; height: 20px; width: 20px; }
.ff-revenue-source label > span strong { color: #26384f; font-size: 11px; }
.ff-revenue-source label > span small { color: #718198; font-size: 9px; font-weight: 500; }
.ff-revenue-source input:checked + span { background: #eef5ff; border-color: #176bd6; box-shadow: 0 0 0 2px rgba(23,107,214,.12); }
.ff-revenue-source input:focus-visible + span { outline: 2px solid #176bd6; outline-offset: 2px; }
.ff-admin-form label.ff-check { align-items: center; display: flex; min-height: 34px; }
.ff-check input { min-height: 0; }
.ff-rule-list { display: grid; gap: 7px; padding: 0 20px 20px; }
.ff-rule-list article { align-items: center; border: 1px solid var(--ff-border); border-radius: 9px; display: grid; gap: 12px; grid-template-columns: 1fr auto auto; padding: 11px 13px; }
.ff-rule-list article span { color: var(--ff-muted); display: block; font-size: 9px; margin-top: 3px; }
.ff-rule-list article b { font-size: 13px; }
.ff-toast { align-items: center; background: #073a2f; border-radius: 9px; bottom: 24px; box-shadow: 0 12px 30px #071f1966; color: #fff; display: flex; font-size: 11px; gap: 8px; max-width: 420px; padding: 12px 14px; position: fixed; right: 24px; z-index: 300; }
.ff-toast > svg { color: #5ee0ae; width: 18px; }
.ff-toast button { background: none; border: 0; color: #fff; margin-left: auto; }
.ff-toast button svg { width: 15px; }

.ff-modal-backdrop { align-items: center; background: #061426a8; display: flex; inset: 0; justify-content: center; padding: 18px; position: fixed; z-index: 500; }
.ff-modal { background: #fff; border-radius: 16px; max-height: calc(100vh - 36px); max-width: 510px; overflow-y: auto; padding: 27px; position: relative; text-align: center; width: 100%; }
.ff-modal > p { color: var(--ff-muted); font-size: 11px; margin: 5px 0 15px; }
.ff-modal-icon { align-items: center; background: #e8f8f1; border-radius: 50%; color: var(--ff-green); display: flex; height: 54px; justify-content: center; margin: 0 auto 12px; width: 54px; }
.ff-modal dl { background: #f7f9fa; border-radius: 10px; padding: 8px 13px; text-align: left; }
.ff-modal dl .total { border-top: 1px solid var(--ff-border); color: var(--ff-green); font-size: 14px; }
.ff-modal footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.ff-modal-close { align-items: center; background: #f2f4f6; border: 0; border-radius: 50%; display: flex; height: 36px; justify-content: center; position: absolute; right: 13px; top: 13px; width: 36px; }
.ff-modal-close svg { width: 17px; }
.ff-drawer { background: #fff; box-shadow: -15px 0 40px #07182a33; height: 100%; margin-left: auto; max-width: 460px; overflow-y: auto; padding: 28px; position: absolute; right: 0; top: 0; width: min(100%, 460px); }
.ff-drawer h2 { font-size: 21px; margin-bottom: 20px; padding-right: 35px; }
.ff-drawer dl { display: grid; gap: 8px; margin: 0; }
.ff-drawer dl > div { background: #f6f8fa; border-radius: 9px; padding: 12px; }
.ff-drawer dt { color: var(--ff-muted); font-size: 9px; text-transform: uppercase; }
.ff-drawer dd { font-size: 12px; font-weight: 700; margin: 5px 0 0; white-space: pre-wrap; }
.ff-mobile-selection { display: none; }

@media (max-width: 1180px) {
  .franchise-finance-view { margin: -24px; }
  .ff-page-head { grid-template-columns: 180px 1fr auto 52px; }
  .ff-main-cards { grid-template-columns: 1fr 1fr; }
  .ff-main-card.provisioned { grid-column: 1 / -1; }
  .ff-evolution { grid-template-columns: 1fr; }
  .ff-evolution aside { border-left: 0; border-top: 1px solid var(--ff-border); grid-template-columns: repeat(2, 1fr); grid-template-rows: none; }
  .ff-evolution aside > div { border-bottom: 0; padding: 12px; }
  .ff-payout-grid { grid-template-columns: 1fr 1fr; }
  .ff-security { grid-column: 1 / -1; }
  .ff-security ol { grid-template-columns: repeat(4, 1fr); }
  .ff-admin-kpis { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .franchise-finance-view { margin: -16px; min-height: calc(100vh - 68px); }
  .ff-page { gap: 12px; padding: 12px 10px calc(28px + env(safe-area-inset-bottom)); }
  .ff-page-head { gap: 12px; grid-template-columns: 1fr 46px; padding: 14px; }
  .ff-page-head > img { max-height: 44px; max-width: 160px; }
  .ff-greeting { grid-column: 1 / -1; grid-row: 2; }
  .ff-greeting h1 { font-size: 21px; }
  .ff-period { align-items: stretch; flex-direction: column; grid-column: 1 / -1; grid-row: 3; }
  .ff-period label,
  .ff-period input,
  .ff-period select { width: 100%; }
  .ff-custom-period { width: 100%; }
  .ff-notifications { grid-column: 2; grid-row: 1; height: 46px; width: 46px; }
  .ff-main-cards { display: flex; gap: 10px; margin: 0 -10px; overflow-x: auto; padding: 0 10px 5px; scroll-snap-type: x mandatory; }
  .ff-main-card,
  .ff-main-card.provisioned { flex: 0 0 min(86vw, 360px); grid-column: auto; min-height: 180px; scroll-snap-align: center; }
  .ff-main-card strong { font-size: 27px; }
  .ff-chart-side { padding: 17px 12px 5px; }
  .ff-chart { height: 220px; }
  .ff-evolution aside { gap: 1px; padding: 0; }
  .ff-evolution aside > div { background: #fbfcfc; min-width: 0; }
  .ff-evolution aside strong { font-size: 13px; }
  .ff-desktop-table { display: none; }
  .ff-mobile-records { display: grid; gap: 9px; padding: 10px 12px; }
  .ff-record-card { border: 1px solid var(--ff-border); border-radius: 11px; padding: 13px; }
  .ff-record-card header { align-items: center; display: flex; justify-content: space-between; }
  .ff-record-card header label { align-items: center; display: flex; gap: 8px; }
  .ff-record-card > strong { display: block; font-size: 13px; margin-top: 11px; }
  .ff-record-card > p { color: var(--ff-muted); font-size: 10px; margin-top: 3px; }
  .ff-record-card dl { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; margin: 12px 0; }
  .ff-record-card dl div { background: #f6f8fa; border-radius: 8px; padding: 8px; }
  .ff-record-card dt { color: var(--ff-muted); font-size: 8px; }
  .ff-record-card dd { font-size: 12px; font-weight: 800; margin: 4px 0 0; }
  .ff-record-card > button { background: none; border: 0; color: #25609f; font-size: 10px; padding: 7px 0 0; }
  .ff-receivables > footer { align-items: flex-start; flex-direction: column; gap: 5px; }
  .ff-receivables > footer strong { font-size: 13px; margin-left: 3px; }
  .ff-payout-grid { grid-template-columns: 1fr; }
  .ff-security { grid-column: auto; }
  .ff-security ol { grid-template-columns: 1fr 1fr; }
  .ff-adjustment-list button { gap: 5px; grid-template-columns: 62px 1fr auto; }
  .ff-adjustment-list button em { display: none; }
  .ff-banner > svg:last-child { display: none; }
  .ff-mobile-selection { align-items: center; background: #fff; border-top: 1px solid var(--ff-border); bottom: 0; box-shadow: 0 -10px 25px #1222361f; display: grid; grid-template-columns: 1fr auto; left: 0; min-height: 68px; padding: 9px 12px calc(9px + env(safe-area-inset-bottom)); position: fixed; right: 0; z-index: 250; }
  .ff-mobile-selection span { color: var(--ff-muted); font-size: 9px; }
  .ff-mobile-selection strong { grid-column: 1; }
  .ff-mobile-selection button { background: var(--ff-green); border: 0; border-radius: 8px; color: #fff; grid-column: 2; grid-row: 1 / 3; min-height: 44px; padding: 0 18px; }
  .ff-admin-head { align-items: flex-start; gap: 18px; padding: 20px; }
  .ff-admin-head h1 { font-size: 22px; }
  .ff-admin-head p { display: none; }
  .ff-admin-head .ff-secondary { min-width: 44px; padding: 0 12px; }
  .ff-admin-kpis { grid-template-columns: 1fr 1fr; }
  .ff-admin-kpis article { grid-template-columns: 34px 1fr; padding: 12px; }
  .ff-admin-kpis svg { height: 31px; padding: 7px; width: 31px; }
  .ff-admin-kpis strong { font-size: 14px; }
  .ff-admin-form-grid { grid-template-columns: 1fr; }
  .ff-admin-card-list dl { grid-template-columns: 1fr; }
  .ff-admin-actions { align-items: stretch; flex-direction: column; }
  .ff-admin-actions select { margin: 0; width: 100%; }
  .ff-rule-list article { align-items: start; grid-template-columns: 1fr auto; }
  .ff-rule-list article .ff-status { grid-column: 1 / -1; justify-self: start; }
  .ff-modal { padding: 24px 18px 18px; }
  .ff-modal footer { flex-direction: column-reverse; }
  .ff-modal footer button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ff-skeleton *,
  .ff-upload-progress i { animation: none; transition: none; }
  .ff-main-cards { scroll-behavior: auto; }
}
