/* ==========================================================================
   Football Fam Admin — dark theme (ff-admin.css)
   Drop-in override for the Laravel admin at api.footballfam.io/admin.
   Load AFTER coreui.min.css, dataTables.bootstrap4.min.css, select2.min.css,
   bootstrap-datetimepicker.min.css, dropzone.min.css and custom.css.
   Fonts: add to <head>
   <link href="https://fonts.googleapis.com/css2?family=Archivo:wght@800&family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
   Values come from the Figma v3 Design System (FF v3 Tokens).
   ========================================================================== */

:root {
  --ff-primary: #16CA9F;
  --ff-primary-variant: #39FF6A;
  --ff-primary-bg: rgba(22, 202, 159, 0.10);
  --ff-secondary: #D946EF;
  --ff-secondary-bg: rgba(217, 70, 239, 0.10);

  --ff-base: #02070F;
  --ff-elevated: #0E1217;
  --ff-elevated-2: #161B22;
  --ff-elevated-3: #212933;
  --ff-pill: rgba(255, 255, 255, 0.10);
  --ff-input: rgba(255, 255, 255, 0.08);
  --ff-error-bg: rgba(248, 113, 113, 0.10);
  --ff-warning-bg: rgba(222, 161, 47, 0.12);

  --ff-border: rgba(255, 255, 255, 0.08);
  --ff-border-control: rgba(255, 255, 255, 0.40);

  --ff-text: #FFFFFF;
  --ff-text-2: rgba(255, 255, 255, 0.80);
  --ff-text-3: rgba(255, 255, 255, 0.60);
  --ff-text-disabled: rgba(255, 255, 255, 0.15);
  --ff-success: #16CA9F;
  --ff-warning: #DEA12F;
  --ff-error: #F87171;
  --ff-on-primary: #06140D;

  --ff-gradient: linear-gradient(90deg, #16CA9F, #39FF6A);
  --ff-focus: 0 0 0 3px rgba(22, 202, 159, 0.35);
  --ff-overlay: 0 16px 40px rgba(0, 0, 0, 0.5);

  --ff-r-small: 8px;
  --ff-r-control: 12px;
  --ff-r-card: 16px;
  --ff-r-pill: 999px;

  --ff-font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ff-display: Archivo, Inter, system-ui, sans-serif;
}

/* ---------- Base ---------- */
html, body, .c-app, .c-wrapper, .c-body, .c-main {
  background: var(--ff-base);
  color: var(--ff-text-2);
  font-family: var(--ff-font);
  font-size: 14px;
  line-height: 20px;
}
.c-main { padding-top: 32px; }
.c-main > .container-fluid, .c-main .content { padding-left: 40px; padding-right: 40px; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3 { color: var(--ff-text); font-family: var(--ff-font); font-weight: 600; }
h1, .h1, .ffd-head h2 { font-family: var(--ff-display); font-weight: 800; font-size: 32px; line-height: 36px; }
h2, .h2 { font-size: 24px; line-height: 28px; }
h3, .h3, h5 { font-size: 18px; line-height: 20px; }
p, li { color: var(--ff-text-2); }
small, .small, .text-muted, .help-block, .form-text { color: var(--ff-text-3) !important; font-size: 12px; line-height: 16px; }
a { color: var(--ff-primary); }
a:hover { color: var(--ff-primary-variant); text-decoration: none; }
hr { border-color: var(--ff-border); }
::selection { background: rgba(22, 202, 159, 0.35); color: #fff; }
:focus-visible { outline: none; box-shadow: var(--ff-focus); }
code { color: var(--ff-secondary); }

/* ---------- Header ---------- */
.c-header { background: var(--ff-elevated); border-bottom: 1px solid var(--ff-border); min-height: 64px; box-shadow: none; }
.c-header .c-header-brand, .c-header .c-header-nav .c-header-nav-link { color: var(--ff-text); }
.c-header .c-header-toggler { color: var(--ff-text-3); }
.c-header .c-header-toggler-icon { filter: invert(1) opacity(0.7); }
.c-subheader, .breadcrumb { background: transparent; border: 0; color: var(--ff-text-3); }
.breadcrumb-item.active { color: var(--ff-text); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--ff-text-3); }

/* ---------- Sidebar ---------- */
.c-sidebar { background: var(--ff-elevated); border-right: 1px solid var(--ff-border); width: 256px; }
.c-sidebar .c-sidebar-brand { background: var(--ff-elevated); color: var(--ff-text); font-family: var(--ff-display); font-weight: 800; letter-spacing: 0.02em; min-height: 64px; border-bottom: 1px solid var(--ff-border); }
.c-sidebar .c-sidebar-nav { padding: 12px; }
.c-sidebar .c-sidebar-nav-title { color: var(--ff-text-3); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; padding: 16px 12px 8px; }
.c-sidebar .c-sidebar-nav-link,
.c-sidebar .c-sidebar-nav-dropdown-toggle {
  color: var(--ff-text-2); border-radius: var(--ff-r-control); min-height: 44px; padding: 0 12px;
  display: flex; align-items: center; font-weight: 500; font-size: 14px; background: transparent;
}
.c-sidebar .c-sidebar-nav-link .c-sidebar-nav-icon,
.c-sidebar .c-sidebar-nav-dropdown-toggle .c-sidebar-nav-icon { color: var(--ff-text-3); width: 20px; margin-right: 12px; flex: 0 0 20px; font-size: 15px; }
.c-sidebar .c-sidebar-nav-link:hover,
.c-sidebar .c-sidebar-nav-dropdown-toggle:hover { background: rgba(255, 255, 255, 0.06); color: var(--ff-text); }
.c-sidebar .c-sidebar-nav-link:hover .c-sidebar-nav-icon,
.c-sidebar .c-sidebar-nav-dropdown-toggle:hover .c-sidebar-nav-icon { color: var(--ff-text); }
.c-sidebar .c-sidebar-nav-link.c-active,
.c-sidebar .c-active.c-sidebar-nav-dropdown-toggle {
  background: var(--ff-primary-bg); color: var(--ff-primary); box-shadow: inset 0 0 0 1px var(--ff-primary); font-weight: 600;
}
.c-sidebar .c-sidebar-nav-link.c-active .c-sidebar-nav-icon { color: var(--ff-primary); }
.c-sidebar .c-sidebar-nav-dropdown.c-show { background: transparent; }
.c-sidebar .c-sidebar-nav-dropdown.c-show > .c-sidebar-nav-dropdown-toggle { color: var(--ff-text); }
.c-sidebar .c-sidebar-nav-dropdown-items { padding-left: 32px; }
.c-sidebar .c-sidebar-nav-dropdown-items .c-sidebar-nav-link { min-height: 40px; font-size: 14px; }
.c-sidebar .c-sidebar-nav-dropdown-toggle::after { filter: invert(1) opacity(0.6); }
.c-sidebar .c-sidebar-minimizer { background: var(--ff-elevated); border-top: 1px solid var(--ff-border); }

/* Logo (assets/FF Logo.svg → public/img/ff-logo.svg; crest-only copy → ff-logo-mark.svg) */
.ff-logo { display: block; height: 32px; width: auto; }
.c-sidebar .c-sidebar-brand { justify-content: flex-start; padding: 0 20px; }
.c-sidebar .c-sidebar-brand .ff-logo-mark { display: none; height: 32px; width: auto; }
.c-sidebar-minimized .c-sidebar-brand .ff-logo { display: none; }
.c-sidebar-minimized .c-sidebar-brand .ff-logo-mark { display: block; }
.c-sidebar-minimized .c-sidebar-brand { justify-content: center; padding: 0; }
.ff-login-logo { display: block; height: 48px; width: auto; margin-bottom: 24px; }

/* ---------- Cards ---------- */
.card, .ffd-card, .ffd-kpi {
  background: var(--ff-elevated); border: 1px solid var(--ff-border); border-radius: var(--ff-r-card); color: var(--ff-text-2); box-shadow: none;
}
.card-header { background: transparent; border-bottom: 1px solid var(--ff-border); color: var(--ff-text); font-size: 18px; line-height: 20px; font-weight: 600; padding: 20px 24px; }
.card-header:first-child { border-radius: var(--ff-r-card) var(--ff-r-card) 0 0; }
.card-body { padding: 24px; }
.card-footer { background: var(--ff-elevated-2); border-top: 1px solid var(--ff-border); padding: 16px 24px; border-radius: 0 0 var(--ff-r-card) var(--ff-r-card); }

/* ---------- Buttons ---------- */
.btn {
  border-radius: var(--ff-r-pill); font-family: var(--ff-font); font-weight: 600; font-size: 14px; line-height: 20px;
  min-height: 44px; padding: 11px 20px; border: 1px solid transparent; box-shadow: none !important;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, filter 0.15s;
}
.btn:focus-visible, .btn.focus { box-shadow: var(--ff-focus) !important; }
.btn-sm { min-height: 36px; padding: 7px 14px; font-size: 13px; }
.btn-xs { min-height: 32px; padding: 5px 12px; font-size: 12px; line-height: 20px; border-radius: var(--ff-r-pill); }
.btn-lg { min-height: 52px; padding: 15px 28px; font-size: 15px; }

/* Primary = the one main action on a screen (Save, Add X, Log in) */
.btn-primary, .btn-success {
  background: var(--ff-gradient); border-color: transparent; color: var(--ff-on-primary);
}
.btn-primary:hover, .btn-success:hover,
.btn-primary:not(:disabled):not(.disabled):active, .btn-success:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active {
  background: var(--ff-primary-variant); border-color: transparent; color: var(--ff-on-primary);
}
/* Secondary = outline green (Edit, View, Cancel) */
.btn-info, .btn-outline-primary, .btn-outline-success {
  background: transparent; border-color: var(--ff-primary); color: var(--ff-primary);
}
.btn-info:hover, .btn-outline-primary:hover, .btn-outline-success:hover,
.btn-info:not(:disabled):not(.disabled):active {
  background: var(--ff-primary-bg); border-color: var(--ff-primary); color: var(--ff-primary);
}
/* Neutral = toolbars, exports, filters */
.btn-default, .btn-secondary, .btn-light, .btn-dark, .btn-outline-secondary, .btn-outline-light {
  background: var(--ff-elevated-2); border-color: var(--ff-border-control); color: var(--ff-text);
}
.btn-default:hover, .btn-secondary:hover, .btn-light:hover, .btn-dark:hover, .btn-outline-secondary:hover, .btn-outline-light:hover {
  background: var(--ff-elevated-3); border-color: var(--ff-border-control); color: var(--ff-text);
}
/* Destructive */
.btn-danger, .btn-outline-danger { background: var(--ff-error-bg); border-color: transparent; color: var(--ff-error); }
.btn-danger:hover, .btn-outline-danger:hover,
.btn-danger:not(:disabled):not(.disabled):active { background: rgba(248, 113, 113, 0.18); border-color: transparent; color: var(--ff-error); }
.btn-warning { background: var(--ff-warning-bg); border-color: transparent; color: var(--ff-warning); }
.btn-warning:hover { background: rgba(222, 161, 47, 0.2); color: var(--ff-warning); }
/* Text */
.btn-link { color: var(--ff-primary); background: transparent; border-color: transparent; padding-left: 4px; padding-right: 4px; }
.btn-link:hover { color: var(--ff-primary-variant); text-decoration: none; }
/* Disabled */
.btn:disabled, .btn.disabled { opacity: 1; background: var(--ff-elevated-2) !important; border-color: transparent !important; color: var(--ff-text-disabled) !important; cursor: not-allowed; }

/* Segmented period switch (dashboard 7/30/90 days) */
.btn-group > .btn { border-radius: 0; }
.btn-group { background: var(--ff-elevated-2); border-radius: var(--ff-r-pill); padding: 4px; gap: 4px; }
.btn-group > .btn, .btn-group > .btn:not(:first-child), .btn-group > .btn:not(:last-child):not(.dropdown-toggle) { border-radius: var(--ff-r-pill) !important; margin-left: 0; }
.ffd-range .btn { min-width: 72px; min-height: 36px; }
.ffd-range .btn-outline-secondary { background: transparent; border-color: transparent; color: var(--ff-text-2); }
.ffd-range .btn-outline-secondary:hover { background: var(--ff-elevated-3); color: var(--ff-text); }
.ffd-range .btn-primary { background: var(--ff-primary); color: var(--ff-on-primary); }

/* ---------- Forms ---------- */
label, .col-form-label { color: var(--ff-text); font-weight: 600; font-size: 14px; margin-bottom: 8px; }
label.required::after { content: " *"; color: var(--ff-error); }
.form-control, .custom-select, .dataTables_wrapper select, .dataTables_wrapper input {
  background: var(--ff-input); border: 1px solid transparent; border-radius: var(--ff-r-control);
  color: var(--ff-text); font-family: var(--ff-font); font-size: 14px; min-height: 44px; padding: 10px 14px; box-shadow: none;
}
textarea.form-control { min-height: 120px; }
.form-control::placeholder { color: var(--ff-text-3); }
.form-control:focus, .custom-select:focus, .dataTables_wrapper input:focus, .dataTables_wrapper select:focus {
  background: var(--ff-input); border-color: var(--ff-primary); color: var(--ff-text); box-shadow: var(--ff-focus); outline: none;
}
.form-control:disabled, .form-control[readonly] { background: rgba(255, 255, 255, 0.04); color: var(--ff-text-3); }
select.form-control option { background: var(--ff-elevated-2); color: var(--ff-text); }
.form-control.is-invalid, .was-validated .form-control:invalid { border-color: var(--ff-error); background-image: none; }
.invalid-feedback, .text-danger { color: var(--ff-error) !important; font-size: 12px; }
.form-group { margin-bottom: 20px; }
.input-group-text { background: var(--ff-input); border: 0; color: var(--ff-text-3); border-radius: var(--ff-r-control); }
.input-group > .input-group-prepend > .input-group-text { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .input-group-prepend + .form-control { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.form-check-input, input[type="checkbox"], input[type="radio"] { accent-color: var(--ff-primary); width: 18px; height: 18px; }
.form-check-label { color: var(--ff-text-2); font-weight: 400; }
.custom-control-label::before { background: var(--ff-input); border-color: var(--ff-border-control); }
.custom-control-input:checked ~ .custom-control-label::before { background: var(--ff-primary); border-color: var(--ff-primary); }

/* select2 */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  background: var(--ff-input); border: 1px solid transparent; border-radius: var(--ff-r-control); min-height: 44px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--ff-text); line-height: 42px; padding-left: 14px; }
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--ff-text-3); }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; right: 10px; }
.select2-container--default .select2-selection--single .select2-selection__arrow b { border-color: var(--ff-text-3) transparent transparent; }
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--multiple { border-color: var(--ff-primary); box-shadow: var(--ff-focus); }
.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: var(--ff-pill); border: 0; border-radius: var(--ff-r-pill); color: var(--ff-text); padding: 2px 10px; margin-top: 8px;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove { color: var(--ff-text-3); margin-right: 6px; }
.select2-container--default .select2-search--inline .select2-search__field { color: var(--ff-text); }
.select2-dropdown { background: var(--ff-elevated-2); border: 1px solid var(--ff-border); border-radius: var(--ff-r-control); box-shadow: var(--ff-overlay); overflow: hidden; }
.select2-container--default .select2-search--dropdown .select2-search__field { background: var(--ff-input); border: 0; border-radius: var(--ff-r-pill); color: var(--ff-text); padding: 8px 14px; }
.select2-container--default .select2-results__option { color: var(--ff-text-2); padding: 10px 14px; }
.select2-container--default .select2-results__option[aria-selected="true"] { background: var(--ff-primary-bg); color: var(--ff-primary); }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--ff-elevated-3); color: var(--ff-text); }
/* "Select all / Deselect all" chips the generator puts above multi-selects */
.form-group > div > .btn-info.btn-xs, .form-group .select-all, .form-group .deselect-all { min-height: 28px; padding: 3px 10px; margin-bottom: 8px; }

