/* ============================================================
   TOUVERA — Base layer
   Replaces the old theme base (style.css / responsive.css / rtl.css).
   Source of truth: touvera_subpages_v1 design tokens.
   Loaded after bootstrap + vendor CSS, before touvera-redesign.css.

   Contents:
     1.  Tokens
     2.  Reset & typography
     3.  Layout
     4.  Buttons
     5.  Forms & vendor form widgets
     6.  Surfaces: cards, tables, badges, alerts, modals
     7.  Navigation: header, mobile drawer, breadcrumbs, pagination, tabs
     8.  Footer
     9.  Legacy theme classes (kept usable-but-plain until redesigned)
     10. Chrome: preloader, go-top, whatsapp, toastr
   ============================================================ */

/* ============================================================
   1. TOKENS
   ============================================================ */
:root {
  --tv-teal-900: #06332C;
  --tv-teal-800: #074A3F;
  --tv-teal-700: #0A6153;
  --tv-teal-600: #0E7C6B;
  --tv-teal-500: #159E89;
  --tv-teal-100: #D9F0EB;
  --tv-teal-50:  #EDF7F4;

  --tv-ink-900: #12211D;
  --tv-ink-700: #33453F;
  --tv-ink-500: #5B6E68;
  --tv-ink-400: #82918C;
  --tv-line:    #E2EAE7;
  --tv-bg:      #F8FAF9;
  --tv-surface: #FFFFFF;
  --tv-sand-50: #FAF7F0;

  --tv-success: #177E5C;
  --tv-warning: #B45309;
  --tv-error:   #C2352B;
  --tv-info:    #1D4ED8;
  --tv-gold:    #E3A82B;

  --tv-radius-s: 10px;
  --tv-radius-m: 14px;
  --tv-radius-l: 20px;
  --tv-radius-pill: 999px;

  --tv-shadow-s: 0 1px 2px rgba(18,33,29,.05);
  --tv-shadow-m: 0 2px 6px rgba(18,33,29,.05), 0 12px 32px rgba(18,33,29,.08);
  --tv-shadow-l: 0 4px 12px rgba(18,33,29,.06), 0 24px 64px rgba(18,33,29,.12);

  --tv-container: 1200px;
  --tv-header-h: 76px;
  --tv-font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* bootstrap overrides */
  --bs-body-font-family: var(--tv-font);
  --bs-body-color: var(--tv-ink-900);
  --bs-body-bg: var(--tv-bg);
  --bs-border-color: var(--tv-line);
  --bs-link-color: var(--tv-teal-700);
  --bs-link-hover-color: var(--tv-teal-800);
  --bs-primary: var(--tv-teal-600);
  --bs-border-radius: var(--tv-radius-s);
}

/* ============================================================
   2. RESET & TYPOGRAPHY
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--tv-font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--tv-ink-900);
  background: var(--tv-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* clip, not hidden — `hidden` on body breaks position:sticky for the header */
  overflow-x: clip;
}
body.tv-no-scroll { overflow: hidden; }

img, svg, video { max-width: 100%; height: auto; }
img { display: block; }

a { color: inherit; text-decoration: none; transition: color .18s; }
a:hover { color: var(--tv-teal-700); }

button { font-family: inherit; cursor: pointer; }

ul, ol { margin: 0; padding: 0; }
ul { list-style: none; }
p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 14px;
  font-family: var(--tv-font);
  font-weight: 700;
  line-height: 1.4;
  color: var(--tv-ink-900);
  letter-spacing: -.01em;
}
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(22px, 2.6vw, 30px); }
h3 { font-size: clamp(19px, 2vw, 23px); }
h4 { font-size: 18px; }
h5 { font-size: 16.5px; }
h6 { font-size: 15px; }

small { font-size: 13.5px; }
hr { border: 0; border-top: 1px solid var(--tv-line); opacity: 1; margin: 24px 0; }

