/* Appointment controls use their own narrow column; list and details keep the height. */
#patient-calendar.pc-sidebar-layout{max-width:none}
#patient-calendar.pc-sidebar-layout>h1{margin:0 0 9px;font-size:1.4rem;line-height:1.25}
#patient-calendar.pc-sidebar-layout .pc-split-workspace{display:grid;grid-template-columns:164px minmax(0,2.05fr) minmax(300px,1fr);grid-template-rows:auto auto minmax(0,1fr);grid-template-areas:"menu actions actions" "menu controls controls" "menu appointments details";gap:12px;min-height:0;overflow:hidden}
#patient-calendar.pc-sidebar-layout .pc-list-surface,#patient-calendar.pc-sidebar-layout .pc-list-surface>.pc-appointments{display:contents;container-type:normal}
#patient-calendar.pc-sidebar-layout .pc-appointments-menu{grid-area:menu;display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;border:1px solid #c9dacf;border-radius:9px;background:#f8fbf9;align-self:stretch}
#patient-calendar.pc-sidebar-layout .pc-appointments-menu-heading{display:none;align-items:center;justify-content:space-between;gap:8px;min-height:43px;padding:11px 10px;border-bottom:1px solid #d8e5dc;color:#315c42;font-size:.78rem;flex:none}
#patient-calendar.pc-sidebar-layout [data-pc-menu-toggle]{display:none;margin:0}
#patient-calendar.pc-sidebar-layout .pc-appointments-menu-body{display:flex;flex-direction:column;gap:11px;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:10px 8px;flex:1 1 auto}
#patient-calendar.pc-sidebar-layout .pc-appointments-menu .pc-page-toolbar{display:grid;gap:6px;margin:0;grid-area:auto}
#patient-calendar.pc-sidebar-layout .pc-appointments-menu .pc-page-toolbar>button{box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:100%;height:34px;min-height:34px;margin:0;padding:6px 7px;font-size:.75rem;line-height:1.3;white-space:normal}
#patient-calendar.pc-sidebar-layout .pc-filter-count{display:inline-flex;align-items:center;justify-content:center;flex:none;min-width:20px;min-height:19px;padding:1px 5px;border-radius:12px;background:#e5eee8;color:#3f6651;font-size:.69rem;font-weight:700;line-height:1.2;font-variant-numeric:tabular-nums}
#patient-calendar.pc-sidebar-layout .pc-list-filters>button.active .pc-filter-count{background:#fff;color:#216749}
#patient-calendar.pc-sidebar-layout .pc-visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;margin:-1px!important;padding:0!important;border:0}
#patient-calendar.pc-sidebar-layout .pc-menu-section{margin:0;min-width:0}
#patient-calendar.pc-sidebar-layout .pc-menu-section>h3{font-size:.7rem;letter-spacing:.025em;text-transform:uppercase;margin:0 0 5px;color:#6c8071;font-weight:700}
#patient-calendar.pc-sidebar-layout .pc-appointments-menu .pc-list-filters{display:grid;gap:4px;padding:0;margin:0;justify-content:stretch;grid-area:auto}
#patient-calendar.pc-sidebar-layout .pc-appointments-menu .pc-list-filters>button{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;min-height:28px;margin:0;padding:5px 8px;font-size:.75rem;line-height:1.25;text-align:left}
#patient-calendar.pc-sidebar-layout .pc-appointments-menu .pn-summary{display:flex;justify-content:space-between;width:100%;min-height:31px;margin:7px 0 0;padding:5px 8px;font-size:.75rem;white-space:normal}
#patient-calendar.pc-sidebar-layout .pc-appointments-menu .pn-summary .pn-summary-label{min-width:0}
#patient-calendar.pc-sidebar-layout .pc-appointments-menu .pn-summary .pn-summary-state{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#patient-calendar.pc-sidebar-layout .pc-list-headerbar .pc-list-heading{display:block;min-width:0}
#patient-calendar.pc-sidebar-layout .pc-list-headerbar .pc-list-controls{display:grid;grid-template-columns:minmax(140px,1.35fr) minmax(104px,.8fr) minmax(122px,.9fr) minmax(245px,1.2fr);align-items:center;gap:8px;min-width:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;grid-area:auto}
#patient-calendar.pc-sidebar-layout .pc-list-headerbar .pc-list-controls>label,#patient-calendar.pc-sidebar-layout .pc-list-headerbar .pc-list-controls .pc-list-search{display:grid;flex:none;min-width:0;width:100%;margin:0;gap:3px;font-size:.68rem;line-height:1.25}
#patient-calendar.pc-sidebar-layout .pc-list-headerbar .pc-list-controls :is(input[type=search],select){box-sizing:border-box;display:block;width:100%;min-width:0;min-height:30px;margin:0;padding:4px 6px;font-size:.72rem;line-height:1.3}
#patient-calendar.pc-sidebar-layout .pc-list-headerbar .pc-bulk-controls{display:flex;align-items:center;justify-content:space-between;align-self:end;gap:8px;min-width:0;min-height:30px}
#patient-calendar.pc-sidebar-layout .pc-list-headerbar .pc-bulk-controls>.pc-select-all{display:flex;align-items:center;align-self:center;flex:0 1 auto;min-width:0;min-height:30px;margin:0;gap:6px;font-size:.68rem;white-space:normal;line-height:1.3}
#patient-calendar.pc-sidebar-layout .pc-list-headerbar .pc-bulk-remove{box-sizing:border-box;flex:0 0 auto;width:auto;min-height:30px;margin:0;padding:5px 8px;font-size:.71rem;white-space:nowrap;line-height:1.3}
#patient-calendar.pc-sidebar-layout .pc-list-headerbar .pc-select-all input{flex:none;width:14px;height:14px;margin:0}
#patient-calendar.pc-sidebar-layout .pc-selection-actions{grid-area:actions;margin:0;min-width:0}
#patient-calendar.pc-sidebar-layout .pc-appointments-main{grid-area:appointments;display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;align-self:stretch}
#patient-calendar.pc-sidebar-layout .pc-list-headerbar{grid-area:controls;display:grid;grid-template-columns:minmax(0,1fr);align-items:center;gap:0;min-width:0;min-height:57px;margin:0;padding:8px 10px;border:1px solid #d2dfd7;border-radius:8px;background:#f8fbf9}
#patient-calendar.pc-sidebar-layout .pc-list-headerbar h2{font-size:.85rem;line-height:1.35;margin:0}
#patient-calendar.pc-sidebar-layout .pc-appointments-main>.pc-list-alerts{grid-area:auto;flex:none;min-width:0}
#patient-calendar.pc-sidebar-layout .pc-appointments-main>.pc-appointment-list{grid-area:auto;display:block;flex:1 1 auto;min-height:0;overflow-y:auto;align-self:stretch;margin:0;container-type:inline-size}
#patient-calendar.pc-sidebar-layout .pc-sidepanel{grid-area:details;align-self:stretch;min-height:0;margin:0}
#patient-calendar.pc-sidebar-layout .pc-sidepanel-heading{min-height:43px;padding:9px 11px;align-items:center}
#patient-calendar.pc-sidebar-layout .pc-sidepanel-heading h2{font-size:.85rem;line-height:1.35}

