/* Smart Fin Reports 5.4.9.16 — SFR Unified Tool Blueprint.
   Official references: Stress Lab for top view tabs; Receivables/ECL for data workspace and workflow body. */
:root{
  --sfr-tool-tab-h:38px;
  --sfr-tool-tab-radius:10px;
  --sfr-tool-control-h:40px;
  --sfr-tool-header-gap:18px;
  --sfr-tool-stage-radius:12px;
}
/* Reference 1: one top navigation language for every current and future tool. */
#sfr-platform-root #sfrHeaderToolTabs{
  height:44px!important;min-height:44px!important;gap:3px!important;padding:2px!important;
  border:1px solid #dfe7f1!important;border-radius:11px!important;
  background:linear-gradient(180deg,#fbfdff,#f8fafc)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.92)!important;
}
#sfr-platform-root #sfrHeaderToolTabs .sfr-header-view-btn{
  position:relative!important;height:var(--sfr-tool-tab-h)!important;min-height:var(--sfr-tool-tab-h)!important;
  padding:0 8px!important;gap:5px!important;border:1px solid transparent!important;
  border-radius:var(--sfr-tool-tab-radius)!important;background:transparent!important;
  color:#64748b!important;font-size:10.5px!important;font-weight:800!important;line-height:1.2!important;
  box-shadow:none!important;transform:none!important;
}
#sfr-platform-root #sfrHeaderToolTabs .sfr-header-view-btn svg{width:15px!important;height:15px!important;flex-basis:15px!important}
#sfr-platform-root #sfrHeaderToolTabs .sfr-header-view-btn:hover{background:#fff!important;border-color:#dbeafe!important;color:#1d4ed8!important;transform:translateY(-1px)!important;box-shadow:0 4px 12px rgba(37,99,235,.07)!important}
#sfr-platform-root #sfrHeaderToolTabs .sfr-header-view-btn.active{background:#fff!important;border-color:#3b82f6!important;color:#1e40af!important;box-shadow:0 5px 14px rgba(37,99,235,.10)!important}
#sfr-platform-root #sfrHeaderToolTabs .sfr-header-view-btn.active::after{content:""!important;position:absolute!important;inset-inline:16px!important;inset-block-end:-4px!important;height:3px!important;border-radius:999px!important;background:#2563eb!important}
body.dark-platform #sfr-platform-root #sfrHeaderToolTabs{background:linear-gradient(180deg,#101e32,#0d1a2c)!important;border-color:#29405f!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.02)!important}
body.dark-platform #sfr-platform-root #sfrHeaderToolTabs .sfr-header-view-btn{color:#9fb0c7!important}
body.dark-platform #sfr-platform-root #sfrHeaderToolTabs .sfr-header-view-btn:hover{background:#162944!important;border-color:#315f9c!important;color:#bfdbfe!important;box-shadow:0 5px 14px rgba(0,0,0,.20)!important}
body.dark-platform #sfr-platform-root #sfrHeaderToolTabs .sfr-header-view-btn.active{background:#162944!important;border-color:#3b82f6!important;color:#dbeafe!important;box-shadow:0 5px 14px rgba(0,0,0,.22)!important}
body.dark-platform #sfr-platform-root #sfrHeaderToolTabs .sfr-header-view-btn.active::after{background:#60a5fa!important}

