/* ==========================================================================
   JUST Tým – designový systém v2 (podle handoffu z Claude Design)
   Mobile-first, světlý (hlavní) + tmavý režim, tokeny přímo z návrhu.
   ========================================================================== */

:root {
  /* barvy – světlý režim */
  --green: #0b7d4b; --green-d: #096a40; --green-t: #0b7d4b; --green-s: #e6f2ec;
  --blue: #1e56b5;  --blue-t: #1e56b5;  --blue-s: #e7edf9;
  --amber: #f2a541; --amber-t: #9a6108; --amber-s: #fdf1de;
  --red: #d5473b;   --red-t: #c03c31;   --red-s: #fbeae8;
  --violet: #6c4bb6; --violet-t: #6c4bb6; --violet-s: #eee9f8;
  --bg: #f4f7f5; --card: #ffffff; --card2: #fbfdfc; --ink: #14211b; --ink2: #4c5c53; --muted: #7a8a81; --line: #e3e9e5;
  --brand-gradient: linear-gradient(150deg, #1e56b5, #0b7d4b);
  --overlay: rgba(20, 33, 27, .45);

  /* stíny */
  --sh1: 0 1px 2px rgba(20, 33, 27, .05);
  --sh2: 0 1px 2px rgba(20, 33, 27, .04), 0 10px 24px -14px rgba(20, 33, 27, .20);
  --sh3: 0 -6px 28px rgba(20, 33, 27, .10);
  --sh4: 0 14px 36px -12px rgba(20, 33, 27, .50);

  /* zaoblení a rozměry */
  --r-chip: 9px; --r-ctl: 12px; --r-card: 16px; --r-panel: 22px; --r-fab: 18px;
  --tap: 44px; --field: 52px; --nav-h: 64px; --topbar-h: 52px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --sidebar-w: 264px; --content-max: 1040px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, "Helvetica Neue", Arial, sans-serif;

  /* aliasy pro starší názvy používané ve views */
  --primary: var(--green); --primary-600: var(--green-d); --primary-soft: var(--green-s); --primary-soft-text: var(--green-t);
  --brand-blue: var(--blue); --accent: var(--amber); --danger: var(--red); --danger-soft: var(--red-s);
  --warning-soft: var(--amber-s); --warning-text: var(--amber-t); --info-soft: var(--blue-s); --info-text: var(--blue-t);
  --surface: var(--card); --surface-2: var(--bg); --text: var(--ink); --text-2: var(--ink2); --border: var(--line); --border-strong: var(--line);
  --shadow: var(--sh2); --shadow-lg: var(--sh4); --radius: var(--r-card); --radius-sm: var(--r-ctl); --radius-lg: var(--r-panel);
  --bottomnav-h: var(--nav-h);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --green-t: #5fd09a; --green-s: #12291f;
    --blue: #3b6fd0; --blue-t: #8fb3f0; --blue-s: #16243d;
    --amber: #e19a3c; --amber-t: #f0bd73; --amber-s: #2e2410;
    --red: #cf4f43; --red-t: #f09287; --red-s: #331a17;
    --violet: #6f56b8; --violet-t: #b7a3ea; --violet-s: #221b36;
    --bg: #0d1311; --card: #18211d; --card2: #1d2723; --ink: #eaf1ec; --ink2: #abbab2; --muted: #7f8f86; --line: #28342d;
    --overlay: rgba(0, 0, 0, .6);
    --sh1: 0 1px 2px rgba(0, 0, 0, .4);
    --sh2: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 24px -14px rgba(0, 0, 0, .8);
    --sh3: 0 -6px 28px rgba(0, 0, 0, .5);
    --sh4: 0 14px 36px -12px rgba(0, 0, 0, .8);
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
/* Pozor: overflow-x: hidden na html/body by udělal z body scroll kontejner a rozbil sticky sidebar i kolečko myši –
   proti vodorovnému přetečení se používá overflow-x: clip na app-shellu (nevytváří scroll kontejner). */
body { margin: 0; min-height: 100%; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
img { max-width: 100%; display: block; }
a { color: var(--green-t); text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
::selection { background: var(--green); color: #fff; }
.app-shell, .content, .main { overflow-x: clip; }
#app > .auth { overflow-x: clip; }
@media (max-width: 959px) { .input, input, select, textarea, .reply-form textarea, .search-bar input { font-size: 16px; } }
@keyframes sk { 0% { opacity: .55; } 50% { opacity: 1; } 100% { opacity: .55; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Splash ---------- */
.boot-splash { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: var(--bg); }
.boot-splash img { width: 96px; height: 96px; border-radius: 50%; }
.boot-spinner, .spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--green); animation: spin .8s linear infinite; }
.spinner.sm { width: 18px; height: 18px; border-width: 2px; }

/* ---------- Layout ---------- */
.app-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.sidebar { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 40; padding-top: var(--safe-t); height: calc(var(--topbar-h) + var(--safe-t));
  display: flex; align-items: center; gap: 4px; padding-left: 8px; padding-right: 8px;
  background: var(--card); border-bottom: 1px solid var(--line); box-shadow: var(--sh1);
}
.topbar-logo { width: 32px; height: 32px; border-radius: 50%; margin-left: 8px; flex-shrink: 0; }
.topbar-title { flex: 1; min-width: 0; font-size: 19px; font-weight: 700; letter-spacing: -.01em; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); line-height: 1.1; }
.topbar-actions { display: flex; align-items: center; gap: 2px; }
.main { flex: 1; width: 100%; padding: 14px 16px calc(var(--nav-h) + var(--safe-b) + 54px); }
.page { animation: fadeIn .18s ease backwards; display: flex; flex-direction: column; gap: 14px; }
.page > * { margin: 0; }

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr); background: var(--card); border-top: 1px solid var(--line); box-shadow: var(--sh3);
}
.bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11.5px; font-weight: 700; position: relative; }
.bottomnav a svg { width: 24px; height: 24px; }
.bottomnav a.active { color: var(--green-t); }
.bottomnav a .badge { position: absolute; top: 8px; left: calc(50% + 6px); }

@media (min-width: 960px) {
  .app-shell { flex-direction: row; }
  .sidebar { display: flex; flex-direction: column; width: var(--sidebar-w); flex-shrink: 0; position: sticky; top: 0; height: 100vh; height: 100dvh; background: var(--card); border-right: 1px solid var(--line); padding: 18px 14px; }
  .sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 18px; }
  .sidebar-brand img { width: 40px; height: 40px; border-radius: 50%; }
  .sidebar-brand strong { font-size: 16px; display: block; letter-spacing: -.01em; }
  .sidebar-brand small { color: var(--muted); font-size: 13px; }
  .sidebar-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--ink2); font-weight: 600; font-size: 15px; margin-bottom: 2px; transition: background .15s, color .15s; }
  .sidebar-nav a svg { width: 21px; height: 21px; }
  .sidebar-nav a:hover { background: var(--bg); color: var(--ink); }
  .sidebar-nav a.active { background: var(--green-s); color: var(--green-t); }
  .sidebar-nav a .badge { margin-left: auto; }
  .sidebar-nav .nav-sep { height: 1px; background: var(--line); margin: 10px 8px; }
  .sidebar-foot { margin-top: auto; }
  .sidebar-user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--bg); color: inherit; }
  .sidebar-user .name { font-weight: 700; font-size: 15px; }
  .sidebar-user .sub { font-size: 13px; color: var(--muted); }
  .content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .bottomnav { display: none; }
  .topbar { height: 72px; padding-left: 26px; padding-right: 20px; box-shadow: none; }
  .topbar-title { font-size: 22px; }
  .topbar-logo { display: none; }
  .main { max-width: var(--content-max); margin: 0 auto; padding: 26px 26px 60px; }
  .page { gap: 16px; }
}

/* ---------- Ikony ---------- */
svg { flex-shrink: 0; }
.icon { width: 22px; height: 22px; }
.icon-sm { width: 18px; height: 18px; }
.icon-lg { width: 28px; height: 28px; }
.link svg, .list-item .li-title svg, .alert a svg { width: 16px; height: 16px; vertical-align: -3px; }
.flex > svg, b > svg, h2 > svg, h3 > svg, .small > svg { width: 20px; height: 20px; vertical-align: -5px; }