/* datetimepicker */
.bootstrap-datetimepicker-widget.dropdown-menu { background: var(--ff-elevated-2); border: 1px solid var(--ff-border); border-radius: var(--ff-r-control); box-shadow: var(--ff-overlay); color: var(--ff-text); }
.bootstrap-datetimepicker-widget table td.day:hover, .bootstrap-datetimepicker-widget table th:hover, .bootstrap-datetimepicker-widget table td span:hover { background: var(--ff-elevated-3); }
.bootstrap-datetimepicker-widget table td.active, .bootstrap-datetimepicker-widget table td span.active { background: var(--ff-primary); color: var(--ff-on-primary); }
.bootstrap-datetimepicker-widget table td.old, .bootstrap-datetimepicker-widget table td.new { color: var(--ff-text-3); }
.bootstrap-datetimepicker-widget table td.today::before { border-bottom-color: var(--ff-primary); }

/* dropzone */
.dropzone { background: var(--ff-input); border: 1px dashed var(--ff-border-control); border-radius: var(--ff-r-card); color: var(--ff-text-3); min-height: 140px; }
.dropzone:hover, .dropzone.dz-drag-hover { border-color: var(--ff-primary); background: var(--ff-primary-bg); }
.dropzone .dz-preview .dz-image { border-radius: var(--ff-r-control); }

