.sort-matchings-page .team-selector {
    margin: 20px 0;
    background: var(--color-surface);
    border-radius: 24px;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(76,175,80,0.08);
    transition: border-color var(--motion-fast), box-shadow var(--motion-fast);
    outline: none;
}

.navigation-buttons {
    position: fixed;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 10px;
}

.sort-matchings-page textarea {
    width: 100%;
    height: 200px;
    margin: 10px 0;
}

.container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.match-list,
.calendar {
    width: 100%;
    padding: 10px;
    background: var(--color-surface-muted);
    border-radius: var(--radius-md);
}

.match-list {
    max-height: 300px;
    overflow-y: auto;
}

.match-box,
.match-box-sameweek {
    padding: 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    user-select: none;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.match-box {
    background: var(--color-surface);
}

.match-box-sameweek {
    background: rgb(217, 215, 215);
}

.match-box:hover,
.match-box-sameweek:hover,
.assigned-match:hover,
.past-assigned-match:hover {
    translate: 0 -2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.match-box.dragging,
.match-box-sameweek.dragging,
.assigned-match.dragging,
.past-assigned-match.dragging {
    opacity: 0.5;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

#week-view {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

#week-view-phone {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.day-box {
    min-height: 200px;
    background: var(--color-surface);
    padding: 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.day-box.selected-day {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

.day-name,
.tier-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.day-date {
    color: #888;
    font-size: 0.8em;
    margin-bottom: 10px;
}

.day-matches {
    min-height: 150px;
    padding: 5px;
}

.tier-section {
    margin: 10px 0;
}

.tier-title {
    margin: 5px 0;
}

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding: 5px;
}

.assigned-match,
.past-assigned-match {
    padding: 5px;
    margin: 2px 0;
    border-radius: 3px;
    font-size: 0.9em;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.assigned-match {
    background: #e0e0e0;
}

.past-assigned-match {
    background: #bbbaba;
}

.assigned-match:hover {
    background: #d0d0d0;
}

.past-assigned-match:hover {
    background: #a3a2a2;
}

.sort-matchings-page .action-buttons,
.calendar-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.sort-matchings-page .action-btn {
    padding: 12px 24px;
    color: #fff;
}

.calendar-controls {
    gap: 12px;
    margin: 20px 0;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 12px;
}

.nav-btn-week:hover {
    background: #646464;
}

.input-container {
    background: var(--color-surface);
}

.sort-matchings-page h3 {
    text-align: center;
    font-size: 1.5em;
}

.sort-matchings-page .batch-textarea {
    width: 90%;
    padding: 15px;
    font-size: 14px;
    margin-bottom: 15px;
}

.sort-matchings-page .process-button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 500;
}

.sort-matchings-page .result-item {
    display: flex;
    justify-content: space-between;
}

.copy-button {
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
}

.finished {
    background: #888888;
    color: black;
}

.finishecd:hover {
    background: #777777;
    color: black;
}

.unfinished {
    background: var(--color-warning);
}

.unfinished:hover {
    background: #e08e0b;
}

.locked {
    position: absolute;
    top: 5px;
    left: auto;
    right: 5px;
    color: #555;
}

.phone-only,
.sort-hidden {
    display: none;
}

.popup-overlay-holiday {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: none;
}

.announcement-content {
    width: 90%;
    height: 300px;
    margin-top: 10px;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: var(--radius-md);
    font-family: monospace;
    font-size: 14px;
}

.copy-feedback {
    display: none;
    margin-left: 10px;
    padding: 8px 12px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
}

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

.day-header .day-info {
    display: flex;
    flex-direction: column;
}

.conti-icon {
    height: 22px;
    width: auto;
    margin-left: 8px;
}

.day-box.available {
    background-color: lightgreen;
}

.day-box.unavailable {
    background-color: lightcoral;
}

@media (max-width: 768px) {
    .sort-matchings-page {
        padding: 0;
    }

    .sort-matchings-page .nav-text,
    .sort-matchings-page .phone-hidden {
        display: none;
    }

    .phone-only {
        display: block;
    }

    .calendar {
        padding: 4px;
    }

    .day-box {
        padding: 5px;
    }

    .calendar-nav {
        margin-bottom: 0;
    }

    .input-container {
        border-radius: var(--radius-md);
    }

    .sort-matchings-page h3 {
        font-size: 0.9em;
    }

    .announcement-content {
        height: 150px;
        font-size: 12px;
    }

    .popup-holiday {
        width: min(50%, 300px);
        padding: 20px;
    }
}
