.contracts-content {
  max-width: 1180px;
}

.contracts-hero {
  margin-bottom: 2rem;
}

.contracts-hero h1 {
  margin: .3rem 0 .7rem;
}

.document-notice,
.document-boundary {
  margin-top: 1.4rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid rgba(192, 132, 252, .25);
  border-radius: 16px;
  background: rgba(139, 92, 246, .07);
}

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

.document-card {
  min-height: 235px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.4rem;
  padding: 1.4rem;
  border: 1px solid rgba(192, 132, 252, .22);
  border-radius: 18px;
  background:
    linear-gradient(
      145deg,
      rgba(42, 26, 66, .78),
      rgba(19, 14, 33, .9)
    );
  box-shadow: 0 18px 50px rgba(0, 0, 0, .16);
}

.document-card h2 {
  margin: .45rem 0 .65rem;
}

.document-type {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: #c9a8ff;
}

.document-actions {
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
}

.document-boundary {
  margin-bottom: 2rem;
}

.contract-reader-body {
  min-height: 100vh;
  padding: 2rem;
  background: #0d0915;
}

.contract-reader {
  max-width: 900px;
  margin: 0 auto;
}

.contract-reader-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.contract-paper {
  padding: clamp(1.5rem, 4vw, 4rem);
  border: 1px solid rgba(192, 132, 252, .2);
  border-radius: 18px;
  background: #fff;
  color: #201a28;
  line-height: 1.65;
}

.contract-paper h1,
.contract-paper h2,
.contract-paper h3 {
  color: #21162d;
}

.contract-paper h1 {
  margin-top: 1rem;
}

.contract-paper h2 {
  margin-top: 2rem;
}

.contract-paper a {
  color: #5b21b6;
}

.contract-draft-banner {
  padding: .8rem 1rem;
  margin-bottom: 2rem;
  border-radius: 10px;
  background: #f3e8ff;
  color: #581c87;
  font-weight: 700;
}

@media (max-width: 760px) {
  .document-grid {
    grid-template-columns: 1fr;
  }

  .contract-reader-body {
    padding: .75rem;
  }

  .contract-reader-actions {
    flex-direction: column;
  }
}

@media print {
  .contract-reader-body {
    padding: 0;
    background: white;
  }

  .contract-reader-actions {
    display: none;
  }

  .contract-paper {
    border: 0;
    box-shadow: none;
    padding: 0;
  }
}

/* Aethelis Contracts & Documents actions */
.document-actions .button,
.contract-reader-actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1.05rem;
  border-radius: 12px;
  border: 1px solid rgba(192, 132, 252, 0.32);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.document-actions .button.primary,
.contract-reader-actions .button.primary {
  background:
    linear-gradient(
      135deg,
      rgba(139, 92, 246, 0.95),
      rgba(168, 85, 247, 0.95)
    );
  border-color: rgba(216, 180, 254, 0.48);
  color: #ffffff;
  box-shadow:
    0 8px 24px rgba(139, 92, 246, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.document-actions .button.secondary,
.contract-reader-actions .button.secondary {
  background:
    linear-gradient(
      145deg,
      rgba(55, 38, 78, 0.9),
      rgba(29, 20, 45, 0.94)
    );
  border-color: rgba(192, 132, 252, 0.28);
  color: #eadcff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 22px rgba(0, 0, 0, 0.14);
}

.document-actions .button:hover,
.contract-reader-actions .button:hover {
  transform: translateY(-1px);
  border-color: rgba(216, 180, 254, 0.7);
  box-shadow:
    0 10px 28px rgba(139, 92, 246, 0.28),
    0 0 20px rgba(168, 85, 247, 0.08);
}

.document-actions .button:focus-visible,
.contract-reader-actions .button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(192, 132, 252, 0.22),
    0 10px 28px rgba(139, 92, 246, 0.24);
}

.contract-reader-actions {
  padding: 0.75rem;
  border: 1px solid rgba(192, 132, 252, 0.16);
  border-radius: 16px;
  background: rgba(27, 18, 43, 0.72);
  backdrop-filter: blur(14px);
}

/* Account section tabs */
.account-section-tabs {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  margin: 0 0 1.6rem;
  padding: 0.35rem;
  border: 1px solid rgba(192, 132, 252, 0.18);
  border-radius: 14px;
  background: rgba(27, 18, 43, 0.62);
  backdrop-filter: blur(14px);
}

.account-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.6rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(239, 229, 255, 0.72);
  font-weight: 700;
  text-decoration: none;
  transition:
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.account-tab:hover {
  color: #ffffff;
  background: rgba(168, 85, 247, 0.08);
}

.account-tab.active {
  color: #ffffff;
  border-color: rgba(216, 180, 254, 0.32);
  background:
    linear-gradient(
      135deg,
      rgba(139, 92, 246, 0.34),
      rgba(168, 85, 247, 0.22)
    );
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.12);
}

@media (max-width: 600px) {
  .account-section-tabs {
    width: 100%;
  }

  .account-tab {
    flex: 1;
  }
}

.account-page-tabs {
  margin: 1.25rem 2rem 0;
}

@media (max-width: 760px) {
  .account-page-tabs {
    margin: 1rem 1rem 0;
  }
}
