/* Shared workspace shell; page-specific content keeps its existing styles. */
.udan-workspace #layout-menu {
    display: flex;
    flex-direction: column;
    height: auto !important;
    max-height: 100vh;
    max-height: 100dvh;
    flex: 0 0 auto !important;
    align-self: flex-start;
    overflow: visible;
}
.udan-workspace #layout-menu > .udan-brand { flex: 0 0 auto; }
/* The legacy dark-theme scroll shadow overlaps the logo with native scrolling. */
.udan-workspace #layout-menu > .menu-inner-shadow {
    display: none !important;
    background:none !important;
    box-shadow: none !important;
}
.udan-workspace #layout-menu > .menu-inner {
    flex: 0 1 auto;
    min-height: 0;
    height: auto !important;
    max-height: calc(100vh - 80px);
    max-height: calc(100dvh - 80px);
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
    scrollbar-color: #c2c8d5 transparent;
    touch-action: pan-y;
}
.udan-workspace #layout-menu > .menu-inner > .menu-item { flex-shrink: 0; }
.udan-workspace #layout-menu > .menu-inner::-webkit-scrollbar { width: 6px; }
.udan-workspace #layout-menu > .menu-inner::-webkit-scrollbar-thumb { background:var(--udn-surface-2,#c2c8d5); border-radius: 6px; }
.udan-workspace .modal:not(.modal-right) .modal-dialog {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(760px, 100vw);
    max-width: 760px !important;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0 !important;
    transform: translateX(100%);
    transition: transform .25s ease;
}
.udan-workspace .modal.show:not(.modal-right) .modal-dialog { transform: translateX(0); }
.udan-workspace .modal:not(.modal-right) .modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border:0;
    border-radius: 0;
    box-shadow: -12px 0 40px #20304a1a;
}
.udan-workspace .modal:not(.modal-right) .modal-content > form { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; overflow: hidden; }
.udan-workspace .modal:not(.modal-right) .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
@media (prefers-reduced-motion: reduce) {
    .udan-workspace .modal:not(.modal-right) .modal-dialog { transition: none; }
}
/* width intentionally not set here: udaan-design-system.css (section 15) now
   owns both the expanded and collapsed width — see that file for why. */
.udan-workspace #layout-menu { background:var(--udn-surface,#fff) !important; border-right:1px solid var(--udn-line,#e5e9f1); box-shadow: 8px 0 28px rgba(27, 38, 57, .025); }
.udan-workspace .udan-brand img { width: 124px; max-width: 100%; height: auto; }
.udan-workspace .udan-sidebar-logout-item form { margin: 0; }
.udan-workspace .udan-sidebar-logout { display: flex; align-items: center; width: 100%; min-height: 42px; padding: 8px 14px; border:0; background:transparent; text-align: left; cursor: pointer; }
.udan-workspace .udan-sidebar-logout:hover { background:var(--udn-surface,#fff1f0); color:var(--udn-brand-text,#d94841) !important; }
.udan-workspace .udan-mobile-menu-trigger { display: none; }
.udan-workspace #layout-navbar { position:fixed!important;z-index:1040;top:6px;right:12px;min-height:0!important;border:0;box-shadow:none;background:transparent!important; }
.udan-workspace #layout-navbar > .container-xxl { max-width: none; padding-left: 24px; padding-right: 24px; }
.udan-workspace #layout-navbar.layout-navbar { width:max-content!important;max-width:calc(100% - 24px)!important;min-height:44px!important;height:44px;margin:0!important;padding:0!important;border:0;border-radius:0;background:transparent!important; }
.udan-workspace #layout-navbar .navbar-nav-right { width: auto; flex: 0 0 auto; }
.udan-workspace #layout-navbar .navbar-nav { min-height:44px;padding:0 2px;border:1px solid var(--udn-line,#e5eaf2);border-radius:10px;background:var(--udn-surface,#fff);box-shadow:0 3px 12px rgba(35,48,75,.06); }
.udan-workspace #layout-navbar .navbar-dropdown > a.nav-link { display: flex; align-items: center; justify-content: center; min-width: 46px; height: 42px; padding: 3px; border-radius: 9px; }
.udan-workspace #layout-navbar .navbar-dropdown > a.nav-link:after { display: none; }
.udan-workspace #layout-navbar .navbar-dropdown .avatar { display: grid; width: 34px; height: 34px; place-items: center; overflow: hidden; border:2px solid var(--udn-line,#eeedfc); border-radius: 50%; background:var(--udn-surface,#eeedfc); }
.udan-workspace #layout-navbar .navbar-dropdown .avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.udan-workspace #layout-navbar .navbar-dropdown .avatar .w-px-40 { width: 100% !important; height: 100% !important; }
.udan-workspace #layout-navbar .navbar-dropdown .dropdown-menu { min-width: 220px; margin-top: 8px; padding: 7px; border:1px solid var(--udn-line,#e3e8ef); border-radius: 12px; box-shadow: 0 12px 32px rgba(27, 38, 57, .10); }
.udan-workspace #layout-navbar .navbar-dropdown .dropdown-item { border-radius: 8px; font-size: 13px; }
.udan-workspace #layout-navbar .navbar-dropdown .dropdown-item:active { background:var(--udn-surface,#eeedfc); color:var(--udn-brand-text,#5b54d6); }
.udan-workspace #layout-navbar .udan-account-copy { align-items: flex-end; flex-direction: column; gap: 1px; margin-right: 9px; line-height: 1.2; }
.udan-workspace #layout-navbar .udan-account-copy strong { max-width: 150px; overflow: hidden; color:var(--udn-brand-text,#263653); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.udan-workspace #layout-navbar .udan-account-copy small { max-width: 150px; overflow: hidden; color:var(--udn-muted,#8290a6); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.udan-workspace #layout-navbar .dropdown-style-switcher .nav-link { padding: 8px; }
.udan-workspace .udan-page-heading { font-size: 16px; font-weight: 600; color:var(--udn-ink,#2b3b52); white-space: nowrap; }
.udan-workspace .udan-menu-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border:0; border-radius: 8px; background:var(--udn-surface,#f3f5fa); color:var(--udn-muted,#526078); font-size: 24px; cursor: pointer; }
.udan-workspace .udan-menu-button:focus-visible, .udan-workspace .menu-link:focus-visible { outline:2px solid #696cff; outline-offset: 2px; }
@media (max-width: 1199.98px) {
    .udan-workspace #layout-navbar > .container-xxl { padding-left: 16px; padding-right: 16px; }
    .udan-workspace #layout-navbar.layout-navbar { margin-right: 10px !important; }
    .udan-workspace .udan-mobile-menu-trigger { position: fixed; z-index: 1080; top: 12px; left: 12px; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border:1px solid var(--udn-line,#e4e8f0); border-radius: 10px; background:var(--udn-surface,#fff); color:var(--udn-muted,#526078); box-shadow: 0 3px 12px rgba(35, 48, 75, .12); font-size: 23px; cursor: pointer; }
}

/* The sidebar's visual layer -- items, submenus, headers, the active and
   open states, the collapse toggle -- is section 17 of
   udaan-design-system.css, which loads after this file. It used to be
   spread across both, each overriding the other by id or !important, and
   that is what made an open section and its selected child both look
   selected. What stays here is the shell: the sidebar's own box, its
   internal scroll, and the floating navbar. */
