/* Patient Sync — 클린 클리닉 블루 디자인 */
:root {
  --brand: #2563eb;
  --line: rgba(37, 99, 235, .12);
}
body { min-height: 100dvh; letter-spacing: -0.011em; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(30, 58, 138, .04), 0 4px 16px rgba(30, 58, 138, .05);
  transition: box-shadow .25s ease, transform .25s ease;
}
a.card:hover, .card.clickable:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(30,58,138,.06), 0 10px 28px rgba(30,58,138,.10); }

.btn { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1.05rem; border-radius: .7rem; font-weight: 600; font-size: .875rem; transition: all .18s ease; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-ghost { background: #fff; border-color: rgba(37,99,235,.25); color: var(--brand); }
.btn-ghost:hover { background: #eff6ff; }
.btn-danger { background: #fff; border-color: rgba(220,38,38,.3); color: #dc2626; }
.btn-danger:hover { background: #fef2f2; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: .3rem .7rem; font-size: .8rem; border-radius: .55rem; }

.input { width: 100%; padding: .6rem .85rem; border: 1px solid rgba(100,116,139,.3); border-radius: .7rem; font-size: .9rem; background: #fff; }
.input:focus { outline: 2px solid rgba(37,99,235,.35); border-color: var(--brand); }
textarea.input { min-height: 8rem; resize: vertical; }

.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .6rem; border-radius: 99px; font-size: .72rem; font-weight: 600; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-amber { background: #fef3c7; color: #b45309; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-gray { background: #f1f5f9; color: #475569; }
.badge-purple { background: #f3e8ff; color: #7e22ce; }

/* 이월 항목 강조 */
.carryover-section { border: 1.5px solid #f59e0b55; background: linear-gradient(180deg, #fffbeb, #fff); }
.carry-chip { background: #fef3c7; color: #92400e; font-weight: 700; }

#toast-root { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: .5rem; }
.toast { background: #1e293b; color: #fff; padding: .7rem 1.2rem; border-radius: .8rem; font-size: .875rem; box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: toastIn .25s ease; max-width: 90vw; }
.toast.error { background: #b91c1c; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

.skel { background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 50%, #eef2f7 75%); background-size: 200% 100%; animation: skel 1.2s infinite; border-radius: .6rem; }
@keyframes skel { to { background-position: -200% 0; } }

.nav-item { display: flex; align-items: center; gap: .6rem; padding: .55rem .9rem; border-radius: .7rem; font-size: .9rem; font-weight: 500; color: #475569; }
.nav-item:hover { background: #eff6ff; color: var(--brand); }
.nav-item.active { background: var(--brand); color: #fff; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal { background: #fff; border-radius: 1.1rem; max-width: 34rem; width: 100%; max-height: 88vh; overflow-y: auto; box-shadow: 0 24px 64px rgba(0,0,0,.28); }

.cal-cell { min-height: 5.2rem; border: 1px solid #eef2f7; padding: .3rem; font-size: .75rem; }
.cal-event { background: #dbeafe; color: #1d4ed8; border-radius: .35rem; padding: .1rem .35rem; margin-top: .15rem; font-size: .68rem; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.cal-event.done { background: #dcfce7; color: #15803d; }

@media (max-width: 768px) {
  .cal-cell { min-height: 3.4rem; }
}
