/* MTM – Moris Tasks Manager – štýl Moris Slovakia */
:root {
  --moris: #0f325b;
  --moris-hover: #0a2341;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f9fafb;
  --white: #ffffff;
  --sidebar-bg: #0f325b;
  --sidebar-text: #c0d0e2;
  --green: #15803d;
  --red: #ef4444;
  --amber: #b45309;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(15, 50, 91, .07);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--moris); }
h1, h2, h3 { margin: 0; }
code { background: #eef2f7; padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.dim { color: #9aa3af; }

/* Prepínač termínu (má/nemá termín) */
.inline-check { margin: 0 0 8px; }
.deadline-field input[type="date"]:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { padding: 20px 24px 60px; max-width: 1200px; width: 100%; margin: 0 auto; }

/* ---------- Sidebar ---------- */
.sidebar {
  width: 232px; flex-shrink: 0; background: var(--sidebar-bg); color: var(--sidebar-text);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar-logo { padding: 22px 18px 14px; color: #fff; }
.sidebar-logo svg { width: 130px; display: block; }
.sidebar-app-name { display: block; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; margin-top: 8px; color: var(--sidebar-text); font-weight: 600; }
.sidebar-nav { flex: 1; padding: 10px 10px; overflow-y: auto; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 2px 0;
  color: var(--sidebar-text); text-decoration: none; border-radius: var(--radius-sm);
  font-weight: 500; transition: background .15s, color .15s;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav a.active { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; }
.nav-ico { width: 20px; text-align: center; }
.nav-badge { margin-left: auto; background: #ef4444; color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 8px; }
.nav-section { font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,.45); padding: 16px 12px 4px; font-weight: 600; }
.sidebar-footer { padding: 14px; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; text-decoration: none; }
.sidebar-user:hover .sidebar-user-name { text-decoration: underline; }
.sidebar-user-name { color: #fff; font-weight: 600; font-size: 13px; }
.sidebar-user-role { font-size: 11px; color: var(--sidebar-text); }
.logout-link { display: block; text-align: center; color: var(--sidebar-text); font-size: 12px; text-decoration: none; padding: 7px; border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius-sm); }
.logout-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-overlay { display: none; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: 56px; background: var(--white);
  border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; padding: 0 20px;
}
.topbar-title { font-weight: 700; font-size: 15px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-user { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; text-decoration: none; color: var(--text); }
.topbar-user:hover .topbar-username { color: var(--moris); }
.topbar-clock { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.topbar-clock > span { display: inline-flex; align-items: center; }
.topbar-clock .clock-day { color: var(--text-muted); }
.topbar-clock .clock-week { color: var(--moris); font-weight: 700; }
.topbar-clock .clock-time { font-variant-numeric: tabular-nums; min-width: 64px; }
.hamburger { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--text); padding: 4px 8px; }

/* ---------- Avatar (fotka alebo iniciály) ---------- */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 12px; flex-shrink: 0;
  letter-spacing: .3px; overflow: hidden;
}
.avatar-sm { width: 26px; height: 26px; font-size: 10px; }
.avatar-xl { width: 84px; height: 84px; font-size: 28px; }
.avatar-photo { background: #e5e7eb; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.avatar-approver { box-shadow: 0 0 0 2px #f59e0b; }

/* ---------- Karty / spoločné ---------- */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 12px; gap: 10px; flex-wrap: wrap; }
.section-head h2 { font-size: 17px; font-weight: 700; }
.muted { color: var(--text-muted); }
.small { font-size: 12px; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.box-label { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--text-muted); font-weight: 700; margin-bottom: 8px; }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 13px; }
.alert-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* ---------- Tlačidlá ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px solid transparent; border-radius: 10px; padding: 10px 18px;
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap;
  cursor: pointer; text-decoration: none; transition: all .15s; box-sizing: border-box;
}
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--moris); color: #fff; }
.btn-primary:hover { background: var(--moris-hover); }
.btn-ghost { background: var(--white); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--moris); color: var(--moris); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #166534; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-danger-ghost { background: var(--white); color: var(--red); border-color: var(--border); }
.btn-danger-ghost:hover { border-color: var(--red); }
.btn-link { background: none; border: 0; color: var(--moris); cursor: pointer; font-family: inherit; font-size: 13px; text-decoration: underline; }

/* ---------- Formuláre ---------- */
input, select, textarea {
  font-family: inherit; font-size: 14px; color: var(--text);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; background: var(--white); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--moris); box-shadow: 0 0 0 3px rgba(15,50,91,.12); }
input[type="color"] { padding: 3px; width: 46px; height: 40px; cursor: pointer; }

/* Select v štýle stránky (nie systémový vzhľad) */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 15px;
  padding-right: 38px;
  cursor: pointer;
}
select:hover { border-color: #c8d2de; }

/* Zoznam s vlastnými checkboxami (výber kolegov) */
.check-list { border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--white); max-height: 215px; overflow-y: auto; padding: 5px; }
.check-item { display: flex; align-items: center; gap: 10px; padding: 8px 9px; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text); margin: 0; }
.check-item:hover { background: var(--bg); }
.check-item input { display: none; }
.check-box { width: 18px; height: 18px; border: 1.5px solid #c8d2de; border-radius: 5px; background: var(--white); flex-shrink: 0; position: relative; transition: all .12s; }
.check-item input:checked + .check-box { background: var(--moris); border-color: var(--moris); }
.check-item input:checked + .check-box::after { content: ''; position: absolute; left: 5px; top: 1.5px; width: 4px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* Ikony */
.ico { width: 1em; height: 1em; vertical-align: -0.14em; flex-shrink: 0; }
.btn .ico { width: 15px; height: 15px; }
.nav-ico .ico { width: 17px; height: 17px; display: block; }
.badge .ico { width: 11px; height: 11px; }
.meta-ico { display: inline-flex; align-items: center; gap: 3px; }
.meta-ico .ico { width: 12px; height: 12px; }
.tl-link .ico { width: 13px; height: 13px; }
.att-name { display: inline-flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hamburger .ico { width: 22px; height: 22px; display: block; }

/* FAB – nová úloha */
.fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 70;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--moris); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(15, 50, 91, .35);
  transition: transform .15s, background .15s, box-shadow .15s;
}
.fab .ico { width: 24px; height: 24px; }
.fab:hover { background: var(--moris-hover); transform: scale(1.06); box-shadow: 0 8px 26px rgba(15, 50, 91, .45); }

/* ---------- Ikonové tlačidlo (...) ---------- */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: var(--white); border: 1.5px solid var(--border); color: var(--text-muted); cursor: pointer;
  transition: all .15s;
}
.icon-btn:hover { border-color: var(--moris); color: var(--moris); background: var(--bg); }
.icon-btn .ico { width: 20px; height: 20px; }

