/* Maragold: výrazná typografie značky, klidná pracovní plocha. */
:root {
  color-scheme: light;
  --paper: #f7f5f1;
  --surface: #fffefa;
  --ink: #302b2c;
  --muted: #716a6c;
  --line: #e3ddd8;
  --rose: #974967;
  --rose-dark: #76354e;
  --blush: #f1e6e8;
  --sage: #475b4c;
  --serif: Didot, 'Bodoni MT', 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, label[for] { -webkit-tap-highlight-color: transparent; }
button, label[for] { cursor: pointer; }
button { color: inherit; }
button:disabled { opacity: .45; cursor: default; }
button, a, input, select, textarea, summary { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--rose); }
a { color: var(--rose-dark); text-underline-offset: 3px; }
button { border: 1px solid var(--line); border-radius: 7px; background: var(--surface); padding: 10px 14px; transition: background .15s, border-color .15s; }
button:hover:not(:disabled) { background: #eee9e4; border-color: #bfb1ad; }
.masthead { max-width: 1144px; margin: auto; padding: 19px 28px 17px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark { border: 0; background: transparent; padding: 0; border-radius: 0; color: var(--rose-dark); font: 40px/.94 var(--serif); letter-spacing: -1.8px; }
.wordmark:hover:not(:disabled) { background: transparent; border: 0; }
.mastheadNote { color: var(--muted); font-size: 12px; letter-spacing: .35px; margin-left: auto; }
.tasksLink { color: var(--muted); font-size: 12px; background: transparent; padding: 8px 12px; }
.masthead { flex-wrap: wrap; gap: 10px; }
.tasksLink[aria-pressed=true] { background: var(--blush); color: var(--rose-dark); border-color: var(--rose); }
.collectionNote { color: var(--muted); font-size: 12px; margin: 0 0 12px; }
.personalGroups { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.personalGroups button { padding: 6px 10px; font-size: 12px; }
.personalGroups button[aria-pressed=true] { color: var(--rose-dark); border-color: var(--rose); background: var(--blush); }
.stageTabs.wardrobeTabs { grid-template-columns: repeat(4,minmax(0,1fr)); }
.catalogNav { border-block: 1px solid var(--line); background: rgba(255,254,250,.7); }
.navInner { max-width: 1144px; padding: 13px 28px 13px 92px; margin: auto; position: relative; }
.catalogTools { position: absolute; left: 28px; top: 13px; display: flex; flex-direction: column; gap: 7px; }
.quickAction { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border: 1px solid #d8cbce; border-radius: 50%; padding: 0; color: var(--rose-dark); background: var(--surface); }
.quickAction span { font-size: 29px; font-weight: 300; line-height: 1; }
.quickAction.addAction { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.quickAction.addAction:hover { background: #514447; }
.stageTabs { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 10px; }
.stageTabs button { min-width: 0; min-height: 64px; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); padding: 9px 10px; color: var(--muted); font-size: 13px; text-align: left; }
.stageTabHead { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.stageTabValue { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stageTabMissing { font-size: 10px; line-height: 1.2; font-weight: 400; }
.stageTabs button:hover:not(:disabled) { color: var(--ink); background: #f3eeeb; border-color: #c5b2b7; }
.stageTabs button[aria-selected=true] { color: var(--rose-dark); border-color: #b98094; background: var(--blush); }
.stageTabs small { font: 12px/1 var(--sans); color: #76696c; background: #efebe7; border-radius: 20px; padding: 4px 6px; }
.stageTabs button[aria-selected=true] small { color: var(--rose-dark); }
main { max-width: 1144px; padding: 22px 28px 22px 92px; margin: auto; }
.workspaceHeading { display: flex; align-items: center; gap: 16px; margin-bottom: 19px; }
#headerTitle { margin: 0; font: 38px/1.12 var(--serif); letter-spacing: -.7px; }
#backBtn { background: transparent; border-color: var(--line); border-radius: 50%; width: 34px; height: 34px; padding: 0; }
#status { font-size: 14px; color: var(--rose-dark); }
#status:not(:empty) { margin: 12px 0; padding: 10px 14px; background: var(--blush); border-radius: 6px; }
#filterInput { flex: 1; min-width: 0; max-width: 320px; margin-left: auto; padding-left: 14px; background: var(--surface); }
input, textarea, select { width: 100%; min-height: 43px; padding: 10px 11px; background: #fff; border: 1px solid #d9d2cf; border-radius: 6px; color: var(--ink); }
input::placeholder, textarea::placeholder { color: #8b8385; }
input:focus, textarea:focus, select:focus { border-color: var(--rose); }
textarea { resize: vertical; line-height: 1.6; }
input[type=file] { font-size: 13px; padding: 8px; }
input[type=file]::file-selector-button { border: 0; border-radius: 4px; background: var(--blush); color: var(--rose-dark); padding: 6px 9px; margin-right: 8px; cursor: pointer; }
input:disabled, textarea:disabled, select:disabled { color: var(--muted); background: #f3f0ed; }
label { display: grid; gap: 6px; color: #62595d; font-size: 13px; font-weight: 500; }
small { color: var(--muted); line-height: 1.5; }
#list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.item { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; display: flex; flex-wrap: wrap; gap: 13px; align-items: flex-start; box-shadow: 0 2px 7px #302b2c03; }
.item img { width: 84px; height: 104px; border-radius: 5px; object-fit: cover; background: #ede8e3; flex-shrink: 0; cursor: pointer; }
.item .info { flex: 1; min-width: 100px; }
.item strong { font-size: 16px; font-weight: 550; line-height: 1.4; }
.item .meta { color: var(--muted); font-size: 12px; line-height: 1.7; margin-top: 4px; }
.item .edit { padding: 2px; border: 0; background: transparent; color: #8a7c80; font-size: 17px; line-height: 1.4; }
.itemActions { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 7px; padding-top: 13px; border-top: 1px solid #eee8e3; }
.itemActions button, .itemActions a { font-size: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; background: transparent; text-decoration: none; }
.itemActions .nextStage { color: var(--sage); background: #edf0ea; border-color: #dce3d8; }
.itemActions .nextStage:hover { background: #e0e7dd; }
.stageBadge { display: inline-block; color: #695457; background: var(--blush); border-radius: 4px; padding: 2px 7px; margin-top: 8px; font-size: 11px; font-weight: 500; }
.sold, .score { display: inline-block; font-size: 11px; padding: 2px 6px; border-radius: 4px; background: #edf0ea; color: var(--sage); }
.profitPlus { color: var(--sage); font-weight: 600; }
.profitMinus { color: #9b3b46; font-weight: 600; }
form { display: grid; gap: 15px; padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
#addForm { max-width: 620px; }
.dims { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.sectionTitle { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 5px; color: var(--rose-dark); font-size: 20px; font-family: var(--serif); }
button[type=submit] { color: white; background: var(--rose-dark); border-color: var(--rose-dark); font-weight: 500; padding: 12px 18px; }
button[type=submit]:hover:not(:disabled) { background: #602a3f; border-color: #602a3f; }
button[value=draft] { color: var(--rose-dark); background: var(--blush); border-color: #e1ccd2; }
#cancelEdit { border: 0; background: transparent; color: var(--muted); text-decoration: underline; }
.detailCard { max-width: 720px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.detailCard > img { display: block; width: 100%; max-height: 520px; object-fit: contain; background: #efebe5; }
.detailCard .body { padding: 25px; }
.detailCard h2, dialog h2 { font: 30px/1.2 var(--serif); margin: 0 0 20px; }
.detailCard .row { display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid #eee8e3; font-size: 14px; }
.detailCard .row span:first-child { color: var(--muted); }
.detailCard .row span:last-child { text-align: right; overflow-wrap: anywhere; }
.detailActions { display: flex; gap: 10px; margin-top: 20px; }
.detailActions button { flex: 1; }
.delB { color: #9b3b46; }
.bigBtn { display: block; width: 100%; padding: 15px 18px; margin: 16px 0; border: 1px solid var(--line); border-radius: 6px; font-size: 15px; font-weight: 500; text-align: center; }
.brown { background: var(--rose-dark); color: white; }
.green { background: #edf0ea; color: var(--sage); border-color: #dce3d8; }
.sand { background: var(--blush); color: var(--rose-dark); }
dialog { width: min(580px,calc(100vw - 28px)); max-height: 88vh; padding: 25px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 90px #302b2c25; }
dialog::backdrop { background: #30282b65; }
dialog form { border: 0; padding: 0; }
dialog img { width: 70px; height: 85px; object-fit: cover; border-radius: 4px; }
.vintedPhotos { display: flex; flex-wrap: wrap; gap: 8px; }
.vintedPhoto { display: grid; gap: 5px; padding: 5px; border: 1px solid var(--line); border-radius: 6px; }
.vintedPhoto:first-child { border-color: var(--rose); background: var(--blush); }
.vintedPhoto button { font-size: 11px; padding: 5px 8px; }
.listingPreview > button { margin-top: 20px; }
.listingPreview img { width: 100%; height: auto; max-height: 360px; object-fit: contain; background: #f4efea; }
.listingPreview p { white-space: pre-wrap; line-height: 1.6; }
.listingPreview .previewPhotos { display: flex; gap: 7px; overflow: auto; margin-bottom: 18px; }
.listingPreview .previewPhotos img { width: 70px; height: 80px; object-fit: cover; }
.queueCard { padding: 20px; margin: 14px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 10px; max-width: 720px; }
.queueCard label { display: flex; align-items: center; gap: 9px; }
.queueCard input[type=checkbox] { width: 18px; min-height: 18px; accent-color: var(--rose); }
.queueCard summary { color: var(--muted); font-size: 13px; cursor: pointer; }
.queueCard details { border-top: 1px solid var(--line); padding-top: 10px; }
.queueCard details input, .queueCard details button { margin-top: 8px; }
#viewVinted > p:first-child { color: var(--muted); }
#viewVinted > label { max-width: 520px; margin-bottom: 18px; }
#viewVinted > button { margin: 0 5px 8px 0; font-size: 13px; }
#viewVinted > #vintedPublish { color: white; background: var(--rose-dark); border-color: var(--rose-dark); }
#vintedMessage, #vintedFormError { color: var(--rose-dark); font-size: 13px; white-space: pre-line; }
.loginPage { min-height: 100vh; min-height: 100dvh; padding: 24px; display: grid; place-items: center; }
.loginPanel { width: min(380px,100%); padding: 32px; gap: 22px; }
.loginPanel h1 { margin: 0; font-weight: 400; }
.err { display: none; font-size: 13px; color: #9b3b46; }
@media(max-width: 720px) {
  .masthead { padding: 17px 18px 14px; }
  .wordmark { font-size: 34px; }
  .mastheadNote { display: none; }
  .tasksLink { max-width: 115px; font-size: 11px; padding: 8px 10px; }
  .navInner { display: grid; padding: 12px 18px; grid-template-columns: 44px minmax(0,1fr); gap: 12px; align-items: center; }
  .catalogTools { position: static; gap: 7px; }
  .quickAction { width: 43px; height: 43px; }
  .stageTabs { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
  .stageTabs button { min-height: 59px; padding: 7px 8px; font-size: 11px; gap: 4px; }
  .stageTabValue { font-size: 12px; }
  .stageTabs small { font-size: 10px; padding: 4px 5px; }
  main { padding: 19px 18px; }
  #headerTitle { font-size: 34px; }
  #list { grid-template-columns: 1fr; gap: 13px; }
  #filterInput { max-width: 220px; min-height: 39px; font-size: 14px; }
  .item { padding: 15px; gap: 11px; }
  .item .edit { min-width: 26px; padding: 3px; }
  form { padding: 19px; }
  dialog { padding: 20px; }
}
@media(prefers-reduced-motion: reduce) { * { transition: none !important; } }

#saleFields { border-top: 1px solid var(--line); padding-top: 12px; }
#saleFields summary { cursor: pointer; color: var(--rose-dark); margin-bottom: 12px; }
#saleFields label { margin-bottom: 14px; }

/* Rozpis nákupních výdajů navazuje na stávající kompaktní formulář. */
.costInputs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.costInputs label { min-width:0; }
.costTotal { font-weight:600; }
input[readonly] { background:#f7f5f1; }
