/* ============================================================
   TariffePazze — Design System & UI Tokens
   File    : public/assets/css/app.css
   Version : 1.0.0
   ============================================================
   Usage: Load after theme.min.css in the layout.
   All custom properties are prefixed with `--tp-`.
   ============================================================ */

/* ── Design Tokens ──────────────────────────────────────── */
:root {
  /* Brand colors */
  --tp-primary: #0d6efd;
  --tp-primary-hover: #0b5ed7;
  --tp-primary-light: rgba(13, 110, 253, 0.08);
  --tp-primary-subtle: #e8f0fe;

  /* Semantic colors */
  --tp-success: #198754;
  --tp-success-light: rgba(25, 135, 84, 0.08);
  --tp-warning: #ffc107;
  --tp-danger: #dc3545;
  --tp-info: #0dcaf0;

  /* Surfaces */
  --tp-surface: #ffffff;
  --tp-surface-muted: #f8f9fa;
  --tp-surface-alt: #e9ecef;
  --tp-body-bg: #f5f7fa;

  /* Text */
  --tp-text: #1a1d21;
  --tp-text-secondary: #6c757d;
  --tp-text-muted: #adb5bd;
  --tp-text-on-primary: #ffffff;

  /* Borders */
  --tp-border: #dee2e6;
  --tp-border-light: #e9ecef;
  --tp-border-focus: var(--tp-primary);

  /* Border radius */
  --tp-radius-sm: 6px;
  --tp-radius-md: 10px;
  --tp-radius-lg: 16px;
  --tp-radius-xl: 20px;
  --tp-radius-pill: 50rem;

  /* Shadows */
  --tp-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --tp-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --tp-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
  --tp-shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);

  /* Focus ring */
  --tp-focus-ring-color: rgba(13, 110, 253, 0.4);
  --tp-focus-ring-width: 3px;
  --tp-focus-ring: 0 0 0 var(--tp-focus-ring-width) var(--tp-focus-ring-color);

  /* Featured gold accents (shared by featured list + grid cards) */
  --tp-gold: #f6c344;
  --tp-gold-deep: #e3a51a;
  --tp-gold-text: #4a3103;
  --tp-gold-rgb: 227, 165, 26;

  /* Spacing scale */
  --tp-space-1: 0.25rem;
  --tp-space-2: 0.5rem;
  --tp-space-3: 0.75rem;
  --tp-space-4: 1rem;
  --tp-space-5: 1.5rem;
  --tp-space-6: 2rem;
  --tp-space-8: 3rem;
  --tp-space-10: 4rem;

  /* Typography */
  --tp-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --tp-font-size-xs: 0.75rem;
  --tp-font-size-sm: 0.875rem;
  --tp-font-size-base: 1rem;
  --tp-font-size-lg: 1.125rem;
  --tp-font-size-xl: 1.25rem;
  --tp-font-size-2xl: 1.5rem;
  --tp-font-size-3xl: 1.875rem;
  --tp-font-size-4xl: 2.25rem;
  --tp-line-height: 1.6;

  /* Transitions */
  --tp-transition-fast: 150ms ease;
  --tp-transition-base: 250ms ease;
  --tp-transition-slow: 400ms ease;

  /* Container */
  --tp-container-max: 1320px;
}

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Global focus-visible styles ────────────────────────── */
:focus-visible {
  outline: none;
  box-shadow: var(--tp-focus-ring);
  border-radius: var(--tp-radius-sm);
}

/* Remove default focus outline only for mouse users */
:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

/* Specific element focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--tp-focus-ring);
  border-radius: var(--tp-radius-sm);
}

/* Fix for Bootstrap components that might hide focus */
.btn:focus-visible,
.nav-link:focus-visible,
.dropdown-item:focus-visible,
.page-link:focus-visible {
  box-shadow: var(--tp-focus-ring) !important;
}

.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible {
  border-color: var(--tp-primary);
  box-shadow: var(--tp-focus-ring);
}

/* Form check focus */
.form-check-input:focus-visible {
  border-color: var(--tp-primary);
}

/* Card actions that are stretched links */
.stretched-link:focus-visible {
  outline: 2px solid var(--tp-primary);
  outline-offset: 2px;
  border-radius: var(--tp-radius-md);
}

/* Offcanvas close buttons */
.btn-close:focus-visible {
  box-shadow: var(--tp-focus-ring);
  border-radius: var(--tp-radius-sm);
}

/* Admin sidebar */
.sidebar-nav .nav-link:focus-visible,
.sidebar-nav .nav-link-toggle:focus-visible {
  box-shadow: var(--tp-focus-ring) !important;
  outline: none;
}

/* Navbar toggler */
.navbar-toggler:focus-visible {
  box-shadow: var(--tp-focus-ring);
}

/* ── Card improvements (scoped to public layout) ──────── */
.public-layout .card {
  border-radius: var(--tp-radius-lg);
  box-shadow: var(--tp-shadow-card);
  transition: box-shadow var(--tp-transition-base), transform var(--tp-transition-base);
}

.public-layout .card:hover {
  box-shadow: var(--tp-shadow-md);
}

.public-layout .card-body {
  padding: var(--tp-space-5);
}

@media (max-width: 575.98px) {
  .public-layout .card-body {
    padding: var(--tp-space-4);
  }
}

/* ── Form improvements (scoped to public layout) ────────── */
.public-layout .form-label {
  font-weight: 500;
  font-size: var(--tp-font-size-sm);
  color: var(--tp-text);
  margin-bottom: var(--tp-space-2);
}

.public-layout .form-text {
  font-size: var(--tp-font-size-xs);
  color: var(--tp-text-secondary);
  margin-top: var(--tp-space-1);
}

.public-layout .form-control,
.public-layout .form-select {
  border-radius: var(--tp-radius-md);
  border: 1px solid var(--tp-border);
  padding: 0.6rem 0.9rem;
  transition: border-color var(--tp-transition-fast), box-shadow var(--tp-transition-fast);
}

.public-layout .form-control:hover,
.public-layout .form-select:hover {
  border-color: #b0b8c1;
}

.public-layout .form-control:focus,
.public-layout .form-select:focus {
  border-color: var(--tp-primary);
  box-shadow: var(--tp-focus-ring);
}

/* ── Button improvements (scoped to public layout) ──────── */
.public-layout .btn {
  border-radius: var(--tp-radius-md);
  font-weight: 500;
  padding: 0.6rem 1.25rem;
  transition: background-color var(--tp-transition-fast), border-color var(--tp-transition-fast), color var(--tp-transition-fast), box-shadow var(--tp-transition-fast);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: var(--tp-font-size-lg);
  border-radius: var(--tp-radius-md);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: var(--tp-font-size-sm);
}

.btn-primary {
  background-color: var(--tp-primary);
  border-color: var(--tp-primary);
}

.btn-primary:hover {
  background-color: var(--tp-primary-hover);
  border-color: var(--tp-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--tp-shadow-sm);
}

.btn-outline-primary:hover {
  transform: translateY(-1px);
}

/* ── Badge improvements ─────────────────────────────────── */
.badge {
  font-weight: 500;
  padding: 0.35em 0.65em;
  border-radius: var(--tp-radius-pill);
}

/* ── Alert improvements ─────────────────────────────────── */
.alert {
  border-radius: var(--tp-radius-md);
  border: none;
  box-shadow: var(--tp-shadow-sm);
}

/* ── Navbar improvements (scoped to public layout) ──────── */
.public-layout .navbar.tp-public-header {
  background-color: var(--tp-surface);
  border-bottom: 1px solid var(--tp-border-light);
  box-shadow: var(--tp-shadow-sm);
}

.public-layout .tp-public-header .nav-link {
  font-weight: 500;
  color: var(--tp-text);
  padding: 0.5rem 1rem;
  border-radius: var(--tp-radius-md);
  transition: background-color var(--tp-transition-fast), color var(--tp-transition-fast);
}

.public-layout .tp-public-header .nav-link:hover {
  background-color: var(--tp-primary-light);
  color: var(--tp-primary);
}

.public-layout .tp-public-header .nav-link.active {
  color: var(--tp-primary);
}

/* ── Dropdown improvements (scoped to public layout) ──────── */
.public-layout .dropdown-menu {
  border-radius: var(--tp-radius-lg);
  border: 1px solid var(--tp-border-light);
  box-shadow: var(--tp-shadow-md);
  padding: var(--tp-space-2);
}

.public-layout .dropdown-item {
  border-radius: var(--tp-radius-md);
  padding: 0.5rem 0.75rem;
  transition: background-color var(--tp-transition-fast);
}

.public-layout .dropdown-item:hover {
  background-color: var(--tp-primary-light);
}

.public-layout .dropdown-item:focus-visible {
  background-color: var(--tp-primary-light);
}

