.step {
    margin-top: 1.5rem;
}

.step.hidden {
    display: none;
}

.step h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #555;
}

/* Tabs */
.signature-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
}

.tab {
    padding: 0.5rem 1.5rem;
    border: 1px solid #ddd;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 0.9rem;
}

.tab:first-child {
    border-radius: 6px 0 0 6px;
}

.tab:last-child {
    border-radius: 0 6px 6px 0;
    border-left: none;
}

.tab.active {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Signature canvas */
#signatureCanvas {
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: crosshair;
    display: block;
    background: white;
    touch-action: none;
}

#clearSignature {
    margin-top: 0.5rem;
}

#useSignature {
    margin-top: 1rem;
    width: 100%;
    padding: 1rem;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
}

#useSignature:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Saved signature */
.saved-signature-preview {
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    text-align: center;
}

.saved-signature-preview img {
    max-width: 300px;
    max-height: 120px;
}

/* Signature upload */
.drop-zone.small {
    padding: 1.5rem;
}

#sigPreview {
    margin-top: 1rem;
}

#sigPreview img {
    max-width: 200px;
    max-height: 100px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* PDF viewer */
.pdf-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pdf-controls button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

#pageInfo {
    color: #666;
    min-width: 100px;
    text-align: center;
}

#pdfContainer {
    position: relative;
    display: inline-block;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    cursor: crosshair;
}

#pdfCanvas {
    display: block;
    max-width: 100%;
}

/* Signature overlay */
.signature-overlay {
    position: absolute;
    cursor: move;
    outline: 2px dashed #0066cc;
    outline-offset: 2px;
    background: rgba(255, 255, 255, 0.8);
}

.signature-overlay img {
    display: block;
    width: 150px;
    height: auto;
    pointer-events: none;
}

.signature-overlay .resize-handle {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    background: #0066cc;
    cursor: se-resize;
    border-radius: 2px;
}

.signature-overlay .remove {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 20px;
    height: 20px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Actions */
.actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.secondary {
    background: #e0e0e0;
    color: #333;
}

.secondary:hover {
    background: #d0d0d0;
}

header h1 a {
    color: inherit;
    text-decoration: none;
}

header h1 a:hover {
    text-decoration: underline;
}
