:root {
  --ink: #161616;
  --muted: #6c6f75;
  --line: #dedbd2;
  --paper: #fbfaf6;
  --surface: #ffffff;
  --charcoal: #202124;
  --green: #1f8a5f;
  --red: #d34936;
  --gold: #bd8b13;
  --blue: #2457d6;
  --soft-green: #e7f5ee;
  --soft-gold: #fff1cc;
  --shadow: 0 24px 80px rgba(22, 22, 22, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 16% 18%, rgba(31, 138, 95, 0.14), transparent 24rem),
    linear-gradient(135deg, #f7f3ea 0%, #eff5f1 44%, #f4f7fb 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.74);
  border-right: 1px solid rgba(32, 33, 36, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  background: var(--charcoal);
  color: white;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-weight: 650;
}

.nav-item.active,
.nav-item:hover {
  background: #161616;
  color: white;
}

.icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
}

.trust-panel {
  margin-top: auto;
  padding: 18px;
  border: 1px solid rgba(31, 138, 95, 0.22);
  border-radius: 8px;
  background: var(--soft-green);
}

.trust-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 99px;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(31, 138, 95, 0.12);
}

.trust-panel p {
  color: #3f6958;
  font-size: 13px;
  line-height: 1.5;
  margin: 10px 0 0;
}

.main {
  min-width: 0;
  max-width: 100vw;
  padding: 28px;
}

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 0.98;
  letter-spacing: 0;
}

.topbar-actions,
.signature-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-button,
.ghost-button,
.dark-button,
.icon-button,
.pen-button,
.segment,
.tab,
.field-chip {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 750;
}

.primary-button {
  padding: 0 16px;
  background: var(--red);
  color: white;
  box-shadow: 0 12px 30px rgba(211, 73, 54, 0.24);
}

.ghost-button {
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.68);
  border-color: var(--line);
  color: var(--charcoal);
}

.dark-button {
  padding: 0 14px;
  background: var(--charcoal);
  color: white;
}

.pen-button {
  padding: 0 14px;
  background: var(--green);
  color: white;
  box-shadow: 0 10px 24px rgba(31, 138, 95, 0.2);
}

.small {
  min-height: 36px;
  font-size: 13px;
}