/* ── Modal improvements (scoped to public layout) ─────────── */
.public-layout .modal-content {
  border-radius: var(--tp-radius-lg);
  border: none;
  box-shadow: var(--tp-shadow-lg);
}

.public-layout .modal-header {
  border-bottom: 1px solid var(--tp-border-light);
  padding: var(--tp-space-5);
}

.public-layout .modal-body {
  padding: var(--tp-space-5);
}

.public-layout .modal-footer {
  border-top: 1px solid var(--tp-border-light);
  padding: var(--tp-space-4) var(--tp-space-5);
}

/* ── Section spacing ────────────────────────────────────── */
.section-py {
  padding-top: var(--tp-space-8);
  padding-bottom: var(--tp-space-8);
}

@media (min-width: 768px) {
  .section-py {
    padding-top: var(--tp-space-10);
    padding-bottom: var(--tp-space-10);
  }
}

/* ── Hero sections ──────────────────────────────────────── */
.hero-section {
  padding-top: var(--tp-space-8);
  padding-bottom: var(--tp-space-6);
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero-section {
    padding-top: var(--tp-space-10);
    padding-bottom: var(--tp-space-8);
  }
}

/* ── Service cards ──────────────────────────────────────── */
.service-card {
  border-radius: var(--tp-radius-lg);
  overflow: hidden;
  transition: transform var(--tp-transition-base), box-shadow var(--tp-transition-base);
  height: 100%;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tp-shadow-lg);
}

.service-card .card-body {
  display: flex;
  flex-direction: column;
}

.service-card .card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--tp-radius-md);
  font-size: 1.5rem;
  margin-bottom: var(--tp-space-4);
}

/* ── Trust bar ──────────────────────────────────────────── */
.trust-bar {
  background-color: var(--tp-surface-muted);
  border-top: 1px solid var(--tp-border-light);
  border-bottom: 1px solid var(--tp-border-light);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--tp-space-3);
  padding: var(--tp-space-4) 0;
}

.trust-item i {
  font-size: 1.5rem;
  color: var(--tp-primary);
  flex-shrink: 0;
}

.trust-item span {
  font-size: var(--tp-font-size-sm);
  color: var(--tp-text-secondary);
}

/* ── How it works steps ─────────────────────────────────── */
.step-card {
  display: flex;
  gap: var(--tp-space-5);
  align-items: flex-start;
  padding: var(--tp-space-5);
  border-radius: var(--tp-radius-lg);
  background-color: rgba(255, 255, 255, 0.08);
  transition: background-color var(--tp-transition-base);
}

.step-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--tp-radius-md);
  background-color: rgba(255, 255, 255, 0.15);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

/* ── Offer cards (enhanced) ───────────────────────────── */
.offer-card {
  border-radius: var(--tp-radius-lg);
  overflow: hidden;
  transition: box-shadow var(--tp-transition-base), transform var(--tp-transition-base);
  height: 100%;
}

.offer-card:hover {
  box-shadow: var(--tp-shadow-lg);
  transform: translateY(-2px);
}

.offer-card .offer-price {
  font-size: var(--tp-font-size-3xl);
  font-weight: 700;
  color: var(--tp-primary);
  line-height: 1.2;
}

.offer-card .offer-price-period {
  font-size: var(--tp-font-size-sm);
  color: var(--tp-text-secondary);
  font-weight: 400;
}

.offer-card .offer-price-note {
  font-size: var(--tp-font-size-xs);
  color: var(--tp-text-muted);
  margin-top: var(--tp-space-1);
}

.offer-card .offer-price-original {
  font-size: var(--tp-font-size-sm);
  color: var(--tp-text-muted);
  text-decoration: line-through;
}

.offer-card .offer-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.offer-card .offer-features li {
  padding: var(--tp-space-2) 0;
  border-bottom: 1px solid var(--tp-border-light);
  font-size: var(--tp-font-size-sm);
  display: flex;
  align-items: center;
  gap: var(--tp-space-2);
}

.offer-card .offer-features li:last-child {
  border-bottom: none;
}

.offer-card .offer-features li i {
  color: var(--tp-success);
  flex-shrink: 0;
}

.offer-card__logo {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--tp-radius-md);
  overflow: hidden;
  flex-shrink: 0;
}

.offer-card__logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.offer-card__actions .btn {
  border-radius: var(--tp-radius-md);
}

@media (max-width: 575.98px) {
  .offer-card .offer-price {
    font-size: var(--tp-font-size-2xl);
  }

  .offer-card__logo {
    width: 64px;
    height: 64px;
  }
}

/* ── Filter sidebar ─────────────────────────────────────── */
@media (min-width: 992px) {
  .filter-sidebar-desktop {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
}

.filter-sidebar .offcanvas-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.filter-section {
  margin-bottom: var(--tp-space-5);
}

.filter-section-title {
  font-size: var(--tp-font-size-sm);
  font-weight: 600;
  color: var(--tp-text);
  margin-bottom: var(--tp-space-3);
}

.filter-section .form-check {
  margin-bottom: var(--tp-space-2);
}

.filter-section .form-check .form-check-label {
  font-size: var(--tp-font-size-sm);
  color: var(--tp-text-secondary);
}

.filter-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--tp-primary);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0 6px;
}

/* ── Offer grid layout ──────────────────────────────────── */
.offers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--tp-space-5);
}

@media (min-width: 768px) {
  .offers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .offers-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Offer list (default listing view) ──────────────────── */
.offers-list {
  display: flex;
  flex-direction: column;
  gap: var(--tp-space-4);
}

.offers-list .offer-card {
  border: 1px solid var(--tp-border-light);
}

/* ── Offer price highlight savings ──────────────────────── */
.offer-savings-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--tp-space-1);
  background-color: var(--tp-success-light);
  color: var(--tp-success);
  padding: 0.2rem 0.6rem;
  border-radius: var(--tp-radius-pill);
  font-size: var(--tp-font-size-xs);
  font-weight: 600;
}

/* ── Comparison form improvements ───────────────────────── */
.comparison-form-card {
  border-radius: var(--tp-radius-lg);
  box-shadow: var(--tp-shadow-lg);
  overflow: hidden;
}

.comparison-form-card .card-body {
  padding: var(--tp-space-6);
}

@media (max-width: 575.98px) {
  .comparison-form-card .card-body {
    padding: var(--tp-space-4);
  }
}

/* Segmented control / radio cards */
.segmented-control {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tp-space-2);
}

.segmented-control .btn-check:checked + .btn-outline-primary {
  background-color: var(--tp-primary);
  color: #fff;
  border-color: var(--tp-primary);
}

.segmented-control .btn {
  border-radius: var(--tp-radius-md);
  padding: 0.4rem 1rem;
  font-size: var(--tp-font-size-sm);
}

/* ── Admin panel improvements ───────────────────────────── */
.admin-stat-card {
  border-radius: var(--tp-radius-lg);
  padding: var(--tp-space-5);
  transition: box-shadow var(--tp-transition-base), transform var(--tp-transition-base);
  background: var(--tp-surface);
  height: 100%;
}

.admin-stat-card:hover {
  box-shadow: var(--tp-shadow-md);
  transform: translateY(-2px);
}

.admin-stat-card .stat-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--tp-radius-md);
  font-size: 1.25rem;
}

.admin-stat-card .stat-value {
  font-size: var(--tp-font-size-3xl);
  font-weight: 700;
  line-height: 1.2;
  color: var(--tp-text);
}

.admin-stat-card .stat-label {
  font-size: var(--tp-font-size-sm);
  color: var(--tp-text-secondary);
  margin-top: var(--tp-space-1);
}

/* ── Admin page header ─────────────────────────────────── */
.admin-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--tp-space-4);
  margin-bottom: var(--tp-space-6);
}

.admin-page-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0;
}

.admin-page-header p {
  color: var(--tp-text-secondary);
  margin: var(--tp-space-1) 0 0 0;
  font-size: var(--tp-font-size-sm);
}

/* ── Admin toolbar ─────────────────────────────────────── */
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--tp-space-3);
  padding: var(--tp-space-4);
  background: var(--tp-surface);
  border-bottom: 1px solid var(--tp-border-light);
}

@media (max-width: 767.98px) {
  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-toolbar .btn-group {
    width: 100%;
  }
}

/* ── Admin filter form ─────────────────────────────────── */
.admin-filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--tp-space-3);
}

.admin-filter-form .form-label {
  margin-bottom: var(--tp-space-1);
  font-size: var(--tp-font-size-xs);
}

@media (max-width: 767.98px) {
  .admin-filter-form {
    flex-direction: column;
    width: 100%;
  }

  .admin-filter-form > * {
    width: 100%;
  }
}

/* ── Responsive admin table (cards on mobile) ──────────── */
.admin-table-wrap {
  border-radius: var(--tp-radius-lg);
  overflow: hidden;
  box-shadow: var(--tp-shadow-card);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--tp-surface);
}

.admin-table thead {
  background: var(--tp-surface-muted);
}