/* CKEditor 5 */
.ck.ck-editor__main > .ck-editor__editable { background: var(--ff-input) !important; color: var(--ff-text); border-color: transparent !important; border-radius: 0 0 var(--ff-r-control) var(--ff-r-control) !important; min-height: 200px; }
.ck.ck-editor__main > .ck-editor__editable.ck-focused { border-color: var(--ff-primary) !important; box-shadow: var(--ff-focus) !important; }
.ck.ck-toolbar { background: var(--ff-elevated-2) !important; border-color: var(--ff-border) !important; border-radius: var(--ff-r-control) var(--ff-r-control) 0 0 !important; }
.ck.ck-button, .ck.ck-button .ck-button__label { color: var(--ff-text-2) !important; }
.ck.ck-button:hover, .ck.ck-button.ck-on { background: var(--ff-elevated-3) !important; color: var(--ff-text) !important; }

/* ---------- Tables (Bootstrap + DataTables) ---------- */
.table { color: var(--ff-text-2); margin-bottom: 0; border-collapse: separate; border-spacing: 0; }
.table thead th, table.dataTable thead th {
  background: var(--ff-elevated-2); color: var(--ff-text-3); font-size: 12px; line-height: 16px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; border: 0; border-bottom: 1px solid var(--ff-border);
  padding: 14px 16px; vertical-align: middle; white-space: nowrap;
}
.table td, .table th, table.dataTable tbody td { border-top: 0; border-bottom: 1px solid var(--ff-border); padding: 12px 16px; vertical-align: middle; }
.table td { color: var(--ff-text-2); }
.table td:first-child + td, .table td strong { color: var(--ff-text); }
.table tbody tr:last-child td { border-bottom: 0; }
.table-bordered, .table-bordered td, .table-bordered th { border-left: 0; border-right: 0; border-top: 0; }
.table-striped tbody tr:nth-of-type(odd) { background: transparent; }
.table-hover tbody tr:hover, table.dataTable tbody tr:hover { background: rgba(255, 255, 255, 0.03); color: var(--ff-text); }
table.dataTable tbody tr.selected, table.dataTable tbody tr.selected:hover { background: var(--ff-primary-bg) !important; }
table.dataTable tbody tr.selected td { color: var(--ff-text); }
table.dataTable tbody td.select-checkbox::before { border: 1px solid var(--ff-border-control); border-radius: 4px; width: 16px; height: 16px; margin-top: -8px; }
table.dataTable tr.selected td.select-checkbox::after { color: var(--ff-primary); text-shadow: none; margin-top: -11px; }
table.dataTable thead .sorting::before, table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::before, table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::before, table.dataTable thead .sorting_desc::after { opacity: 0.25; color: var(--ff-text); }
table.dataTable thead .sorting_asc::before, table.dataTable thead .sorting_desc::after { opacity: 1; color: var(--ff-primary); }
table.dataTable.no-footer { border-bottom: 0; }
.table .btn-xs { min-height: 32px; }
.table td .btn + .btn { margin-left: 4px; }
/* Table container: wrap DataTables in .card > .card-body */
.card > .card-body > .table-responsive, .card .dataTables_wrapper { color: var(--ff-text-3); }
.table-responsive { border: 1px solid var(--ff-border); border-radius: var(--ff-r-control); }
.dataTables_wrapper .row:first-child { align-items: center; margin-bottom: 16px; }
.dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info { color: var(--ff-text-3); font-size: 14px; }
.dataTables_wrapper .dataTables_length label, .dataTables_wrapper .dataTables_filter label { color: var(--ff-text-3); font-weight: 400; }
.dataTables_wrapper .dataTables_length select { min-height: 36px; width: auto; display: inline-block; margin: 0 6px; padding: 6px 28px 6px 12px; }
.dataTables_wrapper .dataTables_filter input { border-radius: var(--ff-r-pill); min-width: 260px; padding-left: 16px; margin-left: 8px; }
.dataTables_wrapper .dt-buttons { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dataTables_wrapper .dt-buttons .btn { min-height: 36px; padding: 7px 14px; font-size: 13px; border-radius: var(--ff-r-pill) !important; }
.dataTables_wrapper .dt-buttons .buttons-select-all, .dataTables_wrapper .dt-buttons .buttons-select-none { background: var(--ff-elevated-2); border-color: var(--ff-border-control); color: var(--ff-text); }
.dataTables_wrapper .dt-buttons .buttons-select-none.disabled { color: var(--ff-text-disabled); }
.dataTables_wrapper .dataTables_processing {
  background: var(--ff-elevated-2); color: var(--ff-text); border: 1px solid var(--ff-border); border-radius: var(--ff-r-control); box-shadow: var(--ff-overlay); padding: 12px 16px; height: auto; margin-top: -24px;
}
div.dt-button-collection { background: var(--ff-elevated-2); border: 1px solid var(--ff-border); border-radius: var(--ff-r-control); box-shadow: var(--ff-overlay); padding: 8px; }
div.dt-button-collection .dt-button { border-radius: var(--ff-r-small) !important; justify-content: flex-start; }
div.dt-button-collection .dt-button.active { background: var(--ff-primary-bg); color: var(--ff-primary); }
div.dt-button-background { background: rgba(2, 7, 15, 0.6); }

/* Pagination */
.pagination { gap: 6px; }
.page-link { background: transparent; border: 1px solid transparent; border-radius: var(--ff-r-control) !important; color: var(--ff-text-2); min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.page-link:hover { background: var(--ff-elevated-3); color: var(--ff-text); border-color: transparent; }
.page-item.active .page-link { background: var(--ff-primary-bg); border-color: var(--ff-primary); color: var(--ff-primary); }
.page-item.disabled .page-link { background: transparent; color: var(--ff-text-disabled); }

/* ---------- Badges / status ---------- */
.badge {
  border-radius: var(--ff-r-pill); font-size: 12px; line-height: 16px; font-weight: 600; padding: 4px 10px; letter-spacing: 0;
  background: var(--ff-pill); color: var(--ff-text);
}
.badge-success { background: var(--ff-primary-bg); color: var(--ff-success); }
.badge-warning { background: var(--ff-warning-bg); color: var(--ff-warning); }
.badge-danger { background: var(--ff-error-bg); color: var(--ff-error); }
.badge-info, .badge-primary, .badge-secondary, .badge-light, .badge-dark { background: var(--ff-pill); color: var(--ff-text); }
.badge-icon { display: inline-flex; align-items: center; gap: 6px; padding-left: 8px; }
.ff-icon { width: 14px; height: 14px; flex: none; }
svg.c-sidebar-nav-icon { width: 20px; height: 20px; }
.badge-ai { background: var(--ff-secondary-bg); color: var(--ff-secondary); text-transform: uppercase; }
.ffd-pill { background: var(--ff-pill); color: var(--ff-text); border-radius: var(--ff-r-pill); }
.ffd-pill.hot { background: var(--ff-error-bg); color: var(--ff-error); }

/* ---------- Alerts / toasts ---------- */
.alert { border: 0; border-radius: var(--ff-r-control); padding: 14px 16px; font-size: 14px; }
.alert-success { background: var(--ff-primary-bg); color: var(--ff-success); }
.alert-warning { background: var(--ff-warning-bg); color: var(--ff-warning); }
.alert-danger { background: var(--ff-error-bg); color: var(--ff-error); }
.alert-info, .alert-primary, .alert-secondary { background: var(--ff-elevated-2); color: var(--ff-text-2); }
.alert .close { color: currentColor; text-shadow: none; opacity: 0.7; }

/* ---------- Overlays ---------- */
.modal-backdrop.show { background: #02070F; opacity: 0.7; }
.modal-content { background: var(--ff-elevated-2); border: 1px solid var(--ff-border); border-radius: var(--ff-r-card); color: var(--ff-text-2); box-shadow: var(--ff-overlay); }
.modal-header, .modal-footer { border-color: var(--ff-border); padding: 20px 24px; }
.modal-title { color: var(--ff-text); font-weight: 600; font-size: 18px; }
.modal-body { padding: 24px; }
.close { color: var(--ff-text-3); text-shadow: none; opacity: 1; }
.dropdown-menu { background: var(--ff-elevated-2); border: 1px solid var(--ff-border); border-radius: var(--ff-r-control); box-shadow: var(--ff-overlay); padding: 8px; }
.dropdown-item { color: var(--ff-text-2); border-radius: var(--ff-r-small); padding: 10px 12px; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--ff-elevated-3); color: var(--ff-text); }
.dropdown-divider { border-color: var(--ff-border); }
.list-group-item { background: transparent; border-color: var(--ff-border); color: var(--ff-text-2); }
.nav-tabs { border-bottom: 1px solid var(--ff-border); }
.nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--ff-text-2); font-weight: 500; padding: 12px 4px; margin-right: 24px; background: transparent; }
.nav-tabs .nav-link:hover { color: var(--ff-text); }
.nav-tabs .nav-link.active { color: var(--ff-primary); border-bottom-color: var(--ff-primary); background: transparent; font-weight: 600; }

