:root {
  --navy-950: #021731;
  --navy-900: #05224b;
  --navy-800: #06366f;
  --blue-600: #0457f7;
  --blue-500: #0969ff;
  --cyan-400: #16d5ff;
  --green-500: #18b66b;
  --orange-500: #ff8a00;
  --red-500: #ef3340;
  --purple-500: #7c3aed;
  --ink: #07173d;
  --muted: #64708f;
  --line: #dce5f2;
  --soft-line: #edf2f8;
  --canvas: #f7faff;
  --panel: #ffffff;
  --shadow: 0 12px 28px rgba(14, 32, 75, .06);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
}
a { color: var(--blue-600); text-decoration: none; }
.btn { border-radius: 6px; font-weight: 700; min-height: 38px; padding-inline: 18px; }
.btn-sm { min-height: 32px; }
.btn-primary {
  background: linear-gradient(180deg, #086bff 0%, #034dea 100%);
  border-color: #0457f7;
  box-shadow: 0 8px 16px rgba(4, 87, 247, .18);
}
.btn-outline-primary { border-color: #c7d8f5; color: #0755db; background: #fff; }
.form-control, .form-select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 1px 1px rgba(11, 31, 58, .02);
}
.form-control:focus, .form-select:focus {
  border-color: #78aaff;
  box-shadow: 0 0 0 3px rgba(9, 105, 255, .12);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 18px 18px;
  color: #fff;
  background:
    radial-gradient(circle at 95% 82%, rgba(9, 105, 255, .45), transparent 28%),
    linear-gradient(180deg, #02152f 0%, #041d42 48%, #032252 100%);
  border-right: 1px solid rgba(255,255,255,.08);
}
.brand, .login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -2px;
  background: linear-gradient(135deg, #0be0ff 0%, #075cf3 54%, #021c52 100%);
  border-radius: 3px;
  box-shadow: inset 10px 0 0 rgba(255,255,255,.18);
}
.brand-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255,255,255,.98);
  padding: 4px;
  flex: 0 0 auto;
}
.brand-logo-only {
  justify-content: flex-start;
  gap: 0;
}
.brand-logo-sidebar {
  width: 100%;
  max-width: 210px;
  height: 64px;
  padding: 4px;
}
.brand-logo-login {
  width: 58px;
  height: 58px;
  padding: 6px;
}
.brand strong, .login-brand strong {
  color: #16d5ff;
  font-size: 18px;
  line-height: 1;
  letter-spacing: .5px;
  white-space: nowrap;
}
.brand small, .login-brand small {
  display: block;
  color: #fff;
  font-size: 9px;
  letter-spacing: 4px;
  margin-top: 4px;
}
.sidebar nav {
  display: grid;
  gap: 4px;
  padding-top: 18px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 10px 14px;
  color: #f2f7ff;
  border-radius: 6px;
  font-weight: 650;
}
.sidebar nav a span { white-space: nowrap; }
.sidebar nav i { font-size: 17px; width: 22px; min-width: 22px; color: #f2f7ff; }
.sidebar nav a:hover, .sidebar nav a.active {
  color: #fff;
  background: linear-gradient(180deg, #0969ff 0%, #0457f7 100%);
  box-shadow: 0 8px 18px rgba(9, 105, 255, .24);
}
.help-card {
  margin-top: 74px;
  padding: 16px 12px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(8, 47, 101, .55);
}
.help-card strong { display: block; font-size: 14px; margin-bottom: 8px; }
.help-card p { margin: 0 0 12px; color: #e0ebff; font-size: 11px; line-height: 1.55; }
.help-card .btn { width: 100%; box-shadow: none; }
.sidebar-foot { margin-top: 24px; color: #d8e7ff; font-size: 10px; line-height: 1.6; }

main { min-width: 0; }
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 26px;
  background: #fff;
  border-bottom: 1px solid var(--soft-line);
  min-width: 0;
}
.icon-btn, .top-icon {
  position: relative;
  border: 0;
  background: transparent;
  color: #22345d;
  display: grid;
  place-items: center;
}
.icon-btn { width: 36px; height: 36px; font-size: 22px; }
.top-icon { width: 32px; height: 32px; font-size: 18px; }
.top-icon span {
  position: absolute;
  top: 0;
  right: 0;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: var(--blue-600);
  color: #fff;
  font-size: 9px;
  line-height: 15px;
  text-align: center;
}
.top-icon:first-of-type span { background: var(--red-500); }
.global-search {
  position: relative;
  width: min(330px, 35vw);
  min-width: 220px;
}
.global-search input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 42px 0 18px;
  color: var(--ink);
  font-weight: 650;
  outline: none;
}
.global-search i {
  position: absolute;
  right: 14px;
  top: 9px;
  color: #59688c;
}
.topbar-spacer { flex: 1; }
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  max-width: 260px;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #8ec5ff, #0d56d9);
  font-weight: 800;
}
.user-chip strong { display: grid; font-size: 13px; line-height: 1.15; min-width: 0; }
.user-chip strong,
.user-chip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-chip small { color: var(--muted); font-weight: 500; margin-top: 3px; }

.content { padding: 18px 18px 28px; }
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}
.page-heading h1 {
  margin: 0 0 4px;
  font-size: 25px;
  font-weight: 850;
  letter-spacing: -.2px;
}
.page-heading p { margin: 0; color: #4e5f83; font-weight: 600; }
.page-heading p span { color: #a1acc3; padding: 0 8px; }
.quick-create { min-width: 160px; }

.panel, .metric, .auth-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: var(--shadow);
}
.panel { padding: 18px; }
.panel h2 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 850;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.metric {
  min-height: 94px;
  padding: 18px 18px 16px 76px;
  position: relative;
}
.metric::before {
  content: "\F4CF";
  font-family: "bootstrap-icons";
  position: absolute;
  left: 18px;
  top: 22px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--blue-600);
  background: #eaf2ff;
  font-size: 21px;
}
.metric:nth-child(2n)::before { content: "\F26A"; color: var(--green-500); background: #e9f8f0; }
.metric:nth-child(3n)::before { content: "\F3F3"; color: var(--purple-500); background: #f0eaff; }
.metric:nth-child(4n)::before { content: "\F633"; color: var(--orange-500); background: #fff4e5; }
.metric:nth-child(5n)::before { content: "\F623"; color: var(--red-500); background: #ffecee; }
.metric span {
  display: block;
  color: #27385f;
  font-size: 12px;
  font-weight: 750;
}
.metric strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 27px;
  line-height: 1;
  font-weight: 900;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.dash-kpi {
  min-height: 92px;
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(28, 50, 91, .06);
}
.kpi-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 22px;
}
.dash-kpi span {
  display: block;
  color: #1d2f58;
  font-size: 11px;
  font-weight: 850;
}
.dash-kpi strong {
  display: block;
  margin-top: 2px;
  color: #091b46;
  font-size: 27px;
  line-height: 1;
  font-weight: 900;
}
.dash-kpi small {
  display: block;
  margin-top: 7px;
  color: #6b7894;
  font-size: 11px;
  font-weight: 800;
}
.tone-blue .kpi-icon { color: #0d6efd; background: #eaf2ff; }
.tone-green .kpi-icon { color: #19b96b; background: #eaf8ef; }
.tone-purple .kpi-icon { color: #7c4dff; background: #f1ecff; }
.tone-orange .kpi-icon { color: #ff8a00; background: #fff3df; }
.tone-red .kpi-icon { color: #ef3e4a; background: #ffecee; }
.kpi-icon.blue { color: #0d6efd; background: #eaf2ff; }
.kpi-icon.green { color: #19b96b; background: #eaf8ef; }
.kpi-icon.purple { color: #7c4dff; background: #f1ecff; }
.kpi-icon.orange, .kpi-icon.yellow { color: #ff8a00; background: #fff3df; }
.kpi-icon.red { color: #ef3e4a; background: #ffecee; }
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(380px, 1.45fr) minmax(320px, 1fr) minmax(280px, .82fr);
  gap: 18px;
  margin-bottom: 18px;
}
.dashboard-bottom {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(280px, .85fr) minmax(360px, 1fr);
  gap: 18px;
}
.dashboard-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(28, 50, 91, .06);
  padding: 17px 18px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.dashboard-card h2, .card-head h2 {
  margin: 0;
  color: #0a1e4b;
  font-size: 15px;
  font-weight: 900;
}
.card-head a, .view-all-link {
  color: #0d6efd;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}
.mini-select {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #20345f;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 0 10px;
}
.sales-chart {
  position: relative;
  min-height: 232px;
}
.sales-chart svg {
  width: 100%;
  height: 220px;
  display: block;
}
.grid-lines line {
  stroke: #e8edf7;
  stroke-width: 1;
}
.chart-line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart-line.invoices { stroke: #0d6efd; }
.chart-line.payments { stroke: #19b96b; }
.chart-dots circle {
  fill: #fff;
  stroke: #0d6efd;
  stroke-width: 3;
}
.chart-legend {
  position: absolute;
  left: 28px;
  top: 0;
  display: flex;
  gap: 18px;
  color: #4e5f83;
  font-size: 11px;
  font-weight: 800;
}
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i, .dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 999px;
}
.legend-blue, .dot.blue { background: #0d6efd; }
.legend-green, .dot.green { background: #19b96b; }
.dot.orange { background: #ff8a00; }
.dot.red { background: #ef3e4a; }
.dot.purple { background: #7c4dff; }
.sales-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding-top: 15px;
}
.sales-summary div {
  padding: 0 15px;
  border-right: 1px solid var(--line);
}
.sales-summary div:first-child { padding-left: 0; }
.sales-summary div:last-child { border-right: 0; padding-right: 0; }
.sales-summary span, .sales-summary small {
  display: block;
  font-size: 11px;
  font-weight: 850;
}
.sales-summary span { color: #6b7894; }
.sales-summary strong {
  display: block;
  margin: 4px 0;
  color: #0a1e4b;
  font-size: 18px;
  font-weight: 900;
}
.positive { color: #19b96b; }
.negative { color: #ef3e4a; }
.document-list, .activity-feed {
  display: grid;
  gap: 11px;
}
.doc-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 11px;
}
.doc-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #0d6efd;
  background: #eaf2ff;
}
.doc-row strong, .activity-item strong {
  display: block;
  color: #0a1e4b;
  font-size: 12px;
  font-weight: 900;
}
.doc-row small, .activity-item small {
  display: block;
  color: #657492;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}
.doc-row time {
  color: #657492;
  font-size: 11px;
  font-weight: 800;
}
.view-all-link {
  display: block;
  margin-top: 16px;
  text-align: center;
}
.activity-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 11px;
  align-items: start;
}
.activity-item > i {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #0d6efd;
  background: #eaf2ff;
}
.activity-item.tone-green > i { color: #19b96b; background: #eaf8ef; }
.activity-item.tone-orange > i { color: #ff8a00; background: #fff3df; }
.activity-item.tone-purple > i { color: #7c4dff; background: #f1ecff; }
.status-wrap {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 12px;
}
.donut {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: conic-gradient(var(--segments));
  position: relative;
}
.donut::after {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: inherit;
  background: #fff;
}
.donut span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #6b7894;
  font-size: 11px;
  font-weight: 850;
}
.donut strong {
  color: #0a1e4b;
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
}
.status-legend {
  display: grid;
  gap: 9px;
}
.status-legend div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #2b3d66;
  font-size: 12px;
  font-weight: 800;
}
.status-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.top-customers h2 span {
  color: #6b7894;
  font-size: 11px;
  font-weight: 800;
}
.customer-rank {
  display: grid;
  gap: 12px;
}
.customer-row {
  display: grid;
  grid-template-columns: 20px minmax(140px, 1fr) minmax(120px, 1.1fr) 98px;
  gap: 12px;
  align-items: center;
  color: #0a1e4b;
  font-size: 12px;
  font-weight: 850;
}
.customer-row div {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf7;
}
.customer-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0d6efd;
}
.customer-row em {
  color: #20345f;
  font-style: normal;
  text-align: right;
}
.empty-state.compact {
  padding: 24px 12px;
  color: #6b7894;
  font-size: 12px;
}

.customer-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 330px);
  gap: 18px;
  align-items: start;
}
.customer-page > * {
  min-width: 0;
}
.customer-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.customer-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: -58px;
  min-height: 42px;
}
.customer-actions .btn {
  white-space: nowrap;
}
.customer-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}
.vendor-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(145px, 1fr));
  gap: 14px;
}
.vendor-kpis .dash-kpi {
  min-height: 82px;
  grid-template-columns: 50px 1fr;
  padding: 14px;
}
.vendor-kpis .dash-kpi strong {
  font-size: 21px;
}
.vendor-kpis .dash-kpi small:empty {
  display: none;
}
.product-kpis .dash-kpi:last-child strong {
  font-size: 17px;
}
.customer-table-card, .customer-side {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(28, 50, 91, .06);
}
.customer-table-card {
  overflow: hidden;
}
.customer-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 130px 150px 160px auto;
  gap: 12px;
  align-items: end;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}
.customer-filters.vendor-filters {
  grid-template-columns: minmax(260px, 1fr) 120px 140px 140px auto auto;
}
.customer-filters.product-filters {
  grid-template-columns: minmax(280px, 1fr) 120px 140px 120px auto auto;
}
.filter-search {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.filter-search i {
  color: #6f7f9d;
}
.filter-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #102552;
  font-weight: 700;
}
.customer-filters label {
  gap: 4px;
  color: #6b7894;
  font-size: 10px;
}
.customer-filters select {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #20345f;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 0 10px;
}
.customer-table-wrap {
  overflow-x: auto;
}
.customer-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 850px;
}
.customer-table th {
  padding: 12px 12px;
  color: #1c2e58;
  background: #f7faff;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.customer-table td {
  padding: 11px 12px;
  color: #24375f;
  border-bottom: 1px solid #edf2fb;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.customer-table td a {
  color: #0d6efd;
  font-weight: 900;
  text-decoration: none;
}
.customer-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0a1e4b;
  font-weight: 900;
}
.customer-name i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #0d6efd;
  background: #eef4ff;
  font-size: 9px;
  font-style: normal;
}
.product-table {
  min-width: 930px;
}
.product-name {
  display: grid;
  grid-template-columns: 36px minmax(160px, 1fr);
  gap: 10px;
  align-items: center;
}
.product-name i {
  width: 34px;
  height: 28px;
  display: grid;
  place-items: center;
  grid-row: 1 / 3;
  border-radius: 5px;
  color: #0d6efd;
  background: #eef4ff;
  font-size: 18px;
}
.product-name strong {
  display: block;
  color: #0a1e4b;
  font-size: 12px;
  font-weight: 900;
}
.product-name small {
  display: block;
  color: #657492;
  font-size: 10px;
  font-weight: 750;
}
.customer-row-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #203b6e;
}
.customer-row-actions a {
  color: #203b6e !important;
}
.customer-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  color: #637391;
  font-size: 12px;
  font-weight: 800;
}
.customer-pagination div {
  display: flex;
  gap: 6px;
}
.page-btn {
  min-width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #20345f;
  background: #fff;
  font-size: 12px;
  font-weight: 850;
}
.page-btn.active {
  color: #fff;
  background: #0d6efd;
  border-color: #0d6efd;
}
.customer-side {
  position: sticky;
  top: 16px;
  padding: 18px;
  min-width: 0;
}
.customer-profile-head {
  display: grid;
  grid-template-columns: 62px 1fr 22px;
  gap: 12px;
  align-items: start;
  margin: 12px 0 14px;
}
.profile-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #0d6efd;
  background: #eaf2ff;
  font-size: 22px;
  font-weight: 900;
}
.customer-profile-head h3 {
  margin: 2px 0 5px;
  color: #0a1e4b;
  font-size: 18px;
  font-weight: 900;
  overflow-wrap: anywhere;
}
.customer-profile-head small {
  display: block;
  margin-top: 8px;
  color: #62718e;
  font-size: 11px;
  font-weight: 800;
}
.customer-profile-head b {
  margin-left: 8px;
  color: #0d6efd;
}
.favorite {
  color: #ff9f1a;
  font-size: 18px;
}
.profile-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  margin-bottom: 16px;
}
.vendor-side .profile-tabs {
  grid-template-columns: repeat(4, 1fr);
}
.vendor-side .profile-avatar i {
  font-size: 26px;
}
.vendor-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 14px;
}
.vendor-contact-box {
  display: grid;
  gap: 10px;
}
.vendor-contact-box div {
  display: grid;
  grid-template-columns: 1fr 22px;
  gap: 3px 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.vendor-contact-box span {
  color: #6b7894;
  font-size: 10px;
  font-weight: 850;
}
.vendor-contact-box strong {
  color: #132958;
  font-size: 11px;
  font-weight: 900;
}
.vendor-contact-box i {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  color: #6b7894;
}
.vendor-note {
  padding: 12px;
  color: #30446d;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.55;
  font-weight: 750;
}
.product-side .profile-tabs {
  grid-template-columns: repeat(5, 1fr);
}
.product-detail-head {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
  margin: 10px 0 16px;
}
.product-thumb {
  width: 84px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #1b315f;
  background: linear-gradient(180deg, #f6f8fc, #dfe6f2);
  border: 1px solid #d5dfef;
  font-size: 30px;
}
.product-detail-head h3 {
  margin: 0 0 5px;
  color: #0a1e4b;
  font-size: 17px;
  font-weight: 900;
}
.product-detail-head small {
  display: block;
  color: #657492;
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 6px;
}
.product-side-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.profile-tabs button {
  height: 34px;
  border: 0;
  border-radius: 6px;
  color: #30446d;
  background: transparent;
  font-size: 10px;
  font-weight: 900;
}
.profile-tabs button.active {
  color: #fff;
  background: #0d6efd;
}
.customer-info {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.detail-line {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 10px;
  margin-bottom: 10px;
  color: #2c3f68;
  font-size: 11px;
  line-height: 1.4;
}
.detail-line span {
  color: #687896;
  font-weight: 850;
}
.detail-line strong {
  color: #132958;
  font-weight: 850;
  min-width: 0;
  overflow-wrap: anywhere;
}
.side-section-title {
  margin: 18px 0 12px;
  color: #0a1e4b;
  font-size: 14px;
  font-weight: 900;
}
.customer-activity-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.activity-stat {
  min-height: 86px;
  display: grid;
  place-items: center;
  padding: 10px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
}
.activity-stat i {
  font-size: 18px;
}
.activity-stat strong {
  color: #0a1e4b;
  font-size: 18px;
  font-weight: 900;
}
.activity-stat span {
  color: #657492;
  font-size: 9px;
  font-weight: 850;
}
.activity-stat.tone-blue i { color: #0d6efd; }
.activity-stat.tone-green i { color: #19b96b; }
.activity-stat.tone-orange i { color: #ff8a00; }
.activity-stat.tone-red i { color: #ef3e4a; }
.side-transactions {
  display: grid;
  gap: 12px;
}
.side-transactions div {
  display: grid;
  grid-template-columns: 30px 1fr auto auto;
  align-items: center;
  gap: 9px;
}
.side-transactions i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #0d6efd;
  background: #eaf2ff;
}
.side-transactions strong {
  display: block;
  color: #0a1e4b;
  font-size: 11px;
  font-weight: 900;
}
.side-transactions small {
  color: #657492;
  font-size: 10px;
  font-weight: 800;
}
.side-transactions em {
  color: #132958;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}
.customer-bottom {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
  gap: 16px;
}
.customer-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: -58px;
  margin-bottom: 16px;
}
.customer-form-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  align-items: start;
}
.vendor-form-page {
  grid-template-columns: minmax(0, 1fr) 300px;
}
.vendor-form-side .overview-icon {
  color: #0d6efd;
  background: #eaf2ff;
}
.product-form-side .overview-icon {
  color: #7c4dff;
  background: #f1ecff;
}
.customer-form-card, .customer-form-side {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(28, 50, 91, .06);
}
.customer-form-card {
  overflow: hidden;
}
.form-steps {
  display: flex;
  gap: 26px;
  align-items: center;
  min-height: 54px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}
.form-steps span, .form-steps a {
  height: 54px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #6a7896;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}
.form-steps span.active, .form-steps a.active {
  color: #0d6efd;
  border-bottom-color: #0d6efd;
}
.form-steps span.done, .form-steps a.done {
  color: #2aae72;
}
.form-steps span > i, .form-steps a > i {
  width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #b7c2d8;
  font-size: 11px;
  font-style: normal;
}
.form-steps span.active > i, .form-steps a.active > i {
  background: #0d6efd;
}
.form-steps span.done > i, .form-steps a.done > i {
  background: #2aae72;
}
.form-steps.secondary {
  margin: 6px -18px 12px;
}
.customer-form-card section {
  padding: 16px 18px 2px;
}
.customer-form-card h2 {
  margin: 0 0 14px;
  color: #0a1e4b;
  font-size: 15px;
  font-weight: 900;
}
.customer-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px 18px;
}
.customer-form-grid .span-2 {
  grid-column: span 2;
}
.customer-form-grid label {
  gap: 7px;
  color: #1d2f58;
  font-size: 11px;
  font-weight: 900;
}
.customer-form-grid b {
  color: #ef3e4a;
}
.customer-form-grid .form-control, .customer-form-grid .form-select {
  min-height: 40px;
  border: 1px solid #d6e0f1;
  border-radius: 6px;
  color: #172d5c;
  font-size: 12px;
  font-weight: 750;
}
.field-icon {
  position: relative;
  display: block;
}
.field-icon i {
  position: absolute;
  left: 12px;
  top: 50%;
  color: #617390;
  transform: translateY(-50%);
}
.field-icon .form-control {
  padding-left: 36px;
}
.currency-field {
  display: grid;
  grid-template-columns: 58px 1fr;
}
.currency-field span {
  display: grid;
  place-items: center;
  min-height: 40px;
  color: #1d2f58;
  background: #f3f7ff;
  border: 1px solid #d6e0f1;
  border-right: 0;
  border-radius: 6px 0 0 6px;
  font-size: 12px;
  font-weight: 900;
}
.currency-field .form-control {
  border-radius: 0 6px 6px 0;
}
.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  min-height: 40px;
  align-items: center;
}
.check-row span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: #263a65;
  font-size: 12px;
  font-weight: 800;
}
.customer-form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px;
}
.customer-form-side {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 12px;
  padding: 18px;
}
.customer-form-side section {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.customer-form-side h2 {
  margin: 0 0 16px;
  color: #0a1e4b;
  font-size: 15px;
  font-weight: 900;
}
.overview-icon {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  margin: 18px auto 14px;
  border-radius: 999px;
  color: #0d6efd;
  background: #eaf2ff;
  font-size: 48px;
}
.customer-form-side strong {
  display: block;
  color: #0a1e4b;
  text-align: center;
  font-weight: 900;
}
.customer-form-side p {
  color: #30446d;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
  font-weight: 750;
}
.customer-form-side ul {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.customer-form-side li {
  display: flex;
  gap: 10px;
  color: #233961;
  font-size: 12px;
  font-weight: 850;
}
.customer-form-side li i {
  color: #2aae72;
}
.customer-form-side li.current-step i {
  color: #0d6efd;
}
.customer-form-side li.sub {
  margin-left: 28px;
  color: #52617c;
  font-size: 11px;
}
.why-box {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
  color: #0d6efd;
  background: #eef5ff;
}
.why-box strong, .why-box p {
  text-align: left;
}
.why-box p {
  margin: 4px 0 0;
  color: #30446d;
  font-size: 11px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.toolbar .search { width: min(360px, 100%); }
.toolbar .search .form-control {
  padding-left: 16px;
  height: 40px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px 20px;
}
.form-label, form label {
  display: grid;
  gap: 8px;
  color: #1d2f58;
  font-size: 12px;
  font-weight: 800;
}
textarea.form-control { min-height: 88px; resize: vertical; }
.form-actions, .doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  align-items: center;
  justify-content: flex-end;
}
.doc-actions { justify-content: flex-start; margin-bottom: 14px; }
.import-panel {
  max-width: 760px;
}
.import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.info-strip {
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px solid #cfe0ff;
  border-radius: 7px;
  background: #f0f6ff;
  color: #1e56ad;
  font-weight: 650;
}

.table-responsive {
  border: 1px solid var(--soft-line);
  border-radius: 7px;
  background: #fff;
}
.table {
  margin: 0;
  color: #263759;
  --bs-table-bg: #fff;
}
.table thead th {
  height: 50px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--soft-line);
  background: #fbfcff;
  color: #25365d;
  font-size: 12px;
  font-weight: 850;
}
.table tbody td {
  height: 52px;
  padding: 12px 14px;
  border-color: var(--soft-line);
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}
.badge {
  min-width: 62px;
  padding: 6px 9px;
  border-radius: 5px;
  font-weight: 800;
}
.text-bg-success { color: #0b8e53 !important; background: #dff7ea !important; }
.text-bg-primary { color: #0755db !important; background: #e6f0ff !important; }
.text-bg-warning { color: #b96700 !important; background: #fff1da !important; }
.text-bg-danger { color: #e21f32 !important; background: #ffe2e6 !important; }
.text-bg-secondary { color: #64708f !important; background: #edf1f7 !important; }
.text-bg-info { color: #5f35c8 !important; background: #efe9ff !important; }

.totals-box {
  width: min(380px, 100%);
  margin: 16px 0 0 auto;
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--soft-line);
  border-radius: 7px;
  background: #fbfdff;
}
.totals-box div {
  display: flex;
  justify-content: space-between;
  color: #334467;
  font-weight: 700;
}
.totals-box .grand {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 18px;
}
.totals-box .grand strong { color: var(--blue-600); font-size: 22px; }
.detail-grid {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 10px 18px;
}
.detail-grid dt { color: var(--muted); font-weight: 750; }
.detail-grid dd { margin: 0; font-weight: 650; }
.empty-state {
  padding: 34px;
  text-align: center;
  color: var(--muted);
  font-weight: 650;
}
.setup-error {
  max-width: 760px;
  margin: 24px auto;
}
.setup-error h2 {
  margin-top: 10px;
  font-size: 22px;
}
.setup-error ul {
  margin: 14px 0 18px;
  color: #27385f;
  font-weight: 650;
}
.setup-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--red-500);
  background: #ffecee;
  font-size: 28px;
}
.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
}
.settings-main {
  display: grid;
  gap: 14px;
}
.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: var(--shadow);
}
.settings-tabs button, .settings-tabs a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #263759;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.settings-tabs button.active, .settings-tabs a.active {
  color: var(--blue-600);
  border-bottom-color: var(--blue-600);
}
.settings-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: var(--shadow);
  padding: 18px;
}
.settings-card h2 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 900;
}
.settings-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.company-profile-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
}
.logo-upload {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 10px;
  padding-top: 8px;
}
.company-logo-preview {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--navy-950);
}
.company-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  padding: 8px;
}
.company-logo-preview .brand-mark {
  width: 52px;
  height: 52px;
  font-size: 34px;
}
.logo-upload-btn {
  cursor: pointer;
}
.logo-upload small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}
.settings-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 14px 16px;
}
.settings-fields.three {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}
.settings-fields.social {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}
.settings-fields .span-2 {
  grid-column: span 2;
}
.settings-side {
  display: grid;
  align-content: start;
  gap: 14px;
}
.summary-item {
  display: grid;
  grid-template-columns: 20px 90px 1fr;
  gap: 10px;
  align-items: start;
  padding: 9px 0;
  border-bottom: 1px solid var(--soft-line);
}
.summary-item:last-child {
  border-bottom: 0;
}
.summary-item i {
  color: var(--blue-600);
}
.summary-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.summary-item strong {
  font-size: 11px;
  line-height: 1.45;
  text-align: right;
}
.quick-link {
  display: grid;
  grid-template-columns: 24px 1fr 14px;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--soft-line);
}
.quick-link:last-child {
  border-bottom: 0;
}
.quick-link > i:first-child {
  color: var(--blue-600);
  font-size: 18px;
}
.quick-link strong {
  display: block;
  color: var(--blue-600);
  font-size: 12px;
}
.quick-link small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}
.email-settings-page {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}
.email-settings-nav, .email-config-card, .email-side-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(28, 50, 91, .06);
}
.email-settings-nav {
  display: grid;
  overflow: hidden;
}
.email-settings-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  color: #263759;
  border-bottom: 1px solid var(--soft-line);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}