.admin-table thead th {
  padding: var(--tp-space-3) var(--tp-space-4);
  font-size: var(--tp-font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--tp-text-secondary);
  border-bottom: 2px solid var(--tp-border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: var(--tp-surface-muted);
  z-index: 2;
}

.admin-table tbody td {
  padding: var(--tp-space-3) var(--tp-space-4);
  font-size: var(--tp-font-size-sm);
  border-bottom: 1px solid var(--tp-border-light);
  vertical-align: middle;
}

.admin-table tbody tr {
  transition: background-color var(--tp-transition-fast);
}

.admin-table tbody tr:hover {
  background-color: var(--tp-primary-light);
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

@media (max-width: 767.98px) {
  .admin-table thead {
    display: none;
  }

  .admin-table tbody tr {
    display: block;
    padding: var(--tp-space-4);
    margin-bottom: var(--tp-space-3);
    background: var(--tp-surface);
    border-radius: var(--tp-radius-md);
    box-shadow: var(--tp-shadow-sm);
    border: 1px solid var(--tp-border-light);
  }

  .admin-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--tp-space-2) 0;
    border: none;
    border-bottom: 1px solid var(--tp-border-light);
  }

  .admin-table tbody td:last-child {
    border-bottom: none;
  }

  .admin-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: var(--tp-font-size-xs);
    color: var(--tp-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    margin-right: var(--tp-space-3);
  }
}

/* ── Admin empty state ─────────────────────────────────── */
.admin-empty-state {
  text-align: center;
  padding: var(--tp-space-8) var(--tp-space-4);
  color: var(--tp-text-secondary);
}

.admin-empty-state i {
  font-size: 3rem;
  color: var(--tp-text-muted);
  margin-bottom: var(--tp-space-4);
}

.admin-empty-state h3 {
  font-size: var(--tp-font-size-lg);
  color: var(--tp-text);
  margin-bottom: var(--tp-space-2);
}

.admin-empty-state p {
  max-width: 400px;
  margin: 0 auto var(--tp-space-4);
  font-size: var(--tp-font-size-sm);
}

/* ── Status badges (admin) ─────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--tp-space-1);
  padding: 0.25em 0.65em;
  border-radius: var(--tp-radius-pill);
  font-size: var(--tp-font-size-xs);
  font-weight: 600;
  white-space: nowrap;
}

.status-badge--pending {
  background-color: #fff3cd;
  color: #856404;
}

.status-badge--active,
.status-badge--processing {
  background-color: #cce5ff;
  color: #004085;
}

.status-badge--completed,
.status-badge--success {
  background-color: #d1e7dd;
  color: #0f5132;
}

.status-badge--cancelled,
.status-badge--failed {
  background-color: #f8d7da;
  color: #721c24;
}

/* Responsive tables */
@media (max-width: 767.98px) {
  .table-responsive-card tbody tr {
    display: block;
    padding: var(--tp-space-4);
    margin-bottom: var(--tp-space-4);
    background-color: var(--tp-surface);
    border-radius: var(--tp-radius-md);
    box-shadow: var(--tp-shadow-sm);
    border: 1px solid var(--tp-border-light);
  }

  .table-responsive-card tbody tr td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--tp-space-2) 0;
    border: none;
    border-bottom: 1px solid var(--tp-border-light);
  }

  .table-responsive-card tbody tr td:last-child {
    border-bottom: none;
  }

  .table-responsive-card tbody tr td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: var(--tp-font-size-xs);
    color: var(--tp-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  .table-responsive-card thead {
    display: none;
  }
}

/* ── Pagination improvements (scoped to public layout) ──── */
.public-layout .page-link {
  border-radius: var(--tp-radius-md);
  margin: 0 2px;
  color: var(--tp-text);
  border: 1px solid var(--tp-border-light);
  transition: background-color var(--tp-transition-fast), color var(--tp-transition-fast), border-color var(--tp-transition-fast);
}

.public-layout .page-link:hover {
  background-color: var(--tp-primary-light);
  color: var(--tp-primary);
  border-color: var(--tp-primary);
}

.public-layout .page-item.active .page-link {
  background-color: var(--tp-primary);
  border-color: var(--tp-primary);
}

/* ── Empty states ───────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--tp-space-8) var(--tp-space-4);
}

.empty-state i {
  font-size: 3rem;
  color: var(--tp-text-muted);
  margin-bottom: var(--tp-space-4);
}

.empty-state h3 {
  font-size: var(--tp-font-size-xl);
  color: var(--tp-text);
  margin-bottom: var(--tp-space-2);
}

.empty-state p {
  color: var(--tp-text-secondary);
  max-width: 400px;
  margin: 0 auto;
}



/* ── Utility classes ────────────────────────────────────── */
.border-white-10 {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.tp-text-balance {
  text-wrap: balance;
}

.tp-line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tp-line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Loading skeleton ───────────────────────────────────── */
.tp-skeleton {
  background: linear-gradient(90deg, var(--tp-surface-alt) 25%, var(--tp-surface-muted) 50%, var(--tp-surface-alt) 75%);
  background-size: 200% 100%;
  animation: tp-shimmer 1.5s infinite;
  border-radius: var(--tp-radius-sm);
}

@keyframes tp-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ── Skeleton fade-out (use after tp-shimmer) ───────── */
@keyframes tp-skeleton-hide {
  0%, 70% { opacity: 1; }
  100%   { opacity: 0; }
}

/* ════════════════════════════════════════════════════════════
   Cookie Consent Banner — fixed bottom panel
   ════════════════════════════════════════════════════════════ */

.tp-cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1080;
  width: calc(100% - 32px);
  max-width: 960px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding: 20px 24px;
  background: #1e2128;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.15);
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  line-height: 1.55;
  box-sizing: border-box;
}

.tp-cookie-banner p {
  flex: 1 1 280px;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

.tp-cookie-banner p a {
  color: #8ab4f8;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 150ms ease;
}

.tp-cookie-banner p a:hover {
  color: #a8c8fa;
}

.tp-cookie-banner p a:focus-visible {
  outline: 2px solid rgba(138, 180, 248, 0.6);
  outline-offset: 2px;
  border-radius: 4px;
}

.tp-cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.tp-cookie-banner__btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
  white-space: nowrap;
  line-height: 1.2;
}

.tp-cookie-banner__btn:focus-visible {
  outline: 2px solid rgba(13, 110, 253, 0.6);
  outline-offset: 2px;
}

.tp-cookie-banner__btn--outline {
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.tp-cookie-banner__btn--outline:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.tp-cookie-banner__btn--primary {
  background: #ffcc00;
  color: #1a1d21;
}

.tp-cookie-banner__btn--primary:hover {
  background: #ffd633;
  box-shadow: 0 2px 8px rgba(255, 204, 0, 0.25);
}

/* ── Cookie banner: mobile (< 768px) ──────────────────── */
@media (max-width: 767.98px) {
  .tp-cookie-banner {
    bottom: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 18px 20px;
    text-align: center;
  }

  .tp-cookie-banner p {
    flex: none;
    font-size: 13px;
  }

  .tp-cookie-banner__actions {
    flex-direction: column;
    width: 100%;
  }

  .tp-cookie-banner__btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* ════════════════════════════════════════════════════════════
   Footer (redesigned) — CSS Grid layout
   ════════════════════════════════════════════════════════════ */

/* ── Footer: Base container ──────────────────────────── */
.tp-footer {
  background-color: #1a1d21 !important;
  padding-top: 64px;
  padding-bottom: 24px;
  color: rgba(255, 255, 255, 0.55);
}

.tp-footer a {
  transition: color var(--tp-transition-fast), text-decoration-color var(--tp-transition-fast);
}

.tp-footer__container {
  max-width: var(--tp-container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Footer: CSS Grid (5 cols desktop) ───────────────── */
.tp-footer__grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(4, minmax(150px, 1fr));
  gap: 48px;
  align-items: start;
  padding-bottom: 40px;
}

/* ── Footer: Brand column ────────────────────────────── */
.tp-footer__brand {
  min-width: 0;
}

.tp-footer__logo-link {
  display: inline-block;
  margin-bottom: 16px;
}

.tp-footer__logo-link img {
  width: 160px;
  height: auto;
}

.tp-footer__description {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.65;
  margin-bottom: 20px;
}

.tp-footer__contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tp-footer__contact-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tp-footer__contact-list i {
  color: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
  font-size: 1.125rem;
}

.tp-footer__contact-list a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
}

.tp-footer__contact-list a:hover {
  color: #fff !important;
}

.tp-footer__contact-list a:focus-visible {
  outline: 2px solid rgba(13, 110, 253, 0.6);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Footer: Nav groups (accordion columns) ──────────── */
.tp-footer__group {
  background: transparent !important;
  border: 0 !important;
  min-width: 0;
}

/* Desktop: show the heading text, hide the accordion button */
.tp-footer__heading-text {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

/* Desktop: collapse content always visible */
.tp-footer__collapse {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  overflow: visible !important;
}

.tp-footer__collapse .accordion-collapse {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  overflow: visible !important;
}

.tp-footer__link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tp-footer__link-list a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 14px;
  padding: 3px 0;
  display: inline-block;
  position: relative;
}

.tp-footer__link-list a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 1px;
  width: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.6);
  transition: width 200ms ease;
}

.tp-footer__link-list a:hover {
  color: #fff !important;
}

.tp-footer__link-list a:hover::after {
  width: 100%;
}

.tp-footer__link-list a:focus-visible {
  outline: 2px solid rgba(13, 110, 253, 0.6);
  outline-offset: 2px;
  border-radius: 4px;
}

.tp-footer__link-list a:focus-visible::after {
  display: none;
}

/* ── Footer: Accordion button (mobile only) ──────────── */
.tp-footer__accordion-btn {
  background: transparent !important;
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  padding: 16px 0;
  border: none;
  box-shadow: none !important;
  width: 100%;
  text-align: left;
  border-radius: 0;
  display: none;
}

.tp-footer__accordion-btn::after {
  filter: brightness(0) invert(1);
  transition: transform 250ms ease;
}

.tp-footer__accordion-btn:not(.collapsed)::after {
  filter: brightness(0) invert(1);
  transform: rotate(-180deg);
}

.tp-footer__accordion-btn:focus-visible {
  outline: 2px solid rgba(13, 110, 253, 0.6);
  outline-offset: -2px;
  border-radius: 4px;
}

/* ── Footer: Legal bottom bar ────────────────────────── */
.tp-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tp-footer__legal p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

.tp-footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 24px;
}

