:root {
  --ink: #28231f;
  --muted: #81776c;
  --line: #e8e0d6;
  --paper: #f5f1eb;
  --card: #fffdfa;
  --rose: #b57368;
  --rose-dark: #8d534a;
  --green: #405c4a;
  --green-light: #ebf1eb;
  --shadow: 0 16px 45px rgba(55, 42, 32, .07);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input, textarea, select { font: inherit; }
button, a, select, input[type="color"], input[type="checkbox"] { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1380px)/2)); background: #fffdfa; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: var(--rose); color: white; font-family: 'Playfair Display', Georgia, serif; font-size: 24px; }
.brand strong { display: block; font-family: 'Playfair Display', Georgia, serif; font-size: 18px; letter-spacing: -.3px; }
.brand small { display: block; margin-top: 1px; color: var(--muted); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
.admin-link { padding: 10px 15px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #51463d; font-size: 13px; font-weight: 600; }
.admin-link span { margin-left: 5px; color: var(--rose); }
.shell { width: min(1380px, calc(100% - 48px)); margin: 0 auto; padding: 46px 0 22px; }
.intro-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.eyebrow { margin: 0 0 8px; color: var(--rose-dark); font-size: 10px; font-weight: 700; letter-spacing: .15em; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; }
h1 { margin-bottom: 8px; font-size: clamp(34px, 4vw, 46px); letter-spacing: -.7px; line-height: 1.1; }
.intro-copy { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.size-chip { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; padding: 11px 15px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,253,250,.66); color: #695f55; font-size: 12px; font-weight: 600; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-light); }
.steps { display: flex; align-items: center; max-width: 650px; margin: 30px auto 32px; padding: 0 18px; }
.step { display: flex; align-items: center; gap: 11px; color: #aaa198; }
.step > span { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid #ded5cb; border-radius: 50%; background: #fbf9f5; font-size: 13px; font-weight: 700; }
.step.active { color: var(--ink); }
.step.active > span { border-color: var(--rose); background: var(--rose); color: white; box-shadow: 0 0 0 5px rgba(181,115,104,.12); }
.step b, .step small { display: block; white-space: nowrap; }
.step b { font-size: 12px; }
.step small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.step-line { height: 1px; min-width: 45px; flex: 1; margin: 0 18px; background: #dcd3c9; }
.card { border: 1px solid #ece5dc; border-radius: 19px; background: var(--card); box-shadow: var(--shadow); }
.work-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(345px, .9fr); gap: 21px; align-items: start; }
.preview-card, .editor-card { padding: 24px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 19px; }
.panel-heading .eyebrow { margin-bottom: 4px; }
.panel-heading h2 { margin: 0; font-size: 22px; }
.live-tag { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid #e2eadf; border-radius: 999px; background: #f4f8f1; color: var(--green); font-size: 10px; font-weight: 600; white-space: nowrap; }
.live-tag i { width: 6px; height: 6px; border-radius: 50%; background: #6d936f; }
.label-stage { display: grid; place-items: center; min-height: 400px; padding: 35px; overflow: hidden; border: 1px solid #eee8df; border-radius: 15px; background: radial-gradient(ellipse at 48% 45%, #fff 0%, #f6f2ed 68%, #f0ebe4 100%); }
.label-preview { width: 100%; max-width: 780px; line-height: 0; filter: drop-shadow(0 13px 17px rgba(28, 24, 20, .25)); }
.label-preview svg { display: block; width: 100%; height: auto; overflow: visible; }
.preview-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 15px; color: var(--muted); font-size: 11px; }
.preview-footer b { color: var(--ink); }
.mini-icon { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 5px; border-radius: 50%; background: #f2e8e5; color: var(--rose-dark); }
.reset-link { padding: 7px 0 7px 9px; border: 0; background: none; color: var(--rose-dark); font-size: 10px; font-weight: 700; cursor: pointer; }
.reset-link:hover { text-decoration: underline; }
.object-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
.object-option { display: flex; align-items: center; min-width: 0; gap: 9px; padding: 9px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; transition: .15s ease; }
.object-option:hover { border-color: #d0b4aa; background: #fdf9f6; }
.object-option.active { border-color: var(--rose); background: #fbf2ef; box-shadow: 0 0 0 2px rgba(181,115,104,.1); }
.object-option-icon { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 29px; border-radius: 8px; background: #f4eee8; color: var(--rose-dark); font-family: Georgia, serif; font-size: 16px; }
.object-option-copy { min-width: 0; }
.object-option-copy b, .object-option-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.object-option-copy b { font-size: 10px; }
.object-option-copy small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.inspector { padding: 17px; border: 1px solid #eee7de; border-radius: 13px; background: #fbf9f6; }
.inspector-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.inspector-title .eyebrow { margin-bottom: 4px; font-size: 9px; }
.inspector-title h3 { margin: 0; font-size: 17px; }
.edit-pencil { color: var(--rose); font-size: 22px; }
.field-label { display: block; margin-bottom: 7px; color: #61574e; font-size: 11px; font-weight: 700; }
.field-label em { color: #bb5f4f; font-style: normal; }
.field-label small { color: #998f84; font-size: 10px; font-weight: 400; }
.text-input, .form-field input:not([type="color"]), .form-field textarea, .form-field select, .search-field input, .filter-field select { width: 100%; min-width: 0; border: 1px solid #e3dbd1; border-radius: 9px; outline: none; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.text-input, .form-field input:not([type="color"]), .form-field textarea, .form-field select { padding: 11px 12px; font-size: 13px; }
.text-input, .form-field textarea { resize: vertical; line-height: 1.45; }
.text-input:focus, .form-field input:focus, .form-field textarea:focus, .form-field select:focus, .search-field:focus-within { border-color: #bf887d; box-shadow: 0 0 0 3px rgba(181,115,104,.1); }
.form-row { display: grid; grid-template-columns: 1.2fr .8fr; gap: 12px; margin-top: 13px; }
.form-field { display: block; min-width: 0; }
.style-row input[type="number"] { padding: 10px 9px; }
.field-hint { display: block; margin-top: 4px; color: #a39990; font-size: 9px; }
.color-control { display: flex; align-items: center; min-height: 40px; gap: 9px; padding: 5px 9px; border: 1px solid #e3dbd1; border-radius: 9px; background: #fff; color: var(--muted); font-size: 10px; }
.color-control input { width: 25px; height: 25px; padding: 0; border: 0; border-radius: 6px; background: transparent; cursor: pointer; }
.color-control input::-webkit-color-swatch-wrapper { padding: 0; }
.color-control input::-webkit-color-swatch { border: 1px solid #ddd4ca; border-radius: 5px; }
.toggle-row { display: flex; gap: 17px; margin-top: 15px; }
.toggle-row label { display: inline-flex; align-items: center; gap: 6px; color: #71675e; font-size: 10px; cursor: pointer; }
.toggle-row input { position: absolute; opacity: 0; }
.toggle-box { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid #e2d9cf; border-radius: 7px; background: white; color: #635950; font-family: Georgia, serif; font-size: 13px; font-weight: 700; }
.toggle-box.italic { font-style: italic; }
.toggle-row input:checked + .toggle-box { border-color: var(--rose); background: var(--rose); color: white; }
.editor-actions { margin-top: 18px; }
.editor-actions p, .privacy-copy { margin: 9px 0 0; color: #92877d; font-size: 10px; line-height: 1.5; text-align: center; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 43px; padding: 0 17px; border: 1px solid transparent; border-radius: 10px; font-size: 12px; font-weight: 700; cursor: pointer; transition: transform .15s, background .15s, border-color .15s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .6; cursor: wait; transform: none; }
.button.primary { background: var(--green); color: #fff; box-shadow: 0 6px 13px rgba(64,92,74,.14); }
.button.primary:hover { background: #314a39; }
.button.secondary { border-color: #e0d7cd; background: #fffdfa; color: #564b42; }
.button.secondary:hover { border-color: #c9a79e; background: #fdf8f5; }
.button.full { width: 100%; }
.button span { margin-left: auto; font-size: 17px; font-weight: 400; }
.prototype-note { margin: 17px 0 0; color: #9a9087; font-size: 10px; text-align: center; }
.hidden { display: none !important; }
.details-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 21px; }
.text-button { padding: 8px 0; border: 0; background: none; color: var(--rose-dark); font-size: 12px; font-weight: 700; cursor: pointer; }
.compact-intro { margin-bottom: 23px; }
.details-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, .85fr); gap: 20px; align-items: start; }
.final-preview-card, .details-card { padding: 23px; }
.compact-stage { min-height: 320px; padding: 28px; }
.compact-stage .label-preview { max-width: 700px; }
.summary-lines { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
.summary-lines > span { padding: 8px 11px; border: 1px solid #eee6dd; border-radius: 8px; background: #fbf9f6; }
.summary-lines small, .summary-lines b { display: block; }
.summary-lines small { color: var(--muted); font-size: 9px; }
.summary-lines b { margin-top: 3px; font-size: 11px; }
.details-card h2 { margin-bottom: 20px; font-size: 23px; }
.details-card .form-field { margin-bottom: 15px; }
.details-row { grid-template-columns: 1fr auto; align-items: end; margin-top: 0; }
.quantity-control { display: flex; height: 43px; overflow: hidden; border: 1px solid #e3dbd1; border-radius: 9px; background: white; }
.quantity-control button { width: 39px; border: 0; background: #f7f3ee; color: #695d53; font-size: 19px; cursor: pointer; }
.quantity-control input { width: 58px; padding: 0; border: 0 !important; border-radius: 0 !important; text-align: center; box-shadow: none !important; }
.quantity-note { padding-bottom: 5px; color: #998f84; font-size: 10px; line-height: 1.35; }
.form-error { min-height: 18px; margin: 3px 0 8px; color: #a24337; font-size: 11px; }
.success-card { max-width: 650px; margin: 25px auto; padding: 52px 40px; text-align: center; }
.success-mark { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 20px; border-radius: 50%; background: #eaf2e8; color: var(--green); font-size: 31px; }
.success-card h1 { margin-bottom: 10px; font-size: 40px; }
.success-card > p:not(.eyebrow) { color: var(--muted); font-size: 14px; }
.project-code { display: inline-flex; flex-direction: column; gap: 5px; margin: 15px 0; padding: 14px 24px; border: 1px dashed #d6c8bc; border-radius: 11px; background: #fbf8f3; }
.project-code small { color: var(--muted); font-size: 9px; letter-spacing: .12em; }
.project-code strong { font-size: 17px; letter-spacing: .06em; }
.success-hint { font-size: 11px !important; }
.success-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.site-footer { display: flex; justify-content: space-between; width: min(1380px, calc(100% - 48px)); margin: 0 auto; padding: 19px 0 22px; border-top: 1px solid #e5ddd4; color: #a0968c; font-size: 10px; }

/* Panel projektów */
.admin-shell { padding-top: 49px; }
.admin-intro { align-items: center; margin-bottom: 29px; }
.admin-intro .button { white-space: nowrap; }
.admin-card { padding: 21px; }
.admin-toolbar { display: flex; align-items: flex-end; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid #eee7df; }
.search-field { display: flex; align-items: center; flex: 1; min-width: 220px; gap: 9px; padding: 0 12px; border: 1px solid #e3dbd1; border-radius: 9px; background: #fff; transition: .15s; }
.search-field > span { color: #a3968a; font-size: 22px; }
.search-field input { height: 43px; padding: 0; border: 0; outline: 0; box-shadow: none; }
.filter-field { display: block; min-width: 150px; }
.filter-field .field-label { margin-bottom: 5px; font-size: 10px; }
.filter-field select { height: 43px; padding: 0 11px; font-size: 12px; }
.refresh-button { min-height: 43px; }
.admin-count { display: flex; align-items: center; justify-content: space-between; padding: 17px 1px 12px; color: #9b9086; font-size: 10px; }
.admin-count strong { color: #574c43; font-size: 12px; }
.projects-list { display: grid; gap: 9px; }
.project-row { display: grid; grid-template-columns: 164px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 12px; border: 1px solid #eee8e0; border-radius: 13px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.project-row:hover { border-color: #dfc8bf; box-shadow: 0 6px 18px rgba(55,42,32,.04); }
.project-thumb { width: 164px; overflow: hidden; border-radius: 7px; line-height: 0; }
.project-thumb svg { width: 100%; height: auto; }
.project-info { min-width: 0; }
.project-info-heading { display: flex; align-items: center; gap: 10px; }
.project-info h2 { overflow: hidden; margin: 0; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.status-tag { display: inline-flex; align-items: center; flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; font-size: 9px; font-weight: 700; }
.status-tag.new { background: #f9eee3; color: #956732; }
.status-tag.approved { background: #eaf2e8; color: #426248; }
.status-tag.changes { background: #fae9e6; color: #a35045; }
.order-line { margin: 7px 0 8px; color: #51473f; font-size: 12px; font-weight: 600; }
.project-subline { display: flex; flex-wrap: wrap; gap: 13px; color: #9c9288; font-size: 9px; }
.project-subline span:first-child { color: var(--rose-dark); font-weight: 700; }
.project-actions { display: flex; align-items: center; gap: 8px; }
.project-actions .button { min-height: 36px; padding: 0 12px; font-size: 10px; }
.icon-action { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid #e7ded4; border-radius: 9px; background: #fffdfa; color: var(--green); font-size: 18px; cursor: pointer; }
.icon-action:hover { border-color: #c8d5c5; background: #f4f8f1; }
.empty-state { padding: 48px 18px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 15px; border-radius: 17px; background: #f5eee7; color: var(--rose); font-size: 28px; }
.empty-state h2 { margin-bottom: 7px; font-size: 22px; }
.empty-state p { max-width: 450px; margin: 0 auto 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.empty-state .button { min-height: 38px; }
.admin-warning { margin-top: 13px; color: #9e796b; }
.project-dialog { width: min(850px, calc(100% - 24px)); max-height: min(94vh, 920px); padding: 0; overflow: auto; border: 1px solid #e6ddd4; border-radius: 18px; background: #fffdfa; color: var(--ink); box-shadow: 0 30px 100px rgba(24,18,15,.25); }
.project-dialog::backdrop { background: rgba(35,29,25,.53); backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 21px 23px; border-bottom: 1px solid #eee7df; }
.dialog-head .eyebrow { margin-bottom: 4px; }
.dialog-head h2 { margin: 0; font-size: 22px; }
.close-button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #e6ddd4; border-radius: 50%; background: white; color: #64584d; font-size: 22px; cursor: pointer; }
.dialog-content { padding: 21px 23px; }
.dialog-preview { display: grid; place-items: center; min-height: 240px; padding: 24px; border: 1px solid #eee8df; border-radius: 12px; background: #f5f1eb; }
.dialog-preview .label-preview { max-width: 650px; }
.dialog-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 15px; }
.meta-item, .meta-message { padding: 11px 12px; border: 1px solid #eee7de; border-radius: 9px; background: #fbf9f6; }
.meta-item small, .meta-item strong, .meta-message small { display: block; }
.meta-item small, .meta-message small { margin-bottom: 4px; color: #978b80; font-size: 9px; }
.meta-item strong { font-size: 12px; }
.meta-message { grid-column: 1 / -1; }
.meta-message p { margin: 0; color: #5e554d; font-size: 11px; white-space: pre-wrap; }
.dialog-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; padding: 17px 23px 22px; border-top: 1px solid #eee7df; }
.dialog-footer .filter-field { width: 170px; }
.download-actions { display: flex; gap: 8px; }
.download-actions .button { min-height: 40px; font-size: 10px; }

@media (max-width: 990px) {
  .work-grid { grid-template-columns: minmax(0, 1.15fr) minmax(330px, .9fr); gap: 14px; }
  .preview-card, .editor-card { padding: 18px; }
  .label-stage { min-height: 330px; padding: 22px; }
  .details-grid { grid-template-columns: minmax(0, 1.05fr) minmax(330px, .9fr); gap: 14px; }
}
@media (max-width: 760px) {
  .topbar { height: 66px; padding: 0 17px; }
  .brand-mark { width: 35px; height: 35px; font-size: 21px; }
  .brand strong { font-size: 16px; }
  .shell { width: calc(100% - 28px); padding-top: 29px; }
  .intro-row { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 18px; }
  .intro-row h1 { font-size: 34px; }
  .intro-copy { max-width: 560px; font-size: 12px; }
  .size-chip { padding: 8px 11px; font-size: 10px; }
  .steps { margin: 23px auto; padding: 0 3px; }
  .step { gap: 7px; }
  .step > span { width: 29px; height: 29px; flex-basis: 29px; font-size: 11px; }
  .step b { font-size: 10px; }
  .step small { max-width: 115px; overflow: hidden; font-size: 8px; text-overflow: ellipsis; }
  .step-line { min-width: 18px; margin: 0 10px; }
  .work-grid, .details-grid { grid-template-columns: 1fr; }
  .preview-card { order: 0; }
  .editor-card { order: 1; }
  .preview-card, .editor-card, .final-preview-card, .details-card { padding: 16px; border-radius: 15px; }
  .panel-heading { margin-bottom: 14px; }
  .panel-heading h2 { font-size: 19px; }
  .panel-heading .eyebrow { font-size: 9px; }
  .live-tag { padding: 7px 8px; font-size: 8px; }
  .label-stage { min-height: 250px; padding: 17px 13px; border-radius: 11px; }
  .preview-footer { flex-direction: column; gap: 7px; font-size: 9px; }
  .editor-card .panel-heading { margin-bottom: 13px; }
  .object-list { gap: 7px; }
  .object-option { padding: 8px; gap: 7px; }
  .object-option-icon { width: 25px; height: 25px; flex-basis: 25px; }
  .object-option-copy b { font-size: 9px; }
  .object-option-copy small { font-size: 8px; }
  .inspector { padding: 13px; }
  .details-top { margin-bottom: 15px; }
  .compact-intro { margin-bottom: 17px; }
  .compact-stage { min-height: 230px; }
  .details-card h2 { font-size: 21px; }
  .success-card { margin: 7px auto; padding: 36px 20px; }
  .success-card h1 { font-size: 34px; }
  .success-actions { flex-direction: column; }
  .site-footer { width: calc(100% - 28px); font-size: 9px; }
  .admin-shell { padding-top: 29px; }
  .admin-intro { align-items: flex-start; }
  .admin-intro .button { min-height: 37px; }
  .admin-card { padding: 12px; }
  .admin-toolbar { align-items: stretch; flex-wrap: wrap; gap: 8px; }
  .search-field { min-width: 100%; }
  .filter-field { flex: 1; min-width: 135px; }
  .refresh-button { align-self: flex-end; }
  .project-row { grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 9px; }
  .project-thumb { width: 92px; }
  .project-info-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .project-info h2 { font-size: 15px; }
  .project-subline { gap: 5px 9px; font-size: 8px; }
  .project-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .project-actions .button { flex: 1; }
  .dialog-content { padding: 13px; }
  .dialog-head { padding: 16px; }
  .dialog-preview { min-height: 175px; padding: 12px; }
  .dialog-meta { grid-template-columns: repeat(2, 1fr); gap: 7px; }
  .meta-message { grid-column: 1 / -1; }
  .dialog-footer { align-items: stretch; flex-direction: column; padding: 13px 16px 17px; }
  .dialog-footer .filter-field { width: 100%; }
  .download-actions { flex-direction: column; }
}
