* {
  box-sizing: border-box;
}

:root {
  --bg: #eef2f7;
  --panel-bg: #f4f7fb;
  --card: #ffffff;
  --text: #15264b;
  --text-strong: #102248;
  --muted: #7181a6;
  --muted-soft: #8a97b2;
  --border: #dfe5f0;
  --border-strong: #d7dfec;
  --primary: #2f66f3;
  --primary-dark: #2556d5;
  --primary-soft: #eaf1ff;
  --primary-tint: #f5f8ff;
  --success: #31c48d;
  --success-soft: #e9fbf4;
  --warning: #f5af3f;
  --warning-soft: #fff5e7;
  --danger-soft: #fff1f0;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.04);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --content-width: 1440px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.72), transparent 28%),
    linear-gradient(180deg, #edf1f7 0%, #eef2f7 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

body.settlelink-dark-mode {
  background:
    radial-gradient(circle at top left, rgba(47, 102, 243, 0.10), transparent 28%),
    linear-gradient(180deg, #0b1220 0%, #111827 100%);
  color: #e5eefc;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

#app {
  min-height: 100vh;
}

html.js-preload body {
  visibility: hidden;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 247, 251, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(223, 229, 240, 0.95);
}

.nav-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 10px 16px;
  min-height: 56px;
  border-radius: 18px;
  background: #66748a;
  border: 1px solid #66748a;
  box-shadow: var(--shadow-soft);
  color: var(--text);
  overflow: hidden;
}

.brand-marketing {
  min-width: 220px;
  background: #ffffff;
  border: 2px solid #2f66f3;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.brand-icon-only {
  width: 88px;
  min-width: 88px;
  padding: 12px;
  border-radius: 22px;
}

.brand-logo-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  border-radius: 10px;
}

.brand-logo {
  height: 22px;
  width: auto;
  display: block;
}


.brand-logo-full {
  height: 34px;
  width: auto;
  max-width: 100%;
  display: block;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-links a,
.nav-links button {
  padding: 10px 12px;
  border-radius: 12px;
  color: #66728f;
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.nav-links button {
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.nav-links a:hover,
.nav-links button:hover {
  background: #ffffff;
  color: var(--text);
  transform: translateY(-1px);
}

.nav-links .nav-cta {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(47, 102, 243, 0.18);
}

.nav-links .nav-cta:hover {
  background: var(--primary-dark);
  color: #ffffff;
}

.app-shell {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 24px 18px 72px;
}

.app-shell-builder {
  max-width: 1480px;
}

.builder-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.builder-sidebar-brand-full {
  background: transparent;
  border: none;
  border-radius: 0;
  margin-bottom: 18px;
  box-shadow: none;
  min-height: auto;
}

.builder-sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 110px;
  padding: 18px 12px;
  border: 2px solid #2f66f3;
  border-radius: 18px;
  background: #ffffff;
  margin-bottom: 0;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(47, 102, 243, 0.08);
}

.builder-sidebar-logo-full {
  width: auto;
  max-width: 160px;
  height: 40px;
  object-fit: contain;
  display: block;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
}

.logo img {
  height: 32px;
}

.builder-sidebar-nav {
  display: grid;
  gap: 8px;
}

.builder-sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 16px;
  color: #3b4b70;
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.builder-sidebar-link:hover {
  background: #eef4ff;
  color: var(--primary);
  transform: translateY(-1px);
}

.builder-sidebar-link.active {
  background: #e8eefc;
  color: var(--primary);
}

.builder-sidebar-icon,
.mobile-bottom-nav-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
  opacity: 0.9;
}

.builder-sidebar-icon::before,
.builder-sidebar-icon::after,
.mobile-bottom-nav-icon::before,
.mobile-bottom-nav-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.icon-dashboard::before {
  inset: 2px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.icon-dashboard::after {
  left: 5px;
  top: 5px;
  width: 8px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor;
}

.icon-projects::before {
  left: 2px;
  top: 3px;
  width: 14px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.icon-projects::after {
  left: 5px;
  top: 1px;
  width: 8px;
  height: 4px;
  border: 2px solid currentColor;
  border-bottom: none;
  border-radius: 3px 3px 0 0;
}

.icon-subcontractors::before {
  left: 4px;
  top: 2px;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.icon-subcontractors::after {
  left: 2px;
  bottom: 2px;
  width: 14px;
  height: 7px;
  border: 2px solid currentColor;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  border-bottom: none;
}

.icon-receipts::before {
  left: 4px;
  top: 2px;
  width: 10px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.icon-receipts::after {
  left: 6px;
  top: 6px;
  width: 6px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor;
}

.icon-company::before {
  left: 4px;
  top: 2px;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.icon-company::after {
  left: 3px;
  bottom: 2px;
  width: 12px;
  height: 6px;
  border: 2px solid currentColor;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  border-bottom: none;
}

.builder-main {
  min-width: 0;
}

.builder-mobile-logo {
  display: none;
}
.client-top-logo-wrap {
  margin-bottom: 18px;
}

.client-top-logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 74px;
  padding: 12px 18px;
  border-radius: 24px;
  background: #ffffff;
  border: 2px solid #d6e3ff;
  box-shadow: var(--shadow-soft);
}

.client-top-logo-link {
  text-decoration: none;
}

.client-top-logo-image {
  width: auto;
  max-width: 210px;
  height: 34px;
  object-fit: contain;
  display: block;
}

body.settlelink-client-open .top-nav {
  display: none;
}

.app-shell-client {
  max-width: 980px;
}

.mobile-bottom-nav {
  display: none;
}

.dashboard-shell {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 34px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.dashboard-topbar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 18px;
}

.dashboard-welcome-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.03;
  letter-spacing: -0.035em;
  color: var(--text-strong);
}

.dashboard-company-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--border);
  color: #334364;
  font-weight: 700;
  width: fit-content;
  box-shadow: var(--shadow-soft);
}

.dashboard-company-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, #d0d8e8 0%, #aebbd3 100%);
}

.dashboard-company-caret {
  color: #7f8cad;
}

.dashboard-metric-row {
  display: none;
}

.dashboard-metric-card {
  display: none;
}

.dashboard-metric-card-action {
  display: none;
}

.dashboard-metric-label {
  display: block;
  font-size: 13px;
  color: #6d7b98;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-metric-value {
  display: block;
  font-size: 29px;
  line-height: 1.05;
  font-weight: 800;
  color: var(--text);
}

.dashboard-view-btn,
.dashboard-create-project-btn,
.dashboard-open-project-btn {
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.dashboard-view-btn:hover,
.dashboard-create-project-btn:hover,
.dashboard-open-project-btn:hover {
  transform: translateY(-1px);
  opacity: 0.98;
}

.dashboard-view-btn {
  background: #eef3ff;
  color: var(--primary);
  padding: 10px 16px;
  border-radius: 14px;
}

.dashboard-projects-section {
  margin-top: 8px;
}

.dashboard-projects-heading {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 14px;
}

.dashboard-projects-heading h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  color: var(--text-strong);
}

.dashboard-create-project-btn {
  width: fit-content;
  background: var(--primary);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(47, 102, 243, 0.18);
}

.dashboard-projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.dashboard-project-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.dashboard-project-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.dashboard-project-title {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.08;
  color: var(--text);
  letter-spacing: -0.025em;
}

.dashboard-project-meta-line {
  margin: 0;
  color: #7080a0;
  font-size: 14px;
  line-height: 1.5;
}

.dashboard-meta-dot {
  margin: 0 6px;
  color: #b2bdd2;
}

.dashboard-project-menu {
  border: none;
  background: transparent;
  color: #7f8cad;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  min-height: auto;
  min-width: auto;
}

.dashboard-project-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: center;
}

.dashboard-project-due-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}

