@font-face { font-family: "Archivo"; src: url(fonts/archivo-latin.woff2) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo"; src: url(fonts/archivo-latin-ext.woff2) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --green: #80b529; --green-dk: #5f8a17; --ink: #111; --board: #f2f2ee; --white: #fff; --steel: #7c858c; --muted: #5b6268;
  --line: #d9dad3; --yellow: #ffe718; --red: #b3261e; --ease: cubic-bezier(.23, 1, .32, 1);
  --rule: 2px solid var(--ink); --r: 4px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1rem/1.5 "Archivo", system-ui, sans-serif; color: var(--ink); background: var(--board); }
h1, h2, p, ul, ol { margin: 0; }
h1 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
h1:focus { outline: none; }
h2 { font-size: 1.125rem; font-weight: 800; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

/* shell */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100svh; }
.side { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; gap: 28px; padding: 20px 16px; background: var(--ink); color: #e6e8e9; }
.logo { display: inline-flex; align-items: center; gap: 12px; align-self: flex-start; padding: 10px 14px 10px 12px; background: var(--green); color: var(--ink); text-decoration: none; font-weight: 800; }
.logo svg { width: 52px; height: 18px; }
.side__nav { display: flex; flex-direction: column; gap: 2px; }
.side__nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 12px; border-radius: var(--r); font-weight: 600; text-decoration: none; transition: background-color .16s, color .16s; }
.side__nav a:hover { background: #222; color: var(--white); }
.side__nav a.active { background: var(--green); color: var(--ink); }
.badge { min-width: 24px; padding: 1px 7px; border-radius: 99px; background: var(--yellow); color: var(--ink); font-size: .8125rem; text-align: center; }
.side__foot { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; font-size: .9375rem; }
.side__foot a { text-decoration: none; }
.side__foot .ver { opacity: .55; font-size: .75rem; }
.side__foot a:hover, .side .linkbtn:hover { color: var(--green); }
.side .linkbtn { color: inherit; }
.main { padding: 32px clamp(16px, 3vw, 40px) 120px; max-width: 1180px; width: 100%; }

/* page head */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.head p { margin-top: 6px; max-width: 60ch; }
.crumbs { margin-bottom: 8px; font-size: .875rem; color: var(--muted); }
.crumbs a { text-decoration: none; } .crumbs a:hover { text-decoration: underline; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: var(--rule); border-radius: var(--r);
  background: var(--white); color: var(--ink); font: 700 .9375rem/1 inherit; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .16s var(--ease), background-color .16s, box-shadow .16s var(--ease); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 2px 0 var(--ink); }
.btn:active { transform: scale(.97); box-shadow: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--green { background: var(--green); }
.btn--danger { background: var(--red); border-color: var(--red); color: var(--white); }
.btn--sm { min-height: 36px; padding: 0 12px; font-size: .875rem; }
.btn--lg { min-height: 52px; padding: 0 26px; font-size: 1rem; }
.linkbtn { padding: 4px 0; border: 0; background: none; font: inherit; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkbtn:hover { color: var(--red); }
.iconbtn { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); font: 700 1rem/1 inherit; cursor: pointer; transition: border-color .16s, transform .16s var(--ease); }
.iconbtn:hover { border-color: var(--ink); }
.iconbtn:active { transform: scale(.94); }
.iconbtn--danger:hover { border-color: var(--red); color: var(--red); }

/* cards & forms */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); }
.edit { display: flex; flex-direction: column; gap: 16px; }
.edit > .card { padding: 20px; }
.edit h2 { margin-bottom: 12px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.span2 { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9375rem; }
label small { font-weight: 400; color: var(--muted); }
input:not([type=checkbox], [type=radio], [type=file]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #b9bbb3; border-radius: var(--r); background: var(--white);
  font: 400 1rem/1.4 inherit; color: var(--ink); transition: border-color .16s, box-shadow .16s; }
input:hover, select:hover, textarea:hover { border-color: var(--steel); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgb(128 181 41 / .35); }
textarea { resize: vertical; }
label.check, label.radio { flex-direction: row; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.check input, .radio input { width: 20px; height: 20px; accent-color: var(--green-dk); }
label.check { align-self: end; min-height: 44px; }
.alert { padding: 10px 14px; border-left: 4px solid var(--red); background: #fbeceb; color: #7a1a14; }
.ok { font-weight: 700; color: var(--green-dk); }
.empty { padding: 28px; border: 1px dashed #b9bbb3; border-radius: var(--r); color: var(--muted); text-align: center; }
.savebar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin: 0 -8px; padding: 14px 8px;
  background: linear-gradient(transparent, var(--board) 30%); }
.spacer { flex: 1; }

/* upload */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sec-head h2 { margin: 0; }
.upload { position: relative; overflow: hidden; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.upload:focus-within { outline: 3px solid var(--green); outline-offset: 2px; }
.upload.is-busy { pointer-events: none; opacity: .8; }

/* photos */
.photos { list-style: none; padding: 0; margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.photo { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--white); transition: border-color .16s; }
.photo img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; background: var(--board); }
.photo.is-cover { border: 2px solid var(--green); }
.photo__bar { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px; }
.photo__bar .radio { font-size: .875rem; }
.photo__move { display: flex; gap: 4px; }
.photo__alt { border-width: 1px 0 0 !important; border-radius: 0 !important; font-size: .875rem !important; min-height: 40px !important; }
.cover { display: flex; align-items: flex-end; gap: 16px; }
.cover img { width: 240px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r); }

/* project tiles */
.grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; height: 100%; overflow: hidden; text-decoration: none; transition: transform .2s var(--ease), border-color .2s; }
.tile:hover { transform: translateY(-2px); border-color: var(--ink); }
.tile img, .tile__nophoto { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; background: var(--board); }
.tile__nophoto { display: grid; place-items: center; color: var(--muted); }
.tile__body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.tile__meta { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tile--hidden img { filter: grayscale(1); opacity: .6; }

/* post rows */
.rows { list-style: none; padding: 0; overflow: hidden; }
.rows li + li { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 14px; padding: 10px 14px; text-decoration: none; transition: background-color .16s; }
.row:hover { background: #f8f8f5; }
.row img, .row__ph { flex: none; width: 96px; height: 64px; object-fit: cover; border-radius: 3px; background: var(--board); }
.row__main { display: flex; flex-direction: column; min-width: 0; }

/* editor */
.toolbar { position: sticky; top: 0; z-index: 4; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid #b9bbb3; border-bottom: 0; border-radius: var(--r) var(--r) 0 0; background: #f8f8f5; }
.toolbar button { min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); font: 600 .875rem/1 inherit; cursor: pointer; }
.toolbar button:hover { border-color: var(--ink); }
.toolbar button:active { transform: scale(.96); }
.toolbar__sep { width: 1px; background: var(--line); margin: 0 4px; }
.editor { min-height: 360px; padding: 16px 18px; border: 1px solid #b9bbb3; border-radius: 0 0 var(--r) var(--r); line-height: 1.65; }
.editor:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgb(128 181 41 / .35); }
.prose > * + * { margin-top: .8em; }
.prose h2 { font-size: 1.4rem; margin-top: 1.2em; } .prose h3 { font-size: 1.15rem; margin-top: 1em; }
.prose ul, .prose ol { padding-left: 1.4em; }

/* leads */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { display: inline-flex; gap: 8px; align-items: center; min-height: 38px; padding: 0 14px; border: 1px solid #b9bbb3; border-radius: 99px; background: var(--white); font: 600 .9375rem/1 inherit; cursor: pointer; transition: border-color .16s, background-color .16s; }
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--white); }
.chip b { font-weight: 700; opacity: .7; }
.leads { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.lead { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.lead--new { border-left: 5px solid var(--yellow); }
.lead__top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.lead__top > div { display: flex; flex-direction: column; }
.lead__name { font-size: 1.125rem; }
.lead__msg { white-space: pre-line; max-width: 75ch; }
.lead__contact { display: flex; flex-wrap: wrap; gap: 8px; }
.lead__note { font-size: .875rem; }
.lead__actions { display: flex; align-items: center; gap: 10px; font-size: .9375rem; }
.status { width: auto !important; min-height: 38px !important; font-weight: 700 !important; }
.status--Nowe { background: var(--yellow) !important; }
.status--WToku { background: #e6f0d3 !important; }
.status--WycenaWyslana { background: #dfe7ee !important; }

/* login */
.login { min-height: 100svh; display: grid; place-items: center; padding: 20px; background: var(--ink); }
.login__card { width: min(400px, 100%); padding: 32px 28px; display: flex; flex-direction: column; gap: 16px; border: 0; }
.login__mark { width: 87px; height: 30px; padding: 0; background: var(--green); box-shadow: 0 0 0 10px var(--green); margin: 10px 10px 8px; }

/* blazor */
#blazor-error-ui { display: none; position: fixed; inset: auto 0 0; z-index: 1000; padding: 12px 20px; background: var(--yellow); font-weight: 600; }
#blazor-error-ui .dismiss { float: right; cursor: pointer; }
.blazor-error-boundary { padding: 1rem; background: #b32121; color: white; }
.blazor-error-boundary::after { content: "Wystąpił błąd."; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center; gap: 12px; padding: 10px 12px; overflow-x: auto; }
  .logo span { display: none; }
  .side__nav { flex-direction: row; }
  .side__nav a { white-space: nowrap; padding: 9px 10px; }
  .side__foot { flex-direction: row; margin: 0 0 0 auto; white-space: nowrap; }
  .side__foot > a { display: none; }
  .main { padding-top: 20px; }
  .fields { grid-template-columns: 1fr; }
  .lead__top { flex-direction: column; }
  .cover { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0s !important; } }
