:root {
  --green-950: #04150d;
  --green-900: #082416;
  --green-800: #0d3b24;
  --green-700: #17643a;
  --green-100: #dcecdf;
  --green-050: #f4fbf5;
  --gold-500: #f2c94c;
  --gold-300: #ffe08a;
  --goal-post: #f4c430;
  --ink-900: #14211a;
  --ink-700: #34493c;
  --ink-500: #6b7d70;
  --surface: #ffffff;
  --surface-soft: #f7fbf7;
  --surface-tint: #ecf4ee;
  --border: #cbd9cf;
  --border-strong: #94aa9b;
  --yard-line: rgba(255, 255, 255, 0.62);
  --shadow-soft: 0 10px 28px rgba(4, 21, 13, 0.1);
  --shadow-card: 0 24px 58px rgba(4, 21, 13, 0.18);
  --radius-sm: 8px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: #0d3b24;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--ink-900);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 20%, rgba(0, 0, 0, 0.22) 100%),
    radial-gradient(circle at 50% 42%, rgba(140, 255, 98, 0.16), transparent 38%),
    url("../img/header-turf.jpg"),
    url("../img/grass-texture.svg"),
    linear-gradient(180deg, #105719 0%, #22831f 46%, #176716 74%, #0b3d12 100%);
  background-size: auto, auto, 558px 240px, 640px 360px, auto;
  background-repeat: no-repeat, no-repeat, repeat, repeat, no-repeat;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 18%, transparent 74%, rgba(0, 0, 0, 0.22)),
    radial-gradient(circle at 48% 18%, rgba(185, 255, 124, 0.12), transparent 28%);
  pointer-events: none;
  z-index: -1;
}

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

.hero {
  position: relative;
  overflow: hidden;
    background:
    linear-gradient(180deg, rgba(4, 21, 13, 0.08), rgba(4, 21, 13, 0.34)),
    url("../img/grass-photo.jpg") center / cover repeat;
  color: #fff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 21, 13, 0.02), rgba(4, 21, 13, 0.1));
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: none;
  position: absolute;
  top: 230px;
  left: 50%;
  width: min(1320px, calc(100% - 48px));
  height: 188px;
  transform: translateX(-50%);
  background:
    linear-gradient(var(--goal-post), var(--goal-post)) no-repeat center 72% / 100% 10px,
    linear-gradient(var(--goal-post), var(--goal-post)) no-repeat left top / 10px 72%,
    linear-gradient(var(--goal-post), var(--goal-post)) no-repeat right top / 10px 72%,
    linear-gradient(var(--goal-post), var(--goal-post)) no-repeat center bottom / 10px 28%;
  filter: none;
  opacity: 0.96;
  pointer-events: none;
  z-index: 0;
}

.hero-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(28px);
  opacity: 0.18;
  pointer-events: none;
}

.hero-glow-left {
  top: -160px;
  left: -90px;
  background: #ffffff;
}

.hero-glow-right {
  right: -120px;
  top: -100px;
  background: #f2c94c;
  display: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 108px 16px 138px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 28px;
  align-items: end;
}

.hero-copy {
  max-width: 760px;
}

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

.hero-kicker,
.hero-overline,
.section-kicker,
.hero-panel-kicker,
.card-label {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-kicker {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.72);
}

.hero-user {
  position: absolute;
  top: 20px;
  right: 22px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.hero-user-copy {
  display: grid;
  gap: 2px;
  text-align: right;
}

.hero-user-copy strong,
.hero-user-copy span {
  display: block;
}

.hero-user-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.hero-login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #eef8ef 100%);
  color: var(--green-900);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(75, 31, 20, 0.2);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.hero-login-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(75, 31, 20, 0.26);
  filter: saturate(1.03);
}

.hero-login-link-secondary {
  min-height: 40px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

[hidden] {
  display: none !important;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-logo {
  width: 68px;
  height: 68px;
  object-fit: contain;
  flex-shrink: 0;
  padding: 10px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.16);
}

.hero-brand-copy {
  min-width: 0;
}

.hero-title-row {
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
  white-space: normal;
}

.hero-title-football {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
  margin-left: 10px;
  transform: rotate(-12deg) translateY(2px);
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.28));
}

.hero-title-break {
  display: inline-flex;
  align-items: center;
}

.hero-overline {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.72);
}

.hero-title {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 2.85rem;
  line-height: 1.02;
  letter-spacing: 0;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 4px 18px rgba(4, 21, 13, 0.4);
}

.hero-title-ball {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  flex-shrink: 0;
  object-fit: contain;
  opacity: 0.95;
}

.hero-sub {
  margin: 22px 0 0;
  max-width: 680px;
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.84);
}

.hero-tags {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(4, 21, 13, 0.24);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 600;
}

.hero-panel {
  align-self: stretch;
  padding: 18px 18px 16px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(4, 21, 13, 0.88), rgba(6, 37, 22, 0.9)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 48px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(10px);
}

.hero-panel-kicker {
  margin-bottom: 10px;
  text-align: center;
  color: var(--gold-300);
}

.hero-panel-step {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  line-height: 1.45;
}

.hero-panel-step + .hero-panel-step {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 6px;
  background: #07170f;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--gold-300);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-rule {
  position: relative;
  z-index: 1;
  height: 4px;
  background:
    repeating-linear-gradient(90deg, #ffffff 0 72px, var(--gold-500) 72px 86px, #ffffff 86px 158px);
}

.shell {
  max-width: 1180px;
  margin: -84px auto 0;
  padding: 0 16px 56px;
  position: relative;
  z-index: 2;
}

.form-shell {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 252, 247, 0.95)),
    radial-gradient(circle at 18% 8%, rgba(128, 224, 118, 0.12), transparent 26%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 32px;
}

.auth-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 32px 36px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.46), transparent 36%),
    repeating-linear-gradient(90deg, rgba(163, 79, 44, 0.035) 0 1px, transparent 1px 86px),
    linear-gradient(180deg, rgba(255, 250, 244, 0.98) 0%, #fff 100%);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.auth-card .section-kicker {
  display: inline-block;
}

.auth-card-title {
  margin: 8px 0 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 2.2rem;
  line-height: 1.08;
  color: var(--green-950);
}

.auth-card-copy {
  margin: 14px auto 0;
  max-width: 60ch;
  color: var(--ink-700);
  line-height: 1.7;
}

.auth-card-actions {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.ms-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 0 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green-800) 0%, var(--green-900) 100%);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow:
    0 22px 40px rgba(75, 31, 20, 0.3),
    0 2px 0 rgba(255, 255, 255, 0.1) inset;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  position: relative;
}

.ms-login-btn::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 24px;
  border: 2px solid rgba(163, 79, 44, 0.22);
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

