
:root {
--bg: #0b0c0e;
--text: #e7e7ea;
--muted: #a3a3a9;
--card: #1a1b1f;
--card2: #1d1f23;
--border: #2a2c31;
--radius: 10px;
}

/* Reset & bazowe */
* { box-sizing: border-box }
html, body { height: 100% }
body {
margin: 0;
background: var(--bg);
color: var(--text);
font-family: Inter, system-ui, Segoe UI, Arial, sans-serif;
display: flex;
flex-direction: column;
}

/* Topbar */
.top {
position: sticky;
top: 0;
z-index: 5;
background: #0e0f12;
border-bottom: 1px solid #1d1f24;
padding: 10px 12px;
display: flex;
gap: 8px;
align-items: center;
}
.top .sp { flex: 1 }
.btn {
padding: 6px 10px;
border: 1px solid #272a31;
border-radius: 8px;
background: linear-gradient(145deg, #15161a, #0f1013);
color: #fff;
font-size: 12.5px;
cursor: pointer;
transition: 0.2s;
}
.btn:hover {
background: linear-gradient(145deg, #1c1d22, #121316);
}
.btn.ghost {
background: transparent;
color: #cfd0d5;
}

/* Board & columns */
.board {
flex: 1;
overflow: auto;
padding: 14px 12px;
}
.columns {
display: grid;
gap: 14px;
grid-template-columns: repeat(3, 1fr);
}
@media (max-width:1200px) { .columns { grid-template-columns: 1fr 1fr } }
@media (max-width:780px) { .columns { grid-template-columns: 1fr } }

.column { display: flex; flex-direction: column }
.head {
display: flex;
align-items: center;
gap: 8px;
font-weight: 600;
font-size: 13px;
margin: 2px 2px 6px;
color: #e9e9ec;
}
.count {
margin-left: 6px;
background: #0f1012;
border: 1px solid #23262b;
color: #cfd0d5;
border-radius: 999px;
padding: 1px 6px;
font-size: 11.5px;
}
.zone { min-height: 300px }

/* Card */
.card {
border: 1px solid var(--border);
border-radius: var(--radius);
box-shadow: 0 6px 18px rgba(0,0,0,0.5);
padding: 10px;
margin: 8px 4px;
transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.column-new .card {
background: linear-gradient(145deg, #101215, #1c1e23);
}
.column-prod .card {
background: linear-gradient(145deg, #101215, #1c1e23);
}
.column-done .card {
background: linear-gradient(145deg, #101215, #1c1e23);
}

.card:hover {
transform: translateY(-2px) scale(1.01);
box-shadow: 0 10px 24px rgba(0,0,0,0.6);
}
.card.hold {
opacity: 0.5;
background: repeating-linear-gradient(
45deg,
rgba(255,170,0,0.01),
rgba(255,170,0,0.01) 10px,
transparent 10px,
transparent 20px
);
}
.card.urgent {
/*animation: pulseUrgent 3.2s infinite alternate;*/
}
@keyframes pulseUrgent {
0% { box-shadow: 0 0 6px rgba(255, 71, 71, 0.1); }
100% { box-shadow: 0 0 14px rgba(255, 71, 71, 0.2); }
}
.card .title {
font-weight: 600;
font-size: 14.5px;
margin: 0 0 6px;
}
.variants {
font-size: 12px;
color: #c7c8cc;
white-space: pre-line;
border-radius: 8px;
background: #151820;
border: 1px solid #232736;
padding: 8px;
margin: 5px 0px;
}
.meta {
display: flex;
flex-wrap: wrap;
gap: 6px;
align-items: center;
margin-top: 8px;
font-size: 11.5px;
color: #b7bbc2;
}

/* Chips */
.chip {
background: linear-gradient(135deg, #1f2127, #2b2d34);
border: 1px solid #343740;
border-radius: 999px;
padding: 3px 8px;
font-size: 11.5px;
font-weight: 500;
transition: all 0.2s ease;
}
.chip:hover {
background: linear-gradient(135deg, #292b33, #343740);
transform: translateY(-1px);
}
.orderchip {
border-radius: 6px;
padding: 2px 8px;
font-weight: 700;
font-size: 12px;
box-shadow: inset 0 0 3px rgba(0,0,0,0.4);
}
.chip-relative {
background: linear-gradient(135deg, #1d3520, #26492b);
color: #a5ffb5;
font-weight: 600;
}
.urgent-chip {
background: linear-gradient(135deg, #ff6b6b, #ff4747);
color: #fff;
font-weight: 700;
border: none;
box-shadow: 0 2px 4px rgba(255,71,71,0.4);
}
.chip-note {
flex: 0 0 100% !important;
width: 100%;
display: block;
margin-top: 6px;
white-space: pre-line;
background:#25351b;
border:1px solid #385528;
color:#eaffc7;
padding:2px 6px;
border-radius:8px;
font-size:11.5px;
font-weight:700;
}

/* Actions */
.actions {
display: flex;
gap: 6px;
margin-left: auto;
}
.ico {
width: 28px;
height: 28px;
border: 1px solid #2a2c32;
border-radius: 8px;
background: #1d1f24;
display: grid;
place-items: center;
cursor: pointer;
transition: 0.15s;
}
.ico:hover {
background: #23262d;
}

/* Toast */
.toast {
position: fixed;
left: 12px;
bottom: 12px;
background: #0a0b0d;
border: 1px solid #1a1d22;
color: #fff;
padding: 8px 10px;
border-radius: 8px;
box-shadow: 0 12px 28px rgba(0,0,0,.55);
display: none;
font-size: 12.5px;
}
.toast.show { display: block }

/* Drag & Drop */
.sortable-chosen {
transform: rotate(1deg) scale(1.02) !important;
box-shadow: 0 22px 40px rgba(0,0,0,.6) !important;
}
.sortable-ghost { opacity: .4 }

/* Modal */
#note-backdrop {
position: fixed;
inset: 0;
background: rgba(0,0,0,.55);
z-index: 1000;
}
#note-modal {
position: fixed;
top: 50%; left: 50%;
transform: translate(-50%, -50%);
width: 680px; max-width: 95vw; max-height: 90vh;
background: #121419;
color: #e7e8ec;
border: 1px solid #2a2c32;
border-radius: 14px;
box-shadow: 0 40px 120px rgba(0,0,0,.6);
z-index: 1001;
}
#note-modal header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 14px 16px;
border-bottom: 1px solid #252833;
}
#note-modal .title { font-weight: 700; font-size: 16px; }
#note-modal .body {
padding: 14px 16px;
overflow: auto;
max-height: calc(90vh - 120px);
display: flex;
flex-direction: column;
gap: 10px;
}
#note-modal .foot {
padding: 12px 16px;
border-top: 1px solid #252833;
display: flex;
gap: 8px;
justify-content: flex-end;
}

.lbl { font-size: 12.5px; color: #a7a9af; }
#note-text {
width: 100%;
background: #0f1116;
border: 1px solid #2a2c32;
border-radius: 10px;
color: #e7e8ec;
padding: 10px;
font-size: 13px;
}

.presets { margin-top: 6px; }
.presets-title { font-size: 12.5px; color: #a7a9af; margin-bottom: 6px; }
#note-presets {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
#note-presets .chip {
background: #1d1f24;
border: 1px solid #2a2c32;
color: #e7e8ec;
border-radius: 999px;
padding: 6px 10px;
font-size: 12px;
cursor: pointer;
white-space: nowrap;
}
#note-presets .chip:hover {
background: #23262e;
}

/* inputs w modalach */
.in{
width:100%;
background:#0f1116;
border:1px solid #2a2c32;
border-radius:10px;
color:#e7e8ec;
padding:10px 12px;
font: inherit;
outline:none;
}
.in:focus{ border-color:#3b82f6; box-shadow:0 0 0 3px rgba(59,130,246,.15); }

.grid2{
display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:6px;
}
@media (max-width: 720px){ .grid2{ grid-template-columns:1fr; } }
.btn.primary{ background:#1f2937; border-color:#334155; }
.btn.primary:hover{ background:#243041; }

/* ===== ADD MODAL (ręczne dodanie) ===== */
#add-backdrop{
position:fixed; inset:0; background:rgba(0,0,0,.55);
backdrop-filter: blur(2px);
z-index:1000; display:none;
}
#add-modal{
position:fixed; top:50%; left:50%; transform:translate(-50%,-50%);
width:720px; max-width:95vw; max-height:90vh; overflow:hidden;
background:#111318; color:#e7e8ec;
border:1px solid #2a2c32; border-radius:14px;
box-shadow: 0 30px 120px rgba(0,0,0,.65), 0 0 0 1px #1a1d22 inset;
z-index:1001; display:none;
}

/* header / body / foot spójne z notatkami */
#add-modal header{
display:flex; align-items:center; justify-content:space-between;
padding:14px 16px; border-bottom:1px solid #232630;
background: linear-gradient(180deg,#141720 0%,#111318 100%);
}
#add-modal .title{ font-weight:700; font-size:16px; }
#add-modal .body{
padding:14px 16px; overflow:auto; max-height: calc(90vh - 120px);
display:flex; flex-direction:column; gap:10px;
}
#add-modal .foot{
padding:12px 16px; border-top:1px solid #232630;
display:flex; gap:8px; justify-content:flex-end;
background:#0f1217;
}

/* inputs (korzysta z Twojej .in, ale lekko dopieszczamy) */
#add-modal .in{
width:100%; background:#0f1116; border:1px solid #2a2c32;
border-radius:10px; color:#e7e8ec; padding:10px 12px; font:inherit;
outline:none; transition: border-color .15s, box-shadow .15s;
}
#add-modal .in:focus{
border-color:#3b82f6; box-shadow:0 0 0 3px rgba(59,130,246,.15);
}
#add-modal textarea.in{ resize: vertical; min-height: 68px; }
#add-modal select.in{ appearance:none; background-image:linear-gradient(45deg,transparent 50%,#7c8594 50%),linear-gradient(135deg,#7c8594 50%,transparent 50%);
background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 10px) calc(50% - 3px);
background-size:6px 6px; background-repeat:no-repeat;
}
#add-modal input[type="color"].in{
padding:0; height:40px; border-radius:10px; cursor:pointer;
}

