@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Cormorant+Garamond:wght@500;600&display=swap");

:root {
  --evergreen: #2d5016;
  --evergreen-deep: #223d11;
  --parchment: #f5ecd7;
  --parchment-soft: #fbf6ea;
  --midnight: #1a1a1a;
  --slate: #6b7280;
  --fog: #e8e8e4;
  --fog-deep: #dddcd2;
  --amber: #c8873a;
  --amber-deep: #a66d28;
  --danger-soft: #9f5d57;
  --bg: var(--parchment);
  --bg-top: var(--parchment-soft);
  --shell: #23311a;
  --shell-2: #304221;
  --surface: var(--parchment-soft);
  --surface-strong: #fffdf8;
  --surface-muted: rgba(245, 236, 215, 0.68);
  --surface-dark: #25261f;
  --border: rgba(107, 114, 128, 0.26);
  --border-strong: rgba(107, 114, 128, 0.42);
  --line-dark: rgba(26, 26, 26, 0.12);
  --text: var(--midnight);
  --muted: var(--slate);
  --accent: var(--evergreen);
  --accent-strong: var(--evergreen-deep);
  --accent-soft: rgba(45, 80, 22, 0.08);
  --warm: var(--amber);
  --danger: var(--danger-soft);
  --link: var(--amber);
  --link-strong: var(--amber-deep);
  --focus-ring: rgba(200, 135, 58, 0.35);
  --shadow: 0 10px 26px rgba(26, 26, 26, 0.06);
  --shadow-strong: 0 18px 40px rgba(26, 26, 26, 0.12);
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font-ui: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --studio-visual-keyboard-offset: 0px;
}

/* Icon navigation refresh */
:root {
  --studio-bottom-nav-height: calc(58px + var(--studio-safe-bottom));
}

.studio-topnav {
  gap: 8px;
  overflow: visible;
}

.studio-topnav-link {
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(124, 58, 237, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #6b617a;
  overflow: visible;
}

.studio-topnav-link:hover,
.studio-topnav-link.is-active {
  border-color: rgba(124, 58, 237, 0.32);
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
  box-shadow: 0 10px 22px rgba(124, 58, 237, 0.1);
}

.studio-topnav-link::after {
  content: attr(data-nav-label);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 150;
  padding: 5px 8px;
  border-radius: 8px;
  background: #251b3f;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.studio-topnav-link:hover::after,
.studio-topnav-link:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.studio-topnav-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.studio-nav-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.studio-nav-icon-image {
  object-fit: contain;
}

.studio-nav-fallback {
  font-size: 0.8rem;
  font-weight: 800;
}

.studio-bottom-nav {
  display: none;
}

@media (max-width: 980px) {
  .studio-topnav {
    display: none;
  }

  .studio-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    min-height: var(--studio-bottom-nav-height);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
    gap: 6px;
    padding: 6px max(12px, var(--studio-safe-right)) calc(6px + var(--studio-safe-bottom)) max(12px, var(--studio-safe-left));
    border: 1px solid rgba(124, 58, 237, 0.18);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 18px 18px 0 0;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 40px rgba(39, 24, 71, 0.16);
    backdrop-filter: blur(18px);
  }

  .studio-bottom-nav .studio-topnav-link {
    width: 100%;
    height: 46px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .studio-bottom-nav .studio-topnav-link:hover,
  .studio-bottom-nav .studio-topnav-link.is-active {
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
    box-shadow: none;
  }

  .studio-bottom-nav .studio-topnav-link::after {
    top: auto;
    bottom: calc(100% + 8px);
  }

  .shell-stage {
    height: 100dvh;
    min-height: 100dvh;
    padding-bottom: var(--studio-bottom-nav-height);
    overflow: hidden;
  }

  .workspace-page {
    min-height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top) - var(--studio-bottom-nav-height));
    height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top) - var(--studio-bottom-nav-height));
  }

  .workspace-main,
  .chat-main-panel,
  .projects-main,
  .project-main-panel {
    min-height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top) - var(--studio-bottom-nav-height));
    height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top) - var(--studio-bottom-nav-height));
  }

  .app-route-shared .shared-mobile-task-dock,
  .app-route-drew .shared-mobile-task-dock,
  .chat-composer-dock {
    bottom: calc(var(--studio-bottom-nav-height) + var(--studio-visual-keyboard-offset, 0px));
  }

  .app-route-shared .shared-page .task-main-column,
  .app-route-drew .shared-page .task-main-column {
    padding-bottom: calc(var(--studio-bottom-nav-height) + 96px + var(--studio-visual-keyboard-offset, 0px));
  }
}

.theme-asana-modern .studio-topnav-link,
.theme-asana-modern .studio-bottom-nav .studio-topnav-link {
  border-color: rgba(108, 99, 255, 0.16);
  color: #5f6676;
}

.theme-asana-modern .studio-topnav-link:hover,
.theme-asana-modern .studio-topnav-link.is-active,
.theme-asana-modern .studio-bottom-nav .studio-topnav-link:hover,
.theme-asana-modern .studio-bottom-nav .studio-topnav-link.is-active {
  background: rgba(108, 99, 255, 0.1);
  color: #6c63ff;
}

.theme-strawberry-shortcake .studio-topnav-link,
.theme-strawberry-shortcake .studio-bottom-nav .studio-topnav-link {
  border-color: rgba(124, 58, 237, 0.16);
  color: #7a6266;
}

.theme-strawberry-shortcake .studio-topnav-link:hover,
.theme-strawberry-shortcake .studio-topnav-link.is-active,
.theme-strawberry-shortcake .studio-bottom-nav .studio-topnav-link:hover,
.theme-strawberry-shortcake .studio-bottom-nav .studio-topnav-link.is-active {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
}

/* Mobile viewport frame: reserve fixed header and flush bottom nav space. */
@media (max-width: 980px) {
  :root {
    --studio-bottom-nav-height: calc(58px + var(--studio-safe-bottom));
  }

  .studio-bottom-nav {
    left: 0;
    right: 0;
    bottom: 0;
    min-height: var(--studio-bottom-nav-height);
    height: auto;
    padding: 6px max(12px, var(--studio-safe-right)) calc(6px + var(--studio-safe-bottom)) max(12px, var(--studio-safe-left));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 18px 18px 0 0;
  }

  .shell-stage {
    height: 100dvh;
    min-height: 100dvh;
    padding-top: calc(var(--studio-header-height) + var(--studio-safe-top));
    padding-bottom: var(--studio-bottom-nav-height);
    overflow: hidden;
  }

  .workspace-page {
    min-height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top) - var(--studio-bottom-nav-height));
    height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top) - var(--studio-bottom-nav-height));
  }

  .workspace-main,
  .chat-main-panel,
  .projects-main,
  .project-main-panel {
    min-height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top) - var(--studio-bottom-nav-height));
    height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top) - var(--studio-bottom-nav-height));
  }

  .app-route-shared .shared-mobile-task-dock,
  .app-route-drew .shared-mobile-task-dock,
  .chat-composer-dock {
    bottom: calc(var(--studio-bottom-nav-height) + var(--studio-visual-keyboard-offset, 0px));
  }

  .app-route-shared .shared-page .task-main-column,
  .app-route-drew .shared-page .task-main-column {
    padding-bottom: calc(var(--studio-bottom-nav-height) + 96px + var(--studio-visual-keyboard-offset, 0px));
  }
}

/* Mobile viewport frame: reserve fixed header and flush bottom nav space. */
@media (max-width: 980px) {
  :root {
    --studio-bottom-nav-height: calc(58px + var(--studio-safe-bottom));
  }

  .studio-bottom-nav {
    left: 0;
    right: 0;
    bottom: 0;
    min-height: var(--studio-bottom-nav-height);
    height: auto;
    padding: 6px max(12px, var(--studio-safe-right)) calc(6px + var(--studio-safe-bottom)) max(12px, var(--studio-safe-left));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 18px 18px 0 0;
  }

  .shell-stage {
    height: 100dvh;
    min-height: 100dvh;
    padding-top: calc(var(--studio-header-height) + var(--studio-safe-top));
    padding-bottom: var(--studio-bottom-nav-height);
    overflow: hidden;
  }

  .workspace-page {
    min-height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top) - var(--studio-bottom-nav-height));
    height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top) - var(--studio-bottom-nav-height));
  }

  .workspace-main,
  .chat-main-panel,
  .projects-main,
  .project-main-panel {
    min-height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top) - var(--studio-bottom-nav-height));
    height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top) - var(--studio-bottom-nav-height));
  }

  .app-route-shared .shared-mobile-task-dock,
  .app-route-drew .shared-mobile-task-dock,
  .chat-composer-dock {
    bottom: calc(var(--studio-bottom-nav-height) + var(--studio-visual-keyboard-offset, 0px));
  }

  .app-route-shared .shared-page .task-main-column,
  .app-route-drew .shared-page .task-main-column {
    padding-bottom: calc(var(--studio-bottom-nav-height) + 96px + var(--studio-visual-keyboard-offset, 0px));
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-ui);
  color: var(--text);
  line-height: 1.5;
  background: linear-gradient(180deg, var(--bg-top), var(--bg));
}

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

a {
  color: inherit;
  text-decoration: none;
}

p,
ul,
ol {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.04em;
}

#app {
  min-height: 100vh;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.auth-panel {
  width: min(560px, 100%);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: 36px;
  display: grid;
  gap: 18px;
}

.auth-panel h1 {
  font-size: clamp(2rem, 3vw, 2.6rem);
}

.partner-auth-screen {
  background:
    linear-gradient(180deg, #fff9f3 0%, #ffe1e8 100%);
}

.partner-auth-panel {
  width: 100%;
  border-color: #f0b8c4;
  border-radius: 20px;
  background: #fffdf8;
  box-shadow: 0 24px 60px rgba(130, 59, 70, 0.12);
}

.partner-auth-frame {
  width: min(480px, 100%);
  display: grid;
  justify-items: center;
  gap: 16px;
}

.partner-auth-brand {
  display: grid;
  justify-items: center;
}

.partner-auth-icon {
  width: 86px;
  height: 86px;
  object-fit: contain;
}

.partner-auth-brand .eyebrow {
  margin-bottom: 4px;
  color: #9f1d46;
}

.partner-auth-brand h1 {
  margin: 0;
  color: #3d2a2e;
}

.partner-auth-name {
  color: #7e1838;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.partner-auth-panel .primary-button {
  background: #d92d5c;
}

.partner-auth-panel .primary-button:hover {
  background: #9f1d46;
}

.auth-footnote,
.muted {
  color: var(--muted);
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  background: #eef2f5;
}

.sidebar {
  border-right: 1px solid var(--line-dark);
  background:
    linear-gradient(180deg, rgba(23, 31, 38, 0.98), rgba(15, 21, 27, 0.98)),
    var(--shell);
  color: #edf3f5;
  padding: 18px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand-block {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  color: white;
  font-weight: 700;
}

.brand-name {
  font-weight: 700;
}

.brand-subtitle,
.metric-label,
.card-kicker,
.eyebrow,
.mini-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.73rem;
}

.brand-subtitle,
.sidebar .mini-label,
.sidebar .eyebrow,
.nav-link-meta {
  color: rgba(232, 239, 243, 0.56);
}

.sidebar-actions {
  display: grid;
  gap: 10px;
}

.sidebar-button {
  width: 100%;
  justify-content: center;
}

.workspace-tag {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
}

.workspace-tag strong {
  font-size: 1rem;
}

.workspace-tag span {
  color: rgba(232, 239, 243, 0.66);
  line-height: 1.55;
  font-size: 0.92rem;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
  flex: none;
  min-height: auto;
  overflow: visible;
  padding-right: 0;
}

.nav-link {
  padding: 12px 13px;
  border-radius: 12px;
  color: rgba(237, 243, 245, 0.74);
  border: 1px solid transparent;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease, border-color 180ms ease;
  display: grid;
  gap: 4px;
}

.nav-link-label {
  font-weight: 600;
}

.nav-link:hover,
.nav-link.is-active {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(2px);
}

.nav-link.is-active .nav-link-meta,
.nav-link:hover .nav-link-meta {
  color: rgba(232, 239, 243, 0.76);
}

.sidebar-footer {
  margin-top: 12px;
  flex: 0 0 auto;
}

.session-card {
  margin-top: 8px;
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
}

.session-card span {
  color: rgba(232, 239, 243, 0.64);
  font-size: 0.92rem;
}

.main-shell {
  min-width: 0;
  padding: 24px 28px 36px;
  display: grid;
  gap: 24px;
  background: transparent;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.topbar-copy {
  display: grid;
  gap: 6px;
}

.topbar h1 {
  font-size: clamp(1.8rem, 2.8vw, 2.5rem);
}

.topbar-lede {
  color: var(--muted);
  line-height: 1.6;
  max-width: 72ch;
}

.topbar-actions,
.inline-actions,
.chip-row,
.project-card-meta,
.memory-footer,
.wizard-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.workspace-grid.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.page-column,
.assistant-column {
  min-width: 0;
}

.page-column {
  display: grid;
  gap: 20px;
}

.page-column > *,
.assistant-column > * {
  min-width: 0;
}

.assistant-column {
  display: grid;
  gap: 18px;
  align-content: start;
}

.page-intro,
.hero-panel,
.project-hero,
.card,
.metric-card,
.project-card,
.rail-card,
.memory-card,
.task-card,
.doc-card,
.wizard-modal,
.timeline-item,
.project-mini-card,
.doc-link-card,
.empty-card,
.command-card,
.project-launcher-card,
.assistant-desk {
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.page-intro,
.hero-panel,
.project-hero,
.card,
.rail-card,
.memory-card,
.task-card,
.timeline-item,
.doc-card,
.project-mini-card,
.doc-link-card,
.wizard-modal,
.assistant-desk {
  border-radius: var(--radius-lg);
}

.page-intro,
.card,
.rail-card,
.memory-card,
.task-card,
.timeline-item,
.project-mini-card,
.doc-link-card,
.hero-panel,
.project-hero {
  padding: 20px;
  background: var(--surface);
}

.page-intro,
.page-intro.split {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.page-intro {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

.hero-panel,
.project-hero {
  background: linear-gradient(180deg, #ffffff, #f8fafb);
}

.hero-grid,
.project-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 420px;
  gap: 22px;
  align-items: start;
}

.hero-copy {
  display: grid;
  gap: 12px;
}

.hero-copy h2,
.project-hero h2 {
  font-size: clamp(2rem, 3vw, 3rem);
}

.lede {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.68;
  max-width: 76ch;
}

.hero-chat-surface,
.project-session-card {
  display: grid;
  gap: 12px;
  border-radius: 16px;
  border: 1px solid rgba(13, 105, 123, 0.14);
  background: #f6fafb;
  padding: 18px;
}

.feed-card,
.composer-card,
.assistant-thread-row,
.assistant-memory-item {
  display: grid;
  gap: 6px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #ffffff;
  padding: 14px 15px;
}

.feed-card p,
.composer-card span,
.assistant-thread-row span,
.assistant-memory-item span {
  color: var(--muted);
  line-height: 1.6;
}

.feed-card.is-assistant {
  border-color: rgba(13, 105, 123, 0.12);
  background: rgba(13, 105, 123, 0.08);
}

.composer-card.compact {
  gap: 4px;
}

.command-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.command-card {
  border-radius: 16px;
  background: var(--surface);
  padding: 18px;
  display: grid;
  gap: 8px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.guide-card {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 10px;
  min-height: 188px;
}

.guide-card p {
  color: var(--muted);
  line-height: 1.6;
}

.guide-card .ghost-button {
  justify-self: start;
  margin-top: auto;
}

.metrics-grid,
.content-grid,
.project-grid,
.project-launcher-grid,
.meta-grid {
  display: grid;
  gap: 18px;
}

.metrics-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.content-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.project-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.project-launcher-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  gap: 16px;
}

.meta-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
  color: var(--muted);
}

.metric-card {
  border-radius: 16px;
  padding: 20px;
  display: grid;
  gap: 8px;
  background: var(--surface);
}

.metric-label,
.card-kicker,
.eyebrow,
.mini-label {
  color: var(--muted);
}

.metric-value {
  font-size: 2rem;
  font-weight: 700;
}

.stack {
  display: grid;
  gap: 12px;
}

.stack.compact {
  gap: 8px;
}

.bullets {
  padding-left: 18px;
}

.ordered-list {
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.project-card,
.project-launcher-card {
  display: grid;
  gap: 14px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.project-launcher-card {
  min-height: 220px;
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fafb);
}

.project-card:hover,
.project-mini-card:hover,
.project-launcher-card:hover,
.doc-link-card:hover,
.command-card:hover,
.guide-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.project-launcher-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.project-launcher-badge {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  color: white;
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: 0.08em;
}

.project-launcher-meta,
.project-launcher-body,
.project-launcher-footer {
  display: grid;
  gap: 8px;
}

.project-launcher-body h3 {
  font-size: 1.24rem;
}

.project-launcher-body p,
.project-launcher-footer,
.timeline-item span,
.doc-link-card span,
.memory-teaser span {
  color: var(--muted);
  line-height: 1.58;
}

.project-launcher-footer {
  margin-top: auto;
  font-size: 0.92rem;
}

.card-topline,
.memory-card-top,
.wizard-header,
.file-browser-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.project-card p,
.card p,
.rail-card p,
.memory-body,
.doc-card p,
.task-card span {
  color: var(--muted);
  line-height: 1.6;
}

.primary-button,
.ghost-button {
  border-radius: 14px;
  padding: 11px 16px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, background 180ms ease, border-color 180ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  box-shadow: 0 10px 24px rgba(13, 105, 123, 0.2);
}

.ghost-button {
  background: #f8fafb;
  border-color: var(--border);
  color: var(--text);
}

.sidebar .ghost-button {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(237, 243, 245, 0.88);
}

.ghost-button.small {
  padding: 8px 12px;
  font-size: 0.92rem;
}

.ghost-button.danger {
  color: var(--danger);
}

.primary-button:hover,
.ghost-button:hover,
.tab-link:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.ghost-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.shared-portal {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 1040px;
  padding: 28px clamp(16px, 4vw, 42px) 48px;
}

.shared-portal-hero {
  align-items: end;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
}

.shared-portal-hero h1 {
  font-size: 2rem;
  letter-spacing: 0;
  margin: 4px 0 8px;
}

.shared-topic-new-form,
.shared-task-new-form,
.shared-task-edit-form {
  display: grid;
  gap: 10px;
}

.shared-topic-new-form,
.shared-task-new-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.shared-topic-stack {
  display: grid;
  gap: 14px;
}

.shared-topic-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 14px;
  padding: 16px;
}

.shared-topic-head,
.shared-task-title-row,
.shared-task-meta {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.shared-topic-head h3 {
  font-size: 1.1rem;
  letter-spacing: 0;
  margin: 3px 0;
}

.shared-topic-counts {
  align-items: center;
  color: var(--muted);
  display: grid;
  gap: 2px 8px;
  grid-template-columns: auto auto;
  text-align: right;
}

.shared-topic-counts strong {
  color: var(--text);
}

.shared-task-list {
  display: grid;
  gap: 8px;
}

.shared-task-row {
  align-items: start;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  padding: 12px;
}

.shared-task-row.is-done {
  background: #f7faf7;
}

.shared-task-status {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: flex;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.shared-task-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.shared-task-main p,
.shared-topic-head p {
  color: var(--muted);
  margin: 0;
}

.shared-task-title-row {
  justify-content: flex-start;
}

.shared-task-meta {
  color: var(--muted);
  flex-wrap: wrap;
  font-size: 0.82rem;
  justify-content: flex-start;
}

.shared-task-chip {
  background: #eef2f7;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.74rem;
  padding: 3px 8px;
}

.shared-task-chip.is-done {
  background: #e8f5ec;
  color: #206b3f;
}

.shared-task-chip.is-blocked {
  background: #fff0e6;
  color: #9a4a00;
}

.shared-task-edit summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
}

.shared-task-edit[open] {
  grid-column: 2 / -1;
}

.shared-form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shared-empty {
  color: var(--muted);
  padding: 12px 0;
}

.shared-project-create-form {
  margin: 0;
  padding: 4px 0 8px;
}

.shared-project-empty {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 8px 12px;
}

.shared-nav-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  margin: 12px 0 3px;
  padding: 7px 12px 5px;
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.shared-project-nav > .shared-nav-heading:first-child {
  margin-top: 0;
}

.shared-project-heading-control {
  cursor: pointer;
  list-style: none;
}

.shared-project-heading-control::-webkit-details-marker {
  display: none;
}

.shared-project-nav-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  margin-left: 8px;
}

.shared-project-nav-row.is-drag-over {
  border-radius: 10px;
  background: rgba(108, 99, 255, 0.08);
  box-shadow: inset 3px 0 0 rgba(108, 99, 255, 0.46);
}

.shared-project-nav-drop-end {
  min-height: 12px;
  border-radius: 8px;
  margin-left: 8px;
}

.shared-project-nav-drop-end.is-drag-over {
  background: rgba(108, 99, 255, 0.08);
  outline: 1px dashed rgba(108, 99, 255, 0.35);
}

.shared-project-nav-row .task-rail-link {
  min-width: 0;
}

.shared-project-system-spacer {
  width: 28px;
  height: 28px;
}

.shared-project-sidebar {
  grid-template-rows: minmax(0, 1fr);
  align-content: start;
  overflow-y: auto;
}

.owner-task-sidebar {
  grid-template-rows: auto minmax(0, 1fr);
}

.shared-project-add-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding: 7px 12px;
  color: var(--text-secondary);
  cursor: pointer;
  list-style: none;
}

.shared-project-add-row::-webkit-details-marker {
  display: none;
}

.shared-project-add-row span:first-child {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
}

.shared-project-add-button {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(45, 80, 22, 0.08);
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
}

.shared-project-create-details {
  margin-top: 5px;
}

.shared-account-details {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(26, 26, 26, 0.08);
}

.shared-account-form {
  display: grid;
  gap: 10px;
  padding: 8px 4px 0 8px;
}

.shared-account-form .field span {
  font-size: 0.74rem;
}

.shared-project-sidebar .shared-project-nav {
  grid-auto-flow: row;
  grid-auto-columns: auto;
  gap: 2px;
  align-content: start;
  min-height: 0;
  overflow: visible;
  padding: 2px 0 0;
}

.shared-project-sidebar .task-rail-link {
  border-radius: 8px;
}

.shared-view-sort-link {
  margin-left: 8px;
}

.shared-general-link {
  margin: 0 0 4px 8px;
}

.task-nav-secondary-heading {
  margin-top: 18px;
}

.project-row-menu {
  position: relative;
  margin-right: 6px;
}

.shared-project-row-menu {
  margin-right: 0;
}

.project-row-menu summary {
  list-style: none;
  opacity: 0.72;
}

.project-row-menu summary::-webkit-details-marker {
  display: none;
}

.project-row-menu[open] summary,
.project-row-menu summary:hover {
  opacity: 1;
}

.project-row-menu-pop {
  z-index: 40;
}

@media (max-width: 760px) {
  .admin-dashboard-shell {
    grid-template-columns: 1fr;
  }

  .admin-dashboard-sidebar {
    position: static;
    align-self: stretch;
    min-height: auto;
    gap: 14px;
  }

  .admin-dashboard-main {
    padding: 18px;
  }

  .admin-dashboard-hero {
    grid-template-columns: 1fr;
  }

  .admin-split,
  .admin-form-grid,
  .admin-two-column,
  .admin-user-row,
  .admin-provider-row,
  .admin-email-row,
  .admin-service-row {
    grid-template-columns: 1fr;
  }

  .shared-portal-hero,
  .shared-topic-new-form,
  .shared-task-new-form,
  .shared-task-row,
  .shared-form-grid {
    grid-template-columns: 1fr;
  }

  .shared-task-status {
    display: none;
  }
}

.chip,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
}

.chip {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(13, 105, 123, 0.12);
}

.chip.subtle,
.status-pill {
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  border: 1px solid var(--border);
}

.memory-teaser,
.timeline-item,
.task-card,
.project-mini-card,
.doc-link-card,
.user-row {
  display: grid;
  gap: 6px;
}

.project-mini-card,
.doc-link-card {
  background: #ffffff;
  transition: transform 180ms ease, border-color 180ms ease;
}

.user-row {
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.user-row:first-child {
  border-top: none;
  padding-top: 0;
}

.user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.user-management-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.user-management-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.user-management-head,
.user-management-foot {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.user-management-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.user-management-check {
  align-self: end;
}

.partner-feature-list {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
}

.partner-feature-list > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.user-summary-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 12px 0;
}

.user-summary-grid div {
  background: #f8fafb;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 3px;
  padding: 10px;
}

.user-summary-grid span {
  color: var(--muted);
  font-size: 0.78rem;
}

@media (max-width: 760px) {
  .user-management-head,
  .user-management-foot {
    align-items: start;
    flex-direction: column;
  }

  .user-management-grid,
  .user-summary-grid {
    grid-template-columns: 1fr;
  }
}

.memory-card {
  display: grid;
  gap: 16px;
}

.memory-body {
  white-space: normal;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(15, 24, 31, 0.12);
  background: #ffffff;
  padding: 12px 14px;
  color: var(--text);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(13, 105, 123, 0.18);
  outline-offset: 2px;
  border-color: rgba(13, 105, 123, 0.22);
}

textarea {
  resize: vertical;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.checkbox-row input {
  width: auto;
}

.checkbox-stack {
  display: grid;
  gap: 8px;
}

.tab-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tab-link {
  padding: 10px 13px;
  border-radius: 999px;
  background: #f8fafb;
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}

.tab-link.is-active {
  background: #ffffff;
  border-color: rgba(13, 105, 123, 0.16);
  color: var(--accent);
  box-shadow: 0 5px 16px rgba(13, 105, 123, 0.08);
}

.doc-card {
  padding: 18px 20px;
}

.doc-card summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: var(--text);
}

.doc-preview,
.code-block {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 16px 0 0;
  border-radius: 16px;
  background: #f3f6f7;
  border: 1px solid rgba(15, 24, 31, 0.08);
  padding: 16px;
  color: #32404a;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92rem;
}

.file-browser-grid {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 18px;
}

.file-list-card,
.file-preview-card {
  display: grid;
  gap: 16px;
  align-content: start;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
}

.breadcrumb-link {
  color: var(--accent);
}

.breadcrumb-current {
  color: var(--text);
  font-weight: 600;
}

.breadcrumb-separator {
  color: var(--muted);
}

.file-entry-list {
  display: grid;
  gap: 10px;
}

.file-entry {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.76);
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.file-entry:hover,
.chat-thread-link:hover,
.chat-thread-link.is-active {
  transform: translateY(-1px);
  border-color: var(--border-strong);
}

.file-entry.is-selected {
  background: var(--accent-soft);
  border-color: rgba(13, 105, 123, 0.2);
}

.file-entry-main,
.file-entry-meta {
  display: grid;
  gap: 4px;
}

.file-entry-main span,
.file-entry-meta {
  color: var(--muted);
}

.file-entry-meta {
  font-size: 0.9rem;
}

.file-entry-type {
  color: var(--warm);
  font-weight: 600;
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(290px, 340px) minmax(0, 1fr);
  gap: 18px;
}

.chat-sidebar-panel,
.chat-thread-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.chat-thread-list,
.chat-message-list {
  display: grid;
  gap: 12px;
}

.chat-thread-link,
.chat-message,
.chat-empty-state {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.chat-thread-link,
.chat-empty-state {
  padding: 16px;
  display: grid;
  gap: 8px;
}

.chat-thread-link.is-active {
  background: var(--accent-soft);
}

.chat-thread-link span,
.chat-thread-meta,
.chat-message-meta,
.chat-message-status,
.chat-empty-state p {
  color: var(--muted);
}

.chat-thread-meta,
.chat-message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.92rem;
}

.chat-message {
  padding: 18px;
  display: grid;
  gap: 10px;
}

.chat-message.is-assistant {
  background:
    radial-gradient(circle at top right, rgba(13, 105, 123, 0.08), transparent 32%),
    rgba(255, 255, 255, 0.88);
}

.chat-message.is-user {
  background:
    radial-gradient(circle at top left, rgba(141, 99, 50, 0.08), transparent 28%),
    rgba(255, 255, 255, 0.82);
}

.chat-message-body {
  line-height: 1.68;
}

.chat-composer-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.assistant-desk {
  background:
    linear-gradient(180deg, rgba(24, 33, 41, 0.98), rgba(17, 24, 30, 0.98)),
    var(--shell-2);
  color: #eef3f5;
  box-shadow: var(--shadow-strong);
  display: grid;
  gap: 14px;
  position: sticky;
  top: 24px;
  padding: 20px;
}

.assistant-desk .eyebrow,
.assistant-desk p,
.assistant-desk span,
.assistant-desk .mini-label {
  color: rgba(232, 239, 243, 0.66);
}

.assistant-desk .assistant-thread-row,
.assistant-desk .assistant-memory-item,
.assistant-desk .composer-card {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.assistant-desk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.assistant-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.assistant-quick-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(238, 243, 245, 0.88);
  font-size: 0.84rem;
}

.assistant-quick-pill.is-muted {
  color: rgba(238, 243, 245, 0.68);
}

.assistant-list,
.rail-card ul {
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.assistant-composer-card strong {
  color: #eef3f5;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 17, 22, 0.45);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: start center;
  padding: 16px;
  overflow: auto;
  z-index: 20;
}

.wizard-modal {
  width: min(1080px, 100%);
  height: calc(100dvh - 32px);
  max-height: calc(100dvh - 32px);
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  overflow: hidden;
  background: transparent;
}

.wizard-sidebar,
.wizard-main {
  padding: 28px;
  min-height: 0;
  overflow: hidden;
}

.wizard-sidebar {
  background:
    linear-gradient(180deg, rgba(24, 33, 41, 0.98), rgba(17, 24, 30, 0.98)),
    var(--shell-2);
  color: #edf3f5;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.wizard-sidebar .muted,
.wizard-sidebar .eyebrow,
.wizard-step span {
  color: rgba(232, 239, 243, 0.66);
}

.wizard-main {
  display: grid;
  gap: 22px;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
}

.wizard-main form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
}

.wizard-main form > label,
.wizard-main form > .field,
.wizard-main form > .card,
.wizard-main form > .callout {
  min-width: 0;
}

.wizard-footer {
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--border);
  bottom: 0;
  margin-top: auto;
  padding-top: 14px;
  position: sticky;
  z-index: 2;
}

.wizard-steps {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.wizard-step {
  border-radius: 16px;
  padding: 14px;
  border: 1px solid transparent;
  display: grid;
  gap: 6px;
  color: rgba(232, 239, 243, 0.66);
}

.wizard-step.is-current {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.error-banner {
  border-radius: 16px;
  padding: 14px 18px;
  background: rgba(170, 76, 62, 0.1);
  color: var(--danger);
  border: 1px solid rgba(170, 76, 62, 0.18);
}

.callout {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
}

.callout.subtle {
  background: rgba(245, 248, 249, 0.88);
}

.callout.success {
  background: rgba(31, 111, 78, 0.12);
  border-color: rgba(31, 111, 78, 0.2);
  color: #1f6f4e;
}

.callout.success strong,
.callout.success span {
  color: inherit;
}

.settings-primary-grid,
.settings-secondary-grid {
  display: grid;
  gap: 18px;
  align-items: start;
}

.settings-primary-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
}

.settings-secondary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-full-span {
  grid-column: 1 / -1;
}

.settings-card-emphasis {
  border-color: rgba(13, 105, 123, 0.18);
  box-shadow: 0 14px 34px rgba(13, 105, 123, 0.08);
}

.empty-card {
  text-align: center;
  display: grid;
  gap: 14px;
  background: rgba(255, 255, 255, 0.82);
  padding: 22px;
  border-radius: var(--radius-lg);
}

@keyframes card-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-intro,
.hero-panel,
.project-hero,
.card,
.metric-card,
.project-card,
.rail-card,
.memory-card,
.task-card,
.doc-card,
.command-card,
.guide-card,
.assistant-desk {
  animation: card-rise 220ms ease both;
}

@media (max-width: 1280px) {
  .workspace-grid,
  .hero-grid,
  .project-hero-grid,
  .settings-primary-grid,
  .settings-secondary-grid {
    grid-template-columns: 1fr;
  }

  .assistant-column {
    order: -1;
  }

  .metrics-grid,
  .command-strip,
  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .assistant-desk {
    position: static;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--line-dark);
  }

  .sidebar-nav {
    flex: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(180px, 220px);
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 4px;
    padding-right: 0;
  }

  .main-shell {
    padding: 18px;
  }

  .topbar,
  .content-grid,
  .file-browser-grid,
  .chat-layout,
  .chat-composer-meta,
  .wizard-modal,
  .assistant-desk-grid,
  .assistant-quick-actions {
    grid-template-columns: 1fr;
  }

  .wizard-sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    max-height: 180px;
    overflow: auto;
  }
}

@media (max-width: 720px) {
  .page-intro,
  .page-intro.split,
  .topbar {
    flex-direction: column;
    display: flex;
  }

  .metrics-grid,
  .content-grid,
  .command-strip,
  .guide-grid,
  .meta-grid {
    grid-template-columns: 1fr;
  }

  .project-launcher-grid {
    grid-template-columns: 1fr;
  }
}

/* Bare-bones admin theme override */

body {
  background: #f0f0f1;
  color: #1d2327;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
  background: #f0f0f1;
}

.sidebar {
  background: #1d2327;
  color: #f6f7f7;
  padding: 18px 0;
  gap: 0;
  border-right: none;
}

.brand-block,
.sidebar-actions,
.sidebar-footer {
  padding-left: 16px;
  padding-right: 16px;
}

.brand-block {
  padding-bottom: 16px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(240, 246, 247, 0.08);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: #2271b1;
}

.brand-name {
  font-size: 1rem;
}

.brand-subtitle {
  color: rgba(240, 246, 247, 0.72);
  letter-spacing: 0.04em;
}

.workspace-tag,
.nav-link-meta,
.assistant-column,
.assistant-desk,
.rail-card {
  display: none !important;
}

.sidebar-actions {
  gap: 8px;
  padding-bottom: 16px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(240, 246, 247, 0.08);
}

.sidebar-nav {
  gap: 2px;
  padding: 0 10px;
}

.nav-link {
  padding: 10px 12px;
  border-radius: 6px;
  color: rgba(240, 246, 247, 0.84);
  transition: background 120ms ease;
}

.nav-link:hover,
.nav-link.is-active {
  background: #2271b1;
  border-color: transparent;
  color: #ffffff;
  transform: none;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(240, 246, 247, 0.08);
  display: grid;
  gap: 10px;
}

.session-card {
  border-radius: 6px;
  border: 1px solid rgba(240, 246, 247, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.main-shell {
  min-width: 0;
  padding: 0;
  gap: 0;
  background: transparent;
}

.topbar {
  border: none;
  border-bottom: 1px solid #dcdcde;
  border-radius: 0;
  box-shadow: none;
  background: #ffffff;
  padding: 18px 24px;
}

.topbar h1 {
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.topbar-lede {
  max-width: 72ch;
  color: #646970;
  font-size: 0.95rem;
}

.workspace-grid,
.workspace-grid.is-single {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.page-column {
  gap: 24px;
  padding: 24px;
}

.page-intro {
  gap: 10px;
}

.page-intro h2,
.hero-copy h2,
.project-hero h2 {
  font-size: 1.9rem;
  font-weight: 600;
}

.card,
.hero-panel,
.project-hero,
.memory-card,
.task-card,
.timeline-item,
.doc-card,
.project-mini-card,
.doc-link-card,
.project-launcher-card,
.chat-sidebar-panel.card,
.chat-thread-panel.card,
.file-list-card,
.file-preview-card,
.auth-panel,
.metric-card,
.command-card,
.guide-card,
.wizard-modal {
  background: #ffffff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  box-shadow: none;
}

.card,
.hero-panel,
.project-hero,
.memory-card,
.task-card,
.timeline-item,
.doc-card,
.project-mini-card,
.doc-link-card,
.chat-sidebar-panel.card,
.chat-thread-panel.card,
.file-list-card,
.file-preview-card {
  padding: 20px;
}

.hero-panel,
.project-hero,
.project-launcher-card,
.command-card,
.guide-card {
  background: #ffffff;
}

.lede,
.project-card p,
.card p,
.rail-card p,
.memory-body,
.doc-card p,
.task-card span,
.muted {
  color: #646970;
}

.project-launcher-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
  gap: 16px;
}

.project-launcher-card {
  min-height: 180px;
  padding: 18px;
}

.project-launcher-badge {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  background: #2271b1;
  font-size: 0.95rem;
}

.chat-layout {
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.chat-layout-primary {
  min-height: calc(100vh - 118px);
  align-items: stretch;
}

.chat-thread-list,
.chat-message-list,
.file-entry-list {
  gap: 10px;
}

.chat-sidebar-panel.card,
.chat-thread-panel.card {
  display: grid;
  align-content: start;
  gap: 16px;
}

.chat-layout-primary .chat-sidebar-panel.card,
.chat-layout-primary .chat-thread-panel.card {
  min-height: calc(100vh - 158px);
}

.chat-layout-primary .chat-thread-panel.card {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.chat-layout-primary .chat-message-list {
  overflow-y: auto;
  align-content: start;
  padding-right: 4px;
}

.chat-thread-link,
.chat-message,
.chat-empty-state,
.file-entry,
.feed-card,
.composer-card,
.assistant-thread-row,
.assistant-memory-item {
  background: #ffffff;
  border: 1px solid #dcdcde;
  border-radius: 6px;
}

.chat-thread-link.is-active,
.file-entry.is-selected {
  background: #f6f7f7;
  border-color: #a7aaad;
}

.chat-message.is-assistant,
.chat-message.is-user {
  background: #ffffff;
}

.chat-message-body {
  line-height: 1.65;
}

.app-route-chat .topbar {
  padding: 14px 20px;
}

.app-route-chat .topbar h1 {
  font-size: 1.35rem;
}

.app-route-chat .page-column {
  padding-top: 18px;
}

.chat-composer-meta,
.file-browser-grid,
.settings-primary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-secondary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.file-browser-grid {
  gap: 20px;
}

.breadcrumbs,
.file-entry-main span,
.file-entry-meta,
.chat-thread-link span,
.chat-thread-meta,
.chat-message-meta,
.chat-empty-state p {
  color: #646970;
}

.primary-button,
.ghost-button {
  border-radius: 6px;
  padding: 9px 14px;
  box-shadow: none;
}

.primary-button {
  background: #2271b1;
}

.ghost-button {
  background: #f6f7f7;
  border-color: #c3c4c7;
  color: #1d2327;
}

.sidebar .ghost-button {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f6f7f7;
}

.tab-strip {
  gap: 8px;
  padding-bottom: 0;
}

.tab-link {
  padding: 8px 12px;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #dcdcde;
  color: #50575e;
}

.tab-link.is-active {
  background: #2271b1;
  border-color: #2271b1;
  color: #ffffff;
  box-shadow: none;
}

.chip {
  background: #edf6fb;
  color: #2271b1;
  border-color: #cfe2f2;
}

.chip.subtle,
.status-pill {
  background: #f6f7f7;
  color: #50575e;
  border: 1px solid #dcdcde;
}

input,
textarea,
select {
  border-radius: 6px;
  border: 1px solid #8c8f94;
  background: #ffffff;
  padding: 10px 12px;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(34, 113, 177, 0.18);
  border-color: #2271b1;
}

.code-block,
.doc-preview {
  background: #f6f7f7;
  border: 1px solid #dcdcde;
  border-radius: 6px;
  color: #1d2327;
}

.menu-manager-list {
  display: grid;
  gap: 10px;
}

.menu-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #dcdcde;
  border-radius: 6px;
  background: #f6f7f7;
}

.menu-item-copy {
  display: grid;
  gap: 4px;
}

.menu-item-copy span {
  color: #646970;
  font-size: 0.92rem;
}

.menu-item-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-item-controls input {
  width: auto;
}

.settings-card-emphasis {
  border-color: #c3c4c7;
  box-shadow: none;
}

.auth-screen {
  background: #f0f0f1;
}

.auth-panel {
  width: min(480px, 100%);
  border-radius: 8px;
}

.auth-screen.partner-auth-screen {
  background:
    linear-gradient(180deg, #fff9f3 0%, #ffe1e8 100%);
}

.auth-screen.partner-auth-screen .partner-auth-frame {
  width: min(480px, 100%);
}

.auth-screen.partner-auth-screen .auth-panel.partner-auth-panel {
  width: 100%;
  border-color: #f0b8c4;
  border-radius: 20px;
  background: #fffdf8;
  box-shadow: 0 24px 60px rgba(130, 59, 70, 0.12);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
    position: static;
  }

  .sidebar-nav {
    padding-bottom: 12px;
  }

  .chat-layout,
  .chat-composer-meta,
  .file-browser-grid,
  .settings-primary-grid,
  .settings-secondary-grid {
    grid-template-columns: 1fr;
  }

  .page-column {
    padding: 18px;
  }
}

/* Chat-first shell and contextual sidebars */

:root {
  --studio-header-height: 64px;
  --studio-shell-bg: var(--parchment);
  --studio-line: rgba(107, 114, 128, 0.24);
  --studio-panel: var(--parchment-soft);
  --studio-sidebar: rgba(245, 236, 215, 0.82);
  --studio-text: var(--midnight);
  --studio-muted: var(--slate);
  --studio-accent: var(--evergreen);
  --studio-accent-soft: rgba(45, 80, 22, 0.08);
  --studio-link: var(--amber);
  --studio-link-strong: var(--amber-deep);
  --studio-focus: var(--focus-ring);
  --studio-shadow: 0 12px 28px rgba(26, 26, 26, 0.06);
  --studio-shadow-strong: 0 22px 46px rgba(26, 26, 26, 0.12);
}

body {
  background: var(--studio-shell-bg);
  color: var(--studio-text);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--studio-shell-bg);
}

.studio-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--studio-line);
}

.studio-header-inner {
  min-height: var(--studio-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  min-width: 0;
  width: 100%;
  overflow: visible;
  padding: 10px 16px;
}

.studio-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 0 0 auto;
}

.studio-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.studio-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--studio-accent);
  color: #ffffff;
  font-weight: 700;
}

.studio-brand-name {
  font-size: 1rem;
}

.studio-environment-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #f0d2a3;
  background: #fff3df;
  color: #8b5a12;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.studio-environment-cluster {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.studio-environment-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.studio-environment-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(245, 236, 215, 0.28);
  background: rgba(245, 236, 215, 0.14);
  color: var(--parchment);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.studio-environment-action:hover:not(:disabled) {
  background: rgba(245, 236, 215, 0.32);
  border-color: rgba(245, 236, 215, 0.62);
  box-shadow: 0 8px 18px rgba(26, 26, 26, 0.14);
  transform: translateY(-1px);
}

.studio-environment-action.is-secondary {
  color: rgba(245, 236, 215, 0.9);
}

.studio-environment-action:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(26, 26, 26, 0.12);
}

