:root {
    --primary: #4f46e5;
    --success: #10b981;
    --danger: #ef4444;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --border: #e2e8f0;
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, sans-serif; 
    background-color: var(--bg); 
    color: var(--text); 
    margin: 0; 
    padding: 1rem; 
}

.dashboard-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 1.5rem; 
    max-width: 1200px; 
    margin: 0 auto; 
}

@media (min-width: 768px) {
    .dashboard-grid { grid-template-columns: 1fr 1fr; }
    .full-width { grid-column: span 2; }
    .tab-btn { flex: none; }
}

h2 { 
    color: var(--primary); 
    margin-top: 0; 
    font-weight: 700; 
    font-size: 1.5rem; 
}

.card { 
    background: var(--card); 
    padding: 1.25rem; 
    border-radius: 16px; 
    border: 1px solid var(--border); 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); 
    position: relative; 
}

.quick-med-btn { 
    background: var(--success); 
    color: white; 
    width: 100%; 
    padding: 1rem; 
    border-radius: 12px; 
    font-size: 1.1rem; 
    font-weight: bold; 
    margin-bottom: 1.5rem; 
    border: none; 
    cursor: pointer; 
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2); 
    text-align: center; 
    display: block; 
    box-sizing: border-box; 
}

.quick-med-btn:active { 
    transform: scale(0.98); 
    background: #059669; 
}

.form-group { 
    margin-bottom: 1rem; 
}

label { 
    display: block; 
    margin-bottom: 0.25rem; 
    font-weight: 500; 
    font-size: 0.85rem; 
    color: #64748b; 
}

input, select { 
    width: 100%; 
    padding: 0.65rem; 
    border: 1px solid var(--border); 
    border-radius: 8px; 
    box-sizing: border-box; 
    font-size: 0.95rem; 
}

.checkbox-group { 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
    margin: 1rem 0; 
}

.med-time-input { 
    display: none; 
}

.tab-menu { 
    display: flex; 
    gap: 0.5rem; 
    margin-bottom: 1rem; 
    border-bottom: 2px solid var(--border); 
    padding-bottom: 0.5rem; 
}

.tab-btn { 
    padding: 0.5rem 1rem; 
    border: none; 
    background: transparent; 
    font-size: 0.95rem; 
    font-weight: 600; 
    color: #64748b; 
    cursor: pointer; 
    border-radius: 6px; 
    flex: 1; 
    text-align: center; 
}

.tab-btn.active { 
    color: var(--primary); 
    background: #eef2ff; 
}

.tab-content { 
    display: none; 
}

.tab-content.active { 
    display: block; 
}

button { 
    padding: 0.75rem; 
    border: none; 
    border-radius: 8px; 
    font-size: 1rem; 
    font-weight: 600; 
    cursor: pointer; 
}

.btn-primary { 
    background: var(--primary); 
    color: white; 
    width: 100%; 
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 0.5rem; 
    font-size: 0.85rem; 
}

th, td { 
    padding: 0.65rem 0.5rem; 
    text-align: center; 
    border-bottom: 1px solid var(--border); 
}

th { 
    background-color: #f1f5f9; 
    color: #475569; 
}

.badge { 
    background: #e0f2fe; 
    color: #0369a1; 
    padding: 0.25rem 0.4rem; 
    border-radius: 6px; 
    font-size: 0.75rem; 
    font-weight: 600; 
}

.btn-action-group { 
    display: flex; 
    gap: 0.25rem; 
    justify-content: center; 
}

.btn-edit { 
    background: #f1f5f9; 
    color: #475569; 
    padding: 0.25rem 0.4rem; 
    font-size: 0.75rem; 
    border-radius: 4px; 
}

.btn-delete { 
    background: #fee2e2; 
    color: var(--danger); 
    padding: 0.25rem 0.4rem; 
    font-size: 0.75rem; 
    border-radius: 4px; 
}

#calendar { 
    background: white; 
    padding: 0.5rem; 
    border-radius: 12px; 
}

.fc-event { 
    border: none !important; 
    padding: 1px 3px !important; 
    margin: 1px !important; 
    font-size: 0.75rem !important; 
    border-radius: 4px !important; 
}

.custom-modal { 
    display:none; 
    position: fixed; 
    top:0; 
    left:0; 
    width:100%; 
    height:100%; 
    background:rgba(0,0,0,0.5); 
    z-index:9999; 
    justify-content:center; 
    align-items:center; 
    padding: 1rem; 
    box-sizing: border-box; 
}

.modal-body { 
    background: white; 
    width: 100%; 
    max-width: 400px; 
    padding: 1.5rem; 
    border-radius: 20px; 
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); 
}

.detail-item { 
    padding: 0.65rem; 
    border-bottom: 1px solid #f1f5f9; 
    display: flex; 
    justify-content: space-between; 
    font-size: 0.9rem; 
}

/* dashboard.css 맨 밑에 추가 (선택 사항) */
.bp-chart-card {
    background: #1e1e2f !important; /* 차트 카드 배경을 세련된 다크톤으로 변경 */
    border: 1px solid #2b2b40 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}

#bpChartContainer {
    margin-top: 1rem;
    width: 100%;
}
