/* =============================================================================
   QuickBooks Replace — home.css
   The Home Page workflow diagram and the Insights tab.
   ========================================================================== */

.qb-home { display: flex; flex-direction: column; height: 100%; background: var(--qb-app-bg); }

/* ---- Home Page / Insights document tabs -------------------------------- */
.qb-home-tabs {
  display: flex; align-items: flex-end; gap: 2px;
  padding: 6px 10px 0; background: var(--qb-app-bg); flex: 0 0 auto;
  border-bottom: 1px solid #C8C8C8;
}
.qb-home-tabs .qb-htab {
  padding: 5px 22px; font-size: 12px; position: relative; top: 1px;
  background: linear-gradient(to bottom, #E6E6E6, #D4D4D4);
  border: 1px solid #B4B4B4; border-bottom: none; border-radius: 3px 3px 0 0;
}
.qb-home-tabs .qb-htab.active { background: #fff; border-bottom: 1px solid #fff; font-weight: 600; }

.qb-home-canvas {
  flex: 1 1 auto; overflow: auto; padding: 12px;
  display: grid; grid-template-columns: 1fr 250px; gap: 12px; align-content: start;
}
.qb-home-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.qb-home-right { display: flex; flex-direction: column; gap: 12px; }

/* ---- a workflow panel --------------------------------------------------- */
.qb-hpanel {
  background: var(--qb-panel);
  border: 1px solid #DCDCDC;
  border-radius: 4px;
  position: relative;
  padding: 20px 14px 14px;
  min-height: 96px;
}
.qb-hpanel > .qb-hp-pill {
  position: absolute; top: -10px; left: 14px;
  height: 20px; padding: 0 14px;
  background: var(--qb-home-pill);
  border: 1px solid #9BB6D4; border-radius: 10px;
  display: flex; align-items: center;
  font-size: 10px; font-weight: 700; letter-spacing: .8px;
  color: #1E3A56; text-transform: uppercase;
}
.qb-hpanel[data-panel="VENDORS"]   > .qb-hp-pill { background: var(--qb-home-vendors); }
.qb-hpanel[data-panel="CUSTOMERS"] > .qb-hp-pill { background: var(--qb-home-customers); border-color: #9CBE97; color: #23431F; }
.qb-hpanel[data-panel="EMPLOYEES"] > .qb-hp-pill { background: var(--qb-home-employees); border-color: #CBB771; color: #4A3B0C; }
.qb-hpanel[data-panel="COMPANY"]   > .qb-hp-pill { background: var(--qb-home-company); border-color: #C9A883; color: #4C3517; }
.qb-hpanel[data-panel="BANKING"]   > .qb-hp-pill { background: var(--qb-home-banking); border-color: #93B4C0; color: #16414F; }
.qb-hpanel > .qb-hp-pill.clickable:hover { filter: brightness(1.06); text-decoration: underline; }

.qb-hp-flow {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: flex-start;
  gap: 0;
}
.qb-hp-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 0;
}

/* ---- a workflow icon tile ----------------------------------------------- */
.qb-hicon {
  width: 86px; min-height: 68px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 4px; border-radius: 3px; text-align: center;
  position: relative; flex: 0 0 auto;
}
.qb-hicon:hover { background: #E8F1FB; box-shadow: inset 0 0 0 1px #B9D3EE; }
.qb-hicon .qb-hi-art {
  width: 34px; height: 34px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.qb-hicon .qb-hi-label {
  font-size: 10.5px; line-height: 12px; color: #22384C; max-width: 82px;
}
.qb-hicon .qb-hi-caret {
  position: absolute; right: 8px; bottom: 20px; font-size: 8px; color: #5A5A5A;
}
.qb-hicon.upsell .qb-hi-label { color: var(--qb-link); }

/* ---- connector arrows --------------------------------------------------- */
.qb-harrow {
  align-self: center; margin-top: 8px;
  width: 26px; height: 20px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  color: var(--qb-home-arrow);
}
.qb-harrow svg { display: block; }
.qb-hp-break { flex-basis: 100%; height: 10px; }

/* ---- right column widgets ----------------------------------------------- */
.qb-hwidget {
  background: var(--qb-panel); border: 1px solid #DCDCDC; border-radius: 4px;
  overflow: hidden;
}
.qb-hwidget > .qb-hw-head {
  background: linear-gradient(to bottom, #F6F8FA, #E6EBF0);
  border-bottom: 1px solid #DCDCDC;
  padding: 6px 10px; font-size: 11px; font-weight: 700; color: #26445E;
  display: flex; align-items: center; justify-content: space-between;
}
.qb-hwidget > .qb-hw-head.promo { background: var(--qb-promo); color: #fff; border-bottom-color: #1F4D91; }
.qb-hwidget .qb-hw-body { padding: 6px 0; font-size: 11.5px; }
.qb-hwidget .qb-hw-row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 3px 10px;
}
.qb-hwidget .qb-hw-row:hover { background: #EAF2FB; }
.qb-hwidget .qb-hw-row .amt { font-family: var(--qb-font-num); }
.qb-hwidget .qb-hw-row .amt.neg { color: var(--qb-negative); }
.qb-hwidget .qb-hw-total {
  border-top: 1px solid #E0E0E0; margin-top: 4px; padding-top: 5px; font-weight: 700;
}
.qb-hwidget .qb-hw-link { display: block; padding: 4px 10px; color: var(--qb-link); font-size: 11.5px; }
.qb-hwidget .qb-hw-link:hover { text-decoration: underline; }

/* -------------------------------------------------------------------------
   Insights tab
   ---------------------------------------------------------------------- */
.qb-insights { flex: 1 1 auto; overflow: auto; padding: 14px 18px; background: #fff; }
.qb-ins-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.qb-ins-logo {
  width: 108px; height: 62px; border: 1px dashed #BFBFBF; border-radius: 3px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 10.5px; color: #8A8A8A; flex: 0 0 auto; background: #FAFAFA;
}
.qb-ins-title { flex: 1 1 auto; }
.qb-ins-title h2 { margin: 0 0 3px; font-size: 17px; font-weight: 600; color: #22384C; }
.qb-ins-title .sub { font-size: 11.5px; color: #6A6A6A; }
.qb-ins-actions { display: flex; gap: 8px; align-items: center; }

.qb-ins-carousel {
  border: 1px solid #DCDCDC; border-radius: 4px; background: #FCFCFC;
  padding: 12px 40px 8px; position: relative; margin-bottom: 14px;
}
.qb-ins-carousel .qb-ins-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 26px; height: 44px; display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #7A93A8;
}
.qb-ins-carousel .qb-ins-nav:hover { color: #2A5DB0; background: #EEF4FB; }
.qb-ins-carousel .qb-ins-nav.prev { left: 4px; }
.qb-ins-carousel .qb-ins-nav.next { right: 4px; }
.qb-ins-carousel h3 { margin: 0 0 8px; font-size: 13px; color: #22384C; text-align: center; }
.qb-ins-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.qb-ins-dots i { width: 7px; height: 7px; border-radius: 50%; background: #CFCFCF; display: block; }
.qb-ins-dots i.on { background: #2A5DB0; }

.qb-ins-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.qb-ins-card { border: 1px solid #DCDCDC; border-radius: 4px; padding: 12px; background: #FCFCFC; }
.qb-ins-card h3 { margin: 0 0 10px; font-size: 13px; color: #22384C; }
.qb-ins-bar { display: flex; height: 26px; border-radius: 2px; overflow: hidden; margin-bottom: 10px; }
.qb-ins-bar span { display: block; }
.qb-ins-legend { display: flex; gap: 16px; font-size: 11px; flex-wrap: wrap; }
.qb-ins-legend i { width: 10px; height: 10px; display: inline-block; margin-right: 5px; border-radius: 2px; }
.qb-ins-legend b { font-family: var(--qb-font-num); }
