/* Faithful adaptation of the approved V2 reference to the existing Jinja shell.
   Navigation URLs, permissions, data and write actions remain server-controlled. */
:root {--workspace-navy:var(--color-surface-dark);--workspace-ink:var(--color-text);--workspace-muted:#8290a4;
  --workspace-border:var(--color-border);--workspace-blue:var(--color-primary);--workspace-shadow:var(--color-card-shadow)}
.workspace-sr-only {position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.app-shell--authenticated {padding-left:244px;background:var(--color-page);}
.app-sidebar--authenticated {width:244px;gap:0;padding:27px 15px 16px;overflow-y:auto;
  background:linear-gradient(155deg,#1b3151 0%,#142239 68%,#111e32 100%);color:#c1cee4}
.app-sidebar--authenticated .app-brand {gap:12px;margin-bottom:17px;padding:0 12px;min-height:48px}
.app-sidebar--authenticated .app-brand-symbol {width:38px;height:38px;flex-basis:38px;border-radius:13px;background:linear-gradient(135deg,#7791ff,#435ccf);box-shadow:0 9px 25px #111a3780}
.app-sidebar--authenticated .workspace-brand {min-width:0}
.app-sidebar--authenticated .app-brand-label {margin:0;font-size:15px;line-height:1.13;color:#fff;letter-spacing:-.045em}
.app-sidebar--authenticated .app-brand-label span {color:#fff;font-size:15px;display:inline;margin:0}
.workspace-brand small {display:block;font-size:10px;color:#9eb2d2;letter-spacing:.11em;font-weight:700;margin-top:5px}
.app-sidebar--authenticated .app-sidebar-toggle {margin:0 8px 18px;width:calc(100% - 16px);min-height:36px;border-color:#a3beed25;color:#aec0dc}
.app-sidebar--authenticated .app-primary-nav {gap:4px;display:flex;flex-direction:column;align-items:stretch;overflow:visible}
.app-sidebar--authenticated .workspace-nav-section {display:block;margin:13px 0 8px;padding:0 13px;
  font-size:10px;font-weight:800;letter-spacing:.13em;text-transform:uppercase;color:#839ab9;white-space:nowrap}
.app-sidebar--authenticated .workspace-nav-section:not(:first-child) {margin-top:22px}
.app-sidebar--authenticated .app-nav-item {font-size:13px;font-weight:610;color:#b6c8e1;border:0;padding:11px 13px;min-height:44px;gap:12px;border-radius:12px;margin:0;transition:background .2s ease,color .2s ease}
.app-sidebar--authenticated .app-nav-item .ui-icon {color:#90a6c5}
.app-sidebar--authenticated .app-nav-item:is(.active,[aria-current="page"]) {color:#fff;background:linear-gradient(92deg,#4765bc4d,#728be219);box-shadow:inset 3px 0 #8195ff;font-weight:730}
.app-sidebar--authenticated .app-nav-item:is(.active,[aria-current="page"]) .ui-icon {color:#a1b4ff}
.app-sidebar--authenticated .app-nav-item:hover {background:#ffffff12;color:#fff}
.workspace-sidebar-promo {margin:auto 6px 20px;border-radius:15px;padding:15px;background:#ffffff0d;border:1px solid #a3beed25}
.workspace-sidebar-promo span {font-size:10px;font-weight:800;color:#a5c1ff;letter-spacing:.13em}
.workspace-sidebar-promo strong {display:block;color:#fff;margin:8px 0 6px;font-size:13px}
.workspace-sidebar-promo p {font-size:11px;line-height:1.65;color:#91a8c8;margin:0}
.app-sidebar--authenticated .app-sidebar-footer {margin:0;padding:13px 7px 0}
.app-sidebar--authenticated .app-account-avatar {border-radius:11px;width:34px;height:34px;flex-basis:34px}
.app-sidebar--authenticated .nav-logout-button {padding-left:8px;min-height:36px;font-size:12px}
.app-shell--authenticated > main {padding:0 0 62px;max-width:none}
.workspace-topbar {height:77px;display:flex;align-items:center;justify-content:space-between;gap:16px;background:#fff;border-bottom:1px solid #e8eef6;padding:0 clamp(20px,3.3vw,55px)}
.workspace-topbar-left,.workspace-topbar-user,.workspace-breadcrumb {display:flex;gap:10px;align-items:center}
.workspace-breadcrumb {font-size:12px;color:#93a0b2}.workspace-breadcrumb strong {color:#334865;font-weight:750}
.workspace-topbar-user {font-size:12px;color:#536885;font-weight:700}
.workspace-online-dot {height:8px;width:8px;background:#6385ed;border-radius:50%;box-shadow:0 0 0 4px #6385ed19}
.workspace-topbar-avatar {width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#e8eefe;color:#5062b1;font-size:12px;font-weight:800}
.k-management-shell {padding:31px clamp(18px,3.3vw,55px) 0;max-width:1770px;margin:auto}
.k-management-shell .k-management-topbar {display:none} /* Shared topbar above replaces the duplicate breadcrumb */
.app-shell--authenticated > main > :not(.workspace-topbar):not(.k-management-shell) {margin-left:clamp(18px,3.3vw,55px);margin-right:clamp(18px,3.3vw,55px)}
.app-shell--authenticated > main > .workspace-topbar + :not(.k-management-shell) {margin-top:30px}
/* Calendar already has narrow page padding; do not add the generic workspace gutters. */
.app-shell--authenticated > main:has(.calendar-ai-layout) > :is(.calendar-page-heading, .calendar-ai-layout) {margin-left:0;margin-right:0;}
/* The calendar navigation card shares the same full-width workspace exception. */
.app-shell--authenticated > main:has(.calendar-ai-layout) > .calendar-navigation-card {margin-left:0;margin-right:0;}
.workspace-mobile-menu {display:none;place-items:center;width:38px;height:38px;flex:none;border:1px solid #e2e8f4;background:#fff;border-radius:10px;color:#405873;font-size:24px}
.workspace-mobile-menu::before {content:"☰";line-height:1}
.workspace-mobile-menu .ui-icon {display:none}
.workspace-nav-backdrop[hidden] {display:none!important}
@media(min-width:1151px) {
  .app-shell--authenticated.app-shell--sidebar-collapsed,html.app-shell--sidebar-collapsed .app-shell--authenticated {padding-left:76px}
  .app-shell--sidebar-collapsed .app-sidebar--authenticated {width:76px;gap:17px;padding:25px 9px}
  .app-shell--sidebar-collapsed .workspace-brand,.app-shell--sidebar-collapsed .workspace-nav-section,.app-shell--sidebar-collapsed .workspace-sidebar-promo {display:none}
  .app-shell--sidebar-collapsed .app-sidebar-toggle {width:48px;margin:-6px 0 0}
  .app-shell--sidebar-collapsed .app-nav-item {width:48px;height:46px;min-height:46px;padding:11px}
}
@media(max-width:1150px) {
  .app-shell--authenticated {padding-left:0}
  .app-sidebar--authenticated {position:relative;width:100%;height:auto;max-height:none;min-height:0;padding:12px 16px;gap:10px}
  .app-sidebar--authenticated .app-primary-nav {display:flex;flex-direction:row;overflow-x:auto;gap:4px}
  .app-sidebar--authenticated .workspace-nav-section,.workspace-sidebar-promo {display:none}
  .app-sidebar--authenticated .app-brand {margin-bottom:0;padding:0}
  .app-sidebar--authenticated .app-sidebar-footer {margin-left:auto;padding:0}
  .app-shell--authenticated > main {padding:0 0 48px}
}
@media(max-width:1000px) {
  html.workspace-js-nav .app-sidebar--authenticated {position:fixed;left:0;top:0;bottom:0;z-index:1002;width:245px;max-height:100dvh;height:100dvh;display:flex;flex-direction:column;
    padding:27px 15px 16px;gap:0;overflow-y:auto;transform:translateX(-103%);transition:transform .24s cubic-bezier(.2,.75,.25,1);box-shadow:20px 0 55px #1a32522a}
  html.workspace-js-nav .app-sidebar--authenticated.workspace-sidebar-open {transform:translateX(0)}
  html.workspace-js-nav .app-sidebar--authenticated .app-primary-nav {flex-direction:column;overflow:visible;gap:4px}
  html.workspace-js-nav .app-sidebar--authenticated .workspace-nav-section,html.workspace-js-nav .app-sidebar--authenticated .workspace-sidebar-promo {display:block}
  html.workspace-js-nav .app-sidebar--authenticated .app-brand {margin-bottom:25px;padding:0 12px}
  html.workspace-js-nav .app-sidebar--authenticated .app-sidebar-footer {display:block;margin-top:auto;padding:14px 7px 0;border-top:1px solid #ffffff17}
  html.workspace-js-nav .app-sidebar--authenticated .app-account-identity {display:flex}
  html.workspace-js-nav .app-sidebar--authenticated .nav-logout-form {width:100%}
  html.workspace-js-nav .app-sidebar--authenticated .app-nav-item {width:100%;min-width:0;min-height:44px}
  html.workspace-js-nav .workspace-mobile-menu {display:grid}
  .workspace-nav-backdrop {position:fixed;z-index:1001;inset:0;background:#101b3066;border:0;cursor:pointer}
  body.workspace-drawer-visible {overflow:hidden}
  .workspace-topbar {height:69px;padding:0 24px}
}
@media(max-width:650px) {
  .workspace-topbar {padding:0 16px}.workspace-topbar-user span:not(.workspace-topbar-avatar) {display:none}
  .k-management-shell {padding:19px 14px 0}
}
@media(prefers-reduced-motion:reduce){.app-sidebar--authenticated {transition:none}}
