/* ==========================================================================
   TQ Customer Portal - Techoniq Fusion customer-area design system
   A distinct VIOLET identity (the admin area leads with indigo). Loaded after
   Perfex/Bootstrap-3; every colour is a token, so light and dark are two sets
   of values. Everything is scoped to body.customers so nothing leaks.
   ========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */
:root {
  --tqp-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --tqp-bg: #f7f6fc;
  --tqp-surface: #ffffff;
  --tqp-surface-2: #faf9fe;
  --tqp-surface-3: #f3f1fb;
  --tqp-sunken: #efecf9;
  --tqp-border: #e9e5f5;
  --tqp-border-strong: #d9d3ee;
  --tqp-text: #1a1333;
  --tqp-text-2: #3f3860;
  --tqp-muted: #6c6690;
  --tqp-subtle: #9690b4;
  --tqp-overlay: rgba(26, 19, 51, 0.5);

  --tqp-primary: #7c3aed;
  --tqp-primary-hover: #6d28d9;
  --tqp-primary-ink: #6d28d9;
  --tqp-primary-soft: #f5f3ff;
  --tqp-ring: rgba(124, 58, 237, 0.28);
  --tqp-gradient: linear-gradient(120deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  --tqp-gradient-soft: linear-gradient(120deg, rgba(99,102,241,0.12), rgba(139,92,246,0.12), rgba(217,70,239,0.10));

  --tqp-success: #059669;
  --tqp-success-soft: #ecfdf5;
  --tqp-warning: #d97706;
  --tqp-warning-soft: #fffbeb;
  --tqp-danger: #e11d48;
  --tqp-danger-soft: #fff1f2;
  --tqp-info: #0284c7;
  --tqp-info-soft: #f0f9ff;

  /* Module accents - colour carries meaning, one hue per area. */
  --tqp-c-dashboard: #7c3aed;
  --tqp-c-projects: #4f46e5;
  --tqp-c-invoices: #059669;
  --tqp-c-estimates: #06b6d4;
  --tqp-c-proposals: #db2777;
  --tqp-c-contracts: #d97706;
  --tqp-c-support: #0891b2;
  --tqp-c-knowledge: #7c3aed;
  --tqp-c-calendar: #2563eb;
  --tqp-c-files: #ea580c;

  --tqp-shadow-xs: 0 1px 2px rgba(26, 19, 51, 0.05);
  --tqp-shadow-sm: 0 1px 2px rgba(26, 19, 51, 0.06), 0 1px 3px rgba(26, 19, 51, 0.04);
  --tqp-shadow: 0 1px 3px rgba(26, 19, 51, 0.06), 0 8px 20px -6px rgba(26, 19, 51, 0.10);
  --tqp-shadow-lg: 0 20px 44px -14px rgba(76, 29, 149, 0.28), 0 6px 14px -8px rgba(26, 19, 51, 0.12);

  --tqp-r-xs: 8px;
  --tqp-r-sm: 10px;
  --tqp-r: 14px;
  --tqp-r-lg: 18px;
  --tqp-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --tqp-fast: 150ms;
  --tqp-med: 220ms;
  --tqp-header-h: 66px;
}

:root[data-portal-theme="dark"] {
  color-scheme: dark;

  --tqp-bg: #0d0b1a;
  --tqp-surface: #161327;
  --tqp-surface-2: #1b1733;
  --tqp-surface-3: #221c3d;
  --tqp-sunken: #110e22;
  --tqp-border: #2b2547;
  --tqp-border-strong: #3b3360;
  --tqp-text: #ece9f6;
  --tqp-text-2: #ccc6e2;
  --tqp-muted: #9a93b8;
  --tqp-subtle: #6c6690;
  --tqp-overlay: rgba(5, 3, 15, 0.72);

  --tqp-primary: #a78bfa;
  --tqp-primary-hover: #c4b5fd;
  --tqp-primary-ink: #c4b5fd;
  --tqp-primary-soft: rgba(139, 92, 246, 0.18);
  --tqp-ring: rgba(167, 139, 250, 0.4);
  --tqp-gradient: linear-gradient(120deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  --tqp-gradient-soft: linear-gradient(120deg, rgba(99,102,241,0.22), rgba(139,92,246,0.20), rgba(217,70,239,0.16));

  --tqp-success: #34d399;
  --tqp-success-soft: rgba(16, 185, 129, 0.16);
  --tqp-warning: #fbbf24;
  --tqp-warning-soft: rgba(245, 158, 11, 0.16);
  --tqp-danger: #fb7185;
  --tqp-danger-soft: rgba(244, 63, 94, 0.18);
  --tqp-info: #38bdf8;
  --tqp-info-soft: rgba(14, 165, 233, 0.16);

  --tqp-c-dashboard: #a78bfa;
  --tqp-c-projects: #818cf8;
  --tqp-c-invoices: #34d399;
  --tqp-c-estimates: #22d3ee;
  --tqp-c-proposals: #f472b6;
  --tqp-c-contracts: #fbbf24;
  --tqp-c-support: #22d3ee;
  --tqp-c-knowledge: #a78bfa;
  --tqp-c-calendar: #60a5fa;
  --tqp-c-files: #fb923c;

  --tqp-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --tqp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
  --tqp-shadow: 0 2px 6px rgba(0, 0, 0, 0.45), 0 10px 24px -8px rgba(0, 0, 0, 0.5);
  --tqp-shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.7), 0 8px 16px -8px rgba(0, 0, 0, 0.5);
}

/* ---------- 2. Base ------------------------------------------------------ */
body.customers {
  background: var(--tqp-bg) !important;
  color: var(--tqp-text);
  font-family: var(--tqp-font);
  -webkit-font-smoothing: antialiased;
}
body.customers #wrapper,
body.customers #content { background: transparent; }
body.customers #content { padding-top: 24px; padding-bottom: 48px; }
body.customers a { color: var(--tqp-primary-ink); }
body.customers a:hover,
body.customers a:focus { color: var(--tqp-primary-hover); }
body.customers h1, body.customers h2, body.customers h3,
body.customers h4, body.customers h5 { color: var(--tqp-text); }
body.customers hr { border-color: var(--tqp-border); }
body.customers .text-muted { color: var(--tqp-muted) !important; }
::selection { background: var(--tqp-ring); }

/* every inline icon has a sane default size; specific contexts scale up below */
body.customers .tqp-ico { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }

/* ---------- 3. Panels / cards ------------------------------------------- */
body.customers .panel_s {
  background: var(--tqp-surface);
  border: 1px solid var(--tqp-border);
  border-radius: var(--tqp-r);
  box-shadow: var(--tqp-shadow-sm);
  overflow: hidden;
}
body.customers .panel_s .panel-body { padding: 22px; color: var(--tqp-text-2); }

.tqp-card {
  background: var(--tqp-surface);
  border: 1px solid var(--tqp-border);
  border-radius: var(--tqp-r);
  box-shadow: var(--tqp-shadow-sm);
  transition: transform var(--tqp-med) var(--tqp-ease), box-shadow var(--tqp-med) var(--tqp-ease);
}
.tqp-card--hover:hover { transform: translateY(-2px); box-shadow: var(--tqp-shadow); }

/* ---------- 4. Buttons --------------------------------------------------- */
body.customers .btn {
  border-radius: 10px;
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid transparent;
  transition: all var(--tqp-fast) var(--tqp-ease);
}
body.customers .btn-primary {
  background: var(--tqp-gradient);
  border: none;
  box-shadow: 0 6px 16px -6px var(--tqp-ring);
}
body.customers .btn-primary:hover,
body.customers .btn-primary:focus,
body.customers .btn-primary:active {
  filter: brightness(1.05);
  box-shadow: 0 10px 22px -8px var(--tqp-ring);
}
body.customers .btn-default {
  background: var(--tqp-surface);
  border-color: var(--tqp-border-strong);
  color: var(--tqp-text-2);
}
body.customers .btn-default:hover { background: var(--tqp-surface-3); color: var(--tqp-text); }
body.customers .btn-success { background: var(--tqp-success); border: none; }
body.customers .btn-danger { background: var(--tqp-danger); border: none; }
body.customers .btn-info { background: var(--tqp-info); border: none; }

/* ---------- 5. Tables ---------------------------------------------------- */
body.customers table.table { color: var(--tqp-text-2); }
body.customers table.table > thead > tr > th {
  background: var(--tqp-surface-3);
  color: var(--tqp-muted);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 700;
  border-bottom: 1px solid var(--tqp-border);
  padding: 12px 14px;
}
body.customers table.table > tbody > tr > td {
  border-top: 1px solid var(--tqp-border);
  padding: 13px 14px;
  vertical-align: middle;
}
body.customers table.table > tbody > tr { transition: background var(--tqp-fast) var(--tqp-ease); }
body.customers table.table-hover > tbody > tr:hover,
body.customers table.dt-table > tbody > tr:hover { background: var(--tqp-surface-3); }
body.customers .dataTables_wrapper .dataTables_filter input,
body.customers .dataTables_wrapper .dataTables_length select {
  border: 1px solid var(--tqp-border-strong);
  border-radius: 9px;
  background: var(--tqp-surface);
  color: var(--tqp-text);
  padding: 6px 10px;
}
body.customers .dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--tqp-primary) !important;
  border-color: var(--tqp-primary) !important;
  color: #fff !important;
  border-radius: 8px;
}
body.customers .dataTables_wrapper .dataTables_info,
body.customers .dataTables_wrapper .dataTables_paginate { color: var(--tqp-muted); }