/* Reference 2: the ECL open, compact data workspace is the official body standard. */
.sfr-blueprint-data-header,.sfr-compact-data-header{
  display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:end!important;
  gap:var(--sfr-tool-header-gap)!important;min-height:0!important;margin:0 0 10px!important;
  padding:6px 2px 14px!important;border:0!important;border-bottom:1px solid #d9e4ee!important;
  border-radius:0!important;background:transparent!important;box-shadow:none!important;
}
.sfr-blueprint-data-header>.sfr-compact-data-copy,.sfr-blueprint-data-header>div:first-child,.sfr-blueprint-data-header>.fra-page-head>div:first-child{min-width:0!important}
.sfr-blueprint-data-header>.sfr-compact-data-copy>span:first-child,.sfr-blueprint-data-header>div:first-child>span:first-child{
  display:block!important;margin:0 0 5px!important;padding:0!important;border:0!important;background:transparent!important;
  color:#3b82f6!important;font:800 11px/1.35 Cairo,Tajawal,Arial,sans-serif!important;letter-spacing:0!important;
}
.sfr-blueprint-data-header h1,.sfr-blueprint-data-header h2{
  margin:0!important;color:#173b63!important;font-family:Cairo,Tajawal,Arial,sans-serif!important;
  font-size:clamp(22px,2.15vw,30px)!important;font-weight:800!important;line-height:1.35!important;
}
.sfr-blueprint-data-header p{max-width:850px!important;margin:5px 0 0!important;color:#5f748b!important;font-size:13px!important;line-height:1.7!important}
.sfr-blueprint-data-header>.sfr-compact-data-actions,
.sfr-blueprint-data-header>[class*="actions"],
.sfr-blueprint-data-header>button{
  align-self:end!important;
}
.sfr-blueprint-data-header>[class*="actions"]{
  display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;margin:0!important;min-width:0!important;
}
.sfr-blueprint-data-header button,.sfr-blueprint-data-header label[for],.sfr-blueprint-data-header summary{
  min-height:var(--sfr-tool-control-h)!important;border-radius:10px!important;
}
.sfr-blueprint-data-header .sfr-compact-primary{order:20!important}
@media(min-width:921px){
  .sfr-blueprint-data-header>[class*="actions"]>button,
  .sfr-blueprint-data-header>[class*="actions"]>label,
  .sfr-blueprint-data-header>[class*="actions"]>details{
    width:auto!important;max-width:none!important;min-width:0!important;flex:0 0 auto!important;
  }
}
body.dark-platform .sfr-blueprint-data-header,body.dark-platform .sfr-compact-data-header{border-bottom-color:#2b4662!important}
body.dark-platform .sfr-blueprint-data-header h1,body.dark-platform .sfr-blueprint-data-header h2{color:#e8f1fb!important}
body.dark-platform .sfr-blueprint-data-header p{color:#a9bbce!important}

/* One completion indicator only: the unified workflow owns progress whenever stages exist. */
.sfr-unified-workflow-source-hidden,
.sfr-compact-data-progress.sfr-unified-workflow-source-hidden,
.sfr-compact-assistant-progress .sfr-unified-workflow-source-hidden,
.sfr-blueprint-legacy-progress-hidden{display:none!important}
.sfr-unified-workflow-shell{margin-top:0!important}
.sfr-blueprint-data-header + .sfr-unified-workflow-shell{margin-top:0!important}

/* Common sizing for sequential workflow cards, regardless of original tool CSS. */
.sfr-unified-workflow-shell .sfr-unified-workflow-steps>button{
  border-radius:var(--sfr-tool-stage-radius)!important;min-height:64px!important;
}

/* Management systems keep non-sequential sub-navigation, but use one shared visual language. */
[data-sfr-blueprint-kind="management"] .sfr-rec-subnav,
[data-sfr-blueprint-kind="management"] [class*="subnav"]{
  display:flex!important;align-items:center!important;gap:6px!important;overflow-x:auto!important;padding:4px!important;
  border:1px solid #dce6ef!important;border-radius:12px!important;background:#f7fafc!important;scrollbar-width:none!important;
}
[data-sfr-blueprint-kind="management"] [class*="subnav"]>button{
  min-height:38px!important;padding:0 12px!important;border:1px solid transparent!important;border-radius:9px!important;
  background:transparent!important;color:#64748b!important;font:800 12px/1.2 Cairo,Tajawal,Arial,sans-serif!important;white-space:nowrap!important;
}
[data-sfr-blueprint-kind="management"] [class*="subnav"]>button.is-active{
  border-color:#3b82f6!important;background:#fff!important;color:#1e40af!important;box-shadow:0 4px 12px rgba(37,99,235,.08)!important;
}
body.dark-platform [data-sfr-blueprint-kind="management"] [class*="subnav"]{border-color:#2a4059!important;background:#0f1d2e!important}
body.dark-platform [data-sfr-blueprint-kind="management"] [class*="subnav"]>button{color:#a9bbce!important}
body.dark-platform [data-sfr-blueprint-kind="management"] [class*="subnav"]>button.is-active{border-color:#3b82f6!important;background:#162944!important;color:#dbeafe!important}

@media(max-width:1180px) and (min-width:921px){
  #sfr-platform-root #sfrHeaderToolTabs .sfr-header-view-btn{font-size:9.4px!important;padding-inline:6px!important}
}
@media(max-width:920px){
  #sfr-platform-root #sfrHeaderToolTabs{height:46px!important;justify-content:flex-start!important;padding:3px 2px!important;border-width:1px 0 0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
  #sfr-platform-root #sfrHeaderToolTabs .sfr-header-view-btn{height:38px!important;flex:0 0 auto!important;padding-inline:10px!important;font-size:10px!important}
  .sfr-blueprint-data-header,.sfr-compact-data-header{grid-template-columns:1fr!important;align-items:start!important;gap:11px!important}
  .sfr-blueprint-data-header>[class*="actions"]{justify-content:flex-start!important}
}
@media(max-width:620px){
  .sfr-blueprint-data-header,.sfr-compact-data-header{padding:3px 0 12px!important}
  .sfr-blueprint-data-header h1,.sfr-blueprint-data-header h2{font-size:22px!important}
  .sfr-blueprint-data-header p{display:none!important}
  .sfr-blueprint-data-header>[class*="actions"]{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important}
  .sfr-blueprint-data-header>[class*="actions"]>.sfr-compact-mode{grid-column:1/-1!important;width:100%!important}
  .sfr-blueprint-data-header>[class*="actions"]>.sfr-compact-primary{grid-column:1/-1!important;width:100%!important}
}
@media print{#sfrHeaderToolTabs,.sfr-blueprint-data-header>[class*="actions"]{display:none!important}}
