/* App glue styles that complement v2 design-system CSS. */

.auth-wrap{
  min-height: calc(100vh - 53px);
  display:grid;
  place-items:center;
  padding: 24px 16px;
  background: var(--bg-2);
}
@media (max-width: 640px){
  .auth-wrap{
    align-items: start;
    padding-top: 24px;
  }
}

.auth-card{
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
  padding: 22px;
}

.auth-title{
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 22px;
  margin-bottom: 6px;
}
.auth-sub{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.field{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom: 12px;
}
.field label{
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.field select{
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--body);
  font-size: 13px;
}

/* Top utility bar (language / changelog; app logout is in sidebar + Settings) */
.ext-nav{
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--dark);
  color: #fff;
  padding: 10px 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  overflow-x: auto;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.ext-nav::-webkit-scrollbar{ height: 0; }
.ext-nav a{
  color: rgba(255,255,255,0.90);
  text-decoration: none;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  white-space: nowrap;
}
.ext-nav a.current{
  background: rgba(176,245,128,0.22);
  border-color: rgba(176,245,128,0.35);
  color: #fff;
}
.ext-nav a:hover{ background: rgba(255,255,255,0.08); }
.ext-nav-brand{
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}
.ext-nav-brand-mark{
  width: 24px;
  height: 24px;
  background: var(--primary);
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--dark);
  font-weight: 800;
  font-size: 13px;
}

.ext-nav-label{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
}
.ext-nav-divider{
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,0.14);
  flex: 0 0 auto;
}
.ext-nav-spacer{ flex: 1 1 auto; }

.nav-item-sidebar-logout{
  opacity: .88;
}
.nav-item-sidebar-logout:hover{ opacity: 1; }

.sidebar-user-plan{
  margin-top: 6px;
  font-family: var(--body);
  font-size: 10px;
  line-height: 1.35;
  color: rgba(255,255,255,0.55);
}
.sidebar-user-plan-until{
  margin-top: 2px;
  font-family: var(--body);
  font-size: 10px;
  line-height: 1.35;
  color: rgba(255,255,255,0.45);
}
.sidebar-user-renew{
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.sidebar-user-renew:hover{ text-decoration: underline; opacity: .95; }

/* Sidebar: icons + spacing */
.nav-item .nav-ico{
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.70);
  flex: 0 0 auto;
}
.nav-item.active .nav-ico{ color: var(--dark); }
.nav-item .nav-ico svg{ width: 18px; height: 18px; }
.nav-item .nav-txt{ min-width: 0; }

/* Mobile-only "more" sheet (hidden on desktop) */
.tabbar-more-sheet { display: none; }

/* Subtle legal footer (always-visible, very low contrast on purpose) */
.app-legal-footer{
  margin: 56px 0 18px auto;
  padding: 12px 4px 0;
  text-align: right;
  font-family: var(--body);
  font-size: 11px;
  line-height: 1.5;
  color: rgba(15, 23, 42, 0.32);
  letter-spacing: 0.01em;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
.app-legal-footer__links{
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}
.app-legal-footer__links a{
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
  padding-bottom: 1px;
  transition: color .15s ease;
}
.app-legal-footer__links a:hover{
  color: var(--secondary);
}
.app-legal-footer__copy{
  opacity: 0.85;
  white-space: nowrap;
}
.app-legal-footer__sep{
  opacity: 0.6;
}
@media (max-width: 640px){
  .app-legal-footer__copy,
  .app-legal-footer__links{
    white-space: normal;
  }
}
/* Mobile: stopka wyśrodkowana — dotyczy każdego kontekstu (app shell, auth, public). */
@media (max-width: 900px){
  .app-legal-footer{
    text-align: center;
    justify-content: center;
  }
  .app-legal-footer__links{
    justify-content: center;
    flex-wrap: wrap;
  }
}
[data-theme="dark"] .app-legal-footer{
  color: rgba(248, 250, 252, 0.32);
}

/* Inside the app shell (sidebar + main column), pin the footer to the
   bottom-right of the main column so the sidebar visually ends at the same row. */
.app-shell .main{
  display: flex;
  flex-direction: column;
}
.app-shell .main > .app-legal-footer{
  margin-top: auto;
  /* wyciągamy stopkę poza padding `<main>`, żeby siedziała przy krawędziach kolumny,
     ale wciąż w obrębie głównego obszaru (nie pod sidebar). */
  margin-left: -32px;
  margin-right: -32px;
  margin-bottom: -32px;
  padding: 14px 32px 18px;
  border-top: 1px solid var(--border, rgba(15, 23, 42, 0.08));
  background: transparent;
  text-align: right;
  justify-content: flex-end;
}
@media (max-width: 900px) {
  .app-shell .main > .app-legal-footer{
    margin-left: -14px;
    margin-right: -14px;
    margin-bottom: -96px;
    padding-left: 14px;
    padding-right: 14px;
    padding-bottom: calc(18px + 96px);
    /* Mobile: stopka wyśrodkowana — wygodniej do czytania na wąskich ekranach. */
    text-align: center;
    justify-content: center;
  }
  .app-shell .main > .app-legal-footer .app-legal-footer__links{
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* =========================
   Mobile responsiveness
   ========================= */
@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr !important;
    min-height: 100vh;
  }
  .sidebar {
    display: none !important;
  }
  .main {
    padding: 14px 14px 96px !important;
  }

  /* Bottom nav */
  .tabbar {
    display: flex !important;
    grid-template-columns: none !important;
    justify-content: space-around;
    align-items: stretch;
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  .tabbar a,
  .tabbar .tabbar-more-btn {
    flex: 1 1 0;
    min-width: 0;
    max-width: 96px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 10px 0;
    color: var(--muted);
    text-decoration: none;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .tabbar .tabbar-more-btn span:last-child {
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .tabbar .tabbar-ico-wrap{
    position: relative;
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
  }
  .tabbar .tabbar-ico{
    width: 18px;
    height: 18px;
    display:grid;
    place-items:center;
    color: currentColor;
  }
  .tabbar .tabbar-ico svg{ width: 18px; height: 18px; }
  .tabbar .tabbar-live-dot{
    position: absolute;
    top: -2px;
    right: -5px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--error);
    box-shadow: 0 0 0 2px var(--bg);
    animation: tabbar-live-pulse 1.8s ease-in-out infinite;
  }
  @keyframes tabbar-live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
  }
  .tabbar a.active {
    color: var(--text);
  }

  /* Mobile "more" sheet (hamburger drawer) */
  .tabbar-more-sheet {
    position: fixed;
    inset: 0;
    z-index: 2050;
    display: none;
  }
  .tabbar-more-sheet.is-open { display: block; }
  .tabbar-more-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9,18,50,0.45);
    animation: tabbar-more-fade .15s ease-out;
  }
  .tabbar-more-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    padding: 8px 16px max(20px, env(safe-area-inset-bottom));
    box-shadow: 0 -10px 30px rgba(0,0,0,0.16);
    max-height: 75vh;
    overflow: auto;
    animation: tabbar-more-slide .18s ease-out;
  }
  .tabbar-more-grab {
    width: 38px;
    height: 4px;
    background: var(--border);
    border-radius: 999px;
    margin: 6px auto 12px;
  }
  .tabbar-more-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .tabbar-more-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 6px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--dark);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
  }
  .tabbar-more-item.active {
    border-color: var(--secondary);
    background: rgba(99,102,241,0.08);
  }
  .tabbar-more-ico {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    color: var(--muted);
  }
  .tabbar-more-ico svg { width: 22px; height: 22px; }
  .tabbar-more-label { line-height: 1.25; }
  @keyframes tabbar-more-fade {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  @keyframes tabbar-more-slide {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  /* Common two-column grids should stack */
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
  }
}

/* ===============================
   Compatibility: old "clients-*" tables
   (views use clients-table/clients-row)
   =============================== */
.clients-table{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.clients-row{
  display: grid;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.clients-row.head{
  background: var(--bg);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.clients-row:last-child{ border-bottom: none; }

.clients-name{
  display:flex;
  gap:10px;
  align-items:center;
  min-width: 0;
}
.clients-name .avatar{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display:grid;
  place-items:center;
  font-family: var(--display);
  font-weight: 800;
  background: linear-gradient(135deg, #4d7cff, #001f8a);
  color: #fff;
  flex: 0 0 auto;
}
.clients-name-info{ min-width:0; }
.clients-name-text{
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.clients-name-meta{
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile: hide table head and stack rows */
@media (max-width: 820px){
  .clients-row.head{ display:none; }
  .clients-row{ grid-template-columns: 1fr !important; gap: 8px; }
}

/* ===============================
   Trainer calendar (MVP)
   =============================== */
.cal-trener-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:12px;
}
.cal-trener-week{
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.cal-trener-views{
  display:flex;
  gap:2px;
  padding:3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.cal-trener-view{
  border:none;
  background:transparent;
  padding:7px 12px;
  font-size:12px;
  font-weight:700;
  color: var(--muted);
  border-radius: 999px;
  cursor:pointer;
}
.cal-trener-view.active{
  background: var(--text);
  color: var(--bg);
}

/* Legend like in v2 mock */
.cal-legend{
  display:flex;
  gap:14px;
  margin-bottom:12px;
  flex-wrap:wrap;
}
.cal-legend-item{
  display:flex;
  align-items:center;
  gap:6px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.cal-legend-dot{
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display:inline-block;
}
.cal-legend-11{ background: var(--secondary); }
.cal-legend-12{ background: var(--dark); }
.cal-legend-1{ background: var(--bg-2); border: 1px solid var(--border); }
.cal-legend-3{ background: var(--warning); }
.cal-legend-2{
  background: repeating-linear-gradient(45deg,#e5e3da,#e5e3da 4px,#fafaf7 4px,#fafaf7 8px);
  border: 1px solid var(--border);
}

/* Month view */
.cal-month{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
}
.cal-month-cell{
  min-height: 86px;
  padding: 10px 10px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-decoration:none;
  color: var(--text);
  position: relative;
  background: var(--surface);
}
.cal-month-cell:nth-child(7n){ border-right:none; }
.cal-month-cell:hover{ background: var(--bg); }
.cal-month-cell.muted{ color: var(--muted); background: var(--bg); }
.cal-month-day{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: currentColor;
}
.cal-month-badge{
  position:absolute;
  right: 10px;
  top: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0,77,255,0.12);
  border: 1px solid rgba(0,77,255,0.25);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  color: var(--secondary);
}

/* Client calendar — DESIGN-SPEC toolbar (tabs + week strip) */
.client-cal-spec-toolbar .cal-tabs{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: var(--bg-2);
  padding: 4px;
  border-radius: 9px;
  margin-bottom: 12px;
}
.client-cal-spec-toolbar .cal-tab{
  display: block;
  text-align: center;
  padding: 7px 4px;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  border: none;
}
.client-cal-spec-toolbar .cal-tab:hover{
  color: var(--text);
}
.client-cal-spec-toolbar .cal-tab.active{
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(9,18,50,0.06);
}

.cal-filter-row-client{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 12px;
  flex-wrap: wrap;
}
.cal-filter-form{
  margin: 0;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}
.cal-filter-label{
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: min(260px, 100%);
}
.cal-filter-label-txt{
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .1em;
}
.cal-filter-select{
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--body);
  font-size: 12px;
}
.cal-strip-nav-btn{
  min-width: 2.75rem;
  justify-content: center;
}
.cal-spec-strip-row{
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: nowrap;
}
.cal-spec-strip-row--month{
  justify-content: space-between;
  align-items: center;
}
.cal-strip-nav-tail{
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: space-between;
  flex-shrink: 0;
}

.cal-week-strip{
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
}
.cal-day{
  position: relative;
  padding: 8px 2px;
  text-align: center;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.cal-day:hover{
  border-color: color-mix(in srgb, var(--text) 25%, var(--border));
}
.cal-day.cal-day-has-plan{
  border-color: color-mix(in srgb, var(--primary) 60%, var(--border));
  box-shadow: inset 0 -3px 0 var(--primary);
}
.cal-day.cal-day-has-plan.today{
  box-shadow: inset 0 -3px 0 var(--primary);
}
.cal-day-name{
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
}
.cal-day.today{
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
}
.cal-day.today .cal-day-name{
  opacity: 0.75;
}
.cal-day.today .cal-day-dot{
  background: rgba(176,245,128,0.95);
  color: var(--dark);
}
.cal-day.today .cal-day-dot-n{
  color: inherit;
}
.cal-day-num{
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
  margin-top: 3px;
  line-height: 1.25;
}
.cal-day.cal-selected:not(.today){
  border-color: var(--secondary);
  box-shadow: 0 0 0 2px rgba(0,77,255,0.28);
}
.cal-day.today.cal-selected{
  outline: 2px solid rgba(176,245,128,0.85);
  outline-offset: 2px;
}
.cal-day-dot{
  display: inline-flex;
  margin-top: 5px;
  min-width: 18px;
  height: 16px;
  padding: 0 4px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(0,77,255,0.14);
}
.cal-day-dot-n{
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--secondary);
}

@media (max-width: 720px){
  .cal-strip-nav-tail{
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .cal-spec-strip-row{
    flex-wrap: wrap;
  }
  .cal-week-strip{
    order: -1;
    width: 100%;
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
  .cal-strip-nav-btn{
    flex: 0 0 auto;
  }
}

/* New: calendar grid + modal */
.cal-grid{
  /* density knobs */
  --cal-days: 7;
  --cal-time-col: 52px;
  --cal-hour-px: 44px; /* was 60px → shorter calendar */
}
.cal-grid-head{
  display:grid;
  grid-template-columns: var(--cal-time-col) repeat(var(--cal-days), minmax(0, 1fr));
  gap: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.cal-grid-corner{ border-right: 1px solid var(--border); }
.cal-grid-day{
  padding: 8px 6px;
  border-right: 1px solid var(--border);
  text-align: center;
}
.cal-grid-day:last-child{ border-right:none; }
.cal-grid-day-name{
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.cal-grid-day-date{
  margin-top: 2px;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.cal-grid-body{
  display:grid;
  grid-template-columns: var(--cal-time-col) repeat(var(--cal-days), minmax(0, 1fr));
}
.cal-grid-times{
  border-right: 1px solid var(--border);
}
.cal-grid-time{
  height: var(--cal-hour-px);
  padding: 6px 8px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.cal-grid-col{
  position: relative;
  border-right: 1px solid var(--border);
}
.cal-grid-col:last-child{ border-right:none; }
.cal-grid-col.today{
  background: rgba(176,245,128,0.06);
}
.cal-grid-day.today{
  background: rgba(176,245,128,0.10);
}
.cal-now-line{
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(239,68,68,0.95);
  box-shadow: 0 1px 0 rgba(9,18,50,0.15);
  z-index: 30;
  pointer-events: none;
}
.cal-now-dot{
  position:absolute;
  left: -4px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(239,68,68,0.95);
  border: 2px solid var(--surface);
  box-shadow: 0 4px 10px rgba(239,68,68,0.25);
}
.cal-grid-cell{
  display:block;
  width: 100%;
  height: var(--cal-hour-px);
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
}
.cal-grid-cell:hover{ background: rgba(176,245,128,0.10); }
.cal-grid-slot{
  position:absolute;
  left: 4px;
  right: 4px;
  border: none;
  border-radius: 6px;
  padding: 5px 6px;
  overflow:hidden;
  box-shadow: 0 1px 2px rgba(9,18,50,0.10);
}
.cal-grid-slot:hover{ filter: brightness(1.02); }
.cal-grid-slot.event{
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.cal-grid-slot.event:hover{
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(9,18,50,0.14);
}
.cal-grid-slot.event{
  border-left: 3px solid var(--border);
}
.cal-grid-slot.event.free{
  background: var(--success-bg);
  color: var(--success-text);
  border-left-color: var(--success);
}
.cal-grid-slot.event.booked{
  background: #dbeafe;
  color: #1e3a8a;
  border-left-color: var(--secondary);
}
.cal-grid-slot.event.mine{
  background: #fef3c7;
  color: var(--warning-text);
  border-left-color: var(--warning);
}
.cal-grid-slot.event.pending{
  background: var(--warning-bg);
  color: var(--warning-text);
  border-left-color: var(--warning);
}
.cal-grid-slot.event.blocked{
  background: repeating-linear-gradient(45deg,#f3f4f6,#f3f4f6 4px,#e5e7eb 4px,#e5e7eb 8px);
  color: var(--neutral-text);
  border-left-color: var(--neutral-text);
}
.cal-grid-slot.event.group{
  background: rgba(176,245,128,0.4);
  color: var(--dark);
  border-left-color: var(--primary);
}
.cal-slot-actions{
  position:absolute;
  top: 6px;
  right: 6px;
  display:flex;
  gap: 6px;
  opacity: 1;
  transform: none;
  transition: opacity .12s;
  z-index: 40;
}
.cal-slot-actions button{
  border: 1px solid rgba(9,18,50,0.18);
  background: rgba(255,255,255,0.92);
  color: var(--dark);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 8px;
  cursor: pointer;
}
.cal-slot-actions button:hover{ background: rgba(255,255,255,1); border-color: rgba(9,18,50,0.28); }
.cal-slot-actions button.danger{
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.35);
  color: var(--error);
}
.cal-slot-range{
  position:absolute;
  left: 4px;
  right: 4px;
  border-radius: 10px;
  border: 2px solid rgba(0,77,255,0.45);
  background: rgba(0,77,255,0.08);
  z-index: 25;
  pointer-events: none;
}
.cal-hover-hint{
  position: fixed;
  z-index: 4500;
  pointer-events: none;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(9,18,50,0.92);
  color: #fff;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: var(--sh-md);
  display:none;
}
.cal-slot-resize{
  position:absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  cursor: ns-resize;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.18));
}
.cal-ghost{
  position: fixed;
  z-index: 4400;
  pointer-events: none;
  opacity: 0.85;
  border-radius: 6px;
  box-shadow: var(--sh-md);
  transform: translateZ(0);
}
.cal-grid-slot-title{ font-weight: 700; font-size: 10px; line-height: 1.1; }
.cal-grid-slot-sub{
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 8px;
}

/* Removed page-leave/page-enter transitions (were animating sidebar too). */

/* Client calendar: make actions readable on small slots */
.cal-client-slot-actions{
  margin-top: 6px;
  display:flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  background: rgba(9,18,50,0.10);
  border: 1px solid rgba(9,18,50,0.14);
  border-radius: 10px;
  padding: 6px;
}
.cal-client-slot-actions .btn.btn-sm{
  padding: 6px 10px;
  font-size: 11px;
}
.cal-grid-slot.dragging{
  outline: 2px solid rgba(176,245,128,0.55);
  outline-offset: 2px;
  cursor: grabbing;
}
.cal-drag-hint{
  position: fixed;
  z-index: 4500;
  pointer-events: none;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(9,18,50,0.92);
  color: #fff;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: var(--sh-md);
}

.modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(9,18,50,0.55);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index: 4000;
  padding: 20px;
}
.modal-backdrop[hidden]{ display:none !important; }
.modal{
  width: min(720px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--sh-lg);
  padding: 18px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  overscroll-behavior: contain;
}

.modal.modal--compact{
  width: min(440px, 100%);
  padding: 16px 18px;
  border-radius: 16px;
}
.modal.modal--compact .modal-head{
  margin-bottom: 12px;
  padding-bottom: 0;
  border-bottom: none;
}
.modal.modal--compact .modal-title{
  font-size: 17px;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -.02em;
}
.modal.modal--compact .modal-sub{
  margin-top: 3px;
  font-size: 10px;
  color: var(--muted);
}
.modal.modal--compact .modal-section{
  padding: 8px 0;
}
.modal.modal--compact .form-row{
  gap: 4px;
  margin-bottom: 8px;
}
.modal.modal--compact .form-label{
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.modal.modal--compact .form-input,
.modal.modal--compact .form-select{
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 13px;
}
.modal.modal--compact .form-pair{ gap: 8px; }
.modal.modal--compact .form-radio{ gap: 6px; }
.modal.modal--compact .form-radio-card{
  padding: 9px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}
.modal.modal--compact .form-radio-card-tag{
  top: 6px;
  left: 6px;
  padding: 2px 6px;
  font-size: 7px;
}
.modal.modal--compact .form-check{
  margin-top: 0;
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 12px;
}
.modal.modal--compact .form-check.compact{
  padding: 8px 10px;
}

/* Trainer "new slot/block" modal: single-column compact layout */
#slotModalForm.slot-modal-form{
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#slotModalForm .slot-modal-grid{
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  border-bottom: none;
}
#slotModalForm .slot-modal-grid .form-row{
  margin-bottom: 0;
}
#slotModalForm .slot-span-2{ /* legacy class, no-op now */ }

#slotModalForm details > summary{
  list-style: none;
}
#slotModalForm details > summary::-webkit-details-marker{ display: none; }
#slotModalForm details > summary::before{
  content: '▸ ';
  display: inline-block;
  margin-right: 2px;
  transition: transform .12s ease;
}
#slotModalForm details[open] > summary::before{
  content: '▾ ';
}
.modal.modal--compact .modal-cta{
  gap: 8px;
  margin-top: 12px;
}
/* Keep sticky footer aligned with compact padding */
.modal.modal--compact .modal-cta{
  bottom: -14px;
  margin-left: -14px;
  margin-right: -14px;
  margin-bottom: -14px;
  padding: 10px 14px 14px;
}

.modal-x{
  width: 36px;
  height: 36px;
  display:grid;
  place-items:center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(9,18,50,0.03);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--text);
}
.modal-x:hover{ background: rgba(9,18,50,0.06); }

/* Center native <dialog class="modal"> used in client calendar */
dialog.modal{
  border: none;
  padding: 0;
  background: transparent;
  width: auto;
  max-width: none;
}
dialog.modal::backdrop{
  background: rgba(9,18,50,0.55);
}
dialog.modal[open]{
  display:flex;
  align-items:center;
  justify-content:center;
  position: fixed;
  inset: 0;
  z-index: 4000;
  padding: 20px;
}
dialog.modal .modal-card{
  width: min(520px, 100%);
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--sh-lg);
  padding: 18px;
  animation: modalPop .14s ease;
  max-height: calc(100vh - 40px);
  overflow: auto;
  overscroll-behavior: contain;
}

/* Keep CTAs visible in tall modals */
.modal .modal-cta{
  position: sticky;
  bottom: -18px;
  margin-left: -18px;
  margin-right: -18px;
  margin-bottom: -18px;
  padding: 12px 18px 18px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.0), rgba(255,255,255,0.92) 16px, var(--surface) 40px);
  border-top: 1px solid var(--border);
}
dialog.modal .modal-card .modal-cta{
  position: sticky;
  bottom: -18px;
  margin-left: -18px;
  margin-right: -18px;
  margin-bottom: -18px;
  padding: 12px 18px 18px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.0), rgba(255,255,255,0.92) 16px, var(--surface) 40px);
  border-top: 1px solid var(--border);
}

@keyframes modalPop{
  from{ opacity:0; transform: translateY(8px) scale(.98); }
  to{ opacity:1; transform: translateY(0) scale(1); }
}

/* Removed fadeIn on calendar blocks (felt like layout flicker). */

/* Client booking modal: anchored sheet on small screens */
dialog.modal.booking-dialog[open]{
  align-items: center;
  justify-content: center;
}
@media (max-width: 720px){
  dialog.modal.booking-dialog[open]{
    align-items: flex-end;
    justify-content: stretch;
    padding: 0;
  }
  dialog.modal.booking-dialog .modal-card{
    width: 100%;
    max-width: none;
    border-radius: 18px 18px 0 0;
    padding-bottom: max(14px, env(safe-area-inset-bottom, 14px));
  }
}

.modal-coverage{
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface) 92%, var(--secondary) 8%);
}