/* ---------- 6. Forms ----------------------------------------------------- */
body.customers .form-control {
  background: var(--tqp-surface);
  border: 1px solid var(--tqp-border-strong);
  border-radius: 10px;
  color: var(--tqp-text);
  box-shadow: none;
  transition: border-color var(--tqp-fast) var(--tqp-ease), box-shadow var(--tqp-fast) var(--tqp-ease);
  height: auto;
  padding: 9px 13px;
}
body.customers .form-control:focus {
  border-color: var(--tqp-primary);
  box-shadow: 0 0 0 3px var(--tqp-ring);
}
body.customers label, body.customers .control-label { color: var(--tqp-text-2); font-weight: 600; }
body.customers .bootstrap-select > .btn { background: var(--tqp-surface); border-color: var(--tqp-border-strong); color: var(--tqp-text); }

/* ---------- 7. Labels / badges ------------------------------------------ */
body.customers .label {
  border-radius: 999px;
  padding: .32em .72em;
  font-weight: 600;
  font-size: 85%;
}
.tqp-badge {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 600;
  background: var(--tqp-surface-3); color: var(--tqp-text-2);
}
.tqp-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tqp-badge--success { color: var(--tqp-success); background: var(--tqp-success-soft); }
.tqp-badge--warning { color: var(--tqp-warning); background: var(--tqp-warning-soft); }
.tqp-badge--danger  { color: var(--tqp-danger);  background: var(--tqp-danger-soft); }
.tqp-badge--info    { color: var(--tqp-info);    background: var(--tqp-info-soft); }

