/* ==========================================================================
   Beskid Calm — components: przyciski, karty, pills, formularze, messages
   Wzorce z demo/index.html; klasy legacy (`.btn--*`, `.card__*`) mapowane,
   żeby szablony users/pages wyglądały przyzwoicie na tym samym systemie.
   ========================================================================== */

/* ---------- Skip link (a11y) — ukryty do :focus-visible ---------- */
.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 200;
  transform: translateY(-300%);
  padding: 10px 18px;
  background: var(--green-dark);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: transform 0.15s ease;
}

.skip-link:focus-visible {
  transform: none;
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 26px;
  border-radius: var(--radius-md);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  text-decoration: none;
  min-height: 44px;
}

.btn-primary {
  background: var(--green-dark);
  color: var(--white); /* var(): --white flipuje w dark (canon demo) — #fff dawał biały tekst na jasnym --green-dark */
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  background: #33463a;
  transform: translateY(-2px);
}

[data-theme="dark"] .btn-primary:hover {
  background: var(--green);
  color: var(--paper);
}

.btn-ghost {
  background: transparent;
  color: var(--green-dark);
  border: 2px solid var(--green-dark);
}

.btn-ghost:hover {
  background: var(--green-dark);
  color: var(--white);
}

.btn-white {
  background: #fff;
  color: var(--green-dark);
}

.btn-white:hover {
  background: #eef0e9;
  transform: translateY(-2px);
}

.btn-outline-w {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.btn-outline-w:hover {
  border-color: #fff;
}

/* Aliasy legacy (szablony users/pages/404) */
.btn.btn--primary {
  background: var(--green-dark);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}

.btn.btn--primary:hover {
  background: #33463a;
  transform: translateY(-2px);
}

.btn.btn--ghost {
  background: transparent;
  color: var(--green-dark);
  border: 2px solid var(--green-dark);
}

.btn.btn--ghost:hover {
  background: var(--green-dark);
  color: #fff;
}

.btn--block {
  width: 100%;
}

.btn--lg {
  padding: 16px 32px;
  font-size: 1.05rem;
}

/* ---------- Cards (uniwersalne; używa ich m.in. _apartment_card.html) ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s, box-shadow 0.25s;
}

.card--hover:hover,
a.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.card__thumb img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card__label {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green-dark);
}

.card__title {
  font-size: 1.1rem;
}

.card__text {
  font-size: 0.88rem;
  color: var(--muted);
}

/* Karta jako przycisk quick-view (ApartmentGrid island) — reset buttona */
.card__open {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  height: 100%;
}

.card__open:focus-visible {
  outline: 3px solid var(--green-dark);
  outline-offset: -3px;
}

.card__thumb--empty {
  display: block;
  height: 200px;
  background: var(--green-soft);
}

/* ---------- Quick-view (B-08): fluid expand w gridzie, bez nowego okna ---------- */
.quickview {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 24px;
  background: var(--card);
  border: 1.5px solid var(--green-dark);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.quickview__media {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--green-soft);
}

.quickview__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.quickview__media--empty {
  min-height: 240px;
}

/* Strzałki karuzeli — wzorzec gal-prev/gal-next z demo/apartament.html */
.gal-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #2b2f28;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  font-size: 1.1rem;
  transition: transform 0.15s;
}

.gal-arrow:hover {
  transform: translateY(-50%) scale(1.06);
}

.gal-prev {
  left: 12px;
}

.gal-next {
  right: 12px;
}

.quickview__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.quickview__title {
  font-family: var(--font-head);
  font-size: 1.4rem;
  margin: 0;
}

.quickview__meta {
  color: var(--lead);
  font-size: 0.95rem;
  margin: 0;
}

.quickview__loc {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}

.quickview__actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 14px;
}

.quickview__close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quickview__close:hover {
  border-color: var(--green-dark);
}

.quickview__close:focus-visible {
  outline: 3px solid var(--green-dark);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .quickview {
    grid-template-columns: 1fr;
    padding: 14px;
  }
}

