body {
    background-color: #f5f5f5;
}

.calendar-grid {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.calendar-header {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    background: #e9ecef;
    font-weight: bold;
    text-align: center;
}

.calendar-header > div {
    padding: 10px 5px;
    border-right: 1px solid #dee2e6;
}

.calendar-header > div:last-child {
    border-right: none;
}

.time-column {
    background: #f8f9fa;
}

.day-column {
    min-width: 100px;
}

.day-column.today {
    background: #cfe2ff;
}

.calendar-body {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

.time-row {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    border-bottom: 1px solid #dee2e6;
    min-height: 50px;
}

.time-label {
    padding: 5px;
    font-size: 0.8rem;
    color: #666;
    border-right: 1px solid #dee2e6;
    background: #f8f9fa;
}

.time-slot {
    border-right: 1px solid #dee2e6;
    padding: 2px;
    cursor: pointer;
    position: relative;
    min-height: 50px;
}

.time-slot:last-child {
    border-right: none;
}

.time-slot:hover {
    background: #e3f2fd;
}

.time-slot.today {
    background: #f0f7ff;
}

.appointment {
    background: #4caf50;
    color: white;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: absolute;
    left: 2px;
    right: 2px;
    z-index: 10;
    box-sizing: border-box;
}

.appointment:hover {
    background: #388e3c;
}

.appointment.checked-in {
    background: #2196f3;
}

.appointment.completed {
    background: #9e9e9e;
}

.appointment.cancelled {
    background: #f44336;
    text-decoration: line-through;
}

.view-section {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.patient-item {
    cursor: pointer;
}

.patient-item:hover {
    background: #f8f9fa;
}

.patient-item.active {
    background: #0d6efd;
    color: white;
}

.note-card {
    background: #fff9c4;
    border-left: 4px solid #ffc107;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.note-card h6 {
    margin-bottom: 5px;
}

.note-card small {
    color: #666;
}

.message-item {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.message-item.inbound {
    border-left: 4px solid #4caf50;
}

.message-item.outbound {
    border-left: 4px solid #2196f3;
}

.message-item pre {
    max-height: 150px;
    overflow-y: auto;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

#hl7-message {
    font-size: 0.8rem;
}

.navbar-brand i {
    margin-right: 5px;
}
