/* SIPRONE v0.55 light-card text-fill guard
   Scope: visual contract only. This file does not reorder sections, alter forms, or change workflows. */
:root{
  --siprone-v055-dark-title:#ffffff;
  --siprone-v055-dark-subtitle:#dbe8f6;
  --siprone-v055-dark-label:#ff9d1f;
  --siprone-v055-light-title:#071a33;
  --siprone-v055-light-text:#26415f;
  --siprone-v055-light-muted:#64748b;
  --siprone-v055-metric-label:#123f68;
  --siprone-v055-metric-value:#071a33;
  --siprone-v055-metric-note:#64748b;
}

/* Global text-fill baseline: make WebKit use the actual computed color unless a more specific rule below overrides it. */
html body #root .command-shell,
html body #root .command-shell *{
  -webkit-text-fill-color:currentColor!important;
}

/* Keep the sidebar fixed on desktop. It must not scroll with the page. */
@media (min-width:901px){
  html body #root .command-shell{
    display:block!important;
    min-height:100vh!important;
    background:var(--bg,#f5f7fb)!important;
  }
  html body #root 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 #root aside.command-sidebar .command-nav{
    flex:0 1 auto!important;
    overflow:visible!important;
    display:grid!important;
    gap:5px!important;
    margin-top:10px!important;
  }
  html body #root aside.command-sidebar .command-nav button,
  html body #root aside.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 #root aside.command-sidebar .realtime-sidebar{
    flex:0 0 auto!important;
    margin-top:24px!important;
  }
  html body #root 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 #root aside.command-sidebar{position:static!important;width:auto!important;height:auto!important;overflow:visible!important;}
  html body #root main.command-main{margin-left:0!important;width:100%!important;}
}

/* Dark command surfaces: use the same contract as the main SIPRONE Command Center header. */
html body #root .command-main :is(
  .command-header,
  .dashboard-hero,
  .section-title,
  .lead-command > .section-title,
  .client-lost-layout .section-title,
  .payment-hero,
  .authority-hero,
  .payment-control-card > .section-title,
  .release-ledger-card > .section-title,
  .finance-cost-form > .section-title,
  .finance-ledger-table > .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 .section-title,
  .reports-hero > .section-title,
  .report-preview > .section-title,
  .branding-hero > .section-title,
  .sop-panel > .section-title
){
  color:var(--siprone-command-title,var(--siprone-v055-dark-title))!important;
  -webkit-text-fill-color:var(--siprone-command-title,var(--siprone-v055-dark-title))!important;
}
html body #root .command-main :is(
  .command-header,
  .dashboard-hero,
  .section-title,
  .lead-command > .section-title,
  .client-lost-layout .section-title,
  .payment-hero,
  .authority-hero,
  .payment-control-card > .section-title,
  .release-ledger-card > .section-title,
  .finance-cost-form > .section-title,
  .finance-ledger-table > .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 .section-title,
  .reports-hero > .section-title,
  .report-preview > .section-title,
  .branding-hero > .section-title,
  .sop-panel > .section-title
) :is(h1,h2,h3,h4,h5,h6,strong,b){
  color:var(--siprone-command-title,var(--siprone-v055-dark-title))!important;
  -webkit-text-fill-color:var(--siprone-command-title,var(--siprone-v055-dark-title))!important;
  opacity:1!important;
  text-shadow:none!important;
}
html body #root .command-main :is(
  .command-header,
  .dashboard-hero,
  .section-title,
  .lead-command > .section-title,
  .client-lost-layout .section-title,
  .payment-hero,
  .authority-hero,
  .payment-control-card > .section-title,
  .release-ledger-card > .section-title,
  .finance-cost-form > .section-title,
  .finance-ledger-table > .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 .section-title,
  .reports-hero > .section-title,
  .report-preview > .section-title,
  .branding-hero > .section-title,
  .sop-panel > .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-command-subtitle,var(--siprone-v055-dark-subtitle))!important;
  -webkit-text-fill-color:var(--siprone-command-subtitle,var(--siprone-v055-dark-subtitle))!important;
  opacity:1!important;
  text-shadow:none!important;
}
html body #root .command-main :is(
  .command-header,
  .dashboard-hero,
  .section-title,
  .lead-command > .section-title,
  .client-lost-layout .section-title,
  .payment-hero,
  .authority-hero,
  .payment-control-card > .section-title,
  .release-ledger-card > .section-title,
  .finance-cost-form > .section-title,
  .finance-ledger-table > .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 .section-title,
  .reports-hero > .section-title,
  .report-preview > .section-title,
  .branding-hero > .section-title,
  .sop-panel > .section-title
) .eyebrow{
  color:var(--siprone-command-label,var(--siprone-v055-dark-label))!important;
  -webkit-text-fill-color:var(--siprone-command-label,var(--siprone-v055-dark-label))!important;
  opacity:1!important;
}