/* ---------- Pills / chips ---------- */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.chip {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 9px 18px;
  min-height: 44px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--muted);
  transition: all 0.2s;
  text-transform: capitalize;
  text-decoration: none;
}

.chip:hover {
  border-color: var(--green-dark);
  color: var(--ink);
}

.chip[aria-pressed="true"],
.chip[aria-current="page"] {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--white);
}

.is-hidden {
  display: none !important;
}

/* ---------- Badges ---------- */
/* 2026-09-10: date-badge w treści karty (nie na zdjęciu) — statyczny flex item */
.date-badge {
  flex: 0 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  line-height: 1.15;
}

.date-badge .d {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--green-dark);
  display: block;
}

.date-badge .m {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.cat-tag {
  flex: 0 0 auto;
  margin-left: auto;
  background: rgba(64, 86, 66, 0.85);
  color: #fff; /* stały kolor na stałym ciemnym tle — działa w obu motywach */
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
}

.fiber-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--green-dark);
  border: 1px solid var(--green);
  border-radius: 999px;
  padding: 3px 10px;
}

.amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.amenities li {
  font-size: 0.78rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  color: var(--muted);
}

.urgency {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--urgency-bg);
  border: 1px solid var(--urgency-text);
  color: var(--urgency-text);
  font-weight: 600;
  font-size: 0.82rem;
  border-radius: var(--radius-md);
  padding: 8px 14px;
  width: fit-content;
}

.urgency::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--terracotta);
  flex: none;
}

/* ---------- Messages (Django messages) ---------- */
.message {
  max-width: 1120px;
  margin: 12px auto 0;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--green-soft);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.message-error {
  background: var(--urgency-bg);
  border-color: var(--urgency-text);
  color: var(--urgency-text);
}

.message--warning {
  background: var(--urgency-bg);
  border-color: var(--urgency-text);
  color: var(--urgency-text);
  display: block;
}

.message--warning p {
  margin: 4px 0;
}

/* ---------- Import wizard (panel/wydarzenia/import/) ---------- */
.import-preview-scroll {
  overflow-x: auto;
  margin: 16px 0;
}

.import-preview {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.import-preview th,
.import-preview td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.import-preview th {
  font-family: var(--font-head);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--green-soft);
}

.import-preview__row--error td {
  background: var(--urgency-bg);
}

.import-preview__row--no-date td,
.import-preview__row--duplicate td {
  background: var(--cue-bg);
}

.import-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--line);
}

.import-status--ok {
  background: var(--green-soft);
  border-color: var(--green-dark);
  color: var(--green-dark);
}

.import-status--error {
  background: var(--urgency-bg);
  border-color: var(--urgency-text);
  color: var(--urgency-text);
}

.import-status--no-date,
.import-status--duplicate {
  background: var(--cue-bg);
  color: var(--muted);
}

.import-err {
  color: var(--urgency-text);
  margin: 2px 0;
}

.import-warn {
  color: var(--muted);
  margin: 2px 0;
}

.import-summary {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.import-summary-line {
  font-size: 0.95rem;
  margin: 14px 0;
}

.import-error-list {
  margin: 10px 0 20px;
  padding-left: 22px;
  color: var(--urgency-text);
}

.form-help {
  color: var(--muted);
  font-size: 0.8rem;
}

.message__close {
  font-size: 1.2rem;
  line-height: 1;
  padding: 4px 10px;
  border-radius: 50%;
  min-width: 44px;
  min-height: 44px;
  color: inherit;
}

.message__close:hover {
  background: var(--paper);
}

/* ---------- Form controls ---------- */
.form-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="tel"],
input[type="search"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  min-height: 44px;
}

.help-text {
  font-size: 0.78rem;
  color: var(--muted);
}

