/* ======================================================
   WYGLĄD TABELI MIESZKAŃ – NOWOCZESNY I CZYTELNY
====================================================== */

.tvz-front-wrap {
  margin: 30px 0;
  font-family: "Segoe UI", "Open Sans", sans-serif;
  color: #222;
}

/* --- tabela --- */
.tvz-front-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
  border: 1px solid #e2e6ea;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tvz-front-table th {
  background: #17375e;
  color: #fff;
  font-weight: 600;
  padding: 12px 10px;
  text-align: center;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tvz-front-table td {
  padding: 10px 8px;
  text-align: center;
  border-top: 1px solid #eaeaea;
  vertical-align: middle;
  background: #fff;
}

.tvz-front-table tr:nth-child(even) td {
  background: #f8fafc;
}

.tvz-front-table tr:hover td {
  background: #eef4fb;
}

/* --- przyciski i linki --- */
.historia-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f4f7ff;
  border: 1px solid #b7cdfc;
  color: #1a3d8f;
  font-size: 13px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.historia-btn:hover {
  background: #e8efff;
  border-color: #98b7fb;
  color: #0a2f88;
}

.pdf-link {
  color: #c92a2a;
  font-size: 18px;
  text-decoration: none;
  margin: 0 3px;
  transition: color .2s ease;
}
.pdf-link:hover {
  color: #a81818;
}

/* --- historia cen --- */
.tvz-historia-tabela {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  background: #fafafa;
  font-size: 14px;
}

.tvz-historia-tabela th {
  background: var(--contrast);
  font-weight: 600;
  text-align: left;
  padding: 6px;
  border-bottom: 1px solid #ddd;
}

.tvz-historia-tabela td {
  padding: 6px;
  border-bottom: 1px solid #eee;
}

.tvz-download {
  text-align: right;
  margin-top: 15px;
}

.tvz-download a {
  color: #17375e;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s;
}
.tvz-download a:hover {
  color: #0c2e5d;
  text-decoration: underline;
}

/* ======================================================
   RESPONSYWNOŚĆ – LEPSZY UKŁAD NA TELEFONIE
====================================================== */

@media (max-width: 768px) {
  .tvz-front-table {
    border: none;
    box-shadow: none;
  }

  .tvz-front-table thead {
    display: none;
  }

  .tvz-front-table tr {
    display: block;
    background: #fff;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 14px;
  }

  .tvz-front-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    padding: 5px 0;
    font-size: 14px;
  }

  .tvz-front-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #17375e;
    flex: 0 0 48%;
    text-align: left;
  }

  .tvz-front-table td:last-child {
    border-bottom: none;
  }

  .historia-btn {
    padding: 4px 8px;
    font-size: 12px;
  }

  .tvz-download {
    text-align: center;
  }
}


@media (max-width: 768px) {
  .tvz-front-table tr {
    background: #f8fbff;
    border: 1px solid #cdddf5;
  }
  .tvz-front-table td {
    padding: 6px 0;
    border-bottom: 1px dashed #d5e0f5;
  }
  .tvz-front-table td:last-child {
    border-bottom: none;
  }
}