.ms-login-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 28px 48px rgba(75, 31, 20, 0.34),
    0 2px 0 rgba(255, 255, 255, 0.12) inset;
  filter: saturate(1.08);
}

.ms-login-btn:hover::after {
  opacity: 1;
  transform: scale(1.01);
}

.ms-login-btn:active {
  transform: translateY(0);
}

.ms-login-btn:focus-visible {
  outline: 3px solid rgba(163, 79, 44, 0.55);
  outline-offset: 3px;
}

.ms-login-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #fff;
  border-radius: 8px;
  padding: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.ms-login-logo svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ms-login-text {
  line-height: 1;
}

.ms-login-hint {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-500);
}

.form-shell-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 4px solid var(--green-900);
}

.section-kicker {
  margin-bottom: 10px;
  color: var(--green-700);
}

.form-shell-title {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 2.35rem;
  line-height: 1.05;
  letter-spacing: 0;
  color: var(--green-950);
  text-transform: uppercase;
}

.form-shell-subtitle {
  margin: 12px 0 0;
  max-width: 740px;
  color: var(--ink-700);
  line-height: 1.7;
  font-size: 0.98rem;
}

.form-shell-meta {
  display: grid;
  gap: 12px;
  justify-items: end;
  align-content: start;
}

.form-shell-note {
  margin: 0;
  max-width: 280px;
  text-align: right;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--ink-500);
}

.field-legend {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background:
    linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.74) 38%, rgba(255, 255, 255, 0.5) 48%, transparent 62%),
    linear-gradient(180deg, #f7faf8 0%, #e5eee7 100%);
  border: 1px solid #d71920;
  color: var(--ink-700);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.88) inset,
    0 8px 16px rgba(192, 40, 29, 0.08);
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
}

.legend-sample {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(190, 199, 207, 0.48) 48%, transparent 68%),
    #d8dde2;
  border: 1px solid #c0281d;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.42),
    0 0 0 2px rgba(192, 40, 29, 0.08);
}

.form-stack {
  display: grid;
  gap: 22px;
}

.workspace-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(236, 244, 238, 0.9));
  box-shadow: 0 8px 20px rgba(4, 21, 13, 0.08);
}

.workspace-tab {
  appearance: none;
  min-width: 150px;
  border: 1px solid rgba(45, 91, 62, 0.22);
  border-radius: 10px;
  padding: 12px 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 248, 0.96));
  color: var(--ink-700);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.62),
    0 4px 10px rgba(4, 21, 13, 0.05);
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.workspace-tab:hover {
  border-color: rgba(23, 100, 58, 0.42);
  background: linear-gradient(180deg, rgba(244, 251, 245, 0.98), rgba(255, 255, 255, 0.98));
  box-shadow: 0 8px 16px rgba(4, 21, 13, 0.08);
  transform: translateY(-1px);
}

.workspace-tab.is-active {
  border-color: rgba(4, 21, 13, 0.2);
  background: linear-gradient(135deg, var(--green-800), var(--green-900));
  color: #fff;
  box-shadow: 0 10px 20px rgba(4, 21, 13, 0.18);
}

.workspace-tab-arrow {
  position: fixed;
  top: 66%;
  z-index: 20;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  width: 104px;
  min-height: 86px;
  padding: 11px 9px;
  border: 1px solid rgba(23, 100, 58, 0.2);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 251, 245, 0.9));
  box-shadow:
    0 14px 30px rgba(4, 21, 13, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.76);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.workspace-tab-arrow-left {
  left: max(14px, calc(50% - 720px));
}

.workspace-tab-arrow-right {
  right: max(14px, calc(50% - 720px));
}

.workspace-tab-arrow-icon {
  display: block;
  width: 22px;
  height: 22px;
  border-top: 3px solid var(--green-800);
  border-right: 3px solid var(--green-800);
}

.workspace-tab-arrow-left .workspace-tab-arrow-icon {
  transform: rotate(-135deg);
}

.workspace-tab-arrow-right .workspace-tab-arrow-icon {
  transform: rotate(45deg);
}

.workspace-tab-arrow-label {
  display: block;
  max-width: 100%;
  color: var(--green-900);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  white-space: normal;
}

.workspace-tab-arrow:hover {
  border-color: rgba(23, 100, 58, 0.46);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 246, 235, 0.96));
  box-shadow:
    0 18px 36px rgba(4, 21, 13, 0.2),
    0 0 0 4px rgba(23, 100, 58, 0.08);
}

.workspace-tab-arrow-left:hover {
  transform: translateY(-50%) translateX(-2px);
}

.workspace-tab-arrow-right:hover {
  transform: translateY(-50%) translateX(2px);
}

.workspace-tab-arrow:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  transform: translateY(-50%);
}

.workspace-tab-panel {
  display: grid;
  gap: 22px;
}

.workspace-tab-panel[hidden] {
  display: none;
}

.proposal-fields-builder,
.proposal-options-list {
  display: grid;
  gap: 14px;
}

.proposal-field-card,
.proposal-option-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.78), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, var(--green-050) 100%);
  box-shadow: 0 10px 20px rgba(4, 21, 13, 0.07);
}

.proposal-field-card input[aria-invalid="true"] {
  border-color: #d71920;
  background: #fff6f6;
}

.proposal-field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.proposal-field-add-row .btn-secondary {
  background: linear-gradient(180deg, rgba(255, 233, 122, 0.99) 0%, rgba(255, 247, 194, 0.99) 100%);
  border: 1px solid rgba(224, 184, 54, 0.95);
  color: var(--green-900);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    0 10px 20px rgba(224, 184, 54, 0.18);
}

.proposal-field-add-row .btn-secondary:hover {
  background: linear-gradient(180deg, rgba(255, 246, 181, 0.99) 0%, rgba(255, 252, 222, 0.99) 100%);
  border-color: rgba(224, 184, 54, 0.82);
}

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

.proposal-field-service {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(148, 170, 155, 0.55);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
}

.proposal-options-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.pricing-field-breakdown {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.pricing-field-heading {
  color: var(--green-800);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pricing-field-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 170, 155, 0.45);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.78);
}

.pricing-field-row span {
  display: block;
  margin-top: 2px;
  color: var(--ink-500);
  font-size: 0.82rem;
}

.pricing-field-total {
  border-color: var(--green-800);
  background: var(--green-050);
}

.estimator-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.estimator-title {
  margin: 8px 0 6px;
  color: var(--green-950);
  font-size: 1.55rem;
  line-height: 1.2;
}

.estimator-version-card {
  min-width: 170px;
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  color: #fff;
  box-shadow: 0 14px 26px rgba(4, 21, 13, 0.18);
}

.estimator-version-card span,
.estimator-version-card small {
  color: rgba(255, 255, 255, 0.76);
}

