/* PressFly 3.5.88 — unified dark theme, loaded last to prevent light component leakage */
:root {
  --pf-dark-page:#050b18;
  --pf-dark-panel:#0b1424;
  --pf-dark-panel-2:#101c30;
  --pf-dark-panel-3:#15233a;
  --pf-dark-input:#081322;
  --pf-dark-border:#273952;
  --pf-dark-border-soft:#1c2c43;
  --pf-dark-text:#eef5ff;
  --pf-dark-muted:#aebbd0;
  --pf-dark-accent:#3b82f6;
  --pf-dark-accent-soft:#142d55;
}

html.dark-mode-site,
html.dark-mode,
html[data-theme="dark"] { color-scheme:dark; }

html.dark-mode-site body,
html.dark-mode body,
html[data-theme="dark"] body {
  background:var(--pf-dark-page)!important;
  color:var(--pf-dark-text)!important;
}

/* Admin shell */
html.dark-mode-site body.pf-admin-flat .content-wrapper,
html.dark-mode body.pf-admin-flat .content-wrapper,
html[data-theme="dark"] body.pf-admin-flat .content-wrapper,
html.dark-mode-site body.pf-admin-flat .content,
html.dark-mode body.pf-admin-flat .content,
html[data-theme="dark"] body.pf-admin-flat .content,
html.dark-mode-site body.pf-admin-flat .content-header,
html.dark-mode body.pf-admin-flat .content-header,
html[data-theme="dark"] body.pf-admin-flat .content-header {
  background:var(--pf-dark-page)!important;
  color:var(--pf-dark-text)!important;
}

/* Settings: exact selectors from the light component stylesheet */
html.dark-mode-site body.pf-admin-flat .pf-settings-tabs-card,
html.dark-mode body.pf-admin-flat .pf-settings-tabs-card,
html[data-theme="dark"] body.pf-admin-flat .pf-settings-tabs-card,
html.dark-mode-site body.pf-admin-flat .pf-settings-tabs-card .card-header,
html.dark-mode body.pf-admin-flat .pf-settings-tabs-card .card-header,
html[data-theme="dark"] body.pf-admin-flat .pf-settings-tabs-card .card-header,
html.dark-mode-site body.pf-admin-flat .pf-settings-content-card,
html.dark-mode body.pf-admin-flat .pf-settings-content-card,
html[data-theme="dark"] body.pf-admin-flat .pf-settings-content-card,
html.dark-mode-site body.pf-admin-flat .pf-settings-module-card,
html.dark-mode body.pf-admin-flat .pf-settings-module-card,
html[data-theme="dark"] body.pf-admin-flat .pf-settings-module-card,
html.dark-mode-site body.pf-admin-flat .pf-settings-health-card,
html.dark-mode body.pf-admin-flat .pf-settings-health-card,
html[data-theme="dark"] body.pf-admin-flat .pf-settings-health-card,
html.dark-mode-site body.pf-admin-flat .pf-settings-summary-card,
html.dark-mode body.pf-admin-flat .pf-settings-summary-card,
html[data-theme="dark"] body.pf-admin-flat .pf-settings-summary-card,
html.dark-mode-site body.pf-admin-flat .pf-field-card,
html.dark-mode body.pf-admin-flat .pf-field-card,
html[data-theme="dark"] body.pf-admin-flat .pf-field-card,
html.dark-mode-site body.pf-admin-flat .pf-category-choice,
html.dark-mode body.pf-admin-flat .pf-category-choice,
html[data-theme="dark"] body.pf-admin-flat .pf-category-choice,
html.dark-mode-site body.pf-admin-flat .pf-settings-content-card .tab-pane > .form-group.row,
html.dark-mode body.pf-admin-flat .pf-settings-content-card .tab-pane > .form-group.row,
html[data-theme="dark"] body.pf-admin-flat .pf-settings-content-card .tab-pane > .form-group.row,
html.dark-mode-site body.pf-admin-flat #form-settings .tab-pane > .form-group.row,
html.dark-mode body.pf-admin-flat #form-settings .tab-pane > .form-group.row,
html[data-theme="dark"] body.pf-admin-flat #form-settings .tab-pane > .form-group.row {
  background:var(--pf-dark-panel)!important;
  border-color:var(--pf-dark-border)!important;
  color:var(--pf-dark-text)!important;
  box-shadow:0 10px 28px rgba(0,0,0,.22)!important;
}

