/* Historia zmian czasu pracy – oś czasu */
.wc-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 12px;
    padding: 10px;
    border: 1px solid #e3eaf3;
    border-radius: 16px;
    background: #f8fafc;
}

.wc-filter {
    position: relative;
    display: flex;
    flex: 1 1 180px;
    align-items: center;
    min-width: 0;
    margin: 0;
}

.wc-filter.is-month { flex: 0 1 190px; }

.wc-filter > .icon {
    position: absolute;
    z-index: 1;
    left: 12px;
    width: 14px;
    height: 14px;
    color: #94a3b8;
    pointer-events: none;
}

.module-screen .wc-filter input,
.module-screen .wc-filter select,
.wc-filter input,
.wc-filter select {
    width: 100%;
    min-height: 40px;
    padding: 0 12px 0 34px;
    border: 1px solid #dce5f1;
    border-radius: 11px;
    color: #1e293b;
    background-color: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}

.wc-filter input:focus,
.wc-filter select:focus {
    border-color: #60a5fa;
    outline: 0;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
}

.wc-clear {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 0 6px;
    color: #64748b;
    font-size: 10.5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.wc-clear:hover { color: #dc2626; }
.wc-clear .icon { width: 13px; height: 13px; }

/* Tryb „zmiany z raportu” */
.wc-scope {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    align-items: center;
    margin-bottom: 10px;
    padding: 12px 14px;
    border: 1px solid #fde68a;
    border-radius: 14px;
    background: linear-gradient(145deg, #fffbeb, #fff);
}

.wc-scope-icon {
    display: grid;
    flex: 0 0 32px;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    color: #b45309;
    background: #fef3c7;
}

.wc-scope-icon .icon { width: 15px; height: 15px; }

.wc-scope > div {
    display: grid;
    flex: 1 1 280px;
    gap: 2px;
    min-width: 0;
}

.wc-scope strong { color: #78350f; font-size: 11.5px; }
.wc-scope small { color: #92400e; font-size: 9.5px; line-height: 1.45; }

.wc-scope a {
    display: inline-flex;
    gap: 3px;
    align-items: center;
    padding: 6px 11px;
    border-radius: 9px;
    color: #92400e;
    background: #fef3c7;
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.wc-scope a:hover { color: #fff; background: #d97706; }
.wc-scope a .icon { width: 12px; height: 12px; }

/* Szybki filtr rodzaju zmiany */
.wc-kinds {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}

.wc-kinds button {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    min-height: 30px;
    padding: 0 11px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #475569;
    background: #fff;
    font: inherit;
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    transition: .15s ease;
}

.wc-kinds button:hover { border-color: #c7d6ea; color: #0f172a; }

.wc-kinds button i {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--wc-color, #94a3b8);
}

.wc-kinds button span {
    min-width: 18px;
    padding: 1px 6px;
    border-radius: 999px;
    color: #64748b;
    background: #f1f5f9;
    font-size: 9px;
    text-align: center;
}

.wc-kinds button.is-active {
    border-color: #0f172a;
    color: #fff;
    background: #0f172a;
}

.wc-kinds button.is-active span { color: #0f172a; background: #fff; }

.wc-kinds .is-edited, .wc-entry.is-edited { --wc-color: #2563eb; --wc-soft: #eff6ff; }
.wc-kinds .is-added, .wc-entry.is-added { --wc-color: #059669; --wc-soft: #ecfdf5; }
.wc-kinds .is-correction, .wc-entry.is-correction { --wc-color: #7c3aed; --wc-soft: #f5f3ff; }
.wc-kinds .is-reviewed, .wc-entry.is-reviewed { --wc-color: #0d9488; --wc-soft: #f0fdfa; }
.wc-kinds .is-deleted, .wc-entry.is-deleted { --wc-color: #dc2626; --wc-soft: #fef2f2; }

/* Oś czasu */
.wc-timeline {
    display: grid;
    gap: 22px;
}

.wc-day[hidden],
.wc-entry[hidden],
.wc-empty[hidden] { display: none; }

.wc-day {
    display: grid;
    gap: 10px;
}

.wc-day-head {
    position: sticky;
    z-index: 3;
    top: 0;
    display: flex;
    gap: 8px;
    align-items: baseline;
    padding: 6px 0;
    background: linear-gradient(#fff 70%, rgba(255, 255, 255, 0));
}

.wc-day-head strong {
    color: #0f172a;
    font-size: 13px;
    letter-spacing: -.01em;
}

.wc-day-head span {
    color: #94a3b8;
    font-size: 10.5px;
    font-weight: 600;
}

.wc-day-head em {
    margin-left: auto;
    padding: 1px 8px;
    border-radius: 999px;
    color: #64748b;
    background: #f1f5f9;
    font-size: 9.5px;
    font-style: normal;
    font-weight: 700;
}

.wc-entry {
    position: relative;
    display: grid;
    grid-template-columns: 46px 30px minmax(0, 1fr);
    gap: 0 10px;
    align-items: start;
}

/* Linia łącząca wpisy jednego dnia */
.wc-entry:not(:last-child)::before {
    position: absolute;
    top: 30px;
    bottom: -12px;
    left: 70px;
    width: 2px;
    border-radius: 2px;
    content: "";
    background: #e8eef6;
}

.wc-time {
    padding-top: 7px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.wc-dot {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    color: var(--wc-color);
    background: var(--wc-soft);
    box-shadow: 0 0 0 4px #fff, inset 0 0 0 1px color-mix(in srgb, var(--wc-color) 22%, transparent);
}

.wc-dot .icon { width: 14px; height: 14px; }

.wc-card {
    position: relative;
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #e6ecf4;
    border-radius: 14px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.wc-card:hover {
    border-color: #cfdcee;
    box-shadow: 0 10px 24px rgba(26, 56, 101, .07);
}

.wc-card-head {
    display: flex;
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.wc-avatar {
    display: grid;
    flex: 0 0 32px;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(145deg, #3b82f6, #6366f1);
    font-size: 10.5px;
    font-weight: 800;
}

.wc-avatar.is-small {
    flex-basis: 20px;
    width: 20px;
    height: 20px;
    border-radius: 7px;
    color: #475569;
    background: #e2e8f0;
    font-size: 8px;
}

.wc-who {
    display: grid;
    flex: 1 1 auto;
    gap: 2px;
    min-width: 0;
}

.wc-who strong {
    overflow: hidden;
    color: #0f172a;
    font-size: 12.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wc-who span {
    display: flex;
    gap: 4px;
    align-items: center;
    overflow: hidden;
    color: #64748b;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wc-who .icon { flex: 0 0 auto; width: 11px; height: 11px; }

.wc-action {
    flex: 0 0 auto;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--wc-color);
    background: var(--wc-soft);
    font-size: 9.5px;
    font-weight: 800;
    white-space: nowrap;
}

/* Porównanie przed / po */
.wc-diff {
    display: grid;
    overflow: hidden;
    border: 1px solid #edf1f7;
    border-radius: 11px;
}

.wc-diff-row {
    display: grid;
    grid-template-columns: minmax(150px, .7fr) minmax(0, 1.3fr);
    gap: 12px;
    align-items: center;
    padding: 8px 12px;
    background: #fbfcfe;
}

.wc-diff-row + .wc-diff-row { border-top: 1px solid #edf1f7; }

.wc-diff-label {
    display: grid;
    color: #334155;
    font-size: 10.5px;
    font-weight: 750;
}

.wc-diff-label small {
    color: #94a3b8;
    font-size: 8.5px;
    font-weight: 600;
}

.wc-diff-values {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    color: #475569;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.wc-diff-values s {
    padding: 2px 7px;
    border-radius: 7px;
    color: #94a3b8;
    background: #f1f5f9;
    text-decoration-color: rgba(148, 163, 184, .7);
}

.wc-diff-values .icon { width: 12px; height: 12px; color: #94a3b8; }

.wc-diff-values b {
    padding: 2px 7px;
    border-radius: 7px;
    color: #065f46;
    background: #ecfdf5;
    box-shadow: inset 0 0 0 1px #a7f3d0;
}

.wc-diff-row.is-derived { background: #fff; }
.wc-diff-row.is-derived .wc-diff-label { color: #64748b; font-weight: 650; }
.wc-diff-row.is-derived .wc-diff-values b { color: #334155; background: #f8fafc; box-shadow: inset 0 0 0 1px #e2e8f0; }

.wc-summary {
    margin: 0;
    color: #475569;
    font-size: 11px;
}

.wc-note {
    display: flex;
    gap: 7px;
    align-items: flex-start;
    margin: 0;
    padding: 8px 11px;
    border-left: 3px solid #f59e0b;
    border-radius: 0 10px 10px 0;
    color: #78350f;
    background: #fffbeb;
    font-size: 11px;
    line-height: 1.45;
}

.wc-note .icon { flex: 0 0 auto; width: 13px; height: 13px; margin-top: 1px; color: #d97706; }

.wc-card-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    justify-content: space-between;
    padding-top: 9px;
    border-top: 1px dashed #e8eef6;
}

.wc-editor {
    display: flex;
    gap: 6px;
    align-items: center;
    min-width: 0;
    color: #94a3b8;
    font-size: 9.5px;
}

.wc-editor b { color: #475569; }

.wc-card-foot a {
    display: inline-flex;
    gap: 3px;
    align-items: center;
    padding: 4px 10px;
    border-radius: 8px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
    transition: .15s ease;
}

.wc-card-foot a:hover { color: #fff; background: #2563eb; }
.wc-card-foot a .icon { width: 12px; height: 12px; }

.wc-empty {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 36px 20px;
    border: 1px dashed #cfdcee;
    border-radius: 16px;
    background: #fafcff;
    text-align: center;
}

.wc-empty > span {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 4px;
    border-radius: 14px;
    color: #2563eb;
    background: #eff6ff;
}

.wc-empty strong { color: #0f172a; font-size: 13px; }
.wc-empty p { max-width: 340px; margin: 0; color: #64748b; font-size: 11px; }

@media (max-width: 760px) {
    .wc-entry { grid-template-columns: 30px minmax(0, 1fr); }
    .wc-entry:not(:last-child)::before { left: 14px; }
    .wc-time { grid-column: 2; padding: 0 0 4px; text-align: left; }
    .wc-dot { grid-row: 1 / span 2; grid-column: 1; }
    .wc-card { grid-column: 2; }
    .wc-card-head { flex-wrap: wrap; }
    .wc-action { order: 3; }
    .wc-diff-row { grid-template-columns: 1fr; gap: 4px; }
    .wc-filter, .wc-filter.is-month { flex: 1 1 100%; }
}