.estimator-version-card strong {
  font-size: 1.8rem;
}

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

.estimator-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.72), transparent 38%),
    linear-gradient(180deg, #ffffff 0%, var(--green-050) 100%);
  box-shadow: 0 10px 22px rgba(4, 21, 13, 0.08);
}

.estimator-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
  border-bottom: 1px solid rgba(148, 170, 155, 0.45);
  padding-bottom: 10px;
}

.estimator-panel-header h4 {
  margin: 0;
  color: var(--green-950);
  font-size: 1rem;
}

.estimator-panel-header span {
  color: var(--ink-500);
  font-size: 0.82rem;
  text-align: right;
}

.estimator-field small {
  color: var(--ink-500);
  font-size: 0.78rem;
  line-height: 1.35;
}

.estimator-labor-panel {
  overflow: hidden;
}

.labor-tier-table {
  display: grid;
  gap: 8px;
}

.labor-tier-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.4fr) repeat(3, minmax(80px, 1fr));
  gap: 10px;
  align-items: center;
}

.labor-tier-heading {
  color: var(--ink-500);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.labor-tier-row strong {
  color: var(--green-950);
}

.labor-tier-row input {
  min-height: 42px;
}

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

.formula-card,
.workflow-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 170, 155, 0.55);
  background: #fff;
  box-shadow: 0 8px 18px rgba(4, 21, 13, 0.07);
}

.formula-card-primary {
  background:
    linear-gradient(135deg, rgba(242, 201, 76, 0.16), transparent 48%),
    #fff;
}

.formula-label {
  color: var(--green-700);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.formula-card strong {
  color: var(--green-950);
  font-size: 1.25rem;
}

.formula-card code {
  white-space: normal;
  color: var(--ink-700);
  font-size: 0.82rem;
  line-height: 1.45;
}

.price-decomposition-panel {
  border-color: rgba(242, 201, 76, 0.72);
  background:
    linear-gradient(135deg, rgba(242, 201, 76, 0.2), transparent 34%),
    linear-gradient(180deg, #fffdf2 0%, #ffffff 100%);
  box-shadow:
    0 16px 32px rgba(4, 21, 13, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.74);
}

.price-decomposition-grid {
  display: grid;
  gap: 14px;
}

.price-decomposition-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(45, 91, 62, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
}

.price-decomposition-card h5 {
  margin: 0 0 4px;
  color: var(--green-900);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.price-decomposition-row {
  display: grid;
  grid-template-columns: 22px minmax(140px, 0.75fr) minmax(220px, 1.4fr) minmax(96px, auto);
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px dashed rgba(45, 91, 62, 0.16);
}

.price-decomposition-row:first-of-type {
  border-top: 0;
}

.price-decomposition-operator {
  color: var(--green-700);
  font-size: 1.05rem;
  font-weight: 900;
  text-align: center;
}

.price-decomposition-label {
  color: var(--ink-700);
  font-weight: 800;
}

.price-decomposition-row code {
  white-space: normal;
  color: var(--ink-700);
  font-size: 0.84rem;
}

.price-decomposition-row strong,
.price-decomposition-total strong {
  color: var(--green-950);
  font-variant-numeric: tabular-nums;
}

.price-decomposition-total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 2px solid rgba(23, 100, 58, 0.22);
  color: var(--green-900);
  font-weight: 900;
}

.price-decomposition-summary {
  border-color: rgba(23, 100, 58, 0.26);
  background:
    linear-gradient(135deg, rgba(23, 100, 58, 0.08), transparent 46%),
    #ffffff;
}

.workflow-card strong {
  color: var(--green-950);
}

.workflow-card span {
  color: var(--ink-700);
  font-size: 0.88rem;
  line-height: 1.5;
}

.estimator-save-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
}

.estimator-actions {
  align-items: center;
  margin: 0;
}

.pricing-settings-audit {
  margin: 0;
  max-height: 190px;
  overflow: auto;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--green-950);
  color: #e8f0ea;
  font-size: 0.82rem;
  line-height: 1.6;
}

.card {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: var(--radius-md);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.62) 0%, transparent 32%),
    linear-gradient(90deg, var(--green-700) 0 5px, transparent 5px),
    radial-gradient(circle at 16% 12%, rgba(122, 216, 106, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(247, 251, 247, 0.96) 0%, rgba(255, 255, 255, 0.98) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.card-label {
  color: var(--green-700);
}

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

.span-2 {
  grid-column: span 2;
}

.compact-grid {
  margin-top: 2px;
}

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

.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
}

.field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-700);
}

.helper-text {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ink-500);
}

.field-note {
  font-size: 0.76rem;
  line-height: 1.4;
}

.field-note-warning {
  color: #c0281d;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-900);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease,
    background-color 0.18s ease;
}

input::placeholder,
textarea::placeholder {
  color: #8b9d91;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--green-700);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--green-700);
  box-shadow:
    0 0 0 4px rgba(23, 100, 58, 0.14),
    0 10px 18px rgba(4, 21, 13, 0.08);
}

.readonly-field {
  background: linear-gradient(180deg, #f7fbf7 0%, #e8f0ea 100%);
  color: var(--ink-700);
}

.rich-text-editor {
  min-height: 132px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--ink-900);
  line-height: 1.55;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  overflow: auto;
}

.rich-text-editor:empty::before {
  content: attr(data-placeholder);
  color: #8b9d91;
}

.rich-text-editor:focus {
  outline: none;
  border-color: var(--green-700);
  box-shadow:
    0 0 0 4px rgba(23, 100, 58, 0.14),
    0 10px 18px rgba(4, 21, 13, 0.08);
}

.rich-text-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rich-text-toolbar .btn-secondary {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.88rem;
}

.proposal-direct-edit-note {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(23, 100, 58, 0.24);
  background:
    linear-gradient(135deg, rgba(242, 201, 76, 0.16), transparent 48%),
    var(--green-050);
  color: var(--ink-700);
}

.proposal-direct-edit-note strong {
  color: var(--green-900);
}

.proposal-direct-edit-note span {
  line-height: 1.5;
}

.critical input,
.critical select {
  background:
    linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.72) 35%, rgba(190, 199, 207, 0.34) 48%, transparent 64%),
    linear-gradient(180deg, #f7f8f9 0%, #ffffff 100%);
  border-color: #d71920;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.88) inset;
}

.critical input:focus,
.critical select:focus {
  border-color: #d71920;
  box-shadow:
    0 0 0 3px rgba(215, 25, 32, 0.12),
    0 10px 18px rgba(215, 25, 32, 0.08),
    0 0 18px rgba(190, 199, 207, 0.22);
}

.field-error {
  display: none;
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #c0281d;
  letter-spacing: 0.01em;
}

