:root {
  --orange: #ff5a00;
  --orange-2: #ff741f;
  --orange-soft: #fff1e8;
  --navy: #101a24;
  --navy-2: #172331;
  --text: #182230;
  --muted: #6d7785;
  --line: #e7ebf0;
  --bg: #f8fafc;
  --white: #fff;
  --green: #16a34a;
  --red: #ef4444;
  --blue: #2563eb;
  --purple: #7c3aed;
  --yellow: #f59e0b;
  --shadow: 0 4px 18px rgba(15, 23, 42, .06);
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 13px
}

a {
  text-decoration: none;
  color: inherit
}

button,
input,
select,
textarea {
  font: inherit
}

.app {
  min-height: 100vh
}

.topbar {
  height: 74px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 1030
}

.brand {
  width: 250px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none
}

.brand img {
  width: 205px;
  height: auto;
  object-fit: contain
}

.menu-toggle {
  border: 0;
  background: transparent;
  color: #526070;
  font-size: 18px;
  width: 30px;
  height: 36px
}

.global-search {
  height: 40px;
  border: 1px solid #dfe5ec;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  max-width: 560px;
  flex: 1;
  margin: auto
}

.global-search input {
  border: 0;
  outline: 0;
  width: 100%;
  font-size: 12px;
  color: #5f6977
}

.global-search kbd {
  font-size: 11px;
  background: #f5f7fa;
  border: 1px solid #e5e9ef;
  border-radius: 4px;
  padding: 2px 6px;
  color: #77808d
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 18px
}

.top-icon {
  position: relative;
  color: #475467;
  font-size: 17px
}

.badge-count {
  position: absolute;
  right: -8px;
  top: -9px;
  background: var(--orange);
  color: #fff;
  border-radius: 20px;
  font-size: 9px;
  padding: 2px 5px
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 4px
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fde7dc;
  color: #c2410c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700
}

.user-info {
  line-height: 1.1
}

.user-info strong {
  font-size: 12px
}

.user-info span {
  font-size: 10px;
  color: #6b7280
}

.layout {
  display: flex;
  min-height: calc(100vh - 74px)
}

.sidebar {
  width: 250px;
  background: linear-gradient(180deg, #111b25, #0e1720);
  color: #d8e0e8;
  flex: none;
  display: flex;
  flex-direction: column;
  padding: 12px 12px 14px;
  transition: .25s
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 3px
}

.nav-item {
  height: 42px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 14px;
  color: #d6dee8;
  font-size: 14px;
  font-weight: 500
}

.nav-item i {
  width: 18px;
  text-align: center;
  font-size: 14px
}

.nav-item:hover {
  background: rgba(255, 255, 255, .07);
  color: #fff
}

.nav-item.active {
  background: linear-gradient(90deg, var(--orange), #ff6710);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 90, 0, .18)
}

.nav-sep {
  border-top: 1px solid rgba(255, 255, 255, .11);
  margin: 14px 8px
}

.sidebar-card {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 7px;
  overflow: hidden;
  background: rgba(255, 255, 255, .025)
}

.sidebar-card .card-top {
  padding: 15px
}

.sidebar-card .cc-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #fff;
  font-size: 15px
}

.cc-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800
}

.sidebar-card p {
  font-size: 14px;
  color: #c0c9d4;
  margin: 9px 0 0;
  line-height: 1.5
}

.sidebar-card .card-bottom {
  background: rgba(255, 255, 255, .04);
  padding: 9px;
  text-align: center;
  font-size: 18px
}

.content {
  flex: 1;
  min-width: 0;
  padding: 20px 22px 28px;
  overflow: hidden
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 15px
}

.page-title {
  font-size: 30px;
  font-weight: 700;
  margin: 0
}

.breadcrumbs {
  font-size: 11px;
  color: #76808d;
  margin-top: 5px
}

.breadcrumbs span {
  margin: 0 6px;
  color: #adb5bf
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap
}

.btn-orange {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff
}

.btn-orange:hover {
  background: #eb4f00;
  border-color: #eb4f00;
  color: #fff
}

.btn-outline-orange {
  border-color: var(--orange);
  color: var(--orange);
  background: #fff
}

.btn-outline-orange:hover {
  background: var(--orange-soft);
  border-color: var(--orange);
  color: var(--orange)
}

.btn-soft {
  background: #fff;
  border: 1px solid #dfe5ec;
  color: #4b5563
}

.btn-sm-custom {
  padding: .45rem .75rem;
  font-size: 12px;
  border-radius: 6px
}

.card-ui {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow)
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 14px
}

