/* SIPRONE v0.54 sidebar + webkit text-fill guard
   Scope: layout-safe. Does not move section content or change form flows. */
:root{
  --siprone-v054-dark-title:#ffffff;
  --siprone-v054-dark-subtitle:#dbe8f6;
  --siprone-v054-dark-label:#ff9d1f;
  --siprone-v054-light-title:#071a33;
  --siprone-v054-light-text:#26415f;
  --siprone-v054-light-muted:#64748b;
  --siprone-v054-button-text:#071a33;
}

/* Sidebar must remain fixed and must not scroll with the page. */
@media (min-width:901px){
  html body .command-shell{
    display:block!important;
    min-height:100vh!important;
    background:var(--bg,#f5f7fb)!important;
  }
  html body aside.command-sidebar{
    position:fixed!important;
    top:0!important;
    left:0!important;
    bottom:0!important;
    width:300px!important;
    height:100vh!important;
    max-height:100vh!important;
    overflow:hidden!important;
    z-index:1000!important;
    display:flex!important;
    flex-direction:column!important;
    padding:22px 20px!important;
  }
  html body .command-sidebar .brand-block{
    flex:0 0 auto!important;
    margin-bottom:16px!important;
  }
  html body .command-sidebar .command-nav{
    flex:0 1 auto!important;
    display:grid!important;
    gap:5px!important;
    margin-top:10px!important;
  }
  html body .command-sidebar .command-nav button,
  html body .command-sidebar .command-nav a{
    min-height:32px!important;
    padding:8px 11px!important;
    font-size:13.25px!important;
    line-height:1.16!important;
    letter-spacing:.01em!important;
  }
  html body .command-sidebar .realtime-sidebar{
    flex:0 0 auto!important;
    margin:22px 0 0 0!important;
  }
  html body main.command-main{
    margin-left:300px!important;
    width:calc(100% - 300px)!important;
    min-height:100vh!important;
    overflow:visible!important;
  }
}

@media (max-width:900px){
  html body aside.command-sidebar{position:static!important;width:auto!important;height:auto!important;overflow:visible!important;}
  html body main.command-main{margin-left:0!important;width:100%!important;}
}

/* Canonical dark command blocks: force the same text contract as the CEO/SIPRONE Command Center header.
   The key fix is explicit -webkit-text-fill-color on descendants, because inherited text-fill was overriding color. */
html body .command-main :is(
  .command-header,
  .dashboard-hero,
  .section-title,
  .reports-hero,
  .report-preview > .section-title,
  .branding-hero,
  .branding-hero > .section-title,
  .payment-hero,
  .authority-hero,
  .sop-panel > .section-title,
  .documents-layout > .section-title,
  .update-center > .section-title,
  .security-center > .section-title,
  .audit-center > .section-title,
  .partner-command > .section-title,
  .partner-hero,
  .pipeline-layout .section-title,
  .integration-layout .panel > .section-title,
  .panel.compact > .section-title
){
  color:var(--siprone-v054-dark-title)!important;
  -webkit-text-fill-color:var(--siprone-v054-dark-title)!important;
}
html body .command-main :is(
  .command-header,
  .dashboard-hero,
  .section-title,
  .reports-hero,
  .report-preview > .section-title,
  .branding-hero,
  .branding-hero > .section-title,
  .payment-hero,
  .authority-hero,
  .sop-panel > .section-title,
  .documents-layout > .section-title,
  .update-center > .section-title,
  .security-center > .section-title,
  .audit-center > .section-title,
  .partner-command > .section-title,
  .partner-hero,
  .pipeline-layout .section-title,
  .integration-layout .panel > .section-title,
  .panel.compact > .section-title
) :is(h1,h2,h3,h4,h5,h6,strong,b,.title,.heading){
  color:var(--siprone-v054-dark-title)!important;
  -webkit-text-fill-color:var(--siprone-v054-dark-title)!important;
  opacity:1!important;
  text-shadow:none!important;
}
html body .command-main :is(
  .command-header,
  .dashboard-hero,
  .section-title,
  .reports-hero,
  .report-preview > .section-title,
  .branding-hero,
  .branding-hero > .section-title,
  .payment-hero,
  .authority-hero,
  .sop-panel > .section-title,
  .documents-layout > .section-title,
  .update-center > .section-title,
  .security-center > .section-title,
  .audit-center > .section-title,
  .partner-command > .section-title,
  .partner-hero,
  .pipeline-layout .section-title,
  .integration-layout .panel > .section-title,
  .panel.compact > .section-title
) :is(p,small,em,span:not(.eyebrow):not(.field-label):not(.status-chip):not(.pulse-dot):not(.dot):not(.brand-mark):not(.brand-preview-mark)){
  color:var(--siprone-v054-dark-subtitle)!important;
  -webkit-text-fill-color:var(--siprone-v054-dark-subtitle)!important;
  opacity:1!important;
  text-shadow:none!important;
}
html body .command-main :is(
  .command-header,
  .dashboard-hero,
  .section-title,
  .reports-hero,
  .report-preview > .section-title,
  .branding-hero,
  .branding-hero > .section-title,
  .payment-hero,
  .authority-hero,
  .sop-panel > .section-title,
  .documents-layout > .section-title,
  .update-center > .section-title,
  .security-center > .section-title,
  .audit-center > .section-title,
  .partner-command > .section-title,
  .partner-hero,
  .pipeline-layout .section-title,
  .integration-layout .panel > .section-title,
  .panel.compact > .section-title
) .eyebrow{
  color:var(--siprone-v054-dark-label)!important;
  -webkit-text-fill-color:var(--siprone-v054-dark-label)!important;
  opacity:1!important;
}

/* Buttons/icons inside dark blocks stay readable and do not inherit white text-fill accidentally. */
html body .command-main :is(.section-title,.command-header,.dashboard-hero,.reports-hero,.payment-hero,.branding-hero) :is(button,.secondary,.ghost,.tiny),
html body .command-main :is(.section-title,.command-header,.dashboard-hero,.reports-hero,.payment-hero,.branding-hero) :is(button,.secondary,.ghost,.tiny) *{
  color:var(--siprone-v054-button-text)!important;
  -webkit-text-fill-color:var(--siprone-v054-button-text)!important;
  stroke:currentColor!important;
}

/* White/empty states must be fully reset so webkit text-fill inheritance cannot make text disappear. */
html body .command-main :is(
  .empty-state,
  .metric,
  .kpi-metric,
  .report-summary,
  .document-card,
  .document-mini,
  .lead-card,
  .partner-card,
  .timeline-item,
  .requirement,
  .form-section,
  .nested-panel,
  .customer360-panel,
  .finance-disclaimer,
  .disclaimer,
  .table-scroll,
  .table-wrap,
  .data-table,
  .asset-upload,
  .color-input,
  .type-input,
  .inline-help,
  .report-list .report-item:not(.active)
){
  color:var(--siprone-v054-light-text)!important;
  -webkit-text-fill-color:initial!important;
}
html body .command-main :is(
  .empty-state,
  .metric,
  .kpi-metric,
  .document-card,
  .document-mini,
  .lead-card,
  .partner-card,
  .timeline-item,
  .requirement,
  .form-section,
  .nested-panel,
  .customer360-panel,
  .finance-disclaimer,
  .disclaimer,
  .asset-upload,
  .color-input,
  .type-input,
  .inline-help,
  .report-list .report-item:not(.active)
) :is(h1,h2,h3,h4,h5,h6,strong,b){
  color:var(--siprone-v054-light-title)!important;
  -webkit-text-fill-color:var(--siprone-v054-light-title)!important;
  opacity:1!important;
}
html body .command-main :is(
  .empty-state,
  .metric,
  .kpi-metric,
  .document-card,
  .document-mini,
  .lead-card,
  .partner-card,
  .timeline-item,
  .requirement,
  .form-section,
  .nested-panel,
  .customer360-panel,
  .finance-disclaimer,
  .disclaimer,
  .asset-upload,
  .color-input,
  .type-input,
  .inline-help,
  .report-list .report-item:not(.active)
) :is(p,small,em,span:not(.eyebrow):not(.field-label):not(.status-chip):not(.pulse-dot):not(.dot)){
  color:var(--siprone-v054-light-muted)!important;
  -webkit-text-fill-color:var(--siprone-v054-light-muted)!important;
  opacity:1!important;
}

/* Report Catalog active state, with even higher specificity than generic light card rules. */
html body .command-main .report-list button.report-item.active,
html body .command-main button.report-item.active,
html body .command-main .preview-report-list button.report-item.active{
  background:linear-gradient(135deg,var(--siprone-dark-start,#071a33),var(--siprone-dark-end,#1b3a5c))!important;
  border-color:var(--button-brand,#d4a24c)!important;
  color:var(--siprone-v054-dark-title)!important;
  -webkit-text-fill-color:initial!important;
}
html body .command-main .report-list button.report-item.active :is(strong,b,h1,h2,h3,h4,h5,h6),
html body .command-main button.report-item.active :is(strong,b,h1,h2,h3,h4,h5,h6),
html body .command-main .preview-report-list button.report-item.active :is(strong,b,h1,h2,h3,h4,h5,h6){
  color:var(--siprone-v054-dark-title)!important;
  -webkit-text-fill-color:var(--siprone-v054-dark-title)!important;
  opacity:1!important;
}
html body .command-main .report-list button.report-item.active :is(span,p,small,em),
html body .command-main button.report-item.active :is(span,p,small,em),
html body .command-main .preview-report-list button.report-item.active :is(span,p,small,em){
  color:var(--siprone-v054-dark-subtitle)!important;
  -webkit-text-fill-color:var(--siprone-v054-dark-subtitle)!important;
  opacity:1!important;
}