.field.is-invalid .field-error {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  animation: fieldErrorIn 0.18s ease-out;
}

.field.is-invalid .field-error::before {
  content: "\26A0";
  font-size: 0.95rem;
  line-height: 1;
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: #c0281d !important;
  background: linear-gradient(180deg, #fff4f3 0%, #fffaf9 100%) !important;
  box-shadow: 0 0 0 3px rgba(192, 40, 29, 0.12);
}

.field.is-invalid input:focus,
.field.is-invalid select:focus,
.field.is-invalid textarea:focus {
  border-color: #a31f17 !important;
  box-shadow: 0 0 0 4px rgba(192, 40, 29, 0.18);
}

@keyframes fieldErrorIn {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

.alternate-toggle-row {
  grid-template-columns: minmax(260px, 360px);
}

.alternate-locked-tile {
  cursor: not-allowed;
  opacity: 0.72;
}

.alternate-locked-tile:hover {
  transform: none;
  box-shadow: inset 0 0 0 1px rgba(224, 184, 54, 0.3);
}

.alternate-panel {
  margin-top: 16px;
  display: grid;
  gap: 18px;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid rgba(23, 100, 58, 0.18);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.54) 0 2px, transparent 2px 72px),
    linear-gradient(180deg, rgba(236, 244, 238, 0.96) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.alternate-panel-copy {
  margin: 0;
  color: var(--ink-700);
  line-height: 1.55;
}

.alternate-subsection {
  display: grid;
  gap: 12px;
}

.alternate-subsection-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--green-900);
}

.pricing-card {
  gap: 20px;
  background:
    linear-gradient(90deg, var(--gold-500) 0 5px, transparent 5px),
    linear-gradient(180deg, #f9fcfa 0%, #ffffff 100%);
}

.sales-input input {
  background:
    linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.72) 36%, rgba(255, 224, 138, 0.48) 50%, transparent 66%),
    linear-gradient(180deg, #fffdf0 0%, #fff3aa 100%);
  border-color: #c89800;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.46),
    0 8px 16px rgba(177, 132, 0, 0.08);
}

.sales-input input:focus {
  border-color: #9c7800;
  box-shadow:
    0 0 0 4px rgba(209, 163, 0, 0.16),
    0 10px 18px rgba(156, 120, 0, 0.1);
}

.pricing-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding-top: 2px;
}

.pricing-metric {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(8, 36, 22, 0.96), rgba(4, 21, 13, 0.96)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 28px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.pricing-metric-primary {
  border-color: rgba(242, 201, 76, 0.64);
  background:
    linear-gradient(180deg, rgba(14, 63, 37, 0.98), rgba(6, 37, 22, 0.98)),
    repeating-linear-gradient(90deg, rgba(242, 201, 76, 0.08) 0 1px, transparent 1px 30px);
}

.pricing-metric-label {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
}

.pricing-metric strong {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.45rem;
  line-height: 1.05;
  color: #fff;
}

.pricing-adjustments-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(45, 91, 62, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
}

.pricing-adjustments-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.pricing-adjustments-header span {
  color: var(--green-900);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pricing-adjustments-header small,
.pricing-adjustment-option small {
  color: var(--ink-500);
  font-size: 0.78rem;
}

.pricing-adjustment-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(45, 91, 62, 0.14);
  border-radius: 14px;
  background: rgba(244, 251, 245, 0.62);
}

.pricing-adjustment-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  accent-color: var(--green-700);
}

.pricing-adjustment-option strong,
.pricing-adjustment-option small {
  display: block;
}

.pricing-adjustment-option strong {
  color: var(--ink-900);
  font-size: 0.88rem;
}

.pricing-adjustment-option-stack {
  justify-content: space-between;
  align-items: center;
}

.margin-target-segments {
  display: inline-flex;
  gap: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
}

.margin-target-segments label {
  cursor: pointer;
}

.margin-target-segments input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.margin-target-segments span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(9, 36, 71, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-700);
  font-weight: 850;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.margin-target-segments label:hover span {
  border-color: rgba(23, 100, 58, 0.42);
  background: var(--green-050);
  transform: translateY(-1px);
}

.margin-target-segments input:focus-visible + span {
  outline: 3px solid rgba(242, 201, 76, 0.55);
  outline-offset: 2px;
}

.margin-target-segments input:checked + span {
  background: var(--green-800);
  border-color: var(--green-800);
  color: #fff;
}

.tile-row-single {
  margin-top: 12px;
  grid-template-columns: minmax(210px, 280px);
}

.logo-options-panel {
  margin-top: 16px;
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(163, 79, 44, 0.16);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.42), transparent 34%),
    linear-gradient(180deg, rgba(255, 247, 238, 0.96) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.logo-options-title,
.logo-type-heading {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--green-900);
}

.logo-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.logo-type-column {
  display: grid;
  gap: 10px;
}

.logo-type-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(129, 139, 148, 0.24);
  background: rgba(255, 255, 255, 0.92);
}

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

.logo-type-panel .field {
  gap: 5px;
}

.logo-type-panel .field label {
  font-size: 0.78rem;
}

.logo-type-panel input {
  min-height: 40px;
  padding: 9px 10px;
  border-radius: 12px;
}

.tile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-700);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.tile:hover {
  transform: translateY(-1px);
  border-color: var(--green-700);
  background: var(--green-050);
  box-shadow: 0 10px 20px rgba(4, 21, 13, 0.08);
}

.tile:has(input:checked) {
  border-color: rgba(23, 100, 58, 0.58);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.42), transparent 34%),
    linear-gradient(180deg, rgba(220, 236, 223, 0.96) 0%, rgba(244, 251, 245, 0.98) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(23, 100, 58, 0.2),
    0 12px 22px rgba(4, 21, 13, 0.1);
  color: var(--green-900);
}

.tile-logo-trigger {
  border-color: rgba(242, 201, 76, 0.68);
  background: linear-gradient(180deg, rgba(255, 253, 232, 0.98) 0%, rgba(255, 255, 248, 0.99) 100%);
  color: #6b5700;
  box-shadow: inset 0 0 0 1px rgba(242, 201, 76, 0.18);
}

.tile-logo-trigger:hover {
  border-color: rgba(224, 184, 54, 0.82);
  background: linear-gradient(180deg, rgba(255, 246, 181, 0.99) 0%, rgba(255, 252, 222, 0.99) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(224, 184, 54, 0.22),
    0 10px 20px rgba(123, 98, 0, 0.08);
}

.tile-logo-trigger:has(input:checked) {
  border-color: rgba(224, 184, 54, 0.95);
  background: linear-gradient(180deg, rgba(255, 233, 122, 0.99) 0%, rgba(255, 247, 194, 0.99) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(224, 184, 54, 0.3),
    0 12px 22px rgba(123, 98, 0, 0.12);
  color: #6a5400;
}

.tile input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--green-700);
  flex-shrink: 0;
}