.tp-footer__legal-links a,
.tp-footer__cookie-btn {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 13px;
  transition: color var(--tp-transition-fast);
  background: none;
  border: none;
  padding: 4px 0;
  cursor: pointer;
  font-family: inherit;
  position: relative;
}

.tp-footer__legal-links a:hover,
.tp-footer__cookie-btn:hover {
  color: #fff !important;
}

.tp-footer__legal-links a:focus-visible,
.tp-footer__cookie-btn:focus-visible {
  outline: 2px solid rgba(13, 110, 253, 0.6);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Footer: Tablet (≤ 1199.98px) ────────────────────── */
/* The desktop 5-column grid needs a minimum of ~1080px
   (240px brand + 4×150px columns + 5×48px gaps). Below 1200px
   the container can't fit it, so we collapse to 2 columns
   earlier to avoid horizontal overflow on tablets/narrow
   desktops (B-13). */
@media (max-width: 1199.98px) {
  .tp-footer {
    padding-top: 48px;
  }

  .tp-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }

  .tp-footer__brand {
    grid-column: 1 / -1;
  }

  .tp-footer__legal {
    flex-direction: column;
    text-align: center;
  }

  .tp-footer__legal-links {
    justify-content: center;
  }
}

/* ── Footer: Mobile (≤ 575.98px) ─────────────────────── */
@media (max-width: 575.98px) {
  .tp-footer {
    padding-top: 0;
    padding-bottom: 16px;
  }

  .tp-footer__container {
    padding: 0 16px;
  }

  .tp-footer__grid {
    display: block;
    padding-bottom: 24px;
  }

  .tp-footer__brand {
    padding: 32px 0 16px;
  }

  .tp-footer__group {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  /* Mobile: show accordion buttons, hide desktop heading text */
  .tp-footer__accordion-btn {
    display: block;
  }

  .tp-footer__heading-text {
    display: none !important;
  }

  /* Mobile: collapse content hidden by default, toggled via JS */
  /* Mobile: wrapper is transparent — Bootstrap collapse on inner element handles visibility */
  .tp-footer__collapse {
    display: block;
    visibility: visible;
    height: auto;
    overflow: visible;
  }

  .tp-footer__collapse .accordion-collapse {
    display: none !important;
  }

  .tp-footer__collapse .accordion-collapse.show {
    display: block !important;
  }

  .tp-footer__link-list {
    padding-bottom: 16px;
  }

  .tp-footer__legal {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .tp-footer__legal-links {
    justify-content: center;
    gap: 4px 16px;
  }
}

/* ── Form error states ──────────────────────────────────── */
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--tp-danger);
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid,
.form-select.is-valid {
  border-color: var(--tp-success);
  box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

/* ── Inline field error ─────────────────────────────────── */
.field-error {
  display: flex;
  align-items: center;
  gap: var(--tp-space-2);
  margin-top: var(--tp-space-1);
  font-size: var(--tp-font-size-xs);
  color: var(--tp-danger);
  line-height: 1.4;
}

.field-error::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--tp-danger);
  flex-shrink: 0;
}

/* ── Error summary ─────────────────────────────────────── */
.error-summary {
  background-color: #fff5f5;
  border: 1px solid #fecaca;
  border-left: 4px solid var(--tp-danger);
  border-radius: var(--tp-radius-md);
  padding: var(--tp-space-4);
  margin-bottom: var(--tp-space-5);
}

.error-summary:focus-visible {
  outline: none;
  box-shadow: var(--tp-focus-ring);
}

.error-summary__header {
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: var(--tp-font-size-sm);
  color: #991b1b;
  margin-bottom: var(--tp-space-2);
}

.error-summary__list {
  margin: 0;
  padding-left: var(--tp-space-5);
  font-size: var(--tp-font-size-sm);
  color: #991b1b;
}

.error-summary__list li {
  margin-bottom: var(--tp-space-1);
}

.error-summary__list li:last-child {
  margin-bottom: 0;
}

/* ── Button loading state ──────────────────────────────── */
.btn-loading,
.btn.disabled[type="submit"] {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}

.btn-loading .spinner-border,
.btn.disabled[type="submit"] .spinner-border {
  width: 1rem;
  height: 1rem;
  border-width: 2px;
}

/* ── Stepper improvements ───────────────────────────────── */
.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: var(--tp-space-6);
}

.stepper-step {
  display: flex;
  align-items: center;
  flex: 1;
  position: relative;
}

.stepper-step:last-child {
  flex: 0 0 auto;
}

.stepper-step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--tp-font-size-sm);
  font-weight: 600;
  background-color: var(--tp-border-light);
  color: var(--tp-text-secondary);
  flex-shrink: 0;
  z-index: 1;
  transition: color var(--tp-transition-base), background-color var(--tp-transition-base), border-color var(--tp-transition-base), box-shadow var(--tp-transition-base), opacity var(--tp-transition-base), transform var(--tp-transition-base);
}

.stepper-step--active .stepper-step-number {
  background-color: var(--tp-primary);
  color: #fff;
}

.stepper-step--completed .stepper-step-number {
  background-color: var(--tp-success);
  color: #fff;
}

.stepper-step-label {
  font-size: var(--tp-font-size-xs);
  color: var(--tp-text-secondary);
  margin-left: var(--tp-space-2);
  white-space: nowrap;
}

.stepper-step--active .stepper-step-label {
  color: var(--tp-primary);
  font-weight: 600;
}

.stepper-step--completed .stepper-step-label {
  color: var(--tp-success);
}

.stepper-connector {
  flex: 1;
  height: 2px;
  background-color: var(--tp-border-light);
  margin: 0 var(--tp-space-2);
}

.stepper-step--completed + .stepper-connector {
  background-color: var(--tp-success);
}

/* ── Responsive helpers ─────────────────────────────────── */
@media (max-width: 575.98px) {
  .tp-hide-xs {
    display: none !important;
  }
}

@media (min-width: 576px) {
  .tp-show-xs-only {
    display: none !important;
  }
}

/* ── Accessibility skip link ────────────────────────────── */
.tp-skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 10000;
  padding: 0.5rem 1rem;
  background-color: var(--tp-primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.tp-skip-link:focus {
  top: 0;
}

/* ── Utility classes ────────────────────────────────────── */
.pointer-events-none {
  pointer-events: none;
}

.object-fit-cover {
  object-fit: cover;
}

.object-fit-contain {
  object-fit: contain;
}

/* ════════════════════════════════════════════════════════════
   Internet Offers Page — modern card & pagination system
   ════════════════════════════════════════════════════════════ */

/* ── Offers page title ──────────────────────────────── */
.tp-offers__title {
  font-weight: 700;
  color: var(--tp-text);
}

/* ── View toggle ────────────────────────────────────── */
.tp-view-toggle {
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-md);
  overflow: hidden;
}

.tp-view-toggle .btn {
  border: none;
  padding: 0.35rem 0.6rem;
  color: var(--tp-text-secondary);
  background: transparent;
}

.tp-view-toggle .btn:hover {
  color: var(--tp-text);
  background: var(--tp-surface-muted);
}

