* { box-sizing: border-box; }

html {
  min-width: 1080px;
  background: var(--canvas);
}

body {
  margin: 0;
  color: var(--ink-950);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal-700); text-decoration: none; }
a:hover { color: var(--teal-600); }

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--teal-600);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 20px 14px 16px;
  color: #d9e2e5;
  background: var(--ink-950);
  overflow-x: hidden;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 1px 12px 28px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: white;
  background: var(--teal-600);
  border-radius: 10px;
  box-shadow: 0 6px 16px rgb(16 147 143 / 30%);
  font-size: 13px;
  font-weight: 800;
}

.brand-name {
  font-size: 14px;
  font-weight: 720;
  letter-spacing: -.02em;
  color: #f4f7f8;
}

.brand-subtitle {
  display: block;
  margin-top: 3px;
  color: #83929d;
  font-size: 10px;
  font-weight: 550;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.nav-label {
  padding: 0 12px 8px;
  color: #71818d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.nav {
  display: grid;
  gap: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  color: #9eabb3;
  background: transparent;
  text-align: left;
  text-decoration: none;
  transition: background var(--ease), color var(--ease);
}

.nav-item:hover {
  color: #f2f6f7;
  background: #24343f;
  text-decoration: none;
}

.nav-item.active {
  color: white;
  background: #2a4049;
  box-shadow: inset 3px 0 var(--teal-600);
}

.nav-item.active:hover {
  color: white;
}

.sidebar-divider {
  height: 1px;
  margin: 14px 12px 12px;
  background: #2c3a44;
}

.sidebar-foot {
  margin-top: auto;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 1;
  padding-top: 12px;
  background: linear-gradient(180deg, transparent, var(--ink-950) 28%);
}

.workspace-card {
  display: block;
  padding: 12px;
  border: 1px solid #31434d;
  border-radius: 12px;
  background: #202f39;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--ease), background var(--ease);
}

.workspace-card:hover {
  border-color: #3f5663;
  background: #243743;
  text-decoration: none;
  color: inherit;
}

.workspace-pill {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  max-width: 14rem;
  padding: 6px 12px;
  border: 1px solid var(--ink-200);
  border-radius: 10px;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
}

.workspace-pill:hover {
  border-color: #b9e3de;
  background: var(--teal-100);
  text-decoration: none;
  color: inherit;
}

.workspace-pill .eyebrow {
  color: var(--ink-500);
}

.workspace-pill strong {
  overflow: hidden;
  color: var(--ink-900);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-card .eyebrow {
  color: #8798a3;
}

.workspace-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.workspace-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #14373a;
  background: #8ad5cb;
  font-size: 11px;
  font-weight: 800;
}

.workspace-name {
  color: #edf4f4;
  font-size: 12px;
  font-weight: 650;
}

.workspace-role {
  margin-top: 2px;
  color: #90a0aa;
  font-size: 10px;
}

.main {
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  height: var(--topbar-height);
  padding: 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--ink-200);
  background: rgb(255 255 255 / 84%);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-500);
  font-size: 12px;
}

.breadcrumb strong {
  color: var(--ink-800);
  font-weight: 650;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 17px;
}

.workspace-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.workspace-switch label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 650;
}

.workspace-switch select {
  min-width: 10rem;
  max-width: 16rem;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--ink-200);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-900);
}

.profile {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 17px;
  border-left: 1px solid var(--ink-200);
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #164a4c;
  border-radius: 50%;
  background: #b8e7df;
  font-size: 11px;
  font-weight: 800;
}

.profile-text { line-height: 1.2; }

.profile-name {
  color: var(--ink-800);
  font-size: 12px;
  font-weight: 700;
}

.profile-role {
  margin-top: 3px;
  color: var(--ink-500);
  font-size: 10px;
}

.page {
  max-width: 1440px;
  padding: 33px 38px 52px;
  margin: auto;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 1.25rem;
}

.page-heading-text { min-width: 0; }

.eyebrow {
  color: var(--ink-500);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.page h1,
.page-heading h1 {
  margin: 7px 0 7px;
  color: var(--ink-950);
  font-size: 29px;
  line-height: 1.1;
  letter-spacing: -.045em;
  font-weight: 700;
}

.page-description {
  max-width: 590px;
  margin: 0;
  color: var(--ink-700);
  line-height: 1.55;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.page-header h1 {
  margin: 0 0 0.15rem;
  font-size: 29px;
  letter-spacing: -.045em;
}

.page-header-text .meta { margin: 0; }