.field-tile {
  min-height: 48px;
  padding-block: 0;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.search-row button,
.btn-primary,
.btn-secondary {
  border: 0;
  cursor: pointer;
}

.search-row button {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 42%),
    linear-gradient(180deg, var(--green-700) 0%, var(--green-900) 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(4, 21, 13, 0.18);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.search-row button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(75, 31, 20, 0.22);
  filter: saturate(1.05);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
}

.project-create-status {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: min(360px, 100%);
}

.project-loading {
  width: min(360px, 100%);
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 170, 155, 0.32);
  box-shadow: inset 0 0 0 1px rgba(4, 21, 13, 0.12);
}

.project-loading-bar {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.34), transparent 45%),
    linear-gradient(90deg, var(--green-700), var(--green-900));
  box-shadow: 0 6px 12px rgba(75, 31, 20, 0.18);
  transition: width 0.45s ease;
}

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

.crm-sync-header .card-label {
  margin: 0;
  flex: 0 0 auto;
}

.crm-sync-header .status {
  margin-left: auto;
  text-align: right;
}

.crm-sync-inline-btn {
  width: 100%;
  margin-top: 4px;
}

.crm-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(129, 139, 148, 0.24);
  border-radius: 8px;
  background: rgba(247, 248, 249, 0.9);
}

.crm-mode-btn {
  min-height: 28px;
  padding: 5px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-600);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.crm-mode-btn:hover {
  color: #704131;
  background: rgba(232, 235, 238, 0.9);
}

.crm-mode-btn.is-active {
  color: #fff;
  background: linear-gradient(180deg, var(--green-700) 0%, var(--green-900) 100%);
  box-shadow: 0 6px 14px rgba(75, 31, 20, 0.14);
}

.crm-mode-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.crm-create-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 0.76rem;
  font-weight: 700;
  color: #7a5417;
  cursor: pointer;
  white-space: nowrap;
}

.crm-create-toggle input[type="checkbox"] {
  width: 12px;
  height: 12px;
  min-height: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  flex: 0 0 12px;
  accent-color: #c8a65a;
  transform: translateY(1px);
}

.crm-create-toggle input[type="checkbox"]:hover,
.crm-create-toggle input[type="checkbox"]:focus {
  border: 0;
  box-shadow: none;
  background: transparent;
}

.crm-create-toggle:hover {
  color: #9c7b2b;
}

.crm-create-panel {
  align-content: start;
}

.crm-confirm-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(200, 166, 90, 0.55);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff8df 0%, #fffdf4 100%);
  box-shadow: 0 10px 22px rgba(200, 166, 90, 0.1);
}

.crm-confirm-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.crm-confirm-copy strong {
  color: #7d5a10;
  font-size: 0.92rem;
}

.crm-confirm-copy span {
  color: #8c6a1f;
  font-size: 0.86rem;
  line-height: 1.4;
}

.crm-confirm-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.previous-projects {
  margin-top: 22px;
  gap: 16px;
  padding: 20px 22px;
}

.pdf-preview {
  margin-top: 22px;
  gap: 16px;
  padding: 20px 22px;
}

.pdf-preview-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.pdf-preview-title {
  margin: 6px 0 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.55rem;
  line-height: 1.1;
  color: var(--green-950);
  text-transform: uppercase;
}

.pdf-preview-meta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-500);
  font-size: 0.9rem;
}

.pdf-email-tools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pdf-email-recipient {
  min-width: 280px;
}

.email-recipient-header {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
}

.email-recipient-list {
  display: grid;
  gap: 8px;
}

.email-recipient-row {
  display: flex;
  gap: 8px;
}

.email-recipient-row .email-draft-input {
  flex: 1 1 auto;
}

.email-recipient-add,
.email-recipient-remove {
  border: 1px solid rgba(23, 100, 58, 0.22);
  border-radius: 999px;
  background: #fff;
  color: var(--green-900);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.email-recipient-add {
  align-self: flex-start;
  margin-top: 8px;
  padding: 6px 10px;
}

.email-recipient-remove {
  padding: 0 12px;
}

.route-preview {
  margin-top: 6px;
  border: 1px solid rgba(23, 100, 58, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(244, 251, 245, 0.72);
  padding: 14px;
}

.route-preview-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.route-preview-title {
  margin: 0;
  color: var(--ink-900);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
}

.route-preview-status {
  color: var(--ink-500);
  font-size: 0.85rem;
  text-align: right;
}

.route-preview-status.is-error {
  color: #a63b2c;
  font-weight: 700;
}

.route-map {
  position: relative;
  min-height: 360px;
  border: 1px solid rgba(8, 36, 22, 0.18);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-tint);
}

.route-map .esri-ui-corner .esri-component {
  border-radius: 10px;
}

.route-pin-card-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.route-pin-card {
  position: absolute;
  width: min(230px, 42vw);
  border: 1px solid rgba(9, 36, 71, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  padding: 8px 10px;
  color: var(--ink-900);
  transform-origin: center bottom;
}

.route-pin-card::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  border-right: 1px solid rgba(9, 36, 71, 0.16);
  border-bottom: 1px solid rgba(9, 36, 71, 0.16);
  background: rgba(255, 255, 255, 0.94);
}

.route-pin-card strong,
.route-pin-card span,
.route-pin-card em {
  display: block;
}

.route-pin-card strong {
  color: var(--green-900);
  font-size: 0.82rem;
}

.route-pin-card span {
  margin-top: 2px;
  color: var(--ink-700);
  font-size: 0.74rem;
  line-height: 1.25;
}

.route-pin-card em {
  margin-top: 5px;
  color: #0b2f5f;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.route-pin-card-destination strong {
  color: #7b1f1f;
}

.pdf-email-send {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(163, 79, 44, 0.18);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(236, 239, 242, 0.96) 0%, rgba(250, 250, 250, 1) 100%);
  color: var(--green-900);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.pdf-email-send:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(75, 31, 20, 0.1);
  filter: saturate(1.03);
}

.pdf-email-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.pdf-email-status {
  margin: 0;
  font-size: 0.88rem;
  color: var(--green-800);
}

.pdf-email-status.is-error {
  color: #9d2f2f;
}

.pdf-page-indicator {
  min-width: 60px;
  text-align: center;
  font-weight: 700;
  color: var(--green-900);
}

.pdf-preview-link {
  color: var(--green-800);
  font-weight: 700;
  text-decoration: none;
}

.pdf-preview-link:hover {
  text-decoration: underline;
}

.pdf-preview-shell {
  position: relative;
  overflow: hidden;
  min-height: 860px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(232, 236, 240, 0.96) 0%, rgba(246, 248, 250, 0.98) 100%);
  box-shadow: var(--shadow-soft);
}

