/* Wakacjoner — motyw „lato nad morzem”: niebo → piasek, turkus morza, koralowy zachód słońca. */
/* Wakacjoner — spokojny, elegancki motyw „piasek i morze” (zawsze jasny). */
:root {
  color-scheme: light;
  --sky: #ffffff; --sand: #f4f6f9; --surface: #ffffff; --surface-2: #f4f6f9; --text: #14213d; --muted: #66728a;
  --border: #e3e8ef; --sea: #0a6cb4; --sea-deep: #0b3d6e; --coral: #ff7a1a; --sun: #f5b72e; --palm: #3c8c6c;
  --primary: var(--sea); --primary-text: #ffffff; --accent: var(--coral);
  --good: #2f8a5f; --good-bg: #e5f4ec; --warn: #a86b1c; --danger: #c2412d;
  --bar: #c6dcef; --bar-cheap: #ff7a1a; --grid: #edf0f4; --line: #0a6cb4; --line-2: #f5b72e;
  --ryanair: #28457e; --wizzair: #9c2f6f;
  --radius: 16px; --shadow: 0 1px 2px rgb(20 33 61 / .05), 0 6px 20px rgb(20 33 61 / .07);
  --hero: linear-gradient(115deg, #e6f1fb 0%, #f1f7fd 55%, #fff5ea 100%);
  --font: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text); font: 16px/1.5 var(--font);
  background: var(--sand);
  min-height: 100vh; padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--sea); text-decoration: none; }