.stat-grid.six {
  grid-template-columns: repeat(6, 1fr)
}

.stat-card {
  padding: 14px 13px;
  min-height: 92px
}

.stat-row {
  display: flex;
  gap: 12px;
  align-items: center
}

.stat-icon {
  width: 43px;
  height: 43px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex: none
}

.ic-blue {
  background: #e9f1ff;
  color: #2563eb
}

.ic-green {
  background: #e9f8ea;
  color: #16a34a
}

.ic-orange {
  background: #fff0e3;
  color: #ff7a00
}

.ic-purple {
  background: #f0eaff;
  color: #7c3aed
}

.ic-red {
  background: #ffebeb;
  color: #ef4444
}

.ic-yellow {
  background: #fff5dc;
  color: #f59e0b
}

.stat-value {
  font-size: 19px;
  font-weight: 750;
  line-height: 1.05
}

.stat-label {
  font-size: 14px;
  color: #667180;
  margin-top: 4px
}

.trend {
  font-size: 14px;
  margin-top: 5px
}

.up {
  color: #16a34a
}

.down {
  color: #ef4444
}

.toolbar {
  padding: 11px 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap
}

.form-control,
.form-select {
  font-size: 12px;
  border-color: #dfe5ec;
  border-radius: 6px;
  min-height: 38px
}

.search-field {
  position: relative;
  min-width: 230px;
  flex: 1
}

.search-field i {
  position: absolute;
  left: 12px;
  top: 12px;
  color: #87919e
}

.search-field input {
  padding-left: 32px
}

.filter-select {
  min-width: 140px
}

.tabs {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 0 10px
}

.tab-link {
  padding: 12px 13px;
  font-size: 11px;
  color: #526070;
  border-bottom: 2px solid transparent
}

.tab-link.active {
  color: var(--orange);
  border-color: var(--orange);
  font-weight: 700
}

.table-card {
  overflow: auto
}

.table {
  margin: 0;
  min-width: 980px
}

.table thead th {
  font-size: 14px;
  color: #596474;
  font-weight: 650;
  background: #fff;
  white-space: nowrap;
  padding: 11px 9px;
  border-bottom: 1px solid var(--line)
}

.table tbody td {
  font-size: 12px;
  vertical-align: middle;
  padding: 11px 9px;
  border-bottom: 1px solid #f0f2f5;
  white-space: nowrap
}

.table tbody tr:hover {
  background: #fffaf7
}

.company-cell,
.person-cell {
  display: flex;
  align-items: center;
  gap: 9px
}

.company-logo {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #e8f0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #2563eb;
  font-size: 9px
}

.person-avatar {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  background: #fbe6dc;
  color: #b94b1a
}

.company-cell strong,
.person-cell strong {
  font-size: 14px;
  display: block
}

.company-cell small,
.person-cell small {
  font-size: 12px;
  color: #7b8490
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  padding: 4px 7px;
  font-size: 9px;
  font-weight: 600
}

.pill-blue {
  background: #e8f0ff;
  color: #2563eb
}

.pill-green {
  background: #e8f7eb;
  color: #15803d
}

.pill-orange {
  background: #fff0df;
  color: #d97706
}

.pill-red {
  background: #ffe7e7;
  color: #dc2626
}

.pill-purple {
  background: #eee8ff;
  color: #6d28d9
}

.pill-gray {
  background: #eef1f4;
  color: #586273
}

.more-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #e2e7ed;
  background: #fff;
  border-radius: 6px;
  color: #667180
}

.pagination-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 12px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: #657080
}

.pagination {
  display: flex;
  gap: 4px
}

.page-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #dfe5ec;
  background: #fff;
  border-radius: 5px;
  font-size: 10px
}

.page-btn.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr .9fr;
  gap: 12px;
  margin-bottom: 12px
}

.dashboard-grid.bottom {
  grid-template-columns: 1fr 1.2fr 1fr
}

.panel {
  padding: 14px
}

.panel-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center
}

.panel-title a {
  color: var(--orange);
  font-size: 12px;
  font-weight: 600
}

.pipeline {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 210px
}

.funnel {
  width: 175px
}

.funnel-step {
  margin: 0 auto;
  height: 31px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
  margin-bottom: 1px
}

.f1 {
  width: 100%;
  background: #2875dc
}

.f2 {
  width: 85%;
  background: #42ad65
}

.f3 {
  width: 70%;
  background: #ff7b13
}

.f4 {
  width: 60%;
  background: #7b45d6
}

.f5 {
  width: 50%;
  background: #f0a10a
}

.f6 {
  width: 40%;
  background: #21a66b
}

.f7 {
  width: 30%;
  background: #ed3d32
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr
}

