/* Workspace Home / History hub — tab + website only */

.cutgo-home-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(209, 209, 214, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}
html.cutgo-home-hub-surface .cutgo-home-btn {
  display: inline-flex;
}
.cutgo-home-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f5f5f7;
  border-color: rgba(255, 255, 255, 0.08);
}
.cutgo-home-btn.is-active {
  color: var(--cg-brand, #a3e635);
  background: var(--cg-brand-dim, rgba(163, 230, 53, 0.12));
  border-color: var(--cg-brand-line, rgba(163, 230, 53, 0.32));
}
.cutgo-home-btn-div {
  display: none;
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 2px 0 0;
  flex: 0 0 auto;
}
html.cutgo-home-hub-surface .cutgo-home-btn-div {
  display: block;
}

html.cutgo-inpage-shell .cutgo-home-btn,
html.cutgo-inpage-shell .cutgo-home-btn-div,
html.cutgo-eagle .cutgo-home-btn,
html.cutgo-eagle .cutgo-home-btn-div,
html[data-cutgo-surface='eagle'] .cutgo-home-btn,
html[data-cutgo-surface='eagle'] .cutgo-home-btn-div {
  display: none !important;
}

#cutgoHomeHub {
  position: absolute;
  inset: 0;
  z-index: 40;
  overflow: auto;
  background: var(--cg-bg, #070708);
  color: var(--cg-text, rgba(245, 245, 247, 0.94));
  padding: 20px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
#cutgoHomeHub[hidden] {
  display: none !important;
}

html.cutgo-home-hub-open .main-app-wrapper > .split-workspace,
html.cutgo-home-hub-open .main-app-wrapper > .footer-shortcuts,
html.cutgo-home-hub-open .workspace-mode-switch {
  visibility: hidden;
  pointer-events: none;
}
html.cutgo-home-hub-open .main-app-wrapper {
  position: relative;
}

/* Flat integrated toolbar — not a floating sticky chip */
.cutgo-home-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.cutgo-home-top-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}
.cutgo-home-top-sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 4px;
}

