/* e:\Snecinatripu\public\assets\css\app.css */
:root {
  --bg: #0f1419;
  --card: #1a2332;
  --text: #e8eef5;
  --muted: #8b9bb0;
  --accent: #3d8bfd;
  --danger: #f06565;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  background: radial-gradient(1200px 600px at 20% 0%, #1a2a44 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
}
.layout { max-width: 960px; margin: 0 auto; padding: 2rem 1.5rem; }

/* ── Header ── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  gap: 1rem;
}
.header-left { flex-shrink: 0; }
.header-logo { height: 38px; width: auto; display: block; object-fit: contain; }
.logo { font-weight: 700; letter-spacing: 0.06em; color: var(--accent); font-size: 1.1rem; }

.header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.header-user { font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.header-user strong { color: var(--text); }
.header-role-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 20px;
  background: rgba(61,139,253,0.13);
  color: var(--accent);
  border: 1px solid rgba(61,139,253,0.22);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.header-dash-btn {
  display: inline-block;
  font-size: 0.82rem;
  padding: 0.32rem 0.7rem;
  border-radius: 7px;
  background: rgba(61,139,253,0.1);
  color: var(--accent);
  border: 1px solid rgba(61,139,253,0.18);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.15s;
  white-space: nowrap;
}
.header-dash-btn:hover { background: rgba(61,139,253,0.22); }
.header-logout-form { margin: 0; display: inline; }
.header-logout-btn {
  font-size: 0.82rem;
  padding: 0.32rem 0.7rem;
  margin-top: 0;
  border-radius: 7px;
  background: rgba(240,101,101,0.1);
  color: #f06565;
  border: 1px solid rgba(240,101,101,0.18);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.header-logout-btn:hover { background: rgba(240,101,101,0.22); }

.main { }
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.06);
}
.card h1 { margin: 0 0 1rem; font-size: 1.35rem; }
.form { display: grid; gap: 0.75rem; }
label { font-size: 0.85rem; color: var(--muted); }
input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #121a26;
  color: var(--text);
}
.btn {
  margin-top: 0.5rem;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.btn-secondary { background: #394b63; }
.alert {
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: rgba(240,101,101,0.15);
  border: 1px solid rgba(240,101,101,0.35);
  color: #ffb4b4;
}
.alert-info {
  background: rgba(61,139,253,0.12);
  border-color: rgba(61,139,253,0.35);
  color: #cfe6ff;
}
.muted { color: var(--muted); font-size: 0.95rem; }
.muted.small { font-size: 0.85rem; margin-top: 1rem; }
.muted a { color: var(--accent); }
.meta { display: grid; grid-template-columns: 120px 1fr; gap: 0.35rem 1rem; font-size: 0.95rem; }
.meta dt { color: var(--muted); }
.inline { margin-top: 1.25rem; }

.region-box {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.region-box h2 { margin: 0 0 0.75rem; font-size: 1.05rem; color: var(--muted); font-weight: 600; }
.region-form { margin-top: 0.5rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; align-items: center; }
.toolbar-dash { margin: 0 0 1rem; }
.toolbar-dash a { color: var(--accent); font-weight: 600; }

/* ── Dashboard karty (všechny role) ── */
.dash-welcome { font-size: 1rem; margin-bottom: 1.1rem; }
.dash-meta { font-size: 0.78rem; color: var(--muted); margin-top: 1rem; }

