/* Majerczak Trening – panel */
:root {
  --brand: #0B1F3A;
  --accent: #2563EB;
  --bg: #F3F5F9;
  --card: #FFFFFF;
  --text: #0F172A;
  --muted: #64748B;
  --line: #E2E8F0;
  --ok: #16A34A;
  --okbg: #DCFCE7;
  --mid: #CA8A04;
  --midbg: #FEF9C3;
  --bad: #DC2626;
  --badbg: #FEE2E2;
  --offbg: #F1F5F9;
  --r: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 14px rgba(15, 23, 42, .05);
}
.mt-body { margin: 0; padding-top: env(safe-area-inset-top, 0px); background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.mt-body.mt-noscroll { overflow: hidden; }
.mt-body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--brand); z-index: 31; }
#mt-app, #mt-app * { box-sizing: border-box; }
#mt-app [hidden] { display: none !important; }
#mt-app { min-height: 100vh; color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
#mt-app a { color: var(--accent); text-decoration: none; }
#mt-app h2 { font-size: 19px; margin: 0 0 10px; line-height: 1.25; }
#mt-app h3 { font-size: 16px; margin: 14px 0 6px; }
#mt-app p { margin: 6px 0; }
#mt-app small { font-size: 13px; }
.mt-ico { width: 20px; height: 20px; flex: none; }
.mt-muted { color: var(--muted); }
.mt-small { font-size: 13px; }
.mt-block { display: block; }
.mt-center { text-align: center; }
.mt-center-flex { justify-content: center; }
.mt-row { display: flex; align-items: center; gap: 12px; }
.mt-row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mt-h { margin: 22px 4px 10px !important; }
.mt-h3 { margin: 16px 0 8px; }
.mt-loading { padding: 60px 20px; text-align: center; color: var(--muted); }
.mt-ok { color: var(--ok); font-weight: 600; }
.mt-warn { color: #B45309; font-weight: 600; }

/* ---------- nagłówek, menu */
.mt-top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; height: 58px; padding: 0 max(6px, env(safe-area-inset-right, 0px)) 0 max(6px, env(safe-area-inset-left, 0px)); background: var(--brand); color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .15); }
.mt-top-title { text-align: center; font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-top .mt-icon-btn { color: #fff; }
.mt-top-av { justify-self: end; margin-right: 6px; display: flex; }
.mt-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 0; border-radius: 12px; background: transparent; color: inherit; cursor: pointer; }
.mt-icon-btn:hover { background: rgba(127, 127, 127, .12); }
.mt-icon-btn-sm { width: 34px; height: 34px; color: var(--muted); }
.mt-av { border-radius: 50%; object-fit: cover; display: inline-flex; flex: none; }
.mt-av-ini { align-items: center; justify-content: center; background: #DBEAFE; color: #1E3A8A; font-weight: 700; }
.mt-drawer-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; }
.mt-drawer { position: fixed; top: 0; left: 0; bottom: 0; width: 300px; max-width: 86vw; background: #fff; z-index: 41; transform: translateX(-102%); transition: transform .22s ease; overflow-y: auto; padding: calc(8px + env(safe-area-inset-top, 0px)) 8px 24px max(8px, env(safe-area-inset-left, 0px)); box-shadow: 4px 0 24px rgba(0, 0, 0, .15); }
.mt-menu-open .mt-drawer { transform: none; }
.mt-menu-open .mt-drawer-bg { opacity: 1; pointer-events: auto; }
.mt-drawer-me { display: flex; align-items: center; gap: 12px; padding: 14px 10px 16px; margin-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--text) !important; }
.mt-drawer-me b { display: block; }
.mt-drawer-me small { color: var(--muted); }
.mt-nav { display: flex; width: 100%; align-items: center; gap: 12px; padding: 11px 12px; border: 0; border-radius: 10px; background: none; color: var(--text) !important; font: inherit; font-size: 15px; cursor: pointer; text-align: left; }
.mt-nav:hover { background: var(--bg); }
.mt-nav.mt-active { background: #EFF6FF; color: var(--accent) !important; font-weight: 600; }
.mt-nav .mt-ico { color: var(--muted); }
.mt-nav.mt-active .mt-ico { color: var(--accent); }
.mt-nav-sep { margin: 12px 12px 4px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.mt-nav-sep:empty { padding-top: 0; }

/* ---------- treść */
.mt-main { max-width: 760px; margin: 0 auto; padding-block: 14px 100px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.mt-main:has(.mt-wide) { max-width: 1320px; }
.mt-card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; margin: 0 0 12px; }
.mt-empty { color: var(--muted); text-align: center; padding: 28px 16px; }
.mt-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-top: 1px solid var(--line); padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.mt-tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; color: var(--muted) !important; font-size: 12px; font-weight: 600; }
.mt-tabs a.mt-active { color: var(--accent) !important; }
.mt-tabs .mt-ico { width: 22px; height: 22px; }
@media (min-width: 900px) { .mt-tabs { display: none; } .mt-main { padding-bottom: 40px; } }

/* ---------- przyciski */
.mt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text) !important; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2; }
.mt-btn:hover { border-color: #CBD5E1; background: #F8FAFC; }
.mt-btn:disabled { opacity: .55; cursor: default; }
.mt-btn .mt-ico { width: 18px; height: 18px; }
.mt-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff !important; }
.mt-btn-primary:hover { background: #1D4ED8; border-color: #1D4ED8; }
.mt-btn-dark { background: #334155; border-color: #334155; color: #fff !important; }
.mt-btn-ghost { background: transparent; border-color: transparent; color: var(--muted) !important; }
.mt-btn-sm { padding: 6px 10px; font-size: 14px; }
.mt-btn-xl { padding: 15px 18px; font-size: 18px; border-radius: 14px; }
.mt-btn-block { display: flex; width: 100%; margin-top: 10px; }
.mt-btn.mt-active { background: var(--brand); border-color: var(--brand); color: #fff !important; }
.mt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }

/* ---------- dzień */
.mt-daynav { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; text-align: center; margin: 2px 0 12px; }
.mt-daynav b { display: block; font-size: 18px; }
.mt-daynav small { color: var(--muted); }
.mt-hero { display: flex; gap: 16px; align-items: center; background: linear-gradient(135deg, #0B1F3A, #1E3A8A); color: #fff; }
.mt-hero p { color: #CBD5E1; }
.mt-hero-num { font-size: 52px; font-weight: 800; line-height: 1; min-width: 70px; text-align: center; }
.mt-hero .mt-btn-primary { background: #fff; color: var(--brand) !important; border-color: #fff; margin-top: 6px; }
.mt-nudge, .mt-event { display: flex; align-items: center; gap: 12px; color: var(--text) !important; border: 1px dashed #93C5FD; background: #F8FBFF; }
.mt-nudge > div, .mt-event > div { flex: 1; }
.mt-nudge b, .mt-event b { display: block; }
.mt-nudge small, .mt-event small { color: var(--muted); }
.mt-nudge .mt-ico, .mt-event .mt-ico { color: var(--accent); }
.mt-focus { padding: 10px 14px; margin: 0 0 12px; border-radius: 12px; background: #E0E7FF; color: #1E1B4B; font-size: 15px; }
.mt-focus span { color: #4338CA; font-weight: 600; }

/* karta treningu */
.mt-session { border-left: 6px solid var(--c, #94A3B8); }
.mt-session.mt-is-done { opacity: .85; }
.mt-session-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.mt-cat { color: var(--c, #475569); }
.mt-slot { color: var(--muted); }
.mt-extra { margin-left: auto; background: #F5F3FF; color: #6D28D9; padding: 2px 8px; border-radius: 99px; text-transform: none; letter-spacing: 0; }
.mt-session h3 { font-size: 19px !important; margin: 6px 0 6px !important; }
.mt-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.mt-desc { font-size: 16px; }
.mt-why { font-size: 14px; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 8px 10px; margin-top: 10px !important; }
.mt-int { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.mt-int-1 { background: #DCFCE7; color: #166534; }
.mt-int-2 { background: #CFFAFE; color: #155E75; }
.mt-int-3 { background: #FEF3C7; color: #92400E; }
.mt-int-4 { background: #FFEDD5; color: #9A3412; }
.mt-int-5 { background: #FEE2E2; color: #991B1B; }
.mt-int-6 { background: #EDE9FE; color: #5B21B6; }
.mt-ex { margin: 10px 0 0; padding: 0 0 0 22px; }
.mt-ex li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.mt-ex li:last-child { border-bottom: 0; }
.mt-ex-name { font-weight: 700; }
.mt-ex-meta { font-size: 14px; color: #334155; }
.mt-ex-note { font-size: 13px; color: var(--muted); }
.mt-kg { color: var(--text); }
.mt-then { color: #9A3412; }
.mt-done { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 700; padding: 9px 4px; }
.mt-modal-date { color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.mt-modal .mt-session { box-shadow: none; padding: 4px 0 0 14px; margin: 0; }

/* ---------- plan */
.mt-seg { display: inline-flex; background: #E2E8F0; border-radius: 11px; padding: 3px; margin: 0 0 12px; }
.mt-seg a { padding: 7px 16px; border-radius: 9px; color: #334155 !important; font-weight: 600; font-size: 14px; }
.mt-seg a.mt-active { background: #fff; color: var(--text) !important; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.mt-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 4px; scrollbar-width: thin; }
.mt-chip { flex: none; min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: #fff; color: #334155 !important; font-weight: 700; border: 1px solid var(--line); }
.mt-chip.mt-chip-now { border-color: var(--accent); }
.mt-chip.mt-active { background: var(--brand); border-color: var(--brand); color: #fff !important; }
.mt-week-title { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; text-align: center; }
.mt-week-title b { display: block; font-size: 20px; }
.mt-week-title small { color: var(--muted); }
.mt-week-info { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 6px; justify-content: center; }
.mt-tag { background: var(--bg); border-radius: 99px; padding: 3px 10px; font-size: 13px; font-weight: 600; color: #334155; }
.mt-week-head p { font-size: 15px; }
.mt-legend-cats { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 4px 12px; font-size: 13px; color: #334155; }
.mt-legend-cats i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }
.mt-week-days { display: flex; flex-direction: column; gap: 8px; }
.mt-pday { display: grid; grid-template-columns: 58px 1fr; gap: 8px; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 8px; }
.mt-pday.mt-today { outline: 2px solid var(--accent); }
.mt-pday-h { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px; background: var(--bg); color: var(--text) !important; }
.mt-pday-h b { font-size: 16px; }
.mt-pday-h span { font-size: 13px; color: var(--muted); }
.mt-pday-list { display: flex; flex-direction: column; gap: 6px; }
.mt-prow { position: relative; display: block; width: 100%; text-align: left; border: 0; border-left: 5px solid var(--c); border-radius: 10px; background: #F8FAFC; padding: 7px 34px 7px 10px; font: inherit; color: var(--text); cursor: pointer; }
.mt-prow:hover { background: #EFF6FF; }
.mt-prow-t { display: block; font-weight: 700; font-size: 15px; line-height: 1.3; }
.mt-prow-m { display: block; font-size: 13px; color: var(--muted); }
.mt-prow-empty { border-left-color: var(--line); color: var(--muted); cursor: default; }
.mt-prow-ok { position: absolute; right: 10px; top: 50%; margin-top: -10px; color: var(--ok); }
.mt-prow.mt-is-done { background: #F0FDF4; }
.mt-ov-head, .mt-ov { display: grid; grid-template-columns: 46px 1fr minmax(120px, 34%); gap: 6px 10px; align-items: center; }
.mt-ov-head { font-size: 12px; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.mt-ov-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.mt-ov-week { display: flex; flex-direction: column; align-items: center; color: var(--text) !important; }
.mt-ov-week small { color: var(--muted); font-size: 11px; }
.mt-ov-day { display: flex; flex-direction: column; gap: 2px; height: 30px; border-radius: 6px; overflow: hidden; background: var(--bg); }
.mt-ov-day.mt-today { outline: 2px solid var(--accent); }
.mt-stripe { flex: 1; display: block; }
.mt-ov-txt { font-size: 13px; font-weight: 600; line-height: 1.25; }
.mt-ov-txt small { display: block; color: var(--muted); font-weight: 400; }
@media (max-width: 520px) { .mt-ov-head, .mt-ov { grid-template-columns: 40px 1fr; } .mt-ov-txt, .mt-ov-head > span:last-child { display: none; } }

/* ---------- formularze */
.mt-form label, .mt-form fieldset { display: block; margin: 0 0 12px; font-size: 14px; font-weight: 600; color: #334155; border: 0; padding: 0; }
.mt-form legend { padding: 0; margin-bottom: 6px; }
.mt-form input:not([type=radio]):not([type=checkbox]):not([type=file]), .mt-form textarea, .mt-form select, .mt-select, .mt-copy input {
  display: block; width: 100%; margin-top: 5px; padding: 11px 12px; border: 1px solid #CBD5E1; border-radius: 10px; background: #fff; font: inherit; font-size: 16px; color: var(--text); font-weight: 400;
}
.mt-form input:focus, .mt-form textarea:focus, .mt-form select:focus, .mt-select:focus { outline: 2px solid #BFDBFE; border-color: var(--accent); }
.mt-select { margin: 0 0 10px; }
.mt-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: end; }
.mt-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
@media (max-width: 640px) { .mt-grid3 { grid-template-columns: 1fr; } }
.mt-segbtn { display: flex; flex-wrap: wrap; gap: 6px; }
.mt-segbtn input { position: absolute; opacity: 0; pointer-events: none; }
.mt-segbtn label { margin: 0 !important; padding: 9px 12px; border: 1px solid #CBD5E1; border-radius: 10px; background: #fff; cursor: pointer; font-weight: 600; font-size: 14px; }
.mt-segbtn input:checked + label { background: var(--brand); border-color: var(--brand); color: #fff; }
.mt-segbtn input:focus-visible + label { outline: 2px solid #93C5FD; }
.mt-switch { display: flex !important; align-items: center; gap: 10px; font-weight: 500 !important; }
.mt-switch input { width: 20px; height: 20px; flex: none; }
.mt-file { display: flex !important; align-items: center; justify-content: center; gap: 10px; padding: 16px; border: 2px dashed #CBD5E1; border-radius: 12px; cursor: pointer; color: #334155; background: #F8FAFC; }
.mt-file { position: relative; }
.mt-file input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.mt-file span { font-weight: 600; }
.mt-file.mt-has-file { border-color: var(--accent); background: #EFF6FF; color: var(--accent); }
.mt-file-big { padding: 28px 16px; }
.mt-copy { display: flex; gap: 8px; align-items: center; }
.mt-copy input { margin: 0; font-size: 13px; }

/* ---------- dziennik, rekordy */
.mt-streak { background: #FFEDD5; color: #9A3412; font-weight: 700; padding: 4px 10px; border-radius: 99px; font-size: 13px; }
.mt-jhead, .mt-jrow { display: grid; grid-template-columns: 1.3fr 1fr .8fr .8fr 1fr; gap: 6px; align-items: center; font-size: 14px; }
.mt-jhead { color: var(--muted); font-size: 12px; font-weight: 700; padding: 0 0 6px; border-bottom: 1px solid var(--line); }
.mt-jrow { padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--text) !important; }
.mt-jdate { font-weight: 700; }
.mt-pill { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mt-pill-ok { background: var(--okbg); color: #166534; }
.mt-pill-mid { background: var(--midbg); color: #854D0E; }
.mt-pill-bad { background: var(--badbg); color: #991B1B; }
.mt-pill-off { background: var(--offbg); color: #64748B; }
.mt-rec-list { display: flex; flex-direction: column; }
.mt-rec { display: grid; grid-template-columns: 1fr auto 40px; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text) !important; }
.mt-rec:last-child { border-bottom: 0; }
.mt-rec b { display: block; font-size: 15px; }
.mt-rec small { color: var(--muted); }
.mt-rec-v { font-weight: 800; font-size: 17px; text-align: right; white-space: nowrap; }
.mt-trend { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 800; padding: 1px 6px; border-radius: 6px; }
.mt-up { background: var(--okbg); color: #166534; }
.mt-down { background: var(--badbg); color: #991B1B; }
.mt-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mt-table th { text-align: left; font-size: 12px; color: var(--muted); padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); }
.mt-table td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.mt-table td.mt-win { color: var(--ok); font-weight: 800; }
.mt-zrow { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.mt-zrow .mt-int { min-width: 128px; text-align: center; }
.mt-zrow b, .mt-zrow small { display: block; }
.mt-zrow small { color: var(--muted); }
.mt-prose ul, .mt-prose ol { margin: 6px 0; padding-left: 22px; }
.mt-prose li { margin: 5px 0; }

/* ---------- wykresy */
.mt-chart { display: block; width: 100%; max-width: 620px; height: auto; margin: 6px auto; }
.mt-chart .mt-grid { stroke: #E2E8F0; stroke-width: 1; }
.mt-chart .mt-ref { stroke: #94A3B8; stroke-width: 1; stroke-dasharray: 4 4; }
.mt-chart .mt-axis { font-size: 13px; fill: #64748B; }
.mt-chart .mt-chart-lab { font-size: 13px; font-weight: 700; }
.mt-bar-a { fill: #CBD5E1; background: #CBD5E1; }
.mt-bar-b { fill: #2563EB; background: #2563EB; }
.mt-legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.mt-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.mt-chart-empty { padding: 30px 10px; text-align: center; color: var(--muted); background: var(--bg); border-radius: 12px; }

/* ---------- zdjęcia */
.mt-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.mt-photo { position: relative; display: block; padding: 0; border: 3px solid transparent; border-radius: 12px; overflow: hidden; background: #fff; cursor: pointer; font: inherit; }
.mt-photo img { display: block; width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.mt-photo span { display: block; padding: 5px 8px; font-size: 13px; color: #334155; text-align: left; }
.mt-photo i { display: none; position: absolute; top: 6px; right: 6px; background: var(--accent); color: #fff; border-radius: 50%; padding: 3px; }
.mt-photo.mt-sel { border-color: var(--accent); }
.mt-photo.mt-sel i { display: flex; }
.mt-cmp-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.mt-cmp-side { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mt-cmp-side figure { margin: 0; }
.mt-cmp-side img { width: 100%; border-radius: 10px; display: block; }
.mt-cmp-side figcaption { text-align: center; font-weight: 700; margin-top: 4px; }
.mt-slide-box { position: relative; }
.mt-slide-box img { display: block; width: 100%; border-radius: 10px; }
.mt-slide-top { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.mt-cmp-slide input[type=range] { width: 100%; margin: 10px 0 4px; }

/* ---------- porównanie, ludzie */
.mt-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.mt-person { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: 12px; background: var(--bg); color: var(--text) !important; text-align: center; }
.mt-person small { color: var(--muted); }
.mt-vs { display: flex; justify-content: space-around; align-items: center; text-align: center; }
.mt-vs > div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mt-vs > span { font-weight: 800; color: var(--muted); font-size: 20px; }
.mt-bars2 > div { display: grid; grid-template-columns: 90px 1fr 50px; gap: 10px; align-items: center; margin: 8px 0; }
.mt-bars2 b { text-align: right; }
.mt-pbar { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.mt-pbar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .25s; }
.mt-pbar-2 i { background: #EA580C; }

/* ---------- wspólne */
.mt-ev { display: flex; gap: 14px; }
.mt-ev-date { flex: none; width: 56px; height: 62px; border-radius: 12px; background: var(--brand); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mt-ev-date b { font-size: 24px; line-height: 1; }
.mt-ev-date span { font-size: 12px; text-transform: uppercase; }
.mt-ev-body { flex: 1; min-width: 0; }
.mt-ev-body h3 { margin: 0 0 2px !important; }
.mt-ev-people { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.mt-ev-p { border-radius: 50%; border: 3px solid #E2E8F0; display: inline-flex; }
.mt-ev-tak { border-color: var(--ok); }
.mt-ev-nie { border-color: var(--bad); opacity: .55; }
.mt-invite { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.mt-inv { display: flex !important; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; margin: 0 !important; font-weight: 500 !important; }

/* ---------- garmin */
.mt-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.mt-tiles > div { background: var(--bg); border-radius: 12px; padding: 10px; text-align: center; }
.mt-tiles small { display: block; color: var(--muted); font-size: 12px; }
.mt-tiles b { font-size: 18px; }
@media (max-width: 520px) { .mt-tiles { grid-template-columns: 1fr 1fr; } }
.mt-zbar { display: flex; height: 16px; border-radius: 99px; overflow: hidden; background: var(--line); }
.mt-zbar i { display: block; height: 100%; }
.mt-z1 { background: #22C55E; } .mt-z2 { background: #06B6D4; } .mt-z3 { background: #F59E0B; } .mt-z4 { background: #EF4444; }
.mt-zleg { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 13px; color: #334155; }
.mt-zleg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
.mt-verdict { list-style: none; padding: 0; margin: 6px 0 10px; }
.mt-verdict li { padding: 9px 12px; border-radius: 10px; margin: 6px 0; font-size: 15px; }
.mt-v-ok { background: var(--okbg); color: #14532D; }
.mt-v-warn { background: #FFEDD5; color: #7C2D12; }
.mt-v-info { background: #E0F2FE; color: #0C4A6E; }

/* ---------- arkusz (admin) */
.mt-saved { font-size: 13px; font-weight: 700; color: var(--ok); opacity: 0; transition: opacity .2s; }
.mt-saved.mt-on { opacity: 1; }
.mt-sh-week label { font-size: 13px; font-weight: 600; color: #334155; }
.mt-sh-week input { display: block; width: 100%; margin: 4px 0 10px; padding: 8px 10px; border: 1px solid #CBD5E1; border-radius: 8px; font: inherit; font-size: 14px; }
.mt-sheet-wrap { overflow-x: auto; }
.mt-sheet { width: 100%; border-collapse: collapse; font-size: 14px; }
.mt-sheet-plan { table-layout: fixed; min-width: 1240px; }
.mt-sheet-plan input, .mt-sheet-plan select, .mt-sheet-plan textarea { min-width: 0 !important; }
.mt-sheet th { position: sticky; top: 0; background: #F8FAFC; text-align: left; font-size: 12px; color: var(--muted); padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mt-sheet td { padding: 5px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mt-sheet input, .mt-sheet select, .mt-sheet textarea { width: 100%; min-width: 70px; padding: 7px 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; font: inherit; font-size: 14px; color: var(--text); resize: vertical; }
.mt-sheet input:hover, .mt-sheet select:hover, .mt-sheet textarea:hover { border-color: var(--line); background: #fff; }
.mt-sheet input:focus, .mt-sheet select:focus, .mt-sheet textarea:focus { border-color: var(--accent); background: #fff; outline: none; }
.mt-sheet td:nth-child(3) input { font-weight: 700; }
.mt-sheet .mt-sh-num { min-width: 64px; width: 72px; }
.mt-sheet .mt-sh-sm { min-width: 100px; }
.mt-sh-row td:first-child { border-left: 5px solid var(--c); }
.mt-sh-cat { font-weight: 700; }
.mt-sh-day td { background: #EEF2F7; padding: 8px 10px; }
.mt-sh-day td b { margin-right: 12px; }
.mt-sh-act { white-space: nowrap; }
.mt-gym-ed td:first-child input { min-width: 220px; font-weight: 600; }
.mt-gym-ed input, .mt-gym-ed select { border-color: var(--line); background: #fff; }
@media (max-width: 760px) {
  .mt-sheet-plan { min-width: 0; table-layout: auto; }
  .mt-sheet-plan colgroup { display: none; }
  .mt-sheet:not(.mt-gym-ed) thead { display: none; }
  .mt-sheet:not(.mt-gym-ed), .mt-sheet:not(.mt-gym-ed) tbody, .mt-sheet:not(.mt-gym-ed) tr, .mt-sheet:not(.mt-gym-ed) td { display: block; width: 100%; }
  .mt-sh-row { border-left: 5px solid var(--c); margin: 8px 0; border-radius: 10px; background: #F8FAFC; padding: 6px; }
  .mt-sh-row td { border: 0 !important; display: grid !important; grid-template-columns: 90px 1fr; align-items: center; padding: 2px 4px; }
  .mt-sh-row td::before { content: attr(data-l); font-size: 12px; color: var(--muted); font-weight: 700; }
  .mt-sh-row td.mt-sh-act { display: flex !important; justify-content: flex-end; gap: 6px; }
  .mt-sh-row td.mt-sh-act::before { content: none; }
  .mt-sheet td:nth-child(3) input, .mt-sheet td:nth-child(4) textarea { min-width: 0; }
}
.mt-ath { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; margin-bottom: 10px; }
.mt-ath > a { color: var(--text) !important; }
.mt-ath-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.mt-ath-stats > div { background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.mt-ath-stats small { display: block; color: var(--muted); font-size: 12px; }
.mt-cred { display: grid; gap: 8px; margin: 12px 0; }
.mt-cred > div { background: var(--bg); padding: 10px 12px; border-radius: 10px; }
.mt-cred small { display: block; color: var(--muted); }
.mt-cred b { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 16px; word-break: break-all; }
.mt-matrix { border-collapse: separate; border-spacing: 3px; font-size: 12px; }
.mt-matrix th { color: var(--muted); font-weight: 600; text-align: center; min-width: 36px; line-height: 1.2; }
.mt-mx-name a { display: flex; align-items: center; gap: 8px; color: var(--text) !important; font-weight: 600; white-space: nowrap; padding-right: 8px; }
.mt-mx { display: flex; align-items: center; justify-content: center; width: 36px; height: 30px; border-radius: 7px; font-weight: 700; font-size: 12px; }
.mt-mx-none { background: transparent; border: 1px dashed #CBD5E1; }
.mt-alert { background: #FEF2F2; color: #7F1D1D; }
.mt-okbox { background: #F0FDF4; color: #14532D; }

/* ---------- modal, toast */
#mt-modal { display: none; }
#mt-modal.mt-show { display: block; }
.mt-modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 50; }
.mt-modal { position: fixed; z-index: 51; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, 94vw); max-height: 88vh; overflow-y: auto; background: #fff; border-radius: 18px; padding: 20px 18px 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.mt-modal-wide { width: min(980px, 96vw); }
.mt-modal-x { position: absolute; top: 8px; right: 8px; color: var(--muted); }
.mt-modal h2 { padding-right: 40px; }
@media (max-width: 640px) {
  .mt-modal { top: auto; bottom: 0; left: 0; right: 0; transform: none; width: 100%; max-height: 90vh; border-radius: 18px 18px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
}
.mt-mail-preview { width: 100%; height: 60vh; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
#mt-toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 20px); z-index: 60; background: #0F172A; color: #fff; padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 15px; opacity: 0; pointer-events: none; transition: all .2s; max-width: 92vw; text-align: center; }
#mt-toast.mt-show { opacity: 1; transform: translate(-50%, 0); }
#mt-toast.mt-bad { background: #B91C1C; }

/* ---------- siłownia krok po kroku */
.mt-playing .mt-top, .mt-playing .mt-tabs { display: none; }
.mt-playing .mt-main { padding: 0 0 30px; max-width: 620px; }
.mt-player { min-height: 100vh; background: #fff; }
.mt-ph { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; padding: 8px 6px; text-align: center; }
.mt-ph b { display: block; font-size: 15px; }
.mt-ph small { color: var(--muted); font-variant-numeric: tabular-nums; }
.mt-pbar-top { border-radius: 0; height: 6px; }
.mt-pwork { padding: 20px 18px; }
.mt-pex-n { text-align: center; color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: .05em; }
.mt-pwork h2 { text-align: center; font-size: 27px !important; margin: 8px 0 6px !important; }
.mt-pset { text-align: center; font-size: 18px; color: #334155; }
.mt-pset b { font-size: 22px; }
.mt-preps { text-align: center; font-size: 20px; margin: 10px 0 16px; color: #334155; }
.mt-preps b { font-size: 44px; color: var(--text); }
.mt-pkg { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 10px 0; }
.mt-pkg > div { min-width: 150px; text-align: center; }
.mt-pkg b { display: block; font-size: 40px; line-height: 1.1; }
.mt-pkg small { color: var(--muted); }
.mt-round { width: 56px; height: 56px; border-radius: 50%; border: 1px solid #CBD5E1; background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); }
.mt-round .mt-ico { width: 24px; height: 24px; }
.mt-kg-in { width: 130px; font-size: 30px; text-align: center; border: 1px solid #CBD5E1; border-radius: 12px; padding: 6px; font-weight: 800; }
.mt-then-big { color: #9A3412; font-size: 16px; }
.mt-pnote { display: flex; gap: 8px; align-items: flex-start; background: var(--bg); border-radius: 12px; padding: 10px 12px; color: #334155; }
.mt-pclock { text-align: center; font-size: 56px; font-weight: 800; font-variant-numeric: tabular-nums; margin: 6px 0; }
.mt-pclock-big { font-size: 88px; color: var(--accent); }
.mt-rate { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.mt-rate button { padding: 22px 6px; border-radius: 14px; border: 0; font: inherit; font-size: 17px; font-weight: 800; cursor: pointer; }
.mt-rate [data-r=lekko] { background: var(--okbg); color: #166534; }
.mt-rate [data-r=ok] { background: #DBEAFE; color: #1E3A8A; }
.mt-rate [data-r=ciezko] { background: var(--badbg); color: #991B1B; }
.mt-sug { display: flex; gap: 10px; align-items: flex-start; border-radius: 14px; padding: 12px 14px; margin: 16px 0; }
.mt-sug p { margin: 0 0 6px !important; font-weight: 600; }
.mt-sug ul { margin: 4px 0 8px; padding-left: 18px; }
.mt-sug .mt-btn { margin: 0 6px 4px 0; }
.mt-sug-up { background: var(--okbg); color: #14532D; }
.mt-sug-down { background: var(--badbg); color: #7F1D1D; }
.mt-sug-mid { background: #FFEDD5; color: #7C2D12; }
.mt-sug-ok { background: #E0F2FE; color: #0C4A6E; }
.mt-pnext { margin-top: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; }
.mt-pnext small { display: block; color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: 12px; }
.mt-pnext b { display: block; font-size: 17px; }
.mt-pnext span { color: #334155; }
.mt-pex { padding-left: 20px; margin: 12px 0; }
.mt-pex li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.mt-pex li b { display: block; }
.mt-pex li span { color: #334155; font-size: 14px; }
.mt-pex i { font-style: normal; font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 6px; }
.mt-r-lekko { background: var(--okbg); color: #166534; }
.mt-r-ok { background: #DBEAFE; color: #1E3A8A; }
.mt-r-ciezko { background: var(--badbg); color: #991B1B; }
.mt-pstart h2 { margin-top: 8px !important; }
.mt-pdone-ico { width: 72px; height: 72px; margin: 10px auto; border-radius: 50%; background: var(--okbg); color: var(--ok); display: flex; align-items: center; justify-content: center; }
.mt-pdone-ico .mt-ico { width: 40px; height: 40px; }
.mt-pdone label { display: block; font-weight: 600; font-size: 14px; margin-top: 10px; }
.mt-pdone textarea { width: 100%; margin-top: 4px; padding: 10px; border: 1px solid #CBD5E1; border-radius: 10px; font: inherit; }

/* ---------- logowanie */
.mt-login { max-width: 400px; margin: 8vh auto; padding: 28px 24px; background: #fff; border-radius: 18px; box-shadow: var(--shadow); font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); }
.mt-login h1 { margin: 6px 0; font-size: 24px; }
.mt-login p { color: var(--muted); }
.mt-login-logo { width: 54px; height: 54px; border-radius: 14px; background: var(--brand); color: #fff; font-weight: 800; font-size: 20px; display: flex; align-items: center; justify-content: center; }
.mt-login-form { display: grid; gap: 6px; margin-top: 14px; }
.mt-login-form label { margin-top: 6px; }
.mt-login input[type=text], .mt-login input[type=password] { width: 100%; box-sizing: border-box; padding: 13px 12px; border: 1px solid #CBD5E1; border-radius: 12px; font-size: 17px; background: #fff; color: var(--text); }
.mt-login input:focus { outline: 2px solid #93C5FD; border-color: var(--accent); }
.mt-pwd { position: relative; }
.mt-pwd input { padding-right: 78px !important; }
.mt-pwd-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--bg); color: var(--text); border-radius: 8px; padding: 7px 10px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.mt-login .mt-remember { display: flex; gap: 10px; align-items: center; font-weight: 500; font-size: 15px; margin: 10px 0 6px; }
.mt-remember input { width: 22px; height: 22px; accent-color: var(--accent); }
.mt-login-btn { width: 100%; padding: 15px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; margin-top: 6px; }
.mt-login-err { background: #FEF2F2; color: #991B1B !important; border-radius: 10px; padding: 10px 12px; font-weight: 600; }
.mt-login-lost { text-align: center; font-size: 14px; margin-top: 16px; }
.mt-login-link { color: var(--accent); font-weight: 600; }


/* potwierdzenie w panelu */
#mt-ask { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 16px; }
.mt-ask-bg { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); }
.mt-ask-box { position: relative; background: #fff; border-radius: 16px; padding: 18px; width: min(420px, 100%); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.mt-ask-box p { margin: 0 0 14px; font-weight: 600; }
.mt-ask-btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.mt-demo-files { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 4px; }
.mt-demo-files small { flex-basis: 100%; }

/* wyniki testów i tętno */
.mt-inunit { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.mt-inunit input { flex: 1; min-width: 0; font-size: 18px !important; }
.mt-inunit i { font-style: normal; color: var(--muted); font-weight: 600; min-width: 2.5em; }
.mt-form label small { font-weight: 400; }
.mt-runs { margin: 0 0 12px; }
.mt-runs legend { font-size: 14px; font-weight: 600; color: #334155; margin-bottom: 6px; }
.mt-testbox { background: var(--offbg); border-radius: 12px; padding: 10px 12px; margin: 10px 0; font-size: 14px; }
.mt-testbox p { margin: 4px 0 0; color: var(--muted); }
.mt-results { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.mt-results li { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 4px; }
.mt-results li:first-child { border-top: 0; padding-top: 0; }
.mt-results span { color: #334155; min-width: 0; }
.mt-results b { white-space: nowrap; }
button.mt-nudge-btn { width: 100%; text-align: left; font: inherit; cursor: pointer; }

/* ---------------------------------------------------------------- wersja 0.3: dane z zegarka, testy, porównanie */
.mt-nudge-soft { border-style: solid; border-color: var(--line); background: #fff; }
.mt-top-av { display: flex; justify-content: flex-end; }
.mt-pct { color: var(--muted); font-weight: 600; }
.mt-req { color: var(--bad); font-weight: 700; }
.mt-nowrap { white-space: nowrap; }
.mt-done-tag { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--ok); text-transform: none; letter-spacing: 0; font-size: 13px; }
.mt-done-tag .mt-ico { width: 16px; height: 16px; }
.mt-doneline { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 4px; padding: 10px 12px; border-radius: 12px; background: var(--okbg); color: #14532D; font-weight: 600; font-size: 15px; }
.mt-doneline .mt-ico { flex: none; margin-top: 1px; }
.mt-watch { margin: 12px 0 4px; padding: 12px; border-radius: 12px; background: #F8FBFF; border: 1px solid #BFDBFE; }
.mt-watch-h { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 4px; }
.mt-watch-h .mt-ico { color: var(--accent); }
.mt-testbox { border: 1px solid #FBCFE8; background: #FFF7FB; }
.mt-testbox .mt-watch-h .mt-ico { color: #DB2777; }
.mt-testbox form { margin-top: 8px; }
.mt-testbox .mt-btn-ghost { margin-top: 8px; }
.mt-alertcard { border: 1px solid #FDE68A; background: #FFFBEB; }
.mt-alertcard > b { display: flex; align-items: center; gap: 8px; color: #92400E; }
.mt-alertcard p { margin: 4px 0 8px !important; color: #92400E; }
.mt-misslist { display: grid; gap: 6px; }
.mt-misslist a { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: #fff; border: 1px solid #FDE68A; border-radius: 10px; color: var(--text) !important; font-weight: 600; }
.mt-zones td { vertical-align: top; }
.mt-zones .mt-int { min-width: 38px; text-align: center; }
.mt-cmp { padding: 10px 8px 12px; }
.mt-cmp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mt-cmp-row { display: grid; grid-template-columns: minmax(104px, 1.3fr) repeat(var(--cols, 3), minmax(76px, 1fr)); gap: 4px; align-items: stretch; border-bottom: 1px solid var(--line); }
.mt-cmp-l { padding: 9px 6px 9px 4px; font-size: 14px; font-weight: 600; color: #334155; line-height: 1.25; }
.mt-cmp-l small { color: var(--muted); font-weight: 500; }
.mt-cmp-v { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 7px 4px; border-radius: 10px; margin: 3px 0; font-size: 16px; }
.mt-cmp-v small { font-size: 11px; color: var(--muted); line-height: 1.25; }
.mt-cmp-v small .mt-up { color: var(--ok); font-weight: 700; }
.mt-cmp-v small .mt-down { color: var(--bad); font-weight: 700; }
.mt-cmp-me { background: #F1F5FF; }
.mt-cmp-best { background: var(--okbg); }
.mt-cmp-best b { color: #14532D; }
.mt-cmp-head { position: sticky; top: 0; background: #fff; z-index: 2; border-bottom: 2px solid var(--line); }
.mt-cmp-head .mt-cmp-v { gap: 3px; font-size: 14px; }
.mt-cmp-head .mt-cmp-v small { font-size: 11px; font-weight: 700; color: var(--accent); }
.mt-cmp-sec { margin: 14px 4px 2px; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 380px) { .mt-cmp-row { grid-template-columns: minmax(92px, 1.2fr) repeat(var(--cols, 3), minmax(66px, 1fr)); } .mt-cmp-v { font-size: 15px; } }

.mt-nav span small { font-size: 12px; color: var(--muted); font-weight: 500; }
.mt-mx-name { position: sticky; left: 0; background: #fff; z-index: 1; }
.mt-matrix thead th:first-child { position: sticky; left: 0; background: #fff; z-index: 1; }