/* Critical fix: light cards nested inside dark panels must not inherit dark-panel text-fill.
   The #root id deliberately outranks previous :not(...) based text-fill rules. */
html body #root .command-main :is(
  .metric,
  .profile-grid .metric,
  .mini-metrics .metric,
  .report-summary .metric,
  .reports-hero .metric,
  .branding-hero .metric,
  .documents-layout .metric,
  .sop-panel .metric,
  .dashboard-hero .metric,
  .authority-hero .metric,
  .payment-hero .metric,
  .finance-hero .metric,
  .finance-ledger-cards .metric,
  .empty-state,
  .document-card,
  .partner-card,
  .lead-card,
  .timeline-item,
  .requirement,
  .form-section,
  .nested-panel,
  .customer360-panel,
  .finance-disclaimer,
  .disclaimer,
  .table-scroll,
  .table-wrap,
  .asset-upload,
  .color-input,
  .type-input,
  .inline-help
){
  background-color:#ffffff!important;
  color:var(--siprone-light-text,var(--siprone-v055-light-text))!important;
  -webkit-text-fill-color:var(--siprone-light-text,var(--siprone-v055-light-text))!important;
  text-shadow:none!important;
  opacity:1!important;
}
html body #root .command-main :is(
  .metric,
  .profile-grid .metric,
  .mini-metrics .metric,
  .report-summary .metric,
  .reports-hero .metric,
  .branding-hero .metric,
  .documents-layout .metric,
  .sop-panel .metric,
  .dashboard-hero .metric,
  .authority-hero .metric,
  .payment-hero .metric,
  .finance-hero .metric,
  .finance-ledger-cards .metric,
  .empty-state,
  .document-card,
  .partner-card,
  .lead-card,
  .timeline-item,
  .requirement,
  .form-section,
  .nested-panel,
  .customer360-panel,
  .finance-disclaimer,
  .disclaimer,
  .asset-upload,
  .color-input,
  .type-input,
  .inline-help
) :is(h1,h2,h3,h4,h5,h6,strong,b){
  color:var(--siprone-light-title,var(--siprone-v055-light-title))!important;
  -webkit-text-fill-color:var(--siprone-light-title,var(--siprone-v055-light-title))!important;
  opacity:1!important;
}
html body #root .command-main :is(
  .metric,
  .profile-grid .metric,
  .mini-metrics .metric,
  .report-summary .metric,
  .reports-hero .metric,
  .branding-hero .metric,
  .documents-layout .metric,
  .sop-panel .metric,
  .dashboard-hero .metric,
  .authority-hero .metric,
  .payment-hero .metric,
  .finance-hero .metric,
  .finance-ledger-cards .metric,
  .empty-state,
  .document-card,
  .partner-card,
  .lead-card,
  .timeline-item,
  .requirement,
  .form-section,
  .nested-panel,
  .customer360-panel,
  .finance-disclaimer,
  .disclaimer,
  .asset-upload,
  .color-input,
  .type-input,
  .inline-help
) :is(p,small,em,span:not(.eyebrow):not(.field-label):not(.status-chip):not(.pulse-dot):not(.dot)){
  color:var(--siprone-light-muted,var(--siprone-v055-light-muted))!important;
  -webkit-text-fill-color:var(--siprone-light-muted,var(--siprone-v055-light-muted))!important;
  opacity:1!important;
}

