/* WOXO Wiki — vzhled B „Světlé sklo jako WOXO CRM“:
   světlé pozadí se skvrnami, plovoucí menu s přechodem z WOXO Hubu,
   obsah na bílé skleněné ploše (bílá pro čtení), žádné emoji, linkové ikony. */
:root {
  --bg: #EEF2F4;
  --ink: #0c1d2c;          /* text (barva loga) */
  --ink2: #50646e;         /* sekundární text */
  --ink3: #8a9ba3;         /* popisky, placeholdery */
  --line: rgba(12, 29, 44, 0.08);
  --line2: rgba(12, 29, 44, 0.14);
  --hover: rgba(12, 29, 44, 0.045);
  --active: rgba(12, 29, 44, 0.08);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.86);
  --solid: #ffffff;
  --menu-bg: linear-gradient(170deg, #072338 0%, #063247 40%, #05505E 75%, #00806E 100%);
  --navy: #072338;
  --green: #00AB8E;
  --green-ink: #07614f;
  --green-bg: rgba(0, 171, 142, 0.12);
  --danger: #d64545;
  --focus: 0 0 0 3px rgba(0, 171, 142, 0.18);
  --float: 0 1px 2px rgba(12, 29, 44, 0.06), 0 12px 32px rgba(12, 29, 44, 0.14);
  --c-default-bg: rgba(12, 29, 44, 0.06); --c-default: #33454f;
  --c-gray-bg: #e6ecef; --c-gray: #3a4d57;
  --c-brown-bg: #efe4dc; --c-brown: #5a3a26;
  --c-orange-bg: #fbe5d2; --c-orange: #7a3d0c;
  --c-yellow-bg: #f3f6c9; --c-yellow: #4f5a02;
  --c-green-bg: #d9f1ea; --c-green: #07614f;
  --c-blue-bg: #dbedf3; --c-blue: #1d5566;
  --c-purple-bg: #e4ecef; --c-purple: #3f5862;
  --c-pink-bg: #f6e1e8; --c-pink: #6a2741;
  --c-red-bg: #fbe0de; --c-red: #8a2420;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font: 15px/1.55 'DM Sans', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* barevné skvrny pod sklem */
body::before, body::after { content: ''; position: fixed; border-radius: 50%; filter: blur(90px); pointer-events: none; z-index: 0; }
body::before { width: 560px; height: 560px; background: #00AB8E; opacity: 0.16; top: -220px; right: -120px; }
body::after { width: 480px; height: 480px; background: #3E9BB5; opacity: 0.14; bottom: -220px; left: 18%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--ink2); }
.small { font-size: 12.5px; }
.grow { flex: 1; min-width: 0; }
.placeholder { color: var(--ink3); }
kbd { font: 11px 'DM Mono', ui-monospace, monospace; opacity: 0.55; }
.ic { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; line-height: 0; }
.emoji-icon { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.section-label, .side-label { font: 10.5px 'DM Mono', ui-monospace, monospace; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink3); }
.section-label { margin: 22px 0 8px; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: var(--hover); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-size: 14px; white-space: nowrap; text-decoration: none; color: var(--ink); }
.btn:hover { background: var(--active); }
.btn-sm { padding: 4px 11px; font-size: 13px; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: #0b3350; }
.btn-danger { color: var(--danger); background: rgba(214, 69, 69, 0.08); }
.btn-danger:hover { background: rgba(214, 69, 69, 0.14); }
.btn-block { width: 100%; padding: 11px; font-size: 15px; }
.btn-ghost { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 5px 10px; border-radius: 999px; cursor: pointer; color: var(--ink2); font-size: 14px; white-space: nowrap; }
.btn-ghost:hover { background: var(--hover); color: var(--ink); }
.btn-ghost.on { color: var(--green-ink); background: var(--green-bg); }
.icon-btn { border: 0; background: none; width: 30px; height: 30px; border-radius: 999px; cursor: pointer; color: var(--ink2); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn.sm { width: 24px; height: 24px; }
.icon-btn:disabled { opacity: 0.3; cursor: default; }
.icon-btn.fav-on { color: #c79a00; }
.icon-btn.fav-on svg { fill: currentColor; }
.input { width: 100%; border: 1px solid var(--line2); background: var(--solid); border-radius: 10px; padding: 8px 11px; font-size: 14px; outline: none; }
.input:focus { border-color: var(--green); box-shadow: var(--focus); }
.checkbox { width: 16px; height: 16px; accent-color: var(--green); cursor: pointer; margin: 0; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--hover); color: var(--ink2); font-size: 12px; white-space: nowrap; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--c-blue-bg); color: var(--c-blue); font-size: 11px; margin-left: 6px; vertical-align: 1px; }
.row-inline { display: flex; align-items: center; gap: 10px; }
.row-inline .input { width: auto; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack .section-label { margin: 12px 0 0; }

/* ---------- auth (přechod jako přihlášení do Hubu) ---------- */
body.is-auth { background: var(--menu-bg) fixed; color: #fff; }
body.is-auth::before { opacity: 0.4; }
body.is-auth::after { opacity: 0.25; }
.auth { position: relative; z-index: 1; flex: 1; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.auth-box { width: 100%; max-width: 360px; display: flex; flex-direction: column; align-items: stretch; gap: 12px; text-align: center; }
.auth-logo { color: #fff; display: flex; justify-content: center; }
.auth-logo .woxo-logo { height: 44px; width: auto; }
.auth-app { font-size: 22px; font-weight: 300; letter-spacing: 0.22em; color: rgba(255, 255, 255, 0.92); margin-top: -2px; }
.auth-sub { margin: 0 0 22px; color: rgba(255, 255, 255, 0.72); font-size: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth .input { padding: 13px 16px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 15px; }
.auth .input::placeholder { color: rgba(255, 255, 255, 0.62); }
.auth .input:focus { border-color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.16); box-shadow: none; }
.auth .btn-primary { background: #fff; color: var(--navy); font-weight: 500; }
.auth .btn-primary:hover { background: #e9f0f3; }
.auth-link { background: none; border: 0; color: rgba(255, 255, 255, 0.72); font-size: 13px; cursor: pointer; padding: 4px; }
.auth-link:hover { color: #fff; text-decoration: underline; }
.auth-err { color: #FFD9D9; font-size: 13px; min-height: 18px; }

/* ---------- layout ---------- */
#app { position: relative; z-index: 1; display: flex; height: 100vh; overflow: hidden; }
.sidebar { width: 252px; flex-shrink: 0; margin: 12px; border-radius: 20px; background: var(--menu-bg); color: rgba(255, 255, 255, 0.86); display: flex; flex-direction: column; transition: margin 0.2s; overflow: hidden; }
body.side-hidden .sidebar { margin-left: -264px; }
.side-opener { position: fixed; top: 14px; left: 14px; z-index: 5; display: none; background: var(--glass-strong); }
body.side-hidden .side-opener { display: inline-flex; }
body.side-hidden .topbar { padding-left: 56px; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 14px 10px 18px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand-logo { display: flex; color: #fff; }
.brand-logo .woxo-logo { height: 17px; width: auto; }
.brand-app { font-size: 13px; font-weight: 300; letter-spacing: 0.2em; color: rgba(255, 255, 255, 0.8); line-height: 1; }
.sidebar .icon-btn { color: rgba(255, 255, 255, 0.6); }
.sidebar .icon-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.collapse-btn { opacity: 0; }
.sidebar:hover .collapse-btn { opacity: 1; }
.side-actions { padding: 4px 10px 6px; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; cursor: pointer; font-size: 14px; color: rgba(255, 255, 255, 0.82); text-decoration: none; }
.side-link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.side-link .ic { opacity: 0.85; }
.side-scroll { flex: 1; overflow-y: auto; padding: 0 10px 12px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.2) transparent; }
.side-section { margin-top: 14px; }
.side-label { display: flex; align-items: center; justify-content: space-between; color: rgba(255, 255, 255, 0.5); padding: 2px 10px 6px; }
.side-label .icon-btn { opacity: 0; }
.side-section:hover .side-label .icon-btn { opacity: 1; }
.side-bottom { padding: 8px 10px 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.me { display: flex; align-items: center; gap: 9px; margin-top: 6px; padding: 5px 10px 5px 6px; border-radius: 999px; cursor: pointer; background: rgba(255, 255, 255, 0.06); }
.me:hover { background: rgba(255, 255, 255, 0.12); }
.me-ini { width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 500; color: #fff; flex-shrink: 0; }
.me-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tree-row { display: flex; align-items: center; gap: 6px; height: 31px; padding-right: 6px; border-radius: 10px; cursor: pointer; font-size: 14px; color: rgba(255, 255, 255, 0.84); }
.tree-row:hover { background: rgba(255, 255, 255, 0.08); }
.tree-row.active { background: rgba(255, 255, 255, 0.16); color: #fff; }
.tree-row.drop { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.7); }
.tree-toggle { width: 18px; height: 18px; border: 0; background: none; border-radius: 5px; cursor: pointer; color: rgba(255, 255, 255, 0.5); flex-shrink: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.tree-toggle:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.tree-toggle.leaf { cursor: default; }
.tree-toggle.leaf:hover { background: none; }
.tree-icon { width: 18px; display: inline-flex; justify-content: center; flex-shrink: 0; font-size: 14px; opacity: 0.9; }
.tree-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree-lock { opacity: 0.5; }
.tree-actions { display: none; }
.tree-row:hover .tree-actions { display: flex; }
.tree-row:hover .tree-lock { display: none; }
.tree-empty { font-size: 13px; color: rgba(255, 255, 255, 0.55); padding: 6px 10px; }

/* obsah = bílá skleněná plocha */
.main { flex: 1; min-width: 0; margin: 12px 12px 0 0; border-radius: 20px 20px 0 0; background: var(--glass); backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%); overflow-y: auto; position: relative; }
.topbar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 52px; padding: 0 14px 0 22px; background: var(--glass-strong); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 20px 20px 0 0; }
.crumbs { display: flex; align-items: center; gap: 2px; min-width: 0; overflow: hidden; font-size: 13.5px; color: var(--ink2); }
.crumb { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; padding: 3px 8px; border-radius: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.crumb:last-child { color: var(--ink); }
.crumb:hover { background: var(--hover); }
.crumb-sep { color: var(--ink3); }
.topbar-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.save-status { font-size: 12px; margin-right: 8px; white-space: nowrap; color: var(--ink3); }
.access-btn.on { color: var(--green-ink); background: var(--green-bg); }

/* ---------- page ---------- */
.page { max-width: 860px; margin: 0 auto; padding: 36px 72px 30vh; }
.page-wide { max-width: none; padding-left: 72px; padding-right: 40px; }
.page-loading { padding: 80px; text-align: center; }
.page-header { margin-bottom: 10px; }
.page-header-tools { height: 30px; opacity: 0; transition: opacity 0.15s; }
.page-header:hover .page-header-tools { opacity: 1; }
.page-icon { font-size: 56px; line-height: 1.1; border: 0; background: none; cursor: pointer; padding: 4px; border-radius: 12px; margin-left: -4px; }
.page-icon:hover { background: var(--hover); }
.page-title { font-size: 38px; font-weight: 500; line-height: 1.2; letter-spacing: -0.015em; outline: none; margin: 6px 0 4px; word-break: break-word; color: var(--ink); }
.page-title:empty::before { content: attr(data-placeholder); color: var(--ink3); }
.editor-holder { margin-left: -4px; }
.subpages { margin-top: 28px; padding-top: 4px; border-top: 1px solid var(--line); }
.banner { padding: 12px 16px; border-radius: 12px; background: var(--c-yellow-bg); color: var(--c-yellow); display: flex; gap: 10px; align-items: center; }
.empty-state { padding: 32px; text-align: center; color: var(--ink2); }

/* vlastnosti záznamu */
.row-props { margin: 14px 0 4px; }
.row-prop { display: flex; align-items: flex-start; min-height: 34px; }
.row-prop-name { width: 190px; flex-shrink: 0; display: flex; align-items: center; gap: 6px; color: var(--ink2); font-size: 14px; padding: 6px 6px; }
.row-prop-val { flex: 1; min-width: 0; }
.row-prop-val .pv { padding: 5px 8px; border-radius: 8px; min-height: 32px; }
.row-prop-val .pv.clickable:hover { background: var(--hover); cursor: pointer; }
.row-sep { border-bottom: 1px solid var(--line); margin: 14px 0 22px; }
.th-icon { display: inline-block; width: 18px; text-align: center; font: 11px 'DM Mono', ui-monospace, monospace; color: var(--ink3); }

/* ---------- Editor.js ---------- */
.codex-editor { color: var(--ink); }
.ce-block__content, .ce-toolbar__content { max-width: none; }
.ce-paragraph { line-height: 1.7; padding: 3px 0; font-size: 15.5px; }
.ce-paragraph[data-placeholder]:empty::before { color: var(--ink3); }
.ce-header { padding: 0.9em 0 0.2em; margin: 0; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; }
h1.ce-header { font-size: 28px; }
h2.ce-header { font-size: 22px; }
h3.ce-header { font-size: 18px; }
.ce-block a { color: inherit; text-decoration: underline; text-decoration-color: rgba(12, 29, 44, 0.3); text-underline-offset: 3px; cursor: pointer; }
.ce-block a:hover { text-decoration-color: var(--green); }
.ce-block a[href^="#/p/"] { text-decoration-color: var(--green); }
.cdx-marker { background: rgba(189, 220, 4, 0.35); padding: 0 1px; }
.inline-code { background: rgba(12, 29, 44, 0.06); color: #b23a48; border-radius: 5px; padding: 1px 5px; font-size: 85%; font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
.cdx-quote { border-left: 2px solid var(--green); padding-left: 16px; color: var(--ink2); }
.cdx-quote__caption { display: none; }
.cdx-input { border: 0; box-shadow: none; padding: 4px 0; }
.ce-code__textarea { background: rgba(12, 29, 44, 0.045); border: 0; border-radius: 10px; font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; min-height: 60px; color: var(--ink); }
.ce-delimiter { line-height: 1; }
.ce-delimiter::before { content: ''; display: block; height: 1px; background: var(--line2); margin: 14px 0; }
.tc-table { --color-border: var(--line2); font-size: 14px; }
.tc-wrap { --color-background: var(--hover); --color-text-secondary: var(--ink2); --color-border: var(--line2); }
.cdx-list, .cdx-list__item { line-height: 1.7; }
.cdx-list__item { padding: 2px 0; }
.image-tool__image-picture { border-radius: 10px; max-width: 100%; }
.ce-toolbar__plus, .ce-toolbar__settings-btn { color: var(--ink3); border-radius: 8px; }
.ce-toolbar__plus:hover, .ce-toolbar__settings-btn:hover { background: var(--hover); color: var(--ink); }
.ce-popover, .ce-inline-toolbar, .ce-conversion-toolbar { --color-background: #fff; --color-text-primary: var(--ink); --color-border: var(--line2); --color-shadow: rgba(12, 29, 44, 0.14); }
.ce-popover__container { border-radius: 14px !important; }
.ce-block--selected .ce-block__content { background: rgba(0, 171, 142, 0.1); border-radius: 6px; }
.ce-toolbar__actions { right: calc(100% + 4px); }

/* vlastní bloky */
.callout { display: flex; gap: 10px; padding: 14px 16px 14px 12px; border-radius: 14px; background: rgba(12, 29, 44, 0.04); margin: 6px 0; }
.callout-icon { border: 0; background: none; font-size: 19px; line-height: 1.25; cursor: pointer; padding: 0 2px; border-radius: 6px; height: fit-content; }
.callout-icon:hover { background: var(--hover); }
.callout-text { flex: 1; outline: none; line-height: 1.7; }
.callout-text:empty::before { content: attr(data-placeholder); color: var(--ink3); }
.pagelink { display: flex; align-items: center; gap: 8px; padding: 4px 6px; margin: 1px -6px; border-radius: 9px; cursor: pointer; text-decoration: none; user-select: none; }
.pagelink:hover { background: var(--hover); }
.pagelink-icon { width: 22px; display: inline-flex; justify-content: center; color: var(--ink2); }
.pagelink-title { font-weight: 500; text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 4px; }
.pagelink.missing { color: var(--ink3); cursor: default; }

/* ---------- databáze ---------- */
.db { margin-top: 10px; }
.db-desc { margin-bottom: 8px; }
.db-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.db-tabs { display: flex; align-items: center; gap: 4px; overflow-x: auto; padding: 3px; border-radius: 999px; background: var(--hover); }
.db-tab { display: inline-flex; align-items: center; border: 0; background: none; padding: 5px 12px; cursor: pointer; color: var(--ink2); font-size: 13.5px; white-space: nowrap; border-radius: 999px; }
.db-tab:hover { color: var(--ink); }
.db-tab.active { color: var(--ink); background: #fff; }
.db-tab-icon { margin-right: 6px; opacity: 0.6; }
.db-tab.add { font-size: 16px; padding: 2px 10px; }
.db-toolbar { display: flex; align-items: center; gap: 2px; padding: 4px 0; flex-wrap: wrap; }
.db-search { border: 0; background: var(--hover); outline: none; width: 170px; padding: 6px 12px; font-size: 13.5px; border-radius: 999px; margin-right: 4px; }
.db-search:focus { background: #fff; box-shadow: var(--focus); }
.db-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 0 0; }
.filter-chip { border: 0; color: var(--green-ink); background: var(--green-bg); border-radius: 999px; padding: 3px 11px; font-size: 12.5px; cursor: pointer; }
.filter-chip.sort { color: var(--ink2); background: var(--hover); }
.db-scroll { overflow-x: auto; margin-top: 10px; padding-bottom: 4px; }
.db-table { border-collapse: collapse; table-layout: fixed; font-size: 14px; min-width: 100%; width: max-content; }
.db-table th { position: relative; text-align: left; font-weight: 500; color: var(--ink3); border-bottom: 1px solid var(--line2); padding: 0; height: 36px; }
.th-in { display: flex; align-items: center; gap: 4px; padding: 0 8px; height: 35px; cursor: pointer; overflow: hidden; font-size: 12.5px; }
.th-in:hover { background: var(--hover); }
.th-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-resize { position: absolute; right: -3px; top: 6px; bottom: 6px; width: 6px; cursor: col-resize; z-index: 1; border-radius: 3px; }
.col-resize:hover { background: var(--green); opacity: 0.5; }
.db-table td { border-bottom: 1px solid var(--line); padding: 0; vertical-align: top; height: 36px; }
.db-table tr:hover td:not(.gutter) { background: rgba(12, 29, 44, 0.02); }
.db-table td + td:not(:last-child), .db-table th + th:not(.add-col) { border-left: 1px solid var(--line); }
.db-table td.gutter + td, .db-table th.gutter + th { border-left: 0; }
.db-table th.gutter, .db-table td.gutter { border-bottom-color: transparent; }
.row-handle { opacity: 0; border: 0; background: none; color: var(--ink3); cursor: pointer; font-size: 11px; letter-spacing: -3px; height: 35px; width: 24px; border-radius: 6px; }
tr:hover .row-handle { opacity: 1; }
.row-handle:hover { background: var(--hover); }
.title-cell { display: flex; align-items: center; gap: 6px; padding: 0 6px 0 8px; height: 35px; position: relative; }
.title-input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-weight: 500; font-size: 14px; padding: 0; text-overflow: ellipsis; color: var(--ink); }
.title-input[readonly] { cursor: default; }
.row-icon { font-size: 13px; display: inline-flex; color: var(--ink3); }
.open-btn { display: none; border: 0; background: #fff; border-radius: 999px; font-size: 11.5px; font-weight: 500; color: var(--ink2); padding: 2px 9px; cursor: pointer; white-space: nowrap; box-shadow: 0 0 0 1px var(--line2); }
tr:hover .open-btn { display: inline-block; }
.open-btn:hover { color: var(--ink); }
.add-row td { color: var(--ink3); cursor: pointer; padding: 8px 34px !important; border-bottom: 0 !important; }
.add-row td:hover { color: var(--ink); }
.db-count { color: var(--ink3); font: 11px 'DM Mono', ui-monospace, monospace; padding: 8px 32px; }

.pv { min-height: 35px; }
.pv-cell { padding: 7px 8px; height: 100%; }
.pv.clickable { cursor: pointer; }
.pv-cell.clickable:hover { background: var(--hover); }
.pv-text { white-space: pre-wrap; word-break: break-word; }
.pv-cell .pv-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; }
.pv-input { width: 100%; border: 0; background: none; outline: none; font-size: 14px; padding: 0; min-height: 21px; color: var(--ink); }
.pv-input::-webkit-calendar-picker-indicator { opacity: 0; cursor: pointer; }
.pv:hover .pv-input::-webkit-calendar-picker-indicator { opacity: 0.5; }
.pv-checkbox { display: flex; align-items: center; }
.pv-cell.pv-checkbox { padding-top: 9px; }
.pv-textarea { resize: vertical; min-height: 100px; }
.popover.pv-pop { padding: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 2px; padding: 0 9px; border-radius: 999px; font-size: 12.5px; line-height: 22px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip-x { cursor: pointer; opacity: 0.6; margin-left: 2px; }
.chip-x:hover { opacity: 1; }
.c-default { background: var(--c-default-bg); color: var(--c-default); }
.c-gray { background: var(--c-gray-bg); color: var(--c-gray); }
.c-brown { background: var(--c-brown-bg); color: var(--c-brown); }
.c-orange { background: var(--c-orange-bg); color: var(--c-orange); }
.c-yellow { background: var(--c-yellow-bg); color: var(--c-yellow); }
.c-green { background: var(--c-green-bg); color: var(--c-green); }
.c-blue { background: var(--c-blue-bg); color: var(--c-blue); }
.c-purple { background: var(--c-purple-bg); color: var(--c-purple); }
.c-pink { background: var(--c-pink-bg); color: var(--c-pink); }
.c-red { background: var(--c-red-bg); color: var(--c-red); }

.opt-picker { display: flex; flex-direction: column; gap: 8px; }
.opt-selected:empty { display: none; }
.opt-list { max-height: 280px; overflow-y: auto; }
.opt-item { display: flex; align-items: center; justify-content: space-between; padding: 5px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.opt-item:hover { background: var(--hover); }
.opt-check { color: var(--green); }
.opt-create { color: var(--ink2); justify-content: flex-start; gap: 6px; }
.opt-empty { padding: 6px; font-size: 13px; }
.opt-editor { display: flex; flex-direction: column; gap: 8px; }
.opt-edit-row { display: flex; gap: 6px; align-items: center; }
.color-sel { width: 130px; flex-shrink: 0; }

.rules { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.rule { display: grid; grid-template-columns: 1.2fr 1fr 1.3fr 30px; gap: 6px; width: 100%; align-items: center; }
.rules .rule:has(> :nth-child(3):last-child) { grid-template-columns: 1.4fr 1fr 30px; }
.rule-spacer { display: block; }
.rules-empty { font-size: 13px; padding: 4px; }

.board { display: flex; gap: 12px; overflow-x: auto; padding: 14px 0 18px; align-items: flex-start; }
.board-col { width: 272px; flex-shrink: 0; border-radius: 16px; padding: 8px; background: rgba(12, 29, 44, 0.035); }
.board-col.drop { background: var(--green-bg); }
.board-head { display: flex; align-items: center; gap: 8px; padding: 4px 4px 10px; font-size: 13px; }
.card { background: #fff; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; font-size: 14px; box-shadow: 0 0 0 1px var(--line); }
.card:hover { box-shadow: 0 0 0 1px var(--line2); }
.card.dragging { opacity: 0.4; }
.card-title { font-weight: 500; }
.card-prop { font-size: 12.5px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.board-add { width: 100%; text-align: left; border: 0; background: none; color: var(--ink3); padding: 6px 8px; border-radius: 10px; cursor: pointer; font-size: 13.5px; }
.board-add:hover { background: var(--hover); color: var(--ink); }

/* ---------- překryvné prvky (plné bílé, jemný stín) ---------- */
.popover { position: fixed; z-index: 1000; background: var(--solid); border-radius: 14px; box-shadow: var(--float); padding: 6px; max-height: 70vh; overflow-y: auto; }
.menu { display: flex; flex-direction: column; min-width: 190px; }
.menu-item { display: flex; align-items: center; gap: 9px; padding: 6px 9px; border-radius: 9px; cursor: pointer; font-size: 14px; }
.menu-item:hover { background: var(--hover); }
.menu-item.danger { color: var(--danger); }
.menu-icon { width: 18px; display: inline-flex; justify-content: center; flex-shrink: 0; color: var(--ink2); }
.menu-item.danger .menu-icon { color: var(--danger); }
.menu-sep { height: 1px; background: var(--line); margin: 4px 0; }
.menu-pad { padding: 4px; }
.mini-label { display: block; font: 10.5px 'DM Mono', ui-monospace, monospace; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink3); margin-bottom: 4px; }
.prop-row .grow { cursor: pointer; }
.member-list { max-height: 50vh; overflow-y: auto; }

.emoji-pop { display: flex; flex-direction: column; gap: 8px; }
.emoji-head { display: flex; gap: 6px; }
.emoji-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; }
.emoji-btn { border: 0; background: none; font-size: 20px; padding: 3px; border-radius: 8px; cursor: pointer; }
.emoji-btn:hover { background: var(--hover); }

.modal-wrap { position: fixed; inset: 0; z-index: 900; background: rgba(7, 35, 56, 0.28); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; overflow-y: auto; }
.modal { background: var(--solid); border-radius: 20px; box-shadow: var(--float); max-width: 100%; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; }
.modal-title { font-weight: 500; font-size: 17px; }
.modal-body { padding: 8px 20px 20px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.confirm-text { margin: 4px 0 0; }

.search-modal .modal-body { padding: 0; }
.search-bar { display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--ink3); }
.search-input { flex: 1; border: 0; padding: 18px 0; font-size: 17px; outline: none; background: none; }
.search-results { max-height: 60vh; overflow-y: auto; padding: 8px; }
.search-item { display: flex; gap: 12px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.search-item.sel { background: var(--hover); }
.search-icon { width: 22px; display: inline-flex; justify-content: center; color: var(--ink2); padding-top: 2px; }
.search-title { font-weight: 500; }
.search-parent { font-weight: 400; font-size: 13px; }
.search-snippet { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-empty { padding: 18px; text-align: center; }

.pick-list { max-height: 50vh; overflow-y: auto; margin-top: 10px; }
.pick-item { display: flex; gap: 10px; align-items: center; padding: 7px 9px; border-radius: 9px; cursor: pointer; }
.pick-item:hover { background: var(--hover); }
.pick-path { font-size: 12px; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }

.peek-wrap { position: fixed; inset: 0; z-index: 800; background: rgba(7, 35, 56, 0.16); display: flex; justify-content: flex-end; padding: 12px; }
.peek { width: min(900px, 92vw); height: 100%; background: var(--solid); border-radius: 20px; box-shadow: var(--float); display: flex; flex-direction: column; animation: slidein 0.18s ease-out; overflow: hidden; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.peek-bar { display: flex; align-items: center; gap: 4px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.peek-body { flex: 1; overflow-y: auto; max-width: none; padding: 26px 56px 30vh; }
.peek-body .page-title { font-size: 32px; }

.trash-list { display: flex; flex-direction: column; gap: 4px; max-height: 60vh; overflow-y: auto; }
.trash-item { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 12px; color: var(--ink2); }
.trash-item > .grow { color: var(--ink); }
.trash-item:hover { background: var(--hover); }

.history { display: grid; grid-template-columns: 220px 1fr; gap: 18px; min-height: 50vh; }
.history-list { border-right: 1px solid var(--line); max-height: 65vh; overflow-y: auto; padding-right: 10px; }
.history-item { padding: 7px 10px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.history-item:hover { background: var(--hover); }
.history-item.sel { background: var(--active); }
.history-preview { max-height: 65vh; overflow-y: auto; }
.history-preview h2 { font-weight: 500; }
.history-text { font-size: 14px; }
.history-text table { border-collapse: collapse; }
.history-text td { border: 1px solid var(--line2); padding: 4px 6px; }

/* nastavení */
.seg { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--hover); margin-bottom: 16px; flex-wrap: wrap; }
.seg-btn { border: 0; background: none; padding: 6px 14px; border-radius: 999px; cursor: pointer; font-size: 13.5px; color: var(--ink2); }
.seg-btn:hover { color: var(--ink); }
.seg-btn.on { background: #fff; color: var(--ink); }
.settings-body { min-height: 260px; }
.settings-body > div > p:first-child { margin-top: 0; }
.users { display: flex; flex-direction: column; gap: 2px; max-height: 46vh; overflow-y: auto; }
.user-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; }
.user-row:hover { background: var(--hover); }
.user-row .chips { max-width: 220px; justify-content: flex-end; }
.user-name { font-weight: 500; font-size: 14px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--c-blue-bg); color: var(--c-blue); display: flex; align-items: center; justify-content: center; font-weight: 500; font-size: 12px; flex-shrink: 0; }
.add-user { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr auto; gap: 8px; }
.roles { display: flex; flex-direction: column; gap: 10px; }
.role-card { border-radius: 14px; background: rgba(12, 29, 44, 0.035); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.role-head { display: flex; gap: 8px; align-items: center; }
.role-head .input { font-weight: 500; }
.role-line { display: grid; grid-template-columns: 210px 1fr; gap: 10px; align-items: center; }
.add-role { display: flex; gap: 8px; margin-top: 14px; }
.import-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* okno Přístup */
.access { display: flex; flex-direction: column; gap: 8px; }
.access-mode { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line2); }
.access-mode.on { box-shadow: inset 0 0 0 1.5px var(--green); background: rgba(0, 171, 142, 0.04); }
.access-mode input { margin-top: 3px; accent-color: var(--green); }
.access-mode-title { font-weight: 500; font-size: 14px; }
.access-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.access-row { display: grid; grid-template-columns: 1fr 170px 30px; gap: 8px; align-items: center; padding: 4px 4px 4px 10px; border-radius: 10px; }
.access-row:first-child { grid-template-columns: 1fr 170px 30px; }
.access-row:hover { background: var(--hover); }
.access-who { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.access-who .tag { margin-left: 0; }
.access-add { margin-top: 4px; }
.access-note { margin: 4px 0 0; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--navy); color: #fff; padding: 9px 18px; border-radius: 999px; font-size: 14px; opacity: 0; transition: all 0.25s; z-index: 2000; box-shadow: var(--float); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }

/* ---------- domů ---------- */
.home-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 8px 0 8px; }
.home-title { font-size: 34px; font-weight: 500; letter-spacing: -0.015em; margin: 0; }
.home-section { margin-bottom: 26px; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 10px; }
.home-card { border-radius: 16px; padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-height: 112px; background: rgba(12, 29, 44, 0.035); }
.home-card:hover { background: rgba(12, 29, 44, 0.07); }
.home-card-icon { display: flex; color: var(--ink2); font-size: 22px; margin-bottom: 4px; }
.home-card-title { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ---------- mobil ---------- */
@media (max-width: 800px) {
  .sidebar { position: fixed; z-index: 50; height: calc(100% - 24px); box-shadow: var(--float); }
  body:not(.side-open) .sidebar { margin-left: -280px; box-shadow: none; }
  .side-opener { display: inline-flex; }
  .main { margin: 8px 8px 0 8px; }
  .topbar { padding-left: 52px; }
  .page, .page-wide { padding: 22px 16px 30vh; }
  .peek-wrap { padding: 0; }
  .peek { border-radius: 0; width: 100vw; }
  .peek-body { padding: 20px 16px 30vh; }
  .page-title { font-size: 30px; }
  .row-prop-name { width: 120px; }
  .add-user { grid-template-columns: 1fr 1fr; }
  .role-line { grid-template-columns: 1fr; }
  .history { grid-template-columns: 1fr; }
  .access-row { grid-template-columns: 1fr 140px 30px; }
  .crumb { max-width: 140px; }
  .save-status { display: none; }
  .access-btn, .topbar .pill { font-size: 0; gap: 0; padding: 7px; }
  .crumb:not(:last-child), .crumb-sep { display: none; }
}
