body {
    font-family: Arial, sans-serif;
    margin: 2em;
    text-align: center;
}

footer {
    text-align: center;
}

img {
    max-width: 400px;
}

form {
    max-width: 600px;
    margin: auto;
    text-align: left;
}

input[type="text"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 1em;
    box-sizing: border-box;
}

button {
    padding: 10px 20px;
    font-size: 1em;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.pdf-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1em;
}

.pdf-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 120px;
    padding: 5px;
    transition: all 0.3s;
    border-radius: 6px;
}

.pdf-item img {
    width: 64px;
    height: 64px;
}

.pdf-item a {
    margin-top: 0.5em;
    text-align: center;
    font-size: 0.9em;
    word-break: break-word;
    color: black;
    text-decoration: none;
}

.pdf-item.clicked {
    background-color: #d4edda;
    border: 2px solid #28a745;
}

.signature-container {
    border: 2px solid #007bff;
    border-radius: 8px;
    padding: 15px;
    background-color: #f8f9fa;
    margin-bottom: 1em;
}

.signature-label {
    margin-bottom: 10px;
    color: #007bff;
    font-weight: 600;
}

.canvas-container {
    width: 100%;
    aspect-ratio: 3 / 1;
    border: 2px solid #dee2e6;
    background-color: white;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

#signature-pad {
    width: 100%;
    height: 100%;
    display: block;
}

.signature-controls {
    margin-top: 15px;
    text-align: center;
}

.btn-clear {
    background-color: #dc3545;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-clear:hover {
    background-color: #c82333;
}

@media (max-width: 768px) {
    .canvas-container {
        aspect-ratio: 2.5 / 1;
    }
}

@media (max-width: 480px) {
    .canvas-container {
        aspect-ratio: 2 / 1;
    }
}