.email-settings-nav a.active {
  color: #0d6efd;
  background: #f0f6ff;
  border-left: 3px solid #0d6efd;
}
.email-config-card {
  padding: 22px;
}
.email-settings-panel {
  display: none;
}
.email-settings-panel.active {
  display: block;
}
.email-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.template-list {
  display: grid;
  gap: 12px;
}
.template-list div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfdff;
}
.template-list strong {
  display: block;
  color: var(--ink);
  font-weight: 900;
}
.template-list small {
  display: block;
  margin-top: 4px;
  color: #52617f;
  font-weight: 650;
}
.email-card-head h2, .email-side-card h2 {
  margin: 0 0 6px;
  color: #0a1e4b;
  font-size: 16px;
  font-weight: 900;
}
.email-card-head p, .email-side-card p {
  margin: 0;
  color: #6b7894;
  font-size: 12px;
  font-weight: 700;
}
.connection-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  color: #128a4d;
  background: #e9f8ef;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
}
.connection-badge i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #19b96b;
}
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.toggle-row span {
  display: grid;
  gap: 4px;
}
.toggle-row strong {
  color: #102552;
  font-size: 13px;
  font-weight: 900;
}
.toggle-row small, .email-label small {
  color: #6b7894;
  font-size: 11px;
  font-weight: 700;
}
.toggle-row input {
  display: none;
}
.toggle-row > i {
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #c9d4e8;
  position: relative;
}
.toggle-row > i::after {
  content: "";
  width: 18px;
  height: 18px;
  position: absolute;
  left: 2px;
  top: 2px;
  border-radius: 999px;
  background: #fff;
  transition: transform .18s ease;
}
.toggle-row input:checked + i {
  background: #0d6efd;
}
.toggle-row input:checked + i::after {
  transform: translateX(16px);
}
.email-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 16px 18px;
}
.email-label {
  display: grid;
  gap: 8px;
  color: #172d5c;
  font-size: 12px;
  font-weight: 900;
}
.email-label.span-2 {
  margin-top: 16px;
}
.email-label .form-control, .email-label .form-select, .advanced-email .form-control {
  min-height: 42px;
  border: 1px solid #d6e0f1;
  border-radius: 6px;
  color: #172d5c;
  font-size: 12px;
  font-weight: 750;
}
.advanced-email {
  margin-top: 18px;
  border: 1px solid #d6e0f1;
  border-radius: 7px;
  padding: 0 14px;
}
.advanced-email summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #172d5c;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.email-form-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}
.email-settings-side {
  display: grid;
  gap: 16px;
}
.email-side-card {
  padding: 18px;
}
.provider-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}
.provider-item i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #0d6efd;
  background: #eef5ff;
  font-size: 18px;
}
.provider-item strong, .provider-item small {
  display: block;
}
.provider-item strong {
  color: #0a1e4b;
  font-size: 12px;
  font-weight: 900;
}
.provider-item small {
  color: #657492;
  font-size: 11px;
  font-weight: 750;
}
.email-preview {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #1b315f;
}
.email-preview div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 11px;
}
.email-preview span {
  color: #6b7894;
  font-weight: 850;
}
.email-preview strong {
  font-weight: 850;
}
.email-preview p {
  margin: 12px 0;
  color: #1b315f;
  font-size: 12px;
  line-height: 1.55;
}
.email-preview a {
  color: #0d6efd;
  display: block;
  text-align: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}