.studio-environment-action:disabled {
  opacity: 0.55;
  cursor: default;
}

.app-shell.app-env-staging .studio-header {
  border-bottom-color: #ebd4aa;
  box-shadow: inset 0 3px 0 #f4b866;
}

.studio-topnav {
  display: flex;
  gap: 4px;
  align-items: center;
  min-width: 0;
  flex: 0 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.studio-topnav::-webkit-scrollbar {
  display: none;
}

.studio-topnav-link {
  padding: 7px 10px;
  border-radius: 8px;
  color: #50575e;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
}

.studio-topnav-link:hover,
.studio-topnav-link.is-active {
  background: #f3f4f6;
  color: var(--studio-text);
  box-shadow: none;
}

.studio-header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.studio-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.studio-notification-wrap {
  position: relative;
  order: 2;
}

.studio-header-actions > .desktop-header-link {
  order: 1;
}

.studio-notification-button,
.studio-profile-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(124, 58, 237, 0.24);
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.studio-notification-button:hover,
.studio-notification-wrap.is-open .studio-notification-button,
.studio-profile-toggle:hover,
.studio-profile-toggle.is-open {
  border-color: rgba(124, 58, 237, 0.38);
  background: rgba(124, 58, 237, 0.13);
  color: #6d28d9;
  box-shadow: 0 10px 22px rgba(124, 58, 237, 0.12);
}

.studio-notification-icon {
  width: 19px;
  height: 19px;
}

.studio-notification-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #7c3aed;
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 13px;
  text-align: center;
}

.studio-notification-tray {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 120;
  width: min(360px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 22px 48px rgba(39, 24, 71, 0.16);
}

.studio-notification-tray-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.12);
}

.studio-notification-tray-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.studio-notification-tray-actions button {
  border: 0;
  background: transparent;
  color: #6d28d9;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 650;
}

.studio-notification-list {
  display: grid;
  max-height: min(420px, calc(100vh - 140px));
  overflow-y: auto;
}

.studio-notification-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.09);
  background: #ffffff;
}

.studio-notification-item.is-unread {
  background: rgba(124, 58, 237, 0.06);
}

.studio-notification-item a {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.studio-notification-item strong {
  color: #251b3f;
  font-size: 0.9rem;
  line-height: 1.25;
}

.studio-notification-item span {
  color: #6b617a;
  font-size: 0.82rem;
  line-height: 1.35;
}

.studio-notification-item button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #8a7b9f;
  cursor: pointer;
}

.studio-notification-item button:hover {
  background: rgba(124, 58, 237, 0.1);
  color: #6d28d9;
}

.studio-notification-empty {
  padding: 18px 14px;
  color: #6b617a;
  font-size: 0.9rem;
}

.header-text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border: none;
  background: transparent;
  color: #4b5563;
  cursor: pointer;
  font-size: 0.9rem;
}

.header-text-link:hover {
  color: var(--studio-text);
}

.mobile-primary-nav-toggle {
  display: none;
}

.studio-profile-toggle {
  display: inline-flex;
}

.mobile-primary-nav {
  display: none;
  position: absolute;
  top: calc(100% - 4px);
  right: 12px;
  width: min(240px, calc(100vw - 24px));
  border: 1px solid var(--studio-line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  overflow: hidden;
}

.mobile-primary-nav.is-open {
  display: block;
}

.mobile-primary-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f2f4;
}

.mobile-primary-nav-links {
  display: grid;
  gap: 2px;
  padding: 8px;
}

.mobile-primary-nav-link {
  padding: 10px 12px;
  border-radius: 10px;
  color: #4b5563;
}

.mobile-primary-nav-link.is-active {
  background: #f3f4f6;
  color: var(--studio-text);
}

.mobile-context-toggle {
  display: none;
}

.global-shell-error {
  margin: 16px 20px 0;
}

.shell-stage {
  min-height: 100vh;
  padding-top: var(--studio-header-height);
}

.app-route-admin .shell-stage {
  background: linear-gradient(90deg, #1d2327 0 248px, #f6f7f7 248px);
}

@media (max-width: 760px) {
  .app-route-admin .shell-stage {
    background: #f6f7f7;
  }
}

.workspace-page {
  min-height: calc(100vh - var(--studio-header-height));
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  background: #ffffff;
}

.workspace-overlay {
  display: none;
}

.context-sidebar {
  min-height: calc(100vh - var(--studio-header-height));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px 12px;
  background: var(--studio-sidebar);
  border-right: 1px solid var(--studio-line);
}

.context-sidebar-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.chat-context-sidebar .context-sidebar-header {
  align-items: center;
}

.context-sidebar-header h2 {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.context-sidebar-header p {
  margin-top: 4px;
  font-size: 0.84rem;
  line-height: 1.45;
}

.context-sidebar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.context-section-label {
  margin-right: auto;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--studio-muted);
}

.context-sidebar-close {
  display: none;
}

.context-sidebar-scroll {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 4px;
}

.context-sidebar-footer-guide {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin-top: 14px;
  padding-top: 14px;
  background: linear-gradient(180deg, rgba(247, 247, 248, 0), rgba(247, 247, 248, 0.94) 26px, rgba(247, 247, 248, 0.98));
}

.context-nav-list {
  display: grid;
  gap: 6px;
}

.context-nav-link {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid transparent;
  color: var(--studio-text);
  background: transparent;
}

.context-nav-link span {
  color: var(--studio-muted);
  font-size: 0.92rem;
}

.context-nav-link:hover,
.context-nav-link.is-active {
  background: #ffffff;
  border-color: var(--studio-line);
}

.context-back-link {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--studio-accent);
  font-weight: 500;
}

.context-section-divider {
  height: 1px;
  background: var(--studio-line);
}

.workspace-main {
  min-width: 0;
  min-height: calc(100vh - var(--studio-header-height));
}

.projects-main,
.project-main-panel,
.memory-main,
.settings-main {
  padding: 20px;
  background: #ffffff;
}

.card,
.hero-panel,
.project-hero,
.memory-card,
.task-card,
.timeline-item,
.doc-card,
.project-mini-card,
.doc-link-card,
.project-launcher-card,
.file-list-card,
.file-preview-card {
  border-radius: 12px;
}

.card,
.hero-panel,
.project-hero,
.memory-card,
.task-card,
.timeline-item,
.doc-card,
.project-mini-card,
.doc-link-card,
.file-list-card,
.file-preview-card {
  padding: 16px;
}

.page-intro h2,
.hero-copy h2,
.project-hero h2 {
  font-size: 1.45rem;
}

.project-launcher-card {
  min-height: 150px;
  padding: 16px;
}

.project-launcher-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 0.88rem;
}

.chat-main-panel {
  min-height: calc(100vh - var(--studio-header-height));
  height: calc(100vh - var(--studio-header-height));
  background: #ffffff;
  overflow: hidden;
}

.chat-context-sidebar,
.projects-context-sidebar,
.project-context-sidebar {
  background: var(--studio-sidebar);
}

.chat-surface,
.chat-stage {
  min-height: calc(100vh - var(--studio-header-height));
}

.chat-surface {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.chat-stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #ffffff;
  height: calc(100vh - var(--studio-header-height));
  overflow: hidden;
}

.chat-stage-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid #f0f1f3;
  background: rgba(255, 255, 255, 0.95);
  position: sticky;
  top: 0;
  z-index: 3;
}

.chat-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-stage-meta {
  min-width: 0;
  color: var(--studio-muted);
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-stage-top-right {
  flex: 0 0 280px;
  display: flex;
  justify-content: flex-end;
}

.chat-attached-files-popover {
  position: relative;
}

.chat-attached-files-popover summary {
  list-style: none;
}

.chat-attached-files-popover summary::-webkit-details-marker {
  display: none;
}

.chat-attached-files-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #e7ebef;
  border-radius: 999px;
  background: #ffffff;
  color: #17212b;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
}

.chat-attached-files-trigger span:last-child {
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(45, 80, 22, 0.08);
  color: #36591d;
  font-size: 0.72rem;
}

.chat-attached-files-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(320px, calc(100vw - 48px));
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #eef1f4;
  border-radius: 18px;
  background: rgba(245, 236, 215, 0.96);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.14);
  z-index: 24;
}

.chat-attached-files-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chat-attached-files-head strong,
.chat-attached-file-copy strong {
  display: block;
  color: #17212b;
}

.chat-attached-files-head span,
.chat-attached-file-copy span,
.chat-attached-files-empty {
  color: #667085;
  font-size: 0.8rem;
  line-height: 1.4;
}

.chat-attached-files-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-attached-files-list {
  display: grid;
  gap: 8px;
  max-height: 224px;
  overflow-y: auto;
}

.chat-attached-file-row {
  display: grid;
  gap: 6px;
}

.chat-attached-file-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #eef1f4;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.chat-attached-file-row.is-missing,
.chat-attached-file-row.is-missing .chat-attached-file-link {
  opacity: 0.7;
}

.chat-attached-file-copy {
  min-width: 0;
}

.chat-attached-file-copy strong,
.chat-attached-file-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-attached-file-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(45, 80, 22, 0.08);
  color: #36591d;
  font-size: 0.72rem;
  font-weight: 600;
}

.chat-attached-file-remove {
  justify-self: end;
  border: none;
  background: transparent;
  color: #7b4e19;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.compact-field {
  min-width: 0;
}

.compact-field span {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--studio-muted);
}

.compact-select-field {
  gap: 4px;
}

.compact-select-field select,
.compact-select-field input {
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f7f7f8;
}

.model-picker-field {
  min-width: 220px;
}

.chat-scroll-region {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: #ffffff;
}

.chat-transcript {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 32px 20px 176px;
  display: grid;
  align-content: start;
  gap: 22px;
}

.chat-transcript-callout {
  width: 100%;
}

.agent-capability-banner {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #d7e6dc;
  background: #f4faf6;
  color: #335b3f;
}

.agent-capability-banner strong {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.agent-capability-banner span {
  font-size: 0.9rem;
  line-height: 1.5;
}

.agent-workspace-meta {
  display: grid;
  gap: 3px;
  margin-top: 4px;
  font-size: 0.78rem;
  color: #42664c;
}

.agent-workspace-meta strong {
  font-weight: 600;
}

.chat-message-list {
  display: grid;
  gap: 22px;
}

.chat-message-row {
  display: flex;
}

.chat-message-row.is-user {
  justify-content: flex-end;
}

.chat-message-row.is-assistant {
  justify-content: flex-start;
}

.chat-message {
  max-width: min(760px, 100%);
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
}

.chat-message-row.is-user .chat-message {
  max-width: min(540px, 82%);
  padding: 12px 16px;
  border-radius: 24px;
  background: var(--studio-accent-soft);
}

.chat-message-row.is-assistant .chat-message {
  max-width: min(760px, 100%);
}

.chat-message.is-pending {
  display: grid;
  gap: 12px;
}

.chat-message.is-pending-user {
  opacity: 0.9;
}

.chat-message-meta {
  display: none;
}

.chat-message-body {
  line-height: 1.68;
  color: var(--studio-text);
}

.chat-message-body a,
.memory-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  word-break: break-word;
}

.chat-message-body a:hover,
.memory-body a:hover {
  color: var(--accent-strong);
}

.rich-text-image-link {
  display: inline-block;
  margin: 0.45rem 0 0.2rem;
}

.rich-text-image {
  display: block;
  max-width: min(100%, 640px);
  max-height: 440px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #f7f8fa;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.chat-message-body > * + * {
  margin-top: 0.9em;
}

.chat-thinking-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  font-size: 0.82rem;
  font-weight: 600;
  color: #9ca3af;
  animation: studioThinkingPulse 1.2s ease-in-out infinite;
}

.chat-thinking-label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.72;
}

@keyframes studioThinkingPulse {
  0%,
  100% {
    opacity: 0.42;
  }

  50% {
    opacity: 1;
  }
}

.agent-activity-panel {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #eaedf0;
  border-radius: 14px;
  background: #f8fafb;
}

.agent-activity-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7280;
}

.agent-activity-list {
  display: grid;
  gap: 6px;
}

.agent-activity-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: #4b5563;
}

.agent-activity-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: #b5bcc5;
}

.tool-usage-note {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.76rem;
  color: #5f6b76;
}

.tool-usage-note.is-none {
  color: #7c8792;
}

.tool-usage-note.is-approval-required {
  color: #8a4b08;
}

.tool-event-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tool-image-preview-list {
  display: grid;
  gap: 14px;
  margin-bottom: 12px;
}

.tool-image-preview-card {
  margin: 0;
  display: grid;
  gap: 10px;
}

.tool-image-preview {
  display: block;
  width: min(100%, 560px);
  max-height: 420px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #f7f8fa;
}

.tool-image-preview-card figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  color: #667085;
  font-size: 0.9rem;
}

.tool-image-preview-card figcaption a {
  color: var(--accent);
  text-decoration: none;
}

.tool-image-preview-card figcaption a:hover {
  color: var(--accent-strong);
}

.tool-event-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 0.78rem;
  line-height: 1.2;
}

.tool-event-chip strong {
  font-size: 0.76rem;
  font-weight: 600;
  color: #111827;
}

.tool-event-chip.is-completed {
  background: #eef6f0;
  color: #336043;
}

.tool-event-chip.is-warning {
  background: #fff5e6;
  color: #8a4b08;
}

.tool-event-chip.is-approval-required {
  background: #fff6e5;
  color: #8a4b08;
}

.tool-event-chip.is-error {
  background: #fef0f0;
  color: #991b1b;
}

.approval-card {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #f1d8b4;
  border-radius: 16px;
  background: #fffaf1;
  color: #6b4d16;
}

.approval-card p {
  color: #8a6b2d;
  font-size: 0.92rem;
}

.approval-card-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b7791f;
}

.approval-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chat-empty-state {
  width: min(560px, 100%);
  margin: 18vh auto 0;
  text-align: center;
  border: none;
  background: transparent;
  padding: 0;
}

.chat-empty-state h3 {
  font-size: 1.6rem;
}

/* Email client cleanup */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.email-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: calc(100vh - var(--studio-header-height));
  gap: 0;
}

.email-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.email-toolbar-left,
.email-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.email-toolbar-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.email-toolbar-copy h2 {
  font-size: 1.05rem;
  font-weight: 600;
}

.email-toolbar-copy .muted {
  max-width: 28ch;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-toolbar-note {
  font-size: 0.84rem;
  color: #6b7280;
}

.email-account-switcher {
  min-width: 0;
}

.email-account-switcher select {
  min-width: 190px;
  max-width: 240px;
  height: 32px;
  padding: 0 28px 0 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f8fafc;
  color: #111827;
  font-size: 0.84rem;
}

.email-button,
.email-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 500;
  box-shadow: none;
}

.email-button:hover,
.email-icon-button:hover {
  background: #f9fafb;
}

.email-button.primary {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
}

.email-button.secondary {
  background: #ffffff;
}

.email-icon-button {
  width: 32px;
  padding: 0;
}

.email-icon-button svg,
.email-button svg {
  width: 15px;
  height: 15px;
}

.email-layout {
  display: grid;
  grid-template-columns: 190px minmax(320px, 420px) minmax(0, 1fr);
  min-height: calc(100vh - var(--studio-header-height) - 54px);
  gap: 0;
}

.email-layout.is-list-only {
  grid-template-columns: 190px minmax(0, 1fr);
}

.email-pane {
  min-width: 0;
  min-height: 0;
  background: #ffffff;
}

.email-folder-pane,
.email-thread-pane {
  border-right: 1px solid #e5e7eb;
}

.email-folder-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  gap: 10px;
  padding: 12px 8px 12px 10px;
}

.email-pane-header,
.email-list-toolbar {
  padding: 0 6px 8px;
  border-bottom: 1px solid #f1f5f9;
}

.email-list-toolbar {
  padding: 10px 12px;
}

.email-thread-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.email-thread-pane.is-expanded {
  min-width: 0;
}

.email-detail-pane {
  overflow: auto;
  padding: 16px 18px 20px;
}

.email-folder-list,
.email-thread-list {
  min-height: 0;
  overflow: auto;
}

.email-folder-list {
  display: grid;
  align-content: start;
  gap: 2px;
}

.email-folder-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #374151;
  font-size: 0.87rem;
}

.email-folder-link:hover {
  background: #f3f4f6;
}

.email-folder-link.is-active {
  background: #e8eefc;
  color: #1d4ed8;
}

.email-folder-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.email-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px auto;
  gap: 8px;
  align-items: center;
}

.email-search-input,
.email-search-form select {
  width: 100%;
  min-height: 34px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  padding: 0 10px;
  font-size: 0.84rem;
}

.email-thread-list {
  display: block;
}

.email-thread-link {
  display: block;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
  background: #ffffff;
}

.email-thread-link:hover {
  background: #f8fafc;
}

.email-thread-link.is-active {
  background: #eef4ff;
}

.email-thread-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.email-thread-row-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.35;
}

.email-thread-from {
  flex: 0 0 112px;
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
  font-weight: 500;
  color: #111827;
}

.email-thread-subject {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
  font-weight: 500;
  color: #1f2937;
}

.email-thread-snippet-inline {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  color: #6b7280;
}

.email-thread-row-side {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.email-thread-date {
  font-size: 0.75rem;
  color: #6b7280;
}

.email-thread-badge,
.email-thread-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
}

.email-thread-badge {
  background: #dbeafe;
  color: #1d4ed8;
}

.email-thread-flag {
  background: #f3f4f6;
  color: #4b5563;
}

.email-empty-panel,
.email-detail-empty {
  padding: 20px 16px;
}

.email-message-card {
  padding: 14px 0 16px;
  border: none;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
  background: transparent;
}

.email-message-card:last-child {
  border-bottom: none;
}

.email-message-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.email-message-body {
  margin-top: 10px;
  font-size: 0.95rem;
}

.email-settings-modal {
  border-radius: 14px;
}

@media (max-width: 1180px) {
  .email-layout {
    grid-template-columns: 170px minmax(280px, 360px) minmax(0, 1fr);
  }

  .email-layout.is-list-only {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  .email-thread-from {
    flex-basis: 96px;
    max-width: 96px;
  }
}

@media (max-width: 980px) {
  .email-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .email-toolbar-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .email-account-switcher,
  .email-account-switcher select {
    width: 100%;
    max-width: none;
  }

  .email-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .email-folder-pane,
  .email-thread-pane {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }

  .email-thread-pane {
    min-height: 320px;
  }

  .email-search-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .email-thread-row-main {
    gap: 6px;
  }

  .email-thread-from {
    flex-basis: 84px;
    max-width: 84px;
  }
}

.email-inline-notice a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  margin-left: 6px;
}

.email-thread-star {
  flex: 0 0 auto;
  color: #d97706;
  font-size: 0.78rem;
  line-height: 1;
}

.email-list-footer {
  display: flex;
  justify-content: center;
  padding: 12px 0 18px;
}

.email-load-more-link {
  color: #4b5563;
  font-size: 0.84rem;
  text-decoration: underline;
}

.email-thread-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.chat-composer-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 14px 20px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #ffffff 34%);
  z-index: 36;
}

@media (min-width: 861px) {
  .chat-page {
    min-height: calc(100vh - var(--studio-header-height));
    height: calc(100vh - var(--studio-header-height));
    overflow: hidden;
  }

  .chat-page .context-sidebar,
  .chat-page .workspace-main,
  .chat-page .chat-main-panel {
    min-height: 0;
    height: 100%;
  }

  .chat-page .context-sidebar {
    overflow: hidden;
  }

  .chat-page .context-sidebar-scroll {
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
  }

  .chat-page .chat-main-panel,
  .chat-page .chat-surface,
  .chat-page .chat-stage {
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  .chat-page .chat-scroll-region {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
  }

  .chat-page .chat-composer-dock {
    left: 260px;
    width: auto;
  }
}

.chat-composer-shell {
  width: min(760px, 100%);
  margin: 0 auto;
  border-radius: 26px;
  border: 1px solid #d7dbe0;
  background: #ffffff;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
  overflow: visible;
}

.chat-composer-shell textarea {
  min-height: 42px;
  max-height: 180px;
  border: none;
  resize: none;
  padding: 12px 16px 8px;
  background: transparent;
  line-height: 1.45;
  overflow-y: hidden;
}

.chat-composer-shell textarea:focus {
  outline: none;
}

.chat-composer-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 10px;
  border-top: 1px solid #eef1f4;
  background: #ffffff;
}

.chat-composer-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.chat-composer-menu {
  position: relative;
}

.chat-composer-menu summary {
  list-style: none;
}

.chat-composer-menu summary::-webkit-details-marker {
  display: none;
}

