:root {
  --bg: #f7f8f5;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --ink: #172033;
  --muted: #667085;
  --line: #d9e0e8;
  --primary: #126b62;
  --primary-dark: #0d4f49;
  --blue: #2459a7;
  --amber: #9a5b13;
  --red: #b42318;
  --green: #17803d;
  --shadow: 0 14px 40px rgba(23, 32, 51, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 14px clamp(18px, 4vw, 48px);
  background: rgba(247, 248, 245, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

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

.mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: linear-gradient(135deg, #126b62, #2459a7);
  color: #fff;
  font-weight: 800;
}

.brand strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.client-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.side-panel,
.panel,
.metric,
.login-panel,
.modal-panel,
.drawer-panel,
.kanban-column,
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 1px rgba(23, 32, 51, 0.03);
}

.side-panel {
  position: sticky;
  top: 92px;
  padding: 18px;
}

.side-panel h1,
.panel h1,
.login-panel h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.18;
}

.side-panel p,
.panel p,
.empty {
  color: var(--muted);
  line-height: 1.55;
}

.step-list {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.step-pill {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  text-align: left;
}

.step-pill b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 12px;
}

.step-pill.active {
  border-color: #a7c9c5;
  color: var(--ink);
  background: #edf7f5;
}

.step-pill.active b {
  background: var(--primary);
  color: #fff;
}

.panel {
  padding: clamp(18px, 3vw, 30px);
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.section-title h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.section-title p {
  margin: 6px 0 0;
  max-width: 700px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

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

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field.full {
  grid-column: 1 / -1;
}

.field label,
.label {
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.field small {
  color: var(--muted);
  line-height: 1.35;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
}

textarea {
  min-height: 104px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 107, 98, 0.12);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segment {
  position: relative;
}

.segment input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.segment span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.segment input:checked + span {
  border-color: var(--primary);
  background: #edf7f5;
  color: var(--primary-dark);
}

.subsection {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.subsection h3 {
  margin: 0 0 14px;
  font-size: 16px;
}

.hours {
  display: grid;
  gap: 8px;
}

.hour-row {
  display: grid;
  grid-template-columns: 116px 92px repeat(2, minmax(94px, 1fr));
  gap: 8px;
  align-items: center;
}

.hour-row strong {
  font-size: 13px;
}

.checkline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.checkline input {
  width: 18px;
  height: 18px;
  min-height: auto;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.plan-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}

.plan-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.plan-card:has(input:checked) {
  border-color: var(--primary);
  background: #eef8f6;
}

.plan-card strong {
  font-size: 18px;
}

.plan-card b {
  font-size: 24px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.button.primary,
button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.button.blue,
button.blue {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.button.danger,
button.danger {
  border-color: #fecaca;
  color: var(--red);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.client-success {
  max-width: 760px;
  margin: 56px auto;
  padding: 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.client-success h1 {
  margin-top: 0;
}

.login-wrap {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.login-panel {
  width: min(440px, 100%);
  padding: 26px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric {
  padding: 16px;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

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

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab {
  background: #fff;
}

.tab.active {
  border-color: var(--primary);
  background: #edf7f5;
  color: var(--primary-dark);
}

.filters {
  display: flex;
  gap: 8px;
  min-width: min(520px, 100%);
}

.kanban {
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.kanban-column {
  min-height: 340px;
  padding: 12px;
}

.kanban-column h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 14px;
}

.count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 24px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
}

.client-card {
  display: grid;
  gap: 8px;
  width: 100%;
  margin-bottom: 9px;
  padding: 12px;
  text-align: left;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  background: #fff;
}

.client-card strong {
  overflow-wrap: anywhere;
}

.client-card span,
.meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: #475467;
  background: #f8fafc;
  font-size: 12px;
  text-transform: uppercase;
}

.status,
.pay-status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.status.done,
.pay-status.paid {
  background: #e8f7ee;
  color: var(--green);
}

.pay-status.overdue {
  background: #fff1f0;
  color: var(--red);
}

.pay-status.pending {
  background: #fff7e6;
  color: var(--amber);
}

.modal,
.drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  background: rgba(15, 23, 42, 0.42);
}

.modal.open,
.drawer.open {
  display: grid;
}

.modal {
  place-items: center;
  padding: 18px;
}

.modal-panel {
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  padding: 24px;
  box-shadow: var(--shadow);
}

.terms-copy {
  display: grid;
  gap: 10px;
  color: #344054;
  line-height: 1.5;
}

.drawer {
  justify-items: end;
}

.drawer-panel {
  width: min(920px, 100%);
  height: 100vh;
  overflow: auto;
  border-radius: 0;
  padding: 22px;
  box-shadow: var(--shadow);
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.drawer-header h2 {
  margin: 0;
  overflow-wrap: anywhere;
}

.file-list,
.payment-list {
  display: grid;
  gap: 8px;
}

.file-row,
.payment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: none;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 8px;
  color: #fff;
  background: #172033;
  box-shadow: var(--shadow);
}

.toast.show {
  display: block;
}

.proposal-modal {
  width: min(940px, 100%);
}

.proposal-upload-field {
  align-self: stretch;
}

.proposal-dropzone {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 176px;
  padding: 18px;
  border: 1.5px dashed #a9b8cc;
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.proposal-dropzone:focus,
.proposal-dropzone.dragging {
  border-color: #4285f4;
  background: #eef5ff;
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.14);
  outline: none;
}

.proposal-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.proposal-dropzone strong {
  font-size: 16px;
}

.proposal-dropzone span,
.proposal-dropzone small {
  color: #667085;
  line-height: 1.35;
}

.proposal-dropzone small {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.proposal-dropzone button {
  min-height: 34px;
  padding: 7px 10px;
  border-color: #4285f4;
  color: #2459a7;
}

.proposal-public {
  --g-blue: #4285f4;
  --g-red: #ea4335;
  --g-yellow: #fbbc05;
  --g-green: #34a853;
  min-height: 100vh;
  background: #f7f9fc;
  color: #111827;
}

.proposal-loader {
  display: grid;
  place-items: center;
  min-height: 100vh;
  color: var(--muted);
  font-weight: 800;
}

.proposal-hero,
.proposal-band,
.proposal-close {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.proposal-hero {
  position: relative;
  padding: 24px 0 48px;
}

.google-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 6px;
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: 999px;
}

.google-strip i:nth-child(1),
.dot.blue,
.method-step.blue b {
  background: var(--g-blue);
}

.google-strip i:nth-child(2),
.dot.red,
.method-step.red b {
  background: var(--g-red);
}

.google-strip i:nth-child(3),
.dot.yellow {
  background: var(--g-yellow);
}

.google-strip i:nth-child(4),
.dot.green,
.method-step.green b {
  background: var(--g-green);
}

.proposal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(26px, 5vw, 64px);
}

.proposal-nav img {
  width: min(190px, 48vw);
  height: auto;
}

.proposal-nav span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  color: #475467;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.proposal-hero-grid,
.proposal-two,
.investment-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: clamp(18px, 4vw, 38px);
  align-items: center;
}

.proposal-kicker {
  margin: 0 0 12px;
  color: var(--g-blue);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.proposal-hero h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(42px, 8vw, 92px);
  line-height: 0.95;
  letter-spacing: 0;
}

.proposal-subtitle {
  max-width: 760px;
  color: #344054;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.38;
}

.proposal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.proposal-tags span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.proposal-score,
.activation-box,
.recurrence-box {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(23, 32, 51, 0.08);
}

.proposal-score span,
.activation-box span,
.recurrence-box span {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.proposal-score strong {
  display: block;
  margin: 8px 0;
  color: var(--g-red);
  font-size: clamp(56px, 9vw, 96px);
  line-height: 1;
}

.proposal-score p,
.activation-box p,
.recurrence-box p {
  color: #475467;
  line-height: 1.55;
}

.proposal-band {
  padding: clamp(34px, 6vw, 72px) 0;
}

.proposal-band.white {
  width: 100%;
  max-width: none;
  padding-inline: max(16px, calc((100vw - 1120px) / 2));
  background: #fff;
  border-block: 1px solid #e7edf5;
}

.proposal-section-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.proposal-section-title h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
}

.proposal-section-title p {
  max-width: 760px;
  margin: 8px 0 0;
  color: #667085;
  line-height: 1.5;
}

.dot {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 8px;
  border-radius: 50%;
}

.proposal-two.reverse {
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
}

.proposal-copy h3 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 36px);
}

.proposal-copy p,
.proposal-copy li {
  color: #344054;
  font-size: 16px;
  line-height: 1.62;
}

.proposal-copy ul {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding-left: 20px;
}

.proposal-asset {
  margin: 0;
  overflow: hidden;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(23, 32, 51, 0.1);
}

.proposal-asset img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 760px;
  object-fit: contain;
  background: #fff;
}

.proposal-asset figcaption {
  padding: 10px 12px;
  border-top: 1px solid #e7edf5;
  color: #475467;
  font-size: 13px;
  font-weight: 800;
}

.proposal-asset.placeholder {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 24px;
  text-align: center;
}

.proposal-asset.placeholder span {
  font-weight: 900;
}

.proposal-data {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.proposal-data div {
  padding: 12px;
  border: 1px solid #e7edf5;
  border-radius: 8px;
  background: #f8fafc;
}

.proposal-data dt {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.proposal-data dd {
  margin: 4px 0 0;
  color: #172033;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.method-step {
  padding: 20px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
}

.method-step b {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  border-radius: 50%;
  color: #fff;
}

.method-step h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.method-step p {
  margin: 0;
  color: #475467;
  line-height: 1.55;
}

.activation-box {
  color: #fff;
  background: #111827;
  border-color: #111827;
}

.activation-box span,
.activation-box p {
  color: #e5e7eb;
}

.activation-box h3,
.recurrence-box h3 {
  margin: 10px 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
}

.activation-box strong {
  display: block;
  margin-top: 18px;
  padding: 14px;
  border-radius: 8px;
  background: var(--g-blue);
}

.recurrence-box {
  border: 2px solid var(--g-blue);
}

.recurrence-box h3 {
  color: var(--g-blue);
}

.recurrence-box small {
  display: block;
  color: #667085;
  line-height: 1.45;
}

.attachment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.proposal-attachment {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
}

.proposal-attachment strong {
  color: #172033;
}

.proposal-attachment span {
  color: #667085;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.proposal-close {
  padding: 56px 0 72px;
  text-align: center;
}

.proposal-close img {
  width: min(220px, 60vw);
  height: auto;
}

.proposal-close h2 {
  margin: 18px 0 8px;
  font-size: clamp(28px, 4vw, 44px);
}

.proposal-close p {
  max-width: 680px;
  margin: 0 auto;
  color: #475467;
  line-height: 1.55;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .client-layout,
  .grid,
  .grid.three,
  .grid.four,
  .metric-grid,
  .plan-grid,
  .proposal-hero-grid,
  .proposal-two,
  .proposal-two.reverse,
  .investment-grid,
  .method-grid,
  .attachment-grid {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }

  .hour-row {
    grid-template-columns: 1fr 90px 1fr 1fr;
  }

  .toolbar,
  .admin-header {
    align-items: stretch;
    flex-direction: column;
  }

  .filters {
    min-width: 0;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .page {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .topbar {
    padding-inline: 12px;
  }

  .brand span {
    display: none;
  }

  .panel,
  .side-panel,
  .drawer-panel {
    padding: 16px;
  }

  .hour-row {
    grid-template-columns: 1fr;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .actions button {
    width: 100%;
  }

  .proposal-hero,
  .proposal-band,
  .proposal-close {
    width: min(100% - 20px, 1120px);
  }

  .proposal-band.white {
    padding-inline: 10px;
  }

  .proposal-nav {
    align-items: flex-start;
    flex-direction: column;
  }
}
