/* Golebiarz application UI - shared responsive design system */

:root {
  --app-bg: #f4f7f5;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --surface-strong: #edf4f0;
  --ink: #15251d;
  --ink-soft: #526158;
  --ink-faint: #7b8981;
  --line: #dfe8e2;
  --line-strong: #cad8cf;
  --brand: #168653;
  --brand-dark: #0d603b;
  --brand-soft: #e0f3e8;
  --accent: #dff369;
  --danger: #c73d4b;
  --warning: #a26a0a;
  --info: #247b87;
  --shadow-sm: 0 1px 2px rgba(20, 43, 30, .04), 0 6px 18px rgba(20, 43, 30, .035);
  --shadow-md: 0 16px 42px rgba(20, 43, 30, .09);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --sidebar-width: 268px;
  --topbar-height: 76px;
}

html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--app-bg);
  font-family: "Aptos", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body, .table, .badge, .chip, input, select { font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; }
a { color: var(--brand-dark); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 3px solid rgba(22, 134, 83, .25) !important; outline-offset: 2px; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 1060; padding: 10px 14px; color: #fff; background: var(--brand-dark); border-radius: 9px; font-weight: 700; transform: translateY(-160%); transition: transform .18s ease; }
.skip-link:focus { color: #fff; transform: translateY(0); }

/* Shell */
.app { min-height: 100dvh; background: var(--app-bg); }
.content { min-width: 0; background: var(--app-bg); }
.is-authenticated .content { margin-left: var(--sidebar-width); }
.page-container {
  width: 100%;
  max-width: 1540px;
  margin-inline: auto;
  padding: 34px clamp(24px, 3vw, 52px) 64px;
}
.page-container > :first-child:not(.landing-page) { margin-top: 0; }
.page-container > h1:first-child,
.page-container > h2:first-child,
.page-container > .container > h1:first-child,
.page-container > .container > h2:first-child,
.page-container > .container-fluid > h1:first-child,
.page-container > .container-fluid > h2:first-child { margin-bottom: 24px; }

/* Sidebar */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1040;
  width: var(--sidebar-width);
  min-height: 100dvh;
  padding: 22px 16px 18px;
  overflow-y: auto;
  color: #dce9e1;
  background:
    radial-gradient(circle at 25% 0, rgba(223, 243, 105, .1), transparent 30%),
    #10271c;
  border: 0;
  display: flex;
  flex-direction: column;
}
.sidebar__header { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 0 8px 18px; }
.brand { min-width: 0; margin: 0; gap: 11px; color: #fff; }
.brand:hover { color: #fff; }
.brand__logo { width: 42px; height: 42px; margin: 0; object-fit: cover; object-position: left center; border-radius: 11px; background: #fff; }
.brand__text { font-family: "Aptos Display", "Segoe UI Variable Display", "Segoe UI", sans-serif; font-size: 18px; letter-spacing: -.03em; }
.sidebar__close { display: none; border: 0; background: transparent; color: #fff; font-size: 20px; }
.sidebar .nav { gap: 5px; margin-top: 12px; }
.nav__item {
  min-height: 48px;
  padding: 0 14px;
  gap: 13px;
  border-radius: 12px;
  color: #b7c9be;
  font-weight: 600;
  font-size: 14px;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.nav__item:hover { color: #fff; background: rgba(255,255,255,.07); transform: translateX(2px); }
.nav__item--active { color: #fff; background: var(--brand); box-shadow: 0 8px 22px rgba(0,0,0,.17); }
.nav__item--active:hover { background: #1a945d; }
.nav__icon { width: 20px; font-size: 18px; text-align: center; }
.sidebar__footer { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-backdrop { display: none; }

/* Topbar */
.topbar {
  height: var(--topbar-height);
  padding: 0 clamp(24px, 3vw, 52px);
  background: rgba(255,255,255,.88);
  border-color: var(--line);
  backdrop-filter: blur(16px);
  z-index: 1020;
}
.topbar__left { min-width: 0; overflow: hidden; }
.topbar__right { flex: 0 0 auto; margin-left: 20px; }
.mobile-menu-btn { display: none; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); font-size: 22px; }
.chips__label { color: var(--ink-faint); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.chip { min-height: 32px; padding: 7px 11px; color: var(--ink-soft); background: var(--surface-strong); font-size: 12px; font-weight: 600; }
.chip--plain { background: #fff; border: 1px solid var(--line); }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: 0; }
.icon-btn::before { content: "\F18A"; font-family: bootstrap-icons; font-size: 17px; color: var(--ink-soft); }
.icon-btn:disabled { opacity: .6; cursor: default; }
.user { padding: 5px 8px 5px 5px; border-radius: 13px; }
.user__avatar { width: 40px; height: 40px; color: var(--brand-dark); background: var(--brand-soft); font-size: 14px; }
.user__name { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.user__plan { font-size: 11px; }
.user__plan-label { display: none; }
.user__plan-badge { padding: 2px 7px; font-size: 10px; }
.dropdown-menu { padding: 8px; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-md); }
.dropdown-item { padding: 9px 11px; border-radius: 8px; font-size: 14px; }
.dropdown-item:active { background: var(--brand); }

/* Type and headings */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--ink);
  font-family: "Aptos Display", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  font-weight: 750;
  letter-spacing: -.025em;
  text-wrap: balance;
}
h1, .h1 { font-size: clamp(28px, 3vw, 38px); }
h2, .h2 { font-size: clamp(24px, 2.5vw, 32px); }
h3, .h3 { font-size: clamp(20px, 2vw, 25px); }
.text-muted, .form-text { color: var(--ink-faint) !important; }
hr { border-color: var(--line); opacity: 1; }

/* Buttons */
.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 15px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: none;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn-sm { min-height: 35px; padding: 6px 11px; border-radius: 9px; font-size: 12px; }
.btn-lg { min-height: 50px; padding-inline: 21px; }
.btn-primary, .btn-success { color: #fff; background: var(--brand); border-color: var(--brand); }
.btn-primary:hover, .btn-primary:focus, .btn-success:hover, .btn-success:focus { color: #fff; background: var(--brand-dark); border-color: var(--brand-dark); box-shadow: 0 8px 18px rgba(13, 96, 59, .18); }
.btn-outline-primary, .btn-outline-success { color: var(--brand-dark); border-color: #a9cabb; background: #fff; }
.btn-outline-primary:hover, .btn-outline-success:hover { color: var(--brand-dark); border-color: var(--brand); background: var(--brand-soft); }
.btn-secondary, .btn-outline-secondary { color: var(--ink-soft); border-color: var(--line-strong); background: #fff; }
.btn-secondary:hover, .btn-outline-secondary:hover { color: var(--ink); border-color: #acbcb2; background: var(--surface-strong); }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-outline-danger { color: var(--danger); border-color: #e4b9be; background: #fff; }
.btn-outline-danger:hover { background: #fae9eb; color: #a92735; border-color: #d98791; }
.btn-info, .btn-outline-info { color: #17616a; border-color: #a9d4d9; background: #edf8f9; }
.btn--roomy, .loft-add-btn, .fl-add, .fl-title + .btn { border-radius: 11px !important; }

/* Forms */
.form-label, form > .mb-3 > label, form > .mb-3 > legend { margin-bottom: 7px; color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.form-control, .form-select {
  min-height: 44px;
  padding: 9px 12px;
  color: var(--ink);
  background-color: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 14px;
}
.form-control:hover, .form-select:hover { border-color: #a9bbb0; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(22, 134, 83, .11); }
.form-control::placeholder { color: #9aa69f; }
.form-control-sm, .form-select-sm { min-height: 37px; }
textarea.form-control { min-height: 110px; }
.form-check-input { border-color: #aebdb4; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(22, 134, 83, .11); border-color: var(--brand); }
.input-group-text { color: var(--ink-soft); background: var(--surface-soft); border-color: var(--line-strong); }
form:not(.d-inline):not(.d-flex):not(.row):not(.lp-nav__actions):not([id="fl-form"]) { max-width: 980px; }
.page-login form, .page-register form, .page-forgot-password form, .page-reset-password form { max-width: none; }
.auth-card { max-width: 480px; }
.ring-group { gap: 7px; }
.ring-hyphen { color: var(--ink-faint); }
.bootstrap-duallistbox-container .box1,
.bootstrap-duallistbox-container .box2 { min-width: 0; }
.bootstrap-duallistbox-container select { min-height: 260px; }

/* Cards and grouped content */
.card, .loft-card, .lot-card, .fl-filters-panel {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
  overflow: hidden;
}
.card-header { min-height: 54px; display: flex; align-items: center; padding: 14px 19px; color: var(--ink); background: var(--surface-soft); border-color: var(--line); font-weight: 700; }
.card-body { padding: 20px; }
.card-footer { padding: 14px 20px; background: var(--surface-soft); border-color: var(--line); }
.list-group { border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.list-group-item { padding: 14px 17px; color: var(--ink); border-color: var(--line); }
.modal-content { border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.modal-header, .modal-footer { padding: 17px 20px; border-color: var(--line); }
.modal-body { padding: 20px; }

/* Tables */
.table-responsive { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.table { width: 100%; margin-bottom: 0; color: var(--ink); font-size: 14px; vertical-align: middle; }
.table > :not(caption) > * > * { padding: 14px 16px; border-bottom-color: var(--line); background: transparent; }
.table > thead > tr > th { color: var(--ink-faint); background: var(--surface-soft); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .065em; white-space: nowrap; }
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-bg-type: #fbfcfb; }
.table-hover > tbody > tr:hover > * , .loft-table tbody tr:hover td { --bs-table-bg-state: #f0f7f3; background: #f0f7f3; }
.table tbody tr:last-child td { border-bottom: 0; }
.table a:not(.btn) { color: var(--brand-dark); font-weight: 700; text-decoration: none; }
.page-container > table, form > table { display: block; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.page-container > table tbody, form > table tbody { white-space: nowrap; }

/* Tabs, pills and badges */
.nav-tabs { gap: 5px; padding: 5px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-strong); overflow-x: auto; flex-wrap: nowrap; }
.nav-tabs .nav-link { min-height: 40px; padding: 8px 14px; color: var(--ink-soft); border: 0 !important; border-radius: 9px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.nav-tabs .nav-link:hover { color: var(--ink); background: rgba(255,255,255,.65); }
.nav-tabs .nav-link.active { color: var(--brand-dark); background: #fff; box-shadow: 0 1px 5px rgba(20,43,30,.08); }
.nav-pills { gap: 6px; }
.nav-pills .nav-link { min-height: 39px; padding: 8px 14px; border-radius: 10px !important; color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.nav-pills .nav-link.active, .loft-tabs--main .nav-link.active { color: #fff !important; background: var(--brand) !important; }
.badge, .pill { border-radius: 999px; font-weight: 700; }
.bg-success { background-color: var(--brand) !important; }
.bg-info { background-color: #dceff1 !important; }
.bg-warning { background-color: #f5df9a !important; }
.alert { padding: 13px 16px; border: 1px solid transparent; border-radius: 13px; font-size: 14px; }
.alert-success { color: #135d3c; background: #e6f5ec; border-color: #c8e7d5; }
.alert-warning { color: #735113; background: #fff7df; border-color: #ecd99d; }
.alert-danger { color: #912b36; background: #fcebed; border-color: #efcbd0; }
.alert-info { color: #1f6068; background: #e8f5f6; border-color: #c5e4e7; }

/* Existing view-specific structures */
.loft-header, .fl-header { align-items: flex-start; margin-bottom: 22px; }
.loft-title, .fl-title { font-family: "Aptos Display", "Segoe UI Variable Display", "Segoe UI", sans-serif; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.04em; }
.loft-filterbar, .fl-toolbar { margin: 18px 0; }
.loft-filters .btn, .fl-type-pills .btn { min-height: 38px; padding: 7px 13px; border-radius: 9px; }
.loft-filters .btn.active, .fl-type-pills .btn-primary { background: var(--brand); border-color: var(--brand); }
.loft-card { margin-top: 15px; }
.fl-filters-panel { margin: 0 0 18px; padding: 17px; background: var(--surface); }
.fl-weather-grid { gap: 12px; }
.fl-bottom, .fl-sort, .lot-card { margin-left: 0; margin-right: 0; }
.lot-card { margin-bottom: 12px; }
.lot-row { min-height: 98px; padding: 18px 20px; }
.lot-title { font-family: Manrope, sans-serif; font-size: 17px; }
.lot-meta { margin-top: 9px; }
.lot-actions { align-items: center; }
#map { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
canvas { max-width: 100%; }
.progress { background: var(--surface-strong); border-radius: 999px; }
.progress-bar { background: var(--brand); }
.img-thumbnail { padding: 5px; border-color: var(--line); border-radius: var(--radius); }

/* Auth and utility screens */
.is-guest:not(.page-landing) .app {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
  background:
    radial-gradient(circle at 15% 10%, rgba(223,243,105,.22), transparent 28%),
    radial-gradient(circle at 90% 85%, rgba(22,134,83,.12), transparent 30%),
    #f4f8f5;
}
.is-guest:not(.page-landing) .content { width: 100%; background: transparent; }
.is-guest:not(.page-landing) .page-container { max-width: 540px; padding: 0; }
.is-guest:not(.page-landing) .page-container > .container {
  position: relative;
  max-width: 520px !important;
  padding: 38px !important;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
}
.is-guest:not(.page-landing) .page-container > .container::before {
  content: "Gołębiarz";
  display: block;
  margin-bottom: 28px;
  color: var(--brand-dark);
  font-family: "Aptos Display", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -.03em;
}
.page-404 .page-container > .container::before,
.page-500 .page-container > .container::before { margin-bottom: 10px; }

/* Legal documents and persistent legal navigation */
.legal-consent { padding-left: 1.8rem; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
.legal-consent .form-check-input { margin-left: -1.8rem; }
.legal-consent a { font-weight: 700; }

.is-guest.page-privacy-policy .app,
.is-guest.page-terms-of-service .app { display: block; padding: 0; background: var(--app-bg); }
.is-guest.page-privacy-policy .page-container,
.is-guest.page-terms-of-service .page-container { max-width: 1320px; padding: 42px clamp(20px, 4vw, 64px) 68px; }

.legal-page { min-width: 0; max-width: 1180px; margin: 0 auto; }
.legal-page__header { max-width: 820px; padding: 26px 0 50px; }
.legal-page__back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 42px; color: var(--ink-soft); font-size: 13px; font-weight: 700; text-decoration: none; }
.legal-page__back:hover { color: var(--brand-dark); }
.legal-page__label { margin: 0 0 10px; color: var(--brand-dark); font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.legal-page h1 { max-width: 760px; margin: 0; font-family: "Aptos Display", "Segoe UI Variable Display", "Segoe UI", sans-serif; font-size: clamp(38px, 6vw, 68px); line-height: 1.02; letter-spacing: -.055em; text-wrap: balance; }
.legal-page__lead { max-width: 65ch; margin: 22px 0 0; color: var(--ink-soft); font-size: clamp(17px, 2vw, 20px); line-height: 1.65; text-wrap: pretty; }
.legal-page__meta { display: flex; gap: 36px; margin: 30px 0 0; }
.legal-page__meta div { display: grid; gap: 2px; }
.legal-page__meta dt { color: var(--ink-faint); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.legal-page__meta dd { margin: 0; color: var(--ink); font-size: 13px; font-weight: 700; }
.legal-page__layout { display: grid; min-width: 0; grid-template-columns: minmax(180px, .28fr) minmax(0, 1fr); gap: clamp(42px, 7vw, 100px); align-items: start; }
.legal-toc { position: sticky; top: 28px; display: grid; gap: 4px; padding: 22px 0; border-top: 1px solid var(--line-strong); }
.legal-toc strong { margin-bottom: 8px; color: var(--ink); font-size: 12px; }
.legal-toc a { padding: 5px 0; color: var(--ink-soft); font-size: 12px; text-decoration: none; }
.legal-toc a:hover { color: var(--brand-dark); }
.legal-content { min-width: 0; max-width: 820px; }
.legal-content section { padding: 0 0 44px; scroll-margin-top: 28px; }
.legal-content section + section { padding-top: 44px; border-top: 1px solid var(--line); }
.legal-content h2 { margin: 0 0 20px; font-family: "Aptos Display", "Segoe UI Variable Display", "Segoe UI", sans-serif; font-size: clamp(23px, 3vw, 31px); letter-spacing: -.035em; }
.legal-content p, .legal-content li { color: #3f5047; line-height: 1.78; }
.legal-content p { max-width: 72ch; margin: 0 0 16px; }
.legal-content ul, .legal-content ol { display: grid; gap: 10px; max-width: 74ch; padding-left: 1.25rem; }
.legal-content strong { color: var(--ink); }
.legal-table-wrap { max-width: 100%; margin: 22px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.legal-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 13px; }
.legal-table th { padding: 14px 16px; color: var(--ink-faint); background: var(--surface-soft); font-size: 11px; text-align: left; text-transform: uppercase; letter-spacing: .05em; }
.legal-table td { width: 28%; padding: 18px 16px; color: #3f5047; line-height: 1.62; vertical-align: top; border-top: 1px solid var(--line); }
.legal-table td:first-child { width: 44%; }

.app-legal-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: calc(100% - clamp(48px, 6vw, 104px)); max-width: 1436px; margin: 0 auto; padding: 22px 0 30px; color: var(--ink-faint); border-top: 1px solid var(--line); font-size: 11px; }
.app-legal-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.app-legal-footer a { color: var(--ink-soft); font-weight: 700; text-decoration: none; }
.app-legal-footer a:hover { color: var(--brand-dark); }

/* Reusable page composition */
.app-page { width: 100%; }
.app-page--narrow { max-width: 820px; }
.app-page--centered { margin-inline: auto; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 24px; }
.page-heading__copy { min-width: 0; }
.page-heading__eyebrow { margin: 0 0 7px; color: var(--brand-dark); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.page-heading h1 { margin: 0; }
.page-heading__lead { max-width: 720px; margin: 8px 0 0; color: var(--ink-soft); }
.page-heading__actions { display: flex; align-items: center; flex: 0 0 auto; gap: 9px; }
.content-panel { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.content-panel + .content-panel { margin-top: 18px; }
.content-panel__heading { margin-bottom: 18px; }
.content-panel__heading h2 { margin: 0; font-size: 20px; }
.content-panel__heading p { margin: 5px 0 0; color: var(--ink-soft); }
.entity-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0 0 22px; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); }
.entity-facts > div { min-width: 0; padding: 17px 19px; background: var(--surface); }
.entity-facts dt { margin-bottom: 4px; color: var(--ink-faint); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.entity-facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.empty-state { display: grid; justify-items: center; padding: clamp(42px, 7vw, 72px) 22px; text-align: center; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty-state__icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 17px; color: var(--brand-dark); background: var(--brand-soft); border-radius: 15px; font-size: 23px; }
.empty-state h2, .empty-state h3 { margin: 0 0 8px; font-size: 20px; }
.empty-state p { max-width: 540px; margin: 0 0 20px; color: var(--ink-soft); }
.inline-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; white-space: nowrap; }
.file-drop { padding: 24px; background: var(--surface-soft); border: 1px dashed var(--line-strong); border-radius: 14px; }
.instruction-list { margin: 0; padding-left: 18px; color: var(--ink-soft); }
.instruction-list li + li { margin-top: 6px; }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.result-stat { padding: 14px; background: var(--surface-soft); border-radius: 11px; }
.result-stat span { display: block; color: var(--ink-faint); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.result-stat strong { display: block; margin-top: 3px; font-size: 22px; }
.network-error { margin: 0; }
.result-time .form-control { width: 72px; text-align: center; }
.skeleton-stack { display: grid; gap: 10px; }
.skeleton-line { height: 44px; border-radius: 9px; background: linear-gradient(90deg, var(--surface-strong), #f8faf9, var(--surface-strong)); background-size: 200% 100%; animation: skeleton-pulse 1.25s ease-in-out infinite; }
@keyframes skeleton-pulse { to { background-position: -200% 0; } }

/* Plan selection */
.plan-usage { max-width: 520px; margin: 0 auto 28px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan-card { position: relative; display: flex; flex-direction: column; min-height: 100%; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.plan-card--featured { z-index: 1; border: 2px solid var(--brand); box-shadow: var(--shadow-md); transform: translateY(-8px); }
.plan-card__badge { align-self: flex-start; margin-bottom: 16px; padding: 5px 9px; color: var(--brand-dark); background: var(--brand-soft); border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.plan-card__price { display: flex; align-items: baseline; gap: 5px; margin: 14px 0 3px; }
.plan-card__price strong { font-size: 31px; letter-spacing: -.04em; }
.plan-card ul { display: grid; gap: 9px; margin: 19px 0 24px; padding: 0; list-style: none; color: var(--ink-soft); }
.plan-card li { display: flex; gap: 8px; }
.plan-card li::before { content: "\2713"; color: var(--brand); font-weight: 900; }
.plan-card__actions { margin-top: auto; }
.payments-list { margin-top: 28px; }

/* Error pages */
.error-page__code { margin: 0; color: var(--brand); font-size: clamp(66px, 15vw, 118px); line-height: .9; letter-spacing: -.08em; }
.error-page h1 { margin: 19px 0 8px; font-size: 27px; }
.error-page p { margin: 0 auto 22px; color: var(--ink-soft); }

/* Marketing page keeps its own intentionally distinct art direction. */
.page-landing .page-container { max-width: none; padding: 24px; }

@media (max-width: 1199.98px) {
  :root { --sidebar-width: 238px; }
  .chips .chip:nth-of-type(n+4) { display: none; }
}

@media (max-width: 991.98px) {
  .is-authenticated .content { margin-left: 0; }
  .sidebar {
    width: min(310px, 88vw);
    transform: translateX(-105%);
    transition: transform .24s ease;
    box-shadow: var(--shadow-md);
  }
  .sidebar-is-open { overflow: hidden; }
  .sidebar-is-open .sidebar { transform: translateX(0); }
  .sidebar__close { display: grid; place-items: center; width: 40px; height: 40px; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 1030; width: 100%; height: 100%; border: 0; background: rgba(7,25,16,.52); backdrop-filter: blur(2px); }
  .sidebar-is-open .sidebar-backdrop { display: block; }
  .mobile-menu-btn { display: grid; flex: 0 0 auto; margin-right: 14px; }
  .topbar { padding-inline: 22px; }
  .chips__label { display: none; }
  .page-container { padding: 28px 22px 52px; }
  .fl-weather-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
}

@media (max-width: 767.98px) {
  :root { --topbar-height: 66px; }
  body { font-size: 14px; }
  .page-container { padding: 22px 16px 42px; }
  .topbar { padding-inline: 14px; }
  .topbar__right { margin-left: auto; }
  .icon-btn, .user__meta { display: none; }
  .user { padding: 0; }
  .user.dropdown-toggle::after { display: none; }
  .user__avatar { width: 40px; height: 40px; }
  .topbar .chips { flex-wrap: nowrap; overflow: hidden; }
  .topbar .chip { display: none; }
  .topbar .chip:first-child { display: inline-flex; max-width: 190px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .card-body { padding: 17px; }
  .card-header { padding: 13px 16px; }
  .loft-header, .fl-header, .fl-toolbar, .loft-filterbar { gap: 13px; }
  .loft-filterbar, .fl-toolbar { align-items: stretch !important; }
  .loft-filterbar { flex-direction: column; overflow: visible; }
  .loft-filterbar > .d-flex { width: 100%; flex-direction: column; align-items: stretch !important; }
  .loft-filterbar .loft-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  #pigeon-search-form { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; width: 100%; margin-left: 0 !important; }
  #pigeon-search-form .form-control { min-width: 0; }
  .loft-add-btn, .fl-add { width: 100%; }
  .loft-filterbar > .btn { width: 100%; }
  .loft-tabs-row, .loft-filterbar, .fl-toolbar { overflow-x: auto; }
  .fl-type-pills { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .fl-weather-grid { grid-template-columns: 1fr; }
  .lot-row { padding: 16px; }
  .lot-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .lot-actions .btn, .lot-actions form, .lot-actions form .btn { width: 100%; }
  .table > :not(caption) > * > * { padding: 12px 13px; }
  .ring-group { display: grid; grid-template-columns: 1fr auto 1.2fr auto .9fr auto 1.4fr; width: 100%; }
  .ring-input { width: 100%; max-width: none; min-width: 0; padding-inline: 8px; text-align: center; }
  .bootstrap-duallistbox-container .box1,
  .bootstrap-duallistbox-container .box2 { width: 100%; }
  .bootstrap-duallistbox-container .box1 { margin-bottom: 18px; }
  .page-distance .card-body > .row.mb-2 { display: none; }
  .page-distance .card-body > .row.g-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .page-distance .card-body > .row.g-2 > .col { width: 100%; }
  .page-distance .card-body > .row.g-2 > .col::before { display: block; margin-bottom: 7px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
  .page-distance .card-body > .row.g-2 > .col:first-child::before { content: "Szerokość geograficzna"; }
  .page-distance .card-body > .row.g-2 > .col:last-child::before { content: "Długość geograficzna"; }
  .page-distance .card-body > .row.g-2 > .col > .d-flex { gap: 6px !important; }
  .page-distance .card-body > .row.g-2 .form-select { min-width: 0; padding: 8px 21px 8px 8px; background-position: right .35rem center; font-size: 12px; }
  .page-heading { flex-direction: column; gap: 16px; }
  .page-heading__actions { width: 100%; flex-wrap: wrap; }
  .page-heading__actions .btn { flex: 1 1 auto; }
  .entity-facts { grid-template-columns: 1fr; }
  .content-panel { padding: 18px; }
  .result-stats { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .plan-card--featured { transform: none; }
  .is-guest:not(.page-landing) .app { padding: 16px; }
  .is-guest:not(.page-landing) .page-container > .container { padding: 27px 22px !important; border-radius: 19px; }
  .is-guest.page-privacy-policy .app,
  .is-guest.page-terms-of-service .app { padding: 0; }
  .is-guest.page-privacy-policy .page-container,
  .is-guest.page-terms-of-service .page-container { max-width: none; padding: 24px 18px 48px; }
  .legal-page__header { padding: 10px 0 38px; }
  .legal-page__back { margin-bottom: 30px; }
  .legal-page__meta { gap: 24px; }
  .legal-page__layout { grid-template-columns: 1fr; gap: 18px; }
  .legal-toc { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 18px 0; }
  .legal-toc strong { grid-column: 1 / -1; }
  .legal-content section { padding-bottom: 32px; }
  .legal-content section + section { padding-top: 32px; }
  .app-legal-footer { align-items: flex-start; flex-direction: column; width: calc(100% - 36px); gap: 12px; }
}

@media (max-width: 479.98px) {
  .mobile-menu-btn { margin-right: 9px; }
  .topbar .chip:first-child { max-width: 135px; }
  .btn-group.loft-filters, .loft-filterbar .loft-filters { display: grid; grid-template-columns: repeat(2, 1fr); width: 100%; }
  .loft-filterbar .loft-filters .btn:last-child { grid-column: 1 / -1; }
  .loft-filters .btn { min-width: 0; padding-inline: 8px; }
  .lot-actions { grid-template-columns: 1fr; }
  .ring-group { gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