.full {
  width: 100%;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  align-items: end;
  gap: 18px;
  margin-bottom: 20px;
  padding: 26px;
  border-radius: 8px;
  background:
    linear-gradient(110deg, rgba(22, 22, 22, 0.94), rgba(34, 44, 47, 0.86)),
    url("data:image/svg+xml,%3Csvg width='1200' height='420' viewBox='0 0 1200 420' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.16'%3E%3Cpath d='M40 320 C220 170 335 390 520 210 S900 85 1160 250'/%3E%3Cpath d='M80 120 C260 250 370 35 560 150 S860 320 1120 90'/%3E%3C/g%3E%3Cg fill='%23ffffff' fill-opacity='.08'%3E%3Crect x='740' y='72' width='270' height='170' rx='8'/%3E%3Crect x='790' y='115' width='170' height='12' rx='6'/%3E%3Crect x='790' y='146' width='116' height='12' rx='6'/%3E%3Crect x='790' y='182' width='138' height='30' rx='7'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  color: white;
  box-shadow: var(--shadow);
}

.hero-copy h2 {
  max-width: 760px;
  margin-bottom: 10px;
  font-size: clamp(26px, 4.5vw, 54px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 660px;
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 16px;
  line-height: 1.6;
}

.hero-metric {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.hero-metric span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 58px;
}

.hero-metric small {
  color: rgba(255, 255, 255, 0.7);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
  align-items: start;
}

.security-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.security-strip > div {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  min-height: 86px;
  padding: 16px;
  border: 1px solid rgba(32, 33, 36, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 42px rgba(22, 22, 22, 0.06);
}

.security-strip small {
  grid-column: 2;
  color: var(--muted);
  line-height: 1.4;
}

.security-icon {
  display: grid;
  width: 38px;
  height: 38px;
  grid-row: span 2;
  place-items: center;
  border-radius: 8px;
  background: #161616;
  color: white;
  font-weight: 850;
}

.document-area,
.action-panel {
  min-width: 0;
}

.toolbar,
.action-panel,
.pdf-stage {
  border: 1px solid rgba(32, 33, 36, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 46px rgba(22, 22, 22, 0.08);
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  margin-bottom: 12px;
}

.segmented,
.signature-tabs,
.field-palette {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.segment,
.tab,
.field-chip {
  padding: 0 12px;
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.segment.active,
.tab.active,
.field-chip.active {
  background: var(--charcoal);
  color: white;
}

.zoom-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.icon-button {
  width: 40px;
  background: white;
  border-color: var(--line);
}

.dropzone {
  display: grid;
  min-height: 145px;
  place-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 20px;
  border: 1.5px dashed rgba(32, 33, 36, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
  transition: 160ms ease;
}

.dropzone.dragging {
  border-color: var(--green);
  background: var(--soft-green);
}

.dropzone input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: #161616;
  color: white;
  font-size: 22px;
}

.dropzone small {
  color: var(--muted);
}

.pdf-stage {
  display: grid;
  min-height: 680px;
  place-items: center;
  overflow: auto;
  padding: 32px;
}

.pdf-page {
  position: relative;
  width: min(100%, 680px);
  aspect-ratio: 0.74;
  transform: scale(var(--zoom, 1));
  transform-origin: top center;
  padding: 46px;
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 0 28px 90px rgba(22, 22, 22, 0.18);
  transition: transform 160ms ease;
}

.pdf-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 6px;
  background: white;
}

.pdf-page.real-pdf {
  background: white;
}

.pdf-page.pdf-rendered {
  padding: 0;
  overflow: hidden;
}

.pdf-render-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  background: white;
}

.pdf-page.real-pdf .pdf-frame {
  display: none;
}

.pdf-page.real-pdf .page-header,
.pdf-page.real-pdf .doc-lines,
.pdf-page.real-pdf .clause-grid {
  display: none;
}

.pdf-page.request-sign-mode .signature-field {
  display: none;
}

.page-header {
  display: flex;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 2px solid #222;
  color: #343434;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.doc-lines {
  display: grid;
  gap: 14px;
  margin-top: 42px;
}

.line {
  display: block;
  height: 12px;
  width: 78%;
  border-radius: 99px;
  background: #d8d2c2;
}

.line.wide {
  width: 100%;
}

.line.short {
  width: 44%;
}

.line.medium {
  width: 62%;
}

.clause-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 52px;
}

.clause-grid span {
  height: 96px;
  border-radius: 8px;
  background: #eee9dc;
}

.signature-field {
  position: absolute;
  z-index: 2;
  right: 46px;
  bottom: 82px;
  display: none;
  width: 250px;
  min-height: 78px;
  place-items: center;
  padding: 10px;
  border: 2px solid var(--blue);
  border-radius: 8px;
  background: rgba(36, 87, 214, 0.08);
  color: var(--blue);
  font-weight: 800;
}

.pdf-page.self-sign-mode .signature-field {
  display: grid;
}

.employee-sign-field {
  position: absolute;
  left: 58%;
  top: 66%;
  z-index: 2;
  display: none;
  width: 250px;
  height: 78px;
  padding: 10px;
  border: 2px solid var(--gold);
  border-radius: 8px;
  background: rgba(255, 241, 204, 0.9);
  color: #75520b;
  text-align: left;
  box-shadow: 0 16px 34px rgba(117, 82, 11, 0.16);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.employee-sign-field.ready {
  display: grid;
  align-content: center;
  gap: 4px;
}

.employee-sign-field.placed {
  border-color: var(--green);
  background: rgba(231, 245, 238, 0.94);
  color: #173b2d;
}

.employee-sign-field.dragging {
  cursor: grabbing;
}

.employee-sign-field .resize-handle {
  position: absolute;
  z-index: 3;
  width: 14px;
  height: 14px;
  border: 2px solid white;
  border-radius: 5px;
  background: var(--blue);
  box-shadow: 0 3px 10px rgba(22, 22, 22, 0.2);
}

.employee-sign-field .resize-nw {
  left: -8px;
  top: -8px;
  cursor: nwse-resize;
}

.employee-sign-field .resize-n {
  left: calc(50% - 7px);
  top: -8px;
  cursor: ns-resize;
}

.employee-sign-field .resize-ne {
  right: -8px;
  top: -8px;
  cursor: nesw-resize;
}

.employee-sign-field .resize-e {
  right: -8px;
  top: calc(50% - 7px);
  cursor: ew-resize;
}

.employee-sign-field .resize-se {
  right: -8px;
  bottom: -8px;
  cursor: nwse-resize;
}

.employee-sign-field .resize-s {
  left: calc(50% - 7px);
  bottom: -8px;
  cursor: ns-resize;
}

.employee-sign-field .resize-sw {
  left: -8px;
  bottom: -8px;
  cursor: nesw-resize;
}

.employee-sign-field .resize-w {
  left: -8px;
  top: calc(50% - 7px);
  cursor: ew-resize;
}

.employee-sign-field small,
.employee-sign-field strong {
  display: block;
}

.employee-sign-field small {
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.employee-sign-field strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signature-field.signed {
  border-color: var(--green);
  background: rgba(31, 138, 95, 0.1);
  color: #173b2d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 35px;
  font-style: italic;
  font-weight: 400;
}

.stamp {
  position: absolute;
  z-index: 2;
  left: 46px;
  bottom: 100px;
  display: none;
  padding: 8px 12px;
  border: 1px solid rgba(211, 73, 54, 0.45);
  border-radius: 8px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  transform: rotate(-4deg);
}

.pdf-page.request-field-active .stamp {
  display: block;
}

.action-panel {
  display: grid;
  gap: 1px;
  overflow: hidden;
}

.sign-flow-panel {
  display: none;
}

body.self-flow-active #selfSignPanel,
body.self-flow-active #signerFieldsPanel,
body.request-flow-active #employeeRequestPanel {
  display: block;
}

.panel-section {
  padding: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.section-title span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: var(--soft-gold);
  color: #75520b;
  font-size: 12px;
  font-weight: 850;
}

.section-title h3 {
  margin: 0;
  font-size: 16px;
}

#signatureCanvas {
  width: 100%;
  height: 128px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(transparent 72%, rgba(189, 139, 19, 0.18) 72%, rgba(189, 139, 19, 0.18) 74%, transparent 74%),
    #fffefb;
  touch-action: none;
}

.typed-signature {
  display: none;
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-style: italic;
}

.signature-actions {
  justify-content: flex-end;
  margin-top: 10px;
}

.field-chip {
  border-color: var(--line);
  background: white;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: #3d4145;
  font-size: 14px;
  font-weight: 650;
}

.toggle-row input {
  accent-color: var(--green);
  width: 18px;
  height: 18px;
}

.request-form {
  display: grid;
  gap: 12px;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.workflow-step {
  display: grid;
  min-height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.workflow-step.active {
  border-color: rgba(31, 138, 95, 0.28);
  background: var(--soft-green);
  color: #173b2d;
}

.workflow-step.done {
  border-color: rgba(31, 138, 95, 0.42);
  background: var(--green);
  color: white;
}

.request-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.request-form input,
.request-form textarea,
.dropbox-path input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

.sign-ready-card {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(189, 139, 19, 0.32);
  border-radius: 8px;
  background: var(--soft-gold);
}

.sign-ready-card.verified {
  border-color: rgba(31, 138, 95, 0.32);
  background: var(--soft-green);
}

.sign-ready-card span {
  color: #75520b;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.sign-ready-card.verified span {
  color: #173b2d;
}

.sign-ready-card strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sign-ready-card small {
  color: var(--muted);
  line-height: 1.4;
}

.request-form input,
.dropbox-path input {
  min-height: 44px;
  padding: 0 12px;
}

.request-form textarea {
  resize: vertical;
  padding: 12px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100vw - 44px));
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--charcoal);
  color: white;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(14px);
  transition: 180ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.vault-section {
  display: grid;
  gap: 14px;
}

.security-status {
  display: grid;
  gap: 10px;
}

.security-status > div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(31, 138, 95, 0.18);
  border-radius: 8px;
  background: var(--soft-green);
}

.security-status small,
.dropbox-path {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.security-status code {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #173b2d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropbox-path {
  display: grid;
  gap: 7px;
}

.dropbox-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sign-page {
  background: linear-gradient(135deg, #f7f3ea 0%, #eff5f1 50%, #f4f7fb 100%);
}

.sign-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
}

.sign-card {
  width: min(100%, 980px);
  padding: 24px;
  border: 1px solid rgba(32, 33, 36, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.sign-brand {
  margin-bottom: 22px;
}

.sign-card h1 {
  font-size: clamp(28px, 4vw, 42px);
}

.sign-preview {
  height: min(42vh, 420px);
  min-height: 520px;
  margin: 18px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfaf6;
  font-size: 13px;
}

.preview-toolbar a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.sign-document-view {
  position: relative;
  height: calc(100% - 42px);
}

.sign-preview iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.signature-pad-overlay {
  position: absolute;
  z-index: 2;
  display: none;
  grid-template-rows: auto minmax(92px, 1fr) auto;
  gap: 8px;
  max-width: min(430px, 90%);
  padding: 10px;
  border: 2px solid var(--blue);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 48px rgba(22, 22, 22, 0.2);
}

.signature-pad-overlay.active {
  display: grid;
}

.signature-pad-overlay span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.signature-pad-overlay canvas {
  width: 100%;
  height: 120px;
  border: 1px dashed rgba(36, 87, 214, 0.4);
  border-radius: 8px;
  background:
    linear-gradient(transparent 68%, rgba(36, 87, 214, 0.14) 68%, rgba(36, 87, 214, 0.14) 70%, transparent 70%),
    #fff;
  touch-action: none;
}

.signature-pad-overlay .small {
  justify-self: end;
  min-height: 34px;
}

.sign-action-box {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid rgba(189, 139, 19, 0.3);
  border-radius: 8px;
  background: var(--soft-gold);
}

.sign-action-box h2 {
  margin: 0;
  font-size: 20px;
}

.sign-action-box p {
  margin: 0;
  color: #75520b;
  font-weight: 700;
  line-height: 1.5;
}

.sign-name-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.sign-name-label input {
  width: 100%;
  min-height: 46px;
  margin-top: 8px;
  padding: 0 12px;
  border: 1px solid rgba(189, 139, 19, 0.34);
  border-radius: 8px;
  background: white;
}

.signature-display {
  display: grid;
  min-height: 92px;
  margin-top: 12px;
  place-items: center;
  border: 1px dashed rgba(117, 82, 11, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: #75520b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 6vw, 48px);
  font-style: italic;
  text-align: center;
}

.consent-row {
  align-items: flex-start;
  margin-bottom: 14px;
}

.signed-message {
  display: none;
  margin: 12px 0 0;
  color: var(--green);
  font-weight: 800;
}

.dashboard-shell {
  display: grid;
  gap: 22px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-home {
  text-decoration: none;
}

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

.dashboard-metrics article,
.dashboard-table-wrap {
  border: 1px solid rgba(32, 33, 36, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 46px rgba(22, 22, 22, 0.08);
}

.dashboard-metrics article {
  display: grid;
  gap: 6px;
  padding: 18px;
}

.dashboard-metrics span {
  font-size: 34px;
  font-weight: 900;
}

.dashboard-metrics small {
  color: var(--muted);
  font-weight: 800;
}

.dashboard-table-wrap {
  overflow: auto;
  padding: 20px;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.dashboard-table th,
.dashboard-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.dashboard-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef0f2;
  color: #4b535c;
  font-size: 12px;
  font-weight: 850;
  text-transform: capitalize;
}

.status-pending {
  background: var(--soft-gold);
  color: #75520b;
}

.status-in-progress {
  background: #eaf1ff;
  color: var(--blue);
}

.status-signed {
  background: var(--soft-green);
  color: #173b2d;
}

.sign-card.completed .sign-action-box,
.sign-card.completed .consent-row,
.sign-card.completed #completeSign,
.sign-card.completed #reviewDocument,
.sign-card.completed .signature-pad-overlay {
  display: none;
}

.sign-card.completed .signed-message {
  display: block;
}

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 4;
    display: grid;
    grid-template-columns: auto 1fr;
    padding: 16px;
  }

  .nav-list {
    display: flex;
    justify-content: flex-end;
    overflow-x: auto;
  }

  .trust-panel {
    display: none;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .security-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .brand {
    flex-shrink: 0;
  }

  .nav-list {
    justify-content: flex-start;
    max-width: 100%;
    padding-bottom: 2px;
  }

  .nav-item {
    flex: 0 0 auto;
    min-width: max-content;
  }

  .main {
    padding: 16px;
  }

  .topbar,
  .toolbar,
  .hero-band {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .topbar-actions button {
    min-width: 0;
    padding-inline: 10px;
    white-space: normal;
  }

  .hero-copy h2,
  .hero-copy p {
    overflow-wrap: anywhere;
  }

  .dropbox-actions {
    grid-template-columns: 1fr;
  }

  .hero-metric {
    justify-items: start;
  }

  .pdf-stage {
    min-height: 520px;
    padding: 18px;
  }

  .pdf-page {
    padding: 26px;
  }

  .signature-field {
    right: 26px;
    bottom: 70px;
    width: 190px;
  }

  .employee-sign-field {
    width: 190px;
  }

  .stamp {
    left: 26px;
    bottom: 62px;
  }
}