::selection { background: var(--tv-teal-100); color: var(--tv-teal-900); }
:focus-visible { outline: 3px solid var(--tv-teal-500); outline-offset: 2px; border-radius: 6px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--tv-bg); }
::-webkit-scrollbar-thumb { background: #CBD8D4; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--tv-ink-400); }

.tv-skip-link {
  position: absolute; top: -60px; inset-inline-end: 16px; z-index: 200;
  background: var(--tv-teal-800); color: #fff; padding: 10px 18px;
  border-radius: var(--tv-radius-s); transition: top .2s;
}
.tv-skip-link:focus { top: 12px; color: #fff; }

/* ============================================================
   3. LAYOUT
   ============================================================ */
.container, .container-lg, .container-xl { max-width: var(--tv-container); }
@media (min-width: 1400px) { .container, .container-xxl { max-width: var(--tv-container); } }

.tv-container { max-width: var(--tv-container); margin-inline: auto; padding-inline: 24px; }

.main-wrapper { min-height: 40vh; }

.tv-section { padding: 72px 0; }
.tv-section-sm { padding: 48px 0; }
.tv-surface { background: var(--tv-surface); }

@media (max-width: 768px) {
  .tv-section { padding: 52px 0; }
}

/* ============================================================
   4. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border: 1.5px solid transparent;
  border-radius: var(--tv-radius-m);
  font-size: 15px; font-weight: 600; line-height: 1.4;
  white-space: nowrap;
  transition: background .18s, border-color .18s, color .18s, box-shadow .18s, transform .12s;
}
.btn:active { transform: scale(.985); }
.btn:disabled, .btn.disabled { opacity: .55; pointer-events: none; }

.btn-primary,
.btn.btn-primary {
  background: var(--tv-teal-600);
  border-color: var(--tv-teal-600);
  color: #fff;
  box-shadow: 0 6px 16px rgba(14,124,107,.25);
}
.btn-primary:hover, .btn-primary:focus,
.btn.btn-primary:hover, .btn.btn-primary:focus {
  background: var(--tv-teal-700);
  border-color: var(--tv-teal-700);
  color: #fff;
  box-shadow: 0 8px 22px rgba(14,124,107,.32);
}

.btn-secondary, .btn-ghost {
  background: var(--tv-teal-50);
  border-color: var(--tv-teal-100);
  color: var(--tv-teal-800);
}
.btn-secondary:hover, .btn-ghost:hover {
  background: var(--tv-teal-100);
  border-color: var(--tv-teal-100);
  color: var(--tv-teal-900);
}

.btn-outline, .btn-outline-primary, .btn-login {
  background: var(--tv-surface);
  border-color: var(--tv-line);
  color: var(--tv-teal-800);
}
.btn-outline:hover, .btn-outline-primary:hover, .btn-login:hover {
  background: var(--tv-teal-50);
  border-color: var(--tv-teal-500);
  color: var(--tv-teal-800);
}

.btn-dark { background: var(--tv-teal-900); border-color: var(--tv-teal-900); color: #fff; }
.btn-dark:hover { background: var(--tv-teal-800); border-color: var(--tv-teal-800); color: #fff; }

.btn-danger { background: var(--tv-error); border-color: var(--tv-error); color: #fff; }
.btn-danger:hover { background: #A62B22; border-color: #A62B22; color: #fff; }

.btn-success { background: var(--tv-success); border-color: var(--tv-success); color: #fff; }
.btn-success:hover { background: #12654A; border-color: #12654A; color: #fff; }

.btn-link { background: none; border: none; color: var(--tv-teal-700); padding: 0; box-shadow: none; }
.btn-link:hover { color: var(--tv-teal-800); text-decoration: underline; }

.btn-xs, .btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-lg { padding: 15px 28px; font-size: 16.5px; }
.btn-block, .btn-full { width: 100%; }

/* legacy radius helpers from the old theme */
.radius-xsm { border-radius: var(--tv-radius-s) !important; }
.radius-sm  { border-radius: var(--tv-radius-m) !important; }
.radius-md  { border-radius: var(--tv-radius-l) !important; }
.radius-lg  { border-radius: 26px !important; }
.radius-pill, .rounded-pill { border-radius: var(--tv-radius-pill) !important; }

.tv-icon-btn {
  width: 44px; height: 44px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--tv-radius-m);
  border: 1.5px solid var(--tv-line);
  background: var(--tv-surface);
  color: var(--tv-ink-700);
  transition: border-color .18s, background .18s, color .18s;
}
.tv-icon-btn:hover { border-color: var(--tv-teal-500); background: var(--tv-teal-50); color: var(--tv-teal-800); }
.tv-icon-btn svg { width: 22px; height: 22px; }

/* ============================================================
   5. FORMS
   ============================================================ */
label, .form-label {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 14px; font-weight: 600;
  color: var(--tv-ink-700);
}

.form-control,
.form-select,
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="tel"], input[type="url"], input[type="search"], input[type="date"],
input[type="time"], textarea, select {
  width: 100%;
  padding: 12px 16px;
  font-family: inherit; font-size: 15px; font-weight: 500; line-height: 1.5;
  color: var(--tv-ink-900);
  background: var(--tv-surface);
  border: 1.5px solid var(--tv-line);
  border-radius: var(--tv-radius-m);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.form-control::placeholder, input::placeholder, textarea::placeholder { color: var(--tv-ink-400); }

.form-control:focus, .form-select:focus,
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--tv-teal-500);
  background: var(--tv-surface);
  box-shadow: 0 0 0 3px rgba(21,158,137,.14);
}
.form-control:disabled, input:disabled, select:disabled, textarea:disabled {
  background: var(--tv-bg); color: var(--tv-ink-400); cursor: not-allowed;
}
textarea, textarea.form-control { min-height: 130px; resize: vertical; }

