/* ============================================================
   ALFRED — design system dle Virtualworx Brand Manualu v1.0
   Černobílá identita · Poppins · světlé UI · pill tlačítka
   ============================================================ */

:root {
  /* --vx-black = základní pozadí (bílé), --vx-white = základní text (černý).
     Názvy zůstávají kvůli sémantice napříč CSS, hodnoty jsou překlopené. */
  --vx-black: #ffffff;
  --vx-white: #0a0a0b;
  /* Ink škála: 900 = nejsvětlejší povrch, 100 = nejtmavší akcent/text */
  --vx-ink-900: #f5f5f6;
  --vx-ink-800: #eaeaec;
  --vx-ink-600: #c7c7cb;
  --vx-ink-400: #8a8a90;
  --vx-ink-200: #52525a;
  --vx-ink-100: #26262a;
  --vx-border: rgba(0, 0, 0, 0.14);
  --vx-border-soft: rgba(0, 0, 0, 0.08);
  --vx-text-muted: rgba(0, 0, 0, 0.58);
  --vx-text-faint: rgba(0, 0, 0, 0.42);
  --vx-positive: #2f9e63;
  --vx-negative: #d83a3a;
  --vx-radius: 14px;
  --vx-radius-sm: 12px;
}

/* ===== ZÁKLAD ===== */
html { scroll-behavior: smooth; }

body {
  background: var(--vx-black);
  color: var(--vx-white);
  font-family: 'Poppins', -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--vx-white); color: var(--vx-black); }

[data-bs-theme=light] {
  --bs-body-bg: var(--vx-black);
  --bs-body-color: var(--vx-white);
  --bs-border-color: var(--vx-border);
  --bs-secondary-color: var(--vx-text-muted);
  --bs-tertiary-bg: var(--vx-ink-900);
  --bs-emphasis-color: var(--vx-white);
}

a { color: var(--vx-white); }
a:hover { color: var(--vx-ink-100); }

.mono, code { font-family: 'JetBrains Mono', monospace; }

/* ===== NAVBAR ===== */
.alfred-navbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--vx-border);
  min-height: 60px;
}

.alfred-navbar .navbar-brand { padding: 14px 0; display: flex; align-items: baseline; }
.brand-alfred {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--vx-white);
  letter-spacing: -0.04em;
}
.brand-sub {
  font-size: 0.6rem;
  color: var(--vx-text-faint);
  margin-left: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 500;
}

.alfred-navbar .nav-link {
  color: var(--vx-text-muted) !important;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 18px 16px !important;
  transition: color 0.15s;
}
.alfred-navbar .nav-link:hover,
.alfred-navbar .nav-link.active { color: var(--vx-white) !important; }

.alfred-navbar .dropdown-menu {
  background: var(--vx-ink-900);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-sm);
  overflow: hidden;
}
.alfred-navbar .dropdown-item { color: var(--vx-text-muted); font-size: 0.85rem; padding: 9px 16px; }
.alfred-navbar .dropdown-item:hover { background: var(--vx-ink-800); color: var(--vx-white); }
.alfred-navbar .dropdown-divider { border-color: var(--vx-border); }
.alfred-navbar .navbar-toggler { border-color: var(--vx-border); }

/* ===== SIDEBAR ===== */
.alfred-sidebar {
  background: var(--vx-black);
  border-right: 1px solid var(--vx-border);
  min-height: calc(100vh - 60px);
  padding-top: 28px !important;
}

.sidebar-section {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--vx-text-faint);
  padding: 0 18px;
  margin-bottom: 8px;
  font-weight: 500;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: var(--vx-text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  border-radius: 10px;
  margin: 1px 10px;
  transition: background 0.12s, color 0.12s;
}
.sidebar-link:hover { background: var(--vx-ink-900); color: var(--vx-white); }
.sidebar-link.active { background: var(--vx-ink-800); color: var(--vx-white); font-weight: 500; }
.sidebar-link.sidebar-highlight {
  background: var(--vx-white);
  color: var(--vx-black) !important;
  font-weight: 600;
  border-radius: 100px;
}
.sidebar-link.sidebar-highlight:hover { background: var(--vx-ink-100); }

/* ===== PAGE HEADER ===== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--vx-border);
}
.page-title {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--vx-white);
  margin: 0;
  line-height: 1;
}
.page-header .text-muted { color: var(--vx-text-muted) !important; }

/* ===== TLAČÍTKA — pill, černobílá ===== */
.btn { border-radius: 100px; font-weight: 500; transition: all 0.15s; }