.errorlist {
  list-style: none;
  color: var(--terracotta);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ---------- Auth (users: login/register/reset) ---------- */
.auth-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.auth-card .card__body {
  padding: 36px 32px;
  gap: 14px;
}

.auth-card h1 {
  font-size: 1.55rem;
  margin: 4px 0 10px;
}

.auth-card form {
  margin-top: 6px;
}

.auth-links {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 10px;
}

.auth-links a {
  color: var(--green-dark);
  font-weight: 600;
}

/* Drugi sposób wejścia (magic link staffa) — oddzielony kreską, wyraźnie „inny”. */
.auth-alt {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.auth-subtitle {
  font-family: var(--font-head);
  font-size: 1.05rem;
  margin: 0 0 6px;
}

.auth-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 12px;
}

/* ---------- Strony błędów (404/500) ---------- */
.error-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
  text-align: center;
}

.error-code {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(4rem, 10vw, 8rem);
  line-height: 1;
  color: var(--green-dark);
  margin-bottom: 16px;
}

.error-text {
  max-width: 46ch;
  margin: 12px auto 28px;
}

/* ---------- Sheet / modal (docelowe <dialog>, styl z demo) ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(36, 48, 41, 0.55);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.sheet {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(36, 48, 41, 0.3);
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--white);
}

.sheet-head h2 {
  font-size: 1.15rem;
}

.sheet-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--muted);
  transition: background 0.2s;
}

.sheet-close:hover {
  background: var(--paper);
  color: var(--ink);
}

.sheet-body {
  padding: 24px;
}

@media (max-width: 560px) {
  .backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .sheet {
    max-width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 92vh;
  }
}

/* ---------- section-head / linki (używane też przez users/pages) ---------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.section-head h1,
.section-head h2,
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin-top: 8px;
}

.section-num {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--green-dark);
}

.section-intro {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 60ch;
}

.link-more {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--green-dark);
  text-decoration: none;
  border-bottom: 2px solid var(--green);
  padding-bottom: 2px;
}

.link-more:hover {
  color: var(--ink);
}

.content {
  max-width: 70ch;
}

.content p + p {
  margin-top: 1em;
}

/* ---------- Strony CMS (Page): /polityka-prywatnosci, /kontakt ---------- */
.page-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin: 10px 0 24px;
}

.page-content {
  margin-top: 4px;
}

.page-content h2 {
  font-size: 1.45rem;
  margin: 2.2em 0 0.6em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--line, rgba(0, 0, 0, 0.1));
}

.page-content h3 {
  font-size: 1.12rem;
  margin: 1.8em 0 0.5em;
}

.page-content p {
  margin: 0 0 1.1em;
}

.page-content ul {
  margin: 0 0 1.2em;
  padding-left: 1.3em;
}

.page-content li {
  margin-bottom: 0.45em;
}

.page-content a {
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--green);
}

.page-content a:hover {
  color: var(--ink);
}

/* Przyciski wewnątrz treści CMS: .page-content a (0-1-1) nadpisywał
   .btn-primary (0-1-0) — czarny tekst + underline na zielonym tle.
   Podnosimy specyficzność, żeby btn wyglądał jak btn. */
.page-content a.btn,
.page-content a.btn-primary {
  color: var(--white);
  text-decoration: none;
}

.page-content a.btn:hover,
.page-content a.btn-primary:hover {
  color: var(--white);
}

.page-content strong {
  font-weight: 700;
}

.page-content h2:first-child,
.page-content h3:first-child {
  margin-top: 0;
}

/* ---------- Event detail (wydarzenie) ---------- */
.event-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin: 10px 0 6px;
}

.event-facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin: 14px 0 24px;
  font-size: 0.95rem;
  color: var(--muted);
}

.event-facts strong {
  color: var(--ink);
  font-weight: 600;
}

/* 2026-09-10: .event-hero-img usunięty — zdjęcia wydarzeń poza prezentacją */

.event-lead {
  background: var(--green-soft);
  border-left: 4px solid var(--green-dark);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 0 0 24px;
  font-size: 1.05rem;
  color: var(--lead);
}

