:root {
  --green-950: #062917;
  --green-900: #0d3c22;
  --green-800: #145732;
  --green-700: #1b6d41;
  --green-100: #e8f3eb;
  --green-050: #f4f8f3;
  --gold-500: #c8a65a;
  --gold-300: #e5d3a4;
  --ink-900: #18261c;
  --ink-700: #36503d;
  --ink-500: #64786b;
  --surface: #ffffff;
  --surface-soft: #fbfcf9;
  --surface-tint: #f6f8f2;
  --border: #dbe5da;
  --border-strong: #bfd0bc;
  --shadow-soft: 0 10px 30px rgba(8, 39, 22, 0.08);
  --shadow-card: 0 24px 60px rgba(8, 39, 22, 0.12);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 36px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background:
    radial-gradient(circle at top, rgba(200, 166, 90, 0.08), transparent 26%),
    linear-gradient(180deg, #f2f6ef 0%, #f7faf5 30%, #f3f7f1 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--ink-900);
  background: transparent;
  -webkit-font-smoothing: antialiased;
}

input,
select,
textarea,
button {
  font: inherit;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 38%),
    linear-gradient(180deg, var(--green-900) 0%, var(--green-800) 100%);
  color: #fff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 88px 88px;
  opacity: 0.18;
  pointer-events: none;
}

.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: #fff7db;
}

.hero-glow-right {
  right: -120px;
  top: -100px;
  background: #81b08f;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 54px 16px 138px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  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: 54px;
  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: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f6f1 100%);
  color: var(--green-900);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(6, 41, 23, 0.18);
  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(6, 41, 23, 0.22);
  filter: saturate(1.03);
}

.hero-login-link-secondary {
  min-height: 40px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: none;
}

[hidden] {
  display: none !important;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-logo {
  width: 76px;
  height: 76px;
  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: 12px;
}

.hero-overline {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.72);
}

.hero-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 4vw, 4.25rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: #fff;
}

.hero-title-ball {
  width: 16px;
  height: 16px;
  margin-bottom: 9px;
  flex-shrink: 0;
  filter: invert(88%) sepia(22%) saturate(511%) hue-rotate(8deg) brightness(96%) contrast(88%);
  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: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 600;
}

.hero-panel {
  align-self: stretch;
  padding: 18px 18px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  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: rgba(255, 255, 255, 0.72);
}

.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: 999px;
  background: rgba(255, 255, 255, 0.1);
  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: linear-gradient(90deg, var(--gold-500) 0%, var(--gold-300) 34%, transparent 100%);
}

.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.98) 0%, #fff 100%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  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(180deg, rgba(255, 255, 255, 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: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  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: 18px;
  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(13, 60, 34, 0.28),
    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(27, 109, 65, 0.18);
  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(13, 60, 34, 0.32),
    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(27, 109, 65, 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: 1px solid var(--border);
}

.section-kicker {
  margin-bottom: 10px;
  color: var(--green-700);
}

.form-shell-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--green-950);
}

.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: 999px;
  background: var(--surface-tint);
  border: 1px solid var(--border);
  color: var(--ink-700);
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
}

.legend-sample {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: #fff4e1;
  border: 1px solid var(--gold-500);
  box-shadow: inset 0 0 0 1px rgba(200, 166, 90, 0.08);
}

.form-stack {
  display: grid;
  gap: 22px;
}

.card {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(244, 248, 243, 0.95) 0%, rgba(255, 255, 255, 0.96) 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 {
  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);
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  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: #a8bdaa;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--green-700);
  box-shadow:
    0 0 0 4px rgba(27, 109, 65, 0.12),
    0 10px 18px rgba(20, 87, 50, 0.08);
}