/* ── Widget: Blíží se výročí smluv (jen majitel/superadmin) ── */
.anniv-widget {
    margin: 1rem 0 1.5rem;
    border: 1px solid rgba(243,156,18,0.25);
    border-left: 4px solid #f39c12;
    border-radius: 0 8px 8px 0;
    background: rgba(243,156,18,0.04);
}
.anniv-widget summary {
    list-style: none; cursor: pointer;
    padding: 0.7rem 1rem;
    display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
}
.anniv-widget summary::-webkit-details-marker { display: none; }
.anniv-widget__summary strong { font-size: 0.95rem; }
.anniv-widget__pills { display: flex; gap: 0.35rem; flex-wrap: wrap; flex: 1 1 auto; }
.anniv-pill {
    font-size: 0.7rem; font-weight: 700;
    padding: 0.15rem 0.55rem; border-radius: 999px;
    background: rgba(243,156,18,0.15); color: #f39c12;
    white-space: nowrap;
}
.anniv-pill--urgent { background: rgba(231,76,60,0.18); color: #e74c3c; }
.anniv-pill--soon   { background: rgba(243,156,18,0.18); color: #f39c12; }
.anniv-widget__cta {
    font-size: 0.78rem; font-weight: 600;
    color: var(--brand-primary, #5a6cff);
    text-decoration: none;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    background: rgba(90,108,255,0.1);
    border: 1px solid rgba(90,108,255,0.25);
}
.anniv-widget__cta:hover { background: rgba(90,108,255,0.18); }
.anniv-widget__body { padding: 0 1rem 1rem; }
.anniv-widget__hint { font-size: 0.78rem; color: var(--muted); margin: 0 0 0.5rem; }
.anniv-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.anniv-table th, .anniv-table td {
    padding: 0.4rem 0.55rem; text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    vertical-align: middle;
}
.anniv-table th {
    font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--muted); font-weight: 700;
    background: rgba(255,255,255,0.02);
}
.anniv-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.anniv-row--urgent { background: rgba(231,76,60,0.06); }
.anniv-row--soon   { background: rgba(243,156,18,0.05); }
.anniv-days-pill {
    display: inline-block;
    padding: 0.1rem 0.5rem; font-size: 0.68rem; font-weight: 700;
    border-radius: 999px; background: rgba(255,255,255,0.07);
    color: var(--muted);
}
.anniv-days-pill--urgent { background: rgba(231,76,60,0.18); color: #e74c3c; }
.anniv-days-pill--soon   { background: rgba(243,156,18,0.18); color: #f39c12; }

/* Responsive: na mobilu sbalit pills + tabulka horizontálně scrolluje */
@media (max-width: 768px) {
    .anniv-widget summary { padding: 0.55rem 0.7rem; }
    .anniv-widget__cta { flex: 1 0 100%; text-align: center; margin-top: 0.4rem; }
    .anniv-widget__body { padding: 0 0.5rem 0.7rem; overflow-x: auto; }
    .anniv-table { min-width: 700px; font-size: 0.72rem; }
    .anniv-table th, .anniv-table td { padding: 0.3rem 0.4rem; }
}
@media (max-width: 480px) {
    .anniv-pill { font-size: 0.65rem; padding: 0.1rem 0.4rem; }
}
.dash-cards {
  display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem;
}
@media (max-width: 480px) {
  .dash-cards { gap: 0.5rem; }
  .dash-card { min-width: calc(50% - 0.25rem); max-width: 100%; }
}

/* ── Dashboard role-grouped sekce (admin/majitel přehled) ── */
.dash-section { margin-bottom: 1.4rem; }
.dash-section:last-of-type { margin-bottom: 0.5rem; }
.dash-section__title {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.45rem;
  font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0.25rem 0 0.25rem 0.7rem;
  margin-bottom: 0.55rem;
  border-left: 3px solid rgba(255,255,255,0.18);
}
.dash-section__title--admin { color: var(--accent); border-left-color: rgba(61,139,253,0.55); }
.dash-section__title--clean { color: #f0a030;       border-left-color: rgba(240,160,48,0.55); }
.dash-section__title--call  { color: #2ecc71;       border-left-color: rgba(46,204,113,0.55); }
.dash-section__title--oz    { color: #9b59b6;       border-left-color: rgba(155,89,182,0.55); }
.dash-section__title--bo    { color: #e91e8c;       border-left-color: rgba(233,30,140,0.55); }
.dash-section__hint {
  font-size: 0.7rem; font-weight: 400; color: var(--muted);
  text-transform: none; letter-spacing: 0;
}
.dash-card {
  display: flex; flex-direction: column; gap: 0.12rem;
  flex: 1; min-width: 140px; max-width: 220px;
  padding: 0.8rem 1rem;
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  text-decoration: none; color: var(--text);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.12s;
}
.dash-card:hover {
  border-color: rgba(61,139,253,0.45);
  box-shadow: 0 0 0 3px rgba(61,139,253,0.1);
  transform: translateY(-2px);
}
.dash-card--primary {
  border-color: rgba(46,204,113,0.4);
  background: linear-gradient(135deg, rgba(46,204,113,0.09) 0%, var(--card) 65%);
}
.dash-card--primary:hover {
  border-color: rgba(46,204,113,0.65);
  box-shadow: 0 0 0 3px rgba(46,204,113,0.13);
}
.dash-card__icon  { font-size: 1.4rem; line-height: 1; margin-bottom: 0.15rem; }
.dash-card__title { font-weight: 700; font-size: 0.88rem; }
.dash-card__desc  { font-size: 0.7rem; color: var(--muted); }

.table-wrap { overflow-x: auto; margin-top: 0.5rem; }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th, .table td { padding: 0.5rem 0.45rem; border-bottom: 1px solid rgba(255,255,255,0.08); text-align: left; vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; }
.subrow td { background: rgba(0,0,0,0.15); border-bottom: 1px solid rgba(255,255,255,0.06); }
.deactivate-form { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; margin-top: 0.25rem; }
.inline-label { font-size: 0.85rem; color: var(--muted); display: inline-flex; gap: 0.35rem; align-items: center; }
.inline-label select { min-width: 140px; }
.inline-form { display: inline; margin-left: 0.35rem; }
.link-btn { background: none; border: none; color: var(--accent); cursor: pointer; padding: 0; text-decoration: underline; font: inherit; }
.btn-danger { background: #b23a3a; }
.fieldset { border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 0.75rem 1rem; margin: 0.5rem 0; }
.fieldset legend { padding: 0 0.35rem; color: var(--muted); font-size: 0.85rem; }
.check { display: inline-flex; align-items: center; gap: 0.35rem; margin-right: 0.75rem; font-size: 0.9rem; }
.small-list { margin: 0.5rem 0 1rem 1.25rem; color: var(--muted); font-size: 0.9rem; }
.bar-cell { min-width: 160px; }
.workload-bar {
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, #2f6fbf, #3d8bfd);
  max-width: 100%;
}
textarea { width: 100%; max-width: 560px; padding: 0.55rem 0.65rem; border-radius: 8px; border: 1px solid rgba(255,255,255,0.12); background: #121a26; color: var(--text); font-family: inherit; }

.region-form select {
  width: 100%;
  max-width: 280px;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #121a26;
  color: var(--text);
}

/* ── Taby ── */
.tabs { display: flex; gap: 0.1rem; margin: 1rem 0 0.5rem; border-bottom: 2px solid rgba(255,255,255,0.1); }

/*
   Tab UX hierarchy:
   - Inactive tabs ŠEPTAJÍ — opacity 0.55, weight 500, žádný bg.
   - Active tab KŘIČÍ — opacity 1, weight 700, light pill bg, color accent + underline.
   - Hover na neaktivní = jemné zesvětlení (signál klikatelnosti).

   Variant třídy (.tab--callback, .tab--win, .tab--loss, .tab--izolace,
   .tab--chybny, .tab--nedovolano, .tab--aktivni, .tab--chybne-oz, .tab--stats)
   overridují color/border-bottom-color — dědí jinak veškerou hierarchii odsud.
*/
.tab {
  padding: 0.55rem 0.95rem;
  color: var(--muted);
  opacity: 0.55;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  border-radius: 6px 6px 0 0;
  transition: opacity 0.18s ease, background 0.18s ease, color 0.18s ease, font-weight 0.18s ease;
}
.tab:hover {
  color: var(--text);
  opacity: 0.92;
  background: rgba(255,255,255,0.04);
}
.tab--active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(255,255,255,0.06);
  opacity: 1;
  font-weight: 700;
}
.tab--active:hover {
  /* Aktivní tab hover — jen jemné zvýraznění bg, jinak už je 100 % výrazný. */
  background: rgba(255,255,255,0.08);
}
.tab--callback.tab--active { color: #f0a030; border-bottom-color: #f0a030; }

/*
   Badge pravidlo: defaultně tlumený (opacity 0.6),
   v aktivním tabu plně výrazný + jemně větší.
   Variantní badges (.badge--cb, .badge--win, .badge--aktivni, atd.) dědí.
*/
.badge {
  font-size: 0.75rem;
  background: rgba(255,255,255,0.1);
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  margin-left: 0.3rem;
  font-weight: 600;
  opacity: 0.6;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.tab--active .badge {
  opacity: 1;
  transform: scale(1.06);
}
.tab:hover .badge { opacity: 0.9; }
.badge--cb { background: rgba(240,160,48,0.2); color: #f0a030; }

/* ── Kontakt seznam (navolávačka) ── */
.contact-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.75rem; }
.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border-left: 4px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  /* UX hierarchy: ne-aktivní řádky šeptají (opacity 0.55).
     1. řádek (anebo klik-aktivovaný) je dominantní (.contact-row--active). */
  opacity: 0.55;
  outline: 2px solid transparent;
  transition: opacity 0.18s, background 0.15s, border-color 0.15s, outline-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.contact-row:hover {
  background: rgba(255,255,255,0.05);
  opacity: 0.85;
  cursor: pointer;
}

/* Aktivní řádek — navolávačka pracuje TADY (1. v queue nebo manuálně klik-vybráno).
   Plná opacity + zelený outline + box-shadow → "soustřeď se na tenhle". */
.contact-row--active {
  opacity: 1;
  background: rgba(46,204,113,0.10);
  border-left-color: #2ecc71;
  outline: 2px solid rgba(46,204,113,0.40);
  outline-offset: 2px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  cursor: default;
}
.contact-row--active:hover {
  /* Aktivní řádek je už 100 % výrazný — hover jen nepatrně zesvětlí. */
  background: rgba(46,204,113,0.14);
  opacity: 1;
}

/* Barvy stavů */
.status--new { border-left-color: var(--accent); }
.status--win { border-left-color: #2ecc71; background: rgba(46,204,113,0.06); }
.status--loss { border-left-color: #e74c3c; background: rgba(231,76,60,0.06); }
.status--callback { border-left-color: #f0a030; background: rgba(240,160,48,0.06); }
.contact-row--overdue { border-left-color: #e74c3c; animation: pulse-border 1.5s infinite; }
@keyframes pulse-border { 0%,100% { border-left-color: #e74c3c; } 50% { border-left-color: #f0a030; } }
/* Aktivní + overdue: zachovat oba indikátory — pulse kolem outline + green glow. */
.contact-row--active.contact-row--overdue {
  outline-color: rgba(231,76,60,0.55);
}

.contact-info { flex: 1; min-width: 0; }
.contact-name { font-weight: 600; font-size: 1rem; }
.contact-details { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.85rem; color: var(--muted); margin-top: 0.25rem; }
.contact-phone { color: var(--accent); text-decoration: none; font-weight: 500; }
.contact-phone:hover { text-decoration: underline; }
.contact-email { color: var(--muted); }
.contact-city { color: var(--muted); }
.contact-note { font-size: 0.82rem; color: var(--muted); margin-top: 0.3rem; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 500px; }
.contact-callback { font-size: 0.82rem; color: #f0a030; margin-top: 0.25rem; font-weight: 500; }
.cb-overdue { color: #e74c3c; font-weight: 700; }
.contact-sales { font-size: 0.82rem; color: #2ecc71; margin-top: 0.25rem; }

/* Akční tlačítka */
.contact-actions { flex-shrink: 0; }
.action-form { display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-end; }
.action-buttons { display: flex; gap: 0.35rem; }
.btn-status {
  width: 36px; height: 36px;
  border: none; border-radius: 8px;
  font-size: 1.1rem; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.1s, opacity 0.1s;
}
.btn-status:hover { transform: scale(1.1); }
.btn-status:active { transform: scale(0.95); }
.btn-win { background: #2ecc71; color: #fff; }
.btn-loss { background: #e74c3c; color: #fff; }
.btn-cb { background: #f0a030; color: #fff; }
.btn-send { background: var(--accent); color: #fff; }

.action-note { width: 100%; }
.input-note {
  width: 100%; max-width: 220px;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #121a26;
  color: var(--text);
  font-size: 0.82rem;
}

.hidden { display: none !important; }
.callback-fields, .sales-fields {
  display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center;
  padding: 0.5rem;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  width: 100%;
}
.label-sm { font-size: 0.8rem; color: var(--muted); }
.input-cb, .input-sales {
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #121a26;
  color: var(--text);
  font-size: 0.82rem;
}
.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.8rem; margin-top: 0; }

/* Nové stavy – barvy levého okraje */
.status--izolace   { border-left-color: #9b59b6; background: rgba(155,89,182,0.07); }
.status--chybny    { border-left-color: #7f8c8d; background: rgba(127,140,141,0.07); }
.status--forsales  { border-left-color: var(--accent); background: rgba(61,139,253,0.07); }
.status--nedovolano { border-left-color: #e67e22; background: rgba(230,126,34,0.07); }

/* Nové taby */
.tab--calendar { margin-left: 0.25rem; }
.tab--calendar:hover { color: #f0a030; }
/* Tab "K provolání" – vždy modře jako primární akce */
.tab--aktivni                { color: var(--accent); }
.tab--aktivni.tab--active    { color: var(--accent); border-bottom-color: var(--accent); }
.badge--aktivni              { background: rgba(61,139,253,0.2); color: var(--accent); }
.tab--win.tab--active        { color: #2ecc71; border-bottom-color: #2ecc71; }
.tab--loss.tab--active       { color: #e74c3c; border-bottom-color: #e74c3c; }
.tab--izolace.tab--active    { color: #9b59b6; border-bottom-color: #9b59b6; }
.tab--chybny.tab--active     { color: #95a5a6; border-bottom-color: #95a5a6; }
.tab--nedovolano.tab--active { color: #e67e22; border-bottom-color: #e67e22; }
.badge--win        { background: rgba(46,204,113,0.2);  color: #2ecc71; }
.badge--loss       { background: rgba(231,76,60,0.2);   color: #e74c3c; }
.badge--izolace    { background: rgba(155,89,182,0.2);  color: #c39bd3; }
.badge--chybny     { background: rgba(127,140,141,0.2); color: #aab7b8; }
.badge--nedovolano { background: rgba(230,126,34,0.2);  color: #e67e22; }

/* Tlačítko předání obchodákovi */
.btn-sales { background: #2980b9; color: #fff; }

/* Submenu prohry */
.loss-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  padding: 0.45rem 0.5rem;
  background: rgba(231,76,60,0.1);
  border: 1px solid rgba(231,76,60,0.25);
  border-radius: 7px;
  width: 100%;
}
.loss-menu-label { font-size: 0.75rem; color: var(--muted); margin-right: 0.2rem; white-space: nowrap; }
.btn-loss-sub {
  padding: 0.25rem 0.55rem;
  border: none;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255,255,255,0.1);
  color: var(--text);
  transition: background 0.15s;
}
.btn-loss-sub:hover     { background: rgba(255,255,255,0.18); }
.btn-loss-izolace       { background: rgba(155,89,182,0.3); color: #c39bd3; }
.btn-loss-izolace:hover { background: rgba(155,89,182,0.5); }
.btn-loss-chybny        { background: rgba(127,140,141,0.3); color: #aab7b8; }
.btn-loss-chybny:hover  { background: rgba(127,140,141,0.5); }
.btn-loss-zpet          { background: transparent; color: var(--muted); }
.btn-loss-zpet:hover    { color: var(--text); }
/* Nedovoláno tlačítko */
.btn-nedovolano         { background: rgba(230,126,34,0.25); color: #e67e22; border: 1px solid rgba(230,126,34,0.4); }
.btn-nedovolano:hover   { background: rgba(230,126,34,0.45); }
/* Tlačítko operátorský mismatch (navolávačka → flaguje čističce) */
.btn-mismatch {
    background: transparent; border: 1px solid rgba(230,126,34,0.4);
    color: rgba(230,126,34,0.7); border-radius: 4px;
    font-size: 0.68rem; padding: 0.1rem 0.35rem; cursor: pointer;
    margin-left: 0.5rem; transition: all 0.15s; vertical-align: middle;
}
.btn-mismatch:hover { background: rgba(230,126,34,0.15); color: #e67e22; border-color: #e67e22; }
/* Nezájem sub-panel (roletka důvodu) */
.nezajem-panel {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem;
    margin-top: 0.4rem; padding: 0.5rem 0.6rem;
    background: rgba(231,76,60,0.07); border-radius: 6px;
    border-left: 3px solid rgba(231,76,60,0.35);
}
/* Loss menu – rejection reason dropdown */
.input-rejection        { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.15);
                          color: var(--text); padding: 0.3rem 0.5rem; border-radius: 6px;
                          font-size: 0.85rem; margin: 0.4rem 0; width: 100%; }
/* Native select option – čitelné i v tmavém módu */
select option           { background: #1a2332; color: var(--text); }
select option:hover,
select option:focus,
select option:checked   { background: #2a3a55; }
.loss-btn-row           { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.3rem; }
/* Nedovoláno info na kartě */
.contact-nedovolano-count { font-size: 0.8rem; color: #e67e22; margin-top: 0.2rem; }
/* Tag pro nedovoláno */
.tag-nedovolano         { background: rgba(230,126,34,0.2); color: #e67e22; }

/* Win panel (výhra + výběr OZ) */
.win-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  padding: 0.45rem 0.5rem;
  background: rgba(46,204,113,0.1);
  border: 1px solid rgba(46,204,113,0.3);
  border-radius: 7px;
  width: 100%;
}
.btn-win-confirm {
  padding: 0.3rem 0.7rem;
  border: none;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  background: #2ecc71;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-win-confirm:hover { background: #27ae60; }

/* Panel předání obchodákovi */
.sales-panel {
  margin-top: 0.35rem;
  padding: 0.45rem 0.5rem;
  background: rgba(41,128,185,0.1);
  border: 1px solid rgba(41,128,185,0.25);
  border-radius: 7px;
}
.sales-assign-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

/* Status tagy (dokončené) */
.contact-status-label { flex-shrink: 0; }
.status-tag {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
}
.tag-win      { background: rgba(46,204,113,0.2); color: #2ecc71; }
.tag-loss     { background: rgba(231,76,60,0.2);  color: #e74c3c; }
.tag-sales    { background: rgba(61,139,253,0.2); color: var(--accent); }
.tag-izolace  { background: rgba(155,89,182,0.2); color: #c39bd3; }
.tag-chybny   { background: rgba(127,140,141,0.2); color: #aab7b8; }
.tag-forsales { background: rgba(61,139,253,0.2); color: var(--accent); }

/* ── Navolávačka – horní panel ── */
.caller-topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0.75rem 0 0.25rem;
  align-items: flex-start;
}

/* Výchozí OZ */
.default-sales-panel {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.55rem 0.75rem;
  background: rgba(61,139,253,0.08);
  border: 1px solid rgba(61,139,253,0.2);
  border-radius: 8px;
  flex: 0 0 auto;
}
.default-sales-form { display: flex; gap: 0.4rem; align-items: center; }
.default-sales-tag  { font-size: 0.82rem; color: var(--accent); font-weight: 600; }

/* Progress bar */
.progress-panel {
  flex: 1 1 260px;
  padding: 0.6rem 0.85rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.progress-panel--over {
  background: rgba(46,204,113,0.07);
  border-color: rgba(46,204,113,0.25);
}
.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.85rem;
}
.progress-title  { font-weight: 600; color: var(--muted); }
.progress-panel--over .progress-title { color: #2ecc71; }
.progress-count  { font-size: 0.82rem; color: var(--text); }
.progress-extra  { margin-left: 0.4rem; color: #f0a030; font-weight: 700; }
.progress-track  {
  position: relative;
  height: 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  overflow: visible;
}
.progress-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #2f6fbf 0%, #3d8bfd 100%);
  transition: width 0.6s cubic-bezier(.4,0,.2,1);
  min-width: 4px;
}
.progress-fill--over {
  background: linear-gradient(90deg, #27ae60 0%, #2ecc71 60%, #f0a030 100%);
  box-shadow: 0 0 8px rgba(46,204,113,0.4);
}
.progress-remain {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
  padding-right: 2px;
}
.progress-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 0.25rem;
}
.reward-info      { color: var(--muted); }
.reward-highlight { color: #f0a030; font-weight: 600; }
.progress-wins    { color: #2ecc71; }

/* Měsíční progress panel */
.progress-panel--month {
  background: rgba(52,152,219,0.05);
  border-color: rgba(52,152,219,0.2);
  flex-basis: 100%;
}
.progress-track--month { overflow: visible; }
.month-tier-mark {
  position: absolute; top: -4px; bottom: -4px;
  width: 2px; background: rgba(240,160,48,0.7);
  border-radius: 2px;
  transform: translateX(-50%);
}
.month-tier-mark--2 { background: rgba(46,204,113,0.8); }
.month-tiers {
  display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem;
  margin-top: 0.4rem; font-size: 0.79rem;
}
.month-tier {
  color: var(--muted); padding: 0.15rem 0.4rem;
  border-radius: 5px; border: 1px solid transparent;
}
.month-tier--active {
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  font-weight: 600;
}
.month-tier--done {
  color: #2ecc71; text-decoration: line-through;
  opacity: 0.6;
}
.month-tier--gold {
  color: #f0a030;
  border-color: rgba(240,160,48,0.3);
  background: rgba(240,160,48,0.06);
  text-decoration: none !important;
}

/* Inline editace polí */
.editable-group { display: inline-flex; align-items: center; gap: 0.2rem; }
.btn-edit-field {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  padding: 0 0.15rem;
  line-height: 1;
  opacity: 0.4;
  transition: opacity 0.15s;
}
.contact-row:hover .btn-edit-field { opacity: 1; }
.btn-edit-field:hover { color: var(--accent); }
.contact-muted { color: var(--muted); font-size: 0.85rem; }

.input-inline-edit {
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
  border: 1px solid var(--accent);
  background: #121a26;
  color: var(--text);
  font-size: 0.85rem;
  min-width: 80px;
  max-width: 200px;
  outline: none;
}
.btn-inline-save, .btn-inline-cancel {
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.15rem 0.35rem;
  line-height: 1.4;
}
.btn-inline-save   { background: #2ecc71; color: #fff; }
.btn-inline-cancel { background: rgba(255,255,255,0.1); color: var(--muted); }

/* ── Kalendář callbacků ── */
.cal-nav {
  display: flex; align-items: center; justify-content: center;
  gap: 1.5rem; margin: 0.75rem 0 1rem;
}
.cal-nav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,0.07); color: var(--text);
  text-decoration: none; font-size: 1.3rem; font-weight: 700;
  transition: background 0.15s;
}
.cal-nav-btn:hover { background: rgba(255,255,255,0.15); }
.cal-month-label { font-size: 1.1rem; font-weight: 700; min-width: 160px; text-align: center; }

.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 3px; margin-bottom: 1.25rem;
}
.cal-header-cell {
  text-align: center; font-size: 0.75rem; font-weight: 600;
  color: var(--muted); padding: 0.3rem 0;
}
.cal-cell {
  min-height: 52px; border-radius: 7px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  padding: 0.35rem 0.25rem; position: relative;
  transition: background 0.15s;
}
.cal-cell--empty   { background: transparent; border-color: transparent; }
.cal-cell--past    { opacity: 0.45; }
.cal-cell--today   { border-color: var(--accent); background: rgba(61,139,253,0.08); }
.cal-cell--has-cb  { background: rgba(240,160,48,0.12); border-color: rgba(240,160,48,0.4); cursor: pointer; }
.cal-cell--has-cb:hover { background: rgba(240,160,48,0.22); }
.cal-day-num { font-size: 0.85rem; font-weight: 600; }
.cal-cell--today .cal-day-num { color: var(--accent); }
.cal-cb-dot {
  margin-top: 4px; font-size: 0.68rem; font-weight: 700;
  background: #f0a030; color: #000;
  border-radius: 10px; padding: 0.05rem 0.35rem;
  line-height: 1.4;
}

.cal-day-detail {
  margin: -0.5rem 0 1rem; padding: 0.75rem 1rem;
  background: rgba(240,160,48,0.08); border: 1px solid rgba(240,160,48,0.25);
  border-radius: 8px;
}
.cal-detail-title { margin: 0 0 0.6rem; font-size: 1rem; color: #f0a030; }

.cal-upcoming { margin-top: 0.5rem; }
.cal-section-title { font-size: 1rem; font-weight: 700; margin: 0 0 0.6rem; color: var(--muted); }

.cal-cb-list { display: flex; flex-direction: column; gap: 0.4rem; }
.cal-cb-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.55rem 0.75rem; border-radius: 8px;
  background: rgba(255,255,255,0.03); border-left: 3px solid #f0a030;
}
.cal-cb-item--urgent { border-left-color: #e74c3c; background: rgba(231,76,60,0.08); animation: pulse-border 1.5s infinite; }
.cal-cb-time { text-align: center; min-width: 40px; }
.cal-cb-date { font-size: 0.72rem; color: var(--muted); }
.cal-cb-hour { font-size: 0.95rem; font-weight: 700; color: #f0a030; }
.cal-cb-info { flex: 1; }
.cal-cb-name { font-weight: 600; font-size: 0.95rem; }
.cal-cb-diff { font-size: 0.82rem; white-space: nowrap; }

/* ── Čistička ── */
.cist-stats { display:flex; gap:0.75rem; flex-wrap:wrap; margin:0.75rem 0; }
.cist-stat-box { background:rgba(255,255,255,0.05); border-radius:8px;
                 padding:0.6rem 1rem; text-align:center; min-width:90px; }
.cist-stat-num  { display:block; font-size:1.6rem; font-weight:700; }
.cist-stat-label{ display:block; font-size:0.75rem; color:var(--muted); margin-top:0.1rem; }
.cist-stat-tm  .cist-stat-num { color:#e91e8c; }
.cist-stat-vf  .cist-stat-num { color:#e74c3c; }
.cist-stat-total .cist-stat-num { color:#2ecc71; }
.cist-stat-queue .cist-stat-num { color:var(--accent); }
/* Region filtr */
.cist-region-filter { display:flex; align-items:center; gap:0.5rem; flex-wrap:wrap;
                      margin:1.1rem 0 0; padding:0.7rem 0.9rem;
                      background:rgba(255,255,255,0.04); border-radius:10px;
                      border:1px solid rgba(255,255,255,0.08); }
.cist-region-label  { font-size:0.8rem; color:var(--muted); font-weight:600;
                      text-transform:uppercase; letter-spacing:0.05em; margin-right:0.2rem; }
.cist-region-btn    { display:inline-block; padding:0.45rem 1.1rem; border-radius:20px;
                      font-size:0.88rem; font-weight:600; cursor:pointer; text-decoration:none;
                      color:var(--text); background:rgba(255,255,255,0.08);
                      border:2px solid transparent; transition:all 0.18s; white-space:nowrap; }
.cist-region-btn:hover { background:rgba(255,255,255,0.14); border-color:rgba(255,255,255,0.2); }
.cist-region-btn--active { background:var(--accent); color:#fff;
                            border-color:var(--accent); box-shadow:0 0 12px rgba(var(--accent-rgb,61,139,253),0.4); }
.cist-region-cnt { font-size:0.72rem; font-weight:700; color:#2ecc71;
                   margin-left:0.3rem; opacity:0.9; }
/* Na záložce K ověření – modrá barva počtu kontaktů */
.cist-region-cnt--new { color: var(--accent); }
.cist-region-btn--active .cist-region-cnt,
.cist-region-btn--active .cist-region-cnt--new { color:rgba(255,255,255,0.85); }
/* Topbar (info + paginace nahoře) */
.cist-topbar { display:flex; align-items:center; justify-content:space-between;
               flex-wrap:wrap; gap:0.5rem; margin:0.6rem 0 0.3rem;
               padding:0.5rem 0.7rem; background:rgba(255,255,255,0.03); border-radius:8px; }
/* Paginace s čísly stránek */
.cist-page-btn { display:inline-flex; align-items:center; justify-content:center;
                 min-width:2rem; height:2rem; padding:0 0.35rem; border-radius:6px;
                 font-size:0.85rem; font-weight:600; cursor:pointer; text-decoration:none;
                 color:var(--text); background:rgba(255,255,255,0.08);
                 transition:background 0.15s; }
.cist-page-btn:hover    { background:rgba(255,255,255,0.18); }
.cist-page-current      { background:var(--accent) !important; color:#fff; cursor:default; }
.cist-page-disabled     { opacity:0.3; cursor:default; background:none; }
.cist-page-dots         { color:var(--muted); font-size:0.85rem; padding:0 0.15rem; }
.cist-bulk-bar { display:flex; align-items:center; gap:0.5rem; flex-wrap:wrap;
                 background:rgba(255,255,255,0.04); border-radius:8px;
                 padding:0.6rem 0.8rem; margin:0.75rem 0 0.4rem; }
.cist-list { display:flex; flex-direction:column; gap:0.35rem; margin-top:0.4rem; }
.cist-row  { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap;
             gap:0.5rem; background:rgba(255,255,255,0.04); border-radius:8px;
             padding:0.55rem 0.85rem; border-left:3px solid transparent;
             opacity:0.55;                                  /* outdrženo — neaktivní řádek */
             transition: opacity 0.18s, transform 0.18s, box-shadow 0.18s;
             outline: 2px solid transparent; }
.cist-row--vf { border-left-color:#e74c3c; background:rgba(231,76,60,0.07); }
.cist-row--tm { border-left-color:#e91e8c; background:rgba(233,30,140,0.07); }
.cist-row--o2 { border-left-color:#3d8bfd; background:rgba(61,139,253,0.07); }
/* Aktivní řádek — operátorka jede tady (auto-advance po kliknutí) */
.cist-row--active {
    opacity: 1;
    background: rgba(46,204,113,0.10);
    border-left-color: #2ecc71;
    outline: 2px solid rgba(46,204,113,0.40);
    outline-offset: 2px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
/* Krátký flash po kliknutí (vizuální feedback) */
@keyframes cist-flash-green { 0%,100%{background:rgba(255,255,255,0.04);} 50%{background:rgba(46,204,113,0.35);} }
@keyframes cist-flash-red   { 0%,100%{background:rgba(255,255,255,0.04);} 50%{background:rgba(231,76,60,0.35);} }
.cist-row--flash-ok  { animation: cist-flash-green 0.45s ease-out; }
.cist-row--flash-vf  { animation: cist-flash-red 0.45s ease-out; }
.cist-info  { display:flex; align-items:center; gap:0.75rem; flex-wrap:wrap; flex:1; }
.cist-firma { font-weight:700; font-size:1.15rem; color:var(--text); }   /* větší než předtím */
.cist-phone { color:var(--text); font-size:1rem; font-family:monospace; letter-spacing:0.02em; opacity:0.85; }
.cist-region{ font-size:0.7rem; opacity:0.55; }   /* zmenšený a šedý — nerušivý */
.cist-actions { display:flex; gap:0.45rem; }
/* Klávesová zkratka indikátor v rohu tlačítka */
.cist-kbd-hint {
    position: absolute; top: -7px; right: -7px;
    background: var(--bg); color: var(--muted);
    border: 1px solid rgba(255,255,255,0.18); border-radius: 4px;
    font-size: 0.6rem; font-weight: 700; padding: 0.05rem 0.32rem;
    line-height: 1; pointer-events: none;
}
.cist-row--active .cist-kbd-hint { color: #2ecc71; border-color: rgba(46,204,113,0.4); }

/* ── Cíle čističky podle krajů — progress panel nad seznamem ── */
.cist-goals {
    background: rgba(46,204,113,0.04);
    border: 1px solid rgba(46,204,113,0.2);
    border-left: 3px solid #2ecc71;
    border-radius: 0 8px 8px 0;
    padding: 0.65rem 0.85rem;
    margin: 0.6rem 0 0.4rem;
}
.cist-goals__title {
    font-size: 0.82rem; font-weight: 700; color: #2ecc71;
    margin-bottom: 0.4rem;
    display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
}
.cist-goals__hint {
    font-weight: 400; font-size: 0.7rem; color: var(--muted);
    font-style: italic;
}
.cist-goals__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.4rem;
}
.cist-goal {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    transition: background 0.4s, border-color 0.4s, opacity 0.4s, filter 0.4s;
}
/* Splněný cíl = ZTMAVNUTO. Vizuálně ustupuje do pozadí, signalizuje
   adminovi "tohle je hotové, nastav nový cíl". */
.cist-goal--done {
    background: rgba(255,255,255,0.02);
    border-color: rgba(255,255,255,0.08);
    opacity: 0.45;
    filter: grayscale(0.5);
}
.cist-goal--done:hover {
    opacity: 0.75;  /* po hoveru se rozjasní, ať jde přečíst */
}
.cist-goal__head {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 0.78rem;
}
.cist-goal__label { font-weight: 600; color: var(--text); }
.cist-goal__count { color: var(--muted); font-family: monospace; }
.cist-goal__done {
    color: #2ecc71; font-size: 0.95rem;
    transition: color 0.3s;
}
.cist-goal--done .cist-goal__done { color: var(--muted); }
.cist-goal__bar {
    height: 8px; background: rgba(255,255,255,0.08);
    border-radius: 4px; overflow: hidden;
    margin: 0.3rem 0;
}
.cist-goal__fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(.4,0,.2,1);
}
.cist-goal--done .cist-goal__fill {
    background: rgba(255,255,255,0.18);  /* šedá náplň po splnění */
}
.cist-goal__status {
    font-size: 0.66rem;
    display: flex; justify-content: space-between; align-items: center; gap: 0.3rem;
}
/* Krátký flash při inkrementaci */
@keyframes cist-goal-flash {
    0%, 100% { background: inherit; }
    50%       { background: rgba(46,204,113,0.25); }
}
.cist-goal--flash { animation: cist-goal-flash 0.5s ease; }

/* ── Tile jako klikatelný odkaz (filter region) ─────────────────── */
.cist-goal--clickable {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    user-select: none;
}
.cist-goal--clickable:hover {
    background: rgba(46,204,113,0.08);
    border-color: rgba(46,204,113,0.4);
    transform: translateY(-1px);
}
.cist-goal--clickable:active {
    transform: translateY(0);
}

/* ── Read-only tile (past/future month přehled) ────────────────── */
.cist-goal--readonly {
    cursor: default;
    opacity: 0.85;
}
.cist-goal--readonly:hover {
    background: inherit;
    border-color: rgba(255,255,255,0.06);
    transform: none;
}

/* Aktivně vybraný region (?region=X) — silnější rámeček */
.cist-goal--active {
    background: rgba(46,204,113,0.16);
    border-color: #2ecc71;
    box-shadow: 0 0 0 1px rgba(46,204,113,0.5) inset;
}
.cist-goal--active .cist-goal__label {
    color: #2ecc71;
}

/* "Vše" tile — neutrální, jen filter clear */
.cist-goal--all {
    background: rgba(52,152,219,0.06);
    border-color: rgba(52,152,219,0.25);
}
.cist-goal--all:hover {
    background: rgba(52,152,219,0.14);
    border-color: rgba(52,152,219,0.5);
}
.cist-goal--all.cist-goal--active {
    background: rgba(52,152,219,0.2);
    border-color: #3498db;
    box-shadow: 0 0 0 1px rgba(52,152,219,0.5) inset;
}
.cist-goal--all.cist-goal--active .cist-goal__label { color: #3498db; }

/* ── Priority badge (na každé tile vlevo nahoře) ────────────────── */
.cist-goal__priority {
    display: inline-block;
    font-size: 0.65rem; font-weight: 800;
    padding: 0.1rem 0.38rem;
    border-radius: 4px;
    margin-right: 0.35rem;
    background: rgba(255,255,255,0.08);
    color: var(--muted);
    font-family: monospace;
    letter-spacing: 0.3px;
}
.cist-goal__priority--p1 { background: rgba(231,76,60,0.22); color: #e74c3c; }
.cist-goal__priority--p2 { background: rgba(230,126,34,0.20); color: #e67e22; }
.cist-goal__priority--p3 { background: rgba(241,196,15,0.18); color: #f1c40f; }
.cist-goal__priority--p4,
.cist-goal__priority--p5 { background: rgba(255,255,255,0.10); color: var(--text); }
.cist-goal__priority--p6,
.cist-goal__priority--p7,
.cist-goal__priority--p8,
.cist-goal__priority--p9,
.cist-goal__priority--p10 { background: rgba(149,165,166,0.18); color: #95a5a6; }

/* ── Focus tile (první nesplněná podle priority — "začni zde") ─── */
@keyframes cist-goal-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(46,204,113,0.6); }
    50%       { box-shadow: 0 0 0 6px rgba(46,204,113,0.0); }
}
.cist-goal--focus {
    background: rgba(46,204,113,0.1);
    border-color: #2ecc71;
    animation: cist-goal-pulse 1.8s ease infinite;
    position: relative;
}
.cist-goal--focus::before {
    content: "";
    position: absolute; top: -1px; left: -1px; right: -1px; bottom: -1px;
    border-radius: 6px;
    border: 1.5px solid rgba(46,204,113,0.45);
    pointer-events: none;
}
.cist-goal__focus-hint {
    color: #2ecc71;
    font-weight: 700;
    font-size: 0.68rem;
    text-shadow: 0 0 8px rgba(46,204,113,0.4);
}

/* NEW counter na tile (kolik kontaktů zbývá v daném kraji) */
.cist-goal__newcnt {
    background: rgba(52,152,219,0.18);
    color: #3498db;
    padding: 0.08rem 0.42rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    font-family: monospace;
    letter-spacing: 0.3px;
}

/* ── Měsíční přepínač čističky (nad tiles) ─────────────────────── */
.cist-month-switch {
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 0.45rem 0.7rem;
    margin: 0.4rem 0 0.6rem;
}
.cist-month-switch label {
    font-size: 0.78rem; color: var(--muted); font-weight: 600;
}
.cist-month-switch select {
    padding: 0.32rem 0.55rem;
    background: var(--bg); color: var(--text);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 5px;
    font-size: 0.86rem; font-weight: 600;
    min-width: 170px;
    cursor: pointer;
}
.cist-month-switch select:focus {
    outline: none; border-color: rgba(46,204,113,0.6);
}
.cist-month-switch select:hover {
    background: rgba(255,255,255,0.04);
}
.cist-month-badge {
    font-size: 0.68rem; font-weight: 700;
    padding: 0.16rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase; letter-spacing: 0.4px;
}
.cist-month-badge--current { background: rgba(46,204,113,0.18); color: #2ecc71; }
.cist-month-badge--past    { background: rgba(241,196,15,0.18); color: #f1c40f; }
.cist-month-badge--future  { background: rgba(52,152,219,0.18); color: #3498db; }

.cist-period-notice {
    border-radius: 8px;
    padding: 0.5rem 0.85rem;
    margin: 0 0 0.7rem;
    font-size: 0.82rem; line-height: 1.5;
}
.cist-period-notice--past   { background: rgba(241,196,15,0.07); border: 1px solid rgba(241,196,15,0.25); color: #f1c40f; }
.cist-period-notice--future { background: rgba(52,152,219,0.07); border: 1px solid rgba(52,152,219,0.25); color: #3498db; }

/* Region filter — collapsible (default zavřený) */
.cist-region-collapse {
    margin-top: 0.7rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
}
.cist-region-summary {
    cursor: pointer; list-style: none;
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.85rem;
    user-select: none;
}
.cist-region-summary::-webkit-details-marker { display: none; }
.cist-region-summary strong { color: var(--accent); }
.cist-region-toggle { margin-left: auto; font-size: 0.7rem; color: var(--muted); }
.cist-region-collapse[open] .cist-region-toggle::before { content: '▴ sbalit'; }
.cist-region-collapse[open] .cist-region-toggle { font-size: 0; }
.cist-region-collapse[open] .cist-region-toggle::before { font-size: 0.7rem; }
.cist-region-collapse[open] .cist-region-filter { margin-top: 0.5rem; }
.cist-radio-btn { display:flex; align-items:center; gap:0.3rem; cursor:pointer;
                  padding:0.35rem 0.7rem; border-radius:6px; font-size:0.85rem;
                  border:1px solid rgba(255,255,255,0.1); transition:background 0.15s; }
.cist-radio-btn input { display:none; }
.cist-radio-vf { background:rgba(231,76,60,0.15); color:#e74c3c; }
.cist-radio-vf:has(input:checked) { background:rgba(231,76,60,0.4); border-color:#e74c3c; }
.cist-radio-tm { background:rgba(233,30,140,0.15); color:#e91e8c; }
.cist-radio-tm:has(input:checked) { background:rgba(233,30,140,0.4); border-color:#e91e8c; }
.cist-radio-o2 { background:rgba(61,139,253,0.15); color:#3d8bfd; }
.cist-radio-o2:has(input:checked) { background:rgba(61,139,253,0.4); border-color:#3d8bfd; }
/* Operator badge (používá se i v search) */
.cist-op-badge { display:inline-block; font-size:0.75rem; font-weight:700;
                 padding:0.15rem 0.45rem; border-radius:4px; }
.op-vf      { background:rgba(231,76,60,0.25);  color:#e74c3c; }
.op-tm      { background:rgba(233,30,140,0.25); color:#e91e8c; }
.op-o2      { background:rgba(61,139,253,0.25); color:#3d8bfd; }
.op-unknown { background:rgba(255,255,255,0.1); color:var(--muted); }
.cist-tag   { font-size:0.8rem; padding:0.2rem 0.5rem; border-radius:4px; }
.cist-tag-vf    { background:rgba(231,76,60,0.2);  color:#e74c3c; }
.cist-tag-ready { background:rgba(46,204,113,0.2); color:#2ecc71; }
.cist-verified-info { display:flex; align-items:center; gap:0.4rem; }
.cist-footer { display:flex; align-items:center; justify-content:center;
               flex-wrap:wrap; gap:0.5rem; margin-top:0.75rem; padding-top:0.75rem;
               border-top:1px solid rgba(255,255,255,0.07); }
.cist-pagination { display:flex; align-items:center; gap:0.4rem; flex-wrap:wrap; }
/* Tlačítka akcí čističky — VĚTŠÍ pro snadné kliknutí + position:relative
   pro umístění klávesového hintu v rohu */
.btn-cist-vf,.btn-cist-tm,.btn-cist-o2 {
    position: relative;
    padding: 0.55rem 1.2rem; border:none; border-radius: 7px;
    cursor: pointer; font-size: 0.95rem; font-weight: 700;
    transition: filter 0.15s, transform 0.1s;
    min-width: 64px;
}
.btn-cist-vf:hover,.btn-cist-tm:hover,.btn-cist-o2:hover { filter:brightness(1.3); transform:scale(1.04); }
.btn-cist-vf:disabled,.btn-cist-tm:disabled,.btn-cist-o2:disabled { opacity:0.4; cursor:default; transform:none; }
.btn-cist-vf { background:rgba(231,76,60,0.3);  color:#e74c3c; }
.btn-cist-tm { background:rgba(255,105,180,0.25); color:#ff69b4; }
.btn-cist-o2 { background:rgba(61,139,253,0.3);  color:#3d8bfd; }
/* Malá varianta pro Zkontrolováno */
.btn-cist-sm { padding:0.2rem 0.55rem; font-size:0.75rem; }
/* Undo tlačítko */
.btn-cist-undo { padding:0.25rem 0.7rem; border:none; border-radius:6px; cursor:pointer;
                 font-size:0.78rem; font-weight:600; background:rgba(255,255,255,0.1);
                 color:var(--muted); transition:background 0.15s; }
.btn-cist-undo:hover { background:rgba(255,255,255,0.2); color:var(--text); }
/* Badge po uložení jednoho kontaktu */
.cist-done-badge { font-size:0.85rem; font-weight:600; opacity:0.8; padding:0.2rem 0.5rem; }
/* Reclassify v záložce Zkontrolováno */
.cist-reclassify { display:flex; gap:0.3rem; flex-wrap:wrap; }
.cist-verified-info { display:flex; align-items:center; gap:0.5rem; flex-wrap:wrap; }
/* Search */
.search-form { display:flex; gap:0.5rem; margin:0.75rem 0; }
.input-search { flex:1; background:rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.15);
                color:var(--text); padding:0.55rem 0.85rem; border-radius:8px; font-size:1rem; }
.input-search:focus { outline:none; border-color:var(--accent); }

/* ── Callback notifikační bannery ── */
#crm-cb-banners {
  position: fixed; top: 1rem; right: 1rem; z-index: 9999;
  display: flex; flex-direction: column; gap: 0.5rem;
  max-width: 320px; pointer-events: none;
}
.crm-cb-banner {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem; border-radius: 10px;
  background: #1a2d1a; border: 2px solid #2ecc71;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  pointer-events: all;
  animation: crm-banner-in 0.3s ease;
}
.crm-cb-banner--dismissed {
  opacity: 0; transform: translateX(120%);
  transition: all 0.35s ease;
}
@keyframes crm-banner-in {
  from { opacity: 0; transform: translateX(120%); }
  to   { opacity: 1; transform: translateX(0); }
}
.crm-cb-banner__icon { font-size: 1.6rem; flex-shrink: 0; }
.crm-cb-banner__body { flex: 1; min-width: 0; }
.crm-cb-banner__title { font-weight: 700; font-size: 0.92rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-cb-banner__sub   { font-size: 0.8rem; color: #a8e6a3; margin-top: 0.1rem; }
.crm-cb-banner__phone { font-size: 0.82rem; color: var(--accent); display: block; }
.crm-cb-banner__ok {
  flex-shrink: 0; padding: 0.4rem 0.65rem;
  border: none; border-radius: 7px;
  background: #2ecc71; color: #000;
  font-weight: 700; font-size: 0.8rem; cursor: pointer;
  transition: background 0.15s;
}
.crm-cb-banner__ok:hover { background: #27ae60; }

/* ═══════════════════════════════════════════════════════════
   ŠNĚČÍ ZÁVODY 🐌
   ═══════════════════════════════════════════════════════════ */
.snail-race {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 0.75rem 1rem 0.85rem;
  margin-bottom: 1rem;
}
.snail-race__title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
  opacity: 0.85;
}
.snail-loading {
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
  padding: 0.6rem 0;
}

/* Obal: [START] [tratě] [CÍL] */
.race-tracks {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.race-side {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  opacity: 0.55;
  flex-shrink: 0;
  min-width: 2.2rem;
  line-height: 1;
}
.race-side--end { text-align: right; }

/* Sloupec se všemi tratěmi */
.race-lanes {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Jedna trať = jeden závodník */
.race-lane {
  position: relative;
  height: 46px;               /* 18px emoji + 2px linka + 14px jméno + rezerva */
}

/* Horizontální linka (trať) */
.race-lane::before {
  content: '';
  position: absolute;
  top: 18px;                  /* hned pod spodní hranou emoji */
  left: 0;
  right: 10px;                /* místo pro šipku */
  height: 1px;
  background: rgba(255,255,255,0.22);
}

/* Šipka na konci tratě */
.race-lane::after {
  content: '';
  position: absolute;
  top: 13px;
  right: 0;
  border-left: 9px solid rgba(255,255,255,0.22);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

/* Šnek (emoji + jméno) */
.race-snail {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  transition: left 0.9s ease;
  cursor: default;
}
.race-snail__emoji {
  font-size: 1.2rem;
  display: block;
  line-height: 1;
  transform: scaleX(-1); /* otočit šneka doprava — cíl je vpravo */
}
.race-snail__name {
  font-size: 0.58rem;
  color: var(--muted);
  white-space: nowrap;
  display: block;
  margin-top: 4px;            /* pod linkou: 1px linka + 3px mezera */
}

/* Zvýraznění "já" */
.race-snail--me .race-snail__emoji {
  filter: drop-shadow(0 0 5px rgba(46,204,113,0.75));
}
.race-snail--me .race-snail__name {
  color: #2ecc71;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════
   STATISTIKY VÝKONU (caller/stats + admin/caller-stats)
   ═══════════════════════════════════════════════════════════ */

/* Header s tlačítkem zpět */
.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.stats-header h1 { margin: 0 0 0.25rem; }

/* Filtr bar */
.stats-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.07);
}
.stats-filter-form { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.stats-filter-label { font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.stats-month-select {
  padding: 0.4rem 0.65rem;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.15);
  background: #121a26;
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
}

/* Nadpis období */
.stats-period-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0.5rem 0 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding-bottom: 0.5rem;
}

/* ── Summary karty (navolávačka) ── */
.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}
.stat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  padding: 0.9rem 0.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.stat-card__num {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}
.stat-card__label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
/* Barvy karet */
.stat-card--win      { border-color: #22c55e55; background: rgba(34,197,94,0.08); }
.stat-card--win      .stat-card__num { color: #22c55e; }
.stat-card--bad      { border-color: #f0656555; background: rgba(240,101,101,0.08); }
.stat-card--bad      .stat-card__num { color: #f06565; }
.stat-card--callback { border-color: #3d8bfd55; background: rgba(61,139,253,0.08); }
.stat-card--callback .stat-card__num { color: #3d8bfd; }
.stat-card--nezajem  { border-color: #f59e0b55; background: rgba(245,158,11,0.08); }
.stat-card--nezajem  .stat-card__num { color: #f59e0b; }
.stat-card--nedovolano { border-color: #94a3b855; }
.stat-card--nedovolano .stat-card__num { color: #94a3b8; }
.stat-card--izolace  { border-color: #a855f755; background: rgba(168,85,247,0.07); }
.stat-card--izolace  .stat-card__num { color: #a855f7; }
.stat-card--chybny   { border-color: #64748b55; }
.stat-card--chybny   .stat-card__num { color: #64748b; }
.stat-card--total    { border-color: rgba(255,255,255,0.18); background: rgba(255,255,255,0.06); }
.stat-card--total    .stat-card__num { color: var(--text); }
.stat-card--rate     { border-color: #22c55e44; background: rgba(22,197,94,0.06); }
.stat-card--rate     .stat-card__num { color: #22c55e; font-size: 1.6rem; }

/* ── Denní tabulka (sdílená) ── */
.stats-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.07);
}
.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.stats-table th,
.stats-table td {
  padding: 0.5rem 0.65rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.stats-table th {
  background: rgba(255,255,255,0.04);
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.stats-th-day,
.stats-td-day { text-align: left; min-width: 90px; }
.stats-td-num { color: var(--muted); }
.stats-td-total { font-weight: 700; color: var(--text); }
.stats-row--weekend { background: rgba(255,255,255,0.02); }
.stats-row--weekend .stats-td-day { color: var(--muted); }
.stats-row--total { background: rgba(255,255,255,0.05); }
.stats-row--alt { background: rgba(255,255,255,0.015); }
.stats-dow { font-size: 0.72rem; color: var(--muted); margin-left: 0.35rem; }

/* Barevné zvýraznění nenulových buněk v denní tabulce */
.stats-cell--ok       { color: #22c55e; font-weight: 700; }
.stats-cell--bad      { color: #f06565; font-weight: 700; }
.stats-cell--callback { color: #3d8bfd; font-weight: 600; }
.stats-cell--nezajem  { color: #f59e0b; }
.stats-cell--nedovolano { color: #94a3b8; }
.stats-cell--izolace  { color: #a855f7; }

/* ═══════════════════════════════════════════════════════════
   ADMIN CALLER STATS – srovnávací tabulka
   ═══════════════════════════════════════════════════════════ */
.admin-caller-table th,
.admin-caller-table td { padding: 0.55rem 0.75rem; }
.acol--name { text-align: left; min-width: 130px; white-space: nowrap; }
.acol--win    { color: #22c55e; }
.acol--bad    { color: #f06565; }
.acol--cb     { color: #3d8bfd; }
.acol--nz     { color: #f59e0b; }
.acol--nd     { color: #94a3b8; }
.acol--iz     { color: #a855f7; }
.acol--ch     { color: #64748b; }
.acol--total  { color: var(--text); font-weight: 700; }
.acol--rate   { min-width: 130px; }
.acol-highlight--win { background: rgba(34,197,94,0.08); border-radius: 4px; }
.acol-badge { margin-left: 0.35rem; font-size: 0.9rem; }

/* Progress bar úspěšnosti */
.acol-rate-wrap { display: flex; align-items: center; gap: 0.5rem; }
.acol-rate-bar {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  min-width: 50px;
}
.acol-rate-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}
.acol-rate-fill--good { background: #22c55e; }
.acol-rate-fill--mid  { background: #f59e0b; }
.acol-rate-fill--low  { background: #f06565; }
.acol-rate-pct { font-size: 0.82rem; white-space: nowrap; color: var(--text); min-width: 42px; }

/* Legenda */
.stats-legend {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  align-items: center;
}
.stats-legend-dot { font-size: 0.9rem; }
.stats-legend-note { margin-left: auto; font-style: italic; }

/* ── Tab-link Výkon v navigaci ── */
.tab--stats { border-color: rgba(61,139,253,0.3) !important; }
.tab--stats:hover { background: rgba(61,139,253,0.1); }

/* ── Admin team-stats: navigace mezi rolemi ── */
.team-stats-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.team-stats-nav-btn {
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.team-stats-nav-btn:hover {
  background: rgba(255,255,255,0.09);
  color: var(--text);
}
.team-stats-nav-btn--active {
  background: rgba(61,139,253,0.15);
  border-color: rgba(61,139,253,0.5);
  color: var(--accent);
  font-weight: 600;
}
.team-stats-nav-btn--legacy {
  margin-left: auto;
  font-size: 0.8rem;
  opacity: 0.6;
}
.team-stats-nav-btn--legacy:hover { opacity: 1; }

/* Barvy pro čistička-specifické sloupce */
.acol--tm { color: #ff69b4; }
.acol--o2 { color: #3d8bfd; }

/* ── Login stránka – omezená šířka i na velkém monitoru ── */
.card--login { max-width: 440px; margin: 2rem auto; }

/* ── Responzivní design: mobil ── */
@media (max-width: 600px) {
  .layout { padding: 1rem 0.75rem; }
  .card { padding: 1.25rem 1rem; }
  .card h1 { font-size: 1.15rem; }
  .meta { grid-template-columns: 1fr; gap: 0.15rem; }
  .meta dt { font-weight: 600; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .btn { text-align: center; }
  .table { font-size: 0.82rem; }
  .table th, .table td { padding: 0.4rem 0.3rem; }
  .bar-cell { min-width: 100px; }
  .deactivate-form { flex-direction: column; }
  .inline-label select { min-width: 100%; }
  textarea { max-width: 100%; }
  .toolbar-dash { text-align: center; }
  .toolbar-dash a { display: inline-block; margin: 0.15rem 0; }
  .tabs { overflow-x: auto; }
  .tab { padding: 0.45rem 0.65rem; font-size: 0.82rem; white-space: nowrap; }
  .contact-row { flex-direction: column; gap: 0.5rem; }
  .contact-actions { width: 100%; }
  .action-form { align-items: stretch; }
  .action-buttons { justify-content: flex-start; }
  .input-note { max-width: 100%; }
  .contact-note { max-width: 100%; }
}

/* ── Responzivní design: tablet ── */
@media (min-width: 601px) and (max-width: 900px) {
  .layout { max-width: 720px; }
}

/* ── Velký desktop ── */
@media (min-width: 1200px) {
  .layout { max-width: 1100px; }
}

/* ── Tab: Chybné od OZ ── */
.tab--chybne-oz {
  color: #f39c12;
  border-color: rgba(243,156,18,0.3);
}
.tab--chybne-oz.tab--active {
  border-color: #f39c12;
  background: rgba(243,156,18,0.12);
  font-weight: 700;
}
.badge--chybne-oz {
  background: rgba(243,156,18,0.2);
  color: #f39c12;
}