/* ---------- 8. Navbar ---------------------------------------------------- */
body.customers .navbar.header,
body.customers nav.navbar-default.header {
  background: var(--tqp-surface);
  border: none;
  border-bottom: 1px solid var(--tqp-border);
  box-shadow: var(--tqp-shadow-xs);
  margin-bottom: 0;
  min-height: var(--tqp-header-h);
}
/* full-width header bar so the nav never overflows the narrow BS3 container */
body.customers nav.navbar.header > .container { width: 100%; max-width: 1340px; padding-left: 26px; padding-right: 26px; }
.tqp-nav { min-height: var(--tqp-header-h); display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 14px; min-width: 0; }
.tqp-nav__brand { display: flex; align-items: center; gap: 10px; padding: 10px 0; flex: none; }
.tqp-nav__brand img, .tqp-brand-logo img { max-height: 32px; width: auto; max-width: 132px; object-fit: contain; }
.tqp-nav__links { flex: 0 1 auto; min-width: 0; flex-wrap: nowrap; overflow: hidden; }
.tqp-nav__links { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.tqp-nav__links a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 13px; border-radius: 10px;
  color: var(--tqp-text-2); font-weight: 600; font-size: 14px;
  text-decoration: none; transition: all var(--tqp-fast) var(--tqp-ease);
}
.tqp-nav__links a:hover { background: var(--tqp-surface-3); color: var(--tqp-text); }
.tqp-nav__links a.tqp-active { color: var(--tqp-primary-ink); background: var(--tqp-primary-soft); }
.tqp-nav__links a .tqp-ico { width: 18px; height: 18px; }
.tqp-nav__right { display: flex; align-items: center; gap: 6px; flex: none; }
.tqp-iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 11px;
  color: var(--tqp-text-2); background: transparent; border: 1px solid transparent;
  cursor: pointer; position: relative; transition: all var(--tqp-fast) var(--tqp-ease); text-decoration: none;
}
.tqp-iconbtn:hover { background: var(--tqp-surface-3); color: var(--tqp-text); }
.tqp-iconbtn .tqp-ico { width: 20px; height: 20px; }
.tqp-badge-dot {
  position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--tqp-danger); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  border: 2px solid var(--tqp-surface);
}
.tqp-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--tqp-border); }
.tqp-nav__profile { display: flex; align-items: center; gap: 9px; padding: 5px 8px 5px 5px; border-radius: 999px; cursor: pointer; transition: background var(--tqp-fast); }
.tqp-nav__profile:hover { background: var(--tqp-surface-3); }
.tqp-nav__profile .tqp-name { font-weight: 600; font-size: 13.5px; color: var(--tqp-text); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tqp-nav__profile .tqp-caret { color: var(--tqp-subtle); }

/* dropdown restyle */
body.customers .navbar .dropdown-menu,
body.customers .tqp-menu {
  background: var(--tqp-surface);
  border: 1px solid var(--tqp-border);
  border-radius: var(--tqp-r);
  box-shadow: var(--tqp-shadow-lg);
  padding: 8px;
  margin-top: 10px;
}
body.customers .dropdown-menu > li > a,
body.customers .tqp-menu a {
  border-radius: 9px; padding: 9px 12px; color: var(--tqp-text-2); font-weight: 500; display: flex; align-items: center; gap: 10px;
}
body.customers .dropdown-menu > li > a:hover,
body.customers .tqp-menu a:hover { background: var(--tqp-primary-soft); color: var(--tqp-primary-ink); }
body.customers .dropdown-menu .badge { background: var(--tqp-primary); }

/* hamburger */
.tqp-burger { display: none; }

/* hide the stock top submenu (Files/Calendar) - moved into the navbar */
body.customers .customer-top-submenu { display: none !important; }

/* ---------- 9. Mobile drawer -------------------------------------------- */
.tqp-drawer-backdrop {
  position: fixed; inset: 0; background: var(--tqp-overlay); z-index: 1040;
  opacity: 0; visibility: hidden; transition: opacity var(--tqp-med) var(--tqp-ease);
}
.tqp-drawer-backdrop.tqp-open { opacity: 1; visibility: visible; }
.tqp-drawer {
  position: fixed; top: 0; bottom: 0; left: 0; width: 290px; max-width: 84vw; z-index: 1041;
  background: var(--tqp-surface); box-shadow: var(--tqp-shadow-lg);
  transform: translateX(-100%); transition: transform var(--tqp-med) var(--tqp-ease);
  display: flex; flex-direction: column; padding: 18px 14px;
}
.tqp-drawer.tqp-open { transform: translateX(0); }
.tqp-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 16px; }
.tqp-drawer__links { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.tqp-drawer__links a {
  display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-radius: 11px;
  color: var(--tqp-text-2); font-weight: 600; text-decoration: none; margin-bottom: 2px;
}
.tqp-drawer__links a:hover { background: var(--tqp-surface-3); color: var(--tqp-text); }
.tqp-drawer__links a.tqp-active { background: var(--tqp-primary-soft); color: var(--tqp-primary-ink); }
.tqp-drawer__links .tqp-ico { width: 20px; height: 20px; }

/* ---------- 10. Dashboard ------------------------------------------------ */
.tqp-hero { margin-bottom: 26px; }
.tqp-hero__greeting { font-size: 25px; font-weight: 700; margin: 0 0 4px; color: var(--tqp-text); }
.tqp-hero__greeting .tqp-wave { display: inline-block; }
.tqp-hero__sub { color: var(--tqp-muted); font-size: 15px; margin: 0; }

.tqp-section-title { font-size: 13px; letter-spacing: .05em; text-transform: uppercase; font-weight: 700; color: var(--tqp-muted); margin: 30px 0 14px; display: flex; align-items: center; justify-content: space-between; }
.tqp-section-title a { font-size: 12px; text-transform: none; letter-spacing: 0; }

.tqp-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tqp-kpi {
  position: relative; padding: 18px; border-radius: var(--tqp-r); overflow: hidden;
  background: var(--tqp-surface); border: 1px solid var(--tqp-border); box-shadow: var(--tqp-shadow-sm);
  transition: transform var(--tqp-med) var(--tqp-ease), box-shadow var(--tqp-med) var(--tqp-ease);
  text-decoration: none; display: block; color: inherit;
}
.tqp-kpi:hover { transform: translateY(-2px); box-shadow: var(--tqp-shadow); color: inherit; }
.tqp-kpi::after { content: ""; position: absolute; inset: 0 0 auto auto; width: 120px; height: 120px; border-radius: 50%; background: var(--tone, var(--tqp-primary)); opacity: .07; transform: translate(35%, -35%); }
.tqp-kpi__icon { width: 42px; height: 42px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--tone, var(--tqp-primary)); box-shadow: 0 6px 14px -6px var(--tone, var(--tqp-primary)); margin-bottom: 14px; }
.tqp-kpi__icon .tqp-ico { width: 22px; height: 22px; }
.tqp-kpi__value { font-size: 26px; font-weight: 700; color: var(--tqp-text); line-height: 1.1; }
.tqp-kpi__label { color: var(--tqp-muted); font-size: 13px; margin-top: 3px; font-weight: 500; }
.tqp-kpi__sub { color: var(--tqp-subtle); font-size: 12px; margin-top: 7px; }

