/* SELLMAS Finance V3: presentation-only skin for existing confirmed-data WB Finance V2. */
html body.fc-ready #wb-finance-modal-v2 {
  --fs-bg:#f1f5fc; --fs-card:#fff; --fs-text:#172440; --fs-muted:#657895;
  --fs-border:#dce5f2; --fs-blue:#3069eb; --fs-hero:#193b65;
}
html body.fc-ready #wb-finance-modal-v2 .modal-dialog {
  background:var(--fs-bg)!important;color:var(--fs-text)!important;
  border:1px solid var(--fs-border)!important;border-radius:22px!important;
  box-shadow:0 18px 56px rgba(15,34,65,.20)!important;backdrop-filter:none!important;
}
html body.fc-ready #wb-finance-modal-v2 .modal-header {
  background:var(--fs-card)!important;border:0!important;border-bottom:1px solid var(--fs-border)!important;
  border-radius:22px 22px 0 0!important;margin:0!important;padding:19px 24px!important;
  display:flex!important;align-items:flex-start!important;justify-content:space-between!important;
}
html body.fc-ready #wb-finance-modal-v2 .modal-header h2 {
  font-size:28px!important;font-weight:850!important;letter-spacing:-.03em;color:var(--fs-text)!important;
}
html body.fc-ready #wb-finance-modal-v2 :is(#fin2-report-sub,#fin2-sync-status-text) {
  color:var(--fs-muted)!important;font-size:12px!important;
}
html body.fc-ready #wb-finance-modal-v2 .close-btn {
  display:grid!important;place-items:center!important;width:38px;height:38px;
  background:#fff!important;border:1px solid var(--fs-border)!important;
  border-radius:11px!important;color:var(--fs-text)!important;box-shadow:none!important;
}
html body.fc-ready #wb-finance-modal-v2 .modal-body {
  background:var(--fs-bg)!important;color:var(--fs-text)!important;padding:15px 22px 26px!important;
}
/* Existing first body child contains all four real tab buttons. */
html body.fc-ready #wb-finance-modal-v2 .modal-body > div:first-child {
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:5px!important;padding:5px!important;margin:0 0 15px!important;
  border:1px solid var(--fs-border);border-radius:13px;background:#fff;
}
html body.fc-ready #wb-finance-modal-v2 .btn.fin2-tab,
html body.fc-ready #wb-finance-modal-v2 .btn.fin2-tab:not(.active) {
  width:100%!important;min-width:0!important;min-height:38px!important;
  display:inline-flex!important;align-items:center;justify-content:center;
  background:transparent!important;border:1px solid transparent!important;
  border-radius:9px!important;padding:7px 9px!important;
  color:#526681!important;font-size:12px!important;font-weight:750!important;box-shadow:none!important;
}
html body.fc-ready #wb-finance-modal-v2 .btn.fin2-tab.active,
html body.fc-ready #wb-finance-modal-v2 .btn.fin2-tab.active:hover {
  background:var(--fs-blue)!important;border-color:var(--fs-blue)!important;color:#fff!important;
}
html body.fc-ready #wb-finance-modal-v2 .btn.fin2-tab:not(.active):hover {
  background:#eaf1ff!important;color:#2d5fbd!important;
}
html body.fc-ready #wb-finance-modal-v2 .fin2-panel {
  background:transparent!important;color:var(--fs-text);min-width:0;
}
html body.fc-ready #wb-finance-modal-v2 .finx-card {
  background:#fff!important;border:1px solid var(--fs-border)!important;
  border-radius:16px!important;box-shadow:0 3px 12px rgba(22,48,81,.06)!important;
}
html body.fc-ready #wb-finance-modal-v2 .finx-cardin {background:transparent!important;}
/* Summary: profit comes first visually, but original DOM ids/data stay in place. */
html body.fc-ready #wb-finance-modal-v2 #fin2-summary-grid {
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;margin-bottom:13px!important;
}
html body.fc-ready #wb-finance-modal-v2 #fin2-summary-grid > .finx-card {min-width:0!important;margin:0!important;}
html body.fc-ready #wb-finance-modal-v2 #fin2-summary-grid > .finx-card:nth-child(3) {
  order:0;grid-column:1/-1!important;min-height:150px;
  background:linear-gradient(110deg,#162e56,#193e68 72%,#18516b)!important;
  border-color:#345477!important;box-shadow:0 9px 24px rgba(24,60,108,.17)!important;
}
html body.fc-ready #wb-finance-modal-v2 #fin2-summary-grid > .finx-card:nth-child(3) .finx-cardin {
  padding:22px 26px!important;min-height:145px;display:flex;flex-direction:column;justify-content:center;
}
html body.fc-ready #wb-finance-modal-v2 #fin2-summary-grid > .finx-card:nth-child(3) .finx-cardin > div:first-child {
  color:#dcf0ff!important;font-size:16px!important;font-weight:760!important;
}
html body.fc-ready #wb-finance-modal-v2 #fin2-kpi-profit {
  color:#fff!important;font-size:clamp(30px,3.7vw,48px)!important;letter-spacing:-.035em!important;
}
html body.fc-ready #wb-finance-modal-v2 #fin2-summary-grid > .finx-card:nth-child(3) .finx-cardin > div:last-child {
  color:#c0d6ec!important;
}
html body.fc-ready #wb-finance-modal-v2 #fin2-summary-grid > .finx-card:nth-child(1) {
  order:1;background:#ddecff!important;
}
html body.fc-ready #wb-finance-modal-v2 #fin2-summary-grid > .finx-card:nth-child(2) {
  order:2;background:#e5eaff!important;
}
html body.fc-ready #wb-finance-modal-v2 #fin2-summary-grid > .finx-card:nth-child(4) {
  order:3;background:#eee5ff!important;
}
html body.fc-ready #wb-finance-modal-v2 #fin2-summary-grid > .finx-card:not(:nth-child(3)) .finx-cardin {
  padding:14px 16px!important;min-height:110px;
}
html body.fc-ready #wb-finance-modal-v2 #fin2-summary-grid > .finx-card:not(:nth-child(3)) .finx-cardin > div:first-child {
  color:#586b83!important;font-size:12px!important;font-weight:700!important;
}
html body.fc-ready #wb-finance-modal-v2 #fin2-summary-grid > .finx-card:not(:nth-child(3)) [id^="fin2-kpi"] {
  color:#15253f!important;font-size:clamp(20px,2.3vw,30px)!important;letter-spacing:-.03em;
}
html body.fc-ready #wb-finance-modal-v2 #fin2-summary-metrics {
  grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;margin-bottom:13px!important;
}
html body.fc-ready #wb-finance-modal-v2 #fin2-summary-metrics .finx-card {
  min-width:0!important;margin:0!important;background:#e6efff!important;
}
html body.fc-ready #wb-finance-modal-v2 #fin2-summary-metrics .finx-card:nth-child(3n+2) {background:#e2f6ee!important;}
html body.fc-ready #wb-finance-modal-v2 #fin2-summary-metrics .finx-card:nth-child(3n) {background:#fff0df!important;}
html body.fc-ready #wb-finance-modal-v2 #fin2-summary-metrics .finx-card:nth-child(5) {background:#eee5ff!important;}
html body.fc-ready #wb-finance-modal-v2 #fin2-summary-metrics .finx-cardin {padding:13px 15px!important;}
html body.fc-ready #wb-finance-modal-v2 #fin2-summary-metrics .finx-cardin > div:first-child {
  color:#596b84!important;font-size:12px!important;font-weight:650!important;
}
html body.fc-ready #wb-finance-modal-v2 #fin2-summary-metrics [id^="fin2-metric"] {
  color:#182a43!important;font-size:clamp(17px,1.8vw,23px)!important;overflow-wrap:anywhere;
}
html body.fc-ready #wb-finance-modal-v2 #fin2-summary-bottom {gap:12px!important;}
html body.fc-ready #wb-finance-modal-v2 :is(.fin2-summary-range,.btn:not(.fin2-tab):not(.primary)) {
  background:#fff!important;color:#365c8b!important;border:1px solid var(--fs-border)!important;
  border-radius:10px!important;padding:8px 12px!important;box-shadow:none!important;
}
html body.fc-ready #wb-finance-modal-v2 .fin2-summary-range.active {
  background:#e5efff!important;border-color:#b0c9f5!important;color:#2b5bb6!important;
}
html body.fc-ready #wb-finance-modal-v2 :is(input[type="text"],input[type="number"],input[type="date"],select,textarea) {
  background:#f4f7fd!important;border:1px solid #d8e3f2!important;
  border-radius:10px!important;color:#203751!important;padding:9px 10px!important;box-shadow:none!important;
}
/* Other three panels: navy heading using original descriptive text, no new data. */
html body.fc-ready #wb-finance-modal-v2 :is([data-fin2-panel="products"],[data-fin2-panel="retentions"],[data-fin2-panel="payouts"]) > div:first-child {
  background:linear-gradient(115deg,#19365f,#1b4772)!important;border:1px solid #31527a;
  border-radius:16px!important;padding:18px 21px!important;margin:0 0 13px!important;
}
html body.fc-ready #wb-finance-modal-v2 :is([data-fin2-panel="products"],[data-fin2-panel="retentions"],[data-fin2-panel="payouts"]) > div:first-child p {
  color:#d7e6f9!important;font-size:12px!important;line-height:1.5!important;
}
html body.fc-ready #wb-finance-modal-v2 :is([data-fin2-panel="products"],[data-fin2-panel="retentions"],[data-fin2-panel="payouts"]) > div:first-child p::before {
  display:block;color:#fff;font-size:20px;font-weight:800;letter-spacing:-.02em;margin-bottom:7px;
}
html body.fc-ready #wb-finance-modal-v2 [data-fin2-panel="products"] > div:first-child p::before {content:"Финансы по товарам";}
html body.fc-ready #wb-finance-modal-v2 [data-fin2-panel="retentions"] > div:first-child p::before {content:"Удержания Wildberries";}
html body.fc-ready #wb-finance-modal-v2 [data-fin2-panel="payouts"] > div:first-child p::before {content:"Выплаты и перечисления";}
html body.fc-ready #wb-finance-modal-v2 :is(#fin2-products-filters,#fin2-retentions-filters,#fin2-payouts-filters) {
  background:#fff!important;border:1px solid var(--fs-border)!important;
  border-radius:16px!important;padding:15px 17px!important;
  box-shadow:0 3px 12px rgba(22,48,81,.06)!important;margin-bottom:12px!important;
}
html body.fc-ready #wb-finance-modal-v2 :is(#fin2-products-filters,#fin2-retentions-filters,#fin2-payouts-filters) label {
  padding:7px 10px;border-radius:8px;background:#eaf2ff;color:#3c5c7e!important;
}
html body.fc-ready #wb-finance-modal-v2 :is(#fin2-products-filters,#fin2-retentions-filters,#fin2-payouts-filters) label:nth-child(2) {background:#fff0e9;}
html body.fc-ready #wb-finance-modal-v2 :is(#fin2-products-filters,#fin2-retentions-filters,#fin2-payouts-filters) label:nth-child(3) {background:#e6f4ea;}
html body.fc-ready #wb-finance-modal-v2 input[type="checkbox"] {accent-color:var(--fs-blue);}
html body.fc-ready #wb-finance-modal-v2 :is(#fin2-products-box,#fin2-retentions-box,#fin2-payouts-box) {
  background:#fff!important;border:1px solid var(--fs-border)!important;
  border-radius:16px!important;padding:10px!important;
  box-shadow:0 3px 12px rgba(22,48,81,.06)!important;min-width:0;
}
html body.fc-ready #wb-finance-modal-v2 :is(#fin2-products-box,#fin2-retentions-box,#fin2-payouts-box) > div:first-child {
  overflow-x:auto!important;overflow-y:auto!important;max-height:58vh;
  border:0!important;border-radius:10px!important;background:#fff!important;
}
html body.fc-ready #wb-finance-modal-v2 :is(#fin2-products-box,#fin2-retentions-box,#fin2-payouts-box) table {
  background:#fff!important;color:#21354c!important;border-collapse:separate!important;border-spacing:0!important;
}
html body.fc-ready #wb-finance-modal-v2 :is(#fin2-products-box,#fin2-retentions-box,#fin2-payouts-box) th {
  background:#f2f6fd!important;color:#50657d!important;
  font-size:12px!important;font-weight:750!important;padding:11px 12px!important;
  border-bottom:1px solid var(--fs-border)!important;position:sticky;top:0;z-index:1;
}
html body.fc-ready #wb-finance-modal-v2 :is(#fin2-products-box,#fin2-retentions-box,#fin2-payouts-box) td {
  color:#21344d!important;font-size:12px!important;padding:11px 12px!important;
  border-bottom:1px solid #e7edf6!important;
}
html body.fc-ready #wb-finance-modal-v2 :is(#fin2-products-box,#fin2-retentions-box,#fin2-payouts-box) tbody tr:hover td {background:#f5f8ff!important;}
html body.fc-ready #wb-finance-modal-v2 :is(#fin2-retentions-topline,#fin2-payouts-topline) {
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important;
  margin-bottom:13px!important;
}
html body.fc-ready #wb-finance-modal-v2 #fin2-payouts-topline {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
html body.fc-ready #wb-finance-modal-v2 :is(#fin2-retentions-topline,#fin2-payouts-topline) > div {
  display:flex;flex-direction:column;gap:12px;min-width:0;min-height:92px;
  padding:15px 17px;border:1px solid #d7e4fa;border-radius:15px;background:#e2edff;
}
html body.fc-ready #wb-finance-modal-v2 :is(#fin2-retentions-topline,#fin2-payouts-topline) > div:nth-child(2) {background:#e1f6ec;border-color:#cce9dc;}
html body.fc-ready #wb-finance-modal-v2 #fin2-retentions-topline > div:nth-child(3) {background:#fff0de;border-color:#f5e3c7;}
html body.fc-ready #wb-finance-modal-v2 :is(#fin2-retentions-topline,#fin2-payouts-topline) strong {color:#4f6481!important;font-size:12px!important;}
html body.fc-ready #wb-finance-modal-v2 :is(#fin2-retentions-topline,#fin2-payouts-topline) span {
  color:#15263d!important;font-size:clamp(19px,2.4vw,27px);font-weight:800;
}
html body.fc-ready #wb-finance-modal-v2 :is(button,input,select,textarea):focus-visible {outline:2px solid var(--fs-blue)!important;outline-offset:2px!important;}
@media(max-width:950px) {
  html body.fc-ready #wb-finance-modal-v2 #fin2-summary-metrics {grid-template-columns:repeat(3,minmax(0,1fr))!important;}
}
@media(max-width:760px) {
  html body.fc-ready #wb-finance-modal-v2 .modal-body {padding:12px 13px!important;}
  html body.fc-ready #wb-finance-modal-v2 .modal-header {padding:15px 16px!important;}
  html body.fc-ready #wb-finance-modal-v2 .btn.fin2-tab {font-size:11px!important;padding:7px 4px!important;}
  html body.fc-ready #wb-finance-modal-v2 #fin2-summary-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  html body.fc-ready #wb-finance-modal-v2 #fin2-summary-metrics {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  html body.fc-ready #wb-finance-modal-v2 #fin2-summary-bottom {grid-template-columns:1fr!important;}
  html body.fc-ready #wb-finance-modal-v2 :is(#fin2-retentions-topline,#fin2-payouts-topline) {grid-template-columns:1fr!important;}
}
