:root {
  --bg: #f4f6f3;
  --panel: rgba(255, 255, 255, 0.9);
  --line: rgba(15, 23, 42, 0.1);
  --text: #132033;
  --muted: #5b6678;
  --blue: #1f49ff;
  --emerald: #0f8f68;
  --emerald-deep: #0c6f51;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.1);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --container: min(1120px, calc(100vw - 40px));
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(31, 73, 255, 0.1), transparent 28%),
    radial-gradient(circle at left bottom, rgba(15, 143, 104, 0.1), transparent 30%),
    linear-gradient(180deg, #fbfcfa 0%, var(--bg) 100%);
}

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

button {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.proposal-page {
  padding: 22px 0 40px;
}

.proposal-topbar,
.proposal-shell {
  width: var(--container);
  margin: 0 auto;
}

.proposal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding: 16px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.proposal-brand img {
  width: 174px;
  max-width: 42vw;
}

.proposal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald), #10b981);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(15, 143, 104, 0.2);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent 32%);
  pointer-events: none;
}

.proposal-hero,
.proposal-grid .card,
.proposal-content-card,
.empty-state {
  padding: 28px;
}

.proposal-hero {
  margin-bottom: 22px;
}

.proposal-content-card {
  margin-bottom: 30px;
}

.eyebrow,
.section-label,
.meta-item span {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow,
.section-label {
  color: var(--emerald-deep);
}

.greeting-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(15, 143, 104, 0.1);
  color: var(--emerald-deep);
  font-weight: 700;
}

h1,
h2,
.summary-value,
.total-badge {
  font-family: "Sora", sans-serif;
  letter-spacing: -0.04em;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 4.8vw, 4.6rem);
  line-height: 0.98;
  max-width: 14ch;
}

h2 {
  margin: 6px 0 0;
  font-size: 1.5rem;
}

.lede {
  max-width: 68ch;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.72;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

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

.proposal-grid--single {
  grid-template-columns: 1fr;
}

.meta-grid,
.summary-grid,
.pricing-grid {
  display: grid;
  gap: 14px;
}

.meta-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.meta-item,
.summary-card,
.pricing-card,
.contact-box {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.meta-item strong {
  display: block;
  margin-top: 10px;
  font-size: 1rem;
  line-height: 1.4;
}

.summary-card strong,
.pricing-card strong {
  display: block;
  margin-top: 8px;
}

.summary-value {
  display: block;
  margin-top: 10px;
  font-size: 1.55rem;
}

.summary-note,
.pricing-card p,
.contact-box p,
.note-list li,
.bullet-list li {
  color: var(--muted);
  line-height: 1.7;
}

.bullet-list,
.note-list {
  display: grid;
  gap: 12px;
  padding-left: 18px;
  margin: 22px 0 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.total-badge {
  display: inline-flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(15, 143, 104, 0.12);
  color: var(--emerald-deep);
  font-size: 1rem;
}

.pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.pricing-card p {
  margin: 10px 0 0;
}

.table-wrap {
  margin-top: 22px;
  overflow: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
}

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

th,
td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.94rem;
}

th {
  background: rgba(15, 143, 104, 0.08);
  color: var(--emerald-deep);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.contact-box {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.contact-box strong,
.contact-box a {
  font-size: 1rem;
  font-weight: 700;
}

.empty-state {
  display: grid;
  gap: 16px;
  justify-items: start;
}

.empty-state h1 {
  max-width: 11ch;
  font-size: clamp(2rem, 5vw, 3.2rem);
}

@media (max-width: 980px) {
  .proposal-grid,
  .pricing-grid,
  .meta-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  :root {
    --container: min(100vw - 24px, 1120px);
  }

  .proposal-page {
    padding-top: 12px;
  }

  .proposal-topbar {
    flex-direction: column;
    align-items: stretch;
    border-radius: 28px;
  }

  .proposal-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .proposal-hero,
  .proposal-grid .card,
  .proposal-content-card,
  .empty-state {
    padding: 22px;
  }
}

@media print {
  body {
    background: #fff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .proposal-page {
    padding: 0;
  }

  .proposal-topbar {
    display: none;
  }

  .proposal-topbar,
  .proposal-shell {
    width: 100%;
  }

  .proposal-grid {
    gap: 20px;
    margin-bottom: 20px;
  }

  [data-proposal-content] {
    display: block !important;
  }

  [data-empty-state] {
    display: none !important;
  }

  .card {
    box-shadow: none;
    border: 1px solid #d7dce4;
    background: #fff;
  }

  .card::before {
    display: none;
  }

  .print-hide {
    display: none !important;
  }

  .table-wrap {
    overflow: visible !important;
    border-radius: 0;
  }

  table {
    width: 100% !important;
    min-width: 0;
    table-layout: fixed;
  }

  thead {
    display: table-header-group;
  }

  tr,
  .card,
  .pricing-card,
  .summary-card,
  .meta-item {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  th,
  td {
    padding: 10px 12px;
    font-size: 0.78rem;
    vertical-align: top;
    word-break: break-word;
  }

  th:first-child,
  td:first-child {
    width: 30%;
  }

  th:not(:first-child),
  td:not(:first-child) {
    width: 14%;
  }
}