h1, h2, .brand { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
.price { font-family: var(--font-display); }
h1 { font-size: 1.7rem; margin: .4rem 0 .2rem; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; margin: 1.6rem 0 .7rem; }
.card h2 { margin-top: 0; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 6px; font-size: .9em; }
pre { white-space: pre-wrap; font-size: .8rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.warn { color: var(--warn); }
.danger { color: var(--danger) !important; }
.good { color: var(--good); font-weight: 700; }

/* ---------- górny pasek ---------- */
.topbar {
  box-shadow: 0 1px 0 var(--border);
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  padding: calc(.55rem + env(safe-area-inset-top)) 16px .55rem;
  background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.2) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: 1.2rem; color: var(--text); }
.brand img { border-radius: 9px; }
.topbar nav { display: flex; align-items: center; gap: .6rem; }
.nav-link { color: var(--muted); font-size: 1.05rem; font-weight: 700; }
.container { max-width: 900px; margin: 0 auto; padding: 12px 16px 56px; }

/* ---------- hero na pulpicie ---------- */
.hero {
  position: relative; overflow: hidden; margin: 6px 0 18px; padding: 28px 24px 56px; border-radius: 24px;
  color: var(--text); background: var(--hero); border: 1px solid var(--border);
}
.hero h1 { font-size: 1.9rem; margin: 0; }
.hero p { margin: .35rem 0 0; color: var(--muted); }
.hero .sun { position: absolute; right: 28px; top: 20px; width: 64px; height: 64px; border-radius: 50%;
  background: radial-gradient(circle, #ffd27a 0 55%, rgb(255 210 122 / .3) 56% 100%); }
.hero .waves { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 46px; }
.hero .waves path:nth-child(1) { fill: rgb(10 108 180 / .08); }
.hero .waves path:nth-child(2) { fill: rgb(10 108 180 / .13); }

/* ---------- kafelki rodzajów ---------- */
.quick-add { display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; margin: 0 0 .5rem; }
.tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; padding: .9rem .4rem;
  border-radius: 16px; color: var(--text); font-weight: 700; font-size: .85rem; text-align: center; min-height: 92px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s;
}
.tile .emoji { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; font-size: 1.3rem; line-height: 1; }
.tile:hover { transform: translateY(-2px); border-color: var(--sea); }
.tile-flight .emoji { background: #e6f1fb; }
.tile-package .emoji { background: #fff1e4; }
.tile-stay .emoji { background: #f3ecf6; }
.tile-ground .emoji { background: #e7f4ed; }
.tile-promo .emoji { background: #fff6dc; }

/* ---------- karty i układ ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
section.card { margin: 1rem 0; }
.stack { display: flex; flex-direction: column; gap: .95rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.actions form { margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 44px;
  padding: .5rem 1.15rem; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text); font: inherit; font-weight: 800; cursor: pointer; transition: transform .1s ease, box-shadow .15s;
}
.btn:hover { box-shadow: 0 4px 14px rgb(31 52 64 / .08); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-primary { background: var(--coral); border-color: var(--coral); color: #fff; }
.btn-primary:hover { background: #ec6a0c; }
.btn-sm { min-height: 36px; padding: .3rem .9rem; font-size: .9rem; }
.btn-link { border: 0; background: none; color: var(--muted); padding-left: 0; box-shadow: none !important; }

/* ---------- formularze ---------- */
label, .field { display: flex; flex-direction: column; gap: .3rem; font-weight: 700; font-size: .92rem; }
.label { font-weight: 700; }
input[type=text], input:not([type]), input[type=password], input[type=date], input[type=number], select {
  font: inherit; font-weight: 500; color: var(--text); background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: 14px; padding: .6rem .8rem; min-height: 46px; width: 100%;
}
input:focus-visible, select:focus-visible, .chips:focus-within { outline: 3px solid color-mix(in srgb, var(--sea) 35%, transparent); outline-offset: 1px; border-color: var(--sea); }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; }
legend { font-weight: 800; font-size: .92rem; margin-bottom: .35rem; }
label.check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; }
input[type=checkbox], input[type=radio] { width: 1.2rem; height: 1.2rem; accent-color: var(--sea); }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: var(--surface-2); border-radius: 16px; padding: 4px; border: 1.5px solid var(--border); }
.segmented label { flex-direction: row; justify-content: center; padding: .55rem; border-radius: 12px; font-weight: 800; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked) { background: var(--surface); box-shadow: var(--shadow); color: var(--sea); }
.segmented label:has(input:disabled) { opacity: .45; cursor: default; }
.kinds { grid-template-columns: repeat(5, 1fr); }
.kinds label { flex-direction: column; gap: 0; font-size: .8rem; text-align: center; }
details summary { cursor: pointer; font-weight: 800; }
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .4rem; }
fieldset > .market-grid, fieldset > p { width: 100%; }

.chips { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; padding: .35rem; min-height: 46px; background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 14px; }
.chips input { flex: 1; min-width: 9rem; border: 0 !important; background: transparent !important; min-height: 34px !important; padding: .2rem .3rem !important; outline: none; }
.chip { display: inline-flex; align-items: center; gap: .3rem; background: var(--sea); color: #fff; border-radius: 999px; padding: .2rem .3rem .2rem .7rem; font-weight: 800; font-size: .85rem; }
.chip button { border: 0; background: rgb(255 255 255 / .28); color: inherit; border-radius: 999px; width: 1.4rem; height: 1.4rem; cursor: pointer; line-height: 1; }

.flash { background: var(--good-bg); color: var(--text); border-radius: 14px; padding: .75rem 1rem; margin: .5rem 0 1rem; font-weight: 600; }
.flash.error { background: color-mix(in srgb, var(--danger) 15%, var(--surface)); }
.flash ul { margin: 0; padding-left: 1.1rem; }
.badge { display: inline-block; font-size: .75rem; font-weight: 800; background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: .1rem .6rem; }
.badge.spin::before { content: ""; display: inline-block; width: .6rem; height: .6rem; margin-right: .35rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; background: var(--surface-2); border-radius: 8px; padding: .05rem .45rem; margin: 0 .2rem .1rem 0; white-space: nowrap; }
.tag-ryanair { color: var(--ryanair); }
.tag-wizzair { color: var(--wizzair); }
.tag-tui { color: #d40e14; }
.tag-booking { color: #2a6ebb; }
.tag-airbnb { color: #ff385c; }
.tag-wakacjepl { color: #e2007a; }
.tag-koleo, .tag-flixbus { color: var(--palm); }
.tag-fly4free, .tag-piraci { color: var(--coral); }

/* ---------- lista obserwacji ---------- */
.watch-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.watch { position: relative; overflow: hidden; padding: 16px 16px 16px 20px; transition: transform .15s ease; }
.watch:hover { transform: translateY(-2px); }
.watch::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--sea); }
.watch.kind-package::before { background: #ff7a1a; }
.watch.kind-stay::before { background: #8a5aa8; }
.watch.kind-ground::before { background: #3c8c6c; }
.watch.kind-promo::before { background: #f5b72e; }
.watch-link { display: block; color: inherit; }
.watch.paused { opacity: .6; }
.watch-head { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.watch-head strong { font-size: 1.05rem; }
.watch-best { margin-top: .4rem; }
.price { font-weight: 800; font-size: 1.35rem; color: var(--text); white-space: nowrap; }

/* ---------- oferty ---------- */
.offers { list-style: none; margin: 0; padding: 6px 18px; }
.offer { display: flex; justify-content: space-between; gap: .9rem; padding: .95rem 0; border-top: 1px dashed var(--border); }
.offer:first-child { border-top: 0; }
.offer-title { font-weight: 800; font-size: 1.02rem; }
.offer-meta { font-size: .86rem; color: var(--muted); margin-top: .15rem; }
.offer-reason { font-size: .86rem; color: var(--good); font-weight: 800; margin-top: .25rem; }
.offer-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; }
.offer-foot { list-style: none; margin-top: -.65rem; padding-bottom: .65rem; }
.discount { font-size: .8rem; font-weight: 800; color: var(--good); background: var(--good-bg); border-radius: 999px; padding: .05rem .55rem; }
.links { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; font-size: .85rem; font-weight: 700; margin-top: .3rem; }
.links a { display: inline-block; padding: .35rem .9rem; border-radius: 999px; border: 1.5px solid var(--sea); color: var(--sea); white-space: nowrap; }
.links a:hover { background: var(--sea); color: #fff; }
.listing .thumb { width: 190px; height: 140px; object-fit: cover; border-radius: 12px; flex: none; }
.listing .offer-main { flex: 1; min-width: 0; }
.stars { color: var(--sun); font-size: .9rem; letter-spacing: -1px; }
.features { margin-top: .3rem; display: flex; flex-wrap: wrap; gap: .2rem; }

.results-head { display: flex; justify-content: space-between; align-items: baseline; }
.sort-chips { display: flex; gap: .4rem; overflow-x: auto; padding: .1rem 0 .6rem; scrollbar-width: none; }
.chip-link { flex: none; padding: .35rem .85rem; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font-weight: 800; font-size: .85rem; }
.chip-link.on { background: var(--sea); border-color: var(--sea); color: #fff; }
.filters { margin: 0 0 .9rem; padding: 12px 18px; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .7rem; margin-top: .8rem; align-items: end; }
.filter-actions { display: flex; gap: .4rem; align-items: center; }
.more { text-align: center; margin: 1rem 0; }

/* ---------- różne ---------- */
.detail-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; align-items: flex-start; }
.back { display: inline-block; color: var(--muted); font-size: .9rem; font-weight: 700; margin-top: .3rem; }
.danger-zone { margin-top: 2rem; text-align: center; }
.empty { text-align: center; padding: 2rem 1rem; }
.login { max-width: 400px; margin: 7vh auto 0; text-align: center; }
.login img { border-radius: 22px; box-shadow: var(--shadow); }
.login h1 { font-size: 2.2rem; }
.login form { text-align: left; margin-top: 1rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
[hidden] { display: none !important; }

/* ---------- wykresy ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart-grid { stroke: var(--grid); stroke-width: 1; }
.chart-label { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart-bar { fill: var(--bar); transition: opacity .1s; }
.chart-bar.cheap { fill: var(--bar-cheap); }
.chart-bar.selected { fill: var(--sea); stroke: var(--sea-deep); stroke-width: 2; }
.chart-hit { fill: transparent; }
.chart a { cursor: pointer; }
.chart a:hover .chart-bar { opacity: .7; }
.chart-line { fill: none; stroke: var(--line); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart-line.median { stroke: var(--line-2); stroke-width: 1.5; stroke-dasharray: 4 3; }
.chart-dot { fill: var(--coral); }
.legend-line { display: inline-block; width: 16px; height: 0; border-top: 3px solid var(--line); vertical-align: middle; }
.legend-line.median { border-top: 1.5px dashed var(--line-2); }

@media (max-width: 640px) {
  .hide-sm { display: none; }
  .hero { padding: 20px 18px 52px; }
  .hero h1 { font-size: 1.5rem; }
  .quick-add { grid-template-columns: repeat(5, 1fr); gap: .4rem; }
  .tile { min-height: 76px; font-size: .68rem; padding: .6rem .2rem; border-radius: 14px; }
  .tile .emoji { width: 34px; height: 34px; font-size: 1.1rem; }
  .kinds label { font-size: .68rem; }
  .offer { flex-direction: column; gap: .35rem; }
  .offer-side { flex-direction: row; align-items: center; justify-content: space-between; text-align: left; flex-wrap: wrap; }
  .links { flex-direction: row; gap: .6rem; flex-wrap: wrap; }
  .listing .thumb { width: 100%; height: 180px; }
  .watch-list { grid-template-columns: 1fr; }
}

/* ---------- planer podróży ---------- */
.budget { min-width: 190px; text-align: right; padding: 12px 16px; }
.bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: .35rem 0 .2rem; }
.bar span { display: block; height: 100%; background: var(--sea); border-radius: 999px; }
.bar span.over { background: var(--danger); }
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin: 1rem 0 .4rem; }
.step { display: flex; align-items: center; justify-content: center; gap: .45rem; padding: .7rem .5rem; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 700; font-size: .9rem; }
.step.on { border-color: var(--sea); box-shadow: 0 0 0 2px color-mix(in srgb, var(--sea) 25%, transparent); }
.step.done .step-icon { background: var(--good); color: #fff; }
.step-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); font-size: .95rem; }
.offers.chosen { border-color: var(--good); }
.guide-card { display: flex; gap: 1rem; align-items: center; }
.guide-card img { width: 160px; height: 110px; object-fit: cover; border-radius: 12px; }
.tile-trip .emoji { background: #e6f1fb; }
@media (max-width: 640px) {
  .stepper { gap: .3rem; }
  .step { flex-direction: column; font-size: .72rem; padding: .5rem .2rem; gap: .2rem; }
  .budget { width: 100%; text-align: left; }
  .guide-card { flex-direction: column; align-items: stretch; }
  .guide-card img { width: 100%; height: 160px; }
}
.plan-cta { display: flex; align-items: center; gap: 1rem; margin: 0 0 1rem; color: var(--text); }
.plan-cta .emoji { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 50%; background: #fff1e4; font-size: 1.6rem; }
.plan-cta > span:nth-child(2) { flex: 1; }
.plan-cta:hover { border-color: var(--sea); }
.kv-table { width: 100%; border-collapse: collapse; }
.kv-table td { padding: .35rem .3rem; border-bottom: 1px solid var(--border); }

/* ---------- ekran startowy i panel admina ---------- */
.landing { max-width: 960px; margin: 0 auto; }
.landing-hero { position: relative; overflow: hidden; text-align: center; padding: 42px 20px 70px; margin: 10px 0 20px;
  border-radius: 26px; background: var(--hero); border: 1px solid var(--border); }
.landing-hero img { border-radius: 16px; box-shadow: var(--shadow); }
.landing-hero h1 { font-size: 2.4rem; margin: .5rem 0 .2rem; }
.landing-hero .lead { color: var(--muted); font-size: 1.1rem; margin: 0 auto; max-width: 560px; }
.landing-hero .sun { position: absolute; right: 40px; top: 30px; width: 72px; height: 72px; border-radius: 50%;
  background: radial-gradient(circle, #ffd27a 0 55%, rgb(255 210 122 / .3) 56% 100%); }
.landing-hero .waves { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 50px; }
.landing-hero .waves path:nth-child(1) { fill: rgb(10 108 180 / .08); }
.landing-hero .waves path:nth-child(2) { fill: rgb(10 108 180 / .13); }
.landing-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: start; }
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.features li { display: flex; gap: .8rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 12px 14px; }
.features li > span { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); font-size: 1.2rem; }
.login-box h2 { margin-top: 0; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: .4rem; }
.admin-table td { padding: .55rem .4rem; border-top: 1px solid var(--border); vertical-align: top; }
.admin-table tr.off { opacity: .6; }
.admin-table details[open] { min-width: 320px; }
.quota-pill { font-size: .8rem; font-weight: 700; color: var(--muted); }
@media (max-width: 720px) { .landing-grid { grid-template-columns: 1fr; } .login-box { order: -1; } .landing-hero h1 { font-size: 1.9rem; } }
.place-choice { background: #fff7ec; border-radius: 14px; padding: 12px 14px; flex-direction: column; gap: .35rem; }
.place-choice label { font-size: .9rem; }
