:root {
  --club-primary:#0b2447;
  --club-accent:#b91c1c;
  --ink:#172033;
  --muted:#687287;
  --line:rgba(15, 23, 42, .08);
  --card:#ffffff;
  --soft:#f6f8fc;
}

* { box-sizing: border-box; }
body {
  min-height:100vh;
  background:
    radial-gradient(circle at top left, rgba(185, 28, 28, .12), transparent 34rem),
    radial-gradient(circle at top right, rgba(11, 36, 71, .16), transparent 38rem),
    #f5f7fb;
  color:var(--ink);
}
a { text-decoration:none; }

.auth-shell .auth-main { min-height:100vh; display:flex; align-items:center; }
.auth-shell .card { border:0; border-radius:24px; box-shadow:0 24px 70px rgba(15, 23, 42, .14); }

.premium-layout { min-height:100vh; display:flex; }
.premium-sidebar {
  position:sticky;
  top:0;
  width:292px;
  height:100vh;
  padding:22px 18px;
  overflow-y:auto;
  color:#fff;
  background:
    linear-gradient(160deg, rgba(255,255,255,.08), transparent 28%),
    linear-gradient(180deg, var(--club-primary), #061426 78%);
  box-shadow:22px 0 55px rgba(5, 15, 30, .22);
  z-index:10;
}
.premium-content { flex:1; min-width:0; }

.brand-card {
  display:flex;
  align-items:center;
  gap:14px;
  padding:13px 14px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:22px;
  color:#fff;
  background:rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
  box-shadow:0 18px 36px rgba(0,0,0,.16);
}
.brand-card:hover { color:#fff; background:rgba(255,255,255,.12); }
.brand-logo {
  width:62px;
  height:62px;
  min-width:62px;
  border-radius:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(245,247,250,.96));
  color:var(--club-primary);
  overflow:hidden;
  flex:0 0 auto;
  font-weight:800;
  font-size:1.4rem;
  box-shadow:inset 0 0 0 1px rgba(11, 36, 71, .05), 0 10px 18px rgba(0,0,0,.12);
}
.brand-logo.has-image { padding:7px; }
.brand-logo img {
  width:auto;
  height:auto;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  object-position:center;
  display:block;
  filter:drop-shadow(0 4px 10px rgba(11, 36, 71, .08));
}
.brand-copy {
  min-width:0;
  display:block;
  flex:1 1 auto;
}
.brand-card strong {
  display:block;
  font-size:1.08rem;
  line-height:1.08;
  letter-spacing:-0.01em;
}
.brand-card small {
  display:block;
  max-width:180px;
  color:rgba(255,255,255,.74);
  line-height:1.25;
  margin-top:4px;
}

.side-nav { margin-top:22px; }
.side-section {
  margin:22px 10px 8px;
  color:rgba(255,255,255,.48);
  font-size:.72rem;
  letter-spacing:.12em;
  text-transform:uppercase;
  font-weight:700;
}
.side-link {
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:15px;
  color:rgba(255,255,255,.78);
  font-weight:600;
  margin:2px 0;
  transition:.16s ease;
}
.side-link span { width:24px; text-align:center; filter:saturate(.92); }
.side-link:hover { color:#fff; background:rgba(255,255,255,.08); transform:translateX(2px); }
.side-link.active {
  color:#fff;
  background:linear-gradient(135deg, var(--club-accent), #e04444);
  box-shadow:0 12px 26px rgba(185, 28, 28, .34);
}

.premium-topbar {
  position:sticky;
  top:0;
  z-index:8;
  min-height:78px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 28px;
  border-bottom:1px solid rgba(15,23,42,.07);
  background:rgba(245, 247, 251, .78);
  backdrop-filter: blur(16px);
}
.topbar-kicker { color:var(--muted); font-size:.78rem; text-transform:uppercase; letter-spacing:.12em; font-weight:800; }
.topbar-title { font-size:1.18rem; font-weight:800; color:var(--ink); }
.topbar-user {
  display:flex;
  align-items:center;
  gap:12px;
  padding:8px 10px 8px 14px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  box-shadow:0 12px 28px rgba(15,23,42,.06);
  font-weight:700;
}
.topbar-user a {
  padding:6px 11px;
  border-radius:999px;
  color:#fff;
  background:var(--club-primary);
  font-size:.85rem;
}

.card, .premium-card {
  border:1px solid rgba(15, 23, 42, .06) !important;
  border-radius:22px !important;
  background:rgba(255,255,255,.92);
  box-shadow:0 18px 45px rgba(15, 23, 42, .07);
}
.card-header {
  border-bottom:1px solid var(--line);
  background:linear-gradient(180deg, rgba(255,255,255,.9), rgba(248,250,252,.9));
  border-radius:22px 22px 0 0 !important;
}
.page-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:22px 24px;
}
.eyebrow {
  color:var(--club-accent);
  font-size:.76rem;
  letter-spacing:.12em;
  text-transform:uppercase;
  font-weight:900;
}
.text-muted { color:var(--muted) !important; }

.btn { border-radius:13px; font-weight:700; }
.btn-primary, .btn-premium {
  border-color:var(--club-primary) !important;
  background:linear-gradient(135deg, var(--club-primary), #123d75) !important;
  color:#fff !important;
  box-shadow:0 12px 24px rgba(11, 36, 71, .18);
}
.btn-danger {
  border-color:var(--club-accent) !important;
  background:linear-gradient(135deg, var(--club-accent), #e04444) !important;
}
.btn-outline-primary { color:var(--club-primary); border-color:rgba(11,36,71,.32); }
.btn-outline-primary:hover { background:var(--club-primary); border-color:var(--club-primary); }
.form-control, .form-select {
  border-radius:13px;
  border-color:rgba(15, 23, 42, .12);
  min-height:42px;
}
.form-control:focus, .form-select:focus {
  border-color:rgba(11, 36, 71, .45);
  box-shadow:0 0 0 .22rem rgba(11, 36, 71, .11);
}
.form-control-color { height:46px; padding:6px; }

.table, table { background:white; }
.table { --bs-table-striped-bg: rgba(15, 23, 42, .025); }
.table thead th {
  color:#475569;
  font-size:.78rem;
  letter-spacing:.04em;
  text-transform:uppercase;
  background:#f8fafc;
  border-bottom:1px solid var(--line);
}
.table td, .table th { vertical-align:middle; }
.badge { white-space: nowrap; border-radius:999px; padding:.45em .7em; }
.alert { border:0; border-radius:18px; }

.kpi strong { font-size:1.6rem; }
.transactions-table { font-size: .88rem; table-layout: auto; }
.transactions-table .col-date { width: 96px; min-width: 96px; white-space: nowrap; }
.transactions-table .col-title { max-width: 360px; white-space: normal; word-break: break-word; }
.transactions-table .col-contractor { max-width: 220px; white-space: normal; word-break: break-word; }
.transactions-table-wrap { overflow-x: auto; }

.logo-preview {
  height:190px;
  border:1px dashed rgba(15, 23, 42, .2);
  border-radius:22px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg, rgba(11, 36, 71, .06), rgba(185, 28, 28, .06));
}
.logo-preview img { max-width:85%; max-height:160px; object-fit:contain; }
.logo-preview-empty { color:var(--muted); font-weight:800; }

@media (max-width: 991.98px) {
  .premium-layout { display:block; }
  .premium-sidebar { position:relative; width:100%; height:auto; border-radius:0 0 28px 28px; }
  .side-nav { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:4px 8px; }
  .side-section { grid-column:1 / -1; }
  .premium-topbar { position:relative; padding:14px 16px; }
}
@media (max-width: 575.98px) {
  .side-nav { grid-template-columns:1fr; }
  .premium-topbar { align-items:flex-start; flex-direction:column; }
  .topbar-user { width:100%; justify-content:space-between; }
  .page-head { display:block; }
}

@media (max-width: 575.98px) {
  .brand-logo {
    width:58px;
    height:58px;
    min-width:58px;
  }
  .brand-card small {
    max-width:none;
  }
}

/* Premium UX: operacje bankowe i szablony kont */
.premium-page-head h1 {
  font-size: clamp(1.8rem, 2.5vw, 2.7rem);
  font-weight: 900;
  letter-spacing: -.035em;
}
.tx-kpi-row .tx-kpi-card {
  min-height: 118px;
  padding: 16px 16px 14px;
  border: 1px solid rgba(15, 23, 42, .065);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.92));
  box-shadow: 0 18px 44px rgba(15, 23, 42, .07);
  position: relative;
  overflow: hidden;
}
.tx-kpi-card::after {
  content:"";
  position:absolute;
  right:-28px;
  top:-36px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(11, 36, 71, .08);
}
.tx-kpi-card.success::after { background: rgba(22, 163, 74, .13); }
.tx-kpi-card.danger::after { background: rgba(220, 38, 38, .12); }
.tx-kpi-card.warning::after { background: rgba(245, 158, 11, .16); }
.tx-kpi-card.payroll::after { background: rgba(14, 165, 233, .16); }
.tx-kpi-card span {
  display:block;
  color: var(--muted);
  font-size: .77rem;
  text-transform: uppercase;
  letter-spacing: .095em;
  font-weight: 900;
}
.tx-kpi-card strong {
  display:block;
  margin-top: 8px;
  font-size: clamp(1.06rem, 1.35vw, 1.42rem);
  line-height: 1.05;
  letter-spacing: -.025em;
  color: var(--ink);
  position:relative;
  z-index:1;
}
.tx-kpi-card.success strong { color: #15803d; }
.tx-kpi-card.danger strong { color: #b91c1c; }
.tx-kpi-card.warning strong { color: #a16207; }
.tx-kpi-card small {
  display:block;
  margin-top: 8px;
  color: var(--muted);
  position:relative;
  z-index:1;
}
.tx-workspace,
.tx-filter-card,
.tx-mini-panel,
.tx-details-card,
.tx-template-card,
.tx-empty-state {
  border: 1px solid rgba(15, 23, 42, .065);
  border-radius: 26px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .065);
}
.tx-filter-card { padding: 20px; }
.tx-quick-actions {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.tx-chip {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 12px;
  border-radius:999px;
  background: rgba(11, 36, 71, .07);
  color: var(--club-primary);
  font-size:.86rem;
  font-weight:800;
  border:1px solid rgba(11,36,71,.08);
}
.tx-chip:hover { background: var(--club-primary); color:#fff; }
.tx-chip.muted { background: #f1f5f9; color:#64748b; }
.tx-details {
  padding: 12px 14px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid rgba(15,23,42,.06);
}
.tx-details summary,
.tx-details-card summary {
  cursor:pointer;
  font-weight:900;
  color: var(--club-primary);
}
.tx-details-card { padding: 16px 18px; }
.tx-mini-panel {
  padding: 18px;
}
.tx-rule-strip {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.tx-rule-pill {
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:14px;
  background:#f8fafc;
  border:1px solid rgba(15,23,42,.06);
  font-size:.86rem;
}
.tx-table-card .card-header,
.tx-selected-template .card-header,
.tx-candidates-card .card-header {
  padding: 18px 20px;
}
.tx-smart-table thead th {
  padding: 14px 16px;
  font-size: .75rem;
}
.tx-smart-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(15,23,42,.055);
}
.tx-smart-table tbody tr:hover {
  background: rgba(11, 36, 71, .025);
}
.tx-row-warning {
  background: rgba(245, 158, 11, .045);
}
.tx-operation-cell { min-width: 320px; }
.tx-badges {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  max-width: 520px;
}
.tx-badge,
.tx-badges .badge {
  font-weight:800;
  letter-spacing: .005em;
}
.tx-template-grid {
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.tx-template-card {
  padding: 18px;
  display:flex;
  flex-direction:column;
  gap: 14px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.tx-template-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 58px rgba(15, 23, 42, .10);
}
.tx-template-card.active {
  border-color: rgba(11, 36, 71, .35);
  box-shadow: 0 22px 60px rgba(11, 36, 71, .14);
}
.tx-template-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.tx-template-type {
  color: var(--club-accent);
  font-size:.72rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.12em;
}
.tx-template-card h3 {
  margin: 4px 0 0;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -.015em;
}
.tx-template-account {
  padding: 10px 12px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid rgba(15,23,42,.06);
  overflow:hidden;
  text-overflow:ellipsis;
}
.tx-rule-list {
  display:flex;
  flex-direction:column;
  gap: 5px;
  color: #475569;
  font-size: .88rem;
}
.tx-template-meta {
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
.tx-template-meta span,
.tx-rule-list span {
  padding: 6px 9px;
  border-radius: 12px;
  background:#f8fafc;
  border:1px solid rgba(15,23,42,.055);
}
.tx-template-stats {
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:8px;
}
.tx-template-stats div {
  padding:10px;
  border-radius:16px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border:1px solid rgba(15,23,42,.055);
}
.tx-template-stats strong {
  display:block;
  font-size:1rem;
  line-height:1.05;
}
.tx-template-stats small {
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:.74rem;
}
.tx-template-actions {
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:auto;
}
.tx-empty-state {
  grid-column: 1 / -1;
  padding: 34px;
  text-align:center;
  color: var(--muted);
  font-weight:800;
}
@media (max-width: 1399.98px) {
  .tx-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  .tx-template-grid { grid-template-columns: 1fr; }
  .tx-operation-cell { min-width: 240px; }
  .tx-smart-table tbody td,
  .tx-smart-table thead th { padding: 12px; }
}


/* === Premium polish for remaining modules: rates, leagues, grants, budgets, users, exports === */
.premium-main > h1:first-child,
.premium-main > h1.h3:first-child {
  margin: 0 0 18px;
  padding: 22px 24px;
  border-radius: 26px;
  color: #101827;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,252,.90)),
    radial-gradient(circle at top right, rgba(185,28,28,.10), transparent 18rem);
  border: 1px solid rgba(15,23,42,.065);
  box-shadow: 0 18px 45px rgba(15,23,42,.07);
  font-size: clamp(1.45rem, 1.1vw + 1.05rem, 2.05rem);
  font-weight: 900;
  letter-spacing: -.035em;
}

.premium-main > .d-flex.justify-content-between,
.premium-main > .d-flex.justify-content-between.align-items-center,
.premium-main > .d-flex.justify-content-between.align-items-start,
.premium-main > .d-flex.justify-content-between.align-items-md-center {
  margin-bottom: 22px !important;
  padding: 22px 24px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,252,.91)),
    radial-gradient(circle at top right, rgba(11,36,71,.10), transparent 18rem);
  border: 1px solid rgba(15,23,42,.065);
  box-shadow: 0 18px 45px rgba(15,23,42,.07);
}

.premium-main > .d-flex h1,
.premium-main .page-head h1 {
  margin-bottom: 4px !important;
  font-size: clamp(1.45rem, 1.1vw + 1.05rem, 2.05rem);
  font-weight: 900;
  letter-spacing: -.035em;
}

.premium-main > .d-flex p,
.premium-main .page-head p {
  max-width: 860px;
}

.premium-main > .alert {
  border-radius: 22px;
  padding: 15px 18px;
  box-shadow: 0 12px 28px rgba(15,23,42,.045);
}

.premium-main .alert-info {
  color: #12345b;
  background:
    linear-gradient(135deg, rgba(11,36,71,.075), rgba(255,255,255,.95));
  border: 1px solid rgba(11,36,71,.10);
}

.premium-main .alert-warning {
  background:
    linear-gradient(135deg, rgba(245,158,11,.12), rgba(255,255,255,.95));
  border: 1px solid rgba(245,158,11,.18);
}

.premium-main .alert-success {
  background:
    linear-gradient(135deg, rgba(22,163,74,.11), rgba(255,255,255,.95));
  border: 1px solid rgba(22,163,74,.15);
}

.premium-main .alert-danger {
  background:
    linear-gradient(135deg, rgba(220,38,38,.10), rgba(255,255,255,.95));
  border: 1px solid rgba(220,38,38,.14);
}

/* Forms */
.premium-main label,
.premium-main .form-label {
  margin-bottom: 6px;
  color: #344157;
  font-size: .82rem;
  font-weight: 800;
}

.premium-main form.card,
.premium-main .card.card-body {
  overflow: hidden;
}

.premium-main form.card::before,
.premium-main .card.card-body::before {
  content: "";
  display: block;
  height: 4px;
  margin: -1rem -1rem 1rem;
  background: linear-gradient(90deg, var(--club-primary), var(--club-accent));
  opacity: .9;
}

.premium-main .card .card-body form .row,
.premium-main form.card .row {
  row-gap: .55rem;
}

.premium-main textarea.form-control {
  min-height: 112px;
}

/* Tables and lists */
.premium-main .table-responsive,
.premium-main .card .table-responsive {
  border-radius: 0 0 22px 22px;
}

.premium-main .card > .table-responsive:first-child,
.premium-main .card > .table:first-child {
  border-radius: 22px;
  overflow: hidden;
}

.premium-main .table tbody tr {
  transition: background-color .12s ease, transform .12s ease;
}

.premium-main .table tbody tr:hover {
  background-color: rgba(11,36,71,.035);
}

.premium-main .table td:first-child,
.premium-main .table th:first-child {
  padding-left: 18px;
}

.premium-main .table td:last-child,
.premium-main .table th:last-child {
  padding-right: 18px;
}

.premium-main .table .btn,
.premium-main .card .btn-sm {
  border-radius: 11px;
  font-weight: 800;
}

/* Two-column admin pages */
.premium-main .row.g-3 > .col-lg-4 > .card,
.premium-main .row.g-4 > .col-lg-5 > .card,
.premium-main .row.g-4 > .col-lg-4 > .card {
  position: sticky;
  top: 98px;
}

.premium-main .row.g-3 > .col-lg-4 .card h2,
.premium-main .row.g-4 > .col-lg-5 .card h2,
.premium-main .row.g-3 > .col-lg-4 .card .h5,
.premium-main .row.g-4 > .col-lg-5 .card .h5,
.premium-main .card-header strong {
  font-size: .98rem;
  font-weight: 900;
  color: #111827;
  letter-spacing: -.01em;
}

/* Small KPI cards used in league/rate views */
.metric-card,
.premium-main .kpi,
.premium-main .list-group-item {
  border-radius: 18px !important;
  border: 1px solid rgba(15,23,42,.065) !important;
  box-shadow: 0 10px 24px rgba(15,23,42,.045);
}

.premium-main .list-group {
  gap: 8px;
}

.premium-main .list-group-item {
  margin-bottom: 8px;
}

.premium-main .bg-light {
  background: #f8fafc !important;
}

.premium-main .shadow-sm {
  box-shadow: 0 18px 45px rgba(15,23,42,.07) !important;
}

/* Edit/detail pages */
.premium-main > form.card.card-body,
.premium-main > form.card {
  max-width: 1280px;
}

.premium-main .card + .card,
.premium-main .alert + .card {
  margin-top: 18px;
}

/* League detail: neutralize old blue-only styling and align with club palette */
.league-hero {
  background:
    linear-gradient(135deg, rgba(11,36,71,.08), rgba(185,28,28,.045)) !important;
  border-color: rgba(15,23,42,.08) !important;
  border-radius: 26px !important;
  box-shadow: 0 18px 45px rgba(15,23,42,.07);
}

.metric-card {
  border-left-color: var(--club-accent) !important;
}

/* Action bars */
.premium-main .d-flex.gap-2,
.premium-main .d-flex.gap-3 {
  flex-wrap: wrap;
}

.premium-main .btn-secondary {
  border-color: rgba(15,23,42,.16);
  background: #64748b;
}

.premium-main .btn-outline-secondary {
  color: #475569;
  border-color: rgba(71,85,105,.24);
  background: rgba(255,255,255,.7);
}

.premium-main .btn-outline-secondary:hover {
  color: #fff;
  border-color: #475569;
  background: #475569;
}

/* Compact premium cards for generic modules */
.premium-module-grid {
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.premium-mini-card {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(15,23,42,.065);
  box-shadow: 0 16px 34px rgba(15,23,42,.06);
}

.premium-mini-card small {
  display:block;
  color: var(--muted);
  font-weight: 800;
}

.premium-mini-card strong {
  display:block;
  margin-top: 6px;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -.03em;
}

/* Login also follows premium design */
.auth-main .card h1 {
  font-weight: 900;
  letter-spacing: -.03em;
}

.auth-main .btn-primary {
  width: 100%;
  min-height: 46px;
}

@media (max-width: 1199.98px) {
  .premium-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
  .premium-main .row.g-3 > .col-lg-4 > .card,
  .premium-main .row.g-4 > .col-lg-5 > .card,
  .premium-main .row.g-4 > .col-lg-4 > .card {
    position: static;
  }
}

@media (max-width: 767.98px) {
  .premium-main > .d-flex.justify-content-between,
  .premium-main > .d-flex.justify-content-between.align-items-center,
  .premium-main > .d-flex.justify-content-between.align-items-start,
  .premium-main > .d-flex.justify-content-between.align-items-md-center,
  .premium-main > h1:first-child,
  .premium-main > h1.h3:first-child {
    padding: 18px;
    border-radius: 22px;
  }
  .premium-module-grid { grid-template-columns: 1fr; }
  .premium-main .table td:first-child,
  .premium-main .table th:first-child { padding-left: 12px; }
  .premium-main .table td:last-child,
  .premium-main .table th:last-child { padding-right: 12px; }
}



/* === Przywrócenie wcześniejszego, mocniejszego wyglądu pulpitu === */
/* Premium dashboard */
.dashboard-hero {
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:24px;
  padding:28px;
  border-radius:28px;
  color:#fff;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.18), transparent 24rem),
    linear-gradient(135deg, var(--club-primary), #07162a 72%);
  box-shadow:0 24px 60px rgba(11, 36, 71, .2);
}
.dashboard-hero h1 { margin:5px 0 7px; font-size:clamp(2rem, 3vw, 3.1rem); font-weight:900; letter-spacing:-.04em; }
.dashboard-hero p { margin:0; color:rgba(255,255,255,.72); max-width:720px; font-size:1.02rem; }
.dashboard-hero .eyebrow { color:rgba(255,255,255,.64); }
.dashboard-hero-actions { display:flex; gap:10px; flex-wrap:wrap; }
.dashboard-hero-actions .btn-outline-primary { color:#fff; border-color:rgba(255,255,255,.34); background:rgba(255,255,255,.08); }
.dashboard-hero-actions .btn-outline-primary:hover { background:#fff; color:var(--club-primary); }

.dashboard-kpi-grid {
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:18px;
}
.dashboard-kpi-card {
  position:relative;
  overflow:hidden;
  min-height:170px;
  padding:24px;
  border:1px solid rgba(15, 23, 42, .06);
  border-radius:28px;
  background:#fff;
  box-shadow:0 20px 50px rgba(15, 23, 42, .075);
}
.dashboard-kpi-card:before {
  content:"";
  position:absolute;
  right:-34px;
  top:-40px;
  width:128px;
  height:128px;
  border-radius:999px;
  background:rgba(11, 36, 71, .08);
}
.dashboard-kpi-card .kpi-label { color:var(--muted); font-weight:800; text-transform:uppercase; letter-spacing:.08em; font-size:.76rem; }
.dashboard-kpi-card strong { display:block; margin:16px 0 8px; font-size:clamp(1.65rem, 2.3vw, 2.55rem); line-height:1; letter-spacing:-.04em; }
.dashboard-kpi-card span { color:var(--muted); font-weight:600; }
.dashboard-kpi-card.kpi-income:before { background:rgba(22, 163, 74, .12); }
.dashboard-kpi-card.kpi-expense:before { background:rgba(185, 28, 28, .12); }
.dashboard-kpi-card.kpi-balance:before { background:rgba(37, 99, 235, .12); }
.dashboard-kpi-card.kpi-warning:before { background:rgba(245, 158, 11, .16); }

.dashboard-card { padding:0; overflow:hidden; }
.dashboard-card-head {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  padding:24px 26px;
  border-bottom:1px solid var(--line);
}
.dashboard-card-head.compact { padding-bottom:18px; }
.dashboard-card-head h2 { margin:4px 0 0; font-size:1.25rem; font-weight:900; letter-spacing:-.025em; }
.dashboard-big-number { font-size:1.6rem; font-weight:900; color:var(--club-primary); white-space:nowrap; }
.dashboard-plan-grid {
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:14px;
  padding:24px 26px 0;
}
.plan-tile {
  padding:18px;
  border-radius:22px;
  background:linear-gradient(180deg, #f8fafc, #fff);
  border:1px solid var(--line);
}
.plan-tile span { display:block; color:var(--muted); font-weight:800; font-size:.78rem; text-transform:uppercase; letter-spacing:.06em; }
.plan-tile strong { display:block; margin:9px 0 4px; font-size:1.25rem; color:var(--ink); }
.plan-tile small { color:var(--muted); font-weight:600; }
.dashboard-progress { padding:0 26px 26px; }
.dashboard-progress .progress { height:12px; border-radius:999px; background:#e8edf5; }
.dashboard-progress .progress-bar { border-radius:999px; background:linear-gradient(90deg, var(--club-primary), var(--club-accent)); }

.dashboard-pie-wrap { display:grid; place-items:center; padding:20px 20px 8px; }
.dashboard-pie {
  width:220px;
  height:220px;
  border-radius:50%;
  display:grid;
  place-items:center;
  position:relative;
  box-shadow:inset 0 0 0 1px rgba(15, 23, 42, .08), 0 22px 45px rgba(15,23,42,.11);
}
.dashboard-pie:after {
  content:"";
  position:absolute;
  width:118px;
  height:118px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 8px 25px rgba(15,23,42,.08);
}
.dashboard-pie span {
  position:relative;
  z-index:1;
  max-width:102px;
  text-align:center;
  font-size:.96rem;
  font-weight:900;
  color:var(--club-primary);
  line-height:1.1;
}
.dashboard-legend { padding:14px 26px 24px; }
.legend-row { display:grid; grid-template-columns:14px minmax(0,1fr) auto; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid rgba(15, 23, 42, .06); }
.legend-row:last-child { border-bottom:0; }
.legend-row i { width:12px; height:12px; border-radius:50%; display:block; }
.legend-row span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:700; }
.legend-row strong { color:var(--club-primary); }

.dashboard-table thead th { font-size:.72rem; }
.cashflow-list { padding:12px 24px 24px; }
.cashflow-row { display:grid; grid-template-columns:90px minmax(0,1fr) 120px; gap:14px; align-items:center; padding:12px 0; border-bottom:1px solid rgba(15, 23, 42, .06); }
.cashflow-row:last-child { border-bottom:0; }
.cashflow-month small, .cashflow-values small { display:block; color:var(--muted); font-weight:700; }
.cashflow-bars { display:grid; gap:6px; }
.cashflow-bars div { height:9px; background:#eef2f7; border-radius:999px; overflow:hidden; }
.cashflow-bars span { display:block; height:100%; border-radius:999px; background:#16a34a; }
.cashflow-bars span.expense { background:var(--club-accent); }
.cashflow-values { text-align:right; }

.dashboard-list { padding:8px 24px 24px; }
.dashboard-list-row { display:flex; justify-content:space-between; gap:14px; padding:14px 0; border-bottom:1px solid rgba(15, 23, 42, .06); }
.dashboard-list-row:last-child { border-bottom:0; }
.dashboard-list-row strong { display:block; }
.dashboard-list-row small { display:block; color:var(--muted); font-weight:600; margin-top:2px; }
.dashboard-list-row span { font-weight:900; color:var(--club-primary); white-space:nowrap; }
.quality-grid { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:14px; padding:0 24px 24px; }
.quality-tile { padding:16px; border-radius:20px; border:1px solid var(--line); background:#fff; color:var(--ink); transition:.16s ease; }
.quality-tile:hover { transform:translateY(-2px); box-shadow:0 14px 30px rgba(15, 23, 42, .08); color:var(--ink); }
.quality-tile span { display:block; color:var(--muted); font-weight:800; font-size:.82rem; }
.quality-tile strong { display:block; margin-top:8px; font-size:1.8rem; line-height:1; }
.quality-tile.has-warning strong { color:var(--club-accent); }
.quality-tile.is-ok strong { color:#16a34a; }

@media (max-width: 1199.98px) {
  .dashboard-kpi-grid, .dashboard-plan-grid { grid-template-columns:repeat(2, minmax(0,1fr)); }
  .quality-grid { grid-template-columns:repeat(2, minmax(0,1fr)); }
}
@media (max-width: 767.98px) {
  .dashboard-hero { display:block; padding:22px; }
  .dashboard-hero-actions { margin-top:18px; }
  .dashboard-kpi-grid, .dashboard-plan-grid, .quality-grid { grid-template-columns:1fr; }
  .cashflow-row { grid-template-columns:1fr; }
  .cashflow-values { text-align:left; }
}


/* Dashboard must stay hero-style and not inherit generic page-head styling */
.premium-main .dashboard-hero {
  margin: 0 0 24px !important;
  padding: 28px !important;
  border-radius: 28px !important;
  color: #fff !important;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.18), transparent 24rem),
    linear-gradient(135deg, var(--club-primary), #07162a 72%) !important;
  box-shadow: 0 24px 60px rgba(11, 36, 71, .2) !important;
}
.premium-main .dashboard-hero h1 {
  margin: 5px 0 7px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #fff !important;
  font-size: clamp(2rem, 3vw, 3.1rem) !important;
  font-weight: 900 !important;
}
.premium-main .dashboard-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255,255,255,.72) !important;
}
.premium-main .dashboard-hero .eyebrow {
  color: rgba(255,255,255,.72) !important;
}
.premium-main .dashboard-kpi-card,
.premium-main .dashboard-card,
.premium-main .plan-tile {
  box-shadow: 0 20px 50px rgba(15, 23, 42, .075) !important;
}
.premium-main .dashboard-kpi-card::before,
.premium-main .dashboard-card::before,
.premium-main .plan-tile::before {
  display: initial;
  margin: 0;
}
.premium-main .dashboard-card::before,
.premium-main .plan-tile::before {
  display: none !important;
}
.premium-main .dashboard-kpi-card::before {
  display: block !important;
}
.premium-main .dashboard-card {
  border-radius: 28px !important;
}
.premium-main .dashboard-card .table td:first-child,
.premium-main .dashboard-card .table th:first-child {
  padding-left: 26px;
}
.premium-main .dashboard-card .table td:last-child,
.premium-main .dashboard-card .table th:last-child {
  padding-right: 26px;
}


/* Optional accounting period in account templates */
.template-period-box {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(15,23,42,.075);
  background:
    linear-gradient(135deg, rgba(11,36,71,.045), rgba(255,255,255,.94)),
    radial-gradient(circle at top right, rgba(185,28,28,.055), transparent 18rem);
}
.template-period-box .form-switch .form-check-input {
  width: 3rem;
  height: 1.45rem;
  cursor: pointer;
}
.template-period-box .form-check-label {
  cursor: pointer;
}
.scroll-mt-premium {
  scroll-margin-top: 96px;
}
.tx-template-card.active {
  outline: 3px solid rgba(185, 28, 28, .18);
  box-shadow: 0 24px 60px rgba(185, 28, 28, .12), 0 18px 45px rgba(15, 23, 42, .07);
}


/* Bulk assign transactions to template */
.tx-bulk-template-bar {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.tx-bulk-template-bar .form-select {
  min-width: 280px;
  max-width: 460px;
}
.tx-overwrite-label {
  display:flex;
  align-items:center;
  gap:6px;
  margin:0;
  white-space:nowrap;
}
.tx-smart-table th:first-child,
.tx-smart-table td:first-child {
  width:44px;
  text-align:center;
}
.tx-row-check,
#tx-check-all {
  width:16px;
  height:16px;
  cursor:pointer;
}
@media (max-width: 767.98px) {
  .tx-bulk-template-bar {
    width:100%;
    justify-content:stretch;
  }
  .tx-bulk-template-bar .form-select,
  .tx-bulk-template-bar .btn {
    width:100%;
    max-width:none;
  }
}

/* Auth screen – odizolowany wygląd, żeby globalne karty Bootstrapa nie psuły logowania */
.auth-shell {
  background:
    radial-gradient(circle at 14% 12%, color-mix(in srgb, var(--club-accent) 22%, transparent), transparent 24rem),
    radial-gradient(circle at 86% 16%, color-mix(in srgb, var(--club-primary) 26%, transparent), transparent 28rem),
    linear-gradient(135deg, #f4f6fb 0%, #eef2f8 48%, #f8fafc 100%);
}
.auth-shell .auth-main {
  min-height: 100vh;
  max-width: none;
  width: 100%;
  padding: 0 !important;
  display: block;
}
.login-scene {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 34px;
  overflow: hidden;
}
.login-scene::before {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(15, 23, 42, .07);
  border-radius: 34px;
  pointer-events: none;
}
.login-orbit {
  position: absolute;
  border-radius: 999px;
  filter: blur(.2px);
  opacity: .75;
}
.login-orbit-one {
  width: 420px;
  height: 420px;
  left: -170px;
  bottom: -180px;
  border: 54px solid color-mix(in srgb, var(--club-primary) 10%, transparent);
}
.login-orbit-two {
  width: 260px;
  height: 260px;
  right: -86px;
  top: 90px;
  border: 38px solid color-mix(in srgb, var(--club-accent) 12%, transparent);
}
.login-panel {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  min-height: 610px;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  border-radius: 38px;
  overflow: hidden;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .75);
  box-shadow: 0 34px 90px rgba(11, 24, 48, .18);
  backdrop-filter: blur(18px);
}
.login-hero {
  position: relative;
  padding: 46px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background:
    linear-gradient(140deg, rgba(255,255,255,.13), transparent 34%),
    radial-gradient(circle at 72% 18%, rgba(255,255,255,.18), transparent 15rem),
    linear-gradient(160deg, color-mix(in srgb, var(--club-primary) 96%, #020617), #07111f 72%);
}
.login-hero::after {
  content: "";
  position: absolute;
  right: -95px;
  bottom: -95px;
  width: 310px;
  height: 310px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--club-accent) 74%, transparent);
  box-shadow: -24px -18px 0 rgba(255,255,255,.08);
}
.login-hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 18px;
  align-items: center;
}
.login-badge-logo {
  width: 82px;
  height: 82px;
  flex: 0 0 82px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  color: var(--club-primary);
  background: linear-gradient(180deg, #fff, #edf2f7);
  box-shadow: 0 18px 34px rgba(0,0,0,.22), inset 0 0 0 1px rgba(255,255,255,.75);
  font-size: 2rem;
  font-weight: 900;
  overflow: hidden;
}
.login-badge-logo.has-image { padding: 9px; }
.login-badge-logo img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.login-eyebrow {
  color: rgba(255,255,255,.62);
  font-size: .74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .13em;
  margin-bottom: 8px;
}
.login-hero h1 {
  margin: 0;
  max-width: 390px;
  font-size: clamp(2rem, 4vw, 3.75rem);
  line-height: .96;
  letter-spacing: -.06em;
  font-weight: 950;
}
.login-lead {
  position: relative;
  z-index: 1;
  max-width: 430px;
  margin: 50px 0 auto;
  color: rgba(255,255,255,.78);
  font-size: 1.08rem;
  line-height: 1.65;
}
.login-feature-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.login-feature-grid div {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
}
.login-feature-grid strong,
.login-feature-grid span { display: block; }
.login-feature-grid strong { font-size: .96rem; }
.login-feature-grid span { margin-top: 3px; color: rgba(255,255,255,.58); font-size: .82rem; }
.login-form-card {
  padding: 54px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.82)),
    repeating-linear-gradient(135deg, rgba(15,23,42,.03) 0 1px, transparent 1px 11px);
}
.login-chip {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 18px;
  padding: 7px 12px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--club-primary) 92%, #000);
  background: color-mix(in srgb, var(--club-primary) 9%, #fff);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.login-form-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 950;
  letter-spacing: -.055em;
}
.login-form-head p {
  margin: 10px 0 30px;
  color: var(--muted);
  line-height: 1.55;
}
.login-alert { margin-bottom: 18px; }
.login-form { display: grid; gap: 18px; }
.login-field { display: grid; gap: 8px; }
.login-field span {
  color: #334155;
  font-size: .84rem;
  font-weight: 850;
}
.login-field .form-control {
  min-height: 52px;
  border-radius: 17px;
  background: rgba(248,250,252,.9);
  border: 1px solid rgba(15,23,42,.10);
  padding-left: 16px;
  font-weight: 650;
}
.login-field .form-control:focus {
  background: #fff;
  border-color: color-mix(in srgb, var(--club-primary) 45%, #fff);
  box-shadow: 0 0 0 .24rem color-mix(in srgb, var(--club-primary) 11%, transparent);
}
.login-submit {
  min-height: 56px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 19px 0 22px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--club-accent) 92%, #111827), var(--club-primary));
  box-shadow: 0 18px 34px color-mix(in srgb, var(--club-primary) 22%, transparent);
  font-weight: 900;
}
.login-submit b {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--club-primary);
  background: rgba(255,255,255,.92);
  font-size: 1.1rem;
}
.login-submit:hover { color: #fff; transform: translateY(-1px); }
.login-footnote {
  margin-top: 4px;
  padding: 13px 14px;
  border-radius: 16px;
  color: #64748b;
  background: rgba(15,23,42,.045);
  font-size: .84rem;
}
.login-footnote strong { color: #334155; }

/* Drobne korekty rozjeżdżających się widoków po zmianie wyglądu */
.premium-main { padding-left: 28px; padding-right: 28px; }
.table-responsive, .transactions-table-wrap { border-radius: 18px; }
.card-body { min-width: 0; }
.card .row { min-width: 0; }
.actions, .btn-group { flex-wrap: wrap; }
select.form-select, input.form-control { max-width: 100%; }

@media (max-width: 991.98px) {
  .login-panel { grid-template-columns: 1fr; min-height: auto; }
  .login-hero { min-height: 430px; }
  .login-form-card { padding: 40px 30px; }
  .premium-main { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 575.98px) {
  .login-scene { padding: 14px; place-items: stretch; }
  .login-scene::before { display: none; }
  .login-panel { border-radius: 28px; }
  .login-hero { padding: 28px 22px; min-height: 380px; }
  .login-hero-top { align-items: flex-start; }
  .login-badge-logo { width: 66px; height: 66px; flex-basis: 66px; border-radius: 22px; }
  .login-feature-grid { grid-template-columns: 1fr; }
  .login-form-card { padding: 30px 20px; }
}

/* === Naprawa widoku lig po odświeżeniu layoutu === */
.app-shell {
  overflow-x: hidden;
}
.premium-layout {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}
.premium-content {
  width: calc(100vw - 292px);
  max-width: calc(100vw - 292px);
  min-width: 0;
}
.premium-main {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Kafle podsumowania lig nie mogą zwężać tekstu do pojedynczych liter */
.premium-main .metrics-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 16px;
  align-items: stretch;
}
.premium-main .metrics-grid .metric-card {
  min-width: 0;
  overflow: hidden;
  border-left: 0 !important;
  border-top: 4px solid var(--club-accent) !important;
  border-radius: 22px !important;
}
.premium-main .metrics-grid .metric-card .label,
.premium-main .metrics-grid .metric-card .value,
.premium-main .metrics-grid .metric-card small {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.premium-main .metrics-grid .metric-card .label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.premium-main .metrics-grid .metric-card .value {
  white-space: nowrap;
  font-size: clamp(1.15rem, 1.5vw, 1.55rem);
}

/* Tabela lig przewija się wewnątrz karty, zamiast rozpychać całą stronę */
.premium-main .desktop-table,
.premium-main .league-table-wrap,
.premium-main .card-body.table-responsive {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.premium-main .league-table {
  min-width: 1180px;
  width: 100%;
  table-layout: auto;
}
.premium-main .league-table th,
.premium-main .league-table td {
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}
.premium-main .league-table th:nth-child(2),
.premium-main .league-table td:nth-child(2),
.premium-main .league-table th:nth-child(3),
.premium-main .league-table td:nth-child(3),
.premium-main .league-table th:nth-child(7),
.premium-main .league-table td:nth-child(7),
.premium-main .league-table th:nth-child(8),
.premium-main .league-table td:nth-child(8) {
  white-space: nowrap;
}
.premium-main .league-table .cost-pill {
  min-width: 112px;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
}
.premium-main .league-table .cost-pill small {
  white-space: nowrap;
}

@media (max-width: 991.98px) {
  .premium-content {
    width: 100%;
    max-width: 100%;
  }
}
@media (max-width: 767.98px) {
  .premium-main {
    overflow-x: hidden;
  }
  .premium-main .metrics-grid {
    grid-template-columns: 1fr;
  }
}


/* === Stabilna naprawa layoutu widoku lig: 2026-06 ===
   Poprzednie poprawki ukrywały overflow, ale nie naprawiały źródła problemu.
   Ten blok układa panel jako siatkę i izoluje szerokie elementy widoku lig. */
@media (min-width: 992px) {
  .app-shell .premium-layout {
    display: grid !important;
    grid-template-columns: 292px minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }
  .app-shell .premium-sidebar {
    width: 292px !important;
    min-width: 292px !important;
  }
  .app-shell .premium-content {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    overflow: visible !important;
  }
  .app-shell .premium-topbar,
  .app-shell .premium-main {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}

.app-shell .premium-main {
  overflow-x: clip !important;
}

.league-costs-page,
.league-costs-page * {
  min-width: 0;
}

.league-costs-page {
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.league-costs-page .league-hero {
  width: 100%;
  max-width: 100%;
}

.league-costs-page .metrics-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  max-width: 100% !important;
}

.league-costs-page .metric-card {
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  border-left: 0 !important;
  border-top: 4px solid var(--club-accent) !important;
}

.league-costs-page .metric-card .label,
.league-costs-page .metric-card .value,
.league-costs-page .metric-card small {
  display: block !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

.league-costs-page .metric-card .value {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: clamp(1.15rem, 1.45vw, 1.55rem) !important;
}

.league-costs-page .desktop-table {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
}

.league-costs-page .league-table {
  width: max-content !important;
  min-width: 1120px !important;
  max-width: none !important;
  table-layout: auto !important;
}

.league-costs-page .league-table th,
.league-costs-page .league-table td {
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  vertical-align: middle !important;
}

.league-costs-page .league-table .cost-pill {
  display: inline-block !important;
  min-width: 116px !important;
  max-width: 170px !important;
  white-space: normal !important;
  vertical-align: top !important;
}

.league-costs-page .league-table .cost-pill small {
  white-space: normal !important;
}

@media (max-width: 991.98px) {
  .app-shell .premium-layout {
    display: block !important;
    overflow: visible !important;
  }
  .app-shell .premium-content {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 767.98px) {
  .league-costs-page .desktop-table {
    display: none !important;
  }
  .league-costs-page .mobile-league-card {
    display: block !important;
  }
  .league-costs-page .metrics-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 768px) {
  .league-costs-page .mobile-league-card {
    display: none !important;
  }
}

/* === Wersja systemu i changelog === */
.app-version-pill {
  width: calc(100% - 18px);
  margin: 10px 9px 0;
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255,255,255,.86);
  background: rgba(255,255,255,.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  font-size: .78rem;
  line-height: 1;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.app-version-pill:hover {
  transform: translateY(-1px);
  color: #fff;
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.22);
}
.app-version-pill span {
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.app-version-pill small {
  color: rgba(255,255,255,.58);
  font-weight: 700;
}
.changelog-modal .modal-content {
  border: 0;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 34px 90px rgba(7, 16, 33, .28);
}
.changelog-modal .modal-header {
  padding: 24px 28px 18px;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  background:
    radial-gradient(circle at top left, rgba(185, 28, 28, .10), transparent 22rem),
    linear-gradient(135deg, #ffffff, #f5f7fb);
}
.changelog-modal .modal-kicker {
  color: var(--club-accent);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 900;
  margin-bottom: 5px;
}
.changelog-modal .modal-title {
  color: var(--ink);
  font-weight: 900;
  letter-spacing: -.03em;
}
.changelog-modal .modal-body {
  padding: 22px 28px 28px;
  background: #fff;
}
.changelog-entry {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 18px;
  position: relative;
}
.changelog-entry + .changelog-entry { margin-top: 22px; }
.changelog-version span {
  display: inline-flex;
  min-width: 74px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--club-primary), var(--club-accent));
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(11, 36, 71, .18);
}
.changelog-version small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}
.changelog-content {
  padding: 2px 0 0;
}
.changelog-content h6 {
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: -.015em;
}
.changelog-content ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.changelog-content li {
  position: relative;
  padding-left: 22px;
  color: #344054;
  line-height: 1.42;
}
.changelog-content li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--club-accent);
  box-shadow: 0 0 0 4px rgba(185, 28, 28, .09);
}
@media (max-width: 767.98px) {
  .app-version-pill { width: 100%; margin: 10px 0 0; }
  .changelog-entry { grid-template-columns: 1fr; gap: 12px; }
  .changelog-modal .modal-header,
  .changelog-modal .modal-body { padding-left: 20px; padding-right: 20px; }
}

/* === 1.08: mocniejsze wykorzystanie kolorów klubu i poprawki logowania === */
:root {
  --club-primary-soft: color-mix(in srgb, var(--club-primary) 10%, #fff);
  --club-accent-soft: color-mix(in srgb, var(--club-accent) 10%, #fff);
}
body {
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--club-accent) 13%, transparent), transparent 34rem),
    radial-gradient(circle at top right, color-mix(in srgb, var(--club-primary) 17%, transparent), transparent 38rem),
    #f5f7fb;
}
.eyebrow,
.app-version-pill small,
.card-title-accent,
.text-primary { color: var(--club-accent) !important; }
.badge.bg-primary,
.btn-primary,
.btn-premium,
.btn-success {
  border-color: var(--club-primary) !important;
  background: linear-gradient(135deg, var(--club-primary), color-mix(in srgb, var(--club-primary) 72%, #000)) !important;
  color: #fff !important;
}
.btn-outline-success,
.btn-outline-primary {
  color: var(--club-primary) !important;
  border-color: color-mix(in srgb, var(--club-primary) 38%, #fff) !important;
}
.btn-outline-success:hover,
.btn-outline-primary:hover {
  color: #fff !important;
  background: var(--club-primary) !important;
  border-color: var(--club-primary) !important;
}
.alert-success {
  color: color-mix(in srgb, var(--club-primary) 80%, #064e3b);
  background: color-mix(in srgb, var(--club-primary) 8%, #ecfdf5);
}
.login-scene { isolation: isolate; }
.login-orbit { z-index: 0; pointer-events: none; }
.login-panel { z-index: 2; }
.login-hero { overflow: hidden; }
.login-hero::after { z-index: 0; pointer-events: none; opacity: .82; }
.login-hero-top,
.login-lead,
.login-feature-grid { position: relative; z-index: 1; }
.login-form-card { position: relative; z-index: 3; }
.login-badge-logo {
  width: 96px;
  height: 96px;
  flex-basis: 96px;
  padding: 5px;
  overflow: visible;
}
.login-badge-logo.has-image { padding: 4px; }
.login-badge-logo img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}
@media (max-width: 575.98px) {
  .login-badge-logo { width: 76px; height: 76px; flex-basis: 76px; }
}

/* === 1.08 hotfix: logo na ekranie logowania === */
.login-hero-top {
  overflow: visible;
}
.login-badge-logo,
.login-badge-logo.has-image {
  width: 118px !important;
  height: 118px !important;
  flex: 0 0 118px !important;
  padding: 14px !important;
  overflow: hidden !important;
  border-radius: 30px !important;
  background: linear-gradient(180deg, #ffffff, #f4f7fb) !important;
}
.login-badge-logo img,
.login-badge-logo.has-image img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  display: block !important;
  transform: none !important;
}
@media (max-width: 575.98px) {
  .login-badge-logo,
  .login-badge-logo.has-image {
    width: 92px !important;
    height: 92px !important;
    flex-basis: 92px !important;
    padding: 11px !important;
    border-radius: 26px !important;
  }
}

/* === 1.08 hotfix 2: herb na logowaniu bez ucinania === */
.login-badge-logo,
.login-badge-logo.has-image {
  box-sizing: border-box !important;
  width: 126px !important;
  height: 126px !important;
  min-width: 126px !important;
  flex: 0 0 126px !important;
  padding: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 30px !important;
  background: linear-gradient(180deg, #ffffff, #f4f7fb) !important;
}
.login-badge-logo img,
.login-badge-logo.has-image img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 74% !important;
  max-height: 74% !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
  margin: 0 !important;
}
@media (max-width: 575.98px) {
  .login-badge-logo,
  .login-badge-logo.has-image {
    width: 102px !important;
    height: 102px !important;
    min-width: 102px !important;
    flex-basis: 102px !important;
    border-radius: 26px !important;
  }
  .login-badge-logo img,
  .login-badge-logo.has-image img {
    max-width: 72% !important;
    max-height: 72% !important;
  }
}


/* === 1.09: powiadomienia o aktualizacji i czytelniejsze menu === */
.topbar-actions {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.topbar-update-alert {
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  color:#fff !important;
  background:linear-gradient(135deg, var(--club-accent), color-mix(in srgb, var(--club-accent) 70%, #000));
  box-shadow:0 14px 30px color-mix(in srgb, var(--club-accent) 24%, transparent);
  font-weight:900;
  white-space:nowrap;
}
.topbar-update-alert small {
  padding:2px 7px;
  border-radius:999px;
  background:rgba(255,255,255,.18);
  font-size:.72rem;
}
.pulse-dot {
  width:9px;
  height:9px;
  border-radius:999px;
  background:#fff;
  box-shadow:0 0 0 0 rgba(255,255,255,.75);
  animation:updatePulse 1.45s infinite;
}
@keyframes updatePulse {
  0% { box-shadow:0 0 0 0 rgba(255,255,255,.75); }
  70% { box-shadow:0 0 0 9px rgba(255,255,255,0); }
  100% { box-shadow:0 0 0 0 rgba(255,255,255,0); }
}
.side-link,
.side-link:visited {
  color:rgba(255,255,255,.86) !important;
}
.side-link:hover,
.side-link.active,
.side-link.active:visited {
  color:#fff !important;
}
.app-version-pill,
.brand-card,
.premium-sidebar {
  --bs-link-color:#fff;
}
@media (max-width: 575.98px) {
  .topbar-actions { width:100%; justify-content:space-between; }
  .topbar-update-alert { font-size:.84rem; padding:7px 10px; }
}


/* === 1.12: poprawki pulpitu i powiadomień aktualizacji === */
.dashboard-hero-actions .btn-dashboard-compare,
.dashboard-hero-actions .btn-dashboard-compare:visited {
  color:#fff !important;
  border-color:rgba(255,255,255,.55) !important;
  background:rgba(255,255,255,.15) !important;
  box-shadow:0 12px 26px rgba(0,0,0,.12);
}
.dashboard-hero-actions .btn-dashboard-compare:hover,
.dashboard-hero-actions .btn-dashboard-compare:focus {
  color:var(--club-primary) !important;
  background:#fff !important;
  border-color:#fff !important;
}
#topbarUpdateAlert.is-hidden { display:none !important; }
.dashboard-update-check {
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:12px;
  font-size:.86rem;
  color:rgba(255,255,255,.84);
}
.dashboard-update-check .spinner {
  width:10px;
  height:10px;
  border-radius:50%;
  border:2px solid rgba(255,255,255,.36);
  border-top-color:#fff;
  animation:dashboardUpdateSpin .9s linear infinite;
}
.dashboard-update-check.is-ok .spinner { display:none; }
@keyframes dashboardUpdateSpin { to { transform:rotate(360deg); } }


/* === 1.13: pulpit — równe przyciski i spokojny status aktualizacji === */
.dashboard-hero-actions {
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-end !important;
  gap:10px !important;
  min-width:360px;
}
.dashboard-hero-links {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.dashboard-hero-actions .btn-dashboard-action,
.dashboard-hero-actions .btn-dashboard-action:visited {
  min-width:170px;
  min-height:44px;
  padding:10px 18px !important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:14px !important;
  font-weight:900;
  line-height:1.15;
  text-shadow:none;
  white-space:nowrap;
}
.dashboard-hero-actions .btn-premium.btn-dashboard-action,
.dashboard-hero-actions .btn-premium.btn-dashboard-action:visited {
  color:#fff !important;
  border:1px solid color-mix(in srgb, var(--club-accent) 70%, #fff) !important;
  background:linear-gradient(135deg, var(--club-accent), color-mix(in srgb, var(--club-accent) 68%, #020617)) !important;
  box-shadow:0 12px 26px rgba(0,0,0,.16);
}
.dashboard-hero-actions .btn-dashboard-compare,
.dashboard-hero-actions .btn-dashboard-compare:visited {
  color:#fff !important;
  border:1px solid rgba(255,255,255,.52) !important;
  background:rgba(255,255,255,.14) !important;
  box-shadow:0 12px 26px rgba(0,0,0,.12);
}
.dashboard-hero-actions .btn-premium.btn-dashboard-action:hover,
.dashboard-hero-actions .btn-premium.btn-dashboard-action:focus,
.dashboard-hero-actions .btn-dashboard-compare:hover,
.dashboard-hero-actions .btn-dashboard-compare:focus {
  color:var(--club-primary) !important;
  background:#fff !important;
  border-color:#fff !important;
}
.dashboard-update-check {
  min-height:24px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  width:100%;
  margin-top:0 !important;
  padding-right:2px;
  color:rgba(255,255,255,.72) !important;
  font-size:.84rem;
  text-align:right;
}
.dashboard-update-check.is-ok { color:rgba(255,255,255,.64) !important; }
@media (max-width: 991.98px) {
  .dashboard-hero-actions { align-items:flex-start !important; min-width:0; margin-top:18px; }
  .dashboard-hero-links { justify-content:flex-start; }
  .dashboard-update-check { justify-content:flex-start; text-align:left; }
}
@media (max-width: 575.98px) {
  .dashboard-hero-links,
  .dashboard-hero-actions .btn-dashboard-action { width:100%; }
  .dashboard-hero-actions .btn-dashboard-action { min-width:0; }
}

/* === 1.15: szybkie i masowe przypisywanie operacji === */
.tx-bulk-assign-bar {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
}
.tx-bulk-assign-bar .form-select {
  width:auto;
  min-width:150px;
}
.tx-inline-assign {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
  margin-top:6px;
}
.tx-inline-assign .form-select {
  width:auto;
  min-width:136px;
  max-width:210px;
}
.tx-inline-assign .btn {
  white-space:nowrap;
}
.tx-smart-table td:nth-child(4) {
  min-width:330px;
}
@media (max-width: 991.98px) {
  .tx-bulk-assign-bar,
  .tx-inline-assign {
    justify-content:flex-start;
  }
  .tx-bulk-assign-bar .form-select,
  .tx-inline-assign .form-select {
    width:100%;
    max-width:none;
  }
}

/* === 1.28: operacje bankowe — poprawka stylu kart i podglądu dokumentów === */
.tx-list-card {
  border: 0;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .08);
  background: transparent;
}
.tx-list-card .card-header,
.tx-list-header {
  background: rgba(255,255,255,.94) !important;
  border: 1px solid rgba(148,163,184,.20);
  border-bottom: 0;
  border-radius: 28px 28px 0 0 !important;
  padding: 18px 20px !important;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
}
.tx-card-list {
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:16px;
  background:rgba(248,250,252,.70);
  border:1px solid rgba(148,163,184,.18);
  border-top:0;
  border-radius:0 0 28px 28px;
}
.tx-list-select-all {
  padding: 0 4px 2px;
  color:#64748b;
  font-weight:800;
  font-size:.86rem;
}
.tx-transaction-card {
  display:grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap:12px;
  width:100%;
  background:#fff;
  border:1px solid rgba(148,163,184,.22);
  border-radius:22px;
  box-shadow:0 14px 36px rgba(15,23,42,.06);
  padding:14px;
}
.tx-transaction-card.is-warning {
  border-left:5px solid #f59e0b;
}
.tx-card-check {
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding-top:8px;
}
.tx-card-check .form-check-input,
.tx-row-check {
  width:18px;
  height:18px;
  cursor:pointer;
}
.tx-card-main { min-width:0; }
.tx-card-topline {
  display:grid;
  grid-template-columns: 120px minmax(0, 1fr) 150px;
  gap:14px;
  align-items:start;
}
.tx-date-block strong {
  display:block;
  font-size:1rem;
  color:#0f172a;
  white-space:nowrap;
}
.tx-date-block span,
.tx-contractor,
.tx-account-line,
.tx-info-label,
.tx-doc-summary .small {
  color:#64748b;
}
.tx-title-block { min-width:0; }
.tx-title-text {
  font-weight:900;
  color:#0f172a;
  font-size:1.02rem;
  line-height:1.25;
  overflow-wrap:anywhere;
}
.tx-contractor {
  margin-top:3px;
  line-height:1.3;
  overflow-wrap:anywhere;
}
.tx-account-line {
  margin-top:5px;
  font-size:.82rem;
}
.tx-account-line code {
  color:#db2777;
  background:#fdf2f8;
  padding:2px 6px;
  border-radius:999px;
  word-break:break-all;
}
.tx-amount-block {
  text-align:right;
  font-size:1.08rem;
  white-space:nowrap;
}
.tx-card-grid {
  display:grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(230px, .95fr) minmax(150px, .55fr);
  gap:12px;
  margin-top:13px;
}
.tx-info-box {
  min-width:0;
  border:1px solid rgba(148,163,184,.18);
  border-radius:18px;
  padding:11px 12px;
  background:linear-gradient(180deg,#fff,rgba(248,250,252,.72));
}
.tx-info-label {
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:.72rem;
  font-weight:900;
  margin-bottom:7px;
}
.tx-badges {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.tx-badge,
.tx-badges .badge {
  border-radius:999px;
  padding:6px 9px;
  font-weight:900;
  line-height:1;
}
.tx-inline-assign {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
}
.tx-inline-assign .form-select {
  min-width:150px;
  max-width:230px;
  height:38px;
  border-radius:13px;
}
.tx-doc-summary {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.tx-doc-actions,
.tx-row-actions {
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin-top:9px;
}
.tx-row-actions { justify-content:flex-start; margin-top:0; }
.tx-actions-box .tx-row-actions { margin-top:0; }
.tx-row-actions .btn,
.tx-doc-actions .btn,
.tx-inline-assign .btn {
  border-radius:999px;
  font-weight:900;
}
.tx-doc-details {
  margin-top:12px;
  border:1px dashed rgba(100,116,139,.30);
  border-radius:18px;
  padding:10px 12px;
  background:#fbfdff;
}
.tx-doc-details summary {
  cursor:pointer;
  font-weight:900;
  color:#0f172a;
}
.tx-doc-detail-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:10px;
  margin-top:10px;
}
.tx-doc-detail-card {
  border:1px solid rgba(148,163,184,.22);
  border-radius:16px;
  padding:12px;
  background:#fff;
}
.tx-doc-kv {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:7px;
  margin-top:10px;
}
.tx-doc-kv span {
  background:#f8fafc;
  border:1px solid rgba(148,163,184,.16);
  border-radius:12px;
  padding:7px 8px;
  font-size:.84rem;
  color:#334155;
}
.tx-doc-kv b {
  display:block;
  font-size:.68rem;
  text-transform:uppercase;
  letter-spacing:.07em;
  color:#94a3b8;
  margin-bottom:2px;
}
.tx-preview-modal {
  display:none;
  position:fixed;
  inset:0;
  z-index:2000;
}
.tx-preview-modal.is-open { display:block; }
.tx-preview-backdrop {
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.58);
  backdrop-filter:blur(4px);
}
.tx-preview-dialog {
  position:absolute;
  inset:4vh 4vw;
  background:#fff;
  border-radius:24px;
  box-shadow:0 32px 110px rgba(2,6,23,.40);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.tx-preview-head {
  padding:12px 14px;
  border-bottom:1px solid rgba(148,163,184,.22);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.tx-preview-dialog iframe {
  width:100%;
  height:100%;
  border:0;
  background:#f8fafc;
}
.btn-xs {
  --bs-btn-padding-y:.18rem;
  --bs-btn-padding-x:.45rem;
  --bs-btn-font-size:.76rem;
  border-radius:999px !important;
  font-weight:900 !important;
}
.tx-empty-state {
  padding:30px;
  text-align:center;
  color:#64748b;
  background:#fff;
  border-radius:20px;
  border:1px dashed rgba(148,163,184,.28);
}
@media (max-width: 1199.98px) {
  .tx-card-topline { grid-template-columns: 105px minmax(0,1fr); }
  .tx-amount-block { grid-column: 1 / -1; text-align:left; }
  .tx-card-grid { grid-template-columns: 1fr 1fr; }
  .tx-actions-box { grid-column: 1 / -1; }
}
@media (max-width: 767.98px) {
  .tx-list-header { padding:14px !important; }
  .tx-card-list { padding:10px; }
  .tx-transaction-card { grid-template-columns: 1fr; padding:12px; }
  .tx-card-check { justify-content:flex-start; padding-top:0; }
  .tx-card-topline,
  .tx-card-grid { grid-template-columns:1fr; }
  .tx-amount-block { text-align:left; }
  .tx-inline-assign .form-select,
  .tx-bulk-assign-bar .form-select { width:100%; max-width:none; }
  .tx-preview-dialog { inset:2vh 2vw; border-radius:18px; }
}


/* 1.30 - przyciski nagłówka operacji w kolorach klubu */
.tx-head-actions .btn {
  border-radius: 999px;
  font-weight: 900;
  padding: .62rem 1rem;
  box-shadow: 0 12px 26px rgba(15,23,42,.08);
}
.btn-club-primary {
  color: #fff !important;
  border-color: var(--club-primary) !important;
  background: linear-gradient(135deg, var(--club-primary), color-mix(in srgb, var(--club-primary) 72%, #000)) !important;
}
.btn-club-primary:hover,
.btn-club-primary:focus {
  color:#fff !important;
  filter: brightness(1.06);
}
.btn-club-accent {
  color: #fff !important;
  border-color: var(--club-accent) !important;
  background: linear-gradient(135deg, var(--club-accent), color-mix(in srgb, var(--club-accent) 70%, #020617)) !important;
}
.btn-club-accent:hover,
.btn-club-accent:focus {
  color:#fff !important;
  filter: brightness(1.06);
}
.btn-club-outline {
  color: var(--club-primary) !important;
  border-color: color-mix(in srgb, var(--club-primary) 34%, #fff) !important;
  background: color-mix(in srgb, var(--club-primary) 6%, #fff) !important;
}
.btn-club-outline:hover,
.btn-club-outline:focus {
  color:#fff !important;
  background: var(--club-primary) !important;
  border-color: var(--club-primary) !important;
}
.tx-kpi-card strong {
  max-width:100%;
  overflow-wrap:anywhere;
}


/* 1.32 - uporządkowana edycja operacji bankowej */
.tx-edit-page { max-width: 1440px; margin: 0 auto; }
.tx-edit-bank-card {
  border-radius: 24px;
  padding: 18px 20px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--club-primary) 10%, #fff), #fff 58%, color-mix(in srgb, var(--club-accent) 7%, #fff));
  border: 1px solid rgba(148,163,184,.24);
  box-shadow: 0 18px 42px rgba(15,23,42,.07);
  margin-bottom: 16px;
}
.tx-edit-bank-main {
  display: grid;
  grid-template-columns: 130px 150px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}
.tx-edit-label { color:#94a3b8; text-transform:uppercase; letter-spacing:.08em; font-size:.68rem; font-weight:900; margin-bottom:3px; }
.tx-edit-bank-title { min-width:0; }
.tx-edit-bank-title strong,
.tx-edit-bank-title span { display:block; overflow-wrap:anywhere; }
.tx-edit-bank-title span { color:#64748b; font-size:.9rem; margin-top:2px; }
.tx-edit-type-badge { background: var(--club-primary); color:#fff; border-radius:999px; padding:.48rem .72rem; }
.tx-edit-bank-account { margin-top: 12px; color:#64748b; font-size:.9rem; }
.tx-edit-bank-account code { color: var(--club-accent); white-space: normal; word-break: break-all; }
.tx-edit-grid { display:grid; grid-template-columns: minmax(0, 1fr) 390px; gap:16px; align-items:start; }
.tx-edit-section {
  border:1px solid rgba(148,163,184,.24);
  border-radius:24px;
  background:rgba(255,255,255,.96);
  padding:18px;
  box-shadow:0 14px 34px rgba(15,23,42,.055);
  margin-bottom:16px;
}
.tx-edit-section-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:14px; }
.tx-edit-section-head > div { display:flex; align-items:center; gap:10px; min-width:0; }
.tx-edit-section h2 { margin:0; font-size:1.05rem; font-weight:900; color:#0f172a; }
.tx-edit-section-head small { color:#94a3b8; font-weight:700; text-align:right; }
.tx-edit-step { min-width:34px; height:34px; display:inline-flex; align-items:center; justify-content:center; border-radius:12px; background:color-mix(in srgb, var(--club-primary) 10%, #fff); color:var(--club-primary); font-weight:900; font-size:.78rem; }
.tx-edit-accordion .accordion-item { border:1px solid rgba(226,232,240,.9); border-radius:16px; overflow:hidden; margin-bottom:10px; }
.tx-edit-accordion .accordion-button { font-weight:900; color:#0f172a; box-shadow:none; background:#fff; }
.tx-edit-accordion .accordion-button:not(.collapsed) { background:color-mix(in srgb, var(--club-primary) 7%, #fff); color:var(--club-primary); }
.tx-edit-sticky { position: sticky; top: 18px; }
.tx-edit-doc-list { display:grid; gap:10px; }
.tx-edit-doc-card { border:1px solid rgba(226,232,240,.9); border-radius:18px; padding:12px; background:#f8fafc; }
.tx-edit-doc-card strong { display:block; margin-top:5px; overflow-wrap:anywhere; line-height:1.2; }
.tx-edit-doc-card small { display:block; color:#64748b; margin-top:4px; }
.tx-edit-doc-actions { display:flex; gap:5px; flex-wrap:wrap; justify-content:flex-end; }
.tx-edit-doc-details { margin-top:10px; border-top:1px dashed rgba(148,163,184,.45); padding-top:8px; }
.tx-edit-doc-details summary { cursor:pointer; font-size:.86rem; font-weight:900; color:var(--club-primary); }
.tx-edit-doc-kv { display:grid; grid-template-columns: 1fr 1fr; gap:7px; margin-top:8px; }
.tx-edit-doc-kv span { background:#fff; border:1px solid rgba(226,232,240,.9); border-radius:12px; padding:7px 8px; font-size:.82rem; overflow-wrap:anywhere; }
.tx-edit-doc-kv span.full { grid-column:1 / -1; }
.tx-edit-doc-kv b { display:block; color:#94a3b8; text-transform:uppercase; letter-spacing:.06em; font-size:.64rem; }
.tx-edit-empty-doc { border:1px dashed rgba(148,163,184,.55); border-radius:18px; padding:16px; background:#f8fafc; display:grid; gap:4px; }
.tx-edit-empty-doc strong { color:#0f172a; }
.tx-edit-empty-doc span { color:#64748b; font-size:.9rem; }
.tx-edit-manual-upload { border-top:1px solid #e2e8f0; padding-top:10px; }
.tx-edit-manual-upload summary { cursor:pointer; font-weight:900; color:var(--club-primary); }
.tx-edit-template-box { border-radius:18px; padding:13px; background:color-mix(in srgb, var(--club-primary) 7%, #fff); border:1px solid color-mix(in srgb, var(--club-primary) 18%, #fff); }
.tx-edit-template-box.muted { background:#f8fafc; border-color:#e2e8f0; }
.tx-edit-template-box strong { overflow-wrap:anywhere; }
.tx-edit-savebar {
  position: sticky;
  bottom: 12px;
  z-index: 50;
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding:12px;
  border:1px solid rgba(148,163,184,.24);
  background:rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-radius:20px;
  box-shadow:0 18px 45px rgba(15,23,42,.12);
}
.min-w-0 { min-width:0; }
@media (max-width: 1180px) {
  .tx-edit-grid { grid-template-columns: 1fr; }
  .tx-edit-sticky { position: static; }
  .tx-edit-bank-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .tx-edit-bank-main,
  .tx-edit-doc-kv { grid-template-columns:1fr; }
  .tx-edit-section-head { display:block; }
  .tx-edit-section-head small { display:block; text-align:left; margin-top:6px; }
  .tx-edit-savebar { align-items:stretch; flex-direction:column; }
}

/* 1.33 Szablony płatności – pełna szerokość i kompaktowe karty */
.tx-template-top-actions .btn {
  white-space: nowrap;
}
.tx-template-summary {
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:10px;
}
.tx-template-summary-item {
  border-radius:18px;
  padding:12px 14px;
  background:#fff;
  border:1px solid rgba(15,23,42,.065);
  box-shadow:0 10px 30px rgba(15,23,42,.05);
  display:grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap:2px 10px;
  align-items:end;
}
.tx-template-summary-item span {
  font-size:.76rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#64748b;
}
.tx-template-summary-item strong {
  grid-row:1 / span 2;
  grid-column:2;
  font-size:1.28rem;
  line-height:1;
  color:var(--club-primary);
}
.tx-template-summary-item small {
  color:#94a3b8;
  font-size:.78rem;
}
.tx-template-summary-item.warning strong { color:#a16207; }
.tx-template-summary-item.danger strong { color:#b91c1c; }
.tx-template-section {
  border-radius:24px;
  padding:14px;
  background:rgba(255,255,255,.84);
  border:1px solid rgba(15,23,42,.065);
  box-shadow:0 16px 40px rgba(15,23,42,.055);
}
.tx-template-section-head {
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:10px;
}
.tx-template-legend {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  color:#64748b;
  font-size:.78rem;
  font-weight:800;
}
.tx-template-legend span { display:inline-flex; align-items:center; gap:6px; }
.tx-template-legend .dot {
  width:9px;
  height:9px;
  border-radius:50%;
  display:inline-block;
  background:#16a34a;
}
.tx-template-legend .dot.warn { background:#f59e0b; }
.tx-template-legend .dot.pay { background:#0284c7; }
.tx-template-group-label {
  margin:10px 0 8px;
  font-size:.76rem;
  font-weight:950;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:#64748b;
}
.tx-template-list {
  display:flex;
  flex-direction:column;
  gap:9px;
}
.tx-template-row-card {
  border-radius:18px;
  background:#fff;
  border:1px solid rgba(15,23,42,.07);
  box-shadow:0 10px 28px rgba(15,23,42,.045);
  overflow:hidden;
}
.tx-template-row-card.active {
  border-color:color-mix(in srgb, var(--club-primary) 45%, #fff);
  box-shadow:0 14px 38px color-mix(in srgb, var(--club-primary) 12%, transparent);
}
.tx-template-row-card.has-needs {
  border-left:4px solid #f59e0b;
}
.tx-template-row-card.payroll {
  border-left:4px solid #0284c7;
}
.tx-template-row-main {
  display:grid;
  grid-template-columns: minmax(230px, 1.1fr) minmax(280px, 1.6fr) minmax(190px, .75fr) minmax(220px, .85fr);
  gap:12px;
  align-items:center;
  padding:12px 14px;
}
.tx-template-row-title h3 {
  font-size:.98rem;
  line-height:1.18;
  margin:2px 0 4px;
  font-weight:950;
  overflow-wrap:anywhere;
}
.tx-template-row-kicker {
  font-size:.68rem;
  font-weight:950;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--club-accent);
}
.tx-template-row-account {
  font-size:.78rem;
  color:#64748b;
}
.tx-template-row-account code,
.tx-template-row-rules code,
.tx-account-candidate-main code {
  white-space:normal;
  word-break:break-word;
}
.tx-template-row-rules {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
  min-width:0;
}
.tx-template-row-rules span {
  border-radius:999px;
  padding:5px 8px;
  background:#f8fafc;
  border:1px solid rgba(15,23,42,.06);
  color:#475569;
  font-size:.76rem;
  line-height:1.15;
  max-width:100%;
  overflow-wrap:anywhere;
}
.tx-template-row-stats {
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:6px;
}
.tx-template-row-stats div {
  padding:7px 8px;
  border-radius:13px;
  background:#f8fafc;
  border:1px solid rgba(15,23,42,.055);
  min-width:0;
}
.tx-template-row-stats strong {
  display:block;
  font-size:.88rem;
  line-height:1.05;
  color:#0f172a;
  overflow:hidden;
  text-overflow:ellipsis;
}
.tx-template-row-stats .warn strong { color:#a16207; }
.tx-template-row-stats small {
  display:block;
  margin-top:3px;
  color:#94a3b8;
  font-size:.65rem;
  font-weight:800;
}
.tx-template-row-actions {
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.tx-template-row-actions form { display:inline-flex; }
.tx-template-row-actions .btn { padding:.28rem .5rem; font-size:.75rem; }
.tx-template-row-details {
  border-top:1px solid rgba(15,23,42,.06);
  padding:8px 14px 11px;
  background:#fbfdff;
}
.tx-template-row-details summary {
  cursor:pointer;
  font-size:.78rem;
  font-weight:900;
  color:var(--club-primary);
}
.tx-template-detail-grid {
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap:8px;
  margin-top:8px;
}
.tx-template-detail-grid div {
  border-radius:12px;
  background:#fff;
  border:1px solid rgba(15,23,42,.055);
  padding:8px 10px;
  min-width:0;
}
.tx-template-detail-grid .wide { grid-column:1 / -1; }
.tx-template-detail-grid span {
  display:block;
  font-size:.68rem;
  color:#94a3b8;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.tx-template-detail-grid strong {
  display:block;
  margin-top:2px;
  font-size:.82rem;
  overflow-wrap:anywhere;
}
.tx-template-bulk-row {
  display:flex;
  justify-content:flex-end;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
}
.tx-template-match-list {
  display:flex;
  flex-direction:column;
  gap:8px;
}
.tx-template-match-card {
  display:grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(130px, auto) minmax(105px, auto) minmax(80px, auto);
  gap:10px;
  align-items:center;
  border-radius:16px;
  border:1px solid rgba(15,23,42,.065);
  background:#fff;
  padding:10px 12px;
}
.tx-template-match-card.needs { background:rgba(245,158,11,.045); }
.tx-template-match-title { overflow-wrap:anywhere; }
.tx-template-match-amount { text-align:right; white-space:nowrap; }
.tx-template-match-actions { text-align:right; }
.tx-account-candidate-list {
  display:flex;
  flex-direction:column;
  gap:8px;
}
.tx-account-candidate-card {
  display:grid;
  grid-template-columns:minmax(230px, 1fr) minmax(320px, 1.5fr) minmax(170px, auto);
  gap:12px;
  align-items:center;
  border:1px solid rgba(15,23,42,.065);
  background:#fff;
  border-radius:16px;
  padding:10px 12px;
}
.tx-account-candidate-main {
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
.tx-account-candidate-main strong { overflow-wrap:anywhere; }
.tx-account-candidate-stats {
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:6px;
}
.tx-account-candidate-stats span {
  border-radius:12px;
  background:#f8fafc;
  border:1px solid rgba(15,23,42,.055);
  padding:6px 8px;
  min-width:0;
}
.tx-account-candidate-stats strong {
  display:block;
  font-size:.8rem;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.tx-account-candidate-stats small {
  display:block;
  font-size:.62rem;
  color:#94a3b8;
  font-weight:800;
}
.tx-account-candidate-stats .warn strong { color:#a16207; }
.tx-account-candidate-actions {
  display:flex;
  justify-content:flex-end;
  gap:6px;
  flex-wrap:wrap;
}
@media (max-width: 1399.98px) {
  .tx-template-row-main {
    grid-template-columns: minmax(230px, 1fr) minmax(250px, 1.35fr) minmax(185px, .75fr);
  }
  .tx-template-row-actions {
    grid-column:1 / -1;
    justify-content:flex-start;
  }
}
@media (max-width: 991.98px) {
  .tx-template-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tx-template-row-main,
  .tx-account-candidate-card,
  .tx-template-match-card {
    grid-template-columns:1fr;
  }
  .tx-template-row-actions,
  .tx-account-candidate-actions,
  .tx-template-match-actions,
  .tx-template-match-amount {
    justify-content:flex-start;
    text-align:left;
  }
  .tx-account-candidate-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
  .tx-template-summary { grid-template-columns:1fr; }
  .tx-template-section { padding:10px; border-radius:18px; }
  .tx-template-row-main { padding:10px; }
}

/* 1.40: operacje bankowe - budżet/okres/typ kosztu są automatyczne */
.tx-auto-budget-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px dashed rgba(100,116,139,.35);
  border-radius: 16px;
  background: rgba(248,250,252,.9);
  color: #64748b;
  font-size: 13px;
}
.tx-auto-budget-note strong { color: #0f172a; white-space: nowrap; }
.tx-auto-budget-note span { line-height: 1.35; }

/* 1.42: dashboard - pełne listy kategorii wpływów i wydatków */
.dashboard-card-total {
  font-weight: 900;
  color: var(--club-primary);
  white-space: nowrap;
  font-size: 1.05rem;
  text-align: right;
}
.dashboard-card-total.expense-total { color: #b91c1c; }
.dashboard-card-total.income-total { color: #166534; }
.dashboard-category-list {
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}
.category-breakdown-row {
  align-items: flex-start;
}
.category-breakdown-row strong {
  overflow-wrap: anywhere;
}
@media (max-width: 575.98px) {
  .dashboard-card-total { font-size: .95rem; text-align:left; }
  .dashboard-category-list { max-height: none; overflow: visible; }
}

/* 1.45: widok kompaktowy operacji bankowych + zapis AJAX */
.tx-view-toggle {
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.tx-view-toggle .btn.active {
  background: var(--club-primary, #102a56);
  border-color: var(--club-primary, #102a56);
  color:#fff;
}
.tx-quick-save-status {
  min-width: 70px;
  display:inline-flex;
  align-items:center;
}
.tx-list-card.tx-compact-view .tx-card-list {
  gap: 8px;
}
.tx-list-card.tx-compact-view .tx-list-select-all {
  padding: 6px 10px;
}
.tx-list-card.tx-compact-view .tx-transaction-card {
  grid-template-columns: 34px minmax(0, 1fr);
  padding: 8px 10px;
  border-radius: 12px;
}
.tx-list-card.tx-compact-view .tx-card-main {
  display:grid;
  grid-template-columns: 1.15fr 1.55fr 1.8fr auto;
  gap: 8px;
  align-items:center;
}
.tx-list-card.tx-compact-view .tx-card-topline {
  display:grid;
  grid-template-columns: 82px minmax(0, 1fr) 105px;
  gap:8px;
  align-items:center;
  margin:0;
}
.tx-list-card.tx-compact-view .tx-date-block {
  padding:0;
  border:0;
  background:transparent;
  min-width:0;
}
.tx-list-card.tx-compact-view .tx-date-block strong,
.tx-list-card.tx-compact-view .tx-date-block span,
.tx-list-card.tx-compact-view .tx-title-text,
.tx-list-card.tx-compact-view .tx-contractor,
.tx-list-card.tx-compact-view .tx-account-line,
.tx-list-card.tx-compact-view .tx-info-label,
.tx-list-card.tx-compact-view .tx-doc-summary .small,
.tx-list-card.tx-compact-view .tx-amount-block strong {
  font-size: 12px;
}
.tx-list-card.tx-compact-view .tx-title-block {
  min-width:0;
}
.tx-list-card.tx-compact-view .tx-title-text,
.tx-list-card.tx-compact-view .tx-contractor {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}
.tx-list-card.tx-compact-view .tx-account-line {
  display:none;
}
.tx-list-card.tx-compact-view .tx-amount-block {
  text-align:right;
  min-width:0;
}
.tx-list-card.tx-compact-view .tx-card-grid {
  display:grid;
  grid-template-columns: minmax(280px, 1fr) 150px 92px;
  gap:8px;
  align-items:center;
  margin:0;
}
.tx-list-card.tx-compact-view .tx-info-box {
  padding:0;
  border:0;
  background:transparent;
  min-width:0;
}
.tx-list-card.tx-compact-view .tx-badges {
  display:none;
}
.tx-list-card.tx-compact-view .tx-inline-assign {
  margin-top:0 !important;
  display:grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(120px, 1fr) auto 70px;
  gap:5px;
  align-items:center;
}
.tx-list-card.tx-compact-view .tx-inline-assign .form-select,
.tx-list-card.tx-compact-view .tx-inline-assign .btn {
  min-height: 30px;
  height: 30px;
  padding-top: 3px;
  padding-bottom: 3px;
  font-size: 12px;
}
.tx-list-card.tx-compact-view .tx-doc-box .tx-info-label,
.tx-list-card.tx-compact-view .tx-actions-box .tx-info-label,
.tx-list-card.tx-compact-view .tx-doc-actions,
.tx-list-card.tx-compact-view details.tx-details {
  display:none !important;
}
.tx-list-card.tx-compact-view .tx-doc-summary {
  display:flex;
  justify-content:center;
  align-items:center;
  margin:0;
}
.tx-list-card.tx-compact-view .tx-doc-summary .small {
  display:none;
}
.tx-list-card.tx-compact-view .tx-row-actions {
  display:flex;
  justify-content:flex-end;
  gap:4px;
  flex-wrap:nowrap;
}
.tx-list-card.tx-compact-view .tx-row-actions .btn {
  min-height: 30px;
  height: 30px;
  padding: 3px 8px;
  font-size: 12px;
}
@media (max-width: 1200px) {
  .tx-list-card.tx-compact-view .tx-card-main,
  .tx-list-card.tx-compact-view .tx-card-grid,
  .tx-list-card.tx-compact-view .tx-card-topline,
  .tx-list-card.tx-compact-view .tx-inline-assign {
    grid-template-columns: 1fr;
  }
  .tx-list-card.tx-compact-view .tx-badges,
  .tx-list-card.tx-compact-view .tx-doc-actions,
  .tx-list-card.tx-compact-view details.tx-details {
    display:flex !important;
  }
}

/* 1.47: poprawiony kompaktowy widok operacji i kolory klubowe */
.tx-view-toggle .btn {
  min-width: 132px;
  justify-content: center;
  border-color: color-mix(in srgb, var(--club-primary) 42%, #fff) !important;
  color: var(--club-primary) !important;
  background: #fff !important;
  font-weight: 900;
}
.tx-view-toggle .btn:hover,
.tx-view-toggle .btn:focus {
  color: #fff !important;
  border-color: var(--club-primary) !important;
  background: linear-gradient(135deg, var(--club-primary), color-mix(in srgb, var(--club-accent) 55%, var(--club-primary))) !important;
}
.tx-view-toggle .btn.active {
  color: #fff !important;
  border-color: var(--club-primary) !important;
  background: linear-gradient(135deg, var(--club-primary), var(--club-accent)) !important;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--club-primary) 24%, transparent);
}
.tx-bulk-assign-bar .btn-primary,
.tx-inline-assign .btn-primary {
  border-color: var(--club-primary) !important;
  background: linear-gradient(135deg, var(--club-primary), color-mix(in srgb, var(--club-primary) 72%, #000)) !important;
  color: #fff !important;
}
.tx-bulk-assign-bar .btn-primary:hover,
.tx-inline-assign .btn-primary:hover {
  border-color: var(--club-accent) !important;
  background: linear-gradient(135deg, var(--club-accent), var(--club-primary)) !important;
}
.tx-list-card.tx-compact-view .tx-transaction-card {
  grid-template-columns: 34px minmax(0, 1fr);
  padding: 9px 12px;
  border-radius: 13px;
}
.tx-list-card.tx-compact-view .tx-card-main {
  display: grid;
  grid-template-columns: minmax(380px, 1.08fr) minmax(600px, 1.55fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}
.tx-list-card.tx-compact-view .tx-card-topline {
  display: grid;
  grid-template-columns: 86px minmax(170px, 1fr) 105px;
  gap: 10px;
  align-items: center;
  min-width: 0;
  margin: 0;
}
.tx-list-card.tx-compact-view .tx-title-block {
  min-width: 0;
  display: block;
}
.tx-list-card.tx-compact-view .tx-title-text {
  display: block;
  font-size: 13px;
  font-weight: 900;
  color: #001b3d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}
.tx-list-card.tx-compact-view .tx-contractor {
  display: block;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}
.tx-list-card.tx-compact-view .tx-card-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 128px 128px;
  gap: 10px;
  align-items: center;
  min-width: 0;
  margin: 0;
}
.tx-list-card.tx-compact-view .tx-inline-assign {
  margin-top: 0 !important;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.tx-list-card.tx-compact-view .tx-inline-assign .form-select {
  min-width: 0;
  width: auto;
  height: 32px;
  min-height: 32px;
  padding-top: 4px;
  padding-bottom: 4px;
  font-size: 12px;
}
.tx-list-card.tx-compact-view .tx-inline-assign .tx-category-select { flex: 1 1 165px; max-width: 210px; }
.tx-list-card.tx-compact-view .tx-inline-assign .tx-subcategory-select:not(.d-none) { flex: 1 1 145px; max-width: 185px; }
.tx-list-card.tx-compact-view .tx-inline-assign select[name$="[department_id]"] { flex: 0 0 130px; }
.tx-list-card.tx-compact-view .tx-inline-assign .btn {
  flex: 0 0 auto;
  height: 32px;
  min-height: 32px;
  padding: 4px 10px;
  font-size: 12px;
  white-space: nowrap;
}
.tx-list-card.tx-compact-view .tx-quick-save-status {
  flex: 0 0 58px;
  min-width: 58px;
  font-size: 11px;
  white-space: nowrap;
}
.tx-list-card.tx-compact-view .tx-doc-box,
.tx-list-card.tx-compact-view .tx-actions-box {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tx-list-card.tx-compact-view .tx-doc-summary .badge {
  max-width: 118px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-list-card.tx-compact-view .tx-row-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}
.tx-list-card.tx-compact-view .tx-row-actions .btn {
  height: 32px;
  min-height: 32px;
  padding: 4px 9px;
  font-size: 12px;
  white-space: nowrap;
}
@media (max-width: 1360px) {
  .tx-list-card.tx-compact-view .tx-card-main {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .tx-list-card.tx-compact-view .tx-card-grid {
    grid-template-columns: minmax(0, 1fr) 120px 120px;
  }
}
@media (max-width: 900px) {
  .tx-list-card.tx-compact-view .tx-card-topline,
  .tx-list-card.tx-compact-view .tx-card-grid,
  .tx-list-card.tx-compact-view .tx-inline-assign {
    grid-template-columns: 1fr;
    display: grid;
  }
  .tx-list-card.tx-compact-view .tx-inline-assign .tx-category-select,
  .tx-list-card.tx-compact-view .tx-inline-assign .tx-subcategory-select:not(.d-none),
  .tx-list-card.tx-compact-view .tx-inline-assign select[name$="[department_id]"] {
    max-width: none;
    width: 100%;
    flex-basis: auto;
  }
}

/* 1.48: jeszcze bardziej kompaktowy widok operacji */
.tx-missing-doc-link {
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  width: fit-content;
}
.tx-missing-doc-link:hover,
.tx-missing-doc-link:focus {
  filter: brightness(.96);
  text-decoration: underline;
}
.tx-list-card.tx-compact-view .tx-card-list {
  gap: 6px;
  padding: 10px 12px;
}
.tx-list-card.tx-compact-view .tx-transaction-card {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 10px;
  border-radius: 12px;
  min-height: 56px;
}
.tx-list-card.tx-compact-view .tx-card-check {
  padding-top: 6px;
}
.tx-list-card.tx-compact-view .tx-card-main {
  display: grid;
  grid-template-columns: minmax(330px, .98fr) minmax(390px, 1.25fr) 92px 126px;
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.tx-list-card.tx-compact-view .tx-card-topline {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  gap: 1px 8px;
  align-items: center;
  min-width: 0;
  margin: 0;
}
.tx-list-card.tx-compact-view .tx-date-block {
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: center;
}
.tx-list-card.tx-compact-view .tx-date-block strong {
  font-size: 12px;
  line-height: 1.1;
}
.tx-list-card.tx-compact-view .tx-date-block span {
  font-size: 11px;
  line-height: 1.1;
}
.tx-list-card.tx-compact-view .tx-title-block {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 0;
}
.tx-list-card.tx-compact-view .tx-title-text {
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.12;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-list-card.tx-compact-view .tx-contractor {
  display: block;
  margin-top: 1px;
  font-size: 11.3px;
  line-height: 1.12;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-list-card.tx-compact-view .tx-account-line {
  display: none;
}
.tx-list-card.tx-compact-view .tx-amount-block {
  grid-column: 2;
  grid-row: 3;
  text-align: left;
  min-width: 0;
}
.tx-list-card.tx-compact-view .tx-amount-block strong {
  display: block;
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
}
.tx-list-card.tx-compact-view .tx-card-grid {
  display: contents;
}
.tx-list-card.tx-compact-view .tx-info-box {
  padding: 0;
  border: 0;
  background: transparent;
  min-width: 0;
}
.tx-list-card.tx-compact-view .tx-info-box .tx-info-label,
.tx-list-card.tx-compact-view .tx-badges,
.tx-list-card.tx-compact-view .tx-doc-summary .small,
.tx-list-card.tx-compact-view .tx-doc-actions,
.tx-list-card.tx-compact-view .tx-doc-details,
.tx-list-card.tx-compact-view details.tx-doc-details {
  display: none !important;
}
.tx-list-card.tx-compact-view .tx-inline-assign {
  margin: 0 !important;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.tx-list-card.tx-compact-view .tx-inline-assign .form-select,
.tx-list-card.tx-compact-view .tx-inline-assign .btn {
  height: 29px;
  min-height: 29px;
  padding-top: 2px;
  padding-bottom: 2px;
  font-size: 11.5px;
}
.tx-list-card.tx-compact-view .tx-inline-assign .tx-category-select { flex: 1 1 145px; max-width: 190px; }
.tx-list-card.tx-compact-view .tx-inline-assign .tx-subcategory-select:not(.d-none) { flex: 1 1 130px; max-width: 170px; }
.tx-list-card.tx-compact-view .tx-inline-assign select[name$="[department_id]"] { flex: 0 0 118px; }
.tx-list-card.tx-compact-view .tx-inline-assign .tx-quick-save-btn { flex: 0 0 auto; }
.tx-list-card.tx-compact-view .tx-quick-save-status {
  flex: 0 0 48px;
  min-width: 48px;
  font-size: 10.5px;
}
.tx-list-card.tx-compact-view .tx-doc-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.tx-list-card.tx-compact-view .tx-doc-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.tx-list-card.tx-compact-view .tx-doc-summary .badge,
.tx-list-card.tx-compact-view .tx-doc-box > .badge,
.tx-list-card.tx-compact-view .tx-missing-doc-link {
  font-size: 11px;
  padding: 5px 8px;
  max-width: 116px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-list-card.tx-compact-view .tx-actions-box {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}
.tx-list-card.tx-compact-view .tx-row-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.tx-list-card.tx-compact-view .tx-row-actions .btn {
  height: 29px;
  min-height: 29px;
  padding: 3px 8px;
  font-size: 11.5px;
  white-space: nowrap;
}
@media (max-width: 1440px) {
  .tx-list-card.tx-compact-view .tx-card-main {
    grid-template-columns: minmax(300px, .95fr) minmax(360px, 1.25fr) 88px 116px;
  }
  .tx-list-card.tx-compact-view .tx-inline-assign .tx-category-select { max-width: 170px; }
  .tx-list-card.tx-compact-view .tx-inline-assign .tx-subcategory-select:not(.d-none) { max-width: 150px; }
  .tx-list-card.tx-compact-view .tx-inline-assign select[name$="[department_id]"] { flex-basis: 106px; }
}
@media (max-width: 1180px) {
  .tx-list-card.tx-compact-view .tx-card-main {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .tx-list-card.tx-compact-view .tx-card-grid {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 6px;
    align-items: center;
  }
  .tx-list-card.tx-compact-view .tx-inline-assign {
    flex-wrap: wrap;
  }
}
