/* Smart Fin Reports 5.4.9.15 — compact open data-entry headers.
   Scope: data-entry views only. No calculation, storage, table or report rules. */
.sfr-compact-data-header{
  --sfr-cdh-line:#d8e3ee;
  --sfr-cdh-text:#173b63;
  --sfr-cdh-muted:#5f748b;
  --sfr-cdh-soft:#f5f8fc;
  --sfr-cdh-hover:#eef5ff;
  --sfr-cdh-primary:#2563eb;
  position:relative;
  z-index:30;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:end!important;
  gap:18px!important;
  min-height:0!important;
  margin:0 0 10px!important;
  padding:6px 2px 14px!important;
  border:0!important;
  border-bottom:1px solid var(--sfr-cdh-line)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.sfr-compact-data-copy{min-width:0}
.sfr-compact-data-kicker{
  display:block!important;
  width:auto!important;
  margin:0 0 5px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:#3b82f6!important;
  font:800 11px/1.35 Cairo,Tajawal,Arial,sans-serif!important;
  letter-spacing:0!important;
}
.sfr-compact-data-copy h1,.sfr-compact-data-copy h2{
  margin:0!important;
  color:var(--sfr-cdh-text)!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-compact-data-copy p{
  max-width:850px!important;
  margin:5px 0 0!important;
  color:var(--sfr-cdh-muted)!important;
  font-size:13px!important;
  line-height:1.7!important;
}
.sfr-compact-data-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  min-width:0;
  margin:0!important;
}
.sfr-compact-data-actions>button,
.sfr-compact-data-actions>label,
.sfr-compact-data-actions>details>summary{
  min-height:40px;
}
.sfr-compact-data-actions .sfr-compact-mode{
  flex:0 0 auto;
  margin:0!important;
}
.sfr-compact-data-menu{position:relative;flex:0 0 auto}
.sfr-compact-data-menu[open]{z-index:2}
.sfr-compact-data-menu>summary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-width:126px;
  padding:8px 13px;
  border:1px solid #bfd0df;
  border-radius:10px;
  background:transparent;
  color:#264b70;
  font:800 13px/1.2 Cairo,Tajawal,Arial,sans-serif;
  white-space:nowrap;
  cursor:pointer;
  list-style:none;
  user-select:none;
  transition:.18s ease;
}
.sfr-compact-data-menu>summary::-webkit-details-marker{display:none}
.sfr-compact-data-menu>summary::after{content:"⌄";font-family:Inter,Arial,sans-serif;font-size:13px;line-height:1;transition:transform .18s ease}
.sfr-compact-data-menu[open]>summary::after{transform:rotate(180deg)}
.sfr-compact-data-menu>summary:hover,.sfr-compact-data-menu[open]>summary{border-color:#7da5cc;background:var(--sfr-cdh-hover)}
.sfr-compact-data-menu>summary:focus-visible{outline:3px solid rgba(59,130,246,.22);outline-offset:2px}
.sfr-compact-data-menu-panel{
  position:absolute;
  inset-inline-end:0;
  top:calc(100% + 7px);
  z-index:80;
  display:grid;
  gap:4px;
  width:max-content;
  min-width:218px;
  max-width:min(300px,calc(100vw - 28px));
  padding:7px;
  border:1px solid var(--sfr-cdh-line);
  border-radius:12px;
  background:#fff;
  box-shadow:0 18px 45px rgba(15,49,95,.16);
}
.sfr-compact-data-menu-panel button,.sfr-compact-data-menu-panel label{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  width:100%!important;
  min-height:38px!important;
  margin:0!important;
  padding:8px 10px!important;
  border:0!important;
  border-radius:8px!important;
  background:transparent!important;
  color:#264b70!important;
  box-shadow:none!important;
  font:700 13px/1.45 Cairo,Tajawal,Arial,sans-serif!important;
  text-align:start!important;
  cursor:pointer!important;
  transform:none!important;
}
.sfr-compact-data-menu-panel button:hover,.sfr-compact-data-menu-panel label:hover{background:#f1f6fb!important}
.sfr-compact-data-menu-panel .danger,.sfr-compact-data-menu-panel .danger-soft,.sfr-compact-data-menu-panel [class*="danger"]{color:#b91c1c!important}
.sfr-compact-data-context{
  grid-column:1/-1!important;
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:wrap!important;
  align-items:flex-end!important;
  gap:8px!important;
  min-width:0!important;
  margin:-2px 0 0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.sfr-compact-data-context label{display:grid;grid-template-columns:auto minmax(230px,430px);align-items:center;gap:9px;min-width:0;margin:0}
.sfr-compact-data-context label>span{color:var(--sfr-cdh-muted);font-size:12px;font-weight:800;white-space:nowrap}
.sfr-compact-data-context select{min-height:40px!important}
.sfr-compact-data-progress{
  display:grid!important;
  grid-template-columns:auto minmax(120px,1fr) auto!important;
  align-items:center!important;
  gap:10px!important;
  min-height:0!important;
  margin:0 0 10px!important;
  padding:0 2px 8px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.sfr-compact-data-progress>div{display:contents!important}
.sfr-compact-data-progress>div>span{grid-column:1;color:var(--sfr-cdh-muted)!important;font-size:11.5px!important;font-weight:800!important;white-space:nowrap}
.sfr-compact-data-progress>i{grid-column:2;grid-row:1;display:block!important;width:100%!important;height:5px!important;margin:0!important;border-radius:999px!important;background:#dce7f1!important;overflow:hidden!important}
.sfr-compact-data-progress>div>b{grid-column:3;color:#2563eb!important;font:800 12px/1.2 Inter,"JetBrains Mono",monospace!important;white-space:nowrap}
.sfr-compact-data-progress>i>span,.sfr-compact-data-progress>i>b{height:100%!important;border-radius:inherit!important}
.sfr-compact-assistant-progress{
  display:grid!important;
  grid-template-columns:auto minmax(120px,1fr)!important;
  align-items:center!important;
  gap:10px!important;
  margin:0 0 10px!important;
  padding:0 2px 8px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.sfr-compact-assistant-progress>strong{color:var(--sfr-cdh-muted)!important;font-size:11.5px!important;line-height:1.5!important;white-space:nowrap}
.sfr-compact-assistant-progress .sfr-pfa-input-progress-track{width:100%;height:5px;margin:0!important}
.sfr-compact-data-header+.sfr-compact-data-progress,
.sfr-compact-data-header+.sfr-compact-assistant-progress{margin-top:-1px!important}
body.dark-platform .sfr-compact-data-header{
  --sfr-cdh-line:#2b4662;
  --sfr-cdh-text:#e8f1fb;
  --sfr-cdh-muted:#a9bbce;
  --sfr-cdh-soft:#10243a;
  --sfr-cdh-hover:#172d46;
}
body.dark-platform .sfr-compact-data-menu>summary{border-color:#365778;background:transparent;color:#dce9f7}
body.dark-platform .sfr-compact-data-menu-panel{border-color:#31506e;background:#10243a;box-shadow:0 20px 45px rgba(0,0,0,.35)}
body.dark-platform .sfr-compact-data-menu-panel button,body.dark-platform .sfr-compact-data-menu-panel label{color:#dce9f7!important}
body.dark-platform .sfr-compact-data-menu-panel button:hover,body.dark-platform .sfr-compact-data-menu-panel label:hover{background:#19324d!important}
body.dark-platform .sfr-compact-data-progress>i{background:#2a4059!important}
@media(max-width:980px){
  .sfr-compact-data-header{grid-template-columns:1fr!important;align-items:start!important;gap:11px!important}
  .sfr-compact-data-actions{justify-content:flex-start!important}
  .sfr-compact-data-context{margin-top:0}
}
@media(max-width:620px){
  .sfr-compact-data-header{padding:3px 0 12px!important}
  .sfr-compact-data-copy h1,.sfr-compact-data-copy h2{font-size:22px!important}
  .sfr-compact-data-copy p{display:none!important}
  .sfr-compact-data-actions{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important}
  .sfr-compact-data-actions>.sfr-compact-mode{grid-column:1/-1;width:100%!important}
  .sfr-compact-data-actions>.sfr-compact-mode button{flex:1!important}
  .sfr-compact-data-actions>button.primary,.sfr-compact-data-actions>button[class*="primary"],.sfr-compact-data-actions>.sfr-compact-primary{grid-column:1/-1;width:100%!important}
  .sfr-compact-data-menu,.sfr-compact-data-menu>summary{width:100%!important}
  .sfr-compact-data-menu-panel{position:fixed;inset:auto 12px 12px 12px;width:auto;max-width:none}
  .sfr-compact-data-context{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important}
  .sfr-compact-data-context label{grid-column:1/-1;grid-template-columns:1fr;gap:5px;width:100%}
  .sfr-compact-data-context button{width:100%}
  .sfr-compact-data-progress{grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important}
  .sfr-compact-data-progress>div>span{display:none!important}
  .sfr-compact-data-progress>i{grid-column:1!important}
  .sfr-compact-data-progress>div>b{grid-column:2!important}
  .sfr-compact-assistant-progress{grid-template-columns:1fr!important;gap:6px!important}
  .sfr-compact-assistant-progress>strong{white-space:normal}
}
@media print{.sfr-compact-data-menu,.sfr-compact-data-actions{display:none!important}}