/* ---------- Rozbaľovacie menu (Akcie) ---------- */
.menu-wrap { position: relative; flex-shrink: 0; }
.menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 40;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(15, 50, 91, .15); min-width: 230px; padding: 6px;
}
.menu.open { display: block; }
.menu a, .menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: none; border: 0; padding: 10px 12px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13.5px; font-weight: 500; color: var(--text);
  text-decoration: none; cursor: pointer;
}
.menu a:hover, .menu button:hover { background: var(--bg); }
.menu .ico { width: 15px; height: 15px; color: var(--text-muted); }
.menu form { margin: 0; }
.menu .menu-danger { color: var(--red); }
.menu .menu-danger .ico { color: var(--red); }

/* ---------- Účastníci ako chipy ---------- */
.hidden { display: none !important; }
.people-section { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.people-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.people-label { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); font-weight: 700; }
.person-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 999px;
  padding: 3px 10px 3px 4px; font-size: 13px; font-weight: 500;
}
.chip-add {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  background: var(--white); border: 1.5px dashed #c8d2de; color: var(--text-muted);
}
.chip-add:hover { border-color: var(--moris); color: var(--moris); }
.chip-add .ico { width: 14px; height: 14px; }
.chip-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--white); border: 1.5px dashed #c8d2de; color: var(--moris);
  border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: all .15s;
}
.chip-pill:hover { border-style: solid; border-color: var(--moris); background: #f0f5fb; }
.chip-pill .ico { width: 14px; height: 14px; }
.people-status { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.status-form-inline select { padding: 7px 34px 7px 12px; font-size: 13px; width: auto; }
.approve-box { margin-top: 16px; padding: 14px; background: #f6f9fc; border: 1px solid #dbe5f0; border-radius: var(--radius-md); }

/* ---------- Dropzone (nahrávanie pri vytváraní úlohy) ---------- */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px dashed #c8d2de; border-radius: var(--radius-md); padding: 22px 16px;
  background: var(--bg); cursor: pointer; text-align: center; transition: border-color .15s, background .15s;
}
.dropzone:hover { border-color: var(--moris); background: #f0f5fb; }
.dropzone.dragover { border-color: var(--moris); background: #e8f0f9; }
.dropzone.has-files { border-style: solid; border-color: var(--moris); background: #f0f5fb; }
.dropzone-icon .ico { width: 22px; height: 22px; color: var(--moris); }
.dropzone-text { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.dropzone-files { word-break: break-word; }

/* ---------- Uploader: miniatúry vybraných súborov ---------- */
.uploader-previews { display: flex; flex-wrap: wrap; gap: 10px; }
.uploader-previews:not(:empty) { margin-top: 12px; }
.preview-cell {
  position: relative; width: 92px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px;
}
.preview-cell img { width: 78px; height: 78px; object-fit: cover; border-radius: 5px; display: block; }
.preview-ext {
  width: 78px; height: 78px; border-radius: 5px; background: #eef2f7; color: var(--moris);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.preview-name { font-size: 10px; color: var(--text-muted); max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-remove {
  position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--red); color: #fff; border: 2px solid #fff; cursor: pointer; font-size: 10px;
  display: flex; align-items: center; justify-content: center; line-height: 1; padding: 0;
}
.preview-remove:hover { background: #dc2626; }
.uploader-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }

/* Prílohy úlohy – mazanie */
.gallery-cell { position: relative; width: 100%; }
.gallery-cell .gallery-thumb { width: 100%; }
.att-del { position: absolute; top: 4px; right: 4px; }
.att-del button {
  width: 22px; height: 22px; border-radius: 50%; background: rgba(15,50,91,.75); color: #fff; border: 0;
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.att-del button:hover { background: var(--red); }
.att-del .ico { width: 12px; height: 12px; }
.task-files { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.task-file-item { display: flex; align-items: center; gap: 8px; }
.task-file-item .att-file { flex: 1; }
.task-file-item .att-del { position: static; }
.task-file-item .att-del button { background: var(--white); border: 1px solid var(--border); color: var(--text-muted); }
.task-file-item .att-del button:hover { border-color: var(--red); color: var(--red); }

/* ---------- Profil ---------- */
.profile-photo-row { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.profile-photo-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 5px; }
textarea { resize: vertical; }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row-end { align-items: flex-end; }
.form-field { flex: 1; min-width: 160px; margin-bottom: 14px; }
.form-actions { display: flex; gap: 10px; margin-top: 6px; }
.form-card { max-width: 900px; }
.form-inline { gap: 6px; align-items: center; flex-wrap: nowrap; }
.form-inline input { padding: 7px 9px; font-size: 13px; }

/* ---------- Login ---------- */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(160deg, #0f325b 0%, #0a2341 60%, #071a30 100%); padding: 20px; }
.login-card { background: var(--white); border-radius: var(--radius-lg); padding: 38px 34px; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.login-logo { text-align: center; margin-bottom: 26px; }
.login-app-name { margin-top: 10px; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.login-card h1 { font-size: 20px; margin-bottom: 6px; }
.login-sub { color: var(--text-muted); font-size: 13px; margin: 0 0 18px; }
.login-card label { margin-top: 4px; }
.login-card input { margin-bottom: 14px; }
.otp-input { font-size: 26px; letter-spacing: 12px; text-align: center; font-weight: 700; }
.login-resend { text-align: center; margin-top: 14px; }

/* ---------- Dashboard ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 8px; }
.stat-card {
  --accent: var(--moris);
  background: var(--white); border: 1px solid #eef1f5; border-radius: var(--radius-lg);
  padding: 18px 20px; box-shadow: 0 1px 2px rgba(15,50,91,.04), 0 8px 24px -16px rgba(15,50,91,.18);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(15,50,91,.05), 0 16px 32px -18px rgba(15,50,91,.28); }
.stat-value { font-size: 30px; font-weight: 800; color: var(--accent); line-height: 1; letter-spacing: -.5px; }
.stat-label { font-size: 12.5px; color: var(--text-muted); font-weight: 600; margin-top: 6px; }
.stat-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 13px; background: color-mix(in srgb, var(--accent) 12%, white); color: var(--accent); flex-shrink: 0; }
.stat-icon .ico { width: 22px; height: 22px; }
.stat-blue { --accent: #2563eb; }
.stat-amber { --accent: #b45309; }
.stat-green { --accent: #15803d; }
.stat-indigo { --accent: #4f46e5; }

.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.dept-card {
  position: relative; background: var(--white); border: 1px solid #eef1f5;
  border-radius: var(--radius-lg); padding: 18px; text-decoration: none; color: var(--text);
  box-shadow: 0 1px 2px rgba(15,50,91,.04), 0 8px 24px -18px rgba(15,50,91,.2);
  transition: transform .15s ease, box-shadow .15s ease; overflow: hidden;
}
.dept-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--dept-color, var(--moris)); }
.dept-card:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(15,50,91,.05), 0 18px 36px -18px rgba(15,50,91,.3); }
.dept-card-head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.dept-name { font-weight: 700; font-size: 15.5px; }
.dept-counts { display: flex; gap: 18px; }
.dept-count { display: flex; flex-direction: column; gap: 2px; }
.dept-count b { font-size: 20px; font-weight: 800; letter-spacing: -.5px; }
.dept-count span { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.dept-total { margin-top: 12px; font-size: 11.5px; color: var(--text-muted); border-top: 1px solid #f1f3f6; padding-top: 10px; }
.dept-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.approvals-banner { border: 1px solid #fde9c8; background: linear-gradient(180deg, #fffdf8, #fff); }
.card-title { font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card-title .ico { width: 16px; height: 16px; color: #b45309; }
.approval-list { display: flex; flex-direction: column; gap: 6px; }
.approval-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); background: var(--bg); }
.approval-item:hover { background: #f3f4f6; }
.approval-item-title { flex: 1; font-weight: 600; }

.activity-list { display: flex; flex-direction: column; }
.activity-item { display: flex; gap: 12px; padding: 10px 4px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: 0; }
.activity-item:hover { background: var(--bg); }
.activity-text { font-size: 13px; }
.activity-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ---------- Kalendár ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 4px 0 16px; flex-wrap: wrap; }
.cal-title h2 { font-size: 20px; font-weight: 800; letter-spacing: -.3px; text-transform: capitalize; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav-btn { width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--white); color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.cal-nav-btn:hover { border-color: var(--moris); color: var(--moris); }
.cal-nav-btn .ico { width: 18px; height: 18px; }
.cal-nav-btn .flip { display: inline-flex; transform: scaleX(-1); }
.cal-card { padding: 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-weekdays { margin-bottom: 6px; }
.cal-weekday { text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); padding: 4px 0; }
.cal-cell { min-height: 104px; border: 1px solid #eef1f5; border-radius: 12px; padding: 7px; background: var(--white); display: flex; flex-direction: column; gap: 4px; overflow: hidden; cursor: pointer; transition: border-color .12s, background .12s; }
.cal-cell:hover { border-color: #d4dce6; background: #fcfdfe; }
.cal-cell.cal-out { background: #fafbfc; }
.cal-cell.cal-out:hover { background: #f4f6f8; }
.cal-cell.cal-out .cal-daynum { color: #c4ccd6; }
.cal-cell.cal-today { border-color: var(--moris); box-shadow: inset 0 0 0 1px var(--moris); }
.cal-cell-head { display: flex; align-items: center; justify-content: space-between; }
.cal-daynum { font-size: 12.5px; font-weight: 700; color: var(--text); width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.cal-add { width: 20px; height: 20px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: var(--moris); background: color-mix(in srgb, var(--moris) 10%, white); opacity: 0; transition: opacity .12s; flex-shrink: 0; }
.cal-add .ico { width: 13px; height: 13px; }
.cal-cell:hover .cal-add { opacity: 1; }
.cal-add:hover { background: color-mix(in srgb, var(--moris) 20%, white); }
.cal-today .cal-daynum { background: var(--moris); color: #fff; }
.cal-tasks { display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.cal-task { display: flex; align-items: center; gap: 5px; text-decoration: none; background: color-mix(in srgb, var(--c) 10%, white); border-radius: 6px; padding: 3px 6px; font-size: 11.5px; font-weight: 600; color: var(--text); line-height: 1.25; }
.cal-task:hover { background: color-mix(in srgb, var(--c) 20%, white); }
.cal-task-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.cal-task-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-task.status-ukoncene, .cal-task.status-zamietnute { opacity: .55; }
.cal-task.status-ukoncene .cal-task-title { text-decoration: line-through; }

.cal-upcoming { margin-top: 22px; }
.upcoming-list { display: flex; flex-direction: column; }
.upcoming-item { display: flex; align-items: center; gap: 14px; padding: 11px 6px; text-decoration: none; color: var(--text); border-bottom: 1px solid #f1f3f6; }
.upcoming-item:last-child { border-bottom: 0; }
.upcoming-item:hover { background: var(--bg); }
.upcoming-date { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 12px; background: color-mix(in srgb, var(--c) 12%, white); color: var(--c); flex-shrink: 0; }
.upcoming-day { font-size: 19px; font-weight: 800; line-height: 1; }
.upcoming-mon { font-size: 10px; font-weight: 700; text-transform: uppercase; }
.upcoming-body { flex: 1; min-width: 0; }
.upcoming-title { font-weight: 700; font-size: 14.5px; }
.upcoming-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }

/* ---------- Filtre + zoznam úloh ---------- */
.section-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.view-toggle { display: inline-flex; height: 36px; border: 1.5px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--white); box-sizing: border-box; }
.view-btn { width: 38px; height: 100%; display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); }
.view-btn + .view-btn { border-left: 1.5px solid var(--border); }
.view-btn:hover { background: var(--bg); color: var(--moris); }
.view-btn.active { background: var(--moris); color: #fff; }
.view-btn .ico { width: 16px; height: 16px; }
.filter-toggle { position: relative; display: none; height: 36px; align-items: center; gap: 6px; background: var(--white); border: 1.5px solid var(--border); border-radius: 9px; padding: 0 14px; box-sizing: border-box; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; }
.filter-toggle:hover { border-color: var(--moris); color: var(--moris); }
.filter-toggle .ico { width: 15px; height: 15px; }
.filter-toggle.has-active::after { content: ''; position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--red); border: 2px solid #fff; }

.filters { padding: 14px; }
.filter-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filter-field { flex: 1; min-width: 140px; }
.filter-actions { display: flex; gap: 8px; }

/* ---------- Dlaždice úloh ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.task-tile { padding: 0; overflow: hidden; text-decoration: none; color: var(--text); display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.task-tile:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -18px rgba(15,50,91,.3); }
.tile-cover { height: 150px; background: var(--bg); overflow: hidden; }
.tile-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-cover-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 22%, white), color-mix(in srgb, var(--c) 8%, white)); color: var(--c); }
.tile-ph-icon .ico { width: 34px; height: 34px; opacity: .8; }
.tile-ph-dept { font-size: 12px; font-weight: 700; opacity: .85; }
.tile-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tile-title { font-weight: 700; font-size: 15px; line-height: 1.3; }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.tile-meta { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--text-muted); }
.tile-meta span { display: inline-flex; align-items: center; gap: 3px; }
.tile-meta .ico { width: 12px; height: 12px; }

.task-list { display: flex; flex-direction: column; gap: 10px; }
.task-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; text-decoration: none; color: var(--text); margin-bottom: 0; transition: border-color .12s, box-shadow .12s; }
.task-row:hover { border-color: var(--moris); box-shadow: 0 4px 14px rgba(15,50,91,.1); }
.task-row-thumb { width: 54px; height: 54px; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.task-row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.task-row-thumb-empty { display: flex; align-items: center; justify-content: center; color: var(--c); background: linear-gradient(135deg, color-mix(in srgb, var(--c) 22%, white), color-mix(in srgb, var(--c) 8%, white)); }
.task-row-thumb-empty .ico { width: 22px; height: 22px; opacity: .8; }
.task-row-pending { border-left: 4px solid #f59e0b; }
.task-row-main { flex: 1; min-width: 0; }
.task-row-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.task-row-title { font-weight: 700; font-size: 15px; }
.task-row-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.task-row-people { display: flex; align-items: center; }
.task-row-people .avatar { margin-left: -6px; border: 2px solid #fff; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge-ok { background: #f0fdf4; color: var(--green); }
.badge-bad { background: #fef2f2; color: var(--red); }
.badge-wait { background: #fffbeb; color: var(--amber); }
.badge-neutral { background: #f3f4f6; color: var(--text-muted); }
.dept-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.prio-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* ---------- Detail úlohy ---------- */
.task-detail-head { padding: 22px 24px; }
.task-detail-top { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.task-detail-main { min-width: 0; }
.task-detail-title { font-size: 21px; margin: 10px 0 5px; line-height: 1.3; }
.task-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
.task-description { white-space: pre-wrap; margin: 16px 0 0; line-height: 1.75; font-size: 14.5px; color: #2b3a4d; }

/* Stav ako kompaktný farebný select v hlavičke */
.status-select-form { margin: 0; display: inline-flex; }
.status-select {
  width: auto; padding: 5px 30px 5px 12px; font-size: 12px; font-weight: 700; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer; background-position: right 9px center; background-size: 13px;
}
.status-select.status-novy { background-color: #eff6ff; color: #2563eb; }
.status-select.status-v_rieseni { background-color: #f3e8ff; color: #7c3aed; }
.status-select.status-caka { background-color: #fffbeb; color: #b45309; }
.status-select.status-schvalene { background-color: #f0fdf4; color: #15803d; }
.status-select.status-zamietnute { background-color: #fef2f2; color: #ef4444; }
.status-select.status-ukoncene { background-color: #f3f4f6; color: #6b7280; }

/* Osoby v lište: mini-krúžky + popover */
.task-top-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.avatar-stack { display: inline-flex; align-items: center; background: none; border: 0; cursor: pointer; padding: 3px; border-radius: 999px; }
.avatar-stack:hover { background: var(--bg); }
.avatar-stack .avatar { border: 2px solid #fff; margin-left: -8px; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-more { background: #9ca3af; }
.avatar-stack-empty { width: 32px; height: 32px; border-radius: 50%; background: var(--bg); border: 1.5px dashed #c8d2de; color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; }
.avatar-stack-empty .ico { width: 16px; height: 16px; }
.people-pop { min-width: 290px; padding: 6px; }
.pop-section { padding: 8px; }
.pop-section + .pop-section { border-top: 1px solid var(--border); }
.pop-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); font-weight: 700; margin-bottom: 8px; }
.pop-empty { margin: 0 0 8px; }
.pop-person { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.pop-name { flex: 1; font-size: 13px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-action { display: flex; align-items: center; gap: 7px; width: 100%; background: var(--bg); border: 0; border-radius: var(--radius-sm); padding: 8px 10px; margin-top: 6px; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--moris); }
.pop-action:hover { background: #eef2f7; }
.pop-action .ico { width: 14px; height: 14px; }
.people-pop .add-participant { padding: 8px 2px 2px; }
.people-pop .add-participant select { width: 100%; }

/* Prílohy v hornej časti úlohy – jednotné dlaždice (bez mazania) */
.task-head-attachments { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; align-items: flex-start; }
.head-att { width: 150px; height: 94px; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; flex-shrink: 0; background: var(--bg); padding: 0; }
.head-att-img { cursor: zoom-in; }
.head-att-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .15s; }
.head-att-img:hover img { transform: scale(1.05); }
.head-att-file { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; color: var(--text); padding: 8px; text-align: center; }
.head-att-file:hover { border-color: var(--moris); }
.head-att-icon { color: var(--moris); }
.head-att-icon .ico { width: 22px; height: 22px; }
.head-att-name { font-size: 11.5px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.head-att-sub { font-size: 10.5px; color: var(--moris); font-weight: 600; }

/* Stránka úpravy – nahraté prílohy s miniatúrami a mazaním */
.edit-attachments { display: flex; flex-wrap: wrap; gap: 12px; }
.edit-att-cell { position: relative; width: 96px; display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: grab; transition: opacity .12s, transform .12s; }
.edit-att-cell:active { cursor: grabbing; }
.edit-att-cell.dragging { opacity: .4; }
.edit-att-cell .edit-att-thumb { pointer-events: none; }
.reorder-status { display: inline-block; margin-top: 10px; font-size: 12px; color: var(--moris); font-weight: 600; }
.edit-att-thumb { width: 88px; height: 88px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; display: block; }
.edit-att-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.edit-att-file { display: flex; align-items: center; justify-content: center; background: #eef2f7; }
.edit-att-name { font-size: 10px; color: var(--text-muted); max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edit-att-del { position: absolute; top: -7px; right: -2px; }
.edit-att-del button {
  width: 22px; height: 22px; border-radius: 50%; background: var(--red); color: #fff; border: 2px solid #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.edit-att-del button:hover { background: #dc2626; }
.edit-att-del .ico { width: 11px; height: 11px; }

.director-note { background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius-md); padding: 14px 16px; margin-top: 16px; font-size: 13.5px; }
.director-note b { display: block; margin-bottom: 4px; }
.director-note p { margin: 0; white-space: pre-wrap; line-height: 1.7; }
.task-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.participant { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.participant-name { flex: 1; font-size: 13px; font-weight: 500; }
.inline-remove button { background: none; border: 0; color: #c4c9d2; cursor: pointer; font-size: 12px; padding: 2px 6px; display: flex; align-items: center; }
.inline-remove .ico { width: 13px; height: 13px; }
.inline-remove button:hover { color: var(--red); }
.add-participant { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; align-items: center; }
.add-participant select { flex: 1; min-width: 110px; padding: 8px 10px; font-size: 13px; }
.status-form { display: flex; gap: 8px; flex-wrap: wrap; }
.status-form select { flex: 1; min-width: 150px; }
.approve-form textarea { margin-bottom: 8px; }
.approve-buttons { display: flex; gap: 8px; }
.approve-buttons .btn { flex: 1; }

/* ---------- Galéria ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.gallery-thumb, .att-thumb { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; padding: 0; cursor: zoom-in; background: var(--bg); aspect-ratio: 1; }
.gallery-thumb img, .att-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .15s; }
.gallery-thumb:hover img, .att-thumb:hover img { transform: scale(1.05); }
.att-thumb { width: 110px; height: 110px; aspect-ratio: auto; }

/* ---------- Lightbox ---------- */
.lightbox { display: none; position: fixed; inset: 0; z-index: 100; background: rgba(7,24,44,.92); backdrop-filter: blur(4px); align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 8px; box-shadow: 0 10px 50px rgba(0,0,0,.6); }
.lb-close, .lb-prev, .lb-next { position: fixed; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 50%; width: 44px; height: 44px; font-size: 20px; cursor: pointer; z-index: 101; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 18px; right: 18px; display: flex; align-items: center; justify-content: center; }
.lb-close .ico { width: 18px; height: 18px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-caption { position: fixed; bottom: 16px; left: 0; right: 0; text-align: center; color: #d0d8e2; font-size: 13px; }

/* ---------- Časová os / chat ---------- */
.timeline { padding: 18px; }
.tl-item { display: flex; gap: 10px; padding: 8px 0; }
.tl-body { flex: 1; min-width: 0; }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; margin-bottom: 3px; }
.tl-time { color: var(--text-muted); font-size: 11px; margin-left: auto; }
.tl-position { font-size: 11.5px; }
.tl-bubble { background: #f1f5fa; border-radius: 4px 14px 14px 14px; padding: 10px 14px; font-size: 14px; white-space: pre-wrap; display: inline-block; max-width: 100%; }
.tl-mine .tl-bubble { background: #e3ecf7; }
.tl-actions { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.tl-action-form { margin: 0; }
.tl-action { background: none; border: 0; color: var(--text-muted); cursor: pointer; font-family: inherit; font-size: 11.5px; font-weight: 600; padding: 0; }
.tl-action:hover { color: var(--moris); }
.tl-action-del:hover { color: var(--red); }
.edit-comment-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; max-width: 560px; }
.edit-comment-form textarea { flex: 1; }
.tl-text { font-size: 13px; color: var(--text); }
.tl-system .tl-text, .tl-status .tl-text { color: var(--text-muted); font-size: 12.5px; }
.tl-approval .tl-text { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; display: inline-block; }
.tl-link { word-break: break-all; }
.tl-attachments { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.att-file { display: inline-flex; flex-direction: column; gap: 2px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 13px; text-decoration: none; color: var(--text); font-size: 13px; font-weight: 500; max-width: 260px; overflow: hidden; }
.att-file:hover { border-color: var(--moris); }
.att-open { font-size: 11px; color: var(--moris); font-weight: 600; }
.att-pdf { border-left: 3px solid #ef4444; }

/* ---------- Záznamy o zmenách (logy) ---------- */
.changelog-wrap { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.changelog-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; color: var(--text-muted); cursor: pointer;
  font-family: inherit; font-size: 12.5px; font-weight: 600; padding: 4px 2px;
}
.changelog-toggle:hover { color: var(--moris); }
.changelog-toggle .ico { width: 14px; height: 14px; transition: transform .15s; }
.changelog-toggle.open .ico { transform: rotate(180deg); }
.changelog { margin-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.changelog-item { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-muted); padding: 3px 0; }
.changelog-time { white-space: nowrap; flex-shrink: 0; opacity: .75; font-variant-numeric: tabular-nums; }
.changelog-text { color: var(--text); flex: 1; }
.changelog-del button { background: none; border: 0; color: #c4c9d2; cursor: pointer; padding: 2px 4px; display: flex; align-items: center; transition: color .12s; }
.changelog-del button:hover { color: var(--red); }
.changelog-del .ico { width: 13px; height: 13px; }

/* ---------- Composer ---------- */
.composer { position: sticky; bottom: 10px; padding: 14px; box-shadow: 0 6px 24px rgba(15,50,91,.14); border: 2px dashed transparent; transition: border-color .15s, background .15s; }
.composer.dragover, .composer-form.uploader.dragover { border-color: var(--moris); }
.composer-form.uploader.dragover { outline: 2px dashed var(--moris); outline-offset: 6px; border-radius: 8px; }
.composer-hint { display: block; margin-top: 8px; }
.composer-form { display: flex; flex-direction: column; gap: 10px; }
.composer-form textarea { width: 100%; }
.composer-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.composer-actions .composer-send { margin-left: auto; }
.file-label { cursor: pointer; }
.composer-link { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.composer-link input { flex: 1; min-width: 130px; padding: 7px 10px; font-size: 13px; }

/* ---------- Tabuľky ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); padding: 8px 10px; border-bottom: 2px solid var(--border); }
.table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:hover td { background: var(--bg); }
.row-inactive { opacity: .5; }

/* ---------- Modaly ---------- */
.modal { display: none; position: fixed; inset: 0; z-index: 90; background: rgba(7,24,44,.7); backdrop-filter: blur(4px); align-items: flex-start; justify-content: center; padding: 30px 16px; overflow-y: auto; }
.modal.open { display: flex; }
.modal-box { background: var(--white); border-radius: var(--radius-lg); padding: 22px; width: 100%; max-width: 620px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 16px; }
.modal-close { background: none; border: 0; font-size: 17px; cursor: pointer; color: var(--text-muted); padding: 4px 8px; }
.modal-close:hover { color: var(--text); }

/* ---------- Responzivita ---------- */
@media (max-width: 920px) {
  .task-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 60; height: 100dvh;
    transform: translateX(-100%); transition: transform .22s ease;
    width: 260px; box-shadow: 4px 0 30px rgba(0,0,0,.3);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(7,24,44,.5); }
  .hamburger { display: block; }
  .topbar-username { display: none; }
  .topbar-clock { gap: 5px; font-size: 12px; }
  .topbar-clock .clock-day, .topbar-clock .clock-date { display: none; }
  .content { padding: 14px 14px 70px; }
  .task-detail-top { flex-direction: column; }
  .task-actions { order: -1; }
  .composer-form { flex-direction: column; align-items: stretch; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card { padding: 14px; }
  .stat-icon { display: none; }
  .stat-value { font-size: 26px; }
  .task-row-people { display: none; }
  .filter-actions { width: 100%; }
  .form-inline { flex-wrap: wrap; }
  /* Filter na mobile: schovaný pod ikonku, otvorí sa kliknutím */
  .filter-toggle { display: inline-flex; }
  .filters { display: none; }
  .filters.filters-open { display: block; }
  .filter-field { min-width: 100%; }
  .tile-grid { grid-template-columns: 1fr; }
  /* Filter vľavo, prepínač zobrazenia vpravo */
  .section-head-actions { width: 100%; justify-content: space-between; }
  /* Composer na mobile: zafixovaný do toku obsahu (nie plávajúci) */
  .composer { position: static; bottom: auto; box-shadow: var(--shadow); }
  /* Kalendár na mobile: kompaktné bunky, v bunkách len farebné bodky */
  .cal-card { padding: 6px; }
  .cal-grid { gap: 3px; }
  .cal-cell { min-height: 56px; border-radius: 8px; padding: 4px; }
  .cal-daynum { width: 20px; height: 20px; font-size: 11px; }
  .cal-add { opacity: 1; width: 18px; height: 18px; }
  .cal-add .ico { width: 12px; height: 12px; }
  .cal-tasks { flex-direction: row; flex-wrap: wrap; gap: 3px; }
  .cal-task { padding: 0; background: none !important; }
  .cal-task-title { display: none; }
  .cal-task-dot { width: 8px; height: 8px; }
}