.btn-primary, .btn-success {
  background: var(--vx-white);
  border-color: var(--vx-white);
  color: var(--vx-black);
  font-weight: 600;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.btn-success:hover, .btn-success:focus, .btn-success:active {
  background: var(--vx-ink-100) !important;
  border-color: var(--vx-ink-100) !important;
  color: var(--vx-black) !important;
}

.btn-outline-primary, .btn-outline-secondary, .btn-outline-dark, .btn-dark {
  border-color: rgba(0, 0, 0, 0.35);
  color: var(--vx-white);
  background: transparent;
}
.btn-dark { background: var(--vx-white); color: var(--vx-black); border-color: var(--vx-white); font-weight: 600; }
.btn-dark:hover { background: var(--vx-ink-100); border-color: var(--vx-ink-100); color: var(--vx-black); }
.btn-outline-primary:hover, .btn-outline-secondary:hover, .btn-outline-dark:hover {
  background: var(--vx-white);
  border-color: var(--vx-white);
  color: var(--vx-black);
}

.btn-outline-danger { border-color: transparent; color: var(--vx-text-faint); }
.btn-outline-danger:hover { background: rgba(244, 90, 90, 0.12); border-color: transparent; color: var(--vx-negative); }

/* ===== BADGE — monochrom ===== */
.badge {
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 100px;
  padding: 0.35em 0.75em;
}
.badge.bg-secondary { background: var(--vx-ink-800) !important; color: var(--vx-ink-200); border: 1px solid var(--vx-border); }
.badge.bg-primary { background: var(--vx-white) !important; color: var(--vx-black); }
.badge.bg-success { background: rgba(76, 186, 127, 0.14) !important; color: var(--vx-positive); border: 1px solid rgba(76, 186, 127, 0.3); }
.badge.bg-danger { background: rgba(244, 90, 90, 0.14) !important; color: var(--vx-negative); border: 1px solid rgba(244, 90, 90, 0.3); }
.badge.bg-warning { background: rgba(0, 0, 0, 0.1) !important; color: var(--vx-ink-100) !important; border: 1px solid var(--vx-border); }
.badge.bg-info-subtle { background: var(--vx-ink-800) !important; color: var(--vx-ink-100) !important; border: 1px solid var(--vx-border); }
.badge.bg-success-subtle { background: rgba(76, 186, 127, 0.14) !important; color: var(--vx-positive) !important; }

/* Badge počtu v navigaci */
.alfred-navbar .badge.bg-danger, .sidebar-link .badge.bg-danger {
  background: var(--vx-white) !important;
  color: var(--vx-black);
  border: none;
  font-weight: 600;
}

/* ===== ALERTY ===== */
.alert { border-radius: var(--vx-radius-sm); border: 1px solid var(--vx-border); background: var(--vx-ink-900); color: var(--vx-white); }
.alert-danger { border-color: rgba(244, 90, 90, 0.4); }
.alert-danger strong { color: var(--vx-negative); }
.alert-warning { border-color: rgba(0, 0, 0, 0.25); }
.alert-success { border-color: rgba(76, 186, 127, 0.4); }
.alert-success::before { content: "✓ "; color: var(--vx-positive); font-weight: 700; }
.alert a { color: var(--vx-white); text-decoration: underline; }

/* ===== CONTENT CARD ===== */
.content-card {
  background: var(--vx-black);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius);
  overflow: hidden;
  padding: 20px;
}
.content-card:has(.table), .content-card:has(.empty-state), .content-card:has(.api-health-item) { padding: 0; }

.content-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--vx-border);
  background: var(--vx-ink-900);
  margin: -20px -20px 20px;
}
.content-card:has(.table) .content-card-header,
.content-card:has(.empty-state) .content-card-header,
.content-card:has(.api-health-item) .content-card-header { margin: 0; }
.content-card-header h5 { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.01em; }

/* ===== TABULKY ===== */
.table { --bs-table-bg: transparent; --bs-table-color: var(--vx-white); --bs-table-border-color: var(--vx-border-soft); }
.content-card .table { margin-bottom: 0; }
.content-card .table thead th {
  background: var(--vx-ink-900);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--vx-text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--vx-border);
  padding: 12px 16px;
}
.content-card .table tbody td { padding: 12px 16px; vertical-align: middle; }
.table-hover tbody tr:hover { --bs-table-hover-bg: var(--vx-ink-900); --bs-table-hover-color: var(--vx-white); }
.table .text-muted { color: var(--vx-text-muted) !important; }

/* ===== FORMULÁŘE ===== */
.form-control, .form-select {
  background: var(--vx-ink-900);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-sm);
  color: var(--vx-white);
  padding: 0.6rem 0.9rem;
}
.form-control:focus, .form-select:focus {
  background: var(--vx-ink-900);
  border-color: rgba(0, 0, 0, 0.5);
  color: var(--vx-white);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}
.form-control::placeholder { color: var(--vx-text-faint); }
.form-label { font-size: 0.8rem; color: var(--vx-ink-200); font-weight: 500; }
.form-check-input {
  background-color: var(--vx-ink-800);
  border-color: rgba(0, 0, 0, 0.35);
  width: 1.15em; height: 1.15em;
}
.form-check-input:checked { background-color: var(--vx-white); border-color: var(--vx-white); }
.form-check-input:checked[type=checkbox] {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1); }
.invalid-feedback { color: var(--vx-negative); }

/* ===== KPI KARTY (dashboard) ===== */
.kpi-card {
  background: var(--vx-black);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius);
  padding: 24px;
  height: 100%;
  transition: border-color 0.15s;
}
.kpi-card:hover { border-color: rgba(0, 0, 0, 0.28); }
.kpi-card-danger { border-color: rgba(244, 90, 90, 0.45); }
.kpi-icon { font-size: 1.1rem; color: var(--vx-text-faint); margin-bottom: 14px; }
.kpi-icon.text-success { color: var(--vx-positive) !important; }
.kpi-icon.text-danger { color: var(--vx-negative) !important; }
.kpi-value {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--vx-white);
  line-height: 1;
}
.kpi-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--vx-text-faint); margin-top: 10px; font-weight: 500; }

/* ===== PŘEHLED VÝDĚLKŮ (dashboard) ===== */
.revenue-panel { padding: 24px; }
.revenue-payers { display: flex; gap: 16px; }
.revenue-payers span {
  font-size: 0.78rem;
  color: var(--vx-text-muted);
  font-weight: 500;
}
.revenue-payers i { margin-right: 5px; }
.revenue-grid { display: flex; flex-wrap: wrap; gap: 28px; }
.revenue-currency {
  flex: 1 1 320px;
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-sm);
  padding: 20px 22px;
}
.revenue-cur-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--vx-text-faint);
  font-weight: 600;
  margin-bottom: 14px;
}
.revenue-figures { display: flex; gap: 32px; flex-wrap: wrap; }
.revenue-fig-value {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--vx-white);
}
.revenue-fig-value span { font-size: 1rem; font-weight: 500; color: var(--vx-text-muted); }
.revenue-fig-year .revenue-fig-value { color: var(--vx-positive); }
.revenue-fig-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--vx-text-faint); margin-top: 8px; font-weight: 500; }
.revenue-breakdown {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--vx-border-soft);
  font-size: 0.8rem;
  color: var(--vx-text-muted);
}
.revenue-breakdown i { margin-right: 5px; }

/* ===== METRIC KARTY (report preview) ===== */
.metric-card {
  background: var(--vx-black);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-sm);
  padding: 16px 18px;
  height: 100%;
}
.metric-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--vx-text-faint);
  margin-bottom: 6px;
  font-weight: 500;
}
.metric-value {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--vx-white);
  line-height: 1.1;
}
.metric-change { font-size: 0.72rem; font-weight: 600; margin-top: 5px; font-family: 'JetBrains Mono', monospace; }
.metric-change.positive { color: var(--vx-positive); }
.metric-change.negative { color: var(--vx-negative); }
.metric-change.neutral  { color: var(--vx-text-faint); }

