/* Appointment workbench geometry follows the approved reference; tokens are unchanged. */
.ap-shell{position:relative;min-width:0;min-height:560px;font-size:var(--type-small);display:flex;flex-direction:column;gap:var(--space-4)}
.ap-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2)}
.cp-section .ap-search{position:relative;display:flex;align-items:center;flex:1 1 200px;gap:0}
.ap-search>.cp-icon{position:absolute;left:var(--space-3);width:16px;height:16px;pointer-events:none}
.cp-section .ap-search input[type=search]{padding-left:var(--space-10);background:var(--bg);min-height:40px}
.ap-toolbar>.button,.ap-toolbar-right>.button{min-height:40px;white-space:nowrap;gap:var(--space-2)}
.ap-toolbar .cp-icon{width:16px;height:16px}
.ap-toolbar-right{display:flex;align-items:center;gap:var(--space-2);flex-wrap:wrap;margin-left:auto}
.cp-section .ap-preset select,.cp-section .ap-range select{min-height:40px;background:var(--bg)}
.ap-preset{max-width:180px;flex:0 1 144px}
.ap-range{max-width:190px}
.ap-column-count{color:var(--muted);font-weight:400;font-size:12px}
.ap-chips{margin:0}
.ap-filter-preview>header{display:flex;justify-content:space-between;align-items:center;gap:var(--space-2);flex-wrap:wrap;margin-bottom:var(--space-4)}
.ap-filter-preview>header h3{margin:0}
.ap-scroll{min-width:0;scrollbar-gutter:stable;scrollbar-color:var(--muted) var(--surface)}
.cp-section .ap-scroll table{min-width:720px}
.cp-section .ap-scroll-horizontal table,.cp-section .ap-scroll-both table{min-width:1100px}
.ap-scroll-vertical,.ap-scroll-both{max-height:320px;overflow:auto}
.cp-section .ap-scroll-vertical table{min-width:640px;width:100%}
.ap-scroll thead th{position:sticky;top:0;z-index:1;background:var(--surface);box-shadow:0 1px var(--border)}
.ap-scroll tbody th{font-weight:600}
#tables .ap-scroll tbody :is(th,td,.cp-badge,.ap-row-view){font-size:var(--type-body);line-height:1.5}
#tables .ap-scroll tbody .cp-badge{font-size:var(--type-small)}
.ap-scroll caption{background:var(--bg)}
.cp-section .ap-scroll th button{display:inline-flex;align-items:center;gap:var(--space-1)}
.ap-scroll .cp-badge .cp-icon{width:14px;height:14px}
.ap-row-view{font-size:var(--type-small);font-weight:500;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);min-height:32px;padding:var(--space-1) var(--space-3)}
.ap-row-view:hover{background:var(--surface-2);color:var(--action)}
.ap-pagination{display:flex;gap:var(--space-3);align-items:center;flex-wrap:wrap;padding-top:var(--space-2);font-size:12px;color:var(--muted);margin-top:auto}
.ap-result-count{margin-right:auto;display:grid;gap:var(--space-1)}
.ap-result-count>span{color:var(--action)}
.cp-section .ap-pagination label{display:flex;align-items:center;gap:var(--space-2);font-size:12px;font-weight:400}
.cp-section .ap-pagination select{width:64px;min-height:32px;padding:var(--space-1) var(--space-2)}
.ap-pagination nav{display:flex;align-items:center;gap:var(--space-1);flex-wrap:wrap}
.ap-page-icon,.ap-page-number{width:32px;min-width:32px;height:32px;min-height:32px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg);font-size:var(--type-small)}
.ap-page-icon .cp-icon{width:16px;height:16px}
.ap-page-number[aria-current=page]{background:var(--surface-2);border-color:var(--action);color:var(--action);font-weight:700}
.ap-page-position{white-space:nowrap}
/* One modal panel design is shared by Data table and Filter. */
.ap-overlay{position:absolute;inset:0;z-index:6;display:flex;justify-content:flex-end;align-items:stretch;background:color-mix(in srgb,var(--text) 18%,transparent);border-radius:var(--radius-md);overflow:hidden}
.ap-drawer{display:flex;flex-direction:column;align-self:stretch;width:min(510px,100%);height:100%;max-height:none;min-height:0;background:var(--bg);color:var(--text);border:1px solid var(--border);border-radius:0;box-shadow:var(--shadow-md)}
.ap-drawer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-3);padding:var(--space-5);border-bottom:1px solid var(--border);flex:none}
.cp-section .ap-drawer-head h3{font-size:var(--type-h4);margin:0 0 var(--space-1)}
.cp-section .ap-drawer-head p{font-size:var(--type-small);font-weight:400;line-height:1.5;color:var(--muted);margin:0}
.ap-drawer-head .ap-page-icon{border:0;flex:none}
.ap-drawer-body{display:flex;flex-direction:column;gap:var(--space-4);overflow-y:auto;min-height:0;flex:1;padding:var(--space-5);scrollbar-width:thin;scrollbar-color:var(--muted) var(--surface)}
.cp-section .ap-drawer-body select,.cp-section .ap-drawer-body input:not([type=checkbox]){background:var(--surface);border-color:var(--border);border-radius:var(--radius-sm)}
.ap-date-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-3)}
.cp-section .ap-date-fields input{max-width:100%;padding-inline:var(--space-2);font-size:12px}
.ap-drawer-footer{display:flex;align-items:center;justify-content:space-between;gap:var(--space-2);flex-wrap:wrap;flex:none;padding:var(--space-4);background:var(--bg);border-top:1px solid var(--border)}
.ap-drawer-footer>div{display:flex;gap:var(--space-2);margin-left:auto}
.ap-drawer-footer .button{white-space:nowrap}
.cp-section .ap-column-option{display:flex;align-items:center;gap:var(--space-3);min-height:40px;font-weight:400}
.ap-column-option>small{margin-left:auto;color:var(--muted);font-size:12px}
.cp-section .ap-error{font-size:var(--type-small);margin:0;color:var(--text);border-left:2px solid var(--color-error);padding-left:var(--space-2)}
.ap-error:empty{display:none}
.ap-details{margin:0}
.ap-details>div{display:grid;gap:var(--space-1);padding-bottom:var(--space-3);border-bottom:1px solid var(--border)}
.ap-details dt{font-size:12px;color:var(--muted)}
.ap-details dd{margin:0;font-size:var(--type-small);font-weight:500}
.ap-sort-popup{position:fixed;inset:auto;margin:0;padding:var(--space-1);width:200px;border:1px solid var(--border);color:var(--text);background:var(--bg);box-shadow:var(--shadow-md)}
.ap-sort-popup button{display:flex;gap:var(--space-2);align-items:center;width:100%;min-height:40px;padding:var(--space-2);background:none;border:0;border-radius:var(--radius-sm);font-size:var(--type-small);text-align:left}
.ap-sort-popup button:hover,.ap-sort-popup button[aria-checked=true]{background:var(--surface-2);color:var(--action)}
.ap-sort-popup button:focus-visible{outline:2px solid var(--focus);outline-offset:0}
.ap-sort-popup .cp-icon{width:16px;height:16px}
.ap-mobile-sheet{width:100%}
@media(max-width:767px){
  .ap-shell{min-height:560px}
  .ap-toolbar-right{margin-left:0;width:100%}
  .ap-toolbar .ap-search{flex-basis:100%}
  .ap-toolbar .ap-range{flex:1 1 100%;max-width:none;min-width:0}
  .ap-toolbar-right .button{flex:1}
  .ap-preset{flex:1;max-width:none;min-width:0}
  .ap-pagination{gap:var(--space-3) var(--space-2)}
  .ap-result-count{flex:1 1 100%}
  .ap-pagination nav{flex-basis:100%}
  .ap-drawer-head,.ap-drawer-body{padding:var(--space-4)}
  .ap-drawer-footer{padding:var(--space-3);gap:var(--space-1)}
  .ap-drawer-footer>div{gap:var(--space-1)}
  .ap-drawer-footer .button{font-size:12px;padding-inline:var(--space-2)}
  .ap-date-fields{grid-template-columns:1fr}
}
