/* Platform shared layout — extrahováno z klienti-seznam.html (kanonický AM) */
/* Generated 2026-04-25 (Dex) — single source of truth pro topbar/subnav/sticky-thead/hk-pg-body */

/* GLOBÁLNÍ PRAVIDLO (Dan 2026-05-02): Tlačítka NIKDY nelámou text na 2 řádky */
.btn { white-space: nowrap !important; }
.btn .feather-icon, .btn svg, .btn i { vertical-align: middle; }

/* Dan 2026-05-03: Vyrovnat šířku tab-pane content s mimo-tab content (filter cards apod.).
   Hencework theme přidal `.tab-pane { padding: 24px }` → tabulka uvnitř tab-pane je o 48px užší než filter card mimo tab-pane.
   Reset na 0 ať vše má stejnou šířku. */
.tab-content > .tab-pane { padding: 0 !important; }

/* Dan 2026-05-03: Vyhodit nadpisy stránek + claimy a zmenšit prostor headeru.
   Reverzibilní — pro vrácení smazat tento blok.
   Pravá strana headeru (refresh, Auto-refresh, breadcrumbs, akce) ZŮSTÁVÁ. */
.hk-pg-header .pg-title,
.hk-pg-header > div > div:first-child h1,
.hk-pg-header > div > div:first-child h2,
.hk-pg-header > div > div:first-child > p,
.hk-pg-header > div > div:first-child .text-muted { display: none !important; }
.hk-pg-header { padding-top: 4px !important; padding-bottom: 4px !important; margin-bottom: 8px !important; min-height: 0 !important; }
.hk-pg-header.pg-header-wth-tab { padding-top: 4px !important; }
.hk-pg-wrapper { padding-top: 65px !important; }  /* zachovat topbar offset 65px */