/* ---------- Tlačítka ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; height: 48px; border-radius: var(--r-ctl); border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font-weight: 700; font-size: 16px; white-space: nowrap; transition: transform .08s, background .15s, opacity .15s; user-select: none; }
.btn:active { transform: scale(.98); opacity: .9; }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn svg, .btn > svg { width: 20px; height: 20px; }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-d); border-color: var(--green-d); }
.btn-soft { background: var(--green-s); border-color: transparent; color: var(--green-t); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink2); }
.btn-ghost:hover { background: var(--bg); }
.btn-danger { background: var(--red-s); border-color: transparent; color: var(--red-t); }
.btn-danger.solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn-sm { height: 40px; padding: 0 14px; font-size: 15px; border-radius: 11px; }
.btn-sm svg { width: 18px; height: 18px; }
.btn-xs { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 9px; }
.btn-lg { height: 54px; font-size: 17px; border-radius: 12px; }
.btn-lg svg { width: 22px; height: 22px; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: 11px; border-color: transparent; background: transparent; color: var(--ink2); position: relative; }
.btn-icon:hover { background: var(--bg); }
.btn-icon svg { width: 23px; height: 23px; }
.btn-icon .badge { position: absolute; top: 5px; right: 5px; border: 2px solid var(--card); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1; }
.link { background: none; border: 0; padding: 0; color: var(--green-t); font-weight: 700; font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; }
.fab { position: fixed; right: 16px; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); z-index: 35; height: 56px; padding: 0 20px; border-radius: var(--r-fab); background: var(--green); color: #fff; display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 700; box-shadow: 0 10px 26px -8px rgba(11, 125, 75, .75); transition: transform .15s; }
.fab:active { transform: scale(.96); }
.fab svg { width: 24px; height: 24px; }
@media (min-width: 960px) { .fab { bottom: 28px; right: 28px; } }

/* ---------- Formuláře ---------- */
.field { margin: 0 0 14px; display: flex; flex-direction: column; gap: 7px; }
.field > label, .label { display: block; font-size: 14px; font-weight: 600; color: var(--ink2); }
.field > label .muted { font-weight: 500; }
.input { width: 100%; height: var(--field); padding: 0 15px; border-radius: var(--r-ctl); border: 1.5px solid var(--line); background: var(--card); color: var(--ink); outline: none; -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; transition: border-color .15s, box-shadow .15s; }
.modal .input, .sheet-form .input { background: var(--bg); }
.input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(11, 125, 75, .15); }
.input::placeholder { color: var(--muted); }
.input.error { border-color: var(--red); }
textarea.input { height: auto; min-height: 104px; padding: 13px 15px; resize: vertical; line-height: 1.5; }
select.input { padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%237a8a81' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
.input.sm { height: 40px; padding: 0 12px; border-radius: 10px; font-size: 15px; }
.field .hint { font-size: 13px; color: var(--muted); }
.field .error { font-size: 14px; color: var(--red-t); font-weight: 600; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-row > * { min-width: 0; }
.check { display: flex; align-items: center; gap: 12px; padding: 10px 0; cursor: pointer; font-weight: 600; font-size: 15px; }
.check input { width: 22px; height: 22px; accent-color: var(--green); margin: 0; flex-shrink: 0; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.switch:last-child { border-bottom: 0; }
.switch .sw-text { flex: 1; font-size: 16px; font-weight: 600; }
.switch .sw-text small { display: block; color: var(--muted); font-size: 14px; font-weight: 400; margin-top: 2px; }
.switch input { appearance: none; -webkit-appearance: none; width: 52px; height: 32px; border-radius: 16px; background: var(--line); position: relative; flex-shrink: 0; margin: 0; transition: background .2s; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: var(--sh1); transition: transform .2s; }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(20px); }
.switch-group { background: var(--bg); border-radius: 16px; padding: 4px 12px; }
.switch-group .switch { padding: 12px 0; }
.file-drop { border: 2px dashed var(--line); border-radius: var(--r-card); padding: 22px 14px; text-align: center; color: var(--muted); cursor: pointer; font-size: 15px; }
.file-drop:hover, .file-drop.drag { border-color: var(--green); background: var(--green-s); color: var(--green-t); }
.file-drop > svg { width: 32px; height: 32px; margin: 0 auto 6px; }
.file-drop strong { display: block; color: var(--ink); }
.file-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.file-list .fl-item { display: flex; align-items: center; gap: 10px; font-size: 14px; background: var(--bg); padding: 8px 10px; border-radius: 11px; }
.file-list .fl-item img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; }
.file-list .fl-item .fl-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { height: 8px; background: var(--line); border-radius: 5px; overflow: hidden; margin-top: 10px; }
.progress > div, .progress > i { display: block; height: 100%; background: var(--green); border-radius: 5px; width: 0; transition: width .2s; }
.progress > i.full { background: var(--red); }
/* segmentový výběr (např. POR / ORG) */
.seg-choice { display: flex; gap: 8px; }
.seg-choice button { flex: 1; height: 50px; border-radius: 12px; background: var(--bg); border: 1.5px solid var(--line); font-size: 15px; font-weight: 600; color: var(--ink2); }
.seg-choice button.active { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }

/* ---------- Karty a seznamy ---------- */
.card { background: var(--card); border-radius: var(--r-card); box-shadow: var(--sh2); overflow: hidden; }
.card-pad { padding: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-head h3 { font-size: 17px; flex: 1; }
.card-link { display: block; color: inherit; transition: background .15s; }
.card-link:active { background: var(--bg); }
.panel { background: var(--card); border-radius: var(--r-panel); box-shadow: var(--sh2); padding: 24px 18px; }
.grid-2 > .card, .grid-3 > .card, .album-grid > .card { margin-top: 0; }
.section { display: flex; flex-direction: column; gap: 10px; }
.section-title { display: flex; align-items: center; justify-content: space-between; padding: 6px 2px 0; }
.section-title h2 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.section-title a, .section-title button.link { font-size: 15px; font-weight: 600; color: var(--green-t); min-height: 44px; display: inline-flex; align-items: center; padding: 0 4px; }
.section-label { font-size: 15px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; padding: 4px 2px 0; }

.list { background: var(--card); border-radius: var(--r-card); box-shadow: var(--sh2); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: inherit; border-bottom: 1px solid var(--line); min-height: 64px; width: 100%; text-align: left; background: none; transition: background .12s; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover, button.list-item:hover { background: var(--card2); }
.list-item .li-body { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; line-height: 1.3; }
.list-item .li-title span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.list-item .li-sub { font-size: 14px; color: var(--ink2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .li-right { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.list-item .chev { color: var(--muted); width: 20px; height: 20px; flex-shrink: 0; }
.li-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--green-s); color: var(--green-t); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 20px; }
.li-icon svg { width: 21px; height: 21px; }
.li-icon.blue { background: var(--blue-s); color: var(--blue-t); }
.li-icon.amber { background: var(--amber-s); color: var(--amber-t); }
.li-icon.red { background: var(--red-s); color: var(--red-t); }
.li-icon.violet { background: var(--violet-s); color: var(--violet-t); }
.li-icon.gray { background: var(--bg); color: var(--ink2); }
.li-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 11px; }
/* samostatná karta-řádek (výstrahy na Domů, propojené položky) */
.row-card { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: var(--card); border-radius: var(--r-card); padding: 14px 16px; box-shadow: var(--sh2); color: inherit; }
.row-card .li-body { flex: 1; min-width: 0; }
.row-card .li-title { font-size: 16px; font-weight: 700; line-height: 1.3; }
.row-card .li-sub { font-size: 14px; color: var(--ink2); margin-top: 2px; }
.row-card .chev { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.row-card:active { background: var(--card2); }
.stack { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Avatar ---------- */
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-gradient); color: #fff; font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.g1 { background: linear-gradient(150deg, #1e56b5, #0b7d4b); }
.avatar.g2 { background: linear-gradient(150deg, #6c4bb6, #1e56b5); }
.avatar.g3 { background: linear-gradient(150deg, #0b7d4b, #5fd09a); }
.avatar.g4 { background: linear-gradient(150deg, #f2a541, #d5473b); }
.avatar.g5 { background: linear-gradient(150deg, #d5473b, #6c4bb6); }
.avatar-xs { width: 28px; height: 28px; font-size: 11px; }
.avatar-sm { width: 34px; height: 34px; font-size: 13px; }
.avatar-md { width: 46px; height: 46px; font-size: 16px; }
.avatar-lg { width: 64px; height: 64px; font-size: 22px; }
.avatar-xl { width: 96px; height: 96px; font-size: 34px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { width: 38px; height: 38px; font-size: 14px; border: 2.5px solid var(--card); margin-left: -10px; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-stack .avatar.more { background: var(--bg); color: var(--ink2); }

/* ---------- Chipy, štítky, badge ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: var(--r-chip); background: var(--bg); color: var(--ink2); font-size: 13px; font-weight: 700; white-space: nowrap; line-height: 1.2; }
.chip svg { width: 14px; height: 14px; }
.chip-primary { background: var(--green-s); color: var(--green-t); }
.chip-blue { background: var(--blue-s); color: var(--blue-t); }
.chip-amber { background: var(--amber-s); color: var(--amber-t); }
.chip-red { background: var(--red-s); color: var(--red-t); }
.chip-org { background: var(--violet-s); color: var(--violet-t); letter-spacing: .04em; font-weight: 800; }
.chip-por { background: var(--bg); color: var(--ink2); letter-spacing: .04em; font-weight: 800; }
.chip-sm { padding: 3px 8px; font-size: 12px; border-radius: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.badge.primary { background: var(--green); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); display: inline-block; flex-shrink: 0; }

/* ---------- Filtrační chipy, segmenty ---------- */
.tabs { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; height: 40px; padding: 0 15px; border-radius: 20px; background: var(--card); color: var(--ink2); font-size: 15px; font-weight: 600; border: 1.5px solid var(--line); display: inline-flex; align-items: center; gap: 7px; transition: all .15s; }
.tabs button svg { width: 17px; height: 17px; }
.tabs button.active { background: var(--green); color: #fff; border-color: var(--green); font-weight: 700; }
.tabs button .badge { min-width: 20px; height: 20px; font-size: 12px; }
@media (min-width: 960px) { .tabs { margin: 0; padding: 2px 0 4px; flex-wrap: wrap; } }
.segmented { display: flex; gap: 6px; background: var(--card); padding: 5px; border-radius: 14px; border: 1px solid var(--line); }
.segmented button { flex: 1; height: 44px; border-radius: 10px; font-size: 15px; font-weight: 700; color: var(--ink2); background: transparent; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: all .15s; }
.segmented button svg { width: 18px; height: 18px; }
.segmented button.active { background: var(--green); color: #fff; }
/* RSVP – barevné stavy */
.rsvp-seg { display: flex; gap: 8px; }
.rsvp-seg button { flex: 1; height: 50px; border-radius: 12px; font-size: 16px; font-weight: 700; background: var(--bg); color: var(--ink2); border: 1.5px solid var(--line); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.rsvp-seg button svg { width: 18px; height: 18px; }
.rsvp-seg button.going.active { background: var(--green); border-color: var(--green); color: #fff; }
.rsvp-seg button.maybe.active { background: var(--amber); border-color: var(--amber); color: #fff; }
.rsvp-seg button.declined.active { background: var(--red); border-color: var(--red); color: #fff; }
.rsvp-seg button:disabled { opacity: .5; }

/* ---------- Domů ---------- */
.home-head { display: flex; flex-direction: column; gap: 14px; }
.greet h1 { font-size: 25px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.greet p { font-size: 15px; color: var(--ink2); line-height: 1.5; margin-top: 6px; }
.stats-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats-3 .stat { background: var(--card); border-radius: var(--r-card); padding: 14px 12px; box-shadow: var(--sh2); text-align: center; }
.stats-3 .stat b { display: block; font-size: 26px; font-weight: 700; color: var(--green-t); letter-spacing: -.02em; }
.stats-3 .stat span { font-size: 14px; color: var(--ink2); margin-top: 2px; display: block; }
.banner-grad { background: linear-gradient(160deg, #1e56b5, #0b7d4b); border-radius: var(--r-card); padding: 16px; display: flex; gap: 12px; align-items: flex-start; box-shadow: var(--sh2); color: #fff; }
.banner-grad img { width: 40px; height: 40px; border-radius: 50%; background: #fff; flex-shrink: 0; }
.banner-grad .b-title { font-size: 16px; font-weight: 700; }
.banner-grad .b-text { font-size: 14px; color: rgba(255, 255, 255, .88); line-height: 1.45; margin-top: 3px; }
.banner-grad .b-btn { margin-top: 10px; height: 40px; padding: 0 16px; border-radius: 11px; background: #fff; color: #0b7d4b; font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; }
.banner-grad .b-close { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .8); margin: -4px -4px 0 0; flex-shrink: 0; }
.banner-grad .b-close svg { width: 20px; height: 20px; }
.banner-card { background: var(--card); border-radius: var(--r-card); padding: 14px 16px; display: flex; gap: 12px; align-items: center; box-shadow: var(--sh2); }
.banner-card .li-body { flex: 1; min-width: 0; }
.banner-card .li-title { font-size: 16px; font-weight: 700; }
.banner-card .li-sub { font-size: 14px; color: var(--ink2); margin-top: 2px; }
.banner-card .btn-sm { height: 40px; padding: 0 14px; border-radius: 11px; flex-shrink: 0; }
.banner-card .b-close { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--muted); flex-shrink: 0; }
.banner-card .b-close svg { width: 20px; height: 20px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-card { background: var(--card); border-radius: var(--r-card); padding: 16px 14px; box-shadow: var(--sh2); text-align: left; min-height: 104px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; color: inherit; }
.quick-card .li-icon { width: 38px; height: 38px; }
.quick-card b { font-size: 15px; font-weight: 700; line-height: 1.3; }
.photo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-row a, .photo-row div { aspect-ratio: 1; border-radius: 13px; overflow: hidden; background: var(--line); display: block; position: relative; }
.photo-row img { width: 100%; height: 100%; object-fit: cover; }
.photo-row .more { position: absolute; inset: 0; background: rgba(20, 33, 27, .55); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; }
.hero { background: var(--brand-gradient); color: #fff; border-radius: var(--r-panel); padding: 22px 18px; position: relative; overflow: hidden; }
.hero h1 { font-size: 22px; font-weight: 800; }
.hero p { opacity: .9; font-size: 15px; }
.cols-2 { display: contents; }
@media (min-width: 960px) {
  .cols-2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px; align-items: start; }
  .cols-2 > div { display: flex; flex-direction: column; gap: 16px; }
  .alerts-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

/* ---------- Události ---------- */
.event-card { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; background: var(--card); border-radius: var(--r-card); padding: 14px; box-shadow: var(--sh2); color: inherit; }
.event-card:active { background: var(--card2); }
.event-date { flex: 0 0 54px; width: 54px; height: 58px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; background: linear-gradient(150deg, #7a8a81, #a5b3ab); }
.event-date.going { background: linear-gradient(150deg, #0b7d4b, #5fd09a); }
.event-date.maybe { background: linear-gradient(150deg, #f2a541, #e07f2e); }
.event-date.invited { background: linear-gradient(150deg, #1e56b5, #5b8ae0); }
.event-date.declined { background: linear-gradient(150deg, #7a8a81, #a5b3ab); }
.event-date.past { background: var(--bg); color: var(--muted); }
.event-date .m { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.event-date .d { font-size: 22px; font-weight: 700; line-height: 1.05; }
.event-card .ec-body { flex: 1; min-width: 0; }
.event-card .ec-title { font-size: 16px; font-weight: 700; line-height: 1.3; }
.event-card .ec-time { font-size: 14px; color: var(--ink2); margin-top: 5px; line-height: 1.4; }
.event-card .ec-place { font-size: 14px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-card .ec-foot { display: flex; gap: 6px; align-items: center; margin-top: 9px; flex-wrap: wrap; }
.event-card .ec-foot .n { font-size: 13px; color: var(--muted); font-weight: 500; }
.event-card .ec-cover { width: 64px; height: 58px; border-radius: 12px; overflow: hidden; flex-shrink: 0; }
.event-card .ec-cover img { width: 100%; height: 100%; object-fit: cover; }
.event-hero { margin: -14px -16px 0; height: 168px; background: var(--brand-gradient); position: relative; display: flex; align-items: flex-end; padding: 16px; overflow: hidden; }
.event-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.event-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .45)); }
.event-hero .eh-date { position: absolute; top: 14px; left: 16px; background: rgba(255, 255, 255, .94); border-radius: 13px; padding: 7px 11px; text-align: center; min-width: 54px; z-index: 2; }
.event-hero .eh-date .m { font-size: 11px; font-weight: 800; color: #0b7d4b; letter-spacing: .08em; text-transform: uppercase; display: block; }
.event-hero .eh-date .d { font-size: 21px; font-weight: 800; color: #14211b; line-height: 1.05; display: block; }
.event-hero .eh-menu { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(255, 255, 255, .92); color: #14211b; }
.event-hero h1 { position: relative; z-index: 2; font-size: 23px; font-weight: 700; color: #fff; line-height: 1.25; letter-spacing: -.01em; text-shadow: 0 1px 12px rgba(0, 0, 0, .3); }
@media (min-width: 960px) { .event-hero { margin: 0; height: 210px; border-radius: var(--r-panel); } .event-hero h1 { font-size: 30px; } }
.info-rows { background: var(--card); border-radius: var(--r-card); box-shadow: var(--sh2); overflow: hidden; }
.info-row { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row > svg { width: 22px; height: 22px; color: var(--green-t); flex-shrink: 0; }
.info-row .ir-body { flex: 1; min-width: 0; }
.info-row .ir-title { font-size: 16px; font-weight: 600; line-height: 1.35; }
.info-row .ir-sub { font-size: 14px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info-row .ir-act { font-size: 14px; font-weight: 700; color: var(--green-t); min-height: 44px; padding: 0 6px; text-align: right; display: inline-flex; align-items: center; flex-shrink: 0; }
.prose { white-space: pre-wrap; word-wrap: break-word; line-height: 1.6; font-size: 16px; }
.prose a { text-decoration: underline; }
.sticky-bar { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 30; background: var(--card); border-top: 1px solid var(--line); padding: 10px 12px 12px; box-shadow: var(--sh3); }
.sticky-bar .sb-label { font-size: 14px; font-weight: 600; color: var(--ink2); padding: 0 2px 8px; }
.sticky-spacer { height: 84px; }
@media (min-width: 960px) {
  .sticky-bar { position: static; border: 0; box-shadow: var(--sh2); border-radius: var(--r-card); padding: 16px; }
  .sticky-spacer { display: none; }
  .content .sticky-bar { left: var(--sidebar-w); }
}
.who-card .wc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.who-card .wc-head h3 { font-size: 17px; }
.who-card .avatar-stack { margin-top: 14px; }
.who-card .chips { margin-top: 14px; gap: 8px; }
.who-card .chips .chip { font-size: 14px; font-weight: 600; padding: 7px 11px; border-radius: 10px; }

/* Kalendář */
.cal { background: var(--card); border-radius: var(--r-panel); padding: 16px 14px; box-shadow: var(--sh2); }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; }
.cal-head h3 { font-size: 18px; font-weight: 700; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-grid .dow { text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); padding-bottom: 6px; }
.cal-grid .day { height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 15px; font-weight: 500; color: var(--ink); border-radius: 11px; }
.cal-grid .day.past { color: var(--muted); }
.cal-grid .day.other { color: var(--line); }
.cal-grid .day.has-ev { font-weight: 700; font-size: 16px; }
.cal-grid .day.going-day { background: var(--green-s); }
.cal-grid .day.sel { background: var(--green); color: #fff; }
.cal-grid .day.today > span { width: 38px; height: 38px; border-radius: 50%; background: var(--green); color: #fff; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.cal-grid .day.today.sel > span { background: #fff; color: var(--green); }
.cal-grid .day .dots { display: flex; gap: 3px; height: 6px; }
.cal-grid .day .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.cal-grid .day .dots i.maybe { background: var(--amber); }
.cal-grid .day .dots i.invited { background: var(--blue); }
.cal-grid .day .dots i.none { background: var(--muted); }
.cal-grid .day.sel .dots i { background: #fff; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 12px 4px 0; border-top: 1px solid var(--line); margin-top: 8px; font-size: 13px; color: var(--ink2); }
.cal-legend span { display: flex; align-items: center; gap: 6px; }
.cal-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; }
.cal-legend i.maybe { background: var(--amber); }
.cal-legend i.invited { background: var(--blue); }
.cal-today-hint { font-size: 13px; color: var(--muted); text-align: center; padding-top: 8px; }
.cal-layout { display: contents; }
.cal-side { display: contents; }
.cal-grid .day.sel { background: var(--green-s); box-shadow: inset 0 0 0 1.5px var(--green); color: var(--ink); }
.cal-grid .day.sel .dots i { background: var(--green); }
.cal-grid .day .ev-lbl { display: none; }
.cal-grid .day .more-lbl { display: none; }
@media (min-width: 960px) {
  .cal-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
  .cal-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  .cal { max-width: none; padding: 18px; }
  .cal-head h3 { font-size: 20px; }
  .cal-head .cal-nav { display: flex; gap: 6px; }
  .cal-head .cal-nav .btn-icon { width: 40px; height: 40px; background: var(--bg); }
  .cal-head .cal-nav .btn-today { height: 40px; padding: 0 14px; border-radius: 11px; background: var(--bg); font-size: 14px; font-weight: 700; }
  .cal-grid { gap: 4px; }
  .cal-grid .dow { text-align: left; padding-left: 4px; }
  .cal-grid .day { height: 74px; border-radius: 11px; background: var(--bg); padding: 7px; align-items: flex-start; justify-content: flex-start; gap: 4px; font-size: 14px; font-weight: 600; overflow: hidden; }
  .cal-grid .day > span:first-child { line-height: 1.2; }
  .cal-grid .day.past { color: var(--muted); font-weight: 500; }
  .cal-grid .day.other { color: var(--line); font-weight: 500; }
  .cal-grid .day.going-day { background: var(--bg); }
  .cal-grid .day.today { background: var(--green-s); box-shadow: inset 0 0 0 1.5px var(--green); }
  .cal-grid .day.today > span:first-child { width: 26px; height: 26px; font-size: 14px; }
  .cal-grid .day .dots { display: none; }
  .cal-grid .day .ev-lbl { display: block; width: 100%; background: var(--green); color: #fff; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 3px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; line-height: 1.2; }
  .cal-grid .day .ev-lbl.maybe { background: var(--amber); color: #3a2a08; }
  .cal-grid .day .ev-lbl.invited { background: var(--blue); }
  .cal-grid .day .ev-lbl.none { background: var(--line); color: var(--ink2); }
  .cal-grid .day .ev-lbl.declined { background: var(--line); color: var(--muted); text-decoration: line-through; }
  .cal-grid .day .more-lbl { display: block; font-size: 11px; font-weight: 700; color: var(--muted); }
  .cal-legend i { border-radius: 3px; width: 10px; height: 10px; }
  .cal-legend .link { display: none; }
}

/* ---------- Diskuze ---------- */
.post-card { display: block; width: 100%; text-align: left; background: var(--card); border-radius: var(--r-card); padding: 15px 16px; box-shadow: var(--sh2); color: inherit; border: 1.5px solid transparent; }
.post-card.pinned { background: var(--green-s); border-color: rgba(11, 125, 75, .25); }
.post-head { display: flex; gap: 12px; align-items: flex-start; }
.post-head .avatar { width: 42px; height: 42px; }
.post-head .ph-name { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.post-head .ph-time { font-size: 14px; color: var(--muted); font-weight: 400; }
.post-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 7px; }
.post-title { font-size: 17px; font-weight: 700; line-height: 1.3; margin-top: 8px; }
.post-excerpt { font-size: 15px; color: var(--ink2); line-height: 1.5; margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Fotky v příspěvcích: nikdy neořezávat – celá fotka, na výšku omezená výškou, po stranách jemné pozadí */
.post-img { margin-top: 12px; border-radius: 13px; overflow: hidden; background: var(--bg); }
.post-img img { width: 100%; height: auto; max-height: 420px; object-fit: contain; display: block; }
.post-detail .post-img img { max-height: 70vh; }
.reply .r-img img { width: auto; max-width: 100%; max-height: 320px; height: auto; }
.post-foot { display: flex; gap: 18px; align-items: center; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink2); font-size: 15px; font-weight: 600; }
.post-foot span, .post-foot button { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; padding: 0; color: inherit; font-weight: 600; font-size: 15px; }
.post-foot svg { width: 20px; height: 20px; }
.post-foot .liked { color: var(--green-t); }
.post-foot .liked svg { fill: currentColor; }
.post-detail .post-title { font-size: 21px; margin-top: 10px; letter-spacing: -.01em; }
.post-detail .prose { margin-top: 10px; }
.post-actions { display: flex; gap: 8px; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.post-actions .btn { height: 44px; padding: 0 14px; border-radius: 11px; background: var(--bg); border-color: transparent; color: var(--ink2); font-size: 15px; }
.post-actions .btn.liked { background: var(--green-s); color: var(--green-t); }
.post-actions .btn.liked svg { fill: currentColor; }
.reply { background: var(--card); border-radius: var(--r-card); padding: 14px 16px; box-shadow: var(--sh1); display: flex; gap: 12px; }
.reply .avatar { width: 38px; height: 38px; font-size: 14px; }
.reply .r-body { flex: 1; min-width: 0; }
.reply .r-head { display: flex; align-items: baseline; gap: 8px; font-size: 15px; }
.reply .r-head b { font-weight: 700; }
.reply .r-head small { color: var(--muted); font-size: 14px; }
.reply .r-text { margin-top: 4px; white-space: pre-wrap; word-wrap: break-word; font-size: 16px; line-height: 1.55; }
.reply .r-img { margin-top: 8px; max-width: 280px; border-radius: 12px; overflow: hidden; }
.reply-box { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 30; background: var(--card); border-top: 1px solid var(--line); padding: 10px 12px; box-shadow: var(--sh3); }
.reply-form { display: flex; gap: 8px; align-items: center; }
.reply-form textarea { flex: 1; min-width: 0; height: 46px; max-height: 120px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); padding: 11px 14px; resize: none; outline: none; line-height: 1.4; }
.reply-form textarea:focus { border-color: var(--green); }
.reply-form .btn-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--bg); color: var(--ink2); flex-shrink: 0; }
.reply-form .send { background: var(--green); color: #fff; }
.reply-spacer { height: 74px; }
@media (min-width: 960px) { .reply-box { position: sticky; bottom: 0; left: auto; right: auto; border-radius: var(--r-card); border: 0; box-shadow: var(--sh2); } .reply-spacer { display: none; } }

/* ---------- Galerie ---------- */
.album-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 700px) { .album-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .album-grid { grid-template-columns: repeat(4, 1fr); } }
.album-card { display: block; color: inherit; background: var(--card); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--sh2); }
.album-card .ac-cover { aspect-ratio: 4/3; background: var(--line); position: relative; }
.album-card .ac-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-card .ac-count { position: absolute; right: 8px; bottom: 8px; background: rgba(20, 33, 27, .6); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 10px; font-weight: 700; }
.album-card .ac-body { padding: 10px 12px 12px; }
.album-card .ac-title { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-card .ac-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.album-card.new { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: var(--green-s); color: var(--green-t); font-weight: 700; min-height: 150px; box-shadow: none; }
.album-card.new .li-icon { background: var(--card); }
.ac-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); }
.ac-empty svg { width: 36px; height: 36px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.photo-grid button, .photo-grid a { aspect-ratio: 1; overflow: hidden; background: var(--line); border-radius: 12px; display: block; position: relative; padding: 0; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid .ph-like { position: absolute; right: 6px; bottom: 6px; background: rgba(20, 33, 27, .6); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 7px; border-radius: 8px; display: flex; align-items: center; gap: 4px; }
.photo-grid .ph-like svg { width: 12px; height: 12px; fill: currentColor; }
@media (min-width: 600px) { .photo-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 960px) { .photo-grid { grid-template-columns: repeat(5, 1fr); } }
.upload-float { position: fixed; left: 16px; right: 16px; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); z-index: 120; background: var(--card); border-radius: var(--r-card); box-shadow: var(--sh4); padding: 14px 16px; }
@media (min-width: 960px) { .upload-float { left: auto; width: 400px; bottom: 24px; right: 24px; } }

/* ---------- Soubory ---------- */
.file-icon { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; color: var(--ink2); background: var(--bg); flex-shrink: 0; }
.file-icon.pdf { background: var(--red-s); color: var(--red-t); }
.file-icon.doc, .file-icon.docx, .file-icon.ppt, .file-icon.pptx { background: var(--blue-s); color: var(--blue-t); }
.file-icon.xls, .file-icon.xlsx, .file-icon.csv { background: var(--green-s); color: var(--green-t); }
.file-icon.jpg, .file-icon.jpeg, .file-icon.png, .file-icon.gif, .file-icon.webp, .file-icon.heic { background: var(--violet-s); color: var(--violet-t); }
.file-icon.zip, .file-icon.rar, .file-icon.mp4, .file-icon.mov { background: var(--amber-s); color: var(--amber-t); }
.file-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 11px; }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 15px; color: var(--muted); flex-wrap: wrap; }
.crumbs a { color: var(--green-t); font-weight: 700; }
.crumbs svg { width: 16px; height: 16px; }

/* ---------- Tabulky ---------- */
.sheet-card { display: block; width: 100%; text-align: left; background: var(--card); border-radius: var(--r-card); padding: 14px 16px; box-shadow: var(--sh2); color: inherit; }
.sheet-card.closed { opacity: .75; box-shadow: var(--sh1); }
.sheet-card .sc-title { font-size: 17px; font-weight: 700; line-height: 1.3; }
.sheet-card .sc-sub { font-size: 14px; color: var(--ink2); margin-top: 4px; }
.sheet-card .sc-bar { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.sheet-card .sc-bar .progress { flex: 1; margin: 0; }
.sheet-card .sc-bar b { font-size: 14px; font-weight: 600; color: var(--ink2); }
.row-cards { display: flex; flex-direction: column; gap: 10px; }
.row-card-item { background: var(--card); border-radius: var(--r-card); padding: 14px 16px; box-shadow: var(--sh2); }
.row-card-item.mine { background: var(--green-s); }
.row-card-item .rc-head { display: flex; gap: 11px; align-items: center; }
.row-card-item .rc-head .avatar { width: 38px; height: 38px; font-size: 14px; }
.row-card-item .rc-who { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-card-item .rc-mine { font-size: 13px; font-weight: 700; color: var(--green-t); margin-top: 2px; }
.row-card-item .rc-grid { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.row-card-item .rc-grid .k { font-size: 14px; color: var(--muted); }
.row-card-item .rc-grid .v { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.row-card-item .rc-grid .v svg { width: 18px; height: 18px; color: var(--green-t); vertical-align: -4px; }
.sum-card { display: flex; justify-content: space-between; align-items: center; background: var(--card); border-radius: var(--r-card); padding: 14px 16px; box-shadow: var(--sh1); gap: 12px; flex-wrap: wrap; }
.sum-card .k { font-size: 15px; font-weight: 700; color: var(--ink2); }
.sum-card .v { font-size: 18px; font-weight: 700; }
.sheet-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-card); background: var(--card); box-shadow: var(--sh2); }
.sheet-table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; }
.sheet-table th, .sheet-table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sheet-table th { font-size: 14px; font-weight: 700; color: var(--ink2); background: var(--bg); position: sticky; top: 0; }
.sheet-table tr.mine td { background: var(--green-s); }
.sheet-table tr:last-child td { border-bottom: 0; }
.sheet-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.sheet-table tfoot td { font-weight: 700; background: var(--bg); }
.sheet-table .row-actions { display: flex; gap: 4px; }
.sheet-table .who { display: flex; align-items: center; gap: 9px; }
.sheet-table .who .avatar { width: 32px; height: 32px; font-size: 12px; }
.sheet-table td.check svg { width: 18px; height: 18px; color: var(--green-t); }
.table-hint { font-size: 14px; color: var(--muted); text-align: center; }
.col-editor { display: flex; flex-direction: column; gap: 8px; }
.col-editor .ce-row { display: grid; grid-template-columns: 1fr 118px 40px; gap: 6px; align-items: center; background: var(--bg); padding: 8px; border-radius: 12px; }
.col-editor .ce-row .ce-opts { grid-column: 1 / -1; }
.col-editor .ce-row .ce-req { grid-column: 1 / -1; font-size: 14px; padding: 2px 0; }
.col-editor .input { background: var(--card); }
.sheet-fill { height: 8px; border-radius: 5px; background: var(--line); overflow: hidden; margin-top: 12px; }
.sheet-fill i { display: block; height: 100%; background: var(--green); border-radius: 5px; }
.sheet-fill i.full { background: var(--red); }

/* ---------- Upozornění ---------- */
.notif { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: inherit; align-items: flex-start; }
.notif:last-child { border-bottom: 0; }
.notif.unread { background: var(--green-s); }
.notif.unread .li-icon { background: var(--card); }
.notif .n-body { flex: 1; min-width: 0; }
.notif .n-title { font-weight: 600; font-size: 16px; line-height: 1.35; }
.notif.unread .n-title { font-weight: 700; }
.notif .n-text { font-size: 14px; color: var(--ink2); margin-top: 3px; }
.notif .n-time { font-size: 13px; color: var(--muted); margin-top: 3px; }
.notif .dot { margin-top: 6px; }

/* ---------- Profil / členové ---------- */
.profile-head { text-align: center; display: flex; flex-direction: column; align-items: center; }
.profile-head h1 { font-size: 23px; font-weight: 700; margin-top: 16px; letter-spacing: -.01em; }
.profile-head .sub { color: var(--ink2); font-size: 15px; margin-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat-row .stat { background: var(--card); border-radius: 14px; box-shadow: var(--sh1); padding: 12px 4px; text-align: center; }
.stat-row .stat b { display: block; font-size: 20px; font-weight: 700; color: var(--green-t); }
.stat-row .stat small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.avatar-edit { position: relative; display: inline-block; }
.avatar-edit .btn-icon { position: absolute; right: -4px; bottom: -4px; width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: #fff; border: 3px solid var(--card); }
.avatar-edit .btn-icon svg { width: 18px; height: 18px; }
.kv-row { display: flex; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 15px; }
.kv-row:last-child { border-bottom: 0; }
.kv-row .k { color: var(--muted); flex-shrink: 0; }
.kv-row .v { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.kv-row.block { flex-direction: column; gap: 5px; }
.kv-row.block .v { white-space: normal; text-align: left; font-weight: 400; line-height: 1.55; }
.pref-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pref-chips button { font-size: 15px; font-weight: 600; padding: 9px 13px; border-radius: 11px; background: var(--bg); color: var(--ink2); }
.pref-chips button.active { background: var(--green); color: #fff; font-weight: 700; }
.member-row { display: flex; gap: 12px; align-items: center; padding: 12px 8px 12px 14px; border-bottom: 1px solid var(--line); }
.member-row:last-child { border-bottom: 0; }
.member-row .mr-link { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: center; color: inherit; }
.member-row .mr-name { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.member-row .mr-sub { font-size: 14px; color: var(--muted); margin-top: 2px; }
.member-row .mr-call { width: 46px; height: 46px; border-radius: 12px; background: var(--green-s); color: var(--green-t); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.member-row .mr-call svg { width: 21px; height: 21px; }

/* ---------- Modály / bottom sheety ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: var(--overlay); display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .16s ease; }
.modal-backdrop.center { align-items: center; padding: 20px; }
.modal { background: var(--card); width: 100%; max-height: 88dvh; max-height: 88vh; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; animation: sheetUp .24s cubic-bezier(.32, .72, 0, 1); box-shadow: 0 -14px 44px -10px rgba(20, 33, 27, .45); }
.modal-backdrop.center .modal { border-radius: 22px; max-width: 420px; animation: pop .18s ease; }
.modal-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 10px auto 4px; flex-shrink: 0; }
.modal-head { display: flex; align-items: center; gap: 8px; padding: 4px 12px 10px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.modal-head h2 { flex: 1; text-align: center; font-size: 17px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-head .mh-cancel { min-height: 44px; padding: 0 8px; font-size: 16px; font-weight: 600; color: var(--ink2); }
.modal-head .mh-ok { min-height: 44px; padding: 0 10px; font-size: 16px; font-weight: 700; color: var(--green-t); }
.modal-head .mh-ok.danger { color: var(--red-t); }
.modal-head .mh-ok:disabled { opacity: .5; }
.modal-head .mh-spacer { width: 64px; }
.modal-body { padding: 14px 16px calc(28px + var(--safe-b)); overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.modal-body .field:last-child { margin-bottom: 0; }
.modal-foot { padding: 10px 16px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); display: flex; gap: 10px; }
.modal-foot .btn { flex: 1; }
.modal-backdrop.center .modal-head { border-bottom: 0; padding: 18px 18px 0; }
.modal-backdrop.center .modal-head h2 { text-align: left; font-size: 19px; white-space: normal; }
.modal-backdrop.center .modal-grip { display: none; }
.modal-backdrop.center .modal-body { padding: 10px 18px 16px; }
.modal-backdrop.center .modal-foot { border-top: 0; padding: 0 18px 18px; }
.modal.closing { animation: sheetDown .2s ease forwards; }
@keyframes sheetDown { to { transform: translateY(100%); opacity: 0; } }
@media (min-width: 700px) {
  .modal-backdrop { align-items: center; padding: 20px; }
  .modal { border-radius: 22px; max-width: 560px; max-height: calc(100vh - 40px); animation: pop .18s ease; }
  .modal-grip { display: none; }
  .modal-head { padding-top: 16px; }
}
.menu { position: absolute; z-index: 90; background: var(--card); border-radius: 16px; box-shadow: 0 18px 44px -12px rgba(20, 33, 27, .5); min-width: 236px; padding: 6px; animation: pop .15s ease; }
.menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 12px; border-radius: 11px; text-align: left; font-weight: 600; font-size: 16px; }
.menu button:hover { background: var(--bg); }
.menu button.danger { color: var(--red-t); }
.menu button svg { width: 20px; height: 20px; color: var(--muted); }
.menu button.danger svg { color: var(--red-t); }
.menu .menu-sep { height: 1px; background: var(--line); margin: 4px 8px; }

/* ---------- Toast ---------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-b) + 14px); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
@media (min-width: 960px) { .toasts { bottom: 24px; } }
.toast { background: #14211b; color: #fff; padding: 13px 16px; border-radius: 14px; font-weight: 600; font-size: 15px; box-shadow: var(--sh4); display: flex; align-items: center; gap: 10px; animation: sheetUp .25s ease; pointer-events: auto; }
.toast svg { width: 24px; height: 24px; flex-shrink: 0; }
.toast.success svg { color: #5fd09a; }
.toast.error svg { color: #f09287; }

/* ---------- Prázdné stavy, skeleton, alerty ---------- */
.empty { background: var(--card); border-radius: var(--r-panel); padding: 34px 22px; box-shadow: var(--sh2); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.empty > svg { width: 34px; height: 34px; color: var(--green-t); box-sizing: content-box; padding: 19px; border-radius: 50%; background: var(--green-s); }
.empty h3 { font-size: 19px; font-weight: 700; }
.empty p { font-size: 15px; color: var(--ink2); line-height: 1.55; }
.empty .btn { margin-top: 4px; }
.skeleton { background: var(--card); border-radius: var(--r-card); box-shadow: var(--sh1); animation: sk 1.4s ease-in-out infinite; }
.sk-line { height: 16px; width: 45%; border-radius: 8px; background: var(--line); box-shadow: none; margin-bottom: 8px; }
.sk-card { height: 104px; margin-bottom: 0; }
.alert { padding: 14px 16px; border-radius: var(--r-card); font-size: 15px; display: flex; gap: 12px; align-items: flex-start; line-height: 1.45; color: inherit; }
.alert > svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 1px; }
.alert b { font-weight: 700; font-size: 16px; }
.alert.info { background: var(--blue-s); color: var(--ink); }
.alert.info > svg { color: var(--blue-t); }
.alert.warn { background: var(--amber-s); color: var(--ink); }
.alert.warn > svg, .alert.warn b { color: var(--amber-t); }
.alert.error { background: var(--red-s); color: var(--ink); }
.alert.error > svg, .alert.error b { color: var(--red-t); }
.alert.success { background: var(--green-s); color: var(--ink); }
.alert.success > svg, .alert.success b { color: var(--green-t); }
.alert.form-alert { font-weight: 600; font-size: 14px; margin-bottom: 14px; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: calc(28px + var(--safe-t)) 18px calc(24px + var(--safe-b)); }
.auth-inner { width: 100%; max-width: 420px; }
.auth-logo { width: 92px; height: 92px; border-radius: 50%; margin: 10px auto 0; box-shadow: 0 10px 30px -12px rgba(11, 125, 75, .55); }
.auth h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; text-align: center; margin-top: 18px; }
.auth .sub { color: var(--ink2); text-align: center; font-size: 15px; margin: 6px 0 26px; }
.auth .field .input { background: var(--card); }
.auth-foot { margin-top: 18px; text-align: center; font-size: 15px; color: var(--muted); }
.auth-foot a { font-weight: 700; }
.auth-sep { height: 1px; background: var(--line); margin: 18px 0; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--green-t); min-height: 44px; }
.auth-back svg { width: 20px; height: 20px; }
.success-circle { width: 76px; height: 76px; border-radius: 50%; background: var(--green-s); color: var(--green-t); display: flex; align-items: center; justify-content: center; margin: 0 auto; }
.success-circle svg { width: 36px; height: 36px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 150; background: #0b0f0d; display: flex; flex-direction: column; animation: fadeIn .15s ease; touch-action: pan-y; }
.lightbox .lb-top { display: flex; align-items: center; justify-content: space-between; padding: calc(8px + var(--safe-t)) 8px 8px; color: #fff; position: absolute; top: 0; left: 0; right: 0; z-index: 2; }
.lightbox .lb-top .btn-icon, .lightbox .lb-bottom .btn-icon { color: #fff; background: rgba(255, 255, 255, .1); }
.lightbox .lb-img { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lightbox .lb-img img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; border-radius: 4px; }
.lightbox .lb-bottom { position: absolute; bottom: 0; left: 0; right: 0; padding: 12px 16px calc(14px + var(--safe-b)); color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); display: flex; align-items: center; gap: 10px; }
.lightbox .lb-bottom .lb-info { flex: 1; min-width: 0; font-size: 14px; }
.lightbox .lb-bottom .lb-info b { display: block; font-size: 15px; }
.lightbox .lb-bottom .liked { color: #ff8a80; }
.lightbox .lb-bottom .liked svg { fill: currentColor; }
.lightbox .lb-bottom .del { background: rgba(213, 71, 59, .22); color: #f09287; }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; display: none; align-items: center; justify-content: center; }
.lightbox .lb-nav.prev { left: 12px; }
.lightbox .lb-nav.next { right: 12px; }
@media (min-width: 960px) { .lightbox .lb-nav { display: flex; } }

/* ---------- Hledání ---------- */
.search-bar { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 0 14px; height: 50px; }
.search-bar:focus-within { border-color: var(--green); }
.search-bar svg { width: 20px; height: 20px; color: var(--muted); }
.search-bar input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; height: 100%; font-size: 16px; color: var(--ink); }
.search-results { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Administrace ---------- */
.color-swatches { display: flex; gap: 10px; }
.color-swatches button { width: 44px; height: 44px; border-radius: 12px; }
.color-swatches button.active { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--green); }
.log-box { background: #0e1512; color: #9fd8b9; font: 12px/1.7 ui-monospace, Menlo, Consolas, monospace; padding: 12px 14px; border-radius: 14px; max-height: 50vh; overflow: auto; white-space: pre-wrap; word-break: break-all; }
.log-box .err { color: #f09287; }
.stats-4 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stats-4 .stat { background: var(--card); border-radius: var(--r-card); padding: 14px; box-shadow: var(--sh2); }
.stats-4 .stat b { display: block; font-size: 26px; font-weight: 700; color: var(--green-t); letter-spacing: -.02em; }
.stats-4 .stat span { font-size: 14px; color: var(--ink2); }
@media (min-width: 960px) { .stats-4 { grid-template-columns: repeat(4, 1fr); } }


/* ---------- Desktop layouty podle prototypu ---------- */
.tb-search { display: none; }
.tb-primary { display: none; }
.split { display: contents; }
.split > .col { display: contents; }
@media (min-width: 960px) {
  .tb-search { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: 12px; border: 1px solid var(--line); padding: 0 14px; height: 44px; width: 300px; }
  .tb-search svg { width: 20px; height: 20px; color: var(--muted); }
  .tb-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font-size: 15px; outline: none; }
  .tb-primary { display: inline-flex; height: 44px; padding: 0 17px; border-radius: 12px; background: var(--green); color: #fff; font-size: 15px; font-weight: 700; align-items: center; gap: 8px; margin-left: 4px; }
  .tb-primary:hover { background: var(--green-d); }
  .tb-primary svg { width: 20px; height: 20px; }
  #tb-search { display: none; }
  .fab { display: none; }
  .topbar { gap: 14px; }
  .split { display: grid; gap: 18px; align-items: start; }
  .split > .col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  .split.s-15 { grid-template-columns: 1.5fr 1fr; }
  .split.s-13 { grid-template-columns: 1.3fr 1fr; }
  .split.s-135 { grid-template-columns: 1.35fr 1fr; }
  .split.s-260 { grid-template-columns: 1fr 260px; }
  .split.s-280 { grid-template-columns: 1fr 280px; }
  .home-head { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 20px; }
  .home-head .greet h1 { font-size: 29px; }
  .home-head .greet p { font-size: 16px; margin-top: 7px; }
  .home-head .stats-3 { flex: 0 0 auto; display: flex; }
  .home-head .stats-3 .stat { padding: 13px 20px; min-width: 92px; }
  .home-head .stats-3 .stat b { font-size: 24px; }
  .banner-grad { display: none; }
  .alerts-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .event-card .ec-title { font-size: 17px; }
  .event-date { flex-basis: 56px; width: 56px; height: 60px; }
  .event-date .d { font-size: 23px; }
  .section-title h2 { font-size: 18px; }
  .post-card { padding: 17px 18px; }
  .post-card .post-title { font-size: 19px; }
  .post-card .post-excerpt { font-size: 16px; -webkit-line-clamp: 3; }
  .side-card { background: var(--card); border-radius: var(--r-card); padding: 16px; box-shadow: var(--sh2); }
  .side-card h3 { font-size: 16px; font-weight: 700; }
  .side-card .big { font-size: 32px; font-weight: 700; color: var(--amber-t); margin-top: 6px; }
  .side-card .big.ok { color: var(--green-t); }
  .side-card p { font-size: 14px; color: var(--ink2); line-height: 1.5; margin-top: 4px; }
  .side-card .top-row { display: flex; align-items: center; gap: 10px; margin-top: 11px; font-size: 14px; }
  .side-card .top-row .avatar { width: 32px; height: 32px; font-size: 12px; }
  .side-card .top-row b { flex: 1; font-weight: 600; }
  .side-card .top-row span { color: var(--muted); }
  .action-list { display: flex; flex-direction: column; gap: 8px; }
  .action-list button { height: 46px; border-radius: 12px; background: var(--bg); font-size: 15px; font-weight: 700; text-align: left; padding: 0 14px; display: flex; align-items: center; gap: 10px; }
  .action-list button:hover { background: var(--line); }
  .action-list button.danger { color: var(--red-t); }
  .action-list button svg { width: 18px; height: 18px; color: var(--muted); }
  .event-hero.desk { margin: 0; height: 210px; border-radius: 22px; padding: 22px; }
  .event-hero.desk .eh-date { top: 18px; left: 22px; border-radius: 14px; padding: 8px 13px; }
  .event-hero.desk .eh-date .d { font-size: 23px; }
  .event-hero.desk h1 { font-size: 30px; letter-spacing: -.02em; }
  .info-row { padding: 15px 18px; }
  .info-row .ir-act br { display: none; }
  .sheet-table { min-width: 0; }
  .sheet-table th, .sheet-table td { padding: 14px 12px; white-space: normal; }
  .member-table .mt-head, .member-table .mt-row { display: grid; grid-template-columns: 1.4fr 90px 130px 1fr 200px; align-items: center; }
  .member-table .mt-head { background: var(--bg); border-bottom: 1px solid var(--line); }
  .member-table .mt-head > div { padding: 13px 12px; font-size: 14px; font-weight: 700; color: var(--ink2); }
  .member-table .mt-head > div:first-child { padding-left: 16px; }
  .member-table .mt-row { border-bottom: 1px solid var(--line); }
  .member-table .mt-row:last-child { border-bottom: 0; }
  .member-table .mt-row > div { padding: 12px; font-size: 15px; color: var(--ink2); min-width: 0; }
  .member-table .mt-name { display: flex; align-items: center; gap: 12px; padding: 11px 16px !important; color: var(--ink) !important; }
  .member-table .mt-name .n { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .member-table .mt-name .l { font-size: 13px; font-weight: 700; color: var(--green-t); margin-top: 2px; }
  .member-table .mt-actions { display: flex; gap: 8px; padding: 9px 12px !important; }
  .member-table .mt-actions .btn { height: 38px; padding: 0 12px; border-radius: 10px; font-size: 14px; border-color: transparent; }
  .member-table .mt-actions .btn-icon { width: 38px; padding: 0; background: var(--bg); }
  .stats-4 .stat b { font-size: 27px; }
  .stats-4 .stat { padding: 16px; }
  .alerts-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .quick-card { min-height: 96px; }
}
/* karty na mobilu, tabulka na desktopu: */
@media (max-width: 959px) { .member-table { display: none; } }
@media (min-width: 960px) { .member-list-mobile { display: none; } }

/* ---------- Drobné mobilní komponenty z prototypu ---------- */
.drop-hint { border: 1.5px dashed var(--line); border-radius: var(--r-card); padding: 20px; text-align: center; color: var(--muted); font-size: 15px; line-height: 1.5; }
.drop-hint.drag { border-color: var(--green); background: var(--green-s); color: var(--green-t); }
.album-card.new .ac-cover { background: var(--green-s); display: flex; align-items: center; justify-content: center; color: var(--green-t); }
.album-card.new .ac-cover svg { width: 34px; height: 34px; }
.album-card.new .ac-title { color: var(--green-t); }
.album-card.new { box-shadow: var(--sh2); min-height: 0; display: block; text-align: left; }
.hint-center { font-size: 14px; color: var(--muted); text-align: center; padding: 4px 0; }
.faq-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 600; }
.faq-item svg { width: 20px; height: 20px; color: var(--muted); transition: transform .2s; flex-shrink: 0; }
.faq-item.open svg { transform: rotate(180deg); }
.faq-body { padding: 0 16px 14px; font-size: 15px; color: var(--ink2); line-height: 1.55; border-bottom: 1px solid var(--line); }
.faq-body:last-child, .faq-item:last-child { border-bottom: 0; }
.help-card h3 { font-size: 18px; }
.help-card p { font-size: 16px; line-height: 1.55; color: var(--ink2); margin-top: 8px; }
.help-card p strong { color: var(--ink); }
.ce-box { background: var(--bg); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ce-box .ce-line { display: flex; gap: 8px; align-items: center; }
.ce-box .ce-line + .ce-line { padding-top: 10px; border-top: 1px solid var(--line); }
.ce-box .ce-line .input { background: var(--card); height: 48px; border-radius: 11px; }
.ce-box .ce-line select.input { flex: 0 0 118px; font-weight: 600; font-size: 15px; }
.ce-box .ce-line .ce-rm { width: 44px; height: 44px; border-radius: 11px; background: var(--card); border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--red-t); flex-shrink: 0; }
.ce-box .ce-line .ce-rm svg { width: 18px; height: 18px; }
.ce-box .ce-opts { display: flex; gap: 7px; flex-wrap: wrap; padding-left: 2px; align-items: center; }
.ce-box .ce-opts .opt { font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 9px; background: var(--card); border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 6px; }
.ce-box .ce-opts .opt button { color: var(--muted); display: inline-flex; }
.ce-box .ce-opts .opt button svg { width: 12px; height: 12px; }
.ce-box .ce-opts .add-opt { font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 9px; background: var(--green-s); color: var(--green-t); }
.ce-box .ce-req { font-size: 14px; color: var(--ink2); display: flex; align-items: center; gap: 8px; padding-left: 2px; }
.ce-box .ce-req input { width: 18px; height: 18px; accent-color: var(--green); margin: 0; }
.ce-box .ce-add { height: 48px; border-radius: 11px; background: var(--card); border: 1.5px dashed var(--line); font-size: 15px; font-weight: 700; color: var(--green-t); }
.switch-card { display: flex; align-items: center; gap: 12px; background: var(--bg); border-radius: 14px; padding: 13px 14px; cursor: pointer; }
.switch-card .sw-text { flex: 1; font-size: 16px; font-weight: 600; }
.switch-card input { appearance: none; -webkit-appearance: none; width: 52px; height: 32px; border-radius: 16px; background: var(--line); position: relative; flex-shrink: 0; margin: 0; transition: background .2s; }
.switch-card input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: var(--sh1); transition: transform .2s; }
.switch-card input:checked { background: var(--green); }
.switch-card input:checked::after { transform: translateX(20px); }
.segmented.plain button.active { background: var(--card); color: var(--ink); box-shadow: var(--sh1); }
.segmented.plain { background: var(--bg); border: 0; }
.activity-row { display: flex; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.activity-row:last-child { border-bottom: 0; }
.activity-row .avatar { width: 34px; height: 34px; font-size: 13px; }
.activity-row b { font-size: 15px; font-weight: 600; display: block; }
.activity-row small { font-size: 14px; color: var(--muted); display: block; margin-top: 2px; }
.req-row { padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; border-bottom: 1px solid var(--line); }
.req-row:last-child { border-bottom: 0; }
.req-row .rq-name { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 16px; font-weight: 700; }
.req-row .rq-sub { font-size: 14px; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.req-row .rq-actions { display: flex; gap: 8px; margin-top: 11px; }
.req-row .rq-actions .btn { flex: 1; height: 46px; font-size: 15px; }
.req-row .rq-actions .btn-icon { flex: 0 0 46px; width: 46px; height: 46px; background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; }
@media (min-width: 960px) { .req-row { align-items: center; padding: 16px 18px; } .req-row .rq-actions { margin-top: 0; flex: 0 0 auto; } .req-row .rq-actions .btn { flex: 0 0 auto; height: 44px; padding: 0 18px; } }
.kv-input { display: flex; align-items: center; gap: 8px; }
.kv-input .input { width: 64px; height: 46px; text-align: center; padding: 0 10px; border-radius: 11px; }
.card-rows .kv-row { align-items: center; }
.card-rows .kv-row .v.red { color: var(--red-t); font-weight: 400; }
.inline-code { font-size: 13px; color: var(--muted); font-family: ui-monospace, Menlo, Consolas, monospace; margin-top: 4px; word-break: break-all; }

/* Lightbox podle prototypu */
.lightbox .lb-top { position: static; display: flex; align-items: center; gap: 4px; padding: calc(8px + var(--safe-t)) 8px 0; background: none; }
.lightbox .lb-top .lb-count { flex: 1; text-align: center; font-size: 16px; font-weight: 700; color: #fff; }
.lightbox .lb-top .btn-icon { background: transparent; }
.lightbox .lb-img { padding: 0 10px; }
.lightbox .lb-img img { border-radius: 12px; }
.lightbox .lb-bottom { position: static; background: none; flex-direction: column; align-items: stretch; gap: 14px; padding: 14px 16px calc(16px + var(--safe-b)); }
.lightbox .lb-author { display: flex; align-items: center; gap: 11px; }
.lightbox .lb-author .avatar { width: 36px; height: 36px; font-size: 13px; }
.lightbox .lb-author b { display: block; font-size: 15px; font-weight: 600; color: #fff; }
.lightbox .lb-author span { font-size: 14px; color: rgba(255, 255, 255, .6); }
.lightbox .lb-actions { display: flex; gap: 8px; }
.lightbox .lb-actions button, .lightbox .lb-actions a { flex: 1; height: 48px; border-radius: 12px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; }
.lightbox .lb-actions button svg, .lightbox .lb-actions a svg { width: 20px; height: 20px; }
.lightbox .lb-actions .liked { color: #ff8a80; }
.lightbox .lb-actions .liked svg { fill: currentColor; }
.lightbox .lb-actions .del { flex: 0 0 48px; background: rgba(213, 71, 59, .22); color: #f09287; }
@media (min-width: 960px) { .lightbox .lb-actions { max-width: 520px; margin: 0 auto; width: 100%; } .lightbox .lb-author { max-width: 520px; margin: 0 auto; width: 100%; } }
.upload-float .uf-head { display: flex; align-items: center; gap: 10px; }
.upload-float .uf-head b { flex: 1; font-size: 16px; }
.upload-float .uf-note { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* ---------- Utility ---------- */
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-1 { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { height: 1px; background: var(--line); }
.text-primary { color: var(--green-t); }
.text-danger { color: var(--red-t); }
.bold { font-weight: 700; }
.install-banner { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: var(--r-card); padding: 12px 14px; box-shadow: var(--sh2); }
.steps { counter-reset: s; display: flex; flex-direction: column; gap: 12px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; counter-increment: s; font-size: 16px; line-height: 1.45; }
.steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ios-share { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; }
.kbd { display: inline-block; padding: 1px 6px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media print { .topbar, .bottomnav, .sidebar, .fab { display: none !important; } }

@media (min-width: 960px) { .mobile-only { display: none !important; } .table-hint { display: none; } }

/* Administrace – doplňky */
.hint { font-size: 13px; color: var(--muted); }
.req-row.desk { align-items: center; }
.req-row.desk .rq-actions { margin-top: 0; flex-shrink: 0; }
.req-row.desk .rq-actions .btn { flex: 0 0 auto; height: 40px; font-size: 14px; padding: 0 14px; }
.req-row .rq-actions .btn-icon { flex: 0 0 46px; }
.req-row.desk .rq-actions .btn-icon { flex: 0 0 40px; padding: 0; }
.card-rows button.kv-row { background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; color: inherit; cursor: pointer; }
.card-rows button.kv-row:last-child { border-bottom: 0; }
.card-rows .kv-row .chev { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.card + .card, .card + .stats-4, .stats-4 + .quick-grid, .quick-grid + .card, .stack + .card, .stack + .stats-4, .alerts-2 + .stats-4 { margin-top: 12px; }
@media (min-width: 960px) { .split .col > .card + .card, .split .col > .quick-grid + .card { margin-top: 0; } }
@media (min-width: 960px) { .stats-4 { grid-template-columns: repeat(4, 1fr); } .stats-4 + .split { margin-top: 18px; } .alerts-2 + .stats-4 { margin-top: 16px; } }

/* Více / Hledat / Nápověda */
.more-item { min-height: 0; padding: 14px 16px; }
.more-item .li-icon { width: 40px; height: 40px; border-radius: 11px; }
.more-item .li-icon svg { width: 20px; height: 20px; }
.more-logout { display: block; min-height: 0; padding: 15px 16px; font-size: 16px; font-weight: 700; color: var(--red-t); }
.row-card + .list { margin-top: 12px; }
.list + .center, .stack + .center { margin-top: 12px; }
.search-bar.focus { border-color: var(--green); }
.search-bar + .stack { margin-top: 12px; }
.sr-item { display: block; width: 100%; text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); color: inherit; }
.sr-item:last-child { border-bottom: 0; }
.sr-item:hover { background: var(--bg); }
.sr-title { font-size: 16px; font-weight: 600; }
.sr-sub { font-size: 14px; color: var(--muted); margin-top: 2px; }
.help-hero { background: linear-gradient(160deg, #1e56b5, #0b7d4b); border-radius: 22px; padding: 26px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; box-shadow: var(--sh2); }
.help-hero img { width: 64px; height: 64px; border-radius: 50%; display: block; background: #fff; }
.help-hero .hh-title { font-size: 21px; font-weight: 700; color: #fff; }
.help-hero .hh-text { font-size: 15px; color: rgba(255,255,255,.9); line-height: 1.55; max-width: 520px; }
.help-card ol.steps li span { flex: 1; font-size: 16px; line-height: 1.5; }
.help-card ol.steps li strong { font-weight: 700; }
.faq-item .flex-1 { text-align: left; }
@media (min-width: 960px) { .help-hero { padding: 34px 28px; } }

/* Galerie – doplňky */
.pick-btn { height: 54px; width: 100%; border-radius: 12px; border: 1.5px dashed var(--line); background: var(--bg); display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 16px; font-weight: 700; color: var(--ink2); }
.pick-btn svg { width: 20px; height: 20px; }
.pick-btn.has { border-style: solid; border-color: var(--green); color: var(--green-t); background: var(--green-s); }
.album-card.new .ac-cover { aspect-ratio: 4/3; }
.photo-grid + .hint-center { margin-top: 10px; }
.drop-hint { margin-top: 14px; }
.desktop-only { display: none; }
@media (min-width: 960px) { .desktop-only { display: block; } }
.crumbs { gap: 6px; font-size: 14px; color: var(--ink2); }
.crumbs .sep { color: var(--muted); }
.crumbs > span:last-child { font-weight: 600; color: var(--ink); }
.crumbs + .list, .crumbs + .alert { margin-top: 12px; }
.list + .section-label { margin-top: 14px; }
.section-label + .list { margin-top: 8px; }
.folder-item, .file-item { min-height: 0; padding: 13px 16px; }
.file-item { padding-right: 8px; }
.folder-item .li-icon { width: 42px; height: 42px; border-radius: 11px; }
.ce-box .ce-col { display: flex; flex-direction: column; gap: 10px; }
.ce-box .ce-col + .ce-col { padding-top: 10px; border-top: 1px solid var(--line); }
.ce-box .ce-col select.input { flex: 0 0 118px; }
.ce-box .ce-col + .ce-add { margin-top: 2px; }
.card-rows .kv-row.block { align-items: stretch; }
.album-card.new { background: var(--card); color: inherit; }
.album-card.new .ac-body .ac-sub { color: var(--muted); font-weight: 400; }

/* ---------- Účet + odhlášení vpravo nahoře, podmenu v sidebaru ---------- */
.tb-account { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: none; padding: 0; }
.tb-account .avatar { width: 32px; height: 32px; font-size: 12px; }
.tb-logout { display: none; color: var(--muted); }
@media (min-width: 960px) {
  .tb-logout { display: inline-flex; }
  .tb-account { width: 44px; height: 44px; }
  .tb-account .avatar { width: 36px; height: 36px; font-size: 13px; }
  .sidebar-nav .nav-children { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 8px 33px; padding-left: 12px; border-left: 2px solid var(--line); }
  .sidebar-nav .nav-children a { padding: 7px 12px; font-size: 14px; font-weight: 600; color: var(--ink2); border-radius: 9px; margin-bottom: 0; }
  .sidebar-nav .nav-children a:hover { background: var(--bg); color: var(--ink); }
  .sidebar-nav .nav-children a.active { background: var(--green-s); color: var(--green-t); font-weight: 700; }
}

/* ---------- Obsah: Produkty / Vzdělávání / Ceník ---------- */
.ci-card { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: var(--r-card); padding: 12px 14px 12px 12px; box-shadow: var(--sh2); color: inherit; }
.ci-card .li-icon { width: 52px; height: 52px; border-radius: 13px; }
.ci-card .li-icon svg { width: 26px; height: 26px; }
.ci-thumb { width: 92px; height: 66px; border-radius: 12px; overflow: hidden; background: var(--line); position: relative; flex-shrink: 0; }
.ci-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ci-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(20,33,27,.25); }
.ci-play svg { width: 26px; height: 26px; fill: currentColor; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.ci-body { flex: 1; min-width: 0; }
.ci-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.ci-tags:empty { display: none; }
.ci-title { font-size: 16px; font-weight: 700; line-height: 1.3; }
.ci-excerpt { font-size: 14px; color: var(--ink2); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; }
.ci-meta { font-size: 13px; color: var(--muted); margin-top: 5px; }
.ci-card .chev { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.tabs .cnt { font-size: 12px; opacity: .75; margin-left: 2px; }
.video-wrap { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; border-radius: var(--r-card); overflow: hidden; box-shadow: var(--sh3); }
.video-wrap video, .video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.pdf-box { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 16px; background: var(--card); border-radius: var(--r-card); box-shadow: var(--sh2); text-align: center; }
.pdf-frame { width: 100%; height: 70vh; border: 0; border-radius: var(--r-card); background: var(--card); box-shadow: var(--sh2); }
@media (min-width: 960px) { .video-wrap { max-width: 900px; } }
.event-card .ec-foot .n { display: inline-flex; align-items: center; gap: 3px; }
.event-card .ec-foot .n svg { width: 13px; height: 13px; }
.chip-violet { background: var(--violet-s); color: var(--violet-t); }
.chip > svg { width: 13px; height: 13px; }

/* ---------- Registrace: předvolba CZ, GDPR ---------- */
.prefix-input { display: flex; align-items: stretch; }
.prefix-input .pre { display: flex; align-items: center; padding: 0 14px; background: var(--bg); border: 1.5px solid var(--line); border-right: 0; border-radius: 12px 0 0 12px; font-weight: 800; color: var(--ink2); letter-spacing: .04em; font-size: 15px; }
.prefix-input .input { border-radius: 0 12px 12px 0; flex: 1; min-width: 0; }
.gdpr-check { align-items: flex-start; margin: 4px 0 16px; font-size: 14px; line-height: 1.5; color: var(--ink2); }
.gdpr-check input { margin-top: 3px; }
a.stat { color: inherit; display: block; }
.stats-3 .stat.stat-link b { display: flex; align-items: center; justify-content: center; height: 31px; }
.stats-3 .stat.stat-link b svg { width: 26px; height: 26px; color: var(--green-t); }

/* Produkty – záložky kategorií s ikonami; na PC stejně široké */
.cat-tabs button svg { width: 17px; height: 17px; }
.cat-tabs .cnt { font-size: 12px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bg); color: var(--ink2); display: inline-flex; align-items: center; justify-content: center; margin-left: 2px; }
.cat-tabs .cnt:empty { display: none; }
.cat-tabs button.active .cnt { background: rgba(255,255,255,.22); color: #fff; }
@media (min-width: 960px) {
  .cat-tabs { margin: 0; padding: 5px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; max-width: 560px; overflow: visible; gap: 4px; }
  .cat-tabs button { flex: 1 1 0; justify-content: center; height: 42px; border: 0; border-radius: 10px; background: transparent; }
  .cat-tabs button:hover { background: var(--bg); }
  .cat-tabs button.active { background: var(--green); color: #fff; }
}

/* ---------- Dvoufázové ověření, captcha, superadmin ---------- */
.code-input { font-size: 22px; letter-spacing: .32em; text-align: center; font-family: ui-monospace, Menlo, Consolas, monospace; }
.qr-box { display: flex; justify-content: center; padding: 14px; background: #fff; border-radius: 16px; margin-bottom: 14px; box-shadow: var(--sh1); }
.qr-box svg { width: 220px; height: 220px; display: block; }
.backup-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.backup-codes span { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; font-weight: 600; background: var(--bg); border-radius: 10px; padding: 9px 10px; text-align: center; letter-spacing: .04em; }
.captcha-box { display: flex; justify-content: center; min-height: 78px; }
.captcha-box > div { max-width: 100%; }
.sheet-table .num { text-align: right; font-variant-numeric: tabular-nums; }
#sa-body .card + .card, #sa-body .card + .stats-4, #sa-body .stats-4 + .split, #sa-body .alert + .stats-4, #sa-body .stack + .stats-4 { margin-top: 12px; }
#sa-body .segmented + .search-bar, #sa-body .search-bar + #log-body { margin-top: 12px; }
#log-body .activity-row small { white-space: normal; }
@media (max-width: 520px) { .backup-codes { grid-template-columns: 1fr; } .qr-box svg { width: 180px; height: 180px; } }