.pdf-preview-frame {
  width: 100%;
  height: 860px;
  border: 0;
  background: #d9dde3;
}

.pdf-preview-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(75, 31, 20, 0.88);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: 0 12px 24px rgba(5, 24, 14, 0.18);
}

.pdf-preview-nav:hover:not(:disabled) {
  filter: saturate(1.08);
}

.pdf-preview-nav:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pdf-preview-nav-left {
  left: 14px;
}

.pdf-preview-nav-right {
  right: 14px;
}

.previous-projects-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.previous-projects-title {
  margin: 6px 0 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.45rem;
  line-height: 1.1;
  color: var(--green-950);
  text-transform: uppercase;
}

.previous-projects-caption {
  margin: 0;
  max-width: 280px;
  text-align: right;
  color: var(--ink-500);
  font-size: 0.86rem;
  line-height: 1.5;
}

.previous-projects-body {
  display: grid;
  grid-template-columns: minmax(260px, 0.92fr) minmax(0, 1.08fr);
  gap: 18px;
  align-items: start;
}

.my-projects {
  margin-top: 22px;
}

.my-projects .previous-projects-caption {
  max-width: 320px;
}

.my-projects-body {
  display: grid;
  gap: 14px;
}

.history-detail-panel {
  min-height: auto;
}

.history-chart,
.history-detail {
  display: grid;
  gap: 10px;
}

.history-chart {
  align-content: start;
}

.history-bar {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(110px, 1.7fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink-700);
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

.history-bar:hover {
  transform: translateY(-1px);
  border-color: #d4ad8b;
  box-shadow: 0 10px 18px rgba(75, 31, 20, 0.1);
}

.history-bar.is-active {
  border-color: rgba(163, 79, 44, 0.42);
  background: linear-gradient(180deg, rgba(247, 248, 249, 0.94) 0%, rgba(255, 250, 244, 0.98) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(163, 79, 44, 0.16),
    0 12px 20px rgba(75, 31, 20, 0.1);
}

.history-bar-label {
  text-align: left;
  font-size: 0.88rem;
  font-weight: 600;
}

.history-bar-track {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(163, 79, 44, 0.09);
}

.history-bar-fill {
  display: block;
  height: 100%;
  min-width: 10px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-700) 0%, var(--green-800) 100%);
}

.history-bar-count,
.history-count {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--green-900);
}

.history-detail {
  min-height: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(247, 248, 249, 0.9) 0%, rgba(255, 255, 255, 0.98) 100%);
  border: 1px solid var(--border);
}

.history-detail-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.history-detail-kicker {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8f4b35;
}

.history-detail-title {
  margin: 0;
  font-size: 1.05rem;
  color: var(--green-950);
}

.history-list {
  max-height: 420px;
  overflow-y: auto;
  border-radius: 14px;
  border: 1px solid rgba(225, 216, 207, 0.95);
  background: rgba(255, 255, 255, 0.95);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.history-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 12px;
  background: linear-gradient(180deg, #f4f5f6 0%, #eceff1 100%);
  border-bottom: 1px solid rgba(225, 216, 207, 0.95);
  color: #704131;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.history-table tbody td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(225, 216, 207, 0.9);
  color: var(--ink-700);
  vertical-align: top;
}

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

.history-table tbody td:first-child {
  font-weight: 700;
  color: var(--ink-900);
}

.history-table-link {
  white-space: nowrap;
}

.history-table-link a {
  color: var(--green-800);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.history-table-link a:hover {
  text-decoration: underline;
}

.history-ticket-stack {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  min-width: 180px;
  white-space: normal;
}

.history-ticket-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(163, 79, 44, 0.09);
  color: var(--green-800);
  font-size: 0.77rem;
  font-weight: 700;
  width: fit-content;
}

.history-ticket-badge.is-empty {
  background: rgba(129, 139, 148, 0.14);
  color: var(--ink-700);
}

.history-ticket-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff8ef 0%, #f5e5d6 100%);
  box-shadow: inset 0 0 0 1px rgba(163, 79, 44, 0.18);
  color: var(--green-900);
  text-align: left;
  cursor: pointer;
}

.history-ticket-switch:disabled {
  opacity: 0.72;
  cursor: wait;
}

.history-ticket-switch-track {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 999px;
  background: rgba(129, 139, 148, 0.34);
  transition: background 0.16s ease;
}

.history-ticket-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(24, 38, 28, 0.18);
  transition: transform 0.16s ease;
}

.history-ticket-switch.is-open .history-ticket-switch-track {
  background: linear-gradient(90deg, var(--green-700) 0%, var(--green-800) 100%);
}

.history-ticket-switch.is-open .history-ticket-switch-thumb {
  transform: translateX(20px);
}

.history-ticket-switch-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.history-ticket-switch-label {
  font-size: 0.8rem;
  font-weight: 800;
}

.history-ticket-switch-subject {
  color: var(--ink-500);
  font-size: 0.75rem;
  line-height: 1.35;
  white-space: normal;
}

.history-ticket-note {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(251, 243, 234, 0.92);
  border: 1px solid rgba(225, 216, 207, 0.95);
}

.history-ticket-note-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.92fr);
  gap: 10px;
  align-items: start;
}

.history-note-row td {
  padding: 0 12px 14px;
  border-bottom: 1px solid rgba(225, 216, 207, 0.9);
  background: rgba(248, 251, 247, 0.48);
}

.history-note-row:last-child td {
  border-bottom: 0;
}

.history-ticket-detail {
  display: grid;
  gap: 10px;
}

.history-ticket-note-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8f4b35;
}

.history-ticket-note-input {
  width: 100%;
  min-height: 82px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(191, 208, 188, 0.95);
  background: #fff;
  color: var(--ink-900);
  resize: vertical;
}

.history-ticket-note-input:focus {
  outline: none;
  border-color: rgba(163, 79, 44, 0.44);
  box-shadow: 0 0 0 3px rgba(163, 79, 44, 0.14);
}

.history-ticket-note-field {
  display: grid;
  gap: 4px;
}

.history-ticket-note-field-notify {
  align-content: start;
}

.history-ticket-note-assignees {
  display: grid;
  gap: 6px;
}

.history-ticket-note-select-label {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8f4b35;
}

.history-ticket-note-select {
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(191, 208, 188, 0.95);
  background: #fff;
  color: var(--ink-900);
  font-size: 0.84rem;
  line-height: 1.25;
}

.history-ticket-note-select:focus {
  outline: none;
  border-color: rgba(163, 79, 44, 0.44);
  box-shadow: 0 0 0 3px rgba(163, 79, 44, 0.14);
}

.history-ticket-note-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}

