* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f4f5f7;
  color: #1a1a1a;
}

.auth-card {
  max-width: 360px;
  margin: 80px auto;
  background: white;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.auth-card h1 {
  margin: 0 0 4px;
  font-size: 24px;
}

.subtitle {
  color: #666;
  margin: 0 0 24px;
  font-size: 14px;
}

form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0 4px;
}

form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d5d7dc;
  border-radius: 8px;
  font-size: 14px;
}

.message {
  min-height: 18px;
  font-size: 13px;
  margin-top: 12px;
}
.message.error { color: #c0392b; }
.message.success { color: #1e8e5a; }

form button {
  width: 100%;
  padding: 10px;
  margin-top: 12px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
#login-btn {
  background: #2f6fed;
  color: white;
}
#signup-btn {
  background: #eef0f4;
  color: #1a1a1a;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: white;
  border-bottom: 1px solid #e5e7eb;
}
.topbar h1 { font-size: 18px; margin: 0; }
.topbar button {
  padding: 6px 14px;
  border: 1px solid #d5d7dc;
  border-radius: 6px;
  background: white;
  cursor: pointer;
}

.dashboard {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 24px;
}

.price-box {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  max-width: 320px;
  margin-top: 16px;
}
.price {
  font-size: 28px;
  font-weight: 700;
}
.price span {
  font-size: 14px;
  font-weight: 400;
  color: #666;
}
.price-features {
  list-style: none;
  padding: 0;
  margin: 16px 0 20px;
  font-size: 14px;
  color: #444;
}
.price-features li {
  padding: 4px 0 4px 20px;
  position: relative;
}
.price-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #1e8e5a;
  font-weight: 700;
}
.price-box .new-contract-btn {
  display: block;
  text-align: center;
}

.plan-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.plan-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}
.plan-badge.plan-free {
  background: #eef0f4;
  color: #444;
}
.plan-badge.plan-active {
  background: #e3f7ec;
  color: #1e8e5a;
}
.upgrade-link {
  font-size: 13px;
  color: #2f6fed;
  font-weight: 600;
  text-decoration: none;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.new-contract-btn {
  background: #2f6fed;
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
}

.back-link {
  color: #2f6fed;
  text-decoration: none;
  font-size: 14px;
}

.empty {
  color: #666;
  font-size: 14px;
}

.contract-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 16px 20px;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  margin-bottom: 12px;
}

.contract-info {
  font-size: 14px;
  line-height: 1.6;
}

.status {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 8px;
}
.status-sent, .status-draft {
  background: #fff4e0;
  color: #b5760a;
}
.status-signed {
  background: #e3f7ec;
  color: #1e8e5a;
}

.amount {
  color: #555;
  font-size: 13px;
}

.copy-btn,
.pdf-btn {
  background: #eef0f4;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}

.contract-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0 4px;
}

.contract-form input,
.contract-form select,
.contract-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d5d7dc;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}

.contract-form button {
  margin-top: 16px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: #2f6fed;
  color: white;
  font-size: 14px;
  cursor: pointer;
}

.contract-form .template-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.contract-form .template-row select {
  flex: 1;
}
.contract-form .template-row button {
  margin-top: 0;
  white-space: nowrap;
  background: #eef0f4;
  color: #1a1a1a;
}

.hint {
  font-size: 12px;
  color: #777;
  margin: 6px 0 0;
}
.hint code {
  background: #f0f1f4;
  padding: 1px 4px;
  border-radius: 4px;
}

#cancel-edit-btn {
  background: #eef0f4;
  color: #1a1a1a;
  margin-left: 8px;
}

/* ---------- Startseite ---------- */

.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  flex-wrap: wrap;
  gap: 12px;
}
.landing-logo {
  font-size: 20px;
  font-weight: 700;
}
.landing-nav nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.landing-nav nav a {
  color: #444;
  text-decoration: none;
  font-size: 14px;
}
.landing-nav nav a:hover {
  color: #2f6fed;
}
.landing-nav .nav-cta {
  background: #2f6fed;
  color: white;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 600;
}
.landing-nav .nav-cta:hover {
  color: white;
  background: #2558c4;
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}
.btn-primary {
  background: #2f6fed;
  color: white;
}
.btn-primary:hover {
  background: #2558c4;
}
.btn-secondary {
  background: white;
  color: #2f6fed;
  border: 1px solid #d5d7dc;
}
.btn-secondary:hover {
  border-color: #2f6fed;
}

.hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 72px 24px 56px;
  text-align: center;
}
.hero h1 {
  font-size: 38px;
  line-height: 1.25;
  margin: 0 0 20px;
}
.hero-sub {
  font-size: 17px;
  line-height: 1.65;
  color: #555;
  max-width: 640px;
  margin: 0 auto 32px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-note {
  font-size: 13px;
  color: #777;
  margin-top: 18px;
}

.steps-section,
.features-section,
.pricing-section,
.legal-note-section,
.final-cta {
  max-width: 980px;
  margin: 0 auto;
  padding: 56px 24px;
}
.steps-section h2,
.features-section h2,
.pricing-section h2,
.legal-note-section h2,
.final-cta h2 {
  text-align: center;
  font-size: 26px;
  margin: 0 0 32px;
}

.steps,
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.step,
.feature {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.step h3,
.feature h3 {
  font-size: 16px;
  margin: 0 0 8px;
}
.step p,
.feature p {
  font-size: 14px;
  line-height: 1.6;
  color: #555;
  margin: 0;
}
.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2f6fed;
  color: white;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.pricing-sub {
  text-align: center;
  font-size: 14px;
  color: #666;
  margin: -20px 0 32px;
}
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 680px;
  margin: 0 auto;
}
.plan {
  background: white;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  border: 2px solid transparent;
  position: relative;
}
.plan-highlight {
  border-color: #2f6fed;
}
.plan-badge-top {
  position: absolute;
  top: -12px;
  left: 28px;
  background: #2f6fed;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}
.plan h3 {
  font-size: 17px;
  margin: 0 0 10px;
}
.plan-price {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 18px;
}
.plan-price span {
  font-size: 14px;
  font-weight: 400;
  color: #666;
}
.plan ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  font-size: 14px;
  color: #444;
}
.plan li {
  padding: 5px 0 5px 22px;
  position: relative;
}
.plan li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #1e8e5a;
  font-weight: 700;
}
.plan .btn-primary,
.plan .btn-secondary {
  display: block;
  text-align: center;
}

.legal-note-section {
  max-width: 760px;
}
.legal-note-section p {
  font-size: 14px;
  line-height: 1.7;
  color: #555;
}

.final-cta {
  text-align: center;
}
.final-cta p {
  font-size: 15px;
  color: #555;
  margin: -20px 0 24px;
}

@media (max-width: 600px) {
  .hero h1 { font-size: 28px; }
  .hero { padding: 48px 20px 40px; }
  .landing-nav { padding: 14px 20px; }
  .landing-nav nav { gap: 16px; }
}

.legal-page {
  max-width: 760px;
  margin: 40px auto;
  padding: 0 24px 60px;
  line-height: 1.7;
}
.legal-page h1 { font-size: 26px; margin-bottom: 24px; }
.legal-page h2 { font-size: 18px; margin: 32px 0 12px; }
.legal-page h3 { font-size: 15px; margin: 20px 0 8px; }
.legal-page p, .legal-page li { font-size: 14px; color: #333; }
.legal-page ul { padding-left: 20px; }
.legal-page a { color: #2f6fed; }
.draft-notice {
  background: #fff4e0;
  border: 1px solid #f0d9a8;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin: 16px 0;
}

.site-footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: #888;
}
.site-footer a {
  color: #888;
  margin: 0 8px;
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}

.sign-card {
  max-width: 560px;
  margin: 60px auto;
  background: white;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.sign-card h1 {
  font-size: 20px;
  margin: 0 0 16px;
}

.sign-card h2 {
  font-size: 18px;
  margin: 0 0 4px;
}

.client-line {
  color: #666;
  font-size: 14px;
  margin: 0 0 16px;
}

.contract-text {
  white-space: pre-wrap;
  font-family: inherit;
  background: #f7f8fa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.signature-wrap {
  border: 1px solid #d5d7dc;
  border-radius: 8px;
  background: white;
  margin-top: 6px;
}
.signature-pad {
  width: 100%;
  height: 150px;
  touch-action: none;
  display: block;
}
.clear-btn {
  margin-top: 8px;
  background: #eef0f4;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  font-weight: 400;
  margin-top: 16px;
}
.checkbox-line input {
  width: auto;
  margin-top: 2px;
}

.signed-badge {
  display: inline-block;
  background: #e3f7ec;
  color: #1e8e5a;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  margin-bottom: 16px;
}

#sign-form button {
  width: 100%;
  padding: 12px;
  margin-top: 20px;
  border: none;
  border-radius: 8px;
  background: #2f6fed;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