/* ===== KANÁLOVÉ SEKCE (report preview) ===== */
.channel-section {
  background: var(--vx-black);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius);
  overflow: hidden;
}
.channel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  background: var(--vx-ink-900);
  border-bottom: 1px solid var(--vx-border);
}
.channel-section .row,
.channel-section .table-responsive,
.channel-section .comment-block { padding: 18px 22px; }
.channel-section .row { padding-bottom: 0; }
/* Přímé děti mimo header/row/table dostanou vnitřní odsazení (sekce úkolů) */
.channel-section > *:not(.channel-header):not(.row):not(.table-responsive):not(.comment-block) {
  margin-left: 22px;
  margin-right: 22px;
}
.channel-section > .channel-header + *:not(.row):not(.table-responsive):not(.comment-block) { margin-top: 18px; }
.channel-section > *:last-child:not(.row):not(.table-responsive):not(.comment-block):not(.channel-header) { margin-bottom: 18px; }

.channel-period { margin-left: auto; font-size: 0.72rem; color: var(--vx-text-faint); font-weight: 400; font-family: 'JetBrains Mono', monospace; }

.channel-google .channel-header,
.channel-meta .channel-header,
.channel-sklik .channel-header,
.channel-summary .channel-header { border-left: 3px solid var(--vx-white); }

/* ===== CAMPAIGN TABLE ===== */
.campaign-table { font-size: 0.82rem; }
.campaign-table thead th {
  background: var(--vx-ink-800);
  color: var(--vx-ink-200);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: none;
  font-weight: 500;
  padding: 10px 12px;
}
.campaign-table tbody td { padding: 10px 12px; }
.campaign-table tbody tr:hover { background: var(--vx-ink-900); }

/* ===== LIST GROUP (úkoly na detailu reportu) ===== */
.list-group { --bs-list-group-bg: transparent; --bs-list-group-border-color: var(--vx-border-soft); --bs-list-group-color: var(--vx-white); border-radius: var(--vx-radius-sm); }
.list-group-item { background: transparent; color: var(--vx-white); }

/* ===== COMMENT BLOCK ===== */
.comment-block textarea { resize: vertical; }

/* ===== API HEALTH ===== */
.api-health-item { padding: 14px 20px; border-bottom: 1px solid var(--vx-border-soft); }
.api-health-item:last-child { border-bottom: none; }
.api-health-name { font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; }
.api-health-channels { display: flex; flex-wrap: wrap; gap: 4px; }

/* ===== API TEST BLOCK (klienti) ===== */
.api-test-block {
  background: var(--vx-ink-900);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-sm);
  padding: 16px;
}
.api-test-block > .d-flex > span { font-size: 0.85rem; font-weight: 500; }
.test-result small { font-size: 0.78rem; }
.test-result .text-success { color: var(--vx-positive) !important; }
.test-result .text-danger { color: var(--vx-negative) !important; }

/* ===== SLUŽBY & MĚSÍČNÍ PLATBA (karta klienta) ===== */
.client-services {
  background: var(--vx-ink-900);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-sm);
  padding: 14px 16px;
}
.client-services-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.client-services-head i { margin-right: 6px; }
.client-fee {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--vx-white);
  color: var(--vx-black);
  padding: 3px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.client-services-list { list-style: none; margin: 0; padding: 0; }
.client-services-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--vx-border-soft);
  font-size: 0.86rem;
}
.client-services-list li:first-child { border-top: none; }
.client-services-list li.inactive { opacity: 0.5; }
.client-services-list .svc-price {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  white-space: nowrap;
}

/* ===== CHANNEL SELECTOR (formulář reportu) ===== */
.channel-selector { display: flex; gap: 12px; flex-wrap: wrap; }
.channel-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 18px 28px;
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-sm);
  background: var(--vx-black);
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
  min-width: 110px;
}
.channel-option:hover { border-color: rgba(0, 0, 0, 0.35); }
.channel-option input[type="checkbox"] { display: none; }
.channel-option.selected { border-color: var(--vx-white); background: var(--vx-ink-900); }
.channel-option.selected .channel-name::after { content: " ✓"; }
.channel-icon { font-size: 1.4rem; color: var(--vx-white); }
.google-icon, .meta-icon, .sklik-icon { color: var(--vx-white); }
.channel-name { font-size: 0.8rem; font-weight: 500; color: var(--vx-ink-200); }
.channel-option.selected .channel-name { color: var(--vx-white); }

.compare-preview { min-height: 18px; color: var(--vx-text-muted); font-family: 'JetBrains Mono', monospace; font-size: 0.75rem !important; }

/* ===== EMPTY STATE ===== */
.empty-state { padding: 56px 24px; text-align: center; color: var(--vx-text-faint); }
.empty-state i { font-size: 2.2rem; display: block; margin-bottom: 14px; opacity: 0.5; }
.empty-state p { font-size: 0.88rem; font-weight: 300; }
.empty-state a { color: var(--vx-white); text-decoration: underline; }

/* ===== ÚKOLNÍČEK — KANBAN ===== */
.task-filter-bar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.task-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task-filter-label {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--vx-text-faint);
  min-width: 52px;
}
.task-chip i { font-size: 0.72rem; opacity: 0.7; }
.task-chip.active i { opacity: 1; }
.task-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: 1px solid var(--vx-border);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--vx-text-muted);
  text-decoration: none;
  transition: all 0.15s;
}
.task-chip:hover { border-color: rgba(0, 0, 0, 0.4); color: var(--vx-white); }
.task-chip.active { background: var(--vx-white); border-color: var(--vx-white); color: var(--vx-black); font-weight: 600; }

.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1200px) { .kanban { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) { .kanban { grid-template-columns: 1fr; } }

.kanban-col {
  background: var(--vx-ink-900);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius);
  transition: border-color 0.15s, background 0.15s;
}
.kanban-col.drag-over { border-color: var(--vx-white); background: var(--vx-ink-800); }