.tp-view-toggle .btn-check:checked + .btn {
  color: var(--tp-primary);
  background: var(--tp-primary-light);
}

/* ── Filter pills (active filters) ──────────────────── */
.tp-filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  background: var(--tp-primary-light);
  color: var(--tp-primary);
  border-radius: var(--tp-radius-pill);
  font-size: var(--tp-font-size-xs);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--tp-transition-fast), background-color var(--tp-transition-fast), border-color var(--tp-transition-fast), box-shadow var(--tp-transition-fast), opacity var(--tp-transition-fast), transform var(--tp-transition-fast);
  border: 1px solid transparent;
}

.tp-filter-pill:hover {
  background: #d0e1fd;
  color: var(--tp-primary-hover);
  border-color: var(--tp-primary);
}

.tp-filter-pill i {
  font-size: 0.65rem;
}

.tp-filter-pill--clear {
  background: transparent;
  color: var(--tp-text-secondary);
  border-color: var(--tp-border);
  font-weight: 400;
}

.tp-filter-pill--clear:hover {
  background: var(--tp-surface-muted);
  border-color: var(--tp-text-muted);
  color: var(--tp-text);
}

/* ── Filter count badge ─────────────────────────────── */
.tp-filter-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--tp-primary);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0 6px;
}

/* ── Filter sidebar enhancements ────────────────────── */
@media (min-width: 992px) {
  .tp-filter-sidebar__body {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
}

.tp-filter-section {
  background: var(--tp-surface-muted);
  border-radius: var(--tp-radius-md);
  padding: var(--tp-space-4);
}

.tp-filter-section__title {
  font-size: var(--tp-font-size-sm);
  font-weight: 600;
  color: var(--tp-text);
  margin-bottom: var(--tp-space-3);
  display: flex;
  align-items: center;
}

.tp-filter-section__items {
  display: flex;
  flex-direction: column;
  gap: var(--tp-space-2);
}

.tp-filter-check {
  display: flex;
  align-items: center;
}

.tp-filter-check__input {
  flex-shrink: 0;
  margin-right: var(--tp-space-2);
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--tp-border);
  cursor: pointer;
  accent-color: var(--tp-primary);
}

.tp-filter-check__label {
  display: flex;
  align-items: center;
  gap: var(--tp-space-2);
  font-size: var(--tp-font-size-sm);
  color: var(--tp-text-secondary);
  cursor: pointer;
  line-height: 1.4;
  padding: 2px 0;
  flex: 1;
}

.tp-filter-check__label:hover {
  color: var(--tp-text);
}

.tp-filter-check__logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

/* ── Offer card (grid/vertical) ─────────────────────── */
.tp-offer-card {
  position: relative;
  background: var(--tp-surface);
  border: 1px solid var(--tp-border-light);
  border-radius: var(--tp-radius-lg);
  padding: var(--tp-space-5);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--tp-transition-base), transform var(--tp-transition-base), border-color var(--tp-transition-base);
}

.tp-offer-card:hover {
  box-shadow: var(--tp-shadow-md);
  transform: translateY(-3px);
  border-color: var(--tp-border);
}

/* ── Card entrance animation ──────────────────────── */
@keyframes tp-card-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tp-offers-grid .tp-offer-card {
  animation: tp-card-enter 0.45s ease both;
}

.tp-offers-grid .tp-offer-card:nth-child(1)  { animation-delay: 0.00s; }
.tp-offers-grid .tp-offer-card:nth-child(2)  { animation-delay: 0.06s; }
.tp-offers-grid .tp-offer-card:nth-child(3)  { animation-delay: 0.12s; }
.tp-offers-grid .tp-offer-card:nth-child(4)  { animation-delay: 0.18s; }
.tp-offers-grid .tp-offer-card:nth-child(5)  { animation-delay: 0.24s; }
.tp-offers-grid .tp-offer-card:nth-child(6)  { animation-delay: 0.30s; }
.tp-offers-grid .tp-offer-card:nth-child(7)  { animation-delay: 0.36s; }
.tp-offers-grid .tp-offer-card:nth-child(8)  { animation-delay: 0.42s; }
.tp-offers-grid .tp-offer-card:nth-child(9)  { animation-delay: 0.48s; }
.tp-offers-grid .tp-offer-card:nth-child(10) { animation-delay: 0.54s; }
.tp-offers-grid .tp-offer-card:nth-child(11) { animation-delay: 0.60s; }
.tp-offers-grid .tp-offer-card:nth-child(12) { animation-delay: 0.66s; }

/* ── Skeleton shimmer overlay (auto-dismisses) ───────── */
.tp-offers-grid .tp-offer-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 10;
  background: linear-gradient(90deg, var(--tp-surface-alt) 25%, var(--tp-surface-muted) 50%, var(--tp-surface-alt) 75%);
  background-size: 200% 100%;
  border-radius: inherit;
  pointer-events: none;
  animation: tp-shimmer 1.5s linear infinite,
             tp-skeleton-hide 1.8s ease forwards;
}

.tp-offer-card__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #ff6b35, #ff3d00);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: var(--tp-radius-pill);
  z-index: 2;
}

/* ── Featured grid card (same gold accent language as the featured list card) ── */
.tp-offer-card--featured {
  border-color: rgba(var(--tp-gold-rgb), 0.4);
  box-shadow: 0 8px 26px rgba(var(--tp-gold-rgb), 0.10);
  background: var(--fn-body-bg, #ffffff);
}

.tp-offer-card--featured:hover {
  border-color: rgba(var(--tp-gold-rgb), 0.65);
  box-shadow: 0 10px 30px rgba(var(--tp-gold-rgb), 0.16);
}

.tp-offer-card__featured-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: -0.25rem 0 0.75rem;
  padding: 0.35rem 0.9rem 0.35rem 0.5rem;
  /* Clear the absolute top-right type badge */
  padding-right: 4.5rem;
  background: linear-gradient(135deg, var(--tp-gold) 0%, var(--tp-gold-deep) 100%);
  color: var(--tp-gold-text);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(var(--tp-gold-rgb), 0.3);
}

.tp-offer-card__featured-ribbon span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tp-offer-card__featured-ribbon strong {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(74, 49, 3, 0.12);
  border: 1px solid rgba(74, 49, 3, 0.25);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--tp-gold-text);
}

