/* Release Plan Component */
.rd-rp {
    padding: 0;
}

.rd-rp--loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    font-size: 16px;
    color: #1e293b;
}

/* Filters */
.rd-rp__filters {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    flex-wrap: wrap;
}

.rd-rp__date-range {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rd-rp__date-input {
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
    text-transform: uppercase;
}

.rd-rp__date-input:focus {
    border-color: #4a6cf7;
    outline: none;
}

.rd-rp__date-sep {
    color: #94a3b8;
    font-size: 14px;
}

.rd-rp__search {
    position: relative;
    flex: 1;
    max-width: 320px;
}

.rd-rp__search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    opacity: 0.4;
    pointer-events: none;
    background: #1e293b;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    mask-size: contain;
    -webkit-mask-size: contain;
}

.rd-rp__search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.15s;
}

.rd-rp__search-input:focus {
    border-color: #4a6cf7;
    background: #fff;
}

.rd-rp__filter-select {
    padding: 8px 28px 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    background: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.rd-rp__filter-select:hover {
    border-color: #cbd5e1;
}

/* Toggle Switch */
.rd-rp__toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    white-space: nowrap;
}

.rd-rp__toggle-label {
    font-size: 13px;
    font-weight: 600;
    color: #ef4444;
}

.rd-rp__switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    cursor: pointer;
}

.rd-rp__switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.rd-rp__switch-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 22px;
    transition: background 0.2s;
}

.rd-rp__switch-slider::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.rd-rp__switch input:checked+.rd-rp__switch-slider {
    background: #ef4444;
}

.rd-rp__switch input:checked+.rd-rp__switch-slider::before {
    transform: translateX(18px);
}

/* Year overview */
.rd-rp__year {
    background: #fff;
    border: 1px solid #e7ecf3;
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 16px;
}

.rd-rp__year-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.rd-rp__year-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.rd-rp__year-totals {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #64748b;
}

.rd-rp__year-total b {
    color: #1e293b;
    font-weight: 700;
}

.rd-rp__year-total--released b {
    color: #16a34a;
}

.rd-rp__year-total--planned b {
    color: #4a6cf7;
}

.rd-rp__year-months {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 6px;
    align-items: end;
}

.rd-rp__year-month {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    min-height: 84px;
    justify-content: flex-end;
    padding: 8px 6px;
    border: 1px solid #eef2f7;
    border-radius: 10px;
    background: #f8fafc;
    cursor: pointer;
    position: relative;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.rd-rp__year-month-close {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 13px;
    line-height: 1;
    color: #94a3b8;
    background: transparent;
    opacity: 0;
    transition: opacity 0.12s, background 0.12s, color 0.12s;
}

.rd-rp__year-month:hover .rd-rp__year-month-close {
    opacity: 1;
}

.rd-rp__year-month-close:hover {
    background: #fee2e2;
    color: #dc2626;
}

.rd-rp__year-month:hover {
    border-color: #b9c6f5;
    background: #eef2ff;
    transform: translateY(-1px);
}

.rd-rp__year-month.is-empty {
    opacity: 0.55;
    cursor: default;
}

.rd-rp__year-month.is-empty:hover {
    border-color: #eef2f7;
    background: #f8fafc;
    transform: none;
}

.rd-rp__year-month-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px;
}

.rd-rp__year-month-label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
}

.rd-rp__year-month-count {
    font-size: 14px;
    font-weight: 800;
    color: #1e293b;
}

.rd-rp__year-month-bars {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 6px;
    height: 100%;
    border-radius: 5px;
    overflow: hidden;
    background: #e9eef5;
}

.rd-rp__year-month-bar {
    width: 100%;
}

.rd-rp__year-month-bar--released {
    background: #22c55e;
}

.rd-rp__year-month-bar--planned {
    background: #4a6cf7;
}

/* Flash a column when jumped to from the year overview */
.rd-rp__column--flash {
    animation: rd-rp-flash 1.2s ease;
}