/* dwie kolumny w środku */
#add-modal .grid2{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:6px; }
@media (max-width: 720px){ #add-modal .grid2{ grid-template-columns:1fr; } }

/* przyciski */
#add-modal .btn.primary{ background:#1f2937; border-color:#334155; }
#add-modal .btn.primary:hover{ background:#243041; }
#add-modal .btn.ghost{ background:transparent; color:#cfd0d5; }

/* ładniejszy focus na tytule */
#add-title:focus{ box-shadow:0 0 0 4px rgba(99,102,241,.15); border-color:#6366f1; }

/* mała etykieta */
#add-modal .lbl{ font-size:12.5px; color:#a7a9af; }


/* Akcje: ukryte domyślnie, pokazują się na hover/focus */
.card .actions{
opacity: 0;
transform: translateY(-2px);
transition: opacity .18s ease, transform .18s ease, filter .18s ease;
pointer-events: none;
}
.card:hover .actions,
.card:focus-within .actions{
opacity: 1;
transform: translateY(0);
pointer-events: auto;
}

/* Przyciski akcji – szklane, nowoczesne */
.ico{
width: 30px; height: 30px;
border-radius: 10px;
background: rgba(255,255,255,.04);
border: 1px solid rgba(255,255,255,.08);
box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
display: grid; place-items: center;
cursor: pointer;
transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
backdrop-filter: blur(6px);
}
.ico:hover{
transform: translateY(-1px);
background: rgba(255,255,255,.08);
border-color: rgba(255,255,255,.16);
box-shadow: 0 6px 16px rgba(0,0,0,.35);
}
.ico:active{ transform: translateY(0) scale(.98); }

/* SVG w środku */
.ico svg{ width: 16px; height: 16px; display:block; }
.ico path, .ico rect, .ico circle, .ico line, .ico polyline, .ico polygon{
stroke: #e6e7ea; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round;
}

/* Drobne kolory akcentów */
.ico.act-urgent:hover path{ stroke: #ff6b6b; }
.ico.act-del:hover path{ stroke: #ff4757; }
.ico.act-note:hover path{ stroke: #9b9bff; }
.ico.act-hold:hover path{ stroke: #ffd166; }
.ico.act-split:hover path{ stroke: #7ee787; }

/* (opcjonalnie) minimalny odstęp tytuł–akcje */
.card .actions{ gap: 6px; margin-left: auto; }

.focused-card {
outline: 2px solid #fcff4dff;
outline-offset: -2px;
box-shadow: 0 0 12px rgba(77, 163, 255, 0.7);
border-radius: 6px;
transition: box-shadow 0.15s ease, outline 0.15s ease;
}