:root {
  --bg: #efe8db;
  --panel: #171a1f;
  --panel-soft: #252a31;
  --paper: #fffbf4;
  --ink: #1a1f25;
  --muted: #6a655c;
  --gold: #bf8b34;
  --gold-soft: #ead6af;
  --green: #406b56;
  --line: #d8cebf;
  --shadow: 0 24px 60px rgba(26, 31, 37, 0.12);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --content-width: 1280px;
  --sans: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(191, 139, 52, 0.15), transparent 28%),
    linear-gradient(180deg, #f7f1e6 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: var(--sans);
}

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

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
}

.control-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 28px 24px 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    var(--panel);
  color: #f7f1e6;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.panel-head h1 {
  margin: 6px 0 10px;
  font-size: 2rem;
  line-height: 1;
}

.panel-copy {
  margin: 0;
  color: rgba(247, 241, 230, 0.76);
  line-height: 1.5;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
}

.panel-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.panel-form label,
.email-form label {
  display: grid;
  gap: 8px;
}

.panel-form span,
.email-form span {
  font-size: 0.83rem;
}

.panel-form input,
.panel-form select,
.email-form input,
.email-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font: inherit;
}

.email-form input,
.panel-form select,
.email-form textarea {
  border-color: var(--line);
  background: rgba(26, 31, 37, 0.02);
  color: var(--ink);
}

.panel-form input::placeholder,
.panel-form select,
.email-form input::placeholder,
.email-form textarea::placeholder {
  color: rgba(100, 100, 100, 0.45);
}

.panel-form select {
  appearance: none;
}

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

.checkbox-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  padding: 0;
}

.panel-actions,
.email-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.smtp-panel {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.smtp-head h2 {
  margin: 6px 0 8px;
  font-size: 1.2rem;
}

.smtp-head p {
  margin: 0;
  color: rgba(247, 241, 230, 0.72);
  line-height: 1.5;
}

.smtp-feedback {
  min-height: 1.4em;
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: #d8f0df;
}

.ghost-button,
.solid-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.ghost-light {
  background: rgba(26, 31, 37, 0.08);
  color: var(--ink);
}

.solid-button {
  background: var(--gold);
  color: #231b10;
}

.presentation {
  padding: 38px;
}

.slide {
  width: min(100%, var(--content-width));
  min-height: calc(100vh - 76px);
  margin: 0 auto 34px;
  padding: 44px;
  border: 1px solid rgba(26, 31, 37, 0.08);
  border-radius: 38px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.24)),
    var(--paper);
  box-shadow: var(--shadow);
}

.slide-cover {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 34px;
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(191, 139, 52, 0.14), transparent 34%),
    linear-gradient(180deg, #1b1e24 0%, #242932 100%);
  color: #fbf7f0;
  overflow: hidden;
}

.slide-cover .eyebrow,
.slide-end .eyebrow {
  color: #ebb456;
}

.cover-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.cover-title {
  margin: 0;
  font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: 0.94;
  font-weight: 800;
}

.cover-subtitle {
  max-width: 720px;
  margin: 0;
  font-size: 1.26rem;
  line-height: 1.6;
  color: rgba(251, 247, 240, 0.82);
}

.cover-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.cover-meta div,
.cover-offer {
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.meta-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
}

.cover-card {
  display: grid;
  align-content: center;
  gap: 22px;
}

.logo-stage {
  min-height: 320px;
  padding: 24px;
  border-radius: 30px;
  background: linear-gradient(180deg, #fffaf0 0%, #efe0c5 100%);
  display: grid;
  place-items: center;
}

#logo-preview {
  display: none;
  max-height: 220px;
  object-fit: contain;
}

.logo-placeholder {
  display: grid;
  gap: 8px;
  text-align: center;
  color: var(--ink);
}

.section-heading {
  max-width: 920px;
  margin-bottom: 30px;
}

.section-heading h2 {
  margin: 6px 0 12px;
  font-size: clamp(2.2rem, 3.4vw, 4rem);
  line-height: 0.98;
  font-weight: 800;
}

.section-heading p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.split-layout,
.diff-layout,
.closing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.paper-card,
.note-card,
.quote-panel,
.stat-panel,
.dark-checklist,
.price-card {
  border-radius: var(--radius-xl);
  padding: 28px;
}

.paper-card {
  background: #fffdf7;
  border: 1px solid var(--line);
}

.paper-card h3,
.note-card h3,
.dark-checklist h3 {
  margin: 0 0 16px;
  font-size: 1.35rem;
}

.paper-card ul,
.dark-checklist ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 12px;
  line-height: 1.6;
}

.note-card {
  background:
    linear-gradient(180deg, rgba(191, 139, 52, 0.11), rgba(191, 139, 52, 0.03)),
    #f7efe1;
  border: 1px solid #e5d0ad;
}

.mini-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.mini-points span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(26, 31, 37, 0.06);
  font-size: 0.92rem;
  font-weight: 700;
}

.accent-slide {
  background:
    linear-gradient(135deg, rgba(64, 107, 86, 0.12), transparent 28%),
    var(--paper);
}

