:root {
    --primary: #6e48aa;
    --primary-dark: #5a3b8c;
    --secondary: #37b6f6;
    --bg-light: #f5f5fa;
    --text-dark: #2d2d3a;
}

body {
    background-color: var(--bg-light);
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
}

.bg-dark-custom {
    background: linear-gradient(135deg, #1e1e2c 0%, #2d2d3a 100%);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.btn-primary-custom {
    background-color: var(--primary);
    color: white;
    border: none;
}

.btn-primary-custom:hover {
    background-color: var(--primary-dark);
    color: white;
}

.bg-light-gray {
    background-color: #f8f9fa;
}

.section-header {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

/* Estilos del "Papel" del contrato */
.contract-paper {
    background-color: white;
    border: 1px solid #dee2e6;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    font-family: 'Times New Roman', Times, serif;
    /* Fuente serif para aspecto legal */
    line-height: 1.5;
    color: #000;
    position: relative;
    font-size: 0.9rem;
    /* Aumentado para mejor lectura */
}

.contract-text h5 {
    margin-top: 10px;
    font-weight: bold;
    font-family: 'Poppins', sans-serif;
    /* Títulos en sans-serif */
    font-size: 1rem;
    /* Títulos más grandes */
    text-transform: uppercase;
    color: #333;
}

/* Logo del contrato responsive */
.contract-logo {
    height: 70px;
    margin-bottom: 5px;
}

/* Canvas de Firma */
.signature-pad {
    border: 2px dashed #cbd5e0;
    background-color: white;
    border-radius: 8px;
    cursor: crosshair;
    touch-action: none;
    /* Importante para móviles */
    width: 100%;
    height: 200px;
    transition: border-color 0.3s;
}

.signature-pad:hover,
.signature-pad:active {
    border-color: var(--primary);
}

/* Área de firmas en el documento final */
.signature-box {
    margin-top: 10px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.signature-img {
    max-height: 80px;
    margin-bottom: -10px;
    /* Superponer ligeramente sobre la línea */
    z-index: 1;
}

.signature-line {
    width: 80%;
    height: 1px;
    background-color: #000;
    margin-bottom: 5px;
}

/* Zona interactiva de firma */
.clickable-zone {
    cursor: pointer;
    transition: transform 0.2s;
}

.clickable-zone:active {
    transform: scale(0.98);
}

.signature-placeholder {
    border: 2px dashed var(--primary);
    background-color: rgba(110, 72, 170, 0.05);
    border-radius: 8px;
    padding: 15px 5px;
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

/* Estilos para inputs */
.form-control,
.form-select {
    border-radius: 8px;
    padding: 10px 15px;
    border: 1px solid #ced4da;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(110, 72, 170, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .contract-paper {
        padding: 20px !important;
        font-size: 0.9rem;
    }

    .signature-pad {
        height: 150px;
    }
}