/* Kadr — ten sam styl co Netloom CRM: ciepłe tło, białe karty, pastelowe plakietki, emoji jako ikony. */
:root {
  --bg: #f8f7f4; --surface: #fff; --surface-2: #f2f1ed; --ink: #1d1f23; --ink-2: #4b5059; --muted: #8a8f98; --line: #e7e5e0;
  --accent: #6d5dd3; --accent-soft: #ece9fb;
  --lavender: #e4e0fa; --sky: #d7e9f6; --rose: #f9dede; --mint: #dcf1e4; --butter: #fbf0cd; --peach: #fde4d3;
  --ok: #2f9e62; --warn: #c98a12; --danger: #d1495b; --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: "Plus Jakarta Sans", system-ui, sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent-soft); }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 24px; margin: 0; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 13px; margin: 0 0 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.muted { color: var(--muted); } .small { font-size: 12px; }

.shell { display: flex; min-height: 100vh; }
aside { width: 256px; flex: none; background: #f3f2ee; border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 14px 8px; }
.brand { display: flex; align-items: center; gap: 8px; padding: 4px 10px 14px; font-size: 15px; font-weight: 800; }
.brand span:first-child { font-size: 20px; }
.grp { padding: 14px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
aside a.nav { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 500; font-size: 14px; }
aside a.nav:hover { background: rgba(255,255,255,.7); text-decoration: none; }
aside a.nav.on { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
aside a.nav .e { width: 20px; text-align: center; }
aside a.nav .n { margin-left: auto; background: var(--accent); color: #fff; border-radius: 99px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
main { flex: 1; min-width: 0; padding: 28px 32px 60px; max-width: 1280px; }
.topbar { display: none; }

.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.head p { margin: 4px 0 0; color: var(--ink-2); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card + .card { margin-top: 12px; }
.grid { display: grid; gap: 12px; } .g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
.stat { display: block; color: inherit; } .stat:hover { text-decoration: none; border-color: #d6d3cb; }
.stat b { display: block; font-size: 26px; font-weight: 800; margin-top: 2px; }

.btn, .btn-primary, .btn-ghost, .btn-outline { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: background .12s; }
.btn-primary { background: var(--accent); color: #fff; } .btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: none; color: var(--ink-2); } .btn-ghost:hover { background: var(--surface-2); }
.btn-outline { background: var(--surface); border-color: var(--line); color: var(--ink); } .btn-outline:hover { background: var(--surface-2); }
.btn-danger { color: var(--danger); }
.btn-sm { padding: 4px 9px; font-size: 12.5px; }

input, select, textarea { width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 80px; }
label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.field { margin-bottom: 12px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

.chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 99px; padding: 2px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.t-lavender { background: var(--lavender); color: #4b3fa8; } .t-sky { background: var(--sky); color: #245c86; } .t-rose { background: var(--rose); color: #a63446; }
.t-mint { background: var(--mint); color: #23714a; } .t-butter { background: var(--butter); color: #8a6410; } .t-peach { background: var(--peach); color: #a5521f; } .t-gray { background: var(--surface-2); color: var(--ink-2); }

.seg { display: inline-flex; background: var(--surface-2); border-radius: 9px; padding: 3px; }
.seg button { border: 0; background: none; font: inherit; font-weight: 600; font-size: 13px; padding: 5px 12px; border-radius: 7px; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; align-items: start; padding-bottom: 8px; }
.col { background: #f1f0ec; border-radius: var(--radius); padding: 10px; min-height: 160px; }
.col.over { outline: 2px dashed var(--accent); }
.col h3 { margin: 2px 4px 10px; font-size: 13px; font-weight: 700; display: flex; justify-content: space-between; }
.lcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; margin-bottom: 8px; cursor: grab; display: block; color: inherit; }
.lcard:hover { border-color: #d0cdc4; text-decoration: none; }
.lcard b { display: block; font-weight: 700; margin-bottom: 4px; }
.lcard .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; align-items: center; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 8px 12px; border-bottom: 1px solid var(--line); }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #faf9f6; }
.tablewrap { overflow-x: auto; padding: 4px 4px; }

.item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item .grow b { display: block; }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.due { font-size: 12px; font-weight: 600; color: var(--muted); } .due.late { color: var(--danger); } .due.today { color: var(--warn); }
.check { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.done { text-decoration: line-through; color: var(--muted); }
.steps { display: flex; gap: 4px; flex-wrap: wrap; margin: 8px 0 4px; }
.step { padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); cursor: pointer; border: 0; font-family: inherit; }
.step.past { background: var(--mint); color: #23714a; } .step.now { background: var(--accent); color: #fff; }
.tl { font-size: 13px; } .tl .item { padding: 7px 0; }
pre.txt { white-space: pre-wrap; font: inherit; margin: 6px 0 0; color: var(--ink-2); }

#modal { position: fixed; inset: 0; background: rgba(29,31,35,.35); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 50; overflow-y: auto; }
#modal[hidden], #toast[hidden] { display: none; }
.dlg { background: var(--surface); border-radius: 16px; padding: 22px; width: 100%; max-width: 560px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.dlg h2 { font-size: 17px; text-transform: none; letter-spacing: 0; margin-bottom: 16px; }
.dlg .foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; z-index: 60; }

@media (max-width: 1023px) {
  aside { position: fixed; z-index: 40; left: 0; transform: translateX(-100%); transition: transform .2s; }
  aside.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.2); }
  .topbar { display: flex; align-items: center; gap: 8px; position: fixed; inset: 0 0 auto 0; height: 52px; padding: 0 12px; background: rgba(248,247,244,.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); z-index: 30; }
  main { padding: 68px 16px 48px; }
  .g2, .g3, .g4, .fgrid { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: 1fr 1fr; }
}
