/* SolarFlow AI POC — installer platform (office) shell */

body.office { overflow-y: scroll; }

.shell { display: block; min-height: 100vh; }

/* ---------- sidebar (drawer by default) ---------- */
.side {
  background: linear-gradient(178deg, var(--green-950) 0%, #0E1E44 58%, #102A5C 100%);
  color: #C2CEDF; display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh; width: 270px; z-index: 60;
  transform: translateX(-100%);
  transition: transform .26s var(--ease-out);
  will-change: transform;
}
body.nav-open .side { transform: translateX(0); }

.nav-scrim {
  position: fixed; inset: 0; background: rgba(10,20,40,.5); backdrop-filter: blur(2px);
  z-index: 55; opacity: 0; pointer-events: none; transition: opacity .26s;
}
body.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }

.top .hamb {
  display: inline-flex; width: 46px; height: 46px; margin-left: -8px; flex: none;
  align-items: center; justify-content: center; border-radius: var(--r-m);
  color: var(--ink); cursor: pointer; border: 0; background: transparent;
}
.top .hamb .ic { width: 24px; height: 24px; }
.top .hamb:active { background: var(--surface-2); transform: scale(.96); }

@media (min-width: 1180px) {
  .shell { display: grid; grid-template-columns: 238px minmax(0, 1fr); }
  .side { position: sticky; transform: none; width: auto; z-index: auto; }
  .nav-scrim { display: none; }
  .top .hamb { display: none; }
}
.side-logo { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; }
.side-logo svg, .side-logo img { width: 30px; height: 30px; }
.side-logo .wordmark { font-family: var(--serif); font-size: 19px; font-weight: 700; color: #F4F8FF; letter-spacing: .01em; }
.side-logo .wordmark em { font-style: normal; color: var(--leaf); }
.side-tag { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #7E8DA8; padding: 0 18px 14px; }

.nav-sec { padding: 10px 10px 2px; }
.nav-sec .sec-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #6B7A99; padding: 6px 10px; }
.nav-it {
  display: flex; align-items: center; gap: 12px; padding: 0 12px; margin: 2px 0;
  min-height: 50px; border-radius: 10px; color: #C2CEDF; font-size: 14.5px; font-weight: 500;
  text-decoration: none !important; position: relative; transition: background .12s, color .12s;
}
.nav-it:active { transform: scale(.99); }
.nav-it .ic { width: 19px; height: 19px; color: #8294B4; }
.nav-it:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-it.is-active { background: rgba(37,99,235,.20); color: #fff; font-weight: 600; }
.nav-it.is-active .ic { color: var(--leaf); }
.nav-it.is-active::before {
  content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--leaf);
}
.nav-it .count-badge { margin-left: auto; background: rgba(37,99,235,.32); color: #BFD3FB; }
.nav-it .count-badge.amber { background: rgba(245,166,35,.2); color: #F5C66B; }
.nav-it .count-badge.gold { background: rgba(245,166,35,.22); color: #F7CE7B; }

.side-foot { margin-top: auto; padding: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.side-user { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; }
.side-user:hover { background: rgba(255,255,255,.05); }
.side-user .u-name { font-size: 13px; font-weight: 600; color: #EEF3FF; line-height: 1.2; }
.side-user .u-role { font-size: 11px; color: #8294B4; }

/* ---------- topbar ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line); padding: 0 20px; height: 64px;
}
.top .crumb { font-size: 13.5px; color: var(--mut); display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.top .crumb b { color: var(--ink); font-weight: 600; }
.top .search-box { width: 300px; margin-left: auto; }
.top .search-box .input { background: var(--surface-2); border-color: var(--line-2); min-height: 44px; font-size: 14px; }
@media (max-width: 760px) { .top .search-box { display: none; } }
.top .date-chip { font-family: var(--mono); font-size: 12px; color: var(--mut); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.top .date-chip .ic { width: 14px; height: 14px; color: var(--mut-2); }
.top .bell { position: relative; color: var(--mut); display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: var(--r-m); border: 0; background: transparent; cursor: pointer; flex: none; }
.top .bell .ic { width: 22px; height: 22px; }
.top .bell:hover { background: var(--surface-2); }
.top .bell .ndot { position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 1.5px solid #fff; }

/* ---------- main content ---------- */
.main { padding: 24px 26px 80px; max-width: 1340px; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-h h1 { font-family: var(--serif); font-size: 25px; font-weight: 700; letter-spacing: -.01em; }
.page-h .sub { font-size: 13px; color: var(--mut); margin-top: 3px; }
.page-h .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* layout grids */
.grid { display: grid; gap: 14px; }
.grid > * { min-width: 0; }
.main .card { min-width: 0; max-width: 100%; }
.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.span-2 { grid-column: span 2; }
@media (max-width: 1100px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .cols-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .span-2 { grid-column: span 1; }
}
@media (max-width: 720px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
}

/* split view */
.split { display: grid; grid-template-columns: 330px minmax(0,1fr); gap: 14px; align-items: start; }
@media (max-width: 980px) { .split { grid-template-columns: 1fr; } }

/* conversation / list rows */
.convo { display: flex; gap: 10px; padding: 11px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer; text-decoration: none !important; color: inherit; }
.convo:hover { background: var(--surface-2); }
.convo.is-active { background: var(--green-50); box-shadow: inset 3px 0 0 var(--green-600); }
.convo .c-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.convo .c-name { font-weight: 600; font-size: 13.5px; }
.convo .c-time { font-family: var(--mono); font-size: 10.5px; color: var(--mut-2); white-space: nowrap; }
.convo .c-snippet { font-size: 12.5px; color: var(--mut); margin-top: 1px; }

/* pipeline board (kanban) */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(244px, 1fr); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 10px; }
.board-col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-m); padding: 10px; }
.board-col .bc-h { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; }
.board-col .bc-h h3 { font-size: 12.5px; font-weight: 700; }
.board-col .bc-h .count-badge { margin-left: auto; }
.deal-card { display: block; text-decoration: none !important; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--sh-1); padding: 12px; margin-bottom: 10px; transition: box-shadow .15s, transform .15s var(--ease-out), border-color .15s; }
.deal-card:hover { box-shadow: var(--sh-2); transform: translateY(-2px); border-color: var(--green-150); }
.deal-card .dc-cust { font-weight: 700; font-size: 13.5px; }
.deal-card .dc-addr { font-size: 11.5px; color: var(--mut); margin-top: 1px; }
.deal-card .dc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; }
.deal-card .dc-val { font-family: var(--mono); font-weight: 700; font-size: 13px; }

/* sticky action bar */
.action-bar {
  position: sticky; bottom: 0; z-index: 30; display: flex; gap: 9px; align-items: center;
  background: rgba(255,255,255,.94); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--sh-2);
  padding: 11px 14px; margin-top: 16px;
}

/* page-level KPI strip */
.kpi-strip { display: flex; gap: 0; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); overflow: hidden; flex-wrap: wrap; }
.kpi-strip .ks { flex: 1; min-width: 130px; padding: 11px 16px; border-right: 1px solid var(--line-2); }
.kpi-strip .ks:last-child { border-right: 0; }
.kpi-strip .ks .v { font-family: var(--serif); font-size: 19px; font-weight: 700; }
.kpi-strip .ks .l { font-size: 11px; color: var(--mut); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
