
:root {
  --tf-primary: #e0011b;
  --tf-primary-dark: #b80016;
  --tf-bg: #aaa;
  --tf-surface: #f4f5f7;
  --tf-ink: #1f2933;
  --tf-muted: #64748b;
  --tf-prose: #475569;
  --tf-prose-size: 0.875rem;
  --bs-primary: #e0011b;
  --bs-primary-rgb: 224, 1, 27;
  --bs-success: #178a4d;
  --bs-success-rgb: 23, 138, 77;
  --bs-border-radius: .375rem;
  --bs-border-radius-sm: .25rem;
  --bs-border-radius-lg: .5rem;
}
html, body { min-height: 100%; }
body { background: var(--tf-bg); color: var(--tf-ink); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--tf-primary); }
.tf-page p,
.tf-page li:not(.page-item):not(.dropdown-item),
.tf-page .table td,
.tf-page .table tbody th,
.modal-body p,
.modal-body .table td {
  font-size: var(--tf-prose-size);
  color: var(--tf-prose);
  line-height: 1.45;
}
.tf-shell { max-width: 1000px; }
.tf-navbar { background: #f8f9fa; border-bottom: 1px solid rgba(15, 23, 42, .08); box-shadow: 0 8px 24px rgba(15, 23, 42, .08); }
.tf-navbar .tf-shell { padding-left: 1.5rem; padding-right: 1.5rem; }
.tf-logo { height: 48px; max-width: 200px; }
.tf-navbar .btn { --bs-btn-padding-y: 0.5rem; --bs-btn-padding-x: 1rem; --bs-btn-font-size: 1rem; }
.tf-page { background: #e9ecef; min-height: calc(100vh - 82px); border: 1px solid rgba(15, 23, 42, .08); box-shadow: 0 18px 45px rgba(15, 23, 42, .13); border-radius: 0 !important; }
.tf-page:has(.tf-login) { display: flex; align-items: center; justify-content: center; }
.tf-login { width: 100%; max-width: 28rem; }
.tf-login-panel {
  padding: 1.5rem;
  border: 1px solid rgba(15, 23, 42, .2);
  border-radius: var(--bs-border-radius-lg);
  background: #fff;
}
.tf-card { border: 0; border-radius: 0; box-shadow: 0 10px 24px rgba(15, 23, 42, .09); }
.tf-card .card-header { background: #fff; border-bottom: 1px solid rgba(15, 23, 42, .08); font-weight: 700; }
.tf-card .card-footer { border-top: 0; }
.tf-dashboard-card { height: 100%; text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.tf-dashboard-card:hover { color: inherit; transform: translateY(-2px); box-shadow: 0 18px 38px rgba(15, 23, 42, .16); }
.tf-kicker { color: var(--tf-primary); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; }
.tf-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 32px;
  padding: 0 .7rem;
  border-radius: 999px;
  background: #1976d2;
  color: #fff;
  font-size: .875rem;
  font-weight: 500;
  border: 0;
}
.tf-chip__action,
.tf-chip__close {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  line-height: 1;
}
.tf-chip__action { font: inherit; }
.tf-chip__close {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1rem;
}
.tf-chip__close:hover { background: rgba(255, 255, 255, .18); }
.btn-primary { --bs-btn-bg: var(--tf-primary); --bs-btn-border-color: var(--tf-primary); --bs-btn-hover-bg: var(--tf-primary-dark); --bs-btn-hover-border-color: var(--tf-primary-dark); --bs-btn-active-bg: var(--tf-primary-dark); --bs-btn-active-border-color: var(--tf-primary-dark); }
.btn-outline-primary { --bs-btn-color: var(--tf-primary); --bs-btn-border-color: var(--tf-primary); --bs-btn-hover-bg: var(--tf-primary); --bs-btn-hover-border-color: var(--tf-primary); }
.form-control:focus, .form-select:focus { border-color: rgba(224, 1, 27, .55); box-shadow: 0 0 0 .22rem rgba(224, 1, 27, .12); }
.pagination { --bs-pagination-color: var(--tf-primary); --bs-pagination-hover-color: var(--tf-primary-dark); --bs-pagination-focus-color: var(--tf-primary-dark); --bs-pagination-active-bg: var(--tf-primary); --bs-pagination-active-border-color: var(--tf-primary); }
.table { margin-bottom: 0; }
.table thead th { color: var(--tf-prose); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; background: #f8fafc; }
.table td, .table th { vertical-align: middle; }
.badge.text-bg-primary { background-color: var(--tf-primary) !important; }
.tf-muted { color: var(--tf-muted); }
.tf-rules-frame { width: 100%; min-height: 76vh; background: #fff; border: 0; border-radius: 0; }
.htmx-indicator { opacity: 0; transition: opacity .15s ease; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
.tf-nav-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  background: var(--tf-primary);
  transform: scaleX(0);
  transform-origin: left center;
}
.tf-nav-progress.htmx-request {
  opacity: 1;
  animation: tf-nav-progress 1.1s ease-in-out infinite;
}
@keyframes tf-nav-progress {
  0% { transform: scaleX(0); transform-origin: left center; }
  45% { transform: scaleX(1); transform-origin: left center; }
  55% { transform: scaleX(1); transform-origin: right center; }
  100% { transform: scaleX(0); transform-origin: right center; }
}
@media (max-width: 767px) { .tf-page { min-height: calc(100vh - 70px); border-radius: 0 !important; } .tf-shell { padding-left: 0; padding-right: 0; } .tf-navbar .tf-shell { padding-left: 1rem; padding-right: 1rem; } }