.tp-offer-card__benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--tp-space-3) 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tp-offer-card__benefits li {
  display: flex;
  align-items: center;
  gap: var(--tp-space-2);
  font-size: var(--tp-font-size-xs);
  color: var(--fn-success-text-emphasis, #288b53);
  font-weight: 500;
  line-height: 1.4;
}

.tp-offer-card__benefits li i {
  color: var(--fn-success, #33b36b);
  flex-shrink: 0;
  font-size: 0.8rem;
}

.tp-offer-card__header {
  display: flex;
  align-items: center;
  gap: var(--tp-space-3);
  margin-bottom: var(--tp-space-3);
}

.tp-offer-card__logo {
  width: 52px;
  height: 52px;
  border-radius: var(--tp-radius-md);
  overflow: hidden;
  background: var(--tp-surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tp-offer-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.tp-offer-card__logo--placeholder {
  background: var(--tp-primary-light);
  color: var(--tp-primary);
  font-weight: 700;
  font-size: 1rem;
}

.tp-offer-card__provider {
  font-size: var(--tp-font-size-xs);
  color: var(--tp-text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tp-offer-card__name {
  font-size: var(--tp-font-size-base);
  font-weight: 600;
  margin: 0 0 var(--tp-space-3) 0;
  line-height: 1.35;
}

.tp-offer-card__name a {
  color: var(--tp-text);
  text-decoration: none;
}

.tp-offer-card__name a:hover {
  color: var(--tp-primary);
}

.tp-offer-card__price-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 2px;
}

.tp-offer-card__price {
  font-size: var(--tp-font-size-3xl);
  font-weight: 700;
  color: var(--tp-primary);
  line-height: 1.1;
}

.tp-offer-card__price--na {
  font-size: var(--tp-font-size-sm);
  color: var(--tp-text-muted);
  font-weight: 400;
  font-style: italic;
}

.tp-offer-card__period {
  font-size: var(--tp-font-size-sm);
  color: var(--tp-text-secondary);
  font-weight: 400;
}

.tp-offer-card__original {
  font-size: var(--tp-font-size-sm);
  color: var(--tp-text-muted);
  text-decoration: line-through;
  margin-bottom: 2px;
}

.tp-offer-card__note {
  font-size: var(--tp-font-size-xs);
  color: var(--tp-success);
  font-weight: 500;
  margin-bottom: var(--tp-space-2);
}

.tp-offer-card__features {
  list-style: none;
  padding: 0;
  margin: var(--tp-space-3) 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.tp-offer-card__features li {
  display: flex;
  align-items: center;
  gap: var(--tp-space-2);
  font-size: var(--tp-font-size-xs);
  color: var(--tp-text-secondary);
  line-height: 1.4;
}

.tp-offer-card__features li i {
  color: var(--tp-success);
  flex-shrink: 0;
  font-size: 0.8rem;
}

.tp-offer-card__info {
  font-size: var(--tp-font-size-xs);
  color: var(--tp-text-muted);
  margin: 0 0 var(--tp-space-3) 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tp-offer-card__actions {
  display: flex;
  flex-direction: column;
  gap: var(--tp-space-2);
  margin-top: auto;
  padding-top: var(--tp-space-3);
  border-top: 1px solid var(--tp-border-light);
}

.tp-offer-card__btn-primary,
.tp-offer-card__btn-secondary {
  width: 100%;
}

/* ── Offer card (list/horizontal) ───────────────────── */
.tp-offer-card-list {
  position: relative;
  background: var(--tp-surface);
  border: 1px solid var(--tp-border-light);
  border-radius: var(--tp-radius-lg);
  padding: var(--tp-space-4);
  display: flex;
  gap: var(--tp-space-4);
  align-items: center;
  transition: box-shadow var(--tp-transition-base), border-color var(--tp-transition-base);
}

.tp-offer-card-list:hover {
  box-shadow: var(--tp-shadow-sm);
  border-color: var(--tp-border);
}

/* ── List card entrance (all at once, no stagger) ──── */
.tp-offers-list .tp-offer-card-list {
  animation: tp-card-enter 0.45s ease both;
}

.tp-offers-list .tp-offer-card-list::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 10;
  background: linear-gradient(90deg, var(--tp-surface-alt) 25%, var(--tp-surface-muted) 50%, var(--tp-surface-alt) 75%);
  background-size: 200% 100%;
  border-radius: inherit;
  pointer-events: none;
  animation: tp-shimmer 1.5s linear infinite,
             tp-skeleton-hide 1.8s ease forwards;
}

.tp-offer-card-list__logo {
  width: 64px;
  height: 64px;
  border-radius: var(--tp-radius-md);
  overflow: hidden;
  background: var(--tp-surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tp-offer-card-list__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.tp-offer-card-list__logo span {
  font-weight: 700;
  color: var(--tp-primary);
  font-size: 1.1rem;
}

.tp-offer-card-list__body {
  display: flex;
  flex: 1;
  align-items: center;
  gap: var(--tp-space-4);
  min-width: 0;
}

.tp-offer-card-list__info {
  flex: 1;
  min-width: 0;
}

.tp-offer-card-list__provider {
  font-size: var(--tp-font-size-xs);
  color: var(--tp-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 500;
}

.tp-offer-card-list__name {
  font-size: var(--tp-font-size-base);
  font-weight: 600;
  margin: 2px 0 var(--tp-space-2) 0;
}

.tp-offer-card-list__name a {
  color: var(--tp-text);
  text-decoration: none;
}

.tp-offer-card-list__name a:hover {
  color: var(--tp-primary);
}

.tp-offer-card-list__features {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: var(--tp-font-size-xs);
  color: var(--tp-text-secondary);
}

.tp-offer-card-list__pricing {
  text-align: right;
  flex-shrink: 0;
  min-width: 100px;
}

.tp-offer-card-list__price {
  font-size: var(--tp-font-size-2xl);
  font-weight: 700;
  color: var(--tp-primary);
  line-height: 1.1;
}

.tp-offer-card-list__period {
  font-size: var(--tp-font-size-xs);
  color: var(--tp-text-secondary);
  font-weight: 400;
}

.tp-offer-card-list__original {
  font-size: var(--tp-font-size-xs);
  color: var(--tp-text-muted);
  text-decoration: line-through;
}

.tp-offer-card-list__note {
  font-size: var(--tp-font-size-xs);
  color: var(--tp-success);
  font-weight: 500;
}

.tp-offer-card-list__actions {
  display: flex;
  flex-direction: column;
  gap: var(--tp-space-2);
  flex-shrink: 0;
}

/* ── Offers grid layout (modern card grid) ──────────── */
.tp-offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--tp-space-5);
}

@media (min-width: 768px) {
  .tp-offers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .tp-offers-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Offers list layout ────────────────────────────── */
.tp-offers-list {
  display: flex;
  flex-direction: column;
  gap: var(--tp-space-3);
}

/* ── Pagination (modern) ───────────────────────────── */
.tp-pagination .pagination {
  gap: 4px;
}

.tp-pagination .page-link {
  border-radius: var(--tp-radius-md);
  border: 1px solid var(--tp-border-light);
  color: var(--tp-text);
  font-size: var(--tp-font-size-sm);
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  transition: color var(--tp-transition-fast), background-color var(--tp-transition-fast), border-color var(--tp-transition-fast), box-shadow var(--tp-transition-fast), opacity var(--tp-transition-fast), transform var(--tp-transition-fast);
  min-width: 38px;
  text-align: center;
}

.tp-pagination .page-link:hover {
  background-color: var(--tp-primary-light);
  color: var(--tp-primary);
  border-color: var(--tp-primary);
  z-index: 1;
}

.tp-pagination .page-item.active .page-link {
  background-color: var(--tp-primary);
  border-color: var(--tp-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.25);
}

.tp-pagination .page-item.disabled .page-link {
  color: var(--tp-text-muted);
  pointer-events: none;
  background: transparent;
  border-color: var(--tp-border-light);
}

/* ── Empty state (offers) ──────────────────────────── */
.tp-empty-state {
  text-align: center;
  padding: var(--tp-space-8) var(--tp-space-4);
  background: var(--tp-surface);
  border-radius: var(--tp-radius-lg);
  border: 1px solid var(--tp-border-light);
}

.tp-empty-state i {
  font-size: 3rem;
  color: var(--tp-text-muted);
  margin-bottom: var(--tp-space-4);
  display: block;
}

.tp-empty-state h3 {
  font-size: var(--tp-font-size-xl);
  color: var(--tp-text);
  margin-bottom: var(--tp-space-2);
}

.tp-empty-state p {
  color: var(--tp-text-secondary);
  max-width: 400px;
  margin: 0 auto;
  font-size: var(--tp-font-size-sm);
}

/* ── Responsive adjustments ────────────────────────── */
@media (max-width: 991.98px) {
  .tp-offer-card-list__body {
    flex-wrap: wrap;
  }

  .tp-offer-card-list__pricing {
    text-align: left;
    min-width: auto;
  }

  .tp-offer-card-list__actions {
    flex-direction: row;
    width: 100%;
  }

  .tp-offer-card-list__actions .btn {
    flex: 1;
  }
}

@media (max-width: 575.98px) {
  .tp-offer-card {
    padding: var(--tp-space-4);
  }

  .tp-offer-card__price {
    font-size: var(--tp-font-size-2xl);
  }

  .tp-offer-card-list {
    flex-direction: column;
    align-items: stretch;
  }

  .tp-offer-card-list__logo {
    width: 48px;
    height: 48px;
  }

  .tp-offer-card-list__body {
    flex-direction: column;
    align-items: stretch;
    gap: var(--tp-space-3);
  }

  .tp-offer-card-list__pricing {
    text-align: left;
  }

  .tp-offer-card-list__actions {
    flex-direction: row;
  }

  .tp-offer-card-list__actions .btn {
    flex: 1;
    font-size: var(--tp-font-size-xs);
  }
}

/* ── Internet list card specifics ─────────────────────────── */
.public-layout .tp-offer-card-list__description {
  margin: 0.5rem 0 0;
  color: var(--tp-text-muted);
  font-size: var(--tp-font-size-xs);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.public-layout .tp-offer-card-list__promo-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--tp-radius-pill);
  background: #ff5722;
  color: #fff;
  font-size: var(--tp-font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
}

.public-layout .tp-offer-card-list__price--na {
  font-size: var(--tp-font-size-sm);
  color: var(--tp-text-muted);
  font-weight: 600;
}

.public-layout .tp-offer-card-list--internet .tp-offer-card-list__btn {
  min-height: 44px;
  white-space: nowrap;
}

/* ── Offer details modal (shared Internet/Energia) ────────── */
.tp-offer-details-modal .modal-body {
  padding: var(--tp-space-4);
}

.tp-offer-details-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 0;
  color: var(--tp-text-secondary);
}

.tp-offer-modal-body {
  display: flex;
  flex-direction: column;
  gap: var(--tp-space-3);
}

.tp-offer-modal-body__hero {
  display: flex;
  align-items: center;
  gap: var(--tp-space-3);
}

.tp-offer-modal-body__logo {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: var(--tp-radius-md);
  overflow: hidden;
  background: var(--tp-surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tp-offer-modal-body__logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 8px;
}

.tp-offer-modal-body__logo span {
  font-weight: 700;
  color: var(--tp-primary);
}

.tp-offer-modal-body__provider {
  font-weight: 600;
  color: var(--tp-text-secondary);
}

.tp-offer-modal-body__price-card {
  background: linear-gradient(135deg, #eef2ff 0%, #ffffff 100%);
  border: 1px solid var(--tp-border-light);
  border-radius: var(--tp-radius-md);
  padding: var(--tp-space-3);
  text-align: center;
}

.tp-offer-modal-body__price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--tp-primary);
  line-height: 1.1;
}

.tp-offer-modal-body__price--na {
  color: var(--tp-text-secondary);
  font-size: 1.1rem;
  font-weight: 600;
}

.tp-offer-modal-body__period {
  font-size: 1rem;
  color: var(--tp-text-secondary);
  font-weight: 400;
}

.tp-offer-modal-body__features {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tp-offer-modal-body__features div {
  background: var(--tp-surface-alt);
  border-radius: var(--tp-radius-md);
  padding: 0.5rem 0.75rem;
}

.tp-offer-modal-body__features dt {
  font-weight: 600;
  color: var(--tp-text-secondary);
  font-size: var(--tp-font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tp-offer-modal-body__features dd {
  margin: 0.25rem 0 0;
  font-weight: 600;
}

.tp-offer-modal-body__section h4 {
  margin-bottom: 0.5rem;
}

.tp-offer-modal-body__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tp-space-2);
  align-items: center;
  margin-top: var(--tp-space-2);
}

.tp-offer-modal-body__actions .btn {
  min-height: 44px;
}

/* ── Scroll margin for anchor targets ───────────────────── */
[id] {
  scroll-margin-top: 80px;
}

/* ── Touch target sizing ────────────────────────────────── */
@media (pointer: coarse) {
  .nav-link,
  .btn,
  .dropdown-item,
  .page-link,
  .tp-footer__link-list a,
  .tp-footer__contact-list a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .form-control,
  .form-select {
    min-height: 44px;
  }
}

/* ════════════════════════════════════════════════════════════
   Dashboard (Client Area) Components
   ════════════════════════════════════════════════════════════ */

/* ── Dashboard hero ───────────────────────────────────── */
.db-hero {
  background: linear-gradient(135deg, var(--tp-primary) 0%, #0b5ed7 100%);
  border-radius: var(--tp-radius-lg);
  padding: var(--tp-space-6);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.db-hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.db-hero h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--tp-space-1);
}

.db-hero p {
  opacity: 0.9;
  font-size: var(--tp-font-size-sm);
  margin-bottom: var(--tp-space-4);
}

@media (min-width: 768px) {
  .db-hero {
    padding: var(--tp-space-8);
  }

  .db-hero h1 {
    font-size: 1.75rem;
  }
}

/* ── Dashboard stat cards ──────────────────────────────── */
.db-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--tp-space-3);
}

@media (min-width: 576px) {
  .db-stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.db-stat-card {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--tp-radius-md);
  padding: var(--tp-space-4);
  text-align: center;
  backdrop-filter: blur(4px);
  transition: background var(--tp-transition-fast);
}

.db-stat-card:hover {
  background: rgba(255, 255, 255, 0.18);
}

.db-stat-card__value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.db-stat-card__label {
  font-size: var(--tp-font-size-xs);
  opacity: 0.8;
  margin-top: var(--tp-space-1);
}

@media (min-width: 768px) {
  .db-stat-card__value {
    font-size: 1.75rem;
  }
}

/* ── Dashboard tabs ────────────────────────────────────── */
.db-tabs {
  display: flex;
  gap: var(--tp-space-1);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  white-space: nowrap;
  padding-bottom: var(--tp-space-1);
  border-bottom: 2px solid var(--tp-border-light);
  margin-bottom: var(--tp-space-6);
}

.db-tabs::-webkit-scrollbar {
  display: none;
}

.db-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--tp-space-2);
  padding: var(--tp-space-3) var(--tp-space-4);
  font-size: var(--tp-font-size-sm);
  font-weight: 500;
  color: var(--tp-text-secondary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color var(--tp-transition-fast), background-color var(--tp-transition-fast), border-color var(--tp-transition-fast), box-shadow var(--tp-transition-fast), opacity var(--tp-transition-fast), transform var(--tp-transition-fast);
  border-radius: var(--tp-radius-md) var(--tp-radius-md) 0 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.db-tab:hover {
  color: var(--tp-text);
  background-color: var(--tp-primary-light);
}

.db-tab.active {
  color: var(--tp-primary);
  border-bottom-color: var(--tp-primary);
  font-weight: 600;
}

.db-tab i {
  font-size: 1rem;
}

@media (max-width: 575.98px) {
  .db-tab {
    padding: var(--tp-space-3) var(--tp-space-3);
    font-size: var(--tp-font-size-xs);
  }
}

/* ── Dashboard panel ───────────────────────────────────── */
.db-panel {
  display: none;
}

.db-panel.active {
  display: block;
  animation: db-fade-in 250ms ease;
}

@keyframes db-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Order cards ───────────────────────────────────────── */
.order-card {
  border: 1px solid var(--tp-border-light);
  border-radius: var(--tp-radius-lg);
  padding: var(--tp-space-5);
  background: var(--tp-surface);
  transition: box-shadow var(--tp-transition-base);
}

.order-card:hover {
  box-shadow: var(--tp-shadow-md);
}

.order-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--tp-space-3);
  margin-bottom: var(--tp-space-4);
}

.order-card__id {
  font-size: var(--tp-font-size-xs);
  color: var(--tp-text-muted);
  font-weight: 500;
}

.order-card__offer {
  font-weight: 600;
  color: var(--tp-text);
  margin-bottom: var(--tp-space-1);
}

.order-card__type {
  display: inline-flex;
  align-items: center;
  gap: var(--tp-space-1);
  font-size: var(--tp-font-size-xs);
  color: var(--tp-text-secondary);
  text-transform: capitalize;
}

.order-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tp-space-4);
  font-size: var(--tp-font-size-sm);
  color: var(--tp-text-secondary);
  margin-bottom: var(--tp-space-4);
  padding-top: var(--tp-space-3);
  border-top: 1px solid var(--tp-border-light);
}

.order-card__meta-item {
  display: flex;
  align-items: center;
  gap: var(--tp-space-2);
}

.order-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tp-space-2);
}

