/* =====================================================================
   Humen Flex Gym – dizajnový systém (odvodený z loga)
   Farby loga: červená #ED1C24, antracit #231F20, sivá #BBBDC0
   ===================================================================== */
@import url('../fonts/fonts.css');

:root {
  --red: #ED1C24;
  --red-dark: #C4151C;
  --red-soft: #FDE8E9;
  --ink: #231F20;
  --ink-2: #3A3637;
  --muted: #5B5A5C;
  --muted-2: #8A8A8C;
  --grey: #BBBDC0;
  --line: #E3E4E6;
  --bg: #F5F5F6;
  --surface: #FFFFFF;
  --green: #1E9E5A;
  --green-soft: #E4F5EB;
  --orange: #E58A00;
  --orange-soft: #FFF1DB;
  --blue: #2B6CB0;
  --blue-soft: #E6EFFA;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(35,31,32,.06), 0 4px 16px rgba(35,31,32,.06);
  --font-head: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --sidebar-w: 248px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--red-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
svg.ico { width: 18px; height: 18px; flex: 0 0 18px; vertical-align: -3px; }
.alert svg.ico { width: 20px; height: 20px; flex-basis: 20px; margin-top: 1px; }
.avatar svg.ico { width: 22px; height: 22px; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; letter-spacing: .01em; margin: 0 0 .5em; line-height: 1.1; color: var(--ink); }
h1 { font-size: 34px; text-transform: uppercase; }
h2 { font-size: 24px; }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
small, .small { font-size: 13px; }
.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: .93em; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
code { font-family: ui-monospace, Consolas, monospace; background: var(--bg); padding: 1px 6px; border-radius: 4px; font-size: .92em; }
pre { background: var(--ink); color: #f1f1f1; padding: 14px 16px; border-radius: var(--radius-sm); overflow: auto; font-size: 13px; }
kbd { font-family: ui-monospace, Consolas, monospace; background: #fff; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 6px; font-size: .9em; }

/* ---------- layout: admin & member ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: var(--ink); color: #fff;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .brand img { width: 44px; height: 44px; background: #fff; border-radius: 8px; padding: 3px; }
.sidebar .brand strong { font-family: var(--font-head); font-size: 20px; text-transform: uppercase; letter-spacing: .03em; display: block; line-height: 1; }
.sidebar .brand span { font-size: 12px; color: var(--grey); }
.sidebar nav { padding: 10px 10px 20px; flex: 1; }
.sidebar .nav-section { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted-2); padding: 14px 10px 6px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #e8e8e8;
  font-size: 14px; font-weight: 500; margin-bottom: 2px;
}
.sidebar nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; }
.sidebar nav a.active { background: var(--red); color: #fff; }
.sidebar nav a .ico { width: 20px; height: 20px; flex: 0 0 20px; opacity: .9; }
.sidebar nav a .count { margin-left: auto; background: rgba(255,255,255,.18); font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; }
.sidebar nav a.active .count { background: rgba(0,0,0,.25); }
.sidebar .sidebar-foot { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; color: var(--grey); }
.sidebar .sidebar-foot strong { color: #fff; display: block; font-size: 13px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 12px 24px; background: var(--surface);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 24px; margin: 0; }
.topbar .spacer { flex: 1; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; cursor: pointer; }
.content { padding: 24px; max-width: 1400px; width: 100%; }
.content > * + * { margin-top: 20px; }
@media (max-width: 960px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; z-index: 40; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vw rgba(0,0,0,.4); }
  .menu-toggle { display: inline-flex; }
  .content { padding: 16px; }
  .topbar { padding: 10px 16px; }
  .topbar h1 { font-size: 20px; }
}

/* ---------- public layout ---------- */
.public { min-height: 100vh; display: flex; flex-direction: column; }
.public-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.public-header .wrap { display: flex; align-items: center; gap: 14px; padding: 12px 20px; max-width: 1100px; margin: 0 auto; }
.public-header img { height: 46px; }
.public-header .name { font-family: var(--font-head); font-weight: 800; font-size: 22px; text-transform: uppercase; letter-spacing: .03em; }
.public-header nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
/* ukazovateľ obsadenosti posilňovne (členská zóna) */
.occupancy { display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap; border: 1px solid; transition: background .3s, color .3s, border-color .3s; }
.occupancy.is-busy { background: var(--green-soft); color: #136b3d; border-color: #bfe6cf; }
.occupancy.is-empty { background: var(--bg); color: var(--muted); border-color: var(--line); }
.pulse-dot { position: relative; width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; background: var(--grey); }
.occupancy.is-busy .pulse-dot { background: #22C55E; box-shadow: 0 0 6px rgba(34,197,94,.8); }
.occupancy.is-busy .pulse-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: #22C55E; animation: occupancy-pulse 1.8s ease-out infinite; }
@keyframes occupancy-pulse { 0% { transform: scale(1); opacity: .75; } 80%, 100% { transform: scale(2.8); opacity: 0; } }
.occupancy.bump { animation: occupancy-bump .5s ease; }
@keyframes occupancy-bump { 40% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .occupancy.is-busy .pulse-dot::after, .occupancy.bump { animation: none; } }

@media (max-width: 640px) {
  .public-header .wrap { flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px; }
  .occupancy { margin-left: auto; font-size: 13px; padding: 5px 11px 5px 10px; }
  .public-header nav { gap: 2px; }
  .public-header nav .btn-sm { padding: 5px 8px; font-size: 13px; }
  .public-header img { height: 38px; }
  .public-header .name { font-size: 19px; }
  .public-header nav { margin-left: 0; width: 100%; flex-wrap: nowrap; overflow-x: auto; }
  .public-main { padding: 20px 16px; }
  .page-head h1 { font-size: 24px; }
}
.public-main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 32px 20px; }
.public-main.narrow { max-width: 520px; }
.public-footer { padding: 20px; text-align: center; color: var(--muted-2); font-size: 13px; }
.auth-card { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 30px; }
/* samostatné prihlasovacie stránky – iba formulár v strede obrazovky */
body.auth-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.auth-wrap { width: 100%; max-width: 420px; display: grid; gap: 14px; }
.auth-wrap.wide { max-width: 600px; }
.auth-page .auth-card { padding: 34px 30px 28px; position: relative; overflow: hidden; }
.auth-page .auth-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--red); }
.auth-page .auth-card .logo { width: 120px; margin-bottom: 18px; }
@media (max-width: 480px) { .auth-page .auth-card { padding: 26px 20px 22px; } }
.auth-card .logo { display: block; width: 110px; margin: 0 auto 14px; }
.auth-card h1 { text-align: center; font-size: 28px; }
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center; padding: 20px 0 40px; }
.hero img { width: 100%; max-width: 360px; justify-self: center; }
.hero h1 { font-size: 52px; line-height: .95; }
.hero h1 span { color: var(--red); }
.hero .lead { font-size: 18px; color: var(--muted); }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } .hero h1 { font-size: 40px; } .hero img { order: -1; max-width: 220px; } }
.price-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.price-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.price-card .price { font-family: var(--font-head); font-size: 44px; font-weight: 800; color: var(--red); line-height: 1; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; counter-reset: step; }
.steps div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.steps div::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 18px; margin-bottom: 8px; }
.prose { background: var(--surface); border-radius: var(--radius); padding: 28px; white-space: pre-line; line-height: 1.65; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  border: 1px solid transparent; border-radius: 8px; padding: 9px 16px; font: 600 14px var(--font-body);
  background: var(--ink); color: #fff; line-height: 1.2; transition: background .15s, transform .05s; white-space: nowrap;
}
.btn:hover { text-decoration: none; background: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--red); }
.btn-primary:hover { background: var(--red-dark); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--bg); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--bg); }
.btn-danger { background: var(--surface); color: var(--red-dark); border-color: #f3c0c3; }
.btn-danger:hover { background: var(--red-soft); }
.btn-success { background: var(--green); }
.btn-success:hover { background: #17824a; }
.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 6px; }
.btn-lg { padding: 13px 22px; font-size: 16px; }
.btn-block { width: 100%; }
.btn .ico { width: 16px; height: 16px; }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions.end { justify-content: flex-end; }

/* ---------- badges ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.badge-active, .badge-paid, .badge-ok, .badge-sent, .badge-approved { background: var(--green-soft); color: #136b3d; border-color: #bfe6cf; }
.badge-expiring, .badge-pending, .badge-pending_payment, .badge-queued, .badge-upcoming, .badge-conflict { background: var(--orange-soft); color: #8a5300; border-color: #f4d9a6; }
.badge-expired, .badge-cancelled, .badge-failed, .badge-lost, .badge-disabled, .badge-rejected, .badge-deactivated, .badge-rejected, .badge-danger { background: var(--red-soft); color: var(--red-dark); border-color: #f3c0c3; }
.badge-none, .badge-unassigned, .badge-anonymized, .badge-duplicate { background: var(--bg); color: var(--muted); }
.badge-info, .badge-stored, .badge-open { background: var(--blue-soft); color: #1f4f85; border-color: #c5d8f0; }
.badge-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--grey); margin-right: 6px; vertical-align: middle; }
.dot.on { background: var(--green); } .dot.off { background: var(--red); } .dot.warn { background: var(--orange); }

/* ---------- cards & grid ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(35,31,32,.04); }
.card-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .spacer { flex: 1; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line); background: #fafafa; border-radius: 0 0 var(--radius) var(--radius); }
.grid { display: grid; gap: 16px; }
.grid > *, .stack > *, .public-main > *, .content > * { min-width: 0; }
.stack { display: grid; gap: 18px; align-content: start; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: 2fr 1fr; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-main { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-height: 92px; position: relative; overflow: hidden; }
.stat::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grey); }
.stat.red::before { background: var(--red); } .stat.green::before { background: var(--green); } .stat.orange::before { background: var(--orange); } .stat.dark::before { background: var(--ink); } .stat.blue::before { background: var(--blue); }
.stat .label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stat .value { font-family: var(--font-head); font-size: 36px; font-weight: 800; line-height: 1; color: var(--ink); }
.stat .sub { font-size: 12px; color: var(--muted-2); }
.stat a { position: absolute; inset: 0; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: #fafafa; white-space: nowrap; }
.table tbody tr:hover { background: #fcfcfc; }
.table tr:last-child td { border-bottom: 0; }
.table td.actions-cell { text-align: right; white-space: nowrap; }
.table .sub { display: block; font-size: 12px; color: var(--muted-2); }
.table-sm th, .table-sm td { padding: 6px 10px; font-size: 13px; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted-2); }
.empty strong { display: block; color: var(--muted); font-size: 16px; margin-bottom: 4px; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .help { font-size: 12px; color: var(--muted-2); }
.field .error { font-size: 12px; color: var(--red-dark); font-weight: 500; }
.input, select, textarea, input:not([type]), input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=search], input[type=url] {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font: 400 14px var(--font-body); color: var(--ink);
  background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; }
.input:focus, select:focus, textarea:focus, input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(237,28,36,.12); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--red); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { width: 40px; height: 22px; appearance: none; background: var(--grey); border-radius: 11px; position: relative; cursor: pointer; transition: background .15s; }
.switch input::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: left .15s; }
.switch input:checked { background: var(--green); } .switch input:checked::after { left: 20px; }
.input-group { display: flex; } .input-group > * { border-radius: 0; } .input-group > :first-child { border-radius: 8px 0 0 8px; } .input-group > :last-child { border-radius: 0 8px 8px 0; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.filters .field { min-width: 150px; flex: 1; }
.filters .field.grow { flex: 2; }
.inline-form { display: inline; }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.radio-cards label { border: 1px solid var(--line); border-radius: 8px; padding: 12px; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.radio-cards label:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.radio-cards input { accent-color: var(--red); }

/* ---------- alerts ---------- */
.alert { padding: 12px 16px; border-radius: 8px; border: 1px solid; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.alert-success { background: var(--green-soft); border-color: #bfe6cf; color: #136b3d; }
.alert-error { background: var(--red-soft); border-color: #f3c0c3; color: var(--red-dark); }
.alert-warning { background: var(--orange-soft); border-color: #f4d9a6; color: #8a5300; }
.alert-info { background: var(--blue-soft); border-color: #c5d8f0; color: #1f4f85; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }

/* ---------- misc components ---------- */
.pagination { display: flex; align-items: center; gap: 14px; padding: 12px 18px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pagination ul { list-style: none; display: flex; gap: 4px; margin: 0 0 0 auto; padding: 0; }
.pagination a, .pagination span.current, .pagination .gap { display: inline-block; min-width: 30px; text-align: center; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.pagination span.current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination .gap { border: 0; background: none; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a, .tabs button { padding: 10px 14px; font: 600 14px var(--font-body); color: var(--muted); border: 0; background: none; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active, .tabs button.active { color: var(--red-dark); border-bottom-color: var(--red); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tab-pane { display: none; } .tab-pane.active { display: block; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; font-size: 14px; }
/* malé „i“ s vysvetlením (napr. v hlavičke tabuľky) */
.info-tip { position: relative; display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 5px; border: 1px solid var(--muted-2); border-radius: 50%; color: var(--muted); font: italic 700 10px/1 Georgia, 'Times New Roman', serif; text-transform: none; letter-spacing: 0; vertical-align: 1px; cursor: help; }
.info-tip:hover, .info-tip:focus { background: var(--ink); border-color: var(--ink); color: #fff; outline: none; }
.info-tip::after { content: attr(data-tip); position: absolute; top: calc(100% + 8px); right: -10px; width: 250px; padding: 9px 12px; border-radius: 8px; background: var(--ink); color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.18); font: 400 12.5px/1.45 var(--font-body); text-align: left; text-transform: none; letter-spacing: normal; white-space: normal; opacity: 0; visibility: hidden; transition: opacity .12s; pointer-events: none; z-index: 40; }
.info-tip.tip-left::after { right: auto; left: -10px; }
.info-tip:hover::after, .info-tip:focus::after { opacity: 1; visibility: visible; }
/* v malých kartách: vysvetlenie pod názvom na šírku karty (nevylezie mimo obrazovky) */
.stat:has(.info-tip) { overflow: visible; }
.stat::before { border-radius: var(--radius) 0 0 var(--radius); }
.stat .info-tip { position: static; }
.stat .info-tip::after { top: 36px; left: 10px; right: 10px; width: auto; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips a { border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; font-size: 13px; color: var(--ink); background: #fff; }
.chips a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips a:hover { text-decoration: none; border-color: var(--ink); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 16px; flex: 0 0 40px; }
.avatar.lg { width: 64px; height: 64px; font-size: 26px; flex-basis: 64px; }
.person { display: flex; align-items: center; gap: 12px; }
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 200px; }
.bar-list { display: grid; gap: 8px; }
.bar-list .row { display: grid; grid-template-columns: 110px 1fr 46px; align-items: center; gap: 10px; font-size: 13px; }
.bar-list .bar { height: 10px; background: var(--bg); border-radius: 5px; overflow: hidden; }
.bar-list .bar i { display: block; height: 100%; background: var(--red); border-radius: 5px; }
dialog { border: 0; border-radius: 12px; padding: 0; max-width: 520px; width: calc(100% - 32px); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(35,31,32,.5); }
dialog .card-head, dialog .card-body, dialog .card-foot { padding-left: 22px; padding-right: 22px; }
.copy-field { display: flex; gap: 6px; align-items: center; }
.copy-field input { font-family: ui-monospace, Consolas, monospace; }
.qr-demo { width: 180px; height: 180px; border: 2px dashed var(--grey); border-radius: 10px; display: grid; place-items: center; position: relative; background: repeating-linear-gradient(45deg, #f5f5f6 0 8px, #ececec 8px 16px); color: var(--muted); }
.qr-demo strong { background: var(--red); color: #fff; padding: 4px 10px; border-radius: 4px; font-family: var(--font-head); font-size: 20px; letter-spacing: .1em; transform: rotate(-12deg); }
.notice { font-size: 13px; color: var(--muted); }
.toast { position: fixed; right: 20px; bottom: 20px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; box-shadow: var(--shadow); z-index: 100; animation: fade .25s; }
@keyframes fade { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none;} }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 8px 0 8px 18px; border-left: 2px solid var(--line); position: relative; font-size: 14px; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--grey); }
.timeline li.active::before { background: var(--green); }
.progress { height: 8px; border-radius: 4px; background: var(--bg); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--red); }
.flash-wrap { position: sticky; top: 62px; z-index: 15; }
details.collapsible summary { cursor: pointer; font-weight: 600; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 28px; }
.page-head .spacer { flex: 1; }
.big-number { font-family: var(--font-head); font-size: 40px; font-weight: 800; line-height: 1; }
.warn-row td { background: var(--orange-soft) !important; }
.print-only { display: none; }
@media print {
  .sidebar, .topbar, .filters, .actions, .pagination, .btn, .no-print { display: none !important; }
  .content { padding: 0; } .card { border: 0; box-shadow: none; } body { background: #fff; }
  .print-only { display: block; }
}


/* ---------- členská zóna – mobil ---------- */
.member-zone .public-header .logout { flex: 0 0 auto; }
@media (max-width: 640px) {
  .member-zone .public-header .wrap { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 14px 0; }
  .member-zone .public-header .name { display: none; }
  .member-zone .public-header img { height: 40px; }
  .member-zone .occupancy { justify-self: end; margin: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .member-zone .public-header .wrap > a { grid-column: 1; grid-row: 1; }
  .member-zone .occupancy { grid-column: 2; grid-row: 1; }
  .member-zone .public-header .logout { grid-column: 3; grid-row: 1; }
  .member-zone .public-header nav.member-nav { grid-row: 2; }
  .member-zone .public-header .logout .btn { padding: 8px 10px; }
  .member-zone .logout-label { display: none; }
  .member-zone .public-header nav.member-nav { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; width: auto; margin: 2px -14px 0; overflow: visible; border-top: 1px solid var(--line); }
  .member-zone .public-header nav.member-nav .btn { justify-content: center; border-radius: 0; border: 0; border-bottom: 3px solid transparent; background: transparent; box-shadow: none; color: var(--muted); padding: 12px 2px 10px; font-size: 14px; font-weight: 600; }
  .member-zone .public-header nav.member-nav .btn.btn-primary { color: var(--red); border-bottom-color: var(--red); }

  .member-zone .public-main { padding: 18px 14px 24px; }
  .member-zone .page-head { margin-bottom: 14px !important; }
  .member-zone .page-head h1 { font-size: 26px; }
  .member-zone .page-head .who { display: none; }

  .member-zone .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .member-zone .stat { min-height: 0; padding: 12px 12px 12px 15px; }
  .member-zone .stat .label { font-size: 10.5px; letter-spacing: .05em; }
  .member-zone .stat .value { font-size: 22px !important; margin: 4px 0 2px; }
  .member-zone .stat .sub { font-size: 11.5px; }

  .member-zone .card-head { flex-wrap: wrap; gap: 8px; }
  .member-zone .kv { grid-template-columns: 1fr; gap: 0; }
  .member-zone .kv dt { font-size: 12px; margin-top: 10px; }
  .member-zone .kv dt:first-child { margin-top: 0; }
  .member-zone .kv dd { word-break: break-word; }
  .member-zone .form-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
  .member-zone .form-grid .btn { width: 100%; justify-content: center; }

  /* tabuľky ako karty – popisky stĺpcov dopĺňa app.js (data-label) */
  .member-zone .table-wrap { overflow: visible; }
  .member-zone table.table, .member-zone table.table tbody { display: block; }
  .member-zone table.table thead { display: none; }
  .member-zone table.table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .member-zone table.table tr:last-child { border-bottom: 0; }
  .member-zone table.table td { display: block; padding: 0; border: 0; font-size: 14px; text-align: left; }
  .member-zone table.table td.right { text-align: right; }
  .member-zone table.table.cards-3 tr { grid-template-columns: repeat(3, 1fr); }
  .member-zone table.table td.hide-sm { display: none; }
  .member-zone table.table:not(:has(thead)) tr { grid-template-columns: 1fr auto; align-items: center; }
  .member-zone table.table td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 2px; }
}

/* zobrazenie hesla (ikona oka) */
.pw-wrap { position: relative; display: block; }
.pw-wrap > input { width: 100%; padding-right: 46px !important; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); border-radius: 8px; cursor: pointer; padding: 0; }
.pw-toggle:hover { color: var(--ink); background: rgba(0,0,0,.04); }
.pw-toggle:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
.pw-toggle svg { width: 20px; height: 20px; }

/* ---------- denná kasa (Platby) ---------- */
.cash-box { margin-bottom: 18px; }
.cash-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cash-nav input[type=date] { padding: 5px 8px; font-size: 14px; width: auto; }
.cash-nav .btn { min-width: 34px; justify-content: center; }
.cash-expected { display: flex; flex-direction: column; gap: 2px; padding: 4px 0 16px; }
.cash-expected .label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cash-expected .value { font-family: var(--font-head); font-size: 46px; font-weight: 800; line-height: 1.05; color: var(--ink); }
.cash-expected .sub { font-size: 13px; color: var(--muted-2); }
.cash-result { margin-bottom: 12px; }
.cash-value-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cash-status { font-size: 15px; padding: 5px 14px; }
.cash-form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1.4fr) auto; gap: 12px; align-items: start; }
.cash-form > div:last-child { padding-top: 22px; }
.cash-form [data-cash-hint].ok { color: #136b3d; font-weight: 600; }
.cash-form [data-cash-hint].bad { color: var(--red-dark); font-weight: 600; }
.cash-fix summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.cash-days tr.is-current td { background: #fafafa; font-weight: 600; }
@media (max-width: 760px) {
  .cash-form { grid-template-columns: 1fr; }
  .cash-form > div:last-child { padding-top: 0; }
  .cash-form .btn { width: 100%; justify-content: center; }
  .cash-expected .value { font-size: 38px; }
}


/* ---------- členská zóna – kompaktné zoznamy (návštevy, permanentky, platby) ---------- */
.mlist { list-style: none; margin: 0; padding: 0; }
.mrow { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.mrow:last-child { border-bottom: 0; }
.mdate { flex: 0 0 48px; height: 50px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.mdate strong { font-family: var(--font-head); font-size: 21px; font-weight: 800; color: var(--ink); }
.mdate span { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 3px; }
.mrow.is-open .mdate { background: var(--green-soft); border-color: #bfe6cf; }
.mmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mmain strong { font-size: 15px; font-weight: 600; color: var(--ink); }
.mmain .msub { font-size: 13px; color: var(--muted-2); overflow-wrap: anywhere; }
.mside { flex: 0 0 auto; text-align: right; font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; }
@media (max-width: 640px) {
  .member-zone .mrow { padding: 12px 14px; gap: 12px; }
  /* filter návštev: Od a Do vedľa seba, tlačidlo na celú šírku */
  .member-zone .member-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
  .member-zone .member-filters .field { min-width: 0; }
  .member-zone .member-filters .btn { grid-column: 1 / -1; justify-content: center; }
  /* iPhone pri písme menšom ako 16 px stránku po ťuknutí do poľa priblíži */
  .input, select, textarea, input:not([type]), input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=search] { font-size: 16px; }
}
