/* -------------------- CALENDAR STYLES -------------------- */
.calendar-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface);
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.calendar-controls-left {
    display: flex;
    align-items: center;
}

.calendar-filter-label {
    margin-right: 8px;
}

.calendar-filter-select {
    width: 250px;
}

.calendar-nav-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.calendar-month-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 160px;
    text-align: center;
    margin: 0;
}

.calendar-grid-container {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-surface);
}

.calendar-header-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--bg-surface-hover);
    border-bottom: 1px solid var(--border-light);
}

.calendar-day-header {
    padding: 12px;
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 14px;
    border-right: 1px solid var(--border-light);
}
.calendar-day-header:last-child {
    border-right: none;
}

.calendar-grid-body {
    display: flex;
    flex-direction: column;
}

.calendar-grid-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid var(--border-light);
}
.calendar-grid-row:last-child {
    border-bottom: none;
}

.calendar-day-cell {
    min-height: 120px;
    padding: 8px;
    border-right: 1px solid var(--border-light);
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.calendar-day-cell:last-child {
    border-right: none;
}
.calendar-day-cell.empty {
    background: #f9fafb;
}
.calendar-day-cell.today {
    background: var(--brand-light);
}

.day-number {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.calendar-day-cell.today .day-number {
    color: var(--brand-primary);
}

.visit-badge {
    position: relative;
    font-size: 11px;
    padding: 4px 6px;
    background: var(--brand-primary);
    color: white;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.visit-badge:hover {
    filter: brightness(1.1);
    padding-right: 20px;
}
.visit-badge::after {
    content: "✎";
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s;
}
.visit-badge:hover::after {
    opacity: 1;
}

/* Card body flush (no padding) for calendar grid */
.card-body-flush {
    padding: 0;
}