/* ── Referral progress ─────────────────────────────────── */
.ref-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: var(--tp-space-5);
}

.ref-progress__step {
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
  position: relative;
  flex: 1;
}

.ref-progress__step:last-child {
  flex: 0 0 auto;
}

.ref-progress__circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--tp-font-size-sm);
  font-weight: 600;
  background-color: var(--tp-surface-alt);
  color: var(--tp-text-muted);
  border: 2px solid var(--tp-border);
  transition: color var(--tp-transition-base), background-color var(--tp-transition-base), border-color var(--tp-transition-base), box-shadow var(--tp-transition-base), opacity var(--tp-transition-base), transform var(--tp-transition-base);
  z-index: 1;
}

.ref-progress__step--completed .ref-progress__circle {
  background-color: var(--tp-success);
  border-color: var(--tp-success);
  color: #fff;
}

.ref-progress__step--active .ref-progress__circle {
  background-color: var(--tp-primary);
  border-color: var(--tp-primary);
  color: #fff;
}

.ref-progress__label {
  font-size: var(--tp-font-size-xs);
  color: var(--tp-text-secondary);
  margin-top: var(--tp-space-2);
  max-width: 80px;
}

.ref-progress__step--completed .ref-progress__label {
  color: var(--tp-success);
  font-weight: 500;
}

.ref-progress__step--active .ref-progress__label {
  color: var(--tp-primary);
  font-weight: 500;
}

.ref-progress__connector {
  flex: 1;
  height: 2px;
  background-color: var(--tp-border);
  margin: 0 var(--tp-space-1);
  margin-bottom: var(--tp-space-8);
}

.ref-progress__step--completed + .ref-progress__connector {
  background-color: var(--tp-success);
}

.ref-progress__step--active + .ref-progress__connector {
  background-color: var(--tp-primary);
}

@media (max-width: 575.98px) {
  .ref-progress__label {
    font-size: 0.625rem;
    max-width: 60px;
  }

  .ref-progress__circle {
    width: 32px;
    height: 32px;
    font-size: var(--tp-font-size-xs);
  }

  .ref-progress__connector {
    margin-bottom: calc(var(--tp-space-6) + 4px);
  }
}

/* ── Referral code display ─────────────────────────────── */
.ref-code {
  display: inline-flex;
  align-items: center;
  gap: var(--tp-space-3);
  background: var(--tp-primary-light);
  border: 2px dashed var(--tp-primary);
  border-radius: var(--tp-radius-md);
  padding: var(--tp-space-3) var(--tp-space-5);
  font-family: 'Courier New', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--tp-primary);
  cursor: pointer;
  transition: color var(--tp-transition-fast), background-color var(--tp-transition-fast), border-color var(--tp-transition-fast), box-shadow var(--tp-transition-fast), opacity var(--tp-transition-fast), transform var(--tp-transition-fast);
  user-select: all;
}