.chat-composer-menu-trigger {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #55606c;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

.chat-composer-menu-trigger:hover,
.chat-composer-menu[open] .chat-composer-menu-trigger {
  background: #f3f4f6;
  color: #111827;
}

.chat-composer-menu-trigger .plus-icon {
  width: 17px;
  height: 17px;
}

.chat-composer-menu-pop {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  min-width: 236px;
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid #e3e7eb;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.14);
  z-index: 30;
}

.chat-composer-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #334155;
  text-align: left;
  cursor: pointer;
}

.chat-composer-menu-item:hover {
  background: #f5f7fa;
}

.chat-composer-menu-item.is-disabled,
.chat-composer-menu-item:disabled {
  color: #95a1ad;
  cursor: not-allowed;
}

.chat-composer-menu-item.is-disabled:hover,
.chat-composer-menu-item:disabled:hover {
  background: transparent;
}

.chat-model-bottom {
  min-width: 0;
  flex: 1 1 auto;
  max-width: 220px;
  padding: 0 2px 0 0;
}

.chat-composer-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.chat-voice-button {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7dbe0;
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.chat-voice-button:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #111827;
  transform: translateY(-1px);
}

.chat-voice-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.chat-voice-button.is-active {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
}

.chat-voice-button.is-speaking {
  background: #ecfeff;
  border-color: #a5f3fc;
  color: #0f766e;
}

.chat-voice-button.is-listening {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
  animation: studioVoicePulse 1.15s ease-in-out infinite;
}

.chat-voice-button .mic-icon,
.chat-voice-button .speaker-icon {
  width: 16px;
  height: 16px;
}

@keyframes studioVoicePulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.06);
  }
}

.chat-voice-status {
  padding: 0 16px 12px;
  font-size: 0.77rem;
  color: #64748b;
}

.chat-voice-status.is-error {
  color: #b91c1c;
}

.chat-send-button {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.chat-send-button:hover {
  background: #1f2937;
  transform: translateY(-1px);
}

.chat-send-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.chat-send-button.is-stop {
  background: #e5e7eb;
  color: #111827;
}

.chat-send-button.is-stop:hover {
  background: #d1d5db;
}

.chat-send-button .send-icon,
.chat-send-button .stop-icon {
  width: 16px;
  height: 16px;
}

.chat-hidden-submit {
  display: none;
}

.chat-thread-list {
  display: grid;
  gap: 2px;
}

.chat-topic-section {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.chat-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chat-section-heading h3 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}

.chat-section-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-topic-list {
  display: grid;
  gap: 2px;
}

.chat-topic-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px;
}

.chat-topic-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 8px 8px 10px;
  border-radius: 10px;
  background: transparent;
  color: inherit;
}

.chat-topic-row.is-active {
  background: #eceef0;
  border-radius: 10px;
}

.chat-topic-link:hover,
.chat-topic-link.is-active,
.chat-topic-row.is-active .chat-topic-link {
  background: transparent;
}

.chat-topic-link strong {
  min-width: 0;
  font-size: 0.84rem;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-topic-age {
  font-size: 0.68rem;
  font-weight: 600;
  color: #7a7f87;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.chat-topic-row .chat-thread-menu {
  padding-right: 0;
}

.chat-topic-row .chat-thread-menu-trigger {
  width: 28px;
  height: 28px;
}

.chat-thread-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 2px;
  border-radius: 10px;
  position: relative;
}

.chat-thread-row.is-active {
  background: #eceef0;
}

.chat-thread-link {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  border: none;
  background: transparent;
}

.chat-thread-link:hover,
.chat-thread-link.is-active {
  background: #eceef0;
  transform: none;
}

.chat-thread-row.is-active .chat-thread-link {
  background: transparent;
}

.chat-thread-link strong {
  font-size: 0.9rem;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-thread-link span,
.chat-thread-meta {
  display: none;
}

.chat-thread-menu {
  position: relative;
  padding-right: 4px;
}

.chat-thread-menu summary {
  list-style: none;
}

.chat-thread-menu summary::-webkit-details-marker {
  display: none;
}

.chat-thread-menu-trigger {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #6b7280;
  border-radius: 8px;
  cursor: pointer;
}

.chat-thread-menu-trigger:hover,
.chat-thread-menu[open] .chat-thread-menu-trigger {
  background: #e5e7eb;
  color: #111827;
}

.chat-menu-icon {
  width: 16px;
  height: 16px;
}

.chat-thread-menu-pop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 140px;
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--studio-line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
  z-index: 8;
}

.chat-thread-menu-item {
  width: 100%;
  border: none;
  background: transparent;
  color: #111827;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.chat-thread-menu-item:hover {
  background: #f3f4f6;
}

.chat-thread-menu-item.danger {
  color: #991b1b;
}

.chat-thread-menu-item.danger:hover {
  background: #fee2e2;
  color: #991b1b;
}

.chat-context-sidebar .context-sidebar-actions .primary-button {
  width: 100%;
  background: #ffffff;
  color: var(--studio-text);
  border: 1px solid var(--studio-line);
}

.chat-new-trigger,
.chat-private-trigger,
.chat-topic-create-trigger {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  border-radius: 12px;
  border: 1px solid var(--studio-line);
  background: #ffffff;
  color: #4b5563;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.chat-new-trigger:hover,
.chat-private-trigger:hover,
.chat-topic-create-trigger:hover {
  background: #f3f4f6;
  border-color: #d2d6dc;
  color: #111827;
}

.chat-sidebar-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.new-chat-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.plus-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.private-chat-banner {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--studio-line);
  color: #4b5563;
}

.private-chat-banner strong {
  display: block;
  margin-bottom: 2px;
  color: #111827;
  font-size: 0.88rem;
}

.private-chat-banner span {
  display: block;
  font-size: 0.8rem;
  line-height: 1.45;
}

.ghost-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.chat-stage-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.project-main-panel > .project-hero {
  margin-bottom: 24px;
}

.project-chat-main .chat-stage,
.project-chat-main .chat-surface {
  min-height: calc(100vh - var(--studio-header-height));
}

@media (max-width: 1100px) {
}

@media (max-width: 980px) {
  .studio-header-inner {
    padding: 12px 14px;
  }

  .studio-topnav {
    display: none;
  }

  .studio-header-left {
    gap: 10px;
  }

  .studio-header-right {
    gap: 8px;
  }

  .mobile-primary-nav-toggle {
    display: inline-flex;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--studio-line);
    border-radius: 10px;
    background: #ffffff;
    color: var(--studio-text);
  }

  .mobile-context-toggle {
    display: inline-flex;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--studio-line);
    background: #ffffff;
    color: var(--studio-text);
  }

  .workspace-page {
    grid-template-columns: 1fr;
    position: relative;
  }

  .workspace-overlay {
    position: fixed;
    inset: var(--studio-header-height) 0 0 0;
    border: none;
    background: rgba(15, 23, 42, 0.4);
    z-index: 19;
  }

  .context-sidebar {
    position: fixed;
    top: var(--studio-header-height);
    left: 0;
    bottom: 0;
    width: min(86vw, 340px);
    min-height: auto;
    z-index: 20;
    transform: translateX(-100%);
    transition: transform 180ms ease;
    box-shadow: 14px 0 34px rgba(15, 23, 42, 0.14);
  }

  .workspace-page.is-sidebar-open .context-sidebar {
    transform: translateX(0);
  }

  .workspace-page.is-sidebar-open .workspace-overlay {
    display: block;
  }

  .context-sidebar-close {
    display: inline-flex;
  }

  .workspace-main,
  .chat-main-panel,
  .projects-main,
  .project-main-panel {
    min-height: calc(100vh - var(--studio-header-height));
  }

  .projects-main,
  .project-main-panel {
    padding: 18px;
  }

  .chat-stage-top {
    align-items: flex-start;
    padding: 10px 14px;
    flex-wrap: wrap;
  }

  .chat-stage-top-right {
    flex: 1 1 100%;
    justify-content: flex-start;
  }

  .chat-attached-files-panel {
    left: 0;
    right: auto;
    width: min(360px, calc(100vw - 48px));
  }

  .chat-transcript {
    padding: 22px 14px 146px;
  }

  .chat-composer-dock {
    padding: 12px 12px 16px;
  }
}

@media (max-width: 720px) {
  .studio-header-actions {
    gap: 8px;
  }

  .header-text-link,
  .mobile-context-toggle {
    padding: 6px 8px;
  }

  .studio-header-actions > .header-text-link:not(.mobile-primary-nav-toggle),
  .studio-header-inner {
    gap: 10px;
    padding: 10px 12px;
  }

  .studio-header-left {
    gap: 8px;
  }

  .studio-header-right {
    gap: 6px;
  }

  .studio-brand-name {
    display: none;
  }

  .studio-environment-badge {
    min-height: 24px;
    padding: 0 8px;
    font-size: 0.72rem;
  }

  .studio-environment-actions {
    gap: 4px;
  }

  .studio-environment-action {
    min-height: 24px;
    padding: 0 8px;
    font-size: 0.72rem;
  }

  .mobile-primary-nav {
    right: 10px;
    width: min(220px, calc(100vw - 20px));
  }

  .chat-new-trigger,
  .chat-private-trigger,
  .chat-topic-create-trigger {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .projects-main,
  .project-main-panel,
  .page-column {
    padding: 14px;
  }

  .chat-message {
    max-width: 100%;
  }

  .chat-message-row.is-user .chat-message {
    max-width: 92%;
  }

  .chat-thread-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 6px;
  }

  .chat-thread-menu {
    padding: 0 2px 0 0;
    align-self: start;
  }

  .chat-thread-link {
    min-width: 0;
  }

  .chat-thread-menu-trigger {
    margin-top: 2px;
  }

  .chat-composer-nav {
    width: 100%;
    gap: 8px;
  }

  .chat-composer-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }

  .chat-model-bottom {
    max-width: none;
  }

  .chat-model-bottom .model-picker-control {
    max-width: 100%;
  }

  .chat-send-button {
    width: 32px;
    height: 32px;
  }

  .chat-voice-button {
    width: 32px;
    height: 32px;
  }
}

.inline-actions.wrap {
  flex-wrap: wrap;
}

.file-editor-form {
  gap: 14px;
}

.inset-card {
  border-color: var(--border);
  background: var(--surface-muted);
  box-shadow: none;
}

.rich-text-block {
  display: grid;
  gap: 10px;
  color: var(--text);
  line-height: 1.65;
  word-break: break-word;
}

.file-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.file-editor-field {
  min-width: 0;
}

.file-editor-input {
  min-height: 420px;
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92rem;
  line-height: 1.55;
}

.file-editor-preview,
.file-diff-panel,
.terminal-panel,
.context-summary-block {
  display: grid;
  gap: 8px;
}

.syntax-preview,
.diff-block,
.terminal-output {
  min-height: 220px;
  max-height: 540px;
  overflow: auto;
}

.terminal-output {
  background: #111827;
  color: #e5edf5;
  border-color: #1f2937;
}

.git-status-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 8px 0;
  border-top: 1px solid rgba(220, 220, 222, 0.7);
}

.git-status-row:first-child {
  border-top: none;
}

.context-summary-block strong {
  font-size: 0.9rem;
}

.context-summary-block span {
  color: #646970;
}

.callout.warning {
  background: rgba(180, 83, 9, 0.12);
  border-color: rgba(180, 83, 9, 0.22);
  color: #92400e;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.chevron-down-icon,
.profile-menu-icon,
.sidebar-dock-icon,
.close-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(214, 219, 226, 0.92);
  border-radius: 999px;
  background: #ffffff;
  color: #5c6673;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.icon-button:hover {
  background: #f5f7fa;
  color: #111827;
  border-color: #c8d0da;
}

.mobile-primary-nav-overlay {
  display: none;
}

.mobile-primary-nav-toggle,
.mobile-context-toggle {
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(214, 219, 226, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #556070;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.mobile-primary-nav-toggle:hover,
.mobile-context-toggle:hover {
  background: #ffffff;
  color: #111827;
  border-color: #cfd6df;
}

.studio-profile-toggle {
  border-color: rgba(124, 58, 237, 0.24);
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
}

.studio-profile-toggle:hover,
.studio-profile-toggle.is-open {
  border-color: rgba(124, 58, 237, 0.38);
  background: rgba(124, 58, 237, 0.13);
  color: #6d28d9;
  box-shadow: 0 10px 22px rgba(124, 58, 237, 0.12);
}

.studio-profile-menu {
  width: min(220px, calc(100vw - 24px));
}

.studio-profile-menu-links:empty {
  display: none;
}

.studio-profile-menu .mobile-primary-nav-utility {
  border-top: 0;
}

.mobile-primary-nav-toggle.is-open .chevron-down-icon {
  transform: rotate(180deg);
}

.chat-toolbar {
  gap: 12px;
}

.chat-provider-field,
.chat-model-inline {
  min-width: 0;
  display: inline-flex;
  align-items: center;
}

.chat-provider-field select,
.chat-model-inline .model-picker-control {
  min-width: 0;
  appearance: none;
  border: none;
  background: transparent;
  box-shadow: none;
  height: auto;
  padding: 0 16px 0 0;
  border-radius: 0;
  color: #556070;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.3;
}

.chat-provider-field select:focus,
.chat-model-inline .model-picker-control:focus {
  outline: none;
  color: #111827;
}

.chat-model-inline {
  position: relative;
  padding-right: 2px;
}

.chat-inline-arrow {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.82rem;
  color: #6b7280;
  pointer-events: none;
}

  .chat-stage-top {
    min-height: 50px;
  }

  .chat-stage-meta {
    font-size: 0.82rem;
  }

.mobile-primary-nav-utility {
  display: grid;
  gap: 2px;
  padding: 0 10px 10px;
  border-top: 1px solid rgba(231, 235, 240, 0.9);
}

.mobile-primary-nav-link.utility-link {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

@media (max-width: 980px) {
  .studio-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
  }

  .studio-header-inner {
    padding: 10px 14px;
  }

  .studio-header-right {
    justify-content: flex-end;
  }

  .studio-topnav,
  .desktop-header-link {
    display: none;
  }

  .mobile-primary-nav-toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .mobile-context-toggle {
    display: inline-flex;
    position: fixed;
    left: 12px;
    top: calc(var(--studio-header-height) + 14px);
    z-index: 31;
  }

  .workspace-page.is-sidebar-open .mobile-context-toggle {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
  }

  .mobile-primary-nav-overlay {
    position: fixed;
    inset: var(--studio-header-height) 0 0 0;
    border: none;
    background: rgba(15, 23, 42, 0.16);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
    z-index: 28;
  }

  .mobile-primary-nav-overlay.is-open {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-primary-nav {
    display: block;
    position: fixed;
    top: var(--studio-header-height);
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - var(--studio-header-height));
    border: none;
    border-bottom: 1px solid rgba(224, 229, 235, 0.96);
    border-radius: 0 0 22px 22px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(18px);
    overflow: auto;
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(-100% - 18px));
    transition: transform 220ms ease, opacity 220ms ease;
    z-index: 30;
  }

  .mobile-primary-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .mobile-primary-nav-links,
  .mobile-primary-nav-utility {
    padding-left: 14px;
    padding-right: 14px;
  }

  .mobile-primary-nav-links {
    padding-top: 14px;
    padding-bottom: 10px;
    gap: 4px;
  }

  .mobile-primary-nav-link {
    padding: 12px 4px;
    border-radius: 0;
    border-bottom: 1px solid rgba(238, 241, 244, 0.9);
    color: #3d4753;
    font-size: 0.98rem;
    font-weight: 500;
  }

  .mobile-primary-nav-link.is-active {
    background: transparent;
    color: #111827;
  }

  .mobile-primary-nav-utility {
    gap: 4px;
    padding-top: 8px;
    padding-bottom: 16px;
    border-top: none;
  }

  .workspace-overlay {
    z-index: 29;
  }

  .context-sidebar {
    z-index: 32;
    top: calc(var(--studio-header-height) + 10px);
    left: 10px;
    bottom: 10px;
    width: min(82vw, 320px);
    border: 1px solid rgba(223, 228, 234, 0.95);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 24px 44px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(16px);
  }

  .context-sidebar-header {
    align-items: center;
  }

  .context-sidebar-close {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .chat-stage-top {
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
  }

  .chat-stage-meta {
    display: none;
  }

  .chat-stage-top-right {
    flex: 1 1 100%;
  }

  .chat-attached-files-panel {
    width: calc(100vw - 32px);
  }

  .chat-composer-nav {
    gap: 10px;
  }

  .chat-model-bottom {
    max-width: min(52vw, 220px);
  }

  .chat-model-bottom .model-picker-control {
    max-width: 100%;
    font-size: 0.82rem;
  }

  .chat-composer-menu-pop {
    min-width: 200px;
    max-width: calc(100vw - 40px);
  }

  .chat-transcript {
    padding: 20px 14px 138px;
  }
}

@media (max-width: 720px) {
  .studio-header-inner {
    padding: 10px 12px;
  }

  .mobile-context-toggle {
    left: 10px;
    top: calc(var(--studio-header-height) + 12px);
    width: 36px;
    height: 36px;
  }

  .mobile-primary-nav-toggle {
    width: 36px;
    height: 36px;
  }

  .context-sidebar {
    left: 8px;
    right: auto;
    bottom: 8px;
    width: min(84vw, 300px);
  }

  .chat-stage-top {
    padding: 8px 12px;
  }

  .chat-model-bottom {
    max-width: min(50vw, 200px);
  }

  .chat-model-bottom .model-picker-control {
    max-width: 100%;
    font-size: 0.8rem;
  }
}

.callout.warning strong,
.callout.warning span {
  color: inherit;
}

.tok-keyword {
  color: #7c3aed;
  font-weight: 600;
}

.tok-string {
  color: #0f766e;
}

.tok-number {
  color: #b45309;
}

.tok-heading {
  color: #1d4ed8;
  font-weight: 700;
}

@media (max-width: 980px) {
  .file-editor-grid {
    grid-template-columns: 1fr;
  }

  .syntax-preview,
  .diff-block,
  .terminal-output {
    min-height: 160px;
  }
}

.chat-thread-filter input {
  width: 100%;
  min-height: 36px;
  border: 1px solid #d7dbe0;
  border-radius: 10px;
  background: #ffffff;
  padding: 0 12px;
  color: #1f2937;
}

.chat-thread-section {
  display: grid;
  gap: 6px;
}

.chat-thread-section + .chat-thread-section {
  margin-top: 10px;
}

.chat-thread-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7a7f87;
  padding: 0 4px;
}

.chat-thread-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-thread-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4b5563;
  flex: 0 0 auto;
}

.chat-thread-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #9ca3af;
}

.chat-thread-status.is-running {
  color: #2563eb;
}

.chat-thread-status.is-running .chat-thread-status-dot {
  background: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
  animation: thread-pulse 1.1s ease-in-out infinite;
}

.chat-thread-status.is-waiting_approval {
  color: #b45309;
}

.chat-thread-status.is-waiting_approval .chat-thread-status-dot {
  background: #d97706;
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.14);
}

@keyframes thread-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(0.78);
    opacity: 0.68;
  }
}

.project-chat-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.project-chat-rail {
  display: grid;
  gap: 12px;
  align-content: start;
}

.task-editor-card,
.note-editor-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  background: #fbfcfd;
}

.settings-inline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.chat-thread-link span,
.chat-thread-meta {
  display: block;
}

.chat-thread-meta {
  display: flex;
}

@media (max-width: 980px) {
  .project-chat-layout,
  .settings-inline-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .chat-thread-link span,
  .chat-thread-meta {
    display: none;
  }

  .chat-thread-status {
    font-size: 0.64rem;
  }
}

.chat-thread-list {
  display: grid;
  gap: 1px;
}

.chat-thread-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px;
  padding: 0;
  border-radius: 10px;
}

.chat-thread-link {
  min-width: 0;
  display: block;
  padding: 6px 8px;
  border-radius: 10px;
}

.chat-thread-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
}

.chat-thread-link .chat-thread-title {
  min-width: 0;
  max-width: 100%;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-thread-marker,
.chat-thread-age {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.chat-thread-age {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0;
  color: #7a7f87;
  justify-content: flex-end;
  font-variant-numeric: tabular-nums;
}

.chat-thread-spinner {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 1.6px solid #c4c8cf;
  border-top-color: #6b7280;
  animation: chatThreadSpin 0.8s linear infinite;
}

.chat-thread-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.chat-thread-marker.is-waiting_approval .chat-thread-dot {
  background: #d92d20;
}

.chat-thread-marker.is-completed .chat-thread-dot {
  background: #2563eb;
}

.chat-thread-menu {
  padding-right: 0;
}

.chat-thread-menu-trigger {
  width: 28px;
  height: 28px;
}

.chat-view-more-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 8px 4px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #5b6570;
}

.chat-view-more-link:hover {
  color: #111827;
}

.topic-files-details {
  display: grid;
  gap: 14px;
}

.topic-files-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}

.topic-files-summary::-webkit-details-marker {
  display: none;
}

.topic-files-body {
  display: grid;
  gap: 14px;
}

.scope-documents-card {
  display: grid;
  gap: 14px;
}

.scope-document-list {
  display: grid;
  gap: 10px;
}

.scope-document-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
}

.scope-document-row.is-missing {
  opacity: 0.72;
}

.scope-document-link {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.scope-document-link strong {
  color: var(--studio-text);
}

.scope-document-link span {
  color: var(--studio-muted);
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scope-document-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.topic-file-list {
  display: grid;
  gap: 8px;
}

.topic-file-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-size: 0.84rem;
  color: var(--text);
}

.topic-file-link.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.chat-index-card {
  display: grid;
  gap: 14px;
}

.chat-index-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chat-thread-count {
  font-size: 0.74rem;
  font-weight: 600;
  color: #6b7280;
  white-space: nowrap;
}

.chat-list-filter input {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #d7dbe0;
  border-radius: 10px;
  background: #ffffff;
  color: #1f2937;
}

.chat-thread-list.is-index {
  gap: 2px;
}

@keyframes chatThreadSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .chat-topic-link {
    grid-template-columns: minmax(0, 1fr) 28px;
    gap: 6px;
    padding: 8px 4px 8px 10px;
  }

  .chat-thread-row {
    grid-template-columns: minmax(0, 1fr) 24px;
  }

  .chat-thread-title {
    font-size: 0.78rem;
  }

  .chat-thread-link {
    padding: 6px 4px 6px 8px;
  }

  .chat-thread-topline {
    grid-template-columns: minmax(0, 1fr) 28px;
    gap: 4px;
  }

  .chat-thread-age,
  .chat-thread-marker {
    min-width: 28px;
  }

  .chat-thread-menu-trigger {
    width: 26px;
    height: 26px;
  }
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.35rem;
  padding: 0 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.85rem;
  background: rgba(15, 23, 42, 0.54);
  color: rgba(226, 232, 240, 0.92);
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.secondary-button:hover {
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(30, 41, 59, 0.72);
}

.secondary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.email-shell {
  display: grid;
  gap: 0.9rem;
}

.email-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.email-toolbar-copy {
  display: grid;
  gap: 0.2rem;
}

.email-toolbar-copy h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
}

.email-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.email-gear-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid #dcdcde;
  border-radius: 999px;
  background: #ffffff;
  color: #1f2937;
  text-decoration: none;
}

.email-gear-button svg,
.primary-button svg {
  width: 1rem;
  height: 1rem;
}

.email-inline-notice {
  padding: 0.8rem 1rem;
  border-radius: 10px;
  border: 1px solid #dcdcde;
  background: #ffffff;
  color: #1f2937;
  font-size: 0.92rem;
}

.email-inline-notice.is-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.email-inline-notice.is-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.email-layout {
  display: grid;
  grid-template-columns: minmax(0, 16.5rem) minmax(0, 22rem) minmax(0, 1fr);
  gap: 0.9rem;
  min-height: calc(100vh - 11rem);
}

.email-sidebar,
.email-thread-panel,
.email-detail-panel {
  min-height: 0;
  padding: 0.95rem;
  border-radius: 12px;
}

.email-sidebar,
.email-thread-panel,
.email-detail-panel,
.email-settings-modal,
.email-provider-card,
.email-managed-account-card,
.email-message-card {
  border: 1px solid #dcdcde;
  background: #ffffff;
  box-shadow: none;
}

.email-sidebar,
.email-thread-panel,
.email-detail-panel {
  display: flex;
  flex-direction: column;
}

.email-account-list,
.email-folder-list,
.email-thread-list,
.email-managed-account-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.email-account-link,
.email-folder-link,
.email-thread-link {
  display: block;
  padding: 0.72rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 10px;
  text-decoration: none;
  color: #111827;
  background: #f7f7f8;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.email-account-link:hover,
.email-folder-link:hover,
.email-thread-link:hover {
  background: #f0f0f1;
}

.email-account-link.is-active,
.email-folder-link.is-active,
.email-thread-link.is-active {
  border-color: #cbd5e1;
  background: #eef3ff;
}

.email-account-title {
  display: block;
  font-size: 0.93rem;
  font-weight: 500;
}

.email-account-email,
.email-account-status {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: #6b7280;
}

.email-folder-link,
.email-thread-topline,
.email-thread-subject-row,
.email-message-meta,
.email-search-form,
.email-folder-meta,
.email-settings-header,
.email-toolbar-actions,
.email-provider-card,
.email-managed-account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.email-search-form {
  flex-wrap: wrap;
}

.email-search-input {
  flex: 1 1 14rem;
  min-width: 0;
  min-height: 2.4rem;
  padding: 0 0.85rem;
  border-radius: 8px;
  border: 1px solid #dcdcde;
  background: #ffffff;
  color: #111827;
}

.email-search-form select {
  min-height: 2.4rem;
  border-radius: 8px;
  border: 1px solid #dcdcde;
  background: #ffffff;
}

.email-thread-panel {
  overflow: hidden;
}

.email-thread-list,
.email-detail-panel {
  overflow: auto;
  min-height: 0;
}

.email-thread-from,
.email-thread-subject {
  font-size: 0.9rem;
  font-weight: 500;
}

.email-thread-date,
.email-thread-snippet {
  color: #6b7280;
}

.email-thread-snippet {
  margin: 0.28rem 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
}

.email-empty-panel,
.email-detail-empty {
  padding: 1rem 0.2rem;
}

.email-message-stack {
  gap: 0.75rem;
}

.email-message-card {
  padding: 0.95rem 1rem;
  border-radius: 12px;
}

.email-message-body {
  margin-top: 0.9rem;
  line-height: 1.6;
}

.email-settings-backdrop {
  z-index: 40;
}

.email-settings-dismiss {
  position: fixed;
  inset: 0;
}

.email-settings-modal {
  position: relative;
  z-index: 41;
  width: min(820px, calc(100vw - 2rem));
  max-height: min(88vh, 920px);
  overflow: auto;
  padding: 1.1rem;
  border-radius: 14px;
}

.email-settings-header {
  align-items: flex-start;
}

.email-settings-close {
  color: #6b7280;
  text-decoration: none;
  font-size: 0.9rem;
}

.email-settings-section + .email-settings-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.email-settings-section h4 {
  margin: 0 0 0.65rem;
  font-size: 0.98rem;
  font-weight: 600;
}

.email-settings-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.email-settings-nav {
  display: grid;
  gap: 6px;
}

.email-settings-nav-item {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  color: #374151;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.email-settings-nav-item strong {
  font-size: 0.9rem;
  font-weight: 600;
}

.email-settings-nav-item span {
  font-size: 0.8rem;
  color: #6b7280;
}

.email-settings-nav-item:hover,
.email-settings-nav-item.is-active {
  border-color: #cfd8e3;
  background: #f8fafc;
}

.email-settings-panel {
  min-width: 0;
}

.email-settings-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 1rem;
}

.email-settings-panel-head h4 {
  margin: 0 0 0.3rem;
  font-size: 1.02rem;
}

.email-settings-note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.email-settings-note-card {
  padding: 0.95rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
}

.email-settings-note-card strong {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
}

.email-settings-note-card p {
  margin: 0;
  color: #4b5563;
  font-size: 0.88rem;
  line-height: 1.5;
}

.email-provider-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.email-provider-card,
.email-managed-account-card {
  align-items: flex-start;
  padding: 0.95rem;
  border-radius: 12px;
}

.email-provider-card {
  flex-direction: column;
}

.email-provider-status {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  background: #f3f4f6;
  color: #6b7280;
}

.email-provider-status.is-ready {
  background: #ecfdf5;
  color: #166534;
}

.email-provider-status.is-missing {
  background: #fef2f2;
  color: #991b1b;
}

.small-copy {
  font-size: 0.8rem;
}

.danger-button {
  color: #991b1b;
}

.danger-button:hover {
  border-color: #fecaca;
  background: #fef2f2;
}

.email-managed-account-list.is-legacy .email-managed-account-card {
  background: #fafafa;
}

@media (max-width: 1200px) {
  .email-layout {
    grid-template-columns: minmax(0, 15rem) minmax(0, 18.5rem) minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .email-toolbar,
  .email-settings-header,
  .email-provider-card,
  .email-managed-account-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .email-toolbar-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .email-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .email-thread-list,
  .email-detail-panel,
  .email-settings-modal {
    overflow: visible;
  }

  .email-provider-grid {
    grid-template-columns: 1fr;
  }

  .email-settings-layout {
    grid-template-columns: 1fr;
  }

  .email-settings-panel-head {
    flex-direction: column;
  }

  .email-settings-note-grid {
    grid-template-columns: 1fr;
  }
}

.mail-app-shell {
  position: relative;
  gap: 12px;
}

.mail-topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  background: rgba(238, 242, 245, 0.96);
  backdrop-filter: blur(16px);
}

.mail-topbar-search {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mail-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mail-refresh-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #d6dde5;
  border-radius: 999px;
  background: #ffffff;
  color: #5b6672;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}

.mail-refresh-pill-spinner {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1.6px solid #c4c8cf;
  border-top-color: #8f98a3;
  animation: chatThreadSpin 0.8s linear infinite;
}

.mail-icon-button,
.mail-toolbar-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #4f5b68;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.mail-icon-button:hover,
.mail-toolbar-icon:hover {
  background: #eef2f6;
  color: #111827;
  border-color: #d6dde5;
}

.mail-icon-button svg,
.mail-toolbar-icon svg,
.mail-search-icon svg,
.mail-thread-flagged svg {
  width: 18px;
  height: 18px;
}

.mail-hamburger.is-active {
  background: #e8edf3;
  border-color: #d4dce4;
}

.mail-account-switcher {
  min-width: 0;
}

.mail-account-switcher select {
  min-width: 160px;
  max-width: 210px;
  height: 36px;
  padding: 0 32px 0 12px;
  border: 1px solid #d6dde5;
  border-radius: 999px;
  background: #ffffff;
  color: #344152;
  font-size: 0.84rem;
  font-weight: 500;
  box-shadow: none;
}

.mail-search-form {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #dde3ea;
  border-radius: 999px;
  background: #ffffff;
}

.mail-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
}

.mail-search-input {
  min-width: 0;
  height: 42px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: 0.92rem;
  color: #1f2937;
  outline: none;
}

.mail-search-input:focus {
  outline: none;
  border: none;
}

.mail-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 14;
}

.mail-drawer-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mail-drawer {
  position: absolute;
  top: 68px;
  left: 0;
  width: min(320px, calc(100vw - 48px));
  display: grid;
  gap: 16px;
  padding: 18px 16px 20px;
  border: 1px solid #dde3ea;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.14);
  transform: translateX(-18px);
  opacity: 0;
  pointer-events: none;
  transition: transform 180ms ease, opacity 180ms ease;
  z-index: 15;
}

.mail-drawer.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.mail-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mail-drawer-brand {
  display: grid;
  gap: 3px;
}