.navbar-brand.brand-text { padding: 0; margin-left: 0.75rem; }  /* Dex 2026-05-01: posun Platform doprava */
    .brand-text-logo {
      font-size: 1.35rem;
      font-weight: 700;
      letter-spacing: -0.02em;
      color: #1a1d21;
      line-height: 1;
    }
    [data-bs-theme="dark"] .brand-text-logo { color: #e4e6eb; }

    /* Brand logo (nové logo Platform 1, Dan 2026-06-02). Loga jsou černá na
       transparentním pozadí → v dark theme je invertujeme na bílou. */
    .brand-logo { display: block; width: auto; }
    .brand-logo--full { height: 36px; }
    .brand-logo--pikto { height: 36px; }
    [data-bs-theme="dark"] .brand-logo { filter: brightness(0) invert(1); }

    /* Project switcher — Dex 2026-05-01: blíže k brandu + menší DD */
    .dropdown.project-switcher.ms-3 { margin-left: 0.15rem !important; }  /* 1rem → 0.15rem (těsně k Platform) */
    .project-switcher-btn {
      background: transparent;
      border: 1px solid transparent;
      border-radius: 6px;
      padding: 2px 4px 2px 2px;
      transition: background .15s ease;
    }
    .project-switcher-btn:hover {
      background: var(--bs-tertiary-bg);
    }
    .project-switcher-btn:focus { box-shadow: none; outline: none; }
    .project-switcher-icon {
      width: 20px;
      height: 20px;
      border-radius: 5px;
      object-fit: cover;
      flex-shrink: 0;
    }
    .project-switcher-menu {
      box-shadow: 0 8px 24px rgba(47, 52, 58, 0.12);
      border: 1px solid var(--bs-border-color);
      border-radius: 10px;
      min-width: 180px !important;  /* 220 → 180 (kompaktnější) */
    }
    .project-switcher-menu .dropdown-header { font-size: 0.65rem !important; padding-top: 4px !important; padding-bottom: 4px !important; }
    .project-item { font-weight: 500; font-size: 0.83rem; padding-top: 5px !important; padding-bottom: 5px !important; }
    .project-item:hover { background: var(--bs-tertiary-bg); }
    /* Active row — Hencework má --bs-primary-bg-subtle přemapovaný na sytý teal,
       takže text musí být WHITE pro kontrast. Plus přepsat .dropdown-item color
       override z topbarCss !important pomocí vyšší specificity (Dex 2026-05-02). */
    .hk-navbar .dropdown-menu .project-item.active,
    .project-switcher-menu .project-item.active,
    .project-item.active { background: var(--bs-primary, #007d88) !important; color: #fff !important; }
    .hk-navbar .dropdown-menu .project-item.active span,
    .project-switcher-menu .project-item.active span,
    .project-item.active span { color: #fff !important; }
    .project-item.active .feather-icon,
    .project-item.active svg { color: #fff !important; stroke: #fff !important; }
    .project-item-icon {
      width: 18px;            /* 26 → 18 (menší ikony v DD) */
      height: 18px;
      border-radius: 4px;
      object-fit: cover;
      flex-shrink: 0;
    }
    .project-switcher-menu .feather-icon { width: 12px; height: 12px; }
    .project-switcher-menu .feather-icon svg { width: 12px; height: 12px; }

    /* Collapsible search */
    .navbar-search-collapsible {
      position: relative;
      display: flex;
      align-items: center;
    }
    .navbar-search-field {
      position: absolute;
      left: 0;
      top: 50%;
      transform: translateY(-50%);
      width: 0;
      opacity: 0;
      overflow: hidden;
      transition: width .2s ease, opacity .15s ease;
      pointer-events: none;
      z-index: 5;
      background: var(--bs-body-bg);
    }
    .navbar-search-collapsible.open .navbar-search-field {
      width: 320px;
      opacity: 1;
      pointer-events: auto;
    }
    .navbar-search-collapsible.open #navbar-search-toggle {
      opacity: 0;
      pointer-events: none;
    }
    .navbar-search-field .input-affix-wrapper {
      border-radius: 8px;
    }

    /* Force scrollbar vždy rezervován → viewport i navbar mají stejnou symetrickou šířku, topnav pak padne přesně doprostřed (Dex) */
    html { overflow-y: scroll; scrollbar-gutter: stable; }

    /* Anti-shift: pre-size feather icon boxů aby se nehnuly při JS replace <i> → <svg> (Dex) */
    .feather-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      height: 18px;
      line-height: 0;
    }
    .feather-icon > i,
    .feather-icon > svg { width: 18px; height: 18px; display: block; }
    .feather-icon > i::before { content: ""; display: inline-block; width: 18px; height: 18px; }

    /* Navbar layout — topnav flex-grow mezi left a right, obsah uprostřed dostupného prostoru (Dex) */
    .hk-navbar .container-fluid {
      display: flex;
      align-items: center;
      min-height: 65px;
    }
    .hk-navbar .nav-start-wrap { display: flex; align-items: center; flex: 0 0 auto; }
    .hk-navbar .nav-right-wrap { display: flex; align-items: center; flex: 0 0 auto; }
    .hk-navbar .nav-end-wrap { display: flex; align-items: center; }
    .platform-topnav {
      display: flex;
      align-items: center;
      gap: 2px;
      justify-content: center;
      white-space: nowrap;
      flex: 1 1 auto;
      min-width: 0;
    }
    .platform-topnav .pnav-item {
      position: relative;
      display: inline-flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
      gap: 7px;
      padding: 7px 12px;
      border-radius: 8px;
      text-decoration: none;
      color: var(--bs-body-color);
      font-size: 0.92rem;
      font-weight: 500;
      line-height: 1.1;
      cursor: pointer;
      transition: background .15s ease, color .15s ease;
      background: transparent;
      border: none;
      white-space: nowrap;
    }
    .platform-topnav .pnav-item:hover {
      background: var(--bs-tertiary-bg);
      color: var(--bs-body-color);
    }
    .platform-topnav .pnav-item.active {
      background: var(--bs-primary-bg-subtle);
      color: var(--bs-primary);
    }
    .platform-topnav .pnav-icon {
      width: 17px;
      height: 17px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .platform-topnav .pnav-icon svg {
      width: 17px;
      height: 17px;
    }
    .platform-topnav .pnav-label {
      font-size: 0.92rem;
      font-weight: 500;
    }

    /* Standalone nav buttons (Úkoly, Helpdesk) — bigger, separated from user area */
    .nav-standalone-group {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      margin-right: 16px;
      padding-right: 16px;
      border-right: 1px solid var(--bs-border-color);
    }
    .nav-standalone-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 7px 14px;
      border-radius: 8px;
      text-decoration: none;
      color: var(--bs-body-color);
      font-size: 0.95rem;
      font-weight: 500;
      line-height: 1;
      background: transparent;
      border: none;
      position: relative;
      transition: background .15s ease;
      cursor: pointer;
      white-space: nowrap;
    }
    .nav-standalone-btn:hover {
      background: var(--bs-tertiary-bg);
      color: var(--bs-body-color);
    }
    /* Active stav (Dex 2026-05-02) — zvýrazní stránku, na které jsem (Úkoly / Helpdesk) */
    .nav-standalone-btn.active {
      background: var(--bs-primary-bg-subtle);
      color: var(--bs-primary);
      font-weight: 600;
    }
    .nav-standalone-btn.active:hover {
      background: var(--bs-primary-bg-subtle);
      color: var(--bs-primary);
    }
    .nav-standalone-btn .feather-icon { display: inline-flex; align-items: center; }
    .nav-standalone-btn .feather-icon i,
    .nav-standalone-btn .feather-icon svg { width: 18px; height: 18px; }
    .nav-standalone-btn .nav-badge {
      position: absolute;
      top: 2px;
      right: 4px;
      min-width: 16px;
      height: 16px;
      padding: 0 4px;
      font-size: 0.65rem;
      font-weight: 600;
      line-height: 16px;
      border-radius: 8px;
      text-align: center;
    }
    .platform-topnav .pnav-caret {
      font-size: 0.6rem;
      opacity: .5;
      margin-left: 2px;
    }
    /* Defenzivní — zrušený vyjížděcí dropdown z topnavu (Dex) */
    .platform-topnav .pnav-dropdown,
    .pnav-dropdown { display: none !important; }

    /* Dark mode — nahradit tmavě tyrkysovou/zelenou active barvu světlejší variantou (Dex) */
    [data-bs-theme="dark"] .platform-topnav .pnav-item.active,
    [data-bs-theme="dark"] .platform-subnav .subnav-item.active {
      color: var(--bs-primary-text-emphasis);
    }
    [data-bs-theme="dark"] .platform-topnav .pnav-item.active {
      background: rgba(107, 180, 186, 0.15);
    }
    [data-bs-theme="dark"] .platform-subnav .subnav-item.active {
      background: var(--bs-body-bg);
    }

    /* Skryt hk-menu pokud je v DOM (starý Jampack) */
    .hk-menu, #hk_menu_backdrop { display: none !important; }

    /* Body nesmí mít overflow-y:auto, jinak sticky thead nefunguje (Dex) */
    body, html body, body.hk-body { overflow-y: visible !important; overflow-x: clip !important; }

    /* Minimalizuj mezery kolem breadcrumb a body wrapperu (Dex) */
    .hk-pg-body { padding-top: 2.5rem !important; }
    .hk-pg-header { border-bottom: 0 !important; }
    .hk-pg-wrapper { padding-top: 65px !important; }
    .aff-list-table thead th:first-child { padding-top: 6px; }

    /* Sortable table headers (Dex 2026-04-20) */
    table[data-sortable] thead th.sortable { cursor: pointer; user-select: none; position: sticky; }
    table[data-sortable] thead th.sortable:hover { background: var(--bs-tertiary-bg); }
    table[data-sortable] thead th.sortable::after {
      content: '';
      display: inline-block;
      width: 0; height: 0;
      margin-left: 6px;
      vertical-align: middle;
      border-left: 4px solid transparent;
      border-right: 4px solid transparent;
      border-top: 5px solid transparent;
      border-bottom: 5px solid transparent;
      opacity: .35;
    }
    table[data-sortable] thead th.sortable:not(.sort-asc):not(.sort-desc)::after {
      border-top: 4px solid currentColor;
      margin-top: 4px;
      opacity: .25;
    }
    table[data-sortable] thead th.sort-asc::after {
      border-bottom: 5px solid currentColor;
      opacity: .9;
    }
    table[data-sortable] thead th.sort-desc::after {
      border-top: 5px solid currentColor;
      opacity: .9;
    }
    table[data-sortable] thead th.sort-asc, table[data-sortable] thead th.sort-desc {
      color: var(--bs-primary);
    }

    /* Sticky table headers — OPT-IN přes třídu .sticky-thead na <table> (Dex 2026-05-02 fix)
       Předtím globální .table > thead > tr > th způsobovalo, že na malých tabulkách
       (např. detail dat 14 řádků) první 2 data řádky proklouzly nahoru pod sticky subnav.
       Velké list stránky (klienti-seznam, affiliates-seznam, uzivatele-seznam, ...) si
       musí přidat třídu .sticky-thead explicitně. */
    .table.sticky-thead > thead > tr > th {
      position: sticky;
      top: calc(65px + 43px); /* topbar 65 + subnav reálně ~43 (Dan 2026-05-03 zmenšil hk-pg-header — subnav teď 43px, dříve 60px) */
      z-index: 1021; /* nad subnavem 1020, aby nebyl překryt */
      background: var(--bs-body-bg);
      box-shadow: inset 0 -1px 0 var(--bs-border-color);
    }
    .modal .table.sticky-thead > thead > tr > th { top: 0; z-index: 10; }
    /* Pages bez tabs subnav (leaf list pages) — thead lepí přímo pod topbar (Dex 2026-05-03) */
    body:has(.platform-subnav.empty) .table.sticky-thead > thead > tr > th { top: 65px; }


    /* Sub-nav (2. úroveň) — sticky na hraně topbaru (Dex)
       2026-05-03 (Dan): zmenšen prostor mezi top menu a subnav (padding-top 8→2, bottom 6→2, min-height 59→44) */
    .platform-subnav {
      position: sticky;
      top: 65px;
      z-index: 1020; /* pod hk-navbar (1030), aby ho project-switcher dropdown mohl překrýt (Dex) */
      margin: 0 -12px 0; /* bez spodního marginu — šetříme místo */
      padding: 0 12px 0;
      background: var(--bs-body-bg);
      /* Anti-flash: rezervovaná výška, skryté dokud se nevyrenderuje (Dex) */
      min-height: 36px;
      box-sizing: border-box;
      visibility: hidden;
    }
    .platform-subnav.ready { visibility: visible; }
    /* Project switcher dropdown musí být nad sub-navem (Dex) */
    .project-switcher .dropdown-menu, .project-switcher-menu { z-index: 1050 !important; }
    .platform-subnav.empty {
      min-height: 0;
      padding: 0;
      margin: 0;
      display: none;
    }
    .platform-subnav .subnav-inner {
      display: flex;
      gap: 4px;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
      padding: 4px;
      background: var(--bs-tertiary-bg);
      border-radius: 10px;
      overflow-x: auto;
    }
    .platform-subnav .subnav-item {
      display: inline-flex;
      align-items: center;
      padding: 7px 14px;
      border-radius: 7px;
      font-size: 0.88rem;
      font-weight: 500;
      color: var(--bs-body-color);
      text-decoration: none;
      white-space: nowrap;
      transition: background .15s ease;
    }
    .platform-subnav .subnav-item:hover {
      background: var(--bs-body-bg);
      color: var(--bs-body-color);
    }
    .platform-subnav .subnav-item.active {
      background: var(--bs-body-bg);
      color: var(--bs-primary);
      box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }
    /* Layout padding-top jen pro topbar 65px (Jampack původně počítá 107px) */
    body .hk-pg-wrapper { padding-top: 65px !important; }
  

  .hk-navbar .container-fluid { display: flex !important; align-items: center !important; gap: 24px !important; min-height: 65px !important; position: relative !important; }
  .hk-navbar .nav-start-wrap { flex: 1 1 0 !important; min-width: 0 !important; }
  .hk-navbar .nav-right-wrap { flex: 0 0 auto !important; margin-left: auto !important; padding-left: 24px !important; border-left: 1px solid rgba(0,0,0,0.1); gap: 12px !important; }
  .platform-topnav { flex: 0 0 auto !important; position: static !important; transform: none !important; margin: 0 24px !important; padding: 0 !important; white-space: nowrap !important; }
  .platform-topnav .pnav-item:last-child { margin-right: 8px !important; }
  @media (max-width: 1299px) { .platform-topnav { display: none !important; } .hk-navbar .nav-right-wrap { border-left: 0 !important; padding-left: 0 !important; } }

  /* ===== Mobil/mid (≤1299px) — topnav skryt → hamburger převezme navigaci.
     1:1 s prod ERP: nad 1199 schová Bootstrap d-xl-none hamburger, ale topnav
     mizí už pod 1300 → hamburger nutíme zobrazit už ≤1299. ===== */
  @media (max-width: 1299px) {
    .hk-navbar .navbar-toggle.d-xl-none { display: inline-flex !important; }
    .hk-navbar .nav-standalone-group { display: none !important; }
    .hk-navbar .container-fluid { gap: 8px !important; padding-left: 12px !important; padding-right: 12px !important; }
    .hk-navbar .nav-right-wrap { gap: 6px !important; }
  }
  /* ≤1199px — schovej notifikace (dostupné přes Úkoly v menu). */
  @media (max-width: 1199px) {
    .hk-navbar .dropdown-notifications { display: none !important; }
  }

  /* Burger aktivního modulu (vlevo před logem) — jen mobil ≤768px, kde se
     sidebar modulu (Úkoly) chová jako off-canvas drawer. */
  .hk-navbar .module-nav-toggle { display: none; }
  @media (max-width: 768px) {
    .hk-navbar .module-nav-toggle { display: inline-flex !important; margin-right: 2px; }
  }

  /* ===== Tablet-landscape / menší laptopy (1300–1499px) — KOMPAKTNÍ topnav.
     Plný topbar (logo + lupa + 7 modulů + Úkoly/Helpdesk + ikony) se vejde bez
     kolizí až od ~1500px; v tomto pásmu se 1. položka menu jinak zalézá pod
     lupu (Dan 2026-06-02). Řešení: skrýt lupu (hledání přes Cmd+K), zúžit
     položky a Úkoly/Helpdesk jen jako ikony — vše zůstává dostupné. ===== */
  @media (min-width: 1300px) and (max-width: 1499px) {
    .hk-navbar #global-search-btn { display: none !important; }
    .platform-topnav { gap: 1px !important; }
    .platform-topnav .pnav-item { padding: 6px 8px !important; gap: 5px !important; }
    .hk-navbar .nav-standalone-btn { padding-left: 8px !important; padding-right: 8px !important; }
    .hk-navbar .nav-standalone-btn > span:not(.feather-icon):not(.nav-badge) { display: none !important; }
  }

  /* ========================================================================
     MOBILNÍ FULLSCREEN MENU (#dex-mm) — 1:1 port z prod ERP (Dex 2026-06-02)
     ======================================================================== */
  #dex-mm { position: fixed; inset: 0; z-index: 2000; display: none; }
  #dex-mm[aria-hidden="false"] { display: block; }
  #dex-mm .dex-mm-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.45); animation: dex-mm-fade 0.18s ease; }
  #dex-mm .dex-mm-panel {
    position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 92vw);
    background: var(--bs-body-bg); display: flex; flex-direction: column;
    box-shadow: -8px 0 24px rgba(0,0,0,0.15);
    animation: dex-mm-slide 0.22s ease;
    overflow-y: auto;
  }
  #dex-mm .dex-mm-head { display:flex; align-items:center; justify-content:space-between; padding: 16px 18px; border-bottom: 1px solid var(--bs-border-color); position:sticky; top:0; background: var(--bs-body-bg); z-index:1; }
  #dex-mm .dex-mm-head strong { font-size: 1.05rem; }
  #dex-mm .dex-mm-close {
    width: 36px; height: 36px; border-radius: 8px; border: 0; background: transparent;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1.4rem; color: var(--bs-secondary-color);
  }
  #dex-mm .dex-mm-close:hover { background: var(--bs-tertiary-bg); }
  #dex-mm h6 { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--bs-secondary-color); margin: 18px 18px 6px; font-weight: 600; }
  #dex-mm ul { list-style: none; padding: 0 8px; margin: 0 0 6px; }
  #dex-mm li a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--bs-body-color); text-decoration: none; font-size: 0.95rem; }
  #dex-mm li a:hover { background: var(--bs-tertiary-bg); }
  #dex-mm li a.active { background: var(--bs-primary-bg-subtle); color: var(--bs-primary); font-weight: 500; }
  #dex-mm li a img { width: 22px; height: 22px; border-radius: 5px; object-fit: cover; flex-shrink: 0; }
  #dex-mm li a .avatar { width: 22px; height: 22px; flex-shrink: 0; }
  #dex-mm li a .feather-icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--bs-secondary-color); }
  #dex-mm li a .feather-icon svg { width: 18px; height: 18px; }
  /* Podstránky aktivního modulu — odsazené pod ním. */
  #dex-mm .dex-mm-sub { padding: 0 8px 2px 30px; margin: 0 0 4px; }
  #dex-mm .dex-mm-sub li a { padding: 8px 12px; font-size: 0.9rem; color: var(--bs-secondary-color); }
  #dex-mm .dex-mm-user { padding: 14px 18px; border-top: 1px solid var(--bs-border-color); margin-top: auto; }
  #dex-mm .dex-mm-user-name { font-weight: 600; font-size: 0.9rem; }
  #dex-mm .dex-mm-user-email { font-size: 0.78rem; color: var(--bs-secondary-color); }
  @keyframes dex-mm-fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes dex-mm-slide { from { transform: translateX(100%); } to { transform: translateX(0); } }
  body.dex-mm-open { overflow: hidden; }

/* ========================================================================
   PATTERN COMPONENTS — extrakt z klienti-seznam.html + klienti-detail-demo.html
   (Dex 2026-04-25) — fronta, monthly tabulka, hero card, KPI, údaje, pills, badges
   ======================================================================== */

/* --- LIST TABLE pattern --- */
					.aff-list-table { border-collapse: separate; border-spacing: 0; }
					.aff-list-table thead th {
						font-size: 0.72rem;
						letter-spacing: 0.04em;
						font-weight: 600;
						padding-top: 10px;
						padding-bottom: 10px;
						border-bottom: 1px solid var(--bs-border-color);
						white-space: nowrap; /* hlavičky se nesmí lámat (parita s prod, kde to drží šířka dat) */
					}
					.aff-list-table tbody td {
						padding-top: 12px;
						padding-bottom: 12px;
						font-size: 0.83rem;
						font-weight: 400;
						border-bottom: 1px solid var(--bs-border-color-translucent, rgba(0,0,0,0.06));
					}
					.aff-list-table tbody td:first-child .fw-semibold {
						font-size: 0.9rem;
						font-weight: 600;
					}
					.aff-list-table tbody tr.aff-row { transition: background .12s ease; }
					.aff-list-table tbody tr.aff-row:hover {
						background: var(--bs-tertiary-bg);
					}
					.aff-list-table tbody tr:last-child td { border-bottom: 0; }
					.aff-web-link:hover { color: var(--bs-primary) !important; text-decoration: underline !important; }
					.aff-detail-link { font-weight: 500; padding: 3px 10px; font-size: 12px; line-height: 1.4; }
					.aff-detail-link:hover { background: var(--bs-primary-bg-subtle); color: var(--bs-primary); }
					.btn-detail { font-weight: 500; padding: 3px 10px; font-size: 12px; line-height: 1.4; }
					/* Očičko button — jednotný styl pro všechny výpisy */
					.btn-detail-row { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 1px solid #e5e7eb; background: #fff; border-radius: 7px; cursor: pointer; color: #6b7280; transition: all 0.12s ease; text-decoration: none; }
					.btn-detail-row:hover { background: rgba(0,0,0,0.04); color: #1f2937; border-color: #d1d5db; }
					/* --- Monthly table (port z Partner /vypis, kompaktní) --- */
					.monthly-table { font-size: 0.82rem; }
					.monthly-table thead th { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; font-weight: 600; border-bottom: 1px solid #e5e7eb; padding: 8px 10px; vertical-align: middle; }
					.monthly-table thead th.num { text-align: right; }
					.monthly-table tbody td { padding: 11px 10px; vertical-align: top; }
					.monthly-table tbody td.num { text-align: right; font-variant-numeric: tabular-nums; }
					.monthly-table tbody tr:hover { background: rgba(0,0,0,0.015); }
					.monthly-table .month-cell { min-width: 170px; }
					.monthly-table .month-main { font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 0; line-height: 1.2; font-size: 0.83rem; }
					.monthly-table .muted { color: #9ca3af; }
					.monthly-table .positive { color: #1b8a3a; }
					.monthly-table .negative { color: #c82b23; }
					/* Hero (aktuální měsíc) — stejná velikost jako ostatní řádky, jen bez delty */
					.monthly-table .monthly-hero .cell-delta { visibility: hidden; }
					/* Cell stack — main hodnota + delta pod ní */
					.monthly-table .cell-stack { display: flex; flex-direction: column; gap: 2px; width: 100%; }
					.monthly-table tbody td.num .cell-main,
					.monthly-table tbody td.num .cell-delta { text-align: right; width: 100%; }
					.monthly-table tbody td:not(.num) .cell-stack { align-items: flex-start; }
					.monthly-table .cell-main { line-height: 1.2; }
					.monthly-table .cell-delta { line-height: 1; min-height: 11px; }
					/* Delta */
					.monthly-table .delta { display: inline-flex; align-items: center; gap: 3px; font-size: 0.66rem; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1; }
					.monthly-table .delta-up { color: #1b8a3a; }
					.monthly-table .delta-down { color: #c82b23; }
					.monthly-table .delta-flat { color: #9ca3af; }
					.monthly-table .delta-na { color: #9ca3af; font-style: italic; font-size: 0.64rem; }
					.monthly-table .delta-placeholder { visibility: hidden; }
					.monthly-table .delta-inline { font-size: 0.62rem; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; margin-left: 4px; }
					.monthly-table .delta-inline.delta-up { color: #1b8a3a; }
					.monthly-table .delta-inline.delta-down { color: #c82b23; }
					.monthly-table .delta-inline.delta-flat { color: #9ca3af; }
					.monthly-table tbody tr.aff-month-subrow td { padding: 2px 10px 8px 10px; border-bottom: 1px solid rgba(0,0,0,0.05); font-size: 0.68rem; color: #6b7280; background: rgba(0,0,0,0.015); }
					.monthly-table tbody tr.aff-month-subrow td.delta-sub { vertical-align: top; }
					.monthly-table tbody tr.aff-month-subrow .delta-inline { font-size: 0.68rem; margin-left: 0; }
					.monthly-table tbody tr.aff-month-subrow .delta-sub-label { font-style: italic; color: #9ca3af; font-size: 0.64rem; }
					.monthly-table tbody tr.aff-month-row + tr.aff-month-subrow td { border-top: none; }
					.monthly-table tbody tr.aff-month-row:has(+ tr.aff-month-subrow) td { border-bottom: none; padding-bottom: 6px; }
					/* NGR ROI mini bar pod názvem měsíce — maximálně kompaktní */
					.monthly-table .aff-roi-row { display: flex; align-items: center; gap: 0; font-size: 0.58rem; color: #6b7280; line-height: 1.1; margin-top: 1px; }
					.monthly-table .aff-roi-bar { flex: 0 0 auto; height: 2px; background: rgba(0,0,0,0.05); border-radius: 1.5px; overflow: hidden; width: 40px; margin-right: 6px; }
					.monthly-table .aff-roi-fill { height: 100%; border-radius: 2px; transition: width 0.3s ease; opacity: 0.85; }
					.monthly-table .aff-roi-fill.negative { background: #ff3b30; }
					.monthly-table .aff-roi-fill.break-even { background: #ff9500; }
					.monthly-table .aff-roi-fill.healthy { background: #34c759; }
					.monthly-table .aff-roi-fill.unknown { background: rgba(0,0,0,0.12); }
					.monthly-table .aff-roi-label { font-size: 0.58rem !important; font-weight: 500 !important; color: #6b7280; white-space: nowrap; margin-right: 4px; line-height: 1.1; }
					.monthly-table .aff-roi-value { font-size: 0.58rem !important; font-variant-numeric: tabular-nums; font-weight: 500 !important; color: #4b5563; line-height: 1.1; }
					.monthly-table .aff-roi-value.positive { color: #1b8a3a; }
					.monthly-table .aff-roi-value.negative { color: #c82b23; }
					/* Compact styling pro Kampane/Affiliates/Month-modal subtabulky (Dex 2026-04-21) */
					#aff-view-campaigns thead th, #klient-affiliates-table thead th, #klient-invoices-table thead th, #aff-month-modal thead th { font-size: 0.68rem !important; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280 !important; font-weight: 600; padding: 8px 10px; vertical-align: middle; border-bottom: 1px solid #e5e7eb; }
					#aff-view-campaigns tbody td, #klient-affiliates-table tbody td, #klient-invoices-table tbody td, #aff-month-tbody td { font-size: 0.82rem; padding: 8px 10px; vertical-align: middle; }
					/* Detail button (oko) */
					.monthly-table .btn-detail-row { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 1px solid #e5e7eb; background: #fff; border-radius: 7px; cursor: pointer; color: #6b7280; transition: all 0.12s ease; }
					.monthly-table .btn-detail-row:hover { background: rgba(0,0,0,0.04); color: #1f2937; border-color: #d1d5db; }
					/* Bod 6 (Dex 2026-04-19): hero pilulky — decentní, zarovnaná baseline */
					.aff-hero-pills { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
					.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 500; line-height: 1; background: rgba(0,0,0,0.04); color: #444; border: 1px solid rgba(0,0,0,0.06); }
					.pill-flag-ico { font-size: 0.95rem; line-height: 1; }
					.pill-flag { background: #f6f8fa; color: #1f2937; border-color: #e5e7eb; }
					.pill-currency { background: #fff8e6; color: #8a5a00; border-color: #f5e5b8; }
					.pill-cur-sym { font-weight: 700; font-size: 0.85rem; }
					.pill-star { background: #e7f7ed; color: #137333; border-color: #cbe9d3; font-weight: 600; }
					[data-bs-theme="dark"] .pill { background: rgba(255,255,255,0.06); color: #ddd; border-color: rgba(255,255,255,0.08); }
					[data-bs-theme="dark"] .pill-flag { background: rgba(255,255,255,0.04); color: #e5e7eb; }
					[data-bs-theme="dark"] .pill-currency { background: rgba(255,200,80,0.12); color: #f5d57a; border-color: rgba(255,200,80,0.28); }
					[data-bs-theme="dark"] .pill-star { background: rgba(52,199,89,0.14); color: #a5e3b8; border-color: rgba(52,199,89,0.32); }

					.badge-cz, .badge-sk, .badge-mix {
						padding: 2px 10px;
						font-size: 0.7rem;
						display: inline-block;
						border-radius: 4px;
						min-width: 34px;
						letter-spacing: 0.02em;
					}
					.badge-cz { background: #e6f4ea; color: #137333; border: 1px solid #cde8d6; font-weight: 600; }
					.badge-sk { background: #eaf1ff; color: #174ea6; border: 1px solid #d0deff; font-weight: 600; }
					.badge-mix { background: #fff4e0; color: #9a5b00; border: 1px solid #ffe3b3; font-weight: 600; }
					.aff-list-table td.aff-country-cell { white-space: nowrap; }
					.aff-list-table td.aff-segment-cell { white-space: nowrap; }
					.seg-stripe-inline {
						display: inline-block;
						padding: 2px 8px;
						border-radius: 4px;
						font-size: 0.7rem;
						font-weight: 600;
						color: #fff;
						letter-spacing: 0.02em;
						margin: 1px 2px;
						line-height: 1.3;
					}
					[data-bs-theme="dark"] .badge-cz { background: rgba(52,168,83,0.15); color: #8be9a3; border-color: rgba(52,168,83,0.35); }
					[data-bs-theme="dark"] .badge-sk { background: rgba(66,133,244,0.15); color: #8fb8ff; border-color: rgba(66,133,244,0.35); }
					[data-bs-theme="dark"] .badge-mix { background: rgba(251,188,5,0.15); color: #ffd87a; border-color: rgba(251,188,5,0.35); }
					#aff-search { box-shadow: none; }
					#aff-search:focus { box-shadow: none; border-color: var(--bs-border-color); }
					.input-search .input-group-text { padding-right: 4px; }

					/* Klient doklady — stejný design jako ostatní výpisy (0.83rem, weight 400, bold 1. sloupec) */
					#klient-invoices-table { font-size: 0.83rem; }
					#klient-invoices-table tbody td { font-weight: 400; padding-top: 10px; padding-bottom: 10px; }
					#klient-invoices-table tbody td:first-child strong { font-weight: 600; font-size: 0.9rem; }
					#klient-invoices-table thead th { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--bs-secondary-color); font-weight: 600; padding-top: 10px; padding-bottom: 10px; background: var(--bs-body-bg); position: static; border-bottom: 1px solid var(--bs-border-color); }

					/* Kam modal KPI — 5 sloupců × 2 řádky, kompaktní */
					#kam-kpi { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
					#kam-kpi .kam-kpi-col { min-width: 0; }
					#kam-kpi .kam-kpi-card {
						padding: 10px 14px;
						background: var(--bs-body-bg);
						border: 1px solid var(--bs-border-color-translucent, rgba(0,0,0,0.08));
						border-radius: 8px;
						height: 100%;
					}
					#kam-kpi .kam-kpi-label {
						font-size: 0.65rem;
						text-transform: uppercase;
						letter-spacing: 0.05em;
						color: var(--bs-secondary-color);
						font-weight: 600;
						margin-bottom: 4px;
					}
					#kam-kpi .kam-kpi-value {
						font-size: 0.95rem;
						font-weight: 600;
						line-height: 1.2;
						color: var(--bs-body-color);
					}
					@media (max-width: 768px) { #kam-kpi { grid-template-columns: repeat(2, 1fr); } }

					/* ===== Drawer look pro klient-aff-modal (Bod F, Dex 2026-04-19) =====
					   Přeneseno z Partner Portalu (CSS /tmp/partner-reference/public/css/style.css ř. 1596+)
					   Aplikováno na Bootstrap modal (zachován markup) jen přes override tříd. */
					#klient-aff-modal .modal-dialog { max-width: min(1040px, calc(100vw - 64px)); }
					#klient-aff-modal .modal-content {
						border-radius: 18px;
						box-shadow: 0 24px 80px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.05);
						border: none;
						overflow: hidden;
					}
					#klient-aff-modal .modal-header {
						padding: 24px 32px 18px;
						border-bottom: 1px solid var(--bs-border-color);
					}
					#klient-aff-modal .modal-title { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
					#klient-aff-modal .modal-body { padding: 0; }
					/* Drawer toolbar — period picker + month select */
					.kam-drawer-toolbar {
						display: flex; align-items: center; gap: 12px;
						padding: 12px 24px;
						border-bottom: 1px solid var(--bs-border-color);
						flex-wrap: wrap;
					}
					.kam-period-picker {
						display: inline-flex;
						background: var(--bs-body-bg);
						border: 1px solid var(--bs-border-color);
						border-radius: 8px;
						padding: 4px;
						gap: 2px;
					}
					.kam-period-picker button {
						padding: 7px 16px;
						border-radius: 8px;
						font-size: 0.82rem;
						font-weight: 500;
						color: var(--bs-secondary-color);
						background: transparent;
						border: none;
						transition: background 0.15s, color 0.15s;
						cursor: pointer;
					}
					.kam-period-picker button:hover { color: var(--bs-body-color); }
					.kam-period-picker button.active {
						background: #5b3f96;
						color: #fff;
					}
					.kam-period-picker .period-all {
						font-weight: 600;
						margin-left: 6px;
						position: relative;
					}
					.kam-period-picker .period-all::before {
						content: '';
						position: absolute; left: -3px; top: 20%; bottom: 20%;
						width: 1px; background: var(--bs-border-color);
					}
					/* Drawer body */
					.kam-drawer-body { padding: 28px 32px 36px; }
					/* Metric grid — 10 dlaždic, responsive */
					.kam-metric-grid {
						display: grid;
						grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
						gap: 10px;
					}
					.kam-metric-card {
						background: rgba(0,0,0,0.025);
						border: 1px solid var(--bs-border-color);
						border-radius: 12px;
						padding: 12px 14px;
						display: flex; flex-direction: column; gap: 4px;
					}
					.kam-metric-label {
						font-size: 0.66rem;
						color: var(--bs-secondary-color);
						text-transform: uppercase;
						letter-spacing: 0.05em;
						font-weight: 600;
					}
					.kam-metric-value {
						font-size: 1.1rem;
						font-weight: 700;
						font-variant-numeric: tabular-nums;
						color: var(--bs-body-color);
						line-height: 1.15;
					}
					/* Chart section */
					.kam-chart-section {
						margin-top: 22px;
						padding-top: 22px;
						border-top: 1px solid var(--bs-border-color);
					}
					.kam-chart-toolbar {
						display: inline-flex;
						gap: 2px;
						margin-bottom: 14px;
					}
					.kam-chart-toolbar button {
						border: 1px solid transparent;
						background: transparent;
						font-size: 0.82rem;
						font-weight: 500;
						color: var(--bs-secondary-color);
						padding: 6px 14px;
						border-radius: 6px;
						cursor: pointer;
						transition: all 0.15s ease;
					}
					.kam-chart-toolbar button:hover { color: var(--bs-body-color); }
					.kam-chart-toolbar button.active {
						font-weight: 600;
						color: var(--bs-body-color);
						background: rgba(91,63,150,0.08);
						border-color: rgba(91,63,150,0.25);
					}
					.kam-chart-wrap { position: relative; height: 260px; width: 100%; }
					@media (max-width: 720px) {
						.kam-drawer-body { padding: 20px 18px 28px; }
						.kam-drawer-toolbar { padding: 10px 16px; }
						#klient-aff-modal .modal-header { padding: 18px 18px 14px; }
					}

					/* Klient affiliates tabulka */
					#klient-affiliates-table { font-size: 0.83rem; }
					#klient-affiliates-table tbody td { font-weight: 400; padding-top: 10px; padding-bottom: 10px; white-space: nowrap; }
					#klient-affiliates-table tbody td:first-child { white-space: normal; min-width: 160px; }
					#klient-affiliates-table tbody td:first-child strong { font-weight: 600; font-size: 0.9rem; }
					#klient-affiliates-table thead th { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--bs-secondary-color); font-weight: 600; padding-top: 10px; padding-bottom: 10px; background: var(--bs-body-bg); position: static; border-bottom: 1px solid var(--bs-border-color); white-space: nowrap; }

					/* Klient logo — mini v seznamu + placeholder */
					.klient-logo-mini {
						width: 44px; height: 28px;
						border-radius: 4px;
						object-fit: contain;
						background: #fff;
						border: 1px solid rgba(0,0,0,0.06);
						padding: 2px;
						flex-shrink: 0;
						display: inline-flex;
						align-items: center;
						justify-content: center;
					}
					.klient-logo-placeholder {
						background: linear-gradient(135deg, #0071e3, #5b3f96);
						color: #fff;
						font-weight: 600;
						font-size: 0.8rem;
						padding: 0;
					}
					[data-bs-theme="dark"] .klient-logo-mini { background: rgba(255,255,255,0.9); }

					/* Klient logo v hero — využije aff-avatar box ale s background white + padding */
					img.aff-avatar.klient-logo-hero {
						width: 96px !important;
						height: 56px !important;
						border-radius: 8px !important;
						background: #fff !important;
						object-fit: contain;
						padding: 6px;
						border: 1px solid rgba(0,0,0,0.06);
					}
					[data-bs-theme="dark"] img.aff-avatar.klient-logo-hero { background: rgba(255,255,255,0.95) !important; }

/* --- HERO CARD + TABS + KPI + ÚDAJE pattern (z klienti-detail-demo.html) --- */

.aff-hero { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); margin-bottom: 24px; overflow: hidden; }

/* HEADLINE — 2 bloky: vlevo identita, vpravo ROI / quick info */
.hero-head { padding: 22px 24px; display: flex; gap: 28px; align-items: stretch; }

/* LEFT block — identity */
.hero-left { flex: 1 1 auto; display: flex; gap: 18px; align-items: flex-start; min-width: 0; }
.hero-avatar { flex: 0 0 auto; }
.hero-avatar img, .hero-avatar .avatar-fallback {
  width: 68px; height: 68px; border-radius: 14px; object-fit: contain; background: #f3f4f6;
  display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 700; color: #6b7280;
}
.hero-body { flex-grow: 1; min-width: 0; }
.hero-name { font-size: 1.5rem; font-weight: 700; margin: 0; line-height: 1.2; }
.hero-subtitle { font-size: 0.85rem; color: #6b7280; margin-top: 2px; }
.hero-activity { font-size: 0.8rem; margin-top: 4px; color: #374151; }
.hero-activity strong { color: #111827; }
.hero-activity .sep { color: #9ca3af; margin: 0 6px; }

.hero-pills { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 500; line-height: 1; background: rgba(0,0,0,0.04); color: #444; border: 1px solid rgba(0,0,0,0.06); }
.pill-flag { background: #f6f8fa; color: #1f2937; border-color: #e5e7eb; }
.pill-currency { background: #fff8e6; color: #8a5a00; border-color: #f5e5b8; }
.pill-currency .sym { font-weight: 700; font-size: 0.85rem; }
.pill-star { background: #e7f7ed; color: #137333; border-color: #cbe9d3; font-weight: 600; }

.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hero-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; padding: 4px 10px; border-radius: 6px; background: #f3f4f6; color: #374151; text-decoration: none; border: 1px solid transparent; transition: all .12s; }
.hero-chip:hover { background: #e5e7eb; color: #111827; }
.hero-chip .ico { opacity: 0.6; }
.hero-chip.chip-primary { background: #eff6ff; color: #1d4ed8; }
.hero-chip.chip-primary:hover { background: #dbeafe; }

/* RIGHT block — ROI + actions */
.hero-right {
  flex: 0 0 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding-left: 24px;
  border-left: 1px solid #eef0f3;
}
.hero-right-top { display: flex; justify-content: flex-end; gap: 8px; align-items: center; }
.hero-right-top .btn { font-size: 0.78rem; padding: 5px 12px; }
.hero-roi { display: flex; flex-direction: column; gap: 12px; }
.roi-bar {}
.roi-head { display: flex; justify-content: space-between; font-size: 0.75rem; margin-bottom: 4px; }
.roi-label { color: #6b7280; font-weight: 500; }
.roi-value { font-weight: 700; }
.roi-track { height: 6px; background: #eef0f3; border-radius: 3px; overflow: hidden; }
.roi-fill { height: 100%; border-radius: 3px; transition: width .3s; }

/* TABS — jako samostatná karta pod headline */
.hero-tabs-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); margin-bottom: 24px; overflow: hidden; }
.hero-tabs { padding: 0 16px; display: flex; gap: 2px; background: #fafbfc; border-bottom: 1px solid #eef0f3; }
.hero-tab {
  padding: 12px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #6b7280;
  border: 0;
  background: transparent;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all .12s;
  position: relative;
  top: 1px;
}
.hero-tab:hover { color: #1f2937; }
.hero-tab.active { color: #1d4ed8; border-bottom-color: #1d4ed8; }
.hero-tab .cnt {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  background: #e5e7eb;
  color: #6b7280;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
}
.hero-tab.active .cnt { background: #dbeafe; color: #1d4ed8; }

/* TAB CONTENT */
.tab-pane { padding: 24px; display: none; }
.tab-pane.active { display: block; }

/* Přehled tab — KPI cards (dashboard style) */
.kpi-section { margin-bottom: 22px; }
.kpi-section:last-child { margin-bottom: 0; }
.kpi-section-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: #6b7280; font-weight: 600; margin-bottom: 10px; }
.kpi-section-muted .kpi-icon { background: #f3f4f6 !important; color: #9ca3af !important; }
.kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.kpi-card {
  background: #fff; border: 1px solid #eef0f3; border-radius: 10px; padding: 14px;
  display: flex; align-items: center; gap: 12px; min-width: 0;
  transition: border-color .12s, box-shadow .12s;
}
.kpi-card:hover { border-color: #d1d5db; box-shadow: 0 2px 6px rgba(0,0,0,0.04); }
.kpi-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.kpi-body { min-width: 0; flex: 1 1 auto; }
.kpi-label { font-size: 0.72rem; color: #9ca3af; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.kpi-value { font-size: 1.05rem; font-weight: 400; color: #111827; line-height: 1.2; margin-top: 2px; word-break: break-word; }
.kpi-value .sub { display: block; font-size: 0.8rem; font-weight: 400; color: #6b7280; margin-top: 1px; }
.kpi-split { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.kpi-split-row { display: flex; flex-direction: column; }
.kpi-split-row + .kpi-split-row { padding-top: 6px; border-top: 1px solid #eef0f3; }
.kpi-split-tag { font-size: 0.64rem; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 500; }
.kpi-split-val { font-size: 0.98rem; font-weight: 400; color: #111827; line-height: 1.15; }
.kpi-split-val .sub { display: inline; font-size: 0.72rem; font-weight: 400; color: #6b7280; margin-left: 6px; }
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }

/* Údaje tab — struktura jako form section */
.udaje-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px 30px;
}
.udaje-section-title {
  grid-column: 1 / -1;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  font-weight: 600;
  margin-bottom: -6px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eef0f3;
}
.udaje-row { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.udaje-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: #9ca3af; font-weight: 600; }
.udaje-value { font-size: 0.88rem; color: #111827; word-break: break-word; }
.udaje-value code { background: #eef0f3; padding: 2px 6px; border-radius: 4px; font-size: 0.78rem; color: #374151; }
.udaje-value .muted { color: #9ca3af; }

@media (max-width: 900px) {
  .hero-head { flex-direction: column; }
  .hero-right { flex: 1 1 auto; border-left: 0; border-top: 1px solid #eef0f3; padding-left: 0; padding-top: 16px; }
}

/* --- Rondo Uživatelé — třídy portované 1:1 z legacy /uzivatele-seznam (Dex 2026-05-29) --- */
.ru-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #0071e3, #5b3f96); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.78rem; flex-shrink: 0; }
.ru-status-active   { background: #e7f7ed; color: #137333; border-color: #cbe9d3; }
.ru-status-inactive { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; }
.ru-status-blocked  { background: #fdecea; color: #c82b23; border-color: #f8c8c5; }
td.ru-segment-cell { white-space: normal; max-width: 220px; }
.ru-credits { color: #8a5a00; }
.ru-tipovacka { color: #5b3f96; font-weight: 500; }

/* --- Detail uživatele — sekce / sub-tab nav / tabulky 1:1 z legacy <style> (Dex 2026-05-29) --- */
.section-title { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.005em; margin: 0 0 1rem 0; color: var(--bs-body-color); }
.ru-section { }
.ru-mobile-verified { color:#137333; }
.ru-mobile-unverified { color:#9ca3af; }
.ru-amount-positive { color:#137333; font-weight:600; }
.ru-amount-negative { color:#c82b23; font-weight:600; }
.ru-amount-neutral  { color:#9ca3af; }
.outcome-pill { display:inline-block; padding:2px 10px; border-radius:999px; font-size:0.7rem; font-weight:600; line-height:1.6; }
.outcome-win  { background:#e7f7ed; color:#137333; }
.outcome-loss { background:#fdecea; color:#c82b23; }
.outcome-neutral { background:#f3f4f6; color:#6b7280; }
.payout-status { display:inline-block; padding:3px 12px; border-radius:999px; font-size:0.72rem; font-weight:600; }
.payout-paid     { background:#e7f7ed; color:#137333; }
.payout-pending  { background:#fff4e0; color:#9a5b00; }
.payout-rejected { background:#fdecea; color:#c82b23; }

/* Tab-nav pills (hlavní i sub) */
.nav-pills-flush { gap:4px; padding-bottom:0; flex-wrap:wrap; }
.nav-pills-flush .nav-link { background:transparent; color:var(--bs-secondary-color); border:0; border-bottom:2px solid transparent; border-radius:0; padding:0.55rem 0.95rem; font-size:0.88rem; font-weight:500; }
.nav-pills-flush .nav-link:hover { color:var(--bs-body-color); background:transparent; }
.nav-pills-flush .nav-link.active { background:var(--bs-primary) !important; color:#fff !important; border-bottom-color:var(--bs-primary); border-radius:6px 6px 0 0; }
.nav-pills-flush .nav-link.active .badge { background:rgba(255,255,255,0.25) !important; color:#fff !important; }

/* Hero header (detail) */
.ru-hero-head { display:flex; gap:28px; align-items:stretch; }
.ru-hero-left { flex:1 1 auto; display:flex; gap:18px; align-items:flex-start; min-width:0; }
.ru-hero-right { flex:0 0 320px; display:flex; flex-direction:column; gap:10px; padding-left:24px; border-left:1px solid #eef0f3; }
.aff-hero h2.aff-hero-name { font-weight:700; letter-spacing:-0.01em; margin:0; font-size:1.65rem; }
.aff-hero-name { font-weight:700; letter-spacing:-0.01em; margin:0; font-size:1.65rem; }
.aff-hero .aff-hero-subtitle, .aff-hero-subtitle { font-size:0.85rem; color:#6b7280; margin-top:2px; }
.aff-hero .aff-avatar, .aff-avatar { width:64px; height:64px; border-radius:14px; background:linear-gradient(135deg, #0071e3, #5b3f96); color:#fff; display:inline-flex; align-items:center; justify-content:center; font-weight:700; font-size:1.5rem; flex-shrink:0; }
.ru-tile { background:rgba(0,0,0,0.025); border:1px solid var(--bs-border-color); border-radius:10px; padding:10px 14px; display:flex; flex-direction:column; gap:2px; }
.ru-tile-label { font-size:0.66rem; color:var(--bs-secondary-color); text-transform:uppercase; letter-spacing:0.05em; font-weight:600; }
.ru-tile-value { font-size:1.05rem; font-weight:600; font-variant-numeric:tabular-nums; line-height:1.15; color:var(--bs-body-color); }
.ru-tile.tile-credits { background:#fff8e6; border-color:#f5e5b8; }
.ru-tile.tile-credits .ru-tile-value { color:#8a5a00; }
@media (max-width: 900px) {
	.ru-hero-head { flex-direction:column; }
	.ru-hero-right { flex:1 1 auto; border-left:0; border-top:1px solid #eef0f3; padding-left:0; padding-top:16px; }
}
.ru-refresh-icon-btn {
	width: 30px; height: 30px;
	display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--bs-border-color); background: transparent;
	border-radius: 50%; cursor: pointer; color: var(--bs-secondary-color);
	transition: all 0.15s ease; flex-shrink: 0; padding: 0; line-height: 1;
}
.ru-refresh-icon-btn:hover { background: var(--bs-tertiary-bg); color: var(--bs-body-color); border-color: var(--bs-secondary-color); }
.ru-refresh-icon-btn:active { transform: scale(0.95); }
.ru-refresh-icon-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ru-refresh-icon-btn svg { display: block; }

/* Spin tag pily */
.spin-tag {
	display: inline-block; padding: 2px 8px; margin: 1px 3px 1px 0;
	border-radius: 999px; font-size: 0.68rem; font-weight: 500;
	white-space: nowrap; line-height: 1.3; border: 1px solid transparent;
}
.spin-tag.tag-puzzle    { background:#f3e8ff; color:#6b46c1; border-color:#e1d3f7; }
.spin-tag.tag-minigame  { background:#eff6ff; color:#1d4ed8; border-color:#cdd9f4; }
.spin-tag.tag-survey    { background:#ecfeff; color:#0e7490; border-color:#c5e9ee; }
.spin-tag.tag-rondons   { background:#fff8e6; color:#8a5a00; border-color:#f5e5b8; }
.spin-tag.tag-game      { background:#fdf2f8; color:#be185d; border-color:#f9d7e6; }
.spin-tag.tag-promo     { background:#fff4e6; color:#c2410c; border-color:#f5dab8; }
.spin-tag.tag-nothing   { background:rgba(0,0,0,0.04); color:#6b7280; border-color:rgba(0,0,0,0.08); }
.spin-tag.tag-amount    { background:#fff8e6; color:#8a5a00; border-color:#f5e5b8; font-variant-numeric: tabular-nums; font-weight: 600; }
.spin-tag.tag-sub       { background:rgba(0,0,0,0.025); color:#9ca3af; border-color:rgba(0,0,0,0.06); font-size:0.63rem; }
.spin-tag.tag-default   { background:rgba(0,0,0,0.04); color:#6b7280; border-color:rgba(0,0,0,0.08); }

/* Survey lead badges (list) */
.lead-badge {
	display: inline-flex; align-items: center; justify-content: center;
	width: 24px; height: 24px; border-radius: 6px;
	font-size: 0.62rem; font-weight: 700; letter-spacing: -0.02em;
	margin: 0 2px 0 0; border: 1px solid transparent;
	font-family: ui-sans-serif, system-ui, sans-serif;
}
.lead-badge.lead-sazka       { background:#fef3c7; color:#92400e; border-color:#fde68a; }
.lead-badge.lead-merkurxtip  { background:#fee2e2; color:#991b1b; border-color:#fecaca; }
.lead-badge.lead-lucky_bet   { background:#dbeafe; color:#1e40af; border-color:#bfdbfe; }
.lead-badge.lead-magic_planet{ background:#e0e7ff; color:#3730a3; border-color:#c7d2fe; }
.lead-badge.lead-grandwin    { background:#dcfce7; color:#14532d; border-color:#bbf7d0; }
.lead-badge.lead-default     { background:rgba(0,0,0,0.05); color:#6b7280; border-color:rgba(0,0,0,0.1); }

/* Super-hráč skóre badge */
.ru-sh-score { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; padding: 2px 8px; border-radius: 6px; font-size: 0.78rem; font-weight: 700; border: 1px solid; }
.ru-sh-high { background:#dcfce7; color:#14532d; border-color:#86efac; }
.ru-sh-mid  { background:#fef3c7; color:#92400e; border-color:#fde68a; }
.ru-sh-low  { background:#f3f4f6; color:#6b7280; border-color:#e5e7eb; }
.ru-sh-score-big { min-width: 56px; padding: 8px 14px; font-size: 1.4rem; border-radius: 10px; }
.ru-sh-profile-wrap { grid-column: 1 / -1; display:flex; flex-direction:column; gap:14px; }
.ru-sh-profile-head { display:flex; align-items:center; gap:12px; }
.ru-sh-breakdown { display:grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap:14px; max-width:1100px; }
.ru-sh-dim { border:1px solid #e5e7eb; border-radius:8px; padding:10px 12px; background:#fafafa; }
.ru-sh-dim-head { display:grid; grid-template-columns: 1fr auto; align-items:center; column-gap:10px; row-gap:4px; margin-bottom:8px; }
.ru-sh-dim-name { font-weight:600; color:#111827; font-size:0.86rem; }
.ru-sh-dim-total { font-weight:600; color:#374151; font-variant-numeric: tabular-nums; font-size:0.82rem; }
.ru-sh-dim-bar { grid-column: 1 / -1; height:4px; background:#e5e7eb; border-radius:2px; overflow:hidden; }
.ru-sh-dim-bar-fill { height:100%; border-radius:2px; transition: width 0.3s; }
.ru-sh-dim-items { display:flex; flex-direction:column; gap:5px; }
.ru-sh-comp { display:grid; grid-template-columns: 1fr auto 100px 56px; align-items:center; gap:10px; font-size:0.78rem; }
.ru-sh-comp-label { color:#374151; }
.ru-sh-comp-val { color:#6b7280; font-variant-numeric: tabular-nums; text-align:right; }
.ru-sh-comp-bar { height:5px; background:#f3f4f6; border-radius:3px; overflow:hidden; }
.ru-sh-comp-bar-fill { height:100%; border-radius:3px; transition: width 0.3s; }
.ru-sh-bar-full  { background:#22c55e; }
.ru-sh-bar-part  { background:#f59e0b; }
.ru-sh-bar-empty { background:transparent; }
.ru-sh-comp-pts { text-align:right; font-weight:600; color:#374151; font-variant-numeric: tabular-nums; }

/* Detail user — sekce s 5 brand chips */
.lead-chip {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 8px 12px; border-radius: 10px; font-size: 0.82rem; font-weight: 500;
	border: 1px solid; margin: 0 6px 6px 0;
}
.lead-chip.lead-completed { background:#f0fdf4; color:#14532d; border-color:#86efac; }
.lead-chip.lead-opened    { background:#fffbeb; color:#854d0e; border-color:#fde68a; }
.lead-chip.lead-none      { background:rgba(0,0,0,0.025); color:#9ca3af; border-color:rgba(0,0,0,0.08); }
.lead-chip-status { font-size: 0.68rem; padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.lead-chip.lead-completed .lead-chip-status { background:#22c55e; color:#fff; }
.lead-chip.lead-opened .lead-chip-status    { background:#eab308; color:#fff; }

/* Credit log pily — typ + lidská poznámka */
.credit-type { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.7rem; font-weight: 500; line-height: 1.2; white-space: nowrap; }
.credit-type.t-add      { background: #e7f7ed; color: #137333; }
.credit-type.t-subtract { background: #fdecea; color: #c82b23; }
.credit-type.t-transfer { background: #eff6ff; color: #1d4ed8; }
.credit-type.t-bonus    { background: #fff8e6; color: #8a5a00; }
.credit-type.t-default  { background: rgba(0,0,0,0.04); color: #6b7280; }
.note-chip { display: inline-block; padding: 1px 7px; border-radius: 4px; background: rgba(99,102,241,0.08); color: #4338ca; font-size: 0.68rem; font-weight: 500; margin: 0 3px 1px 0; vertical-align: middle; }
.note-id { font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: 0.72rem; color: var(--bs-secondary-color); margin: 0 6px 0 0; vertical-align: middle; }
.note-text { color: var(--bs-body-color); font-size: 0.82rem; }

/* Behavioral tab — minimalistický pattern */
.ru-bh-rec{display:flex;align-items:center;gap:8px;padding:8px 12px;background:rgba(52,199,89,.08);border:1px solid rgba(52,199,89,.25);border-radius:8px;font-size:.84rem;}
.ru-bh-rec-icon{color:#16a34a;display:flex;align-items:center;}
.ru-bh-card{padding:12px 14px;border:1px solid var(--bs-border-color);border-radius:10px;background:var(--bs-body-bg);height:100%;}
.ru-bh-card-head{font-size:.7rem;text-transform:uppercase;letter-spacing:.03em;color:var(--bs-secondary-color);font-weight:600;padding-bottom:8px;border-bottom:1px solid var(--bs-border-color-translucent);margin-bottom:8px;}
.ru-bh-evtype{font-family:ui-monospace,Menlo,monospace;font-size:.72rem;background:var(--bs-tertiary-bg);padding:2px 7px;border-radius:5px;color:var(--bs-body-color);}
.ru-bh-mini-table{width:100%;font-size:.82rem;}
.ru-bh-mini-table th{font-size:.66rem;text-transform:uppercase;letter-spacing:.03em;color:var(--bs-secondary-color);padding:4px 6px;border-bottom:1px solid var(--bs-border-color-translucent);text-align:left;}
.ru-bh-mini-table td{padding:5px 6px;border-bottom:1px solid var(--bs-border-color-translucent);}
.ru-bh-mini-table tr:last-child td{border-bottom:0;}
.ru-bh-bars{display:flex;align-items:flex-end;gap:2px;height:140px;padding-bottom:18px;position:relative;}
.ru-bh-bar-col{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;height:100%;position:relative;}
.ru-bh-bar-val{font-size:.62rem;color:var(--bs-secondary-color);font-variant-numeric:tabular-nums;height:12px;}
.ru-bh-bar{flex:1;width:100%;display:flex;align-items:flex-end;background:var(--bs-tertiary-bg);border-radius:2px 2px 0 0;}
.ru-bh-bar-fill{width:100%;background:#0058b3;border-radius:2px 2px 0 0;min-height:1px;}
.ru-bh-bar-label{font-size:.62rem;color:var(--bs-secondary-color);font-variant-numeric:tabular-nums;position:absolute;bottom:0;}
.ru-bh-partners{display:flex;flex-direction:column;gap:6px;}
.ru-bh-prt-row{display:grid;grid-template-columns:14px 110px 1fr auto;gap:10px;align-items:center;font-size:.84rem;}
.ru-bh-prt-dot{width:10px;height:10px;border-radius:50%;}
.ru-bh-prt-name{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ru-bh-prt-bar{height:8px;background:var(--bs-tertiary-bg);border-radius:4px;overflow:hidden;}
.ru-bh-prt-bar-fill{height:100%;border-radius:4px;}
.ru-bh-prt-count{font-variant-numeric:tabular-nums;font-size:.82rem;white-space:nowrap;}

/* Partner-lead-links list */
.ru-prt-header { border:1px solid var(--bs-border-color-translucent); border-radius:10px; padding:12px 14px; background:linear-gradient(180deg, var(--bs-tertiary-bg) 0%, transparent 100%); }
.ru-prt-header-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.ru-prt-header-label { font-size:.78rem; color:var(--bs-secondary-color); font-weight:400; }
.ru-prt-uid { font-family:ui-monospace,Menlo,monospace; font-size:.95rem; font-weight:500; padding:4px 12px; border-radius:7px; background:var(--bs-body-bg); border:1px solid var(--bs-border-color); color:var(--bs-primary); letter-spacing:.02em; }
.ru-prt-group { border:1px solid var(--bs-border-color-translucent); border-radius:10px; background:var(--bs-body-bg); overflow:hidden; }
.ru-prt-group-head { display:flex; align-items:center; gap:10px; padding:10px 14px; background:transparent; border-bottom:1px solid var(--bs-border-color-translucent); }
.ru-prt-group-name { font-weight:500; font-size:.92rem; color:var(--bs-body-color); }
.ru-prt-logo { width:28px; height:28px; border-radius:7px; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.7rem; letter-spacing:.02em; flex-shrink:0; }
.ru-prt-rows { display:flex; flex-direction:column; }
.ru-prt-row { display:grid; grid-template-columns:minmax(220px,1.3fr) minmax(180px,1fr) 2fr; gap:12px; align-items:center; padding:8px 14px; border-bottom:1px solid var(--bs-border-color-translucent); font-size:.82rem; transition:background .12s; }
.ru-prt-row:last-child { border-bottom:none; }
.ru-prt-row:hover { background:var(--bs-tertiary-bg); }
.ru-prt-mailvar { display:flex; align-items:center; gap:4px; }
.ru-prt-mailvar-code { font-family:ui-monospace,Menlo,monospace; font-size:.76rem; font-weight:400; padding:3px 9px; border-radius:999px; background:rgba(13,110,253,0.06); border:1px solid rgba(13,110,253,0.15); color:var(--bs-primary); cursor:default; }
.ru-prt-note code { font-family:ui-monospace,Menlo,monospace; font-size:.72rem; font-weight:400; padding:2px 7px; border-radius:5px; background:transparent; border:none; color:var(--bs-secondary-color); }
.ru-prt-url-wrap { display:flex; align-items:center; gap:6px; min-width:0; }
.ru-prt-url { padding:4px 10px; font-size:.72rem; height:28px; border-radius:6px; background:var(--bs-body-bg); border:1px solid var(--bs-border-color-translucent); color:var(--bs-secondary-color); font-family:ui-monospace,Menlo,monospace; }
.ru-prt-url-wrap .ru-prt-url { flex:1; min-width:0; }
.ru-prt-copy, .ru-prt-open { width:28px; height:28px; padding:0; border:1px solid var(--bs-border-color); border-radius:7px; background:transparent; color:#6b7280; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; transition:background .12s, color .12s; flex-shrink:0; text-decoration:none; }
.ru-prt-copy:hover, .ru-prt-open:hover { background:var(--bs-tertiary-bg); color:var(--bs-primary); }
.ru-prt-copy.copied { background:rgba(52,199,89,.12); color:#1e7a36; border-color:rgba(52,199,89,.3); }
.ru-prt-mailvar .ru-prt-copy { width:22px; height:22px; border:none; background:transparent; opacity:.5; }
.ru-prt-mailvar .ru-prt-copy:hover { opacity:1; background:var(--bs-tertiary-bg); }
