@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  --bg-primary: #060b1f;
  --bg-secondary: #0a1030;
  --bg-card: rgba(16, 22, 60, 0.6);
  --bg-card-solid: #10163c;
  --bg-card-hover: rgba(26, 34, 85, 0.7);
  --bg-glass: rgba(14, 18, 50, 0.55);
  --accent-gold: #c9a84c;
  --accent-gold-light: #e0c675;
  --accent-blue: #4a7bff;
  --accent-blue-light: #6b95ff;
  --accent-cyan: #38bdf8;
  --accent-green: #4ade80;
  --accent-red: #f87171;
  --text-primary: #edf0ff;
  --text-secondary: #a0a8d0;
  --text-muted: #6770a0;
  --border: rgba(74, 123, 255, 0.12);
  --border-light: rgba(201, 168, 76, 0.2);
  --border-glass: rgba(255, 255, 255, 0.06);
  --gradient-gold: linear-gradient(135deg, #c9a84c, #e0c675);
  --gradient-blue: linear-gradient(135deg, #4a7bff, #38bdf8);
  --gradient-hero: linear-gradient(160deg, #060b1f 0%, #0c1545 40%, #121d60 100%);
  --gradient-mesh: radial-gradient(ellipse at 20% 50%, rgba(74,123,255,0.08) 0%, transparent 50%),
                   radial-gradient(ellipse at 80% 20%, rgba(201,168,76,0.06) 0%, transparent 50%),
                   radial-gradient(ellipse at 50% 80%, rgba(56,189,248,0.05) 0%, transparent 50%);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 60px rgba(74, 123, 255, 0.08);
  --shadow-gold: 0 4px 30px rgba(201, 168, 76, 0.15);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255,255,255,0.03);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========= DARK SCROLLBARS ========= */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(74,123,255,0.25); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(201,168,76,0.55); }
::-webkit-scrollbar-corner { background: transparent; }
* { scrollbar-width: thin; scrollbar-color: rgba(74,123,255,0.25) transparent; }

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Body mesh gradient overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--gradient-mesh);
  pointer-events: none;
  z-index: 0;
}

/* ========= NAVIGATION ========= */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(6, 11, 31, 0.45);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--border-glass);
  padding: 0 2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
nav.scrolled {
  background: rgba(6, 11, 31, 0.65);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255,255,255,0.03);
}
.nav-inner {
  max-width: 1320px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; height: 72px;
}
.logo {
  font-family: 'Playfair Display', serif; font-size: 1.6rem; font-weight: 700;
  background: var(--gradient-gold);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo span { font-weight: 400; opacity: 0.7; }
.nav-links { display: flex; gap: 0.15rem; list-style: none; align-items: center; }
.nav-links a {
  color: var(--text-secondary); text-decoration: none;
  padding: 0.45rem 0.9rem; border-radius: 8px;
  font-size: 0.84rem; font-weight: 500;
  transition: all 0.25s ease;
  position: relative;
}
.nav-links a:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.nav-links a.active {
  color: var(--accent-gold);
  background: rgba(201,168,76,0.08);
}
.nav-cta {
  background: var(--gradient-gold) !important;
  color: var(--bg-primary) !important;
  font-weight: 600 !important;
  padding: 0.5rem 1.25rem !important;
  box-shadow: var(--shadow-gold);
}
.nav-cta:hover { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 6px 35px rgba(201,168,76,0.25); }
.mobile-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; }

/* ========= LAYOUT ========= */
section { padding: 6rem 2rem; position: relative; z-index: 1; }
.container { max-width: 1200px; margin: 0 auto; }

