.user-tools {
    display: none;
    margin: 14px 0 10px;
}

.user-tools.show {
    display: block;
}

.user-tool-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 12px;
    margin: 10px 0;
    box-shadow: 0 6px 22px rgba(0,0,0,.04);
}

.user-tool-title {
    font-weight: 900;
    margin-bottom: 8px;
    color: #1d1d1f;
}

.user-filter-row,
.recent-surnames-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.user-filter-button,
.recent-surname-button {
    border: 1px solid #dbe7ff;
    background: #f4f7ff;
    color: var(--accent);
    border-radius: 999px;
    padding: 8px 11px;
    font-weight: 800;
    cursor: pointer;
    font-size: 14px;
}

.user-filter-button.active {
    background: #111827;
    color: #ffffff;
    border-color: #111827;
}

.recent-surname-button {
    background: #ffffff;
}

.rep-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    background: #f3f6ff;
    color: #2f6fed;
    border: 1px solid #dbe7ff;
    vertical-align: baseline;
}

.rep-type-badge.lesson {
    background: #ecfdf3;
    color: #067647;
    border-color: #abefc6;
}

.rep-type-badge.rehearsal {
    background: #f3f6ff;
    color: #2f6fed;
    border-color: #dbe7ff;
}

.rep-type-badge.stage {
    background: #fff7ed;
    color: #b54708;
    border-color: #fed7aa;
}

.rep-type-badge.run {
    background: #fdf2fa;
    color: #c11574;
    border-color: #fcceee;
}

.card.user-hidden-by-filter {
    display: none !important;
}

.day.user-hidden-by-filter {
    display: none !important;
}

.user-filter-empty {
    display: none;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    border-radius: 14px;
    padding: 12px;
    margin: 12px 0;
    font-weight: 700;
}

.user-filter-empty.show {
    display: block;
}

@media (max-width: 640px) {
    .user-tool-card {
        padding: 10px;
        border-radius: 16px;
    }

    .user-filter-button,
    .recent-surname-button {
        padding: 7px 9px;
        font-size: 13px;
    }

    .rep-type-badge {
        font-size: 12px;
        padding: 2px 7px;
    }
}

/* Компактная строка: время и место рядом */
.card-main .time {
    display: inline;
    margin-bottom: 0;
}

.card-main .place {
    display: inline;
    margin-bottom: 0;
}

.card-main .place::before {
    content: " · ";
    color: var(--muted);
}

.card-main .title {
    margin-top: 6px;
}

.better-empty-state {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
    margin: 14px 0;
    box-shadow: 0 6px 22px rgba(0,0,0,.045);
}

.better-empty-title {
    font-size: 18px;
    font-weight: 900;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.better-empty-text {
    color: var(--muted);
    line-height: 1.35;
    margin-bottom: 12px;
}

.better-empty-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 10px 0;
}

.better-empty-example-title {
    width: 100%;
    font-weight: 800;
    color: #1d1d1f;
}

.better-empty-chip {
    background: #f4f7ff;
    color: var(--accent);
    border: 1px solid #dbe7ff;
    border-radius: 999px;
    padding: 7px 10px;
    font-weight: 800;
    font-size: 14px;
}

.better-empty-note {
    color: #6b7280;
    font-size: 14px;
    margin-top: 12px;
}

@media (max-width: 640px) {
    .better-empty-state {
        padding: 14px;
        border-radius: 16px;
    }

    .better-empty-title {
        font-size: 17px;
    }
}

.inline-empty-message {
    margin: 8px 0 2px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-weight: 900;
    line-height: 1.25;
}

.schedule-diff-card {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 18px;
    padding: 14px;
    margin: 12px 0;
    box-shadow: 0 6px 22px rgba(0,0,0,.045);
}

.schedule-diff-head {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.schedule-diff-heading {
    font-weight: 900;
    color: #9a3412;
    font-size: 17px;
}

.schedule-diff-subtitle {
    color: #9a3412;
    opacity: .85;
    margin-top: 3px;
}

.schedule-diff-close {
    border: 1px solid #fed7aa;
    background: #ffffff;
    color: #9a3412;
    border-radius: 999px;
    padding: 7px 11px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

.schedule-diff-list {
    display: grid;
    gap: 8px;
}

.schedule-diff-item {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    padding: 9px;
}

.schedule-diff-plus {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #fb923c;
    color: white;
    font-weight: 900;
    display: grid;
    place-items: center;
}

.schedule-diff-title {
    font-weight: 900;
    color: #1d1d1f;
}

.schedule-diff-meta {
    color: #6b7280;
    font-size: 14px;
    margin-top: 2px;
}

.schedule-diff-more {
    color: #9a3412;
    font-weight: 900;
    padding: 4px 2px;
}

@media (max-width: 640px) {
    .schedule-diff-head {
        flex-direction: column;
    }

    .schedule-diff-close {
        width: 100%;
    }
}

.rep-type-badge.performance {
    background: #fdf4ff;
    color: #a21caf;
    border-color: #f5d0fe;
}

.performance-schedule-card .performance-conductor {
    color: #6b7280;
    font-weight: 700;
}

.performance-schedule-card .performance-cast-title {
    font-weight: 900;
    margin: 4px 0 10px;
}

.performance-schedule-card .performance-cast-row {
    display: grid;
    grid-template-columns: minmax(120px, 34%) 1fr;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin: 7px 0;
    background: #fff;
}

.performance-schedule-card .performance-cast-row-me {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.18);
}

.performance-schedule-card .performance-me-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .performance-schedule-card .performance-cast-row {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}

/* Спектакли в общем расписании */
.performance-title-name {
    font-weight: 900;
    font-style: italic;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Компактный состав спектакля */
.performance-cast-title {
    margin: 8px 0 6px !important;
    font-size: 15px;
}

.performance-cast-row {
    grid-template-columns: minmax(90px, 30%) 1fr !important;
    gap: 8px !important;
    padding: 5px 8px !important;
    margin: 4px 0 !important;
    border-radius: 9px !important;
    font-size: 14px;
    line-height: 1.2;
}

.performance-cast-row strong {
    font-size: 14px;
}

.performance-cast-row span {
    font-size: 14px;
}

.performance-me-badge {
    padding: 1px 7px !important;
    font-size: 11px !important;
}

@media (max-width: 640px) {
    .performance-cast-row {
        grid-template-columns: minmax(86px, 34%) 1fr !important;
        padding: 5px 7px !important;
        font-size: 13px;
    }

    .performance-cast-row strong,
    .performance-cast-row span {
        font-size: 13px;
    }
}

/* Название спектакля после плашки */
.card[data-rep-type="performance"] .title {
    font-weight: 900;
    font-style: italic;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
}

.card[data-rep-type="performance"] .title .rep-type-badge {
    font-style: normal;
    text-decoration: none;
}