.cutgo-home-ghost {
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(174, 174, 178, 0.95);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.cutgo-home-ghost:hover {
  color: #f5f5f7;
  background: rgba(255, 255, 255, 0.05);
}
.cutgo-home-ghost.is-on {
  border-color: var(--cg-brand-line, rgba(163, 230, 53, 0.32));
  background: var(--cg-brand-dim, rgba(163, 230, 53, 0.12));
  color: var(--cg-brand, #a3e635);
}
.cutgo-home-ghost.cutgo-home-import {
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(245, 245, 247, 0.92);
}
.cutgo-home-ghost.cutgo-home-import:hover {
  border-color: var(--cg-brand-line, rgba(163, 230, 53, 0.35));
  color: var(--cg-brand, #a3e635);
  background: var(--cg-brand-dim, rgba(163, 230, 53, 0.1));
}
.cutgo-home-ghost.cutgo-home-danger:not(:disabled):hover {
  border-color: rgba(255, 69, 58, 0.45);
  color: #ff453a;
  background: rgba(255, 69, 58, 0.1);
}
.cutgo-home-ghost:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.cutgo-home-count {
  min-width: 1.5em;
  font-size: 12px;
  color: rgba(142, 142, 147, 0.9);
  font-variant-numeric: tabular-nums;
}

.cutgo-home-search {
  flex: 1 1 220px;
  max-width: 320px;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--cg-surface, #101012);
  color: rgba(142, 142, 147, 0.9);
}
.cutgo-home-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f5f5f7;
  font: inherit;
  font-size: 13px;
  min-width: 0;
}
.cutgo-home-sort {
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--cg-surface, #101012);
  color: rgba(174, 174, 178, 0.95);
  font: inherit;
  font-size: 12px;
}

.cutgo-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  align-content: start;
  flex: 1 1 auto;
}

.cutgo-home-card {
  position: relative;
  margin: 0;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: var(--cg-surface, #101012);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.cutgo-home-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
  transform: translateY(-1px);
}
.cutgo-home-card.is-selected {
  border-color: var(--cg-brand-line, rgba(163, 230, 53, 0.45));
  box-shadow: 0 0 0 1px var(--cg-brand-line, rgba(163, 230, 53, 0.35));
}
.cutgo-home-card-check {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  color: #111;
  z-index: 1;
}
.cutgo-home-card-check.is-on {
  background: var(--cg-brand, #a3e635);
  border-color: var(--cg-brand, #a3e635);
}
.cutgo-home-card.is-new {
  min-height: 0;
  aspect-ratio: 16 / 12.2;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.12);
  background: transparent;
  color: rgba(142, 142, 147, 0.95);
}
.cutgo-home-card.is-new:hover {
  border-color: var(--cg-brand-line, rgba(163, 230, 53, 0.32));
  color: var(--cg-brand, #a3e635);
  background: var(--cg-brand-dim, rgba(163, 230, 53, 0.08));
}
.cutgo-home-card-plus {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid currentColor;
  display: grid;
  place-items: center;
  font-size: 24px;
  line-height: 1;
  opacity: 0.85;
}
.cutgo-home-card-thumb {
  aspect-ratio: 16 / 10;
  background: #141418;
  position: relative;
  overflow: hidden;
}
.cutgo-home-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cutgo-home-card-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  z-index: 1;
  backdrop-filter: blur(6px);
}
.cutgo-home-card-badge.is-ready {
  background: rgba(163, 230, 53, 0.16);
  border-color: rgba(163, 230, 53, 0.35);
  color: var(--cg-brand, #a3e635);
}
.cutgo-home-card-badge.is-auth {
  background: rgba(255, 204, 0, 0.14);
  border-color: rgba(255, 204, 0, 0.35);
  color: #ffcc00;
}
.cutgo-home-card-badge.is-offline {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(210, 210, 214, 0.9);
}
.cutgo-home-card.is-offline .cutgo-home-card-thumb img {
  filter: grayscale(0.7) brightness(0.72);
  opacity: 0.88;
}
.cutgo-home-card.is-offline .cutgo-home-card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 7, 8, 0.08), rgba(7, 7, 8, 0.42));
  pointer-events: none;
}
.cutgo-home-card.is-need-auth .cutgo-home-card-thumb img {
  filter: saturate(0.85) brightness(0.92);
}
.cutgo-home-card-body {
  padding: 10px 10px 11px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.cutgo-home-card-text {
  min-width: 0;
}
.cutgo-home-card-title {
  margin: 0 0 3px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cutgo-home-card-sub {
  margin: 0;
  font-size: 11px;
  color: rgba(142, 142, 147, 0.9);
}
.cutgo-home-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  opacity: 0;
  transition: opacity 0.12s;
}
.cutgo-home-card:hover .cutgo-home-card-actions,
.cutgo-home-card-actions:focus-within {
  opacity: 1;
}
.cutgo-home-card-relink {
  height: 24px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(245, 245, 247, 0.9);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}
.cutgo-home-card-relink:hover {
  border-color: var(--cg-brand-line, rgba(163, 230, 53, 0.4));
  color: var(--cg-brand, #a3e635);
  background: var(--cg-brand-dim, rgba(163, 230, 53, 0.12));
}
.cutgo-home-card-del {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(142, 142, 147, 0.9);
  cursor: pointer;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cutgo-home-card-del:hover {
  background: rgba(255, 69, 58, 0.14);
  color: #ff453a;
}

.cutgo-home-storage {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 11px;
  color: rgba(142, 142, 147, 0.85);
  display: flex;
  align-items: center;
  gap: 8px;
}
.cutgo-home-storage button {
  border: 0;
  background: none;
  color: rgba(163, 230, 53, 0.85);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
}
.cutgo-home-storage button:hover {
  color: var(--cg-brand, #a3e635);
}

@media (max-width: 720px) {
  #cutgoHomeHub {
    padding: 12px 12px 20px;
  }
  .cutgo-home-search {
    max-width: none;
    flex: 1 1 100%;
  }
  .cutgo-home-top-right {
    margin-left: 0;
    width: 100%;
  }
}