/* ========= PAGE HEADER — Modern Hero ========= */
.page-header {
  padding: 10rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(74,123,255,0.12) 0%, transparent 100%),
    radial-gradient(ellipse 40% 60% at 80% 30%, rgba(201,168,76,0.06) 0%, transparent 100%);
  z-index: -1;
}
/* Animated grid lines behind hero */
.page-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(74,123,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,123,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  z-index: -1;
  animation: gridFloat 20s linear infinite;
}
@keyframes gridFloat {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

.section-label {
  font-size: 0.72rem; font-weight: 700; color: var(--accent-gold);
  letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 1.25rem;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.section-label::before, .section-label::after {
  content: '';
  width: 24px; height: 1px;
  background: var(--gradient-gold);
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 700;
  margin-bottom: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.section-title em {
  font-style: normal;
  background: var(--gradient-gold);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-desc {
  color: var(--text-secondary); font-size: 1.05rem;
  max-width: 640px; margin-bottom: 3rem; line-height: 1.8;
}
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ========= BUTTONS ========= */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.875rem 2rem; border-radius: var(--radius); font-size: 0.92rem;
  font-weight: 600; text-decoration: none; cursor: pointer; border: none;
  transition: all var(--transition);
  position: relative; overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(rgba(255,255,255,0.1), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.btn:hover::after { opacity: 1; }
.btn-primary {
  background: var(--gradient-gold); color: var(--bg-primary);
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(201,168,76,0.35);
}
.btn-outline {
  background: transparent; color: var(--text-primary);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.btn-outline:hover {
  border-color: var(--accent-gold); color: var(--accent-gold);
  background: rgba(201,168,76,0.05);
}
.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.85rem; }
.btn-blue { background: var(--gradient-blue); color: #fff; }

/* ========= CARDS — Glassmorphism ========= */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transition: opacity 0.35s;
}
.card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient-gold);
  opacity: 0; transition: opacity 0.35s;
}
.card:hover {
  border-color: rgba(74,123,255,0.2);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}
.card:hover::after { opacity: 1; }

/* ========= GLASS PANEL — reusable component ========= */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
}

/* ========= FORM ELEMENTS ========= */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block; font-size: 0.85rem; font-weight: 500;
  margin-bottom: 0.5rem; color: var(--text-secondary);
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: rgba(10, 14, 39, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 1.25rem;
  color: var(--text-primary); font-size: 0.95rem;
  font-family: inherit; outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(74,123,255,0.1);
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ba3c7' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.35rem; }

/* ========= TAGS ========= */
.tag {
  display: inline-block; font-size: 0.72rem; padding: 0.25rem 0.75rem;
  border-radius: 100px;
  background: rgba(74,123,255,0.08);
  color: var(--accent-blue-light);
  border: 1px solid rgba(74,123,255,0.15);
  backdrop-filter: blur(4px);
}
.tag-gold {
  background: rgba(201,168,76,0.1); color: var(--accent-gold);
  border-color: var(--border-light);
}

/* ========= TABS ========= */
.tabs { display: flex; gap: 0.25rem; margin-bottom: 2rem; flex-wrap: wrap; }
.tab {
  padding: 0.6rem 1.5rem; border-radius: var(--radius); font-size: 0.88rem;
  color: var(--text-muted); cursor: pointer;
  transition: all 0.25s; border: 1px solid transparent;
  background: none; font-family: inherit; font-weight: 500;
}
.tab:hover { color: var(--text-primary); background: rgba(255,255,255,0.03); }
.tab.active {
  background: rgba(74,123,255,0.12); color: var(--accent-blue-light);
  border-color: rgba(74,123,255,0.2);
  box-shadow: inset 0 -2px 0 var(--accent-blue);
}

/* ========= TABLE ========= */
.data-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.data-table th {
  background: rgba(10, 14, 39, 0.5); padding: 0.875rem 1.25rem;
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; text-align: left; color: var(--accent-gold);
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 0.75rem 1.25rem; font-size: 0.88rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text-secondary);
  transition: background 0.2s;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(74,123,255,0.04); }

/* ========= BREADCRUMB ========= */
.breadcrumb {
  padding: 5.5rem 2rem 0; max-width: 1200px; margin: 0 auto;
  font-size: 0.82rem; color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent-gold); }
.breadcrumb span { margin: 0 0.5rem; }

/* ========= STAT / METRIC CARDS ========= */
.stat-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(74,123,255,0.05) 0%, transparent 60%);
  pointer-events: none;
}

/* ========= GLOW ACCENTS ========= */
.glow-gold {
  box-shadow: 0 0 30px rgba(201,168,76,0.1), 0 0 60px rgba(201,168,76,0.05);
}
.glow-blue {
  box-shadow: 0 0 30px rgba(74,123,255,0.1), 0 0 60px rgba(74,123,255,0.05);
}

/* ========= DIVIDERS ========= */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 3rem 0;
}