.ref-code:hover {
  background: rgba(13, 110, 253, 0.12);
}

.ref-code--copied {
  background: var(--tp-success-light);
  border-color: var(--tp-success);
  color: var(--tp-success);
}

.ref-code .ref-code__icon {
  font-size: 1rem;
}

/* ── Share buttons ─────────────────────────────────────── */
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tp-space-2);
}

.share-buttons .btn {
  flex: 1;
  min-width: 120px;
}

/* ── Credential management ─────────────────────────────── */
.cred-section {
  border: 1px solid var(--tp-border-light);
  border-radius: var(--tp-radius-lg);
  padding: var(--tp-space-5);
  margin-bottom: var(--tp-space-4);
}

.cred-section:last-child {
  margin-bottom: 0;
}

.cred-section__header {
  display: flex;
  align-items: flex-start;
  gap: var(--tp-space-4);
  margin-bottom: var(--tp-space-4);
}

.cred-section__icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--tp-radius-md);
  background: var(--tp-primary-light);
  color: var(--tp-primary);
  font-size: 1.25rem;
}

.cred-section__title {
  font-weight: 600;
  margin-bottom: var(--tp-space-1);
}

.cred-section__desc {
  font-size: var(--tp-font-size-sm);
  color: var(--tp-text-secondary);
  margin: 0;
}

/* ── Flash messages ────────────────────────────────────── */
.db-flash {
  animation: db-slide-down 300ms ease;
}

@keyframes db-slide-down {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── GDPR tools card ──────────────────────────────────── */
.gdpr-tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tp-space-3);
}

@media (max-width: 575.98px) {
  .gdpr-tools .btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* ════════════════════════════════════════════════════════════
   Referral System Components
   ════════════════════════════════════════════════════════════ */

/* ── Referral landing page ───────────────────────────── */
.ref-landing-hero {
  background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
  border-radius: var(--tp-radius-lg);
  padding: var(--tp-space-8);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ref-landing-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.ref-landing-hero__icon {
  font-size: 3rem;
  margin-bottom: var(--tp-space-4);
  display: block;
}

.ref-landing-hero h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--tp-space-3);
}

.ref-landing-hero p {
  font-size: var(--tp-font-size-lg);
  opacity: 0.9;
  max-width: 500px;
  margin: 0 auto var(--tp-space-5);
}

@media (min-width: 768px) {
  .ref-landing-hero {
    padding: var(--tp-space-10);
  }

  .ref-landing-hero h1 {
    font-size: 2.25rem;
  }
}

/* ── Reward showcase card ─────────────────────────────── */
.ref-reward-card {
  border: 2px solid var(--tp-primary);
  border-radius: var(--tp-radius-lg);
  padding: var(--tp-space-6);
  text-align: center;
  background: var(--tp-surface);
  max-width: 400px;
  margin: -3rem auto var(--tp-space-6);
  position: relative;
  z-index: 2;
  box-shadow: var(--tp-shadow-lg);
}

.ref-reward-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--tp-primary-light);
  color: var(--tp-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto var(--tp-space-4);
}

.ref-reward-card__value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--tp-primary);
  line-height: 1.2;
}

.ref-reward-card__label {
  font-size: var(--tp-font-size-sm);
  color: var(--tp-text-secondary);
  margin-top: var(--tp-space-1);
}

.ref-reward-card__desc {
  font-size: var(--tp-font-size-sm);
  color: var(--tp-text-secondary);
  margin-top: var(--tp-space-4);
  padding-top: var(--tp-space-4);
  border-top: 1px solid var(--tp-border-light);
}

@media (max-width: 575.98px) {
  .ref-reward-card {
    margin-left: var(--tp-space-4);
    margin-right: var(--tp-space-4);
    padding: var(--tp-space-5);
  }

  .ref-reward-card__value {
    font-size: 2rem;
  }
}

/* ── Referral history list ───────────────────────────── */
.ref-history-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--tp-space-3);
  padding: var(--tp-space-4);
  border: 1px solid var(--tp-border-light);
  border-radius: var(--tp-radius-md);
  transition: background var(--tp-transition-fast);
}

.ref-history-item:hover {
  background: var(--tp-surface-muted);
}

.ref-history-item__info {
  flex: 1;
  min-width: 0;
}

.ref-history-item__name {
  font-weight: 500;
  font-size: var(--tp-font-size-sm);
  color: var(--tp-text);
}

.ref-history-item__email {
  font-size: var(--tp-font-size-xs);
  color: var(--tp-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ref-history-item__date {
  font-size: var(--tp-font-size-xs);
  color: var(--tp-text-muted);
}

/* ── Invite form ──────────────────────────────────────── */
.ref-invite-form {
  background: var(--tp-surface-muted);
  border-radius: var(--tp-radius-lg);
  padding: var(--tp-space-5);
  border: 1px solid var(--tp-border-light);
}

.ref-invite-form .form-label {
  font-weight: 500;
}

/* ── Status dot for tables ────────────────────────────── */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: var(--tp-space-2);
  flex-shrink: 0;
}

.status-dot--success {
  background-color: var(--tp-success);
}

.status-dot--warning {
  background-color: var(--tp-warning);
}

.status-dot--danger {
  background-color: var(--tp-danger);
}

.status-dot--info {
  background-color: var(--tp-info);
}

.status-dot--muted {
  background-color: var(--tp-text-muted);
}

/* ── Offers view toggle (fieldset-based, hidden until JS ready) ── */
[data-offers-toggle][hidden] {
  display: none !important;
}

/* ── Unified list card (shared by Internet/Energia/Prestito) ──── */
.tp-offers-list--cards {
  display: flex;
  flex-direction: column;
  gap: var(--tp-space-3, 0.75rem);
}

.tp-offer-card--list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--tp-space-4, 1rem);
  padding: var(--tp-space-4, 1rem);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-lg);
  background: var(--tp-surface);
}

.tp-offer-card--list .tp-offer-card__identity {
  display: flex;
  align-items: center;
  gap: var(--tp-space-3, 0.75rem);
  min-width: 0;
}

.tp-offer-card__logo--sm {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.tp-offer-card__logo--sm img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tp-offer-card__logo--placeholder.tp-offer-card__logo--sm span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-weight: 700;
  color: var(--tp-text-secondary);
}

.tp-offer-card__provider-name {
  min-width: 0;
}

.tp-offer-card--list .tp-offer-card__name {
  margin: 0;
  font-size: var(--tp-font-size-base, 1rem);
}

.tp-offer-card--list .tp-offer-card__provider {
  font-size: var(--tp-font-size-xs, 0.75rem);
  color: var(--tp-text-secondary);
}

.tp-offer-card__features--sm {
  list-style: none;
  margin: 0.375rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
}

.tp-offer-card__features--sm li {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: var(--tp-font-size-xs, 0.75rem);
  color: var(--tp-text-secondary);
}

.tp-offer-card--list .tp-offer-card__price {
  text-align: right;
  white-space: nowrap;
}

.tp-offer-card--list .tp-offer-card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  align-items: flex-end;
}

.tp-offer-card--list .tp-offer-card__btn-primary,
.tp-offer-card--list .tp-offer-card__btn-secondary {
  min-height: 44px;
  white-space: nowrap;
}

/* Tablet: actions stay visible, info may wrap */
@media (max-width: 991.98px) {
  .tp-offer-card--list {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .tp-offer-card--list .tp-offer-card__price {
    grid-column: 1 / -1;
    text-align: left;
  }
}

/* Mobile: full stack, full-width actions */
@media (max-width: 575.98px) {
  .tp-offer-card--list {
    grid-template-columns: 1fr;
    gap: var(--tp-space-3, 0.75rem);
  }
  .tp-offer-card--list .tp-offer-card__price {
    text-align: left;
  }
  .tp-offer-card--list .tp-offer-card__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .tp-offer-card--list .tp-offer-card__btn-primary,
  .tp-offer-card--list .tp-offer-card__btn-secondary {
    width: 100%;
    min-height: 48px;
  }
}

/* WCAG AA contrast fix: darken primary for white text on buttons (3.8:1 → 5.2:1) */
.btn-primary {
  background-color: #b93c3c !important;
  border-color: #b93c3c !important;
}
.btn-primary:hover, .btn-primary:focus {
  background-color: #a33333 !important;
  border-color: #a33333 !important;
}
.btn-outline-primary {
  color: #b93c3c !important;
  border-color: #b93c3c !important;
}
.btn-outline-primary:hover, .btn-outline-primary:focus {
  background-color: #b93c3c !important;
  border-color: #b93c3c !important;
  color: #fff !important;
}

/* WCAG AA: text-white-75 utility (Bootstrap only has -50) */
.text-white-75 {
  color: rgba(255, 255, 255, 0.75) !important;
}