@keyframes rd-rp-flash {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(74, 108, 247, 0);
    }

    25% {
        box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.45);
    }
}

/* Grid */
.rd-rp__grid {
    display: flex;
    overflow-x: auto;
    gap: 4px;
    padding-bottom: 16px;
}

/* Columns */
.rd-rp__column {
    min-width: 232px;
    max-width: 272px;
    flex: 1;
    flex-shrink: 0;
    background: #f8fafc;
    border-radius: 12px;
}

.rd-rp__column-header {
    padding: 16px 14px 12px;
    border-bottom: 2px solid #4a6cf7;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: #f8fafc;
    border-radius: 12px 12px 0 0;
    z-index: 2;
}

.rd-rp__column-header--toggle {
    cursor: pointer;
    user-select: none;
}

.rd-rp__column-header--toggle:hover {
    background: #eef2ff;
}

.rd-rp__toggle-arrow {
    font-size: 11px;
    color: #94a3b8;
    margin-left: 4px;
}

/* No Release section */
.rd-rp__column--no-release {
    min-width: auto;
    max-width: none;
    flex: 0 0 100%;
}

.rd-rp__no-release-grid {
    columns: 216px;
    column-gap: 8px;
    padding: 8px;
}

.rd-rp__no-release-grid pc-release-plan-card {
    display: block;
    break-inside: avoid;
    margin-bottom: 8px;
}

/* Expanded month view */
.rd-rp__column--expanded {
    min-width: auto;
    max-width: none;
    flex: 0 0 100%;
}

.rd-rp__expanded-dates {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 12px;
}

.rd-rp__date-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rd-rp__date-heading {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    padding: 4px 0;
    border-bottom: 1px solid #e2e8f0;
}

.rd-rp__date-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rd-rp__date-row pc-release-plan-card {
    flex: 0 0 280px;
    max-width: 340px;
}

/* Expanded card detail layout */
.rd-rp__ecard {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 0 0 300px;
    max-width: 360px;
    transition: box-shadow 0.15s;
}

.rd-rp__ecard:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.rd-rp__ecard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.rd-rp__ecard-cat {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.rd-rp__ecard-status {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    margin-left: auto;
}

.rd-rp__ecard-edit {
    font-size: 16px;
    color: #94a3b8;
    text-decoration: none;
    padding: 2px 4px;
    border-radius: 4px;
}

.rd-rp__ecard-edit:hover {
    color: #475569;
    background: #f1f5f9;
}

.rd-rp__ecard-prio {
    font-size: 10px;
    color: #d4a017;
    margin-bottom: 4px;
}

.rd-rp__ecard-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}

.rd-rp__ecard-zielgruppen {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.rd-rp__ecard-zg-tag {
    font-size: 10px;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 1px 6px;
    white-space: nowrap;
}

.rd-rp__ecard-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.rd-rp__ecard-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 12px;
}

.rd-rp__ecard-label {
    color: #64748b;
    min-width: 90px;
    flex-shrink: 0;
}

.rd-rp__ecard-value {
    color: #334155;
    font-weight: 500;
}

.rd-rp__ecard-value--warn {
    color: #dc2626;
}

.rd-rp__ecard-value--check {
    color: #16a34a;
    font-weight: 700;
}

.rd-rp__ecard-bottom {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.rd-rp__ecard-progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rd-rp__ecard-progress {
    flex: 1;
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}

.rd-rp__ecard-progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}

.rd-rp__ecard-percent {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    min-width: 32px;
    text-align: right;
}

.rd-rp__ecard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rd-rp__ecard-duration {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #64748b;
}

.rd-rp__ecard-tickets {
    font-size: 11px;
    font-weight: 600;
    color: #dc2626;
    background: #fef2f2;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.rd-rp__column-header--cont {
    border-bottom-color: #94a3b8;
}

.rd-rp__cards--no-header {
    padding-top: 52px;
}

.rd-rp__column-header-text {
    display: flex;
    flex-direction: column;
}