/* ========= FOOTER ========= */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 4rem 2rem 2rem;
  position: relative;
  z-index: 1;
}
footer::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 200px;
  background: linear-gradient(180deg, rgba(74,123,255,0.03) 0%, transparent 100%);
  pointer-events: none;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem; max-width: 1200px; margin: 0 auto;
  position: relative;
}
.footer-brand p { color: var(--text-muted); font-size: 0.85rem; line-height: 1.7; }
.footer-col h4 {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.15em; color: var(--text-muted); margin-bottom: 1.25rem;
}
.footer-col a {
  display: block; color: var(--text-secondary); text-decoration: none;
  font-size: 0.88rem; padding: 0.3rem 0; transition: all 0.25s;
}
.footer-col a:hover { color: var(--accent-gold); transform: translateX(4px); }
.footer-bottom {
  max-width: 1200px; margin: 3rem auto 0; padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.footer-bottom p { font-size: 0.78rem; color: var(--text-muted); }
.footer-disclaimer {
  max-width: 1200px; margin: 1.5rem auto 0; padding: 1.25rem; border-radius: var(--radius);
  background: rgba(244,67,54,0.04); border: 1px solid rgba(244,67,54,0.1);
  font-size: 0.75rem; color: var(--text-muted); line-height: 1.7;
}

/* ========= ANIMATIONS ========= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.fade-up {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* Animated gradient border */
.gradient-border {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-gold), var(--accent-cyan), var(--accent-blue));
  background-size: 300% 300%;
  animation: gradientRotate 6s ease infinite;
  z-index: -1;
}
@keyframes gradientRotate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Number counter animation class */
.count-up { font-variant-numeric: tabular-nums; }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, rgba(74,123,255,0.08) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

/* ========= RESPONSIVE ========= */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-links.show {
    display: flex !important; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(6,11,31,0.98);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    padding: 0.75rem 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    max-height: calc(100vh - 64px);
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    gap: 0.15rem;
    box-shadow: 0 12px 28px rgba(0,0,0,0.5);
  }
  .nav-links.show li { width: 100%; }
  .nav-links.show a {
    display: block; width: 100%; box-sizing: border-box;
    padding: 0.85rem 1rem; border-radius: 8px; font-size: 1rem;
  }
  .nav-links.show a:hover, .nav-links.show a:active { background: rgba(255,255,255,0.06); }
  .nav-links.show .nav-cta { margin-top: 0.4rem; text-align: center; }
  .mobile-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .page-header { padding: 8rem 1.5rem 3rem; }
}
@media (max-width: 600px) {
  section { padding: 4rem 1.25rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .page-header { padding: 7rem 1rem 2.5rem; }
}

/* ========= UTILITY CLASSES ========= */
.text-gold { color: var(--accent-gold); }
.text-blue { color: var(--accent-blue); }
.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }
.bg-glass { background: var(--bg-glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.border-glass { border: 1px solid var(--border-glass); }
.positive { color: var(--accent-green); }
.negative { color: var(--accent-red); }

/* ============================================================
   MOBILE RESPONSIVE ENHANCEMENTS  (přidáno 2026-06-01)
   Sdílené pro všechny stránky (aplikace i marketing).
   Cíl: žádné vodorovné přetékání stránky, hezké zalamování textu,
   tabulky se posouvají vodorovně místo "rozdrcení" sloupců.
   ============================================================ */

/* Stabilní měřítko písma na iOS + žádné horizontální přetékání celé stránky */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }

/* Média se nikdy nevejdou mimo rodiče */
img, svg, video, canvas, iframe { max-width: 100%; height: auto; }

/* Dlouhá slova/URL/ISIN se lámou rozumně místo přetékání */
h1, h2, h3, h4, h5, p, li, a, span, td, th, label, dd, dt, blockquote {
  overflow-wrap: break-word;
}

/* Formulářové prvky nepřetečou svého rodiče */
input, select, textarea, .form-input, .form-select { max-width: 100%; }

/* Pomocná třída pro tabulky/obsah, který má skrolovat vodorovně */
.table-scroll, .responsive-scroll {
  width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
}

@media (max-width: 900px) {
  .container { padding-left: 1rem; padding-right: 1rem; }
  /* Obecné mřížkové helpery složit do jednoho sloupce */
  .grid-2, .grid-3, .grid-4,
  .two-col, .three-col, .four-col,
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr !important; }
}

