/* ── Epic-Ebene (zwischen Projekt und Sprint) ─────────────────── */

.epic-block {
    --epic-accent: var(--accent);
    margin-bottom: 18px;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--epic-accent);
    background: var(--surface-2);
    box-shadow: none;
    overflow: hidden;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.epic-block:hover {
    border-color: var(--border-strong);
    border-left-color: var(--epic-accent);
    box-shadow: var(--shadow-xs);
}

.epic-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border-soft);
}

.epic-toggle {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-3);
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.14s, color 0.14s;
}

.epic-toggle:hover {
    background: var(--surface);
    color: var(--text-1);
}

.epic-color-bar {
    width: 4px;
    height: 22px;
    border-radius: 999px;
    flex-shrink: 0;
}

.epic-title-block {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.epic-badge {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
    color: var(--epic-accent);
    background: color-mix(in srgb, var(--epic-accent) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--epic-accent) 30%, transparent);
}

.epic-id-chip {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    border-radius: 999px;
    padding: 2px 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
    box-shadow: inset 0 0 0 1px var(--surface-2);
    white-space: nowrap;
}

.epic-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.epic-sprint-count {
    flex-shrink: 0;
    font-size: 11.5px;
    color: var(--text-4);
}

.epic-status-chip {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
}

.epic-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.epic-prog-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
}

.epic-prog-bar {
    width: 110px;
    height: 6px;
    border-radius: 999px;
    background: var(--surface);
    overflow: hidden;
    border: 1px solid var(--border-soft);
}

.epic-prog-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease;
}

.epic-est {
    font-size: 12px;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
}

.epic-description {
    padding: 10px 18px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-3);
    background: var(--surface);
    border-bottom: 1px solid var(--border-soft);
}

.epic-sections-body {
    padding: 14px 16px 6px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 48px;
}

.epic-sections-body.drop-target,
.ungrouped-sections-body.drop-target {
    outline: 2px dashed color-mix(in srgb, var(--epic-accent, var(--accent)) 50%, transparent);
    outline-offset: -4px;
    border-radius: var(--r-md, 10px);
    background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.epic-drop-hint {
    display: none;
    padding: 12px;
    text-align: center;
    font-size: 12px;
    color: var(--text-4);
    border: 1.5px dashed var(--border);
    border-radius: 10px;
}

/* Leere Epic / leere "Ohne Epic"-Gruppe: Drop-Hinweis sichtbar machen */
.epic-sections-body:not(:has(.section-block)) .epic-drop-hint,
.ungrouped-sections-body:not(:has(.section-block)) .epic-drop-hint {
    display: block;
}

/* ── "Ohne Epic"-Region ───────────────────────────────────────── */

.ungrouped-sections {
    margin-bottom: 14px;
}

.ungrouped-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-4);
    margin: 6px 2px 10px;
}

.ungrouped-sections-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 8px;
}

/* Sprints innerhalb einer Epic etwas kompakter einrücken */
.epic-sections-body .section-block {
    margin-bottom: 0;
}