.kanban-col-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 12px;
}
.kanban-col-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
  color: var(--vx-ink-200);
}
.kanban-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--vx-text-faint);
  background: var(--vx-ink-800);
  border: 1px solid var(--vx-border);
  border-radius: 100px;
  padding: 1px 9px;
}

.kanban-cards { display: flex; flex-direction: column; gap: 10px; padding: 6px 12px 12px; min-height: 90px; }

.kanban-card {
  background: var(--vx-black);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-sm);
  padding: 14px 16px;
  cursor: grab;
  transition: border-color 0.15s, transform 0.15s, opacity 0.15s;
  position: relative;
}
.kanban-card:hover { border-color: rgba(0, 0, 0, 0.32); }
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: 0.4; transform: scale(0.98); }
.kanban-card:has(.kanban-assign.open) { z-index: 30; }
.kanban-card.done .kanban-card-text { text-decoration: line-through; color: var(--vx-text-muted); }

.kanban-card-text {
  font-size: 0.88rem;
  line-height: 1.5;
  font-weight: 400;
  margin-bottom: 10px;
  word-break: break-word;
  white-space: pre-line;
  user-select: text;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kanban-card-more {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--vx-text-faint);
  margin: -4px 0 10px;
}
.kanban-card:hover .kanban-card-more { color: var(--vx-ink-200); }

.kanban-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kanban-tag {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 10px;
  border-radius: 100px;
  background: var(--vx-ink-800);
  border: 1px solid var(--vx-border);
  color: var(--vx-ink-100);
  text-decoration: none;
  white-space: nowrap;
}
.kanban-tag.tag-client { background: var(--vx-white); color: var(--vx-black); border-color: var(--vx-white); }
/* Deadline = priorita → světle červený banner, blížící se a propadlý termín stupňují sytost */
.kanban-tag.tag-deadline {
  font-variant-numeric: tabular-nums;
  background: rgba(216, 58, 58, 0.1);
  border-color: rgba(216, 58, 58, 0.32);
  color: #c23535;
}
.kanban-tag.tag-deadline i { font-size: 0.62rem; opacity: 0.85; }
.kanban-tag.tag-deadline.soon {
  background: rgba(216, 58, 58, 0.16);
  border-color: rgba(216, 58, 58, 0.5);
  color: var(--vx-negative);
}
.kanban-tag.tag-deadline.overdue {
  background: rgba(216, 58, 58, 0.22);
  border-color: rgba(216, 58, 58, 0.62);
  color: var(--vx-negative);
  font-weight: 700;
}
.kanban-tag.tag-deadline.overdue i { opacity: 1; }
.kanban-card.done .kanban-tag.tag-deadline { opacity: 0.6; }
.kanban-tag.tag-review {
  background: rgba(199, 138, 32, 0.14);
  border-color: rgba(199, 138, 32, 0.42);
  color: #b47c1e;
}
.kanban-tag.tag-review i { font-size: 0.62rem; opacity: 0.85; }
.kanban-card.review { border-left: 2px solid rgba(199, 138, 32, 0.55); }
a.kanban-tag:hover { border-color: rgba(0, 0, 0, 0.5); color: var(--vx-white); }
.kanban-tag.tag-client:hover { color: var(--vx-black); }
/* Přiřazení úkolu – vlastní zaoblený dropdown (vidí jen admin) */
.kanban-assign { position: relative; }
.kanban-assign-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 190px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 9px;
  border-radius: 100px;
  background: var(--vx-ink-800);
  border: 1px solid var(--vx-border);
  color: var(--vx-ink-100);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.kanban-assign-btn:hover { border-color: rgba(0, 0, 0, 0.5); }
.kanban-assign.unassigned .kanban-assign-btn { color: var(--vx-text-faint); }
.kanban-assign.saved .kanban-assign-btn { border-color: var(--vx-positive); color: var(--vx-positive); }
.kanban-assign-label { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kanban-assign-caret { font-size: 0.6rem; opacity: 0.55; transition: transform 0.15s; }
.kanban-assign.open .kanban-assign-caret { transform: rotate(180deg); }
.kanban-assign.open .kanban-assign-btn { border-color: var(--vx-white); }

.kanban-assign-menu {
  display: none;
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
  background: var(--vx-black);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-sm);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}
.kanban-assign.open .kanban-assign-menu { display: block; }
.kanban-assign-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  border-radius: 100px;
  background: none;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--vx-ink-200);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.kanban-assign-opt i { font-size: 0.7rem; opacity: 0.6; }
.kanban-assign-opt:hover { background: var(--vx-ink-900); color: var(--vx-white); }
.kanban-assign-opt.active { background: var(--vx-white); color: var(--vx-black); }
.kanban-assign-opt.active i { opacity: 0.85; }

.kanban-date { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; color: var(--vx-text-faint); margin-left: auto; }

.kanban-card-actions {
  position: absolute;
  top: 8px; right: 8px;
  display: flex;
  gap: 2px;
}
.kanban-card-act {
  background: none;
  border: none;
  color: transparent;
  font-size: 0.85rem;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 100px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.kanban-card:hover .kanban-card-act { color: var(--vx-text-faint); }
.kanban-card-act:hover { color: var(--vx-ink-100) !important; background: rgba(0, 0, 0, 0.06); }
.kanban-card-del:hover { color: var(--vx-negative) !important; background: rgba(216, 58, 58, 0.12); }
.kanban-card-copy.copied { color: var(--vx-positive) !important; }

/* Composer — přidání karty (Trello styl) */
.kanban-composer { padding: 0 12px 14px; }
.kanban-add-btn {
  width: 100%;
  background: none;
  border: 1px dashed rgba(0, 0, 0, 0.2);
  border-radius: var(--vx-radius-sm);
  color: var(--vx-text-faint);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 11px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  padding-left: 16px;
}
.kanban-add-btn:hover { border-color: rgba(0, 0, 0, 0.45); color: var(--vx-white); background: var(--vx-black); }
.kanban-composer-form { display: none; }
.kanban-composer.open .kanban-add-btn { display: none; }
.kanban-composer.open .kanban-composer-form { display: block; }
.kanban-composer-form textarea,
.kanban-composer-form input[type="text"] {
  width: 100%;
  background: var(--vx-black);
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: var(--vx-radius-sm);
  color: var(--vx-white);
  font-size: 0.88rem;
  font-family: 'Poppins', sans-serif;
  padding: 12px 14px;
  resize: none;
  outline: none;
}
.kanban-composer-form input[type="text"] { font-weight: 600; margin-bottom: 8px; }
.kanban-composer-form textarea { font-size: 0.82rem; font-weight: 300; }
.kanban-composer-form textarea:focus,
.kanban-composer-form input[type="text"]:focus { border-color: var(--vx-white); }
.kanban-composer-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }

.kanban-empty { text-align: center; padding: 24px 12px; font-size: 0.8rem; color: var(--vx-text-faint); font-weight: 300; }

/* ===== LOGIN ===== */
.login-page { background: var(--vx-black); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-wrapper { width: 100%; max-width: 420px; padding: 16px; }
.login-card {
  background: var(--vx-black);
  border: 1px solid var(--vx-border);
  border-radius: 18px;
  padding: 44px 40px;
}
.login-header { text-align: center; margin-bottom: 34px; }
.login-logo {
  width: 60px; height: 60px;
  background: var(--vx-white);
  color: var(--vx-black);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.login-title { font-size: 2rem; font-weight: 700; letter-spacing: -0.04em; color: var(--vx-white); margin-bottom: 4px; }
.login-subtitle { color: var(--vx-text-faint); font-size: 0.68rem; letter-spacing: 0.28em; text-transform: uppercase; font-weight: 500; }

/* ===== SPINNER / UTILITY ===== */
.spinner-border { border-right-color: transparent; }
.text-muted { color: var(--vx-text-muted) !important; }
.table th { white-space: nowrap; }
hr { border-color: var(--vx-border); opacity: 1; }

/* ===== DETAIL ÚKOLU ===== */
.task-detail-input { min-height: 260px; resize: vertical; line-height: 1.6; }
.task-detail-text { font-size: 0.92rem; line-height: 1.7; font-weight: 300; }
.task-detail-text p:last-child { margin-bottom: 0; }

/* Popis psaný v HTML – styly pro tagy, které projdou whitelistem
   (tasks/htmltext.py). Bez nich by nadpisy a seznamy vypadaly jako z roku 1998. */
.task-detail-text h3 { font-size: 1rem; font-weight: 600; margin: 18px 0 8px; letter-spacing: -0.01em; }
.task-detail-text h4 { font-size: 0.9rem; font-weight: 600; margin: 16px 0 6px; }
.task-detail-text h3:first-child,
.task-detail-text h4:first-child { margin-top: 0; }
.task-detail-text ul,
.task-detail-text ol { padding-left: 20px; margin-bottom: 12px; }
.task-detail-text li { margin-bottom: 4px; }
.task-detail-text a { color: var(--vx-white); text-decoration: underline; text-underline-offset: 2px; }
.task-detail-text blockquote {
  margin: 12px 0;
  padding: 2px 0 2px 14px;
  border-left: 2px solid var(--vx-border);
  color: var(--vx-text-muted);
}
.task-detail-text code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  background: var(--vx-ink-900);
  padding: 1px 5px;
  border-radius: 6px;
}
.task-detail-text pre {
  background: var(--vx-ink-900);
  border-radius: var(--vx-radius-sm);
  padding: 12px 14px;
  overflow-x: auto;
  margin-bottom: 12px;
}
.task-detail-text pre code { background: none; padding: 0; }
.task-detail-text hr { margin: 16px 0; }

/* Přepínač Text/HTML nad popisem a náhled uloženého HTML pro admina. */
.text-format-toggle { display: inline-flex; flex: 0 0 auto; }
.text-format-toggle .btn {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 12px;
}
.text-format-toggle label:first-of-type { border-radius: 100px 0 0 100px; }
.text-format-toggle label:last-of-type { border-radius: 0 100px 100px 0; margin-left: -1px; }
.task-format-preview {
  border: 1px solid var(--vx-border-soft);
  border-radius: var(--vx-radius-sm);
  padding: 14px 16px;
  background: var(--vx-ink-900);
}
.task-format-preview-label {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--vx-text-faint);
  margin-bottom: 8px;
}
.kanban-composer-format {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--vx-text-muted);
  cursor: pointer;
  user-select: none;
}
.kanban-composer-format input { cursor: pointer; }
.task-detail-meta { display: flex; flex-direction: column; gap: 2px; }
.task-detail-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--vx-border-soft);
}
.task-detail-row:last-child { border-bottom: none; }
.task-detail-key {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--vx-text-faint);
  white-space: nowrap;
}
.task-detail-val { font-size: 0.85rem; font-weight: 500; text-align: right; word-break: break-word; }
.task-detail-val a { color: var(--vx-white); }

/* ===== TIMER PRÁCE ===== */
.timer-mono { font-family: 'JetBrains Mono', monospace; }

/* Tečka „něco běží" */
.timer-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 100px;
  background: var(--vx-positive);
  box-shadow: 0 0 0 3px rgba(47, 158, 99, 0.18);
  animation: timer-pulse 1.8s ease-in-out infinite;
}
@keyframes timer-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Odznak s časem v navbaru i sidebaru */
.timer-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  font-weight: 500;
  background: var(--vx-white);
  color: var(--vx-black);
  padding: 3px 8px;
}
.sidebar-timer-note {
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--vx-text-faint);
  padding: 2px 18px 0 38px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Karta s běžícími stopkami */
.timer-live { border-color: rgba(47, 158, 99, 0.45); }
/* Pauza – karta zchladne, ať je na první pohled vidět, že čas neteče */
.timer-live.paused { border-color: var(--vx-border); }
.timer-live.paused .timer-clock { color: var(--vx-text-muted); }
.timer-live.paused .timer-earned { color: var(--vx-text-muted); }
.timer-controls { display: flex; gap: 8px; margin-top: 14px; }
.timer-controls form { flex: 1 1 0; }
.timer-live-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--vx-ink-200);
  margin-bottom: 6px;
}
.timer-clock {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.6rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 14px;
}
.timer-rename { display: flex; gap: 8px; flex-wrap: wrap; }