/* Client calendar list (v3 slot cards) */
.client-cal-slot-list{
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.slot-card{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  border-left-width: 3px;
  border-left-color: var(--border);
}
/* Design-spec list variants (kalendarze-modale-karnety) */
.slot-card.slot-tone-pending{
  border-left-color: var(--warning);
  background: rgba(245, 158, 11, 0.06);
}
.slot-card.slot-tone-booked{
  border-left-color: var(--secondary);
  background: rgba(0, 77, 255, 0.04);
}
.slot-card.slot-tone-canceled{
  border-left-color: var(--muted);
  opacity: 0.9;
}
.slot-card-time{
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 15px;
}
.slot-card-badges{
  margin-top: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.slot-card-actions{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}
@media (max-width: 560px){
  .slot-card{
    grid-template-columns: 1fr;
  }
  .slot-card-actions{
    justify-content: flex-start;
  }
}

.modal-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.modal-title{
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: 22px;
  line-height: 1.1;
}
.modal-sub{
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.modal-section{
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.modal-section:last-child{ border-bottom: none; padding-bottom: 0; }
.modal-label{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 10px;
}
.modal-info{
  display:flex;
  justify-content:space-between;
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  font-size: 14px;
}
.modal-info span:first-child{ color: var(--muted); }
.modal-info span:last-child{ font-weight: 800; text-align:right; }

.modal-cta{
  margin-top: 16px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.modal-cta-row{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Forms in modals (match mockups) */
.form-row{ display:flex; flex-direction:column; gap:8px; margin-bottom: 12px; }
.form-row:last-child{ margin-bottom:0; }
.form-label{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
}
.form-input, .form-select{
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  font-family: var(--body);
  font-size: 14px;
  outline: none;
}
.form-input:focus, .form-select:focus{
  border-color: color-mix(in srgb, var(--secondary) 35%, var(--border));
  box-shadow: 0 0 0 4px rgba(0,77,255,0.10);
}
.form-pair{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media (max-width: 720px){ .form-pair{ grid-template-columns:1fr; } }

.form-radio{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.form-radio.two{ grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px){
  .form-radio, .form-radio.two{ grid-template-columns:1fr; }
}
.form-radio-card{
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 14px 14px;
  background: var(--surface);
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  position: relative;
}
.form-radio-card.active{
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  background: rgba(176,245,128,0.18);
  box-shadow: 0 0 0 4px rgba(176,245,128,0.18);
}
.form-radio-card-tag{
  position:absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(176,245,128,0.60);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dark);
}

.form-check{
  display:flex;
  gap: 10px;
  align-items:center;
  padding: 14px 14px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  margin-top: 10px;
}
.form-check input{ width: 18px; height: 18px; }

.form-check.compact{
  padding: 10px 12px;
  border-radius: 12px;
  gap: 8px;
}
.form-check.compact input{ width: 16px; height: 16px; }

.info-banner{
  padding: 12px 14px;
  border-radius: 14px;
  border-left: 4px solid var(--secondary);
  background: rgba(0,77,255,0.06);
  color: var(--info-text);
  font-size: 13px;
  line-height: 1.5;
}

/* Make calendar slot rows responsive */
@media (max-width: 900px){
  #new-slot form{ grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 640px){
  #new-slot form{ grid-template-columns: 1fr !important; }
}

/* —— Client marketplace (Wygład/v3) —— */
.marketplace-subnav { margin-bottom: 20px !important; }
.marketplace-flash-ok{
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.25);
  color: var(--success);
}
.marketplace-flash-err{
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.25);
  color: var(--error);
}
.marketplace-results-strip{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.marketplace-search{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
@media (max-width: 720px){
  .marketplace-search{ grid-template-columns: 1fr; }
}
.filter-pills{
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.filter-pills::-webkit-scrollbar{ height: 0; }
.filter-pill{
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}
.filter-pill.active{
  background: var(--dark);
  color: white;
  border-color: var(--dark);
}
.marketplace-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1100px){
  .marketplace-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px){
  .marketplace-grid{ grid-template-columns: 1fr; }
}
.trainer-card{
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.trainer-card:hover{
  border-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
}
.trainer-card-cover{
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
}
.trainer-card-cover-gradient{
  background: linear-gradient(145deg, var(--dark-2) 0%, var(--dark) 55%, #0a1538 100%);
}
.trainer-card-cover-gradient::after{
  content: '';
  position: absolute;
  top: -40%;
  right: -25%;
  width: 70%;
  height: 160%;
  background: radial-gradient(circle, var(--primary) 0%, transparent 62%);
  opacity: 0.2;
  pointer-events: none;
}
.trainer-card-body{ padding: 16px; }
.trainer-card-name{
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.trainer-card-meta{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}
.trainer-card-tags{
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.trainer-card-tag{
  font-size: 10px;
  padding: 3px 8px;
  background: var(--bg-2);
  color: var(--muted);
  border-radius: 999px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.trainer-card-price{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.trainer-card-price-label{ font-size: 11px; color: var(--muted); }
.trainer-card-price-num{
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.trainer-card-status,
.trainer-card-cta-muted{
  margin-top: 12px;
}
.trainer-card-cta-muted{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.marketplace-invite-row{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}
@media (max-width: 720px){
  .marketplace-invite-row{ grid-template-columns: 1fr; }
}
.marketplace-invite-hint{
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}
.my-trainers-row{
  grid-template-columns: minmax(0,1.4fr) minmax(110px,160px) minmax(160px,260px) !important;
}
@media (max-width: 820px){
  .my-trainers-row{
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
}
.clients-row-actions{
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  align-items: center;
}
@media (max-width: 820px){
  .clients-row-actions{ justify-content: flex-start; }
}
.trainer-row-link{
  color: inherit;
  text-decoration: none;
  font-weight: 800;
}
.trainer-row-link:hover{ color: var(--secondary); }
.muted-hint{
  color: var(--muted);
  font-size: 12px;
}

.profile-cover-marketplace{
  background: var(--dark);
  color: white;
  border-radius: var(--r-lg);
  padding: 26px;
  position: relative;
  overflow: hidden;
}
.profile-cover-marketplace::before{
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 62%);
  opacity: 0.14;
  pointer-events: none;
}
.profile-cover-inner{
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  position: relative;
}
@media (max-width: 900px){
  .profile-cover-inner{ grid-template-columns: 1fr; text-align: center; }
}
.profile-cover-mark{
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.14);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 28px;
}
.profile-cover-name{
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.profile-cover-meta{
  margin-top: 6px;
  color: rgba(255,255,255,0.72);
  font-family: var(--mono);
  font-size: 12px;
}
.profile-cover-actions{
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 200px;
}
@media (max-width: 900px){
  .profile-cover-actions{
    min-width: 0;
    align-items: stretch;
  }
}
.profile-cover-email{
  color: rgba(255,255,255,0.55);
  word-break: break-all;
}

/* Live workout FAB (trainer, above mobile tabbar when visible) */
.fab-live{
  position: fixed;
  z-index: 40;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(76px + max(14px, env(safe-area-inset-bottom)));
  background: var(--primary);
  color: var(--dark);
  font-family: var(--display);
  font-weight: 900;
  font-size: 13px;
  text-decoration: none;
  padding: 14px 18px;
  border-radius: 999px;
  box-shadow: var(--sh-lg);
  border: none;
}
.fab-live:hover{
  transform: translateY(-1px);
}
@media (min-width: 981px){
  .fab-live{
    bottom: 24px;
  }
}

/* Used across training / booking views — was missing from design-system */
.btn-secondary{
  background: var(--secondary);
  color: #fff;
}
.btn-secondary:hover{
  filter: brightness(1.06);
}

.badge-primary{
  background: var(--primary);
  color: var(--dark);
}

.badge.no-dot::before{
  display: none !important;
  content: none !important;
}

/* ---------- Training module (parity with Wygląd mockups) ---------- */
.kpi-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.kpi{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}
.kpi-label{
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}
.kpi-value{
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.kpi-value-sm{
  font-size: 15px;
  font-weight: 700;
}
.kpi-muted{
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.kpi-accent{
  color: var(--secondary);
}

.training-progress-cols{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
  align-items: start;
}
@media (max-width: 768px){
  .training-progress-cols{
    grid-template-columns: 1fr;
  }
}

.training-chart-wrap{
  margin-top: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  overflow: hidden;
}
.training-chart-svg{
  width: 100%;
  max-width: 720px;
  display: block;
  height: auto;
}
.training-chart-grid{
  stroke: var(--border);
  stroke-dasharray: 2 4;
  stroke-width: 1;
}
.training-chart-fill{
  opacity: 0.14;
}

.training-bar-track{
  height: 8px;
  background: var(--bg-2);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.training-bar-fill{
  height: 100%;
  border-radius: 8px;
  background: var(--secondary);
}

.training-row-head{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--muted);
  margin-bottom: 4px;
}

.training-hm-matrix{
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}
.training-hm-row{
  display: flex;
  align-items: center;
  gap: 6px;
}
.training-hm-dow{
  width: 22px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-align: right;
  font-family: var(--mono);
}
.training-hm-cells{
  display: flex;
  gap: 3px;
}
.training-hm-cell{
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.training-hm-l0{
  background: var(--bg-2);
  border: 1px solid var(--border);
}
.training-hm-l1{
  background: rgba(0, 77, 255, 0.12);
}
.training-hm-l2{
  background: rgba(0, 77, 255, 0.22);
}
.training-hm-l3{
  background: rgba(0, 77, 255, 0.42);
}
.training-hm-l4{
  background: rgba(176, 245, 128, 0.75);
}

.training-muscle-track{
  height: 10px;
  background: var(--bg-2);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.training-muscle-fill{
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.85), rgba(245, 158, 11, 0.95));
}

.training-pr-list{
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.training-pr-card,
.training-list-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.training-pr-name{
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.015em;
}
.training-pr-meta{
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.training-pr-pill{
  display: inline-flex;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.95), rgba(245, 158, 11, 0.95));
  color: white;
}

.training-empty-note{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.training-live-banner{
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--dark) 0%, #1b2f7a 100%);
  color: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: 0 8px 28px rgba(9, 18, 50, 0.12);
}
.training-live-banner::before{
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 58%);
  opacity: 0.14;
  pointer-events: none;
}
.training-live-banner-inner{
  position: relative;
  z-index: 1;
}
.training-live-tag{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}
.training-live-tag-dot{
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
  animation: training-pulse 1.5s ease-in-out infinite;
}
@keyframes training-pulse{
  0%, 100%{ opacity: 1; }
  50%{ opacity: 0.45; }
}
.training-live-title{
  margin-top: 8px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
}
.training-live-meta{
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.45;
}

.training-exercise-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.training-exercise-name{
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.training-set-row{
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.training-log-bar{
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.training-muted-line{
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.training-mode-hint{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
  padding: 8px 10px;
  background: var(--bg-2);
  border-radius: 8px;
  border: 1px dashed var(--border);
}

/* Training plan builder — layout + cards (mockupy kreatora) */
select.select,
select.input{
  appearance: auto;
  cursor: pointer;
}

.training-builder-shell{
  display: block;
  margin-bottom: 24px;
}

@media (min-width: 980px){
  .training-builder-shell.training-builder-shell--split{
    display: grid;
    grid-template-columns: minmax(288px, 360px) minmax(0, 1fr);
    grid-template-areas: 'library main';
    gap: 16px;
    align-items: start;
  }
  .training-builder-shell.training-builder-shell--split .training-builder-main{
    grid-area: main;
  }
  .training-builder-shell.training-builder-shell--split .training-library-panel{
    grid-area: library;
  }
}

.training-builder-side.training-library-panel{
  display: none;
  flex-direction: column;
  gap: 12px;
}
.training-builder-shell.training-builder-shell--split .training-builder-side.training-library-panel{
  display: flex;
}

.training-builder-main{
  min-width: 0;
}

.training-builder-card{
  box-shadow: var(--sh-sm, 0 2px 14px rgba(9, 18, 50, 0.06));
}

.training-builder-client-name{
  color: var(--secondary);
  font-style: italic;
  font-weight: 700;
}

.training-plan-form-grid{
  display: grid;
  gap: 12px 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 16px;
}

label.label,
.training-builder-card label.label{
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.training-sessions-toolbar{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.training-sessions-toolbar-label{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}

.training-builder-footer{
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 -8px 24px rgba(9, 18, 50, 0.04);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-end;
}

.training-builder-footer .input,
.training-builder-footer select{
  max-width: 100%;
}

.training-builder-footer-grow{
  flex: 1 1 220px;
  min-width: 0;
}
.training-builder-footer-grow select{
  width: 100%;
}

.training-library-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.training-library-title{
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.training-lib-hint{
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

.training-lib-pick-hint{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--secondary);
  min-height: 1.3em;
}

#libraryList.training-lib-list{
  max-height: min(52vh, 520px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.training-lib-row{
  width: 100%;
  text-align: left;
  cursor: pointer;
  padding: 8px 10px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-family: var(--body);
  font-size: 13px;
  color: var(--text);
  line-height: 1.35;
  transition: border-color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.training-lib-row:hover{
  border-color: rgba(0, 77, 255, 0.35);
  background: var(--bg-2);
}
.training-lib-row:focus-visible{
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px var(--secondary-soft);
}
.training-lib-row.is-picked{
  border-color: var(--secondary);
  border-width: 2px;
  padding: 7px 9px;
  box-shadow: 0 0 0 1px rgba(0, 77, 255, 0.08);
}

.training-lib-row[draggable="true"]{
  cursor: grab;
}
.training-lib-row[draggable="true"]:active{
  cursor: grabbing;
}

.training-lib-row-inner{
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: inherit;
  flex: 1;
  min-width: 0;
}

.training-lib-drag-h{
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1;
  color: var(--muted);
  letter-spacing: -0.1em;
  user-select: none;
  flex-shrink: 0;
  cursor: grab;
}
.training-lib-row-add-btn{
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: white;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary, #004dff);
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
.training-lib-row-add-btn:hover{
  background: var(--secondary, #004dff);
  color: white;
  border-color: var(--secondary, #004dff);
}

/* Day picker popover (when "+" is clicked) */
.training-lib-daypop{
  position: absolute;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(9, 18, 50, 0.15);
  padding: 8px;
  z-index: 200;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.training-lib-daypop-title{
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 4px 8px;
}
.training-lib-daypop-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  background: transparent;
  border: none;
  text-align: left;
  font-family: var(--body);
  color: var(--text);
  width: 100%;
}
.training-lib-daypop-item:hover{
  background: var(--bg-2);
}
.training-lib-daypop-item-meta{
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  font-weight: 600;
}

.training-lib-row-title{
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
}

.training-lib-row-sub{
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  font-family: var(--mono);
}

.training-lib-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.training-lib-chip{
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 5px 11px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.training-lib-chip:hover{
  border-color: var(--text);
  color: var(--text);
}

.training-lib-chip.is-active{
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

.training-session-card.is-drop-target{
  outline: 2px dashed var(--secondary);
  outline-offset: 2px;
  background: rgba(0, 77, 255, 0.06);
}

.training-ex-block{
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-2);
}

.training-ex-head{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 10px;
}

.training-ex-name{
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
}

.training-ex-super{
  margin-top: 6px;
  max-width: 140px;
}

.training-set-table-wrap{
  overflow-x: auto;
  margin-top: 8px;
}

.training-set-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 520px;
}

.training-set-table th{
  text-align: left;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 6px 4px 8px 4px;
  border-bottom: 1px solid var(--border);
}

.training-set-table td{
  padding: 6px 4px;
  vertical-align: middle;
  border-bottom: 1px dashed var(--border);
}

.training-set-table .input{
  padding: 6px 8px;
  font-size: 12px;
}

.training-set-table .input-narrow{
  max-width: 72px;
}

.training-set-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.training-session-card{
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.training-session-card:hover{
  border-color: rgba(0, 77, 255, 0.2);
}
.training-session-card.is-selected{
  border-color: var(--secondary);
  border-width: 2px;
  padding: 13px 15px;
  box-shadow: 0 6px 22px rgba(0, 77, 255, 0.08);
}

.training-session-head{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.training-session-title{
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.training-session-meta{
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.training-session-ex-line{
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: 13px;
}

@media (max-width: 979px){
  .training-builder-shell.training-builder-shell--split{
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
}


/* ===================================================================== */
/* ============== PLANY TRENINGOWE — MOCKUP STYLES ===================== */
/* ===================================================================== */

/* ---- KPI trends ---- */
.kpi-trend{
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.kpi-trend.up{ color: var(--success-text, #166534); }
.kpi-trend.down{ color: var(--error-text, #991b1b); }
.kpi-trend.flat{ color: var(--muted); }

.kpi-with-bar{ border-left: 4px solid var(--studio, #fbbf24); }
.kpi-with-bar.kpi-bar-admin{ border-left-color: var(--admin, #ff3366); }
.kpi-with-bar.kpi-bar-secondary{ border-left-color: var(--secondary); }

/* ---- Segmented control ---- */
.segmented{
  display: inline-flex;
  background: var(--bg-2);
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.segmented::-webkit-scrollbar{ display: none; }
.segmented button,
.segmented a{
  padding: 6px 12px;
  background: transparent;
  border: none;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  border-radius: 7px;
  cursor: pointer;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.segmented button.is-active,
.segmented button.active,
.segmented a.is-active{
  background: white;
  color: var(--dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ---- Badges (mockup variant) ---- */
.badge.no-dot::before{ display: none; }
.badge-info{
  background: var(--info-bg, #e0f2fe);
  color: var(--info-text, #075985);
}
.badge-primary{
  background: var(--primary, #b0f580);
  color: var(--dark, #091232);
}
.badge-dark{
  background: var(--dark, #091232);
  color: white;
}
.badge-studio{
  background: var(--studio, #fbbf24);
  color: var(--dark, #091232);
}

/* ---- Mockup table ---- */
.mock-table{
  width: 100%;
  border-collapse: collapse;
}
.mock-table th{
  text-align: left;
  padding: 10px 12px;
  background: var(--bg-2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.mock-table td{
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  vertical-align: middle;
}
.mock-table tbody tr:last-child td{ border-bottom: none; }
.mock-table tbody tr:hover td{ background: var(--bg, #fafaf7); }
.mock-table.row-link tbody tr{ cursor: pointer; }

/* ---- Avatar ---- */
.avatar{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-2);
  display: inline-grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--dark);
  flex-shrink: 0;
  border: 1.5px solid white;
  box-shadow: 0 0 0 1px var(--border);
}
.avatar.sm{ width: 24px; height: 24px; font-size: 9px; }
.avatar.lg{ width: 48px; height: 48px; font-size: 14px; }
.avatar.client{ background: var(--primary, #b0f580); }
.avatar.trainer{ background: var(--secondary, #004dff); color: white; }

.cell-with-avatar{ display: flex; align-items: center; gap: 8px; }
.cell-name{ font-weight: 600; }
.cell-meta{
  font-size: 10px;
  color: var(--muted);
  font-family: var(--mono);
  margin-top: 2px;
}

/* ---- Progress mini-bar ---- */
.progress-mini{
  display: flex;
  align-items: center;
  gap: 8px;
}
.progress-mini-track{
  flex: 1;
  background: var(--bg-2);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  min-width: 80px;
}
.progress-mini-fill{
  background: var(--secondary);
  height: 100%;
}
.progress-mini-label{
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---- Empty state (matches mockup) ---- */
.empty-state{
  padding: 30px 16px;
  text-align: center;
  background: var(--bg-2);
  border-radius: 12px;
  border: 2px dashed var(--border);
}
.empty-state-icon{
  width: 42px;
  height: 42px;
  background: white;
  border-radius: 12px;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.empty-state-title{
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}
.empty-state-text{
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

/* ---- Hint banner ---- */
.hint-banner{
  padding: 10px;
  background: var(--info-bg, #e0f2fe);
  border-radius: 8px;
  font-size: 11px;
  color: var(--info-text, #075985);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.5;
}
.hint-banner.warn{
  background: var(--warning-bg, #fef3c7);
  color: var(--warning-text, #92400e);
}

/* ---- Card variants for plan list ---- */
.suggest-card{
  background: linear-gradient(135deg, #091232, #1a2768);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 16px;
}
.suggest-card .panel-title-eyebrow,
.suggest-card-eyebrow{
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--primary, #b0f580);
  text-transform: uppercase;
  margin-bottom: 4px;
  font-weight: 700;
}
.suggest-card .panel-title,
.suggest-card-title{
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: white;
}
.suggest-row{
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  margin-top: 8px;
}
.suggest-row strong{ color: white; }

/* ---- Template list row ---- */
.tpl-row{
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.tpl-row:last-child{ margin-bottom: 0; }
.tpl-row-title{ font-weight: 600; font-size: 13px; }
.tpl-row-meta{
  font-size: 10px;
  color: var(--muted);
  font-family: var(--mono);
  margin-top: 2px;
}

/* ---- Client today: gradient hero ---- */
.client-today-hero{
  background: linear-gradient(135deg, var(--primary, #b0f580), #9ae864);
  border: none;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 14px;
}
.client-today-hero-row{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}
.client-today-hero-eyebrow{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--dark);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.client-today-hero-title{
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.02em;
  color: var(--dark);
  line-height: 1.1;
}
.client-today-hero-meta{
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dark);
  margin-top: 6px;
  opacity: 0.7;
}
.client-today-hero-time-eyebrow{
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--dark);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.client-today-hero-time{
  font-family: var(--display);
  font-weight: 700;
  font-size: 32px;
  color: var(--dark);
  letter-spacing: -0.02em;
}
.client-today-hero-actions{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.client-today-hero .btn-on-light{
  background: rgba(255, 255, 255, 0.5);
  color: var(--dark);
  border: none;
}
.client-today-hero .btn-on-light:hover{ background: rgba(255, 255, 255, 0.7); }

/* KPI variants on client today */
.kpi.kpi-dark{
  background: var(--dark, #091232);
  color: white;
  border: none;
}
.kpi.kpi-dark .kpi-label{ color: rgba(255, 255, 255, 0.5); }
.kpi.kpi-dark .kpi-value{ color: var(--primary, #b0f580); }
.kpi.kpi-dark .kpi-trend.up{ color: var(--primary, #b0f580); }

/* ---- Week 7 cells (client today) ---- */
.week7-grid{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}
.week7-cell{
  text-align: center;
  padding: 10px 4px;
  background: var(--bg-2);
  border-radius: 9px;
  opacity: 0.6;
}
.week7-cell.is-done{
  background: var(--success-bg, #dcfce7);
  opacity: 1;
}
.week7-cell.is-today{
  background: var(--primary, #b0f580);
  border: 2px solid var(--dark, #091232);
  opacity: 1;
}
.week7-dow{
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.1em;
  font-weight: 700;
}
.week7-cell.is-done .week7-dow{ color: var(--success-text, #166534); }
.week7-cell.is-today .week7-dow{ color: var(--dark); }
.week7-num{
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  color: var(--muted);
  margin: 4px 0;
}
.week7-cell.is-done .week7-num{ color: var(--success-text, #166534); }
.week7-cell.is-today .week7-num{ color: var(--dark); }
.week7-emoji{ font-size: 18px; }
.week7-cell.is-rest .week7-emoji{ opacity: 0.4; }
.week7-tag{
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  color: var(--muted);
}
.week7-cell.is-done .week7-tag{ color: var(--success-text, #166534); }
.week7-cell.is-today .week7-tag{ color: var(--dark); font-weight: 700; }

.week7-summary{
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  padding-top: 10px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}
.week7-summary strong{ color: var(--text); }

/* ---- Achievement rows ---- */
.achv-row{
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: var(--bg-2);
  border-radius: 9px;
  margin-bottom: 8px;
}
.achv-row:last-child{ margin-bottom: 0; }
.achv-row.is-fresh{
  background: linear-gradient(90deg, var(--warning-bg, #fef3c7), transparent);
  border-left: 3px solid var(--warning, #f59e0b);
}
.achv-row.is-locked{ opacity: 0.5; }
.achv-icon{ font-size: 24px; }
.achv-body{ flex: 1; min-width: 0; }
.achv-title{ font-weight: 700; font-size: 13px; }
.achv-meta{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

/* ---- Plan-on-today exercise list ---- */
.plan-today-list{
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.plan-today-card{
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.plan-today-card.superset{
  border: 1.5px solid var(--secondary);
  background: #f5f9ff;
}
.plan-today-card-line{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.plan-today-card-line.is-second{
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}
.plan-today-card-meta{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.plan-today-card-time{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

/* ---- Two-column responsive grid (used a lot) ---- */
.grid-2-12{
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 979px){
  .grid-2-12{ grid-template-columns: 1fr; }
}
.grid-2-equal{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 979px){
  .grid-2-equal{ grid-template-columns: 1fr; }
}
.grid-3-equal{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 979px){
  .grid-3-equal{ grid-template-columns: 1fr; }
}

/* ---- History / session card ---- */
.session-card{
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
}
.session-card-head{
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.session-card-date{
  text-align: center;
  background: var(--bg-2);
  padding: 8px 10px;
  border-radius: 9px;
  min-width: 50px;
}
.session-card-date-mo{
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.05em;
  font-weight: 700;
  text-transform: uppercase;
}
.session-card-date-d{
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
}
.session-card-date-dow{
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  margin-top: 2px;
}
.session-card-body{
  padding: 10px 16px;
  background: var(--bg-2);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.session-card-body strong{ color: var(--text); }

/* History filters card */
.history-filter-bar{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  min-width: 0;
}
.history-filter-bar > .segmented{
  flex-shrink: 1;
  min-width: 0;
}
.history-filter-bar select.select,
.history-filter-bar select.history-filter-select{
  font-size: 12px;
  padding: 8px 32px 8px 12px;
  flex-shrink: 0;
  width: auto;
  min-width: 160px;
  background-color: var(--surface, #fff);
  border: 1.5px solid var(--border, rgba(15,23,42,0.12));
  border-radius: 10px;
  font-family: var(--body, system-ui, sans-serif);
  color: var(--dark, #0b1640);
  cursor: pointer;
  transition: border-color .15s ease;
}
.history-filter-bar select.history-filter-select:hover{
  border-color: var(--secondary, #004dff);
}
.history-filter-bar select.history-filter-select:focus{
  outline: none;
  border-color: var(--secondary, #004dff);
  box-shadow: 0 0 0 3px rgba(0, 77, 255, 0.12);
}
.history-filter-summary{
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
@media (max-width: 879px){
  .history-filter-bar select.select,
  .history-filter-bar select.history-filter-select{
    flex: 1 1 calc(50% - 8px);
    min-width: 140px;
  }
  .history-filter-summary{ width: 100%; margin-left: 0; }
}
.history-filter-summary strong{ color: var(--text); }

/* ---- Live session ---- */
.live-hero{
  background: linear-gradient(135deg, #091232, #1a2768);
  color: white;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.live-hero-left{
  display: flex;
  align-items: center;
  gap: 14px;
}
.live-pulse-dot{
  width: 10px;
  height: 10px;
  background: var(--error, #ef4444);
  border-radius: 50%;
  animation: livePulse 1.5s infinite;
}
@keyframes livePulse{
  0%{ box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70%{ box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
  100%{ box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.live-hero-eyebrow{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--primary, #b0f580);
  text-transform: uppercase;
  margin-bottom: 2px;
  font-weight: 700;
}
.live-hero-title{
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
}
.live-hero-meta{
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.live-hero-stat{ text-align: center; }
.live-hero-stat-label{
  font-family: var(--mono);
  font-size: 9px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.live-hero-stat-value{
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
}
.live-hero .segmented{ background: rgba(255, 255, 255, 0.1); }
.live-hero .segmented button{ color: rgba(255, 255, 255, 0.6); }
.live-hero .segmented button.is-active{
  background: white;
  color: var(--dark);
}

/* Live: 2-col layout */
.live-layout{
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 14px;
}
@media (max-width: 1079px){
  .live-layout{ grid-template-columns: 1fr; }
}

/* Live: active exercise card */
.live-ex-card{
  border: 2px solid var(--secondary);
  border-radius: 14px;
  padding: 16px;
  background: white;
  margin-bottom: 12px;
}
.live-ex-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}
.live-ex-title{
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
}
.live-ex-meta{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.live-set-grid{
  display: grid;
  grid-template-columns: 80px 1fr 1fr 1fr 1fr 60px;
  gap: 8px;
  align-items: center;
}
.live-set-row{
  display: grid;
  grid-template-columns: 80px 1fr 1fr 1fr 1fr 60px;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  font-family: var(--mono);
}
.live-set-row.is-header{
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 2px solid var(--border);
  padding: 0 16px 8px;
}
.live-set-row.is-done{ background: var(--success-bg, #dcfce7); }
.live-set-row.is-done .live-set-cell{ color: var(--success-text, #166534); font-weight: 700; font-size: 14px; }
.live-set-row.is-active{
  background: var(--primary, #b0f580);
  border-left: 4px solid var(--secondary);
  padding-left: 12px;
}
.live-set-row.is-pending{ background: white; }
.live-set-row.is-pending .live-set-cell{ color: var(--muted); }

.live-set-num{
  display: flex;
  align-items: center;
  gap: 6px;
}
.live-set-num-badge{
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--mono);
}
.live-set-row.is-done .live-set-num-badge{ background: var(--success, #22c55e); color: white; }
.live-set-row.is-active .live-set-num-badge{ background: var(--secondary); color: white; }
.live-set-row.is-pending .live-set-num-badge{ background: var(--bg-2); color: var(--muted); }
.live-set-num-big{
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
}

.live-set-input{
  padding: 8px;
  font-size: 16px;
  font-weight: 700;
  background: white;
  border: 2px solid var(--secondary);
  border-radius: 8px;
  font-family: var(--mono);
  text-align: center;
  width: 100%;
}

.live-quick-actions{
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Live: rest timer card */
.live-rest-card{
  background: var(--dark, #091232);
  color: white;
  border: none;
  text-align: center;
  padding: 18px;
  border-radius: 14px;
  margin-bottom: 12px;
}
.live-rest-eyebrow{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 6px;
}
.live-rest-time{
  font-family: var(--display);
  font-weight: 700;
  font-size: 48px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--primary, #b0f580);
  margin-bottom: 8px;
}
.live-rest-meta{
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 14px;
}
.live-rest-actions{
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.live-rest-actions .btn-ghost{
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
}

/* Live: remaining session list */
.live-remain-row{
  padding: 8px 10px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 6px;
}
.live-remain-row:last-child{ margin-bottom: 0; }
.live-remain-row.done{ background: var(--success-bg, #dcfce7); color: var(--success-text, #166534); }
.live-remain-row.now{
  background: var(--primary, #b0f580);
  border-left: 4px solid var(--secondary);
  font-weight: 600;
}
.live-remain-row.next{ background: var(--bg-2); color: var(--muted); }

/* Live: side panels */
.live-suggest-card{
  background: linear-gradient(135deg, var(--primary, #b0f580), #9ae864);
  border: none;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}
.live-suggest-head{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.live-suggest-icon{
  width: 28px;
  height: 28px;
  background: var(--dark);
  color: var(--primary, #b0f580);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
}
.live-suggest-eyebrow{
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dark);
  font-weight: 700;
}
.live-suggest-title{
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  color: var(--dark);
}
.live-suggest-body{
  font-size: 12px;
  color: var(--dark);
  line-height: 1.5;
}
.live-suggest-actions{
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.live-warn-card{
  background: white;
  border: 1px solid var(--border);
  border-left: 4px solid var(--warning, #f59e0b);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.live-warn-eyebrow{
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--warning-text, #92400e);
  font-weight: 700;
  margin-bottom: 6px;
}

.live-history-row{
  display: flex;
  justify-content: space-between;
  padding: 6px 8px;
  background: var(--bg-2);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 11px;
  margin-bottom: 6px;
}
.live-history-row.is-pr{
  background: var(--warning-bg, #fef3c7);
  border: 1px dashed var(--warning, #f59e0b);
  color: var(--warning-text, #92400e);
}

.live-chat-quick{
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.live-chat-quick .btn{
  text-align: left;
  justify-content: flex-start;
}

/* ---- Builder shell (Trener · kreator) ---- */
.builder-week-bar{
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.builder-week-bar-label{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.builder-day-bar{
  padding: 14px 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  align-items: center;
}
.builder-day-bar-label{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}
.builder-day-pill{
  background: var(--secondary);
  color: white;
  border-radius: 9px;
  font-size: 11px;
  padding: 6px 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

/* Builder bottom action bar (sticky) */
.builder-action-bar{
  position: sticky;
  bottom: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  margin-top: 12px;
  z-index: 5;
  flex-wrap: wrap;
}
.builder-action-bar-info{
  flex: 1;
  font-size: 12px;
  min-width: 200px;
}
.builder-action-bar-info strong{ font-weight: 700; }

/* Builder: superset wrapper around exercise */
.builder-ex-superset{
  border: 2px solid var(--secondary);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}
.builder-ex-superset-head{
  background: var(--secondary);
  color: white;
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

/* ---- Studio: trainer table row ---- */
.studio-alerts-card{
  background: linear-gradient(135deg, var(--warning-bg, #fef3c7), #fef9e7);
  border: 1.5px solid var(--warning, #f59e0b);
  border-radius: 14px;
  padding: 0;
  margin-bottom: 14px;
  overflow: hidden;
}
.studio-alert-row{
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  flex-wrap: wrap;
}
.studio-alert-row:last-child{ border-bottom: none; }
.studio-alert-icon{ font-size: 18px; }
.studio-alert-body{ flex: 1; min-width: 200px; display: flex; gap: 12px; align-items: center; }
.studio-alert-title{ font-weight: 700; font-size: 13px; }
.studio-alert-meta{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

.studio-readonly-banner{
  background: linear-gradient(90deg, var(--studio, #fbbf24), #fef3c7);
  padding: 10px 16px;
  border-radius: 10px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--studio, #fbbf24);
  flex-wrap: wrap;
}
.studio-readonly-banner-eyebrow{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--dark);
  font-weight: 700;
  text-transform: uppercase;
}
.studio-readonly-banner-meta{
  font-size: 11px;
  color: var(--dark);
  margin-top: 2px;
}

/* Cycle weeks visualization (studio plan detail) */
.cycle-weeks{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}
.cycle-week{
  padding: 8px;
  background: var(--bg-2);
  border-radius: 8px;
  text-align: center;
  opacity: 0.6;
}
.cycle-week.is-done{
  background: var(--success-bg, #dcfce7);
  opacity: 1;
}
.cycle-week.is-current{
  background: var(--primary, #b0f580);
  border: 2px solid var(--secondary);
  opacity: 1;
}
.cycle-week.is-deload{
  background: var(--warning-bg, #fef3c7);
  opacity: 0.85;
}
.cycle-week-tag{
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
}
.cycle-week.is-done .cycle-week-tag{ color: var(--success-text, #166534); }
.cycle-week.is-current .cycle-week-tag{ color: var(--dark); }
.cycle-week.is-deload .cycle-week-tag{ color: var(--warning-text, #92400e); }
.cycle-week-status{
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
}
.cycle-week.is-done .cycle-week-status{ color: var(--success-text, #166534); }
.cycle-week.is-current .cycle-week-status{ color: var(--dark); }
.cycle-week.is-deload .cycle-week-status{ color: var(--warning-text, #92400e); }

/* ---- Templates grid ---- */
.tpl-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 1079px){
  .tpl-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 639px){
  .tpl-grid{ grid-template-columns: 1fr; }
}
.tpl-card{
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tpl-card-head{
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tpl-card-head.is-studio{ background: linear-gradient(135deg, var(--studio, #fbbf24), #fef3c7); }
.tpl-card-head.is-private{ background: var(--bg-2); }
.tpl-card-body{ padding: 14px; flex: 1; display: flex; flex-direction: column; }
.tpl-card-title{
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
}
.tpl-card-sub{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 10px;
}
.tpl-card-tags{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.tpl-card-stats{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}
.tpl-card-stats strong{ color: var(--text); }
.tpl-card-create{
  border-style: dashed;
  display: grid;
  place-items: center;
  min-height: 220px;
  text-align: center;
  padding: 18px;
}
.tpl-card-create .plus-mark{
  font-size: 36px;
  margin-bottom: 8px;
  font-family: var(--display);
  font-weight: 300;
  line-height: 1;
}

/* ---- Time-Machine card (client progress) ---- */
.timemachine-card{
  background: linear-gradient(135deg, #091232, #1a2768);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}
.timemachine-card .panel-title-eyebrow{
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--primary, #b0f580);
  text-transform: uppercase;
  font-weight: 700;
}
.timemachine-card .panel-title{ color: white; }
.timemachine-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}
@media (max-width: 879px){
  .timemachine-grid{ grid-template-columns: 1fr; }
}
.timemachine-cell{
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}
.timemachine-cell-eyebrow{
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.timemachine-cell-row{
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.timemachine-cell-old{
  font-family: var(--mono);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: line-through;
}
.timemachine-cell-new{
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  color: var(--primary, #b0f580);
}
.timemachine-cell-delta{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--primary, #b0f580);
  font-weight: 700;
}

.timemachine-foot{
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 1.6;
}
.timemachine-foot strong{ color: white; }

/* ---- PR top-cards (client progress) ---- */
.pr-top-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 879px){
  .pr-top-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 539px){
  .pr-top-grid{ grid-template-columns: 1fr; }
}
.pr-top-card{
  padding: 14px;
  background: var(--bg-2);
  border-radius: 10px;
}
.pr-top-card.is-fresh{
  background: linear-gradient(135deg, var(--warning-bg, #fef3c7), #fef9e7);
  border: 1.5px solid var(--warning, #f59e0b);
}
.pr-top-card-icon{ font-size: 24px; margin-bottom: 6px; }
.pr-top-card-title{
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
}
.pr-top-card.is-fresh .pr-top-card-title{ font-size: 16px; }
.pr-top-card-value{
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  margin: 4px 0;
}
.pr-top-card.is-fresh .pr-top-card-value{
  font-size: 20px;
  color: var(--warning-text, #92400e);
}
.pr-top-card-meta{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}

/* Page sub link */
.page-sub-link{
  background: none;
  border: none;
  color: var(--secondary);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0;
  text-decoration: none;
}
.page-sub-link:hover{ text-decoration: underline; }

/* ===================================================================== */
/* ============== TRENING — biblioteka ćwiczeń (mockup look) =========== */
/* ===================================================================== */

.training-lib-row-icon{
  width: 32px;
  height: 32px;
  background: var(--bg-2);
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}
.training-lib-row .training-lib-row-icon{
  margin-right: 2px;
}

.training-lib-row-meta{
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
  flex-wrap: wrap;
}
.training-lib-row-pill{
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.training-lib-row-pill.private{ background: var(--bg-2); color: var(--muted); }
.training-lib-row-pill.pending{ background: var(--warning-bg, #fef3c7); color: var(--warning-text, #92400e); }
.training-lib-row-pill.approved{ background: var(--success-bg, #dcfce7); color: var(--success-text, #166534); }
.training-lib-row-pill.rejected{ background: var(--error-bg, #fee2e2); color: var(--error-text, #991b1b); }
.training-lib-row-pill.global{ background: var(--info-bg, #e0f2fe); color: var(--info-text, #075985); }

/* "Stwórz własne ćwiczenie" CTA in library */
.training-lib-create{
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px;
  background: var(--surface);
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-top: 10px;
  transition: border-color 0.15s, background 0.15s;
}
.training-lib-create:hover{
  border-color: var(--secondary);
  background: rgba(0, 77, 255, 0.04);
}

/* Generic modal (training-modal) */
.training-modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(9, 18, 50, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.training-modal-overlay.active{ display: flex; }
.training-modal{
  background: white;
  border-radius: 18px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: trModalUp 0.25s ease;
}
.training-modal.lg{ max-width: 760px; }
.training-modal.xl{ max-width: 960px; }
@keyframes trModalUp{
  from{ transform: translateY(20px); opacity: 0; }
  to{ transform: translateY(0); opacity: 1; }
}
.training-modal-head{
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  position: sticky;
  top: 0;
  background: white;
  z-index: 5;
}
.training-modal-title{
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.training-modal-sub{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-top: 3px;
  text-transform: uppercase;
}
.training-modal-close{
  background: var(--bg-2);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--muted);
  flex-shrink: 0;
}
.training-modal-close:hover{ background: var(--border); }
.training-modal-body{ padding: 18px 20px; }
.training-modal-foot{
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  background: white;
  flex-wrap: wrap;
}

/* Icon picker grid in modal */
.icon-picker{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 6px;
  padding: 8px;
  background: var(--bg-2);
  border-radius: 9px;
  border: 1px solid var(--border);
  max-height: 180px;
  overflow-y: auto;
}
.icon-picker-btn{
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  background: white;
  display: grid;
  place-items: center;
  font-size: 20px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}
.icon-picker-btn:hover{ border-color: var(--border); }
.icon-picker-btn.is-active{
  border-color: var(--secondary);
  background: rgba(0, 77, 255, 0.06);
  transform: scale(1.05);
}

/* Admin: exercises library table */
.admin-ex-table{
  width: 100%;
  border-collapse: collapse;
}
.admin-ex-table th{
  text-align: left;
  padding: 10px 12px;
  background: var(--bg-2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.admin-ex-table td{
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  vertical-align: middle;
}
.admin-ex-table tr:hover td{ background: var(--bg, #fafaf7); }
.admin-ex-row-title{ font-weight: 600; font-size: 13px; }
.admin-ex-row-sub{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

/* ===================================================================== */
/* ============== TOAST notifications (global) ========================= */
/* ===================================================================== */
.pt-toast-container{
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: calc(100vw - 36px);
}
.pt-toast{
  background: var(--dark, #091232);
  color: white;
  padding: 12px 14px;
  border-radius: 10px;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  gap: 10px;
  align-items: center;
  box-shadow: 0 8px 28px rgba(9, 18, 50, 0.25);
  pointer-events: auto;
  min-width: 240px;
  max-width: 420px;
  animation: ptToastIn 0.22s ease-out;
}
.pt-toast.is-leaving{
  animation: ptToastOut 0.18s ease-in forwards;
}
.pt-toast-icon{
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
}
.pt-toast.success{ background: var(--success, #22c55e); color: white; }
.pt-toast.success .pt-toast-icon{ background: rgba(255, 255, 255, 0.2); }
.pt-toast.warning{ background: var(--warning, #f59e0b); color: var(--warning-text, #92400e); }
.pt-toast.warning .pt-toast-icon{ background: rgba(146, 64, 14, 0.15); }
.pt-toast.error{ background: var(--error, #ef4444); color: white; }
.pt-toast.error .pt-toast-icon{ background: rgba(255, 255, 255, 0.2); }
.pt-toast.info{ background: var(--secondary, #004dff); color: white; }
.pt-toast.info .pt-toast-icon{ background: rgba(255, 255, 255, 0.2); }
.pt-toast-body{ flex: 1; line-height: 1.4; }
.pt-toast-close{
  background: none;
  border: none;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
}
.pt-toast-close:hover{ opacity: 1; }
@keyframes ptToastIn{
  from{ transform: translateX(20px); opacity: 0; }
  to{ transform: translateX(0); opacity: 1; }
}
@keyframes ptToastOut{
  from{ transform: translateX(0); opacity: 1; }
  to{ transform: translateX(20px); opacity: 0; }
}
@media (max-width: 540px){
  .pt-toast-container{ left: 12px; right: 12px; top: 12px; max-width: none; }
  .pt-toast{ min-width: 0; }
}

/* ===================================================================== */
/* ============== ADMIN — Users (v3 design) ============================ */
/* ===================================================================== */

.admin-badge{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: #ff3366;
  color: white;
  margin-left: 8px;
  vertical-align: middle;
}

.search-box{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
}
.search-box input{
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: inherit;
  background: transparent;
  color: var(--text);
}
.search-box svg{
  width: 14px;
  height: 14px;
  color: var(--muted);
  flex-shrink: 0;
}

.admin-filter-bar{
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: 1fr auto auto auto auto;
  gap: 8px;
  align-items: center;
}
@media (max-width: 879px){
  .admin-filter-bar{ grid-template-columns: 1fr; gap: 6px; }
}

.admin-table-wrap{
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.admin-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table thead{ background: var(--bg-2); }
.admin-table th{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
}
.admin-table th.numeric{ text-align: right; }
.admin-table td{
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table td.numeric{
  text-align: right;
  font-family: var(--mono);
  font-weight: 600;
}
.admin-table tr:hover td{ background: var(--bg); }
.admin-table tr.selected td{ background: rgba(0, 77, 255, 0.04); }

.admin-cell-name{ font-weight: 600; font-size: 13px; }
.admin-cell-meta{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

.client-name-cell{
  display: flex;
  align-items: center;
  gap: 10px;
}
.client-name-cell .avatar{
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--secondary), #1d4ed8);
  color: white;
}

/* Pill-style badges (v3) */
.badge-pill{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-pill.badge-success{ background: rgba(34, 197, 94, 0.12); color: #166534; }
.badge-pill.badge-info{ background: rgba(0, 77, 255, 0.10); color: #1d4ed8; }
.badge-pill.badge-warning{ background: rgba(245, 158, 11, 0.15); color: #92400e; }
.badge-pill.badge-error{ background: rgba(239, 68, 68, 0.10); color: #991b1b; }
.badge-pill.badge-neutral{ background: var(--bg-2); color: var(--muted); }

/* Action menu (icon-only buttons) */
.action-menu{ display: flex; gap: 4px; align-items: center; }
.action-menu .icon-btn{
  width: 28px;
  height: 28px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text);
}
.action-menu .icon-btn:hover{ background: var(--bg-2); }
.action-menu .icon-btn svg{ width: 12px; height: 12px; }

/* form-select used inline in admin tables */
.form-select{
  padding: 6px 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  font-family: var(--body);
  outline: none;
  background: white;
  color: var(--text);
}
.form-select:focus{ border-color: var(--secondary); }

/* Filter pills (v3) — extended */
.filter-pills{
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.filter-pills::-webkit-scrollbar{ height: 0; }
.filter-pills a{
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.filter-pills a:hover{ border-color: var(--text); }
.filter-pills a.is-active{
  background: var(--dark, #091232);
  color: white;
  border-color: var(--dark, #091232);
}

/* Stat-mini cards (v3) */
.stat-mini-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.stat-mini-card{
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}
.stat-mini-card.dark{
  background: var(--dark, #091232);
  color: white;
  border-color: var(--dark);
}
.stat-mini-label{
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}
.stat-mini-card.dark .stat-mini-label{ color: rgba(255, 255, 255, 0.5); }
.stat-mini-value{
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-mini-trend{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--success-text, #166534);
  font-weight: 600;
}
.stat-mini-card.dark .stat-mini-trend{ color: var(--primary, #b0f580); }

/* Cards-mode for mobile (when admin-table-wrap is hidden) */
.admin-cards{ display: none; flex-direction: column; gap: 8px; }
@media (max-width: 879px){
  .admin-table-wrap{ display: none; }
  .admin-cards{ display: flex; }
}
.admin-card{
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}
.admin-card-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
}
.admin-card-row-label{
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===================================================================== */
/* ============== Builder — exercise expand/collapse, steppers ========= */
/* ===================================================================== */

.training-ex-block.is-collapsed .training-ex-collapsible{
  display: none;
}
.training-ex-toggle{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.15s, background 0.15s;
}
.training-ex-toggle:hover{ background: var(--bg-2); color: var(--text); }
.training-ex-block.is-collapsed .training-ex-toggle{
  transform: rotate(-90deg);
}
.training-ex-block .training-ex-summary{
  display: none;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  padding: 6px 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 6px;
}
.training-ex-block.is-collapsed .training-ex-summary{ display: block; }

/* Drag handle on exercise block (move between days) */
.training-ex-grip{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 26px;
  cursor: grab;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: -0.1em;
  line-height: 1;
  user-select: none;
  flex-shrink: 0;
}
.training-ex-grip:active{ cursor: grabbing; }
.training-ex-block[draggable="true"]{ cursor: default; }
.training-ex-block.is-dragging{
  opacity: 0.45;
  outline: 2px dashed var(--secondary);
}

/* Numeric stepper (input + and - buttons) */
.pt-stepper{
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: white;
  width: 100%;
  max-width: 110px;
}
.pt-stepper .pt-stepper-btn{
  width: 22px;
  background: var(--bg-2);
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  font-family: var(--mono);
  line-height: 1;
  user-select: none;
  flex-shrink: 0;
}
.pt-stepper .pt-stepper-btn:hover{ background: var(--border); color: var(--text); }
.pt-stepper input{
  border: none !important;
  border-radius: 0 !important;
  text-align: center;
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 12px;
  padding: 5px 4px !important;
  outline: none !important;
}
.pt-stepper input:focus{
  background: rgba(0, 77, 255, 0.04);
}

/* Pretty confirm modal */
/* Legacy overlay (used as fallback in some places) */
.pt-confirm-overlay{
  position: fixed;
  inset: 0;
  background: rgba(9, 18, 50, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pt-confirm-overlay.active{ display: flex; }

/* New: <dialog>-based confirm — uses top-layer so it always renders above
   any other open dialog (e.g. the calendar booking modal). */
.pt-confirm-dialog{
  border: none;
  padding: 0;
  background: transparent;
  max-width: 440px;
  width: calc(100% - 32px);
  /* Force centered position even when another <dialog> is already open
     (some browsers place the second dialog at the document's natural position). */
  margin: auto;
  inset: 0;
  position: fixed;
}
.pt-confirm-dialog::backdrop{
  background: rgba(9, 18, 50, 0.55);
  backdrop-filter: blur(4px);
}
.pt-confirm-dialog:not([open]){ display: none; }
.pt-confirm-dialog[open]{
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  height: 100dvh;
  background: transparent;
}
.pt-confirm-dialog[open] .pt-confirm {
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.pt-confirm{
  background: white;
  border-radius: 16px;
  max-width: 440px;
  width: 100%;
  overflow: hidden;
  animation: ptToastIn 0.22s ease-out;
}
.pt-confirm-icon{
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 22px auto 12px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: var(--error-bg, #fee2e2);
  color: var(--error, #ef4444);
}
.pt-confirm-icon.warn{ background: var(--warning-bg, #fef3c7); color: var(--warning, #f59e0b); }
.pt-confirm-icon.info{ background: var(--info-bg, #e0f2fe); color: var(--secondary, #004dff); }
.pt-confirm-title{
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  text-align: center;
  padding: 0 24px 8px;
  letter-spacing: -0.01em;
}
.pt-confirm-text{
  font-size: 13px;
  color: var(--muted);
  text-align: left;
  padding: 0 24px 18px;
  line-height: 1.55;
  white-space: pre-line;
}
.pt-confirm-actions{
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  background: var(--bg-2);
}

/* Drop indicator between session cards */
.training-session-card.is-ex-drop-target{
  outline: 2px dashed var(--secondary);
  outline-offset: 4px;
  background: rgba(0, 77, 255, 0.04);
}

/* ===================================================================== */
/* ============== Builder — collapsible session card + chips =========== */
/* ===================================================================== */

/* Chevron toggle in session head */
.training-session-toggle{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.15s, background 0.15s;
}
.training-session-toggle:hover{ background: var(--bg-2); color: var(--text); }
.training-session-card.is-collapsed .training-session-toggle{
  transform: rotate(-90deg);
}
.training-session-card.is-collapsed .training-session-collapsible{
  display: none;
}

/* Session "tag" (PUSH/PULL/LEGS chip in header) */
.training-session-tag{
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--secondary, #004dff);
  color: white;
  flex-shrink: 0;
}
.training-session-tag.is-rest{
  background: var(--bg-2);
  color: var(--muted);
}

/* Chips area inside collapsed session card */
.training-session-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0 0;
}
.training-session-chips-empty{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  padding: 6px 0;
}

/* Single exercise chip */
.training-ex-chip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 9px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: grab;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  user-select: none;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  max-width: 100%;
}
.training-ex-chip:hover{
  border-color: var(--secondary, #004dff);
  background: rgba(0, 77, 255, 0.04);
}
.training-ex-chip:active{ cursor: grabbing; }
.training-ex-chip.is-dragging{
  opacity: 0.45;
  outline: 2px dashed var(--secondary, #004dff);
}
.training-ex-chip-icon{
  font-size: 13px;
  flex-shrink: 0;
  line-height: 1;
}
.training-ex-chip-name{
  font-weight: 600;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.training-ex-chip-meta{
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  flex-shrink: 0;
}
.training-ex-chip-x{
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: transparent;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
  margin-left: 2px;
}
.training-ex-chip-x:hover{
  background: var(--error-bg, #fee2e2);
  color: var(--error, #ef4444);
}

/* Make collapsed card more compact */
.training-session-card.is-collapsed{
  padding: 12px 14px;
}
.training-session-card.is-collapsed .training-session-meta{
  margin-top: 6px;
}

/* ===================================================================== */
/* ============== LIVE — stepper, note, history-note =================== */
/* ===================================================================== */

.live-stepper{
  display: inline-flex;
  align-items: stretch;
  border: 2px solid var(--secondary, #004dff);
  border-radius: 8px;
  overflow: hidden;
  background: white;
  width: 100%;
  min-height: 40px;
}
.live-stepper-btn{
  width: 32px;
  flex-shrink: 0;
  background: var(--bg-2);
  border: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  font-family: var(--mono);
  line-height: 1;
  color: var(--secondary, #004dff);
  user-select: none;
  transition: background 0.12s;
}
.live-stepper-btn:hover{ background: var(--secondary, #004dff); color: white; }
.live-stepper-btn:active{ transform: scale(0.95); }
.live-stepper .live-set-input{
  border: none !important;
  border-radius: 0 !important;
  text-align: center;
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  padding: 6px 4px !important;
  outline: none !important;
  background: white !important;
}
.live-stepper .live-set-input:focus{
  background: rgba(0, 77, 255, 0.04) !important;
}

/* Note row under active set */
.live-set-extra{
  margin: 12px 0 4px;
  padding: 10px 12px;
  background: var(--bg-2);
  border-radius: 10px;
  border: 1px dashed var(--border);
}
.live-set-extra-label{
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 6px;
}
.live-set-extra .input{
  font-size: 13px;
  padding: 8px 10px;
}
.live-set-extra-hint{
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
}
.live-set-extra-hint strong{ color: var(--text); }
.live-set-extra-hint em{ color: var(--secondary, #004dff); font-style: normal; }

/* Note row under a DONE set */
.live-set-note-row{
  margin: 4px 16px 8px;
  padding: 6px 10px;
  background: rgba(0, 77, 255, 0.05);
  border-left: 3px solid var(--secondary, #004dff);
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--body);
  color: var(--text);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.live-set-note-icon{ flex-shrink: 0; }

/* Note inside history side-panel */
.live-history-note{
  margin: -2px 0 4px;
  padding: 4px 8px;
  background: rgba(0, 77, 255, 0.04);
  border-radius: 6px;
  font-size: 10px;
  color: var(--secondary, #004dff);
  font-family: var(--body);
  line-height: 1.4;
}

/* ===================================================================== */
/* ============== LIVE — actual rest indicator on done sets ============ */
/* ===================================================================== */
.live-set-rest{
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg-2);
  color: var(--muted);
  white-space: nowrap;
}
.live-set-rest.ok{ background: var(--success-bg, #dcfce7); color: var(--success-text, #166534); }
.live-set-rest.over{ background: var(--warning-bg, #fef3c7); color: var(--warning-text, #92400e); }
.live-set-rest.under{ background: var(--info-bg, #e0f2fe); color: var(--info-text, #075985); }

/* Clickable session card (history) */
.session-card-link{
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.session-card-link:hover{
  border-color: var(--secondary, #004dff);
  box-shadow: 0 4px 14px rgba(0, 77, 255, 0.08);
}
.session-card-link:active{ transform: scale(0.998); }

/* Builder — empty session label placeholder pill (clickable) */
.training-session-tag.is-empty{
  background: transparent;
  color: var(--muted);
  border: 1.5px dashed var(--border);
  cursor: pointer;
  padding: 2px 9px;
}
.training-session-tag.is-empty:hover{
  border-color: var(--secondary, #004dff);
  color: var(--secondary, #004dff);
  background: rgba(0, 77, 255, 0.04);
}

/* ===================================================================== */
/* ============== KALENDARZE — DESIGN SYSTEM v3 (mockup port) =========== */
/* ===================================================================== */

/* Tokens (extra) */
:root{
  --success-bg: #dcfce7;
  --success-text: #166534;
  --warning-bg: #fef3c7;
  --warning-text: #92400e;
  --error-bg: #fee2e2;
  --error-text: #991b1b;
  --info-bg: #e0f2fe;
  --info-text: #075985;
  --neutral-bg: #f3f4f6;
  --neutral-text: #4b5563;
}

/* Page header (mockup style) */
.mk-page-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.mk-page-title{
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
}
.mk-page-sub{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-top: 3px;
}
.mk-page-actions{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Toolbar */
.mk-cal-toolbar{
  background: white;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 11px 13px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.mk-cal-period{
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.mk-cal-views{
  display: flex;
  gap: 3px;
  background: var(--bg-2, #f3f2ec);
  padding: 3px;
  border-radius: 8px;
}
.mk-cal-view-btn{
  padding: 6px 11px;
  border: none;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  color: var(--muted);
  font-family: var(--body);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.mk-cal-view-btn.active{
  background: white;
  color: var(--dark);
  box-shadow: 0 1px 3px rgba(9,18,50,0.06);
}
.mk-cal-arrows{
  display: flex;
  gap: 4px;
}
.mk-icon-btn{
  min-width: 30px;
  height: 30px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
  padding: 0 8px;
  font-family: var(--body);
}
.mk-icon-btn:hover{ background: var(--bg-2, #f3f2ec); }

/* Filter pills row */
.mk-filter-row{
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.mk-filter-label{
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-right: 4px;
}
.mk-pill{
  padding: 5px 11px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 11px;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--body);
  text-decoration: none;
}
.mk-pill.active-light{ background: var(--bg-2, #f3f2ec); }
.mk-pill.active-dark{
  background: var(--dark);
  color: white;
  border-color: var(--dark);
}
.mk-pill:hover:not(.active-dark){ background: var(--bg-2, #f3f2ec); }
.mk-pill-select{
  border: 1px solid var(--border);
  background: white;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  border-radius: 100px;
  padding: 5px 11px;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'><path fill='%236b7280' d='M0 0l4 5 4-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 22px;
}
.mk-pill-select:focus{ border-color: var(--secondary); }

/* State banner */
.mk-state-banner{
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mk-state-banner.warn{
  background: rgba(245,158,11,0.1);
  color: var(--warning-text);
  border-left: 3px solid var(--warning, #f59e0b);
}
.mk-state-banner.info{
  background: rgba(0,77,255,0.06);
  color: var(--info-text);
  border-left: 3px solid var(--secondary);
}
.mk-state-banner.error{
  background: rgba(239,68,68,0.08);
  color: var(--error-text);
  border-left: 3px solid var(--error, #ef4444);
}
.mk-state-banner svg{ width: 16px; height: 16px; flex-shrink: 0; }

/* WEEK GRID (desktop) */
.mk-week-grid{
  display: grid;
  grid-template-columns: 54px repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
}
.mk-week-head-empty{ background: white; }
.mk-week-head-day{
  background: white;
  padding: 9px 4px;
  text-align: center;
}
.mk-week-head-day-name{
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1px;
}
.mk-week-head-day-num{
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.mk-week-head-day.today .mk-week-head-day-num{ color: var(--secondary); }
.mk-week-head-day.today .mk-week-head-day-name{ color: var(--secondary); }
.mk-week-time{
  background: white;
  padding: 8px 5px 0;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  text-align: right;
  position: relative;
}
.mk-week-cell{
  background: white;
  min-height: 60px;
  padding: 3px;
  cursor: pointer;
  position: relative;
}
.mk-week-cell:hover{ background: rgba(0,77,255,0.04); }
.mk-week-cell.disabled{
  background: repeating-linear-gradient(45deg, white, white 5px, var(--bg-2, #f3f2ec) 5px, var(--bg-2, #f3f2ec) 10px);
  cursor: default;
}

/* Event card inside week-grid cell */
.mk-event{
  border-radius: 5px;
  padding: 4px 6px;
  font-size: 10px;
  line-height: 1.25;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-decoration: none;
  color: inherit;
  z-index: 2;
}
/* When .mk-event is also .cal-grid-slot it's already absolutely positioned by inline style */
.cal-grid-slot.mk-event{
  position: absolute;
}
.mk-event-title{ font-weight: 700; font-size: 10px; line-height: 1.15; }
.mk-event-meta{ font-family: var(--mono); font-size: 8px; opacity: 0.85; letter-spacing: 0.02em; }
.mk-event-mini-acts{ display: flex; gap: 2px; margin-top: auto; }
.mk-event-mini-acts button, .mk-event-mini-acts a{
  font-family: var(--body);
  font-size: 8px;
  padding: 2px 5px;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: inherit;
  display: inline-block;
}
.mk-mini-yes{ background: var(--success, #22c55e); color: white !important; }
.mk-mini-no{ background: rgba(255,255,255,0.4); color: var(--text) !important; }

.mk-event.free{
  background: var(--success-bg);
  color: var(--success-text);
  border-left: 3px solid var(--success, #22c55e);
}
.mk-event.booked{
  background: #dbeafe;
  color: #1e3a8a;
  border-left: 3px solid var(--secondary);
}
.mk-event.mine{
  background: #fef3c7;
  color: var(--warning-text);
  border-left: 3px solid var(--warning, #f59e0b);
}
.mk-event.pending{
  background: var(--warning-bg);
  color: var(--warning-text);
  border-left: 3px solid var(--warning, #f59e0b);
}
.mk-event.blocked{
  background: repeating-linear-gradient(45deg, #f3f4f6, #f3f4f6 4px, #e5e7eb 4px, #e5e7eb 8px);
  color: var(--neutral-text);
  border-left: 3px solid var(--neutral-text);
  cursor: default;
}
.mk-event.group{
  background: rgba(176,245,128,0.4);
  color: var(--dark);
  border-left: 3px solid var(--primary);
}
.mk-event.conflict{
  background: rgba(239,68,68,0.15);
  border-left-color: var(--error, #ef4444);
  color: var(--error-text);
}

/* Now-line marker */
.mk-now-line{
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--error, #ef4444);
  z-index: 5;
  pointer-events: none;
}
.mk-now-line::before{
  content: '';
  position: absolute;
  left: -3px;
  top: -3px;
  width: 8px;
  height: 8px;
  background: var(--error, #ef4444);
  border-radius: 50%;
}

/* DAY VIEW (single column cards) */
.mk-day-view{ display: flex; flex-direction: column; gap: 6px; }
.mk-day-slot{
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  align-items: flex-start;
}
.mk-day-time{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  padding-top: 9px;
  text-align: right;
}
.mk-day-card{
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 11px 12px;
  cursor: pointer;
  border-left: 3px solid var(--border);
  transition: transform 0.1s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.mk-day-card:active{ transform: scale(0.98); }
.mk-day-card-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 3px;
}
.mk-day-card-title{ font-weight: 600; font-size: 13px; line-height: 1.25; color: var(--text); }
.mk-day-card-sub{ font-size: 11px; color: var(--muted); font-family: var(--mono); }
.mk-day-card-meta{ font-size: 11px; color: var(--muted); margin-top: 3px; }
.mk-day-card.free{ border-left-color: var(--success, #22c55e); }
.mk-day-card.booked{ border-left-color: var(--secondary); background: rgba(0,77,255,0.025); }
.mk-day-card.mine{ border-left-color: var(--warning, #f59e0b); background: rgba(245,158,11,0.04); }
.mk-day-card.pending{ border-left-color: var(--warning, #f59e0b); background: rgba(245,158,11,0.04); }
.mk-day-card.blocked{
  border-left-color: var(--neutral-text);
  background: repeating-linear-gradient(45deg, white, white 6px, var(--bg-2, #f3f2ec) 6px, var(--bg-2, #f3f2ec) 12px);
  cursor: default;
}
.mk-day-card.group{ border-left-color: var(--primary); background: rgba(176,245,128,0.06); }
.mk-day-card-actions{ display: flex; gap: 5px; margin-top: 8px; }
.mk-day-card-actions .btn,
.mk-day-card-actions button{
  flex: 1;
  padding: 6px 8px;
  font-size: 11px;
}

/* MONTH VIEW */
.mk-month-grid{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
}
.mk-month-head{
  background: var(--bg-2, #f3f2ec);
  padding: 7px;
  text-align: center;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.mk-month-cell{
  background: white;
  min-height: 88px;
  padding: 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: inherit;
}
.mk-month-cell:hover{ background: var(--bg-2, #f3f2ec); }
.mk-month-cell.other-month{ background: var(--bg-2, #f3f2ec); opacity: 0.55; }
.mk-month-cell.today{ background: rgba(176,245,128,0.18); }
.mk-month-cell.today .mk-month-num{ color: var(--secondary); font-weight: 800; }
.mk-month-num{
  font-family: var(--display);
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 3px;
}
.mk-month-event{
  font-size: 9px;
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mk-month-event.free{ background: var(--success-bg); color: var(--success-text); }
.mk-month-event.booked{ background: #dbeafe; color: #1e3a8a; }
.mk-month-event.mine{ background: #fef3c7; color: var(--warning-text); }
.mk-month-event.pending{ background: var(--warning-bg); color: var(--warning-text); }
.mk-month-event.group{ background: rgba(176,245,128,0.5); color: var(--dark); }
.mk-month-more{
  font-size: 9px;
  color: var(--muted);
  font-family: var(--mono);
  padding: 1px 3px;
  font-weight: 600;
}

/* LIST VIEW */
.mk-list-view{ display: flex; flex-direction: column; gap: 10px; }
.mk-list-day-group{
  background: white;
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
}
.mk-list-day-head{
  padding: 10px 14px;
  background: var(--bg-2, #f3f2ec);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.mk-list-day-name{
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.01em;
}
.mk-list-day-stats{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: auto;
  margin-right: 10px;
}
.mk-list-day-add{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--secondary, #004dff);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  transition: transform .15s ease, box-shadow .15s ease;
  flex-shrink: 0;
}
/* Dni które już minęły — wizualnie wyciszone, niedostępne do dodawania slotów. */
.mk-list-day-group.is-past .mk-list-day-name {
  color: var(--muted, #6b7280);
}
.mk-list-day-group.is-past .mk-list-item {
  opacity: 0.7;
}
.cal-grid-col.is-past {
  background: rgba(15, 23, 42, 0.025);
}
.cal-grid-cell.is-past {
  background: repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(15, 23, 42, 0.03) 6px, rgba(15, 23, 42, 0.03) 12px);
  cursor: not-allowed;
  pointer-events: none;
}
.mk-list-day-add:hover{
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 77, 255, 0.25);
}
.mk-list-day-add:active{ transform: scale(0.95); }
.mk-list-items{ padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.mk-list-item{
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 7px;
  cursor: pointer;
  border-left: 3px solid var(--border);
  text-decoration: none;
  color: inherit;
}
.mk-list-item:hover{ background: var(--bg-2, #f3f2ec); }
.mk-list-item.free{ border-left-color: var(--success, #22c55e); }
.mk-list-item.booked{ border-left-color: var(--secondary); }
.mk-list-item.mine{ border-left-color: var(--warning, #f59e0b); }
.mk-list-item.pending{ border-left-color: var(--warning, #f59e0b); }
.mk-list-item.group{ border-left-color: var(--primary); }
.mk-list-item.blocked{ border-left-color: var(--neutral-text); opacity: 0.7; }
.mk-list-time{
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  min-width: 38px;
}
.mk-list-info{ flex: 1; min-width: 0; }
.mk-list-title{ font-weight: 600; font-size: 12px; line-height: 1.3; color: var(--text); }
.mk-list-sub{ font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 1px; }

/* Week strip (mobile + sub-nav) */
.mk-week-strip{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-bottom: 8px;
}
.mk-strip-day{
  padding: 6px 2px;
  text-align: center;
  border-radius: 7px;
  background: white;
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: var(--body);
  text-decoration: none;
  color: inherit;
  position: relative;
}
.mk-strip-day.today{ background: var(--dark); color: white; border-color: var(--dark); }
.mk-strip-day.selected{ border-color: var(--primary); border-width: 2px; }
.mk-strip-day-name{
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 1px;
}
.mk-strip-day-num{ font-family: var(--display); font-weight: 700; font-size: 13px; }
.mk-strip-day-plan{
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 9px;
}

.mk-day-label{
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 6px 0;
}

/* Badges (override to mockup style with bullet) */
.mk-badge{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
}
.mk-badge::before{
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.mk-badge-success{ background: var(--success-bg); color: var(--success-text); }
.mk-badge-warning{ background: var(--warning-bg); color: var(--warning-text); }
.mk-badge-error{ background: var(--error-bg); color: var(--error-text); }
.mk-badge-info{ background: var(--info-bg); color: var(--info-text); }
.mk-badge-neutral{ background: var(--neutral-bg); color: var(--neutral-text); }

/* Modal (mockup style) */
.mk-modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(9,18,50,0.6);
  z-index: 9999;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  backdrop-filter: blur(2px);
  animation: mkFadeIn 0.2s;
}
.mk-modal-overlay.show{ display: flex; }
@keyframes mkFadeIn{ from{opacity:0} to{opacity:1} }
@keyframes mkSlideUp{ from{transform:translateY(100%)} to{transform:translateY(0)} }
@keyframes mkScaleIn{ from{transform:scale(0.96);opacity:0} to{transform:scale(1);opacity:1} }
.mk-modal{
  background: white;
  border-radius: 18px 18px 0 0;
  width: 100%;
  max-width: 520px;
  padding: 20px;
  box-shadow: 0 -8px 30px rgba(9,18,50,0.15);
  animation: mkSlideUp 0.25s cubic-bezier(0.16,1,0.3,1);
  max-height: 90vh;
  overflow-y: auto;
}
@media (min-width: 768px){
  .mk-modal-overlay{ align-items: center; padding: 20px; }
  .mk-modal{ border-radius: 18px; animation: mkScaleIn 0.2s; max-height: 85vh; }
}
.mk-modal.lg{ max-width: 680px; }
.mk-modal.sm{ max-width: 400px; }
.mk-modal-handle{
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 100px;
  margin: 0 auto 12px;
}
@media (min-width: 768px){ .mk-modal-handle{ display: none; } }
.mk-modal-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  gap: 10px;
}
.mk-modal-title{
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.mk-modal-sub{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.mk-modal-x{
  background: var(--bg-2, #f3f2ec);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 13px;
}
.mk-modal-section{
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.mk-modal-section:first-of-type{ border-top: none; padding-top: 0; }
.mk-modal-label{
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.mk-modal-info{
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 13px;
}
.mk-modal-info span:first-child{ color: var(--muted); }
.mk-modal-info span:last-child{ font-weight: 600; }
.mk-modal-cta{ margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.mk-modal-cta-row{ display: flex; gap: 6px; }
.mk-modal-cta-row .btn{ flex: 1; }

/* Form bits used in modals */
.mk-form-row{ margin-bottom: 10px; }
.mk-form-label{
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
  display: block;
}
.mk-form-input, .mk-form-select, .mk-form-textarea{
  width: 100%;
  padding: 9px 11px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--body);
  outline: none;
  background: white;
  color: var(--text);
}
.mk-form-input:focus, .mk-form-select:focus, .mk-form-textarea:focus{ border-color: var(--secondary); }
.mk-form-pair{ display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mk-form-radio{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mk-form-radio.two{ grid-template-columns: 1fr 1fr; }
.mk-form-radio-card{
  padding: 9px 6px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  text-align: center;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  background: white;
  color: var(--text);
  font-family: var(--body);
}
.mk-form-radio-card.active{
  border-color: var(--primary);
  background: rgba(176,245,128,0.1);
}
.mk-form-radio-card-tag{
  font-family: var(--mono);
  font-size: 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
  display: block;
}
.mk-form-check{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  cursor: pointer;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  background: white;
}
.mk-form-check.active{
  border-color: var(--primary);
  background: rgba(176,245,128,0.06);
}
.mk-form-check input{
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--secondary);
}

/* Mobile tweaks */
@media (max-width: 640px){
  .mk-week-grid{ grid-template-columns: 38px repeat(7, 1fr); font-size: 9px; }
  .mk-week-cell{ min-height: 46px; padding: 2px; }
  .mk-event{ font-size: 8px; padding: 2px 3px; }
  .mk-event-title{ font-size: 9px; }
  .mk-event-meta{ display: none; }
  .mk-month-cell{ min-height: 62px; }
  .mk-cal-toolbar{ padding: 9px; }
  .mk-cal-period{ font-size: 13px; }
}

/* ===================================================================== */
/* ============== PLAN i ROZLICZENIA (subscription cards) ============== */
/* ===================================================================== */
.plan-pricing-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
@media (max-width: 768px){
  .plan-pricing-grid{ grid-template-columns: 1fr; }
}
.plan-card{
  background: white;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  position: relative;
}
.plan-card.active,
.plan-card.current{
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(176,245,128,0.05), white);
}
.plan-card.featured{
  border-color: var(--secondary);
  background: linear-gradient(135deg, rgba(0,77,255,0.04), white);
}
.plan-card-tag{
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--bg-2, #f3f2ec);
  color: var(--muted);
  margin-bottom: 10px;
}
.plan-card.active .plan-card-tag,
.plan-card.current .plan-card-tag{
  background: var(--primary);
  color: var(--dark);
}
.plan-card.featured .plan-card-tag{
  background: var(--secondary);
  color: white;
}
.plan-card-name{
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  color: var(--dark);
}
.plan-card-price{
  font-family: var(--display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
  line-height: 1;
  color: var(--dark);
}
.plan-card-price-period{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 18px;
}
.plan-card-features{
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  list-style: none;
  padding: 0;
}
.plan-card-feature{
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.4;
}
.plan-card-feature::before{
  content: '✓';
  color: var(--success, #22c55e);
  font-weight: 700;
  flex-shrink: 0;
}
.plan-card-feature.disabled{ color: var(--muted); }
.plan-card-feature.disabled::before{ content: '×'; color: var(--muted); }

.billing-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.billing-table th{
  text-align: left;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.billing-table td{
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.billing-table tr:last-child td{ border-bottom: none; }
.billing-table .panel-link{
  color: var(--secondary);
  font-size: 12px;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}
.billing-table .panel-link:hover{ text-decoration: underline; }

.tpay-status-card{
  padding: 14px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.tpay-status-pill{
  padding: 4px 10px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tpay-status-pill.ok{ background: var(--success-bg); color: var(--success-text); }
.tpay-status-pill.off{ background: var(--neutral-bg); color: var(--neutral-text); }
.tpay-status-pill.pending{ background: var(--warning-bg); color: var(--warning-text); }

/* ===================================================================== */
/* ============== FINANSE / FINANCE PAGE =============================== */
/* ===================================================================== */
.finance-grid{
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
}
@media (max-width: 900px){
  .finance-grid{ grid-template-columns: 1fr; }
}

.payout-card{
  background: var(--dark);
  color: white;
  border-radius: 14px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.payout-card::before{
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 60%);
  opacity: 0.15;
}
.payout-label{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 6px;
  position: relative;
}
.payout-amount{
  font-family: var(--display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
  position: relative;
}
.payout-amount em{ color: var(--primary); font-style: normal; }
.payout-meta{
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  position: relative;
  margin-bottom: 18px;
}
.payout-rows{
  position: relative;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 14px;
}
.payout-row{
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 5px 0;
}
.payout-row span:first-child{ color: rgba(255,255,255,0.6); }
.payout-row span:last-child{ font-family: var(--mono); font-weight: 600; }

.stat-card{
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}
.stat-card.dark{
  background: var(--dark);
  color: white;
  border-color: transparent;
}
.stat-card.dark .stat-label{ color: rgba(255,255,255,0.6); }
.stat-card.dark .stat-value{ color: white; }
.stat-card.dark .stat-trend{ color: var(--primary); }
.stat-card .stat-label{
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.stat-card .stat-value{
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
  color: var(--dark);
}
.stat-card .stat-trend{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--success);
  font-weight: 600;
}
.stat-card .stat-trend.down{ color: var(--error); }
.stat-card .stat-trend.flat{ color: var(--muted); }

/* =====================================================================
   Onboarding checklist (dashboard, trainer)
   ===================================================================== */
.onboarding-checklist {
  margin: 0 0 18px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(176, 245, 128, 0.10), rgba(0, 77, 255, 0.04));
  border: 1.5px solid var(--border, rgba(15, 23, 42, 0.10));
  border-radius: 16px;
}
.onboarding-checklist-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-end;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.onboarding-checklist-eyebrow {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.onboarding-checklist-title {
  font-family: var(--display, var(--body));
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--dark);
  line-height: 1.25;
}
.onboarding-checklist-progress {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 140px;
}
.onboarding-checklist-progress-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.onboarding-checklist-progress-bar {
  width: 140px;
  height: 6px;
  background: rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.onboarding-checklist-progress-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width .35s ease;
}
.onboarding-checklist-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.onboarding-checklist-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(15, 23, 42, 0.10));
  border-radius: 12px;
  transition: background .15s ease, border-color .15s ease;
}
.onboarding-checklist-item.is-done {
  background: rgba(176, 245, 128, 0.18);
  border-color: rgba(34, 197, 94, 0.35);
}
.onboarding-checklist-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.06);
  color: var(--dark, #0b1640);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 16px;
}
.onboarding-checklist-item.is-done .onboarding-checklist-icon {
  background: var(--primary, #b0f580);
  color: var(--dark, #0b1640);
}
.onboarding-checklist-icon svg { width: 16px; height: 16px; }
.onboarding-checklist-emoji { font-size: 17px; line-height: 1; }
.onboarding-checklist-body { flex: 1; min-width: 0; }
.onboarding-checklist-label {
  font-family: var(--body);
  font-size: 14px;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.01em;
}
.onboarding-checklist-item.is-done .onboarding-checklist-label {
  text-decoration: line-through;
  color: var(--muted);
  text-decoration-color: rgba(15, 23, 42, 0.35);
}
.onboarding-checklist-desc {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.onboarding-checklist-done-badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.15);
  color: #166534;
}
.onboarding-checklist--done {
  text-align: center;
  padding: 22px 20px;
}
.onboarding-checklist--done .onboarding-checklist-done-emoji {
  font-size: 36px;
  margin-bottom: 6px;
}
.onboarding-checklist--done .onboarding-checklist-done-title {
  font-family: var(--display, var(--body));
  font-size: 18px;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.01em;
}
.onboarding-checklist--done .onboarding-checklist-done-text {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
@media (max-width: 640px) {
  .onboarding-checklist-item {
    flex-wrap: wrap;
  }
  .onboarding-checklist-item .btn {
    margin-left: auto;
  }
}

/* =====================================================================
   Slot modal — nowy design (sekcje, eyebrow, smart-form)
   ===================================================================== */
.modal-backdrop#slotModal .modal {
  max-width: 580px;
  width: 100%;
}
.slot-modal-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

/* ===== Wizard krokowy w modalu nowego slotu ===== */
.wizard-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--border, rgba(15, 23, 42, 0.08));
  background: rgba(15, 23, 42, 0.015);
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.wizard-stepper::-webkit-scrollbar { display: none; }
.wizard-stepper .wizard-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--body, system-ui, sans-serif);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #6b7280);
  white-space: nowrap;
  border-radius: 8px;
}
.wizard-stepper .wizard-step:disabled { cursor: not-allowed; opacity: 0.45; }
.wizard-stepper .wizard-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--border, rgba(15, 23, 42, 0.10));
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.wizard-stepper .wizard-step.done .wizard-step-num {
  background: var(--secondary, #004dff);
  color: #fff;
}
.wizard-stepper .wizard-step.done .wizard-step-num::before {
  content: '✓';
  font-size: 12px;
}
.wizard-stepper .wizard-step.done .wizard-step-num > * { display: none; }
.wizard-stepper .wizard-step.active {
  color: var(--dark, #0b1640);
}
.wizard-stepper .wizard-step.active .wizard-step-num {
  background: var(--secondary, #004dff);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(0, 77, 255, 0.18);
}
.wizard-stepper .wizard-step-bar {
  flex: 1 1 12px;
  height: 2px;
  min-width: 8px;
  background: var(--border, rgba(15, 23, 42, 0.10));
  border-radius: 2px;
}

.slot-wizard .wizard-pane:not(.is-active) {
  display: none !important;
}
.slot-wizard .wizard-pane.is-active {
  display: block !important;
}
#slotModalForm:not(.wizard-on-last) .wizard-only-last {
  display: none !important;
}

/* Karty trybu jako duże klikable na 1 kolumnę */
.wizard-mode-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}
.wizard-mode-card {
  display: grid !important;
  grid-template-columns: 36px 1fr !important;
  grid-template-rows: auto auto !important;
  gap: 2px 12px !important;
  text-align: left !important;
  align-items: center !important;
  padding: 14px 16px !important;
  min-width: 0 !important;
}
.wizard-mode-card .wizard-mode-emoji {
  grid-row: 1 / 3;
  font-size: 22px;
  text-align: center;
}
.wizard-mode-card .wizard-mode-title {
  grid-column: 2;
  font-size: 14px;
  font-weight: 800;
  color: var(--dark, #0b1640);
  line-height: 1.2;
}
.wizard-mode-card .wizard-mode-sub {
  grid-column: 2;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted, #6b7280);
  line-height: 1.3;
}

/* Wizard CTA — replaced static modal-cta */
.wizard-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wizard-cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.wizard-cta-row-final {
  justify-content: flex-end;
}
.wizard-cta-progress {
  font-family: var(--mono, monospace);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted, #6b7280);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.wizard-cta-cancel {
  justify-content: center;
  border-top: 1px dashed var(--border, rgba(15, 23, 42, 0.08));
  padding-top: 8px;
}
@media (max-width: 600px) {
  .wizard-stepper {
    padding: 10px 12px 8px;
    gap: 2px;
  }
  .wizard-stepper .wizard-step-lbl { display: none; }
  .wizard-stepper .wizard-step.active .wizard-step-lbl { display: inline; }
  .wizard-stepper .wizard-step-num {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
  .wizard-mode-card {
    padding: 12px 14px !important;
  }
  .wizard-mode-card .wizard-mode-emoji {
    font-size: 20px;
  }
  .wizard-mode-card .wizard-mode-title {
    font-size: 13px;
  }
}
/* ===== /Wizard ===== */
.slot-modal-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border, rgba(15, 23, 42, 0.08));
}
.slot-modal-section:last-of-type { border-bottom: none; }

.slot-modal-section-eyebrow {
  font-family: var(--mono, monospace);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
  margin-bottom: 12px;
}

.slot-modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.slot-modal-field:last-child { margin-bottom: 0; }

.slot-modal-label {
  font-family: var(--body, system-ui, sans-serif);
  font-size: 12px;
  font-weight: 700;
  color: var(--dark, #0b1640);
  letter-spacing: -0.005em;
}
.slot-modal-hint-inline {
  margin-left: 6px;
  font-family: var(--mono, monospace);
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: none;
}
.slot-modal-required {
  color: #dc2626;
  margin-left: 4px;
  font-weight: 800;
}
.slot-modal-field-error {
  font-size: 12px;
  font-weight: 600;
  color: #dc2626;
  margin-top: 2px;
  line-height: 1.4;
}
.form-select.is-invalid,
.form-input.is-invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
  background-color: #fef2f2;
}

.slot-modal-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted, #6b7280);
  line-height: 1.45;
}

.slot-modal-step-line {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--mono, monospace);
  font-size: 12px;
  color: var(--muted);
}
.slot-modal-step-line input {
  width: 84px;
  padding: 8px 10px;
  border: 1.5px solid var(--border, rgba(15, 23, 42, 0.10));
  border-radius: 10px;
  background: var(--surface, #fff);
  font-family: var(--body, system-ui, sans-serif);
  font-size: 13px;
  color: var(--dark);
}

.slot-modal-advanced {
  margin: 0 20px 16px;
  border: 1.5px dashed var(--border, rgba(15, 23, 42, 0.12));
  border-radius: 12px;
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.015);
}
.slot-modal-advanced[open] {
  background: var(--surface, #fff);
  border-style: solid;
}
.slot-modal-advanced > summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--mono, monospace);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted, #6b7280);
  padding: 6px 0;
  user-select: none;
}
.slot-modal-advanced > summary::-webkit-details-marker,
.slot-modal-advanced > summary::marker { display: none; content: ''; }
.slot-modal-advanced-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Domyślny rozmiar form-radio-card w modalu — czytelny */
#slotModalForm .form-radio {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#slotModalForm .form-radio-card {
  flex: 1 1 auto;
  min-width: 130px;
  padding: 10px 14px;
  border: 1.5px solid var(--border, rgba(15, 23, 42, 0.12));
  border-radius: 12px;
  background: var(--surface, #fff);
  font-family: var(--body, system-ui, sans-serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--dark, #0b1640);
  cursor: pointer;
  text-align: center;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
#slotModalForm .form-radio-card:hover {
  border-color: var(--secondary, #004dff);
}
#slotModalForm .form-radio-card.active {
  border-color: var(--secondary, #004dff);
  background: rgba(0, 77, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(0, 77, 255, 0.10);
}

/* Form pair (2 kolumny np. data + godzina) */
#slotModalForm .form-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
#slotModalForm .form-input,
#slotModalForm .form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border, rgba(15, 23, 42, 0.12));
  border-radius: 10px;
  background: var(--surface, #fff);
  font-family: var(--body, system-ui, sans-serif);
  font-size: 13.5px;
  color: var(--dark, #0b1640);
  box-sizing: border-box;
}
#slotModalForm .form-input:focus,
#slotModalForm .form-select:focus {
  outline: none;
  border-color: var(--secondary, #004dff);
}

/* CTA row */
#slotModalForm .modal-cta {
  padding: 14px 20px;
  border-top: 1px solid var(--border, rgba(15, 23, 42, 0.08));
  background: rgba(15, 23, 42, 0.02);
}

@media (max-width: 600px) {
  .slot-modal-section { padding: 12px 14px; }
  .slot-modal-section-eyebrow { margin-bottom: 8px; letter-spacing: 0.10em; }
  .slot-modal-advanced { margin: 0 14px 12px; padding: 6px 12px; }
  .slot-modal-advanced-grid { grid-template-columns: 1fr; }
  #slotModalForm .form-pair { grid-template-columns: 1fr; }
  .pay-source { grid-template-columns: 1fr; gap: 6px; }
  .pay-source-card { padding: 9px 10px; gap: 8px; }
  .slot-modal-hint-inline {
    display: block;
    margin-left: 0;
    margin-top: 2px;
  }
  #slotModalForm .form-radio-card {
    min-width: 0;
    padding: 9px 8px;
    font-size: 12px;
  }
}
@media (max-width: 420px) {
  .modal-backdrop { padding: 8px; }
  .modal { padding: 12px; border-radius: 14px; }
  #slotModalForm .modal-cta { padding: 12px 14px; }
}

/* Weekday picker (cyklicznie) */
.weekday-picker {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.weekday-pill {
  display: grid;
  place-items: center;
  padding: 10px 0;
  border: 1.5px solid var(--border, rgba(15, 23, 42, 0.12));
  border-radius: 10px;
  background: var(--surface, #fff);
  cursor: pointer;
  font-family: var(--mono, monospace);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dark, #0b1640);
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.weekday-pill:has(input:checked),
.weekday-pill.is-active {
  border-color: var(--secondary, #004dff);
  background: rgba(0, 77, 255, 0.10);
  color: var(--secondary, #004dff);
}

/* Recurring „do kiedy" - 3 karty pionowe */
.recurring-until-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.recurring-until-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  border: 1.5px solid var(--border, rgba(15, 23, 42, 0.12));
  border-radius: 12px;
  background: var(--surface, #fff);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.recurring-until-card:hover { border-color: var(--secondary, #004dff); }
.recurring-until-card.active {
  border-color: var(--secondary, #004dff);
  background: rgba(0, 77, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(0, 77, 255, 0.08);
}
.recurring-until-title {
  font-family: var(--body, system-ui, sans-serif);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--dark, #0b1640);
}
.recurring-until-sub {
  font-family: var(--mono, monospace);
  font-size: 11px;
  color: var(--muted, #6b7280);
}
.recurring-until-card .form-input {
  display: inline-block;
  width: auto;
  font-family: var(--body, system-ui, sans-serif);
  padding: 6px 10px;
  font-size: 12.5px;
}

/* =====================================================================
   Custom time picker — popup z godzinami i minutami (zastępuje native)
   ===================================================================== */
.pt-tp-input {
  cursor: pointer;
}
.pt-tp-popover {
  position: fixed;
  z-index: 9700;
  background: var(--surface, #fff);
  border: 1.5px solid var(--border, rgba(15, 23, 42, 0.12));
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(9, 18, 50, 0.20), 0 4px 14px rgba(9, 18, 50, 0.08);
  padding: 14px;
  display: none;
  font-family: var(--body, system-ui, sans-serif);
  width: 320px;
  max-width: calc(100vw - 24px);
}
.pt-tp-popover.is-open { display: block; }
.pt-tp-step {
  display: none;
}
.pt-tp-step.is-active { display: block; }
.pt-tp-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.pt-tp-eyebrow {
  font-family: var(--mono, monospace);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
}
.pt-tp-current {
  font-family: var(--mono, monospace);
  font-size: 13px;
  font-weight: 800;
  color: var(--dark, #0b1640);
}
.pt-tp-back {
  font-size: 11px;
  background: transparent;
  border: 1px solid var(--border, rgba(15, 23, 42, 0.12));
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
  color: var(--muted, #6b7280);
}
.pt-tp-back:hover { color: var(--dark); }
.pt-tp-grid {
  display: grid;
  gap: 4px;
}
.pt-tp-grid--hours { grid-template-columns: repeat(6, 1fr); }
.pt-tp-grid--minutes { grid-template-columns: repeat(4, 1fr); }
.pt-tp-cell {
  padding: 10px 0;
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(15, 23, 42, 0.10));
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--mono, monospace);
  font-size: 13px;
  font-weight: 700;
  color: var(--dark, #0b1640);
  text-align: center;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.pt-tp-cell:hover {
  background: rgba(0, 77, 255, 0.08);
  border-color: var(--secondary, #004dff);
  color: var(--secondary, #004dff);
}
.pt-tp-cell.is-selected {
  background: var(--secondary, #004dff);
  border-color: var(--secondary, #004dff);
  color: #fff;
}
.pt-tp-foot {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.pt-tp-btn {
  padding: 6px 12px;
  border-radius: 8px;
  font-family: var(--body, system-ui, sans-serif);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border, rgba(15, 23, 42, 0.12));
  background: var(--surface, #fff);
  color: var(--muted, #6b7280);
}
.pt-tp-btn:hover { color: var(--dark); border-color: var(--dark); }

/* =====================================================================
   TPAY mock — strona płatności (testowa symulacja)
   ===================================================================== */
.tpay-mock-wrap {
  display: grid;
  place-items: center;
  padding: 28px 16px 60px;
}
.tpay-mock-card {
  width: 100%;
  max-width: 480px;
  background: var(--surface, #fff);
  border: 1.5px solid var(--border, rgba(15, 23, 42, 0.12));
  border-radius: 18px;
  padding: 26px 28px 22px;
  box-shadow: 0 12px 40px rgba(9, 18, 50, 0.10), 0 2px 8px rgba(9, 18, 50, 0.04);
}
.tpay-mock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border, rgba(15, 23, 42, 0.10));
  margin-bottom: 16px;
}
.tpay-mock-logo {
  font-family: var(--display, var(--body));
  font-weight: 900;
  font-size: 26px;
  letter-spacing: -0.04em;
  color: #002fb3;
  background: linear-gradient(135deg, #002fb3, #4d7bff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tpay-mock-eyebrow {
  font-family: var(--mono, monospace);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warning, #fb923c);
  background: rgba(251, 146, 60, 0.10);
  padding: 4px 10px;
  border-radius: 999px;
}
.tpay-mock-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.03);
  border-radius: 12px;
  margin-bottom: 14px;
}
.tpay-mock-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.tpay-mock-row-label {
  font-family: var(--mono, monospace);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
}
.tpay-mock-row-value {
  font-family: var(--body, system-ui, sans-serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--dark, #0b1640);
  text-align: right;
}
.tpay-mock-row-value.mono { font-family: var(--mono, monospace); font-size: 12px; }
.tpay-mock-amount {
  font-family: var(--display, var(--body));
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--secondary, #004dff);
}
.tpay-mock-info {
  padding: 12px 14px;
  background: rgba(251, 146, 60, 0.08);
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--dark, #0b1640);
  margin-bottom: 18px;
}
.tpay-mock-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}
.tpay-mock-actions .btn-block { width: 100%; }
.tpay-mock-actions .btn-lg { padding: 13px 18px; font-size: 15px; }
.tpay-mock-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border, rgba(15, 23, 42, 0.08));
  text-align: center;
  font-family: var(--mono, monospace);
  font-size: 10px;
  color: var(--muted, #6b7280);
  letter-spacing: 0.04em;
}

/* =====================================================================
   Setup gate kalendarza — pokazywany do czasu uzupełnienia typu zajęć + karnetu
   ===================================================================== */
.cal-setup-wrap {
  display: grid;
  place-items: start center;
  padding: 16px 0 60px;
}
.cal-setup-card {
  width: 100%;
  max-width: 700px;
  background: var(--surface, #fff);
  border: 1.5px solid var(--border, rgba(15, 23, 42, 0.10));
  border-radius: 18px;
  padding: 24px 26px 22px;
  box-shadow: 0 8px 28px rgba(9, 18, 50, 0.08);
}
.cal-setup-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border, rgba(15, 23, 42, 0.08));
  margin-bottom: 16px;
}
.cal-setup-eyebrow {
  font-family: var(--mono, monospace);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
  margin-bottom: 4px;
}
.cal-setup-title {
  font-family: var(--display, var(--body));
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--dark, #0b1640);
}
.cal-setup-progress {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 140px;
}
.cal-setup-progress-track {
  width: 140px;
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}
.cal-setup-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary, #b0f580), var(--secondary, #004dff));
  transition: width .3s ease;
}
.cal-setup-progress-label {
  font-family: var(--mono, monospace);
  font-size: 11px;
  font-weight: 800;
  color: var(--muted, #6b7280);
  letter-spacing: 0.05em;
}
.cal-setup-info {
  padding: 12px 14px;
  background: rgba(0, 77, 255, 0.05);
  border: 1px solid rgba(0, 77, 255, 0.15);
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--dark, #0b1640);
  margin-bottom: 18px;
}
.cal-setup-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.cal-setup-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--border, rgba(15, 23, 42, 0.10));
  border-radius: 14px;
  background: var(--surface, #fff);
  transition: border-color .15s ease, background .15s ease;
}
.cal-setup-step.is-done {
  border-color: rgba(34, 197, 94, 0.30);
  background: rgba(34, 197, 94, 0.04);
}
.cal-setup-step.is-locked {
  opacity: 0.55;
}
.cal-setup-step-mark {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display, var(--body));
  font-weight: 900;
  font-size: 16px;
  background: var(--bg, #f5f5ee);
  color: var(--muted, #6b7280);
  border: 1.5px solid var(--border, rgba(15, 23, 42, 0.10));
}
.cal-setup-step.is-done .cal-setup-step-mark {
  background: var(--primary, #b0f580);
  color: var(--dark, #0b1640);
  border-color: var(--primary, #b0f580);
}
.cal-setup-step-body {
  flex: 1;
  min-width: 0;
}
.cal-setup-step-title {
  font-family: var(--display, var(--body));
  font-size: 15px;
  font-weight: 800;
  color: var(--dark, #0b1640);
  letter-spacing: -0.01em;
}
.cal-setup-step-sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted, #6b7280);
  line-height: 1.45;
}
.cal-setup-step-action {
  flex-shrink: 0;
}
.cal-setup-hint {
  text-align: center;
  font-size: 12.5px;
  color: var(--muted, #6b7280);
  font-style: italic;
  padding: 10px;
}
.cal-setup-cta-row {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

@media (max-width: 600px) {
  .cal-setup-card { padding: 18px 16px 16px; }
  .cal-setup-step { flex-wrap: wrap; }
  .cal-setup-step-action { width: 100%; }
  .cal-setup-step-action .btn { width: 100%; }
}

/* =====================================================================
   Form dodawania karnetu (oferta trenera)
   ===================================================================== */
.pass-create-form {
  background: var(--surface, #fff);
  border: 1.5px solid var(--border, rgba(15, 23, 42, 0.10));
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pass-create-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 10px;
  align-items: end;
}
.pass-create-name { grid-column: 1 / -1; }
.pass-create-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pass-create-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1.5px solid var(--border, rgba(15, 23, 42, 0.12));
  border-radius: 10px;
  background: var(--bg, #f5f5ee);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--dark, #0b1640);
  transition: border-color .15s, background .15s;
}
.pass-create-toggle:has(input:checked) {
  border-color: var(--secondary, #004dff);
  background: rgba(0, 77, 255, 0.06);
}
.pass-create-toggle input { width: 16px; height: 16px; cursor: pointer; }

.pass-create-types {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: rgba(0, 77, 255, 0.03);
  border: 1px dashed var(--border, rgba(15, 23, 42, 0.15));
  border-radius: 10px;
}
.pass-create-types-label {
  font-family: var(--mono, monospace);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
}
.pass-create-types-hint {
  margin-left: 6px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 10.5px;
  color: var(--muted, #6b7280);
}
.pass-create-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px;
}
.pass-create-type-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface, #fff);
  border: 1.5px solid var(--border, rgba(15, 23, 42, 0.10));
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pass-create-type-pill:has(input:checked) {
  border-color: var(--secondary, #004dff);
  background: rgba(0, 77, 255, 0.05);
}
.pass-create-type-pill input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}
.pass-create-type-name {
  flex: 1;
  font-weight: 700;
  font-size: 13px;
  color: var(--dark, #0b1640);
}
.pass-create-type-cost {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono, monospace);
  font-size: 11px;
  color: var(--muted, #6b7280);
}
.pass-create-type-cost-input {
  width: 50px;
  padding: 4px 6px;
  border: 1px solid var(--border, rgba(15, 23, 42, 0.12));
  border-radius: 6px;
  font-family: var(--mono, monospace);
  font-size: 12px;
  text-align: center;
}
.pass-create-empty-types {
  padding: 10px 12px;
  background: rgba(251, 146, 60, 0.08);
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--dark, #0b1640);
}
.pass-create-empty-types a { color: var(--secondary, #004dff); font-weight: 700; }
.pass-create-actions {
  display: flex;
  justify-content: flex-end;
}
@media (max-width: 700px) {
  .pass-create-grid { grid-template-columns: 1fr 1fr; }
  .pass-create-name { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .pass-create-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   Client dashboard — wolne sloty u trenerów
   ===================================================================== */
.open-slots-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.open-slot-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(15, 23, 42, 0.10));
  border-radius: 10px;
  transition: border-color .15s, background .15s;
}
.open-slot-row:hover {
  border-color: var(--secondary, #004dff);
  background: rgba(0, 77, 255, 0.03);
}
.open-slot-info {
  flex: 1;
  min-width: 0;
}
.open-slot-time {
  font-family: var(--display, var(--body));
  font-weight: 800;
  font-size: 14px;
  color: var(--dark, #0b1640);
  letter-spacing: -0.005em;
}
.open-slot-meta {
  margin-top: 3px;
  font-family: var(--mono, monospace);
  font-size: 11px;
  color: var(--muted, #6b7280);
  letter-spacing: 0.02em;
}

/* =====================================================================
   Finance — rozbicie miesięczne (bar chart na liście)
   ===================================================================== */
.finance-monthly {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.finance-monthly-row {
  display: grid;
  grid-template-columns: 78px 1fr 90px 60px;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.finance-monthly-label {
  font-family: var(--mono, monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
}
.finance-monthly-bar-wrap {
  height: 22px;
  background: rgba(15, 23, 42, 0.05);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.finance-monthly-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary, #b0f580), var(--secondary, #004dff));
  border-radius: 6px;
  min-width: 2px;
  transition: width .3s ease;
}
.finance-monthly-amount {
  font-family: var(--mono, monospace);
  font-size: 13px;
  font-weight: 800;
  color: var(--dark, #0b1640);
  text-align: right;
}
.finance-monthly-count {
  font-family: var(--mono, monospace);
  font-size: 10px;
  color: var(--muted, #6b7280);
  text-align: right;
}
@media (max-width: 600px) {
  .finance-monthly-row {
    grid-template-columns: 60px 1fr 80px;
  }
  .finance-monthly-count { display: none; }
}

/* =====================================================================
   Marketplace — profil trenera (bio + karnety)
   ===================================================================== */
.trainer-profile-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  align-items: start;
}
.trainer-profile-bio {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text, #1f2937);
  white-space: pre-wrap;
}
.trainer-profile-passes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.trainer-profile-pass {
  padding: 12px 14px;
  background: var(--surface, #fff);
  border: 1.5px solid var(--border, rgba(15, 23, 42, 0.10));
  border-left: 4px solid var(--primary, #b0f580);
  border-radius: 10px;
}
.trainer-profile-pass-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.trainer-profile-pass-name {
  font-family: var(--display, var(--body));
  font-weight: 800;
  font-size: 14px;
  color: var(--dark, #0b1640);
  letter-spacing: -0.005em;
}
.trainer-profile-pass-price {
  font-family: var(--display, var(--body));
  font-weight: 800;
  font-size: 18px;
  color: var(--secondary, #004dff);
}
.trainer-profile-pass-meta {
  margin-top: 4px;
  font-family: var(--mono, monospace);
  font-size: 11px;
  color: var(--muted, #6b7280);
  letter-spacing: 0.04em;
}
.trainer-profile-passes-hint {
  margin-top: 10px;
  padding: 8px 10px;
  background: rgba(0, 77, 255, 0.05);
  border-radius: 8px;
  font-size: 12px;
  color: var(--muted, #6b7280);
  line-height: 1.45;
}
@media (max-width: 800px) {
  .trainer-profile-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   Settings tabs (klient) — top nav z ikonami
   ===================================================================== */
.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  background: var(--surface, #fff);
  border: 1.5px solid var(--border, rgba(15, 23, 42, 0.08));
  border-radius: 14px;
  margin-bottom: 14px;
}
.settings-tabs-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--muted, #6b7280);
  font-family: var(--body, system-ui, sans-serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.005em;
  transition: background .15s, color .15s;
}
.settings-tabs-item:hover {
  background: rgba(15, 23, 42, 0.04);
  color: var(--dark, #0b1640);
}
.settings-tabs-item.is-active {
  background: var(--dark, #0b1640);
  color: #fff;
}
.settings-tabs-ico { font-size: 14px; line-height: 1; }
@media (max-width: 600px) {
  .settings-tabs-item { padding: 8px 10px; font-size: 12px; }
}

/* =====================================================================
   Checkout (klient) — wybór sposobu płatności przed zapisem na slot
   ===================================================================== */
.checkout-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 640px;
  margin: 0 auto;
}
.checkout-summary {
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(176,245,128,0.10), rgba(0,77,255,0.04));
  border: 1.5px solid var(--border, rgba(15, 23, 42, 0.10));
  border-radius: 14px;
}
.checkout-summary-eyebrow {
  font-family: var(--mono, monospace);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
  margin-bottom: 10px;
}
.checkout-summary-row {
  font-size: 14px;
  line-height: 1.55;
  color: var(--dark, #0b1640);
}
.checkout-summary-row strong { font-weight: 700; }
.checkout-summary-price {
  font-family: var(--display, var(--body));
  font-weight: 900;
  font-size: 18px;
  color: var(--secondary, #004dff);
}
.checkout-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.checkout-options-eyebrow {
  font-family: var(--mono, monospace);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
  margin-bottom: 4px;
}
.checkout-option { margin: 0; }
.checkout-option-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--border, rgba(15, 23, 42, 0.12));
  border-radius: 14px;
  background: var(--surface, #fff);
  cursor: pointer;
  text-align: left;
  font-family: var(--body, system-ui, sans-serif);
  transition: border-color .15s, background .15s, transform .15s;
}
.checkout-option-btn:hover {
  border-color: var(--secondary, #004dff);
  background: rgba(0, 77, 255, 0.03);
  transform: translateY(-1px);
}
.checkout-option-btn--primary {
  border-color: var(--primary, #b0f580);
  background: rgba(176, 245, 128, 0.10);
}
.checkout-option-btn--primary:hover {
  border-color: var(--primary, #b0f580);
  background: rgba(176, 245, 128, 0.18);
}
.checkout-option-ico {
  font-size: 28px;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
}
.checkout-option-body {
  flex: 1;
  min-width: 0;
}
.checkout-option-title {
  display: block;
  font-weight: 800;
  font-size: 14px;
  color: var(--dark, #0b1640);
  letter-spacing: -0.005em;
}
.checkout-option-sub {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted, #6b7280);
  line-height: 1.45;
}
.checkout-option-cta {
  flex-shrink: 0;
  font-family: var(--mono, monospace);
  font-size: 11px;
  font-weight: 700;
  color: var(--secondary, #004dff);
  letter-spacing: 0.04em;
}
.checkout-no-pass, .checkout-no-price {
  padding: 12px 14px;
  background: rgba(251, 146, 60, 0.08);
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: 10px;
  font-size: 13px;
  color: var(--dark);
  line-height: 1.5;
}
.checkout-actions {
  margin-top: 8px;
  display: flex;
  justify-content: center;
}

/* =====================================================================
   Success overlay (po zapisie na sesję / po opłaceniu)
   ===================================================================== */
.pt-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 9800;
  background: rgba(9, 18, 50, 0.55);
  display: grid;
  place-items: center;
  padding: 20px;
  animation: ptFadeIn .25s ease;
}
.pt-success-overlay.is-leaving { animation: ptFadeOut .35s ease forwards; }
.pt-success-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface, #fff);
  border-radius: 18px;
  padding: 28px 26px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(9, 18, 50, 0.35);
  animation: ptZoomIn .3s cubic-bezier(.4,0,.2,1);
}
.pt-success-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 14px;
}
.pt-success-title {
  font-family: var(--display, var(--body));
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--dark, #0b1640);
  margin-bottom: 8px;
}
.pt-success-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text, #1f2937);
  margin-bottom: 18px;
}
.pt-success-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pt-success-actions .btn { width: 100%; }
@keyframes ptFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ptFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes ptZoomIn {
  from { opacity: 0; transform: scale(.92) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Buy-pass modal radio + payment methods admin form */
.buy-pass-method {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 12px;
  cursor: pointer;
}
.buy-pass-method:has(input:checked) {
  border-color: var(--secondary, #004dff);
  background: rgba(0, 77, 255, 0.05);
}

.pass-create-payment-methods {
  padding: 12px;
  background: rgba(0, 77, 255, 0.03);
  border: 1px dashed var(--border);
  border-radius: 10px;
}
.pass-create-payment-methods-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.pass-create-payment-methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 6px;
}
.pass-create-payment-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--dark);
  transition: border-color .15s, background .15s;
}
.pass-create-payment-pill:has(input:checked) {
  border-color: var(--secondary, #004dff);
  background: rgba(0, 77, 255, 0.06);
}
.pass-create-payment-pill input { width: 16px; height: 16px; cursor: pointer; }
.pass-create-payment-methods-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* Legacy (deprecated): hidden mode-switcher — zachowane na wypadek istnienia w cache. */
.slot-mode-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 16px 4px;
}
.slot-mode-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--border, rgba(15, 23, 42, 0.10));
  border-radius: 12px;
  background: var(--surface, #fff);
  cursor: pointer;
  text-align: left;
  font-family: var(--body, system-ui, sans-serif);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  min-width: 0;
}
.slot-mode-tab:hover {
  border-color: var(--secondary, #004dff);
  background: rgba(0, 77, 255, 0.04);
}
.slot-mode-tab.is-active {
  border-color: var(--secondary, #004dff);
  background: rgba(0, 77, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(0, 77, 255, 0.10);
}
.slot-mode-tab-ico {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}
.slot-mode-tab-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.slot-mode-tab-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--dark, #0b1640);
  letter-spacing: -0.01em;
  white-space: normal;
  line-height: 1.2;
}
.slot-mode-tab-sub {
  font-family: var(--mono, monospace);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--muted, #6b7280);
  text-transform: uppercase;
  white-space: normal;
  line-height: 1.3;
  margin-top: 2px;
}
@media (max-width: 480px) {
  .slot-mode-switcher {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* Sterowanie widocznością pól wg trybu modalu — JS dodaje data-active-mode na #slotModeSwitcher,
   a poszczególne wiersze formularza dostają data-show-mode="availability,client" i widoczność jest
   kontrolowana przez ten wzorzec. */
[data-active-mode="availability"] [data-show-mode]:not([data-show-mode~="availability"]),
[data-active-mode="client"] [data-show-mode]:not([data-show-mode~="client"]),
[data-active-mode="bulk"] [data-show-mode]:not([data-show-mode~="bulk"]) {
  display: none !important;
}

/* Source-of-payment radio cards */
.pay-source {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  grid-column: 1 / -1;
}
.pay-source-card {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1.5px solid var(--border, rgba(15, 23, 42, 0.10));
  border-radius: 12px;
  background: var(--surface, #fff);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.pay-source-card:hover { border-color: var(--secondary, #004dff); }
.pay-source-card input[type="radio"] {
  margin: 0;
  flex-shrink: 0;
}
.pay-source-card.is-checked {
  border-color: var(--secondary, #004dff);
  background: rgba(0, 77, 255, 0.05);
}
.pay-source-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pay-source-card-title {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.3;
  word-break: break-word;
}
.pay-source-card-sub {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
  letter-spacing: 0.02em;
  line-height: 1.35;
  word-break: break-word;
}
.pay-source-card.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.02);
}
.pay-source-card.is-disabled .pay-source-card-title,
.pay-source-card.is-disabled .pay-source-card-sub {
  color: var(--muted, #6b7280);
}

/* =====================================================================
   Private pass — kompaktowy panel w widoku klienta (trainer)
   ===================================================================== */
.private-pass-panel .panel-header {
  align-items: center;
}
.private-pass-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.private-pass-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(15, 23, 42, 0.08));
  border-radius: 10px;
}
.private-pass-row-main { flex: 1; min-width: 0; }
.private-pass-row-name {
  font-family: var(--body);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--dark);
  letter-spacing: -0.005em;
}
.private-pass-row-meta {
  margin-top: 2px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.private-pass-row-meta strong { color: var(--dark); font-weight: 700; }
.private-pass-row-action { margin: 0; flex-shrink: 0; }
.btn-icon-ghost {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.btn-icon-ghost:hover { background: rgba(15, 23, 42, 0.05); color: var(--error, #dc2626); }
.btn-icon-ghost svg { width: 16px; height: 16px; }

/* Collapsed form (details/summary pattern) */
.private-pass-form-toggle {
  border: 1.5px dashed var(--border, rgba(15, 23, 42, 0.12));
  border-radius: 12px;
  padding: 0;
  transition: border-color .15s ease, background .15s ease;
}
.private-pass-form-toggle[open] {
  background: rgba(176, 245, 128, 0.04);
  border-style: solid;
  border-color: var(--border, rgba(15, 23, 42, 0.12));
}
.private-pass-form-toggle > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  user-select: none;
}
.private-pass-form-toggle > summary::-webkit-details-marker,
.private-pass-form-toggle > summary::marker { display: none; content: ''; }
.private-pass-form-toggle-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.005em;
}
.private-pass-form-toggle-cta > span[aria-hidden="true"] {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary, #b0f580);
  color: var(--dark);
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  transition: transform .2s ease;
}
.private-pass-form-toggle[open] > summary .private-pass-form-toggle-cta > span[aria-hidden="true"] {
  transform: rotate(45deg); /* + → × */
}
.private-pass-form-toggle-hint {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--muted);
  text-transform: uppercase;
}

.private-pass-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 4px 14px 14px;
}
.private-pass-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.private-pass-field--full { grid-column: 1 / -1; }
.private-pass-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.private-pass-field input,
.private-pass-field textarea {
  padding: 9px 11px;
  border: 1.5px solid var(--border, rgba(15, 23, 42, 0.10));
  border-radius: 10px;
  background: var(--surface, #fff);
  font-family: var(--body);
  font-size: 13px;
  color: var(--dark);
  width: 100%;
  box-sizing: border-box;
}
.private-pass-field textarea { resize: vertical; min-height: 56px; }
.private-pass-field input:focus,
.private-pass-field textarea:focus {
  outline: none;
  border-color: var(--secondary, #004dff);
}
.private-pass-checkbox {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text);
  padding: 4px 0;
}
.private-pass-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
}
.private-pass-actions-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  flex: 1;
  min-width: 200px;
}

@media (max-width: 700px) {
  .private-pass-form { grid-template-columns: 1fr 1fr; }
  .private-pass-row { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .private-pass-form { grid-template-columns: 1fr; }
}
