.roster-planning-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.roster-planning-table-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.roster-planning-recap {
    flex: 0 0 260px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 1rem;
}

.roster-planning-recap-section {
    background: linear-gradient(145deg, var(--bg-surface-1), var(--bg-surface-2));
    border: 1px solid var(--border-subtle);
    border-radius: var(--r, 8px);
    padding: 0.85rem 1rem;
}

.roster-planning-recap-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    margin-bottom: 0.6rem;
}

.roster-planning-recap-icon {
    color: var(--color-gold);
}

.roster-planning-recap-total {
    margin-left: auto;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-pill, 999px);
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--text-primary);
}

.roster-planning-recap-classes {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.roster-planning-recap-class {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.roster-planning-recap-class-icon {
    width: 22px;
    height: 22px;
    border-radius: var(--r, 4px);
    border: 1px solid var(--border-primary);
    flex-shrink: 0;
}

.roster-planning-recap-class-label {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 600;
}

.roster-planning-recap-class-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 22px;
    text-align: right;
}

.roster-planning-recap-class--empty {
    opacity: 0.45;
}

.roster-planning-recap-class--empty .roster-planning-recap-class-icon {
    filter: grayscale(1);
}

.roster-planning-recap-class--empty .roster-planning-recap-class-label {
    color: var(--text-muted) !important;
}

.roster-planning-slot__inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    min-width: 240px;
}

.roster-planning-container .filter-custom-select--roster-planning-char-select {
    flex: 0 0 200px;
    width: 200px;
}

.roster-planning-container .filter-custom-select--roster-planning-role-select {
    flex: 0 0 120px;
    width: 120px;
}

.roster-planning-container .filter-custom-select__trigger {
    width: 100%;
    justify-content: flex-start;
}

.roster-planning-role-select.is-native-hidden {
    display: none;
}

.roster-planning-container .filter-custom-select__trigger[data-main="1"]::after,
.roster-planning-container .filter-custom-select__option[data-main="1"]::after {
    content: "★";
    color: var(--color-gold);
    font-size: 0.8rem;
    margin-left: 0.25rem;
}

@media (max-width: 980px) {
    .roster-planning-layout {
        flex-direction: column;
    }
    .roster-planning-recap {
        flex-basis: auto;
        width: 100%;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    .roster-planning-recap-section {
        flex: 1 1 220px;
    }
    .roster-planning-table .app-table {
        display: block;
    }
    .roster-planning-table .app-table thead,
    .roster-planning-table .app-table tbody,
    .roster-planning-table .app-table tr,
    .roster-planning-table .app-table th,
    .roster-planning-table .app-table td {
        display: block;
        width: 100%;
    }
    .roster-planning-slot__inner {
        flex-direction: column;
        align-items: stretch;
    }
    .roster-planning-container .filter-custom-select--roster-planning-role-select {
        flex: 1 1 auto;
        width: 100%;
    }
}
