/* Kontraktify Sign - DocuSign Style Design */

:root {
  --primary: #0f0f10;
  --primary-hover: #2f3035;
  --primary-light: #F5F5F5;
  --secondary: #6c757d;
  --success: #4a4b50;
  --warning: #6f7178;
  --danger: #6f7178;
  --text: #0f0f10;
  --text-light: #6c6f76;
  --text-muted: #6c6f76;
  --bg: #F5F5F5;
  --card: #ffffff;
  --border: rgba(17, 17, 19, 0.08);
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #fff;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-display: block;
}

/* Prevent FOUT (Flash of Unstyled Text) */
.upload-text {
  visibility: visible !important;
  opacity: 1 !important;
}

.upload-button {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Header */
.sign-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.sign-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.logo:hover {
  color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-primary:disabled {
  background: #cbd5e0;
  cursor: not-allowed;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-full {
  width: 100%;
}

/* Step Indicator */
.step-indicator {
  flex: 1;
  max-width: 600px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-indicator-bar {
  width: 100%;
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
  position: relative;
}

.step-indicator-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-hover) 100%);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.step-indicator-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  gap: 0;
}

.step-label {
  transition: color 0.2s ease;
  flex: 1;
  text-align: center;
}

.step-label.active {
  color: var(--primary);
}

/* Create Header (Back Button, Steps, Generate) */
.create-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.create-header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 100%;
  gap: 24px;
  position: relative;
}

.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
  background: #fff;
  flex-shrink: 0;
}

.back-button:hover {
  background: var(--bg);
  border-color: var(--primary);
  color: var(--primary);
}

.step-indicator-centered {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Main Layout */
.main-layout {
  display: grid;
  grid-template-columns: 320px 1fr 200px;
  height: calc(100vh - 73px);
  overflow: hidden;
}

/* Sidebars */
.sidebar-left {
  background: #ffffff;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 24px;
  transition: all 0.3s ease;
}

.sidebar-right {
  background: #ffffff;
  border-left: 1px solid var(--border);
  overflow-y: auto;
  padding: 20px;
}

.sidebar-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  margin-bottom: 16px;
}

/* Tool Sections */
.tool-section {
  margin-bottom: 32px;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Upload Button */
.upload-button {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: inherit;
  margin: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
}

.upload-button:hover {
  border-color: var(--primary);
  background: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.upload-button input[type="file"] {
  display: none;
  pointer-events: none;
}

.upload-text {
  pointer-events: none;
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.upload-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.upload-text strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.upload-text span {
  font-size: 12px;
  color: var(--text-light);
}

.file-info {
  margin-top: 12px;
  padding: 12px;
  background: var(--primary-light);
  border-radius: 6px;
  border-left: 3px solid var(--success);
}

.file-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.file-size {
  font-size: 11px;
  color: var(--text-light);
}

/* Input Fields */
.input-field {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s;
}

.input-field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.select-field {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s;
}

.select-field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.signer-input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.signer-input-group .input-field {
  flex: 1;
}

/* Signers List */
.signers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.signer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.signer-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
}

.signer-info {
  flex: 1;
}

.signer-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.signer-label {
  font-size: 12px;
  color: var(--text-light);
}

.remove-signer {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #fee;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-signer:hover {
  background: #fcc;
}

/* Fields Grid */
.fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.field-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: grab;
  transition: all 0.2s;
  user-select: none;
}

.field-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.field-item:active {
  cursor: grabbing;
}

.field-item.dragging {
  opacity: 0.5;
}

.field-icon {
  font-size: 24px;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

.help-text {
  padding: 12px;
  background: #F5F5F5;
  border-radius: 6px;
  border-left: 3px solid var(--warning);
  font-size: 12px;
  color: #4a4b50;
  line-height: 1.5;
}

/* PDF Viewer */
.pdf-viewer-container {
  background: #F5F5F5;
  overflow-y: auto;
  padding: 40px;
  display: flex;
  justify-content: center;
}

.pdf-pages {
  max-width: 900px;
  width: 100%;
}

.pdf-page-wrapper {
  position: relative;
  margin-bottom: 24px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: visible;
}

.pdf-page-wrapper canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Signature Fields on PDF */
.signature-field {
  position: absolute;
  border: 2px dashed rgba(15, 15, 16, 0.3);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
  min-height: 40px;
  padding: 4px 8px;
  text-align: center;
  z-index: 10;
  pointer-events: auto;
}

.signature-field:hover {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 3px rgba(15, 15, 16, 0.1);
}

.signature-field.completed {
  border: 2px solid #10b981;
  background: rgba(255, 255, 255, 1);
  border-style: solid;
}

.signature-field.completed img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

/* Placed Fields */
.placed-field {
  position: absolute;
  border: 2px solid;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  cursor: move;
  user-select: none;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  min-width: 120px;
  min-height: 40px;
  padding: 8px;
}

.placed-field:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.placed-field:active {
  cursor: grabbing;
}

.field-delete {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--danger);
  color: #ffffff;
  border: 2px solid #ffffff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.placed-field:hover .field-delete {
  opacity: 1;
}

/* Thumbnails */
.thumbnails-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.thumbnail-item {
  border: 2px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  background: #ffffff;
}

.thumbnail-item:hover {
  border-color: var(--primary);
  transform: scale(1.05);
}

.thumbnail-item.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.thumbnail-item canvas {
  display: block;
  width: 100%;
  height: auto;
}

.thumbnail-label {
  text-align: center;
  padding: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  background: var(--bg);
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  text-align: center;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-muted);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s;
}

