.cal-toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;gap:8px;flex-wrap:wrap}
.view-mode-group{display:flex;gap:4px;background:#f2f2f7;border-radius:10px;padding:3px}
.view-mode-btn{padding:5px 12px;font-size:12px;font-weight:500;border-radius:7px;border:none;background:transparent;cursor:pointer;color:#8e8e93}
.view-mode-btn.active{background:#fff;color:#1c1c1e;font-weight:600}
.cal-nav-row{display:flex;align-items:center;gap:8px}
.cal-nav-btn{width:32px;height:32px;border-radius:50%;border:none;background:#f2f2f7;font-size:16px;cursor:pointer;color:#007aff;display:flex;align-items:center;justify-content:center}
.cal-period-label{font-size:15px;font-weight:600;white-space:nowrap}
.cal-wrap{background:#fff;border-radius:14px;border:.5px solid #e0e0e0;padding:12px;margin-bottom:12px;overflow-x:auto}
.cal-grid{display:grid;grid-template-columns:repeat(7,minmax(40px,1fr));gap:2px;min-width:280px}
.cal-dayname{text-align:center;font-size:10px;color:#8e8e93;padding:3px 0;font-weight:500}
.cal-cell{min-height:80px;border-radius:8px;padding:4px 3px;cursor:pointer;border:1.5px solid transparent;background:#f9f9fb;display:flex;flex-direction:column}
.cal-cell.today{border-color:#007aff;background:#e8f0fe}
.cal-cell.selected{border-color:#ff9500;background:#fff8ee}
.cal-cell.other-month{opacity:.35}
.cal-day-num{font-size:10px;color:#8e8e93;margin-bottom:2px;font-weight:500}
.cal-cell.today .cal-day-num{color:#007aff;font-weight:700}
.chips-list{display:flex;flex-direction:column;gap:1px;overflow:hidden}
.chip{font-size:7.5px;padding:1px 3px;border-radius:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:1.5;font-weight:600;color:#fff;max-width:100%}
.chip-more{font-size:7px;padding:1px 4px;border-radius:3px;display:block;line-height:1.5;font-weight:700;background:#6b7280;color:#fff;max-width:100%;text-align:center}
.day-panel{background:#fff;border-radius:14px;border:2px solid #ff9500;padding:14px;margin-bottom:12px;animation:fadeSlide .18s ease}
@keyframes fadeSlide{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}
.day-panel-header{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:14px}
.day-panel-title{font-size:15px;font-weight:700}
.day-panel-sub{font-size:12px;color:#8e8e93;margin-top:2px}
.day-panel-actions{display:flex;gap:8px;align-items:center;flex-shrink:0;margin-left:8px}
.day-panel-add{font-size:18px;font-weight:400;color:#007aff;border:1.5px solid #007aff;background:transparent;border-radius:50%;width:30px;height:30px;cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1;padding:0;flex-shrink:0}
.day-panel-close{width:28px;height:28px;border-radius:50%;border:none;background:#f2f2f7;font-size:15px;cursor:pointer;color:#8e8e93}
.dpr{display:flex;align-items:stretch;gap:10px;padding:10px 0;border-bottom:.5px solid #f0f0f5;cursor:pointer}
.dpr:last-child{border-bottom:none;padding-bottom:0}
.dpr:first-child{padding-top:0}
.dpr-bar{width:5px;border-radius:3px;flex-shrink:0;min-height:40px}
.dpr-body{flex:1;min-width:0}
.dpr-name{font-size:14px;font-weight:700;margin-bottom:2px}
.dpr-optype{font-size:12px;font-weight:700;margin-bottom:2px}
.dpr-diag{font-size:12px;font-weight:500;margin-bottom:2px}
.dpr-line{font-size:11px;color:#8e8e93;line-height:1.4}
.dpr-right{display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex-shrink:0}
.dpr-meta{font-size:11px;color:#8e8e93;text-align:right}
.day-empty{font-size:13px;color:#8e8e93;text-align:center;padding:8px 0}
.week-wrap{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}
.week-day-card{background:#fff;border-radius:12px;border:.5px solid #e0e0e0;overflow:hidden}
.week-day-card.today-card{border-color:#007aff;border-width:2px}
.week-day-header{display:flex;align-items:center;justify-content:space-between;padding:11px 14px;background:#f9f9fb;border-bottom:.5px solid #e0e0e0;cursor:pointer}
.week-day-card.today-card .week-day-header{background:#e8f0fe}
.week-day-name{font-size:15px;font-weight:700;color:#1c1c1e}
.week-day-card.today-card .week-day-name{color:#007aff}
.week-add-btn{font-size:14px;font-weight:600;color:#007aff;border:none;background:none;cursor:pointer;padding:0;margin-left:8px}
.week-day-body{padding:8px 12px;display:flex;flex-direction:column;gap:6px}
.week-patient-row{display:flex;align-items:flex-start;gap:8px;padding:8px 10px;border-radius:8px;background:#f9f9fb;cursor:pointer}
.wpr-color{width:4px;border-radius:2px;align-self:stretch;min-height:36px;flex-shrink:0}
.wpr-body{flex:1;min-width:0}
.wpr-name{font-size:14px;font-weight:600}
.wpr-optype{font-size:12px;font-weight:700;margin-top:2px}
.wpr-city{font-size:11px;color:#8e8e93;margin-top:1px}
.wpr-diag{font-size:12px;color:#555;margin-top:2px}
.week-empty{font-size:13px;color:#c7c7cc;padding:8px 0;text-align:center}
.archive-card{background:#fff;border-radius:14px;border:1px solid #e0e0e0;border-left:4px solid #c7c7cc;padding:12px 14px;margin-bottom:8px}

/* ── Animations ── */
@keyframes flame-flicker{
  0%,100%{transform:scaleY(1) scaleX(1) rotate(-1deg);opacity:1}
  20%{transform:scaleY(1.1) scaleX(0.92) rotate(1.5deg);opacity:.85}
  40%{transform:scaleY(0.95) scaleX(1.06) rotate(-1deg);opacity:1}
  60%{transform:scaleY(1.08) scaleX(0.94) rotate(1deg);opacity:.9}
  80%{transform:scaleY(0.97) scaleX(1.03) rotate(-0.5deg);opacity:.95}
}
.diff-icon{animation:flame-flicker 0.85s ease-in-out infinite;transform-origin:bottom center;display:inline-block;}

@media(max-width:480px){
  .cal-cell{min-height:62px;padding:2px 1px}
  .cal-day-num{font-size:9px;margin-bottom:1px}
  .chip{font-size:7.5px;padding:1px 3px;line-height:1.5;border-radius:3px}
  .chips-list{gap:1px;max-height:44px}
  .cal-dayname{font-size:9px}
  .cal-grid{gap:1px}
  .cal-wrap{padding:8px 6px}
}

/* ── Better shadows ── */
.cal-wrap{box-shadow:0 1px 8px rgba(0,0,0,.04)}
.week-day-card{box-shadow:0 1px 6px rgba(0,0,0,.04);transition:box-shadow .15s ease}
.week-day-card:hover{box-shadow:0 3px 14px rgba(0,0,0,.08)}

/* ── Hover effects ── */
.week-patient-row{transition:background .15s ease}
.week-patient-row:hover{background:#f2f2f7}
.cancel-notif,.archive-card{transition:box-shadow .15s ease}
.cancel-notif:hover,.archive-card:hover{box-shadow:0 2px 12px rgba(0,0,0,.07)}

/* ── View mode transitions ── */
.view-mode-btn{transition:background .15s ease,color .15s ease}