/* Compact cards lead with appointment type; all text matches the 14px detail body. */
#patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-compact-card{padding:12px 13px;margin-bottom:9px;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;font-size:14px;line-height:1.4;color:#243d33}
#patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-compact-card :is(strong,span,time,small){font-family:inherit;font-size:inherit}
#patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-card-main{display:grid;grid-template-columns:18px minmax(0,1fr) minmax(0,auto);align-items:start;gap:4px 9px}
#patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-card-main>input{grid-column:1;grid-row:1;margin-top:3px}
#patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-card-date{grid-column:2;grid-row:2;min-width:0;font-size:inherit;font-weight:650;line-height:1.4;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:break-word}
#patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-card-date-value{font-weight:700;color:#203d30;font-variant-numeric:tabular-nums}
#patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-card-doctor{grid-column:2;grid-row:3;min-width:0;font-size:inherit;font-weight:600;line-height:1.4;color:#354f42;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:break-word}
#patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-card-label{font-size:inherit;font-weight:400;line-height:inherit;color:#617368}
#patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-card-main .pc-status[data-pc-tone]{grid-column:3;grid-row:1/span 3;align-self:start;max-width:190px;padding:5px 8px;font-size:inherit;font-weight:600;line-height:1.3;overflow-wrap:break-word}
#patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-status-next{font-size:inherit;font-weight:650;line-height:1.3}
#patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-card-summary{font-size:inherit;display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:4px;margin:6px 0 0 27px;min-width:0}
#patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-card-summary>span{display:block;min-width:0;max-width:none;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:break-word}
#patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-card-type{grid-column:2;grid-row:1;justify-self:start;width:auto;max-width:none;padding:3px 7px;font-size:inherit;font-weight:600;line-height:1.25}
#patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-card-subject{grid-column:1;grid-row:2;margin:0;font-size:inherit;line-height:1.4;color:#3f584a;order:initial}
#patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-card-subject>strong{font-weight:600;color:#526b5d}
#patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-card-timing-summary{grid-column:1;grid-row:3;justify-self:start;width:auto;margin:0;font-size:inherit;font-weight:400;line-height:1.4;color:#617368;font-variant-numeric:tabular-nums}
#patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-waiting-state{margin:6px 0 0 27px;padding:6px 8px;font-size:inherit;line-height:1.4}
#patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-waiting-state small{font-size:inherit;line-height:1.4}
@container(max-width:480px){
 #patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-card-main{grid-template-columns:18px minmax(0,1fr)}
 #patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-card-date{grid-column:2;grid-row:2}
 #patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-card-doctor{grid-column:2;grid-row:3}
 #patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-card-main .pc-status[data-pc-tone]{grid-column:2;grid-row:4;justify-self:start;max-width:100%}
}
@media(min-width:1700px){#patient-calendar.pc-sidebar-layout .pc-split-workspace{grid-template-columns:176px minmax(0,2.05fr) minmax(390px,1fr)}}
@media(max-width:1300px){
 #patient-calendar.pc-sidebar-layout .pc-split-workspace{grid-template-columns:minmax(0,1.7fr) minmax(300px,1fr);grid-template-rows:auto auto auto minmax(0,1fr);grid-template-areas:"menu menu" "actions actions" "controls controls" "appointments details";gap:9px 10px}
 #patient-calendar.pc-sidebar-layout .pc-appointments-menu{overflow:hidden;max-height:48dvh}
 #patient-calendar.pc-sidebar-layout .pc-appointments-menu-heading{display:flex;min-height:34px;padding:0;border:0}
 #patient-calendar.pc-sidebar-layout .pc-appointments-menu-heading>strong{display:none}
 #patient-calendar.pc-sidebar-layout [data-pc-menu-toggle]{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:34px;width:100%;padding:7px 10px;font-size:.77rem;background:#f4f9f6;border:0;border-radius:8px;color:#315b40}
 #patient-calendar.pc-sidebar-layout .pc-menu-toggle-icon{font-size:19px;line-height:1}
 #patient-calendar.pc-sidebar-layout:not(.pc-menu-expanded) .pc-appointments-menu-body{display:none}
 #patient-calendar.pc-sidebar-layout.pc-menu-expanded .pc-appointments-menu-body{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:10px;overflow-y:auto;padding:10px;border-top:1px solid #d8e5dc}
 #patient-calendar.pc-sidebar-layout .pc-appointments-menu .pc-page-toolbar{grid-column:1/-1;grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:1100px){#patient-calendar.pc-sidebar-layout .pc-list-headerbar{grid-template-columns:minmax(0,1fr);gap:6px}#patient-calendar.pc-sidebar-layout .pc-list-headerbar .pc-list-controls{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){
 #patient-calendar.pc-sidebar-layout .pc-split-workspace{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto minmax(180px,1fr) minmax(170px,.9fr);grid-template-areas:"menu" "actions" "controls" "appointments" "details";gap:8px;overflow:hidden}
 #patient-calendar.pc-sidebar-layout .pc-split-workspace:has(.pc-sidepanel[data-pane-mode="empty"]){grid-template-rows:auto auto auto minmax(0,1fr) 0;row-gap:8px}
 #patient-calendar.pc-sidebar-layout .pc-sidepanel[data-pane-mode="empty"]{display:none}
 #patient-calendar.pc-sidebar-layout .pc-list-headerbar{grid-template-columns:minmax(0,1fr);gap:6px;min-height:34px;padding:7px 8px}
 #patient-calendar.pc-sidebar-layout .pc-list-headerbar h2{font-size:.8rem}
 #patient-calendar.pc-sidebar-layout.pc-menu-expanded .pc-appointments-menu-body{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){#patient-calendar.pc-sidebar-layout .pc-list-headerbar .pc-list-controls{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}#patient-calendar.pc-sidebar-layout .pc-list-headerbar .pc-list-search{grid-column:1/-1}#patient-calendar.pc-sidebar-layout .pc-list-headerbar .pc-bulk-controls{grid-column:1/-1;justify-content:flex-start;gap:12px}}
@media print{
 #patient-calendar.pc-sidebar-layout .pc-appointments-menu{display:none!important}
 #patient-calendar.pc-sidebar-layout .pc-split-workspace,#patient-calendar.pc-sidebar-layout .pc-appointments-main,#patient-calendar.pc-sidebar-layout .pc-appointments-main>.pc-appointment-list,#patient-calendar.pc-sidebar-layout .pc-sidepanel{display:block;overflow:visible;height:auto;max-height:none}
}

/* Touch controls and narrow cards: keep actions above the list. */
@media screen and (max-width:760px){
 #patient-calendar.pc-sidebar-layout .pc-split-workspace{overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain}
}
@media screen and (max-width:760px){
 #patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-card-main{grid-template-columns:18px minmax(0,1fr)}
 #patient-calendar.pc-sidebar-layout.pc-appointments-mode .pc-appointment-list .pc-card-main .pc-status[data-pc-tone]{grid-column:2;grid-row:4;max-width:100%}
 #patient-calendar.pc-sidebar-layout .pc-list-headerbar .pc-list-controls :is(input[type=search],select){min-height:44px;font-size:16px}
 #patient-calendar.pc-sidebar-layout .pc-selection-buttons>button,#patient-calendar.pc-sidebar-layout .pc-selection-buttons .pc-disabled-action>button{min-height:44px;font-size:14px}
 #patient-calendar.pc-sidebar-layout .pc-appointments-menu .pc-list-filters>button,#patient-calendar.pc-sidebar-layout .pc-appointments-menu .pc-page-toolbar>button,#patient-calendar.pc-sidebar-layout [data-pc-menu-toggle]{min-height:44px;height:auto;font-size:14px}
 #patient-calendar.pc-sidebar-layout .pc-list-headerbar .pc-bulk-remove,#patient-calendar.pc-sidebar-layout .pc-list-headerbar .pc-bulk-controls>.pc-select-all{min-height:44px;font-size:13px}
 #patient-calendar.pc-sidebar-layout .pc-sidepanel :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:16px}
 #patient-calendar.pc-sidebar-layout .pc-sidepanel-heading button{min-height:44px}
}