.modal.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: #ffffff;
  border-radius: 12px;
  padding: 32px;
  max-width: 700px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.modal-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  background: var(--bg);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-light);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: #e9ecef;
  color: var(--text);
}

.modal-description {
  color: var(--text-light);
  margin-bottom: 24px;
  font-size: 14px;
}

.signer-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.link-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid;
  border-radius: 8px;
  padding: 16px;
}

.link-box-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.link-input {
  display: flex;
  gap: 8px;
}

.link-input input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  font-family: monospace;
  background: #ffffff;
}

.copy-btn {
  padding: 10px 16px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: var(--primary-hover);
}

.copy-btn.copied {
  background: var(--success);
}

/* Email Input Section */
.section-description {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
    line-height: 1.5;
}

.email-input-section {
  margin: 24px 0;
  padding: 24px;
  background: var(--bg-light);
  border-radius: 12px;
  border: 1px solid var(--border);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.email-input-header {
  margin-bottom: 16px;
}

.email-input-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.email-input-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.email-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.email-input-field {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  transition: all 0.2s ease;
}

.email-input-field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 15, 16, 0.1);
}

.email-error {
  font-size: 0.875rem;
  color: var(--danger);
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 6px;
  border-left: 3px solid var(--danger);
}

.track-section {
  padding: 16px;
  background: #F5F5F5;
  border-radius: 8px;
  border-left: 4px solid var(--warning);
  margin-bottom: 24px;
}

.track-title {
  font-weight: 700;
  margin-bottom: 12px;
  font-size: 14px;
  color: #4a4b50;
}

.track-help {
  font-size: 12px;
  color: #4a4b50;
  margin-top: 8px;
}

.loading-content {
  background: #ffffff;
  padding: 48px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.loading-content p {
  margin-top: 24px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}

/* Spinner */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

/* Container */
.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

/* Responsive */
@media (max-width: 1200px) {
  .main-layout {
    grid-template-columns: 280px 1fr 180px;
  }
}

@media (max-width: 768px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar-left,
  .sidebar-right {
    display: none;
  }
}

/* E-Signature How It Works Animations */

/* Tech Grid Background Animation */
@keyframes techGridMove {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(20px, 20px);
  }
}

.tech-grid-bg {
  animation: techGridMove 20s linear infinite;
  pointer-events: none;
}