.tqp-grid { display: grid; gap: 16px; }
.tqp-grid--status { grid-template-columns: repeat(5, 1fr); }
.tqp-stat {
  display: block; text-decoration: none; padding: 15px 16px; border-radius: var(--tqp-r);
  background: var(--tqp-surface); border: 1px solid var(--tqp-border);
  transition: all var(--tqp-med) var(--tqp-ease); position: relative;
}
.tqp-stat:hover { transform: translateY(-2px); box-shadow: var(--tqp-shadow); }
.tqp-stat.tqp-stat--on { border-color: var(--tone); box-shadow: inset 3px 0 0 var(--tone); }
.tqp-stat__label { font-size: 12.5px; font-weight: 600; color: var(--tqp-text-2); display: flex; align-items: center; gap: 7px; }
.tqp-stat__label::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--tone, var(--tqp-muted)); }
.tqp-stat__value { font-size: 23px; font-weight: 700; color: var(--tqp-text); margin-top: 8px; }

/* invoice overview bars */
.tqp-invrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tqp-inv { padding: 14px 16px; border-radius: var(--tqp-r); background: var(--tqp-surface-2); border: 1px solid var(--tqp-border); }
.tqp-inv__top { display: flex; align-items: baseline; justify-content: space-between; }
.tqp-inv__name { font-weight: 600; color: var(--tqp-text-2); font-size: 13.5px; }
.tqp-inv__count { font-weight: 700; color: var(--tqp-text); }
.tqp-inv__bar { height: 7px; border-radius: 999px; background: var(--tqp-sunken); margin-top: 11px; overflow: hidden; }
.tqp-inv__fill { height: 100%; border-radius: 999px; background: var(--tone); transition: width var(--tqp-med) var(--tqp-ease); }
.tqp-inv__pct { font-size: 11.5px; color: var(--tqp-muted); margin-top: 6px; }

/* quick actions */
.tqp-qa { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tqp-qa a {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--tqp-r);
  background: var(--tqp-surface); border: 1px solid var(--tqp-border); color: var(--tqp-text-2);
  font-weight: 600; text-decoration: none; transition: all var(--tqp-med) var(--tqp-ease);
}
.tqp-qa a:hover { transform: translateY(-2px); box-shadow: var(--tqp-shadow); color: var(--tqp-text); border-color: var(--tqp-border-strong); }
.tqp-qa__ico { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--tone, var(--tqp-primary-soft)); color: var(--tone-ink, var(--tqp-primary-ink)); }
.tqp-qa__ico .tqp-ico { width: 20px; height: 20px; }

/* alerts */
.tqp-alerts { display: flex; flex-direction: column; gap: 10px; }
.tqp-alert {
  display: flex; align-items: center; gap: 13px; padding: 14px 16px; border-radius: var(--tqp-r);
  background: var(--tqp-surface); border: 1px solid var(--tqp-border); border-left: 4px solid var(--tone, var(--tqp-primary));
  color: var(--tqp-text-2); text-decoration: none; transition: all var(--tqp-med) var(--tqp-ease);
}
.tqp-alert:hover { box-shadow: var(--tqp-shadow); color: var(--tqp-text); }
.tqp-alert__ico { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--tone) 14%, transparent); color: var(--tone); flex: none; }
.tqp-alert__ico .tqp-ico { width: 19px; height: 19px; }
.tqp-alert__text { flex: 1; font-weight: 500; }
.tqp-alert__text strong { color: var(--tqp-text); font-weight: 700; }

/* profile completeness ring/bar */
.tqp-complete { display: flex; align-items: center; gap: 16px; }
.tqp-complete__bar { flex: 1; height: 9px; border-radius: 999px; background: var(--tqp-sunken); overflow: hidden; }
.tqp-complete__fill { height: 100%; background: var(--tqp-gradient); border-radius: 999px; }
.tqp-complete__pct { font-weight: 700; color: var(--tqp-text); font-size: 18px; }

/* empty state */
.tqp-empty { text-align: center; padding: 52px 24px; }
.tqp-empty__ico { width: 72px; height: 72px; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 18px; background: var(--tqp-gradient-soft); color: var(--tqp-primary); }
.tqp-empty__ico .tqp-ico { width: 34px; height: 34px; }
.tqp-empty h4 { font-weight: 700; margin: 0 0 7px; }
.tqp-empty p { color: var(--tqp-muted); max-width: 400px; margin: 0 auto 18px; }

/* chart card */
.tqp-chartcard { padding: 20px; }
.tqp-chartcard__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }

/* skeleton */
.tqp-skeleton { background: linear-gradient(90deg, var(--tqp-surface-3) 25%, var(--tqp-sunken) 37%, var(--tqp-surface-3) 63%); background-size: 400% 100%; animation: tqp-shimmer 1.3s ease infinite; border-radius: 8px; }
@keyframes tqp-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* footer */
body.customers footer.footer { background: transparent; border-top: 1px solid var(--tqp-border); margin-top: 40px; color: var(--tqp-muted); }
body.customers .copyright-footer { color: var(--tqp-muted); }