.summary-item {
  padding: 12px;
  border-bottom: 1px solid #edf0f3
}

.summary-item:nth-child(odd) {
  border-right: 1px solid #edf0f3
}

.summary-item:nth-last-child(-n+2) {
  border-bottom: 0
}

.summary-item .small {
  font-size: 12px;
  color: #6d7785
}

.summary-item strong {
  font-size: 14px;
  display: block;
  margin: 3px 0
}

.task-list {
  display: flex;
  flex-direction: column
}

.task {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #eef1f4
}

.task:last-child {
  border-bottom: 0
}

.task-time {
  font-size: 9px;
  width: 50px;
  color: #566171
}

.task-icon {
  width: 27px;
  height: 27px;
  border-radius: 7px;
  background: #eef4ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center
}

.task-body {
  flex: 1
}

.task-body strong {
  font-size: 12px;
  display: block
}

.task-body small {
  font-size: 12px;
  color: #727c88
}

.task-priority {
  font-size: 8px;
  padding: 3px 6px;
  border-radius: 10px;
  align-self: flex-start
}

.chart-wrap {
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: center
}

.donut {
  width: 145px;
  height: 145px;
  border-radius: 50%;
  background: conic-gradient(#2875dc 0 40%, #53b467 40% 65%, #ff8a12 65% 85%, #6e4fd6 85% 95%, #32a99a 95% 100%);
  position: relative
}

.donut:after {
  content: "";
  position: absolute;
  inset: 32px;
  border-radius: 50%;
  background: #fff
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
  font-size: 18px;
  font-weight: 750
}

.donut-center small {
  font-size: 9px;
  color: #697384;
  font-weight: 500
}

.legend {
  font-size: 12px
}

.legend div {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 8px 0
}

.legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block
}

.opportunity-list .opp {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #eef1f4
}

.opp:last-child {
  border-bottom: 0
}

.opp strong {
  font-size: 14px;
  padding-right: 5px;
}

.opp small {
  font-size: 12px;
  color: #707987
}

.opp .value {
  font-weight: 700;
  font-size: 14px
}

.detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 12px
}

.detail-title {
  display: flex;
  gap: 13px;
  align-items: center
}

.detail-logo {
  width: 53px;
  height: 53px;
  border-radius: 7px;
  background: #1761b0;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 800
}

.detail-title h2 {
  font-size: 20px;
  margin: 0 0 4px
}

.meta-line {
  font-size: 14px;
  color: #5d6775
}

.meta-line a {
  color: #2563eb
}

.info-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 12px;
  margin-bottom: 10px
}

.info-cell {
  padding: 0 12px;
  border-right: 1px solid #eef1f4
}

.info-cell:last-child {
  border: 0
}

.info-cell label {
  font-size: 14px;
  color: #78818e;
  display: block;
  margin-bottom: 5px
}

.info-cell strong {
  font-size: 14px
}

.detail-tabs {
  display: flex;
  overflow: auto;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px
}

.detail-tabs a {
  white-space: nowrap;
  padding: 11px 13px;
  font-size: 10px;
  border-bottom: 2px solid transparent
}

.detail-tabs a.active {
  color: var(--orange);
  border-color: var(--orange);
  font-weight: 700
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr .95fr;
  gap: 12px
}

.detail-grid .full {
  grid-column: span 2
}

.info-list {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 9px 12px
}

.info-list label {
  font-size: 9px;
  color: #77808c
}

.info-list div {
  font-size: 9px
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid #eef1f4
}

.contact-row:last-child {
  border: 0
}

.contact-main {
  flex: 1
}

.contact-main strong {
  font-size: 14px;
  padding-right: 5px;
}

.contact-main small {
  font-size: 12px;
  color: #727b88
}

.note {
  background: #fff8e8;
  border-radius: 7px;
  padding: 9px;
  margin-bottom: 7px;
  font-size: 9px
}

.timeline-item {
  display: flex;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid #eef1f4
}

.timeline-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e9f7ec;
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-size: 9px
}

.timeline-item strong {
  font-size: 14px
}

.timeline-item small {
  font-size: 12px;
  color: #747e8b;
  display: block
}

.stagebar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin-bottom: 13px;
  overflow: hidden;
  border-radius: 7px
}

.stage {
  padding: 10px 7px;
  background: #eef3fb;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  position: relative
}

.stage.active {
  background: #1f9b47;
  color: #fff
}

.stage.current {
  background: var(--orange);
  color: #fff
}

.stage:after {
  content: "";
  position: absolute;
  right: -10px;
  top: 0;
  border-top: 19px solid transparent;
  border-bottom: 19px solid transparent;
  border-left: 10px solid #fff;
  z-index: 2
}