.history-ticket-note-actions .btn-secondary {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.84rem;
}

.history-ticket-message {
  font-size: 0.74rem;
  color: #704131;
  line-height: 1.45;
  padding: 0 2px;
}

.history-ticket-message.is-error {
  color: #c0281d;
  font-weight: 600;
}

@media (max-width: 1080px) {
  .history-ticket-note-layout {
    grid-template-columns: 1fr;
  }
}

.btn-primary {
  min-height: 56px;
  padding: 0 30px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 40%),
    linear-gradient(135deg, var(--green-800) 0%, var(--green-900) 100%);
  color: #fff;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 18px 30px rgba(4, 21, 13, 0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.btn-secondary {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #e8f0ea 100%);
  color: var(--green-900);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(23, 100, 58, 0.18);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 34px rgba(75, 31, 20, 0.26);
  filter: saturate(1.05);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(163, 79, 44, 0.24), 0 10px 20px rgba(75, 31, 20, 0.1);
}

#add-proposal-field-btn {
  background: linear-gradient(180deg, rgba(255, 233, 122, 0.99) 0%, rgba(255, 247, 194, 0.99) 100%);
  border: 1px solid rgba(224, 184, 54, 0.95);
  color: var(--green-900);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    0 10px 20px rgba(224, 184, 54, 0.18);
}

#add-proposal-field-btn:hover {
  background: linear-gradient(180deg, rgba(255, 246, 181, 0.99) 0%, rgba(255, 252, 222, 0.99) 100%);
  border-color: rgba(224, 184, 54, 0.82);
}

.btn-primary:active,
.search-row button:active,
.btn-secondary:active {
  transform: translateY(0);
}

.status {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-500);
}

.status.is-error {
  color: #c0281d;
  font-weight: 600;
}

.status a {
  color: var(--green-700);
  font-weight: 700;
  text-decoration: none;
}

.status a:hover {
  text-decoration: underline;
}

.muted {
  color: var(--ink-500);
}

.site-footer {
  padding: 22px 20px 34px;
  text-align: center;
  color: var(--ink-500);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .workspace-tab-arrow-left {
    left: 12px;
  }

  .workspace-tab-arrow-right {
    right: 12px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: 44px;
    padding-bottom: 120px;
  }

  .hero-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-user {
    position: static;
    margin: 14px 16px 0;
    justify-content: space-between;
  }

  .hero-user-copy {
    text-align: left;
  }

  .hero-panel {
    max-width: 620px;
  }

  .form-shell-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .form-shell-meta {
    justify-items: start;
  }

  .form-shell-note {
    text-align: left;
    max-width: none;
  }

  .previous-projects-body {
    grid-template-columns: 1fr;
  }

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

  .estimator-header,
  .estimator-dashboard,
  .estimator-reference-grid,
  .estimator-workflow-grid,
  .estimator-save-row {
    grid-template-columns: 1fr;
  }

  .estimator-version-card {
    min-width: 0;
  }

  .pdf-preview-header {
    align-items: start;
    flex-direction: column;
  }

  .previous-projects-caption {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 720px) {
  .hero-inner {
    padding: 34px 12px 106px;
    gap: 22px;
  }

  .hero-brand {
    align-items: flex-start;
    gap: 14px;
  }

  .hero-logo {
    width: 66px;
    height: 66px;
  }

  .hero-title-row {
    gap: 6px;
  }

  .hero-title {
    font-size: 2.1rem;
    line-height: 1.06;
  }

  .hero-title-ball {
    width: 21px;
    height: 21px;
    margin-bottom: 3px;
  }

  .hero-sub {
    font-size: 0.97rem;
    line-height: 1.65;
  }

  .hero-tags {
    gap: 8px;
  }

  .hero-tag {
    font-size: 0.8rem;
  }

  .shell {
    margin-top: -70px;
    padding: 0 10px 42px;
  }

  .form-shell {
    padding: 22px 16px;
    border-radius: 8px;
  }

  .auth-card {
    padding: 22px 16px;
    border-radius: 8px;
  }

  .form-shell-title {
    font-size: 1.8rem;
  }

  .form-shell-header {
    gap: 16px;
    padding-bottom: 22px;
    margin-bottom: 22px;
  }

  .form-stack {
    gap: 18px;
  }

  .card {
    padding: 18px 16px;
    gap: 16px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .span-2 {
    grid-column: span 1;
  }

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

  .pricing-preview {
    grid-template-columns: 1fr;
  }

  .workspace-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .workspace-tab-arrow {
    width: 84px;
    min-height: 72px;
    padding: 9px 7px;
    border-radius: 18px;
  }

  .workspace-tab-arrow-icon {
    width: 18px;
    height: 18px;
    border-top-width: 3px;
    border-right-width: 3px;
  }

  .workspace-tab-arrow-label {
    font-size: 0.58rem;
  }

  .price-decomposition-row {
    grid-template-columns: 20px 1fr;
  }

  .price-decomposition-row code,
  .price-decomposition-row strong {
    grid-column: 2;
  }

  .estimator-panel-header {
    display: grid;
  }

  .estimator-panel-header span {
    text-align: left;
  }

  .labor-tier-row {
    grid-template-columns: 1fr;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .labor-tier-heading {
    display: none;
  }

  .logo-type-grid {
    grid-template-columns: 1fr;
  }

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

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

  .project-create-status,
  .project-loading {
    width: 100%;
    justify-items: stretch;
  }

  .previous-projects {
    margin-top: 18px;
    padding: 18px 16px;
  }

  .pdf-preview {
    margin-top: 18px;
    padding: 18px 16px;
  }

  .pdf-preview-meta {
    gap: 10px;
    flex-wrap: wrap;
  }

  .pdf-email-tools {
    width: 100%;
  }

  .pdf-email-recipient {
    min-width: 0;
  }

  .email-recipient-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .email-recipient-remove {
    min-height: 38px;
  }

  .route-preview-header,
  .route-preview-status {
    text-align: left;
  }

  .route-preview-header {
    display: grid;
  }

  .pricing-adjustments-header,
  .pricing-adjustment-option-stack {
    display: grid;
    justify-content: stretch;
  }

  .margin-target-segments {
    width: 100%;
    justify-content: space-between;
  }

  .pdf-preview-shell {
    min-height: 540px;
  }

  .pdf-preview-frame {
    height: 540px;
  }

  .pdf-preview-nav {
    width: 38px;
    height: 38px;
  }

  .pdf-preview-nav-left {
    left: 10px;
  }

  .pdf-preview-nav-right {
    right: 10px;
  }

  .previous-projects-header {
    gap: 10px;
    padding-bottom: 12px;
  }

  .history-bar {
    grid-template-columns: 1fr;
    gap: 8px;
    justify-items: start;
  }

  .history-bar-track {
    width: 100%;
  }

  .history-detail {
    padding: 14px;
  }

  .history-detail-header {
    flex-direction: column;
    align-items: start;
  }

  .history-list {
    max-height: 360px;
  }

  .history-table {
    min-width: 540px;
  }

  .history-note-row td {
    padding: 0 10px 12px;
  }

  .history-ticket-note-layout {
    grid-template-columns: 1fr;
  }

  .previous-projects-body,
  .my-projects-body {
    grid-template-columns: 1fr;
  }

  .btn-primary {
    width: 100%;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.feedback-fab {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 0 18px;
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green-800) 0%, var(--green-900) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow:
    0 18px 36px rgba(75, 31, 20, 0.32),
    0 0 0 4px rgba(255, 255, 255, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.feedback-fab:hover {
  transform: translateY(-2px);
  box-shadow:
    0 24px 46px rgba(75, 31, 20, 0.38),
    0 0 0 4px rgba(255, 255, 255, 0.12);
  filter: saturate(1.08);
}

.feedback-fab:focus-visible {
  outline: 3px solid rgba(200, 166, 90, 0.6);
  outline-offset: 3px;
}

.feedback-fab svg {
  flex-shrink: 0;
}

.feedback-fab-label {
  line-height: 1;
}

.feedback-panel {
  position: fixed;
  bottom: 90px;
  right: 22px;
  z-index: 61;
  width: min(360px, calc(100vw - 44px));
  padding: 22px 22px 20px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 30px 60px rgba(75, 31, 20, 0.3);
  animation: feedbackPanelIn 0.22s ease-out;
}

@keyframes feedbackPanelIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.feedback-panel-title {
  margin: 6px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  color: var(--green-950);
}

.feedback-panel-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: var(--green-050);
  color: var(--green-900);
  cursor: pointer;
  transition: background 0.16s ease;
}

.feedback-panel-close:hover {
  background: var(--green-100);
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feedback-stars {
  border: 0;
  padding: 0;
  margin: 0;
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
}

.feedback-stars input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.feedback-stars label {
  cursor: pointer;
  color: #d9d9d9;
  transition: color 0.14s ease, transform 0.14s ease;
  line-height: 0;
}

.feedback-stars label:hover,
.feedback-stars label:hover ~ label,
.feedback-stars input:checked ~ label {
  color: var(--gold-500);
}

.feedback-stars label:hover {
  transform: scale(1.08);
}

.feedback-stars input:focus-visible + label {
  outline: 2px solid var(--green-700);
  outline-offset: 2px;
  border-radius: 4px;
}

.feedback-message-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-700);
}

.feedback-message {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink-900);
  font: inherit;
  resize: vertical;
  min-height: 86px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.feedback-message:focus {
  outline: none;
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(163, 79, 44, 0.16);
}

.feedback-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feedback-form-status {
  font-size: 0.86rem;
  color: var(--ink-500);
}

.feedback-form-status.is-error {
  color: #b4301f;
}

.feedback-submit {
  min-height: 46px;
  padding: 0 22px;
  font-size: 0.92rem;
}

.feedback-history {
  margin-top: 28px;
}

.feedback-history-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.feedback-history-title {
  margin: 6px 0 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.6rem;
  color: var(--green-950);
  text-transform: uppercase;
}

.feedback-history-stats {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--green-050);
  border: 1px solid var(--border);
}

.feedback-history-avg {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--green-900);
  line-height: 1;
}

.feedback-history-count {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--ink-500);
}

.feedback-history-body {
  display: block;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.feedback-entries {
  display: grid;
  gap: 12px;
}

.feedback-entry {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, rgba(251, 243, 234, 0.68) 100%);
}

.feedback-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.feedback-entry-person {
  display: grid;
  gap: 2px;
}

.feedback-entry-person strong {
  color: var(--green-950);
}

.feedback-entry-meta {
  color: var(--ink-500);
  font-size: 0.84rem;
}

.feedback-star-row {
  display: inline-flex;
  gap: 2px;
  letter-spacing: 0.04em;
}

.feedback-star-icon {
  color: #d9d9d9;
  font-size: 1.05rem;
  line-height: 1;
}

.feedback-star-icon.is-filled {
  color: var(--gold-500);
}

.feedback-entry-message {
  margin: 0;
  color: var(--ink-700);
  line-height: 1.6;
}

.feedback-entry-footer {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--ink-500);
}