/* page heading used across module pages */
body.customers .section-heading,
body.customers .tqp-page-title { color: var(--tqp-text); font-weight: 700; }

/* ---------- 11. Responsive ---------------------------------------------- */
@media (max-width: 991px) {
  .tqp-nav__links, .tqp-nav__profile .tqp-name { display: none; }
  .tqp-burger { display: inline-flex; }
  .tqp-kpis { grid-template-columns: repeat(2, 1fr); }
  .tqp-grid--status { grid-template-columns: repeat(2, 1fr); }
  .tqp-invrow { grid-template-columns: repeat(2, 1fr); }
  .tqp-qa { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
  .tqp-kpis, .tqp-grid--status, .tqp-invrow, .tqp-qa { grid-template-columns: 1fr; }
  .tqp-hero__greeting { font-size: 21px; }
  body.customers #content { padding-top: 16px; }
}

/* ---------- 12. Logo theme swap ----------------------------------------- */
.tqp-brand-logo { display: inline-flex; align-items: center; }
.tqp-brand-logo img { max-height: 34px; width: auto; }
.tqp-brand-logo .tqp-logo-dark { display: none; }
:root[data-portal-theme="dark"] .tqp-brand-logo .tqp-logo-light { display: none; }
:root[data-portal-theme="dark"] .tqp-brand-logo .tqp-logo-dark { display: inline-block; }
body.customers .tqp-brand-logo.logo-text { font-weight: 800; font-size: 20px; color: var(--tqp-text); text-decoration: none; }

/* ---------- 13. Progress bars (stock stat strips) ----------------------- */
body.customers .progress {
  background: var(--tqp-sunken);
  border-radius: 999px;
  height: 8px;
  box-shadow: none;
  overflow: hidden;
  margin-bottom: 6px;
}
body.customers .progress-bar { border-radius: 999px; box-shadow: none; line-height: 8px; font-size: 0; transition: width var(--tqp-med) var(--tqp-ease); }
body.customers .progress-bar-success { background: var(--tqp-success); }
body.customers .progress-bar-danger  { background: var(--tqp-danger); }
body.customers .progress-bar-warning { background: var(--tqp-warning); }
body.customers .progress-bar-info    { background: var(--tqp-info); }
body.customers .invoice-quick-info .stats-numbers,
body.customers .estimates-stats .stats-numbers { color: var(--tqp-text); }

/* ---------- 14. Empty DataTables message -------------------------------- */
body.customers td.dataTables_empty {
  padding: 44px 16px;
  text-align: center;
  color: var(--tqp-muted);
  font-weight: 500;
  font-size: 14px;
}

/* ---------- 15. Status summary cards (stock tw- grids) ------------------- */
body.customers dl.tw-grid > a {
  background: var(--tqp-surface) !important;
  border: 1px solid var(--tqp-border) !important;
  border-radius: var(--tqp-r) !important;
  transition: transform var(--tqp-med) var(--tqp-ease), box-shadow var(--tqp-med) var(--tqp-ease);
}
body.customers dl.tw-grid > a:hover { transform: translateY(-2px); box-shadow: var(--tqp-shadow); background: var(--tqp-surface) !important; }
body.customers dl.tw-grid dd .tw-text-primary-600 { color: var(--tqp-text) !important; font-size: 22px; }

/* ---------- 16. Knowledge base hero ------------------------------------- */
body.customers .kb-search-jumbotron {
  background: var(--tqp-gradient-soft);
  border: 1px solid var(--tqp-border);
  border-radius: var(--tqp-r-lg);
  padding: 44px 20px;
  margin-bottom: 26px;
}
body.customers .kb-search-heading { color: var(--tqp-text); }
body.customers .kb-search-input { border-radius: 12px 0 0 12px; height: 48px; }
body.customers .kb-search-button { border-radius: 0 12px 12px 0; height: 48px; }
body.customers .kb-search-icon { color: var(--tqp-subtle); }

/* ---------- 17. Login / register ---------------------------------------- */
body.customers.customers_login .login-heading,
body.customers.register .register-heading { color: var(--tqp-text); font-weight: 800; }
body.customers.customers_login #content,
body.customers.register #content { padding-top: 56px; }
body.customers .login-form .panel_s,
body.customers .register-form .panel_s { box-shadow: var(--tqp-shadow); border-radius: var(--tqp-r-lg); }
body.customers .login-form .btn-primary,
body.customers .register-form .btn-primary { width: 100%; padding: 11px; font-size: 15px; }

/* ---------- 18. Single ticket conversation ------------------------------ */
body.customers .ticket-reply,
body.customers .ticket-message { border-radius: var(--tqp-r); border: 1px solid var(--tqp-border); background: var(--tqp-surface); }
body.customers .ticket-staff-response { border-left: 3px solid var(--tqp-primary); }

/* ---------- 19. Document views (invoice/estimate/proposal HTML) ---------- */
body.customers .invoice-template,
body.customers .estimate-template,
body.customers .proposal-template { color: var(--tqp-text-2); }
body.customers #customer-decision-dropdown .btn,
body.customers .pdf-btn { border-radius: 10px; }

/* ---------- 20. Document centre ----------------------------------------- */
.tqp-doc-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tqp-chip {
  display: inline-flex; align-items: center; padding: 7px 15px; border-radius: 999px;
  background: var(--tqp-surface); border: 1px solid var(--tqp-border); color: var(--tqp-text-2);
  font-weight: 600; font-size: 13px; text-decoration: none; transition: all var(--tqp-fast) var(--tqp-ease);
}
.tqp-chip:hover { background: var(--tqp-surface-3); color: var(--tqp-text); }
.tqp-chip--on { background: var(--tqp-primary); border-color: var(--tqp-primary); color: #fff; }
.tqp-chip--on:hover { background: var(--tqp-primary-hover); color: #fff; }
.tqp-doc-type {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12px; color: var(--tone);
}
.tqp-doc-type::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--tone); }

/* ---------- 21. Global search ------------------------------------------- */
.tqp-search { position: relative; width: 250px; max-width: 30vw; }
.tqp-iconbtn--on { color: var(--tqp-primary-ink); background: var(--tqp-primary-soft); }
.tqp-search__input {
  width: 100%; height: 40px; border-radius: 11px; border: 1px solid var(--tqp-border-strong);
  background: var(--tqp-surface-3); color: var(--tqp-text); padding: 0 14px 0 38px; font-size: 13.5px;
  transition: all var(--tqp-fast) var(--tqp-ease);
}
.tqp-search__input:focus { outline: none; background: var(--tqp-surface); border-color: var(--tqp-primary); box-shadow: 0 0 0 3px var(--tqp-ring); }
.tqp-search__icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--tqp-subtle); pointer-events: none; }
.tqp-search__icon .tqp-ico { width: 17px; height: 17px; }
.tqp-search__panel {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 1050;
  background: var(--tqp-surface); border: 1px solid var(--tqp-border); border-radius: var(--tqp-r);
  box-shadow: var(--tqp-shadow-lg); padding: 8px; max-height: 70vh; overflow-y: auto; display: none;
}
.tqp-search__panel.tqp-open { display: block; }
.tqp-search__group-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--tqp-subtle); padding: 10px 10px 4px; }
.tqp-search__item { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--tqp-text-2); text-decoration: none; }
.tqp-search__item:hover { background: var(--tqp-primary-soft); color: var(--tqp-primary-ink); }
.tqp-search__item .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tqp-search__item .s { font-size: 12px; color: var(--tqp-subtle); flex: none; }
.tqp-search__msg { padding: 16px 12px; color: var(--tqp-muted); font-size: 13px; text-align: center; }
@media (max-width: 1100px) { .tqp-search { width: 200px; } }
@media (max-width: 991px) { .tqp-search { display: none; } }

