/* Panel Mięsnej Puchy: wstążka z działami u góry, pod nią zakładki działu. */
:root {
  --ink: #111113; --ink-2: #1d1d21; --bg: #f5f2ee; --card: #fff; --text: #26262a; --muted: #6d6a70; --line: #ebe5de;
  --pink: #e94f9b; --pink-deep: #d43f88; --blue: #3c9fd6; --orange: #e88a12; --teal: #2fb3a8; --green: #1d8a55; --red: #c42b1c;
  --sec: var(--pink);
  --font: "Poppins", "Segoe UI", system-ui, sans-serif;
  --r: 16px;
  color-scheme: light;
}
.sec-home { --sec: var(--teal); } .sec-www { --sec: var(--blue); } .sec-shop { --sec: var(--pink); } .sec-shelter { --sec: var(--orange); } .sec-settings { --sec: #7b7f8c; }
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--bg); }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
p { margin: 0; }
code, .mono { font-family: ui-monospace, Menlo, Consolas, monospace; background: #f1ece6; padding: 2px 6px; border-radius: 6px; font-size: .9em; }

/* ---------- Wstążka ---------- */
.ribbon { position: sticky; top: 0; z-index: 30; }
.ribbon-top { background: var(--ink); color: #fff; display: flex; align-items: flex-end; gap: 28px; padding: 0 max(16px, 2vw); min-height: 74px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; align-self: center; }
.brand img { width: 120px; }
.brand span { font-family: "Pacifico", cursive; color: var(--pink); font-size: 1.05rem; }
.ribbon-tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.ribbon-tabs::-webkit-scrollbar { display: none; }
.rtab { --c: var(--teal); display: flex; align-items: center; gap: 10px; padding: 14px 20px 16px; border-radius: 14px 14px 0 0; text-decoration: none; color: #c9c7cf; font-weight: 500; white-space: nowrap; position: relative; border-top: 3px solid transparent; }
.rtab svg { width: 20px; height: 20px; color: var(--c); }
.rtab:hover { background: var(--ink-2); color: #fff; }
.rtab.on { background: #fff; color: var(--text); border-top-color: var(--c); }
.rtab-www { --c: var(--blue); } .rtab-shop { --c: var(--pink); } .rtab-shelter { --c: var(--orange); } .rtab-settings { --c: #9a9eaa; }
.badge { background: var(--c); color: #fff; font-size: .72rem; min-width: 20px; height: 20px; border-radius: 99px; display: grid; place-items: center; padding: 0 6px; }
.ribbon-user { display: flex; gap: 18px; align-self: center; font-size: .88rem; }
.ribbon-user a { color: #c9c7cf; text-decoration: none; }
.ribbon-user a:hover { color: #fff; }
.ribbon-sub { background: #fff; display: flex; gap: 6px; padding: 0 max(16px, 2vw); border-bottom: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0,0,0,.04); overflow-x: auto; }
.ribbon-sub a { padding: 14px 16px 12px; text-decoration: none; color: var(--muted); font-weight: 500; border-bottom: 3px solid transparent; white-space: nowrap; }
.ribbon-sub a:hover { color: var(--text); }
.ribbon-sub a.on { color: var(--text); border-bottom-color: var(--sec); }

/* ---------- Układ ---------- */
.admin-main { max-width: 1480px; margin: 0 auto; padding: 28px max(16px, 2vw) 80px; display: grid; gap: 22px; }
.page-title { display: grid; gap: 6px; }
.page-title h1 { font-size: 1.7rem; font-weight: 600; }
.page-title p { color: var(--muted); }
.page-title.row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-title .btns { display: flex; gap: 10px; flex-wrap: wrap; }
.back { color: var(--muted); text-decoration: none; font-size: .9rem; }
.back:hover { color: var(--text); }
.box { background: var(--card); border-radius: var(--r); box-shadow: 0 6px 22px rgba(60,40,30,.06); padding: 22px 24px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.box h2 { font-size: 1.08rem; font-weight: 600; }
.box h2 small { font-weight: 400; color: var(--muted); font-size: .85rem; }
.box-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.box-head a { color: var(--sec); text-decoration: none; font-weight: 500; font-size: .9rem; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.cols2.tight { gap: 18px; }
.span2 { grid-column: 1 / -1; }
.edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.main-col, .side-col { display: grid; gap: 22px; min-width: 0; }
.side-col { position: sticky; top: 140px; }
.empty { color: var(--muted); padding: 6px 0; }
.muted { color: var(--muted); font-size: .9rem; }
.narrow-box { max-width: 720px; }

.notice { background: #fff6e8; border: 1px solid #f6d9a8; border-radius: var(--r); padding: 16px 20px; line-height: 1.6; }
.notice p { margin: 8px 0; }
.notice.ok { background: #e6f6ed; border-color: #b6e3c8; }
.notice a { color: var(--pink-deep); font-weight: 500; }
.flash { border-radius: 12px; padding: 13px 18px; font-weight: 500; background: #e6f6ed; color: #19643c; }
.flash-error { background: #fde6e4; color: #9d2318; }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.kpi { background: var(--card); border-radius: var(--r); padding: 20px 22px; box-shadow: 0 6px 22px rgba(60,40,30,.06); display: grid; gap: 2px; border-top: 4px solid var(--pink); }
.kpi-shelter { border-top-color: var(--orange); }
.kpi span { color: var(--muted); font-size: .88rem; }
.kpi strong { font-size: 1.8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); }
.kpi small a { color: var(--orange); }

/* ---------- Tabele ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 11px 10px; border-bottom: 1px solid #f3eee8; vertical-align: middle; }
.tbl tbody tr[onclick] { cursor: pointer; }
.tbl tbody tr[onclick]:hover td { background: #fbf8f5; }
.tbl td a { font-weight: 600; text-decoration: none; }
.tbl td small { color: var(--muted); }
.tbl .r { text-align: right; } .tbl .c { text-align: center; }
.tbl tr.total td { font-weight: 600; font-size: 1.05rem; border-bottom: 0; }
.thumb { width: 64px; }
.thumb img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; }
.thumb.dark img { background: #111; object-fit: contain; }
.form-tbl input { min-width: 0; }
.form-tbl .num { max-width: 110px; }
.box { overflow-x: auto; }

/* ---------- Statusy ---------- */
.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 500; white-space: nowrap; background: #eee; }
.os-awaiting_payment, .st-requested { background: #fff1d6; color: #8a5300; }
.os-paid { background: #fde3ef; color: #a3195f; }
.os-processing, .st-confirmed { background: #e0effa; color: #145e8c; }
.os-shipped, .st-on_the_way { background: #ece6fb; color: #5a3aa8; }
.os-completed, .st-delivered, .st-received { background: #e2f5ea; color: #19643c; }
.os-cancelled, .st-cancelled { background: #f0eeeb; color: #6d6a70; }
.sh-pending { background: #fff1d6; color: #8a5300; } .sh-active { background: #e2f5ea; color: #19643c; } .sh-hidden, .sh-rejected { background: #f0eeeb; color: #6d6a70; }
.tag-mini { display: inline-block; font-size: .72rem; padding: 2px 8px; border-radius: 6px; margin-right: 4px; }
.tag-mini.shop { background: #fde3ef; color: #a3195f; } .tag-mini.shelter { background: #fff1d6; color: #8a5300; }
.bar { height: 8px; background: #f1ece6; border-radius: 99px; overflow: hidden; margin-bottom: 4px; }
.bar i { display: block; height: 100%; background: var(--orange); border-radius: 99px; }

/* ---------- Filtry ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { padding: 8px 14px; border-radius: 99px; background: #fff; text-decoration: none; font-size: .88rem; font-weight: 500; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.chip b { background: var(--sec); color: #fff; border-radius: 99px; padding: 0 7px; margin-left: 4px; font-size: .75rem; }
.chip.on { background: var(--ink); color: #fff; }
.search { margin-left: auto; }
.search input { min-width: 260px; }

/* ---------- Formularze ---------- */
.f { display: grid; gap: 6px; font-weight: 500; font-size: .9rem; }
.f small { font-weight: 400; color: var(--muted); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.fields .f:has(textarea), .fields .img-field { grid-column: 1 / -1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  width: 100%; font: 400 .95rem var(--font); color: var(--text); background: #fff; border: 1.5px solid #e2dbd3; border-radius: 10px; padding: 10px 12px; }
input.big { font-size: 1.15rem; font-weight: 500; padding: 12px 14px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sec); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sec) 20%, transparent); }
input:disabled { background: #f6f3ef; color: var(--muted); }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: .92rem; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 99px; background: #d9d3cc; position: relative; cursor: pointer; flex: none; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked { background: var(--green); }
.switch input:checked::after { left: 21px; }
.img-field img, .img-field .preview { max-width: 220px; max-height: 160px; object-fit: contain; border-radius: 10px; background: #f6f3ef; }
.img-field .dark { background: #111; }
.img-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.save-bar { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 18px 0 6px; display: flex; gap: 12px; }
.settings { display: grid; gap: 22px; }
.drop { display: grid; place-items: center; border: 2px dashed #d9d0c6; border-radius: 14px; padding: 28px; cursor: pointer; text-align: center; color: var(--muted); }
.drop:hover { border-color: var(--sec); }
.drop input { margin-bottom: 8px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo-grid div { display: grid; gap: 6px; }
.photo-grid img { aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; width: 100%; }
.quote-box { background: #fbf6f0; border-radius: 10px; padding: 12px 14px; }
.status-pick { display: grid; gap: 8px; }
.status-pick label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.status-pick input { accent-color: var(--orange); width: 18px; height: 18px; }
.steps-line { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.steps-line div { background: #fff; border-radius: 12px; padding: 12px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 500; font-size: .88rem; }
.steps-line span { width: 28px; height: 28px; border-radius: 50%; background: #f1ece6; display: grid; place-items: center; font-weight: 600; flex: none; }
.steps-line .done { color: var(--text); } .steps-line .done span { background: var(--orange); color: #fff; }
.steps-line .now { box-shadow: 0 0 0 2px var(--orange); }
.saldo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.saldo div { background: #faf6f1; border-radius: 12px; padding: 12px; display: grid; }
.saldo b { font-size: 1.5rem; } .saldo span { color: var(--muted); font-size: .82rem; }
.saldo .hl { background: #fff1d6; }
.add-cans, .add-user { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.user-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid #f3eee8; }
.msg.unread { border-left: 4px solid var(--blue); }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Przyciski ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 99px; border: 1.5px solid transparent; font: 600 .92rem var(--font); cursor: pointer; text-decoration: none; background: var(--ink); color: #fff; transition: background .15s, transform .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible { outline: 3px solid #76c5ef; outline-offset: 2px; }
.btn-pink { background: var(--pink); } .btn-pink:hover { background: var(--pink-deep); }
.btn-ghost { background: #fff; color: var(--text); border-color: #d9d3cc; }
.btn-ghost:hover { border-color: var(--text); }
.btn-danger { background: #fff; color: var(--red); border-color: #f1c3be; }
.btn-danger:hover { background: #fde6e4; }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: .84rem; }
.full { width: 100%; }

/* ---------- Edytor treści ---------- */
.editor { background: #fff; min-height: 340px; border-radius: 0 0 10px 10px; font: 400 1rem/1.7 var(--font); }
.editor.small { min-height: 160px; }
.ql-toolbar.ql-snow { border-radius: 10px 10px 0 0; border-color: #e2dbd3; font-family: var(--font); }
.ql-container.ql-snow { border-color: #e2dbd3; font-family: var(--font); font-size: 1rem; }
.ql-editor { min-height: inherit; }

/* ---------- Logowanie ---------- */
.login-body { min-height: 100vh; display: grid; place-items: center; background: var(--ink); padding: 16px; }
.login-wrap { width: 100%; max-width: 400px; display: grid; gap: 22px; justify-items: center; }
.login-logo { width: 180px; }
.login-box { width: 100%; padding: 30px; gap: 16px; }
.login-box h1 { font-size: 1.3rem; }
.login-wrap .back { color: #b9b6bd; }

/* ---------- Telefon ---------- */
@media (max-width: 1100px) {
  .edit-grid { grid-template-columns: 1fr; }
  .side-col { position: static; }
  .kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .ribbon-top { flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 10px; min-height: 0; }
  .ribbon-tabs { order: 3; flex-basis: 100%; }
  .rtab { padding: 10px 14px 12px; }
  .rtab span:not(.badge) { font-size: .88rem; }
  .ribbon-user { margin-left: auto; }
  .cols2, .fields, .grid2, .grid3 { grid-template-columns: 1fr; }
  .steps-line { grid-template-columns: 1fr 1fr; }
  .search { margin-left: 0; width: 100%; } .search input { min-width: 0; }
}

/* Panel schroniska: saldo */
.saldo-box { grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.saldo-big { display: grid; justify-items: center; background: #fff1d6; border-radius: 16px; padding: 18px 28px; }
.saldo-big span { color: #8a5300; font-size: .85rem; font-weight: 500; }
.saldo-big strong { font-size: 3rem; line-height: 1.1; color: #8a5300; }
.saldo-big small { color: #8a5300; }
.saldo-progress { display: grid; gap: 10px; }
.bar.big { height: 14px; }
.saldo-mini { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: .9rem; }
@media (max-width: 760px) { .saldo-box { grid-template-columns: 1fr; } }

/* Logowanie: przypomnienie hasła */
.login-box .forgot { color: var(--muted); font-size: .9rem; text-align: center; text-decoration: none; }
.login-box .forgot:hover { color: var(--pink-deep); }
.login-form { display: grid; gap: 16px; }
.login-note { color: #b9b6bd; font-size: .9rem; }
.login-note a { color: #f08bbd; }

/* Zapotrzebowanie na karmę */
.needs { border: 0; margin: 0; padding: 18px; background: #faf6f1; border-radius: 14px; display: grid; gap: 14px; }
.needs legend { font-weight: 600; padding: 0; float: left; width: 100%; }
.needs legend small { font-weight: 400; color: var(--muted); }
.needs-group { display: grid; gap: 6px; }
.needs-title { font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.needs-group.vet .needs-title { color: var(--pink-deep); }
.needs-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.need { position: relative; cursor: pointer; }
.need input { position: absolute; opacity: 0; }
.need span { display: inline-block; padding: 6px 12px; border-radius: 99px; background: #fff; border: 1.5px solid #e2dbd3; font-size: .84rem; }
.need input:checked + span { background: var(--pink); border-color: var(--pink); color: #fff; }
.need input:focus-visible + span { outline: 3px solid #76c5ef; outline-offset: 2px; }
.need-tag { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 8px; border-radius: 6px; background: #eef4fa; color: #145e8c; font-size: .74rem; white-space: nowrap; }
.need-tag.vet { background: #fde3ef; color: #a3195f; }
.needs-cell { max-width: 280px; }

/* Wysyłka InPost w zamówieniu */
.inpost-box { border-top: 4px solid #ffcd00; }
.inpost-logo { width: 64px; height: auto; }
.grid-gap { display: grid; gap: 12px; }
