/* Boczna16 – Portal Mieszkańca | paleta: #513f3b + #fffcdf */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&family=Raleway:wght@600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Brązy ── */
  --brown-dark:   #2d2220;
  --brown:        #3d2e2b;
  --brown-mid:    #513f3b;
  --brown-light:  #614e4a;
  --brown-border: rgba(255,252,223,.18);

  /* ── Tekst ── */
  --cream:        #fffcdf;
  --cream-dim:    #d4c9a8;
  --cream-muted:  #9a8b6e;

  /* ── Akcenty ── */
  --teal:         #2a7a6d;
  --teal-h:       #35998a;
  --gold:         #c4a540;
  --gold-h:       #d4b550;

  /* ── Semantyczne ── */
  --danger:       #e05555;
  --danger-bg:    rgba(224,85,85,.18);
  --danger-brd:   rgba(224,85,85,.35);
  --success:      #4caf82;
  --success-bg:   rgba(76,175,130,.18);
  --success-brd:  rgba(76,175,130,.35);
  --warning:      #d4a830;
  --warning-bg:   rgba(212,168,48,.18);
  --warning-brd:  rgba(212,168,48,.35);
  --info-bg:      rgba(255,252,223,.07);
  --info-brd:     rgba(255,252,223,.25);

  /* ── Formularze (jasne tło dla czytelności) ── */
  --inp-bg:       #f5efdf;
  --inp-text:     #2d2220;
  --inp-brd:      #b8a888;
  --inp-focus:    var(--gold);

  /* ── Layout ── */
  --r:  6px;
  --rl: 10px;
  --sh:  0 2px 10px rgba(0,0,0,.35);
  --shm: 0 6px 20px rgba(0,0,0,.45);
  --tr:  160ms ease;
}

/* ── Base ─────────────────────────────────── */
body {
  font-family: 'Lato', system-ui, sans-serif;
  background: var(--brown-dark);
  color: var(--cream);
  line-height: 1.65;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
#app { display: flex; flex-direction: column; min-height: 100vh; }
#page-content { flex: 1; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-h); text-decoration: underline; }
h1, h2, h3 { font-family: 'Raleway', sans-serif; }

/* ── Navbar ───────────────────────────────── */
.navbar {
  background: var(--brown-mid);
  display: flex; align-items: center; gap: .75rem;
  padding: 0 1.75rem; height: 70px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 3px 12px rgba(0,0,0,.5);
  border-bottom: 1px solid var(--brown-border);
}
.logo {
  display: flex; align-items: center; gap: .65rem;
  text-decoration: none; flex-shrink: 0;
}
.logo:hover { text-decoration: none; }
.logo-img { width: 48px; height: 48px; object-fit: contain; }
.logo-text {
  font-family: 'Raleway', sans-serif;
  font-size: 1.35rem; font-weight: 800;
  color: var(--cream); letter-spacing: .5px;
}
.logo-text strong { color: var(--cream); }
.logo:hover .logo-text { color: var(--cream); }

.nav-links {
  list-style: none; display: flex; align-items: center;
  gap: .2rem; margin-left: auto;
}
.nav-links > li > a, .nav-links > li > button {
  color: var(--cream-dim);
  padding: .45rem .85rem; border-radius: var(--r);
  font-size: .9rem; font-weight: 400;
  transition: background var(--tr), color var(--tr);
  text-decoration: none; display: inline-block; cursor: pointer;
  background: none; border: none; font-family: inherit;
}
.nav-links > li > a:hover { background: rgba(255,252,223,.1); color: var(--cream); text-decoration: none; }
.nav-links > li > a.active { color: var(--cream); position: relative; }
.nav-links > li > a.active::after {
  content: ''; position: absolute; bottom: 0; left: .5rem; right: .5rem;
  height: 2px; background: var(--gold); border-radius: 2px;
}
.nav-user { display: flex; align-items: center; gap: .4rem; }
.nav-toggle {
  display: none; background: none; border: none;
  color: var(--cream); font-size: 1.6rem; cursor: pointer; margin-left: auto;
}
@media (max-width: 700px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; flex-direction: column; align-items: stretch;
    position: fixed; top: 70px; left: 0; right: 0;
    background: var(--brown-mid);
    padding: .75rem 1rem 1.25rem; gap: .2rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
    border-bottom: 1px solid var(--brown-border);
  }
  .nav-links.open { display: flex; }
  .nav-links > li > a { display: block; padding: .65rem .85rem; }
  .nav-user { flex-direction: column; align-items: stretch; padding-top: .5rem; border-top: 1px solid var(--brown-border); }
}

/* ── Layout util ──────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.py-xl  { padding-top: 2.75rem; padding-bottom: 2.75rem; }
.mt-sm  { margin-top: .5rem; }  .mt-md { margin-top: 1rem; }
.mt-lg  { margin-top: 1.5rem; } .mt-xl { margin-top: 2rem; }
.mb-md  { margin-bottom: 1rem; } .mb-lg { margin-bottom: 1.5rem; }
.ml-sm  { margin-left: .5rem; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--cream-muted); }

/* ── Buttons ──────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .55rem 1.25rem; border-radius: var(--r);
  font-size: .875rem; font-weight: 700; cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--tr), color var(--tr), border-color var(--tr), opacity var(--tr);
  text-decoration: none; white-space: nowrap; font-family: 'Lato', sans-serif;
  letter-spacing: .3px;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary  { background: var(--cream); color: var(--brown-dark); border-color: var(--cream); }
.btn-primary:hover  { background: var(--cream-dim); color: var(--brown-dark); border-color: var(--cream-dim); }

.btn-accent   { background: var(--teal);  color: var(--cream); border-color: var(--teal); }
.btn-accent:hover   { background: var(--teal-h); border-color: var(--teal-h); }

.btn-outline  { background: transparent; color: var(--cream); border-color: rgba(255,252,223,.4); }
.btn-outline:hover  { background: rgba(255,252,223,.1); border-color: var(--cream); }

.btn-ghost    { background: transparent; color: var(--cream-muted); border-color: var(--brown-border); }
.btn-ghost:hover    { background: var(--brown-light); color: var(--cream); }

.btn-danger   { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover   { opacity: .85; }

.btn-sm  { padding: .3rem .7rem;  font-size: .8rem; }
.btn-xs  { padding: .18rem .5rem; font-size: .74rem; border-radius: 4px; }
.btn-lg  { padding: .75rem 2rem;  font-size: 1rem;  letter-spacing: .5px; }
.btn-block { width: 100%; }

/* ── Cards ────────────────────────────────── */
.card {
  background: var(--brown);
  border: 1px solid var(--brown-border);
  border-radius: var(--rl); padding: 1.5rem;
  box-shadow: var(--sh);
}
.card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; color: var(--cream); }