/* ---------- Dashboard (ffd-*) ---------- */
.ffd-head { margin-bottom: 24px; }
.ffd-head p { color: var(--ff-text-3); font-size: 16px; line-height: 22px; margin-top: 6px; }
.ffd-kpis { gap: 16px; margin-bottom: 16px; }
.ffd-kpi { padding: 20px 20px 14px; }
.ffd-kpi .lbl { color: var(--ff-text-3); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; }
.ffd-kpi .val { color: var(--ff-text); font-family: var(--ff-display); font-weight: 800; font-size: 32px; line-height: 36px; margin-top: 8px; }
.ffd-kpi .sub { color: var(--ff-text-3); font-size: 12px; margin-top: 4px; }
.ffd-kpi svg polyline, .ffd-kpi svg path { stroke: var(--ff-primary); stroke-width: 2; vector-effect: non-scaling-stroke; }
.ffd-up, .ffd-ok { color: var(--ff-success) !important; font-weight: 600; }
.ffd-down { color: var(--ff-error) !important; font-weight: 600; }
.ffd-flat { color: var(--ff-text-3) !important; }
.ffd-grid { gap: 16px; margin-bottom: 16px; }
.ffd-card { padding: 20px 24px; }
.ffd-card h3 { color: var(--ff-text); font-size: 18px; line-height: 20px; font-weight: 600; margin-bottom: 4px; }
.ffd-card .note, .ffd-empty, .ffd-list .muted { color: var(--ff-text-3); font-size: 12px; }
.ffd-chart { height: 260px; margin-top: 12px; }
.ffd-queue li, .ffd-list td { border-top-color: var(--ff-border); }
.ffd-list { color: var(--ff-text-2); }
.ffd-list td:first-child { color: var(--ff-text); font-weight: 500; }

/* ---------- Misc ---------- */
.c-footer { background: var(--ff-elevated); border-top: 1px solid var(--ff-border); color: var(--ff-text-3); }
.c-sidebar-backdrop.c-show { background: #02070F; opacity: 0.7; }
.popover, .tooltip-inner { background: var(--ff-elevated-3); color: var(--ff-text); border-radius: var(--ff-r-small); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 999px; border: 2px solid var(--ff-base); }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }
