/* Host shell overrides — T700 list/home/chrome styles come from `t700/Styles`. */

body {
  margin: 0;
  font-family:
    "Lexend Deca",
    system-ui,
    -apple-system,
    sans-serif;
}

.host-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.host-app .app-shell-body {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

/* Hide GlobalHeader right cluster: notifications, Quick Help, profile. */
.host-app .global-header__actions {
  display: none;
}

/* Catalog pages use EmptyState — hide the header ticket search dropdown. */
.host-app .t700-search-combobox__panel,
.t700-search-combobox__panel {
  display: none !important;
}

.host-app__loading {
  margin: 24px;
  font-size: 13px;
  color: #6b7280;
}

.host-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family:
    "Lexend Deca",
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: #6b7280;
}

.host-loading-state--fullscreen {
  min-height: 100vh;
  width: 100%;
}

.host-loading-state--inline {
  flex: 1;
  min-height: 0;
  padding: 24px;
}

.host-loading-state__message {
  margin: 0;
}

/* Dashboard — host layout helpers (widgets ship from t700/Styles) */
.dashboard-host-kpi-row {
  margin: 0 16px 8px;
}

.dashboard-host-split {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 1.2fr);
  gap: 14px;
  margin: 4px 16px 16px;
  align-items: start;
}

.dashboard-host-split__panel .dashboard-section-heading--panel {
  padding: 0 0 12px;
}

.dashboard-host-split__panel .dashboard-section-heading__title {
  font-size: 13px;
}

.dashboard-host-widgets-row {
  margin-bottom: 8px;
}

@media (max-width: 960px) {
  .dashboard-host-split {
    grid-template-columns: 1fr;
  }
}

.host-app__workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.host-workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.host-workspace .t700-list-shell.t700-page-layout:not(.t700-list-layout) {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.host-workspace
  .t700-list-shell.t700-page-layout:not(.t700-list-layout)
  > .t700-page-subheader {
  flex-shrink: 0;
}

.host-workspace
  .t700-list-shell.t700-page-layout:not(.t700-list-layout)
  > .t700-list-main-panel.t700-page-layout__panel {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: transparent;
  border: none;
  box-shadow: none;
}

.host-workspace .t700-page-layout__scroll {
  background: transparent;
}

/* Full-page forms — scroll panel body (t700-form-* layout) */
.host-workspace .t700-form-page-wrap,
.host-workspace .t700-form-shell.t700-list-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.host-workspace .t700-form-shell > .t700-page-subheader {
  flex-shrink: 0;
}

.host-workspace .t700-form-main-panel.t700-list-main-panel {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Simple form drawer — 2-col field grid (kit form-screen.mdc) */
.add-lead-drawer__fields.t700-form-drawer-simple__fields,
.t700-form-drawer-simple__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.t700-form-drawer-simple__field--full,
.add-lead-drawer__fields.t700-form-drawer-simple__fields
  > .t700-form-drawer-simple__field--full {
  grid-column: 1 / -1;
}

/* Form popup / modal — single-column field stack */
.t700-modal-form-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (max-width: 560px) {
  .add-lead-drawer__fields.t700-form-drawer-simple__fields,
  .t700-form-drawer-simple__fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

.t700-drawer-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
}

.host-workspace .home-screen-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.host-workspace .home-screen-main-panel {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: block;
  background: transparent;
  border: none;
  box-shadow: none;
}

.home-screen-body--catalog {
  padding: 0;
}

.fw-page {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  gap: 16px;
  padding: 0px;
  background: transparent;
  height: 100%;
}

.t700-page-subheader__title:has(.fw-page-title),
.t700-page-subheader__title .fw-page-title,
.fw-page-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  vertical-align: middle;
}

.t700-page-subheader__title .fw-page-title-count,
.fw-page-title-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-sizing: border-box;
  height: 22px;
  min-width: 32px;
  padding: 2px 10px;
  border: 1px solid #abefc6;
  border-radius: 9999px;
  background: #edfcf2;
  color: #079455;
  font-family: "Lexend Deca", sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.fw-catalog {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: 16px;
  padding: 4px;
}

.fw-catalog.fw-catalog--status {
  display: flex;
  flex: 1;
  min-height: min(420px, 60vh);
  align-items: center;
  justify-content: center;
  background: transparent;
}

.fw-catalog--status .t700-empty-state,
.fw-catalog--status .t700-list-empty-state {
  width: min(440px, 100%);
  background: transparent !important;
  border: none;
  box-shadow: none;
}

.fw-card {
  --fw-accent: #8b5cf6;
  --fw-accent-soft: #f3e8ff;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 198px;
  padding: 16px 16px 14px;
  background-color: #ffffff;
  background-image: radial-gradient(
    130% 90% at 0% 0%,
    var(--fw-accent-soft) 0%,
    color-mix(in srgb, var(--fw-accent-soft) 55%, #ffffff) 32%,
    #ffffff 68%
  );
  border: 1px solid #eef0f3;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* .fw-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    160px 120px at 18px 16px,
    color-mix(in srgb, var(--fw-accent) 18%, transparent),
    transparent 72%
  );
} */

.fw-card > * {
  position: relative;
  z-index: 1;
}

.fw-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.fw-card__identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.fw-card__icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--fw-accent);
  color: #ffffff;
  box-shadow: 0 8px 16px color-mix(in srgb, var(--fw-accent) 38%, transparent);
}