.dashboard-open-project-btn {
  background: #eef3ff;
  color: var(--primary);
  padding: 10px 14px;
  border-radius: 14px;
  width: fit-content;
}

.dashboard-project-progress-wrap {
  display: grid;
  gap: 8px;
}

.dashboard-project-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #edf1f7;
  overflow: hidden;
}

.dashboard-project-progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #72d6ab 0%, #4ecb95 100%);
}

.dashboard-project-progress-fill.is-complete {
  background: linear-gradient(90deg, #63d39b 0%, #3ecb83 100%);
}

.dashboard-project-progress-fill.is-waiting {
  background: linear-gradient(90deg, #72d6ab 0%, #4ecb95 100%);
}

.dashboard-project-progress-fill.is-draft {
  background: linear-gradient(90deg, #ffd27a 0%, #f5af3f 100%);
}

.dashboard-project-progress-fill.is-empty {
  background: #d8e1f0;
}

.dashboard-project-progress-note {
  color: #6f7e9d;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-project-due-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.dashboard-project-due-pill {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border-radius: 14px;
  background: #fdeaea;
  color: #d92d20;
  font-weight: 800;
  cursor: pointer;
}

.dashboard-project-due-pill span {
  line-height: 1;
}

.dashboard-project-due-arrow {
  font-size: 28px;
  line-height: 1;
}

@media (max-width: 768px) {
  .dashboard-project-due-row {
    grid-template-columns: 1fr;
  }

  .dashboard-project-due-pill {
    min-height: 44px;
  }
}

.dashboard-project-due-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.dashboard-project-due-pill {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border-radius: 14px;
  background: #fdeaea;
  color: #d92d20;
  font-weight: 800;
  cursor: pointer;
}

.dashboard-project-due-pill span {
  line-height: 1;
}

.dashboard-project-due-arrow {
  font-size: 28px;
  line-height: 1;
}

@media (max-width: 768px) {
  .dashboard-project-due-row {
    grid-template-columns: 1fr;
  }

  .dashboard-project-due-pill {
    min-height: 44px;
  }
}

.dashboard-empty-state {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 30px 22px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.dashboard-empty-state h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.dashboard-empty-state p {
  margin: 0 0 16px;
  color: #6f7e9d;
}

.page-header {
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0 0 8px;
  font-size: 38px;
  line-height: 1.03;
  letter-spacing: -0.04em;
  color: var(--text-strong);
}

h2,
h3 {
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

.page-subtitle,
.muted-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.hero,
.hero-card,
.panel,
.metric-card,
.receipt-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.hero,
.hero-card {
  padding: 24px;
  margin-bottom: 18px;
}

.hero h1,
.hero-card h1 {
  max-width: 900px;
}

.hero p,
.hero-card p {
  max-width: 920px;
}

.summary-grid,
.metrics-grid,
.receipt-grid,
.payment-record-grid,
.project-grid,
.dashboard-detail-grid,
.stack-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.project-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

.stack-layout {
  grid-template-columns: 1fr;
  gap: 12px;
}

.metric-card,
.receipt-card,
.project-stat {
  padding: 10px 12px;
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-card strong,
.receipt-card strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.metric-value {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
}

.panel {
  padding: 20px;
}

.panel-header,
.job-panel-header,
.stage-panel-header,
.sub-item-top,
.project-card-top,
.project-card-footer,
.inline-status-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-title {
  font-size: 22px;
  line-height: 1.1;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.empty-panel {
  text-align: center;
  padding: 30px 22px;
}

.primary-btn,
.secondary-btn {
  border: none;
  border-radius: 14px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
  min-height: 42px;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-1px);
}

.primary-btn {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(47, 102, 243, 0.16);
}

.primary-btn:hover {
  background: var(--primary-dark);
}

.secondary-btn {
  background: #ffffff;
  color: var(--primary);
  border: 1px solid #d6e3ff;
}

.secondary-btn:hover {
  background: #f8fbff;
}

.status-badge,
.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 32px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge.draft,
.status-chip.draft {
  background: #eef2f6;
  color: #475467;
}

.status-badge.setup,
.status-chip.review,
.status-chip.overdue {
  background: #fff4e5;
  color: #b54708;
}

.status-badge.approval,
.status-chip.sent,
.status-chip.active {
  background: #eaf2ff;
  color: #175cd3;
}

.status-badge.payment,
.status-chip.approved {
  background: #ecfdf3;
  color: #027a48;
}

.status-badge.paid,
.status-chip.paid {
  background: #dcfae6;
  color: #067647;
}

.status-chip.neutral {
  background: #f1f5f9;
  color: #475569;
}

.form-panel {
  padding: 22px;
}

.form-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group label {
  font-weight: 700;
  color: #344054;
}

.text-input {
  width: 100%;
  border: 1px solid #d0d5dd;
  border-radius: 14px;
  padding: 12px 14px;
  background: #ffffff;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.text-input:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(47, 102, 243, 0.1);
  border-color: rgba(47, 102, 243, 0.45);
}

body.settlelink-dark-mode .top-nav {
  background: rgba(11, 18, 32, 0.94);
  border-bottom: 1px solid #243041;
}

body.settlelink-dark-mode .nav-links a {
  color: #c8d4ea;
}

body.settlelink-dark-mode .nav-links a:hover {
  background: #162033;
  color: #ffffff;
}

body.settlelink-dark-mode .brand-marketing,
body.settlelink-dark-mode .builder-mobile-logo,
body.settlelink-dark-mode .client-top-logo-card,
body.settlelink-dark-mode .builder-sidebar-brand,
body.settlelink-dark-mode .panel,
body.settlelink-dark-mode .form-panel,
body.settlelink-dark-mode .hero,
body.settlelink-dark-mode .hero-card,
body.settlelink-dark-mode .metric-card,
body.settlelink-dark-mode .receipt-card,
body.settlelink-dark-mode .dashboard-shell,
body.settlelink-dark-mode .dashboard-project-card,
body.settlelink-dark-mode .dashboard-empty-state,
body.settlelink-dark-mode .marketing-card,
body.settlelink-dark-mode .legal-card,
body.settlelink-dark-mode .project-card,
body.settlelink-dark-mode .project-stat,
body.settlelink-dark-mode .invoice-contact-card,
body.settlelink-dark-mode .invoice-wording-block,
body.settlelink-dark-mode .app-modal-card {
  background: #101827;
  border-color: #243041;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

body.settlelink-dark-mode h1,
body.settlelink-dark-mode h2,
body.settlelink-dark-mode h3,
body.settlelink-dark-mode .panel-title,
body.settlelink-dark-mode .dashboard-welcome-title,
body.settlelink-dark-mode .dashboard-project-title,
body.settlelink-dark-mode .app-modal-title {
  color: #f8fbff;
}

body.settlelink-dark-mode .page-subtitle,
body.settlelink-dark-mode .muted-text,
body.settlelink-dark-mode .invoice-doc-note,
body.settlelink-dark-mode .dashboard-project-meta-line,
body.settlelink-dark-mode .dashboard-project-progress-note,
body.settlelink-dark-mode .dashboard-company-caret,
body.settlelink-dark-mode .marketing-card p,
body.settlelink-dark-mode .legal-card p {
  color: #9fb0cf;
}

body.settlelink-dark-mode .text-input,
body.settlelink-dark-mode select,
body.settlelink-dark-mode textarea {
  background: #0b1322;
  color: #f8fbff;
  border-color: #30415c;
}

body.settlelink-dark-mode .secondary-btn {
  background: #101827;
  color: #dbe6ff;
  border-color: #30415c;
}

body.settlelink-dark-mode .secondary-btn:hover {
  background: #162033;
}

body.settlelink-dark-mode .builder-sidebar-link,
body.settlelink-dark-mode .mobile-bottom-nav-link {
  color: #c8d4ea;
}

body.settlelink-dark-mode .builder-sidebar-link:hover,
body.settlelink-dark-mode .builder-sidebar-link.active,
body.settlelink-dark-mode .mobile-bottom-nav-link.active {
  background: #162033;
  color: #ffffff;
}

body.settlelink-dark-mode .mobile-bottom-nav {
  background: rgba(11, 18, 32, 0.96);
  border-color: #243041;
}

body.settlelink-dark-mode .dashboard-company-pill,
body.settlelink-dark-mode .invoice-contact-card-item,
body.settlelink-dark-mode .notice-box,
body.settlelink-dark-mode .calculator-total,
body.settlelink-dark-mode .payment-feedback-box {
  background: #0f1728;
  border-color: #243041;
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap .text-input {
  padding-right: 54px;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  min-height: auto;
}

.auth-switch-row {
  margin-top: 14px;
}

.auth-switch-text {
  margin: 0;
  color: var(--muted);
}

.auth-link-btn {
  border: none;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.stage-photo-preview {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.payment-hero-card {
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.success-hero-card,
.receipt-hero-card {
  background: linear-gradient(180deg, #f4fff8 0%, #ecfdf3 100%);
  border-color: #b7e4c7;
}

.success-hero-card .panel-title,
.receipt-hero-card .panel-title,
.success-hero-card strong,
.receipt-hero-card strong {
  color: #067647;
}

.payment-feedback-box {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.error-box {
  border-color: #fecdca;
  background: #fff6f5;
}

.success-box {
  border-color: #abefc6;
  background: #ecfdf3;
}

.feedback-text {
  margin: 0;
  font-weight: 700;
}

.summary-line,
.timeline-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.summary-line:last-child,
.timeline-row:last-child {
  border-bottom: none;
}

.timeline-card,
.detail-list {
  display: grid;
  gap: 0;
}

.receipt-grid,
.payment-record-grid {
  margin-top: 14px;
}

.project-card {
  padding: 16px;
}

.project-inline-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.project-stat {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fbfdff;
}

.project-stat span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-stat strong {
  font-size: 15x;
  line-height: 1.2;
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e7eef8;
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

.project-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.project-invoices-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.project-invoices-list .panel {
  width: 100%;
}

.project-invoices-list .metrics-grid {
  grid-template-columns: 1fr;
  gap: 10px;
}

.project-invoices-list .button-row {
  gap: 8px;
}

.section-heading {
  margin: 0 0 16px;
}

.hero p,
.panel p,
.metric-card p {
  margin-top: 0;
}

.calculator-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.calculator-list {
  display: grid;
  gap: 0;
  margin-top: 16px;
}

.calculator-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.calculator-total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid #d7e3ff;
  border-radius: 18px;
  background: #f6f9ff;
}

.calculator-total span {
  font-weight: 700;
  color: var(--muted);
}

.calculator-total strong {
  font-size: 26px;
  line-height: 1.1;
  color: var(--primary);
}

.toast-layer {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9999;
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.app-toast {
  min-width: 220px;
  max-width: min(360px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(21, 38, 75, 0.96);
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.app-toast.success .app-toast-dot {
  background: #49d597;
}

.app-toast.info .app-toast-dot {
  background: #6fa3ff;
}

.app-toast-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.app-toast-text {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

/* marketing polish */
.marketing-hero {
  padding: 30px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(47, 102, 243, 0.08), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.marketing-hero-actions {
  margin-top: 18px;
}

.marketing-split-grid,
.marketing-feature-grid,
.marketing-steps-grid,
.marketing-trust-grid,
.marketing-footer-grid {
  display: grid;
  gap: 14px;
}

.marketing-feature-grid.three-up,
.marketing-steps-grid.three-up,
.marketing-trust-grid.three-up {
  grid-template-columns: 1fr;
}

.marketing-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  padding: 20px;
}

.marketing-card h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.marketing-card p {
  margin: 0;
  color: var(--muted);
}

.marketing-card-number {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: #edf3ff;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-bottom: 14px;
}

.marketing-highlight {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.marketing-mini-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.marketing-stat {
  padding: 16px 18px;
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: 20px;
}

.marketing-stat-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 800;
}

.marketing-stat strong {
  display: block;
  font-size: 26px;
  line-height: 1.05;
}

.marketing-section-title {
  margin-bottom: 14px;
}

.marketing-section-title p {
  margin-top: 8px;
  color: var(--muted);
}

.marketing-cta-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%);
}

.marketing-note {
  font-size: 13px;
  color: var(--muted-soft);
}

.legal-grid {
  display: grid;
  gap: 14px;
}

.legal-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  padding: 20px;
}

.legal-card h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.legal-card h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.legal-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.legal-list li {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fbfdff;
  color: var(--text);
}

.legal-list strong {
  display: block;
  margin-bottom: 4px;
}

.notice-box {
  border: 1px solid #d7e3ff;
  background: #f7faff;
  border-radius: 18px;
  padding: 16px 18px;
}

.notice-box.warning {
  border-color: #f8d7a4;
  background: #fffaf1;
}

.notice-box.success {
  border-color: #bde9d2;
  background: #f2fcf7;
}

.kicker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.soft-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.invoice-photo-item {
  display: grid;
  gap: 10px;
}

.invoice-doc-root {
  padding: 28px;
  font-family: Arial, Helvetica, sans-serif;
  color: #15264b;
  background: #ffffff;
}

.invoice-doc-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.invoice-doc-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 28px;
}

.invoice-doc-brand img {
  height: 32px;
  width: auto;
}

.invoice-doc-title {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
}

.invoice-doc-subtitle {
  margin: 6px 0 0;
  color: #6c7a98;
}

.invoice-doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.invoice-doc-card {
  border: 1px solid #dfe5f0;
  border-radius: 18px;
  padding: 16px;
}

.invoice-doc-card-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7181a6;
  font-weight: 800;
}

.invoice-doc-card strong {
  display: block;
  font-size: 24px;
  line-height: 1.15;
}

.invoice-doc-section {
  border: 1px solid #dfe5f0;
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 18px;
}

.invoice-doc-section h3 {
  margin: 0 0 12px;
  font-size: 20px;
}

.invoice-doc-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid #e5ebf4;
}

.invoice-doc-row:last-child {
  border-bottom: none;
}

.invoice-doc-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #d7e3ff;
  background: #f6f9ff;
  margin-top: 14px;
}

.invoice-doc-total span {
  font-weight: 700;
  color: #62718f;
}

.invoice-doc-total strong {
  font-size: 30px;
  line-height: 1.05;
  color: var(--primary);
}

.invoice-doc-note {
  color: #7181a6;
  line-height: 1.6;
}

.invoice-doc-photo-list {
  display: grid;
  gap: 12px;
}

.invoice-doc-photo-list img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid #dfe5f0;
}

@media (max-width: 768px) {
  .invoice-doc-root {
    padding: 18px;
  }

  .invoice-doc-header {
    flex-direction: column;
    gap: 14px;
  }

  .invoice-doc-grid {
    grid-template-columns: 1fr;
  }

  .invoice-doc-total {
    align-items: flex-start;
    flex-direction: column;
  }

  .invoice-doc-total strong {
    font-size: 24px;
  }
}

.payment-hero-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payment-hero-amount {
  font-size: 32px;
  line-height: 1;
  font-weight: 800;
  color: var(--text);
}

.centered-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.centered-action-row .primary-btn,
.centered-action-row .secondary-btn {
  flex: 0 0 auto;
  min-width: auto;
}

.invoice-wording-stack {
  display: grid;
  gap: 14px;
}

.invoice-wording-block {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
}

.invoice-wording-block h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.invoice-wording-block p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.6;
}

.invoice-wording-block p:last-child {
  margin-bottom: 0;
}

.invoice-photo-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.invoice-simple-shell {
  padding: 18px;
}

.invoice-simple-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 16px;
}

.invoice-simple-main-card,
.invoice-simple-side-card {
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
}

.invoice-simple-total-box,
.invoice-simple-summary-box {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 18px;
  margin-bottom: 14px;
  text-align: center;
}

.invoice-simple-total-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.invoice-simple-total-box strong,
.invoice-simple-summary-box strong {
  display: block;
  font-size: 38px;
  line-height: 1.05;
  color: var(--text-strong);
}

.invoice-simple-lines {
  display: grid;
  gap: 0;
}

.invoice-simple-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.invoice-simple-line:last-child {
  border-bottom: none;
}

.invoice-simple-line span {
  color: var(--text);
  font-weight: 700;
}

.invoice-simple-line strong {
  font-size: 22px;
  line-height: 1.1;
  color: var(--text-strong);
  text-align: right;
}

.invoice-simple-line--saving {
  margin-top: 4px;
  padding-top: 18px;
}

.invoice-simple-line--saving strong {
  color: var(--primary);
}

.invoice-simple-actions {
  margin-top: 16px;
}

@media (max-width: 900px) {
  .invoice-simple-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .invoice-simple-shell,
  .invoice-simple-main-card,
  .invoice-simple-side-card {
    padding: 14px;
  }

  .invoice-simple-total-box strong,
  .invoice-simple-summary-box strong {
    font-size: 30px;
  }

  .invoice-simple-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .invoice-simple-line strong {
    font-size: 20px;
    text-align: left;
  }
}

.invoice-simple-shell {
  padding: 18px;
}

.invoice-simple-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 16px;
}

.invoice-simple-main-card,
.invoice-simple-side-card {
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
}

.invoice-simple-total-box,
.invoice-simple-summary-box {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 18px;
  margin-bottom: 14px;
  text-align: center;
}

.invoice-simple-total-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.invoice-simple-total-box strong,
.invoice-simple-summary-box strong {
  display: block;
  font-size: 38px;
  line-height: 1.05;
  color: var(--text-strong);
}

.invoice-simple-lines {
  display: grid;
  gap: 0;
}

.invoice-simple-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.invoice-simple-line:last-child {
  border-bottom: none;
}

.invoice-simple-line span {
  color: var(--text);
  font-weight: 700;
}

.invoice-simple-line strong {
  font-size: 22px;
  line-height: 1.1;
  color: var(--text-strong);
  text-align: right;
}

.invoice-simple-line--saving {
  margin-top: 4px;
  padding-top: 18px;
}

.invoice-simple-line--saving strong {
  color: var(--primary);
}

.invoice-simple-actions {
  margin-top: 16px;
}

@media (max-width: 900px) {
  .invoice-simple-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .invoice-simple-shell,
  .invoice-simple-main-card,
  .invoice-simple-side-card {
    padding: 14px;
  }

  .invoice-simple-total-box strong,
  .invoice-simple-summary-box strong {
    font-size: 30px;
  }

  .invoice-simple-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .invoice-simple-line strong {
    font-size: 20px;
    text-align: left;
  }
}

@media (min-width: 760px) {
  .payment-hero-top {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .payment-hero-amount {
    font-size: 26px;
    line-height: 1.08;
    word-break: break-word;
  }

  .centered-action-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .centered-action-row .primary-btn,
  .centered-action-row .secondary-btn {
    width: 100%;
    min-width: 100%;
  }
}

.invoice-contact-list {
  display: grid;
  gap: 12px;
}

.invoice-contact-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fbfdff;
  padding: 14px;
}

.invoice-contact-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.invoice-contact-card-name {
  margin: 0;
  font-size: 17px;
  line-height: 1.15;
  color: var(--text-strong);
}

.invoice-contact-person {
  display: flex;
  align-items: center;
  gap: 12px;
}

.invoice-contact-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #e7ebf3;
  position: relative;
  flex-shrink: 0;
}

.invoice-contact-avatar::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #9aa8c3;
}

.invoice-contact-avatar::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: 7px;
  width: 26px;
  height: 12px;
  border-radius: 12px 12px 6px 6px;
  background: #9aa8c3;
}


.invoice-contact-card-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.invoice-contact-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.invoice-contact-card-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  padding: 10px 12px;
}

.invoice-contact-card-item span {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.invoice-contact-card-item strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  color: var(--text);
  word-break: break-word;
}

.invoice-contact-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.invoice-contact-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.client-saving-box,
.invoice-doc-saving-box {
  border: 1px solid #b7e4c7;
  background: #f2fcf7;
}

.client-saving-box .invoice-simple-total-label,
.invoice-doc-saving-box span {
  color: #067647;
}

.client-saving-box strong,
.invoice-doc-saving-box strong {
  color: #067647 !important;
}

.client-saving-note,
.invoice-doc-saving-note {
  margin-top: 10px;
  color: #067647;
  font-weight: 700;
}

.form-error-text {
  margin-top: 8px;
  color: #d92d20;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
}

.text-input.input-error {
  border-color: #d92d20;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.10);
}

.app-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 10000;
}

.app-modal-card {
  width: min(520px, 100%);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  padding: 22px;
}

.app-modal-title {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.1;
  color: var(--text-strong);
}

.app-modal-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.app-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.danger-btn {
  background: #fff1f0;
  color: #d92d20;
  border: 1px solid #fecdca;
}

.danger-btn:hover {
  background: #ffe4e1;
}

@media (max-width: 768px) {
  .invoice-contact-card-grid {
    grid-template-columns: 1fr;
  }

  .invoice-contact-card-top {
    flex-direction: column;
  }

  .invoice-contact-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .invoice-contact-card-actions .primary-btn,
  .invoice-contact-card-actions .secondary-btn {
    width: 100%;
  }

  .receipt-grid,
  .payment-record-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .button-row,
  .eyebrow,
  .top-nav,
  .builder-sidebar,
  .dashboard-company-pill,
  .dashboard-project-menu,
  .mobile-bottom-nav,
  .toast-layer {
    display: none !important;
  }

  .app-shell {
    max-width: 100%;
    padding: 0;
  }

  .panel,
  .metric-card,
  .receipt-card,
  .hero,
  .hero-card,
  .dashboard-shell,
  .dashboard-project-card,
  .dashboard-metric-card {
    box-shadow: none;
    border: 1px solid #d0d5dd;
  }
}

@media (min-width: 760px) {
  .nav-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .dashboard-topbar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .dashboard-metric-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-projects-heading {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .dashboard-projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-project-actions {
    grid-template-columns: auto 1fr;
  }

  .dashboard-project-due-row .dashboard-open-project-btn,
  .dashboard-project-actions .dashboard-open-project-btn {
    width: auto;
    text-align: center;
    padding: 9px 13px;
    font-size: 14px;
  }

  .summary-grid,
  .metrics-grid,
  .receipt-grid,
  .payment-record-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .marketing-mini-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .marketing-feature-grid.three-up,
  .marketing-steps-grid.three-up,
  .marketing-trust-grid.three-up {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .legal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-header,
  .job-panel-header,
  .stage-panel-header,
  .sub-item-top,
  .project-card-top,
  .project-card-footer {
    flex-direction: row;
    align-items: flex-start;
  }
}

@media (min-width: 1080px) {
  .builder-layout {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
  }

    .builder-sidebar {
    position: sticky;
    top: 96px;
    min-height: auto;
    height: fit-content;
  }

  .dashboard-shell {
    min-height: 520px;
  }

  .marketing-split-grid {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: stretch;
  }
}

@media (max-width: 768px) {
  .top-nav {
    position: static;
    top: auto;
  }

  .nav-inner {
    padding: 8px 10px;
    gap: 8px;
  }

  body.settlelink-builder-open .top-nav {
    display: none;
  }

  body.settlelink-marketing-open .top-nav {
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
  }

  .brand {
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    min-height: 74px;
  }

  .brand-marketing {
    width: 100%;
    min-width: 0;
    border-radius: 24px;
    border: 2px solid #2f66f3;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
  }

  .brand-icon-only {
    width: 100%;
    min-width: 0;
  }

  .brand-logo-full {
    height: 34px;
  }

  .brand-logo-icon {
    width: 32px;
    height: 32px;
  }

  body.settlelink-marketing-open .nav-links {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
  align-items: stretch;
}

body.settlelink-marketing-open .nav-links a,
body.settlelink-marketing-open .nav-links button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  min-height: 34px;
  padding: 7px 6px;
  line-height: 1.1;
  border-radius: 12px;
  font-size: 12px;
}

body.settlelink-marketing-open .nav-links a:not(.nav-cta) {
  grid-column: span 2;
  min-width: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  color: #66728f;
  box-shadow: none;
}

body.settlelink-marketing-open .nav-links .nav-cta,
body.settlelink-marketing-open .nav-links .nav-install-cta {
  grid-column: span 3;
  min-width: 0;
  min-height: 38px;
  border-radius: 14px;
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(47, 102, 243, 0.14);
}

.nav-install-cta {
  border: none;
  cursor: pointer;
  font: inherit;
  white-space: normal;
  line-height: 1.15;
}

/* keep sidebar styling separate (fixes broken merge) */
  .builder-sidebar-brand-full {
    background: transparent;
    border: none;
    border-radius: 0;
    margin-bottom: 18px;
    box-shadow: none;
    min-height: auto;
    grid-column: 1 / -1;
  }

  .builder-sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: 110px;
    padding: 18px 12px;
    border: 2px solid #2f66f3;
    border-radius: 18px;
    background: #ffffff;
    margin-bottom: 0;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(47, 102, 243, 0.08);
  }

  .builder-layout {
    display: block;
  }

  .builder-sidebar {
    display: none;
  }

  .builder-mobile-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 74px;
    margin-bottom: 12px;
    padding: 12px 16px;
    border-radius: 24px;
    background: #ffffff;
    border: 2px solid #2f66f3;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    text-decoration: none;
  }

  .builder-mobile-logo-image {
    width: auto;
    max-width: 210px;
    height: 34px;
    object-fit: contain;
    display: block;
  }

  .builder-main {
    width: 100%;
  }

    .app-shell {
    padding: 10px 10px 92px;
  }

  .app-shell-builder {
    padding-bottom: 92px;
  }

    .dashboard-shell {
    padding: 12px;
    border-radius: 22px;
  }

  .dashboard-topbar {
    gap: 10px;
    margin-bottom: 14px;
  }

  .dashboard-welcome-title {
    font-size: 23px;
  }

  .dashboard-company-pill {
    padding: 8px 12px;
  }

    .dashboard-metric-row {
    display: none;
  }

  .dashboard-metric-card {
    display: none;
  }

  .dashboard-metric-value {
    font-size: 24px;
  }

  .dashboard-projects-heading {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .dashboard-projects-heading h2 {
    font-size: 20px;
  }

  .dashboard-create-project-btn {
    width: auto;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
  }

  .dashboard-projects-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .dashboard-project-card {
    padding: 14px;
  }

  .dashboard-project-due-pill {
    width: 100%;
  }

  .dashboard-project-title {
    font-size: 18px;
  }

  .dashboard-project-meta-line {
    font-size: 13px;
    line-height: 1.4;
  }

  .dashboard-open-project-btn {
    width: auto;
    text-align: center;
    padding: 9px 13px;
    font-size: 14px;
  }

  .dashboard-project-progress-track {
    height: 8px;
  }

    .summary-grid,
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .metric-card,
  .receipt-card,
  .project-stat {
    padding: 14px;
  }

  .metric-card strong,
  .receipt-card strong {
    font-size: 18px;
  }

  .project-stat strong {
    font-size: 18px;
  }
    .project-card {
    padding: 14px;
  }

  .project-card-footer {
    gap: 8px;
  }

  .project-card-footer .primary-btn,
  .project-card-footer .secondary-btn {
    width: 100%;
  }

  .panel,
  .form-panel,
  .project-card,
  .hero,
  .hero-card,
  .marketing-card,
  .legal-card {
    padding: 14px;
    border-radius: 20px;
  }

  .marketing-hero {
    padding: 18px;
  }

  .page-header {
    margin-bottom: 14px;
  }

  h1 {
    font-size: 24px;
    line-height: 1.08;
  }

  h2 {
    font-size: 18px;
  }

  .panel-title {
    font-size: 18px;
  }

  p,
  .muted-text,
  .page-subtitle {
    font-size: 14px;
  }

  .button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .button-row .primary-btn,
.button-row .secondary-btn {
  flex: 1 1 calc(50% - 4px);
  min-width: calc(50% - 4px);
  min-height: 38px;
  padding: 8px 10px;
  font-size: 13px;
}

  input,
  select,
  textarea,
  button {
    min-height: 42px;
  }

  .summary-line,
  .timeline-row,
  .calculator-row {
    padding: 10px 0;
    font-size: 14px;
  }

  .project-inline-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .toast-layer {
    top: auto;
    bottom: 96px;
    right: 10px;
    left: 10px;
  }

  .app-toast {
    max-width: 100%;
  }

  .mobile-bottom-nav {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 200;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(14px);
}

  .mobile-bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 50px;
    padding: 5px 3px;
    border-radius: 14px;
    color: #7382a3;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
  }

  .mobile-bottom-nav-link.active {
    background: #edf3ff;
    color: var(--primary);
  }

  .mobile-bottom-nav-label {
    line-height: 1.1;
    white-space: nowrap;
  }

  * {
    max-width: 100%;
    overflow-wrap: break-word;
  }
}