/* Výdělek */
.timer-earned {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--vx-positive);
  margin: -8px 0 14px;
}
.timer-earned-rate { font-size: 0.7rem; font-weight: 400; color: var(--vx-text-faint); }
.timer-earned-missing { font-size: 0.75rem; font-weight: 300; color: var(--vx-text-faint); margin: -8px 0 14px; }
.timer-money-sub { font-size: 0.72rem; font-weight: 500; color: var(--vx-positive); }
.timer-row-money {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--vx-positive);
  white-space: nowrap;
  min-width: 62px;
  text-align: right;
}
.timer-client {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 1px 8px;
  border-radius: 100px;
  background: var(--vx-white);
  color: var(--vx-black);
  white-space: nowrap;
}

/* Rozpad času po klientech – jedna práce může střídat víc klientů */
.timer-stack {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: -4px 0 14px;
}
.timer-stack-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--vx-text-faint);
}
.timer-stack-item {
  font-size: 0.68rem;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 100px;
  background: var(--vx-ink-800);
  border: 1px solid var(--vx-border);
  color: var(--vx-ink-100);
  white-space: nowrap;
}
.timer-stack-item b { font-family: 'JetBrains Mono', monospace; font-weight: 600; }
.timer-client.stacked {
  background: var(--vx-ink-800);
  border: 1px solid var(--vx-border);
  color: var(--vx-ink-100);
  margin-left: 4px;
}
.timer-client.stacked b { font-family: 'JetBrains Mono', monospace; }
.timer-edit-clients { display: flex; gap: 4px; flex-wrap: wrap; padding-top: 4px; }
.timer-edit-clients .timer-client { margin-left: 0; }
.timer-paused {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--vx-text-faint);
  white-space: nowrap;
}
.timer-paused i { font-size: 0.6rem; }
.timer-badge.paused { background: var(--vx-ink-800); color: var(--vx-ink-100); }

/* Seznam dnešní práce */
.timer-list { display: flex; flex-direction: column; }
.timer-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--vx-border-soft);
}
.timer-row:last-child { border-bottom: none; }
.timer-row.running { color: var(--vx-white); }
.timer-row-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--vx-text-faint);
  white-space: nowrap;
}
.timer-row-desc { flex: 1 1 auto; font-size: 0.86rem; word-break: break-word; }
.timer-row-dur {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.timer-row-btn {
  background: none;
  border: none;
  color: var(--vx-text-faint);
  font-size: 0.8rem;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 100px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.timer-row-btn:hover { color: var(--vx-ink-100); background: rgba(0, 0, 0, 0.06); }
.timer-row-btn.danger:hover { color: var(--vx-negative); background: rgba(216, 58, 58, 0.12); }

/* Ruční úprava záznamu */
.timer-item { border-bottom: 1px solid var(--vx-border-soft); }
.timer-item:last-child { border-bottom: none; }
.timer-item .timer-row { border-bottom: none; }
.timer-edited {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 8px;
  border-radius: 100px;
  background: var(--vx-ink-800);
  border: 1px solid var(--vx-border);
  color: var(--vx-ink-200);
  white-space: nowrap;
  cursor: help;
}
.timer-edited i { font-size: 0.55rem; opacity: 0.7; }

.timer-edit {
  display: none;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  padding: 4px 0 14px;
}
.timer-edit.open { display: flex; }
.timer-edit-field { display: flex; flex-direction: column; gap: 3px; }
.timer-edit-field.grow { flex: 1 1 220px; }
.timer-edit-field label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--vx-text-faint);
}
.timer-edit-field input[type="date"], .timer-edit-field input[type="time"] { max-width: 150px; }
.timer-edit-actions { display: flex; gap: 6px; }
.timer-edit-note {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--vx-text-faint);
}

/* Plovoucí okno s běžícími stopkami – ovládání bez odskoku na Timer práce */
.timer-pop {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1035;
  width: 330px;
  max-width: calc(100vw - 32px);
}
.timer-pop-panel {
  background: var(--vx-black);
  border: 1px solid rgba(47, 158, 99, 0.45);
  border-radius: var(--vx-radius);
  padding: 14px 16px 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  animation: timer-pop-in 0.28s ease-out;
}
/* Pauza – okno zchladne stejně jako karta na Timeru */
.timer-pop.paused .timer-pop-panel { border-color: var(--vx-border); }
.timer-pop.paused .timer-pop-clock { color: var(--vx-text-muted); }
@keyframes timer-pop-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* Sbalený stav – v rohu zůstane jen pilulka s časem */
.timer-pop-mini {
  display: none;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 8px 14px;
  border: none;
  border-radius: 100px;
  background: var(--vx-white);
  color: var(--vx-black);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  cursor: pointer;
}
.timer-pop-mini-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.timer-pop.collapsed .timer-pop-panel { display: none; }
.timer-pop.collapsed .timer-pop-mini { display: flex; }

.timer-pop-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.timer-pop-state {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--vx-ink-200);
}
.timer-pop-from {
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--vx-text-faint);
  margin-left: auto;
}
.timer-pop-btn {
  background: none;
  border: none;
  padding: 2px 4px;
  font-size: 0.78rem;
  line-height: 1;
  color: var(--vx-text-faint);
  cursor: pointer;
}
.timer-pop-btn:hover { color: var(--vx-white); }