.stage:last-child:after {
  display: none
}

.req-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px
}

.mini-card {
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px
}

.mini-card strong {
  font-size: 16px
}

.mini-card small {
  display: block;
  font-size: 12px;
  color: #74808d;
  margin-top: 3px
}

.proposal-head {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, .6fr);
  gap: 0;
  align-items: center
}

.proposal-head .cell {
  padding: 8px 12px;
  border-right: 1px solid #eef1f4
}

.proposal-head .cell:last-child {
  border: 0
}

.proposal-head small {
  display: block;
  font-size: 12px;
  color: #77808d
}

.proposal-head strong {
  font-size: 11px
}

.proposal-grid {
  display: grid;
  grid-template-columns: .9fr 1.5fr .85fr;
  gap: 12px
}

.proposal-summary {
  line-height: 1.6;
  font-size: 10px;
  color: #4e5866
}

.scope li {
  font-size: 12px;
  margin-bottom: 5px
}

.activity-table .table {
  min-width: 1050px
}

.login-page {
  min-height: 100vh;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 35px
}

.login-shell {
  width: 1200px;
  max-width: 100%;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 35px
}

.login-hero {
  background: #080909;
  border-radius: 0 0 0 0;
  min-height: 670px;
  color: #fff;
  padding: 55px 70px 30px;
  position: relative;
  overflow: hidden
}

.login-hero:after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -133px;
  width: 600px;
  height: 180px;
  background: var(--orange);
  border-radius: 50% 0 0 0;
  transform: rotate(-5deg)
}

.login-hero:before {
  content: "";
  position: absolute;
  left: -100px;
  bottom: 70px;
  width: 850px;
  height: 150px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  transform: rotate(-5deg);
  box-shadow: 0 -14px 0 rgba(255, 255, 255, .025), 0 -28px 0 rgba(255, 255, 255, .02), 0 -42px 0 rgba(255, 255, 255, .015)
}

.login-hero img {
  width: 455px;
  max-width: 100%;
  position: relative;
  z-index: 1
}

.hero-copy {
  position: relative;
  z-index: 1;
  margin-top: 45px;
  max-width: 520px
}

.hero-copy h1 {
  font-size: 45px;
  line-height: 1.15;
  margin: 0;
  font-weight: 750
}

.hero-copy h1 span {
  color: var(--orange)
}

.hero-line {
  width: 68px;
  height: 4px;
  background: var(--orange);
  margin: 18px 0
}

.hero-copy p {
  font-size: 16px;
  line-height: 1.7;
  color: #d3d6da
}

.hero-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 28px;
  position: relative;
  z-index: 1
}

.hero-feature {
  border: 1px solid #292c2e;
  border-radius: 10px;
  padding: 16px 8px;
  text-align: center
}

.hero-feature i {
  font-size: 28px;
  color: var(--orange);
  margin-bottom: 12px
}

.hero-feature span {
  display: block;
  font-size: 12px;
  line-height: 1.4
}

.login-box {
  align-self: center;
  border: 1px solid #e0e3e7;
  border-radius: 10px;
  padding: 42px 40px;
  box-shadow: 0 5px 20px rgba(15, 23, 42, .06)
}

.login-box h2 {
  font-size: 35px;
  margin: 0 0 5px
}

.login-box>p {
  font-size: 16px;
  color: #5f6977;
  margin-bottom: 28px
}

.field-label {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 7px;
  display: block
}

.input-group .input-group-text {
  background: #fff;
  border-right: 0;
  border-color: #d6dce3;
  color: #667180
}

.input-group .form-control {
  border-left: 0;
  min-height: 42px
}

.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0 25px;
  font-size: 13px
}

.login-options a {
  color: var(--orange)
}

.login-btn {
  width: 100%;
  min-height: 47px;
  border-radius: 7px;
  font-weight: 650
}

.or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #7a8491;
  font-size: 16px;
  margin: 20px 0
}

.or:before,
.or:after {
  content: "";
  height: 1px;
  background: #dfe4ea;
  flex: 1
}

.sso {
  width: 100%;
  min-height: 47px;
  border: 1px solid #ff8b55;
  background: #fff;
  color: var(--orange);
  border-radius: 7px
}

.copyright {
  text-align: center;
  color: #7c8592;
  font-size: 12px;
  margin-top: 28px
}

.login-benefits {
  grid-column: 1/-1;
  border-top: 1px solid #e5e8ec;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 15px 40px 0
}