input[type="file"] {
  width: 100%;
  padding: 9px 12px;
  font-size: 14.5px;
  color: var(--tv-ink-700);
  background: var(--tv-bg);
  border: 1.5px dashed var(--tv-line);
  border-radius: var(--tv-radius-m);
  cursor: pointer;
}
input[type="file"]::file-selector-button {
  margin-inline-end: 12px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--tv-radius-s);
  background: var(--tv-teal-50);
  color: var(--tv-teal-800);
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--tv-teal-100); }

input[type="checkbox"], input[type="radio"] {
  width: 18px; height: 18px; accent-color: var(--tv-teal-600);
  vertical-align: middle; cursor: pointer;
}
.form-check-input:checked { background-color: var(--tv-teal-600); border-color: var(--tv-teal-600); }

.form-group { margin-bottom: 20px; }
.invalid-feedback, .text-danger, .error { color: var(--tv-error); font-size: 13.5px; }
.is-invalid, .form-control.is-invalid { border-color: var(--tv-error); }

.input-inline {
  display: flex; align-items: center; gap: 8px;
  background: var(--tv-surface);
  border: 1.5px solid var(--tv-line);
  border-radius: var(--tv-radius-m);
  padding: 6px;
}
.input-inline .form-control, .input-inline input { border: none; box-shadow: none; padding: 8px 12px; }
.input-inline .form-control:focus, .input-inline input:focus { box-shadow: none; }

/* --- vendor widgets: nice-select / select2 / daterangepicker / timepicker --- */
.nice-select {
  display: flex; align-items: center;
  height: auto; min-height: 48px; line-height: 1.5;
  padding: 10px 16px;
  background: var(--tv-surface);
  border: 1.5px solid var(--tv-line);
  border-radius: var(--tv-radius-m);
  font-size: 15px; font-weight: 500; color: var(--tv-ink-900);
}
.nice-select:hover, .nice-select.open { border-color: var(--tv-teal-500); }
.nice-select::after { border-color: var(--tv-ink-400); }
.nice-select .list {
  width: 100%;
  border: 1px solid var(--tv-line);
  border-radius: var(--tv-radius-m);
  box-shadow: var(--tv-shadow-m);
  padding: 6px;
  margin-top: 6px;
}
.nice-select .option {
  border-radius: var(--tv-radius-s);
  line-height: 40px; min-height: 40px;
  font-size: 14.5px;
}
.nice-select .option:hover, .nice-select .option.focus, .nice-select .option.selected.focus {
  background: var(--tv-teal-50); color: var(--tv-teal-800);
}