html.dark-mode-site body.pf-admin-flat .pf-settings-content-card .tab-pane > .form-group.row:hover,
html.dark-mode body.pf-admin-flat .pf-settings-content-card .tab-pane > .form-group.row:hover,
html[data-theme="dark"] body.pf-admin-flat .pf-settings-content-card .tab-pane > .form-group.row:hover {
  border-color:#3f5b7d!important;
  box-shadow:0 12px 30px rgba(0,0,0,.3)!important;
}

html.dark-mode-site body.pf-admin-flat .pf-settings-content-card .form-group.row > .col-sm-2,
html.dark-mode body.pf-admin-flat .pf-settings-content-card .form-group.row > .col-sm-2,
html[data-theme="dark"] body.pf-admin-flat .pf-settings-content-card .form-group.row > .col-sm-2,
html.dark-mode-site body.pf-admin-flat #form-settings label,
html.dark-mode body.pf-admin-flat #form-settings label,
html[data-theme="dark"] body.pf-admin-flat #form-settings label {
  color:var(--pf-dark-text)!important;
}

html.dark-mode-site body.pf-admin-flat .pf-settings-search input,
html.dark-mode body.pf-admin-flat .pf-settings-search input,
html[data-theme="dark"] body.pf-admin-flat .pf-settings-search input,
html.dark-mode-site body.pf-admin-flat #form-settings .form-control,
html.dark-mode body.pf-admin-flat #form-settings .form-control,
html[data-theme="dark"] body.pf-admin-flat #form-settings .form-control,
html.dark-mode-site body.pf-admin-flat #form-settings .custom-select,
html.dark-mode body.pf-admin-flat #form-settings .custom-select,
html[data-theme="dark"] body.pf-admin-flat #form-settings .custom-select {
  background-color:var(--pf-dark-input)!important;
  border-color:#39506f!important;
  color:var(--pf-dark-text)!important;
  -webkit-text-fill-color:var(--pf-dark-text)!important;
}

html.dark-mode-site body.pf-admin-flat #form-settings .form-control:focus,
html.dark-mode body.pf-admin-flat #form-settings .form-control:focus,
html[data-theme="dark"] body.pf-admin-flat #form-settings .form-control:focus {
  border-color:#60a5fa!important;
  box-shadow:0 0 0 3px rgba(59,130,246,.18)!important;
}

html.dark-mode-site body.pf-admin-flat #form-settings .form-text,
html.dark-mode body.pf-admin-flat #form-settings .form-text,
html[data-theme="dark"] body.pf-admin-flat #form-settings .form-text,
html.dark-mode-site body.pf-admin-flat #form-settings small,
html.dark-mode body.pf-admin-flat #form-settings small,
html[data-theme="dark"] body.pf-admin-flat #form-settings small {
  color:var(--pf-dark-muted)!important;
}

html.dark-mode-site body.pf-admin-flat .pf-admin-flat-info,
html.dark-mode body.pf-admin-flat .pf-admin-flat-info,
html[data-theme="dark"] body.pf-admin-flat .pf-admin-flat-info,
html.dark-mode-site body.pf-admin-flat .pf-live-score-save-notice,
html.dark-mode body.pf-admin-flat .pf-live-score-save-notice,
html[data-theme="dark"] body.pf-admin-flat .pf-live-score-save-notice {
  background:#0c2a22!important;
  border-color:#1f6a54!important;
  color:#b8f5dd!important;
}

/* Bootstrap/AdminLTE and custom surfaces across admin/member/site */
html.dark-mode-site body .card,
html.dark-mode body .card,
html[data-theme="dark"] body .card,
html.dark-mode-site body .modal-content,
html.dark-mode body .modal-content,
html[data-theme="dark"] body .modal-content,
html.dark-mode-site body .dropdown-menu,
html.dark-mode body .dropdown-menu,
html[data-theme="dark"] body .dropdown-menu,
html.dark-mode-site body .list-group-item,
html.dark-mode body .list-group-item,
html[data-theme="dark"] body .list-group-item,
html.dark-mode-site body .info-box,
html.dark-mode body .info-box,
html[data-theme="dark"] body .info-box,
html.dark-mode-site body .bg-white,
html.dark-mode body .bg-white,
html[data-theme="dark"] body .bg-white,
html.dark-mode-site body .bg-light,
html.dark-mode body .bg-light,
html[data-theme="dark"] body .bg-light {
  background-color:var(--pf-dark-panel)!important;
  border-color:var(--pf-dark-border)!important;
  color:var(--pf-dark-text)!important;
}

