/* Graphite Note Premium Pass 9
   Welcome workspace: data -> models -> notebooks, immediate-use actions only.
   Loaded after Premium Pass 8. */

/* --------------------------------------------------------------------------
   Recent activity: mirror the workspace lifecycle in a stable 3-column grid.
   -------------------------------------------------------------------------- */
.gn-app-shell .gnb-recent-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.gn-app-shell .gnb-recent-columns .gn-recent-group {
  min-width: 0;
}

.gn-app-shell .gnb-recent-columns .gn-recent-group__label {
  margin-bottom: 8px !important;
  color: #63728a !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: .055em !important;
  text-transform: uppercase;
}

.gn-app-shell .gnb-recent-columns .gn-recent-list {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
}

.gn-app-shell .gnb-recent-columns .gn-recent-item {
  min-width: 0;
  height: 46px;
  min-height: 46px !important;
  cursor: pointer;
}

.gn-app-shell .gnb-recent-columns .gn-recent-item__body {
  min-width: 0;
}

.gn-app-shell .gnb-recent-columns .gn-recent-item__name,
.gn-app-shell .gnb-recent-columns .gn-recent-item__meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gn-app-shell .gnb-recent-columns .gn-recent-item__time {
  flex: 0 0 auto;
  margin-left: 8px;
}

/* --------------------------------------------------------------------------
   Assistant: preserve the compact workspace strip, add low-noise shortcuts.
   -------------------------------------------------------------------------- */
.gn-app-shell .gnb-ai-assistant {
  grid-template-columns: minmax(260px, .7fr) minmax(520px, 1.65fr) !important;
  align-items: start !important;
}

.gn-app-shell .gnb-ai-assistant__workspace {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.gn-app-shell .gnb-ai-suggestions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
}

.gn-app-shell .gnb-ai-suggestions button {
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: #b9d3ee;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 16px;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

/* The current home assistant is a dark operational strip after the later
   enterprise layers; keep shortcuts visually subordinate to the prompt. */
.gn-app-shell .gnb-ai-assistant .gnb-ai-suggestions button:hover {
  border-color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.12);
  color: #fff;
}

.gn-app-shell .gnb-ai-assistant .gnb-ai-suggestions button:focus {
  outline: none;
}

.gn-app-shell .gnb-ai-assistant .gnb-ai-suggestions button:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2f6fff;
}

/* --------------------------------------------------------------------------
   Quick actions: creation first, low-frequency external resources second.
   -------------------------------------------------------------------------- */
.gn-app-shell .gn-quick-list--primary {
  padding-bottom: 10px;
  border-bottom: 1px solid #e5eaf1;
}

.gn-app-shell .gn-quick-resources {
  display: grid;
  gap: 2px;
  padding-top: 10px;
}

.gn-app-shell .gn-quick-resources__label {
  padding: 0 8px 4px;
  color: #7a8799;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.gn-app-shell .gn-quick-resource {
  display: flex;
  min-height: 31px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 5px;
  color: #53627a !important;
  font-size: 14px;
  text-decoration: none !important;
}

.gn-app-shell .gn-quick-resource i {
  color: #9aa6b5;
  font-size: 14px;
}

.gn-app-shell .gn-quick-resource:hover {
  background: #f6f9fd;
  color: #18324f !important;
}

/* --------------------------------------------------------------------------
   Responsive behavior: preserve order rather than squeeze the 3 columns.
   -------------------------------------------------------------------------- */
@media (max-width: 1320px) {
  .gn-app-shell .gnb-welcome-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .gn-app-shell .gnb-welcome-grid > aside {
    max-width: none;
  }

  .gn-app-shell .gn-quick-list--primary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px !important;
  }

  .gn-app-shell .gn-quick-resources {
    grid-template-columns: auto repeat(2, minmax(0, 1fr));
    align-items: center;
  }

  .gn-app-shell .gn-quick-resources__label {
    padding-bottom: 0;
  }
}

@media (max-width: 1080px) {
  .gn-app-shell .gnb-recent-columns {
    grid-template-columns: 1fr !important;
  }

  .gn-app-shell .gnb-recent-columns .gn-recent-list {
    height: auto;
  }

  .gn-app-shell .gnb-ai-assistant {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 700px) {
  .gn-app-shell .gn-quick-list--primary,
  .gn-app-shell .gn-quick-resources {
    grid-template-columns: 1fr;
  }

  .gn-app-shell .gn-quick-resources__label {
    padding: 0 8px 4px;
  }
}


/* --------------------------------------------------------------------------
   Premium Pass 9.1: finish the welcome workspace without new backend data.
   -------------------------------------------------------------------------- */

/* Continue where you left off: derive one actionable resume target from the
   already-loaded recent dataset/model/notebook objects. */
.gn-app-shell .gnb-continue-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  margin: 0 0 10px;
  padding: 7px 10px;
  border: 1px solid #dbe4ef;
  border-radius: 6px;
  background: #f8fbff;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.gn-app-shell .gnb-continue-row:hover {
  border-color: #bfd3ee;
  background: #f3f8ff;
  box-shadow: inset 2px 0 0 #246bfe;
}

.gn-app-shell .gnb-continue-row:focus {
  outline: none;
}

