/* Fixed feedback controls shared by every dashboard page. */
body #savebar.savebar {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(880px, calc(100vw - 40px));
  max-width: none;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 20px;
  background: rgba(34, 38, 46, .94);
  border: 1px solid #535b68;
  border-radius: 12px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px #00000050;
  z-index: 100;
}
body #savebar.savebar[hidden], body #toast[hidden] { display: none; }
body #savebar .savebar-message {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: #f3f5f8;
  font-size: 14px;
  line-height: 1.4;
}
body #savebar .savebar-message span {
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffe16b;
  color: #29230e;
  font-weight: 700;
}
body #savebar.savebar > div { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
body #savebar.savebar button {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  transform: none;
  box-shadow: none;
  transition: background .15s, border-color .15s;
}
body #savebar #discard { background: transparent; border: 1px solid transparent; color: #d5dce6; }
body #savebar #discard:hover { background: #353c47; border-color: #535b68; }
body #savebar #save { background: #ffe16b; border: 1px solid #ffe16b; color: #29230e; }
body #savebar #save:hover { background: #ffe57d; border-color: #ffe57d; }
body #savebar button:active { transform: none; }
body #savebar button:disabled { opacity: .6; cursor: wait; }
body #toast {
  position: fixed;
  top: max(24px, env(safe-area-inset-top));
  bottom: auto;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(620px, calc(100vw - 40px));
  box-sizing: border-box;
  padding: 14px 20px;
  text-align: center;
  overflow-wrap: anywhere;
  border: 1px solid #535b68;
  background: rgba(34, 38, 46, .94);
  color: #f3f5f8;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 12px;
  box-shadow: 0 12px 40px #00000050;
  z-index: 200;
}
body:has(#savebar:not([hidden])) main { padding-bottom: 140px; }
@media (max-width: 600px) {
  body #savebar.savebar { bottom: max(16px, env(safe-area-inset-bottom)); width: calc(100vw - 32px); flex-wrap: wrap; gap: 12px; padding: 16px; }
  body #savebar.savebar > div { margin-left: auto; }
  body #savebar .savebar-message { font-size: 13px; }
  body:has(#savebar:not([hidden])) main { padding-bottom: 180px; }
}

#session-timeout { width: min(440px, calc(100vw - 40px)); box-sizing: border-box; padding: 28px; border: 1px solid #535b68; border-radius: 12px; background: #22262e; color: #f3f5f8; box-shadow: 0 12px 40px #00000050; }
#session-timeout::backdrop { background: #080a0cb3; backdrop-filter: blur(6px); }
#session-timeout h2 { margin: 0 0 14px; font-size: 21px; }
#session-timeout p { margin: 0 0 24px; line-height: 1.6; color: #c4ccd8; font-size: 14px; }
#session-timeout button { width: 100%; min-height: 44px; background: #ffe16b; border: 1px solid #ffe16b; color: #29230e; transform: none; }
#session-timeout button:hover { background: #ffe57d; transform: none; }

/* Match notification typography throughout the expiry dialog. */
body #toast, #session-timeout { font-family: inherit; font-size: 12px; line-height: 1.8; }
#session-timeout h2 { font-family: inherit; font-size: 16px; line-height: 1.5; font-weight: 600; }
#session-timeout p { font-family: inherit; font-size: 12px; line-height: 1.8; color: #f3f5f8; }
#session-timeout button { font-family: inherit; font-size: 13px; font-weight: 600; }

/* No divider between page content and the site footer. */
body .workspace > footer { border: 0; box-shadow: none; }