.rd-rp__month-name {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
}

.rd-rp__month-meta {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

.rd-rp__column-menu {
    background: none;
    border: none;
    font-size: 18px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    border-radius: 4px;
}

.rd-rp__column-menu:hover {
    color: #1e293b;
    background: #e2e8f0;
}

.rd-rp__cards {
    padding: 8px;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Card */
.rd-rpc {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 12px;
    position: relative;
    cursor: grab;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.rd-rpc:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.rd-rpc__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 4px;
    flex-wrap: wrap;
}

.rd-rpc__tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.rd-rpc__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.rd-rpc__status-tag {
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.rd-rpc__badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-left: auto;
}

.rd-rpc__badge {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.rd-rpc__badge--kritisch {
    color: #ef4444;
}

.rd-rpc__badge--feedback {
    color: #f59e0b;
}

.rd-rpc__prio {
    font-size: 10px;
    letter-spacing: 0.5px;
    color: #d4a017;
    margin-bottom: 4px;
}

.rd-rpc__title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.35;
    margin-bottom: 4px;
    word-break: break-word;
}

.rd-rpc__zielgruppen {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.rd-rpc__zg-tag {
    font-size: 10px;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 1px 6px;
    white-space: nowrap;
}

.rd-rp__pcard-zielgruppen {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin: 8px 0 8px;
}

.rd-rp__pcard-zg {
    font-size: 8px;
    font-weight: 600;
    padding: 1.6px 6.4px;
    border-radius: 999px;
    white-space: nowrap;
}

.rd-rpc__meta {
    margin-bottom: 10px;
}

.rd-rpc__date {
    font-size: 12px;
    color: #64748b;
    line-height: 1.6;
}

.rd-rpc__date--warn {
    color: #ef4444;
    font-weight: 600;
}

/* Progress Row */
.rd-rpc__progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.rd-rpc__progress {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 100px;
    overflow: hidden;
}

.rd-rpc__progress-bar {
    height: 100%;
    border-radius: 100px;
    transition: width 0.3s ease;
}

.rd-rpc__percent {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

/* Card Footer */
.rd-rpc__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.rd-rpc__duration,
.rd-rpc__tasks {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #64748b;
}

.rd-rpc__icon {
    width: 14px;
    height: 14px;
    display: inline-block;
    background: #94a3b8;
    flex-shrink: 0;
}

.rd-rpc__icon--clock {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E");
    mask-size: contain;
    -webkit-mask-size: contain;
}

.rd-rpc__icon--tasks {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E");
    mask-size: contain;
    -webkit-mask-size: contain;
}

/* Edit Link */
.rd-rpc__edit {
    position: relative;
    width: 16px;
    height: 16px;
    opacity: 0.4;
    transition: opacity 0.15s;
    margin-left: auto;
}

.rd-rpc:hover .rd-rpc__edit {
    opacity: 0.8;
}

.rd-rpc__edit:hover {
    opacity: 1 !important;
}

.rd-rpc__edit::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    mask-image: url(/src/img/2024/svg/icons/rd-icon-pencil.svg);
    -webkit-mask-image: url(/src/img/2024/svg/icons/rd-icon-pencil.svg);
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-position: center;
    background-color: #1e293b;
}

/* Drag feedback */
.rd-rpc--ghost {
    background: transparent !important;
    border: 2px dashed #4a6cf7 !important;
    opacity: 0.5;
    box-shadow: none !important;
}

.rd-rpc--ghost * {
    visibility: hidden;
}

.rd-rpc--chosen {
    opacity: 0.7;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: grabbing;
}

.rd-rpc--dragging {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2) !important;
    transform: rotate(1deg);
    cursor: grabbing;
}

/* Legend Footer */
.rd-rp__legend {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 14px 16px;
    background: #1e293b;
    border-radius: 12px;
    margin-top: 16px;
    color: #e2e8f0;
    font-size: 12px;
}

.rd-rp__legend-statuses {
    display: flex;
    align-items: center;
    gap: 14px;
}

.rd-rp__legend-title {
    font-weight: 600;
    color: #94a3b8;
    margin-right: 4px;
}

.rd-rp__legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #e2e8f0;
}

.rd-rp__legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.rd-rp__legend-dot--fertig {
    background: #22c55e;
}

.rd-rp__legend-dot--in_arbeit {
    background: #4a6cf7;
}

.rd-rp__legend-dot--feedback {
    background: #f59e0b;
}

.rd-rp__legend-dot--kritisch {
    background: #ef4444;
}

.rd-rp__legend-dot--geplant {
    background: #94a3b8;
}

.rd-rp__legend-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #94a3b8;
}

/* Status-based progress bar colors */
.rd-rpc[data-status="kritisch"] .rd-rpc__progress-bar {
    background: #ef4444;
}

.rd-rpc[data-status="in_arbeit"] .rd-rpc__progress-bar {
    background: #4a6cf7;
}

.rd-rpc[data-status="feedback"] .rd-rpc__progress-bar {
    background: #f59e0b;
}

.rd-rpc[data-status="geplant"] .rd-rpc__progress-bar {
    background: #94a3b8;
}

.rd-rpc[data-status="fertig"] .rd-rpc__progress-bar {
    background: #22c55e;
}

/* ===================== Dark annual plan (iframe-local) ===================== */
body.vp-dark-releaseplan {
    --rp-dark-bg: #0f172a;
    --rp-dark-surface: #1e293b;
    --rp-dark-surface-2: #172033;
    --rp-dark-border: #334155;
    --rp-dark-text: #cbd5e1;
    --rp-dark-heading: #f1f5f9;
    --rp-dark-muted: #94a3b8;
    background: var(--rp-dark-bg);
    color: var(--rp-dark-text);
    color-scheme: dark;
}

body.vp-dark-releaseplan .vp-embed-frame,
body.vp-dark-releaseplan .rd-rp {
    background: var(--rp-dark-bg);
}

body.vp-dark-releaseplan .rd-rp__filters,
body.vp-dark-releaseplan .rd-rp__year,
body.vp-dark-releaseplan .rd-rp__stat,
body.vp-dark-releaseplan .rd-rp__ecard,
body.vp-dark-releaseplan .rd-rpc,
body.vp-dark-releaseplan .rd-rp__pcard {
    background: var(--rp-dark-surface);
    border-color: var(--rp-dark-border);
    box-shadow: none;
}

body.vp-dark-releaseplan .rd-rp__date-input,
body.vp-dark-releaseplan .rd-rp__search-input,
body.vp-dark-releaseplan .rd-rp__filter-select {
    background-color: var(--rp-dark-bg);
    border-color: var(--rp-dark-border);
    color: var(--rp-dark-text);
}

body.vp-dark-releaseplan .rd-rp__search-input:focus {
    background-color: var(--rp-dark-bg);
}

body.vp-dark-releaseplan .rd-rp__search-icon {
    background: var(--rp-dark-muted);
}

body.vp-dark-releaseplan .rd-rp__filter-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

body.vp-dark-releaseplan .rd-rp__year-month,
body.vp-dark-releaseplan .rd-rp__column,
body.vp-dark-releaseplan .rd-rp__column-header,
body.vp-dark-releaseplan .rd-rp__pipe-col {
    background: var(--rp-dark-surface-2);
    border-color: var(--rp-dark-border);
}

body.vp-dark-releaseplan .rd-rp__year-month:hover,
body.vp-dark-releaseplan .rd-rp__column-header--toggle:hover,
body.vp-dark-releaseplan .rd-rp__column-menu:hover {
    background: var(--rp-dark-surface);
    border-color: #64748b;
}

body.vp-dark-releaseplan .rd-rp__year-month-bars,
body.vp-dark-releaseplan .rd-rpc__progress,
body.vp-dark-releaseplan .rd-rp__ecard-progress {
    background: var(--rp-dark-border);
}

body.vp-dark-releaseplan .rd-rp__year-title,
body.vp-dark-releaseplan .rd-rp__year-total b,
body.vp-dark-releaseplan .rd-rp__year-month-count,
body.vp-dark-releaseplan .rd-rp__month-name,
body.vp-dark-releaseplan .rd-rpc__title,
body.vp-dark-releaseplan .rd-rp__ecard-value,
body.vp-dark-releaseplan .rd-rp__pipe-title,
body.vp-dark-releaseplan .rd-rp__stat-value,
body.vp-dark-releaseplan .rd-rp__pipe-col-name {
    color: var(--rp-dark-heading);
}

body.vp-dark-releaseplan .rd-rp__year-totals,
body.vp-dark-releaseplan .rd-rp__year-month-label,
body.vp-dark-releaseplan .rd-rp__month-meta,
body.vp-dark-releaseplan .rd-rpc__date,
body.vp-dark-releaseplan .rd-rpc__percent,
body.vp-dark-releaseplan .rd-rpc__duration,
body.vp-dark-releaseplan .rd-rpc__tasks,
body.vp-dark-releaseplan .rd-rp__ecard-label,
body.vp-dark-releaseplan .rd-rp__ecard-percent,
body.vp-dark-releaseplan .rd-rp__pipe-sub,
body.vp-dark-releaseplan .rd-rp__stat-label,
body.vp-dark-releaseplan .rd-rp__pipe-threshold {
    color: var(--rp-dark-muted);
}

body.vp-dark-releaseplan .rd-rpc__zg-tag {
    color: var(--rp-dark-text);
    background: var(--rp-dark-surface-2);
    border-color: var(--rp-dark-border);
}

body.vp-dark-releaseplan .rd-rp__pcard-zg {
    color: var(--rp-dark-heading) !important;
}

body.vp-dark-releaseplan .rd-rpc__edit {
    opacity: 0.72;
}

body.vp-dark-releaseplan .rd-rpc__edit::before {
    background-color: var(--rp-dark-heading);
}

body.vp-dark-releaseplan .rd-rpc__footer,
body.vp-dark-releaseplan .rd-rp__date-heading,
body.vp-dark-releaseplan .rd-rp__column-header {
    border-color: var(--rp-dark-border);
}

body.vp-dark-releaseplan .rd-rp__pipe-back {
    background: var(--rp-dark-surface);
    border-color: var(--rp-dark-border);
    color: var(--rp-dark-text);
}

body.vp-dark-releaseplan .rd-rp__pipe-back:hover {
    background: var(--rp-dark-surface-2);
}

body.vp-dark-releaseplan .rd-rp__pipe-scroll-controls button {
    border-color: var(--rp-dark-border);
    background: var(--rp-dark-surface);
    color: var(--rp-dark-text);
}

body.vp-dark-releaseplan .rd-rp__pipe-scroll-controls button:hover {
    border-color: #64748b;
    background: var(--rp-dark-surface-2);
}

body.vp-dark-releaseplan .rd-rp__pipe-drag-toggle {
    border-color: var(--rp-dark-border);
    background: var(--rp-dark-surface);
    color: var(--rp-dark-muted);
}

body.vp-dark-releaseplan .rd-rp__pipe-drag-toggle.is-on {
    border-color: #60a5fa;
    background: rgba(37, 99, 235, 0.18);
    color: #bfdbfe;
}

body.vp-dark-releaseplan .rd-rp__pipe-board {
    scrollbar-color: #64748b transparent;
}

body.vp-dark-releaseplan .rd-rp__pipe-board::-webkit-scrollbar-thumb {
    background: #64748b;
}

/* ===================== Production Pipeline (expanded view) ===================== */
.rd-rp--pipeline {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.rd-rp__pipe-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rd-rp__pipe-titlebar {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rd-rp__pipe-back {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    white-space: nowrap;
}

.rd-rp__pipe-back:hover {
    background: #f1f5f9;
}

.rd-rp__pipe-heading {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.rd-rp__pipe-sub {
    font-size: 12px;
    color: #94a3b8;
}

.rd-rp__pipe-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

/* Stat cards */
.rd-rp__pipe-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.rd-rp__stat {
    position: relative;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.rd-rp__stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    margin-bottom: 14px;
}

.rd-rp__stat-label {
    font-size: 13px;
    color: #64748b;
}

.rd-rp__stat-value {
    font-size: 30px;
    font-weight: 800;
    color: #0f172a;
    margin-top: 4px;
}

.rd-rp__stat--active .rd-rp__stat-icon {
    background: #dbeafe;
}

.rd-rp__stat--review .rd-rp__stat-icon {
    background: #ede9fe;
}

.rd-rp__stat--blocked .rd-rp__stat-icon {
    background: #fee2e2;
}

.rd-rp__stat--release .rd-rp__stat-icon {
    background: #fef3c7;
}

/* Pipeline filters */
.rd-rp__pipe-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.rd-rp__pipe-threshold {
    margin-left: auto;
    font-size: 12px;
    color: #94a3b8;
}

.rd-rp__pipe-drag-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #fff;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.rd-rp__pipe-drag-toggle.is-on {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
}

.rd-rp__pipe-drag-switch {
    position: relative;
    width: 28px;
    height: 16px;
    border-radius: 999px;
    background: #cbd5e1;
}

.rd-rp__pipe-drag-switch>span {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
    transition: transform 0.15s ease;
}

.rd-rp__pipe-drag-toggle.is-on .rd-rp__pipe-drag-switch {
    background: #3b82f6;
}

.rd-rp__pipe-drag-toggle.is-on .rd-rp__pipe-drag-switch>span {
    transform: translateX(12px);
}

.rd-rp--pipeline:not(.is-drag-enabled) .rd-rp__pcard {
    cursor: pointer;
}

.rd-rp--pipeline.is-drag-enabled .rd-rp__pcard {
    cursor: grab;
}

.rd-rp__pipe-scroll-controls {
    display: inline-flex;
    gap: 4px;
}

.rd-rp__pipe-scroll-controls button {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #fff;
    color: #64748b;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
}

.rd-rp__pipe-scroll-controls button:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #334155;
}

/* Board */
.rd-rp__pipe-board {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 10px;
    align-items: stretch;
    min-height: calc(100vh - 220px);
    scrollbar-color: #cbd5e1 transparent;
    scrollbar-width: thin;
}

.rd-rp__pipe-board::-webkit-scrollbar {
    height: 7px;
}

.rd-rp__pipe-board::-webkit-scrollbar-track {
    background: transparent;
}

.rd-rp__pipe-board::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #cbd5e1;
}

.rd-rp__pipe-board::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.rd-rp__pipe-col {
    flex: 0 0 240px;
    width: 240px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 220px);
    position: relative;
}

.rd-rp__pipe-col--bottleneck {
    border-color: #fca5a5;
    background: #fef6f6;
}

.rd-rp__pipe-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid #eef2f7;
    position: sticky;
    top: 0;
    background: inherit;
    border-radius: 12px 12px 0 0;
}

.rd-rp__pipe-col-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: #eef2f7;
    color: #64748b;
    flex: 0 0 auto;
}

.rd-rp__pipe-col--bottleneck .rd-rp__pipe-col-icon {
    background: #fee2e2;
    color: #dc2626;
}

.rd-rp__pipe-col-name {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    flex: 1 1 auto;
}

.rd-rp__pipe-col-count {
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 11px;
    background: #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rd-rp__pipe-col--bottleneck .rd-rp__pipe-col-count {
    background: #fecaca;
    color: #b91c1c;
}

.rd-rp__pipe-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.rd-rp__pipe-empty {
    text-align: center;
    color: #cbd5e1;
    font-size: 14px;
    padding: 10px 0;
}

/* Empty stages collapse to a narrow strip to save horizontal space while
   staying a valid drag&drop target. */
.rd-rp__pipe-col--collapsed {
    flex: 0 0 46px;
    width: 46px;
}

.rd-rp__pipe-col--collapsed .rd-rp__pipe-col-header {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 12px 6px;
}

.rd-rp__pipe-col--collapsed .rd-rp__pipe-col-name {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    text-align: left;
    color: #94a3b8;
    flex: 0 0 auto;
}

.rd-rp__pipe-col--collapsed .rd-rp__pipe-cards {
    padding: 0;
    min-height: 40px;
}

/* Empty stages are pure noise while reading the board — they only matter as drop
   targets, so they appear once "Verschieben" is switched on. */
.rd-rp--pipeline:not(.is-drag-enabled) .rd-rp__pipe-col--collapsed {
    display: none;
}

/* Grip to pull a column wider. Sits on the column edge and only shows up on
   hover so the board stays calm. */
.rd-rp__pipe-col-grip {
    position: absolute;
    top: 0;
    right: -7px;
    width: 14px;
    height: 100%;
    cursor: col-resize;
    touch-action: none;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rd-rp__pipe-col-grip::after {
    content: "";
    width: 4px;
    height: 46px;
    border-radius: 999px;
    background: #cbd5e1;
    opacity: 0;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

.rd-rp__pipe-col:hover .rd-rp__pipe-col-grip::after,
.rd-rp__pipe-col--wide .rd-rp__pipe-col-grip::after {
    opacity: 1;
}

.rd-rp__pipe-col-grip:hover::after {
    background: #6366f1;
    height: 64px;
}

/* Keep the resize cursor and kill text selection while dragging the grip. */
body.is-col-resizing {
    cursor: col-resize;
    user-select: none;
}

body.is-col-resizing .rd-rp__pipe-col {
    transition: none;
}

body.is-col-resizing .rd-rp__pipe-col-grip::after {
    opacity: 1;
    background: #6366f1;
}

/* A widened column flows its cards into as many sub-columns as fit, which is the
   whole point: same cards, a fraction of the vertical scrolling. While drag&drop
   is armed the cards stay in one column so Sortable's row logic keeps working. */
.rd-rp--pipeline:not(.is-drag-enabled) .rd-rp__pipe-col--wide .rd-rp__pipe-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    align-content: start;
}

/* Smooth highlight change when a drag starts/ends. */
.rd-rp__pipe-col {
    transition: background-color 0.15s ease, box-shadow 0.15s ease, flex-basis 0.15s ease, width 0.15s ease;
}

/* While a card is being dragged, highlight the narrow (empty) columns as drop
   targets WITHOUT resizing them. Resizing every collapsed column at once used
   to shift the whole board horizontally and made it easy to lose orientation,
   so the columns keep their width and only get a visible drop affordance. */
body.is-dragging .rd-rp__pipe-col--collapsed {
    background: #eef2ff;
    box-shadow: inset 0 0 0 2px #c7d2fe;
}

body.is-dragging .rd-rp__pipe-col--collapsed .rd-rp__pipe-col-name {
    color: #6366f1;
}

/* Only the column currently hovered during a drag expands into a full drop
   target (with a clear "hier ablegen" zone), so narrow empty columns like
   Aufnahmeplanung stay easy to drop into while the rest of the board stays put. */
body.is-dragging .rd-rp__pipe-col--collapsed.rd-rp__pipe-col--drop-active {
    flex: 0 0 200px;
    width: 200px;
}

body.is-dragging .rd-rp__pipe-col--collapsed.rd-rp__pipe-col--drop-active .rd-rp__pipe-col-header {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
}

body.is-dragging .rd-rp__pipe-col--collapsed.rd-rp__pipe-col--drop-active .rd-rp__pipe-col-name {
    writing-mode: horizontal-tb;
    transform: none;
}

body.is-dragging .rd-rp__pipe-col--collapsed.rd-rp__pipe-col--drop-active .rd-rp__pipe-cards {
    padding: 12px;
    min-height: 130px;
}

body.is-dragging .rd-rp__pipe-col--collapsed.rd-rp__pipe-col--drop-active .rd-rp__pipe-cards::after {
    content: "Hier ablegen";
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 104px;
    border: 2px dashed #c7d2fe;
    border-radius: 10px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    pointer-events: none;
}

/* Columns a dragged podcast cannot be dropped into (script/animation/
   postproduction) are visibly disabled so the restriction is obvious. */
.rd-rp__pipe-col--invalid {
    opacity: 0.5;
    filter: grayscale(0.5);
}

.rd-rp__pipe-col--invalid .rd-rp__pipe-cards {
    cursor: not-allowed;
}

/* An empty (collapsed) invalid column keeps a red drop affordance so the
   "not for podcast" restriction reads clearly even without a text hint. */
body.is-dragging .rd-rp__pipe-col--collapsed.rd-rp__pipe-col--invalid {
    background: #fef2f2;
    box-shadow: inset 0 0 0 2px #fecaca;
}

/* Hovering an invalid empty column while dragging: keep the red cue on the
   expanded drop zone and relabel it. */
body.is-dragging .rd-rp__pipe-col--collapsed.rd-rp__pipe-col--invalid.rd-rp__pipe-col--drop-active .rd-rp__pipe-cards::after {
    content: "Nicht für Podcast";
    border-style: solid;
    border-color: #fecaca;
    color: #ef4444;
}

/* Pipeline card */
.rd-rp__pcard {
    background: #fff;
    border: 1px solid #e7ecf3;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    cursor: grab;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.rd-rp__pcard:hover {
    border-color: #c7d6ea;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.rd-rp__pcard:active {
    cursor: grabbing;
}

.rd-rp__pcard-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.rd-rp__pcard-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.rd-rp__pcard-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border: 1px solid #dbe4ef;
    border-radius: 7px;
    background: #fff;
}

.rd-rp__pcard-preview::before {
    content: "";
    width: 16px;
    height: 16px;
    background-color: #64748b;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='m21 15-5-5L5 21'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='m21 15-5-5L5 21'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}

.rd-rp__pcard-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    overflow-wrap: break-word;
    word-break: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
    min-width: 0;
}

.rd-rp__pcard-edit {
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    flex-shrink: 0;
}

.rd-rp__pcard-edit:hover {
    color: #475569;
}

.rd-rp__pcard-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 0;
    margin-bottom: 8px;
}

.rd-rp__pcard-tags+.rd-rpc__zielgruppen {
    margin-top: -2px;
}

.rd-rp__pcard-progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.rd-rp__pcard-progress {
    flex: 1;
    height: 6px;
    background: #eef2f7;
    border-radius: 3px;
    overflow: hidden;
}

.rd-rp__pcard-progress-bar {
    height: 100%;
    border-radius: 3px;
}

.rd-rp__pcard-percent {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    min-width: 30px;
    text-align: right;
}

.rd-rp__pcard-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
}

.rd-rp__pcard-person {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #475569;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rd-rp__pcard-person--empty {
    color: #cbd5e1;
}

.rd-rp__pcard-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e0e7ff;
    color: #4338ca;
    font-size: 9px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rd-rp__pcard-prio {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

.rd-rp__pcard-prio--3 {
    background: #fee2e2;
    color: #b91c1c;
}

.rd-rp__pcard-prio--2 {
    background: #fef3c7;
    color: #b45309;
}

.rd-rp__pcard-prio--1 {
    background: #f1f5f9;
    color: #64748b;
}

.rd-rp__pcard-foot {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.rd-rp__pcard-foot-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rd-rp__pcard-date {
    font-size: 12px;
    color: #64748b;
}

.rd-rp__pcard-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rd-rp__pcard-next {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #eef2f7;
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
}

.rd-rp__pcard-next-label {
    font-weight: 700;
    color: #475569;
}

@media (max-width: 900px) {
    .rd-rp__pipe-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}