.gn-app-shell .gnb-continue-row:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2f6fff;
}

.gn-app-shell .gnb-continue-row__icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 6px;
  background: #eaf2ff;
  color: #246bfe;
  font-size: 14px;
}

.gn-app-shell .gnb-continue-row__body {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 7px;
  overflow: hidden;
}

.gn-app-shell .gnb-continue-row__label {
  flex: 0 0 auto;
  color: #66758a;
  font-size: 14px;
  font-weight: 600;
}

.gn-app-shell .gnb-continue-row__body strong {
  min-width: 0;
  overflow: hidden;
  color: #10233f;
  font-size: 14px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gn-app-shell .gnb-continue-row__meta,
.gn-app-shell .gnb-continue-row__time {
  color: #7a8799;
  font-size: 14px;
  white-space: nowrap;
}

.gn-app-shell .gnb-continue-row__arrow {
  color: #8290a3;
  font-size: 14px;
  transition: color 140ms ease, transform 140ms ease;
}

.gn-app-shell .gnb-continue-row:hover .gnb-continue-row__arrow {
  color: #246bfe;
  transform: translateX(2px);
}

/* Recent lists must size to their content. Pass 9's 144px cap clipped the
   third 48px row once inherited borders/gaps were included. */
.gn-app-shell .gnb-recent-columns .gn-recent-list {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.gn-app-shell .gnb-recent-columns .gn-recent-item {
  position: relative;
  height: 46px !important;
  min-height: 46px !important;
  padding-right: 8px !important;
  cursor: pointer;
  transition: background-color 140ms ease, box-shadow 140ms ease !important;
}

.gn-app-shell .gnb-recent-columns .gn-recent-item:hover,
.gn-app-shell .gnb-recent-columns .gn-recent-item:focus-visible {
  background: #f7fbff !important;
  box-shadow: inset 2px 0 0 #246bfe !important;
}

.gn-app-shell .gnb-recent-columns .gn-recent-item:focus {
  outline: none;
}

.gn-app-shell .gnb-recent-columns .gn-recent-item:focus-visible {
  outline: 2px solid rgba(36,107,254,.45);
  outline-offset: -2px;
}

.gn-app-shell .gn-recent-item__arrow {
  flex: 0 0 auto;
  width: 12px;
  margin-left: 3px;
  color: #8d9aad;
  font-size: 14px;
  opacity: 0;
  transform: translateX(-3px);
  transition: opacity 120ms ease, transform 120ms ease, color 120ms ease;
}

.gn-app-shell .gn-recent-item:hover .gn-recent-item__arrow,
.gn-app-shell .gn-recent-item:focus-visible .gn-recent-item__arrow {
  color: #246bfe;
  opacity: 1;
  transform: translateX(0);
}

/* Make the assistant useful but less visually dominant than the user's work. */
.gn-app-shell .gnb-ai-assistant {
  min-height: 58px !important;
  padding: 9px 12px !important;
}

.gn-app-shell .gnb-ai-assistant__identity .gn-ai-card__icon {
  width: 28px;
  height: 28px;
}

.gn-app-shell .gnb-ai-suggestions button {
  min-height: 22px;
  padding: 2px 8px;
  font-size: 14px;
}

@media (min-width: 1400px) {
  .gn-app-shell .gnb-ai-assistant__workspace {
    display: flex !important;
    align-items: center;
    gap: 8px !important;
  }

  .gn-app-shell .gnb-ai-assistant__workspace .gn-ai-prompt {
    flex: 1 1 auto;
    min-width: 360px;
  }

  .gn-app-shell .gnb-ai-suggestions {
    flex: 0 0 auto;
    flex-wrap: nowrap !important;
  }
}

/* KPI cards: slightly denser while preserving the full-card navigation target. */
.gn-app-shell .gnb-stat-grid .gn-stat-card {
  min-height: 84px !important;
  padding: 11px 13px !important;
}

.gn-app-shell .gnb-stat-grid .gn-stat-card__top {
  margin-bottom: 6px !important;
}

.gn-app-shell .gnb-stat-grid .gn-stat-card__desc {
  margin-top: 4px !important;
}

.gn-app-shell .gnb-stat-grid .gn-stat-card--interactive:not(.is-disabled):hover {
  background: #fbfdff !important;
}

/* Resources are footer-level utilities, not peer actions. */
.gn-app-shell .gn-quick-resources {
  padding-top: 8px;
}

.gn-app-shell .gn-quick-resource {
  min-height: 27px;
  padding: 4px 8px;
  color: #718096 !important;
  font-size: 14px;
}

.gn-app-shell .gn-quick-resources__label {
  color: #98a3b3;
  font-size: 14px;
}

@media (max-width: 900px) {
  .gn-app-shell .gnb-continue-row {
    grid-template-columns: 28px minmax(0, 1fr) 18px;
  }

  .gn-app-shell .gnb-continue-row__body {
    display: grid;
    gap: 1px;
  }

  .gn-app-shell .gnb-continue-row__label {
    display: none;
  }

  .gn-app-shell .gnb-continue-row__time {
    display: none;
  }

  .gn-app-shell .gnb-continue-row__meta {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