.fw-card__title-wrap {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.fw-card__title {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.fw-card__title--link {
  cursor: pointer;
}

.fw-card__title--link:hover,
.fw-card__title--link:focus-visible {
  color: var(--fw-accent);
}

.fw-card__title--link:focus-visible {
  outline: none;
}

.fw-card__version-pill {
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--fw-accent-soft);
  color: var(--fw-accent);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.fw-card__desc {
  margin: 12px 0 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}

.fw-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.fw-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}

.fw-chip--theme {
  background: #d1fae5;
  color: #047857;
}

.fw-chip--prototype {
  background: #f3e8ff;
  color: #7c3aed;
}

.fw-chip--line-t700 {
  background: #e0e7ff;
  color: #3730a3;
}

.fw-chip--line-t600 {
  background: #ffedd5;
  color: #c2410c;
}

.fw-chip--line-t500 {
  background: #cffafe;
  color: #0e7490;
}

.fw-chip--line-na {
  background: #f1f5f9;
  color: #475569;
}

.fw-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
}

.fw-card__updated {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 11px;
  color: #94a3b8;
}

.fw-card__actions {
  display: flex;
  align-items: center;
  gap: 0;
  color: #94a3b8;
}

.fw-card__actions .t700-icon-btn,
.fw-card__actions button {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  color: #94a3b8;
}

@media (max-width: 1280px) {
  .fw-catalog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .fw-catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .fw-page {
    padding: 4px;
  }

  .fw-catalog {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Sectioned create-ticket drawer fallback (remote CSS may already define these) */
.t700-form-drawer,
.add-lead-drawer {
  display: flex;
  min-height: 0;
  height: 100%;
}

.t700-form-drawer__nav,
.add-lead-drawer__nav {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 12px;
  border-right: 1px solid #e5e7eb;
  overflow-y: auto;
}

.t700-form-drawer__nav-item,
.add-lead-drawer__nav-item {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
}

.t700-form-drawer__nav-item.is-active,
.add-lead-drawer__nav-item.is-active {
  background: #e6ecfd;
  color: #1030cb;
}

.t700-form-drawer__main,
.add-lead-drawer__main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 16px 18px;
}

.t700-form-drawer__section,
.add-lead-drawer__section {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 12px;
  background: #ffffff;
}

.t700-form-drawer__section-head,
.add-lead-drawer__section-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 12px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  cursor: pointer;
}

.t700-form-drawer__section.is-expanded > .t700-form-drawer__section-head,
.add-lead-drawer__section.is-expanded > .add-lead-drawer__section-head {
  color: #1030cb;
}

.t700-form-drawer__fields,
.add-lead-drawer__fields:not(.t700-form-drawer-simple__fields) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 0 14px 14px;
}

.t700-form-drawer-panel__body,
.add-lead-drawer-panel__body {
  padding: 0 !important;
}

/* Card title overflow tooltip — T700 bubble, only when text is truncated */
.fw-card__title-tooltip {
  max-width: min(360px, calc(100vw - 24px));
  padding: 6px 10px;
  border-radius: 9999px;
  background: #111827;
  color: #ffffff;
  font-size: 11px;
  font-family: "Lexend Deca", sans-serif;
  font-weight: 400;
  line-height: 1.35;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
}

/* Collapsed side-nav hover label — match kit Tooltip (11px / 400) */
.ws-side-nav-tooltip.ws-side-nav-tooltip--portal {
  padding: 6px 10px;
  border-radius: 9999px;
  background: #111827;
  color: #ffffff;
  font-size: 11px;
  font-family: "Lexend Deca", sans-serif;
  font-weight: 400;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
}

/* Count badge — mint pill beside page title (after t700/Styles). */
.host-workspace .t700-page-subheader__title:has(.fw-page-title) {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  overflow: visible !important;
}

.host-workspace .fw-page-title {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.host-workspace .fw-page-title-count {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  box-sizing: border-box !important;
  height: 18px !important;
  min-width: 32px !important;
  padding: 2px 10px !important;
  border: 1px solid #abefc6 !important;
  border-radius: 9999px !important;
  background: #edfcf2 !important;
  color: #079455 !important;
  font-family: "Lexend Deca", sans-serif !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  letter-spacing: 0.01em !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