.benefit {
  display: flex;
  gap: 12px;
  align-items: center;
  border-right: 1px solid #e3e7eb;
  padding: 8px 22px
}

.benefit:last-child {
  border: 0
}

.benefit-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff0e4;
  color: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px
}

.benefit strong {
  font-size: 15px;
  display: block
}

.benefit span {
  font-size: 12px;
  color: #697384
}

@media(max-width:1200px) {
  .brand {
    width: 205px
  }

  .sidebar {
    width: 220px
  }

  .stat-grid {
    grid-template-columns: repeat(3, 1fr)
  }

  .stat-grid.six {
    grid-template-columns: repeat(3, 1fr)
  }

  .dashboard-grid,
  .dashboard-grid.bottom,
  .detail-grid,
  .proposal-grid {
    grid-template-columns: 1fr 1fr
  }

  .dashboard-grid>*,
  .dashboard-grid.bottom>* {
    min-width: 0
  }

  .info-strip {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px
  }

  .info-cell:nth-child(4) {
    border: 0
  }

  .req-summary {
    grid-template-columns: repeat(3, 1fr)
  }
}

@media(max-width:900px) {
  .topbar {
    padding: 0 12px
  }

  .brand {
    width: auto
  }

  .brand img {
    width: 165px
  }

  .global-search {
    display: none
  }

  .user-info {
    display: none
  }

  .sidebar {
    position: fixed;
    left: -260px;
    top: 74px;
    bottom: 0;
    z-index: 1020;
    width: 250px
  }

  .sidebar.show {
    left: 0
  }

  .content {
    padding: 15px
  }

  .stat-grid,
  .stat-grid.six {
    grid-template-columns: repeat(2, 1fr)
  }

  .dashboard-grid,
  .dashboard-grid.bottom,
  .detail-grid,
  .proposal-grid {
    grid-template-columns: 1fr
  }

  .detail-grid .full {
    grid-column: auto
  }

  .info-strip {
    grid-template-columns: repeat(2, 1fr)
  }

  .info-cell:nth-child(even) {
    border: 0
  }

  .login-shell {
    grid-template-columns: 1fr
  }

  .login-hero {
    min-height: 520px
  }

  .login-benefits {
    grid-column: auto
  }

  .login-box {
    max-width: 600px;
    margin: auto
  }

  .login-benefits {
    grid-template-columns: repeat(2, 1fr);
    padding: 10px
  }

  .hero-features {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media(max-width:600px) {
  body {
    font-size: 12px
  }

  .content {
    padding: 12px 10px 20px
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column
  }

  .actions {
    width: 100%
  }

  .actions>* {
    flex: 1
  }

  .stat-grid,
  .stat-grid.six {
    grid-template-columns: 1fr
  }

  .toolbar {
    align-items: stretch
  }

  .search-field,
  .filter-select {
    min-width: 100%
  }

  .tabs {
    overflow: auto
  }

  .pagination-row {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start
  }

  .info-strip {
    grid-template-columns: 1fr
  }

  .info-cell {
    border-right: 0 !important;
    border-bottom: 1px solid #eef1f4;
    padding: 8px 0
  }

  .stagebar {
    grid-template-columns: repeat(6, 150px);
    overflow: auto
  }

  .req-summary {
    grid-template-columns: 1fr 1fr
  }

  .login-page {
    padding: 12px
  }

  .login-hero {
    padding: 35px 25px;
    min-height: 470px
  }

  .login-hero img {
    width: 340px
  }

  .hero-copy {
    margin-top: 25px
  }

  .hero-copy h1 {
    font-size: 28px
  }

  .login-box {
    padding: 30px 22px
  }

  .login-benefits {
    grid-template-columns: 1fr
  }

  .benefit {
    border-right: 0;
    border-bottom: 1px solid #e3e7eb;
    padding: 10px
  }

  .login-hero:after {
    right: -180px
  }

  .detail-title h2 {
    font-size: 17px
  }

  .proposal-head {
    grid-template-columns: 1fr 1fr
  }

  .proposal-head .cell:nth-child(n+3) {
    margin-top: 5px
  }

  .top-actions {
    gap: 10px
  }
}


/* ===== Cover Canvas refinements ===== */
html {
  scrollbar-width: none
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0
}

body {
  font-size: 14px;
  overflow-x: hidden
}

.topbar {
  height: 74px
}

.brand {
  width: 250px
}

.brand a {
  display: flex;
  align-items: center;
  min-width: 0
}

.brand img {
  width: 205px;
  max-width: 100%;
  height: auto
}

.menu-toggle {
  width: 34px;
  min-width: 34px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer
}

/* Desktop sidebar is independently scrollable and can be fully hidden with the top hamburger. */
.layout {
  min-height: calc(100vh - 74px);
  align-items: stretch
}

.sidebar {
  height: calc(100vh - 74px);
  position: sticky;
  top: 74px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  transition: width .25s ease, padding .25s ease, transform .25s ease
}

.sidebar::-webkit-scrollbar {
  width: 0;
  height: 0
}

.sidebar .nav-list {
  flex: 0 0 auto
}

.sidebar .sidebar-card {
  margin-top: auto;
  flex: 0 0 auto
}

body.sidebar-collapsed .sidebar {
  width: 0;
  padding-left: 0;
  padding-right: 0;
  border: 0
}

body.sidebar-collapsed .sidebar>* {
  opacity: 0;
  pointer-events: none
}

body.sidebar-collapsed .brand {
  width: 250px
}

body.sidebar-collapsed .content {
  min-width: 0
}

.content {
  overflow-x: hidden;
  overflow-y: visible
}

/* Larger, clearer typography across the application */
.page-title {
  font-size: 23px
}

.breadcrumbs {
  font-size: 16px
}

.nav-item {
  font-size: 15px
}

.nav-item i {
  font-size: 15px
}

.global-search input {
  font-size: 13px
}

.user-info strong {
  font-size: 13px
}

.user-info span {
  font-size: 11px
}

.btn-sm-custom {
  font-size: 13px
}

.form-control,
.form-select {
  font-size: 13px
}

.stat-value {
  font-size: 21px
}

.stat-label {
  font-size: 14px
}

.trend {
  font-size: 14px
}

.panel-title {
  font-size: 15px
}

.panel-title a {
  font-size: 12px
}

.table thead th {
  font-size: 14px
}

.table tbody td {
  font-size: 12px
}

.company-cell strong,
.person-cell strong {
  font-size: 14px
}

.company-cell small,
.person-cell small {
  font-size: 12px
}

.pill {
  font-size: 10px
}

.pagination-row {
  font-size: 11px
}

.detail-title h2 {
  font-size: 23px
}

.meta-line {
  font-size: 14px
}

.info-cell label,
.info-list label {
  font-size: 14px
}

.info-cell strong,
.info-list div {
  font-size: 14px
}

.detail-tabs a,
.tab-link {
  font-size: 11px
}

.timeline-item strong {
  font-size: 14px
}

.timeline-item small {
  font-size: 12px
}

.note {
  font-size: 14px
}

.proposal-summary {
  font-size: 11px
}

.scope li {
  font-size: 15px
}

/* Dashboard pipeline: match the reference with funnel + stage/count breakdown. */
.pipeline-overview {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(150px, 1.05fr);
  gap: 20px;
  align-items: center;
  min-height: 240px
}

.pipeline-funnel {
  display: flex;
  justify-content: center;
  align-items: center
}

.pipeline-funnel .funnel {
  width: 250px
}

.pipeline-stage-list {
  width: 100%;
  max-width: 250px;
  margin: auto
}

.pipeline-stage-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #edf0f3;
  font-size: 12px
}

.pipeline-stage-row:last-child {
  border-bottom: 0
}

.pipeline-stage-row .stage-name {
  color: #4f5a68
}

.pipeline-stage-row .stage-count {
  font-weight: 700;
  color: #273142
}

.pipeline-conversion {
  margin-top: 3px;
  padding: 9px 11px;
  border-radius: 7px;
  background: #eef6ff;
  color: #2463c6;
  font-size: 10px
}

.pipeline-conversion strong {
  float: right
}

/* Better stage/arrow treatment for opportunity + proposal details. */
.stagebar {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  grid-template-columns: none;
  overflow: visible;
  border-radius: 7px;
  margin-bottom: 15px
}

.stagebar .stage {
  height: 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.25;
  padding: 8px 18px 8px 16px;
  background: #eef3fb;
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 50%, calc(100% - 13px) 100%, 0 100%, 13px 50%);
  margin-right: -1px;
  border-radius: 0
}

