/* Kamienica — style ekranow (obie role). Kolory tylko z tokenow base.css. */

button.card { width: 100%; text-align: left; color: inherit; transition: background-color .15s ease, transform .1s ease; -webkit-tap-highlight-color: transparent; }
button.card:active { transform: scale(0.99); background: var(--surface-2); }

.hello { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }

/* ---------- karta salda ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: 4px; padding: 18px 18px 16px;
  border-radius: 24px; color: var(--hero-ink); box-shadow: var(--shadow-2);
  background: linear-gradient(135deg, var(--hero-1), var(--hero-2));
}
.hero.is-danger { background: linear-gradient(135deg, var(--hero-d1), var(--hero-d2)); }
.hero.is-ok { background: linear-gradient(135deg, var(--hero-o1), var(--hero-o2)); }
.hero-art { position: absolute; right: -6px; bottom: -8px; width: 128px; height: auto; color: #FFFFFF; z-index: -1; }
.hero-label { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--hero-ink-2); }
.hero-amount { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-top: 2px; }
.hero-sub { font-size: 14px; color: var(--hero-ink-2); max-width: 30ch; }
.hero-sub b { color: #FFFFFF; font-weight: 800; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hero-actions .btn { min-height: 44px; }
.hero-ghost { background: rgba(255, 255, 255, 0.16); color: #FFFFFF; }
.hero-ghost:active { background: rgba(255, 255, 255, 0.26); }
.hero.is-danger .btn-white { color: var(--hero-d1); }
.hero.is-ok .btn-white { color: var(--hero-o1); }

/* ---------- szybkie akcje ---------- */
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.quick-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quick-btn {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0;
  padding: 12px 4px 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  font-size: 12.5px; font-weight: 700; line-height: 1.2; text-align: center; color: var(--ink-2);
  -webkit-tap-highlight-color: transparent;
}
.quick-btn:active { background: var(--surface-2); }
.quick-btn > span:last-child { overflow-wrap: anywhere; }
.quick-btn.is-alarm { background: var(--danger-soft); border-color: transparent; color: var(--danger-text); }
.quick-badge { top: 6px; right: calc(50% - 30px); }