.mail-drawer-brand strong {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.mail-drawer-brand span {
  font-size: 0.82rem;
  color: #6b7280;
}

.mail-drawer-settings {
  color: #5b6673;
}

.mail-drawer-section {
  display: grid;
  gap: 10px;
}

.mail-drawer-section h3 {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a7f87;
}

.sidebar-guide-widget {
  display: grid;
  gap: 8px;
}

.sidebar-guide-link {
  width: fit-content;
  padding: 0;
  border: none;
  background: transparent;
  color: #7a7f87;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.sidebar-guide-link:hover {
  color: #2f363d;
}

.sidebar-guide-toast {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d7dbe0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.sidebar-guide-toast-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-guide-toast-header strong {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #111827;
}

.sidebar-guide-toast-close {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

.sidebar-guide-toast-body {
  max-height: min(42vh, 360px);
  overflow-y: auto;
  padding-right: 4px;
  color: #4b5563;
  font-size: 0.78rem;
  line-height: 1.58;
}

.mail-drawer-list {
  display: grid;
  gap: 2px;
}

.mail-drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 999px;
  color: #273444;
  transition: background 140ms ease, color 140ms ease;
}

.mail-drawer-link:hover {
  background: #f3f6f9;
}

.mail-drawer-link.is-active {
  background: #e8f0fe;
  color: #0f3a82;
  font-weight: 600;
}

.mail-drawer-link-title,
.mail-drawer-link-meta {
  display: block;
}

.mail-drawer-link-title {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.9rem;
}

.mail-drawer-link-meta,
.mail-drawer-empty {
  font-size: 0.78rem;
  color: #6b7280;
}

.mail-content {
  min-height: calc(100vh - 180px);
  border: 1px solid #dde3ea;
  border-radius: 24px;
  background: #ffffff;
  overflow: hidden;
}

.mail-list-view {
  display: grid;
}

.mail-list-toolbar {
  min-height: 52px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid #edf1f5;
  background: #ffffff;
}

.mail-list-toolbar.has-selection {
  background: #f8fbff;
}

.mail-list-toolbar-main {
  min-width: 0;
}

.mail-thread-total,
.mail-folder-caption,
.mail-selection-count {
  font-size: 0.82rem;
  color: #5f6b78;
}

.mail-selection-count {
  font-weight: 600;
  color: #111827;
}

.mail-list-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.mail-toolbar-icon.is-disabled,
.mail-toolbar-icon:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mail-select-toggle {
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mail-select-toggle input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.mail-select-toggle span {
  width: 18px;
  height: 18px;
  border: 2px solid #c0c8d2;
  border-radius: 4px;
  background: #ffffff;
  transition: border-color 140ms ease, background 140ms ease;
}

.mail-select-toggle input:checked + span {
  border-color: #0b57d0;
  background: #0b57d0;
  box-shadow: inset 0 0 0 4px #ffffff;
}

.mail-thread-listing {
  display: grid;
}

.mail-thread-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid #edf1f5;
  background: #ffffff;
}

.mail-thread-row:hover {
  background: #fafbfd;
}

.mail-thread-link-clean {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
}

.mail-thread-row-main {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(9rem, 0.58fr) minmax(11rem, 0.95fr) minmax(0, 1.45fr);
  gap: 10px;
  align-items: center;
}

.mail-thread-sender,
.mail-thread-subject,
.mail-thread-preview {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mail-thread-sender,
.mail-thread-subject {
  font-size: 0.89rem;
  font-weight: 400;
  color: #25313f;
}

.mail-thread-preview {
  font-size: 0.84rem;
  color: #6a7280;
}

.mail-thread-row.is-unread .mail-thread-sender,
.mail-thread-row.is-unread .mail-thread-subject {
  font-weight: 700;
  color: #111827;
}

.mail-thread-row-side {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.mail-thread-time {
  font-size: 0.76rem;
  color: #5f6b78;
  white-space: nowrap;
}

.mail-thread-flagged {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f59e0b;
}

.mail-list-footer {
  display: flex;
  justify-content: center;
  padding: 16px;
}

.mail-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #d8dee7;
  border-radius: 999px;
  background: #ffffff;
  color: #364152;
  font-size: 0.86rem;
  font-weight: 600;
}

.mail-empty-state {
  min-height: 420px;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 28px;
  text-align: center;
  color: #5f6b78;
}

.mail-empty-actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.mail-empty-state h3 {
  color: #111827;
  font-size: 1.1rem;
  font-weight: 600;
}

.mail-loading-state {
  min-height: 420px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 28px;
  text-align: center;
  color: #5f6b78;
}

.mail-loading-spinner {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid #d4d8de;
  border-top-color: #8f98a3;
  animation: chatThreadSpin 0.8s linear infinite;
}

.mail-loading-copy {
  display: grid;
  gap: 4px;
}

.mail-loading-copy strong {
  color: #111827;
  font-size: 1rem;
  font-weight: 600;
}

.mail-loading-copy span {
  font-size: 0.88rem;
}

.mail-detail-view {
  min-height: calc(100vh - 180px);
  display: grid;
  grid-template-rows: auto auto minmax(0, auto);
}

.mail-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #edf1f5;
  background: #ffffff;
}

.mail-detail-toolbar-copy {
  min-width: 0;
  display: none;
  gap: 2px;
}

.mail-detail-toolbar-copy h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.mail-detail-toolbar-copy span {
  font-size: 0.8rem;
  color: #6b7280;
}

.mail-detail-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mail-thread-studio-button {
  margin-right: 6px;
}

.mail-thread-header {
  display: grid;
  gap: 8px;
  padding: 18px 24px 14px;
  border-bottom: 1px solid #edf1f5;
}

.mail-thread-header h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #111827;
}

.mail-thread-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: #6b7280;
  font-size: 0.88rem;
}

.mail-message-stack {
  display: grid;
  gap: 0;
}

.mail-message {
  padding: 20px 24px;
  border-bottom: 1px solid #edf1f5;
  background: #ffffff;
}

.mail-message-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.mail-message-person {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.mail-message-person strong {
  font-size: 0.94rem;
  font-weight: 600;
  color: #111827;
}

.mail-message-person span,
.mail-message-head time {
  font-size: 0.82rem;
  color: #6b7280;
}

.mail-message-body {
  margin-top: 14px;
  color: #233142;
}

.mail-agent-panel {
  display: grid;
  gap: 12px;
  padding: 18px 24px 24px;
  background: #fafbfd;
}

.mail-agent-panel-copy {
  display: grid;
  gap: 4px;
}

.mail-agent-panel-copy h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.mail-agent-panel-copy p {
  margin: 0;
  font-size: 0.86rem;
  color: #64748b;
}

.mail-agent-form {
  display: grid;
  grid-template-columns: minmax(130px, 170px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.mail-agent-form select,
.mail-agent-form input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d6dde5;
  border-radius: 999px;
  background: #ffffff;
}

.mail-agent-reply-form {
  grid-template-columns: minmax(0, 1fr);
}

.mail-agent-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mail-agent-result {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #dfe5ec;
  border-radius: 16px;
  background: #ffffff;
}

.mail-agent-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mail-compose-view {
  min-height: calc(100vh - 180px);
}

.mail-compose-form {
  display: grid;
  gap: 0;
}

.mail-compose-row {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding: 0 20px;
  border-bottom: 1px solid #edf1f5;
}

.mail-compose-row span {
  font-size: 0.86rem;
  color: #6b7280;
}

.mail-compose-row.is-readonly {
  align-items: start;
  padding-top: 14px;
  padding-bottom: 14px;
}

.mail-compose-readonly {
  display: flex;
  align-items: center;
  min-height: 24px;
  font-size: 0.92rem;
  color: #0f172a;
  word-break: break-word;
}

.mail-compose-row input {
  height: 50px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.mail-compose-row input:focus {
  outline: none;
  border: none;
}

.mail-compose-body {
  padding: 0 20px 20px;
}

.mail-compose-body textarea {
  min-height: 320px;
  padding: 18px 0 0;
  border: none;
  border-radius: 0;
  resize: vertical;
  background: transparent;
}

.mail-compose-body textarea:focus {
  outline: none;
  border: none;
}

.mail-compose-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 20px;
}

.mail-solid-button,
.mail-subtle-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.mail-solid-button {
  border: 1px solid #0b57d0;
  background: #0b57d0;
  color: #ffffff;
}

.mail-subtle-button {
  border: 1px solid #d6dde5;
  background: #ffffff;
  color: #334155;
}

.mail-solid-button:disabled,
.mail-subtle-button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

@media (max-width: 980px) {
  .mail-topbar {
    grid-template-columns: 1fr;
  }

  .mail-topbar-actions {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .mail-account-switcher select {
    min-width: 0;
    max-width: 180px;
  }

  .mail-content,
  .mail-detail-view,
  .mail-compose-view {
    min-height: calc(100vh - 210px);
  }

  .mail-thread-row-main {
    grid-template-columns: minmax(120px, 0.72fr) minmax(0, 1fr);
    gap: 10px;
  }

  .mail-agent-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .mail-topbar {
    gap: 10px;
    padding: 6px 0 8px;
  }

  .mail-topbar-actions {
    gap: 6px;
  }

  .mail-refresh-pill {
    order: -1;
  }

  .mail-account-switcher {
    flex: 1 1 auto;
  }

  .mail-account-switcher select {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .mail-drawer {
    position: fixed;
    top: calc(var(--studio-header-height) + 14px);
    left: 10px;
    right: 10px;
    width: auto;
    max-height: calc(100vh - var(--studio-header-height) - 24px);
    overflow: auto;
    border-radius: 22px;
  }

  .mail-content {
    min-height: calc(100vh - 214px);
    border-radius: 20px;
  }

  .mail-list-toolbar {
    grid-template-columns: 24px minmax(0, 1fr);
    padding: 0 10px;
  }

  .mail-list-actions,
  .mail-thread-total {
    grid-column: 1 / -1;
    padding: 0 0 8px 0;
    overflow-x: auto;
  }

  .mail-thread-row {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px;
    padding: 0 10px;
  }

  .mail-thread-link-clean {
    gap: 8px;
  }

  .mail-thread-row-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .mail-thread-sender,
  .mail-thread-subject {
    font-size: 0.84rem;
  }

  .mail-thread-preview {
    font-size: 0.78rem;
  }

  .mail-thread-row-side {
    gap: 6px;
  }

  .mail-thread-time {
    font-size: 0.72rem;
  }

  .mail-detail-toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .mail-detail-toolbar-copy {
    display: grid;
  }

  .mail-detail-actions {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-left: 2px;
  }

  .mail-thread-studio-button {
    margin-right: 2px;
  }

  .mail-thread-header,
  .mail-message,
  .mail-agent-panel {
    padding-left: 16px;
    padding-right: 16px;
  }

  .mail-thread-header h1 {
    font-size: 1.18rem;
  }

  .mail-message-head {
    flex-direction: column;
    gap: 6px;
  }

  .mail-compose-row {
    grid-template-columns: 1fr;
    gap: 4px;
    min-height: auto;
    padding: 10px 16px;
  }

  .mail-compose-row input {
    height: 36px;
  }

  .mail-compose-row.is-readonly {
    gap: 6px;
  }

  .mail-compose-body,
  .mail-compose-actions {
    padding-left: 16px;
    padding-right: 16px;
  }

  .mail-compose-actions {
    flex-wrap: wrap;
  }
}

.studio-files-page {
  gap: 16px;
}

.studio-files-toolbar-card {
  display: grid;
  gap: 14px;
}

.studio-files-toolbar-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.studio-files-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 20px;
  color: #646970;
  font-size: 0.88rem;
}

.studio-files-picker-banner {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(45, 80, 22, 0.16);
  background: rgba(245, 236, 215, 0.7);
  color: #36591d;
}

.studio-files-picker-banner strong {
  font-size: 0.9rem;
  font-weight: 600;
}

.studio-files-picker-banner span {
  font-size: 0.88rem;
  line-height: 1.5;
}

.studio-files-picker-hint {
  color: #646970;
  font-size: 0.84rem;
}

.studio-files-breadcrumb-link {
  color: #0d697b;
}

.studio-files-breadcrumb-current {
  color: #111827;
  font-weight: 600;
}

.studio-files-breadcrumb-separator {
  color: #9aa4af;
}

.studio-files-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475467;
  font-size: 0.88rem;
  font-weight: 600;
}

.studio-files-inline-link-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.studio-files-inline-link-icon svg {
  width: 16px;
  height: 16px;
}

.studio-files-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #d9dfe5;
  border-radius: 10px;
  background: #f8fafc;
}

.studio-files-toolbar-selection {
  color: #475467;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.studio-files-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.studio-files-toolbar-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #344054;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.studio-files-toolbar-button.is-link {
  text-decoration: none;
}

.studio-files-toolbar-button:hover {
  background: #edf2f7;
  border-color: #d6dde6;
}

.studio-files-toolbar-button.is-disabled,
.studio-files-toolbar-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.studio-files-toolbar-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.studio-files-toolbar-icon svg {
  width: 16px;
  height: 16px;
}

.studio-files-picker-returnbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(45, 80, 22, 0.14);
  border-radius: 14px;
  background: rgba(245, 236, 215, 0.72);
}

.studio-files-picker-returncopy {
  display: grid;
  gap: 2px;
}

.studio-files-picker-returncopy strong {
  font-size: 0.9rem;
  color: #2f441d;
}

.studio-files-picker-returncopy span {
  font-size: 0.84rem;
  color: #5d664e;
}

.studio-files-picker-returnactions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.studio-files-manager {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.studio-files-list-card,
.studio-files-inspector-card {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.studio-files-list-head,
.studio-files-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1.7fr) minmax(100px, 0.7fr) minmax(150px, 0.9fr) 92px;
  gap: 10px;
  align-items: center;
}

.studio-files-list-head {
  padding: 12px 16px;
  border-bottom: 1px solid #e6eaef;
  background: #f8fafc;
  color: #667085;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.studio-files-list-body {
  display: grid;
}

.studio-files-row {
  min-height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid #edf1f5;
  background: #ffffff;
}

.studio-files-row:hover {
  background: #f8fafc;
}

.studio-files-row.is-active {
  background: #f3f7fb;
}

.studio-files-row.is-parent {
  color: #475467;
}

.studio-files-row-check {
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.studio-files-row-check input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.studio-files-row-check span {
  width: 18px;
  height: 18px;
  border: 1.5px solid #bcc7d2;
  border-radius: 4px;
  background: #ffffff;
}

.studio-files-row-check input:checked + span {
  border-color: #0d697b;
  background: #0d697b;
  box-shadow: inset 0 0 0 4px #ffffff;
}

.studio-files-row-check.is-placeholder {
  opacity: 0;
  pointer-events: none;
}

.studio-files-row-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #101828;
  font-size: 0.9rem;
}

.studio-files-row-name-button {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.studio-files-row.is-pickable .studio-files-row-name-button:hover .studio-files-row-name-text {
  color: var(--accent);
}

.studio-files-row-name-text,
.studio-files-row-type,
.studio-files-row-modified,
.studio-files-row-size {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.studio-files-row-type,
.studio-files-row-modified,
.studio-files-row-size {
  color: #667085;
  font-size: 0.84rem;
}

.studio-files-entry-icon,
.studio-files-inspector-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.studio-files-entry-icon {
  width: 18px;
  height: 18px;
}

.studio-files-entry-icon svg,
.studio-files-inspector-icon svg {
  width: 100%;
  height: 100%;
}

.studio-files-entry-icon.is-folder,
.studio-files-inspector-icon.is-folder {
  color: #c78517;
}

.studio-files-entry-icon.is-text,
.studio-files-inspector-icon.is-text {
  color: #0d697b;
}

.studio-files-entry-icon.is-image,
.studio-files-inspector-icon.is-image {
  color: #7c3aed;
}

.studio-files-entry-icon.is-file,
.studio-files-inspector-icon.is-file {
  color: #667085;
}

.studio-files-empty {
  min-height: 240px;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 32px 20px;
  text-align: center;
}

.studio-files-inspector-card {
  padding: 20px;
  gap: 16px;
  align-content: start;
}

.studio-files-inspector-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.studio-files-inspector-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.studio-files-inspector-icon {
  width: 34px;
  height: 34px;
}

.studio-files-inspector-copy {
  display: grid;
  gap: 4px;
}

.studio-files-inspector-copy h3 {
  font-size: 1.05rem;
}

.studio-files-inspector-copy p {
  margin: 0;
  color: #667085;
  font-size: 0.85rem;
  word-break: break-word;
}

.studio-files-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.studio-files-meta-grid > div {
  display: grid;
  gap: 4px;
}

.studio-files-meta-label {
  color: #667085;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.studio-files-inline-preview {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
}

.studio-files-inline-preview p {
  color: #475467;
  line-height: 1.55;
}

.studio-files-image-panel,
.file-image-preview-panel {
  display: grid;
  gap: 12px;
}

.studio-files-image-preview,
.file-image-preview {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #f7f8fa;
}

.file-document-panel,
.studio-files-document-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.file-document-panel.is-pdf,
.studio-files-document-panel.is-pdf {
  padding: 0;
  overflow: hidden;
}

.file-document-frame,
.studio-files-document-frame {
  width: 100%;
  min-height: 560px;
  border: 0;
  background: #ffffff;
}

.file-document-prose,
.studio-files-document-prose {
  display: grid;
  gap: 12px;
}

.file-document-prose p,
.studio-files-document-prose p {
  margin: 0;
  line-height: 1.7;
  color: var(--studio-text);
}

.file-document-meta,
.studio-files-document-meta {
  display: grid;
  gap: 10px;
}

.file-table-wrap,
.studio-files-table-wrap {
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(107, 114, 128, 0.18);
  background: #ffffff;
}

.file-table-preview,
.studio-files-table-preview {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.file-table-preview td,
.studio-files-table-preview td {
  padding: 10px 12px;
  border-right: 1px solid rgba(107, 114, 128, 0.12);
  border-bottom: 1px solid rgba(107, 114, 128, 0.12);
  white-space: nowrap;
  color: var(--studio-text);
}

.file-table-preview tr:last-child td,
.studio-files-table-preview tr:last-child td {
  border-bottom: 0;
}

.file-table-preview td:last-child,
.studio-files-table-preview td:last-child {
  border-right: 0;
}

@media (max-width: 1100px) {
  .studio-files-manager {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .studio-files-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .studio-files-toolbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .studio-files-list-head,
  .studio-files-row {
    grid-template-columns: 32px minmax(0, 1fr) 88px;
  }

  .studio-files-list-head div:nth-child(4),
  .studio-files-list-head div:nth-child(5),
  .studio-files-row-modified,
  .studio-files-row-size {
    display: none;
  }

  .studio-files-meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .studio-files-toolbar-button span:last-child {
    display: none;
  }

  .studio-files-toolbar-button {
    width: 36px;
    padding: 0;
    justify-content: center;
  }

  .studio-files-list-head,
  .studio-files-row {
    grid-template-columns: 28px minmax(0, 1fr) 72px;
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .studio-files-list-head div:nth-child(3),
  .studio-files-row-type {
    display: none;
  }

  .studio-files-inspector-header,
  .studio-files-toolbar-top {
    flex-direction: column;
  }
}

.server-environment-card .card-topline {
  align-items: flex-start;
}

.server-release-list {
  gap: 10px;
}

.server-release-row {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 10px 0;
}

.server-release-row:last-child {
  border-bottom: 0;
}

.server-release-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.server-release-copy span {
  color: var(--muted);
  font-size: 0.9rem;
}

.server-release-actions {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  gap: 10px;
}

@media (max-width: 700px) {
  .server-release-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .server-release-actions {
    width: 100%;
  }
}

/* North Star Theme Overrides */

body {
  font-family: var(--font-ui);
  color: var(--studio-text);
  background: linear-gradient(180deg, var(--bg-top), var(--bg));
}

::selection {
  background: rgba(200, 135, 58, 0.24);
  color: var(--studio-text);
}

h1,
h2,
.topbar h1,
.page-intro h2,
.page-intro h3,
.studio-brand-name,
.email-thread-subject-line h2,
.email-settings-header h3,
.studio-files-inspector-copy h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--studio-text);
}

h3,
h4,
strong,
.nav-link-label,
.context-sidebar-header h2,
.chat-thread-link strong,
.chat-topic-link strong,
.email-thread-from,
.email-thread-subject,
.email-account-title,
.email-settings-nav-item strong {
  font-weight: 500;
}

.auth-footnote,
.muted,
.topbar-lede,
.page-intro p,
.card p,
.rail-card p,
.chat-empty-state p,
.chat-message-meta,
.chat-thread-meta,
.chat-stage-meta,
.email-thread-date,
.email-thread-snippet,
.email-account-email,
.email-account-status,
.email-settings-note-card p,
.sidebar-guide-toast-body,
.server-release-copy span {
  color: var(--studio-muted);
}

.eyebrow,
.card-kicker,
.mini-label,
.context-section-label,
.chat-section-heading h3,
.mail-drawer-section h3 {
  color: var(--studio-muted);
  letter-spacing: 0.12em;
}

.chat-message-body a,
.sidebar-guide-toast-body a,
.email-message-body a,
.email-inline-notice a,
.studio-files-inline-preview a {
  color: var(--studio-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(200, 135, 58, 0.45);
  text-underline-offset: 0.18em;
}

.chat-message-body a:hover,
.sidebar-guide-toast-body a:hover,
.email-message-body a:hover,
.email-inline-notice a:hover,
.studio-files-inline-preview a:hover {
  color: var(--studio-link-strong);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--studio-focus);
}

.app-shell,
.shell-stage,
.workspace-page,
.workspace-main,
.chat-main-panel,
.project-main-panel,
.projects-main,
.memory-main-panel,
.files-page,
.mail-app-shell {
  background: var(--studio-shell-bg);
}

.studio-header {
  background: linear-gradient(180deg, var(--evergreen), var(--evergreen-deep));
  border-bottom: 1px solid rgba(26, 26, 26, 0.12);
  box-shadow: 0 8px 24px rgba(26, 26, 26, 0.14);
}

.studio-brand-mark {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: contain;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

.studio-brand-name {
  font-size: 1.2rem;
  color: var(--parchment);
}

.studio-brand-ac {
  display: inline-block;
  margin-left: 0.12em;
  font-style: italic;
  font-weight: 500;
}

.tasks-page,
.task-panel,
.task-section {
  display: grid;
  gap: 16px;
  align-content: start;
}

.context-sidebar-collapse {
  display: inline-flex;
}

.workspace-sidebar-reveal {
  display: none;
}

.shared-mobile-task-dock {
  display: none;
}

.tasks-mobile-task-dock {
  display: none;
}

.workspace-main-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.app-route-tasks .shell-stage,
.app-route-tasks .workspace-main,
.app-route-tasks .workspace-page,
.app-route-tasks .projects-main,
.app-route-tasks .project-main-panel {
  background: #ffffff;
}

.app-route-tasks .workspace-main {
  min-height: calc(100vh - var(--studio-header-height));
  height: auto;
  overflow: visible;
  overscroll-behavior-y: auto;
  padding: 0 20px 20px;
}

.tasks-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  align-content: start;
}

.tasks-workbench.has-drawer {
  grid-template-columns: minmax(0, 1fr);
}

.task-rail {
  position: sticky;
  top: 96px;
  align-self: start;
}

.tasks-context-sidebar {
  gap: 16px;
}

.task-sidebar-stack {
  display: grid;
  gap: 16px;
  align-content: start;
}

.task-sidebar-actions {
  justify-content: space-between;
}

.tasks-context-sidebar .task-rail {
  position: static;
  top: auto;
}

.task-rail-card,
.task-quick-add,
.task-list-card,
.task-completed-group,
.task-list-empty,
.task-detail-drawer {
  background: #ffffff;
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(26, 26, 26, 0.04);
}

.task-rail-card {
  display: grid;
  gap: 20px;
  padding: 18px 16px;
}

.task-rail-header,
.task-workbench-header,
.task-entry-header,
.task-detail-drawer-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.task-rail-header h3,
.task-workbench-header h2,
.task-entry-header h3,
.task-detail-drawer-head h3 {
  margin: 0;
}

.task-rail-header p,
.task-workbench-header p,
.task-entry-header p,
.task-panel-description {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.task-rail-nav {
  display: grid;
  gap: 4px;
}

.task-rail-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease;
}

.task-rail-link:hover {
  background: rgba(26, 26, 26, 0.04);
  color: var(--text-primary);
}

.task-rail-link strong {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
}

.task-rail-link.is-active {
  background: rgba(45, 80, 22, 0.08);
  color: var(--text-primary);
}

.task-rail-link.is-active strong {
  color: var(--text-primary);
}

.task-rail-stats {
  display: grid;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(26, 26, 26, 0.08);
}

.task-rail-stats div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.task-rail-stats strong {
  color: var(--text-primary);
  font-weight: 600;
}

.task-main-column,
.task-panel {
  display: grid;
  gap: 16px;
  min-width: 0;
  align-content: start;
}

.task-main-topbar {
  position: sticky;
  top: 0;
  z-index: 18;
  display: grid;
  gap: 10px;
  padding: 12px 0 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94));
}

.tasks-page .task-main-topbar::before {
  content: "";
  position: absolute;
  inset: 0 -14px -6px -14px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.98) 74%, rgba(255, 255, 255, 0));
}

.tasks-page .task-main-topbar {
  position: sticky;
}

.task-sidebar-fab {
  display: none;
}

.task-sidebar-fab-icon {
  width: 17px;
  height: 17px;
}

.task-panel-count,
.task-mini-state {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(45, 80, 22, 0.08);
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.task-detail-backdrop {
  position: fixed;
  inset: var(--studio-header-height) 0 0 0;
  display: block;
  background: rgba(26, 26, 26, 0.16);
  z-index: 109;
}

.task-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.tasks-context-sidebar .task-toolbar {
  display: grid;
  gap: 12px;
  align-items: stretch;
}

.tasks-context-sidebar .task-search,
.tasks-context-sidebar .task-sort,
.tasks-context-sidebar .task-filter-menu,
.tasks-context-sidebar .task-view-toggle,
.tasks-context-sidebar .task-toolbar-actions {
  width: 100%;
}

.tasks-context-sidebar .task-sort {
  display: grid;
  gap: 6px;
}

.tasks-context-sidebar .task-sort select {
  min-width: 0;
  width: 100%;
}

.tasks-context-sidebar .task-view-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tasks-context-sidebar .task-view-toggle-link {
  width: 100%;
}

.tasks-context-sidebar .task-filter-menu-card {
  position: static;
  width: 100%;
  margin-top: 8px;
  box-shadow: none;
}

.tasks-context-sidebar .task-toolbar-actions {
  display: grid;
  grid-template-columns: 1fr;
}

.tasks-context-sidebar .task-toolbar-actions .ghost-button {
  width: 100%;
  justify-content: center;
}

.task-mobile-toolbar,
.task-mobile-curtain,
.task-mobile-curtain-backdrop,
.task-detail-backdrop {
  display: none;
}

.task-desktop-rail,
.task-desktop-toolbar {
  min-width: 0;
}

.task-view-toggle,
.task-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.task-view-toggle {
  padding: 4px;
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: 12px;
  background: rgba(26, 26, 26, 0.03);
}

.task-view-toggle-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease;
}

.task-view-toggle-link.is-active {
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(26, 26, 26, 0.08);
}

.task-search {
  flex: 1 1 260px;
}

.task-search input {
  width: 100%;
}

.task-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.86rem;
  white-space: nowrap;
}

.task-sort select {
  min-width: 160px;
}

.task-filter-menu {
  position: relative;
}

.task-filter-menu > summary,
.task-entry-details > summary,
.task-inline-details > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text-secondary);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.task-filter-menu > summary::-webkit-details-marker,
.task-entry-details > summary::-webkit-details-marker,
.task-inline-details > summary::-webkit-details-marker,
.task-completed-group > summary::-webkit-details-marker {
  display: none;
}

.task-filter-menu-card,
.task-entry-details-card,
.task-inline-editor {
  display: grid;
  gap: 14px;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(26, 26, 26, 0.08);
}

.task-filter-menu-card {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: min(360px, calc(100vw - 56px));
  z-index: 50;
}

.admin-stack {
  display: grid;
  gap: 18px;
  align-content: start;
}

.task-filter-grid,
.task-entry-grid,
.task-detail-grid,
.task-inline-editor-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.task-filter-actions,
.task-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-quick-add {
  padding: 16px;
}

.task-quick-add.is-minimal {
  position: static;
  top: auto;
  z-index: auto;
  padding: 12px 14px;
}

.task-entry-submit {
  min-width: 42px;
  padding-left: 0;
  padding-right: 0;
  font-size: 1.15rem;
  line-height: 1;
}

.task-entry-form {
  display: grid;
  gap: 12px;
}

.task-entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.task-entry-row.has-section-select {
  grid-template-columns: minmax(140px, 180px) minmax(0, 1fr) auto;
}

.task-entry-input {
  min-width: 0;
}

.task-entry-details {
  justify-self: start;
}

.task-entry-details-card {
  margin-top: 12px;
  background: rgba(248, 248, 246, 0.98);
}

.task-update-banner {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(45, 80, 22, 0.14);
  background: rgba(45, 80, 22, 0.06);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.task-list-card {
  display: grid;
  align-content: start;
  overflow: visible;
}

.task-list-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 8px;
}

.task-batch-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.task-selection-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: 0 0 14px 14px;
  background: rgba(233, 236, 239, 0.98);
  box-shadow: 0 8px 18px rgba(26, 26, 26, 0.05);
  transform-origin: top center;
  animation: task-selection-curtain-drop 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
}

@keyframes task-selection-curtain-drop {
  0% {
    opacity: 0;
    transform: translateY(-8px) scaleY(0.92);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

.task-selection-actions {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 2px;
}

.task-selection-project-form {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
}

.task-selection-project-form select {
  min-width: 180px;
  color: var(--text-secondary);
}

.task-batch-label-picker {
  position: relative;
  flex: 0 0 auto;
}

.task-batch-label-picker > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text-secondary);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.task-batch-label-picker > summary::-webkit-details-marker {
  display: none;
}

.task-batch-label-form {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  display: grid;
  gap: 12px;
  width: min(320px, calc(100vw - 64px));
  padding: 14px;
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(26, 26, 26, 0.12);
}

.task-batch-label-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.task-batch-label-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(26, 26, 26, 0.03);
  color: var(--text-secondary);
}

.task-batch-label-option input {
  width: auto;
}

.task-batch-label-actions {
  display: flex;
  justify-content: flex-end;
}

.task-list-section + .task-list-section {
  border-top: 1px solid rgba(26, 26, 26, 0.08);
}

