:root {
  --navy: #06427e;
  --navy-light: #0956a7;
  --accent-soft: #ffd814;
  --border: #d5d9d9;
  --bg-page: #e3e6e6;
  --bg-card: #ffffff;
  --text-main: #111111;
  --text-subtle: #555555;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg-page);
  color: var(--text-main);
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 110px;
}

header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(15, 17, 17, .15);
  overflow: hidden;
  margin-bottom: 12px;
}

.brand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
}

.kicker {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .95;
}

.titles {
  padding: 12px 16px 14px;
}

.title1 {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 6px;
}

.title2 {
  font-size: 13px;
  color: var(--text-subtle);
  margin: 0;
  line-height: 1.45;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(15, 17, 17, .15);
  overflow: hidden;
}

.pdfHeader {
  padding: 10px 12px;
  border-bottom: 1px solid #eaeded;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.pdfHeader .title span {
  font-size: 12px;
  color: var(--text-subtle);
  display: block;
}

.pdfHeader .title strong {
  font-size: 13px;
  font-weight: 800;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pdfWrap {
  height: min(78vh, 820px);
  background: #fff;
}

.pdfObject {
  width: 100%;
  height: 100%;
  border: 0;
}

.pdfLoading,
.pdfError {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  font-size: 14px;
  color: var(--text-subtle);
}

.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: #f7fafa;
  color: var(--text-main);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(15, 17, 17, .08);
  transition: transform .05s ease, box-shadow .15s ease;
  white-space: nowrap;
}

.btn:hover {
  box-shadow: 0 3px 8px rgba(15, 17, 17, .18);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

.btnAccept {
  background: linear-gradient(#ffd814, #fcd200);
  border-color: #fcd200;
  color: #111;
  font-weight: 800;
}

.stickyBar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-top: 1px solid #eaeded;
  box-shadow: 0 -2px 6px rgba(15, 17, 17, .2);
  padding: 8px 16px;
  z-index: 100;
  display: flex;
  justify-content: center;
}

.stickyInner {
  max-width: 1100px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.left {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.headline {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.hint {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70vw;
}

.right {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 0 0 auto;
}

.signBlock {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 240px;
}

.signLabel {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-subtle);
}

.signInput {
  font: inherit;
  height: 34px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 17, 17, 0.08);
  outline: none;
}

.signInput:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 2px rgba(6, 66, 126, 0.25);
}

.confirm {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--text-subtle);
  font-weight: 600;
  white-space: nowrap;
}

.confirm input {
  width: 18px;
  height: 18px;
  accent-color: var(--navy);
  cursor: pointer;
}

@media (max-width: 720px) {
  .stickyInner {
    flex-direction: column;
    align-items: stretch;
  }

  .right {
    justify-content: space-between;
  }

  .confirm {
    white-space: normal;
  }

  .signBlock {
    min-width: 0;
    flex: 1 1 auto;
  }

  .signInput {
    width: 100%;
  }
}