@media (max-width: 768px) {
  /* Nadpisy plynule zmenšit, ať se nelámou ošklivě */
  h1 { font-size: clamp(1.6rem, 6.5vw, 2.3rem); line-height: 1.2; }
  h2 { font-size: clamp(1.3rem, 5vw, 1.8rem); line-height: 1.25; }
  h3 { font-size: clamp(1.1rem, 4vw, 1.4rem); }

  /* Datové tabulky: vodorovný posuv místo drcení sloupců do více řádků.
     nowrap zabrání "rozsypanému" lámání textu v buňkách (přesně ten problém). */
  .data-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  /* Tlačítka se mohou zalomit a roztáhnout na šířku v úzkých lištách */
  .btn { white-space: normal; }
}

@media (max-width: 600px) {
  section { padding: 3rem 1rem; }
  .card, .content-card { border-radius: 12px; }
}

/* Bílá ikonka kalendáře v date/month polích na tmavém pozadí (Výdaje aj.) */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(2);
  cursor: pointer;
  opacity: 0.9;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="month"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* ============================================================
   HUSTOTA ZOBRAZENÍ — kompaktní / standard / pro slepce
   Třída na <html>, nastavuje js/display-prefs.js. Škáluje rem.
   Horní lišta (.nav-inner) má pevných 72px, takže offsety
   dashboardu (top:72px) zůstávají v pořádku.
   ============================================================ */
html.fv-density-large    { font-size: 16px; }   /* pro slepce — výchozí stav */
html.fv-density-standard { font-size: 14px; }
html.fv-density-compact  { font-size: 12.5px; }

/* Kompaktní — těsnější rozestupy v dashboardu i v editaci portfolia */
html.fv-density-compact .dash-main { padding: 1.05rem 1.3rem; }
html.fv-density-compact .dash-header { margin-bottom: 1rem; }
html.fv-density-compact .dash-panel .card,
html.fv-density-compact .dash-panel .stat-card { padding: 1rem 1.1rem; }
html.fv-density-compact .container { padding-top: 1.2rem; padding-bottom: 1.2rem; }
html.fv-density-standard .dash-main { padding: 1.6rem 2rem; }

/* Segmentový přepínač hustoty v bočním panelu */
.dash-density { padding: 0.25rem 0.75rem 0.5rem; }
.dash-density-seg {
  display: flex; gap: 0.25rem; background: var(--bg-primary);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 0.2rem;
}
.dash-density-seg button {
  flex: 1; border: none; background: none; cursor: pointer; font-family: inherit;
  color: var(--text-muted); font-size: 0.7rem; font-weight: 600; padding: 0.35rem 0.2rem;
  border-radius: calc(var(--radius) - 3px); transition: all 0.18s; line-height: 1.1;
}
.dash-density-seg button:hover { color: var(--text-primary); background: rgba(74,123,255,0.08); }
.dash-density-seg button.active { color: var(--accent-gold); background: rgba(201,168,76,0.12); }

/* ========= STICKY SCROLL WRAPPER (široké/dlouhé tabulky) =========
   Omezí výšku tabulky na obrazovku → vodorovný posuvník je vždy viditelný,
   hlavička tabulky zůstává při svislém scrollu nahoře. */
.table-sticky-scroll {
  max-height: calc(100vh - 260px);
  overflow: auto;
}
.table-sticky-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--bg-card-solid);
}
.table-sticky-scroll .data-table {
  border: none;
  border-radius: 0;
  overflow: visible;
}
.table-sticky-scroll:has(> .data-table),
.table-sticky-scroll:has(> div > .data-table) {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}
.table-sticky-scroll .manual-form-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--bg-card-solid);
}


/* ===== A8 — sticky hlavička + první sloupce v portfolio tabulce (2026-07-15) ===== */
.port-table thead th{position:sticky;top:0;z-index:3;background:var(--bg-card-solid,#10163c);}
.port-table td.pf-sticky-1{overflow:hidden;text-overflow:ellipsis;}
@media (max-width:1100px){
  .port-table td.pf-sticky-1{position:sticky;left:0;z-index:2;background:var(--bg-card-solid,#10163c);min-width:78px;max-width:120px;}
  .port-table td.pf-sticky-2{position:sticky;left:78px;z-index:2;background:var(--bg-card-solid,#10163c);}
  .port-table thead th:nth-child(1){position:sticky;left:0;z-index:5;}
  .port-table thead th:nth-child(2){position:sticky;left:78px;z-index:5;}
}
.sec-grp-head td{border-top:1px solid var(--border,#2a2a4a);}
details.content-card>summary::-webkit-details-marker{display:none;}