/* ── Forms ────────────────────────────────── */
.form-group { margin-bottom: .9rem; }
.form-group label { display: block; font-size: .83rem; font-weight: 700; margin-bottom: .35rem; color: var(--cream-dim); }
.form-control {
  width: 100%; padding: .55rem .8rem;
  border: 1px solid var(--inp-brd); border-radius: var(--r);
  background: var(--inp-bg); color: var(--inp-text);
  font-size: .9rem; font-family: 'Lato', sans-serif;
  transition: border-color var(--tr), box-shadow var(--tr);
}
.form-control:focus {
  outline: none; border-color: var(--inp-focus);
  box-shadow: 0 0 0 3px rgba(196,165,64,.25);
}
.form-control::placeholder { color: #9a8870; }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .75rem; }

/* ── Alerts ───────────────────────────────── */
.alert {
  padding: .75rem 1rem; border-radius: var(--r);
  font-size: .875rem; margin-bottom: 1rem; border: 1px solid;
}
.alert-danger  { background: var(--danger-bg);  color: #f08080; border-color: var(--danger-brd); }
.alert-success { background: var(--success-bg); color: #6ed4a8; border-color: var(--success-brd); }
.alert-warning { background: var(--warning-bg); color: var(--gold); border-color: var(--warning-brd); }

.pn-idle-timer {
  display: flex; align-items: center; gap: 5px;
  margin-top: .5rem;
  font-size: .72rem; color: var(--cream-dim);
  font-variant-numeric: tabular-nums;
  transition: color .4s;
}
.pn-idle-timer::before { content: '⏱'; font-size: .75rem; }
.pn-idle-timer.pn-idle-warn {
  color: #e08060;
  animation: idle-pulse 1s ease-in-out infinite;
}
@keyframes idle-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .55; }
}
.alert-info    { background: var(--info-bg);    color: var(--cream-dim); border-color: var(--info-brd); }

/* ── Badges ───────────────────────────────── */
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.badge-primary { background: var(--info-bg);    color: var(--cream-dim); border: 1px solid var(--info-brd); }
.badge-success { background: var(--success-bg); color: #6ed4a8; }
.badge-danger  { background: var(--danger-bg);  color: #f08080; }
.badge-warning { background: var(--warning-bg); color: var(--gold); }
.badge-teal    { background: rgba(42,122,109,.18); color: #7fd3c4; border: 1px solid rgba(42,122,109,.5); }

/* ── Tables ───────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--rl); border: 1px solid var(--brown-border); box-shadow: var(--sh); }
.table { width: 100%; border-collapse: collapse; background: var(--brown); font-size: .875rem; }
.table th {
  background: var(--brown-mid);
  padding: .7rem 1rem; text-align: left;
  font-weight: 700; font-size: .75rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--cream-dim);
  border-bottom: 1px solid var(--brown-border);
}
.table th.text-right  { text-align: right; }
.table th.text-center { text-align: center; }
.table td { padding: .75rem 1rem; border-bottom: 1px solid var(--brown-border); color: var(--cream); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--brown-light); }

/* ── Page headers ─────────────────────────── */
.page-title { font-family: 'Raleway', sans-serif; font-size: 1.75rem; font-weight: 800; margin-bottom: 1.5rem; color: var(--cream); }
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem; flex-wrap: wrap; gap: .75rem;
}
.page-header .page-title { margin-bottom: 0; }
.section-title { font-family: 'Raleway', sans-serif; font-size: 1.05rem; font-weight: 700; margin: 1.75rem 0 .9rem; color: var(--cream); }

/* ── Hero ─────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background-image: url('/assets/img/onas_budynek.jpg');
  background-size: cover;
  background-position: center 40%;
  padding: 4rem 2.5rem;
  border-bottom: 1px solid var(--brown-border);
}
.hero-overlay {
  position: absolute; inset: 0;
  background: rgba(45,34,32,0.75);
}
.hero-split {
  max-width: 860px; margin: 0 auto;
  display: flex; align-items: center; gap: 1.25rem;
  position: relative; z-index: 1;
}
.hero-logo-col {
  flex-shrink: 0; width: 280px; height: 280px;
  display: flex; align-items: center; justify-content: center;
}
.hero-logo-col img { width: 100%; height: 100%; object-fit: contain; }
.hero-text-col { flex: 1; }
.hero-text-col h1 {
  font-family: 'Raleway', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900; line-height: 1;
  color: var(--cream);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-shadow: 0 2px 20px rgba(0,0,0,0.45);
}
.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.3rem); color: rgba(255,252,223,.88);
  font-weight: 400; letter-spacing: .15em;
  text-transform: uppercase; margin-top: .6rem;
  text-shadow: 0 1px 10px rgba(0,0,0,0.45);
}
@media (max-width: 600px) {
  .hero { padding: 2.5rem 1.25rem; }
  .hero-split { flex-direction: column; text-align: center; gap: 1.5rem; }
  .hero-logo-col { width: 90px; height: 90px; }
}

/* ── Aktualności ticker ───────────────────── */
.ann-ticker {
  /* 1100px (.container) minus jego padding 2×1.5rem = szerokość widocznych kart */
  max-width: calc(1100px - 3rem); margin: 1.25rem auto 0;
  background: var(--brown); border: 1px solid var(--brown-border);
  border-radius: var(--rl); overflow: hidden;
}
@media (max-width: 768px) {
  .ann-ticker { max-width: none; margin: 0; border-left: none; border-right: none; border-radius: 0; }
}
.ann-ticker-header { display: flex; align-items: center; justify-content: space-between; padding: .55rem 1.5rem; }
.ann-ticker-badge {
  background: rgba(255,252,223,.1); color: var(--cream);
  font-size: .7rem; font-weight: 700; padding: .18rem .6rem;
  border-radius: 3px; letter-spacing: .07em; text-transform: uppercase;
}
.ann-ticker-dots { display: flex; gap: 5px; }
.ann-ticker-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,252,223,.2); transition: background .3s; cursor: pointer;
}
.ann-ticker-dot.active { background: var(--cream); }
.ann-ticker-viewport { overflow: hidden; height: 250px; }
.ann-ticker-track { display: flex; transition: transform .5s ease; }
.ann-ticker-slide {
  width: 100%; flex-shrink: 0; height: 250px; box-sizing: border-box;
  display: flex; align-items: stretch; padding: 0 1.5rem 1.25rem; gap: 1.25rem;
}
.ann-slide-img {
  width: 45%; flex-shrink: 0; height: 100%;
  background: var(--brown); border-radius: 8px; border: 1px solid var(--brown);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.ann-slide-img img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.ann-slide-img i { font-size: 1.8rem; color: rgba(255,252,223,.22); }
.ann-slide-body { flex: 1; min-width: 0; height: 100%; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.ann-slide-title { font-family: 'Raleway', sans-serif; font-size: 1.15rem; font-weight: 700; color: var(--cream); line-height: 1.25; }
.ann-slide-date { font-size: .8rem; color: var(--cream-muted); }
.ann-slide-text { font-size: .95rem; color: var(--cream-dim); line-height: 1.6; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.ann-slide-more {
  display: inline-flex; align-items: center; gap: 5px; margin-top: .6rem;
  font-size: .92rem; font-weight: 700; color: var(--cream); width: fit-content;
  border-bottom: 2px solid var(--cream-dim); padding-bottom: 2px; cursor: pointer;
}
.ann-slide-more:hover { border-bottom-color: var(--cream); }
@media (max-width: 768px) {
  .ann-ticker-viewport { height: auto; }
  .ann-ticker-slide { flex-direction: column; height: auto; padding: 0 1rem 1rem; gap: .75rem; }
  .ann-slide-img { width: 100%; height: auto; min-height: 140px; max-height: 190px; }
  .ann-slide-body { height: auto; }
  .ann-slide-title { font-size: 1.05rem; }
}

/* ── Odbiór odpadów ───────────────────────── */
.oo { color: var(--cream-dim); }
.oo-head { font-size: 1.3rem; font-weight: 700; color: var(--cream); }
.oo-sub { font-size: .85rem; color: var(--cream-muted); margin: 2px 0 1.25rem; }
.oo-next {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: var(--brown-mid); border: 1px solid var(--brown-light);
  border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: 1.25rem;
}
.oo-next-day { text-align: center; flex-shrink: 0; min-width: 60px; }
.oo-next-num { font-size: 2rem; font-weight: 700; color: var(--cream); line-height: 1; font-variant-numeric: tabular-nums; }
.oo-next-mon { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--cream-muted); }
.oo-next-info { flex: 1; min-width: 170px; }
.oo-next-lbl { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--cream-muted); }
.oo-next-types { display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin-top: 6px; }
.oo-days { flex-shrink: 0; background: rgba(0,0,0,.28); border-radius: 20px; padding: 5px 14px; font-size: .82rem; color: var(--cream-dim); }
.oo-list { display: flex; flex-direction: column; }
.oo-row { display: flex; align-items: center; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--brown-border); flex-wrap: wrap; }
.oo-row:last-child { border-bottom: none; }
.oo-date { flex-shrink: 0; display: flex; align-items: baseline; gap: .35rem; min-width: 200px; font-size: .9rem; color: var(--cream); }
.oo-d-num { min-width: 1.6em; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.oo-d-mon { min-width: 2.2em; font-weight: 700; }
.oo-wday { color: var(--cream-muted); font-weight: 400; font-size: .82rem; }
.oo-types { flex: 1; display: flex; flex-wrap: wrap; gap: .5rem .9rem; }
.oo-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 700; }
.oo-empty { padding: 2.5rem 1rem; text-align: center; color: var(--cream-muted); }
.oo-empty .ti { font-size: 2rem; display: block; margin-bottom: .6rem; opacity: .6; }
.oo-note { margin-top: 1.5rem; font-size: .78rem; color: var(--cream-muted); display: flex; gap: 8px; align-items: flex-start; line-height: 1.5; }
.oo-note .ti { flex-shrink: 0; margin-top: 1px; }
.oo-note a { color: var(--cream-dim); text-decoration: underline; }
.oo-note a:hover { color: var(--cream); }

.wz-subtabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--brown-border); margin-bottom: 1.25rem; flex-wrap: wrap; }
.wz-st { background: none; border: none; cursor: pointer; padding: .55rem .9rem; font-size: .88rem; color: var(--cream-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; align-items: center; gap: 6px; font-family: inherit; }
.wz-st:hover { color: var(--cream-dim); }
.wz-st.on { color: var(--cream); border-bottom-color: var(--cream); font-weight: 700; }
.wz-intro { font-size: .88rem; line-height: 1.65; color: var(--cream-dim); margin-bottom: 1.25rem; }
.wz-pk { background: var(--brown); border: 1px solid var(--brown-border); border-radius: 9px; padding: .9rem 1.1rem; margin-bottom: .7rem; }
.wz-pk-t { font-size: .95rem; font-weight: 700; color: var(--cream); display: flex; align-items: center; gap: 7px; }
.wz-pk-t .ti { color: #9cbf6a; }
.wz-pk-a { font-size: .83rem; color: var(--cream-muted); margin: 4px 0 0 1.6rem; }
.wz-pk-h { font-size: .83rem; color: var(--cream-dim); margin: 5px 0 0 1.6rem; display: flex; align-items: center; gap: 6px; }
.wz-fr { border: 1px solid var(--brown-border); border-radius: 9px; overflow: hidden; margin-bottom: .85rem; }
.wz-fr-h { padding: .6rem 1rem; font-weight: 700; font-size: .92rem; display: flex; align-items: center; gap: 8px; color: #241b15; flex-wrap: wrap; }
.wz-fr-kolor { font-size: .74rem; font-weight: 400; opacity: .82; margin-left: auto; }
.wz-fr-b { display: grid; grid-template-columns: 1fr 1fr; }
.wz-fr-col { padding: .8rem 1rem; font-size: .83rem; }
.wz-fr-col:first-child { border-right: 1px solid var(--brown-border); }
.wz-fr-lbl { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 5px; }
.wz-fr-lbl.ok { color: #8fc47f; }
.wz-fr-lbl.no { color: #d99a8a; }
.wz-fr-b ul { margin: 0; padding-left: 1.1rem; line-height: 1.5; color: var(--cream-dim); }
.wz-fr-b li { margin: .2rem 0; }
.wz-fr-note { padding: .9rem 1rem; font-size: .85rem; color: var(--cream-dim); line-height: 1.6; }
@media (max-width: 600px) {
  .wz-fr-b { grid-template-columns: 1fr; }
  .wz-fr-col:first-child { border-right: none; border-bottom: 1px solid var(--brown-border); }
}

/* ── Feature cards ────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.1rem; }
.feature-card {
  display: block; text-decoration: none; color: inherit; cursor: pointer;
  background: var(--brown);
  border: 1px solid var(--brown-border);
  border-top: 3px solid var(--cream);
  border-radius: var(--rl); padding: 1.75rem 1.5rem;
  text-align: center; box-shadow: var(--sh);
  transition: transform var(--tr), box-shadow var(--tr), border-top-color var(--tr);
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shm); border-top-color: var(--gold); text-decoration: none; }
.feature-card:hover h3, .feature-card:hover p { color: var(--gold); }
.feature-icon { font-size: 2.2rem; margin-bottom: .75rem; }
.feature-card h3 { font-family: 'Raleway', sans-serif; font-size: 1.05rem; font-weight: 700; margin-bottom: .4rem; color: var(--cream); }
.feature-card p { color: var(--cream-dim); font-size: .87rem; line-height: 1.55; }

/* ── Dashboard ────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.75rem; }
.stat-card {
  background: var(--brown); border: 1px solid var(--brown-border);
  border-left: 4px solid var(--brown-light);
  border-radius: var(--rl); padding: 1.1rem 1.25rem; box-shadow: var(--sh);
}
.stat-card.ok   { border-left-color: var(--success); }
.stat-card.warn { border-left-color: var(--warning); }
.stat-card.info { border-left-color: var(--gold); }
.stat-value { font-size: 1.85rem; font-weight: 900; color: var(--cream); line-height: 1; margin-bottom: .2rem; font-family: 'Raleway', sans-serif; }
.stat-label { font-size: .8rem; color: var(--cream-muted); margin-bottom: .5rem; }
.stat-link  { font-size: .8rem; color: var(--gold); }
.stat-link:hover { color: var(--gold-h); }

.quick-nav { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.quick-nav-item {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.2rem;
  background: var(--brown); border: 1px solid var(--brown-border);
  border-radius: var(--rl); font-size: .875rem; font-weight: 700;
  color: var(--cream); text-decoration: none; box-shadow: var(--sh);
  transition: background var(--tr), border-color var(--tr), transform var(--tr);
}
.quick-nav-item:hover { background: var(--brown-light); border-color: var(--gold); transform: translateY(-2px); text-decoration: none; color: var(--cream); }

/* ── Announcements ────────────────────────── */
.ann-card {
  background: var(--brown); border: 1px solid var(--brown-border);
  border-radius: var(--rl); padding: 1.2rem 1.5rem;
  margin-bottom: .875rem; box-shadow: var(--sh);
}
.ann-card.pinned { border-left: 4px solid var(--cream-dim); }
.ann-card-header { display: flex; align-items: flex-start; gap: .6rem; margin-bottom: .35rem; flex-wrap: wrap; }
.ann-card-header h3 { font-size: 1rem; font-weight: 700; flex: 1; margin: 0; color: var(--cream); }
.ann-body { color: var(--cream-dim); font-size: .875rem; margin-bottom: .45rem; line-height: 1.65; white-space: pre-wrap; }
.meta { font-size: .78rem; color: var(--cream-muted); }

/* Ogłoszenie z formatowaniem HTML (wpis z nagłówkami, listą, grafiką) */
.ann-rich { white-space: normal; color: var(--cream-dim); font-size: .9rem; line-height: 1.7; }
.ann-rich .ann-subtitle { font-size: 1rem; font-weight: 700; color: var(--cream); margin: .2rem 0 .7rem; }
.ann-rich h3 { font-size: .95rem; font-weight: 700; color: var(--cream); margin: 1.15rem 0 .4rem; }
.ann-rich p  { margin: .55rem 0; }
.ann-rich ul, .ann-rich ol { list-style-position: inside; padding-left: .2rem; margin: .5rem 0; }
.ann-rich li { padding-left: .2rem; }
.ann-rich li { margin: .35rem 0; }
.ann-img-box {
  background: var(--brown); border: 1px solid var(--brown); border-radius: 10px;
  padding: 1rem; margin: .7rem 0 .85rem; text-align: center;
}
.ann-img-box img { max-width: 100%; height: auto; border-radius: 6px; display: block; margin: 0 auto; }
/* Układ 50/50: zdjęcie float 50%, tekst opływa je i schodzi na 100% pod spodem */
.ann-content::after { content: ''; display: block; clear: both; }
.ann-img-box.ann-img-float { float: left; width: 50%; margin: .15rem 1.4rem .6rem 0; }
@media (max-width: 640px) {
  .ann-img-box.ann-img-float { float: none; width: 100%; margin: .7rem 0 .85rem; }
}
/* Powiększenie zdjęcia ogłoszenia na cały ekran */
.ann-lightbox { position: fixed; inset: 0; z-index: 10000; background: rgba(20,14,13,.93); display: flex; align-items: center; justify-content: center; padding: 1.5rem; cursor: zoom-out; }
.ann-lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 8px; box-shadow: 0 10px 50px rgba(0,0,0,.6); }
.ann-lightbox-x { position: fixed; top: 1rem; right: 1.1rem; width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; border: 1px solid rgba(255,255,255,.25); font-size: 1.4rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ann-lightbox-x:hover { background: rgba(0,0,0,.7); }

/* Akcje zarządcy na karcie ogłoszenia (Edytuj / Usuń) */
.ann-card-actions { margin-left: auto; display: flex; gap: .35rem; flex-shrink: 0; }

/* Podgląd zdjęcia w formularzu ogłoszenia */
.ann-img-prev { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; margin-top: .5rem; }
.ann-img-prev:empty { display: none; margin-top: 0; }
.ann-img-prev img { max-width: 240px; max-height: 160px; border-radius: 8px; border: 1px solid var(--brown-border); display: block; }

/* ── Kontrahenci (Finanse) ─────────────────────────────── */
.kt-sec { display: flex; align-items: baseline; gap: .5rem; margin: 1.4rem 0 .7rem; }
.kt-sec h3 { margin: 0; font-size: 1.05rem; color: var(--cream); }
.kt-count { font-size: .72rem; color: var(--cream-muted); background: rgba(255,252,223,.07); padding: 1px 9px; border-radius: 20px; }
.kt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: .75rem; }
.kt-card { background: var(--brown-light); border: 1px solid var(--brown-border); border-radius: 11px; padding: .8rem .85rem; }
.kt-card-top { display: flex; align-items: center; gap: .5rem; margin-bottom: .45rem; }
.kt-lokal { font-weight: 800; font-size: .8rem; letter-spacing: .4px; color: var(--cream-dim); }
.kt-owner { font-size: 1.02rem; font-weight: 700; color: var(--cream); margin-bottom: .2rem; }
.kt-contact { font-size: .76rem; color: var(--cream-dim); word-break: break-word; }
.kt-note { margin-top: .5rem; padding-top: .5rem; border-top: 1px dashed var(--brown-border); display: flex; flex-wrap: wrap; gap: .3rem; }
.kt-pill { font-size: .62rem; letter-spacing: .5px; text-transform: uppercase; padding: 2px 8px; border-radius: 20px; white-space: nowrap; font-weight: 600; }
.kt-pill-ok { background: rgba(42,122,109,.28); color: #7fc9ba; border: 1px solid rgba(53,153,138,.5); }
.kt-pill-warn { background: rgba(224,165,131,.16); color: #e0a583; border: 1px solid rgba(224,165,131,.45); }
.kt-pill-neu { background: rgba(255,252,223,.07); color: var(--cream-dim); border: 1px solid var(--brown-border); }
.kt-num { font-variant-numeric: tabular-nums; color: var(--cream-dim); }

/* ── Lokale (współwłaściciele + użytkownicy, z edycją) ── */
.lc-list { display: flex; flex-direction: column; gap: .6rem; }
.lc { background: var(--brown-light); border: 1px solid var(--brown-border); border-radius: 12px; padding: .85rem 1rem; }
.lc.editing { border-color: rgba(53,153,138,.55); box-shadow: 0 0 0 1px rgba(53,153,138,.25); }
.lc-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .55rem; }
.lc-title { font-size: 1.05rem; font-weight: 800; letter-spacing: .3px; color: var(--cream); }
.lc-meta, .lc-actions { margin-left: auto; display: flex; gap: .4rem; align-items: center; }
.lc-sub { font-size: .66rem; letter-spacing: .8px; text-transform: uppercase; color: var(--cream-muted); margin: .55rem 0 .35rem; display: flex; align-items: center; }
.lc-row { display: grid; grid-template-columns: minmax(120px,1.4fr) 60px minmax(150px,1.7fr) auto; gap: .5rem 1rem; align-items: center; padding: .28rem .55rem; border-radius: 7px; }
.lc-row.own { background: rgba(255,252,223,.04); }
.lc-row + .lc-row { margin-top: .15rem; }
.lc-name { font-weight: 600; font-size: .9rem; color: var(--cream); }
.lc-share { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .88rem; color: #7fc9ba; text-align: right; }
.lc-email { font-size: .8rem; color: var(--cream-dim); word-break: break-word; }
.lc-muted { color: var(--cream-muted); font-style: italic; }
.kt-pill-udzial { background: rgba(255,252,223,.08); color: var(--cream-dim); border: 1px solid var(--brown-border); }
.ed-row { display: grid; grid-template-columns: minmax(120px,1.3fr) 84px minmax(150px,1.6fr) auto; gap: .5rem; align-items: center; margin-bottom: .4rem; }
.inp { background: rgba(255,252,223,.06); border: 1px solid var(--brown-border); color: var(--cream); border-radius: 6px; padding: .34rem .5rem; font-size: .85rem; width: 100%; font-family: inherit; }
.inp::placeholder { color: var(--cream-muted); }
.inp:focus { outline: 1px solid #35998a; border-color: #35998a; }
.share-wrap { position: relative; }
.share-wrap .pct { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); color: var(--cream-muted); font-size: .8rem; pointer-events: none; }
.share-wrap .inp { padding-right: 1.4rem; text-align: right; font-variant-numeric: tabular-nums; }
.type-sel { background: var(--brown-mid); border: 1px solid var(--brown-border); color: var(--cream); border-radius: 6px; padding: .34rem .4rem; font-size: .82rem; font-family: inherit; }
.btn-sm { padding: .34rem .8rem; font-size: .82rem; }
.btn-edit { background: transparent; color: #7fc9ba; border: 1px solid rgba(53,153,138,.4); border-radius: 7px; padding: .3rem .7rem; font-size: .78rem; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; }
.btn-edit:hover { background: rgba(42,122,109,.15); }
.btn-add { margin-left: auto; background: rgba(42,122,109,.2); color: #7fc9ba; border: 1px solid rgba(53,153,138,.4); border-radius: 20px; padding: .2rem .7rem; font-size: .72rem; font-weight: 600; cursor: pointer; }
.btn-del { background: transparent; border: 1px solid rgba(224,165,131,.4); color: #e0a583; border-radius: 6px; padding: .3rem .55rem; font-size: .75rem; cursor: pointer; white-space: nowrap; }
.btn-del:hover { background: rgba(224,165,131,.12); }
.sum { font-size: .78rem; padding: 2px 9px; border-radius: 20px; font-weight: 600; }
.sum-ok { background: rgba(42,122,109,.25); color: #7fc9ba; border: 1px solid rgba(53,153,138,.5); }
.sum-warn { background: rgba(224,165,131,.16); color: #e0a583; border: 1px solid rgba(224,165,131,.45); }
/* Historia lokalu */
.hist { margin-top: .7rem; border-top: 1px dashed var(--brown-border); padding-top: .5rem; }
.hist-sub { font-size: .66rem; letter-spacing: .8px; text-transform: uppercase; color: var(--cream-muted); margin-bottom: .35rem; display: flex; align-items: center; gap: .4rem; }
.hrow { display: grid; grid-template-columns: auto minmax(110px,1.3fr) auto minmax(80px,auto) auto; gap: .4rem .9rem; align-items: center; padding: .22rem .55rem; opacity: .85; }
.hrow .ic { color: var(--cream-muted); }
.hname { font-size: .86rem; color: var(--cream-dim); }
.hrole { font-size: .68rem; color: var(--cream-muted); text-transform: uppercase; letter-spacing: .4px; }
.hperiod { font-size: .78rem; color: var(--cream-muted); font-variant-numeric: tabular-nums; }
.pill-src { background: rgba(255,252,223,.06); color: var(--cream-muted); border: 1px solid var(--brown-border); }

/* ── E-mail: klient poczty (foldery poziomo) ── */
.mbox-top { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .9rem; }
.mbox-folders { display: flex; gap: .3rem; flex-wrap: wrap; }
.mbox-fold { background: transparent; border: 1px solid var(--brown-border); color: var(--cream-dim); border-radius: 20px; padding: .4rem .9rem; font-size: .85rem; cursor: pointer; font-family: inherit; }
.mbox-fold:hover { color: var(--cream); }
.mbox-fold.active { background: var(--brown-light); color: var(--cream); border-color: var(--cream-dim); font-weight: 600; }
.mbox-webmail { color: var(--cream-muted); margin-left: auto; padding: .3rem; font-size: 1.1rem; }
.mbox-webmail:hover { color: var(--cream); }
.mbox-compose { background: var(--teal); color: var(--cream); border: none; border-radius: 20px; padding: .45rem 1rem; font-size: .85rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; font-family: inherit; }
.mbox-compose:hover { background: var(--teal-h); }
.mbox-podpisy { margin-left: auto; background: transparent; border: 1px solid var(--brown-border); color: var(--cream-dim); border-radius: 20px; padding: .4rem .9rem; font-size: .85rem; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: .4rem; }
.mbox-podpisy:hover { color: var(--cream); border-color: var(--cream-dim); }
.sig-item { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .55rem .7rem; border: 1px solid var(--brown-border); border-radius: 8px; margin-bottom: .5rem; background: rgba(255,252,223,.03); }
.mbox-list { background: var(--brown); border: 1px solid var(--brown-border); border-radius: 10px; overflow: hidden; }
.mbox-msg { display: grid; grid-template-columns: minmax(120px,1.1fr) 2fr auto; gap: .9rem; align-items: center; padding: .6rem .9rem; border-bottom: 1px solid rgba(255,252,223,.07); cursor: pointer; }
.mbox-msg:last-child { border-bottom: none; }
.mbox-msg:hover { background: rgba(255,252,223,.03); }
.mbox-from, .mbox-subj { font-size: .86rem; color: var(--cream-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbox-msg.unread .mbox-from, .mbox-msg.unread .mbox-subj { color: var(--cream); font-weight: 700; }
.mbox-date { font-size: .76rem; color: var(--cream-muted); white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.mbox-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #7fc9ba; margin-right: .4rem; vertical-align: middle; }
.mbox-empty { padding: 2.5rem 1rem; text-align: center; color: var(--cream-muted); background: var(--brown); border: 1px solid var(--brown-border); border-radius: 10px; }
.mbox-pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: .8rem; font-size: .82rem; color: var(--cream-dim); }
.mbox-read { background: var(--brown); border: 1px solid var(--brown-border); border-radius: 10px; padding: 1rem 1.2rem; }
.mbox-read-bar { display: flex; align-items: center; gap: .5rem; margin-bottom: .9rem; flex-wrap: wrap; }
.mbox-read-actions { margin-left: auto; display: flex; gap: .4rem; }
.mbox-read-subj { font-size: 1.1rem; font-weight: 700; color: var(--cream); margin-bottom: .3rem; }
.mbox-read-meta { font-size: .8rem; color: var(--cream-muted); margin-bottom: .9rem; padding-bottom: .9rem; border-bottom: 1px solid var(--brown-border); }
.mbox-text { white-space: pre-wrap; word-break: break-word; font-family: inherit; color: var(--cream-dim); font-size: .9rem; line-height: 1.6; margin: 0; }
.mbox-frame { width: 100%; height: 60vh; border: none; border-radius: 8px; background: #fff; }
.mbox-modal { position: fixed; inset: 0; background: rgba(20,14,13,.75); display: flex; align-items: center; justify-content: center; z-index: 9998; padding: 1rem; }
.mbox-modal-box { background: var(--brown); border: 1px solid var(--brown-border); border-radius: 12px; width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto; padding: 1.2rem 1.4rem; }
.mbox-modal-head { display: flex; align-items: center; margin-bottom: .8rem; }
.mbox-modal-head h3 { margin: 0; font-size: 1.1rem; color: var(--cream); }
.mbox-x { margin-left: auto; background: none; border: none; color: var(--cream-muted); font-size: 1.05rem; cursor: pointer; }
.mbox-modal-foot { display: flex; gap: .5rem; margin-top: .5rem; }
.mbox-att { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.mbox-att-chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; color: var(--cream-dim); background: rgba(255,252,223,.06); border: 1px solid var(--brown-border); border-radius: 20px; padding: .2rem .7rem; }
.mbox-att-chip button { background: none; border: none; color: var(--cream-muted); cursor: pointer; font-size: .8rem; padding: 0; line-height: 1; }
.mbox-att-chip button:hover { color: #e0a583; }
@media (max-width: 768px) { .mbox-msg { grid-template-columns: 1fr auto; } .mbox-subj { grid-column: 1 / -1; } }
@media (max-width: 620px) {
  .lc-row { grid-template-columns: 1fr auto; }
  .lc-email { grid-column: 1 / -1; }
  .ed-row { grid-template-columns: 1fr 84px; }
  .ed-row .inp.email, .ed-row .btn-del, .ed-row .type-sel { grid-column: 1 / -1; }
}

/* ── Documents ────────────────────────────── */
.doc-tabs-bar {
  display: flex; gap: 2px; flex-wrap: wrap;
  border-bottom: 1px solid var(--brown-border);
  margin-bottom: 1.25rem;
}
.doc-tab-btn {
  background: none; border: none; cursor: pointer;
  padding: .55rem 1.1rem;
  font-size: .82rem; font-family: inherit;
  color: var(--cream-muted);
  border-bottom: 2px solid transparent;
  display: flex; align-items: center; gap: .4rem;
  transition: color .15s;
}
.doc-tab-btn:hover { color: var(--cream); }
.doc-tab-btn.active { color: var(--cream); border-bottom-color: var(--gold); }

.doc-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.25rem; }
.doc-year-label { font-size: .72rem; color: var(--cream-muted); text-transform: uppercase; letter-spacing: .5px; margin: .55rem 0 -.05rem .15rem; font-weight: 600; }
.doc-year-label:first-child { margin-top: 0; }
.doc-item {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: .85rem 1.2rem;
  background: var(--brown); border: 1px solid var(--brown-border);
  border-radius: var(--r); box-shadow: var(--sh);
}
.doc-icon { font-size: 1.4rem; flex-shrink: 0; }
.doc-info { flex: 1; min-width: 0; }
.doc-title { font-weight: 700; font-size: .875rem; color: var(--cream); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-meta  { font-size: .78rem; color: var(--cream-muted); }
.doc-item .btn { flex-shrink: 0; }
.doc-item-text { align-items: flex-start; flex-wrap: wrap; }

/* Artykuł dokumentu (statut) — treść widoczna od razu */
.doc-article {
  background: var(--brown); border: 1px solid var(--brown-border);
  border-radius: var(--r); box-shadow: var(--sh); padding: 1.5rem 2rem;
}
@media (max-width: 768px) { .doc-article { padding: 1.25rem; } }
.doc-article-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem;
}
.doc-article-titlewrap { min-width: 0; }
.doc-article-title { font-weight: 700; font-size: 1.15rem; color: var(--cream); }
.doc-article-actions { display: flex; gap: .35rem; flex-shrink: 0; }
.doc-metabox {
  display: flex; flex-wrap: wrap; gap: .4rem 1.75rem; justify-content: center;
  padding: .75rem 1rem; margin-bottom: 1.5rem;
  background: rgba(0,0,0,.18); border: 1px solid var(--brown-border); border-radius: 8px;
  font-size: .82rem; color: var(--cream-muted);
}
.doc-metabox b { color: var(--cream); font-weight: 700; }

/* ── Deklaracje (per lokal, roczniki) ── */
.dekl-intro { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.dekl-note { font-size: .82rem; color: var(--cream-dim); margin: 0; max-width: 52ch; line-height: 1.5; }
.dekl-apt { background: var(--brown); border: 1px solid var(--brown-border); border-radius: 10px; padding: .85rem 1rem; margin-bottom: .8rem; }
.dekl-apt-head { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .95rem; color: var(--cream); margin-bottom: .6rem; }
.dekl-apt-head .ti { color: #e0a583; }
.dekl-item { border: 1px solid var(--brown-border); border-radius: 9px; padding: .7rem .8rem; margin-bottom: .6rem; }
.dekl-item:last-child { margin-bottom: 0; }
.dekl-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
.dekl-item-title { font-size: .84rem; font-weight: 700; color: var(--cream); line-height: 1.35; }
.dekl-row { display: flex; align-items: center; gap: .6rem; background: var(--brown-light); border-radius: 7px; padding: .45rem .7rem; margin-top: .45rem; }
.dekl-ic-pdf { font-size: 1.4rem; color: #e0a583; flex-shrink: 0; }
.dekl-ic-dig { font-size: 1.4rem; color: #5dcaa5; flex-shrink: 0; }
.dekl-row-lab { flex: 1; min-width: 0; font-size: .82rem; color: var(--cream-dim); }
.dekl-row-lab b { color: var(--cream); font-weight: 600; }
.dekl-mini { background: transparent; border: 1px solid var(--brown-border); color: var(--cream-dim); border-radius: 6px; padding: .25rem .6rem; font-size: .74rem; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font-family: inherit; white-space: nowrap; flex-shrink: 0; }
.dekl-mini:hover { color: var(--cream); border-color: var(--cream-dim); }
.dekl-mini-del { border-color: rgba(224,82,82,.4); color: #e07070; }
.dekl-mini-del:hover { background: rgba(224,82,82,.12); border-color: rgba(224,82,82,.5); }
.dekl-digital { background: var(--brown-dark); border: 1px solid var(--brown-border); border-radius: 8px; padding: 1rem 1.15rem; margin-top: .5rem; font-size: .85rem; line-height: 1.6; color: var(--cream-dim); }
.dekl-digital b, .dekl-digital strong { color: var(--cream); }
.dekl-digital h3, .dekl-digital h4 { color: var(--cream); margin: .7rem 0 .3rem; font-size: .95rem; }
.dekl-digital table { width: 100%; border-collapse: collapse; }
.dekl-digital td { padding: 3px 8px 3px 0; vertical-align: top; }
.dekl-digital td:first-child { color: var(--cream-muted); white-space: nowrap; }
.dekl-digital hr { border: none; border-top: 1px solid var(--brown-border); margin: .7rem 0; }
.dekl-actions { display: flex; gap: .5rem; flex-wrap: wrap; flex-shrink: 0; }

/* ── Wypełnij deklarację (formularz online) ── */
.dekl-fill-overlay { position: fixed; inset: 0; background: rgba(20,14,13,.8); z-index: 9998; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.dekl-fill-box { background: var(--brown); border: 1px solid var(--brown-border); border-radius: 12px; width: 100%; max-width: 640px; max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; }
.dekl-fill-head { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.2rem; border-bottom: 1px solid var(--brown-border); }
.dekl-fill-head strong { color: var(--cream); font-size: 1.05rem; font-family: 'Raleway', sans-serif; }
.df-x { background: none; border: none; color: var(--cream-muted); font-size: 1.05rem; cursor: pointer; line-height: 1; }
.df-x:hover { color: var(--cream); }
.dekl-fill-body { overflow-y: auto; padding: 1rem 1.2rem; }
.df-formhdr { text-align: center; border-bottom: 1px solid var(--brown-border); padding-bottom: .6rem; margin-bottom: .8rem; }
.df-formhdr > div:first-child { font-family: 'Raleway', sans-serif; font-weight: 800; font-size: 1.2rem; letter-spacing: 1px; color: var(--cream); }
.df-sub { font-size: .76rem; color: var(--cream-muted); }
.dekl-fill-body label { display: block; font-size: .78rem; color: var(--cream-dim); margin-bottom: .55rem; }
.dekl-fill-body input { width: 100%; margin-top: .2rem; background: var(--brown-dark); border: 1px solid rgba(255,252,223,.16); border-radius: 7px; padding: .48rem .6rem; color: var(--cream); font-size: .85rem; font-family: inherit; }
.dekl-fill-body input:focus { outline: none; border-color: var(--cream-dim); }
.dekl-fill-body input[readonly] { color: var(--cream-muted); background: rgba(255,252,223,.03); }
.df-sec { font-weight: 700; font-size: .82rem; color: #e0a583; margin: 1rem 0 .55rem; padding-bottom: .2rem; border-bottom: 1px solid var(--brown-border); }
.df-note { color: #5dcaa5; font-weight: 400; font-size: .72rem; }
.df-radios { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin-bottom: .55rem; }
.df-radio { display: inline-flex !important; align-items: center; gap: .3rem; margin-bottom: 0 !important; font-size: .8rem; color: var(--cream-dim); cursor: pointer; }
.df-radio input { width: auto !important; margin: 0 !important; accent-color: var(--teal); }
.df-row2 { display: flex; gap: .7rem; }
.df-row2 > label { flex: 1; }
.df-row4 { display: flex; gap: .5rem; flex-wrap: wrap; }
.df-row4 > label { flex: 1; min-width: 88px; }
.df-fee { background: var(--brown-dark); border: 1px solid rgba(93,202,165,.25); border-radius: 9px; padding: .7rem .8rem; display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; }
.df-fee > label { flex: 0 0 auto; width: 118px; margin-bottom: 0; }
.df-fee-out { flex: 1; min-width: 160px; font-size: .82rem; color: var(--cream-dim); text-align: right; }
.df-fee-out b { color: #5dcaa5; }
.dekl-fill-foot { display: flex; gap: .5rem; justify-content: flex-end; padding: .9rem 1.2rem; border-top: 1px solid var(--brown-border); }

.doc-content {
  width: 100%; font-size: .9rem; line-height: 1.8; color: var(--cream);
}
.doc-content h2 { font-size: 1rem; font-weight: 700; margin: 1.5rem 0 .4rem; color: var(--cream); text-align: center; }
.doc-content h3 { font-size: .9rem; font-weight: 700; margin: 1.2rem 0 .3rem; text-align: center; color: var(--cream); }
.doc-content p  { margin: .5rem 0; }
.doc-content ol, .doc-content ul { padding-left: 1.4rem; margin: .4rem 0; }
.doc-content li { margin: .25rem 0; }
.doc-content .doc-chapter { font-weight: 700; text-align: center; margin: 2rem 0 .25rem; font-size: .95rem; color: var(--cream); letter-spacing: .03em; }

/* ── Chat ─────────────────────────────────── */
.chat-box {
  background: var(--brown); border: 1px solid var(--brown-border);
  border-radius: var(--rl); display: flex;
  flex-direction: column; height: 520px; box-shadow: var(--shm);
}
.chat-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .65rem; }
.chat-input-row { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--brown-border); }
.chat-input-row .form-control { flex: 1; }
.chat-msg { display: flex; flex-direction: column; max-width: 72%; }
.chat-msg.mine   { align-self: flex-end;   align-items: flex-end; }
.chat-msg.theirs { align-self: flex-start; align-items: flex-start; }
.chat-author { font-size: .73rem; color: var(--cream-muted); margin-bottom: .15rem; }
.chat-bubble {
  padding: .5rem .9rem; border-radius: 16px;
  font-size: .875rem; line-height: 1.5; word-break: break-word;
}
.chat-msg.mine   .chat-bubble { background: var(--gold);      color: var(--brown-dark); border-bottom-right-radius: 4px; font-weight: 700; }
.chat-msg.theirs .chat-bubble { background: var(--brown-light); color: var(--cream);      border-bottom-left-radius: 4px; }
.chat-time { font-size: .7rem; color: var(--cream-muted); margin-top: .15rem; }

/* ── Czat: załączniki + ankiety ─────────────────────────── */
.chat-icon-btn { flex-shrink: 0; width: 42px; border-radius: 10px; border: 1px solid var(--brown-border); background: var(--brown-dark); color: var(--cream-dim); font-size: 1.15rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.chat-icon-btn:hover { color: var(--cream); border-color: var(--cream-dim); }
.chat-poll-btn { background: var(--teal); color: var(--cream); border: none; display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; font-weight: 600; }
.chat-poll-btn:hover { background: var(--teal-h); color: var(--cream); }
.chat-att-chip { display: flex; align-items: center; gap: .5rem; margin: 0 .75rem; padding: .35rem .65rem; background: rgba(255,252,223,.06); border: 1px solid var(--brown-border); border-radius: 8px; font-size: .78rem; color: var(--cream-dim); align-self: flex-start; }
.chat-att-chip button { background: none; border: none; color: var(--cream-muted); cursor: pointer; font-size: .8rem; line-height: 1; padding: 0; }
.chat-att-chip button:hover { color: #e0a583; }

.chat-bubble.has-att { padding: .4rem; }
.chat-img { display: block; max-width: 260px; max-height: 240px; border-radius: 10px; cursor: zoom-in; object-fit: cover; }
.chat-text { margin-top: .4rem; padding: 0 .4rem .1rem; }
.chat-bubble.has-att .chat-text:first-child { margin-top: 0; }
.chat-file-card { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 230px; background: var(--brown-dark); border: 1px solid var(--brown-border); border-radius: 8px; padding: 8px 10px; cursor: pointer; font-family: inherit; text-align: left; }
.chat-file-card:hover { border-color: var(--cream-dim); }
.chat-file-card > .ti { font-size: 1.7rem; color: #e0a583; flex-shrink: 0; }
.chat-file-name { flex: 1; min-width: 0; font-size: .82rem; color: var(--cream); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-file-open { font-size: .72rem; color: var(--cream-dim); display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }

.chat-lightbox { position: fixed; inset: 0; background: rgba(20,14,13,.88); display: flex; align-items: center; justify-content: center; z-index: 9999; padding: 2rem; cursor: zoom-out; }
.chat-lightbox img { max-width: 92%; max-height: 92%; border-radius: 8px; object-fit: contain; }
.chat-lb-x { position: absolute; top: 1rem; right: 1.2rem; background: none; border: none; color: var(--cream); font-size: 1.6rem; cursor: pointer; }

.chat-msg.poll-msg { max-width: 100%; width: 100%; align-self: stretch; align-items: stretch; }
.chat-poll { border: 1px solid var(--teal); background: #332a26; border-radius: 12px; padding: 13px 14px; }
.poll-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; flex-wrap: wrap; }
.poll-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: #5dcaa5; }
.poll-badge { font-size: .66rem; color: #2d2220; background: #9fe1cb; border-radius: 20px; padding: 2px 9px; font-weight: 700; }
.poll-q { font-family: 'Raleway', sans-serif; font-weight: 700; font-size: .95rem; color: var(--cream); margin-bottom: 11px; }
.poll-opts { display: flex; flex-direction: column; gap: 10px; }
.poll-opt.clickable { cursor: pointer; }
.poll-opt-top { display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--cream-dim); }
.poll-opt-top > .ti { font-size: 1.05rem; color: var(--cream-muted); flex-shrink: 0; }
.poll-opt.voted .poll-opt-top > .ti, .poll-opt.voted .poll-opt-pct { color: #5dcaa5; }
.poll-opt-label { flex: 1; }
.poll-opt.voted .poll-opt-label { color: var(--cream); font-weight: 600; }
.poll-opt-pct { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--cream-dim); }
.poll-opt.clickable:hover .poll-opt-label { color: var(--cream); }
.poll-opt.clickable:hover .poll-opt-top > .ti { color: #5dcaa5; }
.poll-bar { height: 7px; background: var(--brown-dark); border-radius: 5px; margin: 5px 0 3px 25px; overflow: hidden; }
.poll-bar > div { height: 100%; background: var(--teal); border-radius: 5px; }
.poll-voters { font-size: .69rem; color: var(--cream-muted); margin-left: 25px; }
.poll-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,252,223,.1); flex-wrap: wrap; }
.poll-turnout { font-size: .73rem; color: var(--cream-dim); }
.poll-turnout b { color: var(--cream); }
.poll-pass { color: #5dcaa5; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; }
.poll-nopass { color: var(--cream-muted); margin-left: 4px; }
.poll-admin-actions { display: inline-flex; gap: 6px; flex-shrink: 0; }
.poll-close { background: transparent; border: 1px solid rgba(255,252,223,.2); color: var(--cream-dim); border-radius: 7px; padding: .25rem .6rem; font-size: .72rem; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.poll-close:hover { border-color: #e0a583; color: #e0a583; }
.poll-del { background: transparent; border: 1px solid rgba(224,82,82,.4); color: #e07070; border-radius: 7px; padding: .25rem .6rem; font-size: .72rem; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.poll-del:hover { background: rgba(224,82,82,.13); }
.poll-hint { font-size: .72rem; color: var(--cream-muted); margin-top: 8px; }

.pm-opt-row { display: flex; gap: .4rem; margin-bottom: .4rem; align-items: center; }
.pm-opt-row .form-control { flex: 1; }
.pm-opt-del { background: none; border: 1px solid var(--brown-border); color: var(--cream-muted); border-radius: 6px; width: 34px; flex-shrink: 0; cursor: pointer; font-size: .8rem; }
.pm-opt-del:hover { color: #e0a583; border-color: #e0a583; }
.poll-modal-note { display: flex; gap: .5rem; font-size: .76rem; color: var(--cream-dim); background: rgba(42,122,109,.12); border: 1px solid rgba(42,122,109,.32); border-radius: 8px; padding: .6rem .7rem; margin: .2rem 0 .8rem; }
.poll-modal-note > .ti { color: #5dcaa5; flex-shrink: 0; margin-top: 1px; }

/* ── Storage ──────────────────────────────── */
.storage-legend { display: flex; gap: .75rem; align-items: center; margin-bottom: 1rem; }
.storage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .875rem; }
.storage-slot { border-radius: var(--rl); padding: 1.1rem .875rem; text-align: center; border: 2px solid; box-shadow: var(--sh); }
.storage-slot.free     { background: var(--success-bg); border-color: var(--success-brd); }
.storage-slot.occupied { background: var(--danger-bg);  border-color: var(--danger-brd); }
.slot-code { font-size: 1rem; font-weight: 900; margin-bottom: .25rem; color: var(--cream); font-family: 'Raleway', sans-serif; }
.slot-info { font-size: .78rem; color: var(--cream-muted); }
.mt-xs { margin-top: .3rem; }

/* ── Auth ─────────────────────────────────── */
.auth-wrap {
  display: flex; align-items: flex-start; justify-content: center;
  min-height: calc(100vh - 130px); padding: 3rem 1rem 2rem;
  background: var(--brown-dark);
}
.auth-card {
  background: var(--brown); border: 1px solid var(--brown-border);
  border-radius: var(--rl); padding: .5rem 2.25rem 2rem;
  width: 100%; max-width: 400px; box-shadow: var(--shm);
}
.auth-logo { text-align: center; margin-bottom: 1.25rem; }
.auth-logo-img { width: 240px; height: auto; display: block; margin: 0 auto .15rem; }
.auth-logo h2 { font-family: 'Raleway', sans-serif; font-size: 1.3rem; font-weight: 800; color: var(--cream); }
.auth-logo p  { font-size: .85rem; color: var(--cream-muted); }

/* ── Kontakt page ─────────────────────────── */
.kontakt-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 1.5rem; align-items: start; }
@media (max-width:700px) { .kontakt-grid { grid-template-columns: 1fr; } }
.kontakt-left { display: flex; flex-direction: column; gap: 1.5rem; }
.kontakt-logo { display: flex; align-items: center; justify-content: center; padding: 1.6rem 1rem; }
.kontakt-logo img { max-width: 340px; width: 100%; height: auto; display: block; }

.kontakt-info-item { display: flex; align-items: flex-start; gap: .85rem; padding: .85rem 0; border-bottom: 1px solid var(--brown-border); }
.kontakt-info-item:last-child { border-bottom: none; }
.kontakt-info-icon { width: 36px; height: 36px; background: rgba(255,252,223,.07); border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--cream); font-size: 17px; }
.kontakt-info-label { font-size: .68rem; font-weight: 700; color: rgba(255,252,223,.4); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 2px; }
.kontakt-info-value { font-size: .95rem; color: var(--cream); line-height: 1.4; }
.kontakt-info-value a { color: var(--cream); }
.kontakt-info-value a:hover { color: var(--cream-dim); text-decoration: underline; }

.cform-section-title { font-size: .72rem; font-weight: 700; color: rgba(255,252,223,.45); text-transform: uppercase; letter-spacing: .15em; margin-bottom: 1.25rem; }
.cform-group { margin-bottom: .85rem; }
.cform-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: .85rem; }
@media (max-width:500px) { .cform-row { grid-template-columns: 1fr; } }
.cform-label { display: block; font-size: .68rem; font-weight: 700; color: rgba(255,252,223,.4); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .35rem; }
.cform-req { color: rgba(255,252,223,.6); }

.cform-input {
  width: 100%; background: var(--brown-dark); border: 1px solid rgba(255,252,223,.18);
  border-radius: var(--r); padding: .55rem .75rem;
  color: var(--cream); font-size: .875rem; font-family: inherit;
  -webkit-appearance: none; appearance: none; color-scheme: dark;
  transition: border-color var(--tr);
}
.cform-input::placeholder { color: rgba(255,252,223,.2); }
.cform-input:focus { outline: none; border-color: rgba(255,252,223,.4); }

.cform-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(255,252,223,0.4)'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center;
  padding-right: 2rem; cursor: pointer; color: rgba(255,252,223,.72);
}
textarea.cform-input { min-height: 90px; resize: vertical; }

.cform-file {
  width: 100%; background: var(--brown-dark); border: 1px dashed rgba(255,252,223,.2);
  border-radius: var(--r); padding: .65rem .75rem;
  display: flex; align-items: center; gap: .65rem; cursor: pointer;
  transition: border-color var(--tr);
}
.cform-file:hover { border-color: rgba(255,252,223,.38); }
.cform-file i { color: rgba(255,252,223,.3); font-size: 18px; flex-shrink: 0; }
.cform-file-text strong { display: block; font-size: .82rem; color: rgba(255,252,223,.6); }
.cform-file-meta { font-size: .7rem; color: rgba(255,252,223,.28); margin-top: 1px; }
.cform-file input[type=file] { display: none; }
.cform-file-name { font-size: .8rem; color: rgba(255,252,223,.65); margin-top: .35rem; display: none; }

.cform-captcha-row { display: flex; align-items: stretch; gap: .6rem; }
.cform-captcha-q {
  flex: 1; min-width: 0; background: var(--brown-dark);
  border: 1px solid rgba(255,252,223,.18); border-radius: var(--r);
  padding: .55rem .75rem; display: flex; align-items: center; gap: .5rem;
  font-size: .875rem; color: rgba(255,252,223,.55);
}
.cform-captcha-q i { font-size: 15px; color: rgba(255,252,223,.22); flex-shrink: 0; }
.cform-captcha-q strong { color: rgba(255,252,223,.85); }
.cform-captcha-a {
  width: 70px; flex-shrink: 0; background: var(--brown-dark);
  border: 1px solid rgba(255,252,223,.18); border-radius: var(--r);
  padding: .55rem .5rem; color: var(--cream); font-size: .875rem;
  text-align: center; font-family: inherit;
  -webkit-appearance: none; appearance: none; color-scheme: dark;
}
.cform-captcha-a::placeholder { color: rgba(255,252,223,.2); }
.cform-captcha-a:focus { outline: none; border-color: rgba(255,252,223,.4); }

.cform-note { font-size: .7rem; color: rgba(255,252,223,.28); line-height: 1.5; margin-bottom: .85rem; font-style: italic; }
.cform-btn {
  width: 100%; background: var(--brown-dark); color: var(--cream);
  border: 1px solid #5a3f3a; border-radius: var(--r);
  padding: .75rem; font-size: .85rem; font-weight: 700; font-family: 'Raleway', sans-serif;
  text-transform: uppercase; letter-spacing: .15em; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  -webkit-appearance: none; appearance: none; transition: border-color var(--tr);
}
.cform-btn:hover:not(:disabled) { border-color: rgba(255,252,223,.35); }
.cform-btn:disabled { opacity: .5; cursor: default; }
.cform-btn i { font-size: 15px; }

/* ── Prose ────────────────────────────────── */
.prose h2 { font-size: 1.1rem; font-weight: 700; margin: 1.4rem 0 .6rem; color: var(--cream); font-family: 'Raleway', sans-serif; }
.prose p, .prose li { font-size: .9rem; margin-bottom: .6rem; color: var(--cream-dim); }
.prose ul { padding-left: 1.4rem; }
.prose a { color: var(--gold); }

/* ── Toast ────────────────────────────────── */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999;
  padding: .75rem 1.2rem; border-radius: var(--r);
  background: var(--brown-mid); color: var(--cream);
  font-size: .875rem; box-shadow: var(--shm); border: 1px solid var(--brown-border);
  opacity: 0; transform: translateY(.75rem);
  transition: opacity .22s, transform .22s;
  max-width: 300px;
}
.toast.show   { opacity: 1; transform: none; }
.toast-success { background: #1a5c40; border-color: var(--success-brd); }
.toast-error   { background: #6b2020; border-color: var(--danger-brd); }
.toast-info    { background: var(--brown-mid); }

/* ── O nas ────────────────────────────────── */
.onas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: start;
}
@media (max-width: 800px) {
  .onas-grid { grid-template-columns: 1fr; gap: 2rem; }
}
.onas-col { display: flex; flex-direction: column; gap: 1.5rem; }
.onas-photo { width: 100%; max-width: 380px; align-self: center; display: block; }

/* ── Paczkomat ────────────────────────────── */
.pacz-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem 2.5rem;
}
@media (max-width: 700px) {
  .pacz-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ── Footer ───────────────────────────────── */
#site-footer {
  background: var(--brown-mid);
  border-top: 1px solid var(--brown-border);
  color: var(--cream-muted);
  text-align: center; padding: 1.25rem; font-size: .82rem;
}
#site-footer a { color: var(--cream-dim); }
#site-footer a:hover { color: var(--gold); text-decoration: none; }
.footer-inner { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }

/* ── Cookie Consent ───────────────────────── */
.ck-overlay {
  position: fixed; inset: 0;
  background: rgba(20,14,13,.75);
  display: flex; align-items: center; justify-content: center;
  z-index: 9998; padding: 1rem;
}
.ck-modal {
  background: var(--brown);
  border: 1px solid var(--brown-border);
  border-radius: 12px;
  width: 100%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.ck-header { padding: 1.25rem 1.5rem .75rem; border-bottom: 1px solid var(--brown-border); }
.ck-header h2 { font-family: 'Raleway', sans-serif; font-size: 1.05rem; font-weight: 800; color: var(--cream); }
.ck-header p { font-size: .82rem; color: var(--cream-muted); line-height: 1.55; margin-top: .4rem; }
.ck-header a { color: var(--cream-dim); text-decoration: underline; }
.ck-tabs { display: flex; border-bottom: 1px solid var(--brown-border); padding: 0 1.5rem; }
.ck-tab {
  padding: .6rem 1rem; font-size: .82rem; font-weight: 600;
  color: var(--cream-muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  font-family: 'Raleway', sans-serif; letter-spacing: .02em; transition: color .15s;
}
.ck-tab.active { color: var(--cream); border-bottom-color: var(--cream); }
.ck-panel { padding: 1rem 1.5rem; display: none; flex-direction: column; gap: .6rem; }
.ck-panel.active { display: flex; }
.ck-cat { background: rgba(255,252,223,.04); border: 1px solid rgba(255,252,223,.08); border-radius: 8px; overflow: hidden; }
.ck-cat-hd { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; cursor: pointer; user-select: none; }
.ck-cat-title { font-size: .86rem; font-weight: 700; color: var(--cream); flex: 1; }
.ck-cat-always { font-size: .72rem; color: var(--cream-muted); font-style: italic; white-space: nowrap; }
.ck-arrow { font-size: .65rem; color: var(--cream-muted); transition: transform .2s; display: inline-block; }
.ck-arrow.open { transform: rotate(180deg); }
.ck-cat-body { padding: .4rem 1rem .75rem; font-size: .8rem; color: var(--cream-muted); line-height: 1.55; display: none; }
.ck-cat-body.open { display: block; }
.ck-toggle { position: relative; width: 38px; height: 22px; flex-shrink: 0; }
.ck-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.ck-slider {
  position: absolute; inset: 0;
  background: rgba(255,252,223,.2); border-radius: 11px;
  cursor: pointer; transition: .2s;
}
.ck-slider::before {
  content: ''; position: absolute;
  width: 16px; height: 16px; left: 3px; top: 3px;
  background: rgba(255,252,223,.5); border-radius: 50%; transition: .2s;
}
.ck-toggle input:checked + .ck-slider { background: rgba(255,252,223,.85); }
.ck-toggle input:checked + .ck-slider::before { transform: translateX(16px); background: var(--brown-dark); }
.ck-toggle input:disabled + .ck-slider { opacity: .45; cursor: not-allowed; }
.ck-footer { padding: .75rem 1.5rem 1.25rem; display: flex; gap: .6rem; flex-wrap: wrap; }
.ck-btn {
  flex: 1; min-width: 100px; padding: .55rem .75rem;
  border-radius: 6px; font-size: .82rem; font-weight: 700;
  font-family: 'Raleway', sans-serif; cursor: pointer;
  letter-spacing: .03em; text-align: center; transition: .15s;
}
.ck-btn-reject { background: transparent; color: var(--cream-muted); border: 1px solid rgba(255,252,223,.2); }
.ck-btn-reject:hover { color: var(--cream); border-color: rgba(255,252,223,.4); }
.ck-btn-settings { background: transparent; color: var(--cream-dim); border: 1px solid rgba(255,252,223,.25); }
.ck-btn-settings:hover { color: var(--cream); border-color: rgba(255,252,223,.5); }
.ck-btn-accept { background: var(--cream); color: var(--brown-dark); border: 1px solid var(--cream); }
.ck-btn-accept:hover { background: var(--cream-dim); border-color: var(--cream-dim); }
.ck-btn-save { background: var(--cream); color: var(--brown-dark); border: 1px solid var(--cream); flex: 2; }
.ck-btn-save:hover { background: var(--cream-dim); }
.ck-float {
  position: fixed; bottom: 1.25rem; right: 1.25rem;
  background: var(--brown); border: 1px solid rgba(255,252,223,.2);
  border-radius: 8px; padding: .45rem .85rem;
  font-size: .78rem; color: var(--cream-muted);
  cursor: pointer; display: none; align-items: center; gap: .4rem;
  z-index: 9997; font-family: 'Lato', sans-serif;
  transition: border-color .15s, color .15s;
}
.ck-float:hover { border-color: rgba(255,252,223,.45); color: var(--cream); }

/* ── Loading ──────────────────────────────── */
.loading-init, .loading {
  padding: 3.5rem; text-align: center;
  color: var(--cream-muted); font-size: .9rem;
}

/* ── Panel Mieszkańca ─────────────────────── */
.pn-hero {
  height: 140px; padding: 0 2.5rem;
  display: flex; align-items: center;
}
.pn-hero h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.pn-layout {
  display: flex;
  height: calc(100vh - 210px); /* viewport minus header (70) and panel hero (140) */
  overflow: hidden;            /* prevents layout from growing; only pn-content scrolls */
  max-width: 1100px; margin: 0 auto;
  border-left: 1px solid var(--brown-border);
  border-right: 1px solid var(--brown-border);
}
.pn-sidebar {
  width: 210px; min-width: 210px;
  background: var(--brown-dark);
  border-right: 1px solid var(--brown-border);
  display: flex; flex-direction: column;
  overflow-y: auto;            /* sidebar can scroll internally if items don't fit */
  flex-shrink: 0;
}
.pn-user-info {
  padding: 1.2rem 1rem 1rem;
  border-bottom: 1px solid var(--brown-border);
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.pn-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--brown-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800; color: var(--cream);
  margin-bottom: .6rem; letter-spacing: .5px;
}
.pn-avatar-img {
  width: 42px; height: 42px; border-radius: 50%;
  object-fit: cover; margin-bottom: .6rem;
}
.pn-user-name { font-size: .88rem; font-weight: 700; color: var(--cream); line-height: 1.3; }
.pn-user-apt  { font-size: .75rem; color: var(--cream-muted); margin-top: .15rem; }
.pn-role-badge {
  display: inline-block; margin-top: .45rem;
  font-size: .66rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: .18rem .55rem; border-radius: 4px;
  background: rgba(255,252,223,.1); color: var(--cream-dim);
}
.pn-role-badge.is-admin { background: rgba(196,165,64,.18); color: #d4b84a; }
.pn-ui-top { display: flex; flex-direction: column; align-items: center; }
.pn-ui-name-wrap { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.pn-badge-timer { display: flex; flex-direction: column; align-items: center; gap: .5rem; margin-top: .5rem; }
.pn-badge-timer .pn-role-badge { margin-top: 0; }
.pn-badge-timer .pn-idle-timer { margin-top: 0; }
.pn-clock { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.pn-clock-time { font-size: .9rem; font-weight: 800; color: var(--cream); font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.pn-clock-date { font-size: .62rem; color: var(--cream-muted); white-space: nowrap; }

.pn-nav { flex: 1; padding: .6rem 0; overflow-y: auto; }
.pn-l1-item {
  display: flex; align-items: center; gap: .65rem;
  padding: .58rem 1rem; margin: .08rem .45rem;
  border-radius: 7px; cursor: pointer;
  color: var(--cream-muted); font-size: .875rem;
  transition: background .13s, color .13s; user-select: none;
}
.pn-l1-item:hover { background: rgba(255,252,223,.07); color: var(--cream-dim); }
.pn-l1-item.active { background: rgba(255,252,223,.12); color: var(--cream); }
.pn-l1-item .ti { font-size: 1.05rem; flex-shrink: 0; }
.pn-separator { margin: .55rem .7rem; border: none; border-top: 1px solid var(--brown-border); }
.pn-sep-label {
  font-size: .67rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--cream-muted); padding: .35rem 1.45rem .05rem; opacity: .55; margin: 0;
}

.pn-main { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.pn-l2-bar {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--brown-border);
  background: var(--brown);
  overflow-x: auto; flex-shrink: 0;
  padding: 0 1rem;
  /* no sticky needed — layout itself is fixed height */
  -ms-overflow-style: none; scrollbar-width: none;
}
.pn-l2-bar::-webkit-scrollbar { display: none; }
.pn-l2-tab {
  display: flex; align-items: center; gap: .38rem;
  padding: .72rem 1rem; cursor: pointer;
  color: var(--cream-muted); font-size: .84rem; font-weight: 600;
  border-bottom: 2px solid transparent; white-space: nowrap;
  transition: color .13s; margin-bottom: -1px; flex-shrink: 0;
  user-select: none;
}
.pn-l2-tab:hover { color: var(--cream-dim); }
.pn-l2-tab.active { color: var(--cream); border-bottom-color: var(--cream-dim); }
.pn-l2-tab .ti { font-size: .93rem; }
.pn-content { flex: 1; padding: 1.5rem; overflow-y: auto; }

.pn-section-title {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.pn-section-title h2 { font-size: 1.3rem; margin: 0; }
.pn-subheader { font-size: 1rem; font-weight: 700; margin: 1.5rem 0 .7rem; color: var(--cream); }
.pn-stats-row { display: flex; gap: .9rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pn-stat {
  flex: 1; min-width: 120px;
  background: var(--brown-mid); border: 1px solid var(--brown-border);
  border-radius: 10px; padding: .9rem 1.15rem;
}
.pn-stat-val { font-size: 1.55rem; font-weight: 700; color: var(--cream); font-variant-numeric: tabular-nums; }
.pn-stat-lbl { font-size: .75rem; color: var(--cream-muted); margin-top: .15rem; }
.pn-stat.warn .pn-stat-val { color: #e8a825; }
.pn-stat.ok   .pn-stat-val { color: #5cb85c; }
.pn-stat.teal .pn-stat-val { color: #35998a; }
.pn-stat.coral .pn-stat-val { color: #d98a5f; }
/* Energia Elektryczna — legenda wykresu + box wyliczeń w modalach */
.en-legend { display: flex; gap: 1.1rem; font-size: .78rem; color: var(--cream-muted); flex-wrap: wrap; }
.en-legend span { display: flex; align-items: center; gap: .4rem; }
.en-sw { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.en-calc { margin-top: 1rem; background: rgba(58,160,143,.1); border: 1px solid rgba(58,160,143,.35); border-radius: 8px; padding: .5rem .9rem; }
.en-calc-row { display: flex; justify-content: space-between; align-items: center; font-size: .9rem; padding: .2rem 0; color: var(--cream-dim); }
.en-calc-row b { color: #7fd3c0; font-variant-numeric: tabular-nums; }
/* Energia WM — komórki tabeli faktur (całość / paczkomat / WM) */
.ew-cell b { display: block; font-variant-numeric: tabular-nums; font-weight: 500; }
.ew-cell span { display: block; font-size: .72rem; color: var(--cream-muted); font-variant-numeric: tabular-nums; }
.ew-sub b, .ew-sub span { color: #cf8a63; }
.ew-wm { background: rgba(217,138,90,.09); }
.ew-wm b { color: #e6a880; font-weight: 700; }
.ew-wm span { color: #d09067; }
/* Finanse — Przychód/Koszty (wzór FakturaXL) */
.fin-toolbar { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 1rem; }
.fin-filters { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.fin-fl { display: flex; align-items: center; gap: .4rem; }
.fin-fl label { font-size: .72rem; color: var(--cream-muted); }
.fin-month { display: flex; align-items: center; gap: .4rem; background: var(--brown-mid); border: 1px solid var(--brown-border); border-radius: 7px; padding: .2rem .4rem; }
.fin-month button { background: none; border: none; color: var(--cream); font-size: 1.15rem; cursor: pointer; padding: 0 .25rem; line-height: 1; }
.fin-month span { font-size: .85rem; min-width: 82px; text-align: center; }
.fin-sel { width: auto; padding: .35rem .6rem; font-size: .82rem; }
.fin-sum { margin-left: auto; text-align: right; }
.fin-sum-l { font-size: .65rem; color: var(--cream-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .15rem; }
.fin-sum-v { display: flex; gap: .9rem; font-size: .82rem; color: var(--cream-dim); }
.fin-sum-v b { color: var(--cream); font-variant-numeric: tabular-nums; }
.fin-sum-v b.br { color: #4bb3a1; }
.fin-tp { display: inline-block; color: #fff; font-size: .62rem; font-weight: 700; padding: 1px 6px; border-radius: 4px; vertical-align: middle; }
.fin-nr { color: #84b4cc; font-weight: 500; }
.fin-nr-link { cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.fin-nr-link:hover { color: #a9d0e6; }
.fin-potw { cursor: pointer; font-size: .6rem; padding: .08rem .4rem; margin-left: .25rem; vertical-align: middle; }
.fin-foot { margin-top: .8rem; font-size: .78rem; color: var(--cream-muted); }
.fin-ksef { font-size: .6rem; padding: .08rem .4rem; margin-left: .3rem; vertical-align: middle; cursor: default; }
.fin-table { font-size: .76rem; }
.fin-table th, .fin-table td { padding: .5rem .55rem; }
.badge.wpl-rev { background: rgba(207,150,80,.16); color: #e0b070; border: 1px solid rgba(207,150,80,.4); }
.badge.wpl-koszt { background: rgba(207,122,86,.16); color: #e0916a; border: 1px solid rgba(207,122,86,.4); }
.wpl-cel { font-weight: 600; }
.wpl-cel small { color: var(--cream-muted); font-weight: 400; }
.wpl-assign { background: var(--brown-mid); border: 1px solid var(--brown-border); color: var(--cream); border-radius: 6px; padding: .12rem .3rem; font-size: .72rem; font-family: inherit; max-width: 120px; }
@media (max-width: 720px) { .fin-sum { margin-left: 0; text-align: left; width: 100%; } }
/* Produkty — pasek podzakładek + katalog */
.prod-subtabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--brown-border); margin-bottom: 1rem; flex-wrap: wrap; }
.prod-subtab { padding: .5rem .9rem; font-size: .86rem; font-weight: 600; color: var(--cream-muted); cursor: pointer; border: none; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: .45rem; font-family: inherit; }
.prod-subtab:hover { color: var(--cream); }
.prod-subtab.on { color: var(--cream); border-bottom-color: var(--gold); }
.prod-ct { font-size: .7rem; background: rgba(255,252,223,.08); color: var(--cream-dim); border-radius: 10px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.prod-subtab.on .prod-ct { background: rgba(255,252,223,.16); color: var(--cream); }
.prod-thumb { width: 30px; height: 30px; border-radius: 5px; background: var(--brown-mid); border: 1px solid var(--brown-border); display: flex; align-items: center; justify-content: center; color: var(--cream-muted); font-size: .9rem; }
.prod-cena { font-variant-numeric: tabular-nums; font-weight: 600; }
.prod-cena.neg { color: #d98a5f; }
/* Dochód (Przychód − Koszty) */
.dch-top { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 1rem; }
.dch-toggle { display: inline-flex; border: 1px solid var(--brown-border); border-radius: 8px; overflow: hidden; }
.dch-toggle button { background: none; border: none; color: var(--cream-muted); font-size: .82rem; padding: .4rem .85rem; cursor: pointer; font-family: inherit; }
.dch-toggle button:hover { color: var(--cream); }
.dch-toggle button.on { background: var(--brown-mid); color: var(--cream); }
.dch-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.dch-card { background: var(--brown); border: 1px solid var(--brown-border); border-radius: 10px; padding: 14px 16px; }
.dch-card .t { font-size: .72rem; color: var(--cream-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .4rem; display: flex; align-items: center; gap: .4rem; }
.dch-card .v { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.dch-card .s { font-size: .72rem; color: var(--cream-muted); margin-top: .25rem; }
.dch-card.p { border-left: 3px solid #2f8f7d; } .dch-card.p .v { color: #4bb3a1; }
.dch-card.k { border-left: 3px solid #cf7a56; } .dch-card.k .v { color: #e0916a; }
.dch-card.d { border-left: 3px solid var(--cream-dim); background: var(--brown-mid); }
.dch-chart { background: var(--brown-dark); border: 1px solid var(--brown-border); border-radius: 10px; padding: 12px 12px 8px; margin-bottom: 16px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.dch-chart-main { flex: 1; min-width: 340px; }
.dch-donut { width: 236px; flex-shrink: 0; text-align: center; border-left: 1px solid var(--brown-border); padding-left: 16px; }
.dch-donut-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--cream-muted); font-weight: 700; margin-bottom: 6px; }
.dch-donut-legend { margin: 8px auto 0; font-size: .76rem; display: flex; flex-direction: column; gap: 4px; max-width: 180px; text-align: left; }
.dch-donut-legend .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dch-donut-legend .nm { display: flex; align-items: center; gap: 6px; color: var(--cream-dim); }
.dch-donut-legend .nm i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.dch-donut-legend b { font-variant-numeric: tabular-nums; }
.dch-donut-legend .tot { border-top: 1px solid var(--brown-border); padding-top: 4px; margin-top: 2px; }
.dch-donut-empty { color: var(--cream-muted); font-size: .8rem; padding: 34px 6px; }
@media (max-width: 720px) { .dch-donut { border-left: none; border-top: 1px solid var(--brown-border); padding-left: 0; padding-top: 12px; width: 100%; } }
.dch-legend { display: flex; gap: 1.2rem; justify-content: center; font-size: .76rem; color: var(--cream-dim); margin-bottom: .3rem; }
.dch-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.dch-dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
@media (max-width: 640px) { .dch-cards { grid-template-columns: 1fr; } }
/* Umowa One Box — wersja cyfrowa (przepisana treść) */
.uc-wrap { background: var(--brown-dark); border: 1px solid var(--brown-border); border-radius: 8px; padding: 1.25rem 1.4rem; max-height: 520px; overflow-y: auto; }
.uc-doc { color: var(--cream-dim); font-size: .86rem; line-height: 1.6; }
.uc-doc .uc-title { font-family: 'Raleway', sans-serif; font-size: 1.05rem; font-weight: 800; color: var(--cream); text-align: center; margin-bottom: .3rem; }
.uc-doc .uc-meta { text-align: center; color: var(--cream-muted); font-size: .78rem; margin-bottom: 1rem; }
.uc-doc h4 { font-size: .92rem; font-weight: 700; color: var(--cream); margin: 1.3rem 0 .5rem; padding-top: .6rem; border-top: 1px solid var(--brown-border); }
.uc-doc p { margin: .5rem 0; }
.uc-doc strong { color: var(--cream); }
.uc-doc ol, .uc-doc ul { margin: .4rem 0 .6rem; padding-left: 1.5rem; }
.uc-doc li { margin: .4rem 0; }
.uc-doc .uc-sig { margin-top: 1rem; padding-top: .7rem; border-top: 1px dashed var(--brown-border); color: var(--cream); }
.uc-doc .uc-note { font-size: .78rem; color: var(--cream-muted); font-style: italic; margin-top: 1rem; }

.pn-placeholder { text-align: center; padding: 4rem 2rem; color: var(--cream-muted); }
.pn-placeholder .ti { font-size: 2.8rem; display: block; margin-bottom: 1rem; opacity: .5; }
.pn-placeholder h3  { color: var(--cream-dim); margin-bottom: .5rem; }

.pn-chat-box { display: flex; flex-direction: column; }
.pn-chat-box .chat-messages { height: 380px; }

/* Mobile sidebar */
.pn-overlay {
  display: none; position: fixed; inset: 0; z-index: 190;
  background: rgba(0,0,0,.55);
}
.pn-overlay.open { display: block; }
.pn-hamburger {
  display: none; position: fixed;
  top: 78px; left: 10px; z-index: 200;
  background: var(--brown-mid); border: 1px solid var(--brown-border);
  border-radius: 8px; padding: .42rem .58rem; cursor: pointer;
  color: var(--cream); font-size: 1.15rem; line-height: 1;
  align-items: center;
}
@media (max-width: 768px) {
  /* Menu lewe (profil + nawigacja) widoczne pod hero, nie chowane w overlay */
  .pn-hamburger, .pn-overlay { display: none; }
  .pn-hero { height: 100px; padding: 0 1.25rem; }
  .pn-layout {
    flex-direction: column;
    height: auto; overflow: visible;
    max-width: none; border-left: none; border-right: none;
  }
  .pn-sidebar {
    position: static; transform: none;
    width: 100%; height: auto;
    border-right: none; border-bottom: 1px solid var(--brown-border);
  }
  .pn-content { padding: 1rem .9rem; overflow: visible; }
  /* Tab bar zawijany do kolejnej linii zamiast ucinany */
  .pn-l2-bar { flex-wrap: wrap; overflow-x: visible; padding: 0 .5rem; }
  /* Profil kompaktowy: avatar+imię w linii, badge+licznik w linii */
  .pn-user-apt { display: none; }
  .pn-ui-top { flex-direction: row; justify-content: center; gap: .7rem; }
  .pn-ui-top .pn-avatar, .pn-ui-top .pn-avatar-img { margin-bottom: 0; }
  .pn-ui-name-wrap { text-align: center; }
  .pn-user-name { line-height: 1.2; }
  .pn-badge-timer { flex-direction: row; justify-content: center; gap: .8rem; margin-top: .6rem; }
  /* Menu główne (L1) poziomo, kompaktowe — grupy mieszczą się w rzędach */
  .pn-nav { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 2px 3px; padding: 8px 4px; overflow: visible; }
  .pn-l1-item { margin: 0; padding: 5px 7px; gap: .35rem; font-size: .78rem; border-radius: 6px; border-bottom: 2px solid transparent; }
  .pn-l1-item .ti { font-size: .95rem; }
  .pn-l1-item.active { background: transparent; border-bottom-color: var(--cream); }
  .pn-separator { display: none; }
  .pn-sep-label { flex-basis: 100%; text-align: center; font-size: .6rem; padding: .3rem 0 .05rem; margin: 0; }
  .ub-card { flex-wrap: wrap; }
  .ub-balance { display: none; }
  .ub-form-grid { grid-template-columns: 1fr; }
}

/* ── DESKTOP (≥769px): menu na górze (poziomo), treść na pełną szerokość ── */
@media (min-width: 769px) {
  .pn-hamburger, .pn-overlay { display: none; }
  .pn-layout {
    flex-direction: column;
    height: auto; overflow: visible;   /* naturalny przepływ — bez wewnętrznego suwaka */
    /* szerokość strony bez zmian (1100px) — menu na górze i tak zwalnia miejsce po sidebarze */
  }
  .pn-sidebar {
    width: 100%; min-width: 0; flex-shrink: 0;
    flex-direction: row; align-items: stretch;
    border-right: none; border-bottom: 1px solid var(--brown-border);
    overflow: visible;
  }
  /* Profil kompaktowy po lewej */
  .pn-user-info {
    flex-direction: row; align-items: center; gap: .7rem;
    padding: .5rem 1.1rem; text-align: center;
    border-bottom: none; border-right: 1px solid var(--brown-border);
    flex-shrink: 0;
  }
  .pn-user-info .pn-ui-top { flex-direction: column; align-items: center; gap: .35rem; }  /* avatar NAD imieniem */
  .pn-user-info .pn-avatar, .pn-user-info .pn-avatar-img { width: 44px; height: 44px; margin-bottom: 0; }
  .pn-user-info .pn-ui-name-wrap { align-items: center; text-align: center; }             /* imię + ZARZĄDCA wyśrodkowane */
  .pn-user-info .pn-user-apt { display: none; }                                           /* usuń „WM Boczna16" */
  /* kolumna zegar → data → auto-wylogowanie (pudełko z separatorem) */
  .pn-user-info .pn-badge-timer {
    flex-direction: column; align-items: center; gap: 0;
    margin-top: 0; margin-left: .3rem;
    background: var(--brown-mid); border: 1px solid var(--brown-border);
    border-radius: 8px; padding: .28rem .7rem;
  }
  .pn-user-info .pn-idle-timer {
    border-top: 1px solid var(--brown-border); padding-top: 2px; margin-top: 2px;
    width: 100%; justify-content: center; font-size: .7rem; color: var(--cream-dim);      /* licznik wyśrodkowany */
  }
  /* Nawigacja pozioma: 1. linia mieszkańcy, 2. linia zarządca */
  .pn-nav {
    flex: 1; display: flex; flex-wrap: wrap; align-content: center; align-items: center;
    padding: .35rem .6rem; gap: 3px; overflow: visible;
  }
  .pn-l1-item { margin: .12rem; padding: .45rem .72rem; }
  .pn-separator { flex-basis: 100%; height: 0; margin: .28rem 0; border: none; border-top: 1px solid var(--brown-border); }  /* linia oddzielająca mieszkaniec ── zarządca */
  .pn-sep-label { display: none; }                                          /* usuń „Zarządca" */
  .pn-main { overflow: visible; min-width: 0; }
  .pn-content { overflow: visible; }
}

/* ── Moduł zarządzania użytkownikami (ub-*) ──────────────────────── */
.ub-list { display: flex; flex-direction: column; gap: 6px; }

.ub-card {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,252,223,.05); border: 1px solid var(--brown-border);
  border-radius: 9px; padding: 14px 16px; transition: background .13s;
}
.ub-card:hover { background: rgba(255,252,223,.08); }
.ub-card.ub-inactive { opacity: .55; }

.ub-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; color: #fff; letter-spacing: .02em;
}
.ub-info { flex: 1; min-width: 0; }
.ub-name { font-weight: 700; font-size: .95rem; color: var(--cream); }
.ub-meta { font-size: .8rem; color: var(--cream-muted); margin-top: 2px; }
.ub-badges { display: flex; align-items: center; gap: 6px; margin-top: 5px; flex-wrap: wrap; }

.ub-badge {
  font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 9px; border-radius: 20px;
}
.ub-admin   { background: rgba(196,165,64,.2);  color: #d4b84a; }
.ub-owner   { background: rgba(76,175,130,.18); color: #5cb88a; }
.ub-tenant  { background: rgba(255,252,223,.1); color: var(--cream-muted); }
.ub-inactive-badge { background: rgba(224,85,85,.18); color: #e05555; }
.ub-apt { font-size: .78rem; color: var(--cream-muted); }
.ub-no-apt { color: var(--danger); }

.ub-balance { display: flex; flex-direction: column; gap: 3px; text-align: right; flex-shrink: 0; }
.ub-bal-row { display: flex; gap: 10px; align-items: center; font-size: .78rem; color: var(--cream-muted); }
.ub-bal-row strong { font-size: .85rem; color: var(--cream); font-variant-numeric: tabular-nums; min-width: 70px; text-align: right; }
.ub-bal-row.ub-due strong { color: #e8a825; }

.ub-edit-panel {
  background: rgba(255,252,223,.04); border: 1px solid var(--brown-border);
  border-top: none; border-radius: 0 0 9px 9px;
  padding: 16px 18px; margin-top: -6px;
}
.ub-form-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px;
}
.ub-field { display: flex; flex-direction: column; gap: 5px; }
.ub-field-wide { grid-column: 1 / -1; }
.ub-field label { font-size: .78rem; font-weight: 600; color: var(--cream-muted); text-transform: uppercase; letter-spacing: .05em; }
.ub-field input,
.ub-field select,
.ub-field textarea {
  background: rgba(255,252,223,.06); border: 1px solid var(--brown-border);
  border-radius: 6px; padding: 8px 11px;
  color: var(--cream); font-size: .88rem; font-family: inherit;
  transition: border-color .15s;
}
.ub-field input:focus,
.ub-field select:focus,
.ub-field textarea:focus { outline: none; border-color: var(--cream-muted); }
.ub-field select option { background: var(--brown-dark); }
.ub-field textarea { resize: vertical; min-height: 60px; }
.ub-avatar-photo { display: block; object-fit: cover; }
.ub-card-actions {
  display: flex; flex-direction: column; gap: 5px; align-items: flex-end;
  padding-left: 14px; border-left: 1px solid var(--brown-border); flex-shrink: 0;
}
.btn-uact {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .72rem; font-weight: 600; white-space: nowrap;
  padding: 5px 11px; border-radius: 5px; border: none; cursor: pointer;
  transition: opacity .15s; font-family: inherit;
  width: 100%; justify-content: flex-start;
}
.btn-uact:hover { opacity: .75; }
.btn-uact-email  { background: rgba(255,252,223,.09);  color: var(--cream); }
.btn-uact-print  { background: rgba(255,252,223,.06);  color: var(--cream-muted); }
.btn-uact-edit   { background: rgba(196,165,64,.18);   color: var(--gold); }
.btn-uact-delete { background: rgba(224,82,82,.13);    color: #e07070; }
@media (max-width: 600px) {
  .ub-card { flex-wrap: wrap; }
  .ub-card-actions { border-left: none; border-top: 1px solid var(--brown-border); padding-left: 0; padding-top: 10px; width: 100%; flex-direction: row; flex-wrap: wrap; }
  .btn-uact { width: auto; }
}
.ub-form-actions { display: flex; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--brown-border); }
.ub-field-2col { grid-column: span 2; }

/* Photo upload */
.ub-form-photo-row { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.ub-photo-wrap { position: relative; flex-shrink: 0; width: 74px; height: 74px; }
.ub-photo-preview { width: 74px; height: 74px; border-radius: 50%; object-fit: cover; border: 2px solid var(--brown-border); }
.ub-photo-initials {
  width: 74px; height: 74px; border-radius: 50%;
  background: var(--gold); color: var(--brown-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.4rem; letter-spacing: .02em;
  border: 2px solid var(--brown-border);
}
.ub-photo-btn {
  position: absolute; bottom: 0; right: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--gold); color: var(--brown-dark);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .8rem; border: 2px solid var(--brown-dark);
  transition: opacity .15s;
}
.ub-photo-btn:hover { opacity: .85; }
.ub-form-grid-flex { flex: 1; min-width: 0; }
.ub-add-header {
  font-size: .9rem; font-weight: 700; color: var(--cream);
  margin-bottom: 14px; display: flex; align-items: center; gap: 7px;
}
.ub-add-hint {
  font-size: .78rem; color: var(--cream-muted);
  margin-top: 14px; display: flex; align-items: flex-start; gap: 6px;
  padding: 9px 12px; border-radius: 6px; background: rgba(255,252,223,.05);
  border: 1px solid var(--brown-border);
}
.ub-add-hint i { flex-shrink: 0; margin-top: 1px; }
.ub-form-section-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--cream-muted); margin: 14px 0 8px;
  padding-bottom: 5px; border-bottom: 1px solid var(--brown-border);
}

/* ── Klient e-mail (em-*) ─────────────────────────────────────── */
.em-layout {
  display: flex; gap: 0;
  /* pn-content has padding 1.5rem; we bleed to edges */
  margin: -1.5rem; height: calc(100% + 3rem); overflow: hidden;
}
.em-sidebar {
  width: 200px; min-width: 200px; flex-shrink: 0;
  background: var(--brown-dark);
  border-right: 1px solid var(--brown-border);
  display: flex; flex-direction: column; overflow: hidden;
}
.em-account-label {
  padding: .8rem 1rem .6rem;
  font-size: .72rem; color: var(--cream-muted);
  display: flex; align-items: center; gap: .35rem;
  border-bottom: 1px solid var(--brown-border);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.em-compose-btn {
  margin: .7rem .65rem .4rem;
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--teal); color: var(--cream);
  border: none; border-radius: 20px;
  padding: .52rem 1rem; font-size: .84rem; font-weight: 700;
  font-family: 'Raleway', sans-serif; cursor: pointer;
  transition: background var(--tr); flex-shrink: 0;
}
.em-compose-btn:hover { background: var(--teal-h); }
#em-nav { flex: 1; overflow-y: auto; padding: .3rem 0; }
.em-folder-item {
  display: flex; align-items: center; gap: .5rem;
  padding: .55rem .85rem; margin: .06rem .4rem;
  border-radius: 6px; cursor: pointer;
  color: var(--cream-muted); font-size: .84rem;
  transition: background .13s, color .13s; user-select: none;
}
.em-folder-item:hover { background: rgba(255,252,223,.05); color: var(--cream-dim); }
.em-folder-item.active { background: rgba(255,252,223,.09); color: var(--cream); }
.em-folder-item i { font-size: 16px; flex-shrink: 0; }
.em-folder-item b {
  margin-left: auto; font-size: .7rem; font-weight: 700;
  color: var(--teal-h); font-variant-numeric: tabular-nums;
}
.em-sidebar-bottom {
  flex-shrink: 0; padding: .3rem 0 .5rem;
  border-top: 1px solid var(--brown-border);
}

/* Pane */
.em-pane { flex: 1; min-width: 0; overflow-y: auto; background: var(--brown); display: flex; flex-direction: column; }

/* List toolbar */
.em-list-toolbar {
  display: flex; align-items: center; gap: .5rem;
  padding: .65rem 1rem; border-bottom: 1px solid var(--brown-border); flex-shrink: 0;
}
.em-list-total { font-size: .78rem; color: var(--cream-muted); margin-left: auto; }

/* Email list */
.em-list { display: flex; flex-direction: column; flex: 1; }
.em-list-item {
  display: flex; align-items: center; gap: .8rem;
  padding: .8rem 1rem; border-bottom: 1px solid rgba(255,252,223,.06);
  cursor: pointer; transition: background .12s;
}
.em-list-item:hover { background: rgba(255,252,223,.04); }
.em-list-item.unread { background: rgba(42,122,109,.05); }
.em-li-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--brown-mid); display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 700; color: var(--cream-dim);
}
.em-list-item.unread .em-li-avatar { background: var(--teal); color: #fff; }
.em-li-body { flex: 1; min-width: 0; }
.em-li-top { display: flex; justify-content: space-between; align-items: baseline; gap: .4rem; margin-bottom: .12rem; }
.em-li-from { font-size: .84rem; color: var(--cream-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.em-li-date { font-size: .72rem; color: var(--cream-muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.em-li-subject { font-size: .8rem; color: var(--cream-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.em-list-item.unread .em-li-from,
.em-list-item.unread .em-li-subject { color: var(--cream); font-weight: 700; }
.em-load-more { text-align: center; padding: 1rem; flex-shrink: 0; }

/* Detail */
.em-detail { display: flex; flex-direction: column; height: 100%; }
.em-detail-toolbar {
  display: flex; align-items: center; gap: .4rem;
  padding: .65rem 1rem; border-bottom: 1px solid var(--brown-border); flex-shrink: 0;
  background: var(--brown-dark);
}
.em-detail-header { padding: 1rem 1.4rem; border-bottom: 1px solid var(--brown-border); flex-shrink: 0; }
.em-detail-subject { font-size: 1.05rem; font-weight: 700; color: var(--cream); margin-bottom: .45rem; font-family: 'Raleway', sans-serif; }
.em-detail-meta { display: flex; flex-direction: column; gap: .18rem; font-size: .8rem; color: var(--cream-muted); }
.em-detail-body { flex: 1; overflow-y: auto; }
.em-body-frame { width: 100%; border: none; display: block; background: #fff; min-height: 300px; }
.em-body-text {
  padding: 1.25rem 1.4rem; font-size: .875rem; color: var(--cream-dim);
  white-space: pre-wrap; word-break: break-word; line-height: 1.65;
}

/* States */
.em-list-loading, .em-empty, .em-setup {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .75rem; padding: 3rem 2rem; text-align: center; color: var(--cream-muted); flex: 1;
}
.em-list-loading { flex-direction: row; padding: 2rem; }
.em-empty i, .em-setup i { font-size: 2.5rem; opacity: .5; }
.em-setup h3 { color: var(--cream); }
.em-error-msg { padding: 1.25rem; color: var(--danger); display: flex; gap: .5rem; align-items: center; }

/* Compose overlay */
.em-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 1rem;
}
.em-compose {
  background: var(--brown); border: 1px solid var(--brown-border);
  border-radius: var(--rl); width: min(660px, 100%); max-height: 90vh;
  display: flex; flex-direction: column; box-shadow: var(--shm);
}
.em-compose-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: .9rem 1.2rem; border-bottom: 1px solid var(--brown-border);
  font-size: .9rem; font-weight: 700; color: var(--cream); flex-shrink: 0;
}
.em-compose-head button {
  background: none; border: none; cursor: pointer; color: var(--cream-muted); font-size: 18px; padding: 2px;
}
.em-compose-head button:hover { color: var(--cream); }
.em-compose-body-wrap { padding: .9rem 1.2rem; overflow-y: auto; flex: 1; }
.em-field { margin-bottom: .6rem; }
.em-field label { display: flex; align-items: center; font-size: .78rem; color: var(--cream-muted); gap: .5rem; }
.em-field label > input, .em-field label > select { flex: 1; }
.em-c-textarea { width: 100%; min-height: 150px; resize: vertical; margin-top: .6rem; }
.em-c-sig-preview {
  margin-top: .5rem; padding: .65rem .9rem;
  background: rgba(255,252,223,.04); border: 1px solid var(--brown-border);
  border-radius: var(--r); font-size: .82rem; color: var(--cream-dim); min-height: 20px;
}
.em-c-sig-preview:empty { display: none; }
.em-compose-actions { display: flex; gap: .5rem; margin-top: .75rem; }

/* Settings */
.em-settings { padding: 1.4rem; }
.em-settings-title {
  font-size: 1.05rem; font-weight: 700; color: var(--cream);
  font-family: 'Raleway', sans-serif; margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: .5rem;
}
.em-sig-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .85rem; }
.em-sig-card {
  border: 1px solid var(--brown-border); border-radius: var(--r);
  margin-bottom: .65rem; overflow: hidden;
}
.em-sig-card-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: .55rem .85rem; background: var(--brown-dark);
  font-size: .85rem; color: var(--cream-dim);
}
.em-sig-preview-mini {
  padding: .65rem .85rem; font-size: .8rem; color: var(--cream-dim);
  border-top: 1px solid var(--brown-border); background: var(--brown);
  max-height: 80px; overflow: hidden;
}
.em-sig-editor-wrap {
  margin-top: 1rem; padding: 1rem; background: var(--brown-dark);
  border-radius: var(--r); border: 1px solid var(--brown-border);
}
.em-sig-editor-wrap .form-group { margin-bottom: .75rem; }
.em-sig-textarea { min-height: 110px; resize: vertical; }
.em-sig-editor-btns { display: flex; gap: .5rem; margin-top: .75rem; }
.em-empty-sigs { color: var(--cream-muted); font-size: .85rem; text-align: center; padding: 1rem 0; }
.form-check { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--cream-muted); cursor: pointer; margin-top: .5rem; }
.form-check input[type=checkbox] { cursor: pointer; accent-color: var(--teal); width: 15px; height: 15px; }

/* Spin */
.spin { animation: _em-spin .9s linear infinite; display: inline-block; }
@keyframes _em-spin { to { transform: rotate(360deg); } }

/* Responsive sidebar collapse */
@media (max-width: 540px) {
  .em-layout { margin: -1rem -.9rem; height: calc(100% + 2rem); }
  .em-sidebar { width: 46px; min-width: 46px; }
  .em-account-label span, .em-folder-item span, .em-folder-item b,
  .em-compose-btn span { display: none; }
  .em-compose-btn { border-radius: 50%; width: 38px; height: 38px; padding: 0; margin: .5rem auto; }
  .em-folder-item { padding: .55rem 0; justify-content: center; margin: .06rem .3rem; }
}

.fm-att { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin-bottom: .4rem; }