.task-section-heading {
  padding: 14px 18px 8px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.task-table {
  display: grid;
}

.task-table-row {
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 9px 14px;
  border-top: 1px solid rgba(26, 26, 26, 0.08);
  background: #ffffff;
  transition: background 180ms ease, box-shadow 180ms ease, opacity 180ms ease, transform 180ms ease;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.task-table-row.has-due {
  border-left: 3px solid rgba(200, 135, 58, 0.55);
  padding-left: 11px;
}

.task-list-section .task-table-row:first-child,
.task-table.is-compact .task-table-row:first-child,
.shared-projectless-task-table .task-table-row:first-child,
.task-table--bucket .task-table-row:first-child {
  border-top: 0;
}

.task-table-row.is-batch-selected {
  background: rgba(45, 80, 22, 0.08);
  box-shadow: inset 0 0 0 1px rgba(45, 80, 22, 0.18);
}

.task-table-row.is-detail-open {
  background: rgba(124, 58, 237, 0.08);
  box-shadow: inset 3px 0 0 #7c3aed, inset 0 0 0 1px rgba(124, 58, 237, 0.22);
}

.task-table-row.is-done,
.task-table-row.is-recently-completed {
  background: #eef0f2;
}

.task-table-row.is-recently-completed {
  animation: task-row-complete-settle 2.6s ease forwards;
}

@keyframes task-row-complete-settle {
  0% {
    background: #e4ebde;
  }

  100% {
    background: #eef0f2;
  }
}

.task-check-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1.5px solid rgba(26, 26, 26, 0.24);
  border-radius: 6px;
  background: #ffffff;
  color: transparent;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.task-check-button span {
  font-size: 0.78rem;
  line-height: 1;
}

.task-check-button:hover {
  border-color: rgba(45, 80, 22, 0.5);
}

.task-check-button.is-done {
  background: var(--color-evergreen, #2D5016);
  border-color: var(--color-evergreen, #2D5016);
  color: var(--parchment, #F5ECD7);
  box-shadow: 0 6px 14px rgba(45, 80, 22, 0.18);
}

.task-row-link {
  min-width: 0;
  width: 100%;
  max-inline-size: 50%;
  justify-self: start;
  color: inherit;
  text-decoration: none;
  display: grid;
  gap: 6px;
}

.task-row-link.is-static {
  pointer-events: none;
}

.task-row-title {
  display: block;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-table-row.is-done .task-row-title,
.task-table-row.is-recently-completed .task-row-title {
  color: #5b6168;
  text-decoration: line-through;
}

.task-row-meta {
  --task-meta-due-width: 70px;
  --task-meta-list-width: 40px;
  --task-meta-reminder-width: 28px;
  --task-meta-priority-width: 78px;
  --task-meta-gap-total: 44px;
  display: grid;
  grid-template-columns:
    var(--task-meta-due-width)
    var(--task-meta-list-width)
    var(--task-meta-reminder-width)
    var(--task-meta-priority-width)
    auto;
  align-items: center;
  justify-items: center;
  justify-content: flex-end;
  gap: 11px;
  inline-size: max-content;
  min-inline-size: calc(
    var(--task-meta-due-width) +
    var(--task-meta-list-width) +
    var(--task-meta-reminder-width) +
    var(--task-meta-priority-width) +
    var(--task-meta-gap-total)
  );
  overflow: visible;
}

.task-quick-chip-wrap {
  position: relative;
  display: inline-flex;
  width: 100%;
  justify-content: center;
  flex: 0 0 auto;
}

.task-quick-chip-wrap.is-active {
  z-index: 500;
}

.task-row-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 180px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(26, 26, 26, 0.08);
  background: #ffffff;
  color: var(--text-secondary);
  font-size: 0.68rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 0 auto;
}

.task-row-chip-button {
  position: relative;
  appearance: none;
  cursor: pointer;
  font-family: inherit;
}

.task-row-meta .task-row-chip-button.is-due,
.task-row-meta .task-row-chip-button.is-checklist,
.task-row-meta .task-row-chip-button.is-reminder,
.task-row-meta .task-row-chip-button.is-priority {
  width: 100%;
  max-width: 100%;
  justify-content: center;
}

.task-row-chip-button.is-due,
.task-row-chip-button.is-checklist,
.task-row-chip-button.is-reminder {
  min-width: 26px;
  justify-content: center;
  border-color: transparent;
  background: transparent;
  color: rgba(26, 26, 26, 0.34);
}

.task-row-chip-button:hover {
  border-color: rgba(45, 80, 22, 0.24);
  background: rgba(45, 80, 22, 0.04);
  color: var(--text-primary);
}

.task-row-chip-button[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 95;
  width: max-content;
  max-width: 180px;
  padding: 7px 9px;
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: 0 12px 28px rgba(26, 26, 26, 0.14);
  font-size: 0.74rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.task-row-chip-button[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.task-chip-icon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.task-drag-handle {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(26, 26, 26, 0.34);
  cursor: grab;
}

.task-drag-handle:hover {
  background: rgba(26, 26, 26, 0.05);
  color: rgba(26, 26, 26, 0.62);
}

.task-drag-handle:active {
  cursor: grabbing;
}

.task-drag-handle.is-section {
  width: 22px;
  height: 22px;
}

.task-drag-handle.is-project {
  width: 20px;
  height: 28px;
  border-radius: 7px;
}

.task-drag-handle-icon {
  width: 16px;
  height: 16px;
}

.task-row-chip.is-scope,
.task-row-chip.is-label {
  background: rgba(26, 26, 26, 0.03);
}

.task-row-chip.is-checklist.is-has-items,
.task-row-chip.is-reminder.is-scheduled {
  border-color: rgba(200, 135, 58, 0.24);
  background: rgba(200, 135, 58, 0.08);
  color: #9a5d18;
}

.task-row-chip.is-due.is-scheduled {
  border-color: rgba(200, 135, 58, 0.24);
  background: rgba(200, 135, 58, 0.07);
  color: #8d5b1f;
}

.task-row-chip.is-due.is-today {
  border-color: rgba(200, 135, 58, 0.28);
  background: rgba(200, 135, 58, 0.1);
  color: var(--text-primary);
}

.task-row-chip.is-due.is-overdue,
.task-row-chip.is-priority.is-urgent {
  border-color: rgba(171, 70, 66, 0.18);
  background: rgba(171, 70, 66, 0.08);
  color: #8f2f2c;
}

.task-row-chip.is-priority.is-high {
  border-color: rgba(200, 135, 58, 0.24);
  background: rgba(200, 135, 58, 0.08);
  color: #8d5b1f;
}

.task-row-chip.is-priority.is-medium {
  border-color: rgba(45, 80, 22, 0.18);
  background: rgba(45, 80, 22, 0.06);
  color: #2d5016;
}

.task-row-chip.is-priority.is-low {
  border-color: rgba(26, 26, 26, 0.08);
  background: rgba(26, 26, 26, 0.025);
  color: rgba(26, 26, 26, 0.68);
}

.task-row-chip.is-priority.is-none {
  border-color: transparent;
  background: transparent;
  color: rgba(26, 26, 26, 0.38);
}

.task-detail-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease;
}

.task-detail-trigger:hover {
  background: rgba(26, 26, 26, 0.06);
  color: var(--text-primary);
}

.task-detail-trigger-icon {
  width: 18px;
  height: 18px;
}

.task-detail-drawer {
  position: fixed;
  top: calc(var(--studio-header-height) + 14px);
  right: 18px;
  bottom: 18px;
  width: min(430px, calc(100vw - 42px));
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 18px;
  z-index: 20;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(245, 236, 215, 0.96);
  border-left: 1px solid rgba(26, 26, 26, 0.08);
  box-shadow: 0 22px 44px rgba(26, 26, 26, 0.18);
}

.task-quick-panel-backdrop {
  position: fixed;
  inset: var(--studio-header-height) 0 0 0;
  z-index: 120;
  border: 0;
  background: rgba(26, 26, 26, 0.2);
  cursor: default;
}

.task-quick-panel {
  position: fixed;
  top: calc(var(--studio-header-height) + 28px);
  left: 50%;
  z-index: 121;
  width: min(720px, calc(100vw - 34px));
  max-height: calc(100vh - var(--studio-header-height) - 56px);
  display: grid;
  gap: 16px;
  padding: 18px;
  overflow-y: auto;
  border: 1px solid rgba(26, 26, 26, 0.1);
  border-radius: 18px;
  background: rgba(245, 236, 215, 0.98);
  box-shadow: 0 28px 70px rgba(26, 26, 26, 0.22);
  transform: translateX(-50%);
}

.task-quick-panel-form {
  display: grid;
  gap: 14px;
}

.task-quick-panel.is-checklist {
  width: min(840px, calc(100vw - 34px));
}

.task-calendar-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 500;
  width: 254px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(26, 26, 26, 0.1);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: 0 18px 44px rgba(26, 26, 26, 0.16);
}

.task-calendar-head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
}

.task-calendar-head strong {
  text-align: center;
  font-size: 0.84rem;
  font-weight: 700;
}

.task-calendar-nav {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-secondary);
  cursor: pointer;
}

.task-calendar-nav:hover {
  border-color: rgba(200, 135, 58, 0.28);
  background: rgba(200, 135, 58, 0.08);
  color: var(--text-primary);
}

.task-calendar-weekdays,
.task-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.task-calendar-weekdays span {
  text-align: center;
  color: rgba(26, 26, 26, 0.48);
  font-size: 0.68rem;
  font-weight: 700;
}

.task-calendar-day {
  min-width: 0;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
}

.task-calendar-day:not(.is-empty):hover {
  border-color: rgba(200, 135, 58, 0.24);
  background: rgba(200, 135, 58, 0.08);
  color: var(--text-primary);
}

.task-calendar-day.is-selected {
  border-color: rgba(200, 135, 58, 0.36);
  background: rgba(200, 135, 58, 0.16);
  color: #7a4312;
  font-weight: 700;
}

.task-calendar-day.is-empty {
  pointer-events: none;
}

.task-calendar-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 2px;
}

.task-priority-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 500;
  min-width: 142px;
  padding: 6px;
  border: 1px solid rgba(26, 26, 26, 0.1);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(26, 26, 26, 0.16);
}

.task-priority-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.task-priority-option:hover,
.task-priority-option.is-selected {
  background: rgba(26, 26, 26, 0.05);
}

.task-priority-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #98a2b3;
}

.task-priority-option.is-urgent .task-priority-dot {
  background: #d92d20;
}

.task-priority-option.is-high .task-priority-dot {
  background: #f79009;
}

.task-priority-option.is-medium .task-priority-dot {
  background: #12b76a;
}

.task-priority-option.is-low .task-priority-dot {
  background: #2e90fa;
}

.task-detail-kicker {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.task-detail-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1.6rem;
  line-height: 1;
}

.task-detail-form {
  display: grid;
  gap: 14px;
}

.task-checklist-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: 14px;
  background: rgba(26, 26, 26, 0.02);
}

.task-checklist-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary);
}

.task-checklist-stack {
  display: grid;
  gap: 8px;
  max-height: min(36dvh, 320px);
  overflow-y: auto;
  padding-right: 2px;
}

.task-checklist-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid rgba(26, 26, 26, 0.07);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.task-checklist-checkbox {
  width: 16px;
  height: 16px;
  margin: 0;
}

.task-checklist-input {
  min-width: 0;
}

.task-checklist-title {
  min-width: 0;
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.task-checklist-remove-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.task-checklist-remove-button:hover {
  border-color: rgba(26, 26, 26, 0.08);
  background: rgba(26, 26, 26, 0.04);
  color: var(--text-primary);
}

.task-checklist-empty,
.task-project-section-empty {
  padding: 9px 12px;
  border-top: 1px solid rgba(26, 26, 26, 0.06);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-style: italic;
}

.task-checklist-new {
  gap: 6px;
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: 2px;
  background: inherit;
}

.task-checklist-new-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.task-comments-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: 14px;
  background: rgba(26, 26, 26, 0.02);
}

.task-comments-head,
.task-comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.task-comments-head {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
}

.task-comment-list {
  display: grid;
  gap: 10px;
  max-height: min(34dvh, 300px);
  overflow-y: auto;
  padding-right: 2px;
}

.task-comment {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(26, 26, 26, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.task-comment-meta {
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.task-comment-meta strong {
  color: var(--text-primary);
  font-size: 0.84rem;
}

.task-comment p,
.task-legacy-notes p {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.task-comments-empty,
.task-legacy-notes {
  padding: 10px 12px;
  border: 1px dashed rgba(26, 26, 26, 0.1);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.task-legacy-notes {
  display: grid;
  gap: 6px;
  background: rgba(255, 255, 255, 0.52);
}

.task-legacy-notes span {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.task-comment-form {
  display: grid;
  gap: 10px;
}

.task-section-create {
  display: grid;
}

.task-section-add-button {
  flex: 0 0 auto;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border-color: transparent;
  border-radius: 999px;
  background: transparent;
  color: #98a2b3;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: none;
}

.task-section-add-button:hover,
.task-section-add-button:focus-visible {
  border-color: rgba(102, 112, 133, 0.14);
  background: rgba(102, 112, 133, 0.08);
  color: #667085;
}

.task-section-add-icon {
  display: block;
  transform: translateY(-1px);
}

.task-section-add-button[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  z-index: 35;
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(31, 35, 40, 0.94);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -2px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.task-section-add-button[data-tooltip]:hover::after,
.task-section-add-button[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.task-section-inline-form {
  position: absolute;
  top: calc(100% + 4px);
  left: 10px;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(110px, 180px) auto;
  gap: 6px;
  align-items: center;
  width: min(290px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid rgba(26, 26, 26, 0.1);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.14);
}

.task-section-inline-input {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.task-list-section.is-drag-over,
[data-task-section-dropzone].is-drag-over {
  outline: 2px solid rgba(45, 80, 22, 0.24);
  outline-offset: -2px;
  background: rgba(45, 80, 22, 0.035);
}

.task-label-editor {
  display: grid;
  gap: 10px;
}

.task-label-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.task-label-token-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -4px;
}

.task-label-token {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: 999px;
  background: rgba(245, 236, 215, 0.88);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
}

.task-label-token.is-removable {
  cursor: pointer;
}

.task-detail-title-field,
.task-detail-wide {
  grid-column: 1 / -1;
}

.task-detail-notes {
  display: grid;
  gap: 6px;
}

.task-checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.task-list-empty {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-style: dashed;
  box-shadow: none;
}

.task-list-empty strong,
.task-completed-group > summary {
  color: var(--text-primary);
}

.task-list-empty p {
  margin: 0;
  color: var(--text-secondary);
}

.task-panel {
  display: grid;
  gap: 14px;
}

.task-bucket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  padding: 16px;
}

.shared-task-bucket-stack {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.shared-projectless-task-table {
  border-bottom: 1px solid rgba(26, 26, 26, 0.08);
  margin-bottom: 12px;
}

.shared-project-task-stack {
  display: grid;
}

.shared-project-task-section + .shared-project-task-section {
  border-top: 1px solid rgba(26, 26, 26, 0.08);
}

.shared-project-heading-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 10px 12px 6px 10px;
  background: #fbfbfa;
}

.shared-project-heading-row .task-row-title {
  font-weight: 700;
}

.shared-view-title-row {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(217, 45, 92, 0.12);
  background: #ffd2de;
  color: #7e1838;
  font-size: 0.9rem;
  font-weight: 700;
}

.shared-project-heading-link {
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.shared-project-heading-link:hover {
  color: var(--studio-accent, #2D5016);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.shared-project-heading-copy,
.task-project-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.shared-project-heading-copy .task-row-title,
.task-project-section-title .task-row-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-section-heading-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}

.task-heading-icon-button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.task-heading-icon-button:hover,
.task-heading-icon-button:focus-visible {
  border-color: rgba(26, 26, 26, 0.16);
  background: #ffffff;
  color: var(--text-primary);
}

.task-heading-toggle-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.task-project-collapse-toggle {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-secondary);
  cursor: pointer;
}

.task-project-collapse-toggle:hover,
.task-project-collapse-toggle:focus-visible {
  border-color: rgba(26, 26, 26, 0.16);
  background: #ffffff;
  color: var(--text-primary);
}

.task-project-collapse-icon {
  width: 16px;
  height: 16px;
}

.task-project-collapse-count {
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.task-project-collapsed-row {
  display: block;
  width: 100%;
  padding: 12px;
  border: 0;
  border-top: 1px solid rgba(26, 26, 26, 0.07);
  background: rgba(26, 26, 26, 0.025);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.task-project-collapsed-row:hover {
  background: rgba(26, 26, 26, 0.05);
  color: var(--text-primary);
}

.shared-project-subheading-row {
  background: #ffffff;
  padding-top: 8px;
  padding-bottom: 4px;
}

.task-project-section-stack {
  display: grid;
}

.task-project-section-group:not(.is-default-section) {
  margin-left: 14px;
  border-left: 2px solid rgba(26, 26, 26, 0.08);
}

.task-project-section-group + .task-project-section-group {
  border-top: 1px solid rgba(26, 26, 26, 0.06);
}

.task-project-section-heading {
  min-height: 31px;
  padding: 7px 12px 5px 10px;
  background: transparent;
}

.task-project-section-heading .task-row-title {
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 650;
}

.task-project-section-heading .task-drag-handle.is-section {
  opacity: 0.62;
}

.task-section-menu {
  margin-right: 0;
}

.shared-indented-task-table {
  width: calc(100% - 14px);
  margin-left: 14px;
}

.shared-page .task-table-row {
  min-height: 42px;
  padding: 7px 10px;
}

.shared-page .task-row-link {
  gap: 2px;
}

.shared-page .task-row-title {
  font-size: 0.9rem;
}

.shared-page .task-row-meta {
  --task-meta-due-width: 66px;
  --task-meta-list-width: 36px;
  --task-meta-reminder-width: 26px;
  --task-meta-priority-width: 72px;
  --task-meta-gap-total: 36px;
  gap: 9px;
  overflow: visible;
}

.shared-page .task-row-chip,
.shared-page .task-panel-count {
  min-height: 20px;
  padding: 0 7px;
  font-size: 0.66rem;
}

.shared-page .task-quick-chip-wrap {
  position: relative;
  overflow: visible;
}

.shared-page .task-quick-chip-wrap.is-active {
  z-index: 600;
}

.shared-page .task-row-chip-button.is-due,
.shared-page .task-row-chip-button.is-checklist,
.shared-page .task-row-chip-button.is-reminder {
  min-width: 24px;
  justify-content: center;
  border-color: transparent;
  background: transparent;
  color: rgba(26, 26, 26, 0.34);
}

.shared-page .task-row-chip-button.is-checklist.is-has-items,
.shared-page .task-row-chip-button.is-reminder.is-scheduled,
.shared-page .task-row-chip-button.is-due.is-scheduled {
  border-color: rgba(200, 135, 58, 0.24);
  background: rgba(200, 135, 58, 0.08);
  color: #9a5d18;
}

.shared-page .task-row-chip-button.is-due.is-today {
  border-color: rgba(200, 135, 58, 0.28);
  background: rgba(200, 135, 58, 0.1);
  color: var(--text-primary);
}

.shared-page .task-row-chip-button.is-due.is-overdue,
.shared-page .task-row-chip-button.is-priority.is-urgent {
  border-color: rgba(171, 70, 66, 0.18);
  background: rgba(171, 70, 66, 0.08);
  color: #8f2f2c;
}

.shared-page .task-row-chip-button.is-priority.is-high {
  border-color: rgba(200, 135, 58, 0.24);
  background: rgba(200, 135, 58, 0.08);
  color: #8d5b1f;
}

.shared-page .task-row-chip-button.is-priority.is-none {
  border-color: transparent;
  background: transparent;
  color: rgba(26, 26, 26, 0.38);
}

.shared-page .task-calendar-popover,
.shared-page .task-priority-popover {
  z-index: 650;
}

.shared-page .task-check-button,
.shared-page .task-detail-trigger {
  width: 28px;
  height: 28px;
}

.shared-page .task-check-button {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.shared-page .task-check-button span {
  width: 10px;
  height: 10px;
  font-size: 0.66rem;
  line-height: 1;
}

.task-bucket-card {
  display: grid;
  gap: 12px;
  align-self: start;
  overflow: hidden;
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: 16px;
  background: #ffffff;
}

.task-bucket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 0;
}

.task-bucket-head h3 {
  margin: 0;
  font-size: 0.95rem;
}

.task-table.is-compact .task-table-row {
  grid-template-columns: auto auto minmax(0, 1fr) auto auto;
}

.task-inline-details {
  position: relative;
}

.task-inline-trigger {
  font-size: 0.82rem;
}

.task-inline-editor {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(460px, calc(100vw - 48px));
  z-index: 40;
  background: rgba(245, 236, 215, 0.98);
}

.task-inline-editor-head strong {
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.task-completed-group {
  overflow: hidden;
}

.task-completed-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  background: #ffffff;
}

.task-completed-group .task-table {
  border-top: 1px solid rgba(26, 26, 26, 0.08);
}

.task-reminder-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 28px));
}

.task-reminder-toast {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(45, 80, 22, 0.16);
  background: rgba(245, 236, 215, 0.98);
  box-shadow: 0 16px 34px rgba(26, 26, 26, 0.12);
}

.task-reminder-copy {
  display: grid;
  gap: 4px;
}

.task-reminder-copy strong {
  color: var(--text-primary);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.task-reminder-copy a {
  color: var(--color-evergreen, var(--text-primary));
  font-weight: 600;
  text-decoration: none;
}

.task-reminder-copy span {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.task-reminder-dismiss {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
}

@media (max-width: 1220px) {
  .tasks-workbench,
  .tasks-workbench.has-drawer {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .tasks-workbench,
  .tasks-workbench.has-drawer {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .task-rail {
    position: static;
  }

  .task-rail-card {
    gap: 16px;
  }

  .task-rail-nav {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .task-rail-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scope-document-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .scope-document-actions {
    width: 100%;
    justify-content: space-between;
  }

  .app-route-shared .workspace-main,
  .app-route-drew .workspace-main {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  .app-route-shared .shared-page .task-main-topbar,
  .app-route-drew .shared-page .task-main-topbar {
    position: static;
    padding: 0;
    background: transparent;
  }

  .app-route-shared .shared-page .task-main-column,
  .app-route-drew .shared-page .task-main-column {
    min-height: 100%;
    padding-top: 12px;
    padding-right: 12px;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 156px + var(--studio-visual-keyboard-offset, 0px));
    padding-left: 12px;
  }

  .app-route-shared .shared-page .task-quick-add,
  .app-route-drew .shared-page .task-quick-add {
    position: fixed;
    top: auto;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px + var(--studio-visual-keyboard-offset, 0px));
    left: 10px;
    z-index: 120;
    max-height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top) - 20px);
    overflow: auto;
    transform: translateZ(0);
    backface-visibility: hidden;
  }

  .app-route-shared .shared-page.has-task-selection .task-quick-add,
  .app-route-drew .shared-page.has-task-selection .task-quick-add {
    display: none;
  }

  .app-route-shared .shared-page .task-main-topbar > .task-quick-add,
  .app-route-drew .shared-page .task-main-topbar > .task-quick-add {
    display: none;
  }

  .app-route-shared .shared-mobile-task-dock,
  .app-route-drew .shared-mobile-task-dock {
    position: fixed;
    top: auto;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px + var(--studio-visual-keyboard-offset, 0px));
    left: 10px;
    z-index: 140;
    display: block;
    pointer-events: none;
  }

  .app-route-shared .shared-mobile-task-dock > .task-quick-add,
  .app-route-drew .shared-mobile-task-dock > .task-quick-add {
    position: static;
    display: block;
    max-height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top) - 20px);
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(108, 99, 255, 0.24);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 36px rgba(31, 41, 55, 0.16);
    overflow: auto;
    pointer-events: auto;
    transform: none;
    backface-visibility: visible;
  }

  .app-route-shared .shared-mobile-task-dock > .task-quick-add::before,
  .app-route-drew .shared-mobile-task-dock > .task-quick-add::before {
    content: "Add task";
    display: block;
    margin-bottom: 6px;
    color: #667085;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .app-route-shared .shared-page.has-task-selection + .shared-mobile-task-dock,
  .app-route-drew .shared-page.has-task-selection + .shared-mobile-task-dock {
    display: none;
  }

  .app-route-shared .shared-page .shared-general-task-section,
  .app-route-drew .shared-page .shared-general-task-section {
    padding-top: 8px;
  }
}

@media (max-width: 760px) {
  .context-sidebar-collapse,
  .workspace-main-topbar {
    display: none;
  }

  .app-route-tasks .workspace-page,
  .app-route-shared .workspace-page,
  .app-route-drew .workspace-page,
  .app-route-tasks .projects-main,
  .app-route-tasks .project-main-panel {
    gap: 12px;
  }

  .app-route-tasks .workspace-main,
  .app-route-shared .workspace-main,
  .app-route-drew .workspace-main {
    padding: 12px 12px 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  .tasks-workbench,
  .tasks-workbench.has-drawer {
    gap: 12px;
  }

  .task-detail-backdrop {
    position: fixed;
    inset: 0;
    display: block;
    background: rgba(26, 26, 26, 0.18);
    z-index: 110;
  }

  .task-rail-header,
  .task-workbench-header,
  .task-entry-header,
  .task-detail-drawer-head {
    flex-direction: column;
    align-items: stretch;
  }

  .task-toolbar {
    align-items: stretch;
  }

  .task-search,
  .task-sort,
  .task-filter-menu,
  .task-view-toggle,
  .task-toolbar-actions {
    width: 100%;
  }

  .task-toolbar-actions {
    justify-content: stretch;
  }

  .task-toolbar-actions .ghost-button {
    width: 100%;
    justify-content: center;
  }

  .task-rail-card,
  .task-quick-add,
  .task-list-card,
  .task-detail-drawer,
  .task-bucket-card,
  .task-completed-group,
  .task-list-empty {
    border-radius: 16px;
  }

  .task-rail-card,
  .task-quick-add,
  .task-detail-drawer {
    padding: 14px;
  }

  .tasks-page .task-main-column {
    position: relative;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 132px);
  }

  .tasks-page .task-quick-add {
    position: fixed;
    top: auto;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px + var(--studio-visual-keyboard-offset, 0px));
    left: 10px;
    z-index: 120;
    padding: 12px;
    box-shadow: 0 18px 36px rgba(26, 26, 26, 0.14);
  }

  .tasks-page .task-quick-add .task-entry-header {
    display: none;
  }

  .tasks-page .task-quick-add .task-entry-details {
    justify-self: stretch;
  }

  .tasks-page .task-quick-add .task-entry-input {
    background: #ffffff;
  }

  .tasks-page .task-entry-row.has-section-select {
    grid-template-columns: 1fr;
  }

  .task-checklist-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
  }

  .tasks-page .task-main-column::before {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    top: calc(var(--studio-header-height) + var(--studio-safe-top));
    height: 30px;
    z-index: 70;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
  }

  .tasks-page .task-main-column::after {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 118px;
    z-index: 104;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.92) 44%, rgba(255, 255, 255, 1));
  }

  .task-sort {
    display: grid;
    gap: 6px;
  }

  .task-sort select {
    min-width: 0;
    width: 100%;
  }

  .task-filter-menu > summary,
  .task-entry-details > summary {
    width: 100%;
    justify-content: center;
  }

  .task-filter-menu-card,
  .task-inline-editor {
    position: static;
    width: auto;
  }

  .task-rail-stats {
    display: none;
  }

  .task-view-toggle-link {
    flex: 1 1 0;
  }

  .task-entry-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .task-label-entry {
    grid-template-columns: minmax(0, 1fr);
  }

  .task-filter-grid,
  .task-entry-grid,
  .task-detail-grid,
  .task-inline-editor-grid {
    grid-template-columns: 1fr;
  }

  .task-table-row,
  .task-table.is-compact .task-table-row {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    padding: 12px;
  }

  .task-row-meta {
    grid-column: 3;
    justify-content: start;
    margin-top: 4px;
    inline-size: 100%;
    min-inline-size: 0;
    max-width: 100%;
  }

  .task-table-row .task-row-link {
    max-inline-size: 100%;
  }

  .task-row-title {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    font-size: 0.92rem;
    line-height: 1.4;
  }

  .task-inline-details {
    grid-column: 3;
  }

  .task-list-topline {
    display: none;
  }

  .task-selection-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .task-selection-actions,
  .task-selection-project-form {
    width: 100%;
    flex-wrap: wrap;
    overflow: visible;
  }

  .task-selection-project-form select {
    min-width: 0;
    width: 100%;
  }

  .shared-page .task-table-row {
    grid-template-columns: auto minmax(0, 1fr) max-content auto;
    align-items: center;
    gap: 6px;
    padding: 8px 8px;
  }

  .shared-page .task-table-row.has-due {
    padding-left: 8px;
  }

  .shared-page .task-drag-handle {
    display: none;
  }

  .shared-page .task-row-link {
    grid-column: 2;
    max-inline-size: 100%;
  }

  .shared-page .task-row-title {
    font-size: 0.86rem;
    line-height: 1.28;
  }

  .shared-page .task-row-meta {
    --task-meta-due-width: 46px;
    --task-meta-list-width: 24px;
    --task-meta-reminder-width: 24px;
    --task-meta-priority-width: 50px;
    --task-meta-gap-total: 12px;
    grid-column: 3;
    grid-row: 1;
    grid-template-columns:
      var(--task-meta-due-width)
      var(--task-meta-list-width)
      var(--task-meta-reminder-width)
      var(--task-meta-priority-width);
    justify-content: end;
    justify-items: center;
    align-items: center;
    gap: 4px;
    inline-size: auto;
    min-inline-size: 0;
    max-width: min(44vw, 168px);
    margin-top: 0;
  }

  .shared-page .task-row-chip,
  .shared-page .task-row-chip-button {
    min-height: 20px;
    padding-left: 3px;
    padding-right: 3px;
    font-size: 0.58rem;
  }

  .shared-page .task-row-chip-button.is-due,
  .shared-page .task-row-chip-button.is-checklist,
  .shared-page .task-row-chip-button.is-reminder {
    min-width: 20px;
  }

  .shared-page .task-row-chip-button.is-priority {
    min-width: 0;
  }

  .shared-page .task-chip-icon {
    width: 11px;
    height: 11px;
  }

  .shared-page .task-detail-trigger {
    grid-column: 4;
    width: 24px;
    height: 24px;
  }

  .shared-page .task-detail-trigger-icon {
    width: 16px;
    height: 16px;
  }

  .shared-page .task-main-topbar {
    position: static;
    padding: 0;
    background: transparent;
  }

  .shared-page .task-main-topbar::before {
    content: none;
    display: none;
  }

  .shared-page .task-quick-add {
    position: fixed;
    top: auto;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px + var(--studio-visual-keyboard-offset, 0px));
    left: 10px;
    z-index: 120;
    padding: 10px;
    border: 1px solid rgba(108, 99, 255, 0.24);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 36px rgba(31, 41, 55, 0.16);
  }

  .shared-page .task-quick-add::before {
    content: "Add task";
    display: block;
    margin-bottom: 6px;
    color: #667085;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .shared-page .task-quick-add .task-entry-row {
    gap: 8px;
  }

  .shared-page .task-quick-add .task-entry-submit {
    min-width: 56px;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 0.78rem;
  }

  .shared-page .task-main-column {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 148px + var(--studio-visual-keyboard-offset, 0px));
  }

  .shared-page.has-task-selection .task-quick-add {
    display: none;
  }

  .shared-page.has-task-selection .task-main-column {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 172px);
  }

  .shared-page .task-selection-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    z-index: 112;
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(26, 26, 26, 0.1);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.22);
  }

  .shared-page .task-selection-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .shared-page .task-selection-actions > *,
  .shared-page .task-selection-project-form {
    width: 100%;
  }

  .shared-page .task-selection-actions .ghost-button,
  .shared-page .task-selection-project-form select {
    width: 100%;
    justify-content: center;
  }

  .task-batch-label-form {
    position: static;
    width: auto;
    box-shadow: none;
  }

  .task-batch-label-list {
    grid-template-columns: 1fr;
  }

  .task-bucket-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }

  .task-bucket-head {
    padding: 12px 12px 0;
  }

  .task-detail-drawer {
    position: fixed;
    top: calc(var(--studio-header-height) + var(--studio-safe-top) + 18px);
    right: 24px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 108px);
    left: 24px;
    width: auto;
    z-index: 120;
    overflow: auto;
    overscroll-behavior: contain;
    box-shadow: 0 22px 44px rgba(26, 26, 26, 0.18);
    background: rgba(245, 236, 215, 0.98);
    border-radius: 20px;
  }

  .task-quick-panel {
    top: calc(var(--studio-header-height) + var(--studio-safe-top) + 18px);
    right: 14px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 92px);
    left: 14px;
    width: auto;
    max-height: none;
    transform: none;
  }

  .task-detail-drawer-head {
    flex-direction: row;
    align-items: flex-start;
  }

  .task-detail-drawer input,
  .task-detail-drawer select,
  .task-detail-drawer textarea,
  .task-mobile-curtain input,
  .task-mobile-curtain select {
    background: #ffffff;
  }

  .task-reminder-stack {
    left: 14px;
    right: 14px;
    width: auto;
    bottom: 14px;
  }
}

