/* Home is deliberately isolated from the legacy library and dashboard layouts. */
.home-workspace {
  --hw-ink: #173543;
  --hw-muted: #607781;
  --hw-line: #dce6e9;
  --hw-soft: #f5f8f9;
  max-width: 1320px;
  min-width: 0;
  margin: 0 auto;
  padding: 8px 2px 28px;
  color: var(--hw-ink);
}

.home-workspace [hidden] { display: none !important; }
.home-workspace button, .home-workspace input, .home-workspace select { font: inherit; }
.home-workspace button { touch-action: manipulation; }
.home-workspace button:disabled { cursor: progress; opacity: .65; }
.home-workspace :is(button, input, select, a):focus-visible {
  outline: 3px solid #1478c7;
  outline-offset: 3px;
}
.home-workspace .btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 10px;
  text-decoration: none;
  white-space: normal;
}
.home-workspace .btn.primary { background: #173b4b; border-color: #173b4b; }
.home-workspace .btn.small { min-height: 42px; padding: 9px 12px; font-size: 13px; }

.hw-hero {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 30px;
  padding: 24px 28px;
  border-radius: 19px;
  background: linear-gradient(115deg, #163746, #214c5c);
  color: #fff;
  box-shadow: 0 8px 22px #17354312;
}
.hw-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin: 0;
  padding: 0;
}
.hw-header > div { min-width: 0; }
.hw-eyebrow {
  display: block;
  margin: 0 0 7px;
  color: #bed5dd;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .11em;
  line-height: 1.4;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.hw-header h1 { margin: 0; color: #fff; font-size: clamp(25px, 2.2vw, 30px); letter-spacing: -.045em; line-height: 1.15; }
.hw-header p { margin: 7px 0 0; color: #d0e0e6; font-size: 13px; line-height: 1.5; }
.home-workspace .btn.hw-new { flex: 0 0 auto; min-height: 42px; padding: 10px 16px; background: #fff; border-color: #fff; color: #173b4b; box-shadow: 0 4px 10px #102e3b18; }
.home-workspace .btn.hw-new:hover { background: #edf5f8; border-color: #edf5f8; color: #173b4b; }
.hw-hero :is(button, input):focus-visible { outline-color: #b7e4ff; }

.hw-search-panel {
  position: relative;
  z-index: 5;
  min-width: 0;
  padding: 0;
}
.hw-search-panel > label { display: block; margin-bottom: 10px; color: #e6f0f3; font-size: 14px; font-weight: 700; }
.hw-search-field {
  display: flex;
  position: relative;
  align-items: center;
  min-width: 0;
  min-height: 52px;
  gap: 11px;
  border: 1px solid #afc4ce;
  border-radius: 11px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.hw-search-field:focus-within { border-color: #2679a3; box-shadow: 0 0 0 3px #2679a318; }
.hw-search-field > span:first-child { flex: 0 0 auto; margin-left: 15px; color: #587884; font-size: 22px; line-height: 1; }
.hw-search-field input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 50px;
  padding: 9px 0;
  border: 0;
  border-radius: 10px;
  outline: none;
  background: transparent;
  color: var(--hw-ink);
  font-size: 16px;
  box-shadow: none;
}
.hw-search-field input:focus-visible { outline: none; }
.hw-search-field input::placeholder { color: #6b8089; opacity: 1; }
.hw-search-clear {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  width: 44px;
  min-height: 44px;
  margin-right: 3px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #526d79;
  font-size: 24px !important;
  cursor: pointer;
}
.hw-search-clear:hover { background: #edf3f5; }
.hw-search-hint { margin: 9px 0 0; color: #c7dce4; font-size: 12px; line-height: 1.5; }
.hw-search-results {
  position: absolute;
  z-index: 35;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  max-height: min(490px, 65vh);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 7px;
  border: 1px solid #cadbe2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 38px #0b293324;
}
.hw-search-field > .hw-search-results { top: calc(100% + 7px); right: 0; left: 0; }
.hw-result-heading { margin: 0; padding: 12px 10px 7px; color: #607883; font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.hw-search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  padding: 11px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--hw-ink);
  text-align: left;
  cursor: pointer;
}
.hw-search-result:hover, .hw-search-result[aria-selected="true"] { background: #eff5f7; }
.hw-search-result > span:not(.hw-swatch) { min-width: 0; }
.hw-search-result > span:last-child { margin-left: auto; }
.hw-search-result strong, .hw-search-result small { display: block; overflow-wrap: anywhere; }
.hw-search-result strong { font-size: 14px; line-height: 1.4; }
.hw-search-result small { margin-top: 3px; color: var(--hw-muted); font-size: 12px; line-height: 1.4; }
.hw-search-status { margin: 0; padding: 15px 11px; color: var(--hw-muted); font-size: 13px; line-height: 1.5; }
.hw-product-icon { display: grid; flex: 0 0 38px; place-items: center; width: 38px; height: 38px; border: 1px solid #d7e4e9; border-radius: 10px; background: #edf5f8; color: #315f74; font-size: 21px; }

.hw-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin: 15px 3px 17px; }
.hw-summary > div { display: flex; flex-direction: row-reverse; align-items: baseline; gap: 7px; }
.hw-summary dt { color: var(--hw-muted); font-size: 12px; }
.hw-summary dd { margin: 0; color: var(--hw-ink); font-size: 19px; font-weight: 750; font-variant-numeric: tabular-nums; }
.hw-summary > small { margin-left: auto; color: #6b808a; font-size: 11px; line-height: 1.5; }

.hw-body-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); align-items: start; gap: 17px; }
.hw-side { display: grid; gap: 14px; min-width: 0; }
.hw-section { min-width: 0; margin: 0; padding: 19px; border: 1px solid var(--hw-line); border-radius: 16px; background: #fff; box-shadow: 0 4px 14px #17354303; }
.hw-side .hw-section { padding: 15px; }
.hw-side .hw-section-head { gap: 8px; margin-bottom: 14px; }
.hw-side .hw-section-head h2 { font-size: 17px; }
.hw-side .hw-section-head p { font-size: 11px; }
.home-workspace .hw-side .hw-section-head .btn { min-height: 36px; padding: 7px; font-size: 11px; white-space: nowrap; }
.hw-section-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.hw-section-head > div { min-width: 0; }
.hw-section-head h2 { margin: 0; color: var(--hw-ink); font-size: 19px; letter-spacing: -.025em; line-height: 1.25; }
.hw-section-head p { margin: 5px 0 0; color: var(--hw-muted); font-size: 12px; line-height: 1.5; }
.hw-section-head > .btn { flex: 0 0 auto; }
.hw-swatch { display: block; flex: 0 0 auto; width: 36px; height: 36px; border: 2px solid #fff; border-radius: 8px; background: #edf0ed; box-shadow: 0 1px 4px #00000029; }
.hw-arrow { flex: 0 0 auto; color: #3d7288; font-size: 19px; line-height: 1; }
.hw-resume-list { display: grid; grid-template-columns: 1fr; gap: 8px; }
.hw-resume-list > .hw-empty { grid-column: 1 / -1; }
.hw-resume {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  width: 100%;
  padding: 11px 9px;
  border: 1px solid #d6e3e8;
  border-radius: 12px;
  background: #f8fafb;
  color: var(--hw-ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.hw-resume:hover { border-color: #9bbbc8; background: #f0f6f8; }
.hw-resume > .hw-swatch { width: 30px; height: 30px; margin-top: 2px; border-radius: 10px; }
.hw-resume > .hw-arrow { align-self: center; margin-left: auto; font-size: 16px; }
.hw-resume-copy { display: block; min-width: 0; flex: 1; }
.hw-resume-copy > strong { display: block; color: #173c4b; font-size: 14px; letter-spacing: -.015em; line-height: 1.35; overflow-wrap: anywhere; }
.hw-resume-copy > small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: 3px; color: #5b7580; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.hw-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.hw-pills > span { display: inline-block; max-width: 100%; padding: 3px 5px; border: 1px solid #dce6e9; border-radius: 5px; background: #fff; color: #526e7a; font-size: 10px; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.hw-pills > span:first-child { border-color: #d3e3ec; background: #eaf3f8; color: #285970; }
.hw-customer { display: block; margin-top: 6px; color: #526b77; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }

.hw-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 11px; padding-bottom: 14px; }
.hw-filters > label { display: grid; gap: 6px; min-width: 165px; max-width: 100%; }
.hw-filters > label > span { color: #5d7680; font-size: 11px; font-weight: 650; }
.hw-filters select { width: 100%; min-width: 0; min-height: 42px; padding: 9px 34px 9px 12px; border: 1px solid #cedde3; border-radius: 8px; background: #fff; color: #244858; font-size: 13px; }
.hw-filters > button { min-height: 42px; padding: 8px 12px; border: 1px solid #dce6e9; border-radius: 8px; background: #fff; color: #365f72; font-size: 12px; cursor: pointer; }
.hw-filters > button:hover { background: #f0f6f8; }
.hw-results-note { margin: 0 0 11px; color: #657d87; font-size: 12px; line-height: 1.5; }
.hw-row { display: grid; grid-template-columns: 25px minmax(0, 1fr) minmax(0, 1.2fr) 16px; gap: 7px 11px; align-items: start; }
.hw-row-labels { display: none; }
.hw-recent-list { display: grid; gap: 0; min-width: 0; }
.hw-row { width: 100%; min-height: 84px; min-width: 0; padding: 12px 3px; border: 0; border-bottom: 1px solid #e7eef0; border-radius: 0; background: transparent; color: var(--hw-ink); text-align: left; cursor: pointer; transition: background-color .15s; }
.hw-row:last-child { border-bottom: 0; }
.hw-row:hover { border-radius: 8px; background: #f3f7f8; }
.hw-row > span { min-width: 0; }
.hw-row > .hw-swatch { width: 25px; height: 25px; grid-column: 1; grid-row: 1; }
.hw-row-identity { grid-column: 2; grid-row: 1; }
.hw-row-product { grid-column: 3; grid-row: 1; }
.hw-row-customer { grid-column: 2; grid-row: 2; }
.hw-row-updated { grid-column: 3; grid-row: 2; }
.hw-row-customer, .hw-row-updated { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.hw-row .hw-row-customer small, .hw-row .hw-row-updated small { margin-top: 0; }
.hw-row .hw-row-product strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.hw-row strong, .hw-row small { display: block; overflow-wrap: anywhere; }
.hw-row strong { font-size: 13px; font-weight: 600; line-height: 1.4; }
.hw-row small { margin-top: 4px; color: #637b86; font-size: 11px; line-height: 1.45; }
.hw-row .hw-row-identity strong { color: #183e4e; font-size: 14px; font-weight: 750; }
.hw-row .hw-row-updated strong { font-size: 12px; font-weight: 600; }
.hw-row .hw-row-updated small { font-size: 10px; }
.hw-row > .hw-arrow { justify-self: end; align-self: center; grid-column: 4; grid-row: 1 / span 2; font-size: 17px; }
.hw-empty { padding: 24px 14px 27px; border: 1px dashed #d3e1e7; border-radius: 11px; background: #f8fafb; text-align: center; }
.hw-empty h3 { margin: 0 0 7px; color: #2c4e5d; font-size: 16px; }
.hw-empty p { max-width: 470px; margin: 0 auto; color: var(--hw-muted); font-size: 13px; line-height: 1.6; }
.hw-empty .btn { margin-top: 15px; }
.home-workspace .hw-show-more { display: flex; margin: 15px auto 0; color: #2d596c; font-size: 12px; }

.hw-shortcuts { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 0; }
.hw-shortcuts > button { display: grid; position: relative; gap: 3px; min-width: 0; min-height: 65px; padding: 12px 35px 12px 15px; border: 1px solid #dce6e9; border-radius: 12px; background: #f9fbfb; color: var(--hw-ink); text-align: left; cursor: pointer; }
.hw-shortcuts > button:hover { border-color: #b6cdd6; background: #fff; }
.hw-shortcuts strong { font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.hw-shortcuts small { color: #667d87; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.hw-shortcuts .hw-arrow { position: absolute; top: 50%; right: 16px; transform: translateY(-50%); }
.hw-footnote { margin: 17px 3px 0; color: #6c8189; font-size: 11px; line-height: 1.5; }

@media (max-width: 1180px) {
  .hw-body-grid { grid-template-columns: 270px minmax(0, 1fr); gap: 13px; }
  .hw-section { padding: 16px; }
  .hw-side .hw-section { padding: 12px; }
}

@media (max-width: 980px) {
  .hw-hero { grid-template-columns: 1fr; gap: 21px; padding: 23px; }
  .hw-header { flex-direction: row; align-items: center; justify-content: space-between; }
  .hw-body-grid { grid-template-columns: 1fr; gap: 17px; }
  .hw-resume-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hw-shortcuts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hw-summary { gap: 10px 20px; }
  .hw-summary > small { flex-basis: 100%; margin-left: 0; }
}

@media (max-width: 580px) {
  .home-workspace { padding: 12px 2px 25px; }
  .hw-hero { padding: 20px 16px; border-radius: 15px; }
  .hw-header { align-items: stretch; flex-direction: column; gap: 15px; }
  .hw-header h1 { font-size: 27px; }
  .hw-header p { max-width: 310px; font-size: 13px; }
  .home-workspace .hw-new { width: 100%; }
  .hw-eyebrow { font-size: 10px; }
  .hw-search-field { gap: 8px; }
  .hw-search-field > span:first-child { margin-left: 11px; }
  .hw-search-field input { font-size: 16px; }
  .hw-search-results { max-height: 58vh; }
  .hw-search-hint { font-size: 11px; }
  .hw-summary { justify-content: space-between; gap: 10px 11px; margin: 15px 2px 18px; }
  .hw-summary > div { display: block; }
  .hw-summary dt { font-size: 10px; }
  .hw-summary dd { margin-top: 4px; font-size: 19px; }
  .hw-summary > small { font-size: 10px; }
  .hw-section { padding: 16px 12px; border-radius: 13px; }
  .hw-section-head { align-items: flex-start; gap: 10px; margin-bottom: 15px; }
  .hw-section-head h2 { font-size: 18px; }
  .hw-section-head p { font-size: 11px; }
  .home-workspace .hw-section-head .btn.small { padding: 8px 9px; font-size: 11px; }
  .hw-resume-list { grid-template-columns: 1fr; }
  .hw-resume { gap: 10px; padding: 12px 10px; }
  .hw-resume > .hw-arrow { font-size: 17px; }
  .hw-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hw-filters > label { min-width: 0; }
  .hw-filters select { padding-left: 9px; padding-right: 22px; font-size: 12px; }
  .hw-filters > button { justify-self: start; }
  .hw-row { grid-template-columns: 25px minmax(0, 1fr) 17px; gap: 7px 10px; padding: 13px 4px; }
  .hw-row-identity { grid-column: 2; grid-row: 1; }
  .hw-row-product { grid-column: 2; grid-row: 2; }
  .hw-row-customer { grid-column: 2; grid-row: 3; }
  .hw-row-updated { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 8px; grid-column: 2; grid-row: 4; }
  .hw-row .hw-row-updated strong, .hw-row .hw-row-updated small { margin: 0; color: #6c8189; font-size: 10px; }
  .hw-row .hw-row-customer strong { font-size: 12px; }
  .hw-row > .hw-arrow { grid-column: 3; grid-row: 1; align-self: center; }
  .hw-shortcuts { grid-template-columns: 1fr; gap: 9px; }
  .hw-shortcuts > button { min-height: 69px; padding: 14px 38px 14px 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-workspace *, .home-workspace *::before, .home-workspace *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