.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  min-height: 48px;
  padding: 6px 10px;
  border: 1.5px solid var(--tv-line) !important;
  border-radius: var(--tv-radius-m) !important;
  background: var(--tv-surface);
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 34px; color: var(--tv-ink-900); font-weight: 500;
}
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 46px; }
.select2-dropdown {
  border: 1px solid var(--tv-line);
  border-radius: var(--tv-radius-m);
  box-shadow: var(--tv-shadow-m);
  overflow: hidden;
}
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background: var(--tv-teal-50); color: var(--tv-teal-800);
}
.select2-container--default .select2-results__option--selected { background: var(--tv-teal-100); color: var(--tv-teal-900); }

.daterangepicker {
  border: 1px solid var(--tv-line);
  border-radius: var(--tv-radius-m);
  box-shadow: var(--tv-shadow-m);
  font-family: var(--tv-font);
}
.daterangepicker td.active, .daterangepicker td.active:hover { background: var(--tv-teal-600); }
.daterangepicker td.in-range { background: var(--tv-teal-50); color: var(--tv-teal-900); }
.daterangepicker .drp-buttons .btn { padding: 8px 16px; font-size: 14px; }

.ui-timepicker-wrapper, .ui-timepicker-list {
  border-radius: var(--tv-radius-m);
  border-color: var(--tv-line);
  font-family: var(--tv-font);
}
.ui-timepicker-list li:hover, .ui-timepicker-list .ui-timepicker-selected {
  background: var(--tv-teal-50) !important; color: var(--tv-teal-800) !important;
}

.noUi-target { border: none; background: var(--tv-line); box-shadow: none; height: 5px; border-radius: 999px; }
.noUi-connect { background: var(--tv-teal-600); }
.noUi-handle {
  width: 18px !important; height: 18px !important; right: -9px !important; top: -7px !important;
  border: 3px solid var(--tv-teal-600); background: #fff; border-radius: 50%;
  box-shadow: var(--tv-shadow-s); cursor: pointer;
}
.noUi-handle::before, .noUi-handle::after { display: none; }

/* ============================================================
   6. SURFACES
   ============================================================ */
.card, .tv-card {
  background: var(--tv-surface);
  border: 1px solid var(--tv-line);
  border-radius: var(--tv-radius-l);
  box-shadow: none;
}
.card-header, .card-footer { background: transparent; border-color: var(--tv-line); padding: 18px 22px; }
.card-body { padding: 22px; }

.table {
  --bs-table-bg: transparent;
  color: var(--tv-ink-700);
  font-size: 14.5px;
  vertical-align: middle;
}
.table > thead th {
  background: var(--tv-bg);
  color: var(--tv-ink-700);
  font-weight: 700;
  font-size: 13.5px;
  border-bottom: 1px solid var(--tv-line);
  padding: 14px 16px;
  white-space: nowrap;
}
.table > tbody td { border-bottom: 1px solid var(--tv-line); padding: 14px 16px; }
.table > tbody tr:hover { background: var(--tv-teal-50); }
.table-responsive { border-radius: var(--tv-radius-m); }

