/* ============ NovaRent — style wspólne ============ */
:root {
  --bg: #f9f9f7;
  --surface: #ffffff;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --line: #e1e0d9;
  --accent: #2a78d6;
  --accent-dark: #1c5cab;
  --good: #006300;
  --bad: #d03b3b;
  --free: #e8f4e8;
  --busy: #fbe4e4;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

/* ---- nagłówek publiczny ---- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.site-header .container { display: flex; justify-content: space-between; align-items: center; }
.brand { font-size: 20px; font-weight: 700; color: var(--ink); }
.brand span { color: var(--accent); }
.site-contact { font-size: 14px; color: var(--ink-2); text-align: right; }

.hero {
  background: linear-gradient(135deg, #1c5cab, #2a78d6);
  color: #fff;
  padding: 56px 0 60px;
  text-align: center;
}
.hero h1 { margin: 0 0 10px; font-size: 34px; }
.hero p { margin: 0; opacity: .92; font-size: 17px; }

/* ---- karty apartamentów ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; margin: 34px 0; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card-photo {
  height: 170px;
  background: linear-gradient(135deg, #9ec5f4, #6da7ec);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 44px;
}
.card-body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.card-body h2 { margin: 0 0 6px; font-size: 20px; }
.card-meta { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.card-desc { color: var(--ink-2); font-size: 15px; flex: 1; }
.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.price { font-size: 18px; font-weight: 700; }
.price small { font-weight: 400; color: var(--muted); }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
}
.btn:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--accent) !important; border: 1px solid var(--accent); }
.btn-ghost:hover { background: #eef4fc; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-danger { background: var(--bad); }
.btn-danger:hover { background: #a92f2f; }

/* ---- kalendarz dostępności ---- */
.calendars { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin: 20px 0; }
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.cal h3 { margin: 0 0 10px; font-size: 15px; text-align: center; color: var(--ink-2); }
.cal table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cal th { color: var(--muted); font-weight: 500; padding: 4px 0; }
.cal td { text-align: center; padding: 0; }
.cal td span {
  display: block; margin: 2px; padding: 6px 0; border-radius: 6px;
}
.cal .free span { background: var(--free); color: #1c5c1c; }
.cal .busy span { background: var(--busy); color: #8c2323; text-decoration: line-through; }
.cal .past span { color: #c3c2b7; }
.legend { display: flex; gap: 18px; font-size: 13px; color: var(--ink-2); margin: 6px 0 0; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---- formularz ---- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin: 26px 0;
}
.panel h2 { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; color: var(--ink-2); }
input, select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid #9ec5f4; border-color: var(--accent); }
textarea { min-height: 90px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; }

.alert { border-radius: 8px; padding: 12px 16px; margin: 16px 0; font-size: 15px; }
.alert-ok { background: #e8f4e8; color: #1c5c1c; border: 1px solid #bfdebf; }
.alert-err { background: #fbe4e4; color: #8c2323; border: 1px solid #eec3c3; }

.site-footer { color: var(--muted); font-size: 14px; text-align: center; padding: 30px 0 40px; }

/* ============ Panel administracyjny ============ */
.admin-nav {
  background: #14273d;
  color: #fff;
  padding: 0;
}
.admin-nav .container { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.admin-nav .brand { color: #fff; padding: 14px 16px 14px 0; font-size: 17px; }
.admin-nav a.nav-link {
  color: #b8c7da; padding: 15px 9px; font-size: 13.5px; font-weight: 500;
  text-decoration: none; white-space: nowrap;
}
.admin-nav a.nav-link:hover { color: #fff; }
.admin-nav a.nav-link.active { color: #fff; box-shadow: inset 0 -3px 0 var(--accent); }
.admin-nav .spacer { flex: 1; }

.page-title { display: flex; justify-content: space-between; align-items: center; margin: 26px 0 6px; flex-wrap: wrap; gap: 10px; }
.page-title h1 { margin: 0; font-size: 24px; }

/* tabele */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 16px 0; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: left; padding: 10px 14px; color: var(--muted);
  font-weight: 600; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 10px 14px; border-bottom: 1px solid #f0efec; vertical-align: top; }
table.data tr:last-child td { border-bottom: none; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-booking { background: #dcebfb; color: #1c5cab; }
.badge-direct { background: #e2f5ec; color: #116644; }
.badge-other { background: #f0efec; color: #52514e; }
.badge-inquiry { background: #fdf1d7; color: #8a6100; }
.badge-cancelled { background: #f0efec; color: #898781; text-decoration: line-through; }
.badge-confirmed { background: #e2f5ec; color: #116644; }

/* kafelki statystyk */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin: 20px 0; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.tile .t-label { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.tile .t-value { font-size: 24px; font-weight: 700; }
.tile .t-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.t-good { color: var(--good); }
.t-bad { color: var(--bad); }

.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 14px 0; }
.filters select { width: auto; }

.actions { white-space: nowrap; }
.actions a { margin-right: 8px; font-size: 13px; }

/* login */
.login-box { max-width: 380px; margin: 80px auto; }