@media (max-width: 420px) {
  .app-shell {
    padding-left: 8px;
    padding-right: 8px;
  }

  body.settlelink-marketing-open .nav-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.settlelink-marketing-open .nav-links a:not(.nav-cta) {
    grid-column: span 1;
  }

  body.settlelink-marketing-open .nav-links .nav-cta,
  body.settlelink-marketing-open .nav-links .nav-install-cta {
    grid-column: 1 / -1;
    min-width: 100%;
  }

  .dashboard-shell {
    padding: 12px;
  }

  .dashboard-metric-value {
    font-size: 20px;
  }

  .dashboard-project-title {
    font-size: 17px;
  }

  .summary-grid,
  .metrics-grid,
  .receipt-grid,
  .payment-record-grid {
    grid-template-columns: 1fr;
  }

  .project-inline-stats {
    grid-template-columns: 1fr;
  }

  .button-row .primary-btn,
  .button-row .secondary-btn {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .project-top-actions {
    grid-template-columns: 1fr;
  }

  .project-top-actions .primary-btn,
  .project-top-actions .secondary-btn {
    min-width: 100%;
    font-size: 13px;
  }

  .mobile-bottom-nav {
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 5px;
    gap: 3px;
  }

  .mobile-bottom-nav-link {
    min-height: 48px;
    padding: 4px 2px;
    font-size: 9px;
  }
}

.button-row.centered-row {
  justify-content: center;
}

.button-row.spread-row {
  justify-content: space-between;
}

.button-row.compact-actions {
  gap: 10px;
}

.button-row.compact-actions .primary-btn,
.button-row.compact-actions .secondary-btn {
  min-height: 48px;
}

.project-top-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.project-top-actions .primary-btn,
.project-top-actions .secondary-btn {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
}

.project-top-actions .primary-btn {
  box-shadow: 0 8px 18px rgba(47, 102, 243, 0.14);
}

.dashboard-public-links {
  margin-top: 16px;
  display: none;
}

.dashboard-public-links-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.dashboard-public-links-grid .secondary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  min-height: 42px;
}