.event-source {
  margin-top: 28px;
}

/* ---------- Karta wyróżniona (najbliższy apartament) ---------- */
.card--highlight {
  background: var(--green-soft);
  border: 2px solid var(--green-dark);
}

.card--highlight .card__body {
  padding: 26px 28px;
  gap: 10px;
}

.card__actions {
  margin-top: 8px;
}

/* ---------- Dystans wydarzenie ↔ apartament (karty, filtr HTMX, widget) ---------- */
.distance-line {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green-dark);
}

/* ---------- Stan pusty (listy wydarzeń) ---------- */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 24px;
  border: 2px dashed var(--line);
  border-radius: var(--radius-lg);
  max-width: 560px;
  margin: 0 auto;
}

.empty-state__title {
  font-size: 1.3rem;
}

.empty-state__text {
  color: var(--muted);
  margin: 8px 0 20px;
}

/* ---------- HTMX indicator (hx-indicator) ---------- */
.htmx-indicator {
  display: block;
  margin: 0 0 16px;
  font-size: 0.85rem;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.2s ease-in;
}

.htmx-request .htmx-indicator,
.htmx-indicator.htmx-request {
  opacity: 1;
}

/* ---------- Paginacja (partials/_pagination.html) ---------- */
.pagination {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
  font-size: 0.9rem;
  color: var(--muted);
}

.pagination a {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--green-dark);
  text-decoration: none;
  border-bottom: 2px solid var(--green);
  padding-bottom: 2px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.pagination a:hover {
  color: var(--ink);
}

/* ---------- FAQ (strona /faq/, panel: /panel/faq/) ---------- */
.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  padding: 0;
  overflow: hidden;
}

.faq-item__question {
  cursor: pointer;
  list-style: none;
  padding: 16px 20px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink);
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.faq-item__question::-webkit-details-marker {
  display: none;
}

.faq-item__question::before {
  content: "+";
  color: var(--green-dark);
  font-weight: 700;
}

.faq-item[open] .faq-item__question::before {
  content: "–";
}

.faq-item__question:hover {
  background: var(--green-soft);
}

.faq-item__answer {
  padding: 0 20px 18px;
  color: var(--muted);
}

.faq-item__answer > :first-child {
  margin-top: 0;
}

.faq-item__answer > :last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Panel klienta — /konto/ (gość) · port prototypu 1:1, tokeny Beskid Calm
   Klasy 1:1 z docs/design/panel-klienta/prototyp/index.html; zero nowych hexów
   (jedyne wartości spoza tokenów: gradient kart, identyczny z prototypem,
   i #33463a w hoverze .btn-primary, który JUŻ jest w tym pliku).
   ========================================================================== */

.icn {
  width: 18px;
  height: 18px;
  flex: none;
}

/* ---------- Layout gościa: jedna kolumna 640 px ---------- */
.panel-main {
  padding: var(--sp-6) var(--sp-4) var(--sp-8);
  display: grid;
  justify-content: center;
}

.panel-col {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

/* ---------- Karta pobytu ---------- */
.stay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stay-title {
  font-size: 1.55rem;
  margin: 4px 0 8px;
}

.stay-retry {
  margin-top: var(--sp-3);
}

.stay-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.stay-card__media {
  height: 80px;
  /* gradient z prototypu: green-soft → #dfe8dc (wartość spoza tokenów, LOCKED w prototypie) */
  background: linear-gradient(135deg, var(--green-soft), #dfe8dc);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-dark);
}

.stay-card__media svg {
  width: 32px;
  height: 32px;
}

@media (min-width: 768px) {
  .stay-card__media {
    height: 120px;
  }

  .stay-card__media svg {
    width: 44px;
    height: 44px;
  }
}

.stay-card__body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stay-card__title {
  font-size: 1.3rem;
  margin: 0;
}

.stay-card__meta {
  color: var(--lead);
  font-size: 0.95rem;
}

.stay-card__loc {
  color: var(--muted);
  font-size: 0.88rem;
}

.detail-list {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

.detail-list details {
  border-bottom: 1px solid var(--line);
}

.detail-list summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--green-dark);
  min-height: 44px;
}

.detail-list summary::-webkit-details-marker {
  display: none;
}

.detail-list summary::before {
  content: "+";
  font-weight: 700;
  transition: transform 0.2s;
}

.detail-list details[open] summary::before {
  content: "–";
}

.detail-list__content {
  padding: 0 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------- Badge statusu (PER POZYCJA) ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid;
  flex: none;
}

.badge--confirmed {
  border-color: var(--green-dark);
  color: var(--green-dark);
  background: var(--green-soft);
}

.badge--cancelled {
  border-color: var(--urgency-text);
  color: var(--urgency-text);
  background: var(--urgency-bg);
}

.badge--pending {
  border-color: var(--line);
  color: var(--muted);
  background: var(--white);
}

.badge svg {
  width: 14px;
  height: 14px;
  flex: none;
}

/* ---------- Sekcje panelu ---------- */
.panel-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}

.panel-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--sp-3);
}