.timer-pop-clock {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.85rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.timer-pop-earned {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--vx-positive);
  margin-top: 2px;
}
.timer-pop-stack { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.timer-pop-stack .timer-client { margin-left: 0; }

.timer-pop-form { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.timer-pop-form-row { display: flex; gap: 6px; }
.timer-pop-form-row .form-select { flex: 1 1 auto; min-width: 0; }
.timer-pop-controls { display: flex; gap: 6px; margin-top: 10px; }
.timer-pop-controls form { flex: 1 1 0; }
.timer-pop-note {
  margin: 8px 0 0;
  font-size: 0.68rem;
  font-weight: 300;
  color: var(--vx-text-faint);
}

@media (max-width: 575.98px) {
  .timer-pop { right: 12px; left: 12px; bottom: 12px; width: auto; }
}

/* ===== ZVONEČEK + UPOZORNĚNÍ ===== */
.notif-wrap { display: flex; align-items: center; }
.notif-bell { position: relative; }
.notif-bell i { font-size: 1.05rem; }
.notif-bell.has-unread i { color: var(--vx-white); }

.notif-count {
  position: absolute;
  top: 2px;
  left: 22px;
  min-width: 17px;
  padding: 0 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 500;
  line-height: 17px;
  text-align: center;
  color: var(--vx-black);
  background: var(--vx-negative);
  border-radius: 100px;
}

.notif-menu {
  width: 380px;
  max-width: calc(100vw - 32px);
  padding: 0;
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius);
  background: var(--vx-black);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--vx-border-soft);
}
.notif-title {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
  color: var(--vx-ink-200);
}
.notif-mark-all {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--vx-text-faint);
  cursor: pointer;
}
.notif-mark-all:hover { color: var(--vx-white); text-decoration: underline; }

.notif-list { max-height: 420px; overflow-y: auto; }
.notif-page-list { display: flex; flex-direction: column; }

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--vx-border-soft);
  text-decoration: none;
  color: var(--vx-white);
  transition: background 0.12s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--vx-ink-900); color: var(--vx-white); }
.notif-item.unread { background: rgba(0, 0, 0, 0.035); }
.notif-item.unread .notif-headline { font-weight: 600; }
.notif-item.unread .notif-icon { background: var(--vx-white); color: var(--vx-black); border-color: var(--vx-white); }

.notif-icon {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--vx-border);
  border-radius: 100px;
  background: var(--vx-ink-900);
  color: var(--vx-ink-200);
  font-size: 0.78rem;
}
.notif-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-headline { font-size: 0.8rem; font-weight: 500; }
.notif-task {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--vx-ink-200);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notif-excerpt {
  font-size: 0.74rem;
  font-weight: 300;
  color: var(--vx-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: var(--vx-text-faint);
  margin-top: 2px;
}
.notif-empty {
  padding: 26px 16px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--vx-text-faint);
}
.notif-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--vx-ink-200);
  border-top: 1px solid var(--vx-border-soft);
  background: var(--vx-ink-900);
}
.notif-all:hover { color: var(--vx-white); background: var(--vx-ink-800); }

/* ===== KARTA: NÁZEV + POČTY ===== */
.kanban-card-title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  word-break: break-word;
  user-select: text;
  cursor: pointer;
}
.kanban-card.done .kanban-card-title { text-decoration: line-through; color: var(--vx-text-muted); }
.kanban-card .kanban-card-text { font-size: 0.8rem; font-weight: 300; color: var(--vx-text-muted); -webkit-line-clamp: 3; }
.kanban-tag.tag-count { font-variant-numeric: tabular-nums; }
.kanban-tag.tag-count i { font-size: 0.62rem; opacity: 0.7; }

/* ===== DETAIL ÚKOLU: NÁZEV, UPDATY, DOKUMENTY ===== */
.task-title-input { font-size: 1rem; font-weight: 600; }
.task-read-title { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 12px; }

.feed-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--vx-text-faint);
  background: var(--vx-ink-900);
  border: 1px solid var(--vx-border);
  border-radius: 100px;
  padding: 1px 9px;
}

.feed { display: flex; flex-direction: column; }
.feed-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--vx-border-soft);
}
.feed-item:first-child { padding-top: 4px; }
.feed-item:target { background: var(--vx-ink-900); border-radius: var(--vx-radius-sm); padding: 14px 12px; }
.feed-avatar {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 100px;
  background: var(--vx-white);
  color: var(--vx-black);
  font-size: 0.76rem;
  font-weight: 600;
}
.feed-body { flex: 1 1 auto; min-width: 0; }
.feed-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.feed-author { font-size: 0.8rem; font-weight: 600; }
.feed-time { font-family: 'JetBrains Mono', monospace; font-size: 0.64rem; color: var(--vx-text-faint); }
.feed-del {
  background: none;
  border: none;
  padding: 0 2px;
  font-size: 0.7rem;
  color: var(--vx-text-faint);
  cursor: pointer;
}
.feed-del:hover { color: var(--vx-negative); }
.feed-text { font-size: 0.85rem; line-height: 1.6; font-weight: 300; word-break: break-word; }
.feed-mentions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; font-size: 0.66rem; color: var(--vx-text-faint); }
.mention-chip {
  font-size: 0.66rem;
  font-weight: 600;
  padding: 1px 9px;
  border-radius: 100px;
  background: var(--vx-ink-800);
  border: 1px solid var(--vx-border);
  color: var(--vx-ink-100);
}
.feed-empty {
  padding: 18px 0 20px;
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--vx-text-faint);
}

.feed-form { margin-top: 14px; }
.feed-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.feed-hint { font-size: 0.7rem; font-weight: 300; color: var(--vx-text-faint); }

/* Nabídka lidí při psaní `@` */
.mention-wrap { position: relative; }
.mention-menu {
  display: none;
  position: absolute;
  z-index: 40;
  left: 10px;
  bottom: calc(100% + 6px);
  min-width: 240px;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
  background: var(--vx-black);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-sm);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.14);
}
.mention-menu.open { display: block; }
.mention-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 10px;
  border: none;
  border-radius: 100px;
  background: none;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--vx-white);
  text-align: left;
  cursor: pointer;
}
.mention-opt span { font-size: 0.7rem; font-weight: 300; color: var(--vx-text-faint); }
.mention-opt i { font-size: 0.72rem; opacity: 0.6; }
.mention-opt:hover, .mention-opt.active { background: var(--vx-ink-800); }
.mention-opt.active span { color: var(--vx-text-muted); }

.mention-people { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.mention-person {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--vx-border);
  border-radius: 100px;
  background: var(--vx-black);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--vx-white);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.mention-person span { font-family: 'Poppins', sans-serif; font-size: 0.7rem; font-weight: 300; color: var(--vx-text-faint); }
