body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background: url('background.jpg') no-repeat center center fixed;
  background-size: cover;
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  line-height: 1.6;
}
.container {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  position: relative;
}
.top-logo {
  display: block;
  margin: 0 auto 24px auto;
  max-width: 180px;
  max-height: 80px;
}
h1 {
  text-align: center;
  color: #333;
  margin-bottom: 30px;
  font-size: 2rem;
}
h3 {
  color: #444;
  margin-bottom: 15px;
}
.form-section {
  margin-bottom: 30px;
}
.form-group {
  margin-bottom: 20px;
}
label {
  display: block;
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
}
input[type="text"] {
  width: 100%;
  padding: 12px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}
input[type="text"]:focus {
  outline: none;
  border-color: #667eea;
}
.signature-section {
  margin-bottom: 30px;
  text-align: center;
}
.signature-pad-container {
  display: inline-block;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  background: #fafafa;
  padding: 10px;
  margin-bottom: 15px;
}
#signaturePad {
  border: 1px dashed #ccc;
  border-radius: 4px;
  background: #fff;
  cursor: crosshair;
  touch-action: none;
}
.signature-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
button {
  padding: 12px 24px;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 600;
}
.primary-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
.primary-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}
.primary-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.secondary-btn {
  background: #f8f9fa;
  color: #6c757d;
  border: 2px solid #e9ecef;
}
.secondary-btn:hover {
  background: #e9ecef;
  color: #495057;
}
.info-box {
  background: #e3f2fd;
  border: 1px solid #bbdefb;
  border-radius: 8px;
  padding: 20px;
  margin-top: 30px;
}
.info-box p {
  margin: 0;
  color: #1565c0;
  line-height: 1.6;
}
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.loading-content {
  background: white;
  padding: 40px;
  border-radius: 12px;
  text-align: center;
}
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.success-message {
  text-align: center;
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 12px;
  padding: 40px 20px;
  margin-top: 30px;
}
.success-message h2 {
  color: #388e3c;
  margin-bottom: 16px;
}
@media (max-width: 768px) {
  body { padding: 10px; }
  .container { padding: 20px; }
  #signaturePad { width: 100% !important; max-width: 350px; }
  .signature-controls { flex-direction: column; align-items: center; }
  button { width: 100%; max-width: 300px; }
}
@media (pointer: coarse) {
  button { min-height: 48px; padding: 15px 30px; }
  input { min-height: 48px; font-size: 16px; }
  #signaturePad { touch-action: none; }
}