:root {
  color: #18211d;
  background: #f7f7f1;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

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

button {
  cursor: pointer;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #dfe4dc;
  padding: 16px clamp(18px, 5vw, 64px);
  background: rgba(247, 247, 241, 0.94);
  backdrop-filter: blur(16px);
}

.portal-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 272px minmax(0, 1fr);
  grid-template-rows: 76px 1fr;
  align-items: start;
  background: #f6f8fa;
}

.sidebar {
  position: sticky;
  top: 76px;
  display: grid;
  height: calc(100dvh - 76px);
  overflow-y: auto;
  align-content: start;
  gap: 18px;
  border-right: 1px solid #dfe4dc;
  padding: 22px;
  background: #111b17;
  color: #f8fbf8;
}

.sidebar-brand {
  display: grid;
  justify-items: start;
  gap: 3px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #f8fbf8;
  text-align: left;
}

.sidebar-brand span {
  font-size: 1.2rem;
  font-weight: 950;
}

.sidebar-brand small,
.partner-card span,
.partner-card small {
  color: #b6c8c0;
}

.partner-card {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.partner-card strong,
.partner-card span,
.partner-card small {
  overflow-wrap: anywhere;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.sidebar-nav button {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  gap: 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 12px;
  background: transparent;
  color: #dce8e2;
  font-weight: 850;
  text-align: left;
}

.sidebar-nav button:hover,
.sidebar-nav button.active {
  border-color: rgba(169, 236, 217, 0.28);
  background: rgba(169, 236, 217, 0.12);
  color: #ffffff;
}

.sidebar-nav svg {
  color: #8edcc5;
}

.sidebar-footer {
  align-self: end;
  margin-top: auto;
}

.bi-dashboard h1,
.bi-dashboard .dashboard-heading h1 {
  font-size: 28px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.bi-dashboard h2 { font-size: 17px; line-height: 1.4; margin: 0; }
.bi-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bi-kpi {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-content: start;
  min-height: 112px;
  border: 1px solid #dce3dd;
  border-radius: 6px;
  padding: 16px;
  background: #fff;
  text-align: left;
  color: #25352e;
}
.bi-kpi:hover { border-color: #168966; }
.bi-kpi svg { color: #168966; }
.bi-kpi:nth-child(3n + 2) svg { color: #3477a8; }
.bi-kpi:nth-child(3n) svg { color: #a87722; }
.bi-kpi span { font-size: 13px; }
.bi-kpi strong { grid-column: 1 / -1; font-size: 22px; overflow-wrap: anywhere; }
.bi-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 32px; }
.bi-section { min-width: 0; border-top: 1px solid #dce3dd; padding-top: 20px; }
.bi-section .empty-state { min-height: 150px; background: transparent; border: 0; }
.pipeline-list { display: grid; gap: 16px; padding: 20px 0; }
.pipeline-row { display: grid; grid-template-columns: 88px minmax(0, 1fr) 32px; gap: 10px; align-items: center; font-size: 13px; }
.pipeline-row meter { width: 100%; height: 12px; }
.pipeline-row strong { text-align: right; }

.crm-page { max-width: 1400px; }
.crm-toolbar, .crm-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.crm-toolbar input { max-width: 360px; }
.crm-toolbar select { width: auto; max-width: 100%; }
.crm-pagination { justify-content: flex-end; font-size: 13px; }
.crm-table-scroll { overflow-x: auto; }
.invitation-panel { padding: 22px 0; border-bottom: 1px solid #dfe6e1; }
.invitation-panel h2 { font-size: 18px; }
.invitation-panel > label:not(.check-label) { display: grid; gap: 8px; }
.invitation-panel input[readonly] { width: 100%; min-width: 0; box-sizing: border-box; }
.invitation-panel .crm-toolbar { margin: 14px 0; }
.share-link-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.share-link-value { width: 300px; max-width: 100%; box-sizing: border-box; }
.share-link-dialog { width: 460px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); box-sizing: border-box; padding: 24px; border: 1px solid #dfe6e1; border-radius: 8px; background: #fff; color: #202a25; }
.share-link-dialog::backdrop { background: rgb(0 0 0 / 35%); }
.share-link-dialog h2 { font-size: 20px; margin: 0; }
.share-link-dialog form > label { display: grid; gap: 8px; margin-top: 20px; }
.share-link-dialog input { width: 100%; box-sizing: border-box; min-width: 0; }
.table-state { padding: 24px 0; min-height: 80px; color: #55655c; }
.table-state[role="alert"] { color: #a43242; }
.crm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.crm-table th { text-align: left; background: #edf1f4; font-weight: 600; }
.crm-table td, .crm-table th { padding: 14px 12px; border-bottom: 1px solid #dce3dd; }
.crm-table td { min-width: 110px; max-width: 280px; overflow-wrap: anywhere; }
.crm-editor { border-top: 1px solid #dce3dd; border-bottom: 1px solid #dce3dd; padding: 24px 0; margin: 24px 0; }
.crm-editor h2 { margin: 16px 0; }
.crm-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.license-view-tabs { display: flex; gap: 4px; width: fit-content; max-width: 100%; margin: 18px 0; padding: 4px; border: 1px solid #dce3dd; border-radius: 7px; background: #edf2ef; overflow-x: auto; }
.license-view-tabs button { border: 0; border-radius: 5px; padding: 9px 14px; background: transparent; color: #52635a; font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.license-view-tabs button.active { background: #fff; color: #145b43; box-shadow: 0 1px 3px rgb(25 45 35 / 12%); }
.commission-eligibility-notice { max-width: 880px; margin: 18px 0; padding: 15px 16px; border: 1px solid #e6c978; border-left: 4px solid #b9850b; border-radius: 6px; background: #fff9e9; color: #554315; }
.commission-eligibility-notice strong, .commission-eligibility-notice p { display: block; margin: 0; }
.commission-eligibility-notice p { margin-top: 5px; color: #695928; font-size: 14px; }
.license-workflow, .order-progress { list-style: none; padding: 0; display: grid; margin: 20px 0 28px; }
.license-workflow { grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #dce3dd; border-radius: 8px; background: #fff; }
.license-workflow li { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 16px; border-right: 1px solid #e3e9e5; }
.license-workflow li:last-child { border-right: 0; }
.wizard-workflow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wizard-workflow li { padding: 0; }
.wizard-workflow li button { width: 100%; min-height: 72px; display: flex; align-items: center; gap: 11px; padding: 14px 16px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.wizard-workflow li button:disabled { cursor: not-allowed; opacity: .55; }
.wizard-workflow li.current { box-shadow: inset 0 -3px #168966; background: #f4f9f6; }
.wizard-workflow li.complete > button > span { background: #168966; color: #fff; }
.license-workflow li > span { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; color: #176b4d; background: #e8f4ee; }
.license-workflow strong, .license-workflow small, .order-progress strong, .order-progress small { display: block; overflow-wrap: anywhere; }
.license-workflow strong { font-size: 14px; }
.license-workflow small, .order-progress small { margin-top: 3px; color: #607068; font-size: 12px; }
.order-progress { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.order-progress li { position: relative; display: flex; gap: 10px; min-width: 0; padding: 13px 12px 13px 0; border-top: 2px solid #d7dfda; }
.order-progress li.complete { border-color: #168966; }
.order-progress li.current { background: #f4f8f6; }
.order-step-number { display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px; border: 1px solid #c9d4cd; border-radius: 50%; background: #fff; color: #596860; font-size: 12px; font-weight: 700; }
.order-progress .complete .order-step-number { border-color: #168966; background: #168966; color: #fff; }
.workspace-activation-editor { max-width: 880px; }
.wizard-panel { max-width: 1040px; margin-top: 0; }
.checkout-step { max-width: 900px; }
.orders-heading { margin-top: 36px; padding-top: 24px; border-top: 1px solid #dce3dd; }
.workspace-form-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid #dce3dd; padding-bottom: 18px; }
.workspace-form-header h2 { margin: 0 0 6px; font-size: 22px; }
.workspace-form-header p { margin: 0; color: #52635a; }
.workspace-activation-form { gap: 18px 20px; }
.workspace-activation-form label { font-weight: 600; color: #29362f; }
.workspace-activation-form input, .workspace-activation-form textarea { margin-top: 7px; font-weight: 400; background: #fff; }
.workspace-activation-form textarea { min-height: 104px; resize: vertical; }
.workspace-activation-form label:has(textarea), .workspace-activation-form .form-note, .workspace-activation-form .profile-form-actions { grid-column: 1 / -1; }
.workspace-activation-form .form-note { margin: 0; padding: 12px 14px; border-left: 3px solid #168966; background: #f2f8f5; color: #43544b; }
.crm-history { border-top: 1px solid #dce3dd; margin-top: 24px; padding-top: 20px; }
.crm-history li { padding: 10px 0; }
.crm-history p { white-space: pre-wrap; overflow-wrap: anywhere; }
.crm-history time { font-size: 12px; color: #52635a; }
.crm-pipeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.crm-pipeline > div, .crm-plans article { border: 1px solid #dce3dd; border-radius: 6px; padding: 16px; background: #fff; min-width: 0; }
.crm-pipeline span, .crm-pipeline strong, .crm-pipeline small { display: block; overflow-wrap: anywhere; }
.crm-pipeline strong { font-size: 24px; margin: 8px 0; }
.crm-pipeline small { color: #52635a; }
.crm-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 20px 0; }
.crm-page .button { font-size: 13px; font-weight: 600; padding: 8px 12px; min-height: 38px; }
@media (max-width: 640px) {
  .crm-form { grid-template-columns: minmax(0, 1fr); }
  .crm-pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .license-workflow, .order-progress { grid-template-columns: minmax(0, 1fr); }
  .license-workflow li { border-right: 0; border-bottom: 1px solid #e3e9e5; }
  .license-workflow li:last-child { border-bottom: 0; }
}

.service-editor { margin: 0; padding: 20px 0; border: 0; border-top: 1px solid #dce3dd; border-bottom: 1px solid #dce3dd; }
.service-editor legend { font-weight: 600; padding: 0 8px 0 0; }
.check-label { display: flex; align-items: center; gap: 10px; }
.check-label input { width: 18px; height: 18px; }
.service-item { display: grid; grid-template-columns: minmax(140px, 1fr) 120px minmax(140px, 1fr); gap: 12px; margin-top: 14px; align-items: center; }
.quotation-document { margin: 24px 0; padding: 32px; background: white; color: #18211d; border: 1px solid #dce3dd; max-width: 1000px; }
.quotation-document header { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid #168966; padding-bottom: 18px; }
.quotation-document h2 { font-size: 24px; }
.quotation-document h3 { font-size: 16px; }
.quotation-document section { border-top: 1px solid #dce3dd; padding: 18px 0; }
.quote-addresses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 20px 0; }
.quotation-document p { overflow-wrap: anywhere; }
.quote-total-row { display: flex; justify-content: space-between; gap: 20px; padding: 7px 0; }
.quote-total-row strong { white-space: nowrap; }
.quote-grand-total { font-size: 18px; }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .service-item, .quote-addresses { grid-template-columns: minmax(0, 1fr); }
  .quotation-document { padding: 16px; }
  .quotation-document header { flex-wrap: wrap; }
}
@media print {
  @page { size: A4; margin: 16mm; }
  body { background: white; min-width: 0; }
  .portal-navbar, .sidebar, .no-print { display: none !important; }
  .portal-shell, .portal-main { display: block; min-height: 0; background: white; }
  .portal-shell .dashboard-page.quote-page { padding: 0; }
  .quotation-document { border: 0; margin: 0; padding: 0; max-width: none; font-size: 11pt; }
  .quotation-document section { break-inside: avoid; }
  .quote-addresses { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.ticket-messages { list-style: none; margin: 24px 0; padding: 0; }
.ticket-messages li { border-left: 3px solid #cbd6d0; padding: 16px 20px; margin-bottom: 16px; background: white; }
.ticket-messages .staff-reply { border-color: #168966; background: #edf7f2; }
.ticket-messages time { display: block; margin-top: 4px; font-size: 12px; color: #52635a; }
.ticket-dates { font-size: 13px; color: #52635a; }
.profile-extras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 24px 0; border-bottom: 1px solid #dce3dd; margin-bottom: 24px; }
.profile-extras h2 { font-size: 18px; }
.profile-logo { display: block; width: 96px; height: 96px; object-fit: contain; margin: 12px 0; }
.profile-extras p { overflow-wrap: anywhere; }
.profile-extras .button { font-size: 13px; font-weight: 600; }
@media (max-width: 640px) { .profile-extras { grid-template-columns: minmax(0, 1fr); } }

.portal-main {
  min-width: 0;
}

.activation-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 24px;
  background: #fff7df;
  border-bottom: 1px solid #e9d49a;
}

.activation-notice p { margin: 6px 0 0; }
.sidebar-nav button:disabled { opacity: 0.45; cursor: not-allowed; }

.portal-navbar {
  grid-column: 1 / -1;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
  height: 76px;
  padding: 12px 24px;
  border-bottom: 1px solid #dfe4dc;
  background: #ffffff;
}

.portal-navbar > strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.portal-navbar-actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

button:focus-visible {
  outline: 2px solid #168966;
  outline-offset: 3px;
}

.profile-workspace {
  width: 100%;
  max-width: 1000px;
}

.profile-workspace .dashboard-heading h1 {
  font-size: 32px;
  line-height: 1.2;
  margin-bottom: 10px;
}

.profile-workspace .dashboard-heading p {
  font-size: 15px;
}

.profile-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  border-bottom: 1px solid #dce3dd;
}

.profile-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 8px;
  border-bottom: 3px solid transparent;
  font-size: 14px;
  color: #52635a;
  overflow-wrap: anywhere;
}

.profile-steps li > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #e7ebef;
}

.profile-steps .current {
  border-color: #0f6d52;
  color: #0f6d52;
  font-weight: 700;
}

.profile-steps .complete > span {
  background: #d9f1e5;
  color: #0f6d52;
}

.profile-form.profile-wizard {
  grid-template-columns: minmax(0, 1fr);
}

.profile-wizard .form-section {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  background: transparent;
}

.profile-wizard .form-section[hidden] {
  display: none;
}

.profile-wizard h3,
.profile-wizard .verification-panel {
  grid-column: 1 / -1;
}

.profile-form-actions {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
  border-top: 1px solid #dce3dd;
  padding-top: 16px;
  flex-wrap: wrap;
}

.profile-form-actions > button {
  flex: 0 0 auto;
  width: auto;
  height: 38px;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 6px;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.profile-form-actions > button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.profile-detail-section {
  padding: 28px 0;
  border-bottom: 1px solid #dce3dd;
}

.profile-detail-section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  line-height: 1.4;
}

.profile-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 20px 0 0;
}

.profile-details dt {
  color: #52635a;
  font-size: 13px;
  margin-bottom: 6px;
}

.profile-details dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.brand-mark,
.nav-actions button {
  border: 0;
  background: transparent;
  color: #18211d;
}

.brand-mark {
  font-size: 1.14rem;
  font-weight: 900;
  letter-spacing: 0;
}

.nav-actions,
.hero-actions,
.panel-header,
.step,
.promise-band,
.promise-tile,
.lead-row,
.action-item,
.tier-badge {
  display: flex;
  align-items: center;
}

.nav-actions {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-actions > button:not(.button) {
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 800;
}

.nav-actions .active {
  background: #e6ece7;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 16px;
  font-weight: 900;
}

.button.primary {
  background: #22c58b;
  color: #081713;
}

.button.secondary {
  border-color: rgba(248, 251, 248, 0.34);
  color: #f8fbf8;
  background: rgba(255, 255, 255, 0.08);
}

.button.ghost-dark {
  border-color: #cad5cd;
  background: #ffffff;
  color: #18211d;
}

.hero {
  min-height: calc(88vh - 77px);
  padding: 70px clamp(20px, 5vw, 72px) 64px;
  color: #f8fbf8;
  background:
    linear-gradient(115deg, rgba(9, 28, 24, 0.97), rgba(18, 88, 73, 0.86) 48%, rgba(22, 28, 34, 0.78)),
    url("https://images.unsplash.com/photo-1551288049-bebda4e38f71?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.hero-grid,
.content,
.auth-page,
.profile-page,
.dashboard-page {
  max-width: 1180px;
  margin: 0 auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.72fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: #607269;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #a9ecd9;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 7vw, 7rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  max-width: 760px;
  color: #18211d;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  color: #18211d;
}

.lede,
.auth-copy p,
.dashboard-heading p {
  max-width: 660px;
  color: rgba(248, 251, 248, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.6;
}

.hero-actions {
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.signal-panel {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 24px;
  background: rgba(12, 28, 25, 0.66);
  backdrop-filter: blur(18px);
}

.panel-header {
  justify-content: space-between;
  margin-bottom: 22px;
  color: #dffaf2;
  font-weight: 900;
}

.steps-list {
  display: grid;
  gap: 16px;
}

.step {
  gap: 14px;
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.1);
}

.step > span {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 50%;
  background: #a9ecd9;
  color: #10231e;
  font-weight: 900;
}

.step strong {
  display: block;
  margin-bottom: 5px;
}

.step p {
  margin: 0;
  color: rgba(248, 251, 248, 0.72);
}

.band {
  padding: 24px clamp(20px, 5vw, 72px);
  background: #101814;
  color: #f8fbf8;
}

.promise-band {
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.promise-tile {
  width: min(100%, 350px);
  min-height: 104px;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.promise-tile svg {
  flex: 0 0 auto;
  color: #a9ecd9;
}

.promise-tile strong,
.promise-tile span {
  display: block;
}

.promise-tile span {
  color: #cbd7d0;
  line-height: 1.45;
}

.content {
  padding: 84px clamp(20px, 5vw, 72px);
}

.section-heading {
  margin-bottom: 34px;
}

.tier-grid,
.portal-grid,
.auth-form,
.profile-form,
.capability-strip {
  display: grid;
  gap: 18px;
}

.tier-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.capability-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
}

.capability-strip span {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  border: 1px solid #dce3dd;
  border-radius: 8px;
  padding: 12px 14px;
  background: #ffffff;
  color: #294338;
  font-weight: 850;
}

.capability-strip svg {
  color: #0f6d52;
}

.tier-card,
.dashboard-tile,
.table-panel,
.resource-panel,
.form-section,
.auth-form {
  border: 1px solid #dce3dd;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 60px rgba(20, 34, 30, 0.08);
}

.tier-card {
  padding: 24px;
}

.tier-card p,
.dashboard-tile span,
.lead-row span,
.resource-panel span {
  color: #52635a;
}

.tier-card strong {
  display: block;
  margin: 18px 0;
  color: #0f6d52;
  font-size: 1.35rem;
}

.tier-card ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tier-card li {
  display: flex;
  gap: 9px;
  color: #3f5048;
}

.auth-page {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(340px, 0.75fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: start;
  padding: 84px clamp(20px, 5vw, 72px);
}

.compact-auth {
  max-width: 980px;
}

.auth-copy h1,
.dashboard-heading h1 {
  color: #18211d;
  font-size: clamp(2.4rem, 5vw, 5rem);
}

.auth-copy p,
.dashboard-heading p {
  color: #52635a;
}

.auth-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 24px;
}

.compact-auth .auth-form {
  grid-template-columns: 1fr;
}

label {
  display: grid;
  gap: 8px;
  color: #3f5048;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfd9d2;
  border-radius: 8px;
  padding: 12px 13px;
  color: #18211d;
  background: #fbfdfb;
}

.wide-button,
.link-button,
.form-note,
.full-span,
.google-slot,
.google-button,
.auth-divider {
  grid-column: 1 / -1;
}

.wide-button {
  width: 100%;
}

.link-button {
  border: 0;
  background: transparent;
  color: #0f6d52;
  font-weight: 900;
}

.google-slot {
  min-height: 44px;
}

.google-button {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #cfd9d2;
  border-radius: 8px;
  background: #ffffff;
  color: #18211d;
  font-weight: 900;
}

.google-button span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #f1f4f2;
  color: #1f6f50;
  font-weight: 900;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #718178;
  font-weight: 800;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #dce3dd;
}

.form-note {
  margin: 0;
  font-weight: 800;
}

.form-note.error {
  color: #b33131;
}

.form-note.success {
  color: #0f6d52;
}

.profile-page,
.dashboard-page {
  padding: 64px clamp(20px, 5vw, 72px) 96px;
}

.portal-shell .dashboard-page,
.portal-shell .profile-page {
  width: min(100%, 1240px);
  max-width: none;
  margin: 0 auto;
  padding: 42px clamp(18px, 4vw, 56px) 72px;
}

.dashboard-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.tier-badge {
  gap: 8px;
  border: 1px solid #c7d6cc;
  border-radius: 999px;
  padding: 10px 14px;
  background: #ffffff;
  color: #0f6d52;
  font-weight: 900;
  white-space: nowrap;
}

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

.portal-grid.expanded {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-tile {
  min-height: 142px;
  padding: 20px;
}

.dashboard-tile svg {
  color: #0f6d52;
}

.dashboard-tile strong {
  display: block;
  margin-top: 14px;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  overflow-wrap: anywhere;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  margin-top: 18px;
}

.lower-workbench {
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
}

.profile-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-section {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
}

.form-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-section svg {
  color: #0f6d52;
}

.verification-panel {
  display: flex;
  gap: 12px;
  border: 1px solid #dce3dd;
  border-radius: 8px;
  padding: 14px;
  background: #f5f8f5;
}

.verification-panel > svg {
  flex: 0 0 auto;
}

.verification-panel div {
  display: grid;
  gap: 4px;
}

.verification-panel strong,
.verification-panel span,
.verification-panel small {
  overflow-wrap: anywhere;
}

.verification-panel span,
.verification-panel small {
  color: #52635a;
}

.verification-panel.verified {
  border-color: #95d8bd;
  background: #edf9f3;
}

.verification-panel.pending {
  border-color: #e5ca80;
  background: #fff8e6;
}

.verification-panel.failed {
  border-color: #eba8a8;
  background: #fff0f0;
}

.table-panel,
.resource-panel {
  padding: 22px;
}

.lead-list,
.lead-editor-list,
.quote-list,
.resource-panel,
.license-form,
.deal-form {
  display: grid;
  gap: 12px;
}

.deal-form {
  align-content: start;
}

.license-form {
  border-bottom: 1px solid #e5ebe6;
  margin-bottom: 8px;
  padding-bottom: 18px;
}

.lead-row {
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid #e5ebe6;
  padding-top: 14px;
}

.lead-row div {
  min-width: 0;
}

.lead-row strong,
.lead-row span {
  overflow-wrap: anywhere;
}

.lead-row > span {
  border-radius: 999px;
  padding: 5px 10px;
  background: #edf7f2;
  color: #0f6d52;
  font-weight: 900;
}

.panel-title-row,
.quote-main,
.quote-meta,
.quote-actions,
.notice-panel {
  display: flex;
  align-items: center;
}

.panel-title-row {
  justify-content: space-between;
  gap: 14px;
}

.notice-panel {
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #d4ddc6;
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 16px;
  background: #fff9e8;
  color: #3d4934;
}

.notice-panel > svg {
  flex: 0 0 auto;
  color: #896509;
}

.notice-panel div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.notice-panel span {
  color: #5d6a58;
}

.lead-editor,
.quote-row,
.empty-state {
  border-top: 1px solid #e5ebe6;
  padding-top: 14px;
}

.lead-editor {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.5fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.lead-summary {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.lead-summary strong,
.lead-summary span,
.lead-summary small {
  overflow-wrap: anywhere;
}

.lead-summary span,
.lead-summary small,
.quote-row p,
.quote-meta span,
.empty-state span,
.converted-note {
  color: #52635a;
}

.quote-row {
  display: grid;
  gap: 12px;
}

.quote-main,
.quote-meta,
.quote-actions {
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.quote-main > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.quote-main strong,
.quote-main span,
.quote-row p,
.quote-meta span,
.quote-meta b {
  overflow-wrap: anywhere;
}

.quote-row p {
  margin: 0;
  line-height: 1.5;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: #edf7f2;
  color: #0f6d52;
  font-size: 0.85rem;
  font-weight: 900;
  white-space: nowrap;
}

.status-pill.sent,
.status-pill.demo,
.status-pill.proposal {
  background: #eaf2ff;
  color: #1d5f9f;
}

.status-pill.accepted,
.status-pill.won,
.status-pill.active,
.status-pill.converted {
  background: #eaf8ee;
  color: #13753f;
}

.status-pill.lost,
.status-pill.declined,
.status-pill.failed {
  background: #fff0f0;
  color: #a33232;
}

.status-pill.qualified {
  background: #fff8e2;
  color: #8b660e;
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 9px;
  color: #52635a;
}

.empty-state svg {
  color: #0f6d52;
}

.full-width-panel {
  width: min(100%, 1120px);
}

.action-item {
  gap: 12px;
  border-radius: 8px;
  padding: 14px;
  background: #f5f8f5;
  font-weight: 800;
}

.action-item svg {
  color: #0f6d52;
}

@media (max-width: 920px) {
  .bi-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bi-sections { grid-template-columns: minmax(0, 1fr); }
  .hero-grid,
  .tier-grid,
  .auth-page,
  .profile-form,
  .workbench {
    grid-template-columns: 1fr;
  }

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

  .portal-grid.expanded {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .capability-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 76px auto 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .sidebar-nav {
    display: flex;
    overflow-x: auto;
  }
  .sidebar-nav button { width: auto; flex: 0 0 auto; white-space: nowrap; }

  .lead-editor {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .bi-kpis { grid-template-columns: minmax(0, 1fr); }
  .site-nav,
  .nav-actions,
  .dashboard-heading,
  .lead-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    position: sticky;
  }

  .portal-navbar {
    padding: 12px 16px;
  }

  .portal-navbar-actions .button {
    padding: 10px;
  }

  .portal-navbar .brand-mark {
    font-size: 16px;
    text-align: left;
  }

  .profile-wizard .form-section,
  .profile-details {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-steps li {
    flex-direction: column;
    align-items: flex-start;
    font-size: 12px;
  }

  .sidebar {
    padding: 16px;
  }

  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-footer {
    align-self: auto;
  }

  .hero {
    min-height: auto;
    padding-top: 50px;
  }

  .signal-panel,
  .auth-form {
    padding: 18px;
  }

  .auth-form,
  .portal-grid,
  .portal-grid.expanded,
  .capability-strip {
    grid-template-columns: 1fr;
  }

  .notice-panel,
  .quote-main,
  .quote-meta,
  .quote-actions,
  .panel-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .tier-badge {
    white-space: normal;
  }
}