.badge, .th-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px;
  border-radius: var(--tv-radius-pill);
  font-size: 12.5px; font-weight: 700; line-height: 1.5;
}
.badge-primary, .bg-primary { background: var(--tv-teal-50) !important; color: var(--tv-teal-800) !important; }
.badge-success, .bg-success { background: #F2FBF5 !important; color: var(--tv-success) !important; }
.badge-warning, .bg-warning { background: var(--tv-sand-50) !important; color: var(--tv-warning) !important; }
.badge-danger,  .bg-danger  { background: #FDF2F1 !important; color: var(--tv-error) !important; }

.alert {
  border: 1px solid var(--tv-line);
  border-radius: var(--tv-radius-m);
  padding: 14px 18px;
  font-size: 14.5px;
}
.alert-success { background: #F2FBF5; border-color: #CFEBDD; color: var(--tv-success); }
.alert-danger  { background: #FDF2F1; border-color: #F3D4D1; color: var(--tv-error); }
.alert-warning { background: var(--tv-sand-50); border-color: #EFE6D2; color: var(--tv-warning); }
.alert-info    { background: var(--tv-teal-50); border-color: var(--tv-teal-100); color: var(--tv-teal-800); }

.modal-content {
  border: 1px solid var(--tv-line);
  border-radius: var(--tv-radius-l);
  box-shadow: var(--tv-shadow-l);
}
.modal-header, .modal-footer { border-color: var(--tv-line); padding: 18px 24px; }
.modal-body { padding: 24px; }
.modal-title { font-size: 19px; font-weight: 700; }

.dropdown-menu {
  border: 1px solid var(--tv-line);
  border-radius: var(--tv-radius-m);
  box-shadow: var(--tv-shadow-m);
  padding: 6px;
}
.dropdown-item {
  border-radius: var(--tv-radius-s);
  padding: 9px 14px;
  font-size: 14.5px; font-weight: 500;
  color: var(--tv-ink-700);
}
.dropdown-item:hover, .dropdown-item:focus { background: var(--tv-teal-50); color: var(--tv-teal-800); }

.tooltip-inner {
  background: var(--tv-ink-900);
  border-radius: var(--tv-radius-s);
  font-size: 12.5px;
  padding: 6px 10px;
}

/* ============================================================
   7. NAVIGATION
   ============================================================ */
.tv-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.tv-header.is-scrolled { border-bottom-color: var(--tv-line); box-shadow: var(--tv-shadow-s); }

.tv-header-inner {
  display: flex; align-items: center; gap: 32px;
  height: var(--tv-header-h);
  max-width: var(--tv-container);
  margin-inline: auto;
  padding-inline: 24px;
}

.tv-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.tv-brand img { max-height: 42px; width: auto; }

.tv-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: 8px; }
.tv-nav-item { position: relative; }
.tv-nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px;
  border-radius: var(--tv-radius-s);
  font-size: 15px; font-weight: 500; color: var(--tv-ink-700);
  white-space: nowrap;
  transition: background .18s, color .18s;
}
.tv-nav-link:hover, .tv-nav-link.active { background: var(--tv-teal-50); color: var(--tv-teal-800); }
.tv-nav-link i { font-size: 11px; }

.tv-nav-dropdown {
  position: absolute; top: calc(100% + 10px); inset-inline-start: 0;
  min-width: 220px;
  background: var(--tv-surface);
  border: 1px solid var(--tv-line);
  border-radius: var(--tv-radius-m);
  box-shadow: var(--tv-shadow-m);
  padding: 6px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s, transform .18s, visibility .18s;
  z-index: 10;
}
.tv-nav-item:hover > .tv-nav-dropdown,
.tv-nav-item:focus-within > .tv-nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.tv-nav-dropdown a {
  display: block;
  padding: 9px 14px;
  border-radius: var(--tv-radius-s);
  font-size: 14.5px; font-weight: 500; color: var(--tv-ink-700);
}
.tv-nav-dropdown a:hover, .tv-nav-dropdown a.active { background: var(--tv-teal-50); color: var(--tv-teal-800); }

.tv-header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 12px; }
.tv-header-actions .tv-icon-btn { display: none; }
.tv-lang-select { min-width: 118px; }
.tv-lang-select select, .tv-lang-select .nice-select {
  min-height: 44px; padding: 9px 14px; font-size: 14.5px; border-radius: var(--tv-radius-m);
}

/* --- mobile drawer --- */
.tv-drawer { position: fixed; inset: 0; z-index: 150; display: none; }
.tv-drawer.open { display: block; }
.tv-drawer-overlay {
  position: absolute; inset: 0;
  background: rgba(6,51,44,.45);
  opacity: 0; transition: opacity .25s;
}
.tv-drawer.open .tv-drawer-overlay { opacity: 1; }
/* panel sits on the physical right in both directions, as in the design ref */
.tv-drawer-panel {
  position: absolute; top: 0; bottom: 0; right: 0;
  width: min(340px, 88vw);
  background: var(--tv-surface);
  padding: 20px 24px 32px;
  display: flex; flex-direction: column; overflow-y: auto;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.32,.72,.35,1);
}
.tv-drawer.open .tv-drawer-panel { transform: translateX(0); }

.tv-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.tv-drawer-head img { max-height: 34px; width: auto; }
.tv-drawer-head .tv-icon-btn { display: inline-flex; }

.tv-drawer-nav > a,
.tv-drawer-group > .tv-drawer-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%;
  padding: 14px 4px;
  font-size: 17px; font-weight: 600; color: var(--tv-ink-900);
  background: none; border: none;
  border-bottom: 1px solid var(--tv-line);
  text-align: start;
}
.tv-drawer-nav > a:hover,
.tv-drawer-group > .tv-drawer-toggle:hover { color: var(--tv-teal-700); }
.tv-drawer-nav > a.active { color: var(--tv-teal-700); }
.tv-drawer-toggle i { font-size: 13px; color: var(--tv-ink-400); transition: transform .2s; }
.tv-drawer-group.open .tv-drawer-toggle i { transform: rotate(45deg); }
.tv-drawer-sub { display: none; padding: 4px 0 8px; }
.tv-drawer-group.open .tv-drawer-sub { display: block; }
.tv-drawer-sub a {
  display: block;
  padding: 11px 16px;
  font-size: 15px; font-weight: 500; color: var(--tv-ink-500);
  border-bottom: 1px solid var(--tv-line);
}
.tv-drawer-sub a:hover { color: var(--tv-teal-700); }