.mention-person:hover { border-color: var(--vx-white); background: var(--vx-ink-900); }

/* Dokumenty */
.attach-list { display: flex; flex-direction: column; margin-bottom: 14px; }
.attach-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--vx-border-soft);
}
.attach-item:last-child { border-bottom: none; }
.attach-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  text-decoration: none;
  color: var(--vx-white);
}
.attach-icon {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-sm);
  background: var(--vx-ink-900);
  font-size: 0.9rem;
}
.attach-info { display: flex; flex-direction: column; min-width: 0; }
.attach-name {
  font-size: 0.82rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attach-main:hover .attach-name { text-decoration: underline; }
.attach-meta { font-size: 0.68rem; font-weight: 300; color: var(--vx-text-faint); }
.attach-del {
  background: none;
  border: none;
  padding: 4px;
  font-size: 0.78rem;
  color: var(--vx-text-faint);
  cursor: pointer;
}
.attach-del:hover { color: var(--vx-negative); }

/* Náhled obrázku v seznamu dokumentů */
.attach-thumb {
  flex: 0 0 auto;
  width: 48px; height: 48px;
  overflow: hidden;
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-sm);
  background: var(--vx-ink-900);
}
.attach-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.attach-zoom:hover .attach-thumb { border-color: var(--vx-white); }
.attach-get {
  flex: 0 0 auto;
  padding: 4px;
  font-size: 0.78rem;
  color: var(--vx-text-faint);
  text-decoration: none;
}
.attach-get:hover { color: var(--vx-white); }

/* Zvětšený obrázek */
.lightbox-content { background: var(--vx-black); border: 1px solid var(--vx-border); border-radius: var(--vx-radius); }
.lightbox-content .modal-header { border-bottom: 1px solid var(--vx-border-soft); }
.lightbox-content .modal-title {
  font-size: 0.82rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lightbox-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.lightbox-body { display: flex; justify-content: center; padding: 12px; }
.lightbox-body img { max-width: 100%; max-height: 78vh; object-fit: contain; }

.attach-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.attach-form input[type="file"] { max-width: 320px; }
.attach-form input[type="text"] { max-width: 220px; }

/* ------------------------------------------------------------------
   Připomínky u úkolů („vrať se k tomu")

   Odložený úkol má být na boardu vidět, ale nemá křičet – ztlumíme ho.
   Dozrálá připomínka naopak potřebuje upoutat, ale jinou barvou než
   deadline: ta je červená a znamená skluz, tohle je jen „je čas".
   ------------------------------------------------------------------ */
.kanban-card.snoozed { opacity: 0.55; }
.kanban-card.snoozed:hover { opacity: 0.85; }
.kanban-tag.tag-snoozed {
  font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--vx-border);
  color: var(--vx-text-muted);
}
.kanban-tag.tag-snoozed i { font-size: 0.62rem; opacity: 0.75; }
.kanban-tag.tag-followup {
  background: rgba(47, 110, 158, 0.14);
  border-color: rgba(47, 110, 158, 0.45);
  color: #2f6e9e;
  font-weight: 700;
}
.kanban-tag.tag-followup i { font-size: 0.62rem; opacity: 1; }
.kanban-card.followup-due { border-left: 2px solid rgba(47, 110, 158, 0.6); }

/* Pruh nad detailem úkolu */
.followup-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  margin-bottom: 20px;
  border: 1px solid var(--vx-border);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.03);
  font-size: 0.85rem;
}
.followup-banner.due {
  background: rgba(47, 110, 158, 0.09);
  border-color: rgba(47, 110, 158, 0.4);
}
.followup-banner > i { font-size: 1.1rem; opacity: 0.7; }
.followup-banner.due > i { color: #2f6e9e; opacity: 1; }
.followup-banner-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.followup-banner-note {
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--vx-text-muted);
  overflow-wrap: anywhere;
}

/* Výběr odkladu u formuláře updatu */
.feed-followup { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.feed-followup > i { font-size: 0.8rem; color: var(--vx-text-muted); }
.feed-followup .form-select { width: auto; min-width: 168px; font-size: 0.76rem; }
.feed-followup .form-control { width: auto; font-size: 0.76rem; }

/* ------------------------------------------------------------------
   Alfred v mobilu – stav upozornění a seznam zařízení
   ------------------------------------------------------------------ */
.push-state {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  padding: 12px 16px;
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-sm);
  background: rgba(0, 0, 0, 0.03);
}
.push-state-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--vx-ink-400);
  flex: none;
}
.push-state.on { background: rgba(47, 158, 99, 0.1); border-color: rgba(47, 158, 99, 0.4); }
.push-state.on .push-state-dot { background: var(--vx-positive); }
.push-state.off .push-state-dot { background: var(--vx-ink-400); }

.push-help {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--vx-radius-sm);
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--vx-border-soft);
  font-size: 0.8rem;
  font-weight: 300;
}
.push-help strong { display: block; margin-bottom: 4px; font-weight: 600; }

.install-steps { display: flex; flex-direction: column; gap: 10px; font-size: 0.82rem; font-weight: 300; }
.install-steps strong { font-weight: 600; }

.device-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--vx-border-soft);
}
.device-row:last-child { border-bottom: 0; }
.device-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.device-name { font-size: 0.85rem; font-weight: 500; }
.device-meta { font-size: 0.72rem; font-weight: 300; color: var(--vx-text-muted); }
.device-error { font-size: 0.72rem; color: var(--vx-negative); }

.offline-page { text-align: center; max-width: 460px; margin: 12vh auto; }
.offline-page > i { font-size: 2.6rem; color: var(--vx-ink-400); display: block; margin-bottom: 16px; }
.offline-page p { font-size: 0.85rem; font-weight: 300; margin-bottom: 24px; }

/* Na ploše spuštěná aplikace nemá adresní řádek – dorovnáme odsazení
   pod stavovým řádkem telefonu, ať navbar nelepí na hodiny. */
@media (display-mode: standalone) {
  .alfred-navbar { padding-top: env(safe-area-inset-top); }
  body { padding-bottom: env(safe-area-inset-bottom); }
}