.panel-section__head h2 {
  font-size: 1.15rem;
}

.panel-section__link {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.85rem;
  min-height: 44px;
  color: var(--green-dark);
}

/* ---------- Wątek wiadomości ---------- */
.thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px;
}

.bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  line-height: 1.5;
}

.bubble p {
  margin: 0;
}

.bubble--guest {
  background: var(--green-soft);
  border: 1px solid var(--line);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.bubble--host {
  background: var(--white);
  border: 1px solid var(--line);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.bubble--note {
  background: var(--paper);
  border: 1px dashed var(--line);
  align-self: center;
  color: var(--muted);
  font-size: 0.82rem;
  max-width: 100%;
}

.bubble__meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
}

.attachment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  min-height: 44px;
}

.composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: var(--sp-3);
}

.composer label {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
}

.composer textarea {
  width: 100%;
  min-height: 88px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1rem; /* 16 px — brak auto-zoom na iOS */
  resize: vertical;
}

.composer__info {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Podgląd staffa (read-only): notatka w miejscu kompozytora — bez formularza. */
.composer--readonly {
  font-size: 0.85rem;
  color: var(--muted);
}

.composer__actions {
  display: flex;
  justify-content: flex-end;
}

.ota-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: var(--green-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.85rem;
  color: var(--lead);
}

.ota-note a {
  color: var(--green-dark);
  font-weight: 600;
}

/* ---------- Bannery / empty / skeleton ---------- */
.banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.88rem;
  border: 1px solid;
  margin-bottom: var(--sp-3);
}

.banner--info {
  background: var(--green-soft);
  border-color: var(--line);
  color: var(--lead);
}

.banner--warn,
.banner--error {
  background: var(--urgency-bg);
  border-color: var(--urgency-text);
  color: var(--urgency-text);
}

.banner b {
  font-weight: 700;
}

.empty-state__icon {
  color: var(--green-dark);
}

.skeleton {
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, var(--paper) 25%, var(--green-soft) 50%, var(--paper) 75%);
  background-size: 200% 100%;
  animation: konto-shimmer 1.4s infinite;
}

@keyframes konto-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.skeleton--card {
  height: 420px;
}

.skeleton--bubble {
  height: 64px;
  max-width: 70%;
}

@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
  }
}

/* ---------- Warianty przycisku panelu ---------- */
.btn--sm {
  padding: 8px 16px;
  min-height: 44px;
  font-size: 0.85rem;
}

/* --- Panel klienta: notka pod statusem (oczekująca / anulowana) --- */
.stay-note {
  margin: var(--sp-2) 0 0;
  font-size: .88rem;
  color: var(--muted);
}
.stay-note--warn { color: var(--urgency-text); }
