/* RCG Wholesale – celowo surowy, amerykański portal handlowy z lat 2000 */
html { background: #fff; }
body {
  margin: 0; background: #fff; color: #222;
  font: 13px/1.45 Arial, Helvetica, sans-serif;
}
a { color: #00c; }
a:visited { color: #551a8b; }
a:hover { color: #c00; }
h1, h2, h3, h4 { margin: 0; font-weight: bold; }
h2 { font-size: 15px; }
h3 { font-size: 13px; }
hr { border: 0; border-top: 1px solid #ccc; margin: 12px 0; }
small, .muted { color: #666; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 16px; }

/* ---------- Nagłówek ---------- */
.top { border-bottom: 1px solid #ccc; background: #f4f4f4; }
.top .wrap { display: flex; align-items: center; gap: 12px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #222 !important; }
.brand img { width: 44px; height: 44px; display: block; }
.brand b { font-size: 20px; letter-spacing: -.5px; font-family: Georgia, "Times New Roman", serif; }
.brand span { display: block; font-size: 11px; color: #666; }
.crumbs { color: #666; }
.crumbs a { color: #00c; }
.topright { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.toplinks { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.toplinks a.cur { color: #222; font-weight: bold; text-decoration: none; }
.uwu-link { color: #c0306a !important; font-weight: bold; }

/* ---------- Układ ---------- */
.cols { display: grid; grid-template-columns: 190px 1fr; gap: 20px; padding-top: 14px; padding-bottom: 20px; }
.side h3 { background: #eee; border: 1px solid #ccc; padding: 3px 6px; margin: 0 0 6px; font-size: 12px; }
.side ul { list-style: none; margin: 0 0 14px; padding: 0 0 0 6px; }
.side li { margin: 2px 0; }
.side .box { border: 1px solid #ccc; padding: 6px; margin-bottom: 14px; font-size: 12px; }
.side .uwubox { display: flex; gap: 8px; align-items: center; text-decoration: none; }
.side .uwubox img { width: 40px; height: 40px; border-radius: 50%; }

/* ---------- Formularze ---------- */
input[type=text], input[type=search], input[type=email], input[type=number], select, textarea {
  font: 13px Arial, Helvetica, sans-serif; border: 1px solid #999; padding: 3px 4px; border-radius: 0;
  background: #fff; color: #222; max-width: 100%; box-sizing: border-box;
}
textarea { width: 100%; min-height: 90px; }
button, input[type=submit] {
  font: 13px Arial, Helvetica, sans-serif; padding: 2px 10px; cursor: pointer;
  border: 1px solid #888; background: linear-gradient(#fdfdfd, #ddd); color: #222; border-radius: 2px;
}
button:active { background: #ccc; }
.form td { padding: 3px 6px 3px 0; vertical-align: top; }
.form td:first-child { text-align: right; white-space: nowrap; color: #444; }
.note { background: #ffffe0; border: 1px solid #e6db55; padding: 6px 8px; margin: 8px 0; }
.err { color: #c00; }

/* ---------- Kategorie (kolumny jak na portalu) ---------- */
.catgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 20px; margin: 6px 0 14px; }
.catgrid a { text-decoration: none; }
.catgrid a:hover { text-decoration: underline; }
.catgrid a.on { font-weight: bold; color: #222; }

/* ---------- Tabele ---------- */
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; background: #eee; border: 1px solid #ccc; padding: 3px 6px; font-size: 12px; }
table.list td { border-bottom: 1px dotted #ccc; padding: 4px 6px; vertical-align: top; }
table.list tr:nth-child(even) td { background: #fafafa; }
table.list .price { white-space: nowrap; font-weight: bold; color: #070; }
table.list .date { white-space: nowrap; color: #666; }
table.list .num { text-align: right; }
.tag { font-size: 11px; color: #666; }
.rcg-tag { font-size: 10px; background: #222; color: #fff; padding: 0 3px; margin-left: 4px; }

details { border: 1px solid #ccc; padding: 6px 8px; margin: 12px 0; background: #fcfcfc; }
summary { cursor: pointer; font-weight: bold; color: #00c; }

/* ---------- Stopka ---------- */
.foot { border-top: 1px solid #ccc; background: #f4f4f4; font-size: 12px; color: #444; }
.foot .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.foot h4 { font-size: 12px; margin-bottom: 4px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot .copy { grid-column: 1 / -1; border-top: 1px solid #ddd; padding-top: 8px; color: #777; text-align: center; }

/* ---------- Dlaczego akurat my / jak zamówić ---------- */
table.why td { padding: 7px 6px; line-height: 1.5; }
table.why td.n { width: 22px; font-weight: bold; color: #666; text-align: right; }
table.why b { font-size: 14px; }
ol.steps { margin: 6px 0 0; padding-left: 22px; }
ol.steps li { margin: 3px 0; }

/* ---------- Zwijany cennik ---------- */
table.collapsed tr.extra { display: none; }
table.collapsed tbody tr:last-child td { border-bottom: 0; }
.more-bar { margin: 0; padding: 6px; text-align: center; background: #f4f4f4; border: 1px solid #ccc; border-top: 1px dashed #bbb; }
.more-bar button { font-weight: bold; }

/* ---------- Pasek konta ---------- */
.acct { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; font-size: 12px; min-height: 22px; }
.acct .who { color: #222; font-weight: bold; }
.acct a.cur { text-decoration: none; }
.btn-acct, .btn-admin {
  display: inline-block; padding: 2px 10px; border: 1px solid #888; border-radius: 2px; text-decoration: none;
  background: linear-gradient(#fdfdfd, #ddd); color: #222 !important; font-size: 12px;
}
.btn-acct.primary { background: linear-gradient(#4a7fd6, #2a5bb0); border-color: #24509c; color: #fff !important; font-weight: bold; }
.btn-admin { background: #222; border-color: #000; color: #fff !important; font-weight: bold; letter-spacing: .02em; }
.btn-admin:hover, .btn-admin.on { background: #c00; border-color: #900; }
.acct button { font-size: 12px; }

/* ---------- Komunikaty ---------- */
.ok-box { background: #efe; border-color: #8c8; }
.err-box { background: #fee; border-color: #d88; color: #900; }
.locked { border: 2px solid #c00; background: #fff4f4; padding: 10px 12px; margin: 10px 0; }
.locked b { color: #c00; }

/* ---------- Zakładki (panel admina) ---------- */
.tabs { border-bottom: 1px solid #999; margin: 10px 0 12px; display: flex; gap: 2px; flex-wrap: wrap; }
.tabs a { display: inline-block; padding: 3px 10px; border: 1px solid #999; border-bottom: 0; background: #eee; text-decoration: none; margin-bottom: -1px; }
.tabs a.on { background: #fff; color: #222; font-weight: bold; padding-bottom: 4px; }
.stats { margin: 6px 0 10px; color: #444; }
.stats b { color: #222; }
button.danger { color: #900; border-color: #b77; }
.linkbtn { background: none; border: 0; padding: 0; color: #00c; text-decoration: underline; cursor: pointer; font: inherit; }
.linkbtn.danger { color: #c00; }
table.list input[type=number] { width: 60px; }
table.list tr.sum td { background: #f4f4f4 !important; font-weight: bold; border-bottom: 0; }
table.list tr.detail td { background: #fffff4 !important; font-size: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { border: 1px solid #ccc; padding: 8px 10px; }
.panel h3 { background: #eee; margin: -8px -10px 8px; padding: 3px 10px; border-bottom: 1px solid #ccc; font-size: 12px; }

/* ---------- Galeria ---------- */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 8px; }
.thumbs figure { margin: 0; border: 1px solid #ccc; padding: 4px; background: #fff; font-size: 12px; }
.thumbs .ph { aspect-ratio: 4/3; background: #e5e5e5; display: flex; align-items: center; justify-content: center; color: #888; font-size: 11px; overflow: hidden; }
.thumbs .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs figcaption { padding-top: 3px; }

/* ---------- Faktura ---------- */
.invoice { background: #fff; color: #000; border: 1px solid #999; padding: 28px 32px; max-width: 760px; font: 12px/1.45 Arial, Helvetica, sans-serif; box-sizing: border-box; }
.invoice table { width: 100%; border-collapse: collapse; margin-top: 14px; }
.invoice th, .invoice td { border: 1px solid #000; padding: 4px 6px; text-align: left; }
.invoice th { background: #eee; }
.invoice .num { text-align: right; white-space: nowrap; }
.invoice .hd { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid #000; padding-bottom: 10px; }
.invoice .hd img { width: 64px; height: 64px; object-fit: contain; }
.invoice .parties { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 12px; }
.invoice .tot { margin-left: auto; width: 260px; margin-top: 10px; }
.invoice .tot td { border: 0; border-bottom: 1px solid #ccc; }
.invoice .tot tr:last-child td { border-top: 2px solid #000; font-weight: bold; font-size: 14px; }
@media print {
  body * { visibility: hidden; }
  #invoiceDoc, #invoiceDoc * { visibility: visible; }
  #invoiceDoc { position: absolute; left: 0; top: 0; border: 0; }
}

@media (max-width: 720px) {
  .two, .invoice .parties { grid-template-columns: 1fr; }
  .cols { grid-template-columns: 1fr; }
  .catgrid { grid-template-columns: repeat(2, 1fr); }
  .foot .wrap { grid-template-columns: 1fr; }
  .topright { margin-left: 0; width: 100%; align-items: flex-start; }
  .toplinks, .acct { justify-content: flex-start; }
  table.list .hide-sm { display: none; }
}