.readonly-field {
  background: linear-gradient(180deg, #f7faf6 0%, #edf3ed 100%);
  color: var(--ink-700);
}

.critical input,
.critical select {
  background: linear-gradient(180deg, #fff8ee 0%, #fffdf9 100%);
  border-color: rgba(200, 166, 90, 0.72);
}

.critical input:focus,
.critical select:focus {
  border-color: var(--gold-500);
  box-shadow:
    0 0 0 4px rgba(200, 166, 90, 0.14),
    0 10px 18px rgba(200, 166, 90, 0.08);
}

.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(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.tile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 14px 16px;
  border-radius: 16px;
  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: #aac7b1;
  background: #f8fbf7;
  box-shadow: 0 10px 20px rgba(14, 60, 34, 0.06);
}

.tile:has(input:checked) {
  border-color: rgba(27, 109, 65, 0.45);
  background: linear-gradient(180deg, rgba(232, 243, 235, 0.92) 0%, rgba(247, 251, 246, 0.98) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(27, 109, 65, 0.18),
    0 12px 22px rgba(14, 60, 34, 0.08);
  color: var(--green-900);
}

.tile input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--green-700);
  flex-shrink: 0;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.search-row button,
.btn-primary {
  border: 0;
  cursor: pointer;
}

.search-row button {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  background: linear-gradient(180deg, #1b6d41 0%, #145732 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(14, 60, 34, 0.16);
  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(14, 60, 34, 0.22);
  filter: saturate(1.05);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
}

.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: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.1;
  color: var(--green-950);
}

.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;
}

.pdf-email-send {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(20, 87, 50, 0.16);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(232, 243, 235, 0.96) 0%, rgba(247, 251, 246, 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(14, 60, 34, 0.08);
  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: 760px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(246, 248, 242, 0.82) 0%, rgba(255, 255, 255, 0.98) 100%);
  box-shadow: var(--shadow-soft);
}

.pdf-preview-frame {
  width: 100%;
  height: 760px;
  border: 0;
  background: #fff;
}

.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(13, 60, 34, 0.86);
  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: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.1;
  color: var(--green-950);
}

.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;
}

.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: #a9c5b1;
  box-shadow: 0 10px 18px rgba(14, 60, 34, 0.08);
}

.history-bar.is-active {
  border-color: rgba(27, 109, 65, 0.4);
  background: linear-gradient(180deg, rgba(232, 243, 235, 0.92) 0%, rgba(247, 251, 246, 0.98) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(27, 109, 65, 0.14),
    0 12px 20px rgba(14, 60, 34, 0.08);
}

.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(20, 87, 50, 0.08);
}

.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(246, 248, 242, 0.85) 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: var(--green-700);
}

.history-detail-title {
  margin: 0;
  font-size: 1.05rem;
  color: var(--green-950);
}

.history-list {
  max-height: 280px;
  overflow-y: auto;
  border-radius: 14px;
  border: 1px solid rgba(219, 229, 218, 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: #eef4ec;
  border-bottom: 1px solid rgba(219, 229, 218, 0.95);
  color: var(--green-800);
  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(219, 229, 218, 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;
}

.btn-primary {
  min-height: 56px;
  padding: 0 30px;
  border-radius: 16px;
  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(13, 60, 34, 0.2);
  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(13, 60, 34, 0.24);
  filter: saturate(1.05);
}

.btn-primary:active,
.search-row button: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-800);
  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) {
  .hero-inner {
    grid-template-columns: 1fr;
    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;
  }

  .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: 8px;
  }

  .hero-title-ball {
    width: 14px;
    height: 14px;
    margin-bottom: 7px;
  }

  .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: 24px;
  }

  .auth-card {
    padding: 22px 16px;
    border-radius: 24px;
  }

  .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;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
    align-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;
  }

  .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: 240px;
  }

  .history-table {
    min-width: 540px;
  }

  .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(13, 60, 34, 0.3),
    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(13, 60, 34, 0.36),
    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(6, 41, 23, 0.28);
  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(27, 109, 65, 0.14);
}

.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: Georgia, "Times New Roman", serif;
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  color: var(--green-950);
}

.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;
}

.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(244, 248, 243, 0.6) 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;
  }
}

.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: 180px;
  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(27, 109, 65, 0.14);
}

.email-draft-input:disabled,
.email-draft-textarea:disabled {
  opacity: 0.7;
  background: #f7f9f5;
  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%;
  }
}