html.dark-mode-site body .card-header,
html.dark-mode body .card-header,
html[data-theme="dark"] body .card-header,
html.dark-mode-site body .card-footer,
html.dark-mode body .card-footer,
html[data-theme="dark"] body .card-footer,
html.dark-mode-site body .modal-header,
html.dark-mode body .modal-header,
html[data-theme="dark"] body .modal-header,
html.dark-mode-site body .modal-footer,
html.dark-mode body .modal-footer,
html[data-theme="dark"] body .modal-footer {
  background-color:var(--pf-dark-panel-2)!important;
  border-color:var(--pf-dark-border)!important;
  color:var(--pf-dark-text)!important;
}

html.dark-mode-site body .form-control,
html.dark-mode body .form-control,
html[data-theme="dark"] body .form-control,
html.dark-mode-site body .custom-select,
html.dark-mode body .custom-select,
html[data-theme="dark"] body .custom-select,
html.dark-mode-site body textarea,
html.dark-mode body textarea,
html[data-theme="dark"] body textarea,
html.dark-mode-site body select,
html.dark-mode body select,
html[data-theme="dark"] body select {
  background-color:var(--pf-dark-input)!important;
  border-color:#39506f!important;
  color:var(--pf-dark-text)!important;
}

html.dark-mode-site body .table,
html.dark-mode body .table,
html[data-theme="dark"] body .table { color:var(--pf-dark-text)!important; }
html.dark-mode-site body .table th,
html.dark-mode body .table th,
html[data-theme="dark"] body .table th { background:var(--pf-dark-panel-2)!important;border-color:var(--pf-dark-border)!important;color:var(--pf-dark-text)!important; }
html.dark-mode-site body .table td,
html.dark-mode body .table td,
html[data-theme="dark"] body .table td { background:var(--pf-dark-panel)!important;border-color:var(--pf-dark-border)!important;color:var(--pf-dark-text)!important; }

html.dark-mode-site body .alert-info,
html.dark-mode body .alert-info,
html[data-theme="dark"] body .alert-info {background:#102744!important;border-color:#28568f!important;color:#cfe4ff!important;}
html.dark-mode-site body .alert-success,
html.dark-mode body .alert-success,
html[data-theme="dark"] body .alert-success {background:#0c2a22!important;border-color:#1f6a54!important;color:#b8f5dd!important;}
html.dark-mode-site body .alert-warning,
html.dark-mode body .alert-warning,
html[data-theme="dark"] body .alert-warning {background:#33230a!important;border-color:#7a5516!important;color:#ffe4a3!important;}
html.dark-mode-site body .alert-danger,
html.dark-mode body .alert-danger,
html[data-theme="dark"] body .alert-danger {background:#351319!important;border-color:#7f2936!important;color:#ffcbd2!important;}

/* Text consistency */
html.dark-mode-site body .text-dark,
html.dark-mode body .text-dark,
html[data-theme="dark"] body .text-dark,
html.dark-mode-site body .text-body,
html.dark-mode body .text-body,
html[data-theme="dark"] body .text-body {color:var(--pf-dark-text)!important;}
html.dark-mode-site body .text-muted,
html.dark-mode body .text-muted,
html[data-theme="dark"] body .text-muted {color:var(--pf-dark-muted)!important;}

/* Keep actual media untouched */
html.dark-mode-site img,
html.dark-mode img,
html[data-theme="dark"] img,
html.dark-mode-site video,
html.dark-mode video,
html[data-theme="dark"] video,
html.dark-mode-site iframe,
html.dark-mode iframe,
html[data-theme="dark"] iframe {filter:none!important;}

@media (max-width:767.98px) {
  html.dark-mode-site body.pf-admin-flat .pf-settings-content-card .tab-pane > .form-group.row,
  html.dark-mode body.pf-admin-flat .pf-settings-content-card .tab-pane > .form-group.row,
  html[data-theme="dark"] body.pf-admin-flat .pf-settings-content-card .tab-pane > .form-group.row {
    padding:15px!important;
    border-radius:18px!important;
  }
}