/* Metric internals: labels, values and notes get their own branding controls. */
html body #root .command-main :is(.metric,.profile-grid .metric,.mini-metrics .metric,.reports-hero .metric,.branding-hero .metric,.documents-layout .metric,.sop-panel .metric) > span,
html body #root .command-main :is(.metric,.profile-grid .metric,.mini-metrics .metric,.reports-hero .metric,.branding-hero .metric,.documents-layout .metric,.sop-panel .metric) span:first-child{
  color:var(--siprone-metric-label,var(--siprone-v055-metric-label))!important;
  -webkit-text-fill-color:var(--siprone-metric-label,var(--siprone-v055-metric-label))!important;
  opacity:1!important;
}
html body #root .command-main :is(.metric,.profile-grid .metric,.mini-metrics .metric,.reports-hero .metric,.branding-hero .metric,.documents-layout .metric,.sop-panel .metric) > strong,
html body #root .command-main :is(.metric,.profile-grid .metric,.mini-metrics .metric,.reports-hero .metric,.branding-hero .metric,.documents-layout .metric,.sop-panel .metric) strong{
  color:var(--siprone-metric-value,var(--siprone-v055-metric-value))!important;
  -webkit-text-fill-color:var(--siprone-metric-value,var(--siprone-v055-metric-value))!important;
  opacity:1!important;
}
html body #root .command-main :is(.metric,.profile-grid .metric,.mini-metrics .metric,.reports-hero .metric,.branding-hero .metric,.documents-layout .metric,.sop-panel .metric) > em,
html body #root .command-main :is(.metric,.profile-grid .metric,.mini-metrics .metric,.reports-hero .metric,.branding-hero .metric,.documents-layout .metric,.sop-panel .metric) :is(em,small,p){
  color:var(--siprone-metric-note,var(--siprone-v055-metric-note))!important;
  -webkit-text-fill-color:var(--siprone-metric-note,var(--siprone-v055-metric-note))!important;
  opacity:1!important;
}

/* Report Catalog states. Selected cards must be dark with white title; unselected cards remain white with dark title. */
html body #root .command-main .report-list button.report-item.active,
html body #root .command-main button.report-item.active,
html body #root .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-report-active-text,var(--siprone-v055-dark-subtitle))!important;
  -webkit-text-fill-color:var(--siprone-report-active-text,var(--siprone-v055-dark-subtitle))!important;
}
html body #root .command-main .report-list button.report-item.active :is(strong,b,h1,h2,h3,h4,h5,h6),
html body #root .command-main button.report-item.active :is(strong,b,h1,h2,h3,h4,h5,h6),
html body #root .command-main .preview-report-list button.report-item.active :is(strong,b,h1,h2,h3,h4,h5,h6){
  color:var(--siprone-report-active-title,var(--siprone-v055-dark-title))!important;
  -webkit-text-fill-color:var(--siprone-report-active-title,var(--siprone-v055-dark-title))!important;
  opacity:1!important;
}
html body #root .command-main .report-list button.report-item.active :is(span,p,small,em),
html body #root .command-main button.report-item.active :is(span,p,small,em),
html body #root .command-main .preview-report-list button.report-item.active :is(span,p,small,em){
  color:var(--siprone-report-active-text,var(--siprone-v055-dark-subtitle))!important;
  -webkit-text-fill-color:var(--siprone-report-active-text,var(--siprone-v055-dark-subtitle))!important;
  opacity:1!important;
}
html body #root .command-main .report-list button.report-item:not(.active),
html body #root .command-main button.report-item:not(.active){
  background:#ffffff!important;
  color:var(--siprone-report-inactive-text,var(--siprone-v055-light-muted))!important;
  -webkit-text-fill-color:var(--siprone-report-inactive-text,var(--siprone-v055-light-muted))!important;
}
html body #root .command-main .report-list button.report-item:not(.active) :is(strong,b,h1,h2,h3,h4,h5,h6),
html body #root .command-main button.report-item:not(.active) :is(strong,b,h1,h2,h3,h4,h5,h6){
  color:var(--siprone-report-inactive-title,var(--siprone-v055-light-title))!important;
  -webkit-text-fill-color:var(--siprone-report-inactive-title,var(--siprone-v055-light-title))!important;
  opacity:1!important;
}
html body #root .command-main .report-list button.report-item:not(.active) :is(span,p,small,em),
html body #root .command-main button.report-item:not(.active) :is(span,p,small,em){
  color:var(--siprone-report-inactive-text,var(--siprone-v055-light-muted))!important;
  -webkit-text-fill-color:var(--siprone-report-inactive-text,var(--siprone-v055-light-muted))!important;
  opacity:1!important;
}