.quick-tips h2 {
  display: flex;
  gap: 8px;
  align-items: center;
}
.quick-tips h2 i {
  color: #0d6efd;
}
.quick-tips ul {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}
.quick-tips li {
  display: flex;
  gap: 9px;
  color: #263759;
  font-size: 12px;
  font-weight: 750;
}
.quick-tips li::before {
  content: "\F26A";
  font-family: "bootstrap-icons";
  color: #19b96b;
}
.item-table input, .item-table select { min-width: 102px; }
.item-table .desc { min-width: 260px; }

.auth-bg {
  min-height: 100vh;
  background: #fff;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 58px 64px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(2, 18, 44, .35), rgba(2, 18, 44, .95)),
    radial-gradient(circle at 68% 45%, rgba(9, 105, 255, .5), transparent 22%),
    linear-gradient(135deg, #03142e 0%, #052555 55%, #010b1e 100%);
}
.login-hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -14% -8%;
  height: 42%;
  background:
    linear-gradient(120deg, transparent 0 18%, rgba(22, 213, 255, .26) 18% 19%, transparent 19% 38%, rgba(9, 105, 255, .3) 38% 39%, transparent 39%),
    radial-gradient(circle, rgba(22,213,255,.38) 0 2px, transparent 3px);
  background-size: 220px 140px, 110px 72px;
  opacity: .75;
}
.login-brand {
  position: relative;
  z-index: 1;
  border-bottom: 0;
  margin-bottom: 82px;
}
.login-hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(34px, 4vw, 42px);
  line-height: 1.28;
  font-weight: 900;
}
.login-hero h1 span { color: #1892ff; }
.login-hero p {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  margin: 36px 0 0;
  color: #eef6ff;
  font-size: 17px;
  line-height: 1.75;
}
.hero-features {
  position: absolute;
  z-index: 1;
  left: 58px;
  right: 58px;
  bottom: 86px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 26px;
}
.hero-features div {
  min-height: 88px;
  padding: 0 24px;
  border-right: 1px solid rgba(255,255,255,.14);
}
.hero-features div:last-child { border-right: 0; }
.hero-features i { display: block; color: #1592ff; font-size: 36px; margin-bottom: 12px; }
.hero-features span { font-weight: 750; line-height: 1.35; }
.login-form-wrap {
  display: grid;
  place-items: center;
  padding: 42px;
  background:
    radial-gradient(circle at 92% 7%, rgba(9, 105, 255, .08) 0 1px, transparent 2px) 0 0 / 18px 18px,
    #fbfdff;
}
.auth-card {
  width: min(550px, 100%);
  padding: 54px 44px 30px;
}
.auth-card.wide { width: min(980px, 100%); }
.installer-card {
  align-self: center;
  margin: 0 auto;
}
.auth-card h1 {
  margin: 0;
  text-align: center;
  color: var(--ink);
  font-size: 31px;
  font-weight: 900;
}
.auth-card p {
  margin: 2px 0 28px;
  text-align: center;
  color: #46577f;
  font-size: 16px;
  font-weight: 600;
}
.input-icon {
  position: relative;
  margin-bottom: 20px;
}
.input-icon i {
  position: absolute;
  left: 18px;
  top: 16px;
  color: #7280a1;
  font-size: 20px;
}
.input-icon input {
  width: 100%;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 56px 0 58px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
  outline: none;
}
.password-field {
  position: relative;
  display: block;
}
.inline-password {
  display: block;
}
.inline-password input {
  padding-right: 48px;
}
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #607090;
  background: transparent;
}
.password-toggle:hover {
  color: var(--blue-600);
  background: #edf4ff;
}
.input-icon .password-toggle i {
  position: static;
  font-size: 19px;
}
.forgot {
  display: block;
  text-align: right;
  margin: -6px 0 28px;
  font-weight: 750;
}
.auth-card .btn {
  height: 56px;
  font-size: 17px;
}
.or {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin: 28px 0;
  color: #7d88a3;
}
.or span {
  height: 1px;
  background: var(--line);
}

.quotation-page {
  grid-template-columns: minmax(0, 1fr) 360px;
}
.quotation-kpis {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
}
.quotation-filters {
  grid-template-columns: minmax(240px, 1.4fr) 130px 220px 150px auto auto;
}
.quotation-table th,
.quotation-table td {
  white-space: nowrap;
}
.quotation-side .quote-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 12px;
  border-bottom: 1px solid var(--line);
}
.quote-detail-head h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
}
.quote-detail-head p {
  margin: 0 0 6px;
  color: #172853;
  font-weight: 800;
}
.quote-detail-head small {
  display: block;
  color: #6b7896;
  font-weight: 650;
}
.quote-detail-head small span {
  display: block;
  margin-top: 4px;
}
.quote-total {
  margin: 14px 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 950;
}
.quote-side-actions {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  margin-bottom: 12px;
}
.quote-side-actions .btn {
  min-height: 38px;
}
.quote-summary-lines .grand-line,
.quotation-summary .grand-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 6px;
  color: #004de8;
  background: #f4f8ff;
  font-weight: 900;
}
.quotation-form-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  align-items: start;
}
.quotation-form-card {
  padding: 0;
  overflow: hidden;
}
.quotation-form-card h2 {
  margin: 0;
  padding: 16px 18px 8px;
  color: #0057ff;
  font-size: 15px;
  font-weight: 900;
}
.quote-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 16px;
  padding: 8px 18px 12px;
}
.quote-form-grid .span-3 {
  grid-column: 1 / -1;
}
.quote-item-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px 10px;
}
.quote-item-toolbar label {
  position: relative;
  width: min(300px, 100%);
}
.quote-item-toolbar i {
  position: absolute;
  right: 12px;
  top: 10px;
  color: #7c8aa9;
}
.quote-items-table {
  margin: 0 18px 8px;
  width: calc(100% - 36px);
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}
.quote-items-table th {
  background: #f7f9fd;
  color: #142757;
  font-size: 12px;
  font-weight: 900;
}
.quote-items-table td {
  vertical-align: middle;
}
.quote-items-table .form-control,
.quote-items-table .form-select {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 700;
}
.quote-items-table .line-total {
  color: #152858;
  font-weight: 900;
  white-space: nowrap;
}
.quote-total-box {
  width: min(360px, calc(100% - 36px));
  margin: 8px 18px 18px auto;
  display: grid;
  gap: 8px;
}
.quote-total-box div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  color: #23345f;
  font-size: 13px;
  font-weight: 800;
}
.quote-total-box span {
  display: flex;
  gap: 6px;
  align-items: center;
}
.quote-total-box input {
  width: 76px;
  text-align: right;
}
.quote-total-box .grand {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: #001a49;
  font-size: 16px;
}
.quote-total-box .grand strong {
  color: #0057ff;
  font-size: 18px;
}
.quotation-form-card > .btn {
  margin-left: 18px;
}
.quotation-form-card > .form-label {
  display: block;
  margin: 0 18px 12px;
}
.quote-save-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
}
.quotation-summary {
  position: sticky;
  top: 84px;
}
.quotation-summary section {
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  margin-top: 18px;
}
.quotation-summary section h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}
.empty-side {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: #6d7b9b;
  text-align: center;
}
.empty-side i {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #0057ff;
  background: #edf4ff;
  font-size: 30px;
}
.invoice-amount-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}
.invoice-amount-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfdff;
}
.invoice-amount-grid div:first-child {
  grid-column: 1 / -1;
}
.invoice-amount-grid span {
  display: block;
  color: #6b7896;
  font-size: 12px;
  font-weight: 800;
}
.invoice-amount-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 950;
}
.invoice-hero i {
  color: #18a66a;
  background: #e9fbf2;
}
.invoice-actions {
  justify-content: flex-end;
}
.quotation-response-card {
  width: min(720px, 100%);
  padding: 0 0 24px;
  overflow: hidden;
}
.quotation-response-card .response-logo {
  min-height: 86px;
  display: flex;
  align-items: center;
  padding: 18px 28px;
  background: linear-gradient(135deg, #001845, #002b6a);
}
.quotation-response-card .response-logo img {
  height: 46px;
  max-width: 190px;
  object-fit: contain;
}
.response-check {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 24px auto 12px;
  border-radius: 50%;
  color: #fff;
  background: #17a66a;
  font-size: 34px;
}
.quotation-response-card h1 {
  margin: 0;
  font-size: 26px;
}
.quotation-response-card > p,
.response-note {
  display: block;
  margin: 6px 28px 18px;
  text-align: center;
  color: #52617f;
  font-weight: 650;
}
.response-summary {
  width: min(430px, calc(100% - 56px));
  margin: 0 auto 18px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}
.quotation-response-card > .btn {
  display: flex;
  width: min(330px, calc(100% - 56px)) !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 10px;
}
.quotation-response-card section {
  margin: 22px 28px 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.quotation-response-card section h2 {
  margin: 0 0 4px;
  text-align: center;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}
.quotation-response-card section p {
  margin: 0 0 18px;
  text-align: center;
  color: #6c7896;
}
.decision-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.decision-grid button {
  min-height: 150px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  padding: 16px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #1b2b58;
}
.decision-grid button i {
  font-size: 34px;
}
.decision-grid button strong {
  font-weight: 900;
}
.decision-grid button span {
  color: #52617f;
  font-size: 12px;
  font-weight: 700;
}
.decision-grid .accept {
  border-color: #bdebd5;
  background: #f5fffa;
}
.decision-grid .accept i,
.decision-grid .accept strong {
  color: #17a66a;
}
.decision-grid .modify {
  border-color: #cfe0ff;
  background: #f8fbff;
}
.decision-grid .modify i,
.decision-grid .modify strong {
  color: #0057ff;
}
.decision-grid .reject {
  border-color: #ffd0cd;
  background: #fff8f7;
}
.decision-grid .reject i,
.decision-grid .reject strong {
  color: #f04438;
}
.decision-grid .selected {
  box-shadow: 0 0 0 3px rgba(0, 87, 255, .14);
}
.quotation-response-card .form-grid,
.quotation-response-card > label {
  margin: 0 28px 14px;
}
.response-help {
  margin: 20px 28px 0;
  padding: 16px 18px;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  color: #52617f;
  font-size: 13px;
}
.response-help strong {
  color: var(--ink);
}
.email-preview-label {
  display: block;
  width: 100%;
  margin-bottom: 16px;
}
.email-preview-label > span {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}
.email-preview-frame {
  width: 100%;
  height: clamp(620px, 72vh, 900px);
  min-height: 620px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f7fb;
}
.customer-page.po-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}
.po-page .customer-title-row {
  margin: 0 0 2px;
}
.po-page .customer-title-row h1 {
  margin: 0 0 5px;
  color: #071a45;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 950;
}
.po-page .customer-title-row p {
  color: #52617f;
  font-size: 13px;
  font-weight: 800;
}
.po-page .customer-actions {
  margin-top: 0;
  min-height: 40px;
  align-items: center;
}
.po-page .customer-actions .btn {
  min-height: 38px;
  padding: 0 18px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 900;
}
.po-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(138px, 1fr));
  gap: 14px;
}
.po-kpis .dash-kpi {
  min-height: 86px;
  grid-template-columns: 52px 1fr;
  padding: 15px 16px;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(28, 50, 91, .05);
}
.po-kpis .kpi-icon {
  width: 48px;
  height: 48px;
  font-size: 24px;
}
.po-kpis .dash-kpi span {
  color: #25385f;
  font-size: 10px;
}
.po-kpis .dash-kpi strong {
  font-size: 25px;
}
.po-kpis .dash-kpi small {
  margin-top: 5px;
  font-size: 11px;
}
.po-kpis .dash-kpi:nth-child(2) small { color: #12a45c; }
.po-kpis .dash-kpi:nth-child(3) small,
.po-kpis .dash-kpi:nth-child(4) small { color: #ff8a00; }
.po-kpis .dash-kpi:nth-child(5) small { color: #7c4dff; }
.po-kpis .dash-kpi:nth-child(6) small { color: #ef3e4a; }
.po-page .customer-table-card {
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(28, 50, 91, .055);
}
.po-filters {
  grid-template-columns: minmax(240px, 1.4fr) 130px 220px 150px auto auto;
  gap: 12px;
  padding: 15px 16px;
}
.po-filters label {
  position: relative;
}
.po-filters label i {
  position: absolute;
  right: 12px;
  top: 12px;
  color: #7c8aa9;
}
.po-filters .form-control,
.po-filters .form-select,
.po-filters .btn {
  min-height: 40px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 850;
}
.po-tabs {
  display: flex;
  align-items: center;
  gap: 25px;
  margin: 0;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.po-tabs a {
  position: relative;
  padding: 16px 0 13px;
  white-space: nowrap;
  color: #52617f;
  font-size: 12px;
  font-weight: 900;
}
.po-tabs a.active {
  color: #0057ff;
}
.po-tabs a.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 999px;
  background: #0057ff;
}
.po-tabs span {
  margin-left: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef4ff;
  color: #0057ff;
  font-size: 11px;
}
.po-table {
  min-width: 1040px;
}
.po-table th {
  height: 44px;
  padding: 12px 12px;
  background: #f6f9fe;
  color: #1a2d57;
  font-size: 11px;
}
.po-table td {
  height: 56px;
  padding: 12px 12px;
  color: #25375f;
  font-size: 12px;
  font-weight: 750;
}
.po-table td a {
  color: #0057ff;
  font-weight: 950;
}
.po-table .badge {
  min-width: 78px;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 11px;
}
.po-table .customer-row-actions {
  min-width: 112px;
}
.po-table .customer-row-actions a,
.po-table .customer-row-actions i {
  color: #516894;
  font-size: 15px;
}
.po-page .customer-pagination {
  padding: 14px 16px 12px;
}
.po-page .customer-pagination span {
  font-size: 12px;
  font-weight: 800;
}
.po-side .profile-tabs {
  grid-template-columns: repeat(3, 1fr);
}
.po-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 0 0;
  color: #52617f;
  font-size: 12px;
  font-weight: 800;
}
.po-legend span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}
.po-legend .draft { background: #0d6efd; }
.po-legend .pending { background: #ff8a00; }
.po-legend .approved { background: #19b96b; }
.po-legend .partial { background: #f5c542; }
.po-legend .completed { background: #7c4dff; }
.po-legend .cancelled { background: #ef3e4a; }
.po-form-page {
  grid-template-columns: minmax(0, 1.25fr) minmax(380px, .78fr);
}
.po-items-table {
  min-width: 860px;
}
.po-summary .po-hero i {
  color: #7c4dff;
  background: #f1ecff;
}
.po-summary .check-list li::before {
  color: #17a66a;
}
.delivery-page {
  grid-template-columns: minmax(0, 1fr) 360px;
}
.delivery-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(145px, 1fr));
  gap: 14px;
}
.delivery-kpis .dash-kpi {
  min-height: 86px;
  grid-template-columns: 52px 1fr;
  padding: 15px 16px;
}
.delivery-kpis .dash-kpi strong {
  font-size: 24px;
}
.delivery-filters {
  grid-template-columns: minmax(280px, 1fr) 130px 220px auto;
}
.delivery-filters label {
  position: relative;
}
.delivery-filters label i {
  position: absolute;
  right: 12px;
  top: 12px;
  color: #7c8aa9;
}
.delivery-table {
  min-width: 980px;
}
.delivery-side .card-head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
}
.delivery-actions {
  grid-template-columns: 1fr 1fr 1fr;
}
.delivery-detail-grid .detail-line {
  grid-template-columns: 115px 1fr;
}
.delivery-preview {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.delivery-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.delivery-preview-head img {
  max-width: 145px;
  height: 42px;
  object-fit: contain;
}
.delivery-preview-head strong {
  color: #061945;
  font-size: 16px;
  line-height: 1.25;
  text-align: right;
  font-weight: 950;
}
.delivery-preview-head span {
  color: #0057ff;
  font-size: 12px;
}
.delivery-preview table {
  width: calc(100% - 24px);
  margin: 12px;
  border-collapse: collapse;
  font-size: 10px;
}
.delivery-preview th {
  background: #031846;
  color: #fff;
  font-size: 9px;
}
.delivery-preview th,
.delivery-preview td {
  padding: 7px;
  border: 1px solid #d8e2f3;
  vertical-align: top;
}
.delivery-preview-total {
  margin: 8px 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbff;
}
.delivery-preview p {
  margin: 12px;
  color: #52617f;
  font-size: 11px;
  line-height: 1.5;
}
.delivery-form-page {
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, .7fr);
}
.delivery-form-card .quote-form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.delivery-form-card .quote-form-grid .span-3 {
  grid-column: span 4;
}
.delivery-items-table {
  min-width: 1180px;
}
.delivery-items-table th,
.delivery-items-table td {
  vertical-align: top;
}
.delivery-items-table td:nth-child(3) {
  min-width: 240px;
}
.received-placeholder-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 0 22px 12px;
}
.delivery-summary .delivery-hero i {
  color: #0057ff;
  background: #eaf1ff;
}
.delivery-summary .check-list li::before {
  color: #17a66a;
}
.delivery-ack-page {
  max-width: 1080px;
  padding: 0;
  overflow: hidden;
}
.dr-public-preview {
  background: #fff;
}
.dr-public-preview header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
}
.dr-public-preview header img {
  max-width: 190px;
  height: 58px;
  object-fit: contain;
}
.dr-public-preview header h1 {
  margin: 0;
  color: #061945;
  font-size: 24px;
  text-align: right;
}
.dr-public-preview header strong {
  display: block;
  color: #0057ff;
  text-align: right;
}
.dr-public-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding: 22px 28px;
}
.dr-public-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfdff;
}
.dr-public-grid h2,
.acknowledgment-panel h2 {
  margin: 0 0 12px;
  color: #061945;
  font-size: 16px;
}
.dr-public-grid span {
  display: block;
  color: #52617f;
  line-height: 1.5;
}
.dr-public-table {
  min-width: 900px;
  margin: 0;
}
.dr-public-table th {
  background: #031846;
  color: #fff;
  font-size: 12px;
}
.dr-public-notes {
  margin: 22px 28px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}
.acknowledgment-panel {
  margin-top: 24px;
  padding: 24px 28px 28px;
  background: #f7faff;
  border-top: 1px solid var(--line);
}
.signature-pad {
  display: block;
  width: 100%;
  height: 210px;
  margin-top: 8px;
  border: 1px solid #cbd8ee;
  border-radius: 8px;
  background: #fff;
  touch-action: none;
}
.acknowledgment-panel .form-actions {
  justify-content: flex-end;
  margin-top: 16px;
}
.role-access-panel .section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.role-access-panel h2 {
  margin: 0;
  color: #061945;
  font-size: 20px;
  font-weight: 900;
}
.role-access-panel .section-head p {
  margin: 4px 0 0;
  color: #52617f;
}
.role-access-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.role-access-cards article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfdff;
}
.role-access-cards h3 {
  margin: 0 0 6px;
  color: #061945;
  font-size: 16px;
  font-weight: 900;
}
.role-access-cards p {
  min-height: 34px;
  margin: 0 0 12px;
  color: #52617f;
  font-size: 13px;
}
.role-menu-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.role-menu-chips span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 6px;
  background: #edf4ff;
  color: #063a8d;
  font-size: 12px;
  font-weight: 800;
}
.role-menu-chips i {
  color: #17a66a;
}
.role-access-table {
  min-width: 880px;
  margin: 0;
}
.role-access-table th,
.role-access-table td {
  text-align: center;
  vertical-align: middle;
}
.role-access-table th:first-child,
.role-access-table td:first-child {
  text-align: left;
  font-weight: 850;
  color: #061945;
}
.role-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  cursor: pointer;
}
.role-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.role-check span {
  width: 22px;
  height: 22px;
  border: 1px solid #cbd8ee;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 4px #fff;
}
.role-check input:checked + span {
  border-color: #17a66a;
  background: #17a66a;
}
.role-check input:checked + span::after {
  content: "\F26E";
  display: block;
  color: #fff;
  font-family: "bootstrap-icons";
  font-size: 14px;
  line-height: 21px;
  text-align: center;
}
.role-check input:disabled + span {
  cursor: not-allowed;
  opacity: .55;
}
.payment-page {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
}
.payment-kpis {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.payment-filters {
  grid-template-columns: minmax(250px, 1fr) 190px 120px 150px 110px auto auto;
}
.payment-table {
  min-width: 980px;
}
.payment-side .payment-side-head {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 14px 0 16px;
}
.payment-side-head span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #17a66a;
  background: #e7f8ef;
  font-size: 24px;
}
.payment-side-head h3 {
  margin: 0 0 4px;
  color: #061945;
  font-size: 20px;
  font-weight: 950;
  overflow-wrap: anywhere;
}
.payment-side-head p {
  margin: 0;
  color: #52617f;
  font-weight: 800;
}
.payment-form-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 400px);
  gap: 18px;
  align-items: start;
}
.payment-form-page > * {
  min-width: 0;
}
.payment-form-card {
  padding: 0;
  overflow: hidden;
}
.payment-form-card h2 {
  margin: 0;
  padding: 16px 18px 10px;
  color: #0057ff;
  font-size: 14px;
  font-weight: 950;
}
.payment-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0 18px 18px;
}
.payment-form-grid label {
  display: grid;
  gap: 6px;
  color: #061945;
  font-size: 12px;
  font-weight: 850;
}
.payment-form-grid b {
  color: #ef3340;
}
.payment-apply-table {
  min-width: 760px;
  margin: 0 18px 12px;
  width: calc(100% - 36px);
}
.payment-summary-side {
  position: sticky;
  top: 16px;
}
.payment-big-amount {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 6px 12px;
  align-items: center;
  margin-bottom: 14px;
}
.payment-big-amount i {
  grid-row: 1 / 3;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #17a66a;
  background: #e7f8ef;
  font-size: 22px;
}
.payment-big-amount span {
  color: #52617f;
  font-size: 12px;
  font-weight: 850;
}
.payment-big-amount strong {
  color: #17a66a;
  font-size: 24px;
  font-weight: 950;
}
.reports-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  gap: 18px;
  align-items: start;
}
.reports-page > * {
  min-width: 0;
}
.reports-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.reports-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: -58px;
}
.reports-kpis {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  margin-bottom: 0;
}
.reports-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}
.reports-tabs a {
  position: relative;
  flex: 0 0 auto;
  padding: 12px 18px;
  color: #52617f;
  font-size: 12px;
  font-weight: 850;
}
.reports-tabs a.active {
  color: #0057ff;
}
.reports-tabs a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: #0057ff;
}
.reports-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.1fr) minmax(320px, .9fr);
  gap: 16px;
}
.reports-sales-card .sales-chart {
  min-height: 270px;
}
.reports-sales-card .sales-chart svg {
  height: 260px;
}
.report-category-wrap {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  align-items: center;
  min-height: 260px;
}
.report-category-wrap .donut {
  width: 180px;
  height: 180px;
}
.report-category-wrap .donut span {
  width: 108px;
  height: 108px;
  font-size: 11px;
}
.report-category-wrap .donut strong {
  display: block;
  font-size: 14px;
}
.reports-bottom {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 16px;
}
.report-mini-table table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}
.report-mini-table th,
.report-mini-table td {
  padding: 9px 0;
  border-bottom: 1px solid #eef3fb;
  color: #20345f;
  font-size: 12px;
  font-weight: 800;
}
.report-mini-table th {
  color: #52617f;
  font-size: 11px;
}
.report-mini-table td:nth-child(2),
.report-mini-table td:nth-child(3),
.report-mini-table th:nth-child(2),
.report-mini-table th:nth-child(3) {
  text-align: right;
}
.report-mini-table .tone-green { color: #17a66a; }
.report-mini-table .tone-orange { color: #ff8a00; }
.report-mini-table .tone-red { color: #ef3340; }
.report-mini-table .tone-purple { color: #7c4dff; }
.reports-side {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 16px;
}
.reports-side-card {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(28, 50, 91, .06);
}
.reports-side-card h2 {
  margin: 0 0 12px;
  color: #061945;
  font-size: 15px;
  font-weight: 950;
}
.quick-report-list,
.recent-report-list {
  display: grid;
}
.quick-report-list a,
.recent-report-list a {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 0;
  border-bottom: 1px solid #eef3fb;
  color: #20345f;
  font-size: 12px;
  font-weight: 850;
}
.quick-report-list a:last-child,
.recent-report-list a:last-child {
  border-bottom: 0;
}
.quick-report-list i,
.recent-report-list i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #0057ff;
  background: #edf4ff;
  font-size: 15px;
}
.quick-report-list b,
.recent-report-list b {
  color: #70809e;
}
.recent-report-list i {
  color: #ef3340;
  background: #fff0f1;
}
.recent-report-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-report-list small {
  display: block;
  margin-top: 3px;
  color: #7b89a4;
  font-size: 10px;
  font-weight: 700;
}
.custom-report p {
  color: #52617f;
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 1420px) {
  .customer-page,
  .customer-page.po-page,
  .quotation-page,
  .delivery-page,
  .payment-page,
  .payment-form-page,
  .reports-page {
    grid-template-columns: 1fr;
  }
  .customer-side,
  .quotation-side,
  .delivery-side,
  .payment-summary-side,
  .reports-side {
    position: static;
  }
  .customer-actions,
  .po-page .customer-actions,
  .reports-actions {
    margin-top: 0;
    justify-content: flex-start;
  }
  .customer-kpis,
  .vendor-kpis,
  .delivery-kpis,
  .quotation-kpis,
  .reports-kpis,
  .reports-bottom {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
  .reports-side {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}
@media (max-width: 1280px) {
  .app-shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }
  .sidebar {
    padding-inline: 14px;
  }
  .content {
    padding-inline: 14px;
  }
  .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .quick-create {
    margin-left: auto;
  }
  .customer-filters,
  .customer-filters.vendor-filters,
  .customer-filters.product-filters,
  .payment-filters,
  .delivery-filters,
  .quotation-filters {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
  .customer-filters .filter-search,
  .payment-filters .filter-search,
  .delivery-filters label:first-child,
  .quotation-filters label:first-child {
    grid-column: 1 / -1;
  }
  .reports-grid {
    grid-template-columns: 1fr;
  }
  .report-category-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
  }
  .brand {
    padding-bottom: 14px;
  }
  .sidebar nav { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .help-card, .sidebar-foot { display: none; }
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { min-height: 520px; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-side { grid-row: 1; }
  .email-settings-page { grid-template-columns: 1fr; }
  .email-settings-nav { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .email-settings-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid, .dashboard-bottom { grid-template-columns: 1fr; }
  .status-wrap { grid-template-columns: 150px 1fr; }
  .customer-page { grid-template-columns: 1fr; }
  .customer-actions { margin-top: 0; justify-content: flex-start; flex-wrap: wrap; }
  .customer-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vendor-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-side { position: static; }
  .customer-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-filters.vendor-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-filters.product-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-form-actions { margin-top: 0; justify-content: flex-start; flex-wrap: wrap; }
  .customer-form-page { grid-template-columns: 1fr; }
  .vendor-form-page { grid-template-columns: 1fr; }
  .quotation-page, .quotation-form-page { grid-template-columns: 1fr; }
  .delivery-page { grid-template-columns: 1fr; }
  .po-form-page { grid-template-columns: 1fr; }
  .delivery-form-page { grid-template-columns: 1fr; }
  .delivery-form-card .quote-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .delivery-form-card .quote-form-grid .span-3 { grid-column: span 2; }
  .received-placeholder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quotation-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .delivery-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quotation-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .delivery-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quotation-summary { position: static; }
  .customer-form-side { position: static; }
}
@media (max-width: 720px) {
  .topbar { padding: 0 14px; gap: 8px; }
  .global-search { display: none; }
  .content { padding: 16px 12px 24px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .quick-create { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .login-hero { padding: 42px 28px 170px; min-height: 620px; }
  .login-brand {
    align-items: flex-start;
    margin-bottom: 56px;
  }
  .brand-logo-login {
    width: 50px;
    height: 50px;
  }
  .hero-features { left: 28px; right: 28px; bottom: 36px; grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .hero-features div { border-right: 0; padding: 0; }
  .login-form-wrap { padding: 24px; }
  .auth-card { padding: 34px 24px 26px; }
  .company-profile-grid { grid-template-columns: 1fr; }
  .settings-fields, .settings-fields.three, .settings-fields.social { grid-template-columns: 1fr; }
  .settings-fields .span-2 { grid-column: auto; }
  .summary-item { grid-template-columns: 20px 1fr; }
  .summary-item strong { grid-column: 2; text-align: left; }
  .email-form-grid { grid-template-columns: 1fr; }
  .email-settings-side { grid-template-columns: 1fr; }
  .email-form-footer { align-items: stretch; flex-direction: column; }
  .toggle-row { align-items: flex-start; }
  .dashboard-kpis { grid-template-columns: 1fr; gap: 10px; }
  .dash-kpi { min-height: 82px; }
  .dashboard-card { padding: 15px 14px; }
  .sales-summary { grid-template-columns: 1fr; gap: 12px; }
  .sales-summary div { border-right: 0; padding: 0; }
  .doc-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .doc-row time { display: none; }
  .status-wrap { grid-template-columns: 1fr; justify-items: center; }
  .status-legend { width: 100%; }
  .customer-row { grid-template-columns: 20px 1fr 82px; }
  .customer-row div { grid-column: 2 / -1; }
  .customer-kpis, .customer-bottom { grid-template-columns: 1fr; }
  .vendor-kpis { grid-template-columns: 1fr; }
  .customer-filters { grid-template-columns: 1fr; }
  .customer-filters.vendor-filters { grid-template-columns: 1fr; }
  .customer-filters.product-filters { grid-template-columns: 1fr; }
  .customer-pagination { align-items: flex-start; flex-direction: column; }
  .customer-profile-head { grid-template-columns: 56px 1fr; }
  .customer-profile-head .favorite { display: none; }
  .profile-tabs { grid-template-columns: repeat(3, 1fr); }
  .customer-activity-summary { grid-template-columns: repeat(2, 1fr); }
  .detail-line { grid-template-columns: 1fr; gap: 2px; }
  .vendor-info-grid { grid-template-columns: 1fr; }
  .product-side-actions { grid-template-columns: 1fr; }
  .side-transactions div { grid-template-columns: 30px 1fr; }
  .side-transactions em, .side-transactions .badge { justify-self: start; grid-column: 2; }
  .customer-form-grid { grid-template-columns: 1fr; }
  .quote-form-grid { grid-template-columns: 1fr; padding: 8px 16px 12px; }
  .quote-form-grid .span-3 { grid-column: auto; }
  .quote-item-toolbar { align-items: stretch; flex-direction: column; padding: 0 16px 10px; }
  .quote-item-toolbar label { width: 100%; }
  .quote-items-table {
    margin: 0 16px 8px;
    width: calc(100% - 32px);
    min-width: 780px;
  }
  .quote-total-box { width: calc(100% - 32px); margin: 8px 16px 16px; }
  .quote-save-actions { align-items: stretch; flex-direction: column; padding: 16px; }
  .quote-save-actions .btn, .quote-side-actions .btn { width: 100%; }
  .quote-side-actions { grid-template-columns: 1fr; }
  .quotation-kpis { grid-template-columns: 1fr; }
  .delivery-kpis { grid-template-columns: 1fr; }
  .quotation-filters { grid-template-columns: 1fr; }
  .delivery-filters { grid-template-columns: 1fr; }
  .decision-grid { grid-template-columns: 1fr; }
  .delivery-form-card .quote-form-grid { grid-template-columns: 1fr; }
  .delivery-form-card .quote-form-grid .span-3 { grid-column: auto; }
  .received-placeholder-grid { grid-template-columns: 1fr; padding: 0 16px 12px; }
  .payment-form-grid { grid-template-columns: 1fr; padding: 0 16px 16px; }
  .payment-apply-table {
    margin: 0 16px 12px;
    width: calc(100% - 32px);
  }
  .dr-public-preview header,
  .dr-public-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }
  .dr-public-preview header h1,
  .dr-public-preview header strong {
    text-align: left;
  }
  .acknowledgment-panel { padding: 20px 18px 22px; }
  .signature-pad { height: 180px; }
  .email-preview-frame {
    height: 680px;
    min-height: 680px;
  }
  .quotation-response-card section,
  .quotation-response-card .form-grid,
  .quotation-response-card > label,
  .response-help {
    margin-left: 18px;
    margin-right: 18px;
  }
  .customer-form-grid .span-2 { grid-column: auto; }
  .form-steps { align-items: flex-start; flex-direction: column; gap: 0; height: auto; padding: 10px 16px; }
  .form-steps span, .form-steps a { height: 36px; }
  .form-steps.secondary { margin: 6px -16px 12px; }
  .customer-form-card section { padding: 16px 16px 2px; }
  .customer-form-footer { align-items: stretch; flex-direction: column; }
  .customer-form-actions .btn { width: 100%; }
  .check-row { align-items: flex-start; flex-direction: column; gap: 8px; }
}
@media print {
  .sidebar, .topbar, .page-heading, .doc-actions { display: none; }
  .app-shell { display: block; }
  .content { padding: 0; }
  .panel { box-shadow: none; border: 0; }
}
