/* Sociale Strefa Diamond. Barwy marki jak w grafik-app: czerń i złoto. */
:root {
  --bg: #0b0b0c;
  --surface: #151516;
  --surface-2: #1d1d1f;
  --ink: #f4f1ea;
  --ink-2: #d2cdc2;
  --muted: #9b968c;
  --line: #2a2928;
  --line-strong: #3a3836;
  --brand: #f5b324;
  --brand-ink: #1b1300;
  --brand-soft: rgba(245, 179, 36, 0.13);
  --bad: #ef5b4f;
  --bad-soft: rgba(239, 91, 79, 0.15);
  --ok: #4cc27c;
  --ok-soft: rgba(76, 194, 124, 0.15);
  --warn: #ff8a3d;
  --warn-soft: rgba(255, 138, 61, 0.15);
  --info: #6ea4f5;
  --info-soft: rgba(110, 164, 245, 0.15);
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
h1 { margin: 0 0 4px; font-size: 24px; line-height: 1.2; font-weight: 600; }
h2 { margin: 0; font-size: 17px; font-weight: 600; }
p { margin: 0; }
a { color: var(--brand); }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hint { color: var(--muted); font-size: 13px; }
.lead { color: var(--muted); margin-bottom: 14px; }
.spacer { flex: 1; }
.warnText { color: var(--warn); font-size: 13px; font-weight: 600; }
.errorText { color: var(--bad); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.stack { display: flex; flex-direction: column; gap: 12px; }

header { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(11, 11, 12, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header img { width: 28px; height: 28px; border-radius: 7px; }
main { max-width: 720px; margin: 0 auto; padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.banner { margin: 12px auto 0; max-width: 688px; padding: 10px 14px; border: 1px solid var(--warn); border-radius: var(--radius); background: var(--warn-soft); font-size: 14px; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; justify-content: center; background: rgba(21, 21, 22, 0.96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { flex: 1; max-width: 140px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; color: var(--muted); text-decoration: none; font-size: 12px; }
.tabs a b { font-size: 19px; line-height: 1.1; font-weight: 400; }
.tabs a.active { color: var(--brand); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 500; color: var(--ink-2); }

input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px 12px; min-height: 44px; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand); }
.row .field { flex: 1; min-width: 130px; }
.row > input { flex: 1; min-width: 160px; }

button { font: inherit; font-weight: 600; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); padding: 10px 16px; min-height: 44px; cursor: pointer; }
button:disabled { opacity: 0.55; cursor: default; }
button.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
button.ghost { background: transparent; }
button.danger { color: var(--bad); }
button.small { padding: 6px 12px; min-height: 36px; font-size: 14px; }
button.big { min-height: 52px; font-size: 16px; }

.check { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 9px; padding: 3px; gap: 3px; align-self: flex-start; }
.seg button { border: 0; background: transparent; color: var(--muted); min-height: 38px; padding: 6px 18px; }
.seg button.on { background: var(--brand); color: var(--brand-ink); }

.picker { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.drop { width: 100%; min-height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 2px dashed var(--line-strong); border-radius: var(--radius); background: transparent; color: var(--ink-2); }
.drop span { font-weight: 400; color: var(--muted); font-size: 13px; }
.preview { max-width: 100%; max-height: 420px; border-radius: 8px; background: #000; }

.list { display: flex; flex-direction: column; gap: 12px; }
.post { flex-direction: row; align-items: flex-start; }
.post.paused { opacity: 0.6; }
.thumb { flex: 0 0 84px; }
.thumb img, .thumb video, .noThumb { width: 84px; height: 112px; object-fit: cover; border-radius: 6px; background: #000; display: block; }
.noThumb { display: grid; place-items: center; color: var(--muted); font-size: 11px; }
.pBody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.caption { white-space: pre-wrap; font-size: 14px; color: var(--ink-2); }
.actions { margin-top: 2px; }
.badge { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); }
.s-pending { background: var(--brand-soft); color: var(--brand); }
.s-approved { background: var(--info-soft); color: var(--info); }
.s-publishing { background: var(--info-soft); color: var(--info); }
.s-published { background: var(--ok-soft); color: var(--ok); }
.s-failed { background: var(--bad-soft); color: var(--bad); }
.s-check { background: var(--warn-soft); color: var(--warn); }
.userRow { padding: 6px 0; border-bottom: 1px solid var(--line); }

.login { max-width: 380px; margin: 12vh auto 0; text-align: center; align-items: center; }
.login form { width: 100%; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.login .logo { width: 64px; height: 64px; border-radius: 14px; }

#toasts { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 400px); }
.toast { padding: 11px 14px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-strong); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); font-size: 14px; animation: toastIn 0.2s ease-out both; }
.toast.ok { box-shadow: inset 4px 0 0 var(--ok), 0 8px 24px rgba(0, 0, 0, 0.35); }
.toast.error { box-shadow: inset 4px 0 0 var(--bad), 0 8px 24px rgba(0, 0, 0, 0.35); }
.toast.leaving { animation: toastOut 0.3s ease-in both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .toast, .toast.leaving { animation: none; } }
.gapWarn { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--warn); border-radius: 8px; background: var(--warn-soft); font-size: 14px; }