.stagebar .stage:first-child {
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 50%, calc(100% - 13px) 100%, 0 100%);
  padding-left: 10px
}

.stagebar .stage:last-child {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 13px 50%);
  padding-right: 10px
}

.stagebar .stage.current,
.stagebar .stage.active {
  background: #1f9b47;
  color: #fff
}

.stagebar .stage small {
  font-size: 12px;
  font-weight: 500;
  margin-top: 3px;
  opacity: .9
}

body[data-page="proposals"] .stagebar {
  grid-auto-columns: 1fr
}

/* Seven opportunity KPI cards, like the supplied design. */
.stat-grid.seven {
  grid-template-columns: repeat(7, minmax(0, 1fr))
}

/* Hide scrollbars on horizontal UI while keeping touch/trackpad scrolling. */
.table-card,
.tabs,
.detail-tabs,
.stagebar {
  scrollbar-width: none
}

.table-card::-webkit-scrollbar,
.tabs::-webkit-scrollbar,
.detail-tabs::-webkit-scrollbar,
.stagebar::-webkit-scrollbar {
  height: 0;
  width: 0
}

.sidebar-overlay {
  display: none
}

@media(max-width:1400px) {
  .stat-grid.seven {
    grid-template-columns: repeat(4, minmax(0, 1fr))
  }
}