/* ---------- 22. List pages (invoices, estimates, proposals, ...) --------- */
/* Primary buttons rendered as links picked up the violet link colour, which
   made "Open Ticket" unreadable on the gradient. */
body.customers .btn-primary,
body.customers a.btn-primary,
body.customers .btn-primary:hover,
body.customers .btn-primary:focus,
body.customers a.btn-primary:hover,
body.customers a.btn-primary:focus { color: #fff !important; }

body.customers .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
body.customers .btn .tqp-ico { width: 17px; height: 17px; }

.tqp-page { padding-bottom: 8px; }

.tqp-phead { display: flex; align-items: center; gap: 16px; margin: 4px 0 22px; flex-wrap: wrap; }
.tqp-phead__ico {
  flex: none; width: 52px; height: 52px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; background: linear-gradient(135deg, var(--tone), color-mix(in srgb, var(--tone) 55%, #7c3aed));
  box-shadow: 0 10px 22px -12px var(--tone);
}
.tqp-phead__ico .tqp-ico { width: 26px; height: 26px; }
.tqp-phead__text { flex: 1 1 280px; min-width: 0; }
.tqp-phead__title { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--tqp-text); line-height: 1.2; }
.tqp-phead__sub { margin: 4px 0 0; color: var(--tqp-muted); font-size: 14.5px; }
.tqp-phead__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tqp-phead__actions .btn { height: 42px; padding: 0 18px; }

.tqp-sum { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); margin-bottom: 20px; }
.tqp-sum .tqp-kpi { padding: 16px 18px; }
.tqp-sum .tqp-kpi__icon { width: 38px; height: 38px; margin-bottom: 12px; border-radius: 11px; }
.tqp-sum .tqp-kpi__icon .tqp-ico { width: 20px; height: 20px; }
.tqp-sum .tqp-kpi__value { font-size: 22px; letter-spacing: -0.01em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.tqp-sum .tqp-kpi__sub { color: var(--tqp-muted); }
.tqp-sum a.tqp-kpi:focus-visible { outline: 2px solid var(--tqp-primary); outline-offset: 2px; }

.tqp-filters { display: flex; gap: 8px; margin: 0 0 16px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.tqp-filters::-webkit-scrollbar { display: none; }
.tqp-filters .tqp-chip { flex: none; gap: 8px; padding: 7px 8px 7px 14px; }
.tqp-chip__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); }
.tqp-chip__count {
  min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; background: var(--tqp-surface-3); color: var(--tqp-text-2); font-variant-numeric: tabular-nums;
}
/* Chips are links: beat the theme's violet link colour explicitly. */
body.customers a.tqp-chip { color: var(--tqp-text-2); }
body.customers a.tqp-chip:hover { color: var(--tqp-text); }
body.customers a.tqp-chip--on,
body.customers a.tqp-chip--on:hover,
body.customers a.tqp-chip--on:focus { color: #fff !important; }
.tqp-chip--on .tqp-chip__count { background: rgba(255, 255, 255, 0.22); color: #fff; }
.tqp-chip--on .tqp-chip__dot { background: #fff; }

.tqp-listcard .panel-body { padding: 18px 20px 20px; }

/* Perfex's Tailwind build paints every .panel-body and the DataTables
   search/length controls white, which showed as white boxes in dark mode. */
body.customers .panel_s .panel-body,
body.customers .panel .panel-body { background: transparent; }
body.customers .dataTables_wrapper .dataTables_filter .input-group-addon {
  background: var(--tqp-surface-3); border-color: var(--tqp-border-strong); color: var(--tqp-muted);
}
body.customers .dataTables_wrapper .dataTables_filter input,
body.customers .dataTables_wrapper .dataTables_length select,
body.customers .dataTables_wrapper .dt-page-jump-select {
  background: var(--tqp-surface); border-color: var(--tqp-border-strong); color: var(--tqp-text);
}
.tqp-page .tqp-num { color: var(--tqp-text); }
body.customers .tqp-page table.table > tbody > tr > td { color: var(--tqp-text-2); }
body.customers .tqp-page .table-responsive { border: 0; }
/* Tailwind's input[type=search] rule outranks the single class. */
body.customers input.tqp-search__input { background: var(--tqp-surface-3); color: var(--tqp-text); border-color: var(--tqp-border-strong); }
body.customers input.tqp-search__input:focus { background: var(--tqp-surface); border-color: var(--tqp-primary); }
.tqp-card-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--tqp-text); }

body.customers .tqp-page table.table > thead > tr > th:first-child { border-top-left-radius: 10px; }
body.customers .tqp-page table.table > thead > tr > th:last-child { border-top-right-radius: 10px; }
body.customers .tqp-page table.table > tbody > tr > td { padding-top: 14px; padding-bottom: 14px; }

.tqp-docno { font-weight: 700; color: var(--tqp-text) !important; white-space: nowrap; }
a.tqp-docno:hover { color: var(--tqp-primary) !important; }
.tqp-cell-sub { display: block; margin-top: 3px; font-size: 12.5px; color: var(--tqp-muted); font-weight: 500; }
.tqp-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tqp-dash { color: var(--tqp-subtle); }
.tqp-balance { color: var(--tqp-text); font-weight: 700; }

.tqp-due { display: inline-flex; align-items: center; margin-top: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.tqp-due--danger { color: var(--tqp-danger); background: var(--tqp-danger-soft); }
.tqp-due--warning { color: var(--tqp-warning); background: var(--tqp-warning-soft); }
.tqp-due--muted { color: var(--tqp-muted); background: var(--tqp-surface-3); }
td .tqp-due { display: table; }

.tqp-settled { display: inline-flex; align-items: center; gap: 5px; color: var(--tqp-success); font-weight: 600; font-size: 13px; }
.tqp-settled .tqp-ico { width: 16px; height: 16px; }

.tqp-status {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap;
  color: color-mix(in srgb, var(--tone) 80%, var(--tqp-text)); background: color-mix(in srgb, var(--tone) 12%, var(--tqp-surface));
  border: 1px solid color-mix(in srgb, var(--tone) 28%, transparent);
}
.tqp-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tone); }

.tqp-progress { display: flex; align-items: center; gap: 10px; min-width: 140px; }
.tqp-progress__bar { flex: 1; height: 8px; border-radius: 999px; background: var(--tqp-sunken); overflow: hidden; }
.tqp-progress__bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 70%, #fff), var(--tone)); }
.tqp-progress__num { font-size: 12.5px; font-weight: 700; color: var(--tqp-text-2); min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; }

.tqp-rowactions { white-space: nowrap; }
.tqp-inline-form { display: inline-block; margin: 0; vertical-align: middle; }
.tqp-rowbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; min-width: 34px; padding: 0 9px;
  border-radius: 10px; border: 1px solid var(--tqp-border); background: var(--tqp-surface); color: var(--tqp-text-2) !important;
  font-size: 13px; font-weight: 600; text-decoration: none !important; cursor: pointer; vertical-align: middle;
  transition: background var(--tqp-fast) var(--tqp-ease), border-color var(--tqp-fast), color var(--tqp-fast);
}
.tqp-rowbtn:hover, .tqp-rowbtn:focus-visible { background: var(--tqp-primary-soft); border-color: color-mix(in srgb, var(--tqp-primary) 35%, var(--tqp-border)); color: var(--tqp-primary-ink) !important; }
.tqp-rowbtn .tqp-ico { width: 16px; height: 16px; }
.tqp-rowbtn--label { padding: 0 12px; }
.tqp-rowactions .tqp-rowbtn + .tqp-inline-form { margin-left: 6px; }

