/* Shared quick access rail across every workspace screen. */
.workspace {
  grid-template-columns: minmax(0, 1fr) 286px !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
}
.workspace > .topbar { grid-column: 1 / -1; grid-row: 1; }
.workspace > #main { grid-column: 1; grid-row: 2; min-width: 0; }
.workspace > .quick-access-panel {
  grid-column: 2;
  grid-row: 2;
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 22px 18px 30px;
  overflow-x: hidden;
  overflow-y: auto;
  border-left: 0 !important;
  box-shadow: none !important;
  background: #09090b;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.16) transparent;
}
.workspace > #main { width: 100%; }
#main > .screen { max-width: 1680px !important; }
.screen[data-screen="home"] .home-dashboard-grid { display: block !important; }
.screen[data-screen="home"] .home-main-column { width: 100%; min-width: 0; }

.quick-access-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid var(--blocky-line, rgba(255,255,255,.13));
  border-radius: 2px;
  color: #dedbe7;
  background: #101014;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.quick-access-toggle:hover,.quick-access-toggle[aria-expanded="true"] { color: #fff; border-color: rgba(169,154,255,.52); background: #17151f; }
.quick-access-toggle .ui-icon { width: 16px; height: 16px; color: #b9aaff; }
.quick-access-toggle kbd { padding-left: 7px; color: #928ca3; font: inherit; font-size: 10px; white-space: nowrap; }
.quick-access-panel .home-right-panel-head { align-items: center; padding-bottom: 14px; }
.quick-access-panel .home-right-panel-head h2 { font-size: 16px; }
.quick-access-panel .home-panel-manage { padding: 7px 9px; border: 1px solid var(--blocky-line); color: #c2b5ff; }
.home-panel-store-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 5px; border-bottom: 1px solid var(--work-line, rgba(255,255,255,.11)); }
.home-panel-store-row .home-panel-store { border: 0; min-width: 0; padding: 12px 0; }
.home-panel-store-mark { border: 0 !important; background: transparent !important; }
.home-panel-store-pin {
  padding: 5px 6px;
  border: 1px solid transparent;
  color: #92909b;
  background: transparent;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
.home-panel-store-pin:hover,.home-panel-store-pin.is-pinned { color: #c7bbff; border-color: rgba(169,154,255,.3); }
.quick-pinned-section { margin-top: 25px; }
.quick-access-panel .quick-pinned-section { margin-top: 0; }
.quick-pinned-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--work-line, rgba(255,255,255,.11)); }
.quick-pinned-heading h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.025em; }
.quick-add-button { padding: 5px 9px; border: 1px solid var(--blocky-line); color: #e5e2ed; background: #101014; font: inherit; font-size: 11px; cursor: pointer; }
.quick-add-button:hover { color: #fff; border-color: rgba(169,154,255,.55); }
.quick-pinned-list { display: grid; }
.quick-pinned-row { display: grid; grid-template-columns: minmax(0,1fr) 28px; align-items: center; gap: 4px; min-height: 54px; border-bottom: 1px solid var(--work-line, rgba(255,255,255,.11)); }
.quick-pinned-open { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 0; border: 0; color: #e7e5ec; background: transparent; text-align: left; cursor: pointer; }
.quick-pinned-open:hover { color: #c9bdff; }
.quick-pinned-open > i { display: grid; place-items: center; width: 18px; color: #b9aaff; }
.quick-pinned-open .ui-icon { width: 16px; height: 16px; }
.quick-pinned-open > span { display: grid; min-width: 0; gap: 3px; }
.quick-pinned-open strong,.quick-pinned-open small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-pinned-open strong { font-size: 12px; font-weight: 550; }
.quick-pinned-open small { color: var(--work-muted, #9a98a3); font-size: 10px; }
.quick-unpin-button { width: 26px; height: 26px; border: 1px solid transparent; color: #85828e; background: transparent; font-size: 17px; cursor: pointer; }
.quick-unpin-button:hover { color: #fff; border-color: var(--blocky-line); }
.quick-pinned-empty { margin: 0; padding: 14px 0; color: var(--work-muted, #9a98a3); font-size: 11px; line-height: 1.5; }
.quick-access-panel .home-panel-actions { margin-top: 25px; }
.quick-access-panel .home-panel-actions h3 { margin-bottom: 8px; }

.quick-access-scrim[hidden] { display: none !important; }
.quick-access-dialog {
  -webkit-appearance: none;
  appearance: none;
  width: min(480px, calc(100vw - 28px));
  max-height: min(78dvh, 720px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 0 !important;
  color: #f3f1f7;
  background: #101014;
  box-shadow: 0 28px 90px rgba(0,0,0,.62);
}
.quick-access-dialog::backdrop { background: rgba(0,0,0,.68); }
.quick-access-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 16px; border-bottom: 1px solid var(--work-line, rgba(255,255,255,.11)); }
.quick-access-dialog-head h2 { margin: 0; font-size: 19px; letter-spacing: -.035em; }
.quick-access-dialog-head p { margin: 5px 0 0; color: var(--work-muted, #9a98a3); font-size: 12px; }
.quick-access-dialog-head > button { display:grid; place-items:center; width: 30px; height: 30px; padding:0; border:0; border-radius:0; color: #d5d2dd; background: transparent; font-size: 20px; cursor: pointer; }
.quick-access-dialog-head > button:hover { color:#fff; background:rgba(255,255,255,.07); }
.quick-access-choices { max-height: calc(min(78dvh, 720px) - 82px); padding: 4px 22px 20px; overflow: auto; }
.quick-choice-group { padding-top: 15px; }
.quick-choice-group h3 { margin: 0 0 7px; color: var(--work-muted, #9a98a3); font-size: 10px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.quick-choice { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 7px 9px; border: 0; border-top: 1px solid rgba(255,255,255,.07); color: #e7e5ec; background: transparent; text-align: left; cursor: pointer; }
.quick-choice:hover:not(:disabled) { background: rgba(255,255,255,.045); }
.quick-choice > i { display: grid; place-items: center; width: 18px; color: #b9aaff; }
.quick-choice .ui-icon { width: 16px; height: 16px; }
.quick-choice > span { flex: 1; }
.quick-choice > b { color: #c2b5ff; font-size: 10px; font-weight: 550; }
.quick-choice:disabled { cursor: default; opacity: .52; }
.quick-access-scrim { position: fixed; z-index: 79; inset: 0; border: 0; background: rgba(0,0,0,.58); }
.quick-access-scrim[hidden] { display: none !important; }
.workspace.quick-panel-collapsed { grid-template-columns: minmax(0,1fr) 0 !important; }
.workspace.quick-panel-collapsed > .quick-access-panel { display: none !important; }
.workspace.quick-panel-collapsed > #main { grid-column: 1 / -1; }

@media (max-width: 1360px) {
  .workspace { grid-template-columns: minmax(0,1fr) !important; }
  .workspace > #main { grid-column: 1; }
  .workspace > .quick-access-panel {
    position: fixed;
    z-index: 80;
    top: 8px;
    right: 8px;
    bottom: 8px;
    display: none;
    width: min(340px, calc(100vw - 24px));
    padding: 22px 18px 30px;
    border: 0 !important;
    background: #0b0b0e;
    box-shadow: -18px 0 60px rgba(0,0,0,.4);
  }
  .workspace > .quick-access-panel.is-open { display: block; }
  .quick-access-toggle > span { display: none; }
  .quick-access-toggle > kbd { display: none; }
  .quick-access-toggle { width: 38px; padding: 0; }
}
@media (max-width: 760px) {
  .workspace > .quick-access-panel { top: env(safe-area-inset-top); right: 0; bottom: 0; width: min(350px, calc(100vw - 20px)); padding-top: 20px; }
  .quick-access-dialog-head { padding-inline: 16px; }
  .quick-access-choices { padding-inline: 16px; }
}

/* Keep the shared page header aligned like the other management headers. */
.manage-global-screen .manage-global-head {
  position: relative;
  top: auto;
  align-items: center;
  margin: 0 0 22px;
  padding: 28px 30px !important;
  border: 1px solid var(--blocky-line, rgba(255,255,255,.13));
  background: #101014;
}
.manage-global-head > div { min-width:0; }
.manage-global-head h2 { margin: 0 0 8px; line-height:1; }
.manage-global-head p { max-width: 64ch; line-height:1.5; }
.manage-global-head label { align-self:center; }
@media (max-width: 680px) {
  .manage-global-screen .manage-global-head { align-items:stretch; padding:18px !important; }
  .manage-global-head label { align-self:stretch; }
}

/* Management headers share a consistent picker column and control height. */
.manage-global-screen .manage-global-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 280px);
  align-items: center !important;
  gap: 28px;
}
.manage-global-head > div { align-self: center; }
.manage-global-head label {
  display: grid;
  align-self: center !important;
  gap: 8px;
  width: 100%;
  min-width: 0;
  line-height: 1.3;
}
.manage-global-head label select {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 0 14px !important;
}
.workspace .data-table td .text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid rgba(169,154,255,.3);
  color: #d0c6ff;
  background: #15121e;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.workspace .data-table td .text-button:hover {
  border-color: rgba(169,154,255,.7);
  color: #fff;
  background: #211c30;
}
.manage-data-chart {
  margin: 0 0 20px;
  padding: 20px 22px 18px;
  border: 1px solid var(--blocky-line, rgba(255,255,255,.13));
  background: #0d0a14;
}
.manage-data-chart h3 {
  margin: 0 0 16px;
  color: #eeebf7;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.manage-data-bars { display: grid; gap: 11px; }
.manage-data-bar-row {
  display: grid;
  grid-template-columns: minmax(90px, 180px) minmax(60px, 1fr) minmax(48px, auto);
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #aaa6b5;
  font-size: 12px;
}
.manage-data-bar-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manage-data-bar-track { height: 8px; overflow: hidden; background: rgba(255,255,255,.07); }
.manage-data-bar-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #6550b8, #a68bff);
  transition: width .45s cubic-bezier(.2,.75,.2,1);
}
.manage-data-bar-row strong { color: #eeeaf8; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
.manage-data-chart-empty { margin: 0; color: #aaa6b5; font-size: 12px; }

/* Low-contrast, animated purple wave behind the workspace. */
body { isolation: isolate; background: #08050e !important; }
.ambient-wave {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .31;
}
.app-shell { position: relative; z-index: 1; background: transparent !important; }
.workspace, #main, #main > .screen { background-color: transparent !important; }
.rail { background: rgba(8, 7, 11, .96) !important; }
@media (max-width: 760px) {
  .manage-global-screen .manage-global-head { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .manage-data-chart { padding: 16px; }
  .manage-data-bar-row { grid-template-columns: minmax(76px, 110px) minmax(45px, 1fr) minmax(40px, auto); gap: 8px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .manage-data-bar-track i { transition: none; }
  .ambient-wave { opacity: .18; }
}

/* Keep scrolling available while removing the browser-drawn scroll rails. */
html, body, body * {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
body *::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