@media(max-width:1200px) {
  .pipeline-overview {
    grid-template-columns: 1fr 1.1fr
  }

  .stat-grid.seven {
    grid-template-columns: repeat(4, minmax(0, 1fr))
  }
}

@media(max-width:900px) {
  body {
    font-size: 13px
  }

  .topbar {
    height: 68px;
    padding: 0 12px;
    gap: 8px
  }

  .layout {
    min-height: calc(100vh - 68px)
  }

  .brand {
    width: auto;
    flex: 1
  }

  .brand img {
    width: 165px
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 68px;
    bottom: 0;
    height: calc(100vh - 68px);
    width: 270px;
    z-index: 1045;
    transform: translateX(-100%);
    box-shadow: 10px 0 28px rgba(15, 23, 42, .18)
  }

  .sidebar.show {
    transform: translateX(0)
  }

  .sidebar-overlay {
    position: fixed;
    inset: 68px 0 0;
    background: rgba(15, 23, 42, .38);
    z-index: 1040;
    display: block;
    opacity: 0;
    visibility: hidden;
    transition: .2s
  }

  .sidebar-overlay.show {
    opacity: 1;
    visibility: visible
  }

  body.mobile-sidebar-open {
    overflow: hidden
  }

  body.sidebar-collapsed .sidebar {
    width: 270px;
    padding: 12px 12px 14px;
    transform: translateX(-100%)
  }

  body.sidebar-collapsed .sidebar>* {
    opacity: 1;
    pointer-events: auto
  }

  .pipeline-overview {
    grid-template-columns: 1fr;
    gap: 12px
  }

  .pipeline-stage-list {
    max-width: 100%
  }

  .stat-grid.seven {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .stagebar {
    grid-auto-columns: 145px;
    overflow-x: auto
  }

  .stagebar .stage {
    height: 60px
  }

  .content {
    padding: 16px
  }
}

@media(max-width:600px) {
  .topbar {
    height: 64px
  }

  .brand img {
    width: 145px
  }

  .top-actions {
    gap: 9px
  }

  .top-icon {
    font-size: 16px
  }

  .avatar {
    width: 32px;
    height: 32px
  }

  .sidebar {
    top: 64px;
    height: calc(100vh - 64px)
  }

  .sidebar-overlay {
    inset: 64px 0 0
  }

  .content {
    padding: 12px 10px 20px
  }

  .page-title {
    font-size: 21px
  }

  .detail-title {
    align-items: flex-start
  }

  .detail-title h2 {
    font-size: 19px
  }

  .detail-top {
    align-items: flex-start;
    flex-direction: column
  }

  .detail-top .actions {
    width: 100%
  }

  .detail-top .actions>* {
    flex: 1
  }

  .pipeline-funnel .funnel {
    width: 165px
  }

  .pipeline-overview {
    padding-bottom: 2px
  }

  .stat-grid.seven {
    grid-template-columns: 1fr
  }

  .proposal-head {
    grid-template-columns: 1fr
  }

  .proposal-head .cell {
    border-right: 0;
    border-bottom: 1px solid #eef1f4
  }

  .proposal-head .cell:last-child {
    border-bottom: 0
  }

  .info-strip {
    grid-template-columns: 1fr
  }

  .info-cell {
    border-right: 0 !important
  }

  .actions {
    width: 100%
  }

  .actions>* {
    flex: 1;
    min-width: 0
  }

  .table-card {
    overflow-x: auto
  }

  .table {
    min-width: 920px
  }

  .dashboard-grid,
  .dashboard-grid.bottom {
    grid-template-columns: 1fr
  }

  .chart-wrap {
    overflow: hidden
  }

  .login-box h2 {
    font-size: 24px
  }
}




/* =========================================================
   COMPANIES PAGE - FILTER TOOLBAR
   Scoped only to .companies-toolbar
   ========================================================= */

.companies-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    flex-wrap: nowrap;
    margin-bottom: 10px;
}