.quote-panel {
  display: grid;
  align-content: center;
  background: linear-gradient(180deg, #20252c 0%, #2b3139 100%);
  color: #fff9f2;
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1.15;
  font-weight: 800;
}

.quote-panel p {
  margin: 0;
}

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

.price-card h3 {
  margin: 8px 0 14px;
  font-size: clamp(2.2rem, 3vw, 3.3rem);
  line-height: 1;
}

.price-card p,
.price-card strong {
  display: block;
}

.warm-card {
  background: linear-gradient(180deg, #fff1d7 0%, #f7e0b0 100%);
  color: #2a241d;
}

.dark-card {
  background: linear-gradient(180deg, #1e2126 0%, #262b31 100%);
  color: #f7f2e8;
}

.stat-panel {
  display: grid;
  align-content: center;
  gap: 12px;
  background: linear-gradient(180deg, #fffaf1 0%, #f3e6cf 100%);
  border: 1px solid #e2cfaa;
}

.stat-panel strong {
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 1;
}

.stat-panel span {
  font-size: 1.25rem;
  color: #90671b;
  font-weight: 700;
}

.slide-end {
  background:
    radial-gradient(circle at top right, rgba(191, 139, 52, 0.18), transparent 24%),
    linear-gradient(180deg, #f8f2e7 0%, #f1e7d5 100%);
}

.dark-checklist {
  background: linear-gradient(180deg, #1e2126 0%, #252930 100%);
  color: #fff8ee;
}

.email-panel p {
  margin-top: 0;
  color: var(--muted);
  line-height: 1.6;
}

.email-feedback {
  min-height: 1.4em;
  margin: 12px 0 0;
  font-size: 0.92rem;
  color: var(--green);
}

.closing-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(26, 31, 37, 0.12);
  font-weight: 700;
}

body.present-mode .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.present-mode .control-panel {
  display: none;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .control-panel {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .presentation {
    padding: 18px;
  }

  .slide {
    min-height: auto;
    padding: 30px 22px;
  }
}

@media (max-width: 900px) {
  .slide-cover,
  .split-layout,
  .diff-layout,
  .pricing-grid,
  .closing-grid,
  .field-grid,
  .panel-actions,
  .email-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
}

@media print {
  body {
    background: #fff;
  }

  .app-shell {
    display: block;
  }

  .control-panel {
    display: none;
  }

  .presentation {
    padding: 0;
  }

  .slide {
    min-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    page-break-after: always;
  }
}

.ghost-button:disabled,
.solid-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.proposal-list-panel {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.proposal-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.proposal-item {
  width: 100%;
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: #f7f1e6;
  cursor: pointer;
}

.proposal-item strong {
  font-size: 0.96rem;
}

.proposal-item span,
.proposal-item small,
.proposal-list-empty {
  color: rgba(247, 241, 230, 0.72);
}

.proposal-list-empty {
  margin: 0;
  line-height: 1.5;
}

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

.empty-card {
  width: min(100%, 680px);
  padding: 40px;
  border-radius: 32px;
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: center;
}

.empty-card h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.empty-card p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.6;
}

.inline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

body.present-mode {
  overflow: hidden;
}

body.present-mode .slides-deck {
  min-height: 100vh;
  padding: 26px;
}

body.present-mode .slides-deck .slide {
  display: none;
  min-height: calc(100vh - 52px);
  margin-bottom: 0;
}

body.present-mode .slides-deck .slide.is-active {
  display: block;
}

body.present-mode .slide-cover {
  padding: 32px;
  gap: 24px;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
}

body.present-mode .slide-cover .cover-copy {
  gap: 16px;
}

body.present-mode .slide-cover .cover-title {
  font-size: clamp(2.5rem, 4.1vw, 4.2rem);
  line-height: 0.96;
}

body.present-mode .slide-cover .cover-subtitle {
  font-size: 1.1rem;
  line-height: 1.5;
}

body.present-mode .slide-cover .cover-meta {
  gap: 14px;
}

body.present-mode .slide-cover .cover-meta div,
body.present-mode .slide-cover .cover-offer {
  padding: 14px 16px;
}

body.present-mode .slide-cover .cover-card {
  gap: 16px;
}

body.present-mode .slide-cover .logo-stage {
  min-height: 250px;
  padding: 18px;
}

body.present-mode .slide-cover #logo-preview {
  max-height: 170px;
}

.slide-side-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  width: 54px;
  height: 54px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  line-height: 1;
  box-shadow: 0 18px 40px rgba(26, 31, 37, 0.12);
}

.slide-side-arrow-left {
  left: 18px;
}

.slide-side-arrow-right {
  right: 18px;
}

@media (max-width: 900px) {
  body.present-mode {
    overflow: auto;
  }

  body.present-mode .slides-deck {
    padding: 16px;
  }

  body.present-mode .slides-deck .slide {
    min-height: auto;
  }

  .slide-side-arrow {
    width: 46px;
    height: 46px;
    font-size: 1.8rem;
  }

  .slide-side-arrow-left {
    left: 10px;
  }

  .slide-side-arrow-right {
    right: 10px;
  }
}

@media print {
  body.present-mode {
    overflow: visible;
  }

  body.present-mode .slides-deck .slide {
    display: block;
  }

  .slide-side-arrow {
    display: none;
  }
}