/* Phones: rows become cards with a label per value */
@media (max-width: 767px) {
  .tqp-phead { gap: 12px; margin-bottom: 18px; }
  .tqp-phead__ico { width: 44px; height: 44px; border-radius: 13px; }
  .tqp-phead__title { font-size: 21px; }
  .tqp-phead__actions { width: 100%; }
  .tqp-phead__actions .btn { flex: 1; }
  .tqp-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tqp-sum .tqp-kpi { padding: 14px; }
  .tqp-sum .tqp-kpi__value { font-size: clamp(14px, 4.2vw, 18px); overflow-wrap: normal; white-space: nowrap; letter-spacing: -0.02em; }
  .tqp-listcard .panel-body { padding: 12px; }
  /* Perfex absolutely positions the page-length select beside the search box. */
  body.customers .tqp-page .dataTables_length { position: static !important; margin: 0 0 8px; }
  body.customers .tqp-page .dataTables_filter { margin-bottom: 8px; text-align: left; }
  body.customers .tqp-page .dataTables_filter label,
  body.customers .tqp-page .dataTables_filter .input-group { width: 100%; }
  body.customers table.tqp-table--cards > tbody > tr > td:empty { display: none; }

  body.customers table.tqp-table--cards,
  body.customers table.tqp-table--cards tbody,
  body.customers table.tqp-table--cards tr,
  body.customers table.tqp-table--cards td { display: block; width: 100% !important; }
  body.customers table.tqp-table--cards thead { display: none; }
  body.customers table.tqp-table--cards tr {
    margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--tqp-border); border-radius: 14px; background: var(--tqp-surface);
  }
  body.customers table.tqp-table--cards > tbody > tr > td {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 7px 0 !important; border: 0 !important; text-align: right;
  }
  body.customers table.tqp-table--cards > tbody > tr > td::before {
    content: attr(data-label); flex: none; max-width: 45%; text-align: left; color: var(--tqp-muted); font-size: 12px; font-weight: 600; padding-top: 2px;
  }
  body.customers table.tqp-table--cards > tbody > tr > td:first-child { display: block; text-align: left; padding-bottom: 10px !important; margin-bottom: 4px; border-bottom: 1px dashed var(--tqp-border) !important; }
  body.customers table.tqp-table--cards > tbody > tr > td:first-child::before { display: none; }
  body.customers table.tqp-table--cards > tbody > tr > td.tqp-rowactions { justify-content: flex-end; padding-top: 10px !important; }
  body.customers table.tqp-table--cards > tbody > tr > td.tqp-rowactions::before { display: none; }
  body.customers table.tqp-table--cards td.dataTables_empty { display: block; text-align: center; }
  body.customers table.tqp-table--cards td.dataTables_empty::before { display: none; }
  .tqp-progress { min-width: 0; flex: 1; max-width: 60%; }
  td .tqp-due { display: inline-flex; margin-left: 6px; }
}