/* Search box */
.companies-toolbar .search-field {
    position: relative;
    flex: 0 1 430px;
    width: 430px;
    min-width: 220px;
    max-width: 430px;
}

.companies-toolbar .search-field i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    color: #64748b;
    font-size: 14px;
    pointer-events: none;
}

.companies-toolbar .search-field input {
    width: 100%;
    height: 42px;
    padding-left: 40px;
    padding-right: 14px;
}

/* Dropdowns */
.companies-toolbar .filter-select {
    flex: 0 0 145px;
    width: 145px;
    min-width: 145px;
    height: 42px;
}

/* Filter button */
.companies-toolbar .btn {
    flex: 0 0 auto;
    height: 42px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Reset link */
.companies-toolbar .reset-link {
    flex: 0 0 auto;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}

.companies-toolbar .reset-link:hover {
    text-decoration: underline;
}


/* =========================================================
   LARGE DESKTOP
   ========================================================= */

@media (min-width: 1400px) {

    .companies-toolbar {
        gap: 14px;
    }

    .companies-toolbar .search-field {
        flex: 1 1 360px;
    }

    .companies-toolbar .filter-select {
        flex: 0 0 155px;
        width: 155px;
        min-width: 155px;
    }
}


/* =========================================================
   LAPTOP / SMALL DESKTOP
   ========================================================= */

@media (max-width: 1200px) {

    .companies-toolbar {
        flex-wrap: wrap;
    }

    .companies-toolbar .search-field {
        flex: 1 1 100%;
        min-width: 100%;
        width: 100%;
    }

    .companies-toolbar .filter-select {
        flex: 1 1 calc(25% - 12px);
        width: auto;
        min-width: 140px;
    }

    .companies-toolbar .btn {
        flex: 0 0 auto;
    }

    .companies-toolbar .reset-link {
        flex: 0 0 auto;
    }
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 992px) {

    .companies-toolbar {
        gap: 10px;
    }

    .companies-toolbar .filter-select {
        flex: 1 1 calc(50% - 10px);
        width: calc(50% - 10px);
        min-width: 0;
    }

    .companies-toolbar .btn {
        min-width: 110px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .companies-toolbar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
    }

    .companies-toolbar .search-field {
        width: 100%;
        min-width: 100%;
        flex: none;
    }

    .companies-toolbar .filter-select {
        width: 100%;
        min-width: 100%;
        flex: none;
    }

    .companies-toolbar .btn {
        width: 100%;
        flex: none;
    }

    .companies-toolbar .reset-link {
        align-self: flex-end;
        flex: none;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .companies-toolbar {
        gap: 8px;
    }

    .companies-toolbar .search-field input,
    .companies-toolbar .filter-select,
    .companies-toolbar .btn {
        height: 40px;
        font-size: 13px;
    }

    .companies-toolbar .search-field i {
        left: 12px;
        font-size: 13px;
    }

    .companies-toolbar .search-field input {
        padding-left: 36px;
    }
}
/* =========================================================
   FINAL SIDEBAR STABILITY PATCH
   The sidebar is fixed to the viewport on desktop so its
   vertical position never changes when page content changes.
   On mobile it remains an off-canvas panel.
   ========================================================= */
@media (min-width: 901px) {
  .layout {
    display: block;
    min-height: calc(100vh - 74px);
  }

  .sidebar {
    position: fixed !important;
    left: 0;
    top: 74px;
    bottom: 0;
    width: 250px;
    height: calc(100vh - 74px) !important;
    z-index: 1035;
    overflow: hidden !important;
    padding: 12px 12px 14px;
    box-sizing: border-box;
    transform: translateX(0) !important;
  }

  .sidebar-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;    
    -ms-overflow-style: none;
  }

  .sidebar-card {
    margin-top: 10px !important;
  }

  .content {
    margin-left: 250px;
    width: calc(100% - 250px);
    max-width: none;
    box-sizing: border-box;
  }

  body.sidebar-collapsed .sidebar {
    width: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    transform: translateX(0) !important;
  }

  body.sidebar-collapsed .content {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 900px) {
  .layout {
    display: block;
    min-height: calc(100vh - 68px);
  }

  .sidebar {
    position: fixed !important;
    left: 0;
    top: 68px;
    bottom: 0;
    width: 270px;
    height: calc(100vh - 68px) !important;
    z-index: 1045;
    overflow: hidden !important;
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0) !important;
  }

  .sidebar-scroll {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar-card {
    margin-top: 10px !important;
  }

  .content,
  body.sidebar-collapsed .content {
    margin-left: 0;
    width: 100%;
  }
}
