/* Staff app shell matched to Carepatron's (settings/shell captures): an
   espresso sidebar with icon navigation, a top bar with New and the practice
   switcher, coral accents, Inter type, and a bottom tab bar on phones.
   Loaded last: the tokens below re-theme every module's components.
   Owner: foundation (integrator). Modules ask for shell hooks instead of
   editing this file. */
@font-face{font-family:"Inter";src:url("/fonts/InterVariable.woff2") format("woff2");font-weight:100 900;font-display:swap}

:root{
  --accent:#ef8b67;--accent-dark:#dc7552;--accent-soft:#fdf0ea;--accent-line:#f6c9b6;
  --teal:var(--accent);--teal-dark:var(--accent-dark);--teal-soft:var(--accent-soft);
  --ink:#1c1b3a;--muted:#667085;--line:#e4e7ec;--soft:#f5f6f8;
  --shell-dark:#2b201d;--shell-mid:#3c2923;--shell-light:#5a3a2f;
  --topbar-height:60px;
  font-family:"Inter","Avenir Next",Avenir,"Segoe UI",sans-serif;
}
body{background:#fff}
button,a{-webkit-tap-highlight-color:rgba(239,139,103,.18)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline-color:rgba(239,139,103,.45)}
a{color:var(--accent-dark)}

/* ---------------------------------------------------------------- layout */
.app-shell{display:grid;grid-template-columns:calc(var(--wm-width) + 16px) minmax(0,1fr);min-height:100vh;padding-top:0;background:#fff}
.workspace{grid-column:2;min-width:0;display:flex;flex-direction:column}
main{width:100%;max-width:none;margin:0;padding:8px 32px 56px}

/* The sidebar is the shared staff menu: /workspace-menu.css. */
.nav-icon{flex:none;width:22px;height:22px;fill:currentColor}

/* ---------------------------------------------------------------- top bar */
.topbar{position:sticky;top:0;z-index:15;display:flex;justify-content:flex-end;align-items:center;gap:14px;height:var(--topbar-height);padding:8px 32px 0;background:#fff}
.topbar-menu{position:relative}
.topbar-new{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 14px 0 10px;border:0;border-radius:6px;background:var(--accent);color:#fff;font-size:.9375rem;font-weight:600;cursor:pointer}
.topbar-new:hover{background:var(--accent-dark)}
.button-icon{width:20px;height:20px;fill:currentColor;flex:none}
.practice-switcher{display:inline-flex;align-items:center;gap:8px;height:38px;padding:0 10px 0 4px;border:0;border-radius:22px;background:var(--soft);color:var(--ink);font-size:.9375rem;font-weight:600;cursor:pointer}
.practice-avatar{width:32px;height:32px;border-radius:50%;object-fit:cover;background:#fff}
.menu{position:absolute;top:calc(100% + 6px);left:0;z-index:40;display:grid;min-width:200px;padding:6px;border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:0 12px 32px rgba(16,24,40,.14)}
.menu-right{left:auto;right:0}
.menu>a,.menu>button{display:flex;align-items:center;gap:12px;min-height:40px;padding:8px 12px;border:0;border-radius:6px;background:none;color:var(--ink);font-size:.9375rem;text-align:left;text-decoration:none;cursor:pointer}
.menu>a:hover,.menu>button:hover{background:var(--soft)}
.menu-label{margin:4px 12px 8px;color:var(--muted);font-size:.8125rem}

/* ---------------------------------------------------------- page headers */
.page-header{align-items:center;margin:8px 0 24px}
.page-title{display:flex;align-items:center;gap:16px}
.title-tile{display:grid;place-items:center;width:40px;height:40px;border-radius:8px;background:var(--soft);color:#475467}
.title-icon{width:24px;height:24px;fill:currentColor}
.page-header h1{font-size:1.75rem;font-weight:600;letter-spacing:-.01em;color:var(--ink)}
.primary,.secondary{gap:8px;border-radius:6px;font-weight:600}
.primary .button-icon,.secondary .button-icon{width:18px;height:18px}
.secondary{border-color:#d0d5dd;color:var(--accent-dark)}
.secondary:hover{border-color:var(--accent-line);background:var(--accent-soft)}

/* ------------------------------------------------------------ team view */
.team-table{width:100%;border-collapse:collapse}
.team-table th{padding:14px 16px;background:var(--soft);color:var(--ink);font-weight:500;text-align:left}
.team-table td{padding:14px 16px;border-top:1px solid var(--line)}

/* ---------------------------------------------- phones: bottom tab bar */
.tabbar,.sheet{display:none}
@media(max-width:800px){
  .app-shell{display:block;padding:0 0 calc(72px + env(safe-area-inset-bottom))}
  .topbar{display:none}
  main{padding:12px 16px 32px}
  .tabbar{position:fixed;left:0;right:0;bottom:0;z-index:30;display:grid;grid-template-columns:repeat(5,1fr);align-items:end;height:calc(72px + env(safe-area-inset-bottom));padding:0 4px env(safe-area-inset-bottom);background:#fff;box-shadow:0 -1px 0 var(--line)}
  .tabbar>a,.tabbar>button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;height:64px;padding:0;border:0;background:none;color:#475467;font-size:.8125rem;text-decoration:none;cursor:pointer}
  .tabbar>a[aria-current="page"]{color:var(--accent)}
  .tabbar .nav-icon{width:26px;height:26px}
  .tabbar-new{align-self:start;justify-self:center;width:56px!important;height:56px!important;margin-top:-14px;border-radius:50%!important;background:var(--accent)!important;color:#fff!important;box-shadow:0 6px 16px rgba(239,139,103,.35)}
  .sheet{position:fixed;left:8px;right:8px;top:auto;bottom:calc(80px + env(safe-area-inset-bottom));min-width:0}
  .sheet:not([hidden]){display:grid}
  .sheet .nav-icon{width:22px;height:22px;fill:#475467}
  .page-header{margin-top:4px}
}

/* Fluid gutters preserve the workspace on laptops and tablets. */
main{padding-inline:clamp(16px,2.3vw,32px)}
.topbar{padding-inline:clamp(16px,2.3vw,32px)}
.page-header{flex-wrap:wrap;gap:12px}
.page-title{min-width:0}
.dialog-shell :is(header,footer){flex-wrap:wrap}
@media(max-width:800px){
  main{padding-inline:16px}
  .toast{bottom:calc(84px + env(safe-area-inset-bottom));max-width:calc(100vw - 20px)}
}
@media(max-width:460px){main{padding-inline:12px}.page-title{gap:10px}}
