/* uncomplicate — panel. Kolory marki: atrament #17201c, limonka #c7f24f. */
@font-face { font-family: Manrope; src: url(/assets/manrope-400.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Manrope; src: url(/assets/manrope-500.ttf) format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: Manrope; src: url(/assets/manrope-600.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: Manrope; src: url(/assets/manrope-700.ttf) format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --ink: #17201c; --ink-2: #1f2a25; --lime: #c7f24f; --lime-ink: #2f3d0c; --paper: #f5f6f1; --card: #ffffff;
  --t1: #17201c; --t2: #4f5a53; --t3: #7d877f; --line: #e3e7de; --line-2: #d3d9cc;
  --ok: #2f7d4f; --warn: #9a6a00; --bad: #b3261e; --info: #335f9e;
  --r: 14px; --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { font-family: Manrope, system-ui, sans-serif; color: var(--t1); background: var(--paper); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.03em; font-weight: 600; }
h1 { font-size: 26px; } h2 { font-size: 18px; } h3 { font-size: 15px; }
p { margin: 0; }
:focus-visible { outline: 2px solid #86a61e; outline-offset: 2px; }

/* układ */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100dvh; }
.side { background: var(--ink); color: #e9eee3; padding: 20px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100dvh; }
.side .logo img { width: 150px; display: block; margin: 4px 8px 6px; }
.side select { width: 100%; background: #ffffff0f; border: 1px solid #ffffff22; border-radius: 10px; padding: 8px 10px; color: #fff; }
.side select option { color: var(--ink); }
.nav { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nav a { text-decoration: none; padding: 9px 12px; border-radius: 10px; color: #c3ccbf; display: flex; justify-content: space-between; align-items: center; }
.nav a:hover { background: #ffffff0d; color: #fff; }
.nav a.on { background: var(--lime); color: var(--ink); font-weight: 600; }
.nav .count { font-size: 11px; background: #ffffff1a; border-radius: 99px; padding: 1px 7px; }
.nav a.on .count { background: #17201c1f; }
.side .foot { margin-top: auto; font-size: 12px; color: #8e9a8b; display: flex; flex-direction: column; gap: 8px; padding: 0 8px; }
.side .foot button { background: none; border: 0; color: #c3ccbf; text-align: left; padding: 0; cursor: pointer; }
.main { padding: 28px clamp(16px, 3vw, 40px) 60px; min-width: 0; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.head p { color: var(--t2); margin-top: 4px; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.card > h2 { margin-bottom: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.muted { color: var(--t2); } .small { font-size: 12px; } .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.spacer { flex: 1; }

/* elementy */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: var(--card); border-radius: 10px; padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: 13px; text-decoration: none; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--t3); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary:hover { background: #2c3c30; }
.btn.lime { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.btn.danger { color: var(--bad); }
.btn.small { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 99px; background: #eef1ea; color: var(--t2); white-space: nowrap; }
.badge.ok { background: #e3f3e8; color: var(--ok); } .badge.warn { background: #fbf0d6; color: var(--warn); } .badge.bad { background: #fbe4e2; color: var(--bad); } .badge.info { background: #e4ecf8; color: var(--info); } .badge.lime { background: var(--lime); color: var(--ink); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label, .lbl { font-size: 12px; font-weight: 600; color: var(--t2); }
.field small { color: var(--t3); font-size: 12px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=datetime-local], input[type=time], select, textarea {
  width: 100%; border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px; background: #fff; outline: none; transition: border-color .15s; }
input:focus, select:focus, textarea:focus { border-color: #86a61e; }
textarea { resize: vertical; min-height: 90px; line-height: 1.45; }
.fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fafbf7; cursor: pointer; text-align: left; width: 100%; }
.toggle i { width: 38px; height: 22px; border-radius: 11px; background: #d5dbcf; position: relative; flex: none; transition: background .2s; }
.toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.toggle.on i { background: var(--ink); } .toggle.on i::after { transform: translateX(16px); background: var(--lime); }
.toggle:disabled { opacity: .6; cursor: not-allowed; }
.toggle b { display: block; } .toggle span { font-size: 12px; color: var(--t2); }
.err { background: #fbe4e2; color: var(--bad); border-radius: 10px; padding: 10px 12px; }
.note { background: #f1f5e6; border: 1px solid #dfe9c3; border-radius: 10px; padding: 10px 12px; color: var(--t2); }
.empty { text-align: center; color: var(--t2); padding: 30px 10px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button { border: 1px solid var(--line-2); background: var(--card); border-radius: 99px; padding: 6px 12px; cursor: pointer; font-size: 13px; }
.tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* przegląd marek */
.brand .row { gap: 10px; }

/* kolejka */
.post { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.post:first-child { border-top: 0; }
.post > img, .thumb { width: 88px; height: 110px; object-fit: cover; border-radius: 10px; background: #e9ece4; flex: none; }
.post .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.post textarea { min-height: 120px; font-size: 13px; }
.post pre { white-space: pre-wrap; margin: 0; padding: 10px 12px; background: #f6f8f2; border-radius: 10px; font: 400 13px/1.45 Manrope, sans-serif; color: var(--t2); }
.cand { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.cand:first-child { border-top: 0; }
.cand img { width: 48px; height: 60px; object-fit: cover; border-radius: 8px; background: #e9ece4; flex: none; }
.log { display: flex; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.log:first-child { border-top: 0; }
.log .when { color: var(--t3); width: 130px; flex: none; }

/* kalendarz */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dow { font-size: 11px; font-weight: 600; color: var(--t3); text-transform: uppercase; padding: 0 4px; }
.cal .day { background: var(--card); border: 1px solid var(--line); border-radius: 10px; min-height: 96px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.cal .day.today { border-color: var(--ink); }
.cal .day.out { opacity: .45; }
.cal .day b { font-size: 12px; }
.cal .ev { font-size: 11px; border-radius: 6px; padding: 3px 6px; background: #eef1ea; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .ev.published { background: #e3f3e8; } .cal .ev.planned { background: var(--lime); }

/* onboarding */
.steps { display: grid; gap: 10px; }
.step { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.step .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: #eef1ea; flex: none; }
.step.done .n { background: var(--lime); }
.step .txt { flex: 1; }

/* logowanie */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--ink); background-image: radial-gradient(circle at 70% 20%, #c7f24f22, transparent 50%); }
.auth .box { width: min(400px, 100%); background: var(--card); border-radius: 22px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.auth .box img { width: 150px; }
.auth .switch { font-size: 13px; color: var(--t2); }

/* okno */
dialog { border: 0; border-radius: 18px; padding: 0; width: min(620px, calc(100% - 24px)); max-height: calc(100dvh - 40px); box-shadow: 0 30px 80px #0005; }
dialog::backdrop { background: #0b100dbf; }
dialog .in { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.preview-img { width: 100%; max-height: 50vh; object-fit: contain; border-radius: 12px; background: #eef1ea; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 50; max-width: calc(100% - 24px); box-shadow: 0 10px 30px #0004; }
.toast.bad { background: var(--bad); }

/* prosta strona (komunikaty Workera) */
body.plain { display: grid; place-items: center; min-height: 100dvh; background: var(--paper); }
.plain-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px; width: min(480px, calc(100% - 24px)); display: flex; flex-direction: column; gap: 12px; }


@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side, .main { min-width: 0; }
  .side { position: static; height: auto; }
  .nav { flex-direction: row; overflow-x: auto; }
  .nav a { white-space: nowrap; }
  .side .foot { flex-direction: row; margin-top: 0; }
  .cal { grid-template-columns: 1fr; } .cal .dow { display: none; } .cal .day.out { display: none; }
  .post > img { width: 64px; height: 80px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
