/* Update-Note-Tracker */

.upd-pool-total {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-3);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px 10px;
}

.upd-workspace {
    display: grid;
    grid-template-columns: minmax(360px, 1.05fr) minmax(360px, 0.95fr);
    gap: 16px;
    align-items: start;
}

.upd-pool-panel,
.upd-notes-panel {
    min-width: 0;
}

/* ── Pool ─────────────────────────────────────────────── */
.upd-pool-groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.upd-group {
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--surface);
    overflow: hidden;
    transition: opacity 0.18s ease, transform 0.18s ease, max-height 0.18s ease, margin 0.18s ease;
}

.upd-group-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border-soft);
    cursor: grab;
}

.upd-group-head.is-dragging {
    cursor: grabbing;
    opacity: 0.6;
}

.upd-sprint-groups {
    display: flex;
    flex-direction: column;
}

.upd-sprint-group + .upd-sprint-group {
    border-top: 1px solid var(--border);
}

.upd-sprint-group {
    transition: opacity 0.18s ease, transform 0.18s ease, max-height 0.18s ease;
}

.upd-sprint-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border-soft);
    cursor: grab;
}

.upd-sprint-head.is-dragging {
    cursor: grabbing;
    opacity: 0.6;
}

.upd-sprint-name {
    min-width: 0;
    flex: 1;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upd-group-grip {
    color: var(--text-4);
    font-size: 13px;
    line-height: 1;
}

.upd-group-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-1);
}

.upd-group-count {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 1px 8px;
}

.upd-new-dropzone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 16px;
    border: 2px dashed var(--border-strong);
    border-radius: var(--r-lg);
    background: var(--surface-2);
    color: var(--text-3);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.upd-discard-dropzone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 12px 14px;
    border: 2px dashed var(--border);
    border-radius: var(--r-lg);
    background: var(--surface);
    color: var(--text-3);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.upd-note-dropbar {
    position: sticky;
    top: 0;
    z-index: 8;
    margin: 0 0 14px;
    background: var(--surface);
}

.upd-note-dropbar .upd-new-dropzone {
    margin-bottom: 0;
}

.upd-new-dropzone.drag-over {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--text-1);
}

.upd-discard-dropzone.drag-over {
    border-color: var(--danger);
    background: var(--danger-soft, rgba(214, 69, 69, 0.12));
    color: var(--text-1);
}

.upd-new-dropzone-icon {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

.upd-group-items {
    display: flex;
    flex-direction: column;
}

.upd-pool-item {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 9px 12px;
    cursor: grab;
    border-bottom: 1px solid var(--border-soft);
    transition: background 0.12s ease, opacity 0.12s ease;
}

.upd-pool-item:last-child { border-bottom: none; }
.upd-pool-item:hover { background: var(--surface-2); }
.upd-pool-item.is-dragging { opacity: 0.45; }
.upd-pool-item:active { cursor: grabbing; }

.upd-pool-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.upd-pool-task {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.35;
}

.upd-pool-desc {
    font-size: 12px;
    color: var(--text-4);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Note-Liste ───────────────────────────────────────── */
.upd-note-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.upd-note-card {
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    padding: 16px 18px;
    transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.upd-note-card.is-published {
    border-color: rgba(28, 184, 112, 0.45);
}

.upd-note-card.drag-over {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.upd-note-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.upd-note-head { flex: 1; min-width: 220px; }

.upd-note-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.02em;
}

.upd-note-card-desc {
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-3);
    line-height: 1.4;
}

.upd-note-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.upd-note-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 999px;
    padding: 2px 10px;
}

.upd-status-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--success);
    background: var(--success-soft, rgba(28, 184, 112, 0.14));
    border: 1px solid rgba(28, 184, 112, 0.28);
    border-radius: 999px;
    padding: 2px 10px;
}

.upd-chip {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px 9px;
}

.upd-note-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.upd-toggle {
    margin-top: 12px;
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
}

.upd-toggle:hover { color: var(--accent); }

.upd-note-detail {
    margin-top: 8px;
    border-top: 1px solid var(--border-soft);
    padding-top: 10px;
}

.upd-note-group { margin-bottom: 10px; }
.upd-note-group:last-child { margin-bottom: 0; }

.upd-note-group-name {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-4);
    margin-bottom: 5px;
}

.upd-note-sprint {
    margin-bottom: 8px;
}

.upd-note-sprint:last-child {
    margin-bottom: 0;
}

.upd-note-sprint-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-3);
    margin: 0 0 4px;
}

.upd-note-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.upd-note-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    background: var(--surface-2);
    border-radius: var(--r-sm, 8px);
}

.upd-note-item-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.upd-note-task {
    font-size: 13px;
    color: var(--text-2);
}

.upd-note-desc {
    font-size: 12px;
    color: var(--text-4);
    line-height: 1.4;
}

.upd-item-remove {
    background: none;
    border: none;
    color: var(--text-4);
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 6px;
    flex-shrink: 0;
    transition: color 0.12s ease, background 0.12s ease;
}

.upd-item-remove:hover {
    color: var(--danger);
    background: var(--danger-soft, rgba(214, 69, 69, 0.12));
}

.upd-empty {
    font-size: 13px;
    color: var(--text-4);
    padding: 4px 0;
}

.upd-undo-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: min(520px, calc(100vw - 32px));
    padding: 12px 14px;
    color: var(--surface);
    background: var(--text-1);
    border-radius: var(--r-md, 10px);
    box-shadow: var(--shadow-lg, 0 14px 34px rgba(15, 23, 42, 0.24));
    transform: translateX(-50%);
}

.upd-undo-toast span {
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.upd-undo-btn {
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: var(--r-sm, 8px);
    padding: 6px 10px;
    color: var(--surface);
    background: transparent;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.upd-undo-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

@media (max-width: 980px) {
    .upd-workspace {
        grid-template-columns: 1fr;
    }
}
