* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f9f9f7;
    color: #1a1a18;
}

.wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

/* Header */

.header {
    padding: 1rem 0 0.5rem;
}

.header h1 {
    font-size: 22px;
    font-weight: 500;
}

.header p {
    font-size: 13px;
    color: #73726c;
    margin-top: 2px;
}

/* Stats */

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 0.75rem 0;
}

.stat-card {
    background: #f1efe8;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.stat-num {
    font-size: 22px;
    font-weight: 500;
}

.stat-lbl {
    font-size: 11px;
    color: #73726c;
}

/* Controls */

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0.5rem 0;
    align-items: center;
}

.filter-btn {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #c2c0b6;
    background: transparent;
    color: #73726c;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.filter-btn:hover {
    background: #f1efe8;
}

.view-toggle {
    display: flex;
    border: 1px solid #c2c0b6;
    border-radius: 8px;
    overflow: hidden;
    margin-left: auto;
}

.view-btn {
    font-size: 12px;
    padding: 5px 14px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #73726c;
    font-family: inherit;
    transition: all 0.15s;
}

.view-btn.active {
    background: #f1efe8;
    color: #1a1a18;
    font-weight: 500;
}

/* Legend */

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0.5rem 0 0.75rem;
}

.leg-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #5f5e5a;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 4px;
    transition: background 0.1s;
}

.leg-item:hover {
    background: #f1efe8;
}

.leg-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Calendar view */

.month-label {
    font-size: 11px;
    font-weight: 500;
    color: #73726c;
    margin: 14px 0 6px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.week-grid {
    display: grid;
    grid-template-columns: 44px repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 2px;
}

.day-head {
    font-size: 11px;
    color: #b4b2a9;
    text-align: center;
    padding: 4px 0;
}

.day-cell {
    min-height: 72px;
    border: 0.5px solid #d3d1c7;
    border-radius: 6px;
    padding: 4px;
    background: #fff;
}

.day-cell.faded {
    background: #f9f9f7;
    opacity: 0.5;
}

.day-num {
    font-size: 11px;
    color: #b4b2a9;
    margin-bottom: 3px;
}

.event-chip {
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 4px;
    margin-bottom: 2px;
    cursor: pointer;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.15s;
}

.event-chip:hover {
    opacity: 0.75;
}

.more-chip {
    font-size: 10px;
    color: #b4b2a9;
    padding: 1px 4px;
    cursor: pointer;
}

/* List view */

.list-wrap {
    padding: 0.5rem 0 1rem;
}

.list-date {
    font-size: 12px;
    font-weight: 500;
    color: #73726c;
    margin: 14px 0 5px;
    padding-bottom: 4px;
    border-bottom: 0.5px solid #d3d1c7;
}

.list-event {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.1s;
    margin-bottom: 2px;
}

.list-event:hover {
    background: #f1efe8;
}

.list-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}

.list-info {
    flex: 1;
    min-width: 0;
}

.list-team {
    font-size: 12px;
    font-weight: 500;
}

.list-opp {
    font-size: 12px;
    color: #73726c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-meta {
    font-size: 11px;
    color: #b4b2a9;
    margin-top: 1px;
}

.list-ha {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
    margin-top: 2px;
    white-space: nowrap;
}

/* Modal */

.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 1rem;
}

.modal {
    background: #fff;
    border-radius: 12px;
    border: 0.5px solid #c2c0b6;
    max-width: 420px;
    width: 100%;
    padding: 1.25rem;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 20px;
    cursor: pointer;
    color: #b4b2a9;
    background: none;
    border: none;
    line-height: 1;
}

.modal-close:hover {
    color: #1a1a18;
}

.modal-team {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.modal-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 14px;
}

.modal-row {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: #5f5e5a;
    margin-bottom: 7px;
    align-items: flex-start;
}

.modal-label {
    color: #b4b2a9;
    min-width: 68px;
    flex-shrink: 0;
}
