/* === Fintillent – společné CSS === */
:root{
  --bg:#f5f5f7;
  --panel:#ffffff;
  --muted:#8e8e93;
  --text:#222;
  --border:#e5e5ea;
  --primary:#FAD200;
  --primary-ink:#7a6500;
  --secondary:#FFB464;
  --secondary-ink:#6c3b00;
}

*{ box-sizing:border-box; }
html,body{ overflow-x:hidden; height:100%; }
body{ overflow-x:hidden;
  margin:0;
  font: 15px/1.4 system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color:var(--text);
  background:var(--bg);
}
body.no-scroll{ overflow:hidden; }

/* Horní lišta */
.topbar{
  position:fixed; top:0; left:0; right:0;
  height:56px; background:#fff;
  display:flex; align-items:center; justify-content:space-between;
  padding:0 12px; border-bottom:1px solid var(--border);
  z-index:1000;
}
.logo{ height:28px; width:auto; object-fit:contain; margin-right:8px; }
.brand{ font-weight:700; letter-spacing:0.3px; }
.brand-home-link{ display:inline-flex; align-items:center; color:inherit; text-decoration:none; min-height:36px; }
.brand-text{ display:inline; }
.brand-home-icon{ display:none; width:36px; height:36px; align-items:center; justify-content:center; border:1px solid var(--border); border-radius:999px; background:#fff; }
.brand-home-icon svg{ width:18px; height:18px; display:block; }
.topbar-left{ display:flex; align-items:center; gap:8px; }
.topbar-right{ display:flex; align-items:center; gap:8px; }
.logo-btn{
  border:0; background:transparent; padding:0; display:flex; align-items:center; cursor:pointer;
}

/* Uživatelské ovládání vpravo */
.user-controls{ display:flex; align-items:center; gap:10px; }
.user-email{
  font-weight:600; white-space:nowrap;
  padding:6px 10px; border:1px solid var(--border); border-radius:10px; background:#fff;
}
.control-select{
  height:36px; border:1px solid var(--border);
  background:#fff; color:var(--text);
  padding:0 10px; border-radius:10px; outline:none; max-width:190px;
}
.control-select:focus{ border-color:#bbb; box-shadow:0 0 0 3px rgba(0,0,0,.04); }
.sr-only{
  position:absolute !important;
  width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* Rozvržení */
.layout{ display:flex; margin-top:56px; }
.sidebar{
  position:fixed; top:56px; left:0; bottom:0; width:240px;
  background:#fff; border-right:1px solid var(--border); padding:12px;
  overflow:auto; z-index:1500;
}
.content{
  margin-left:240px; width:100%;
  min-height:calc(100vh - 56px); padding-bottom:48px;
}

/* Sidebar backdrop (mobile overlay) */
.sidebar-backdrop{
  position:fixed;
  top:56px; left:0; right:0; bottom:0;
  background:rgba(0,0,0,.28);
  backdrop-filter:saturate(150%) blur(2px);
  display:none;
  z-index:1400;
}
.sidebar-backdrop.show{ display:block; }

/* Sidebar nav: disabled items */
.nav-item.disabled{
  opacity:.42;
  filter:grayscale(1);
  pointer-events:none;
  cursor:not-allowed;
}
.nav-item.disabled:hover{ background:transparent; }
.nav-item.disabled:active{ transform:none; }

/* Subbar */
.subbar{
  position:sticky; top:56px; z-index:800;
  background:rgba(255,255,255,0.85); backdrop-filter:saturate(180%) blur(10px);
  border-bottom:1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 16px;
}

/* Na desktopu má subbar začínat až od hrany navigace (stejně jako obsah). */
@media (min-width: 981px){
  .subbar{
    margin-left:240px;
    width:calc(100% - 240px);
  }
}
.page-title{ font-size:18px; margin:0; }
.subbar-right{ display:flex; gap:8px; }

/* Navigace */
.nav{ display:flex; flex-direction:column; gap:4px; }
.nav-item{
  display:flex; align-items:center; gap:10px;
  padding:10px 12px; border-radius:10px; text-decoration:none; color:inherit;
}
.nav-item:hover{ background:var(--primary); }
.nav-item.active{ background:var(--secondary); font-weight:600; }
.icon{ width:18px; height:18px; display:inline-block; }

/* Tlačítka */
.icon-btn{
  background:#fff; border:1px solid var(--border);
  width:36px; height:36px; border-radius:10px;
  display:grid; place-items:center; color:#000;
  cursor:pointer;
}
.icon-btn:hover{ background:#fafafa; }

.btn{
  border:1px solid var(--border); background:#fff; color:#000;
  padding:8px 12px; border-radius:10px; cursor:pointer; display:inline-flex; align-items:center; gap:8px;
}
.btn.primary{ background:var(--primary); border-color:var(--primary); color:var(--primary-ink); }
.btn.secondary{ background:var(--secondary); border-color:var(--secondary); color:var(--secondary-ink); }
.btn.ghost{ background:#fff; }
.btn.danger{ border-color:#fecaca; color:#b91c1c; }
.btn.danger:hover{ background:#fff1f1; }
.btn:hover{ filter:brightness(0.98); }



/* === UI primitives (cards, blocks, modals) === */
/* Section header inside a block (title + actions) */
.section-head{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; flex-wrap:wrap;
}
.section-head.mt10{ margin-top:10px; }
.section-head.mt14{ margin-top:14px; }
.section-head.mt16{ margin-top:16px; }
.section-head + .entries{ margin-top:8px; }

/* Modal layout for <dialog> */
dialog{
  border:1px solid var(--border);
  border-radius:16px;
  padding:0;
  background:var(--panel);
  color:var(--text);
  /* IMPORTANT: <dialog> without explicit width tends to shrink to content.
     We want consistent, "vzdušné" modály jako u Extra výdajů. */
  width:min(920px, 92vw);
  max-width:min(920px, 92vw);
}
dialog::backdrop{ background: rgba(0,0,0,.35); }

.modal-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px; border-bottom:1px solid var(--border);
}
.modal-body{
  /* top padding is important: without it the first field label sticks to the header divider */
  padding:14px 16px 14px 16px;
  max-height:min(70vh, 640px);
  overflow:auto;
  display:grid;
  gap:12px;
}
.modal-foot{
  padding:12px 16px; border-top:1px solid var(--border);
  display:flex; justify-content:flex-end; gap:8px;
}


/* Panely */
.content{ padding: 16px; }
.panel{
  background:var(--panel); border:1px solid var(--border);
  border-radius:16px; margin:16px 0; overflow:hidden;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.panel-header{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px; border-bottom:1px solid var(--border);
}
.panel-header h2{ margin:0; font-size:16px; }
.panel-actions{ display:flex; align-items:center; gap:6px; }
.panel-body{ overflow-x:hidden; padding:14px; }
.panel.collapsed .panel-body{ overflow-x:hidden; display:none; }

/* Formuláře */
.grid-form{
  display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:12px;
}
.field{ display:flex; flex-direction:column; gap:6px; }
.field-row{ flex-direction:row; align-items:center; gap:8px; }
input, select{
  width:100%; border:1px solid var(--border); background:#fff; color:var(--text);
  padding:10px 12px; border-radius:10px; outline:none;
}
input:focus, select:focus{ border-color:#bbb; box-shadow:0 0 0 3px rgba(0,0,0,.04); }

/* Tabulka */
.table{ width:100%; border:1px solid var(--border); border-radius:10px; overflow:hidden; }
.table-row{ display:grid; grid-template-columns: 2fr 1.2fr 1fr 1fr; border-top:1px solid var(--border); }
.table-row:first-child{ border-top:none; }
.table-head{ background:var(--bg); font-weight:600; }
.table-row > div{ padding:10px 12px; display:flex; align-items:center; }
.row-actions{ display:flex; gap:6px; justify-content:flex-end; }

/* Grafy */
.chart-card{min-width:0;}
.chart-card canvas{display:block; width:100%; max-width:100%; height:300px;}

.charts{ min-width:0; display:grid; grid-template-columns: 1fr 1fr; gap:16px; }
.chart-card{
  background:#fff; border:1px solid var(--border); border-radius:12px; padding:12px;
}
.legend{ display:flex; gap:8px; flex-wrap:wrap; }
.legend-item{
  display:flex; align-items:center; gap:8px; border:1px solid var(--border);
  background:#fff; border-radius:999px; padding:6px 10px; cursor:pointer;
}
.legend-item.off{ opacity:.5; }
.legend-item .swatch{ width:14px; height:14px; border-radius:3px; display:inline-block; border:1px solid #0001; }

/* Patička */
.footer{ text-align:center; color:var(--muted); padding:20px 0; }

/* Mobilní a malé obrazovky */
@media (max-width: 980px){
  .sidebar{
    transform: translateX(-100%); transition: transform .2s ease;
    position:fixed; width:260px; box-shadow: 0 10px 30px rgba(0,0,0,.15);
    z-index:2000; /* above topbar */
  }
  .sidebar.open{ transform: translateX(0); }
  .content{ margin-left:0; }
  .grid-form{ grid-template-columns: 1fr 1fr; }
  .charts{ min-width:0; grid-template-columns: 1fr; }
  .table-row{ grid-template-columns: 1.5fr 1fr 0.8fr 1fr; }
  .user-email{ display:none; } /* šetří místo na menších zařízeních */
}

@media (max-width: 560px){
  .grid-form{ grid-template-columns: 1fr; }
}
/* === Collapse button matches icon-btn style and rotates chevron === */
.collapse-btn .icon{ transition: transform .18s ease; }
.collapse-btn[aria-expanded="false"] .icon{ transform: rotate(180deg); }


/* Skrýt název značky na mobilech */
@media (max-width: 980px){
  .brand{ display:inline-flex; align-items:center; justify-content:center; }
  .brand .brand-text{ display:none; }
  .brand .brand-home-icon{ display:inline-flex; }
}

/* --- demo utilities (added) --- */
.muted{ color: var(--text-muted); }
.small{ font-size: 12px; }
.container{ max-width: 980px; margin: 0 auto; padding: 18px; padding-top: calc(18px + 56px); }
.card{ background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: 0 10px 25px rgba(0,0,0,.06); }


/* === User dropdown menu === */
.user-menu{
  position:absolute;
  top: calc(100% + 8px);
  right:0;
  min-width:180px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.10);
  padding:6px;
  z-index:3000; /* nad sidebar (900) i subbar (800/900) */
}
.user-controls{ position:relative; }
.user-dd{ position:relative; display:inline-flex; align-items:center; }
.user-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid var(--border);
  border-radius:999px;
  background:#fff;
  padding:6px 12px;
  font-weight:600;
}
.user-btn:hover{ filter:brightness(0.98); }

.user-btn .chev{ display:none; } /* už nechceme šipku vedle jména */
.user-btn .user-email{
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  font-weight:inherit;
}
.menu-divider{ height:1px; background:var(--border); margin:6px 4px; }
.menu-label{ padding:8px 10px; color:var(--muted); font-size:12px; }
.menu-item{
  width:100%;
  text-align:left;
  background:transparent;
  border:0;
  padding:10px 10px;
  border-radius:12px;
  cursor:pointer;
  color:var(--text);
  font: inherit;
  display:block;
  text-decoration:none;
}
.menu-item:hover{ background: rgba(0,0,0,.05); }
.menu-item.danger{ color:#ef4444; }


/* === Pills & helpers === */
.pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.03);
  font-size:12px;
  color:var(--text);
}
.pill.ok{ border-color:#c7f0d1; background:#eaffef; }
.pill.danger{ border-color:#ffd0d0; background:#fff1f1; }
.pill.warn{ border-color:#ffe59b; background:#fff7d1; }

.error{
  color:#b00020;
  background:#fff1f1;
  border:1px solid #ffd0d0;
  padding:10px 12px;
  border-radius:12px;
}

.table-wrap{ overflow:auto; border:1px solid var(--border); border-radius:16px; }
.table{ width:100%; border-collapse:collapse; }
.table th, .table td{ padding:12px 12px; border-bottom:1px solid var(--border); vertical-align:top; }
.table thead th{ background: rgba(0,0,0,.03); font-weight:700; text-align:left; }

@media (max-width: 520px){
  .actions-dd{ position: relative; }

  .actions-dd .dd-menu{
    left: 0 !important;
    right: auto !important;
    transform: translateX(56px);
    min-width: 180px;
    width: min(220px, calc(100vw - 24px - 56px));
    max-width: calc(100vw - 24px - 56px);
  }
}

/* === Shared UI primitives for Rocni plan + Fintillend plan (unified) === */

/* Make it easy to opt into sticky topbar (some pages use fixed topbar as default) */
.topbar.topbar-sticky{ position:sticky; top:0; }

/* Layout helper for pages that already place header in normal flow (sticky topbar) */
.layout.layout-top0{ margin-top:0; }

/* Subbar under topbar (used by Roční plán + Fintillend plán) */
.subbar{
  position:sticky; top:56px; z-index:900;
  background:rgba(255,255,255,.90);
  backdrop-filter:saturate(180%) blur(10px);
  border-bottom:1px solid var(--border);
  padding:10px 12px;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  flex-wrap:wrap;
}
.subbar .left{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.subbar .right{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.subbar-row{ display:flex; align-items:flex-end; gap:10px; flex-wrap:wrap; width:100%; }
.subbar-row h1{ margin:0; font-size:18px; margin-right:6px; }

/* Compact form control in toolbars/subbars */
.control{ display:flex; flex-direction:column; gap:4px; min-width:120px; }
.control > label{ font-size:12px; color:var(--muted); font-weight:600; }
.control.inline{ flex-direction:row; align-items:center; gap:8px; }
.control.inline > label{ margin:0; }
.control input, .control select{
  height:36px; padding:0 10px;
  border:1px solid var(--border); border-radius:10px;
  background:#fff; color:var(--text);
}
.year-big{ min-width:130px; font-size:18px; font-weight:700; }

/* Dropdown: "Akce" */
.actions-dd{ position:relative; }
.actions-dd > .btn{
  height:34px; padding:0 10px;
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
}
.dd-menu{
  position:absolute;
  top: calc(100% + 6px);
  left:0;
  min-width: 200px;
  padding:8px;
  border:1px solid var(--border);
  background:#fff;
  border-radius:14px;
  box-shadow:0 18px 50px rgba(0,0,0,.18);
  display:none;
  z-index: 2000;
}
.dd-menu.open{ display:grid; gap:8px; }
.dd-menu .btn{ width:100%; justify-content:center; }
@media (max-width: 640px){
  .dd-menu{ left:auto; right:0; }
}

/* Content column inside sidebar layout */
.page-inner{ padding: 8px 12px 12px; max-width: 1100px; margin: 0 auto; }

/* Collapsible blocks (boxes) */
.block{
  border:1px solid var(--border);
  background:var(--panel);
  border-radius:16px;
  overflow:hidden;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.block-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  border-bottom:1px solid var(--border);
  gap:10px;
  flex-wrap:wrap;
}
.block-title{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  flex: 1 1 auto;
}
.block-title b{
  font-size:15px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.block-actions{ display:flex; gap:8px; align-items:center; }
.block-body{ padding:12px 14px; }
.block.collapsed .block-body{ display:none; }
.block.collapsed .block-head{ border-bottom:0; }

/* Chevron button used in collapsible headers */
.chev{ width:36px; height:36px; border-radius:10px; }

/* Sums pills in block headers */
.block-sums{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
  flex: 1 1 auto;
}
.sum-pill{
  border:1px solid var(--border);
  background:#fff;
  border-radius:999px;
  padding:6px 10px;
  font-weight:700;
  font-variant-numeric: tabular-nums;
  white-space:nowrap;
  font-size:13px;
}
.sum-pill.muted{ color:var(--muted); font-weight:600; }
@media (max-width: 520px){
  .block-sums{ width:100%; justify-content:stretch; }
  .sum-pill{ width:100%; flex:1 1 100%; text-align:center; }
}

/* Mobile-friendly "cards list" */
.entries{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:10px;
}
@media (max-width: 1000px){ .entries{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px){ .entries{ grid-template-columns:1fr; } }

.ecard{
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
  padding:10px;
  display:grid;
  gap:8px;
}
.ecard-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.ecard-title{ font-weight:700; }
.ecard-meta{
  display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap;
  font-size:13px; color:var(--muted);
}
.amt{ font-weight:800; color:var(--text); font-variant-numeric:tabular-nums; }
.ecard-actions{ display:flex; gap:6px; justify-content:flex-end; }
.etag{
  font-size:12px; color:var(--muted);
  border:1px solid var(--border);
  border-radius:999px; padding:2px 8px;
  display:inline-flex; align-items:center; gap:6px;
  white-space:nowrap;
}
.btn.icon{ width:36px; height:36px; padding:0; display:grid; place-items:center; }
.btn.icon svg{ width:18px; height:18px; display:block; }
@media (max-width: 520px){
  .btn.icon{ width:40px; height:40px; }
  .btn.icon svg{ width:20px; height:20px; }
}

/* Drag & drop ordering helpers */
.ecard[draggable="true"], .gcard[draggable="true"]{ cursor:grab; }
.drag-handle{ cursor:grab; user-select:none; }
.dragging{ opacity:.55; cursor:grabbing !important; }
.entries, .groups{ position:relative; }
.drop-placeholder{ border:0; background:transparent; border-radius:14px; }
.drop-indicator{
  position:absolute;
  top:0; left:0;
  height:0;
  border-left:4px dashed rgba(59,130,246,.85);
  pointer-events:none;
  z-index:50;
}

/* Groups list (used by Roční plán) */
.groups{ display:grid; grid-template-columns: 1fr 1fr; gap:10px; }
@media (max-width: 640px){ .groups{ grid-template-columns:1fr; } }
.gcard{
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
  padding:10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.gleft{ display:flex; align-items:center; gap:10px; min-width:0; }
.gname{ font-weight:700; }
.gmeta{ color:var(--muted); font-size:13px; }
.swatch{ width:14px; height:14px; border-radius:4px; border:1px solid var(--border); background:#fff; }
.gactions{ display:flex; gap:6px; justify-content:flex-end; align-items:center; }

/* Chart blocks */
.chart-wrap{ height:280px; position:relative; }
canvas{ image-rendering: crisp-edges; }
/* Chart.js canvas sizing */
.chart-wrap canvas{ width:100% !important; height:100% !important; }

/* Action tooltip shown on the chart (Fintillend plán) */
.chart-action-tooltip{
  position:absolute;
  min-width: 180px;
  max-width: 260px;
  transform: translate(-50%, -100%);
  padding: 10px 12px;
  border: 1px solid rgba(148,163,184,.55);
  border-radius: 14px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 10px 30px rgba(15,23,42,.12);
  color: var(--text);
  z-index: 5;
  pointer-events: none;
}
.chart-action-tooltip::after{
  content:"";
  position:absolute;
  left: 50%;
  bottom: -8px;
  width: 14px;
  height: 14px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(255,255,255,.95);
  border-right: 1px solid rgba(148,163,184,.55);
  border-bottom: 1px solid rgba(148,163,184,.55);
}
.chart-action-tooltip .cat{ font-weight: 800; }

/* Settings box (header-like box above blocks) */
.settings-box{
  background:var(--card, var(--bg));
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px 12px 10px;
  margin:14px 0 14px;
  box-shadow:0 6px 18px rgba(16,24,40,.06);
}
.settings-box-title{
  font-weight:800;
  font-size:13px;
  color:var(--muted);
  margin:0 0 8px;
  letter-spacing:.2px;
  text-transform:uppercase;
}
.settings-box-row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:flex-end;
}
.settings-box .control{ margin:0; }
.settings-box-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.settings-box-title-left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  flex:1 1 auto;
}
.settings-box-title-left > span{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.settings-box-kpis{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.kpi-pill{
  border:1px solid var(--border);
  background:#fff;
  border-radius:999px;
  padding:6px 10px;
  font-weight:800;
  font-variant-numeric: tabular-nums;
  white-space:nowrap;
  font-size:13px;
}
.kpi-pill.pos{ background:#ecfdf5; border-color:#a7f3d0; color:#065f46; }
.kpi-pill.neg{ background:#fef2f2; border-color:#fecaca; color:#991b1b; }
.kpi-pill.neutral{ color:var(--muted); font-weight:700; }
@media (max-width: 520px){
  .settings-box-head{ align-items:flex-start; }
  .settings-box-title-left{ flex: 1 1 100%; }
  .settings-box-kpis{
    width:100%;
    display:grid;
    grid-template-columns: 1fr;
    gap:8px;
    justify-content:stretch;
  }
  .kpi-pill{ width:100%; text-align:center; }
}

/* KPI select pill (used in Fintillend plán) */
.kpi-label{ font-size:12px; color:var(--muted); font-weight:800; margin-right:6px; }
.kpi-select{ display:inline-flex; align-items:center; gap:6px; }
.kpi-select select{
  border:0;
  background:transparent;
  font:inherit;
  font-weight:900;
  padding:0 0 0 4px;
  outline:none;
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
}
.kpi-select select::-ms-expand{ display:none; }

/* Disabled states */
.disabled-soft{ opacity:.55; pointer-events:none; }

/* Topbar link behavior (avoid default purple/underline) */
.topbar a.brand,
.topbar a.logo-btn,
.topbar a.logo-only{
  color: inherit;
  text-decoration: none;
}
.topbar a.brand:visited,
.topbar a.brand:hover,
.topbar a.brand:active{
  color: inherit;
  text-decoration: none;
}

/* Centered page title in topbar (optional) */
.topbar-center{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  font-weight:800;
  font-size:16px;
  letter-spacing:.2px;
  color:var(--text);
  pointer-events:none;
  max-width:60%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  text-align:center;
}
@media (max-width: 520px){
  .topbar-center{ max-width:48%; font-size:15px; }
}

/* Mobile sidebar overlay behaviour (shared) */
@media (max-width: 980px){
  .sidebar{ transform:translateX(-100%); transition:transform .2s ease; }
  .sidebar.open{ transform:translateX(0); }
  .content{ margin-left:0; }
  .subbar{ margin-left:0 !important; width:100% !important; }
}


/* Helpers / small bits used across plans */
.hint{ color:var(--muted); font-size:13px; line-height:1.35; }

/* Simple inline notice / warning banner */
.notice{
  border:1px solid var(--border);
  background:var(--card);
  border-radius:14px;
  padding:10px 12px;
  font-size:13px;
  line-height:1.35;
  margin:10px 12px 0;
}
.notice.danger{
  border-color:#fecaca;
  background:#fff1f1;
  color:#7f1d1d;
}
.notice b{ font-weight:900; }
.placeholder{ color:var(--muted); font-size:13px; }

/* Simple grid wrapper */
.grid{ display:grid; grid-template-columns: 1fr; gap:12px; }
@media (max-width: 860px){ .grid{ grid-template-columns:1fr; } }

/* Add row helper */
.add-row{ display:flex; justify-content:flex-end; margin-top:10px; }

/* Icon-only add buttons (big +) */
.btn.btn-add{
  width:34px;
  height:34px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  font-weight:900;
  line-height:1;
  border-radius:10px;
}
.btn.btn-add.inline{ margin-right:10px; }
@media (max-width: 520px){
  .btn.btn-add{ width:38px; height:38px; font-size:24px; }
}

/* Allocation custom grid (annual plan) */
.alloc-custom{ display:grid; grid-template-columns: repeat(4, 1fr); gap:8px; }
@media (max-width: 640px){ .alloc-custom{ grid-template-columns: repeat(3, 1fr);} }
.alloc-custom input{ height:36px; text-align:right; font-variant-numeric:tabular-nums; }

/* Info button + help dialog */
.info-btn{
  width:36px; height:36px;
  border-radius:999px;
  font-weight:900;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}
.info-body{ display:grid; gap:10px; }
.info-body p{ margin:0; }
.info-body ul{ margin:0; padding-left:18px; }
.info-body li{ margin:4px 0; }

.section-icon{
  width:30px;
  height:30px;
  display:inline-block;
  margin-right:8px;
  vertical-align:middle;
}

/* Dialog aliases (some pages used modal-header/body/footer naming) */
dialog.modal{ /* keep compatibility */ }
.modal-header{ display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid var(--border); }
/* NOTE: .modal-body is shared across pages (Roční plán + Fintillend plán). Keep it roomy. */
.modal-body{ padding:14px 16px 14px 16px; display:grid; gap:12px; max-height:min(70vh, 640px); overflow:auto; }
.modal-footer{ padding:12px 16px; border-top:1px solid var(--border); display:flex; justify-content:flex-end; gap:8px; }

/* Confirm modal helpers */
dialog.confirm-modal{ width:min(520px,92vw); max-width:min(520px,92vw); }

/* Alert modal helpers */
dialog.alert-modal{ width:min(520px,92vw); max-width:min(520px,92vw); }

/* Common small "one-input" modal (Roční plán + Fintillend plán) */
dialog#planNameModal{ width:min(560px,92vw); max-width:min(560px,92vw); }
.confirm-message{ margin:0; line-height:1.45; white-space:pre-line; }
.icon-close{
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid var(--border);
  background:transparent;
  color:var(--text);
  display:grid;
  place-items:center;
  cursor:pointer;
}
.icon-close:hover{ background: rgba(148,163,184,.10); }

/* Panel title helpers (Fintillend plan) */
.panel-title{ display:flex; align-items:center; gap:10px; min-width:0; }
.panel-title span{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.panel.soft{ background:var(--bg); }

.form-grid{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
@media (max-width: 640px){ .form-grid{ grid-template-columns:1fr; } }

/* Legacy helpers used inside some Fintillend modals */
.grid2{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
@media (max-width: 640px){ .grid2{ grid-template-columns:1fr; } }
.mt12{ margin-top:12px; }
.label{ font-size:12px; color:var(--muted); font-weight:700; }

/* === Chips (used in Fintillend tracking modals) === */
.chips{ display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
.chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid var(--border);
  background:#fff;
  border-radius:999px;
  padding:6px 10px;
}
.chip button{
  padding:0 6px;
  border-radius:999px;
  border:1px solid var(--border);
  background:transparent;
  height:22px;
  cursor:pointer;
}

/* === Chart legend list (clickable) === */
.legend-list{ display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.legend-item{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border:1px solid var(--border);
  border-radius:999px;
  background:#fff;
  cursor:pointer;
  user-select:none;
}
.legend-item[aria-pressed="false"]{ opacity:.45; }
.legend-swatch{ width:12px; height:12px; border-radius:3px; border:1px solid var(--border); background:#000; }
.legend-item b{ font-size:13px; }

/* === Small cards list in Tracking === */
.track-cards{ display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:10px; }
@media (max-width: 740px){ .track-cards{ grid-template-columns:1fr; } }
.track-card{ border:1px solid var(--border); border-radius:16px; background:#fff; padding:12px; display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.track-card .meta{ display:grid; gap:4px; min-width:0; }
.track-card .meta .name{ font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.track-card .meta .sub{ color:var(--muted); font-size:13px; }
.track-card .meta .sum{ font-weight:800; font-variant-numeric: tabular-nums; }


/* --- Fintillend chart settings (range slider + save) --- */
.chart-settings{ display:flex; flex-direction:column; gap:10px; margin-bottom:12px; padding:10px; border:1px solid var(--line); border-radius:14px; background:rgba(127,127,127,.06); }
.chart-settings-row{ display:flex; gap:12px; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; }
.chart-range{ flex:1 1 280px; min-width:240px; }
.chart-range-head{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-bottom:8px; }
.chart-range-sliders{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.range-col{ display:flex; flex-direction:column; gap:4px; }
.mini-label{ font-size:12px; color:var(--muted); }
.chart-settings input[type="range"]{ width:100%; }
.hint{ font-size:13px; color:var(--muted); }
.muted{ color:var(--muted); font-size:13px; }
@media (max-width: 520px){
  .chart-range-sliders{ grid-template-columns:1fr; }
  .chart-settings-row{ align-items:stretch; }
  .chart-settings-row > button{ width:100%; }
}


/* --- Info dialog content (Fintillend plán) --- */
#infoDialog #infoBody{ color:var(--text); font-size:14px; line-height:1.45; }
#infoDialog #infoBody p{ margin:0 0 8px 0; }
#infoDialog #infoBody ul{ margin:0 0 8px 18px; padding:0; }
#infoDialog #infoBody li{ margin:4px 0; }


/* === Workspace/account switchers === */
.topbar-right{ gap:12px; }
.topbar-stack{ display:flex; flex-direction:column; align-items:flex-end; gap:6px; }
.switcher-row{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.switcher-inline{ display:flex; align-items:center; gap:8px; }
.switcher-inline label{ font-size:12px; color:var(--muted); }
.switcher-select{ min-width:170px; max-width:220px; height:36px; border:1px solid var(--border); background:#fff; border-radius:10px; padding:0 10px; }
.settings-layout{ max-width:1200px; margin:72px auto 32px; padding:0 16px; }
.settings-grid{ display:grid; grid-template-columns: 1.1fr 1.2fr; gap:16px; }
.settings-card{ background:#fff; border:1px solid var(--border); border-radius:16px; padding:16px; }
.settings-card h2{ margin:0 0 12px; font-size:18px; }
.settings-list{ display:grid; gap:10px; }
.settings-item{ border:1px solid var(--border); border-radius:14px; padding:12px; background:#fff; }
.settings-item-head{ display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.settings-item-meta{ display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.settings-actions{ display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
.settings-form{ display:grid; gap:10px; }
.settings-form.inline-2{ grid-template-columns: 1fr 1fr; }
.settings-note{ color:var(--muted); font-size:13px; }
@media (max-width: 980px){
  .topbar-stack{ align-items:stretch; }
  .switcher-row{ justify-content:flex-end; }
  .switcher-select{ min-width:140px; max-width:160px; }
  .settings-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 640px){
  .topbar{ height:auto; min-height:56px; padding:8px 12px; align-items:flex-start; }
  .layout{ margin-top:72px; }
  .switcher-row{ width:100%; justify-content:flex-end; }
  .switcher-inline label{ display:none; }
  .switcher-select{ min-width:120px; max-width:140px; }
}


/* === Compact topbar switchers (user avatar + account avatar) === */
.compact-topbar-stack{ align-items:flex-end; }
.compact-switcher-row{ gap:10px; }
.user-avatar-btn,
.account-btn{
  width:40px;
  height:40px;
  min-width:40px;
  padding:0;
  border-radius:999px;
  justify-content:center;
  position:relative;
}
.user-avatar-btn{ color:#374151; }
.user-avatar-icon,
.account-avatar{
  width:100%;
  height:100%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  font-weight:800;
}
.user-avatar-icon svg{ width:20px; height:20px; display:block; }
.account-avatar{
  font-size:13px;
  letter-spacing:.04em;
}
.account-dd{ position:relative; display:inline-flex; align-items:center; }
.switcher-select-native{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}
.menu-section{ display:grid; gap:6px; padding:2px 10px 10px; }
.menu-section-label{ font-size:12px; font-weight:700; color:var(--muted); }
.menu-select{
  width:100%;
  height:36px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  border-radius:10px;
  padding:0 10px;
}
.account-menu{ min-width:220px; }
.account-menu-item{
  display:flex;
  align-items:center;
  gap:10px;
}
.account-menu-item.active{
  background: rgba(0,0,0,.05);
  font-weight:700;
}
.account-menu-avatar{
  width:28px;
  height:28px;
  border:1px solid var(--border);
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:800;
  flex:0 0 28px;
}
.account-menu-text{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
@media (max-width: 700px){
  .compact-switcher-row{ gap:8px; }
  .user-avatar-btn,
  .account-btn{ width:38px; height:38px; min-width:38px; }
  .account-menu{ right:0; left:auto; min-width:200px; }
}


/* === Mobile floating button: Denní zápis === */
.mobile-daily-fab{
  position:fixed;
  right:16px;
  bottom:16px;
  min-width:58px;
  height:58px;
  width:auto;
  max-width:calc(100vw - 32px);
  border-radius:999px;
  border:0;
  background:var(--primary);
  color:var(--primary-ink);
  box-shadow:0 14px 28px rgba(15,23,42,.18), 0 4px 10px rgba(15,23,42,.10);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 18px;
  font-weight:900;
  font-size:15px;
  text-decoration:none;
  z-index:1700;
  transition:transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.mobile-daily-fab:hover{
  transform:translateY(-2px);
  box-shadow:0 18px 34px rgba(15,23,42,.22), 0 6px 14px rgba(15,23,42,.12);
  filter:brightness(.99);
}
.mobile-daily-fab:active{
  transform:translateY(1px) scale(.97);
}
.mobile-daily-fab:focus-visible{
  outline:3px solid rgba(250,210,0,.42);
  outline-offset:3px;
}
.mobile-daily-fab svg{
  width:24px;
  height:24px;
  display:block;
}
.mobile-daily-fab-label{ white-space:nowrap; }
@media (max-width: 520px){
  .mobile-daily-fab{ right:12px; bottom:12px; height:54px; min-width:54px; padding:0 14px; }
  .mobile-daily-fab-label{ font-size:14px; }
}


/* === Quick expense launcher shared across pages === */
.quick-expense-grid{ display:grid; gap:16px; }
.quick-expense-section{ display:grid; gap:10px; }
.quick-expense-section h4{ margin:0; font-size:15px; }
.quick-expense-list{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:10px; }
.quick-expense-btn{
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px;
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-weight:900;
  text-align:left;
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease, filter .15s ease;
}
.quick-expense-btn.monthly{ background:var(--primary); border-color:var(--primary); color:var(--primary-ink); }
.quick-expense-btn.extra{ background:var(--secondary); border-color:var(--secondary); color:var(--secondary-ink); }
.quick-expense-btn:hover{ border-color:rgba(0,0,0,.14); box-shadow:0 8px 18px rgba(2,12,27,.08); transform:translateY(-1px); filter:brightness(.985); }
.quick-expense-btn:active{ transform:translateY(0) scale(.99); }
.quick-expense-btn .arrow{ color:currentColor; opacity:.7; font-weight:900; }
.quick-expense-error{ border:1px solid #fecaca; background:#fff8f8; color:#7f1d1d; border-radius:14px; padding:12px; font-size:13px; }
@media (max-width: 900px){ .quick-expense-list{ grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (max-width: 520px){ .quick-expense-list{ grid-template-columns:1fr; } }


/* === Quick expense modal header account picker === */
.quick-expense-head-actions{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
  min-width:0;
  min-height:40px;
}
.quick-expense-account-label{
  flex:0 0 auto;
  font-size:13px;
  font-weight:900;
  line-height:40px;
  color:var(--muted);
}
.quick-expense-account-select{
  width:auto;
  min-width:190px;
  max-width:min(320px, 40vw);
  height:40px;
  min-height:40px;
  line-height:40px;
  border:1px solid var(--border);
  border-radius:999px;
  padding:0 38px 0 14px;
  font-size:14px;
  font-weight:700;
  background:#f8fafc;
  color:var(--text);
  overflow:visible;
  text-overflow:ellipsis;
  vertical-align:middle;
}
.quick-expense-account-select:focus{
  border-color:#d1d5db;
  box-shadow:0 0 0 3px rgba(250,210,0,.22);
  outline:none;
}
@media (max-width: 560px){
  .modal-head.quick-expense-modal-head{
    align-items:stretch;
    flex-direction:column;
    gap:10px;
  }
  .quick-expense-head-actions{
    width:100%;
    margin-left:0;
  }
  .quick-expense-account-select{
    width:100%;
    max-width:none;
    min-width:0;
  }
}


/* === i18n / language switcher === */
.language-dd{
  position:relative;
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
}
.language-btn{
  height:38px;
  min-width:58px;
  border:1px solid var(--border);
  border-radius:999px;
  background:#fff;
  color:var(--text);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:4px 8px 4px 5px;
  cursor:pointer;
}
.language-btn:hover{ background:#fafafa; }
.language-btn:focus-visible{
  outline:3px solid rgba(250,210,0,.42);
  outline-offset:2px;
}
.language-flag{
  width:30px;
  height:30px;
  border-radius:50%;
  display:block;
  object-fit:cover;
  box-shadow:0 0 0 1px rgba(0,0,0,.08), 0 2px 7px rgba(15,23,42,.12);
  background:#fff;
  flex:0 0 auto;
}
.language-chevron{
  font-size:12px;
  line-height:1;
  color:var(--muted);
  transform:translateY(-1px);
}
.language-btn[aria-expanded="true"] .language-chevron{ transform:translateY(-1px) rotate(180deg); }
.language-menu{
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  min-width:178px;
  padding:8px;
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
  box-shadow:0 16px 34px rgba(15,23,42,.16);
  z-index:2600;
}
.language-menu::before{
  content:"";
  position:absolute;
  top:-7px;
  right:22px;
  width:12px;
  height:12px;
  transform:rotate(45deg);
  background:#fff;
  border-left:1px solid var(--border);
  border-top:1px solid var(--border);
}
.language-menu-item{
  width:100%;
  border:0;
  background:transparent;
  color:var(--text);
  display:grid;
  grid-template-columns:30px 1fr auto;
  align-items:center;
  gap:10px;
  padding:9px 10px;
  border-radius:12px;
  font:inherit;
  font-weight:700;
  text-align:left;
  cursor:pointer;
}
.language-menu-item:hover{ background:#f8fafc; }
.language-menu-item.active{
  background:#fff8d8;
  color:var(--primary-ink);
}
.language-menu-item .language-check{
  visibility:hidden;
  color:#b59400;
  font-weight:900;
}
.language-menu-item.active .language-check{ visibility:visible; }
@media (max-width: 640px){
  .language-btn{ height:36px; min-width:52px; padding:3px 7px 3px 4px; }
  .language-flag{ width:28px; height:28px; }
  .language-menu{ right:-6px; min-width:166px; }
}

/* === Language picker inside user menu === */
.user-menu .language-menu-section{
  padding-bottom:6px;
}
.language-select-dd{
  position:relative;
  width:100%;
}
.language-select-btn{
  width:100%;
  min-height:42px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
  color:var(--text);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:6px 10px;
  cursor:pointer;
  font:inherit;
  font-weight:700;
}
.language-select-btn:hover{ background:#fafafa; }
.language-select-btn:focus-visible{
  outline:3px solid rgba(250,210,0,.42);
  outline-offset:2px;
}
.language-selected-main{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.language-selected-label{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.language-select-btn[aria-expanded="true"] .language-chevron{ transform:translateY(-1px) rotate(180deg); }
.user-menu .language-menu-in-user{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  right:0;
  min-width:0;
  width:100%;
  padding:6px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
  box-shadow:0 14px 28px rgba(15,23,42,.14);
  z-index:2700;
}
.user-menu .language-menu-in-user[hidden]{ display:none; }
.user-menu .language-menu-in-user::before{ display:none; }
.user-menu .language-menu-in-user .language-menu-item{
  grid-template-columns:30px 1fr auto;
  padding:8px 10px;
  border-radius:12px;
}
.user-menu .language-menu-in-user .language-flag,
.language-select-btn .language-flag{
  width:28px;
  height:28px;
}


/* === Shared action buttons (edit / delete / remove) === */
.action-btn{
  width:36px;
  height:36px;
  min-width:36px;
  padding:0;
  display:grid;
  place-items:center;
  line-height:1;
}
.action-btn .action-icon,
.btn.icon .action-icon{
  width:18px;
  height:18px;
  display:block;
}
@media (max-width: 640px){
  .action-btn{ width:40px; height:40px; min-width:40px; }
  .action-btn .action-icon,
  .btn.icon .action-icon{ width:20px; height:20px; }
}


/* === Shared UI components helpers === */
.action-btn.danger-icon{ color:#b91c1c; }
.action-btn.danger-icon:hover{ background:#fff1f1; border-color:#fecaca; }
.ui-toast-host{
  position:fixed;
  right:16px;
  bottom:16px;
  z-index:5000;
  display:grid;
  gap:8px;
  max-width:min(360px, calc(100vw - 32px));
  pointer-events:none;
}
.ui-toast{
  opacity:0;
  transform:translateY(8px);
  transition:opacity .16s ease, transform .16s ease;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
  color:var(--text);
  box-shadow:0 12px 30px rgba(15,23,42,.12);
  padding:10px 12px;
  font-weight:700;
  pointer-events:auto;
}
.ui-toast.is-visible{ opacity:1; transform:translateY(0); }
.ui-toast.error{ border-color:#fecaca; color:#991b1b; background:#fff8f8; }
.ui-toast.success{ border-color:#bbf7d0; color:#166534; background:#f0fdf4; }
.ui-confirm-dialog .modal-body{ min-width:min(420px, calc(100vw - 48px)); }
.ui-hidden{ display:none !important; }
.ui-row-actions{ display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }


/* === First annual plan onboarding === */
.sidebar{ display:flex; flex-direction:column; }
.sidebar .nav{ min-height:100%; flex:1 1 auto; }
.nav-onboarding-spacer{ flex:1 1 auto; min-height:18px; }
.nav-item.onboarding-helper{
  margin-top:auto;
  border:1px dashed #f0d56b;
  background:#fff9df;
  color:#6b5a00;
  font-weight:800;
}
.nav-item.onboarding-helper:hover{ background:#fff3c4; }
.onboarding-dialog{ width:min(920px, 94vw); max-width:min(920px,94vw); }
.onboarding-dialog .modal-head{ padding:18px 24px; }
.onboarding-dialog .modal-body{ padding:22px 24px; max-height:min(72vh, 660px); }
.onboarding-modal-foot{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  padding:16px 24px;
  border-top:1px solid var(--border);
  background:#fff;
  min-height:72px;
}
.onboarding-footer-actions{ display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-wrap:wrap; }
.onboarding-footer-progress{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%, -50%);
  display:flex;
  justify-content:center;
  pointer-events:none;
}
.onboarding-hero{ display:grid; gap:10px; }
.onboarding-eyebrow{ display:inline-flex; align-items:center; gap:8px; width:max-content; padding:6px 10px; border-radius:999px; background:#fff9df; border:1px solid #f0d56b; color:#7a6500; font-size:12px; font-weight:900; letter-spacing:.02em; text-transform:uppercase; }
.onboarding-title{ margin:0; font-size:28px; line-height:1.12; }
.onboarding-text{ margin:0; color:var(--muted); max-width:860px; font-size:15px; }
.onboarding-steps{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; justify-content:center; }
.onboarding-step-dot{ width:10px; height:10px; border-radius:999px; background:#d1d5db; transition:width .16s ease, background .16s ease; }
.onboarding-step-dot.active{ width:28px; background:var(--primary); }
.onboarding-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 16px; }
.onboarding-grid.single{ grid-template-columns:1fr; }
.onboarding-choice-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.onboarding-choice{
  border:1px solid var(--border);
  border-radius:18px;
  padding:18px 20px;
  background:#fff;
  display:grid;
  grid-template-columns:minmax(0,1fr) 34px;
  gap:16px;
  align-items:center;
  cursor:pointer;
  min-height:128px;
  transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.onboarding-choice:hover{ border-color:#d6d6dc; box-shadow:0 10px 24px rgba(2,12,27,.06); }
.onboarding-choice:has(input:checked){ border-color:#f0d56b; background:#fffdf3; box-shadow:0 0 0 3px rgba(250,210,0,.16); }
.onboarding-choice-copy{ display:grid; gap:8px; }
.onboarding-choice strong{ display:block; font-size:17px; line-height:1.2; }
.onboarding-choice span span{ color:var(--muted); font-size:14px; line-height:1.35; }
.onboarding-choice input[type="radio"]{ width:30px; height:30px; margin:0; justify-self:end; accent-color:var(--primary); }
.onboarding-list{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
  align-items:stretch;
}
.onboarding-entry-card{
  border:1px solid var(--border);
  border-radius:18px;
  padding:14px;
  background:#fff;
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  align-content:start;
  align-items:stretch;
  min-height:168px;
}
.onboarding-entry-card:hover{ border-color:#d6d6dc; box-shadow:0 8px 20px rgba(2,12,27,.05); }
.onboarding-entry-fields,
.onboarding-entry-fields.three{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  align-items:stretch;
}
.onboarding-entry-fields .wide{ grid-column:auto; }
.onboarding-entry-card label{ font-size:12px; font-weight:800; color:var(--muted); display:grid; gap:6px; }
.onboarding-entry-card input,.onboarding-entry-card select{ width:100%; min-width:0; }
.onboarding-remove-btn{ align-self:end; justify-self:end; color:#111827; margin-top:auto; }
.onboarding-card-check{ position:absolute; top:12px; right:12px; align-self:auto; justify-self:auto; }
.onboarding-card-check input{ width:26px; height:26px; accent-color:var(--primary); }
.onboarding-entry-card.preset{ position:relative; padding-top:50px; grid-template-columns:1fr; align-items:stretch; }
@media (max-width:1180px){ .onboarding-list{ grid-template-columns:repeat(3, minmax(0, 1fr)); } }
@media (max-width:900px){ .onboarding-list{ grid-template-columns:repeat(2, minmax(0, 1fr)); } }
.onboarding-footer-note{ display:flex; align-items:center; gap:10px; color:var(--muted); font-size:13px; margin-top:4px; }
.onboarding-footer-note input{ width:16px; height:16px; }
.onboarding-summary{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.onboarding-summary-card{ border:1px solid var(--border); border-radius:16px; background:#fff; padding:12px; }
.onboarding-summary-card .lbl{ display:block; color:var(--muted); font-size:12px; font-weight:900; }
.onboarding-summary-card .val{ display:block; margin-top:4px; font-size:20px; font-weight:900; }
.onboarding-error{ display:none; border:1px solid #fecaca; background:#fff5f5; color:#a40000; padding:10px 12px; border-radius:12px; white-space:pre-line; }
.onboarding-error.is-visible{ display:block; }
@media (max-width:720px){
  .onboarding-dialog .modal-head{ padding:16px; }
  .onboarding-dialog .modal-body{ padding:16px; }
  .onboarding-modal-foot{ padding:14px 16px; align-items:flex-end; min-height:96px; }
  .onboarding-footer-progress{ top:18px; transform:translateX(-50%); }
  .onboarding-footer-actions{ width:100%; justify-content:flex-end; padding-top:26px; }
  .onboarding-grid,.onboarding-choice-grid,.onboarding-summary{ grid-template-columns:1fr; }
  .onboarding-choice{ min-height:auto; }
  .onboarding-list{ grid-template-columns:1fr; }
  .onboarding-entry-card,.onboarding-entry-card.preset{ grid-template-columns:1fr; align-items:stretch; min-height:0; }
  .onboarding-entry-fields,.onboarding-entry-fields.three{ grid-template-columns:1fr; }
  .onboarding-remove-btn{ justify-self:end; }
  .onboarding-card-check{ top:12px; right:12px; }
}


/* Onboarding v4 – trash icons inside cards */
.onboarding-remove-btn .action-icon{
  width:18px;
  height:18px;
  display:block;
}

/* Onboarding – extra expense category cards */
.onboarding-group-card{ position:relative; padding-top:18px; }
.onboarding-group-swatch{
  width:100%;
  height:10px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.08);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.32);
}
.onboarding-group-card input[type="color"]{
  height:42px;
  padding:3px 4px;
  cursor:pointer;
}

/* Onboarding v9 – mandatory extra expenses custom allocation */
.onboarding-eye-btn{
  align-self:end;
  justify-self:start;
  color:#111827;
}
.onboarding-custom-alloc{
  grid-column:1 / -1;
  border:1px dashed var(--border);
  border-radius:14px;
  background:#fafafa;
  padding:10px;
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:8px;
}
.onboarding-custom-alloc[hidden]{ display:none !important; }
.onboarding-custom-alloc label{
  display:grid;
  gap:4px;
  font-size:11px;
  font-weight:800;
  color:var(--muted);
}
.onboarding-invalid-field{
  border-color:#ef4444 !important;
  background:#fff5f5 !important;
  box-shadow:0 0 0 3px rgba(239,68,68,.10) !important;
}
.onboarding-entry-card input[readonly]{
  background:#f8fafc;
  color:#64748b;
}
@media (max-width:720px){
  .onboarding-custom-alloc{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}

/* Onboarding – vlastní rozložení v samostatném modálu */
.onboarding-custom-dialog{
  width:min(760px, 92vw);
  max-width:min(760px, 92vw);
}
.onboarding-custom-modal-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
  margin-top:12px;
}
.onboarding-custom-modal-grid label{
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
  padding:10px;
  display:grid;
  gap:6px;
}
.onboarding-custom-modal-grid span{
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}
.onboarding-custom-modal-grid input{
  width:100%;
}
@media (max-width: 760px){
  .onboarding-custom-modal-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px){
  .onboarding-custom-modal-grid{ grid-template-columns:1fr; }
}

/* Onboarding v12 – step title in modal header + orange explanation pill */
.onboarding-dialog #onbModalTitle{
  font-size:20px;
  font-weight:900;
  line-height:1.2;
}
.onboarding-dialog #onbContent > .onboarding-hero{
  margin-bottom:16px;
  padding:14px 16px;
  border-radius:999px;
  border:1px solid #fed7aa;
  background:linear-gradient(135deg,#fff7ed 0%,#ffedd5 100%);
  color:#7c2d12;
  box-shadow:0 8px 22px rgba(255,180,100,.12);
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.onboarding-dialog #onbContent > .onboarding-hero .onboarding-title{
  display:none;
}
.onboarding-dialog #onbContent > .onboarding-hero .onboarding-eyebrow{
  background:rgba(255,255,255,.62);
  border-color:rgba(154,52,18,.16);
  color:#7c2d12;
  flex:0 0 auto;
}
.onboarding-dialog #onbContent > .onboarding-hero .onboarding-text{
  color:#7c2d12;
  max-width:none;
  font-weight:700;
  font-size:14px;
  line-height:1.35;
}
.onboarding-dialog #onbContent > .onboarding-hero .onboarding-text + .onboarding-text::before{
  content:"•";
  margin-right:10px;
  color:#c2410c;
}
.onboarding-dialog #onbContent > .onboarding-hero .onboarding-footer-note{
  flex-basis:100%;
  color:#7c2d12;
  margin-top:2px;
}
.onboarding-eye-field{
  display:flex;
  align-items:flex-end;
  min-height:44px;
}
.onboarding-eye-field .onboarding-eye-btn{
  justify-self:start;
  align-self:end;
}
@media (max-width:720px){
  .onboarding-dialog #onbContent > .onboarding-hero{
    border-radius:20px;
    align-items:flex-start;
  }
  .onboarding-dialog #onbContent > .onboarding-hero .onboarding-text + .onboarding-text::before{
    content:"";
    margin-right:0;
  }
}

/* Onboarding – aktuální ladění textů, tlačítek a rozložení kroků */
.onboarding-dialog{
  width:min(1380px, 94vw);
  max-width:min(1380px, 94vw);
}
.onboarding-dialog .modal-body{
  max-height:min(78vh, 720px);
}
.onboarding-dialog #onbContent > .onboarding-hero{
  margin-bottom:24px;
  padding:22px 24px;
  border-radius:24px;
  border:1px solid #FAD200;
  background:linear-gradient(135deg,#fff9df 0%,#fff4c2 100%);
  color:#6b5a00;
  box-shadow:0 14px 34px rgba(250,210,0,.10);
  display:grid;
  gap:10px;
  align-items:start;
}
.onboarding-dialog #onbContent > .onboarding-hero.onboarding-welcome{
  border-color:transparent;
  background:transparent;
  box-shadow:none;
  padding:0;
}
.onboarding-dialog #onbContent > .onboarding-hero .onboarding-title{
  display:none;
}
.onboarding-dialog #onbContent > .onboarding-hero.onboarding-welcome .onboarding-title{
  display:block;
}
.onboarding-dialog #onbContent > .onboarding-hero .onboarding-text{
  color:#6b5a00;
  max-width:none;
  font-weight:800;
  font-size:15px;
  line-height:1.42;
}
.onboarding-dialog #onbContent > .onboarding-hero .onboarding-text + .onboarding-text::before{
  content:"";
  margin:0;
}
.onboarding-note{
  margin:0;
  color:#8a7a1f;
  font-style:italic;
  font-weight:500;
  font-size:14px;
  line-height:1.4;
}
.onboarding-note::before{
  content:"•";
  margin-right:10px;
  color:#b59a00;
  font-style:normal;
  font-weight:900;
}
.onboarding-add-btn{
  margin:0 0 24px 0;
  width:max-content;
}
.onboarding-add-btn + .onboarding-list{
  margin-top:0;
}
.onboarding-basic-grid .onboarding-basic-full{
  grid-column:1 / -1;
}
.onboarding-allocation-field{
  display:flex;
  align-items:end;
  gap:10px;
  min-width:0;
}
.onboarding-allocation-field label{
  flex:1 1 auto;
  min-width:0;
}
.onboarding-allocation-field .onboarding-eye-btn{
  flex:0 0 44px;
  width:44px;
  height:44px;
  background:var(--primary);
  border-color:var(--primary);
  color:var(--primary-ink);
}
.onboarding-allocation-field:not(.is-custom) .onboarding-eye-btn{
  display:none !important;
}
.onboarding-allocation-field.is-custom label{
  flex:1 1 calc(100% - 54px);
}
@media (max-width:720px){
  .onboarding-dialog{ width:min(96vw, 1380px); max-width:min(96vw, 1380px); }
  .onboarding-dialog #onbContent > .onboarding-hero{ border-radius:18px; padding:16px; }
}

/* Onboarding finish step */
.onboarding-finish-grid{
  margin-top:12px;
  grid-template-columns:repeat(2, minmax(0, 1fr));
}
.onboarding-tip-pills{
  margin-top:14px;
  display:grid;
  gap:10px;
}
.onboarding-tip-pill{
  border:1px solid #86efac;
  border-radius:999px;
  background:linear-gradient(135deg,#ecfdf3 0%,#dcfce7 100%);
  color:#14532d;
  padding:13px 18px;
  font-size:15px;
  font-weight:800;
  line-height:1.35;
  box-shadow:0 8px 18px rgba(22,101,52,.08);
}
@media (max-width: 720px){
  .onboarding-finish-grid{ grid-template-columns:1fr; }
  .onboarding-tip-pill{ border-radius:18px; }
}

/* === Fintillend helper hub + monthly guide === */
.fint-helper-hub{
  position:fixed;
  z-index:2600;
  background:#fff;
  border:1px solid #f0d56b;
  border-radius:22px;
  box-shadow:0 24px 70px rgba(17,24,39,.16);
  padding:12px;
}
.fint-helper-hub[hidden]{ display:none; }
.fint-helper-hub-backdrop{
  position:fixed;
  inset:0;
  z-index:2550;
  border:0;
  padding:0;
  margin:0;
  background:rgba(255,255,255,.72);
  backdrop-filter:saturate(150%) blur(3px);
  cursor:default;
}
.fint-helper-hub-backdrop[hidden]{ display:none; }
.fint-helper-hub-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:6px 6px 10px; }
.fint-helper-hub-head strong{ display:block; font-size:18px; line-height:1.15; }
.fint-helper-eyebrow{ display:inline-flex; width:max-content; padding:4px 8px; border-radius:999px; background:#fff9df; color:#7a6500; border:1px solid #f0d56b; font-size:11px; font-weight:900; text-transform:uppercase; letter-spacing:.03em; margin-bottom:5px; }
.fint-helper-card-grid{ display:grid; gap:8px; }
.fint-helper-card{
  width:100%;
  border:1px solid var(--border);
  background:#fff;
  border-radius:16px;
  padding:12px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  text-align:left;
  cursor:pointer;
  color:var(--text);
}
.fint-helper-card:hover{ background:#fff9df; border-color:#f0d56b; }
.fint-helper-card-icon{ width:34px; height:34px; display:grid; place-items:center; border-radius:12px; background:#fff9df; border:1px solid #f0d56b; }
.fint-helper-card-copy{ display:grid; gap:3px; min-width:0; }
.fint-helper-card-copy strong{ font-size:14px; line-height:1.15; }
.fint-helper-card-copy small{ color:var(--muted); font-size:12px; line-height:1.25; }
.fint-helper-arrow{ color:#7a6500; font-size:22px; font-weight:900; }
.fint-helper-badge{ display:inline-flex; margin-left:6px; padding:2px 7px; border-radius:999px; background:#f8fafc; border:1px solid var(--border); color:#64748b; font-size:10px; vertical-align:middle; }
.monthly-guide-rule,
.monthly-guide-fake-form{
  border:1px solid #f0d56b;
  background:#fff9df;
  border-radius:18px;
  padding:14px;
  display:grid;
  gap:10px;
}
.monthly-guide-rule strong{ display:block; font-size:14px; }
.monthly-guide-rule span,
.monthly-guide-fake-form p{ color:#6b5a00; }
.monthly-guide-info-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(300px,34%);
  gap:24px;
  align-items:start;
}
.monthly-guide-info-box{
  border:1px solid #FAD200;
  background:#fff9df;
  border-radius:24px;
  padding:24px 24px;
  color:#6b5a00;
  box-shadow:0 10px 28px rgba(250,210,0,.08);
}
.monthly-guide-info-text{ min-width:0; }
.monthly-guide-info-box p{
  margin:0;
  font-weight:800;
  line-height:1.55;
}
.monthly-guide-info-visual{
  margin:0;
  justify-self:end;
  align-self:start;
  width:min(100%,440px);
  height:250px;
  border:1px solid #FAD200;
  border-radius:24px;
  overflow:hidden;
  background:#fffdf0;
  box-shadow:0 10px 28px rgba(250,210,0,.10);
}
.monthly-guide-info-visual img{
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center center;
  background:#fffdf0;
}
.monthly-guide-action-row{
  display:grid;
  gap:10px;
  justify-items:start;
  margin:12px 0 18px;
}
.monthly-guide-action-row--inline{
  margin:16px 0 0;
}
.monthly-guide-action-row small{
  color:var(--muted);
  font-size:13px;
  line-height:1.35;
  max-width:880px;
}
.monthly-guide-loaded{
  display:grid;
  gap:14px;
  margin-top:10px;
}
.monthly-guide-loaded > strong{
  font-size:16px;
  color:#7c2d12;
}
.monthly-guide-summary{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-top:6px; }
.monthly-guide-summary-card{ border:1px solid var(--border); background:#fff; border-radius:14px; padding:10px; display:grid; gap:4px; }
.monthly-guide-summary-card .lbl{ color:var(--muted); font-size:12px; font-weight:800; }
.monthly-guide-summary-card strong{ font-size:20px; }
.monthly-guide-summary-card small{ color:#111827; font-weight:800; }
.monthly-guide-example{ border:1px solid var(--border); background:#fff; border-radius:16px; padding:14px; display:flex; justify-content:space-between; align-items:center; gap:12px; }
.monthly-guide-example div{ display:grid; gap:3px; }
.monthly-guide-example span{ color:var(--muted); font-size:12px; }
.monthly-guide-checklist{ border:1px solid var(--border); background:#fff; border-radius:16px; padding:12px; display:grid; gap:10px; }
.monthly-guide-checklist label{ display:flex; align-items:center; gap:10px; font-weight:800; }
.monthly-guide-preview-form{ display:grid; grid-template-columns:1fr 120px 1fr; gap:10px; }
.monthly-guide-preview-form label{ display:grid; gap:5px; font-weight:800; font-size:12px; color:var(--muted); }
.monthly-guide-preview-form input{ width:100%; }
@media (max-width:760px){
  .fint-helper-hub{ left:12px !important; right:12px !important; width:auto !important; top:auto !important; bottom:12px; max-height:calc(100vh - 24px); overflow:auto; }
  .monthly-guide-summary{ grid-template-columns:1fr 1fr; }
  .monthly-guide-preview-form{ grid-template-columns:1fr; }
}

/* Monthly guide – operating plan preview */
.monthly-guide-dialog .modal-title{
  font-size:22px;
  font-weight:900;
  line-height:1.15;
}
.monthly-guide-dialog .modal-body{
  padding:22px 24px 18px;
}
.monthly-guide-dialog #monthlyGuideContent{
  display:grid;
  gap:0;
}
.monthly-guide-operating-preview{ display:grid; gap:22px; margin-top:10px; }
.monthly-guide-op-grid{ margin-top:0; }
.monthly-guide-op-tile{ cursor:default; pointer-events:none; }
.monthly-guide-op-tile:hover{ transform:none; box-shadow:none; border-color:var(--border); }
.monthly-guide-extra-preview{
  border:1px solid var(--border);
  border-radius:18px;
  background:#fff;
  padding:14px 16px;
  display:grid;
  gap:10px;
}
.monthly-guide-extra-preview .op-top{ min-height:0; }
.monthly-guide-extra-meta{ grid-template-columns:1fr 1fr; }
.monthly-guide-plan-empty{
  border:1px dashed var(--border);
  border-radius:18px;
  background:#fff;
  padding:18px;
  color:var(--muted);
  font-weight:800;
  text-align:center;
}
@media (max-width:720px){
  .monthly-guide-dialog .modal-title{ font-size:20px; }
  .monthly-guide-dialog .modal-body{ padding:16px; }
  .monthly-guide-info-row{ grid-template-columns:1fr; gap:14px; }
  .monthly-guide-info-box{ border-radius:18px; padding:16px; }
  .monthly-guide-info-visual{ justify-self:start; width:min(100%,360px); height:210px; border-radius:22px; }
  .monthly-guide-extra-meta{ grid-template-columns:1fr; }
}

/* Monthly guide – income plan preview */
.monthly-guide-info-note{
  display:block;
  margin-top:8px;
  font-style:italic;
  font-weight:700;
  color:#7a6500;
  line-height:1.45;
}
.monthly-guide-income-preview{
  display:grid;
  gap:14px;
  margin-top:10px;
}
.monthly-guide-fake-modal{
  border:1px solid var(--border);
  border-radius:18px;
  background:#fff;
  overflow:hidden;
  box-shadow:0 10px 28px rgba(15,23,42,.06);
}
.monthly-guide-fake-modal-head{
  padding:14px 16px;
  border-bottom:1px solid var(--border);
  background:#fffdf0;
  font-size:18px;
}
.monthly-guide-fake-modal-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:12px 16px;
  border-bottom:1px solid var(--border);
}
.monthly-guide-income-list{
  display:grid;
  gap:0;
  padding:8px 16px 12px;
}
.monthly-guide-income-row{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(120px,.6fr) minmax(100px,.5fr);
  gap:12px;
  align-items:center;
  padding:10px 0;
  border-bottom:1px dashed var(--line);
}
.monthly-guide-income-row:last-child{ border-bottom:0; }
.monthly-guide-income-name{ display:grid; gap:2px; min-width:0; }
.monthly-guide-income-name small{ color:var(--muted); font-weight:700; }
.monthly-guide-income-amount{ font-weight:900; text-align:right; }
.monthly-guide-expense-amount input{ width:100%; max-width:150px; text-align:right; font-weight:900; background:#fff; border:1px solid var(--border); border-radius:10px; padding:8px 10px; }
.monthly-guide-expense-row.is-paid{ background:#f8fafc; }
.monthly-guide-income-check{ display:flex; align-items:center; justify-content:center; gap:7px; color:var(--muted); font-weight:800; font-size:13px; }
.monthly-guide-balance-preview{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.monthly-guide-balance-card{
  border-radius:16px;
  padding:13px 14px;
  display:grid;
  gap:4px;
  border:1px solid var(--border);
  background:#fff;
}
.monthly-guide-balance-card span{ font-size:12px; font-weight:900; color:var(--muted); }
.monthly-guide-balance-card strong{ font-size:20px; }
.monthly-guide-balance-card.pos{ background:#ecfdf5; border-color:#bbf7d0; color:#065f46; }
.monthly-guide-balance-card.neg{ background:#fef2f2; border-color:#fecaca; color:#991b1b; }
.monthly-guide-explain-note{
  margin:0;
  border:1px solid #dbeafe;
  background:#eff6ff;
  border-radius:16px;
  padding:13px 14px;
  color:#1e3a8a;
  font-weight:800;
  line-height:1.45;
}
.monthly-guide-explain-note p{ margin:0; }
.monthly-guide-explain-note blockquote{
  margin:10px 0 0;
  padding:10px 12px;
  border-left:4px solid #93c5fd;
  background:rgba(255,255,255,.62);
  border-radius:12px;
  font-style:italic;
  font-weight:750;
}
.monthly-guide-explain-note--blue{ border-color:#bfdbfe; background:#eff6ff; color:#1e3a8a; }
@media (max-width:720px){
  .monthly-guide-income-row{ grid-template-columns:1fr; align-items:start; }
  .monthly-guide-income-amount{ text-align:left; }
  .monthly-guide-expense-amount input{ max-width:100%; text-align:left; }
  .monthly-guide-income-check{ justify-content:flex-start; }
  .monthly-guide-balance-preview{ grid-template-columns:1fr; }
}

/* Monthly guide – interactive expense preview */
.monthly-guide-editable-amount{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
}
.monthly-guide-editable-amount span{
  color:var(--muted);
  font-size:12px;
  font-weight:900;
}
.monthly-guide-editable-amount input:focus{
  border-color:#93c5fd;
  box-shadow:0 0 0 3px rgba(147,197,253,.28);
  outline:none;
}
.monthly-guide-expense-row [data-monthly-guide-expense-paid],
.monthly-guide-expense-row [data-monthly-guide-expense-paid] + *{
  cursor:pointer;
}
.monthly-guide-expense-row:not(.is-paid){
  background:#fff;
}
.monthly-guide-expense-row.is-paid .monthly-guide-income-name strong{
  color:#166534;
}
@media (max-width:720px){
  .monthly-guide-editable-amount{ justify-content:flex-start; }
}

/* Monthly guide – extra expense picker preview */
.monthly-guide-extra-picker-preview{ display:grid; gap:14px; }
.monthly-guide-extra-picker-modal{ gap:12px; }
.monthly-guide-extra-picker-help{
  border:1px solid #dbeafe;
  background:#eff6ff;
  color:#1d4ed8;
  border-radius:14px;
  padding:10px 12px;
  font-size:13px;
  font-weight:700;
}
.monthly-guide-extra-picker-list{ display:grid; gap:8px; }
.monthly-guide-extra-picker-head,
.monthly-guide-extra-picker-row{
  display:grid;
  grid-template-columns:minmax(210px,1.4fr) minmax(110px,.75fr) 110px 145px 120px 110px;
  gap:12px;
  align-items:center;
}
.monthly-guide-extra-picker-head{
  padding:8px 12px 6px;
  color:var(--muted);
  font-size:12px;
  font-weight:900;
  text-align:center;
}
.monthly-guide-extra-picker-head > div:first-child{ text-align:left; }
.monthly-guide-extra-picker-head > div:last-child{ text-align:center; }
.monthly-guide-extra-picker-row{
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
  padding:10px 12px;
}
.monthly-guide-extra-picker-row > *{ min-width:0; }
.monthly-guide-extra-picker-row.is-added{
  border-color:#bbf7d0;
  background:#f7fff9;
}
.monthly-guide-extra-name{ font-weight:900; min-width:0; }
.monthly-guide-extra-meta{ color:var(--muted); font-size:12px; margin-top:3px; }
.monthly-guide-extra-cell{ font-size:13px; min-width:0; text-align:center; }
.monthly-guide-extra-amount{ font-weight:900; white-space:nowrap; text-align:center; }
.monthly-guide-extra-actions{ display:flex; justify-content:center; }
.monthly-guide-extra-picker-preview .status-chip{ justify-content:center; width:100%; min-height:32px; }
.monthly-guide-extra-picker-preview .status-chip.plan{ color:#6b7280; background:#f8fafc; border-color:#e5e7eb; }
.monthly-guide-extra-picker-preview .status-chip.in-list{ color:#1d4ed8; background:#eff6ff; border-color:#bfdbfe; }
.monthly-guide-extra-picker-preview .status-chip.miss{ color:#b91c1c; background:#fef2f2; border-color:#fecaca; }
.monthly-guide-extra-picker-preview .status-chip.ok{ color:#166534; background:#ecfdf3; border-color:#bbf7d0; }
@media (max-width: 860px){
  .monthly-guide-extra-picker-head{ display:none; }
  .monthly-guide-extra-picker-row{ grid-template-columns:1fr; align-items:start; }
  .monthly-guide-extra-amount{ text-align:left; }
  .monthly-guide-extra-actions{ justify-content:flex-start; }
}

/* Monthly guide – operating record step */
.monthly-guide-operating-record-lead{
  margin:0 0 14px;
  border:1px solid #bfdbfe;
  background:#eff6ff;
  color:#1e3a8a;
  border-radius:16px;
  padding:13px 14px;
  font-weight:900;
  line-height:1.45;
}
.monthly-guide-operating-record-btn{
  min-height:62px;
  border:0;
  border-radius:999px;
  background:var(--primary);
  color:var(--primary-ink);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:0 28px;
  font-weight:900;
  font-size:18px;
  box-shadow:0 14px 26px rgba(250,210,0,.25), 0 3px 8px rgba(15,23,42,.08);
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.monthly-guide-operating-record-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 18px 34px rgba(250,210,0,.30), 0 6px 14px rgba(15,23,42,.10);
  filter:brightness(.99);
}
.monthly-guide-operating-record-btn:active{ transform:translateY(0) scale(.99); }
.monthly-guide-operating-record-btn:disabled{ opacity:.72; cursor:progress; transform:none; }
.monthly-guide-operating-record-icon{
  font-size:22px;
  line-height:1;
  transform:translateY(-1px);
}
.monthly-guide-operating-record-preview{
  display:grid;
  gap:14px;
}
.monthly-guide-record-modal .monthly-guide-fake-modal-head{
  background:#fffdf0;
}
.monthly-guide-record-modal-body{
  display:grid;
  gap:18px;
  padding:16px;
}
.monthly-guide-record-list{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.monthly-guide-record-choice{
  pointer-events:none;
  cursor:default;
  opacity:1;
}
.monthly-guide-record-choice:hover{
  transform:none;
  box-shadow:none;
}
@media (max-width:720px){
  .monthly-guide-operating-record-btn{
    width:100%;
    min-height:58px;
    font-size:16px;
  }
  .monthly-guide-record-list{ grid-template-columns:1fr; }
}

/* Monthly guide – intro visual */
.monthly-guide-wide-visual{
  margin:18px 0 14px;
  width:100%;
  border:1px solid var(--border);
  border-radius:24px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 14px 34px rgba(15,23,42,.08);
}
.monthly-guide-wide-visual img{
  display:block;
  width:100%;
  height:auto;
  object-fit:contain;
  background:#fff;
}
.monthly-guide-intro-note{
  margin-top:0;
  font-size:15px;
}
@media (max-width:720px){
  .monthly-guide-wide-visual{ border-radius:18px; margin-top:14px; }
  .monthly-guide-intro-note{ font-size:14px; }
}

/* Annual overview guide */
.annual-overview-guide-dialog{
  width:min(1120px, 96vw);
  max-width:min(1120px, 96vw);
}
.annual-overview-guide-slide{
  display:grid;
  gap:16px;
}
.annual-overview-guide-copy{
  border:1px solid #f0d56b;
  background:#fff9df;
  color:#6b5a00;
  border-radius:20px;
  padding:16px 18px;
  font-weight:900;
  line-height:1.5;
}
.annual-overview-guide-copy p{ margin:0; }
.annual-overview-guide-visual{
  margin:0;
  border:1px solid var(--border);
  border-radius:24px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 14px 34px rgba(15,23,42,.08);
}
.annual-overview-guide-visual img{
  display:block;
  width:100%;
  height:auto;
  object-fit:contain;
  background:#fff;
}
.annual-overview-guide-note{
  font-size:15px;
}
@media (max-width:720px){
  .annual-overview-guide-dialog{ width:min(96vw, 760px); max-width:min(96vw, 760px); }
  .annual-overview-guide-copy{ border-radius:16px; padding:14px; font-size:14px; }
  .annual-overview-guide-visual{ border-radius:18px; }
  .annual-overview-guide-note{ font-size:14px; }
}


/* Onboarding modal viewport fix – one scrollbar only inside modal body */
dialog.onboarding-dialog[open]{
  display:flex;
  flex-direction:column;
  max-height:calc(100dvh - 32px);
  overflow:hidden;
}
dialog.onboarding-dialog[open] .modal-head,
dialog.onboarding-dialog[open] .modal-foot{
  flex:0 0 auto;
}
dialog.onboarding-dialog[open] .modal-body{
  flex:1 1 auto;
  min-height:0;
  max-height:none !important;
  overflow:auto;
}
@supports not (height: 100dvh){
  dialog.onboarding-dialog[open]{ max-height:calc(100vh - 32px); }
}
@media (max-width:720px){
  dialog.onboarding-dialog[open]{ max-height:calc(100dvh - 16px); }
  @supports not (height: 100dvh){
    dialog.onboarding-dialog[open]{ max-height:calc(100vh - 16px); }
  }
}

/* === Mobile bottom navigation for the 5 main app pages === */
.mobile-bottom-nav{
  display:none;
}
.topbar-logo-home{
  color:inherit;
  text-decoration:none;
}
@media (max-width: 980px){
  /* On mobile the five main pages live in the bottom tab bar, not in the side menu. */
  .sidebar,
  .sidebar-backdrop,
  .sidebar-backdrop.show{
    display:none !important;
  }
  body.no-scroll{
    overflow:auto;
  }
  .brand .brand-home-icon{
    display:none !important;
  }
  .mobile-bottom-nav{
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    z-index:1900;
    min-height:64px;
    padding:7px max(8px, env(safe-area-inset-left)) calc(7px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
    display:grid;
    grid-template-columns:repeat(5, minmax(0, 1fr));
    gap:4px;
    background:rgba(255,255,255,.96);
    border-top:1px solid var(--border);
    box-shadow:0 -12px 28px rgba(15,23,42,.10);
    backdrop-filter:saturate(180%) blur(14px);
  }
  .mobile-bottom-nav-item{
    min-width:0;
    min-height:50px;
    border-radius:16px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;
    color:#4b5563;
    text-decoration:none;
    font-weight:900;
    -webkit-tap-highlight-color:transparent;
  }
  .mobile-bottom-nav-item.active{
    background:var(--primary);
    color:var(--primary-ink);
  }
  .mobile-bottom-nav-icon{
    font-size:20px;
    line-height:1;
  }
  .mobile-bottom-nav-label{
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:10.5px;
    line-height:1.05;
  }
  .content,
  .container,
  .settings-wrap,
  .settings-layout,
  .home-page .page-inner{
    padding-bottom:calc(92px + env(safe-area-inset-bottom)) !important;
  }
  .mobile-daily-fab{
    right:14px;
    bottom:calc(78px + env(safe-area-inset-bottom));
    z-index:1950;
  }
}
@media (max-width: 380px){
  .mobile-bottom-nav{ gap:2px; padding-left:5px; padding-right:5px; }
  .mobile-bottom-nav-item{ border-radius:14px; }
  .mobile-bottom-nav-label{ font-size:9.5px; }
  .mobile-bottom-nav-icon{ font-size:19px; }
}
@media (max-width: 980px){
  .brand-home-link{
    display:none !important;
  }
}


/* Fintillend plán – Průvodce budoucností */
.fintillend-guide-slide{ display:grid; gap:16px; }
.fintillend-guide-list{ margin:0; padding-left:22px; display:grid; gap:8px; color:#475569; font-weight:750; }
.fintillend-guide-list li::marker{ color:var(--primary-ink); }
.fintillend-guide-card{ display:grid; gap:8px; align-content:start; }
.fintillend-guide-card-icon{ width:38px; height:38px; border-radius:14px; display:grid; place-items:center; background:#fff9df; border:1px solid #f0d56b; font-size:20px; }
.fintillend-guide-card p{ margin:0; color:var(--muted); font-size:13px; line-height:1.35; }

/* === Hotfix: helper hub from user menu as small modal + restored Future Guide visual === */
.fint-helper-hub.is-modal{
  width:min(560px, calc(100vw - 24px));
  max-width:calc(100vw - 24px);
  max-height:min(82vh, 640px);
  overflow:auto;
  background:#fff;
  border-radius:24px;
  box-shadow:0 28px 90px rgba(17,24,39,.18);
}
.fintillend-guide-dialog{
  width:min(1080px, 96vw);
  max-width:min(1080px, 96vw);
}
.fintillend-guide-dialog .modal-title{
  font-size:21px;
  font-weight:950;
  line-height:1.15;
}
.fintillend-guide-dialog .modal-body{
  padding:16px;
  max-height:min(72vh, 680px);
}
.fintillend-guide-dialog #fintillendGuideContent{ display:grid; gap:16px; }
.future-intro-layout{ display:grid; grid-template-columns:minmax(0,.94fr) minmax(0,1.06fr); gap:16px; }
.future-yellow-panel,
.future-white-panel,
.future-lead-card{
  border:1px solid var(--border);
  border-radius:22px;
  background:#fff;
  padding:16px 18px;
}
.future-yellow-panel{
  min-height:278px;
  border-color:#f0d56b;
  background:linear-gradient(135deg,#fff9df 0%,#fff8dc 100%);
  color:#6b5a00;
}
.future-yellow-panel p{ margin:12px 0 0; font-size:16px; line-height:1.55; font-weight:900; }
.future-white-panel{ display:grid; gap:12px; }
.future-mini-grid{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.future-mini-grid.three{ margin-top:0; }
.future-mini-card{
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
  padding:14px 12px;
  display:grid;
  gap:7px;
  min-width:0;
}
.future-mini-icon{ font-size:21px; line-height:1; }
.future-mini-card strong{ font-size:14px; line-height:1.15; }
.future-mini-card p{ margin:0; color:var(--muted); font-weight:800; font-size:13px; line-height:1.25; }
.future-green-note,
.future-blue-note{
  border-radius:18px;
  padding:13px 16px;
  font-weight:900;
  line-height:1.45;
}
.future-green-note{ border:1px solid #bbf7d0; background:#ecfdf3; color:#166534; }
.future-blue-note{ border:1px solid #bfdbfe; background:#eff6ff; color:#1e3a8a; }
.future-intro-layout .future-blue-note{ grid-column:1 / -1; }
.future-guide-page{ display:grid; gap:14px; }
.future-lead-card{ background:linear-gradient(135deg,#fffdf0 0%,#fff 100%); border-color:#f0d56b; }
.future-lead-card h2{ margin:0 0 8px; font-size:24px; line-height:1.12; }
.future-lead-card p{ margin:0; color:#5b6472; font-weight:750; line-height:1.5; }
.future-list{ display:grid; gap:10px; }
.future-list-row{ border:1px solid var(--border); border-radius:16px; background:#fff; padding:12px 14px; display:grid; grid-template-columns:34px minmax(0,1fr); gap:10px; align-items:center; }
.future-list-row span{ width:34px; height:34px; border-radius:999px; display:grid; place-items:center; background:#fff9df; border:1px solid #f0d56b; color:#7a6500; font-weight:950; }
.future-list-row p{ margin:0; font-weight:850; color:#344054; }
.future-flow{ display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); gap:12px; align-items:stretch; }
.future-flow > div{ border:1px solid var(--border); border-radius:18px; background:#fff; padding:14px; display:grid; gap:5px; align-content:center; text-align:center; font-weight:900; }
.future-flow > div:nth-child(2){ border:0; background:transparent; font-size:24px; color:#7a6500; }
.future-flow span{ color:var(--muted); font-size:13px; }
.future-pill-grid{ display:flex; flex-wrap:wrap; gap:10px; }
.future-story-pill{ display:inline-flex; border:1px solid #f0d56b; background:#fff9df; color:#7a6500; border-radius:999px; padding:9px 13px; font-weight:950; }
.future-fake-chart{ position:relative; min-height:240px; border:1px solid var(--border); border-radius:22px; background:linear-gradient(180deg,#fff 0%,#f8fafc 100%); overflow:hidden; }
.future-fake-chart::before{ content:""; position:absolute; inset:24px; background:repeating-linear-gradient(to bottom, transparent 0, transparent 42px, #e5e7eb 43px), repeating-linear-gradient(to right, transparent 0, transparent 90px, #eef2f7 91px); }
.future-chart-line{ position:absolute; left:8%; right:8%; height:4px; border-radius:999px; transform-origin:left center; }
.future-chart-line.one{ top:42%; background:#166534; transform:rotate(-10deg); }
.future-chart-line.two{ top:56%; background:#1d4ed8; transform:rotate(8deg); }
.future-chart-line.three{ top:66%; background:#b91c1c; transform:rotate(-4deg); }
.future-fake-chart span{ position:absolute; width:14px; height:14px; border-radius:999px; background:var(--primary); border:2px solid #fff; box-shadow:0 2px 8px rgba(0,0,0,.18); }
.future-fake-chart span:nth-of-type(1){ left:32%; top:38%; }
.future-fake-chart span:nth-of-type(2){ left:58%; top:51%; }
.future-fake-chart span:nth-of-type(3){ left:74%; top:62%; }
@media (max-width: 780px){
  .fint-helper-hub.is-modal{
    left:12px !important;
    right:12px !important;
    top:50% !important;
    width:auto !important;
    max-width:none;
    max-height:calc(100dvh - 28px);
    transform:translateY(-50%) !important;
    padding:14px;
    border-radius:24px;
  }
  .fint-helper-hub.is-modal .fint-helper-hub-head{ padding:4px 2px 12px; }
  .fint-helper-hub.is-modal .fint-helper-card-grid{ gap:10px; }
  .fint-helper-hub.is-modal .fint-helper-card{
    grid-template-columns:auto minmax(0,1fr);
    padding:13px;
    border-radius:18px;
  }
  .fint-helper-hub.is-modal .fint-helper-arrow{ display:none; }
  .fint-helper-hub.is-modal .fint-helper-card-copy strong{ font-size:15px; }
  .fint-helper-hub.is-modal .fint-helper-card-copy small{ font-size:12.5px; }
  .future-intro-layout,
  .future-flow{ grid-template-columns:1fr; }
  .future-intro-layout .future-blue-note{ grid-column:auto; }
  .future-mini-grid{ grid-template-columns:1fr; }
  .future-yellow-panel{ min-height:auto; }
}

/* Future guide: real chart screenshot from /public/media */
.future-chart-report-figure{
  margin:0;
  border:1px solid var(--border);
  border-radius:22px;
  background:#fff;
  overflow:hidden;
  box-shadow:0 1px 0 rgba(0,0,0,.02);
}
.future-chart-report-figure img{
  display:block;
  width:100%;
  height:auto;
  max-height:min(46vh, 430px);
  object-fit:contain;
  background:#fff;
}


/* Onboarding: první plán vytvořen */
.onboarding-first-load{
  display:grid;
  gap:14px;
}
.onboarding-first-load-figure{
  margin:4px 0 0;
  border:1px solid var(--border);
  border-radius:20px;
  background:#fff;
  padding:12px;
  box-shadow:0 10px 26px rgba(15,23,42,.07);
}
.onboarding-first-load-figure img{
  display:block;
  width:100%;
  max-height:min(52vh, 520px);
  object-fit:contain;
  border-radius:14px;
}
@media (max-width: 640px){
  .onboarding-first-load-figure{ padding:8px; border-radius:16px; }
  .onboarding-first-load-figure img{ max-height:42vh; }
}