@media (max-width: 720px) {
  .feedback-fab {
    bottom: 16px;
    right: 16px;
    padding: 0 16px 0 14px;
  }

  .feedback-fab-label {
    display: none;
  }

  .feedback-panel {
    bottom: 80px;
    right: 16px;
    left: 16px;
    width: auto;
  }

  .feedback-history-header {
    align-items: flex-start;
  }

  .feedback-history-body {
    max-height: 240px;
  }
}

.email-draft {
  margin-top: 4px;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, rgba(246, 250, 244, 0.55) 100%);
  display: grid;
  gap: 14px;
}

.email-draft-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.email-draft-title {
  margin: 6px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  color: var(--green-950);
}

.email-draft-reset {
  align-self: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  color: var(--green-900);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.email-draft-reset:hover:not(:disabled) {
  background: var(--green-050);
  border-color: var(--border-strong);
}

.email-draft-reset:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.email-draft-field {
  display: grid;
  gap: 6px;
}

.email-draft-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.email-draft-input,
.email-draft-textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink-900);
  font: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.email-draft-textarea {
  resize: vertical;
  min-height: 420px;
  line-height: 1.55;
  font-family: inherit;
}

.email-draft-input:focus,
.email-draft-textarea:focus {
  outline: none;
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(163, 79, 44, 0.16);
}

.email-draft-input:disabled,
.email-draft-textarea:disabled {
  opacity: 0.7;
  background: #f5f6f7;
  cursor: not-allowed;
}

.email-draft-attachment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--green-050);
  border: 1px dashed var(--border-strong);
  font-size: 0.88rem;
  color: var(--green-900);
  width: fit-content;
  max-width: 100%;
}

.email-draft-attachment-icon {
  font-size: 1rem;
  line-height: 1;
}

.email-draft-attachment-hint {
  color: var(--ink-500);
  font-weight: 500;
}

.email-draft-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.email-draft-actions .pdf-email-status {
  flex: 1 1 auto;
  text-align: left;
}

.email-draft-actions .pdf-email-send {
  min-height: 46px;
  padding: 0 26px;
}

@media (max-width: 720px) {
  .email-draft {
    padding: 18px;
  }

  .email-draft-header {
    align-items: flex-start;
  }

  .email-draft-actions {
    justify-content: stretch;
  }

  .email-draft-actions .pdf-email-send {
    width: 100%;
  }
}