@media (min-width: 761px) {
  .workspace-page.is-sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .workspace-page.is-sidebar-collapsed .context-sidebar {
    display: none;
  }

  .workspace-page.is-sidebar-collapsed .workspace-sidebar-reveal {
    display: inline-flex;
  }

  .tasks-page.is-sidebar-collapsed .task-main-topbar {
    padding-left: 54px;
  }

  .tasks-page.is-sidebar-collapsed .workspace-sidebar-reveal.task-sidebar-fab {
    position: absolute;
    top: 4px;
    left: 0;
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 22px rgba(26, 26, 26, 0.08);
    z-index: 3;
  }
}

.projects-main,
.project-main-panel {
  display: grid;
  gap: 18px;
  align-content: start;
}

.project-index-card {
  gap: 16px;
}

.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  padding: 20px;
}

.admin-link-card {
  display: grid;
  align-content: start;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  min-height: 180px;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.admin-link-card:hover {
  transform: translateY(-1px);
  border-color: rgba(200, 135, 58, 0.32);
  box-shadow: 0 14px 30px rgba(26, 26, 26, 0.08);
}

.admin-link-card p {
  color: var(--studio-muted);
}

.admin-dashboard-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  align-items: stretch;
  min-height: calc(100vh - var(--studio-header-height));
  background: #f6f7f7;
}

.admin-dashboard-sidebar {
  align-self: stretch;
  display: grid;
  align-content: start;
  gap: 22px;
  min-height: calc(100vh - var(--studio-header-height));
  padding: 24px 16px;
  border-right: 1px solid rgba(15, 23, 42, 0.1);
  background: #1d2327;
  color: #f0f0f1;
}

.admin-dashboard-brand {
  display: grid;
  gap: 3px;
  padding: 0 10px 12px;
}

.admin-dashboard-brand strong {
  font-size: 1rem;
}

.admin-dashboard-brand span,
.admin-nav-kicker {
  color: rgba(240, 240, 241, 0.62);
  font-size: 0.74rem;
}

.admin-nav-group {
  display: grid;
  gap: 8px;
}

.admin-nav-kicker {
  padding: 0 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-nav-list {
  display: grid;
  gap: 2px;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 6px;
  color: #f0f0f1;
  text-decoration: none;
}

.admin-nav-link:hover,
.admin-nav-link.is-active {
  background: #2c3338;
  color: #ffffff;
}

.admin-dashboard-main {
  display: grid;
  gap: 22px;
  align-content: start;
  padding: 28px;
}

.admin-dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.admin-dashboard-hero h2 {
  margin: 0;
}

.admin-dashboard-meta {
  display: grid;
  gap: 4px;
  max-width: 360px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #ffffff;
}

.admin-dashboard-meta span,
.admin-card-section {
  color: var(--studio-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-dashboard-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-dashboard-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-dashboard-strip a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 6px;
  background: #ffffff;
  color: var(--studio-text);
  text-decoration: none;
}

.admin-dashboard-strip a:hover {
  border-color: rgba(25, 118, 210, 0.35);
  color: #135e96;
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.admin-dashboard-card {
  display: grid;
  gap: 10px;
  min-height: 156px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #ffffff;
  color: var(--studio-text);
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.admin-dashboard-card:hover {
  border-color: rgba(25, 118, 210, 0.36);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.admin-dashboard-card strong {
  font-size: 1rem;
}

.admin-dashboard-card p {
  margin: 0;
  color: var(--studio-muted);
  line-height: 1.5;
}

.admin-dashboard-content {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.admin-dashboard-content > .page-intro {
  display: none;
}

.admin-dashboard-content .card,
.admin-dashboard-content .memory-card,
.admin-dashboard-content .studio-files-inspector-card,
.admin-dashboard-content .email-settings-note-card {
  border-radius: 6px;
  box-shadow: none;
}

.admin-dashboard-content .card-kicker,
.admin-dashboard-content .eyebrow {
  color: #646970;
}

.admin-dashboard-content .primary-button {
  border-radius: 4px;
  background: #2271b1;
}

.admin-dashboard-content .ghost-button,
.admin-dashboard-content .secondary-button,
.admin-dashboard-content .studio-files-toolbar-button {
  border-radius: 4px;
}

.admin-dashboard-content .context-nav-link,
.admin-dashboard-content .studio-files-row {
  border-radius: 4px;
}

.admin-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: none;
}

.admin-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.admin-panel-head h3 {
  margin: 0;
  font-size: 1.02rem;
}

.admin-panel-head p,
.admin-muted,
.admin-table span,
.admin-stat-card small {
  color: #646970;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.admin-stat-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 6px;
  background: #ffffff;
}

.admin-stat-card span {
  color: #646970;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-stat-card strong {
  font-size: 1.7rem;
  line-height: 1.1;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.admin-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  color: #646970;
}

.admin-breadcrumbs a {
  color: #135e96;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.admin-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  background: #ffffff;
  color: #1d2327;
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
}

.admin-button:hover {
  border-color: #8c8f94;
  color: #135e96;
}

.admin-button.is-primary {
  border-color: #2271b1;
  background: #2271b1;
  color: #ffffff;
}

.admin-button.is-danger {
  border-color: rgba(185, 28, 28, 0.4);
  color: #b91c1c;
}

.admin-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.admin-table-wrap {
  min-width: 0;
  overflow: auto;
  border: 1px solid rgba(15, 23, 42, 0.1);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
}

.admin-table th {
  background: #f6f7f7;
  color: #1d2327;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-table tr.is-active,
.admin-table tbody tr:hover {
  background: #f0f6fc;
}

.admin-file-row {
  cursor: pointer;
}

.admin-table a {
  color: #135e96;
  font-weight: 600;
}

.admin-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 36%);
  gap: 16px;
  align-items: start;
}

.admin-inspector {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 6px;
  background: #f6f7f7;
}

.admin-inspector-head {
  display: grid;
  gap: 4px;
}

.admin-inspector-head span {
  color: #646970;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-inspector-head p {
  color: #646970;
  overflow-wrap: anywhere;
}

.admin-form,
.admin-inline-form,
.admin-form-grid {
  display: grid;
  gap: 10px;
}

.admin-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-form-grid .is-wide {
  grid-column: 1 / -1;
}

.admin-form label,
.admin-form-grid label {
  display: grid;
  gap: 5px;
}

.admin-form label > span,
.admin-form-grid label > span {
  color: #646970;
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-form input,
.admin-form select,
.admin-form textarea,
.admin-form-grid input,
.admin-form-grid select,
.admin-form-grid textarea,
.admin-inline-form input,
.admin-inline-form select {
  width: 100%;
  min-height: 34px;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  background: #ffffff;
  color: #1d2327;
  padding: 6px 8px;
}

.admin-form textarea {
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
}

.admin-checkbox {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.admin-checkbox input {
  width: auto;
  min-height: auto;
}

.admin-checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

.admin-partner-feature-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  background: #f6f7f7;
}

.admin-form-grid .admin-partner-feature-list {
  grid-column: 1 / -1;
}

.admin-partner-feature-list > span {
  color: #50575e;
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-check {
  position: relative;
  display: inline-flex;
  width: 17px;
  height: 17px;
}

.admin-check input {
  position: absolute;
  inset: 0;
  width: 17px;
  height: 17px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.admin-check span {
  width: 17px;
  height: 17px;
  display: block;
  border: 1px solid #8c8f94;
  border-radius: 3px;
  background: #ffffff;
}

.admin-check input:checked + span {
  background: #2271b1;
  border-color: #2271b1;
  box-shadow: inset 0 0 0 3px #ffffff;
}

.admin-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f0f0f1;
  color: #50575e;
  font-size: 0.75rem;
  font-weight: 700;
}

.admin-status-pill.is-good {
  background: #edfaef;
  color: #008a20;
}

.admin-status-pill.is-warn {
  background: #fcf9e8;
  color: #996800;
}

.admin-two-column {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1fr);
  gap: 18px;
}

.admin-detail-list {
  display: grid;
  gap: 10px;
}

.admin-detail-list div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 4px;
}

.admin-detail-list span {
  color: #646970;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-record-list {
  display: grid;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
}

.admin-record-row {
  display: grid;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.admin-record-row:last-child {
  border-bottom: 0;
}

.admin-user-row {
  grid-template-columns: minmax(180px, 1.2fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr) minmax(220px, 1.5fr) auto;
}

.admin-provider-row,
.admin-email-row {
  grid-template-columns: minmax(190px, 1.1fr) minmax(110px, 0.6fr) minmax(180px, 1fr) minmax(180px, 1fr) auto;
}

.admin-service-row {
  grid-template-columns: minmax(220px, 1.2fr) minmax(110px, 0.6fr) minmax(240px, 1.4fr) auto;
}

.admin-record-row strong {
  display: block;
}

.admin-record-row span {
  color: #646970;
}

.admin-record-row label {
  display: grid;
  gap: 5px;
}

.admin-record-row label > span {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-record-stack {
  display: grid;
  gap: 8px;
}

.admin-record-row input,
.admin-record-row select {
  width: 100%;
  min-height: 34px;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  padding: 6px 8px;
}

.admin-users-layout {
  grid-template-columns: minmax(260px, 0.72fr) minmax(360px, 1fr);
}

.admin-compact-list {
  display: grid;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
}

.admin-compact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  color: #1d2327;
  text-decoration: none;
}

.admin-compact-row:last-child {
  border-bottom: 0;
}

.admin-compact-row:hover,
.admin-compact-row.is-active {
  background: #f0f6fc;
}

.admin-compact-row strong,
.admin-compact-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-compact-row small {
  color: #646970;
}

.project-list {
  display: grid;
  gap: 6px;
}

.project-list-empty {
  margin: 0;
}

.project-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 14px;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.project-list-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
}

.project-list-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-list-link strong {
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-list-link span {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--studio-muted);
}

.project-list-age {
  font-size: 0.68rem;
  font-weight: 600;
  color: #7a7f87;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.project-list-row:hover,
.project-list-row.is-active {
  background: rgba(245, 236, 215, 0.76);
  border-color: var(--studio-line);
  transform: translateY(-1px);
}

.project-list-row.is-active .project-list-link strong {
  color: var(--studio-accent);
}

.project-home-stack {
  display: grid;
  gap: 18px;
}

.project-home-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.studio-environment-badge {
  border-color: rgba(200, 135, 58, 0.32);
  background: rgba(200, 135, 58, 0.14);
  color: var(--amber-deep);
}

.app-shell.app-env-staging .studio-header {
  border-bottom-color: rgba(200, 135, 58, 0.46);
  box-shadow: inset 0 3px 0 rgba(200, 135, 58, 0.88), 0 8px 24px rgba(26, 26, 26, 0.14);
}

.studio-topnav-link,
.header-text-link,
.mobile-primary-nav-link,
.mobile-primary-nav-link.utility-link {
  color: rgba(245, 236, 215, 0.82);
}

.studio-topnav-link {
  position: relative;
  padding: 6px 0 5px;
  margin: 0 10px;
  border-radius: 0;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.studio-topnav-link:hover,
.studio-topnav-link.is-active,
.mobile-primary-nav-link:hover,
.mobile-primary-nav-link.is-active {
  background: transparent;
  color: var(--parchment);
}

.studio-topnav-link.is-active {
  color: var(--parchment);
  box-shadow: inset 0 -2px 0 var(--amber);
}

.header-text-link:hover {
  color: var(--parchment);
}

.studio-header .mobile-primary-nav-toggle {
  background: transparent;
  border-color: rgba(245, 236, 215, 0.24);
  color: rgba(245, 236, 215, 0.88);
}

.studio-header .mobile-primary-nav-toggle:hover,
.studio-header .mobile-primary-nav-toggle.is-open {
  background: rgba(245, 236, 215, 0.1);
  border-color: rgba(245, 236, 215, 0.34);
  color: var(--parchment);
}

.mobile-primary-nav,
.mail-drawer,
.chat-composer-menu-pop,
.sidebar-guide-toast,
.email-settings-modal {
  background: var(--surface);
  border-color: var(--studio-line);
  box-shadow: var(--studio-shadow-strong);
}

.mobile-primary-nav .mobile-primary-nav-link,
.mobile-primary-nav .mobile-primary-nav-link.utility-link {
  color: var(--studio-text);
}

.mobile-primary-nav .mobile-primary-nav-link:hover,
.mobile-primary-nav .mobile-primary-nav-link.is-active,
.mobile-primary-nav .mobile-primary-nav-link.utility-link:hover {
  background: rgba(45, 80, 22, 0.08);
  color: var(--studio-accent);
}

.mobile-primary-nav-overlay,
.mail-drawer-overlay,
.modal-backdrop,
.workspace-overlay {
  background: rgba(26, 26, 26, 0.24);
}

.mobile-primary-nav-toggle,
.mobile-context-toggle,
.mail-toolbar-icon,
.chat-composer-menu-trigger,
.chat-voice-button,
.studio-files-toolbar-button {
  border-color: var(--studio-line);
  background: rgba(245, 236, 215, 0.86);
  color: var(--studio-muted);
  box-shadow: none;
}

.mobile-primary-nav-toggle:hover,
.mobile-context-toggle:hover,
.mail-toolbar-icon:hover,
.chat-composer-menu-trigger:hover,
.chat-composer-menu[open] .chat-composer-menu-trigger,
.chat-voice-button:hover,
.studio-files-toolbar-button:hover {
  background: var(--surface-strong);
  border-color: rgba(45, 80, 22, 0.22);
  color: var(--studio-accent);
}

.context-sidebar,
.projects-context-sidebar,
.project-context-sidebar {
  background: linear-gradient(180deg, rgba(236, 238, 232, 0.96), rgba(232, 234, 227, 0.98));
  border-right: 1px solid var(--studio-line);
}

.context-sidebar-footer-guide {
  background:
    linear-gradient(
      180deg,
      rgba(236, 238, 232, 0),
      rgba(236, 238, 232, 0.92) 26px,
      rgba(236, 238, 232, 0.98)
    );
}

.context-nav-link,
.chat-thread-link,
.chat-topic-link,
.email-account-link,
.email-folder-link,
.email-thread-link,
.mail-drawer-link,
.email-settings-nav-item,
.studio-files-row,
.studio-files-list-head {
  color: var(--studio-text);
}

.context-nav-link,
.chat-thread-link,
.chat-topic-link,
.email-account-link,
.email-folder-link,
.email-thread-link,
.mail-drawer-link,
.email-settings-nav-item {
  border: 1px solid transparent;
  background: transparent;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.context-nav-link:hover,
.context-nav-link.is-active,
.chat-thread-row.is-active,
.chat-thread-link:hover,
.chat-thread-link.is-active,
.chat-topic-row.is-active,
.chat-topic-link:hover,
.chat-topic-link.is-active,
.email-account-link:hover,
.email-folder-link:hover,
.email-thread-link:hover,
.email-account-link.is-active,
.email-folder-link.is-active,
.email-thread-link.is-active,
.mail-drawer-link:hover,
.mail-drawer-link.is-active,
.email-settings-nav-item:hover,
.email-settings-nav-item.is-active,
.studio-files-row:hover,
.studio-files-row.is-active {
  background: rgba(45, 80, 22, 0.08);
  border-color: rgba(45, 80, 22, 0.16);
}

.mail-drawer-link.is-active,
.email-account-link.is-active,
.email-folder-link.is-active,
.email-thread-link.is-active,
.context-nav-link.is-active,
.chat-thread-link.is-active,
.chat-topic-row.is-active,
.email-settings-nav-item.is-active {
  color: var(--studio-accent);
}

.chat-thread-age,
.chat-topic-age,
.mail-drawer-link-meta,
.mail-drawer-empty,
.sidebar-guide-link,
.sidebar-guide-toast-body,
.email-settings-close,
.email-thread-date,
.email-thread-snippet,
.email-thread-flag,
.email-thread-flagged,
.chat-voice-status {
  color: var(--studio-muted);
}

.sidebar-guide-link:hover,
.email-settings-close:hover {
  color: var(--studio-accent);
}

.card,
.metric-card,
.project-card,
.project-launcher-card,
.rail-card,
.memory-card,
.task-card,
.doc-card,
.command-card,
.guide-card,
.timeline-item,
.project-mini-card,
.doc-link-card,
.assistant-desk,
.chat-sidebar-panel.card,
.chat-thread-panel.card,
.file-list-card,
.file-preview-card,
.auth-panel,
.chat-message,
.chat-empty-state,
.chat-composer-shell,
.mail-content,
.email-sidebar,
.email-thread-panel,
.email-detail-panel,
.email-settings-modal,
.email-provider-card,
.email-managed-account-card,
.email-message-card,
.studio-files-inspector-card {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.card,
.metric-card,
.project-card,
.project-launcher-card,
.rail-card,
.memory-card,
.task-card,
.doc-card,
.command-card,
.guide-card,
.timeline-item,
.project-mini-card,
.doc-link-card,
.assistant-desk,
.auth-panel,
.studio-files-inspector-card {
  border-radius: 18px;
}

.project-launcher-card,
.hero-panel,
.project-hero,
.chat-message,
.chat-empty-state,
.chat-composer-shell,
.mail-content {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
    var(--surface);
}

.chat-message.is-assistant {
  background:
    radial-gradient(circle at top right, rgba(45, 80, 22, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
    var(--surface);
}

.chat-message.is-user {
  background:
    radial-gradient(circle at top left, rgba(200, 135, 58, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
    var(--surface);
}

.chat-message-status,
.chat-empty-state p,
.chat-thread-meta,
.chat-stage-meta,
.chat-message-meta,
.context-nav-link span,
.mail-drawer-brand span,
.email-thread-snippet-inline,
.email-account-status,
.email-account-email {
  color: var(--studio-muted);
}

.chat-composer-dock {
  background: linear-gradient(180deg, rgba(243, 244, 239, 0), rgba(243, 244, 239, 0.96) 34%);
}

.chat-composer-toolbar {
  border-top: 1px solid rgba(107, 114, 128, 0.16);
  background: rgba(255, 255, 255, 0.88);
}

.chat-composer-shell textarea,
.email-search-input,
.email-search-form select,
.mail-account-switcher select,
.chat-model-inline .model-picker-control,
.chat-provider-field select,
input,
textarea,
select {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(107, 114, 128, 0.26);
  color: var(--studio-text);
}

.chat-composer-shell textarea::placeholder,
.email-search-input::placeholder,
input::placeholder,
textarea::placeholder {
  color: rgba(107, 114, 128, 0.82);
}

input:focus,
textarea:focus,
select:focus,
.chat-composer-shell textarea:focus,
.email-search-input:focus,
.email-search-form select:focus,
.mail-account-switcher select:focus,
.chat-model-inline .model-picker-control:focus,
.chat-provider-field select:focus {
  border-color: rgba(45, 80, 22, 0.34);
  box-shadow: 0 0 0 3px var(--studio-focus);
  outline: none;
}

.primary-button,
.chat-send-button {
  background: linear-gradient(180deg, var(--studio-accent), var(--evergreen-deep));
  color: var(--parchment);
  border: 1px solid rgba(26, 26, 26, 0.06);
  box-shadow: 0 10px 24px rgba(45, 80, 22, 0.16);
}

.primary-button:hover,
.chat-send-button:hover {
  background: linear-gradient(180deg, #284813, #1d350e);
}

.chat-send-button.is-stop,
.ghost-button,
.secondary-button {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--studio-line);
  color: var(--studio-text);
  box-shadow: none;
}

.ghost-button:hover,
.secondary-button:hover,
.chat-send-button.is-stop:hover {
  background: var(--surface-strong);
  border-color: rgba(45, 80, 22, 0.18);
}

.ghost-button.danger,
.danger-button,
.chat-voice-status.is-error,
.email-inline-notice.is-error {
  color: var(--danger);
}

.chip {
  background: rgba(45, 80, 22, 0.08);
  border: 1px solid rgba(45, 80, 22, 0.14);
  color: var(--studio-accent);
}

.chip.subtle,
.status-pill,
.email-thread-flag,
.email-provider-status {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--studio-line);
  color: var(--studio-muted);
}

.email-thread-badge,
.email-provider-status.is-ready {
  background: rgba(45, 80, 22, 0.1);
  color: var(--studio-accent);
}

.email-provider-status.is-missing,
.email-inline-notice.is-error {
  background: rgba(159, 93, 87, 0.1);
  border-color: rgba(159, 93, 87, 0.18);
}

.email-inline-notice,
.email-inline-notice.is-success {
  background: rgba(45, 80, 22, 0.08);
  border-color: rgba(45, 80, 22, 0.14);
  color: var(--studio-accent);
}

.chat-voice-button.is-active {
  background: rgba(45, 80, 22, 0.1);
  border-color: rgba(45, 80, 22, 0.18);
  color: var(--studio-accent);
}

.chat-voice-button.is-speaking {
  background: rgba(200, 135, 58, 0.12);
  border-color: rgba(200, 135, 58, 0.22);
  color: var(--amber-deep);
}

.chat-voice-button.is-listening {
  background: rgba(159, 93, 87, 0.1);
  border-color: rgba(159, 93, 87, 0.18);
  color: var(--danger);
}

.mail-topbar {
  background: rgba(243, 244, 239, 0.94);
}

.mail-content,
.email-sidebar,
.email-thread-panel,
.email-detail-panel {
  border-color: var(--studio-line);
}

.email-toolbar,
.mail-list-toolbar,
.email-pane-header,
.email-list-toolbar,
.chat-composer-toolbar {
  border-color: rgba(107, 114, 128, 0.16);
}

.email-thread-link,
.email-account-link,
.email-folder-link {
  background: rgba(255, 255, 255, 0.78);
}

.email-thread-star {
  color: var(--studio-link);
}

.mail-drawer-link.is-active,
.email-thread-link.is-active,
.email-account-link.is-active,
.email-folder-link.is-active {
  box-shadow: inset 2px 0 0 var(--studio-accent);
}

.studio-files-breadcrumb-link,
.studio-files-path-up-link,
.email-load-more-link {
  color: var(--studio-link);
}

.studio-files-breadcrumb-link:hover,
.studio-files-path-up-link:hover,
.email-load-more-link:hover {
  color: var(--studio-link-strong);
}

.studio-files-toolbar-button.is-disabled,
.studio-files-toolbar-button:disabled,
.chat-voice-button:disabled,
.chat-send-button:disabled,
.primary-button:disabled,
.ghost-button:disabled {
  opacity: 0.5;
}

.sidebar-guide-toast,
.email-settings-note-card,
.studio-files-inline-preview {
  background: rgba(245, 236, 215, 0.78);
  border: 1px solid var(--studio-line);
}

.studio-files-row {
  background: transparent;
  border-bottom: 1px solid rgba(107, 114, 128, 0.12);
}

.studio-files-row:hover,
.studio-files-row.is-active {
  background: rgba(45, 80, 22, 0.08);
}

.studio-files-row.is-parent,
.studio-files-row-type,
.studio-files-row-modified,
.studio-files-row-size {
  color: var(--studio-muted);
}

.studio-files-row-check span {
  border-color: rgba(107, 114, 128, 0.34);
  background: rgba(245, 236, 215, 0.84);
}

.studio-files-row-check input:checked + span {
  border-color: var(--studio-accent);
  background: var(--studio-accent);
  box-shadow: inset 0 0 0 4px var(--parchment);
}

.studio-files-entry-icon.is-folder,
.studio-files-inspector-icon.is-folder,
.email-thread-star,
.email-thread-flagged {
  color: var(--amber-deep);
}

.studio-files-entry-icon.is-text,
.studio-files-inspector-icon.is-text {
  color: var(--studio-accent);
}

.studio-files-entry-icon.is-image,
.studio-files-inspector-icon.is-image {
  color: #8f6c37;
}

.studio-files-entry-icon.is-file,
.studio-files-inspector-icon.is-file {
  color: var(--studio-muted);
}

.mail-toolbar-icon.is-active,
.mail-hamburger.is-active {
  background: rgba(45, 80, 22, 0.08);
  border-color: rgba(45, 80, 22, 0.18);
  color: var(--studio-accent);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1a;
    --bg-top: #24231f;
    --surface: #252521;
    --surface-strong: #2a2a25;
    --surface-muted: #303029;
    --border: rgba(245, 236, 215, 0.12);
    --border-strong: rgba(245, 236, 215, 0.22);
    --text: #f5ecd7;
    --muted: #b2ac9e;
    --studio-shell-bg: #1a1a1a;
    --studio-panel: #252521;
    --studio-sidebar: #20201d;
    --studio-text: #f5ecd7;
    --studio-muted: #b2ac9e;
    --studio-line: rgba(245, 236, 215, 0.12);
    --studio-accent: #3e6d1f;
    --studio-accent-soft: rgba(62, 109, 31, 0.18);
    --studio-focus: rgba(200, 135, 58, 0.28);
    --studio-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
    --studio-shadow-strong: 0 28px 52px rgba(0, 0, 0, 0.38);
    color-scheme: dark;
  }

  body,
  .studio-header,
  .context-sidebar,
  .projects-context-sidebar,
  .project-context-sidebar,
  .mobile-primary-nav,
  .mail-drawer,
  .mail-topbar {
    background-color: var(--studio-shell-bg);
  }

  .studio-header,
  .mail-topbar {
    background: rgba(26, 26, 26, 0.9);
  }

  .context-sidebar-footer-guide {
    background:
      linear-gradient(
        180deg,
        rgba(26, 26, 26, 0),
        rgba(26, 26, 26, 0.9) 26px,
        rgba(26, 26, 26, 0.96)
      );
  }

  .chat-composer-dock {
    background: linear-gradient(180deg, rgba(26, 26, 26, 0), rgba(26, 26, 26, 0.94) 34%);
  }
}

@media (max-width: 980px) {
  .studio-brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }
}

:root {
  --studio-safe-top: env(safe-area-inset-top, 0px);
  --studio-safe-right: env(safe-area-inset-right, 0px);
  --studio-safe-bottom: env(safe-area-inset-bottom, 0px);
  --studio-safe-left: env(safe-area-inset-left, 0px);
}

html,
body,
#app {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  overscroll-behavior-x: none;
}

.app-shell,
.shell-stage,
.workspace-page,
.workspace-main,
.chat-main-panel,
.projects-main,
.project-main-panel,
.mail-shell,
.mail-content {
  min-width: 0;
  max-width: 100%;
}

.studio-mobile-context {
  display: none;
}

.studio-mobile-brand {
  display: none;
}

@media (max-width: 980px) {
  :root {
    --studio-header-height: 58px;
  }

  body {
    font-size: 15px;
  }

  .app-shell {
    min-height: 100dvh;
    height: 100dvh;
    background: #ffffff;
    overflow: hidden;
  }

  .studio-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 80;
    padding-top: var(--studio-safe-top);
    padding-left: var(--studio-safe-left);
    padding-right: var(--studio-safe-right);
    transform: translateZ(0);
    backface-visibility: hidden;
  }

  .studio-header-inner {
    min-height: var(--studio-header-height);
    padding-left: 12px;
    padding-right: 12px;
    gap: 10px;
  }

  .studio-header-left,
  .studio-header-right,
  .studio-header-actions,
  .studio-brand,
  .studio-mobile-brand {
    min-width: 0;
  }

  .studio-header-left {
    display: none;
  }

  .studio-environment-badge {
    display: none;
  }

  .studio-environment-actions {
    display: none;
  }

  .studio-header-right {
    position: absolute;
    inset: 0 12px 0 12px;
    margin-left: 0;
    justify-content: stretch;
    gap: 0;
    pointer-events: none;
  }

  .studio-header-actions {
    width: 100%;
    justify-content: space-between;
    gap: 0;
    pointer-events: auto;
  }

  .studio-notification-wrap {
    order: 2;
    margin-left: 8px;
  }

  .studio-notification-tray {
    position: fixed;
    top: calc(var(--studio-header-height) + var(--studio-safe-top) + 8px);
    right: max(12px, var(--studio-safe-right));
  }

  .mobile-context-toggle {
    order: 0;
    margin-right: auto;
  }

  .mobile-primary-nav-toggle {
    order: 1;
    margin-left: auto;
  }

  .studio-topnav,
  .desktop-header-link {
    display: none;
  }

  .studio-mobile-context {
    display: flex;
    flex: 1 1 100%;
    min-width: 0;
    justify-content: center;
    align-items: center;
    padding: 0 56px;
    position: relative;
    z-index: 1;
    pointer-events: none;
  }

  .studio-mobile-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    color: #f5ecd7;
    pointer-events: auto;
  }

  .studio-mobile-brand-mark {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
  }

  .studio-mobile-brand-name {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
  }

  .studio-mobile-context-label {
    display: none;
  }

  .mobile-context-toggle,
  .mobile-primary-nav-toggle {
    display: inline-flex;
    position: static;
    inset: auto;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    transform: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: #f5ecd7;
    flex: 0 0 auto;
    box-shadow: none;
  }

  .mobile-context-toggle .sidebar-dock-icon,
  .mobile-primary-nav-toggle .chevron-down-icon {
    width: 18px;
    height: 18px;
  }

  .mobile-context-toggle:hover,
  .mobile-context-toggle.is-open,
  .mobile-primary-nav-toggle:hover,
  .mobile-primary-nav-toggle.is-open {
    background: rgba(245, 236, 215, 0.12);
    color: #f5ecd7;
  }

  .shell-stage {
    min-height: 100dvh;
    height: 100dvh;
    padding-top: calc(var(--studio-header-height) + var(--studio-safe-top));
    overflow: hidden;
  }

  .workspace-page {
    position: relative;
    min-height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top));
    height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top));
    grid-template-columns: 1fr;
    overflow: hidden;
  }

  .workspace-main,
  .chat-main-panel,
  .projects-main,
  .project-main-panel {
    min-height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top));
    height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top));
    overflow: hidden;
  }

  .chat-page,
  .chat-surface,
  .chat-main-panel,
  .chat-stage {
    overflow: hidden;
  }

  .chat-surface {
    height: 100%;
    min-height: 0;
  }

  .chat-stage {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .workspace-overlay {
    position: fixed;
    inset: calc(var(--studio-header-height) + var(--studio-safe-top)) 0 0 0;
    display: none;
    background: rgba(17, 24, 39, 0.16);
    backdrop-filter: blur(2px);
    z-index: 65;
  }

  .context-sidebar,
  .projects-context-sidebar,
  .project-context-sidebar {
    position: fixed;
    top: calc(var(--studio-header-height) + var(--studio-safe-top));
    left: 0;
    bottom: 0;
    width: min(84vw, 340px);
    max-width: 340px;
    min-height: auto;
    padding: 12px;
    border-right: 1px solid var(--studio-line);
    border-radius: 0 18px 18px 0;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    transform: translateX(-104%);
    transition: transform 180ms ease;
    z-index: 66;
    overflow: hidden;
  }

  .workspace-page.is-sidebar-open .context-sidebar,
  .workspace-page.is-sidebar-open .projects-context-sidebar,
  .workspace-page.is-sidebar-open .project-context-sidebar {
    transform: translateX(0);
  }

  .workspace-page.is-sidebar-open .workspace-overlay {
    display: block;
  }

  .context-sidebar-header,
  .context-sidebar-actions,
  .context-sidebar-scroll,
  .context-nav-list,
  .context-nav-link {
    min-width: 0;
  }

  .context-sidebar-scroll {
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
  }

  .context-sidebar-footer-guide {
    padding-bottom: calc(10px + var(--studio-safe-bottom));
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.94) 26px, rgba(255, 255, 255, 0.98));
  }

  .mobile-primary-nav-overlay {
    position: fixed;
    inset: calc(var(--studio-header-height) + var(--studio-safe-top)) 0 0 0;
    background: rgba(17, 24, 39, 0.16);
    opacity: 0;
    pointer-events: none;
    z-index: 67;
  }

  .mobile-primary-nav-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-primary-nav {
    position: fixed;
    top: calc(var(--studio-header-height) + var(--studio-safe-top));
    right: 0;
    left: auto;
    width: min(82vw, 320px);
    max-height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top));
    border: none;
    border-left: 1px solid var(--studio-line);
    border-radius: 18px 0 0 18px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    opacity: 0;
    pointer-events: none;
    transform: translateX(104%);
    transition: transform 180ms ease, opacity 180ms ease;
    z-index: 68;
    padding-bottom: var(--studio-safe-bottom);
  }

  .mobile-primary-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }

  .mobile-primary-nav-links,
  .mobile-primary-nav-utility {
    padding-left: 14px;
    padding-right: 14px;
  }

  .mobile-primary-nav-links {
    padding-top: 12px;
    padding-bottom: 8px;
    gap: 2px;
  }

  .mobile-primary-nav-utility {
    padding-top: 8px;
    padding-bottom: 16px;
  }

  .mobile-primary-nav-link,
  .mobile-primary-nav-link.utility-link {
    padding: 10px 2px;
    font-size: 0.95rem;
  }

  .chat-stage-top {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
  }

  .chat-stage-meta {
    display: block;
    min-width: 0;
  }

  .chat-stage-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .chat-stage-top-right {
    min-width: 0;
    justify-content: flex-end;
  }

  .chat-attached-files-trigger {
    max-width: min(48vw, 190px);
    min-height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 0.78rem;
    gap: 6px;
  }

  .chat-attached-files-trigger span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .chat-attached-files-panel {
    right: 0;
    left: auto;
    width: min(320px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
  }

  .chat-transcript {
    padding: 18px 12px 150px;
  }

  .chat-scroll-region {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    overscroll-behavior-x: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .chat-composer-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 10px 12px calc(10px + var(--studio-safe-bottom));
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.94) 34%);
    z-index: 62;
    transform: translateZ(0);
    backface-visibility: hidden;
  }

  .chat-composer-shell {
    width: min(760px, calc(100% - 24px));
    margin: 0 auto;
    gap: 8px;
    padding: 8px;
    border-radius: 16px;
  }

  .chat-composer-shell textarea,
  .chat-composer-input {
    min-height: 44px;
    max-height: 28dvh;
    padding: 10px 12px;
    font-size: 0.98rem;
    line-height: 1.45;
  }

  .chat-composer-toolbar {
    gap: 6px;
    padding-top: 0;
    align-items: center;
  }

  .chat-model-bottom {
    min-width: 0;
    flex: 1 1 auto;
  }

  .chat-model-bottom .model-picker-control {
    min-height: 34px;
    font-size: 0.82rem;
  }

  .chat-voice-button,
  .chat-send-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
  }
}