/* ---------- 23. Navbar fit: wider bar + "More" menu ---------------------- */
/* The bar was capped at 1340px, which left room for about four links next
   to the search box; the rest (Proposals, Support, ...) were clipped. It now
   uses up to 1760px, and links that still do not fit move into "More". */
body.customers nav.navbar.header > .container { max-width: 1760px; }
.tqp-nav { justify-content: flex-start; }
.tqp-nav__right { margin-left: auto; }
.tqp-nav__more { flex: none; position: relative; }
.tqp-nav__more[hidden] { display: none !important; }
.tqp-nav__more-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 11px 9px 13px; border-radius: 10px;
  color: var(--tqp-text-2) !important; font-weight: 600; font-size: 14px; text-decoration: none !important;
  transition: background var(--tqp-fast) var(--tqp-ease), color var(--tqp-fast);
}
.tqp-nav__more-btn:hover,
.tqp-nav__more.open .tqp-nav__more-btn { background: var(--tqp-surface-3); color: var(--tqp-text) !important; }
.tqp-nav__more-btn.tqp-active { color: var(--tqp-primary-ink) !important; background: var(--tqp-primary-soft); }
.tqp-nav__more-btn .tqp-caret .tqp-ico { width: 15px; height: 15px; transition: transform var(--tqp-fast); }
.tqp-nav__more.open .tqp-caret .tqp-ico { transform: rotate(180deg); }
.tqp-nav__more-menu { min-width: 210px; padding: 6px; margin-top: 8px; border-radius: 12px; border: 1px solid var(--tqp-border); background: var(--tqp-surface); box-shadow: var(--tqp-shadow-lg); }
.tqp-nav__more-menu > li > a {
  display: flex !important; align-items: center; gap: 10px; padding: 9px 12px !important; border-radius: 9px;
  color: var(--tqp-text-2) !important; font-weight: 600; font-size: 14px;
}
.tqp-nav__more-menu > li > a:hover { background: var(--tqp-surface-3) !important; color: var(--tqp-text) !important; }
.tqp-nav__more-menu > li > a.tqp-active { background: var(--tqp-primary-soft) !important; color: var(--tqp-primary-ink) !important; }
.tqp-nav__more-menu .tqp-ico { width: 18px; height: 18px; color: var(--tqp-muted); }
@media (max-width: 991px) { .tqp-nav__more { display: none !important; } }

/* Medium screens: give the links room. Search collapses to an icon that
   expands over the bar when focused; the profile shows the photo only. */
@media (max-width: 1600px) {
  .tqp-nav__profile .tqp-name { display: none; }
  .tqp-search { width: 40px; height: 40px; flex: none; max-width: none; }
  body.customers input.tqp-search__input {
    position: absolute; right: 0; top: 0; width: 40px; height: 40px; padding: 0 0 0 38px;
    background: transparent; border-color: transparent; cursor: pointer;
    transition: width var(--tqp-med) var(--tqp-ease), background var(--tqp-fast), border-color var(--tqp-fast);
  }
  body.customers input.tqp-search__input::placeholder { color: transparent; }
  .tqp-search:hover input.tqp-search__input { background: var(--tqp-surface-3); }
  .tqp-search:focus-within { z-index: 20; }
  body.customers .tqp-search:focus-within input.tqp-search__input {
    width: 300px; padding-right: 14px; cursor: text; background: var(--tqp-surface); border-color: var(--tqp-primary); box-shadow: 0 0 0 3px var(--tqp-ring);
  }
  body.customers .tqp-search:focus-within input.tqp-search__input::placeholder { color: var(--tqp-subtle); }
  .tqp-search__icon { left: 11px; z-index: 1; transition: left var(--tqp-med) var(--tqp-ease); }
  .tqp-search:focus-within .tqp-search__icon { left: -249px; }
  .tqp-search__panel { left: auto; right: 0; width: 380px; }
}

@media (max-width: 1280px) {
  .tqp-nav__links a { padding: 9px 11px; }
  .tqp-nav__links a .tqp-ico { display: none; }
}

/* ---------- 24. Tooltips ------------------------------------------------- */
/* Navbar icons open their tooltips downward (data-placement="bottom"):
   the default "top" placed them off-screen above the header. */
body.customers .tooltip { font-family: var(--tqp-font); z-index: 1080; }
body.customers .tooltip.in { opacity: 1; }
body.customers .tooltip-inner {
  max-width: 240px; padding: 6px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
  background: var(--tqp-text); color: var(--tqp-surface); box-shadow: var(--tqp-shadow);
}
body.customers .tooltip.top .tooltip-arrow { border-top-color: var(--tqp-text); }
body.customers .tooltip.bottom .tooltip-arrow { border-bottom-color: var(--tqp-text); }
body.customers .tooltip.left .tooltip-arrow { border-left-color: var(--tqp-text); }
body.customers .tooltip.right .tooltip-arrow { border-right-color: var(--tqp-text); }

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
  body.customers *, body.customers *::before, body.customers *::after { transition: none !important; animation: none !important; }
}