.tv-drawer-actions { margin-top: auto; padding-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.tv-drawer-actions .btn { width: 100%; padding: 14px; }
.tv-drawer-lang { margin-top: 16px; }

/* --- breadcrumbs --- */
.tv-breadcrumb, .breadcrumbs-area {
  position: relative;
  background: var(--tv-teal-900);
  background-size: cover; background-position: center;
  padding: 56px 0;
  color: #fff;
}
.tv-breadcrumb::after, .breadcrumbs-area::after {
  content: ""; position: absolute; inset: 0; background: var(--tv-teal-900); opacity: .72;
}
.tv-breadcrumb > *, .breadcrumbs-area > * { position: relative; z-index: 1; }
.tv-breadcrumb h1, .tv-breadcrumb h2, .breadcrumbs-area h1, .breadcrumbs-area h2 { color: #fff; margin-bottom: 8px; }
.tv-breadcrumb-links, .breadcrumbs-area ul { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14.5px; color: #B9D5CE; }
.tv-breadcrumb-links a, .breadcrumbs-area ul a { color: #fff; }
.tv-breadcrumb-links li + li::before, .breadcrumbs-area ul li + li::before { content: "/"; margin-inline-end: 8px; color: #7FA79E; }

/* --- pagination --- */
.pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 0; }
.pagination .page-item .page-link,
.pagination li a, .pagination li span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 12px;
  border: 1.5px solid var(--tv-line);
  border-radius: var(--tv-radius-s);
  background: var(--tv-surface);
  color: var(--tv-ink-700);
  font-size: 14.5px; font-weight: 600;
  transition: border-color .18s, background .18s, color .18s;
}
.pagination .page-item .page-link:hover, .pagination li a:hover {
  border-color: var(--tv-teal-500); background: var(--tv-teal-50); color: var(--tv-teal-800);
}
.pagination .page-item.active .page-link {
  background: var(--tv-teal-600); border-color: var(--tv-teal-600); color: #fff;
}
.pagination .page-item.disabled .page-link { opacity: .5; }

/* --- tabs --- */
.nav-tabs { 
  padding-bottom: 14px !important;
  border-bottom: 1px solid var(--tv-line); gap: 4px; }
.nav-tabs .nav-link {
  border: none; border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 12px 16px;
  font-size: 15px; font-weight: 600;
  color: var(--tv-ink-500);
}
.nav-tabs .nav-link:hover { color: var(--tv-teal-700); }
.nav-tabs .nav-link.active {
  background: transparent;
  color: var(--tv-teal-800);
  border-bottom-color: var(--tv-teal-600);
}

.accordion-item { border: 1px solid var(--tv-line); border-radius: var(--tv-radius-m); margin-bottom: 12px; overflow: hidden; }
.accordion-button { font-weight: 600; font-size: 16px; color: var(--tv-ink-900); background: var(--tv-surface); }
.accordion-button:not(.collapsed) { background: var(--tv-teal-50); color: var(--tv-teal-800); box-shadow: none; }
/* bootstrap pushes the chevron with a physical margin-left; in RTL that fights
   the logical margin and parks the icon mid-row */
.accordion-button::after { margin-left: 0; margin-right: 0; margin-inline-start: auto; }

/* ============================================================
   8. FOOTER
   ============================================================ */
.tv-footer {
  background: var(--tv-surface);
  border-top: 1px solid var(--tv-line);
  padding: 64px 0 0;
}
.tv-footer .footer-title, .tv-footer .title {
  font-size: 16px; font-weight: 700; color: var(--tv-ink-900); margin-bottom: 18px;
}
.tv-footer a, .tv-footer p, .tv-footer li { color: var(--tv-ink-500); font-size: 14.5px; }
.tv-footer a:hover { color: var(--tv-teal-700); }
.tv-footer .social-link a {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--tv-radius-s);
  background: var(--tv-teal-50);
  border: 1px solid var(--tv-teal-100);
  color: var(--tv-teal-700);
}
.tv-footer .social-link a:hover { background: var(--tv-teal-600); color: #fff; }
.tv-footer-bottom {
  margin-top: 48px; padding: 20px 0;
  border-top: 1px solid var(--tv-line);
  font-size: 13.5px; color: var(--tv-ink-400);
}

/* legacy footer markup (footer-v1) rebuilt on the new tokens */
.footer-area {
  background: var(--tv-surface) !important;
  background-image: none !important;
  border-top: 1px solid var(--tv-line);
}
.footer-area .footer-top { padding: 64px 0 40px; }
.footer-area .footer-widget { margin-bottom: 30px; }
.footer-area .footer-widget .logo img { max-height: 46px; width: auto; }
.footer-area .footer-widget .title {
  font-size: 16px; font-weight: 700; color: var(--tv-ink-900); margin-bottom: 18px;
}
.footer-area .footer-widget p { font-size: 14.5px; color: var(--tv-ink-500); line-height: 1.9; }
.footer-area .footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-area .footer-links li a,
.footer-area .footer-links li p {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 14.5px; color: var(--tv-ink-500); margin: 0;
}
.footer-area .footer-links li a:hover { color: var(--tv-teal-700); }
.footer-area .footer-links i { color: var(--tv-teal-600); margin-top: 5px; }
.footer-area .social-link { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.footer-area .social-link a {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--tv-radius-s);
  background: var(--tv-teal-50);
  border: 1px solid var(--tv-teal-100);
  color: var(--tv-teal-700);
}
.footer-area .social-link a:hover { background: var(--tv-teal-600); color: #fff; }
.footer-area .subscription-form .input-inline { box-shadow: none; }
.footer-area .copy-right-area {
  border-top: 1px solid var(--tv-line);
  padding: 20px 0;
}
.footer-area .copy-right-content {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: 13.5px; color: var(--tv-ink-400); text-align: center;
}

/* ============================================================
   9. LEGACY THEME CLASSES
   Pages not yet redesigned still use these. Plain but readable.
   ============================================================ */
.section-title, .content-title { margin-bottom: 32px; }
.section-title .title, .content-title .title { font-size: clamp(22px,2.6vw,30px); font-weight: 700; margin-bottom: 10px; }
.section-title .subtitle, .content-title .subtitle {
  display: inline-block; margin-bottom: 12px;
  font-size: 13.5px; font-weight: 700; color: var(--tv-teal-700);
  background: var(--tv-teal-50); border: 1px solid var(--tv-teal-100);
  padding: 6px 14px; border-radius: var(--tv-radius-pill);
}
.section-title p, .content-title p { color: var(--tv-ink-500); max-width: 60ch; }
.section-title.text-center, .content-title.text-center { margin-inline: auto; }
.section-title.text-center p { margin-inline: auto; }

.pt-100, .ptb-100 { padding-top: 72px; }
.pb-100, .ptb-100 { padding-bottom: 72px; }
.pt-80 { padding-top: 56px; }
.pb-80 { padding-bottom: 56px; }
.mb-30 { margin-bottom: 30px; }
.mt-30 { margin-top: 30px; }
@media (max-width: 768px) {
  .pt-100, .ptb-100 { padding-top: 48px; }
  .pb-100, .ptb-100 { padding-bottom: 48px; }
}

.bg-gray, .bg-light-gray { background: var(--tv-bg) !important; }
.bg-theme, .bg-primary-soft { background: var(--tv-teal-50) !important; }
.text-primary, .theme-color { color: var(--tv-teal-700) !important; }

/* generic listing/sidebar widgets used by dashboard & shop pages */
.widget, .sidebar-widget {
  background: var(--tv-surface);
  border: 1px solid var(--tv-line);
  border-radius: var(--tv-radius-l);
  padding: 22px;
  margin-bottom: 22px;
}
.widget .widget-title, .sidebar-widget .title { font-size: 16.5px; font-weight: 700; margin-bottom: 16px; }

.dashboard-area, .user-dashboard { padding: 48px 0; }
.dashboard-card, .info-card {
  background: var(--tv-surface);
  border: 1px solid var(--tv-line);
  border-radius: var(--tv-radius-l);
  padding: 22px;
}

/* old theme utility that other CSS still references */
.d-none { display: none !important; }
.overflow-hidden { overflow: hidden !important; }

/* ============================================================
   10. CHROME
   ============================================================ */
#preLoader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--tv-surface);
}
#preLoader img { max-width: 160px; }
.ajaxPreLoader { position: fixed; inset: 0; z-index: 9998; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.72); }
.loader {
  width: 44px; height: 44px;
  border: 3px solid var(--tv-teal-100);
  border-top-color: var(--tv-teal-600);
  border-radius: 50%;
  animation: tv-spin .8s linear infinite;
}
@keyframes tv-spin { to { transform: rotate(360deg); } }

.go-top {
  position: fixed; bottom: 28px; inset-inline-start: 28px; z-index: 90;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--tv-radius-m);
  background: var(--tv-teal-600);
  color: #fff;
  box-shadow: 0 6px 16px rgba(14,124,107,.25);
  cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .25s, transform .25s, visibility .25s, background .18s;
}
.go-top.active, .go-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.go-top:hover { background: var(--tv-teal-700); color: #fff; }

#toast-container > div {
  border-radius: var(--tv-radius-m);
  box-shadow: var(--tv-shadow-m);
  opacity: 1;
  font-family: var(--tv-font);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .tv-nav { display: none; }
}
@media (max-width: 768px) {
  body { font-size: 15.5px; }
  .tv-header-actions .btn-primary,
  .tv-header-actions .btn-login,
  .tv-header-actions .tv-lang-select { display: none; }
  .tv-header-actions .tv-icon-btn { display: inline-flex; }
  .tv-header-inner { padding-inline: 16px; gap: 16px; }
  .tv-container { padding-inline: 16px; }
  .tv-breadcrumb, .breadcrumbs-area { padding: 40px 0; }
  .card-body { padding: 18px; }
}