@media (max-width: 760px) {
  .app-route-tasks .workspace-main,
  .app-route-shared .workspace-main,
  .app-route-drew .workspace-main {
    min-height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top));
    height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  .tasks-page .task-main-column {
    min-height: 100%;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 132px);
  }

  .shared-page .task-main-column {
    min-height: 100%;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 148px);
  }

  .shared-page .task-main-column::before,
  .shared-page .task-main-column::after {
    content: none;
    display: none;
  }

  .shared-page .task-list-card,
  .shared-page .task-table-row,
  .shared-page .shared-project-heading-row {
    color: #1f2328;
    opacity: 1;
  }

  .shared-page .task-row-title,
  .shared-page .shared-project-heading-link,
  .shared-page .shared-project-heading-row .task-row-title {
    color: #1f2328;
  }

  .shared-page .task-row-meta,
  .shared-page .task-panel-count,
  .shared-page .task-project-section-empty {
    color: #667085;
  }

  .tasks-page .task-quick-add,
  .shared-page .task-quick-add {
    bottom: calc(max(10px, env(safe-area-inset-bottom, 0px)) + var(--studio-visual-keyboard-offset, 0px));
    max-height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top) - 20px);
    overflow: auto;
  }
}

@media (max-width: 640px) {
  .studio-mobile-brand-name {
    font-size: 0.96rem;
  }

  .studio-mobile-brand-mark {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
  }

  .chat-stage-top {
    padding-left: 10px;
    padding-right: 10px;
  }

  .chat-transcript {
    padding-left: 10px;
    padding-right: 10px;
  }

  .chat-composer-dock {
    padding-left: 10px;
    padding-right: 10px;
  }
}

.admin-theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-theme-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.admin-theme-card {
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 6px;
  background: #ffffff;
}

.admin-theme-card.is-active {
  border-color: #2271b1;
  box-shadow: inset 3px 0 0 #2271b1;
}

.admin-theme-card strong {
  display: block;
}

.admin-theme-card span,
.admin-theme-card p,
.admin-inline-message,
.admin-theme-install-note span {
  color: #646970;
}

.admin-theme-swatches {
  display: flex;
  gap: 6px;
}

.admin-theme-swatches span {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
}

.admin-theme-install-note {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 6px;
  background: #f6f7f7;
}

body.theme-asana-modern,
.theme-asana-modern {
  --evergreen: #6c63ff;
  --evergreen-deep: #4f46e5;
  --parchment: #f6f7f9;
  --parchment-soft: #ffffff;
  --midnight: #1f2328;
  --slate: #667085;
  --fog: #eef1f5;
  --fog-deep: #dde2ea;
  --amber: #f06a5b;
  --amber-deep: #db574a;
  --bg: #f6f7f9;
  --bg-top: #ffffff;
  --shell: #ffffff;
  --shell-2: #fafafc;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-muted: #fafafc;
  --surface-dark: #20232a;
  --border: #dde2ea;
  --border-strong: #cfd6e2;
  --line-dark: #eef1f5;
  --text: #1f2328;
  --muted: #667085;
  --accent: #6c63ff;
  --accent-strong: #4f46e5;
  --accent-soft: #ecebff;
  --warm: #f06a5b;
  --danger: #d64545;
  --link: #4f46e5;
  --link-strong: #4338ca;
  --focus-ring: rgba(108, 99, 255, 0.28);
  --shadow: 0 8px 24px rgba(31, 41, 55, 0.05);
  --shadow-strong: 0 18px 46px rgba(31, 41, 55, 0.12);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --font-display: var(--font-ui);
  --studio-shell-bg: #f6f7f9;
  --studio-line: #eef1f5;
  --studio-panel: #ffffff;
  --studio-sidebar: #ffffff;
  --studio-text: #1f2328;
  --studio-muted: #667085;
  --studio-accent: #6c63ff;
  --studio-accent-soft: #ecebff;
  --studio-link: #4f46e5;
  --studio-link-strong: #4f46e5;
  --studio-focus: rgba(108, 99, 255, 0.28);
  --studio-shadow: 0 8px 24px rgba(31, 41, 55, 0.05);
  --studio-shadow-strong: 0 18px 46px rgba(31, 41, 55, 0.12);
}

body.theme-asana-modern {
  background: #f6f7f9;
}

.app-shell.theme-asana-modern,
body.theme-asana-modern .app-shell,
body.theme-asana-modern .shell-stage,
body.theme-asana-modern .workspace-page,
.theme-asana-modern .shell-stage,
.theme-asana-modern .workspace-page,
.theme-asana-modern .tasks-page,
.theme-asana-modern .projects-page,
.theme-asana-modern .project-workspace-page {
  background: #f6f7f9;
}

.theme-asana-modern .studio-header {
  border-bottom-color: #eef1f5;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 22px rgba(31, 41, 55, 0.04);
}

.theme-asana-modern.app-env-staging .studio-header {
  border-bottom-color: #dde2ea;
  box-shadow: inset 0 3px 0 #6c63ff, 0 8px 22px rgba(31, 41, 55, 0.04);
}

.theme-asana-modern .studio-brand,
.theme-asana-modern .studio-mobile-brand {
  color: #1f2328;
}

.theme-asana-modern .studio-brand-mark {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 10px;
}

.theme-asana-modern .studio-mobile-brand-mark {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  border-radius: 9px;
}

.theme-asana-modern .studio-environment-badge {
  border-color: #d9d6ff;
  background: #f1f0ff;
  color: #4f46e5;
}

.theme-asana-modern .studio-environment-action {
  border-color: #dde2ea;
  background: #ffffff;
  color: #4f46e5;
}

.theme-asana-modern .studio-environment-action:hover:not(:disabled),
.theme-asana-modern .studio-environment-action.is-secondary {
  border-color: #c9c4ff;
  background: #f1f0ff;
  color: #4f46e5;
  box-shadow: 0 8px 18px rgba(108, 99, 255, 0.14);
}

.theme-asana-modern .mobile-context-toggle,
.theme-asana-modern .mobile-primary-nav-toggle {
  border: 1px solid #dde2ea;
  background: #ffffff;
  color: #667085;
}

.theme-asana-modern .mobile-context-toggle:hover,
.theme-asana-modern .mobile-context-toggle.is-open,
.theme-asana-modern .mobile-primary-nav-toggle:hover,
.theme-asana-modern .mobile-primary-nav-toggle.is-open {
  border-color: #c9c4ff;
  background: #f1f0ff;
  color: #4f46e5;
}

.theme-asana-modern .mobile-primary-nav {
  border-color: #eef1f5;
  background: #ffffff;
}

.theme-asana-modern h1,
.theme-asana-modern h2,
.theme-asana-modern .studio-brand-name,
.theme-asana-modern .studio-mobile-brand-name,
.theme-asana-modern .page-intro h2,
.theme-asana-modern .page-intro h3 {
  color: #1f2328;
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: 0;
}

.theme-asana-modern .studio-brand-ac {
  color: #f06a5b;
}

.theme-asana-modern .studio-topnav-link,
.theme-asana-modern .mobile-primary-nav-link,
.theme-asana-modern .header-text-link {
  color: #667085;
}

.theme-asana-modern .studio-topnav-link.is-active,
.theme-asana-modern .mobile-primary-nav-link.is-active,
.theme-asana-modern .context-nav-link.is-active {
  background: #ecebff;
  color: #4f46e5;
}

.theme-asana-modern .studio-topnav-link:hover,
.theme-asana-modern .mobile-primary-nav-link:hover,
.theme-asana-modern .header-text-link:hover {
  background: #fafafc;
  color: #1f2328;
}

.theme-asana-modern .context-sidebar,
.theme-asana-modern .projects-context-sidebar,
.theme-asana-modern .project-context-sidebar,
.theme-asana-modern .tasks-context-sidebar {
  background: #ffffff;
  border-right-color: #eef1f5;
  color: #1f2328;
}

.theme-asana-modern .context-sidebar-footer-guide,
.theme-asana-modern .context-sidebar-actions,
.theme-asana-modern .task-rail-card {
  background: #ffffff;
  border-color: #eef1f5;
  box-shadow: none;
}

.theme-asana-modern .context-sidebar-header h2,
.theme-asana-modern .context-sidebar-header p,
.theme-asana-modern .shared-nav-heading,
.theme-asana-modern .task-rail-header p,
.theme-asana-modern .task-workbench-header p {
  color: #667085;
}

.theme-asana-modern .context-nav-link,
.theme-asana-modern .task-rail-link,
.theme-asana-modern .shared-project-nav-row .task-rail-link {
  color: #1f2328;
}

.theme-asana-modern .context-nav-link span,
.theme-asana-modern .task-rail-link strong {
  color: #667085;
}

.theme-asana-modern .context-nav-link:hover,
.theme-asana-modern .task-rail-link:hover {
  background: #fafafc;
  color: #1f2328;
}

.theme-asana-modern .task-rail-link.is-active,
.theme-asana-modern .shared-general-link.is-active,
.theme-asana-modern .shared-view-sort-link.is-active {
  background: #ecebff;
  color: #4f46e5;
}

.theme-asana-modern .task-rail-link.is-active strong {
  color: #4f46e5;
}

.theme-asana-modern .admin-dashboard-sidebar {
  background: #20232a;
  color: #f7f8fa;
}

.theme-asana-modern .admin-nav-kicker,
.theme-asana-modern .admin-dashboard-brand span {
  color: #b6bdc8;
}

.theme-asana-modern .admin-nav-link {
  color: #f7f8fa;
}

.theme-asana-modern .admin-nav-link:hover,
.theme-asana-modern .admin-nav-link.is-active {
  background: #343844;
  color: #ffffff;
  box-shadow: inset 3px 0 0 #6c63ff;
}

.theme-asana-modern .primary-button,
.theme-asana-modern .chat-send-button,
.theme-asana-modern .task-entry-submit {
  border-color: #f06a5b;
  background: #f06a5b;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(240, 106, 91, 0.18);
}

.theme-asana-modern .primary-button:hover,
.theme-asana-modern .chat-send-button:hover,
.theme-asana-modern .task-entry-submit:hover {
  border-color: #db574a;
  background: #db574a;
}

.theme-asana-modern .card,
.theme-asana-modern .rail-card,
.theme-asana-modern .tasks-workbench,
.theme-asana-modern .task-list-card,
.theme-asana-modern .task-detail-drawer,
.theme-asana-modern .task-quick-panel,
.theme-asana-modern .project-hero,
.theme-asana-modern .project-task-panel {
  border-color: #eef1f5;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.05);
}

.theme-asana-modern .task-rail-card,
.theme-asana-modern .task-quick-add,
.theme-asana-modern .task-completed-group,
.theme-asana-modern .task-list-empty {
  border-color: #eef1f5;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.05);
}

.theme-asana-modern .shared-project-heading-row {
  background: #fafafc;
  border-bottom-color: #eef1f5;
}

.theme-asana-modern .task-project-section-heading {
  background: transparent;
  border-bottom-color: #eef1f5;
}

.theme-asana-modern .task-table-row {
  border-top-color: #eef1f5;
  background: #ffffff;
  color: #1f2328;
}

.theme-asana-modern .task-row-title,
.theme-asana-modern .shared-page .task-row-title {
  color: #1f2328;
}

.theme-asana-modern .task-table-row:hover {
  background: #fafafc;
}

.theme-asana-modern .task-table-row.is-batch-selected {
  background: #f1f0ff;
  box-shadow: inset 0 0 0 1px rgba(108, 99, 255, 0.18);
}

.theme-asana-modern .studio-notification-button,
.theme-asana-modern .studio-profile-toggle {
  border-color: rgba(108, 99, 255, 0.24);
  background: rgba(108, 99, 255, 0.08);
  color: #6c63ff;
}

.theme-asana-modern .studio-notification-button:hover,
.theme-asana-modern .studio-notification-wrap.is-open .studio-notification-button,
.theme-asana-modern .studio-profile-toggle:hover,
.theme-asana-modern .studio-profile-toggle.is-open {
  border-color: rgba(108, 99, 255, 0.38);
  background: rgba(108, 99, 255, 0.13);
  color: #5148e8;
  box-shadow: 0 10px 22px rgba(108, 99, 255, 0.14);
}

.theme-asana-modern .studio-notification-count {
  background: #6c63ff;
}

.theme-asana-modern .task-table-row.is-detail-open {
  background: #f1f0ff;
  box-shadow: inset 3px 0 0 #6c63ff, inset 0 0 0 1px rgba(108, 99, 255, 0.22);
}

.theme-asana-modern .task-table-row.is-done,
.theme-asana-modern .task-table-row.is-recently-completed {
  background: #f3f4f6;
}

.theme-asana-modern .task-check-button {
  border-color: #b8c0cc;
  border-radius: 4px;
}

.theme-asana-modern .task-check-button.is-done {
  border-color: #6c63ff;
  background: #6c63ff;
  color: #ffffff;
}

.theme-asana-modern .task-chip-icon {
  width: 13px;
  height: 13px;
  stroke-width: 1.8;
}

.theme-asana-modern .task-row-chip,
.theme-asana-modern .task-row-chip-button {
  border-color: transparent;
  color: #98a2b3;
  font-weight: 700;
}

.theme-asana-modern .task-row-chip-button:hover {
  border-color: rgba(108, 99, 255, 0.18);
  background: #fafafc;
  color: #4f46e5;
}

.theme-asana-modern .task-row-chip.is-checklist.is-has-items,
.theme-asana-modern .task-row-chip.is-reminder.is-scheduled,
.theme-asana-modern .task-row-chip.is-due.is-scheduled,
.theme-asana-modern .shared-page .task-row-chip-button.is-checklist.is-has-items,
.theme-asana-modern .shared-page .task-row-chip-button.is-reminder.is-scheduled,
.theme-asana-modern .shared-page .task-row-chip-button.is-due.is-scheduled {
  border-color: rgba(108, 99, 255, 0.2);
  background: rgba(108, 99, 255, 0.1);
  color: #4f46e5;
}

.theme-asana-modern .task-row-chip.is-due.is-today,
.theme-asana-modern .shared-page .task-row-chip-button.is-due.is-today {
  border-color: rgba(247, 184, 75, 0.26);
  background: rgba(247, 184, 75, 0.14);
  color: #9a5d18;
}

.theme-asana-modern .task-row-chip.is-priority.is-high,
.theme-asana-modern .shared-page .task-row-chip-button.is-priority.is-high {
  border-color: rgba(247, 184, 75, 0.26);
  background: rgba(247, 184, 75, 0.14);
  color: #9a5d18;
}

.theme-asana-modern .task-row-chip.is-priority.is-urgent,
.theme-asana-modern .task-row-chip.is-due.is-overdue,
.theme-asana-modern .shared-page .task-row-chip-button.is-priority.is-urgent,
.theme-asana-modern .shared-page .task-row-chip-button.is-due.is-overdue {
  border-color: rgba(214, 69, 69, 0.18);
  background: rgba(214, 69, 69, 0.08);
  color: #d64545;
}

body.theme-strawberry-shortcake,
.theme-strawberry-shortcake {
  --evergreen: #5b8c4a;
  --evergreen-deep: #38652f;
  --parchment: #fff6ef;
  --parchment-soft: #fffaf5;
  --midnight: #3d2a2e;
  --slate: #7a6266;
  --fog: #f8e3dc;
  --fog-deep: #f0c9c6;
  --amber: #d92d5c;
  --amber-deep: #b7204a;
  --bg: #fff6ef;
  --bg-top: #fffaf5;
  --shell: #fffaf5;
  --shell-2: #fff3f3;
  --surface: #fffaf5;
  --surface-strong: #ffffff;
  --surface-muted: #fff0f2;
  --surface-dark: #4a3035;
  --border: #f0c9c6;
  --border-strong: #e7aaa7;
  --line-dark: #f8e3dc;
  --text: #3d2a2e;
  --muted: #7a6266;
  --accent: #d92d5c;
  --accent-strong: #b7204a;
  --accent-soft: #ffe1e8;
  --warm: #f59a73;
  --danger: #c9364b;
  --link: #b7204a;
  --link-strong: #8f1c3e;
  --focus-ring: rgba(217, 45, 92, 0.26);
  --shadow: 0 10px 26px rgba(130, 59, 70, 0.08);
  --shadow-strong: 0 20px 52px rgba(130, 59, 70, 0.16);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --font-display: var(--font-ui);
  --studio-shell-bg: #fff6ef;
  --studio-line: #f8e3dc;
  --studio-panel: #fffaf5;
  --studio-sidebar: #fffaf5;
  --studio-text: #3d2a2e;
  --studio-muted: #7a6266;
  --studio-accent: #d92d5c;
  --studio-accent-soft: #ffe1e8;
  --studio-link: #b7204a;
  --studio-link-strong: #8f1c3e;
  --studio-focus: rgba(217, 45, 92, 0.26);
  --studio-shadow: 0 10px 26px rgba(130, 59, 70, 0.08);
  --studio-shadow-strong: 0 20px 52px rgba(130, 59, 70, 0.16);
}

body.theme-strawberry-shortcake {
  background: #fff6ef;
}

.app-shell.theme-strawberry-shortcake,
body.theme-strawberry-shortcake .app-shell,
body.theme-strawberry-shortcake .shell-stage,
body.theme-strawberry-shortcake .workspace-page,
.theme-strawberry-shortcake .shell-stage,
.theme-strawberry-shortcake .workspace-page,
.theme-strawberry-shortcake .tasks-page,
.theme-strawberry-shortcake .projects-page,
.theme-strawberry-shortcake .project-workspace-page {
  background:
    linear-gradient(180deg, rgba(255, 225, 232, 0.42), rgba(255, 246, 239, 0) 220px),
    #fff6ef;
}

.theme-strawberry-shortcake .studio-header {
  border-bottom-color: #f0c9c6;
  background: rgba(255, 250, 245, 0.95);
  box-shadow: 0 8px 22px rgba(130, 59, 70, 0.06);
}

.theme-strawberry-shortcake.app-env-staging .studio-header {
  border-bottom-color: #e7aaa7;
  box-shadow: inset 0 3px 0 #d92d5c, 0 8px 22px rgba(130, 59, 70, 0.06);
}

.theme-strawberry-shortcake .studio-brand,
.theme-strawberry-shortcake .studio-mobile-brand,
.theme-strawberry-shortcake h1,
.theme-strawberry-shortcake h2,
.theme-strawberry-shortcake .studio-brand-name,
.theme-strawberry-shortcake .studio-mobile-brand-name,
.theme-strawberry-shortcake .page-intro h2,
.theme-strawberry-shortcake .page-intro h3 {
  color: #3d2a2e;
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: 0;
}

.theme-strawberry-shortcake .studio-brand-mark {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 10px;
}

.theme-strawberry-shortcake .studio-mobile-brand-mark {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  border-radius: 9px;
}

.theme-strawberry-shortcake .studio-brand-ac {
  color: #d92d5c;
}

.theme-strawberry-shortcake .studio-environment-badge,
.theme-strawberry-shortcake .studio-topnav-link.is-active,
.theme-strawberry-shortcake .mobile-primary-nav-link.is-active,
.theme-strawberry-shortcake .context-nav-link.is-active,
.theme-strawberry-shortcake .task-rail-link.is-active,
.theme-strawberry-shortcake .shared-general-link.is-active,
.theme-strawberry-shortcake .shared-view-sort-link.is-active {
  border-color: #f0c9c6;
  background: #ffe1e8;
  color: #b7204a;
}

.theme-strawberry-shortcake .studio-environment-action,
.theme-strawberry-shortcake .mobile-context-toggle,
.theme-strawberry-shortcake .mobile-primary-nav-toggle {
  border-color: #f0c9c6;
  background: #fffaf5;
  color: #7a6266;
}

.theme-strawberry-shortcake .studio-environment-action:hover:not(:disabled),
.theme-strawberry-shortcake .studio-environment-action.is-secondary,
.theme-strawberry-shortcake .mobile-context-toggle:hover,
.theme-strawberry-shortcake .mobile-context-toggle.is-open,
.theme-strawberry-shortcake .mobile-primary-nav-toggle:hover,
.theme-strawberry-shortcake .mobile-primary-nav-toggle.is-open {
  border-color: #e7aaa7;
  background: #fff0f2;
  color: #b7204a;
  box-shadow: 0 8px 18px rgba(217, 45, 92, 0.12);
}

.theme-strawberry-shortcake .studio-notification-button,
.theme-strawberry-shortcake .studio-profile-toggle {
  border-color: rgba(124, 58, 237, 0.22);
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
}

.theme-strawberry-shortcake .studio-notification-button:hover,
.theme-strawberry-shortcake .studio-notification-wrap.is-open .studio-notification-button,
.theme-strawberry-shortcake .studio-profile-toggle:hover,
.theme-strawberry-shortcake .studio-profile-toggle.is-open {
  border-color: rgba(124, 58, 237, 0.34);
  background: rgba(124, 58, 237, 0.13);
  color: #6d28d9;
  box-shadow: 0 8px 18px rgba(124, 58, 237, 0.14);
}

.theme-strawberry-shortcake .mobile-primary-nav,
.theme-strawberry-shortcake .context-sidebar,
.theme-strawberry-shortcake .projects-context-sidebar,
.theme-strawberry-shortcake .project-context-sidebar,
.theme-strawberry-shortcake .tasks-context-sidebar {
  border-color: #f8e3dc;
  background: #fffaf5;
  color: #3d2a2e;
}

.theme-strawberry-shortcake .studio-topnav-link,
.theme-strawberry-shortcake .mobile-primary-nav-link,
.theme-strawberry-shortcake .header-text-link,
.theme-strawberry-shortcake .context-sidebar-header h2,
.theme-strawberry-shortcake .context-sidebar-header p,
.theme-strawberry-shortcake .shared-nav-heading,
.theme-strawberry-shortcake .task-rail-header p,
.theme-strawberry-shortcake .task-workbench-header p,
.theme-strawberry-shortcake .context-nav-link span,
.theme-strawberry-shortcake .task-rail-link strong {
  color: #7a6266;
}

.theme-strawberry-shortcake .studio-topnav-link:hover,
.theme-strawberry-shortcake .mobile-primary-nav-link:hover,
.theme-strawberry-shortcake .header-text-link:hover,
.theme-strawberry-shortcake .context-nav-link:hover,
.theme-strawberry-shortcake .task-rail-link:hover {
  background: #fff0f2;
  color: #3d2a2e;
}

.theme-strawberry-shortcake .context-nav-link,
.theme-strawberry-shortcake .task-rail-link,
.theme-strawberry-shortcake .shared-project-nav-row .task-rail-link {
  color: #3d2a2e;
}

.theme-strawberry-shortcake .task-rail-link.is-active strong {
  color: #b7204a;
}

.theme-strawberry-shortcake .admin-dashboard-sidebar {
  background: #4a3035;
  color: #fffaf5;
}

.theme-strawberry-shortcake .admin-nav-kicker,
.theme-strawberry-shortcake .admin-dashboard-brand span {
  color: #f0c9c6;
}

.theme-strawberry-shortcake .admin-nav-link {
  color: #fffaf5;
}

.theme-strawberry-shortcake .admin-nav-link:hover,
.theme-strawberry-shortcake .admin-nav-link.is-active {
  background: #634247;
  color: #ffffff;
  box-shadow: inset 3px 0 0 #d92d5c;
}

.theme-strawberry-shortcake .primary-button,
.theme-strawberry-shortcake .chat-send-button,
.theme-strawberry-shortcake .task-entry-submit {
  border-color: #d92d5c;
  background: #d92d5c;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(217, 45, 92, 0.18);
}

.theme-strawberry-shortcake .primary-button:hover,
.theme-strawberry-shortcake .chat-send-button:hover,
.theme-strawberry-shortcake .task-entry-submit:hover {
  border-color: #b7204a;
  background: #b7204a;
}

.theme-strawberry-shortcake .card,
.theme-strawberry-shortcake .rail-card,
.theme-strawberry-shortcake .tasks-workbench,
.theme-strawberry-shortcake .task-list-card,
.theme-strawberry-shortcake .task-detail-drawer,
.theme-strawberry-shortcake .task-quick-panel,
.theme-strawberry-shortcake .project-hero,
.theme-strawberry-shortcake .project-task-panel,
.theme-strawberry-shortcake .context-sidebar-footer-guide,
.theme-strawberry-shortcake .context-sidebar-actions,
.theme-strawberry-shortcake .task-rail-card,
.theme-strawberry-shortcake .task-quick-add,
.theme-strawberry-shortcake .task-completed-group,
.theme-strawberry-shortcake .task-list-empty {
  border-color: #f8e3dc;
  border-radius: 10px;
  background: #fffaf5;
  box-shadow: 0 10px 26px rgba(130, 59, 70, 0.08);
}

.theme-strawberry-shortcake .shared-project-heading-row,
.theme-strawberry-shortcake .task-table-row:hover {
  background: #fff0f2;
  border-bottom-color: #f8e3dc;
}

.theme-strawberry-shortcake .task-table-row {
  border-top-color: #f8e3dc;
  background: #fffaf5;
  color: #3d2a2e;
}

.theme-strawberry-shortcake .task-row-title,
.theme-strawberry-shortcake .shared-page .task-row-title {
  color: #3d2a2e;
}

.theme-strawberry-shortcake .task-table-row.is-batch-selected {
  background: #ffe1e8;
  box-shadow: inset 0 0 0 1px rgba(217, 45, 92, 0.18);
}

.theme-strawberry-shortcake .task-table-row.is-done,
.theme-strawberry-shortcake .task-table-row.is-recently-completed {
  background: #f8e3dc;
}

.theme-strawberry-shortcake .task-check-button {
  border-color: #d9aaa5;
  border-radius: 4px;
}

.theme-strawberry-shortcake .task-check-button.is-done {
  border-color: #5b8c4a;
  background: #5b8c4a;
  color: #ffffff;
}

.theme-strawberry-shortcake .task-chip-icon {
  width: 13px;
  height: 13px;
  stroke-width: 1.8;
}

.theme-strawberry-shortcake .task-row-chip,
.theme-strawberry-shortcake .task-row-chip-button {
  border-color: transparent;
  color: #a98587;
  font-weight: 700;
}

.theme-strawberry-shortcake .task-row-chip-button:hover {
  border-color: rgba(217, 45, 92, 0.16);
  background: #fff0f2;
  color: #b7204a;
}

.theme-strawberry-shortcake .task-row-chip.is-checklist.is-has-items,
.theme-strawberry-shortcake .task-row-chip.is-reminder.is-scheduled,
.theme-strawberry-shortcake .task-row-chip.is-due.is-scheduled,
.theme-strawberry-shortcake .shared-page .task-row-chip-button.is-checklist.is-has-items,
.theme-strawberry-shortcake .shared-page .task-row-chip-button.is-reminder.is-scheduled,
.theme-strawberry-shortcake .shared-page .task-row-chip-button.is-due.is-scheduled {
  border-color: rgba(91, 140, 74, 0.2);
  background: rgba(91, 140, 74, 0.1);
  color: #38652f;
}

.theme-strawberry-shortcake .task-row-chip.is-due.is-today,
.theme-strawberry-shortcake .task-row-chip.is-priority.is-high,
.theme-strawberry-shortcake .shared-page .task-row-chip-button.is-due.is-today,
.theme-strawberry-shortcake .shared-page .task-row-chip-button.is-priority.is-high {
  border-color: rgba(245, 154, 115, 0.28);
  background: rgba(245, 154, 115, 0.14);
  color: #9b5333;
}

.theme-strawberry-shortcake .task-row-chip.is-priority.is-urgent,
.theme-strawberry-shortcake .task-row-chip.is-due.is-overdue,
.theme-strawberry-shortcake .shared-page .task-row-chip-button.is-priority.is-urgent,
.theme-strawberry-shortcake .shared-page .task-row-chip-button.is-due.is-overdue {
  border-color: rgba(201, 54, 75, 0.18);
  background: rgba(201, 54, 75, 0.08);
  color: #c9364b;
}