.dashboard-completed-mobile-actions .secondary-btn,
.panel-action-footer .primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}

@media (max-width: 768px) {
  .dashboard-public-links {
    display: block;
  }

  .dashboard-public-links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-public-links-grid a:last-child {
    grid-column: 1 / -1;
  }
}

.dashboard-completed-panel {
  margin-top: 18px;
}

.completed-folder-card {
  padding: 18px;
}

.completed-folder-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.completed-folder-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #eef4ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.completed-folder-main {
  min-width: 0;
}

.completed-folder-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.completed-folder-actions .primary-btn,
.completed-folder-actions .secondary-btn {
  width: 100%;
}

@media (max-width: 768px) {
  .completed-folder-card {
    padding: 14px;
  }

  .completed-folder-card-top {
    align-items: flex-start;
  }

  .completed-folder-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.dashboard-completed-dropzone {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 18px;
  border: 2px dashed #d6e3ff;
  border-radius: 24px;
  background: #fbfdff;
  text-align: center;
}

.dashboard-completed-dropzone.is-drag-over {
  border-color: #2f66f3;
  background: #f5f8ff;
}

.dashboard-completed-dropzone-icon {
  font-size: 34px;
  line-height: 1;
}

.dashboard-completed-mobile-actions {
  display: none;
  margin-top: 10px;
}

@media (min-width: 769px) {
  .dashboard-completed-dropzone {
    display: flex;
  }
}

@media (max-width: 768px) {
  .dashboard-completed-mobile-actions {
    display: block;
  }

  .dashboard-completed-mobile-actions .secondary-btn {
    width: 100%;
  }
}

.panel-action-footer {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

@media (max-width: 768px) {
  .button-row,
  .button-row.centered-row,
  .button-row.spread-row,
  .button-row.compact-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button-row .primary-btn,
  .button-row .secondary-btn {
    width: 100%;
  }

  .summary-line,
  .timeline-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .summary-line strong,
  .timeline-row strong {
    width: 100%;
    text-align: left;
    white-space: normal;
    word-break: break-word;
  }

  .client-top-logo-wrap {
    margin-bottom: 12px;
  }

  .client-top-logo-card {
    min-height: 64px;
    padding: 10px 14px;
    border-radius: 18px;
  }

  .client-top-logo-image {
    max-width: 180px;
    height: 28px;
  }

  .project-top-actions {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 12px;
  }

  .project-top-actions .primary-btn,
  .project-top-actions .secondary-btn {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 13px;
  }
}

.payment-hero-card .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.payment-hero-card .panel-header strong {
  display: block;
  min-width: 140px;
  text-align: right;
  font-size: 32px;
  line-height: 1.1;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .payment-hero-card .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .payment-hero-card .panel-header strong {
    min-width: auto;
    text-align: left;
    white-space: normal;
    word-break: break-word;
  }
}

.project-summary-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.project-summary-grid--top {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-summary-grid--bottom {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-summary-grid .metric-card {
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px;
}

.project-summary-grid .metric-card strong {
  font-size: 1.55rem;
  line-height: 1.1;
}

@media (max-width: 1100px) {
  .project-summary-grid--top,
  .project-summary-grid--bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .project-summary-grid--top,
  .project-summary-grid--bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .project-summary-grid .metric-card {
    min-height: 78px;
    padding: 10px;
    border-radius: 16px;
  }

  .project-summary-grid .metric-card strong {
    font-size: 1.2rem;
  }

  .project-summary-grid .metric-label {
    font-size: 10px;
    margin-bottom: 6px;
  }
}

@media (max-width: 420px) {
  .project-summary-grid--top,
  .project-summary-grid--bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .project-summary-grid .metric-card {
    min-height: 72px;
    padding: 9px;
  }

  .project-summary-grid .metric-card strong {
    font-size: 1.05rem;
  }
}
.calculator-card {
  margin-top: 8px;
}

/* Bundle: homepage + sidebar tidy */

.marketing-dual-benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.marketing-dual-benefits .marketing-card {
  padding: 18px;
}

.marketing-dual-benefits .marketing-mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.marketing-dual-benefits .marketing-stat {
  padding: 12px 14px;
  border-radius: 16px;
}

.marketing-dual-benefits .marketing-stat strong {
  font-size: 18px;
  line-height: 1.1;
}

.builder-sidebar,
.sidebar-card,
.workspace-sidebar,
.dashboard-sidebar {
  align-self: start;
}

.builder-sidebar .panel,
.sidebar-card .panel,
.workspace-sidebar .panel,
.dashboard-sidebar .panel {
  min-height: auto;
}

.summary-grid .metric-card,
.metrics-grid .metric-card,
.receipt-grid .receipt-card,
.payment-record-grid .receipt-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.summary-grid .metric-card strong,
.metrics-grid .metric-card strong,
.receipt-grid .receipt-card strong,
.payment-record-grid .receipt-card strong {
  display: block;
  line-height: 1.12;
}

.centered-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}

.builder-sidebar,
.sidebar-card,
.workspace-sidebar,
.dashboard-sidebar {
  padding-bottom: 18px;
}

@media (max-width: 900px) {
  .marketing-dual-benefits {
    grid-template-columns: 1fr;
  }

  .marketing-dual-benefits .marketing-mini-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .marketing-dual-benefits .marketing-stat {
    padding: 10px 12px;
  }

  .marketing-dual-benefits .marketing-stat-label {
    font-size: 10px;
  }

  .marketing-dual-benefits .marketing-stat strong {
    font-size: 15px;
  }
}

/* --- Project Invoices page exact layout fix --- */
.project-invoices-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-invoice-card {
  width: 100%;
}

.project-invoice-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 12px 0;
}

@media (max-width: 768px) {
  .project-invoices-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .project-invoice-card {
    width: 100%;
  }

  .project-invoice-stats {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .project-invoices-list .button-row {
    flex-direction: column;
    align-items: stretch;
  }

  .project-invoices-list .button-row .primary-btn,
  .project-invoices-list .button-row .secondary-btn {
    width: 100%;
  }
}
/* --- Better checkbox styling --- */
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2f66f3;
  cursor: pointer;
  vertical-align: middle;
}

label .muted-text,
label.muted-text {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.45;
}
/* Dashboard 4-card desktop layout */
@media (min-width: 760px) {
  .dashboard-metric-row {
    display: none;
  }
}

@media (max-width: 768px) {
  .completed-folder-card-top,
  .panel-header,
  .project-card-top {
    align-items: flex-start;
  }

  .completed-folder-card-top {
    flex-direction: column;
  }

  .panel-header strong,
  .project-card-top strong {
    width: 100%;
    text-align: left;
    white-space: normal;
    word-break: break-word;
  }

  .detail-list,
  .timeline-card,
  .project-inline-stats,
  .project-summary-grid {
    min-width: 0;
  }
}

@media (max-width: 420px) {
  .metric-card strong,
  .receipt-card strong,
  .project-stat strong {
    font-size: 16px;
  }

  .completed-folder-card,
  .project-card,
  .panel,
  .hero,
  .hero-card {
    min-width: 0;
  }
}

/* Final builder mobile overflow hardening bundle */

.app-shell,
.app-shell-builder,
.app-shell-client,
.builder-layout,
.builder-main,
.dashboard-shell,
.panel,
.hero,
.hero-card,
.project-card,
.completed-folder-card,
.project-invoice-card,
.invoice-contact-card,
.invoice-wording-block,
.receipt-card,
.metric-card,
.project-stat,
.app-modal-card,
.payment-feedback-box,
.notice-box,
.calculator-total,
.dashboard-project-card,
.dashboard-empty-state,
.completed-folder-main,
.dashboard-project-card-top > div,
.project-card-top > div,
.panel-header > div,
.completed-folder-card-top > div {
  min-width: 0;
}

h1,
h2,
h3,
.panel-title,
.page-subtitle,
.muted-text,
.dashboard-welcome-title,
.dashboard-project-title,
.dashboard-project-meta-line,
.dashboard-company-pill,
.invoice-contact-card-name,
.invoice-contact-card-subtitle,
.invoice-contact-card-item strong,
.project-stat strong,
.metric-card strong,
.receipt-card strong,
.summary-line strong,
.timeline-row strong,
.payment-hero-amount,
.app-modal-title,
.app-modal-text {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.primary-btn,
.secondary-btn,
.dashboard-create-project-btn,
.dashboard-open-project-btn,
.dashboard-view-btn,
.dashboard-project-due-pill,
.nav-links .nav-cta,
.nav-links .nav-install-cta,
.button-row .primary-btn,
.button-row .secondary-btn {
  white-space: normal;
  line-height: 1.2;
  text-align: center;
  min-width: 0;
}

.nav-links a,
.nav-links button,
.dashboard-company-pill,
.invoice-contact-card-item,
.project-stat,
.metric-card,
.receipt-card,
.summary-line strong,
.timeline-row strong {
  min-width: 0;
}

@media (max-width: 768px) {
  .app-shell,
  .app-shell-builder,
  .app-shell-client {
    overflow-x: hidden;
  }

  .dashboard-topbar,
  .dashboard-projects-heading,
  .completed-folder-card-top,
  .panel-header,
  .project-card-top,
  .dashboard-project-card-top {
    gap: 10px;
  }

  .dashboard-company-pill {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard-project-card-top,
  .panel-header,
  .project-card-top,
  .completed-folder-card-top {
    align-items: flex-start;
  }

  .project-summary-grid--top,
  .project-summary-grid--bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-grid,
  .metrics-grid,
  .receipt-grid,
  .payment-record-grid,
  .project-inline-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-public-links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .invoice-contact-card-item,
  .project-stat,
  .metric-card,
  .receipt-card,
  .calculator-total,
  .payment-hero-top {
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .dashboard-projects-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-create-project-btn,
  .dashboard-open-project-btn,
  .dashboard-project-due-pill {
    width: 100%;
  }

  .project-summary-grid--top,
  .project-summary-grid--bottom,
  .summary-grid,
  .metrics-grid,
  .receipt-grid,
  .payment-record-grid,
  .project-inline-stats,
  .dashboard-public-links-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-project-actions,
  .dashboard-project-due-row {
    grid-template-columns: 1fr;
  }

  .dashboard-project-progress-note,
  .dashboard-project-meta-line,
  .page-subtitle,
  .muted-text,
  p {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .payment-hero-amount {
    font-size: 24px;
  }

  .client-top-logo-image,
  .builder-mobile-logo-image {
    max-width: 170px;
  }
}

@media (max-width: 380px) {
  .app-shell {
    padding-left: 6px;
    padding-right: 6px;
  }

  .panel,
  .form-panel,
  .project-card,
  .hero,
  .hero-card,
  .marketing-card,
  .legal-card,
  .completed-folder-card,
  .project-invoice-card {
    padding: 12px;
  }

  .payment-hero-amount {
    font-size: 22px;
  }

  .dashboard-welcome-title {
    font-size: 21px;
  }

  .dashboard-project-title {
    font-size: 16px;
  }
}