/* ---------- ogloszenia ---------- */
.news-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; }
.news-top { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.news-type { color: var(--ink-2); }
.news-card.is-urgent .news-type { color: var(--danger-text); }
.news-pin { display: inline-flex; color: var(--muted); }
.news-top .unread-dot { margin-left: auto; }
.news-title { font-size: 16.5px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.news-card.is-unread .news-title { font-weight: 800; }
.news-excerpt { font-size: 14px; color: var(--ink-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row.is-unread .row-title { font-weight: 800; }

.nd-head { display: flex; flex-direction: column; gap: 8px; }
.prose { display: flex; flex-direction: column; gap: 12px; font-size: 15.5px; line-height: 1.55; color: var(--ink); }
.prose-p { font-size: 15px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.ev-card .btn-sm { align-self: flex-start; }
.ack-done { display: flex; align-items: center; gap: 8px; color: var(--ok-text); font-weight: 700; }

.meet { display: flex; flex-direction: column; gap: 12px; }
.meet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.muted-card { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

/* ---------- zgloszenia ---------- */
.tk-cta { display: flex; flex-direction: column; gap: 14px; }
.tk-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
.tk-card.is-urgent { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger), var(--shadow-1); }
.tk-top { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.tk-top .unread-dot { margin-top: 6px; }
.tk-who { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); font-weight: 700; }
.tk-common { display: flex; flex-direction: column; gap: 12px; }
.place-chips { margin-top: 4px; }
.place-chips .filter, .chips .filter { height: 34px; padding: 0 12px; font-size: 13.5px; }

.td-head { display: flex; align-items: flex-start; gap: 14px; }
.visit { display: flex; flex-direction: column; gap: 12px; }
.visit .btn { align-self: flex-start; }
.visit .hstack .btn { align-self: auto; }
.rate { align-items: center; text-align: center; }
.sec-gap { margin: 0 2px 10px; }
.seg-status > button { min-height: 42px; }
.rating-line { display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.rating-line .icon { color: var(--warn); }

/* ---------- oplaty ---------- */
.pay-item .row-title { font-weight: 600; font-size: 14.5px; }
.pay-total { background: var(--surface-2); border-bottom-left-radius: var(--r-l); border-bottom-right-radius: var(--r-l); }
.pay-total .row-title { font-weight: 800; }
.pay-note { margin: 8px 4px 0; }
.acct { font-size: 15px; font-weight: 800; letter-spacing: 0.02em; overflow-wrap: anywhere; }
.pay-sum { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 2px; font-weight: 700; color: var(--ink-2); }
.pay-sum strong { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.pay-proc { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 36px 10px; }
.pay-spinner { color: var(--accent); }
.pay-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 10px 6px 2px; }
.pay-check { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #FFFFFF; animation: pop-in .45s ease-out; }
.pay-done-amount { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.kv { min-height: 46px; padding: 8px 16px; justify-content: space-between; }
.kv-v { font-weight: 700; font-size: 14.5px; text-align: right; overflow-wrap: anywhere; }

/* ---------- profil, powiadomienia ---------- */
.profile-card { display: flex; align-items: center; gap: 14px; }
.nt-day { margin: 2px 4px 8px; }
.nt-row { align-items: flex-start; }
.nt-row.is-unread { background: var(--accent-soft); }
.nt-row .unread-dot { margin-top: 8px; }
.nt-meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.ab-link { margin-right: 4px; white-space: nowrap; }
.choice-sm { min-height: 52px; padding: 8px 12px; }

/* ---------- pulpit zarzadcy ---------- */
.alert-card { display: flex; flex-direction: column; gap: 10px; border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger), var(--shadow-1); }
.alert-eyebrow { color: var(--danger-text); }
.alert-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.last-ann { display: flex; flex-direction: column; gap: 8px; }
.stat-of { font-size: 16px; color: var(--muted); font-weight: 700; margin-left: 2px; }

/* ---------- komunikaty ---------- */
.bc-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.bc-card { display: flex; flex-direction: column; gap: 8px; }
.bc-card.is-live { border-color: var(--danger); }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.type-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; border-radius: 14px;
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 13.5px; font-weight: 700; text-align: left;
}
.type-btn[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.ev-fields { gap: 8px; }
.ev-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.card-eyebrow { padding: 14px 16px 0; }
.card-err { padding: 0 16px 14px; }
.sub-switch { padding-left: 68px; }
.preview { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 20px; background: linear-gradient(160deg, var(--surface-3), var(--surface-2)); }
.push-static { animation: none; pointer-events: none; }
.sms-preview { display: flex; flex-direction: column; gap: 4px; }
.sms-label { font-size: 12px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.sms-bubble { align-self: flex-start; max-width: 92%; padding: 10px 13px; border-radius: 18px 18px 18px 6px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.body-details summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; }
.body-details summary::-webkit-details-marker { display: none; }
.body-details summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin-right: 4px; transition: transform .15s ease; }
.body-details[open] summary::after { transform: rotate(-135deg); }
.body-details[open] summary { margin-bottom: 12px; }
.body-details .small { display: flex; align-items: center; gap: 6px; margin-top: 12px; }

.unit-no {
  display: inline-grid; place-items: center; flex: none; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 12px;
  background: var(--surface-2); color: var(--ink-2); font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums;
}
.unit-no-l { min-width: 56px; height: 56px; font-size: 22px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-text); }
.st-ok { color: var(--ok); }
.st-read { color: var(--accent-text); }
.st-idle { color: var(--muted); }
.st-warn { color: var(--warn); }
.st-bad { color: var(--danger); }

/* ---------- platnosci (zarzadca) ---------- */
.fin-sum { display: flex; flex-direction: column; gap: 8px; }
.fin-rate { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.fin-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.fin-legend span { display: inline-flex; align-items: center; gap: 5px; }
.fin-legend b { font-weight: 800; color: var(--ink); }
.ink { color: var(--ink); }
.debt-card { display: flex; flex-direction: column; gap: 12px; }
.fin-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fin-row .row-amount { white-space: nowrap; }
.of { color: var(--muted); font-weight: 600; font-size: 12.5px; }

.chart { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.chart-detail { font-size: 13px; color: var(--muted); min-height: 19px; }
.chart-detail b { color: var(--ink); font-weight: 800; }
.chart-svg { width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-base { stroke: var(--line-2); stroke-width: 1; }
.chart-tick, .chart-month { fill: var(--muted); font-size: 11px; font-family: var(--font); font-weight: 600; }
.chart-val { fill: var(--ink); font-size: 12px; font-family: var(--font); font-weight: 800; }
.chart-bar { fill: var(--accent); opacity: .36; transition: opacity .2s ease; }
.chart-hit { fill: transparent; cursor: pointer; }
.chart-col.is-sel .chart-bar { opacity: 1; }
.chart-col.is-sel .chart-month { fill: var(--ink); font-weight: 800; }

/* ---------- lokale i plan budynku ---------- */
.bl-head { display: flex; flex-direction: column; gap: 10px; }
.bl-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--muted); }
.bl-stats b { color: var(--ink); font-weight: 800; }
.bl-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.bl-leg { display: inline-flex; align-items: center; gap: 6px; }
.bl-sw { width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center; background: var(--tone-soft); color: var(--tone-text); }
.bl-klatka { display: flex; flex-direction: column; gap: 10px; }
.bl-floors { display: flex; flex-direction: column; gap: 6px; }
.bl-floor { display: flex; align-items: center; gap: 8px; }
.bl-fl { width: 16px; flex: none; font-size: 12px; font-weight: 800; color: var(--muted); text-align: center; }
.bl-units { flex: 1 1 auto; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 6px; }
.bl-unit {
  position: relative; height: 44px; border-radius: 11px; display: grid; place-items: center;
  background: var(--tone-soft); color: var(--tone-text); font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent;
}
.bl-unit:active { filter: brightness(0.95); }
.bl-ic { position: absolute; top: 3px; right: 4px; display: inline-flex; }
.search { position: relative; display: block; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .input { padding-left: 42px; }
.spec-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.spec { padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.spec-k { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.spec-v { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.debt-text { color: var(--danger-text); }
.ok-text { color: var(--ok-text); display: flex; align-items: center; gap: 6px; }
.wrap { flex-wrap: wrap; }
.mt-10 { margin-top: 10px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.pick-unit { height: 44px; border-radius: 11px; background: var(--surface-2); font-weight: 800; font-variant-numeric: tabular-nums; }
.pick-unit[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* ---------- demo ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@keyframes flash-frame { 0% { box-shadow: 0 0 0 1.5px var(--bezel-edge), 0 0 0 0 var(--accent); } 40% { box-shadow: 0 0 0 1.5px var(--bezel-edge), 0 0 0 10px var(--accent-soft); } 100% { box-shadow: 0 0 0 1.5px var(--bezel-edge), 0 0 0 0 transparent; } }
.phone.is-flash .frame { animation: flash-frame 1s ease-out; }
.welcome .credit { margin-top: auto; }

@media (hover: hover) and (pointer: fine) {
  button.row:hover, button.card:hover, .quick-btn:hover, .filter:hover, .choice:hover { background-color: var(--surface-2); }
  .filter[aria-pressed="true"]:hover { background-color: var(--ink); }
  .choice[aria-pressed="true"]:hover, .choice[aria-checked="true"]:hover { background-color: var(--accent-soft); }
  .btn-primary:hover { background: var(--accent-press); }
  .chart-col:hover .chart-bar { opacity: .7; }
  .chart-col.is-sel:hover .chart-bar { opacity: 1; }
  .bl-unit:hover { box-shadow: inset 0 0 0 2px var(--tone); }
}

@container (max-width: 370px) {
  .quick-btn { font-size: 11.5px; }
  .hero-amount { font-size: 36px; }
  .spec-v { font-size: 14px; }
}
.stat-wide { grid-column: 1 / -1; min-height: 0; }