/* Step Number Glow Animation */
@keyframes stepGlow {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

.step-number-glow {
  animation: stepGlow 3s ease-in-out infinite;
}

/* Step Container Hover Effect */
.esig-step {
  transition: transform 0.3s ease;
}

.esig-step:hover {
  transform: translateY(-4px);
}

.esig-animation-container {
  position: relative;
  z-index: 1;
}

.esig-animation-container svg {
  position: relative;
  z-index: 2;
}

/* Step 1: Upload Document Animations */
@keyframes docDrop {
  0% {
    opacity: 0;
    transform: translateY(-30px) scale(0.7) rotate(-5deg);
    filter: blur(2px);
  }
  30% {
    opacity: 1;
    filter: blur(0);
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(70px) scale(1.1) rotate(2deg);
    filter: blur(1px);
  }
}

@keyframes docAppear {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(10px);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

@keyframes checkmarkDraw {
  0% {
    stroke-dashoffset: 20;
    opacity: 0;
    filter: drop-shadow(0 0 0 rgba(34, 197, 94, 0));
  }
  50% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 1;
    filter: drop-shadow(0 0 4px rgba(34, 197, 94, 0.6));
  }
}

.doc-drop-1 {
  animation: docDrop 2s ease-in-out 0.5s infinite;
}

.doc-drop-2 {
  animation: docDrop 2s ease-in-out 1s infinite;
}

.doc-uploaded {
  opacity: 0;
  animation: docAppear 0.6s ease-out 1.5s forwards;
}

.check-icon {
  opacity: 0;
  animation: docAppear 0.4s ease-out 2s forwards;
}

.check-path {
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  animation: checkmarkDraw 0.5s ease-out 2.2s forwards;
}


/* Step 2: Add Details Animations */
@keyframes fieldAppear {
  0% {
    opacity: 0;
    transform: scaleY(0) scaleX(0.9);
    transform-origin: top;
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: scaleY(1) scaleX(1);
    filter: blur(0);
  }
}

@keyframes cursorMove {
  0% {
    opacity: 0;
    transform: translate(0, 0);
  }
  20% {
    opacity: 1;
  }
  50% {
    transform: translate(60px, 0);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(60px, 30px);
  }
}

@keyframes signatureWrite {
  0% {
    stroke-dashoffset: 100;
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

.name-field {
  opacity: 0;
  transform-origin: top;
  animation: fieldAppear 0.5s ease-out 0.5s forwards;
}

.name-text {
  opacity: 0;
  animation: fadeIn 0.3s ease-out 1s forwards;
}

.signature-block {
  opacity: 0;
  transform-origin: top;
  animation: fieldAppear 0.5s ease-out 1.5s forwards;
}

.signature-label {
  opacity: 0;
  animation: fadeIn 0.3s ease-out 2s forwards;
}

.signature-line {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  opacity: 0;
  animation: signatureWrite 1s ease-out 2.3s forwards;
}

.cursor-pointer {
  animation: cursorMove 2.5s ease-in-out 0.5s infinite;
}

/* Step 3: Generate Links Animations */
@keyframes linkCardSlide {
  0% {
    opacity: 0;
    transform: translateX(-40px) scale(0.95);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
}

@keyframes emailFly {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.7) rotate(-5deg);
    filter: blur(4px);
  }
  40% {
    opacity: 1;
    filter: blur(0);
  }
  60% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0.8;
    transform: translateY(-15px) scale(0.9) rotate(2deg);
    filter: blur(1px);
  }
}

.link-card-1,
.link-icon-1,
.link-text-1,
.copy-btn-1 {
  opacity: 0;
  animation: linkCardSlide 0.6s ease-out 0.5s forwards;
}

.link-card-2,
.link-icon-2,
.link-text-2,
.copy-btn-2 {
  opacity: 0;
  animation: linkCardSlide 0.6s ease-out 1s forwards;
}

.email-flying {
  animation: emailFly 2s ease-in-out 1.8s infinite;
}

/* Step 4: Completed Document Animations */
@keyframes docComplete {
  0% {
    opacity: 0;
    transform: scale(0.85) rotate(-2deg);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    filter: blur(0);
  }
}

@keyframes checkBadgePulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
    filter: drop-shadow(0 0 4px rgba(34, 197, 94, 0.4));
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.8));
  }
}

@keyframes emailNotification {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.completed-doc {
  opacity: 0;
  animation: docComplete 0.6s ease-out 0.5s forwards;
}

.completed-signature {
  opacity: 0;
  animation: fieldAppear 0.5s ease-out 1s forwards;
}

.completed-signature-line {
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  opacity: 0;
  animation: signatureWrite 1s ease-out 1.3s forwards;
}

.check-badge {
  opacity: 0;
  animation: docAppear 0.4s ease-out 1.8s forwards, checkBadgePulse 1.5s ease-in-out 2.2s infinite;
}

.check-mark {
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  opacity: 0;
  animation: checkmarkDraw 0.5s ease-out 2s forwards;
}

.email-notification {
  opacity: 0;
  animation: emailNotification 0.6s ease-out 2.5s forwards;
}

/* Responsive for animations */
@media (max-width: 968px) {
  .esig-steps-grid {
    grid-template-columns: 1fr !important;
  }
}