/* Berryglow Studio refines the strawberry theme slot into the Partner-first theme. */
body.theme-strawberry-shortcake,
.theme-strawberry-shortcake {
  --berry-jam: #d92d5c;
  --berry-glaze: #f0527c;
  --berry-deep: #9f1d46;
  --berry-shadow: #7e1838;
  --berry-milk: #ffe1e8;
  --berry-pink-cream: #fff0f4;
  --berry-active-wash: #ffd2de;
  --berry-rose-border: #f0b8c4;
  --berry-whipped-cream: #fff9f3;
  --berry-vanilla: #ffeedc;
  --berry-crumb: #f7d9b8;
  --berry-sugar: #fffdf8;
  --berry-leaf: #5b8c4a;
  --berry-mint: #a8d8a0;
  --berry-garden: #2f5e3a;
  --berry-cocoa: #3d2a2e;
  --berry-rose-cocoa: #6f4c54;
  --berry-muted-cocoa: #8a6d72;
  --berry-soft-line: #f0c9c6;
  --berry-rainbow: linear-gradient(90deg, #ff8fc7, #ffb86b, #ffe66d, #8be8b1, #8ccbff, #b99cff);
  --evergreen: var(--berry-leaf);
  --evergreen-deep: var(--berry-garden);
  --parchment: var(--berry-whipped-cream);
  --parchment-soft: var(--berry-sugar);
  --midnight: var(--berry-cocoa);
  --slate: var(--berry-rose-cocoa);
  --fog: var(--berry-soft-line);
  --fog-deep: var(--berry-rose-border);
  --amber: var(--berry-jam);
  --amber-deep: var(--berry-deep);
  --bg: var(--berry-whipped-cream);
  --bg-top: var(--berry-whipped-cream);
  --shell: var(--berry-sugar);
  --shell-2: var(--berry-pink-cream);
  --surface: var(--berry-sugar);
  --surface-strong: #ffffff;
  --surface-muted: var(--berry-pink-cream);
  --surface-dark: #4a3035;
  --border: var(--berry-soft-line);
  --border-strong: var(--berry-rose-border);
  --line-dark: var(--berry-soft-line);
  --text: var(--berry-cocoa);
  --muted: var(--berry-rose-cocoa);
  --accent: var(--berry-jam);
  --accent-strong: var(--berry-deep);
  --accent-soft: var(--berry-milk);
  --warm: var(--berry-crumb);
  --danger: #c9364b;
  --link: var(--berry-deep);
  --link-strong: var(--berry-shadow);
  --focus-ring: rgba(217, 45, 92, 0.28);
  --shadow: 0 10px 26px rgba(130, 59, 70, 0.1);
  --shadow-strong: 0 20px 52px rgba(130, 59, 70, 0.16);
  --radius-xl: 12px;
  --radius-lg: 10px;
  --radius-md: 8px;
  --radius-sm: 8px;
  --font-ui: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --studio-shell-bg: var(--berry-whipped-cream);
  --studio-line: var(--berry-soft-line);
  --studio-panel: var(--berry-sugar);
  --studio-sidebar: var(--berry-milk);
  --studio-text: var(--berry-cocoa);
  --studio-muted: var(--berry-rose-cocoa);
  --studio-accent: var(--berry-jam);
  --studio-accent-soft: var(--berry-milk);
  --studio-link: var(--berry-deep);
  --studio-link-strong: var(--berry-shadow);
  --studio-focus: rgba(217, 45, 92, 0.28);
  --studio-shadow: 0 10px 26px rgba(130, 59, 70, 0.1);
  --studio-shadow-strong: 0 20px 52px rgba(130, 59, 70, 0.16);
}

body.theme-strawberry-shortcake {
  background: var(--berry-whipped-cream);
}

.app-shell.theme-strawberry-shortcake,
body.theme-strawberry-shortcake .app-shell,
body.theme-strawberry-shortcake .shell-stage,
body.theme-strawberry-shortcake .workspace-page,
.theme-strawberry-shortcake .shell-stage,
.theme-strawberry-shortcake .workspace-page,
.theme-strawberry-shortcake .tasks-page,
.theme-strawberry-shortcake .projects-page,
.theme-strawberry-shortcake .project-workspace-page {
  background: var(--berry-whipped-cream);
}

.theme-strawberry-shortcake .studio-header {
  border-bottom-color: var(--berry-soft-line);
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 8px 22px rgba(130, 59, 70, 0.06);
}

.theme-strawberry-shortcake.app-env-staging .studio-header {
  border-bottom-color: var(--berry-soft-line);
  box-shadow: inset 0 3px 0 var(--berry-jam), 0 8px 22px rgba(130, 59, 70, 0.06);
}

.theme-strawberry-shortcake .studio-brand-name,
.theme-strawberry-shortcake .studio-mobile-brand-name,
.theme-strawberry-shortcake h1,
.theme-strawberry-shortcake h2,
.theme-strawberry-shortcake .page-intro h2,
.theme-strawberry-shortcake .page-intro h3,
.theme-strawberry-shortcake .task-list-empty strong {
  color: var(--berry-cocoa);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0;
}

.theme-strawberry-shortcake .studio-brand,
.theme-strawberry-shortcake .studio-mobile-brand,
.theme-strawberry-shortcake .task-row-title,
.theme-strawberry-shortcake .shared-page .task-row-title,
.theme-strawberry-shortcake .task-table-row {
  color: var(--berry-cocoa);
  font-family: var(--font-ui);
}

.theme-strawberry-shortcake .studio-brand-mark,
.theme-strawberry-shortcake .studio-mobile-brand-mark {
  display: block;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  box-shadow: none;
}

.theme-strawberry-shortcake .studio-brand-ac {
  color: var(--berry-jam);
}

.theme-strawberry-shortcake .mobile-primary-nav,
.theme-strawberry-shortcake .context-sidebar,
.theme-strawberry-shortcake .projects-context-sidebar,
.theme-strawberry-shortcake .project-context-sidebar,
.theme-strawberry-shortcake .tasks-context-sidebar,
.theme-strawberry-shortcake .context-sidebar-footer-guide,
.theme-strawberry-shortcake .context-sidebar-actions {
  border-color: var(--berry-rose-border);
  background: var(--berry-milk);
  color: var(--berry-cocoa);
}

.theme-strawberry-shortcake .context-sidebar-footer-guide {
  background:
    linear-gradient(180deg, rgba(255, 225, 232, 0), rgba(255, 225, 232, 0.94) 28px, var(--berry-milk));
}

.theme-strawberry-shortcake .studio-topnav-link,
.theme-strawberry-shortcake .mobile-primary-nav-link,
.theme-strawberry-shortcake .header-text-link,
.theme-strawberry-shortcake .context-sidebar-header h2,
.theme-strawberry-shortcake .context-sidebar-header p,
.theme-strawberry-shortcake .shared-nav-heading,
.theme-strawberry-shortcake .task-rail-header p,
.theme-strawberry-shortcake .task-workbench-header p,
.theme-strawberry-shortcake .context-nav-link span,
.theme-strawberry-shortcake .task-rail-link strong,
.theme-strawberry-shortcake .task-rail-link span {
  color: var(--berry-rose-cocoa);
}

.theme-strawberry-shortcake .context-nav-link,
.theme-strawberry-shortcake .task-rail-link,
.theme-strawberry-shortcake .shared-project-nav-row .task-rail-link {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  color: var(--berry-rose-cocoa);
}

.theme-strawberry-shortcake .studio-topnav-link:hover,
.theme-strawberry-shortcake .mobile-primary-nav-link:hover,
.theme-strawberry-shortcake .header-text-link:hover,
.theme-strawberry-shortcake .context-nav-link:hover,
.theme-strawberry-shortcake .task-rail-link:hover {
  background: var(--berry-pink-cream);
  color: var(--berry-cocoa);
}

.theme-strawberry-shortcake .studio-environment-badge,
.theme-strawberry-shortcake .studio-topnav-link.is-active,
.theme-strawberry-shortcake .mobile-primary-nav-link.is-active,
.theme-strawberry-shortcake .context-nav-link.is-active,
.theme-strawberry-shortcake .task-rail-link.is-active,
.theme-strawberry-shortcake .shared-general-link.is-active,
.theme-strawberry-shortcake .shared-view-sort-link.is-active {
  border-color: var(--berry-rose-border);
  background: var(--berry-active-wash);
  color: var(--berry-shadow);
}

.theme-strawberry-shortcake .context-nav-link.is-active::before,
.theme-strawberry-shortcake .task-rail-link.is-active::before,
.theme-strawberry-shortcake .shared-general-link.is-active::before,
.theme-strawberry-shortcake .shared-view-sort-link.is-active::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 0;
  width: 3px;
  border-radius: 999px;
  background: var(--berry-rainbow);
}

.theme-strawberry-shortcake .task-rail-link.is-active strong,
.theme-strawberry-shortcake .task-rail-link.is-active span {
  color: var(--berry-shadow);
}

.theme-strawberry-shortcake .studio-environment-action,
.theme-strawberry-shortcake .mobile-context-toggle,
.theme-strawberry-shortcake .mobile-primary-nav-toggle,
.theme-strawberry-shortcake .ghost-button,
.theme-strawberry-shortcake .secondary-button {
  border-color: var(--berry-soft-line);
  background: var(--berry-whipped-cream);
  color: var(--berry-rose-cocoa);
}

.theme-strawberry-shortcake .studio-environment-action:hover:not(:disabled),
.theme-strawberry-shortcake .studio-environment-action.is-secondary,
.theme-strawberry-shortcake .mobile-context-toggle:hover,
.theme-strawberry-shortcake .mobile-context-toggle.is-open,
.theme-strawberry-shortcake .mobile-primary-nav-toggle:hover,
.theme-strawberry-shortcake .mobile-primary-nav-toggle.is-open,
.theme-strawberry-shortcake .ghost-button:hover,
.theme-strawberry-shortcake .secondary-button:hover {
  border-color: var(--berry-rose-border);
  background: var(--berry-pink-cream);
  color: var(--berry-deep);
  box-shadow: 0 8px 18px rgba(217, 45, 92, 0.12);
}

.theme-strawberry-shortcake .primary-button,
.theme-strawberry-shortcake .chat-send-button,
.theme-strawberry-shortcake .task-entry-submit {
  border-color: var(--berry-jam);
  background: var(--berry-jam);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(217, 45, 92, 0.18);
}

.theme-strawberry-shortcake .primary-button:hover,
.theme-strawberry-shortcake .chat-send-button:hover,
.theme-strawberry-shortcake .task-entry-submit:hover {
  border-color: var(--berry-deep);
  background: var(--berry-deep);
}

.theme-strawberry-shortcake :focus-visible {
  outline-color: rgba(217, 45, 92, 0.28);
}

.theme-strawberry-shortcake .card,
.theme-strawberry-shortcake .rail-card,
.theme-strawberry-shortcake .tasks-workbench,
.theme-strawberry-shortcake .task-list-card,
.theme-strawberry-shortcake .task-detail-drawer,
.theme-strawberry-shortcake .task-quick-panel,
.theme-strawberry-shortcake .project-hero,
.theme-strawberry-shortcake .project-task-panel,
.theme-strawberry-shortcake .task-rail-card,
.theme-strawberry-shortcake .task-quick-add,
.theme-strawberry-shortcake .task-completed-group,
.theme-strawberry-shortcake .task-list-empty,
.theme-strawberry-shortcake input,
.theme-strawberry-shortcake select,
.theme-strawberry-shortcake textarea {
  border-color: var(--berry-soft-line);
  border-radius: 8px;
  background: var(--berry-sugar);
  box-shadow: 0 10px 26px rgba(130, 59, 70, 0.08);
}

.theme-strawberry-shortcake .task-quick-add,
.theme-strawberry-shortcake input,
.theme-strawberry-shortcake select,
.theme-strawberry-shortcake textarea {
  background: #ffffff;
  box-shadow: none;
}

.theme-strawberry-shortcake .shared-project-heading-row,
.theme-strawberry-shortcake .task-table-row:hover {
  background: var(--berry-pink-cream);
  border-bottom-color: var(--berry-soft-line);
}

.theme-strawberry-shortcake .task-project-section-heading {
  background: transparent;
  border-bottom-color: rgba(240, 201, 198, 0.72);
}

.theme-strawberry-shortcake .task-project-section-heading .task-row-title {
  color: var(--berry-rose-cocoa);
}

.theme-strawberry-shortcake .task-project-section-group:not(.is-default-section) {
  border-left-color: rgba(217, 45, 92, 0.18);
}

.theme-strawberry-shortcake .task-table-row {
  border-top-color: var(--berry-soft-line);
  background: var(--berry-sugar);
  color: var(--berry-cocoa);
}

.theme-strawberry-shortcake .task-table-row.is-batch-selected {
  background: var(--berry-milk);
  box-shadow: inset 0 0 0 1px rgba(217, 45, 92, 0.18);
}

.theme-strawberry-shortcake .task-table-row.is-batch-selected::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--berry-rainbow);
}

.theme-strawberry-shortcake .task-table-row.is-done,
.theme-strawberry-shortcake .task-table-row.is-recently-completed {
  background: rgba(185, 156, 255, 0.16);
}

.theme-strawberry-shortcake .task-table-row.is-done .task-row-title,
.theme-strawberry-shortcake .task-table-row.is-recently-completed .task-row-title {
  color: #8a73c7;
  text-decoration-color: #8a73c7;
}

.theme-strawberry-shortcake .task-check-button {
  position: relative;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--berry-jam);
  box-shadow: none;
}

.theme-strawberry-shortcake .task-check-button span {
  display: none;
}

.theme-strawberry-shortcake .task-check-button::before {
  content: "\2661";
  display: block;
  font-size: 23px;
  line-height: 1;
  color: var(--berry-jam);
}

.theme-strawberry-shortcake .task-check-button:hover {
  background: transparent;
  color: var(--berry-glaze);
}

.theme-strawberry-shortcake .task-check-button:hover::before {
  color: var(--berry-glaze);
}

.theme-strawberry-shortcake .task-check-button.is-done {
  border: 0;
  background: transparent;
  color: var(--berry-jam);
}

.theme-strawberry-shortcake .task-check-button.is-done::before {
  content: "\2665";
  color: var(--berry-jam);
}

.theme-strawberry-shortcake .task-check-button.is-done::after {
  content: "\2713";
  position: absolute;
  top: 4px;
  left: 6px;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.theme-strawberry-shortcake .task-row-chip,
.theme-strawberry-shortcake .task-row-chip-button {
  border-color: transparent;
  color: var(--berry-muted-cocoa);
  font-weight: 700;
}

.theme-strawberry-shortcake .task-row-chip-button:hover {
  border-color: rgba(217, 45, 92, 0.16);
  background: var(--berry-pink-cream);
  color: var(--berry-deep);
}

.theme-strawberry-shortcake .task-row-chip.is-checklist.is-has-items,
.theme-strawberry-shortcake .task-row-chip.is-reminder.is-scheduled,
.theme-strawberry-shortcake .task-row-chip.is-due.is-scheduled,
.theme-strawberry-shortcake .shared-page .task-row-chip-button.is-checklist.is-has-items,
.theme-strawberry-shortcake .shared-page .task-row-chip-button.is-reminder.is-scheduled,
.theme-strawberry-shortcake .shared-page .task-row-chip-button.is-due.is-scheduled {
  border-color: rgba(91, 140, 74, 0.2);
  background: rgba(91, 140, 74, 0.1);
  color: var(--berry-garden);
}

.theme-strawberry-shortcake .task-row-chip.is-due.is-today,
.theme-strawberry-shortcake .task-row-chip.is-priority.is-high,
.theme-strawberry-shortcake .shared-page .task-row-chip-button.is-due.is-today,
.theme-strawberry-shortcake .shared-page .task-row-chip-button.is-priority.is-high {
  border-color: rgba(247, 217, 184, 0.72);
  background: rgba(247, 217, 184, 0.42);
  color: #9b5333;
}

.theme-strawberry-shortcake .task-row-chip.is-priority.is-urgent,
.theme-strawberry-shortcake .task-row-chip.is-due.is-overdue,
.theme-strawberry-shortcake .shared-page .task-row-chip-button.is-priority.is-urgent,
.theme-strawberry-shortcake .shared-page .task-row-chip-button.is-due.is-overdue {
  border-color: rgba(217, 45, 92, 0.2);
  background: rgba(217, 45, 92, 0.08);
  color: var(--berry-jam);
}

@media (max-width: 760px) {
  .admin-theme-grid,
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .shared-page .task-row-chip-button.is-checklist .task-chip-icon,
  .shared-page .task-row-chip-button.is-priority .task-chip-icon {
    display: none;
  }

  .shared-page .task-row-chip-button.is-due.is-scheduled .task-chip-icon,
  .shared-page .task-row-chip-button.is-due.is-today .task-chip-icon,
  .shared-page .task-row-chip-button.is-due.is-overdue .task-chip-icon {
    display: none;
  }

  .shared-page .task-row-chip-button.is-priority {
    border-color: transparent;
    background: transparent;
    font-weight: 800;
  }

  .shared-page .task-row-chip-button.is-priority span {
    display: none;
  }

  .shared-page .task-row-chip-button.is-priority::before {
    content: "!";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1em;
    min-width: 1.1em;
    font-size: 0.86rem;
    line-height: 1;
  }

  .shared-page .task-row-chip-button.is-priority.is-none {
    color: #a5acb8;
  }

  .shared-page .task-row-chip-button.is-priority.is-urgent {
    color: #d64545;
  }

  .shared-page .task-row-chip-button.is-priority.is-high {
    color: #f06a00;
  }

  .shared-page .task-row-chip-button.is-priority.is-medium {
    color: #2f9e44;
  }

  .shared-page .task-row-chip-button.is-priority.is-low {
    color: #2f80ed;
  }
}

/* Final navigation overrides: desktop icon rail plus pinned mobile bottom nav. */
:root {
  --studio-bottom-nav-height: calc(58px + var(--studio-safe-bottom));
}

.studio-topnav {
  gap: 8px;
  overflow: visible;
}

.studio-topnav-link {
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(124, 58, 237, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #6b617a;
  overflow: visible;
}

.studio-topnav-link:hover,
.studio-topnav-link.is-active {
  border-color: rgba(124, 58, 237, 0.32);
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
  box-shadow: 0 10px 22px rgba(124, 58, 237, 0.1);
}

.studio-topnav-link::after {
  content: attr(data-nav-label);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 150;
  padding: 5px 8px;
  border-radius: 8px;
  background: #251b3f;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.studio-topnav-link:hover::after,
.studio-topnav-link:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.studio-topnav-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.studio-nav-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.studio-nav-icon-image {
  object-fit: contain;
}

.studio-nav-fallback {
  font-size: 0.8rem;
  font-weight: 800;
}

.studio-bottom-nav {
  display: none;
}

@media (max-width: 980px) {
  .studio-topnav {
    display: none;
  }

  .studio-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    min-height: var(--studio-bottom-nav-height);
    height: auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
    gap: 6px;
    padding: 6px max(12px, var(--studio-safe-right)) calc(6px + var(--studio-safe-bottom)) max(12px, var(--studio-safe-left));
    border: 1px solid rgba(124, 58, 237, 0.18);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 18px 18px 0 0;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 40px rgba(39, 24, 71, 0.16);
    backdrop-filter: blur(18px);
  }

  .studio-bottom-nav .studio-topnav-link {
    width: 100%;
    height: 46px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .studio-bottom-nav .studio-topnav-link:hover,
  .studio-bottom-nav .studio-topnav-link.is-active {
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
    box-shadow: none;
  }

  .studio-bottom-nav .studio-topnav-link::after {
    top: auto;
    bottom: calc(100% + 8px);
  }

  .shell-stage {
    height: 100dvh;
    min-height: 100dvh;
    padding-top: calc(var(--studio-header-height) + var(--studio-safe-top));
    padding-bottom: var(--studio-bottom-nav-height);
    overflow: hidden;
  }

  .workspace-page {
    min-height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top) - var(--studio-bottom-nav-height));
    height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top) - var(--studio-bottom-nav-height));
  }

  .workspace-main,
  .chat-main-panel,
  .projects-main,
  .project-main-panel {
    min-height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top) - var(--studio-bottom-nav-height));
    height: calc(100dvh - var(--studio-header-height) - var(--studio-safe-top) - var(--studio-bottom-nav-height));
  }

  .app-route-shared .shared-mobile-task-dock,
  .app-route-drew .shared-mobile-task-dock,
  .chat-composer-dock {
    bottom: calc(var(--studio-bottom-nav-height) + var(--studio-visual-keyboard-offset, 0px));
  }

  .app-route-shared .shared-page .task-main-column,
  .app-route-drew .shared-page .task-main-column {
    padding-bottom: calc(var(--studio-bottom-nav-height) + 96px + var(--studio-visual-keyboard-offset, 0px));
  }
}

.theme-asana-modern .studio-topnav-link,
.theme-asana-modern .studio-bottom-nav .studio-topnav-link {
  border-color: rgba(108, 99, 255, 0.16);
  color: #5f6676;
}

.theme-asana-modern .studio-topnav-link:hover,
.theme-asana-modern .studio-topnav-link.is-active,
.theme-asana-modern .studio-bottom-nav .studio-topnav-link:hover,
.theme-asana-modern .studio-bottom-nav .studio-topnav-link.is-active {
  background: rgba(108, 99, 255, 0.1);
  color: #6c63ff;
}

.theme-strawberry-shortcake .studio-topnav-link,
.theme-strawberry-shortcake .studio-bottom-nav .studio-topnav-link {
  border-color: rgba(124, 58, 237, 0.16);
  color: #7a6266;
}

.theme-strawberry-shortcake .studio-topnav-link:hover,
.theme-strawberry-shortcake .studio-topnav-link.is-active,
.theme-strawberry-shortcake .studio-bottom-nav .studio-topnav-link:hover,
.theme-strawberry-shortcake .studio-bottom-nav .studio-topnav-link.is-active {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
}

/* Final mobile action frame overrides: keep task/chat entry rows fixed above the icon nav. */
@media (max-width: 980px) {
  :root {
    --studio-mobile-entry-row-height: 58px;
    --studio-mobile-entry-frame-height: calc(
      var(--studio-bottom-nav-height) + var(--studio-mobile-entry-row-height)
    );
  }

  .app-route-chat .workspace-page,
  .app-route-chat .workspace-main,
  .app-route-chat .chat-main-panel,
  .app-route-chat .chat-stage,
  .app-route-tasks .workspace-page,
  .app-route-tasks .workspace-main,
  .app-route-shared .workspace-page,
  .app-route-shared .workspace-main,
  .app-route-drew .workspace-page,
  .app-route-drew .workspace-main {
    min-height: calc(
      100dvh - var(--studio-header-height) - var(--studio-safe-top) - var(--studio-mobile-entry-frame-height)
    );
    height: calc(
      100dvh - var(--studio-header-height) - var(--studio-safe-top) - var(--studio-mobile-entry-frame-height)
    );
  }

  .app-route-chat .chat-transcript {
    padding-bottom: calc(var(--studio-mobile-entry-row-height) + 18px);
  }

  .app-route-tasks .task-main-column,
  .app-route-shared .shared-page .task-main-column,
  .app-route-drew .shared-page .task-main-column {
    padding-bottom: calc(var(--studio-mobile-entry-row-height) + 18px + var(--studio-visual-keyboard-offset, 0px));
  }

  .app-route-tasks .tasks-page .task-main-column::after {
    content: none;
    display: none;
  }

  .app-route-tasks .tasks-mobile-task-dock,
  .app-route-shared .shared-mobile-task-dock,
  .app-route-drew .shared-mobile-task-dock,
  .app-route-chat .chat-composer-dock {
    left: 0;
    right: 0;
    bottom: calc(var(--studio-bottom-nav-height) + var(--studio-visual-keyboard-offset, 0px));
    z-index: 130;
    min-height: var(--studio-mobile-entry-row-height);
    padding: 7px max(12px, var(--studio-safe-right)) 7px max(12px, var(--studio-safe-left));
    border-top: 1px solid rgba(124, 58, 237, 0.14);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -12px 32px rgba(39, 24, 71, 0.1);
    backdrop-filter: blur(18px);
  }

  .app-route-tasks .task-main-topbar > .task-quick-add {
    display: none;
  }

  .app-route-tasks .tasks-mobile-task-dock,
  .app-route-shared .shared-mobile-task-dock,
  .app-route-drew .shared-mobile-task-dock {
    position: fixed;
    top: auto;
    display: block;
    pointer-events: none;
  }

  .app-route-shared .shared-page.has-task-selection + .shared-mobile-task-dock,
  .app-route-drew .shared-page.has-task-selection + .shared-mobile-task-dock {
    display: block;
  }

  .app-route-tasks .tasks-mobile-task-dock > .task-quick-add,
  .app-route-shared .shared-mobile-task-dock > .task-quick-add,
  .app-route-drew .shared-mobile-task-dock > .task-quick-add {
    position: static;
    display: block;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    pointer-events: auto;
    transform: none;
    backface-visibility: visible;
  }

  .app-route-tasks .tasks-mobile-task-dock > .task-quick-add::before,
  .app-route-shared .shared-mobile-task-dock > .task-quick-add::before,
  .app-route-drew .shared-mobile-task-dock > .task-quick-add::before {
    content: none;
    display: none;
  }

  .app-route-tasks .task-entry-row,
  .app-route-tasks .tasks-mobile-task-dock .task-entry-row,
  .app-route-shared .shared-mobile-task-dock .task-entry-row,
  .app-route-drew .shared-mobile-task-dock .task-entry-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    align-items: center;
    gap: 8px;
  }

  .app-route-tasks .task-entry-row.has-section-select,
  .app-route-tasks .tasks-mobile-task-dock .task-entry-row.has-section-select,
  .app-route-shared .shared-mobile-task-dock .task-entry-row.has-section-select,
  .app-route-drew .shared-mobile-task-dock .task-entry-row.has-section-select {
    grid-template-columns: minmax(86px, 0.38fr) minmax(0, 1fr) 42px;
  }

  .app-route-tasks .task-entry-input,
  .app-route-tasks .tasks-mobile-task-dock .task-entry-input,
  .app-route-shared .shared-mobile-task-dock .task-entry-input,
  .app-route-drew .shared-mobile-task-dock .task-entry-input,
  .app-route-tasks .task-entry-select,
  .app-route-tasks .tasks-mobile-task-dock .task-entry-select,
  .app-route-shared .shared-mobile-task-dock .task-entry-select,
  .app-route-drew .shared-mobile-task-dock .task-entry-select {
    min-height: 42px;
    height: 42px;
    border-radius: 999px;
    background: #ffffff;
  }

  .app-route-tasks .task-entry-submit,
  .app-route-tasks .tasks-mobile-task-dock .task-entry-submit,
  .app-route-shared .shared-mobile-task-dock .task-entry-submit,
  .app-route-drew .shared-mobile-task-dock .task-entry-submit {
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 999px;
    font-size: 1.35rem;
    line-height: 1;
  }

  .app-route-chat .chat-composer-dock {
    width: auto;
  }

  .app-route-chat .chat-composer-shell {
    width: 100%;
    max-width: none;
    min-height: 44px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .app-route-chat .chat-composer-shell textarea {
    min-height: 42px;
    height: 42px;
    max-height: 96px;
    padding: 10px 14px;
    border: 1px solid rgba(124, 58, 237, 0.16);
    border-radius: 999px;
    background: #ffffff;
    overflow-y: auto;
  }

  .app-route-chat .chat-composer-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .app-route-chat .chat-composer-nav {
    width: auto;
    gap: 0;
  }

  .app-route-chat .chat-composer-menu,
  .app-route-chat .chat-voice-button {
    display: none;
  }

  .app-route-chat .chat-model-inline {
    width: 116px;
    min-width: 116px;
    height: 42px;
  }

  .app-route-chat .chat-model-inline .model-picker-control {
    height: 42px;
    min-height: 42px;
    padding: 0 28px 0 12px;
    border-radius: 999px;
    font-size: 0.76rem;
  }

  .app-route-chat .chat-composer-actions {
    display: inline-flex;
    align-items: center;
    gap: 0;
  }

  .app-route-chat .chat-send-button {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 999px;
  }
}

@media (max-width: 430px) {
  .app-route-chat .chat-model-inline {
    width: 96px;
    min-width: 96px;
  }

  .app-route-chat .chat-model-inline .model-picker-control {
    font-size: 0.7rem;
  }
}
/* Studio Email Gmail-polish pass */
.mail-account-switch-control,
.email-managed-account-title,
.mail-drawer-brand,
.mail-thread-link-clean,
.mail-message-attachments,
.mail-compose-attachments {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mail-account-mark {
  --mail-account-color: #1a73e8;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--mail-account-color);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.mail-account-mark.is-small {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  font-size: 0.68rem;
}

.mail-account-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mail-account-switch-control {
  min-height: 38px;
  padding: 0 10px 0 6px;
  border: 1px solid #d7dee8;
  border-radius: 999px;
  background: #ffffff;
}

.mail-account-switch-control select {
  min-width: 150px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #182230;
  font-weight: 650;
  outline: none;
}

.mail-drawer-brand {
  min-width: 0;
}

.mail-drawer-brand > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.mail-drawer-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.mail-drawer-link-title,
.mail-drawer-link-meta {
  min-width: 0;
}

.mail-thread-row {
  border-left: 3px solid transparent;
}

.mail-thread-row:hover,
.mail-thread-row.is-unread {
  border-left-color: var(--mail-account-color, #1a73e8);
}

.mail-thread-link-clean {
  min-width: 0;
  flex: 1 1 auto;
  color: inherit;
  text-decoration: none;
}

.mail-thread-row-main {
  min-width: 0;
}

.mail-thread-attachment svg,
.mail-attachment-chip svg {
  width: 15px;
  height: 15px;
}

.mail-thread-attachment {
  display: inline-flex;
  color: #64748b;
}

.email-account-identity-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) 72px minmax(0, 1.3fr) auto;
  gap: 10px;
  align-items: end;
  width: 100%;
  margin-top: 12px;
}

.email-account-identity-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #5f6b7a;
  font-size: 0.76rem;
  font-weight: 700;
}

.email-account-identity-form input {
  min-width: 0;
  height: 36px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #ffffff;
  color: #172033;
  padding: 0 10px;
}

.email-account-identity-form input[type="color"] {
  padding: 3px;
}

.mail-compose-editor-shell {
  display: grid;
  gap: 0;
  padding: 0 20px 18px;
}

.mail-compose-formatbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 48px;
  padding: 8px 0;
  border-bottom: 1px solid #edf1f5;
  background: #ffffff;
}

.mail-compose-formatbar button,
.mail-compose-formatbar select {
  height: 32px;
  min-width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #ffffff;
  color: #273447;
  font-size: 0.8rem;
  font-weight: 700;
}

.mail-compose-formatbar select {
  justify-content: flex-start;
  min-width: 104px;
  padding: 0 8px;
}

.mail-compose-formatbar button:hover,
.mail-compose-formatbar select:hover {
  border-color: #b9c6d6;
  background: #f8fafc;
}

.mail-format-underline {
  text-decoration: underline;
}

.mail-compose-editor {
  min-height: 320px;
  padding: 18px 0;
  outline: none;
  color: #111827;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.mail-compose-editor:empty::before {
  content: attr(data-placeholder);
  color: #9aa4b2;
}

.mail-compose-attachments,
.mail-message-attachments {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.mail-attachment-chip {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 0 10px;
  border: 1px solid #d9e0ea;
  border-radius: 999px;
  background: #f8fafc;
  color: #354156;
  font-size: 0.8rem;
  font-weight: 650;
}

.mail-attachment-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 981px) {
  .mail-app-shell {
    max-width: 1380px;
    margin: 0 auto;
  }

  .mail-drawer {
    width: min(320px, calc(100vw - 32px));
  }

  .mail-content {
    min-height: calc(100vh - 150px);
  }
}

@media (max-width: 980px) {
  .mail-account-switch-control {
    width: 100%;
  }

  .mail-account-switch-control select {
    width: 100%;
    min-width: 0;
  }

  .email-account-identity-form {
    grid-template-columns: 1fr;
  }

  .mail-compose-view {
    min-height: calc(100dvh - var(--mobile-header-height, 56px) - var(--mobile-bottom-nav-height, 58px));
  }

  .mail-compose-row {
    grid-template-columns: 44px minmax(0, 1fr);
    min-height: 46px;
    padding: 0 14px;
  }

  .mail-compose-editor-shell {
    padding: 0 14px 16px;
  }

  .mail-compose-formatbar {
    margin: 0 -14px;
    padding: 8px 14px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .mail-compose-formatbar select {
    min-width: 92px;
  }

  .mail-compose-editor {
    min-height: 46dvh;
  }

  .mail-compose-actions {
    position: sticky;
    bottom: calc(var(--mobile-bottom-nav-height, 0px) + env(safe-area-inset-bottom, 0px) + 8px);
    z-index: 3;
    margin: 0 -14px;
    padding: 10px 14px 14px;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #edf1f5;
    backdrop-filter: blur(14px);
  }

  .mail-thread-link-clean .mail-account-mark {
    display: none;
  }

  .mail-thread-row {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px;
    padding: 0 10px;
  }

  .mail-thread-row-main {
    grid-template-columns: minmax(5.6rem, 0.85fr) minmax(6.7rem, 1fr) minmax(3rem, 0.72fr);
    gap: 8px;
  }

  .mail-thread-preview {
    font-size: 0.78rem;
  }

  .mail-thread-row-side {
    gap: 6px;
  }

  .mail-thread-time {
    font-size: 0.72rem;
  }
}
